Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
5b5d99cf JB |
21 | ac_help="$ac_help |
22 | --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]" | |
627af7ea MK |
23 | ac_help="$ac_help |
24 | --disable-gdbcli disable command-line interface (CLI)" | |
25 | ac_help="$ac_help | |
26 | --disable-gdbmi disable machine-interface (MI)" | |
06825bd1 MK |
27 | ac_help="$ac_help |
28 | --enable-tui enable full-screen terminal user interface (TUI)" | |
8ee53726 | 29 | ac_help="$ac_help |
d28f9cdf DJ |
30 | --enable-gdbtk enable gdbtk graphical user interface (GUI)" |
31 | ac_help="$ac_help | |
32 | --enable-profiling enable profiling of GDB" | |
06825bd1 MK |
33 | ac_help="$ac_help |
34 | --without-included-regex don't use included regex; this is the default | |
35 | on systems with version 2 of the GNU C library | |
36 | (use with caution on other system)" | |
030292b7 DJ |
37 | ac_help="$ac_help |
38 | --with-sysroot[=DIR] Search for usr/lib et al within DIR." | |
c906108c SS |
39 | ac_help="$ac_help |
40 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
41 | ac_help="$ac_help |
42 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
43 | ac_help="$ac_help |
44 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
45 | ac_help="$ac_help |
46 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
47 | ac_help="$ac_help | |
48 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-tclinclude=DIR Directory where tcl private headers are" | |
51 | ac_help="$ac_help | |
52 | --with-tkinclude=DIR Directory where tk private headers are" | |
53 | ac_help="$ac_help | |
54 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
55 | ac_help="$ac_help | |
56 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --with-x use the X Window System" | |
7a292a7a SS |
59 | ac_help="$ac_help |
60 | --enable-sim Link gdb with simulator" | |
8dcde887 MK |
61 | ac_help="$ac_help |
62 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
63 | ac_help="$ac_help |
64 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
65 | |
66 | # Initialize some variables set by options. | |
67 | # The variables have the same names as the options, with | |
68 | # dashes changed to underlines. | |
69 | build=NONE | |
70 | cache_file=./config.cache | |
71 | exec_prefix=NONE | |
72 | host=NONE | |
73 | no_create= | |
74 | nonopt=NONE | |
75 | no_recursion= | |
76 | prefix=NONE | |
77 | program_prefix=NONE | |
78 | program_suffix=NONE | |
79 | program_transform_name=s,x,x, | |
80 | silent= | |
81 | site= | |
c41b7eb1 | 82 | sitefile= |
c906108c SS |
83 | srcdir= |
84 | target=NONE | |
85 | verbose= | |
86 | x_includes=NONE | |
87 | x_libraries=NONE | |
88 | bindir='${exec_prefix}/bin' | |
89 | sbindir='${exec_prefix}/sbin' | |
90 | libexecdir='${exec_prefix}/libexec' | |
91 | datadir='${prefix}/share' | |
92 | sysconfdir='${prefix}/etc' | |
93 | sharedstatedir='${prefix}/com' | |
94 | localstatedir='${prefix}/var' | |
95 | libdir='${exec_prefix}/lib' | |
96 | includedir='${prefix}/include' | |
97 | oldincludedir='/usr/include' | |
98 | infodir='${prefix}/info' | |
99 | mandir='${prefix}/man' | |
100 | ||
101 | # Initialize some other variables. | |
102 | subdirs= | |
103 | MFLAGS= MAKEFLAGS= | |
104 | SHELL=${CONFIG_SHELL-/bin/sh} | |
105 | # Maximum number of lines to put in a shell here document. | |
106 | ac_max_here_lines=12 | |
107 | ||
108 | ac_prev= | |
109 | for ac_option | |
110 | do | |
111 | ||
112 | # If the previous option needs an argument, assign it. | |
113 | if test -n "$ac_prev"; then | |
114 | eval "$ac_prev=\$ac_option" | |
115 | ac_prev= | |
116 | continue | |
117 | fi | |
118 | ||
119 | case "$ac_option" in | |
120 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
121 | *) ac_optarg= ;; | |
122 | esac | |
123 | ||
124 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
125 | ||
126 | case "$ac_option" in | |
127 | ||
128 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
129 | ac_prev=bindir ;; | |
130 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
131 | bindir="$ac_optarg" ;; | |
132 | ||
133 | -build | --build | --buil | --bui | --bu) | |
134 | ac_prev=build ;; | |
135 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
136 | build="$ac_optarg" ;; | |
137 | ||
138 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
139 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
140 | ac_prev=cache_file ;; | |
141 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
142 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
143 | cache_file="$ac_optarg" ;; | |
144 | ||
145 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
146 | ac_prev=datadir ;; | |
147 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
148 | | --da=*) | |
149 | datadir="$ac_optarg" ;; | |
150 | ||
151 | -disable-* | --disable-*) | |
152 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
153 | # Reject names that are not valid shell variable names. | |
154 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
155 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
156 | fi | |
157 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
158 | eval "enable_${ac_feature}=no" ;; | |
159 | ||
160 | -enable-* | --enable-*) | |
161 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
162 | # Reject names that are not valid shell variable names. | |
163 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
164 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
165 | fi | |
166 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
167 | case "$ac_option" in | |
168 | *=*) ;; | |
169 | *) ac_optarg=yes ;; | |
170 | esac | |
171 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
172 | ||
173 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
174 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
175 | | --exec | --exe | --ex) | |
176 | ac_prev=exec_prefix ;; | |
177 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
178 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
179 | | --exec=* | --exe=* | --ex=*) | |
180 | exec_prefix="$ac_optarg" ;; | |
181 | ||
182 | -gas | --gas | --ga | --g) | |
183 | # Obsolete; use --with-gas. | |
184 | with_gas=yes ;; | |
185 | ||
186 | -help | --help | --hel | --he) | |
187 | # Omit some internal or obsolete options to make the list less imposing. | |
188 | # This message is too long to be a string in the A/UX 3.1 sh. | |
189 | cat << EOF | |
190 | Usage: configure [options] [host] | |
191 | Options: [defaults in brackets after descriptions] | |
192 | Configuration: | |
193 | --cache-file=FILE cache test results in FILE | |
194 | --help print this message | |
195 | --no-create do not create output files | |
196 | --quiet, --silent do not print \`checking...' messages | |
c41b7eb1 | 197 | --site-file=FILE use FILE as the site file |
c906108c SS |
198 | --version print the version of autoconf that created configure |
199 | Directory and file names: | |
200 | --prefix=PREFIX install architecture-independent files in PREFIX | |
201 | [$ac_default_prefix] | |
202 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
203 | [same as prefix] | |
204 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
205 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
206 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
207 | --datadir=DIR read-only architecture-independent data in DIR | |
208 | [PREFIX/share] | |
209 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
210 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
211 | [PREFIX/com] | |
212 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
213 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
214 | --includedir=DIR C header files in DIR [PREFIX/include] | |
215 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
216 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
217 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
218 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
219 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
220 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
221 | --program-transform-name=PROGRAM | |
222 | run sed PROGRAM on installed program names | |
223 | EOF | |
224 | cat << EOF | |
225 | Host type: | |
226 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
227 | --host=HOST configure for HOST [guessed] | |
228 | --target=TARGET configure for TARGET [TARGET=HOST] | |
229 | Features and packages: | |
230 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
231 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
232 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
233 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
234 | --x-includes=DIR X include files are in DIR | |
235 | --x-libraries=DIR X library files are in DIR | |
236 | EOF | |
237 | if test -n "$ac_help"; then | |
238 | echo "--enable and --with options recognized:$ac_help" | |
239 | fi | |
240 | exit 0 ;; | |
241 | ||
242 | -host | --host | --hos | --ho) | |
243 | ac_prev=host ;; | |
244 | -host=* | --host=* | --hos=* | --ho=*) | |
245 | host="$ac_optarg" ;; | |
246 | ||
247 | -includedir | --includedir | --includedi | --included | --include \ | |
248 | | --includ | --inclu | --incl | --inc) | |
249 | ac_prev=includedir ;; | |
250 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
251 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
252 | includedir="$ac_optarg" ;; | |
253 | ||
254 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
255 | ac_prev=infodir ;; | |
256 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
257 | infodir="$ac_optarg" ;; | |
258 | ||
259 | -libdir | --libdir | --libdi | --libd) | |
260 | ac_prev=libdir ;; | |
261 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
262 | libdir="$ac_optarg" ;; | |
263 | ||
264 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
265 | | --libexe | --libex | --libe) | |
266 | ac_prev=libexecdir ;; | |
267 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
268 | | --libexe=* | --libex=* | --libe=*) | |
269 | libexecdir="$ac_optarg" ;; | |
270 | ||
271 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
272 | | --localstate | --localstat | --localsta | --localst \ | |
273 | | --locals | --local | --loca | --loc | --lo) | |
274 | ac_prev=localstatedir ;; | |
275 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
276 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
277 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
278 | localstatedir="$ac_optarg" ;; | |
279 | ||
280 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
281 | ac_prev=mandir ;; | |
282 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
283 | mandir="$ac_optarg" ;; | |
284 | ||
285 | -nfp | --nfp | --nf) | |
286 | # Obsolete; use --without-fp. | |
287 | with_fp=no ;; | |
288 | ||
289 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
290 | | --no-cr | --no-c) | |
291 | no_create=yes ;; | |
292 | ||
293 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
294 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
295 | no_recursion=yes ;; | |
296 | ||
297 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
298 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
299 | | --oldin | --oldi | --old | --ol | --o) | |
300 | ac_prev=oldincludedir ;; | |
301 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
302 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
303 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
304 | oldincludedir="$ac_optarg" ;; | |
305 | ||
306 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
307 | ac_prev=prefix ;; | |
308 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
309 | prefix="$ac_optarg" ;; | |
310 | ||
311 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
312 | | --program-pre | --program-pr | --program-p) | |
313 | ac_prev=program_prefix ;; | |
314 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
315 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
316 | program_prefix="$ac_optarg" ;; | |
317 | ||
318 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
319 | | --program-suf | --program-su | --program-s) | |
320 | ac_prev=program_suffix ;; | |
321 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
322 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
323 | program_suffix="$ac_optarg" ;; | |
324 | ||
325 | -program-transform-name | --program-transform-name \ | |
326 | | --program-transform-nam | --program-transform-na \ | |
327 | | --program-transform-n | --program-transform- \ | |
328 | | --program-transform | --program-transfor \ | |
329 | | --program-transfo | --program-transf \ | |
330 | | --program-trans | --program-tran \ | |
331 | | --progr-tra | --program-tr | --program-t) | |
332 | ac_prev=program_transform_name ;; | |
333 | -program-transform-name=* | --program-transform-name=* \ | |
334 | | --program-transform-nam=* | --program-transform-na=* \ | |
335 | | --program-transform-n=* | --program-transform-=* \ | |
336 | | --program-transform=* | --program-transfor=* \ | |
337 | | --program-transfo=* | --program-transf=* \ | |
338 | | --program-trans=* | --program-tran=* \ | |
339 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
340 | program_transform_name="$ac_optarg" ;; | |
341 | ||
342 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
343 | | -silent | --silent | --silen | --sile | --sil) | |
344 | silent=yes ;; | |
345 | ||
346 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
347 | ac_prev=sbindir ;; | |
348 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
349 | | --sbi=* | --sb=*) | |
350 | sbindir="$ac_optarg" ;; | |
351 | ||
352 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
353 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
354 | | --sharedst | --shareds | --shared | --share | --shar \ | |
355 | | --sha | --sh) | |
356 | ac_prev=sharedstatedir ;; | |
357 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
358 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
359 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
360 | | --sha=* | --sh=*) | |
361 | sharedstatedir="$ac_optarg" ;; | |
362 | ||
363 | -site | --site | --sit) | |
364 | ac_prev=site ;; | |
365 | -site=* | --site=* | --sit=*) | |
366 | site="$ac_optarg" ;; | |
367 | ||
c41b7eb1 JB |
368 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
369 | ac_prev=sitefile ;; | |
370 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
371 | sitefile="$ac_optarg" ;; | |
372 | ||
c906108c SS |
373 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
374 | ac_prev=srcdir ;; | |
375 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
376 | srcdir="$ac_optarg" ;; | |
377 | ||
378 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
379 | | --syscon | --sysco | --sysc | --sys | --sy) | |
380 | ac_prev=sysconfdir ;; | |
381 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
382 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
383 | sysconfdir="$ac_optarg" ;; | |
384 | ||
385 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
386 | ac_prev=target ;; | |
387 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
388 | target="$ac_optarg" ;; | |
389 | ||
390 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
391 | verbose=yes ;; | |
392 | ||
393 | -version | --version | --versio | --versi | --vers) | |
394 | echo "configure generated by autoconf version 2.13" | |
395 | exit 0 ;; | |
396 | ||
397 | -with-* | --with-*) | |
398 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
399 | # Reject names that are not valid shell variable names. | |
400 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
401 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
402 | fi | |
403 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
404 | case "$ac_option" in | |
405 | *=*) ;; | |
406 | *) ac_optarg=yes ;; | |
407 | esac | |
408 | eval "with_${ac_package}='$ac_optarg'" ;; | |
409 | ||
410 | -without-* | --without-*) | |
411 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
412 | # Reject names that are not valid shell variable names. | |
413 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
414 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
415 | fi | |
416 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
417 | eval "with_${ac_package}=no" ;; | |
418 | ||
419 | --x) | |
420 | # Obsolete; use --with-x. | |
421 | with_x=yes ;; | |
422 | ||
423 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
424 | | --x-incl | --x-inc | --x-in | --x-i) | |
425 | ac_prev=x_includes ;; | |
426 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
427 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
428 | x_includes="$ac_optarg" ;; | |
429 | ||
430 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
431 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
432 | ac_prev=x_libraries ;; | |
433 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
434 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
435 | x_libraries="$ac_optarg" ;; | |
436 | ||
437 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
438 | ;; | |
439 | ||
440 | *) | |
441 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
442 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
443 | fi | |
444 | if test "x$nonopt" != xNONE; then | |
445 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
446 | fi | |
447 | nonopt="$ac_option" | |
448 | ;; | |
449 | ||
450 | esac | |
451 | done | |
452 | ||
453 | if test -n "$ac_prev"; then | |
454 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
455 | fi | |
456 | ||
457 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
458 | ||
459 | # File descriptor usage: | |
460 | # 0 standard input | |
461 | # 1 file creation | |
462 | # 2 errors and warnings | |
463 | # 3 some systems may open it to /dev/tty | |
464 | # 4 used on the Kubota Titan | |
465 | # 6 checking for... messages and results | |
466 | # 5 compiler messages saved in config.log | |
467 | if test "$silent" = yes; then | |
468 | exec 6>/dev/null | |
469 | else | |
470 | exec 6>&1 | |
471 | fi | |
472 | exec 5>./config.log | |
473 | ||
474 | echo "\ | |
475 | This file contains any messages produced by compilers while | |
476 | running configure, to aid debugging if configure makes a mistake. | |
477 | " 1>&5 | |
478 | ||
479 | # Strip out --no-create and --no-recursion so they do not pile up. | |
480 | # Also quote any args containing shell metacharacters. | |
481 | ac_configure_args= | |
482 | for ac_arg | |
483 | do | |
484 | case "$ac_arg" in | |
485 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
486 | | --no-cr | --no-c) ;; | |
487 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
488 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
489 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
490 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
491 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
492 | esac | |
493 | done | |
494 | ||
495 | # NLS nuisances. | |
496 | # Only set these to C if already set. These must not be set unconditionally | |
497 | # because not all systems understand e.g. LANG=C (notably SCO). | |
498 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
499 | # Non-C LC_CTYPE values break the ctype check. | |
500 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
501 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
502 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
503 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
504 | ||
505 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
506 | rm -rf conftest* confdefs.h | |
507 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
508 | echo > confdefs.h | |
509 | ||
510 | # A filename unique to this package, relative to the directory that | |
511 | # configure is in, which we can look for to find out if srcdir is correct. | |
512 | ac_unique_file=main.c | |
513 | ||
514 | # Find the source files, if location was not specified. | |
515 | if test -z "$srcdir"; then | |
516 | ac_srcdir_defaulted=yes | |
517 | # Try the directory containing this script, then its parent. | |
518 | ac_prog=$0 | |
519 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
520 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
521 | srcdir=$ac_confdir | |
522 | if test ! -r $srcdir/$ac_unique_file; then | |
523 | srcdir=.. | |
524 | fi | |
525 | else | |
526 | ac_srcdir_defaulted=no | |
527 | fi | |
528 | if test ! -r $srcdir/$ac_unique_file; then | |
529 | if test "$ac_srcdir_defaulted" = yes; then | |
530 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
531 | else | |
532 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
533 | fi | |
534 | fi | |
535 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
536 | ||
537 | # Prefer explicitly selected file to automatically selected ones. | |
c41b7eb1 JB |
538 | if test -z "$sitefile"; then |
539 | if test -z "$CONFIG_SITE"; then | |
540 | if test "x$prefix" != xNONE; then | |
541 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
542 | else | |
543 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
544 | fi | |
c906108c | 545 | fi |
c41b7eb1 JB |
546 | else |
547 | CONFIG_SITE="$sitefile" | |
c906108c SS |
548 | fi |
549 | for ac_site_file in $CONFIG_SITE; do | |
550 | if test -r "$ac_site_file"; then | |
551 | echo "loading site script $ac_site_file" | |
552 | . "$ac_site_file" | |
553 | fi | |
554 | done | |
555 | ||
556 | if test -r "$cache_file"; then | |
557 | echo "loading cache $cache_file" | |
558 | . $cache_file | |
559 | else | |
560 | echo "creating cache $cache_file" | |
561 | > $cache_file | |
562 | fi | |
563 | ||
564 | ac_ext=c | |
565 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
566 | ac_cpp='$CPP $CPPFLAGS' | |
567 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
568 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
569 | cross_compiling=$ac_cv_prog_cc_cross | |
570 | ||
571 | ac_exeext= | |
572 | ac_objext=o | |
573 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
574 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
575 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
576 | ac_n= ac_c=' | |
577 | ' ac_t=' ' | |
578 | else | |
579 | ac_n=-n ac_c= ac_t= | |
580 | fi | |
581 | else | |
582 | ac_n= ac_c='\c' ac_t= | |
583 | fi | |
584 | ||
585 | ||
586 | ||
413ccac7 | 587 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
5b5d99cf | 588 | echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
589 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
590 | if test "${enable_maintainer_mode+set}" = set; then | |
591 | enableval="$enable_maintainer_mode" | |
592 | USE_MAINTAINER_MODE=$enableval | |
593 | else | |
594 | USE_MAINTAINER_MODE=no | |
595 | fi | |
596 | ||
597 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
598 | ||
599 | ||
600 | if test $USE_MAINTAINER_MODE = yes; then | |
601 | MAINTAINER_MODE_TRUE= | |
602 | MAINTAINER_MODE_FALSE='#' | |
603 | else | |
604 | MAINTAINER_MODE_TRUE='#' | |
605 | MAINTAINER_MODE_FALSE= | |
606 | fi | |
607 | MAINT=$MAINTAINER_MODE_TRUE | |
608 | ||
609 | ||
c906108c SS |
610 | |
611 | # Extract the first word of "gcc", so it can be a program name with args. | |
612 | set dummy gcc; ac_word=$2 | |
613 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 614 | echo "configure:615: checking for $ac_word" >&5 |
c906108c SS |
615 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
616 | echo $ac_n "(cached) $ac_c" 1>&6 | |
617 | else | |
618 | if test -n "$CC"; then | |
619 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
620 | else | |
621 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
622 | ac_dummy="$PATH" | |
623 | for ac_dir in $ac_dummy; do | |
624 | test -z "$ac_dir" && ac_dir=. | |
625 | if test -f $ac_dir/$ac_word; then | |
626 | ac_cv_prog_CC="gcc" | |
627 | break | |
628 | fi | |
629 | done | |
630 | IFS="$ac_save_ifs" | |
631 | fi | |
632 | fi | |
633 | CC="$ac_cv_prog_CC" | |
634 | if test -n "$CC"; then | |
635 | echo "$ac_t""$CC" 1>&6 | |
636 | else | |
637 | echo "$ac_t""no" 1>&6 | |
638 | fi | |
639 | ||
640 | if test -z "$CC"; then | |
641 | # Extract the first word of "cc", so it can be a program name with args. | |
642 | set dummy cc; ac_word=$2 | |
643 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 644 | echo "configure:645: checking for $ac_word" >&5 |
c906108c SS |
645 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
647 | else | |
648 | if test -n "$CC"; then | |
649 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
650 | else | |
651 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
652 | ac_prog_rejected=no | |
653 | ac_dummy="$PATH" | |
654 | for ac_dir in $ac_dummy; do | |
655 | test -z "$ac_dir" && ac_dir=. | |
656 | if test -f $ac_dir/$ac_word; then | |
657 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
658 | ac_prog_rejected=yes | |
659 | continue | |
660 | fi | |
661 | ac_cv_prog_CC="cc" | |
662 | break | |
663 | fi | |
664 | done | |
665 | IFS="$ac_save_ifs" | |
666 | if test $ac_prog_rejected = yes; then | |
667 | # We found a bogon in the path, so make sure we never use it. | |
668 | set dummy $ac_cv_prog_CC | |
669 | shift | |
670 | if test $# -gt 0; then | |
671 | # We chose a different compiler from the bogus one. | |
672 | # However, it has the same basename, so the bogon will be chosen | |
673 | # first if we set CC to just the basename; use the full file name. | |
674 | shift | |
675 | set dummy "$ac_dir/$ac_word" "$@" | |
676 | shift | |
677 | ac_cv_prog_CC="$@" | |
678 | fi | |
679 | fi | |
680 | fi | |
681 | fi | |
682 | CC="$ac_cv_prog_CC" | |
683 | if test -n "$CC"; then | |
684 | echo "$ac_t""$CC" 1>&6 | |
685 | else | |
686 | echo "$ac_t""no" 1>&6 | |
687 | fi | |
688 | ||
689 | if test -z "$CC"; then | |
690 | case "`uname -s`" in | |
691 | *win32* | *WIN32*) | |
692 | # Extract the first word of "cl", so it can be a program name with args. | |
693 | set dummy cl; ac_word=$2 | |
694 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 695 | echo "configure:696: checking for $ac_word" >&5 |
c906108c SS |
696 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
698 | else | |
699 | if test -n "$CC"; then | |
700 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
701 | else | |
702 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
703 | ac_dummy="$PATH" | |
704 | for ac_dir in $ac_dummy; do | |
705 | test -z "$ac_dir" && ac_dir=. | |
706 | if test -f $ac_dir/$ac_word; then | |
707 | ac_cv_prog_CC="cl" | |
708 | break | |
709 | fi | |
710 | done | |
711 | IFS="$ac_save_ifs" | |
712 | fi | |
713 | fi | |
714 | CC="$ac_cv_prog_CC" | |
715 | if test -n "$CC"; then | |
716 | echo "$ac_t""$CC" 1>&6 | |
717 | else | |
718 | echo "$ac_t""no" 1>&6 | |
719 | fi | |
720 | ;; | |
721 | esac | |
722 | fi | |
723 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
724 | fi | |
725 | ||
726 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
5b5d99cf | 727 | echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
728 | |
729 | ac_ext=c | |
730 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
731 | ac_cpp='$CPP $CPPFLAGS' | |
732 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
733 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
734 | cross_compiling=$ac_cv_prog_cc_cross | |
735 | ||
736 | cat > conftest.$ac_ext << EOF | |
737 | ||
5b5d99cf | 738 | #line 739 "configure" |
c906108c SS |
739 | #include "confdefs.h" |
740 | ||
741 | main(){return(0);} | |
742 | EOF | |
5b5d99cf | 743 | if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
744 | ac_cv_prog_cc_works=yes |
745 | # If we can't run a trivial program, we are probably using a cross compiler. | |
746 | if (./conftest; exit) 2>/dev/null; then | |
747 | ac_cv_prog_cc_cross=no | |
748 | else | |
749 | ac_cv_prog_cc_cross=yes | |
750 | fi | |
751 | else | |
752 | echo "configure: failed program was:" >&5 | |
753 | cat conftest.$ac_ext >&5 | |
754 | ac_cv_prog_cc_works=no | |
755 | fi | |
756 | rm -fr conftest* | |
757 | ac_ext=c | |
758 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
759 | ac_cpp='$CPP $CPPFLAGS' | |
760 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
761 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
762 | cross_compiling=$ac_cv_prog_cc_cross | |
763 | ||
764 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
765 | if test $ac_cv_prog_cc_works = no; then | |
766 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
767 | fi | |
768 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
5b5d99cf | 769 | echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
770 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
771 | cross_compiling=$ac_cv_prog_cc_cross | |
772 | ||
773 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
5b5d99cf | 774 | echo "configure:775: checking whether we are using GNU C" >&5 |
c906108c SS |
775 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
777 | else | |
778 | cat > conftest.c <<EOF | |
779 | #ifdef __GNUC__ | |
780 | yes; | |
781 | #endif | |
782 | EOF | |
5b5d99cf | 783 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
784 | ac_cv_prog_gcc=yes |
785 | else | |
786 | ac_cv_prog_gcc=no | |
787 | fi | |
788 | fi | |
789 | ||
790 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
791 | ||
792 | if test $ac_cv_prog_gcc = yes; then | |
793 | GCC=yes | |
794 | else | |
795 | GCC= | |
796 | fi | |
797 | ||
798 | ac_test_CFLAGS="${CFLAGS+set}" | |
799 | ac_save_CFLAGS="$CFLAGS" | |
800 | CFLAGS= | |
801 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
5b5d99cf | 802 | echo "configure:803: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
803 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
805 | else | |
806 | echo 'void f(){}' > conftest.c | |
807 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
808 | ac_cv_prog_cc_g=yes | |
809 | else | |
810 | ac_cv_prog_cc_g=no | |
811 | fi | |
812 | rm -f conftest* | |
813 | ||
814 | fi | |
815 | ||
816 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
817 | if test "$ac_test_CFLAGS" = set; then | |
818 | CFLAGS="$ac_save_CFLAGS" | |
819 | elif test $ac_cv_prog_cc_g = yes; then | |
820 | if test "$GCC" = yes; then | |
821 | CFLAGS="-g -O2" | |
822 | else | |
823 | CFLAGS="-g" | |
824 | fi | |
825 | else | |
826 | if test "$GCC" = yes; then | |
827 | CFLAGS="-O2" | |
828 | else | |
829 | CFLAGS= | |
830 | fi | |
831 | fi | |
832 | ||
14abd0fb MK |
833 | cat >> confdefs.h <<\EOF |
834 | #define _GNU_SOURCE 1 | |
835 | EOF | |
836 | ||
837 | ||
c906108c | 838 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
5b5d99cf | 839 | echo "configure:840: checking how to run the C preprocessor" >&5 |
c906108c SS |
840 | # On Suns, sometimes $CPP names a directory. |
841 | if test -n "$CPP" && test -d "$CPP"; then | |
842 | CPP= | |
843 | fi | |
844 | if test -z "$CPP"; then | |
845 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
847 | else | |
848 | # This must be in double quotes, not single quotes, because CPP may get | |
849 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
850 | CPP="${CC-cc} -E" | |
851 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
852 | # not just through cpp. | |
853 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 854 | #line 855 "configure" |
c906108c SS |
855 | #include "confdefs.h" |
856 | #include <assert.h> | |
857 | Syntax Error | |
858 | EOF | |
859 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 860 | { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
861 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
862 | if test -z "$ac_err"; then | |
863 | : | |
864 | else | |
865 | echo "$ac_err" >&5 | |
866 | echo "configure: failed program was:" >&5 | |
867 | cat conftest.$ac_ext >&5 | |
868 | rm -rf conftest* | |
869 | CPP="${CC-cc} -E -traditional-cpp" | |
870 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 871 | #line 872 "configure" |
c906108c SS |
872 | #include "confdefs.h" |
873 | #include <assert.h> | |
874 | Syntax Error | |
875 | EOF | |
876 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 877 | { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
878 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
879 | if test -z "$ac_err"; then | |
880 | : | |
881 | else | |
882 | echo "$ac_err" >&5 | |
883 | echo "configure: failed program was:" >&5 | |
884 | cat conftest.$ac_ext >&5 | |
885 | rm -rf conftest* | |
886 | CPP="${CC-cc} -nologo -E" | |
887 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 888 | #line 889 "configure" |
c906108c SS |
889 | #include "confdefs.h" |
890 | #include <assert.h> | |
891 | Syntax Error | |
892 | EOF | |
893 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 894 | { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
895 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
896 | if test -z "$ac_err"; then | |
897 | : | |
898 | else | |
899 | echo "$ac_err" >&5 | |
900 | echo "configure: failed program was:" >&5 | |
901 | cat conftest.$ac_ext >&5 | |
902 | rm -rf conftest* | |
903 | CPP=/lib/cpp | |
904 | fi | |
905 | rm -f conftest* | |
906 | fi | |
907 | rm -f conftest* | |
908 | fi | |
909 | rm -f conftest* | |
910 | ac_cv_prog_CPP="$CPP" | |
911 | fi | |
912 | CPP="$ac_cv_prog_CPP" | |
913 | else | |
914 | ac_cv_prog_CPP="$CPP" | |
915 | fi | |
916 | echo "$ac_t""$CPP" 1>&6 | |
917 | ||
918 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
5b5d99cf | 919 | echo "configure:920: checking for AIX" >&5 |
c906108c | 920 | cat > conftest.$ac_ext <<EOF |
5b5d99cf | 921 | #line 922 "configure" |
c906108c SS |
922 | #include "confdefs.h" |
923 | #ifdef _AIX | |
924 | yes | |
925 | #endif | |
926 | ||
927 | EOF | |
928 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
929 | egrep "yes" >/dev/null 2>&1; then | |
930 | rm -rf conftest* | |
931 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
932 | #define _ALL_SOURCE 1 | |
933 | EOF | |
934 | ||
935 | else | |
936 | rm -rf conftest* | |
937 | echo "$ac_t""no" 1>&6 | |
938 | fi | |
939 | rm -f conftest* | |
940 | ||
941 | ||
56157b4a | 942 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
5b5d99cf | 943 | echo "configure:944: checking for POSIXized ISC" >&5 |
56157b4a AC |
944 | if test -d /etc/conf/kconfig.d && |
945 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
946 | then | |
947 | echo "$ac_t""yes" 1>&6 | |
948 | ISC=yes # If later tests want to check for ISC. | |
949 | cat >> confdefs.h <<\EOF | |
950 | #define _POSIX_SOURCE 1 | |
c906108c SS |
951 | EOF |
952 | ||
56157b4a AC |
953 | if test "$GCC" = yes; then |
954 | CC="$CC -posix" | |
955 | else | |
956 | CC="$CC -Xp" | |
957 | fi | |
c906108c SS |
958 | else |
959 | echo "$ac_t""no" 1>&6 | |
56157b4a | 960 | ISC= |
c906108c SS |
961 | fi |
962 | ||
963 | ||
964 | ||
965 | ||
966 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
5b5d99cf | 967 | echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
968 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
969 | echo $ac_n "(cached) $ac_c" 1>&6 | |
970 | else | |
971 | am_cv_prog_cc_stdc=no | |
972 | ac_save_CC="$CC" | |
973 | # Don't try gcc -ansi; that turns off useful extensions and | |
974 | # breaks some systems' header files. | |
975 | # AIX -qlanglvl=ansi | |
976 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
977 | # HP-UX 10.20 and later -Ae |
978 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 979 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 980 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
981 | do |
982 | CC="$ac_save_CC $ac_arg" | |
983 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 984 | #line 985 "configure" |
c906108c SS |
985 | #include "confdefs.h" |
986 | #include <stdarg.h> | |
987 | #include <stdio.h> | |
988 | #include <sys/types.h> | |
989 | #include <sys/stat.h> | |
990 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
991 | struct buf { int x; }; | |
992 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
993 | static char *e (p, i) | |
994 | char **p; | |
995 | int i; | |
996 | { | |
997 | return p[i]; | |
998 | } | |
999 | static char *f (char * (*g) (char **, int), char **p, ...) | |
1000 | { | |
1001 | char *s; | |
1002 | va_list v; | |
1003 | va_start (v,p); | |
1004 | s = g (p, va_arg (v,int)); | |
1005 | va_end (v); | |
1006 | return s; | |
1007 | } | |
1008 | int test (int i, double x); | |
1009 | struct s1 {int (*f) (int a);}; | |
1010 | struct s2 {int (*f) (double a);}; | |
1011 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1012 | int argc; | |
1013 | char **argv; | |
1014 | ||
1015 | int main() { | |
1016 | ||
1017 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1018 | ||
1019 | ; return 0; } | |
1020 | EOF | |
5b5d99cf | 1021 | if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1022 | rm -rf conftest* |
1023 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1024 | else | |
1025 | echo "configure: failed program was:" >&5 | |
1026 | cat conftest.$ac_ext >&5 | |
1027 | fi | |
1028 | rm -f conftest* | |
1029 | done | |
1030 | CC="$ac_save_CC" | |
1031 | ||
1032 | fi | |
1033 | ||
1034 | if test -z "$am_cv_prog_cc_stdc"; then | |
1035 | echo "$ac_t""none needed" 1>&6 | |
1036 | else | |
1037 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1038 | fi | |
1039 | case "x$am_cv_prog_cc_stdc" in | |
1040 | x|xno) ;; | |
1041 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1042 | esac | |
1043 | ||
1044 | ||
1045 | ac_aux_dir= | |
1046 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1047 | if test -f $ac_dir/install-sh; then | |
1048 | ac_aux_dir=$ac_dir | |
1049 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1050 | break | |
1051 | elif test -f $ac_dir/install.sh; then | |
1052 | ac_aux_dir=$ac_dir | |
1053 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1054 | break | |
1055 | fi | |
1056 | done | |
1057 | if test -z "$ac_aux_dir"; then | |
1058 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1059 | fi | |
1060 | ac_config_guess=$ac_aux_dir/config.guess | |
1061 | ac_config_sub=$ac_aux_dir/config.sub | |
1062 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1063 | ||
1064 | ||
1065 | # Do some error checking and defaulting for the host and target type. | |
1066 | # The inputs are: | |
1067 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1068 | # | |
1069 | # The rules are: | |
1070 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1071 | # same time. | |
1072 | # 2. Host defaults to nonopt. | |
1073 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1074 | # as determined by config.guess. | |
1075 | # 4. Target and build default to nonopt. | |
1076 | # 5. If nonopt is not specified, then target and build default to host. | |
1077 | ||
1078 | # The aliases save the names the user supplied, while $host etc. | |
1079 | # will get canonicalized. | |
1080 | case $host---$target---$nonopt in | |
1081 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1082 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1083 | esac | |
1084 | ||
1085 | ||
1086 | # Make sure we can run config.sub. | |
1087 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1088 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1089 | fi | |
1090 | ||
1091 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
5b5d99cf | 1092 | echo "configure:1093: checking host system type" >&5 |
c906108c SS |
1093 | |
1094 | host_alias=$host | |
1095 | case "$host_alias" in | |
1096 | NONE) | |
1097 | case $nonopt in | |
1098 | NONE) | |
1099 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1100 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1101 | fi ;; | |
1102 | *) host_alias=$nonopt ;; | |
1103 | esac ;; | |
1104 | esac | |
1105 | ||
1106 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1107 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1108 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1109 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1110 | echo "$ac_t""$host" 1>&6 | |
1111 | ||
1112 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
5b5d99cf | 1113 | echo "configure:1114: checking target system type" >&5 |
c906108c SS |
1114 | |
1115 | target_alias=$target | |
1116 | case "$target_alias" in | |
1117 | NONE) | |
1118 | case $nonopt in | |
1119 | NONE) target_alias=$host_alias ;; | |
1120 | *) target_alias=$nonopt ;; | |
1121 | esac ;; | |
1122 | esac | |
1123 | ||
1124 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1125 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1126 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1127 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1128 | echo "$ac_t""$target" 1>&6 | |
1129 | ||
1130 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
5b5d99cf | 1131 | echo "configure:1132: checking build system type" >&5 |
c906108c SS |
1132 | |
1133 | build_alias=$build | |
1134 | case "$build_alias" in | |
1135 | NONE) | |
1136 | case $nonopt in | |
1137 | NONE) build_alias=$host_alias ;; | |
1138 | *) build_alias=$nonopt ;; | |
1139 | esac ;; | |
1140 | esac | |
1141 | ||
1142 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1143 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1144 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1145 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1146 | echo "$ac_t""$build" 1>&6 | |
1147 | ||
1148 | test "$host_alias" != "$target_alias" && | |
1149 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1150 | NONENONEs,x,x, && | |
1151 | program_prefix=${target_alias}- | |
1152 | ||
1153 | ||
8bb2c122 MK |
1154 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1155 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1156 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1157 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
1158 | # AC_PROG_RANLIB. This can be removed when we switch to # Autoconf | |
1159 | # 2.5x. | |
1160 | if test $host != $build; then | |
1161 | ac_tool_prefix=${host_alias}- | |
1162 | else | |
1163 | ac_tool_prefix= | |
1164 | fi | |
1165 | ||
1166 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1167 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1168 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 1169 | echo "configure:1170: checking for $ac_word" >&5 |
8bb2c122 MK |
1170 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1172 | else | |
1173 | if test -n "$RANLIB"; then | |
1174 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1175 | else | |
1176 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1177 | ac_dummy="$PATH" | |
1178 | for ac_dir in $ac_dummy; do | |
1179 | test -z "$ac_dir" && ac_dir=. | |
1180 | if test -f $ac_dir/$ac_word; then | |
1181 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1182 | break | |
1183 | fi | |
1184 | done | |
1185 | IFS="$ac_save_ifs" | |
1186 | fi | |
1187 | fi | |
1188 | RANLIB="$ac_cv_prog_RANLIB" | |
1189 | if test -n "$RANLIB"; then | |
1190 | echo "$ac_t""$RANLIB" 1>&6 | |
1191 | else | |
1192 | echo "$ac_t""no" 1>&6 | |
1193 | fi | |
1194 | ||
1195 | ||
1196 | if test -z "$ac_cv_prog_RANLIB"; then | |
1197 | if test -n "$ac_tool_prefix"; then | |
1198 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1199 | set dummy ranlib; ac_word=$2 | |
1200 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 1201 | echo "configure:1202: checking for $ac_word" >&5 |
8bb2c122 MK |
1202 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1204 | else | |
1205 | if test -n "$RANLIB"; then | |
1206 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1207 | else | |
1208 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1209 | ac_dummy="$PATH" | |
1210 | for ac_dir in $ac_dummy; do | |
1211 | test -z "$ac_dir" && ac_dir=. | |
1212 | if test -f $ac_dir/$ac_word; then | |
1213 | ac_cv_prog_RANLIB="ranlib" | |
1214 | break | |
1215 | fi | |
1216 | done | |
1217 | IFS="$ac_save_ifs" | |
1218 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1219 | fi | |
1220 | fi | |
1221 | RANLIB="$ac_cv_prog_RANLIB" | |
1222 | if test -n "$RANLIB"; then | |
1223 | echo "$ac_t""$RANLIB" 1>&6 | |
1224 | else | |
1225 | echo "$ac_t""no" 1>&6 | |
1226 | fi | |
1227 | ||
1228 | else | |
1229 | RANLIB=":" | |
1230 | fi | |
1231 | fi | |
1232 | ||
1233 | ||
c906108c SS |
1234 | ALL_LINGUAS= |
1235 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
5b5d99cf | 1236 | echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1237 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1238 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1239 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1240 | else | |
1241 | cat > conftestmake <<\EOF | |
1242 | all: | |
1243 | @echo 'ac_maketemp="${MAKE}"' | |
1244 | EOF | |
1245 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1246 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1247 | if test -n "$ac_maketemp"; then | |
1248 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1249 | else | |
1250 | eval ac_cv_prog_make_${ac_make}_set=no | |
1251 | fi | |
1252 | rm -f conftestmake | |
1253 | fi | |
1254 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1255 | echo "$ac_t""yes" 1>&6 | |
1256 | SET_MAKE= | |
1257 | else | |
1258 | echo "$ac_t""no" 1>&6 | |
1259 | SET_MAKE="MAKE=${MAKE-make}" | |
1260 | fi | |
1261 | ||
1262 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1263 | set dummy ranlib; ac_word=$2 | |
1264 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 1265 | echo "configure:1266: checking for $ac_word" >&5 |
c906108c SS |
1266 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1267 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1268 | else | |
1269 | if test -n "$RANLIB"; then | |
1270 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1271 | else | |
1272 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1273 | ac_dummy="$PATH" | |
1274 | for ac_dir in $ac_dummy; do | |
1275 | test -z "$ac_dir" && ac_dir=. | |
1276 | if test -f $ac_dir/$ac_word; then | |
1277 | ac_cv_prog_RANLIB="ranlib" | |
1278 | break | |
1279 | fi | |
1280 | done | |
1281 | IFS="$ac_save_ifs" | |
1282 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1283 | fi | |
1284 | fi | |
1285 | RANLIB="$ac_cv_prog_RANLIB" | |
1286 | if test -n "$RANLIB"; then | |
1287 | echo "$ac_t""$RANLIB" 1>&6 | |
1288 | else | |
1289 | echo "$ac_t""no" 1>&6 | |
1290 | fi | |
1291 | ||
1292 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
5b5d99cf | 1293 | echo "configure:1294: checking for ANSI C header files" >&5 |
c906108c SS |
1294 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1295 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1296 | else | |
1297 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1298 | #line 1299 "configure" |
c906108c SS |
1299 | #include "confdefs.h" |
1300 | #include <stdlib.h> | |
1301 | #include <stdarg.h> | |
1302 | #include <string.h> | |
1303 | #include <float.h> | |
1304 | EOF | |
1305 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 1306 | { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1307 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1308 | if test -z "$ac_err"; then | |
1309 | rm -rf conftest* | |
1310 | ac_cv_header_stdc=yes | |
1311 | else | |
1312 | echo "$ac_err" >&5 | |
1313 | echo "configure: failed program was:" >&5 | |
1314 | cat conftest.$ac_ext >&5 | |
1315 | rm -rf conftest* | |
1316 | ac_cv_header_stdc=no | |
1317 | fi | |
1318 | rm -f conftest* | |
1319 | ||
1320 | if test $ac_cv_header_stdc = yes; then | |
1321 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1322 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1323 | #line 1324 "configure" |
c906108c SS |
1324 | #include "confdefs.h" |
1325 | #include <string.h> | |
1326 | EOF | |
1327 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1328 | egrep "memchr" >/dev/null 2>&1; then | |
1329 | : | |
1330 | else | |
1331 | rm -rf conftest* | |
1332 | ac_cv_header_stdc=no | |
1333 | fi | |
1334 | rm -f conftest* | |
1335 | ||
1336 | fi | |
1337 | ||
1338 | if test $ac_cv_header_stdc = yes; then | |
1339 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1340 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1341 | #line 1342 "configure" |
c906108c SS |
1342 | #include "confdefs.h" |
1343 | #include <stdlib.h> | |
1344 | EOF | |
1345 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1346 | egrep "free" >/dev/null 2>&1; then | |
1347 | : | |
1348 | else | |
1349 | rm -rf conftest* | |
1350 | ac_cv_header_stdc=no | |
1351 | fi | |
1352 | rm -f conftest* | |
1353 | ||
1354 | fi | |
1355 | ||
1356 | if test $ac_cv_header_stdc = yes; then | |
1357 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1358 | if test "$cross_compiling" = yes; then | |
1359 | : | |
1360 | else | |
1361 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1362 | #line 1363 "configure" |
c906108c SS |
1363 | #include "confdefs.h" |
1364 | #include <ctype.h> | |
1365 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1366 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1367 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1368 | int main () { int i; for (i = 0; i < 256; i++) | |
1369 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1370 | exit (0); } | |
1371 | ||
1372 | EOF | |
5b5d99cf | 1373 | if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1374 | then |
1375 | : | |
1376 | else | |
1377 | echo "configure: failed program was:" >&5 | |
1378 | cat conftest.$ac_ext >&5 | |
1379 | rm -fr conftest* | |
1380 | ac_cv_header_stdc=no | |
1381 | fi | |
1382 | rm -fr conftest* | |
1383 | fi | |
1384 | ||
1385 | fi | |
1386 | fi | |
1387 | ||
1388 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1389 | if test $ac_cv_header_stdc = yes; then | |
1390 | cat >> confdefs.h <<\EOF | |
1391 | #define STDC_HEADERS 1 | |
1392 | EOF | |
1393 | ||
1394 | fi | |
1395 | ||
1396 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
5b5d99cf | 1397 | echo "configure:1398: checking for working const" >&5 |
c906108c SS |
1398 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1399 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1400 | else | |
1401 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1402 | #line 1403 "configure" |
c906108c SS |
1403 | #include "confdefs.h" |
1404 | ||
1405 | int main() { | |
1406 | ||
1407 | /* Ultrix mips cc rejects this. */ | |
1408 | typedef int charset[2]; const charset x; | |
1409 | /* SunOS 4.1.1 cc rejects this. */ | |
1410 | char const *const *ccp; | |
1411 | char **p; | |
1412 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1413 | struct point {int x, y;}; | |
1414 | static struct point const zero = {0,0}; | |
1415 | /* AIX XL C 1.02.0.0 rejects this. | |
1416 | It does not let you subtract one const X* pointer from another in an arm | |
1417 | of an if-expression whose if-part is not a constant expression */ | |
1418 | const char *g = "string"; | |
1419 | ccp = &g + (g ? g-g : 0); | |
1420 | /* HPUX 7.0 cc rejects these. */ | |
1421 | ++ccp; | |
1422 | p = (char**) ccp; | |
1423 | ccp = (char const *const *) p; | |
1424 | { /* SCO 3.2v4 cc rejects this. */ | |
1425 | char *t; | |
1426 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1427 | ||
1428 | *t++ = 0; | |
1429 | } | |
1430 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1431 | int x[] = {25, 17}; | |
1432 | const int *foo = &x[0]; | |
1433 | ++foo; | |
1434 | } | |
1435 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1436 | typedef const int *iptr; | |
1437 | iptr p = 0; | |
1438 | ++p; | |
1439 | } | |
1440 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1441 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1442 | struct s { int j; const int *ap[3]; }; | |
1443 | struct s *b; b->j = 5; | |
1444 | } | |
1445 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1446 | const int foo = 10; | |
1447 | } | |
1448 | ||
1449 | ; return 0; } | |
1450 | EOF | |
5b5d99cf | 1451 | if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1452 | rm -rf conftest* |
1453 | ac_cv_c_const=yes | |
1454 | else | |
1455 | echo "configure: failed program was:" >&5 | |
1456 | cat conftest.$ac_ext >&5 | |
1457 | rm -rf conftest* | |
1458 | ac_cv_c_const=no | |
1459 | fi | |
1460 | rm -f conftest* | |
1461 | fi | |
1462 | ||
1463 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1464 | if test $ac_cv_c_const = no; then | |
1465 | cat >> confdefs.h <<\EOF | |
1466 | #define const | |
1467 | EOF | |
1468 | ||
1469 | fi | |
1470 | ||
1471 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
5b5d99cf | 1472 | echo "configure:1473: checking for inline" >&5 |
c906108c SS |
1473 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1475 | else | |
1476 | ac_cv_c_inline=no | |
1477 | for ac_kw in inline __inline__ __inline; do | |
1478 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1479 | #line 1480 "configure" |
c906108c SS |
1480 | #include "confdefs.h" |
1481 | ||
1482 | int main() { | |
1483 | } $ac_kw foo() { | |
1484 | ; return 0; } | |
1485 | EOF | |
5b5d99cf | 1486 | if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1487 | rm -rf conftest* |
1488 | ac_cv_c_inline=$ac_kw; break | |
1489 | else | |
1490 | echo "configure: failed program was:" >&5 | |
1491 | cat conftest.$ac_ext >&5 | |
1492 | fi | |
1493 | rm -f conftest* | |
1494 | done | |
1495 | ||
1496 | fi | |
1497 | ||
1498 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1499 | case "$ac_cv_c_inline" in | |
1500 | inline | yes) ;; | |
1501 | no) cat >> confdefs.h <<\EOF | |
1502 | #define inline | |
1503 | EOF | |
1504 | ;; | |
1505 | *) cat >> confdefs.h <<EOF | |
1506 | #define inline $ac_cv_c_inline | |
1507 | EOF | |
1508 | ;; | |
1509 | esac | |
1510 | ||
1511 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
5b5d99cf | 1512 | echo "configure:1513: checking for off_t" >&5 |
c906108c SS |
1513 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1515 | else | |
1516 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1517 | #line 1518 "configure" |
c906108c SS |
1518 | #include "confdefs.h" |
1519 | #include <sys/types.h> | |
1520 | #if STDC_HEADERS | |
1521 | #include <stdlib.h> | |
1522 | #include <stddef.h> | |
1523 | #endif | |
1524 | EOF | |
1525 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1526 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1527 | rm -rf conftest* | |
1528 | ac_cv_type_off_t=yes | |
1529 | else | |
1530 | rm -rf conftest* | |
1531 | ac_cv_type_off_t=no | |
1532 | fi | |
1533 | rm -f conftest* | |
1534 | ||
1535 | fi | |
1536 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1537 | if test $ac_cv_type_off_t = no; then | |
1538 | cat >> confdefs.h <<\EOF | |
1539 | #define off_t long | |
1540 | EOF | |
1541 | ||
1542 | fi | |
1543 | ||
1544 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
5b5d99cf | 1545 | echo "configure:1546: checking for size_t" >&5 |
c906108c SS |
1546 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1547 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1548 | else | |
1549 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1550 | #line 1551 "configure" |
c906108c SS |
1551 | #include "confdefs.h" |
1552 | #include <sys/types.h> | |
1553 | #if STDC_HEADERS | |
1554 | #include <stdlib.h> | |
1555 | #include <stddef.h> | |
1556 | #endif | |
1557 | EOF | |
1558 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1559 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1560 | rm -rf conftest* | |
1561 | ac_cv_type_size_t=yes | |
1562 | else | |
1563 | rm -rf conftest* | |
1564 | ac_cv_type_size_t=no | |
1565 | fi | |
1566 | rm -f conftest* | |
1567 | ||
1568 | fi | |
1569 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1570 | if test $ac_cv_type_size_t = no; then | |
1571 | cat >> confdefs.h <<\EOF | |
1572 | #define size_t unsigned | |
1573 | EOF | |
1574 | ||
1575 | fi | |
1576 | ||
1577 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1578 | # for constant arguments. Useless! | |
1579 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
5b5d99cf | 1580 | echo "configure:1581: checking for working alloca.h" >&5 |
c906108c SS |
1581 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1583 | else | |
1584 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1585 | #line 1586 "configure" |
c906108c SS |
1586 | #include "confdefs.h" |
1587 | #include <alloca.h> | |
1588 | int main() { | |
1589 | char *p = alloca(2 * sizeof(int)); | |
1590 | ; return 0; } | |
1591 | EOF | |
5b5d99cf | 1592 | if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1593 | rm -rf conftest* |
1594 | ac_cv_header_alloca_h=yes | |
1595 | else | |
1596 | echo "configure: failed program was:" >&5 | |
1597 | cat conftest.$ac_ext >&5 | |
1598 | rm -rf conftest* | |
1599 | ac_cv_header_alloca_h=no | |
1600 | fi | |
1601 | rm -f conftest* | |
1602 | fi | |
1603 | ||
1604 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1605 | if test $ac_cv_header_alloca_h = yes; then | |
1606 | cat >> confdefs.h <<\EOF | |
1607 | #define HAVE_ALLOCA_H 1 | |
1608 | EOF | |
1609 | ||
1610 | fi | |
1611 | ||
1612 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
5b5d99cf | 1613 | echo "configure:1614: checking for alloca" >&5 |
c906108c SS |
1614 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1616 | else | |
1617 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1618 | #line 1619 "configure" |
c906108c SS |
1619 | #include "confdefs.h" |
1620 | ||
1621 | #ifdef __GNUC__ | |
1622 | # define alloca __builtin_alloca | |
1623 | #else | |
1624 | # ifdef _MSC_VER | |
1625 | # include <malloc.h> | |
1626 | # define alloca _alloca | |
1627 | # else | |
1628 | # if HAVE_ALLOCA_H | |
1629 | # include <alloca.h> | |
1630 | # else | |
1631 | # ifdef _AIX | |
1632 | #pragma alloca | |
1633 | # else | |
1634 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1635 | char *alloca (); | |
1636 | # endif | |
1637 | # endif | |
1638 | # endif | |
1639 | # endif | |
1640 | #endif | |
1641 | ||
1642 | int main() { | |
1643 | char *p = (char *) alloca(1); | |
1644 | ; return 0; } | |
1645 | EOF | |
5b5d99cf | 1646 | if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1647 | rm -rf conftest* |
1648 | ac_cv_func_alloca_works=yes | |
1649 | else | |
1650 | echo "configure: failed program was:" >&5 | |
1651 | cat conftest.$ac_ext >&5 | |
1652 | rm -rf conftest* | |
1653 | ac_cv_func_alloca_works=no | |
1654 | fi | |
1655 | rm -f conftest* | |
1656 | fi | |
1657 | ||
1658 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1659 | if test $ac_cv_func_alloca_works = yes; then | |
1660 | cat >> confdefs.h <<\EOF | |
1661 | #define HAVE_ALLOCA 1 | |
1662 | EOF | |
1663 | ||
1664 | fi | |
1665 | ||
1666 | if test $ac_cv_func_alloca_works = no; then | |
1667 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1668 | # that cause trouble. Some versions do not even contain alloca or | |
1669 | # contain a buggy version. If you still want to use their alloca, | |
1670 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1671 | ALLOCA=alloca.${ac_objext} | |
1672 | cat >> confdefs.h <<\EOF | |
1673 | #define C_ALLOCA 1 | |
1674 | EOF | |
1675 | ||
1676 | ||
1677 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
5b5d99cf | 1678 | echo "configure:1679: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1679 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1681 | else | |
1682 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1683 | #line 1684 "configure" |
c906108c SS |
1684 | #include "confdefs.h" |
1685 | #if defined(CRAY) && ! defined(CRAY2) | |
1686 | webecray | |
1687 | #else | |
1688 | wenotbecray | |
1689 | #endif | |
1690 | ||
1691 | EOF | |
1692 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1693 | egrep "webecray" >/dev/null 2>&1; then | |
1694 | rm -rf conftest* | |
1695 | ac_cv_os_cray=yes | |
1696 | else | |
1697 | rm -rf conftest* | |
1698 | ac_cv_os_cray=no | |
1699 | fi | |
1700 | rm -f conftest* | |
1701 | ||
1702 | fi | |
1703 | ||
1704 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1705 | if test $ac_cv_os_cray = yes; then | |
1706 | for ac_func in _getb67 GETB67 getb67; do | |
1707 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 1708 | echo "configure:1709: checking for $ac_func" >&5 |
c906108c SS |
1709 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1710 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1711 | else | |
1712 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1713 | #line 1714 "configure" |
c906108c SS |
1714 | #include "confdefs.h" |
1715 | /* System header to define __stub macros and hopefully few prototypes, | |
1716 | which can conflict with char $ac_func(); below. */ | |
1717 | #include <assert.h> | |
1718 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1719 | /* We use char because int might match the return type of a gcc2 | |
1720 | builtin and then its argument prototype would still apply. */ | |
1721 | char $ac_func(); | |
1722 | ||
1723 | int main() { | |
1724 | ||
1725 | /* The GNU C library defines this for functions which it implements | |
1726 | to always fail with ENOSYS. Some functions are actually named | |
1727 | something starting with __ and the normal name is an alias. */ | |
1728 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1729 | choke me | |
1730 | #else | |
1731 | $ac_func(); | |
1732 | #endif | |
1733 | ||
1734 | ; return 0; } | |
1735 | EOF | |
5b5d99cf | 1736 | if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1737 | rm -rf conftest* |
1738 | eval "ac_cv_func_$ac_func=yes" | |
1739 | else | |
1740 | echo "configure: failed program was:" >&5 | |
1741 | cat conftest.$ac_ext >&5 | |
1742 | rm -rf conftest* | |
1743 | eval "ac_cv_func_$ac_func=no" | |
1744 | fi | |
1745 | rm -f conftest* | |
1746 | fi | |
1747 | ||
1748 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1749 | echo "$ac_t""yes" 1>&6 | |
1750 | cat >> confdefs.h <<EOF | |
1751 | #define CRAY_STACKSEG_END $ac_func | |
1752 | EOF | |
1753 | ||
1754 | break | |
1755 | else | |
1756 | echo "$ac_t""no" 1>&6 | |
1757 | fi | |
1758 | ||
1759 | done | |
1760 | fi | |
1761 | ||
1762 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
5b5d99cf | 1763 | echo "configure:1764: checking stack direction for C alloca" >&5 |
c906108c SS |
1764 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1766 | else | |
1767 | if test "$cross_compiling" = yes; then | |
1768 | ac_cv_c_stack_direction=0 | |
1769 | else | |
1770 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1771 | #line 1772 "configure" |
c906108c SS |
1772 | #include "confdefs.h" |
1773 | find_stack_direction () | |
1774 | { | |
1775 | static char *addr = 0; | |
1776 | auto char dummy; | |
1777 | if (addr == 0) | |
1778 | { | |
1779 | addr = &dummy; | |
1780 | return find_stack_direction (); | |
1781 | } | |
1782 | else | |
1783 | return (&dummy > addr) ? 1 : -1; | |
1784 | } | |
1785 | main () | |
1786 | { | |
1787 | exit (find_stack_direction() < 0); | |
1788 | } | |
1789 | EOF | |
5b5d99cf | 1790 | if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1791 | then |
1792 | ac_cv_c_stack_direction=1 | |
1793 | else | |
1794 | echo "configure: failed program was:" >&5 | |
1795 | cat conftest.$ac_ext >&5 | |
1796 | rm -fr conftest* | |
1797 | ac_cv_c_stack_direction=-1 | |
1798 | fi | |
1799 | rm -fr conftest* | |
1800 | fi | |
1801 | ||
1802 | fi | |
1803 | ||
1804 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1805 | cat >> confdefs.h <<EOF | |
1806 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1807 | EOF | |
1808 | ||
1809 | fi | |
1810 | ||
c41b7eb1 | 1811 | for ac_hdr in unistd.h |
c906108c SS |
1812 | do |
1813 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1814 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 1815 | echo "configure:1816: checking for $ac_hdr" >&5 |
c906108c SS |
1816 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1818 | else | |
1819 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1820 | #line 1821 "configure" |
c906108c SS |
1821 | #include "confdefs.h" |
1822 | #include <$ac_hdr> | |
1823 | EOF | |
1824 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 1825 | { (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1826 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1827 | if test -z "$ac_err"; then | |
1828 | rm -rf conftest* | |
1829 | eval "ac_cv_header_$ac_safe=yes" | |
1830 | else | |
1831 | echo "$ac_err" >&5 | |
1832 | echo "configure: failed program was:" >&5 | |
1833 | cat conftest.$ac_ext >&5 | |
1834 | rm -rf conftest* | |
1835 | eval "ac_cv_header_$ac_safe=no" | |
1836 | fi | |
1837 | rm -f conftest* | |
1838 | fi | |
1839 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1840 | echo "$ac_t""yes" 1>&6 | |
1841 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1842 | cat >> confdefs.h <<EOF | |
1843 | #define $ac_tr_hdr 1 | |
1844 | EOF | |
1845 | ||
1846 | else | |
1847 | echo "$ac_t""no" 1>&6 | |
1848 | fi | |
1849 | done | |
1850 | ||
1851 | for ac_func in getpagesize | |
1852 | do | |
1853 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 1854 | echo "configure:1855: checking for $ac_func" >&5 |
c906108c SS |
1855 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1857 | else | |
1858 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1859 | #line 1860 "configure" |
c906108c SS |
1860 | #include "confdefs.h" |
1861 | /* System header to define __stub macros and hopefully few prototypes, | |
1862 | which can conflict with char $ac_func(); below. */ | |
1863 | #include <assert.h> | |
1864 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1865 | /* We use char because int might match the return type of a gcc2 | |
1866 | builtin and then its argument prototype would still apply. */ | |
1867 | char $ac_func(); | |
1868 | ||
1869 | int main() { | |
1870 | ||
1871 | /* The GNU C library defines this for functions which it implements | |
1872 | to always fail with ENOSYS. Some functions are actually named | |
1873 | something starting with __ and the normal name is an alias. */ | |
1874 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1875 | choke me | |
1876 | #else | |
1877 | $ac_func(); | |
1878 | #endif | |
1879 | ||
1880 | ; return 0; } | |
1881 | EOF | |
5b5d99cf | 1882 | if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1883 | rm -rf conftest* |
1884 | eval "ac_cv_func_$ac_func=yes" | |
1885 | else | |
1886 | echo "configure: failed program was:" >&5 | |
1887 | cat conftest.$ac_ext >&5 | |
1888 | rm -rf conftest* | |
1889 | eval "ac_cv_func_$ac_func=no" | |
1890 | fi | |
1891 | rm -f conftest* | |
1892 | fi | |
1893 | ||
1894 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1895 | echo "$ac_t""yes" 1>&6 | |
1896 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1897 | cat >> confdefs.h <<EOF | |
1898 | #define $ac_tr_func 1 | |
1899 | EOF | |
1900 | ||
1901 | else | |
1902 | echo "$ac_t""no" 1>&6 | |
1903 | fi | |
1904 | done | |
1905 | ||
1906 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
5b5d99cf | 1907 | echo "configure:1908: checking for working mmap" >&5 |
c906108c SS |
1908 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1909 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1910 | else | |
1911 | if test "$cross_compiling" = yes; then | |
1912 | ac_cv_func_mmap_fixed_mapped=no | |
1913 | else | |
1914 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 1915 | #line 1916 "configure" |
c906108c SS |
1916 | #include "confdefs.h" |
1917 | ||
1918 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1919 | Here is a matrix of mmap possibilities: | |
1920 | mmap private not fixed | |
1921 | mmap private fixed at somewhere currently unmapped | |
1922 | mmap private fixed at somewhere already mapped | |
1923 | mmap shared not fixed | |
1924 | mmap shared fixed at somewhere currently unmapped | |
1925 | mmap shared fixed at somewhere already mapped | |
1926 | For private mappings, we should verify that changes cannot be read() | |
1927 | back from the file, nor mmap's back from the file at a different | |
1928 | address. (There have been systems where private was not correctly | |
1929 | implemented like the infamous i386 svr4.0, and systems where the | |
1930 | VM page cache was not coherent with the filesystem buffer cache | |
1931 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1932 | For shared mappings, we should conversely verify that changes get | |
1933 | propogated back to all the places they're supposed to be. | |
1934 | ||
1935 | Grep wants private fixed already mapped. | |
1936 | The main things grep needs to know about mmap are: | |
1937 | * does it exist and is it safe to write into the mmap'd area | |
1938 | * how to use it (BSD variants) */ | |
1939 | #include <sys/types.h> | |
1940 | #include <fcntl.h> | |
1941 | #include <sys/mman.h> | |
1942 | ||
1943 | /* This mess was copied from the GNU getpagesize.h. */ | |
1944 | #ifndef HAVE_GETPAGESIZE | |
c41b7eb1 JB |
1945 | # ifdef HAVE_UNISTD_H |
1946 | # include <unistd.h> | |
1947 | # endif | |
c906108c SS |
1948 | |
1949 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1950 | # ifndef HAVE_SYS_PARAM_H | |
1951 | # define HAVE_SYS_PARAM_H 1 | |
1952 | # endif | |
1953 | ||
1954 | # ifdef _SC_PAGESIZE | |
1955 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1956 | # else /* no _SC_PAGESIZE */ | |
1957 | # ifdef HAVE_SYS_PARAM_H | |
1958 | # include <sys/param.h> | |
1959 | # ifdef EXEC_PAGESIZE | |
1960 | # define getpagesize() EXEC_PAGESIZE | |
1961 | # else /* no EXEC_PAGESIZE */ | |
1962 | # ifdef NBPG | |
1963 | # define getpagesize() NBPG * CLSIZE | |
1964 | # ifndef CLSIZE | |
1965 | # define CLSIZE 1 | |
1966 | # endif /* no CLSIZE */ | |
1967 | # else /* no NBPG */ | |
1968 | # ifdef NBPC | |
1969 | # define getpagesize() NBPC | |
1970 | # else /* no NBPC */ | |
1971 | # ifdef PAGESIZE | |
1972 | # define getpagesize() PAGESIZE | |
1973 | # endif /* PAGESIZE */ | |
1974 | # endif /* no NBPC */ | |
1975 | # endif /* no NBPG */ | |
1976 | # endif /* no EXEC_PAGESIZE */ | |
1977 | # else /* no HAVE_SYS_PARAM_H */ | |
1978 | # define getpagesize() 8192 /* punt totally */ | |
1979 | # endif /* no HAVE_SYS_PARAM_H */ | |
1980 | # endif /* no _SC_PAGESIZE */ | |
1981 | ||
1982 | #endif /* no HAVE_GETPAGESIZE */ | |
1983 | ||
1984 | #ifdef __cplusplus | |
1985 | extern "C" { void *malloc(unsigned); } | |
1986 | #else | |
1987 | char *malloc(); | |
1988 | #endif | |
1989 | ||
1990 | int | |
1991 | main() | |
1992 | { | |
1993 | char *data, *data2, *data3; | |
1994 | int i, pagesize; | |
1995 | int fd; | |
1996 | ||
1997 | pagesize = getpagesize(); | |
1998 | ||
1999 | /* | |
2000 | * First, make a file with some known garbage in it. | |
2001 | */ | |
2002 | data = malloc(pagesize); | |
2003 | if (!data) | |
2004 | exit(1); | |
2005 | for (i = 0; i < pagesize; ++i) | |
2006 | *(data + i) = rand(); | |
2007 | umask(0); | |
2008 | fd = creat("conftestmmap", 0600); | |
2009 | if (fd < 0) | |
2010 | exit(1); | |
2011 | if (write(fd, data, pagesize) != pagesize) | |
2012 | exit(1); | |
2013 | close(fd); | |
2014 | ||
2015 | /* | |
2016 | * Next, try to mmap the file at a fixed address which | |
2017 | * already has something else allocated at it. If we can, | |
2018 | * also make sure that we see the same garbage. | |
2019 | */ | |
2020 | fd = open("conftestmmap", O_RDWR); | |
2021 | if (fd < 0) | |
2022 | exit(1); | |
2023 | data2 = malloc(2 * pagesize); | |
2024 | if (!data2) | |
2025 | exit(1); | |
2026 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2027 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2028 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2029 | exit(1); | |
2030 | for (i = 0; i < pagesize; ++i) | |
2031 | if (*(data + i) != *(data2 + i)) | |
2032 | exit(1); | |
2033 | ||
2034 | /* | |
2035 | * Finally, make sure that changes to the mapped area | |
2036 | * do not percolate back to the file as seen by read(). | |
2037 | * (This is a bug on some variants of i386 svr4.0.) | |
2038 | */ | |
2039 | for (i = 0; i < pagesize; ++i) | |
2040 | *(data2 + i) = *(data2 + i) + 1; | |
2041 | data3 = malloc(pagesize); | |
2042 | if (!data3) | |
2043 | exit(1); | |
2044 | if (read(fd, data3, pagesize) != pagesize) | |
2045 | exit(1); | |
2046 | for (i = 0; i < pagesize; ++i) | |
2047 | if (*(data + i) != *(data3 + i)) | |
2048 | exit(1); | |
2049 | close(fd); | |
2050 | unlink("conftestmmap"); | |
2051 | exit(0); | |
2052 | } | |
2053 | ||
2054 | EOF | |
5b5d99cf | 2055 | if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2056 | then |
2057 | ac_cv_func_mmap_fixed_mapped=yes | |
2058 | else | |
2059 | echo "configure: failed program was:" >&5 | |
2060 | cat conftest.$ac_ext >&5 | |
2061 | rm -fr conftest* | |
2062 | ac_cv_func_mmap_fixed_mapped=no | |
2063 | fi | |
2064 | rm -fr conftest* | |
2065 | fi | |
2066 | ||
2067 | fi | |
2068 | ||
2069 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2070 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2071 | cat >> confdefs.h <<\EOF | |
2072 | #define HAVE_MMAP 1 | |
2073 | EOF | |
2074 | ||
2075 | fi | |
2076 | ||
2077 | ||
2078 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2079 | unistd.h values.h sys/param.h | |
2080 | do | |
2081 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2082 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 2083 | echo "configure:2084: checking for $ac_hdr" >&5 |
c906108c SS |
2084 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2086 | else | |
2087 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2088 | #line 2089 "configure" |
c906108c SS |
2089 | #include "confdefs.h" |
2090 | #include <$ac_hdr> | |
2091 | EOF | |
2092 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 2093 | { (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2094 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2095 | if test -z "$ac_err"; then | |
2096 | rm -rf conftest* | |
2097 | eval "ac_cv_header_$ac_safe=yes" | |
2098 | else | |
2099 | echo "$ac_err" >&5 | |
2100 | echo "configure: failed program was:" >&5 | |
2101 | cat conftest.$ac_ext >&5 | |
2102 | rm -rf conftest* | |
2103 | eval "ac_cv_header_$ac_safe=no" | |
2104 | fi | |
2105 | rm -f conftest* | |
2106 | fi | |
2107 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2108 | echo "$ac_t""yes" 1>&6 | |
2109 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2110 | cat >> confdefs.h <<EOF | |
2111 | #define $ac_tr_hdr 1 | |
2112 | EOF | |
2113 | ||
2114 | else | |
2115 | echo "$ac_t""no" 1>&6 | |
2116 | fi | |
2117 | done | |
2118 | ||
2119 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2120 | __argz_count __argz_stringify __argz_next | |
2121 | do | |
2122 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 2123 | echo "configure:2124: checking for $ac_func" >&5 |
c906108c SS |
2124 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2126 | else | |
2127 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2128 | #line 2129 "configure" |
c906108c SS |
2129 | #include "confdefs.h" |
2130 | /* System header to define __stub macros and hopefully few prototypes, | |
2131 | which can conflict with char $ac_func(); below. */ | |
2132 | #include <assert.h> | |
2133 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2134 | /* We use char because int might match the return type of a gcc2 | |
2135 | builtin and then its argument prototype would still apply. */ | |
2136 | char $ac_func(); | |
2137 | ||
2138 | int main() { | |
2139 | ||
2140 | /* The GNU C library defines this for functions which it implements | |
2141 | to always fail with ENOSYS. Some functions are actually named | |
2142 | something starting with __ and the normal name is an alias. */ | |
2143 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2144 | choke me | |
2145 | #else | |
2146 | $ac_func(); | |
2147 | #endif | |
2148 | ||
2149 | ; return 0; } | |
2150 | EOF | |
5b5d99cf | 2151 | if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2152 | rm -rf conftest* |
2153 | eval "ac_cv_func_$ac_func=yes" | |
2154 | else | |
2155 | echo "configure: failed program was:" >&5 | |
2156 | cat conftest.$ac_ext >&5 | |
2157 | rm -rf conftest* | |
2158 | eval "ac_cv_func_$ac_func=no" | |
2159 | fi | |
2160 | rm -f conftest* | |
2161 | fi | |
2162 | ||
2163 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2164 | echo "$ac_t""yes" 1>&6 | |
2165 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2166 | cat >> confdefs.h <<EOF | |
2167 | #define $ac_tr_func 1 | |
2168 | EOF | |
2169 | ||
2170 | else | |
2171 | echo "$ac_t""no" 1>&6 | |
2172 | fi | |
2173 | done | |
2174 | ||
2175 | ||
2176 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2177 | for ac_func in stpcpy | |
2178 | do | |
2179 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 2180 | echo "configure:2181: checking for $ac_func" >&5 |
c906108c SS |
2181 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2182 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2183 | else | |
2184 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2185 | #line 2186 "configure" |
c906108c SS |
2186 | #include "confdefs.h" |
2187 | /* System header to define __stub macros and hopefully few prototypes, | |
2188 | which can conflict with char $ac_func(); below. */ | |
2189 | #include <assert.h> | |
2190 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2191 | /* We use char because int might match the return type of a gcc2 | |
2192 | builtin and then its argument prototype would still apply. */ | |
2193 | char $ac_func(); | |
2194 | ||
2195 | int main() { | |
2196 | ||
2197 | /* The GNU C library defines this for functions which it implements | |
2198 | to always fail with ENOSYS. Some functions are actually named | |
2199 | something starting with __ and the normal name is an alias. */ | |
2200 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2201 | choke me | |
2202 | #else | |
2203 | $ac_func(); | |
2204 | #endif | |
2205 | ||
2206 | ; return 0; } | |
2207 | EOF | |
5b5d99cf | 2208 | if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2209 | rm -rf conftest* |
2210 | eval "ac_cv_func_$ac_func=yes" | |
2211 | else | |
2212 | echo "configure: failed program was:" >&5 | |
2213 | cat conftest.$ac_ext >&5 | |
2214 | rm -rf conftest* | |
2215 | eval "ac_cv_func_$ac_func=no" | |
2216 | fi | |
2217 | rm -f conftest* | |
2218 | fi | |
2219 | ||
2220 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2221 | echo "$ac_t""yes" 1>&6 | |
2222 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2223 | cat >> confdefs.h <<EOF | |
2224 | #define $ac_tr_func 1 | |
2225 | EOF | |
2226 | ||
2227 | else | |
2228 | echo "$ac_t""no" 1>&6 | |
2229 | fi | |
2230 | done | |
2231 | ||
2232 | fi | |
2233 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2234 | cat >> confdefs.h <<\EOF | |
2235 | #define HAVE_STPCPY 1 | |
2236 | EOF | |
2237 | ||
2238 | fi | |
2239 | ||
2240 | if test $ac_cv_header_locale_h = yes; then | |
2241 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
5b5d99cf | 2242 | echo "configure:2243: checking for LC_MESSAGES" >&5 |
c906108c SS |
2243 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2244 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2245 | else | |
2246 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2247 | #line 2248 "configure" |
c906108c SS |
2248 | #include "confdefs.h" |
2249 | #include <locale.h> | |
2250 | int main() { | |
2251 | return LC_MESSAGES | |
2252 | ; return 0; } | |
2253 | EOF | |
5b5d99cf | 2254 | if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2255 | rm -rf conftest* |
2256 | am_cv_val_LC_MESSAGES=yes | |
2257 | else | |
2258 | echo "configure: failed program was:" >&5 | |
2259 | cat conftest.$ac_ext >&5 | |
2260 | rm -rf conftest* | |
2261 | am_cv_val_LC_MESSAGES=no | |
2262 | fi | |
2263 | rm -f conftest* | |
2264 | fi | |
2265 | ||
2266 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2267 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2268 | cat >> confdefs.h <<\EOF | |
2269 | #define HAVE_LC_MESSAGES 1 | |
2270 | EOF | |
2271 | ||
2272 | fi | |
2273 | fi | |
2274 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
5b5d99cf | 2275 | echo "configure:2276: checking whether NLS is requested" >&5 |
c906108c SS |
2276 | # Check whether --enable-nls or --disable-nls was given. |
2277 | if test "${enable_nls+set}" = set; then | |
2278 | enableval="$enable_nls" | |
2279 | USE_NLS=$enableval | |
2280 | else | |
2281 | USE_NLS=yes | |
2282 | fi | |
2283 | ||
2284 | echo "$ac_t""$USE_NLS" 1>&6 | |
2285 | ||
2286 | ||
2287 | USE_INCLUDED_LIBINTL=no | |
2288 | ||
2289 | if test "$USE_NLS" = "yes"; then | |
2290 | cat >> confdefs.h <<\EOF | |
2291 | #define ENABLE_NLS 1 | |
2292 | EOF | |
2293 | ||
2294 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
5b5d99cf | 2295 | echo "configure:2296: checking whether included gettext is requested" >&5 |
c906108c SS |
2296 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2297 | if test "${with_included_gettext+set}" = set; then | |
2298 | withval="$with_included_gettext" | |
2299 | nls_cv_force_use_gnu_gettext=$withval | |
2300 | else | |
2301 | nls_cv_force_use_gnu_gettext=no | |
2302 | fi | |
2303 | ||
2304 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2305 | ||
2306 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2307 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2308 | nls_cv_header_intl= | |
2309 | nls_cv_header_libgt= | |
2310 | CATOBJEXT=NONE | |
2311 | ||
2312 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2313 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
5b5d99cf | 2314 | echo "configure:2315: checking for libintl.h" >&5 |
c906108c SS |
2315 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2316 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2317 | else | |
2318 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2319 | #line 2320 "configure" |
c906108c SS |
2320 | #include "confdefs.h" |
2321 | #include <libintl.h> | |
2322 | EOF | |
2323 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 2324 | { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2325 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2326 | if test -z "$ac_err"; then | |
2327 | rm -rf conftest* | |
2328 | eval "ac_cv_header_$ac_safe=yes" | |
2329 | else | |
2330 | echo "$ac_err" >&5 | |
2331 | echo "configure: failed program was:" >&5 | |
2332 | cat conftest.$ac_ext >&5 | |
2333 | rm -rf conftest* | |
2334 | eval "ac_cv_header_$ac_safe=no" | |
2335 | fi | |
2336 | rm -f conftest* | |
2337 | fi | |
2338 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2339 | echo "$ac_t""yes" 1>&6 | |
2340 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
5b5d99cf | 2341 | echo "configure:2342: checking for gettext in libc" >&5 |
c906108c SS |
2342 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2344 | else | |
2345 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2346 | #line 2347 "configure" |
c906108c SS |
2347 | #include "confdefs.h" |
2348 | #include <libintl.h> | |
2349 | int main() { | |
2350 | return (int) gettext ("") | |
2351 | ; return 0; } | |
2352 | EOF | |
5b5d99cf | 2353 | if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2354 | rm -rf conftest* |
2355 | gt_cv_func_gettext_libc=yes | |
2356 | else | |
2357 | echo "configure: failed program was:" >&5 | |
2358 | cat conftest.$ac_ext >&5 | |
2359 | rm -rf conftest* | |
2360 | gt_cv_func_gettext_libc=no | |
2361 | fi | |
2362 | rm -f conftest* | |
2363 | fi | |
2364 | ||
2365 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2366 | ||
2367 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2368 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
5b5d99cf | 2369 | echo "configure:2370: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2370 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2371 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2373 | else | |
2374 | ac_save_LIBS="$LIBS" | |
2375 | LIBS="-lintl $LIBS" | |
2376 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2377 | #line 2378 "configure" |
c906108c SS |
2378 | #include "confdefs.h" |
2379 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2380 | /* We use char because int might match the return type of a gcc2 | |
2381 | builtin and then its argument prototype would still apply. */ | |
2382 | char bindtextdomain(); | |
2383 | ||
2384 | int main() { | |
2385 | bindtextdomain() | |
2386 | ; return 0; } | |
2387 | EOF | |
5b5d99cf | 2388 | if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2389 | rm -rf conftest* |
2390 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2391 | else | |
2392 | echo "configure: failed program was:" >&5 | |
2393 | cat conftest.$ac_ext >&5 | |
2394 | rm -rf conftest* | |
2395 | eval "ac_cv_lib_$ac_lib_var=no" | |
2396 | fi | |
2397 | rm -f conftest* | |
2398 | LIBS="$ac_save_LIBS" | |
2399 | ||
2400 | fi | |
2401 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2402 | echo "$ac_t""yes" 1>&6 | |
2403 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
5b5d99cf | 2404 | echo "configure:2405: checking for gettext in libintl" >&5 |
c906108c SS |
2405 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2407 | else | |
2408 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2409 | #line 2410 "configure" |
c906108c SS |
2410 | #include "confdefs.h" |
2411 | ||
2412 | int main() { | |
2413 | return (int) gettext ("") | |
2414 | ; return 0; } | |
2415 | EOF | |
5b5d99cf | 2416 | if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2417 | rm -rf conftest* |
2418 | gt_cv_func_gettext_libintl=yes | |
2419 | else | |
2420 | echo "configure: failed program was:" >&5 | |
2421 | cat conftest.$ac_ext >&5 | |
2422 | rm -rf conftest* | |
2423 | gt_cv_func_gettext_libintl=no | |
2424 | fi | |
2425 | rm -f conftest* | |
2426 | fi | |
2427 | ||
2428 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2429 | else | |
2430 | echo "$ac_t""no" 1>&6 | |
2431 | fi | |
2432 | ||
2433 | fi | |
2434 | ||
2435 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2436 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2437 | cat >> confdefs.h <<\EOF | |
2438 | #define HAVE_GETTEXT 1 | |
2439 | EOF | |
2440 | ||
2441 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2442 | set dummy msgfmt; ac_word=$2 | |
2443 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 2444 | echo "configure:2445: checking for $ac_word" >&5 |
c906108c SS |
2445 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2447 | else | |
2448 | case "$MSGFMT" in | |
2449 | /*) | |
2450 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2451 | ;; | |
2452 | *) | |
2453 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2454 | for ac_dir in $PATH; do | |
2455 | test -z "$ac_dir" && ac_dir=. | |
2456 | if test -f $ac_dir/$ac_word; then | |
2457 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2458 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2459 | break | |
2460 | fi | |
2461 | fi | |
2462 | done | |
2463 | IFS="$ac_save_ifs" | |
2464 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2465 | ;; | |
2466 | esac | |
2467 | fi | |
2468 | MSGFMT="$ac_cv_path_MSGFMT" | |
2469 | if test -n "$MSGFMT"; then | |
2470 | echo "$ac_t""$MSGFMT" 1>&6 | |
2471 | else | |
2472 | echo "$ac_t""no" 1>&6 | |
2473 | fi | |
2474 | if test "$MSGFMT" != "no"; then | |
2475 | for ac_func in dcgettext | |
2476 | do | |
2477 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 2478 | echo "configure:2479: checking for $ac_func" >&5 |
c906108c SS |
2479 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2481 | else | |
2482 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2483 | #line 2484 "configure" |
c906108c SS |
2484 | #include "confdefs.h" |
2485 | /* System header to define __stub macros and hopefully few prototypes, | |
2486 | which can conflict with char $ac_func(); below. */ | |
2487 | #include <assert.h> | |
2488 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2489 | /* We use char because int might match the return type of a gcc2 | |
2490 | builtin and then its argument prototype would still apply. */ | |
2491 | char $ac_func(); | |
2492 | ||
2493 | int main() { | |
2494 | ||
2495 | /* The GNU C library defines this for functions which it implements | |
2496 | to always fail with ENOSYS. Some functions are actually named | |
2497 | something starting with __ and the normal name is an alias. */ | |
2498 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2499 | choke me | |
2500 | #else | |
2501 | $ac_func(); | |
2502 | #endif | |
2503 | ||
2504 | ; return 0; } | |
2505 | EOF | |
5b5d99cf | 2506 | if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2507 | rm -rf conftest* |
2508 | eval "ac_cv_func_$ac_func=yes" | |
2509 | else | |
2510 | echo "configure: failed program was:" >&5 | |
2511 | cat conftest.$ac_ext >&5 | |
2512 | rm -rf conftest* | |
2513 | eval "ac_cv_func_$ac_func=no" | |
2514 | fi | |
2515 | rm -f conftest* | |
2516 | fi | |
2517 | ||
2518 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2519 | echo "$ac_t""yes" 1>&6 | |
2520 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2521 | cat >> confdefs.h <<EOF | |
2522 | #define $ac_tr_func 1 | |
2523 | EOF | |
2524 | ||
2525 | else | |
2526 | echo "$ac_t""no" 1>&6 | |
2527 | fi | |
2528 | done | |
2529 | ||
2530 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2531 | set dummy gmsgfmt; ac_word=$2 | |
2532 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 2533 | echo "configure:2534: checking for $ac_word" >&5 |
c906108c SS |
2534 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2536 | else | |
2537 | case "$GMSGFMT" in | |
2538 | /*) | |
2539 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2540 | ;; | |
2541 | ?:/*) | |
2542 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2543 | ;; | |
2544 | *) | |
2545 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2546 | ac_dummy="$PATH" | |
2547 | for ac_dir in $ac_dummy; do | |
2548 | test -z "$ac_dir" && ac_dir=. | |
2549 | if test -f $ac_dir/$ac_word; then | |
2550 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2551 | break | |
2552 | fi | |
2553 | done | |
2554 | IFS="$ac_save_ifs" | |
2555 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2556 | ;; | |
2557 | esac | |
2558 | fi | |
2559 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2560 | if test -n "$GMSGFMT"; then | |
2561 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2562 | else | |
2563 | echo "$ac_t""no" 1>&6 | |
2564 | fi | |
2565 | ||
2566 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2567 | set dummy xgettext; ac_word=$2 | |
2568 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 2569 | echo "configure:2570: checking for $ac_word" >&5 |
c906108c SS |
2570 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2572 | else | |
2573 | case "$XGETTEXT" in | |
2574 | /*) | |
2575 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2576 | ;; | |
2577 | *) | |
2578 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2579 | for ac_dir in $PATH; do | |
2580 | test -z "$ac_dir" && ac_dir=. | |
2581 | if test -f $ac_dir/$ac_word; then | |
2582 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2583 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2584 | break | |
2585 | fi | |
2586 | fi | |
2587 | done | |
2588 | IFS="$ac_save_ifs" | |
2589 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2590 | ;; | |
2591 | esac | |
2592 | fi | |
2593 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2594 | if test -n "$XGETTEXT"; then | |
2595 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2596 | else | |
2597 | echo "$ac_t""no" 1>&6 | |
2598 | fi | |
2599 | ||
2600 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2601 | #line 2602 "configure" |
c906108c SS |
2602 | #include "confdefs.h" |
2603 | ||
2604 | int main() { | |
2605 | extern int _nl_msg_cat_cntr; | |
2606 | return _nl_msg_cat_cntr | |
2607 | ; return 0; } | |
2608 | EOF | |
5b5d99cf | 2609 | if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2610 | rm -rf conftest* |
2611 | CATOBJEXT=.gmo | |
2612 | DATADIRNAME=share | |
2613 | else | |
2614 | echo "configure: failed program was:" >&5 | |
2615 | cat conftest.$ac_ext >&5 | |
2616 | rm -rf conftest* | |
2617 | CATOBJEXT=.mo | |
2618 | DATADIRNAME=lib | |
2619 | fi | |
2620 | rm -f conftest* | |
2621 | INSTOBJEXT=.mo | |
2622 | fi | |
2623 | fi | |
2624 | ||
2625 | else | |
2626 | echo "$ac_t""no" 1>&6 | |
2627 | fi | |
2628 | ||
2629 | ||
2630 | ||
2631 | if test "$CATOBJEXT" = "NONE"; then | |
2632 | nls_cv_use_gnu_gettext=yes | |
2633 | fi | |
2634 | fi | |
2635 | ||
2636 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2637 | INTLOBJS="\$(GETTOBJS)" | |
2638 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2639 | set dummy msgfmt; ac_word=$2 | |
2640 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 2641 | echo "configure:2642: checking for $ac_word" >&5 |
c906108c SS |
2642 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2644 | else | |
2645 | case "$MSGFMT" in | |
2646 | /*) | |
2647 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2648 | ;; | |
2649 | *) | |
2650 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2651 | for ac_dir in $PATH; do | |
2652 | test -z "$ac_dir" && ac_dir=. | |
2653 | if test -f $ac_dir/$ac_word; then | |
2654 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2655 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2656 | break | |
2657 | fi | |
2658 | fi | |
2659 | done | |
2660 | IFS="$ac_save_ifs" | |
2661 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2662 | ;; | |
2663 | esac | |
2664 | fi | |
2665 | MSGFMT="$ac_cv_path_MSGFMT" | |
2666 | if test -n "$MSGFMT"; then | |
2667 | echo "$ac_t""$MSGFMT" 1>&6 | |
2668 | else | |
2669 | echo "$ac_t""no" 1>&6 | |
2670 | fi | |
2671 | ||
2672 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2673 | set dummy gmsgfmt; ac_word=$2 | |
2674 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 2675 | echo "configure:2676: checking for $ac_word" >&5 |
c906108c SS |
2676 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2678 | else | |
2679 | case "$GMSGFMT" in | |
2680 | /*) | |
2681 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2682 | ;; | |
2683 | ?:/*) | |
2684 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2685 | ;; | |
2686 | *) | |
2687 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2688 | ac_dummy="$PATH" | |
2689 | for ac_dir in $ac_dummy; do | |
2690 | test -z "$ac_dir" && ac_dir=. | |
2691 | if test -f $ac_dir/$ac_word; then | |
2692 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2693 | break | |
2694 | fi | |
2695 | done | |
2696 | IFS="$ac_save_ifs" | |
2697 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2698 | ;; | |
2699 | esac | |
2700 | fi | |
2701 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2702 | if test -n "$GMSGFMT"; then | |
2703 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2704 | else | |
2705 | echo "$ac_t""no" 1>&6 | |
2706 | fi | |
2707 | ||
2708 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2709 | set dummy xgettext; ac_word=$2 | |
2710 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 2711 | echo "configure:2712: checking for $ac_word" >&5 |
c906108c SS |
2712 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2713 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2714 | else | |
2715 | case "$XGETTEXT" in | |
2716 | /*) | |
2717 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2718 | ;; | |
2719 | *) | |
2720 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2721 | for ac_dir in $PATH; do | |
2722 | test -z "$ac_dir" && ac_dir=. | |
2723 | if test -f $ac_dir/$ac_word; then | |
2724 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2725 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2726 | break | |
2727 | fi | |
2728 | fi | |
2729 | done | |
2730 | IFS="$ac_save_ifs" | |
2731 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2732 | ;; | |
2733 | esac | |
2734 | fi | |
2735 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2736 | if test -n "$XGETTEXT"; then | |
2737 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2738 | else | |
2739 | echo "$ac_t""no" 1>&6 | |
2740 | fi | |
2741 | ||
2742 | ||
2743 | USE_INCLUDED_LIBINTL=yes | |
2744 | CATOBJEXT=.gmo | |
2745 | INSTOBJEXT=.mo | |
2746 | DATADIRNAME=share | |
2747 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2748 | INTLLIBS=$INTLDEPS | |
2749 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2750 | nls_cv_header_intl=libintl.h | |
2751 | nls_cv_header_libgt=libgettext.h | |
2752 | fi | |
2753 | ||
2754 | if test "$XGETTEXT" != ":"; then | |
2755 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2756 | : ; | |
2757 | else | |
2758 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2759 | XGETTEXT=":" | |
2760 | fi | |
2761 | fi | |
2762 | ||
2763 | # We need to process the po/ directory. | |
2764 | POSUB=po | |
2765 | else | |
2766 | DATADIRNAME=share | |
2767 | nls_cv_header_intl=libintl.h | |
2768 | nls_cv_header_libgt=libgettext.h | |
2769 | fi | |
2770 | ||
2771 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2772 | # because some of the sources are only built for this goal. | |
2773 | if test "$PACKAGE" = gettext; then | |
2774 | USE_NLS=yes | |
2775 | USE_INCLUDED_LIBINTL=yes | |
2776 | fi | |
2777 | ||
2778 | for lang in $ALL_LINGUAS; do | |
2779 | GMOFILES="$GMOFILES $lang.gmo" | |
2780 | POFILES="$POFILES $lang.po" | |
2781 | done | |
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | ||
2792 | ||
2793 | ||
2794 | ||
2795 | ||
2796 | if test "x$CATOBJEXT" != "x"; then | |
2797 | if test "x$ALL_LINGUAS" = "x"; then | |
2798 | LINGUAS= | |
2799 | else | |
2800 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
5b5d99cf | 2801 | echo "configure:2802: checking for catalogs to be installed" >&5 |
c906108c SS |
2802 | NEW_LINGUAS= |
2803 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2804 | case "$ALL_LINGUAS" in | |
2805 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2806 | esac | |
2807 | done | |
2808 | LINGUAS=$NEW_LINGUAS | |
2809 | echo "$ac_t""$LINGUAS" 1>&6 | |
2810 | fi | |
2811 | ||
2812 | if test -n "$LINGUAS"; then | |
2813 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2814 | fi | |
2815 | fi | |
2816 | ||
2817 | if test $ac_cv_header_locale_h = yes; then | |
2818 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2819 | else | |
2820 | INCLUDE_LOCALE_H="\ | |
2821 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2822 | fi | |
2823 | ||
2824 | ||
2825 | if test -f $srcdir/po2tbl.sed.in; then | |
2826 | if test "$CATOBJEXT" = ".cat"; then | |
2827 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2828 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
5b5d99cf | 2829 | echo "configure:2830: checking for linux/version.h" >&5 |
c906108c SS |
2830 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2831 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2832 | else | |
2833 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 2834 | #line 2835 "configure" |
c906108c SS |
2835 | #include "confdefs.h" |
2836 | #include <linux/version.h> | |
2837 | EOF | |
2838 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 2839 | { (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2840 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2841 | if test -z "$ac_err"; then | |
2842 | rm -rf conftest* | |
2843 | eval "ac_cv_header_$ac_safe=yes" | |
2844 | else | |
2845 | echo "$ac_err" >&5 | |
2846 | echo "configure: failed program was:" >&5 | |
2847 | cat conftest.$ac_ext >&5 | |
2848 | rm -rf conftest* | |
2849 | eval "ac_cv_header_$ac_safe=no" | |
2850 | fi | |
2851 | rm -f conftest* | |
2852 | fi | |
2853 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2854 | echo "$ac_t""yes" 1>&6 | |
2855 | msgformat=linux | |
2856 | else | |
2857 | echo "$ac_t""no" 1>&6 | |
2858 | msgformat=xopen | |
2859 | fi | |
2860 | ||
2861 | ||
2862 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2863 | fi | |
2864 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2865 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2866 | fi | |
2867 | ||
2868 | if test "$PACKAGE" = "gettext"; then | |
2869 | GT_NO="#NO#" | |
2870 | GT_YES= | |
2871 | else | |
2872 | GT_NO= | |
2873 | GT_YES="#YES#" | |
2874 | fi | |
2875 | ||
2876 | ||
2877 | ||
2878 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2879 | ||
2880 | ||
2881 | l= | |
2882 | ||
2883 | ||
4536bbc6 | 2884 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2885 | test -d po || mkdir po |
2886 | if test "x$srcdir" != "x."; then | |
2887 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2888 | posrcprefix="$srcdir/" | |
2889 | else | |
2890 | posrcprefix="../$srcdir/" | |
2891 | fi | |
2892 | else | |
2893 | posrcprefix="../" | |
2894 | fi | |
2895 | rm -f po/POTFILES | |
2896 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2897 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2898 | fi | |
2899 | ||
0fbb3da7 TT |
2900 | cat >> confdefs.h <<\EOF |
2901 | #define PACKAGE "gdb" | |
2902 | EOF | |
2903 | ||
2904 | ||
5b5d99cf JB |
2905 | debugdir=${libdir}/debug |
2906 | ||
2907 | # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given. | |
2908 | if test "${with_separate_debug_dir+set}" = set; then | |
2909 | withval="$with_separate_debug_dir" | |
2910 | debugdir="${withval}" | |
2911 | fi | |
2912 | ||
2913 | ||
2914 | ||
2915 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
2916 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2917 | ac_define_dir=`eval echo $debugdir` | |
2918 | ac_define_dir=`eval echo $ac_define_dir` | |
2919 | cat >> confdefs.h <<EOF | |
2920 | #define DEBUGDIR "$ac_define_dir" | |
2921 | EOF | |
2922 | ||
2923 | ||
2924 | #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"), | |
c906108c SS |
2925 | |
2926 | ||
2927 | CONFIG_OBS= | |
66b965bb | 2928 | CONFIG_LIB_OBS= |
c906108c SS |
2929 | CONFIG_DEPS= |
2930 | CONFIG_SRCS= | |
fb40c209 AC |
2931 | CONFIG_INITS= |
2932 | ENABLE_CFLAGS= | |
b3a90332 AC |
2933 | CONFIG_ALL= |
2934 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2935 | CONFIG_INSTALL= |
2936 | CONFIG_UNINSTALL= | |
c906108c | 2937 | |
8dcde887 | 2938 | subdirs="doc testsuite" |
96baa820 | 2939 | |
8dcde887 | 2940 | configdirs= |
96baa820 | 2941 | |
27e9bf90 | 2942 | . $srcdir/configure.host |
c906108c | 2943 | |
27e9bf90 | 2944 | . $srcdir/configure.tgt |
c906108c | 2945 | |
27e9bf90 MK |
2946 | # Fetch the default architecture and default target vector from BFD. |
2947 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2948 | |
27e9bf90 MK |
2949 | # We only want the first architecture, so strip off the others if |
2950 | # there is more than one. | |
2951 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2952 | |
27e9bf90 MK |
2953 | if test "x$targ_archs" != x; then |
2954 | cat >> confdefs.h <<EOF | |
2955 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2956 | EOF |
2957 | ||
2958 | fi | |
27e9bf90 MK |
2959 | if test "x$targ_defvec" != x; then |
2960 | cat >> confdefs.h <<EOF | |
2961 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2962 | EOF |
2963 | ||
2964 | fi | |
c906108c | 2965 | |
8bb2c122 MK |
2966 | if test "$program_transform_name" = s,x,x,; then |
2967 | program_transform_name= | |
2968 | else | |
2969 | # Double any \ or $. echo might interpret backslashes. | |
2970 | cat <<\EOF_SED > conftestsed | |
2971 | s,\\,\\\\,g; s,\$,$$,g | |
2972 | EOF_SED | |
2973 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2974 | rm -f conftestsed | |
2975 | fi | |
2976 | test "$program_prefix" != NONE && | |
2977 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2978 | # Use a double $ so make ignores it. | |
2979 | test "$program_suffix" != NONE && | |
2980 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2981 | ||
2982 | # sed with no file args requires a program. | |
2983 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2984 | ||
2985 | ||
627af7ea MK |
2986 | # The CLI cannot be disabled yet, but may be in the future. |
2987 | ||
2988 | # Enable CLI. | |
2989 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2990 | if test "${enable_gdbcli+set}" = set; then | |
2991 | enableval="$enable_gdbcli" | |
2992 | case $enableval in | |
2993 | yes) | |
2994 | ;; | |
2995 | no) | |
2996 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2997 | *) | |
2998 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2999 | esac | |
3000 | else | |
3001 | enable_gdbcli=yes | |
3002 | fi | |
3003 | ||
3004 | if test x"$enable_gdbcli" = xyes; then | |
3005 | if test -d $srcdir/cli; then | |
3006 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
3007 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
3008 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
3009 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
3010 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
3011 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
3012 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
3013 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
3014 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
3015 | fi | |
3016 | fi | |
3017 | ||
3018 | # Enable MI. | |
3019 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
3020 | if test "${enable_gdbmi+set}" = set; then | |
3021 | enableval="$enable_gdbmi" | |
3022 | case $enableval in | |
3023 | yes | no) | |
3024 | ;; | |
3025 | *) | |
3026 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3027 | esac | |
3028 | else | |
3029 | enable_gdbmi=yes | |
3030 | fi | |
3031 | ||
3032 | if test x"$enable_gdbmi" = xyes; then | |
3033 | if test -d $srcdir/mi; then | |
3034 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3035 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3036 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3037 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3038 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3039 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3040 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3041 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3042 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3043 | fi | |
3044 | fi | |
3045 | ||
06825bd1 MK |
3046 | # Enable TUI. |
3047 | # Check whether --enable-tui or --disable-tui was given. | |
3048 | if test "${enable_tui+set}" = set; then | |
3049 | enableval="$enable_tui" | |
3050 | case $enableval in | |
3051 | yes | no) | |
3052 | ;; | |
3053 | *) | |
3054 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3055 | esac | |
3056 | fi | |
3057 | ||
3058 | if test x"$enable_tui" = xyes; then | |
3059 | if test -d $srcdir/tui; then | |
3060 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3061 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3062 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3063 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3064 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3065 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3066 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3067 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3068 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3069 | need_curses=yes | |
3070 | fi | |
3071 | fi | |
3072 | ||
8ee53726 MK |
3073 | # Enable gdbtk. |
3074 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3075 | if test "${enable_gdbtk+set}" = set; then | |
3076 | enableval="$enable_gdbtk" | |
3077 | case $enableval in | |
3078 | yes | no) | |
3079 | ;; | |
3080 | *) | |
3081 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3082 | esac | |
3083 | else | |
3084 | if test -d $srcdir/gdbtk; then | |
3085 | enable_gdbtk=yes | |
3086 | else | |
3087 | enable_gdbtk=no | |
3088 | fi | |
3089 | fi | |
3090 | ||
3091 | # We unconditionally disable gdbtk tests on selected platforms. | |
3092 | case $host_os in | |
3093 | go32* | windows*) | |
3094 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3095 | enable_gdbtk=no ;; | |
3096 | esac | |
3097 | ||
d28f9cdf DJ |
3098 | # Profiling support. |
3099 | # Check whether --enable-profiling or --disable-profiling was given. | |
3100 | if test "${enable_profiling+set}" = set; then | |
3101 | enableval="$enable_profiling" | |
3102 | case $enableval in | |
3103 | yes | no) | |
3104 | ;; | |
3105 | *) | |
3106 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3107 | esac | |
3108 | else | |
3109 | enable_profiling=no | |
3110 | fi | |
3111 | ||
3112 | ||
3113 | if test "$enable_profiling" = yes ; then | |
3114 | PROFILE_CFLAGS=-pg | |
3115 | OLD_CFLAGS="$CFLAGS" | |
3116 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
3117 | ||
3118 | echo $ac_n "checking for monstartup""... $ac_c" 1>&6 | |
5b5d99cf | 3119 | echo "configure:3120: checking for monstartup" >&5 |
d28f9cdf DJ |
3120 | if eval "test \"`echo '$''{'ac_cv_func_monstartup'+set}'`\" = set"; then |
3121 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3122 | else | |
3123 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3124 | #line 3125 "configure" |
d28f9cdf DJ |
3125 | #include "confdefs.h" |
3126 | /* System header to define __stub macros and hopefully few prototypes, | |
3127 | which can conflict with char monstartup(); below. */ | |
3128 | #include <assert.h> | |
3129 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3130 | /* We use char because int might match the return type of a gcc2 | |
3131 | builtin and then its argument prototype would still apply. */ | |
3132 | char monstartup(); | |
3133 | ||
3134 | int main() { | |
3135 | ||
3136 | /* The GNU C library defines this for functions which it implements | |
3137 | to always fail with ENOSYS. Some functions are actually named | |
3138 | something starting with __ and the normal name is an alias. */ | |
3139 | #if defined (__stub_monstartup) || defined (__stub___monstartup) | |
3140 | choke me | |
3141 | #else | |
3142 | monstartup(); | |
3143 | #endif | |
3144 | ||
3145 | ; return 0; } | |
3146 | EOF | |
5b5d99cf | 3147 | if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf DJ |
3148 | rm -rf conftest* |
3149 | eval "ac_cv_func_monstartup=yes" | |
3150 | else | |
3151 | echo "configure: failed program was:" >&5 | |
3152 | cat conftest.$ac_ext >&5 | |
3153 | rm -rf conftest* | |
3154 | eval "ac_cv_func_monstartup=no" | |
3155 | fi | |
3156 | rm -f conftest* | |
3157 | fi | |
3158 | ||
3159 | if eval "test \"`echo '$ac_cv_func_'monstartup`\" = yes"; then | |
3160 | echo "$ac_t""yes" 1>&6 | |
3161 | : | |
3162 | else | |
3163 | echo "$ac_t""no" 1>&6 | |
3164 | { echo "configure: error: monstartup necessary to use --enable-profiling." 1>&2; exit 1; } | |
3165 | fi | |
3166 | ||
3167 | ||
3168 | echo $ac_n "checking for _mcleanup""... $ac_c" 1>&6 | |
5b5d99cf | 3169 | echo "configure:3170: checking for _mcleanup" >&5 |
d28f9cdf DJ |
3170 | if eval "test \"`echo '$''{'ac_cv_func__mcleanup'+set}'`\" = set"; then |
3171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3172 | else | |
3173 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3174 | #line 3175 "configure" |
d28f9cdf DJ |
3175 | #include "confdefs.h" |
3176 | /* System header to define __stub macros and hopefully few prototypes, | |
3177 | which can conflict with char _mcleanup(); below. */ | |
3178 | #include <assert.h> | |
3179 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3180 | /* We use char because int might match the return type of a gcc2 | |
3181 | builtin and then its argument prototype would still apply. */ | |
3182 | char _mcleanup(); | |
3183 | ||
3184 | int main() { | |
3185 | ||
3186 | /* The GNU C library defines this for functions which it implements | |
3187 | to always fail with ENOSYS. Some functions are actually named | |
3188 | something starting with __ and the normal name is an alias. */ | |
3189 | #if defined (__stub__mcleanup) || defined (__stub____mcleanup) | |
3190 | choke me | |
3191 | #else | |
3192 | _mcleanup(); | |
3193 | #endif | |
3194 | ||
3195 | ; return 0; } | |
3196 | EOF | |
5b5d99cf | 3197 | if { (eval echo configure:3198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf DJ |
3198 | rm -rf conftest* |
3199 | eval "ac_cv_func__mcleanup=yes" | |
3200 | else | |
3201 | echo "configure: failed program was:" >&5 | |
3202 | cat conftest.$ac_ext >&5 | |
3203 | rm -rf conftest* | |
3204 | eval "ac_cv_func__mcleanup=no" | |
3205 | fi | |
3206 | rm -f conftest* | |
3207 | fi | |
3208 | ||
3209 | if eval "test \"`echo '$ac_cv_func_'_mcleanup`\" = yes"; then | |
3210 | echo "$ac_t""yes" 1>&6 | |
3211 | : | |
3212 | else | |
3213 | echo "$ac_t""no" 1>&6 | |
3214 | { echo "configure: error: _mcleanup necessary to use --enable-profiling." 1>&2; exit 1; } | |
3215 | fi | |
3216 | ||
3217 | ||
3218 | CFLAGS="$OLD_CFLAGS" | |
3219 | fi | |
3220 | ||
8bb2c122 MK |
3221 | # --------------------- # |
3222 | # Checks for programs. # | |
3223 | # --------------------- # | |
3224 | ||
c41b7eb1 | 3225 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3226 | do |
3227 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3228 | set dummy $ac_prog; ac_word=$2 | |
3229 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 3230 | echo "configure:3231: checking for $ac_word" >&5 |
7a292a7a SS |
3231 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3232 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3233 | else | |
3234 | if test -n "$AWK"; then | |
3235 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3236 | else | |
3237 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3238 | ac_dummy="$PATH" | |
3239 | for ac_dir in $ac_dummy; do | |
3240 | test -z "$ac_dir" && ac_dir=. | |
3241 | if test -f $ac_dir/$ac_word; then | |
3242 | ac_cv_prog_AWK="$ac_prog" | |
3243 | break | |
3244 | fi | |
3245 | done | |
3246 | IFS="$ac_save_ifs" | |
3247 | fi | |
3248 | fi | |
3249 | AWK="$ac_cv_prog_AWK" | |
3250 | if test -n "$AWK"; then | |
3251 | echo "$ac_t""$AWK" 1>&6 | |
3252 | else | |
3253 | echo "$ac_t""no" 1>&6 | |
3254 | fi | |
3255 | ||
3256 | test -n "$AWK" && break | |
3257 | done | |
3258 | ||
c906108c SS |
3259 | # Find a good install program. We prefer a C program (faster), |
3260 | # so one script is as good as another. But avoid the broken or | |
3261 | # incompatible versions: | |
3262 | # SysV /etc/install, /usr/sbin/install | |
3263 | # SunOS /usr/etc/install | |
3264 | # IRIX /sbin/install | |
3265 | # AIX /bin/install | |
3266 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3267 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3268 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3269 | # ./install, which can be erroneously created by make from ./install.sh. | |
3270 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
5b5d99cf | 3271 | echo "configure:3272: checking for a BSD compatible install" >&5 |
c906108c SS |
3272 | if test -z "$INSTALL"; then |
3273 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3274 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3275 | else | |
3276 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3277 | for ac_dir in $PATH; do | |
3278 | # Account for people who put trailing slashes in PATH elements. | |
3279 | case "$ac_dir/" in | |
3280 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3281 | *) | |
3282 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3283 | # Don't use installbsd from OSF since it installs stuff as root | |
3284 | # by default. | |
3285 | for ac_prog in ginstall scoinst install; do | |
3286 | if test -f $ac_dir/$ac_prog; then | |
3287 | if test $ac_prog = install && | |
3288 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3289 | # AIX install. It has an incompatible calling convention. | |
3290 | : | |
3291 | else | |
3292 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3293 | break 2 | |
3294 | fi | |
3295 | fi | |
3296 | done | |
3297 | ;; | |
3298 | esac | |
3299 | done | |
3300 | IFS="$ac_save_IFS" | |
3301 | ||
3302 | fi | |
3303 | if test "${ac_cv_path_install+set}" = set; then | |
3304 | INSTALL="$ac_cv_path_install" | |
3305 | else | |
3306 | # As a last resort, use the slow shell script. We don't cache a | |
3307 | # path for INSTALL within a source directory, because that will | |
3308 | # break other packages using the cache if that directory is | |
3309 | # removed, or if the path is relative. | |
3310 | INSTALL="$ac_install_sh" | |
3311 | fi | |
3312 | fi | |
3313 | echo "$ac_t""$INSTALL" 1>&6 | |
3314 | ||
3315 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3316 | # It thinks the first close brace ends the variable substitution. | |
3317 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3318 | ||
3319 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3320 | ||
3321 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3322 | ||
8bb2c122 | 3323 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
5b5d99cf | 3324 | echo "configure:3325: checking whether ln -s works" >&5 |
8bb2c122 MK |
3325 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3326 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3327 | else |
8bb2c122 MK |
3328 | rm -f conftestdata |
3329 | if ln -s X conftestdata 2>/dev/null | |
3330 | then | |
3331 | rm -f conftestdata | |
3332 | ac_cv_prog_LN_S="ln -s" | |
3333 | else | |
3334 | ac_cv_prog_LN_S=ln | |
3335 | fi | |
3336 | fi | |
3337 | LN_S="$ac_cv_prog_LN_S" | |
3338 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3339 | echo "$ac_t""yes" 1>&6 | |
3340 | else | |
3341 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3342 | fi |
3343 | ||
8bb2c122 MK |
3344 | # Extract the first word of "ranlib", so it can be a program name with args. |
3345 | set dummy ranlib; ac_word=$2 | |
c906108c | 3346 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
5b5d99cf | 3347 | echo "configure:3348: checking for $ac_word" >&5 |
8bb2c122 | 3348 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3349 | echo $ac_n "(cached) $ac_c" 1>&6 |
3350 | else | |
8bb2c122 MK |
3351 | if test -n "$RANLIB"; then |
3352 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3353 | else |
3354 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3355 | ac_dummy="$PATH" | |
3356 | for ac_dir in $ac_dummy; do | |
3357 | test -z "$ac_dir" && ac_dir=. | |
3358 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3359 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3360 | break |
3361 | fi | |
3362 | done | |
3363 | IFS="$ac_save_ifs" | |
8bb2c122 | 3364 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3365 | fi |
3366 | fi | |
8bb2c122 MK |
3367 | RANLIB="$ac_cv_prog_RANLIB" |
3368 | if test -n "$RANLIB"; then | |
3369 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3370 | else |
3371 | echo "$ac_t""no" 1>&6 | |
3372 | fi | |
3373 | ||
8bb2c122 MK |
3374 | for ac_prog in 'bison -y' byacc |
3375 | do | |
3376 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3377 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3378 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
5b5d99cf | 3379 | echo "configure:3380: checking for $ac_word" >&5 |
8bb2c122 | 3380 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3381 | echo $ac_n "(cached) $ac_c" 1>&6 |
3382 | else | |
8bb2c122 MK |
3383 | if test -n "$YACC"; then |
3384 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3385 | else |
3386 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3387 | ac_dummy="$PATH" | |
3388 | for ac_dir in $ac_dummy; do | |
3389 | test -z "$ac_dir" && ac_dir=. | |
3390 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3391 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3392 | break |
3393 | fi | |
3394 | done | |
3395 | IFS="$ac_save_ifs" | |
3396 | fi | |
3397 | fi | |
8bb2c122 MK |
3398 | YACC="$ac_cv_prog_YACC" |
3399 | if test -n "$YACC"; then | |
3400 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3401 | else |
3402 | echo "$ac_t""no" 1>&6 | |
3403 | fi | |
3404 | ||
8bb2c122 MK |
3405 | test -n "$YACC" && break |
3406 | done | |
3407 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3408 | |
8bb2c122 MK |
3409 | |
3410 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3411 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3412 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
5b5d99cf | 3413 | echo "configure:3414: checking for $ac_word" >&5 |
8bb2c122 | 3414 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3415 | echo $ac_n "(cached) $ac_c" 1>&6 |
3416 | else | |
8bb2c122 MK |
3417 | if test -n "$AR"; then |
3418 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3419 | else |
3420 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3421 | ac_dummy="$PATH" | |
3422 | for ac_dir in $ac_dummy; do | |
3423 | test -z "$ac_dir" && ac_dir=. | |
3424 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3425 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3426 | break |
3427 | fi | |
3428 | done | |
3429 | IFS="$ac_save_ifs" | |
8bb2c122 | 3430 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3431 | fi |
3432 | fi | |
8bb2c122 MK |
3433 | AR="$ac_cv_prog_AR" |
3434 | if test -n "$AR"; then | |
3435 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3436 | else |
3437 | echo "$ac_t""no" 1>&6 | |
3438 | fi | |
3439 | ||
8bb2c122 | 3440 | |
c906108c | 3441 | |
95ca63c4 CF |
3442 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3443 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3444 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 3445 | echo "configure:3446: checking for $ac_word" >&5 |
95ca63c4 CF |
3446 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3447 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3448 | else | |
3449 | if test -n "$DLLTOOL"; then | |
3450 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3451 | else | |
3452 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3453 | ac_dummy="$PATH" | |
3454 | for ac_dir in $ac_dummy; do | |
3455 | test -z "$ac_dir" && ac_dir=. | |
3456 | if test -f $ac_dir/$ac_word; then | |
3457 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3458 | break | |
3459 | fi | |
3460 | done | |
3461 | IFS="$ac_save_ifs" | |
3462 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3463 | fi | |
3464 | fi | |
3465 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3466 | if test -n "$DLLTOOL"; then | |
3467 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3468 | else | |
3469 | echo "$ac_t""no" 1>&6 | |
3470 | fi | |
3471 | ||
3472 | ||
3473 | ||
3474 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3475 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3476 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 3477 | echo "configure:3478: checking for $ac_word" >&5 |
95ca63c4 CF |
3478 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3480 | else | |
3481 | if test -n "$WINDRES"; then | |
3482 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3483 | else | |
3484 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3485 | ac_dummy="$PATH" | |
3486 | for ac_dir in $ac_dummy; do | |
3487 | test -z "$ac_dir" && ac_dir=. | |
3488 | if test -f $ac_dir/$ac_word; then | |
3489 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3490 | break | |
3491 | fi | |
3492 | done | |
3493 | IFS="$ac_save_ifs" | |
3494 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3495 | fi | |
3496 | fi | |
3497 | WINDRES="$ac_cv_prog_WINDRES" | |
3498 | if test -n "$WINDRES"; then | |
3499 | echo "$ac_t""$WINDRES" 1>&6 | |
3500 | else | |
3501 | echo "$ac_t""no" 1>&6 | |
3502 | fi | |
3503 | ||
3504 | ||
3505 | ||
c906108c | 3506 | |
8bb2c122 | 3507 | # Needed for GNU/Hurd. |
75c6e08a MK |
3508 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3509 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3510 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5b5d99cf | 3511 | echo "configure:3512: checking for $ac_word" >&5 |
75c6e08a MK |
3512 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3513 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3514 | else | |
3515 | if test -n "$MIG"; then | |
3516 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3517 | else | |
3518 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3519 | ac_dummy="$PATH" | |
3520 | for ac_dir in $ac_dummy; do | |
3521 | test -z "$ac_dir" && ac_dir=. | |
3522 | if test -f $ac_dir/$ac_word; then | |
3523 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3524 | break | |
3525 | fi | |
3526 | done | |
3527 | IFS="$ac_save_ifs" | |
3528 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3529 | fi | |
3530 | fi | |
3531 | MIG="$ac_cv_prog_MIG" | |
3532 | if test -n "$MIG"; then | |
3533 | echo "$ac_t""$MIG" 1>&6 | |
3534 | else | |
3535 | echo "$ac_t""no" 1>&6 | |
3536 | fi | |
3537 | ||
3538 | ||
3539 | ||
3540 | ||
9a156167 MK |
3541 | # ---------------------- # |
3542 | # Checks for libraries. # | |
3543 | # ---------------------- # | |
3544 | ||
3545 | # We might need to link with -lm; most simulators need it. | |
3546 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
5b5d99cf | 3547 | echo "configure:3548: checking for main in -lm" >&5 |
9a156167 MK |
3548 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3549 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3550 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3551 | else | |
3552 | ac_save_LIBS="$LIBS" | |
3553 | LIBS="-lm $LIBS" | |
3554 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3555 | #line 3556 "configure" |
9a156167 MK |
3556 | #include "confdefs.h" |
3557 | ||
3558 | int main() { | |
3559 | main() | |
3560 | ; return 0; } | |
3561 | EOF | |
5b5d99cf | 3562 | if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3563 | rm -rf conftest* |
3564 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3565 | else | |
3566 | echo "configure: failed program was:" >&5 | |
3567 | cat conftest.$ac_ext >&5 | |
3568 | rm -rf conftest* | |
3569 | eval "ac_cv_lib_$ac_lib_var=no" | |
3570 | fi | |
3571 | rm -f conftest* | |
3572 | LIBS="$ac_save_LIBS" | |
3573 | ||
3574 | fi | |
3575 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3576 | echo "$ac_t""yes" 1>&6 | |
3577 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3578 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3579 | cat >> confdefs.h <<EOF | |
3580 | #define $ac_tr_lib 1 | |
3581 | EOF | |
3582 | ||
3583 | LIBS="-lm $LIBS" | |
3584 | ||
3585 | else | |
3586 | echo "$ac_t""no" 1>&6 | |
3587 | fi | |
3588 | ||
3589 | ||
3590 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3591 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3592 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3593 | # is known to have this problem). Therefore we avoid libw if we can. | |
3594 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
5b5d99cf | 3595 | echo "configure:3596: checking for wctype" >&5 |
9a156167 MK |
3596 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3597 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3598 | else | |
3599 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3600 | #line 3601 "configure" |
9a156167 MK |
3601 | #include "confdefs.h" |
3602 | /* System header to define __stub macros and hopefully few prototypes, | |
3603 | which can conflict with char wctype(); below. */ | |
3604 | #include <assert.h> | |
3605 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3606 | /* We use char because int might match the return type of a gcc2 | |
3607 | builtin and then its argument prototype would still apply. */ | |
3608 | char wctype(); | |
3609 | ||
3610 | int main() { | |
3611 | ||
3612 | /* The GNU C library defines this for functions which it implements | |
3613 | to always fail with ENOSYS. Some functions are actually named | |
3614 | something starting with __ and the normal name is an alias. */ | |
3615 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3616 | choke me | |
3617 | #else | |
3618 | wctype(); | |
3619 | #endif | |
3620 | ||
3621 | ; return 0; } | |
3622 | EOF | |
5b5d99cf | 3623 | if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3624 | rm -rf conftest* |
3625 | eval "ac_cv_func_wctype=yes" | |
3626 | else | |
3627 | echo "configure: failed program was:" >&5 | |
3628 | cat conftest.$ac_ext >&5 | |
3629 | rm -rf conftest* | |
3630 | eval "ac_cv_func_wctype=no" | |
3631 | fi | |
3632 | rm -f conftest* | |
3633 | fi | |
3634 | ||
3635 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3636 | echo "$ac_t""yes" 1>&6 | |
3637 | : | |
3638 | else | |
3639 | echo "$ac_t""no" 1>&6 | |
3640 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
5b5d99cf | 3641 | echo "configure:3642: checking for wctype in -lw" >&5 |
9a156167 MK |
3642 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3643 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3644 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3645 | else | |
3646 | ac_save_LIBS="$LIBS" | |
3647 | LIBS="-lw $LIBS" | |
3648 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3649 | #line 3650 "configure" |
9a156167 MK |
3650 | #include "confdefs.h" |
3651 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3652 | /* We use char because int might match the return type of a gcc2 | |
3653 | builtin and then its argument prototype would still apply. */ | |
3654 | char wctype(); | |
3655 | ||
3656 | int main() { | |
3657 | wctype() | |
3658 | ; return 0; } | |
3659 | EOF | |
5b5d99cf | 3660 | if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3661 | rm -rf conftest* |
3662 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3663 | else | |
3664 | echo "configure: failed program was:" >&5 | |
3665 | cat conftest.$ac_ext >&5 | |
3666 | rm -rf conftest* | |
3667 | eval "ac_cv_lib_$ac_lib_var=no" | |
3668 | fi | |
3669 | rm -f conftest* | |
3670 | LIBS="$ac_save_LIBS" | |
3671 | ||
3672 | fi | |
3673 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3674 | echo "$ac_t""yes" 1>&6 | |
3675 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3676 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3677 | cat >> confdefs.h <<EOF | |
3678 | #define $ac_tr_lib 1 | |
3679 | EOF | |
3680 | ||
3681 | LIBS="-lw $LIBS" | |
3682 | ||
3683 | else | |
3684 | echo "$ac_t""no" 1>&6 | |
3685 | fi | |
3686 | ||
3687 | fi | |
3688 | ||
3689 | ||
3690 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3691 | ||
3692 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
5b5d99cf | 3693 | echo "configure:3694: checking for library containing socketpair" >&5 |
9a156167 MK |
3694 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3695 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3696 | else | |
3697 | ac_func_search_save_LIBS="$LIBS" | |
3698 | ac_cv_search_socketpair="no" | |
3699 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 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 | |
5b5d99cf | 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="none required" | |
3714 | else | |
3715 | echo "configure: failed program was:" >&5 | |
3716 | cat conftest.$ac_ext >&5 | |
3717 | fi | |
3718 | rm -f conftest* | |
3719 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3720 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3721 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3722 | #line 3723 "configure" |
9a156167 MK |
3723 | #include "confdefs.h" |
3724 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3725 | /* We use char because int might match the return type of a gcc2 | |
3726 | builtin and then its argument prototype would still apply. */ | |
3727 | char socketpair(); | |
3728 | ||
3729 | int main() { | |
3730 | socketpair() | |
3731 | ; return 0; } | |
3732 | EOF | |
5b5d99cf | 3733 | if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3734 | rm -rf conftest* |
3735 | ac_cv_search_socketpair="-l$i" | |
3736 | break | |
3737 | else | |
3738 | echo "configure: failed program was:" >&5 | |
3739 | cat conftest.$ac_ext >&5 | |
3740 | fi | |
3741 | rm -f conftest* | |
3742 | done | |
3743 | LIBS="$ac_func_search_save_LIBS" | |
3744 | fi | |
3745 | ||
3746 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3747 | if test "$ac_cv_search_socketpair" != "no"; then | |
3748 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3749 | ||
3750 | else : | |
3751 | ||
3752 | fi | |
3753 | ||
06825bd1 MK |
3754 | # Since GDB uses Readline, we need termcap functionality, so we need |
3755 | # to find a library that provides that. When GDB is configured with | |
3756 | # --enable-tui, we need full curses functionality. | |
3757 | # | |
3758 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
3759 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3760 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3761 | # `curses'. I don't see why we should use HP curses if a more | |
3762 | # standard curses is available, except that according to HP's | |
3763 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3764 | # HP-UX 10.10 and 10.20. | |
3765 | ||
3766 | if test "$need_curses" = yes; then | |
3767 | ||
3768 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
5b5d99cf | 3769 | echo "configure:3770: checking for library containing initscr" >&5 |
06825bd1 MK |
3770 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
3771 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3772 | else | |
3773 | ac_func_search_save_LIBS="$LIBS" | |
3774 | ac_cv_search_initscr="no" | |
3775 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 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 | |
5b5d99cf | 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="none required" | |
3790 | else | |
3791 | echo "configure: failed program was:" >&5 | |
3792 | cat conftest.$ac_ext >&5 | |
3793 | fi | |
3794 | rm -f conftest* | |
3795 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
3796 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3797 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3798 | #line 3799 "configure" |
06825bd1 MK |
3799 | #include "confdefs.h" |
3800 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3801 | /* We use char because int might match the return type of a gcc2 | |
3802 | builtin and then its argument prototype would still apply. */ | |
3803 | char initscr(); | |
3804 | ||
3805 | int main() { | |
3806 | initscr() | |
3807 | ; return 0; } | |
3808 | EOF | |
5b5d99cf | 3809 | if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3810 | rm -rf conftest* |
3811 | ac_cv_search_initscr="-l$i" | |
3812 | break | |
3813 | else | |
3814 | echo "configure: failed program was:" >&5 | |
3815 | cat conftest.$ac_ext >&5 | |
3816 | fi | |
3817 | rm -f conftest* | |
3818 | done | |
3819 | LIBS="$ac_func_search_save_LIBS" | |
3820 | fi | |
3821 | ||
3822 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3823 | if test "$ac_cv_search_initscr" != "no"; then | |
3824 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3825 | ||
3826 | else : | |
3827 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
3828 | fi | |
3829 | fi | |
3830 | ||
3831 | case $host_os in | |
3832 | cygwin*) | |
3833 | if test -d $srcdir/libtermcap; then | |
3834 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
3835 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
3836 | fi ;; | |
3837 | go32*) | |
3838 | # ??? Is this really true? | |
3839 | ac_cv_search_tgetent="none required" | |
3840 | ;; | |
3841 | aix*) | |
3842 | # Readline prefers curses over termcap on AIX. | |
3843 | # ??? Why? | |
3844 | ||
3845 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
5b5d99cf | 3846 | echo "configure:3847: checking for library containing tgetent" >&5 |
06825bd1 MK |
3847 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3848 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3849 | else | |
3850 | ac_func_search_save_LIBS="$LIBS" | |
3851 | ac_cv_search_tgetent="no" | |
3852 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 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 | |
5b5d99cf | 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="none required" | |
3867 | else | |
3868 | echo "configure: failed program was:" >&5 | |
3869 | cat conftest.$ac_ext >&5 | |
3870 | fi | |
3871 | rm -f conftest* | |
3872 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
3873 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3874 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3875 | #line 3876 "configure" |
06825bd1 MK |
3876 | #include "confdefs.h" |
3877 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3878 | /* We use char because int might match the return type of a gcc2 | |
3879 | builtin and then its argument prototype would still apply. */ | |
3880 | char tgetent(); | |
3881 | ||
3882 | int main() { | |
3883 | tgetent() | |
3884 | ; return 0; } | |
3885 | EOF | |
5b5d99cf | 3886 | if { (eval echo configure:3887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3887 | rm -rf conftest* |
3888 | ac_cv_search_tgetent="-l$i" | |
3889 | break | |
3890 | else | |
3891 | echo "configure: failed program was:" >&5 | |
3892 | cat conftest.$ac_ext >&5 | |
3893 | fi | |
3894 | rm -f conftest* | |
3895 | done | |
3896 | LIBS="$ac_func_search_save_LIBS" | |
3897 | fi | |
3898 | ||
3899 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3900 | if test "$ac_cv_search_tgetent" != "no"; then | |
3901 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3902 | ||
3903 | else : | |
3904 | ||
3905 | fi | |
3906 | ;; | |
3907 | esac | |
3908 | ||
3909 | # Note: We used to check for libtermlib and libterminfo too, but | |
3910 | # Readline doesn't, so I think we're safe with leaving them out. | |
3911 | ||
3912 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
5b5d99cf | 3913 | echo "configure:3914: checking for library containing tgetent" >&5 |
06825bd1 MK |
3914 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3915 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3916 | else | |
3917 | ac_func_search_save_LIBS="$LIBS" | |
3918 | ac_cv_search_tgetent="no" | |
3919 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 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 | |
5b5d99cf | 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="none required" | |
3934 | else | |
3935 | echo "configure: failed program was:" >&5 | |
3936 | cat conftest.$ac_ext >&5 | |
3937 | fi | |
3938 | rm -f conftest* | |
3939 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
3940 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3941 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3942 | #line 3943 "configure" |
06825bd1 MK |
3943 | #include "confdefs.h" |
3944 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3945 | /* We use char because int might match the return type of a gcc2 | |
3946 | builtin and then its argument prototype would still apply. */ | |
3947 | char tgetent(); | |
3948 | ||
3949 | int main() { | |
3950 | tgetent() | |
3951 | ; return 0; } | |
3952 | EOF | |
5b5d99cf | 3953 | if { (eval echo configure:3954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3954 | rm -rf conftest* |
3955 | ac_cv_search_tgetent="-l$i" | |
3956 | break | |
3957 | else | |
3958 | echo "configure: failed program was:" >&5 | |
3959 | cat conftest.$ac_ext >&5 | |
3960 | fi | |
3961 | rm -f conftest* | |
3962 | done | |
3963 | LIBS="$ac_func_search_save_LIBS" | |
3964 | fi | |
3965 | ||
3966 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3967 | if test "$ac_cv_search_tgetent" != "no"; then | |
3968 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3969 | ||
3970 | else : | |
3971 | ||
3972 | fi | |
3973 | ||
3974 | if test "$ac_cv_search_tgetent" = no; then | |
3975 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
3976 | fi | |
3977 | ||
5ee754fc MK |
3978 | # ------------------------- # |
3979 | # Checks for header files. # | |
3980 | # ------------------------- # | |
3981 | ||
3982 | ac_header_dirent=no | |
3983 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
3984 | do | |
3985 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3986 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
5b5d99cf | 3987 | echo "configure:3988: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 3988 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
3989 | echo $ac_n "(cached) $ac_c" 1>&6 |
3990 | else | |
3991 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 3992 | #line 3993 "configure" |
c906108c SS |
3993 | #include "confdefs.h" |
3994 | #include <sys/types.h> | |
5ee754fc MK |
3995 | #include <$ac_hdr> |
3996 | int main() { | |
3997 | DIR *dirp = 0; | |
3998 | ; return 0; } | |
3999 | EOF | |
5b5d99cf | 4000 | if { (eval echo configure:4001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4001 | rm -rf conftest* |
4002 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4003 | else | |
4004 | echo "configure: failed program was:" >&5 | |
4005 | cat conftest.$ac_ext >&5 | |
4006 | rm -rf conftest* | |
4007 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4008 | fi | |
4009 | rm -f conftest* | |
4010 | fi | |
4011 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4012 | echo "$ac_t""yes" 1>&6 | |
4013 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4014 | cat >> confdefs.h <<EOF | |
4015 | #define $ac_tr_hdr 1 | |
4016 | EOF | |
4017 | ac_header_dirent=$ac_hdr; break | |
4018 | else | |
4019 | echo "$ac_t""no" 1>&6 | |
4020 | fi | |
4021 | done | |
4022 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4023 | if test $ac_header_dirent = dirent.h; then | |
4024 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
5b5d99cf | 4025 | echo "configure:4026: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4026 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4027 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4028 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4029 | else | |
4030 | ac_save_LIBS="$LIBS" | |
4031 | LIBS="-ldir $LIBS" | |
4032 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4033 | #line 4034 "configure" |
5ee754fc MK |
4034 | #include "confdefs.h" |
4035 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4036 | /* We use char because int might match the return type of a gcc2 | |
4037 | builtin and then its argument prototype would still apply. */ | |
4038 | char opendir(); | |
c906108c SS |
4039 | |
4040 | int main() { | |
5ee754fc | 4041 | opendir() |
c906108c SS |
4042 | ; return 0; } |
4043 | EOF | |
5b5d99cf | 4044 | if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4045 | rm -rf conftest* |
5ee754fc | 4046 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4047 | else |
4048 | echo "configure: failed program was:" >&5 | |
4049 | cat conftest.$ac_ext >&5 | |
4050 | rm -rf conftest* | |
5ee754fc | 4051 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4052 | fi |
4053 | rm -f conftest* | |
5ee754fc MK |
4054 | LIBS="$ac_save_LIBS" |
4055 | ||
4056 | fi | |
4057 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4058 | echo "$ac_t""yes" 1>&6 | |
4059 | LIBS="$LIBS -ldir" | |
4060 | else | |
4061 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4062 | fi |
4063 | ||
5ee754fc MK |
4064 | else |
4065 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
5b5d99cf | 4066 | echo "configure:4067: checking for opendir in -lx" >&5 |
5ee754fc MK |
4067 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4068 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4069 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4070 | else | |
4071 | ac_save_LIBS="$LIBS" | |
4072 | LIBS="-lx $LIBS" | |
4073 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4074 | #line 4075 "configure" |
5ee754fc MK |
4075 | #include "confdefs.h" |
4076 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4077 | /* We use char because int might match the return type of a gcc2 | |
4078 | builtin and then its argument prototype would still apply. */ | |
4079 | char opendir(); | |
4080 | ||
4081 | int main() { | |
4082 | opendir() | |
4083 | ; return 0; } | |
c906108c | 4084 | EOF |
5b5d99cf | 4085 | if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4086 | rm -rf conftest* |
4087 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4088 | else | |
4089 | echo "configure: failed program was:" >&5 | |
4090 | cat conftest.$ac_ext >&5 | |
4091 | rm -rf conftest* | |
4092 | eval "ac_cv_lib_$ac_lib_var=no" | |
4093 | fi | |
4094 | rm -f conftest* | |
4095 | LIBS="$ac_save_LIBS" | |
c906108c | 4096 | |
5ee754fc MK |
4097 | fi |
4098 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4099 | echo "$ac_t""yes" 1>&6 | |
4100 | LIBS="$LIBS -lx" | |
4101 | else | |
4102 | echo "$ac_t""no" 1>&6 | |
4103 | fi | |
c906108c | 4104 | |
5ee754fc | 4105 | fi |
c906108c | 4106 | |
5ee754fc | 4107 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
5b5d99cf | 4108 | echo "configure:4109: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4109 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4110 | echo $ac_n "(cached) $ac_c" 1>&6 |
4111 | else | |
4112 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4113 | #line 4114 "configure" |
9608ab8b MK |
4114 | #include "confdefs.h" |
4115 | #include <sys/types.h> | |
5ee754fc MK |
4116 | #include <sys/stat.h> |
4117 | ||
4118 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4119 | # if S_ISBLK (S_IFDIR) | |
4120 | You lose. | |
4121 | # endif | |
4122 | #endif | |
4123 | ||
4124 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4125 | # if S_ISBLK (S_IFCHR) | |
4126 | You lose. | |
4127 | # endif | |
4128 | #endif | |
4129 | ||
4130 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4131 | # if S_ISLNK (S_IFREG) | |
4132 | You lose. | |
4133 | # endif | |
4134 | #endif | |
4135 | ||
4136 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4137 | # if S_ISSOCK (S_IFREG) | |
4138 | You lose. | |
4139 | # endif | |
4140 | #endif | |
4141 | ||
9608ab8b | 4142 | EOF |
5ee754fc MK |
4143 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4144 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4145 | rm -rf conftest* |
5ee754fc MK |
4146 | ac_cv_header_stat_broken=yes |
4147 | else | |
4148 | rm -rf conftest* | |
4149 | ac_cv_header_stat_broken=no | |
4150 | fi | |
4151 | rm -f conftest* | |
4152 | ||
4153 | fi | |
4154 | ||
4155 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4156 | if test $ac_cv_header_stat_broken = yes; then | |
4157 | cat >> confdefs.h <<\EOF | |
4158 | #define STAT_MACROS_BROKEN 1 | |
4159 | EOF | |
4160 | ||
4161 | fi | |
4162 | ||
4163 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
5b5d99cf | 4164 | echo "configure:4165: checking for ANSI C header files" >&5 |
5ee754fc MK |
4165 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4166 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4167 | else | |
4168 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4169 | #line 4170 "configure" |
5ee754fc MK |
4170 | #include "confdefs.h" |
4171 | #include <stdlib.h> | |
4172 | #include <stdarg.h> | |
4173 | #include <string.h> | |
4174 | #include <float.h> | |
4175 | EOF | |
4176 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4177 | { (eval echo configure:4178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4178 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4179 | if test -z "$ac_err"; then | |
4180 | rm -rf conftest* | |
4181 | ac_cv_header_stdc=yes | |
4182 | else | |
4183 | echo "$ac_err" >&5 | |
4184 | echo "configure: failed program was:" >&5 | |
4185 | cat conftest.$ac_ext >&5 | |
4186 | rm -rf conftest* | |
4187 | ac_cv_header_stdc=no | |
4188 | fi | |
4189 | rm -f conftest* | |
4190 | ||
4191 | if test $ac_cv_header_stdc = yes; then | |
4192 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4193 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4194 | #line 4195 "configure" |
5ee754fc MK |
4195 | #include "confdefs.h" |
4196 | #include <string.h> | |
4197 | EOF | |
4198 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4199 | egrep "memchr" >/dev/null 2>&1; then | |
4200 | : | |
4201 | else | |
4202 | rm -rf conftest* | |
4203 | ac_cv_header_stdc=no | |
4204 | fi | |
4205 | rm -f conftest* | |
4206 | ||
4207 | fi | |
4208 | ||
4209 | if test $ac_cv_header_stdc = yes; then | |
4210 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4211 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4212 | #line 4213 "configure" |
5ee754fc MK |
4213 | #include "confdefs.h" |
4214 | #include <stdlib.h> | |
4215 | EOF | |
4216 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4217 | egrep "free" >/dev/null 2>&1; then | |
4218 | : | |
4219 | else | |
4220 | rm -rf conftest* | |
4221 | ac_cv_header_stdc=no | |
4222 | fi | |
4223 | rm -f conftest* | |
4224 | ||
4225 | fi | |
4226 | ||
4227 | if test $ac_cv_header_stdc = yes; then | |
4228 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4229 | if test "$cross_compiling" = yes; then | |
4230 | : | |
4231 | else | |
4232 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4233 | #line 4234 "configure" |
5ee754fc MK |
4234 | #include "confdefs.h" |
4235 | #include <ctype.h> | |
4236 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4237 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4238 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4239 | int main () { int i; for (i = 0; i < 256; i++) | |
4240 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4241 | exit (0); } | |
4242 | ||
4243 | EOF | |
5b5d99cf | 4244 | if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4245 | then |
4246 | : | |
9608ab8b | 4247 | else |
5ee754fc MK |
4248 | echo "configure: failed program was:" >&5 |
4249 | cat conftest.$ac_ext >&5 | |
4250 | rm -fr conftest* | |
4251 | ac_cv_header_stdc=no | |
4252 | fi | |
4253 | rm -fr conftest* | |
4254 | fi | |
4255 | ||
4256 | fi | |
4257 | fi | |
4258 | ||
4259 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4260 | if test $ac_cv_header_stdc = yes; then | |
4261 | cat >> confdefs.h <<\EOF | |
4262 | #define STDC_HEADERS 1 | |
4263 | EOF | |
4264 | ||
4265 | fi | |
4266 | ||
4267 | for ac_hdr in link.h | |
4268 | do | |
4269 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4270 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4271 | echo "configure:4272: checking for $ac_hdr" >&5 |
5ee754fc MK |
4272 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4273 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4274 | else | |
4275 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4276 | #line 4277 "configure" |
5ee754fc MK |
4277 | #include "confdefs.h" |
4278 | #include <$ac_hdr> | |
4279 | EOF | |
4280 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4281 | { (eval echo configure:4282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4282 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4283 | if test -z "$ac_err"; then | |
4284 | rm -rf conftest* | |
4285 | eval "ac_cv_header_$ac_safe=yes" | |
4286 | else | |
4287 | echo "$ac_err" >&5 | |
4288 | echo "configure: failed program was:" >&5 | |
4289 | cat conftest.$ac_ext >&5 | |
4290 | rm -rf conftest* | |
4291 | eval "ac_cv_header_$ac_safe=no" | |
4292 | fi | |
4293 | rm -f conftest* | |
4294 | fi | |
4295 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4296 | echo "$ac_t""yes" 1>&6 | |
4297 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4298 | cat >> confdefs.h <<EOF | |
4299 | #define $ac_tr_hdr 1 | |
4300 | EOF | |
4301 | ||
4302 | else | |
4303 | echo "$ac_t""no" 1>&6 | |
4304 | fi | |
4305 | done | |
4306 | ||
4307 | for ac_hdr in nlist.h | |
4308 | do | |
4309 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4310 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4311 | echo "configure:4312: checking for $ac_hdr" >&5 |
5ee754fc MK |
4312 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4313 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4314 | else | |
4315 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4316 | #line 4317 "configure" |
5ee754fc MK |
4317 | #include "confdefs.h" |
4318 | #include <$ac_hdr> | |
4319 | EOF | |
4320 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4321 | { (eval echo configure:4322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4322 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4323 | if test -z "$ac_err"; then | |
4324 | rm -rf conftest* | |
4325 | eval "ac_cv_header_$ac_safe=yes" | |
4326 | else | |
4327 | echo "$ac_err" >&5 | |
4328 | echo "configure: failed program was:" >&5 | |
4329 | cat conftest.$ac_ext >&5 | |
4330 | rm -rf conftest* | |
4331 | eval "ac_cv_header_$ac_safe=no" | |
4332 | fi | |
4333 | rm -f conftest* | |
4334 | fi | |
4335 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4336 | echo "$ac_t""yes" 1>&6 | |
4337 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4338 | cat >> confdefs.h <<EOF | |
4339 | #define $ac_tr_hdr 1 | |
4340 | EOF | |
4341 | ||
4342 | else | |
4343 | echo "$ac_t""no" 1>&6 | |
4344 | fi | |
4345 | done | |
4346 | ||
4347 | for ac_hdr in poll.h sys/poll.h | |
4348 | do | |
4349 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4350 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4351 | echo "configure:4352: checking for $ac_hdr" >&5 |
5ee754fc MK |
4352 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4353 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4354 | else | |
4355 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4356 | #line 4357 "configure" |
5ee754fc MK |
4357 | #include "confdefs.h" |
4358 | #include <$ac_hdr> | |
4359 | EOF | |
4360 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4361 | { (eval echo configure:4362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4362 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4363 | if test -z "$ac_err"; then | |
4364 | rm -rf conftest* | |
4365 | eval "ac_cv_header_$ac_safe=yes" | |
4366 | else | |
4367 | echo "$ac_err" >&5 | |
4368 | echo "configure: failed program was:" >&5 | |
4369 | cat conftest.$ac_ext >&5 | |
4370 | rm -rf conftest* | |
4371 | eval "ac_cv_header_$ac_safe=no" | |
4372 | fi | |
4373 | rm -f conftest* | |
4374 | fi | |
4375 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4376 | echo "$ac_t""yes" 1>&6 | |
4377 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4378 | cat >> confdefs.h <<EOF | |
4379 | #define $ac_tr_hdr 1 | |
4380 | EOF | |
4381 | ||
4382 | else | |
4383 | echo "$ac_t""no" 1>&6 | |
4384 | fi | |
4385 | done | |
4386 | ||
4387 | for ac_hdr in proc_service.h thread_db.h | |
4388 | do | |
4389 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4390 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4391 | echo "configure:4392: checking for $ac_hdr" >&5 |
5ee754fc MK |
4392 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4393 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4394 | else | |
4395 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4396 | #line 4397 "configure" |
5ee754fc MK |
4397 | #include "confdefs.h" |
4398 | #include <$ac_hdr> | |
4399 | EOF | |
4400 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4401 | { (eval echo configure:4402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4402 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4403 | if test -z "$ac_err"; then | |
4404 | rm -rf conftest* | |
4405 | eval "ac_cv_header_$ac_safe=yes" | |
4406 | else | |
4407 | echo "$ac_err" >&5 | |
4408 | echo "configure: failed program was:" >&5 | |
4409 | cat conftest.$ac_ext >&5 | |
4410 | rm -rf conftest* | |
4411 | eval "ac_cv_header_$ac_safe=no" | |
4412 | fi | |
4413 | rm -f conftest* | |
4414 | fi | |
4415 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4416 | echo "$ac_t""yes" 1>&6 | |
4417 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4418 | cat >> confdefs.h <<EOF | |
4419 | #define $ac_tr_hdr 1 | |
4420 | EOF | |
4421 | ||
4422 | else | |
4423 | echo "$ac_t""no" 1>&6 | |
4424 | fi | |
4425 | done | |
4426 | ||
4427 | for ac_hdr in stddef.h | |
4428 | do | |
4429 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4430 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4431 | echo "configure:4432: checking for $ac_hdr" >&5 |
5ee754fc MK |
4432 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4434 | else | |
4435 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4436 | #line 4437 "configure" |
5ee754fc MK |
4437 | #include "confdefs.h" |
4438 | #include <$ac_hdr> | |
4439 | EOF | |
4440 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4441 | { (eval echo configure:4442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4442 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4443 | if test -z "$ac_err"; then | |
4444 | rm -rf conftest* | |
4445 | eval "ac_cv_header_$ac_safe=yes" | |
4446 | else | |
4447 | echo "$ac_err" >&5 | |
4448 | echo "configure: failed program was:" >&5 | |
4449 | cat conftest.$ac_ext >&5 | |
4450 | rm -rf conftest* | |
4451 | eval "ac_cv_header_$ac_safe=no" | |
4452 | fi | |
4453 | rm -f conftest* | |
4454 | fi | |
4455 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4456 | echo "$ac_t""yes" 1>&6 | |
4457 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4458 | cat >> confdefs.h <<EOF | |
4459 | #define $ac_tr_hdr 1 | |
4460 | EOF | |
4461 | ||
4462 | else | |
4463 | echo "$ac_t""no" 1>&6 | |
4464 | fi | |
4465 | done | |
4466 | ||
4467 | for ac_hdr in stdlib.h | |
4468 | do | |
4469 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4470 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4471 | echo "configure:4472: checking for $ac_hdr" >&5 |
5ee754fc MK |
4472 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4473 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4474 | else | |
4475 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4476 | #line 4477 "configure" |
5ee754fc MK |
4477 | #include "confdefs.h" |
4478 | #include <$ac_hdr> | |
4479 | EOF | |
4480 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4481 | { (eval echo configure:4482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4482 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4483 | if test -z "$ac_err"; then | |
4484 | rm -rf conftest* | |
4485 | eval "ac_cv_header_$ac_safe=yes" | |
4486 | else | |
4487 | echo "$ac_err" >&5 | |
4488 | echo "configure: failed program was:" >&5 | |
4489 | cat conftest.$ac_ext >&5 | |
4490 | rm -rf conftest* | |
4491 | eval "ac_cv_header_$ac_safe=no" | |
4492 | fi | |
4493 | rm -f conftest* | |
4494 | fi | |
4495 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4496 | echo "$ac_t""yes" 1>&6 | |
4497 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4498 | cat >> confdefs.h <<EOF | |
4499 | #define $ac_tr_hdr 1 | |
4500 | EOF | |
4501 | ||
4502 | else | |
4503 | echo "$ac_t""no" 1>&6 | |
4504 | fi | |
4505 | done | |
4506 | ||
4507 | for ac_hdr in stdint.h | |
4508 | do | |
4509 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4510 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4511 | echo "configure:4512: checking for $ac_hdr" >&5 |
5ee754fc MK |
4512 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4513 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4514 | else | |
4515 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4516 | #line 4517 "configure" |
5ee754fc MK |
4517 | #include "confdefs.h" |
4518 | #include <$ac_hdr> | |
4519 | EOF | |
4520 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4521 | { (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4522 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4523 | if test -z "$ac_err"; then | |
4524 | rm -rf conftest* | |
4525 | eval "ac_cv_header_$ac_safe=yes" | |
4526 | else | |
4527 | echo "$ac_err" >&5 | |
4528 | echo "configure: failed program was:" >&5 | |
4529 | cat conftest.$ac_ext >&5 | |
4530 | rm -rf conftest* | |
4531 | eval "ac_cv_header_$ac_safe=no" | |
4532 | fi | |
4533 | rm -f conftest* | |
4534 | fi | |
4535 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4536 | echo "$ac_t""yes" 1>&6 | |
4537 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4538 | cat >> confdefs.h <<EOF | |
4539 | #define $ac_tr_hdr 1 | |
4540 | EOF | |
4541 | ||
4542 | else | |
4543 | echo "$ac_t""no" 1>&6 | |
4544 | fi | |
4545 | done | |
4546 | ||
4547 | for ac_hdr in string.h memory.h strings.h | |
4548 | do | |
4549 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4550 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4551 | echo "configure:4552: checking for $ac_hdr" >&5 |
5ee754fc MK |
4552 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4553 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4554 | else | |
4555 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4556 | #line 4557 "configure" |
5ee754fc MK |
4557 | #include "confdefs.h" |
4558 | #include <$ac_hdr> | |
4559 | EOF | |
4560 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4561 | { (eval echo configure:4562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4562 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4563 | if test -z "$ac_err"; then | |
4564 | rm -rf conftest* | |
4565 | eval "ac_cv_header_$ac_safe=yes" | |
4566 | else | |
4567 | echo "$ac_err" >&5 | |
4568 | echo "configure: failed program was:" >&5 | |
4569 | cat conftest.$ac_ext >&5 | |
4570 | rm -rf conftest* | |
4571 | eval "ac_cv_header_$ac_safe=no" | |
4572 | fi | |
4573 | rm -f conftest* | |
4574 | fi | |
4575 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4576 | echo "$ac_t""yes" 1>&6 | |
4577 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4578 | cat >> confdefs.h <<EOF | |
4579 | #define $ac_tr_hdr 1 | |
4580 | EOF | |
4581 | ||
4582 | else | |
4583 | echo "$ac_t""no" 1>&6 | |
4584 | fi | |
4585 | done | |
4586 | ||
4587 | for ac_hdr in sys/fault.h | |
4588 | do | |
4589 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4590 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4591 | echo "configure:4592: checking for $ac_hdr" >&5 |
5ee754fc MK |
4592 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4594 | else | |
4595 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4596 | #line 4597 "configure" |
5ee754fc MK |
4597 | #include "confdefs.h" |
4598 | #include <$ac_hdr> | |
4599 | EOF | |
4600 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4601 | { (eval echo configure:4602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4602 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4603 | if test -z "$ac_err"; then | |
4604 | rm -rf conftest* | |
4605 | eval "ac_cv_header_$ac_safe=yes" | |
4606 | else | |
4607 | echo "$ac_err" >&5 | |
4608 | echo "configure: failed program was:" >&5 | |
4609 | cat conftest.$ac_ext >&5 | |
4610 | rm -rf conftest* | |
4611 | eval "ac_cv_header_$ac_safe=no" | |
4612 | fi | |
4613 | rm -f conftest* | |
4614 | fi | |
4615 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4616 | echo "$ac_t""yes" 1>&6 | |
4617 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4618 | cat >> confdefs.h <<EOF | |
4619 | #define $ac_tr_hdr 1 | |
4620 | EOF | |
4621 | ||
4622 | else | |
4623 | echo "$ac_t""no" 1>&6 | |
4624 | fi | |
4625 | done | |
4626 | ||
4627 | for ac_hdr in sys/file.h | |
4628 | do | |
4629 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4630 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4631 | echo "configure:4632: checking for $ac_hdr" >&5 |
5ee754fc MK |
4632 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4633 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4634 | else | |
4635 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4636 | #line 4637 "configure" |
5ee754fc MK |
4637 | #include "confdefs.h" |
4638 | #include <$ac_hdr> | |
4639 | EOF | |
4640 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4641 | { (eval echo configure:4642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4642 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4643 | if test -z "$ac_err"; then | |
4644 | rm -rf conftest* | |
4645 | eval "ac_cv_header_$ac_safe=yes" | |
4646 | else | |
4647 | echo "$ac_err" >&5 | |
4648 | echo "configure: failed program was:" >&5 | |
4649 | cat conftest.$ac_ext >&5 | |
4650 | rm -rf conftest* | |
4651 | eval "ac_cv_header_$ac_safe=no" | |
4652 | fi | |
4653 | rm -f conftest* | |
4654 | fi | |
4655 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4656 | echo "$ac_t""yes" 1>&6 | |
4657 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4658 | cat >> confdefs.h <<EOF | |
4659 | #define $ac_tr_hdr 1 | |
4660 | EOF | |
4661 | ||
4662 | else | |
4663 | echo "$ac_t""no" 1>&6 | |
4664 | fi | |
4665 | done | |
4666 | ||
4667 | for ac_hdr in sys/filio.h | |
4668 | do | |
4669 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4670 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4671 | echo "configure:4672: checking for $ac_hdr" >&5 |
5ee754fc MK |
4672 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4674 | else | |
4675 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4676 | #line 4677 "configure" |
5ee754fc MK |
4677 | #include "confdefs.h" |
4678 | #include <$ac_hdr> | |
4679 | EOF | |
4680 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4681 | { (eval echo configure:4682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4682 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4683 | if test -z "$ac_err"; then | |
4684 | rm -rf conftest* | |
4685 | eval "ac_cv_header_$ac_safe=yes" | |
4686 | else | |
4687 | echo "$ac_err" >&5 | |
4688 | echo "configure: failed program was:" >&5 | |
4689 | cat conftest.$ac_ext >&5 | |
4690 | rm -rf conftest* | |
4691 | eval "ac_cv_header_$ac_safe=no" | |
4692 | fi | |
4693 | rm -f conftest* | |
4694 | fi | |
4695 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4696 | echo "$ac_t""yes" 1>&6 | |
4697 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4698 | cat >> confdefs.h <<EOF | |
4699 | #define $ac_tr_hdr 1 | |
4700 | EOF | |
4701 | ||
4702 | else | |
4703 | echo "$ac_t""no" 1>&6 | |
4704 | fi | |
4705 | done | |
4706 | ||
4707 | for ac_hdr in sys/ioctl.h | |
4708 | do | |
4709 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4710 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4711 | echo "configure:4712: checking for $ac_hdr" >&5 |
5ee754fc MK |
4712 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4713 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4714 | else | |
4715 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4716 | #line 4717 "configure" |
5ee754fc MK |
4717 | #include "confdefs.h" |
4718 | #include <$ac_hdr> | |
4719 | EOF | |
4720 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4721 | { (eval echo configure:4722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4722 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4723 | if test -z "$ac_err"; then | |
4724 | rm -rf conftest* | |
4725 | eval "ac_cv_header_$ac_safe=yes" | |
4726 | else | |
4727 | echo "$ac_err" >&5 | |
4728 | echo "configure: failed program was:" >&5 | |
4729 | cat conftest.$ac_ext >&5 | |
4730 | rm -rf conftest* | |
4731 | eval "ac_cv_header_$ac_safe=no" | |
4732 | fi | |
4733 | rm -f conftest* | |
4734 | fi | |
4735 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4736 | echo "$ac_t""yes" 1>&6 | |
4737 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4738 | cat >> confdefs.h <<EOF | |
4739 | #define $ac_tr_hdr 1 | |
4740 | EOF | |
4741 | ||
4742 | else | |
4743 | echo "$ac_t""no" 1>&6 | |
4744 | fi | |
4745 | done | |
4746 | ||
4747 | for ac_hdr in sys/param.h | |
4748 | do | |
4749 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4750 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4751 | echo "configure:4752: checking for $ac_hdr" >&5 |
5ee754fc MK |
4752 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4753 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4754 | else | |
4755 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4756 | #line 4757 "configure" |
5ee754fc MK |
4757 | #include "confdefs.h" |
4758 | #include <$ac_hdr> | |
4759 | EOF | |
4760 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4761 | { (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4762 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4763 | if test -z "$ac_err"; then | |
4764 | rm -rf conftest* | |
4765 | eval "ac_cv_header_$ac_safe=yes" | |
4766 | else | |
4767 | echo "$ac_err" >&5 | |
4768 | echo "configure: failed program was:" >&5 | |
4769 | cat conftest.$ac_ext >&5 | |
4770 | rm -rf conftest* | |
4771 | eval "ac_cv_header_$ac_safe=no" | |
4772 | fi | |
4773 | rm -f conftest* | |
4774 | fi | |
4775 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4776 | echo "$ac_t""yes" 1>&6 | |
4777 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4778 | cat >> confdefs.h <<EOF | |
4779 | #define $ac_tr_hdr 1 | |
4780 | EOF | |
4781 | ||
4782 | else | |
4783 | echo "$ac_t""no" 1>&6 | |
4784 | fi | |
4785 | done | |
4786 | ||
4787 | for ac_hdr in sys/proc.h | |
4788 | do | |
4789 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4790 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4791 | echo "configure:4792: checking for $ac_hdr" >&5 |
5ee754fc MK |
4792 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4793 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4794 | else | |
4795 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4796 | #line 4797 "configure" |
5ee754fc MK |
4797 | #include "confdefs.h" |
4798 | #include <$ac_hdr> | |
4799 | EOF | |
4800 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4801 | { (eval echo configure:4802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4802 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4803 | if test -z "$ac_err"; then | |
4804 | rm -rf conftest* | |
4805 | eval "ac_cv_header_$ac_safe=yes" | |
4806 | else | |
4807 | echo "$ac_err" >&5 | |
4808 | echo "configure: failed program was:" >&5 | |
4809 | cat conftest.$ac_ext >&5 | |
4810 | rm -rf conftest* | |
4811 | eval "ac_cv_header_$ac_safe=no" | |
4812 | fi | |
4813 | rm -f conftest* | |
4814 | fi | |
4815 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4816 | echo "$ac_t""yes" 1>&6 | |
4817 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4818 | cat >> confdefs.h <<EOF | |
4819 | #define $ac_tr_hdr 1 | |
4820 | EOF | |
4821 | ||
4822 | else | |
4823 | echo "$ac_t""no" 1>&6 | |
4824 | fi | |
4825 | done | |
4826 | ||
4827 | for ac_hdr in sys/procfs.h | |
4828 | do | |
4829 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4830 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4831 | echo "configure:4832: checking for $ac_hdr" >&5 |
5ee754fc MK |
4832 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4834 | else | |
4835 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4836 | #line 4837 "configure" |
5ee754fc MK |
4837 | #include "confdefs.h" |
4838 | #include <$ac_hdr> | |
4839 | EOF | |
4840 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4841 | { (eval echo configure:4842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4842 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4843 | if test -z "$ac_err"; then | |
4844 | rm -rf conftest* | |
4845 | eval "ac_cv_header_$ac_safe=yes" | |
4846 | else | |
4847 | echo "$ac_err" >&5 | |
4848 | echo "configure: failed program was:" >&5 | |
4849 | cat conftest.$ac_ext >&5 | |
4850 | rm -rf conftest* | |
4851 | eval "ac_cv_header_$ac_safe=no" | |
4852 | fi | |
4853 | rm -f conftest* | |
4854 | fi | |
4855 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4856 | echo "$ac_t""yes" 1>&6 | |
4857 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4858 | cat >> confdefs.h <<EOF | |
4859 | #define $ac_tr_hdr 1 | |
4860 | EOF | |
4861 | ||
4862 | else | |
4863 | echo "$ac_t""no" 1>&6 | |
4864 | fi | |
4865 | done | |
4866 | ||
4867 | for ac_hdr in sys/ptrace.h ptrace.h | |
4868 | do | |
4869 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4870 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4871 | echo "configure:4872: checking for $ac_hdr" >&5 |
5ee754fc MK |
4872 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4873 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4874 | else | |
4875 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4876 | #line 4877 "configure" |
5ee754fc MK |
4877 | #include "confdefs.h" |
4878 | #include <$ac_hdr> | |
4879 | EOF | |
4880 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4881 | { (eval echo configure:4882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4882 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4883 | if test -z "$ac_err"; then | |
4884 | rm -rf conftest* | |
4885 | eval "ac_cv_header_$ac_safe=yes" | |
4886 | else | |
4887 | echo "$ac_err" >&5 | |
4888 | echo "configure: failed program was:" >&5 | |
4889 | cat conftest.$ac_ext >&5 | |
4890 | rm -rf conftest* | |
4891 | eval "ac_cv_header_$ac_safe=no" | |
4892 | fi | |
4893 | rm -f conftest* | |
4894 | fi | |
4895 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4896 | echo "$ac_t""yes" 1>&6 | |
4897 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4898 | cat >> confdefs.h <<EOF | |
4899 | #define $ac_tr_hdr 1 | |
4900 | EOF | |
4901 | ||
4902 | else | |
4903 | echo "$ac_t""no" 1>&6 | |
4904 | fi | |
4905 | done | |
4906 | ||
4907 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4908 | do | |
4909 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4910 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4911 | echo "configure:4912: checking for $ac_hdr" >&5 |
5ee754fc MK |
4912 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4913 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4914 | else | |
4915 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4916 | #line 4917 "configure" |
5ee754fc MK |
4917 | #include "confdefs.h" |
4918 | #include <$ac_hdr> | |
4919 | EOF | |
4920 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4921 | { (eval echo configure:4922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4922 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4923 | if test -z "$ac_err"; then | |
4924 | rm -rf conftest* | |
4925 | eval "ac_cv_header_$ac_safe=yes" | |
4926 | else | |
4927 | echo "$ac_err" >&5 | |
4928 | echo "configure: failed program was:" >&5 | |
4929 | cat conftest.$ac_ext >&5 | |
4930 | rm -rf conftest* | |
4931 | eval "ac_cv_header_$ac_safe=no" | |
4932 | fi | |
4933 | rm -f conftest* | |
4934 | fi | |
4935 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4936 | echo "$ac_t""yes" 1>&6 | |
4937 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4938 | cat >> confdefs.h <<EOF | |
4939 | #define $ac_tr_hdr 1 | |
4940 | EOF | |
4941 | ||
4942 | else | |
4943 | echo "$ac_t""no" 1>&6 | |
4944 | fi | |
4945 | done | |
4946 | ||
4947 | for ac_hdr in sys/select.h | |
4948 | do | |
4949 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4950 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4951 | echo "configure:4952: checking for $ac_hdr" >&5 |
5ee754fc MK |
4952 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4953 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4954 | else | |
4955 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4956 | #line 4957 "configure" |
5ee754fc MK |
4957 | #include "confdefs.h" |
4958 | #include <$ac_hdr> | |
4959 | EOF | |
4960 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 4961 | { (eval echo configure:4962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4962 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4963 | if test -z "$ac_err"; then | |
4964 | rm -rf conftest* | |
4965 | eval "ac_cv_header_$ac_safe=yes" | |
4966 | else | |
4967 | echo "$ac_err" >&5 | |
4968 | echo "configure: failed program was:" >&5 | |
4969 | cat conftest.$ac_ext >&5 | |
4970 | rm -rf conftest* | |
4971 | eval "ac_cv_header_$ac_safe=no" | |
4972 | fi | |
4973 | rm -f conftest* | |
4974 | fi | |
4975 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4976 | echo "$ac_t""yes" 1>&6 | |
4977 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4978 | cat >> confdefs.h <<EOF | |
4979 | #define $ac_tr_hdr 1 | |
4980 | EOF | |
4981 | ||
4982 | else | |
4983 | echo "$ac_t""no" 1>&6 | |
4984 | fi | |
4985 | done | |
4986 | ||
4987 | for ac_hdr in sys/syscall.h | |
4988 | do | |
4989 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4990 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 4991 | echo "configure:4992: checking for $ac_hdr" >&5 |
5ee754fc MK |
4992 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4993 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4994 | else | |
4995 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 4996 | #line 4997 "configure" |
5ee754fc MK |
4997 | #include "confdefs.h" |
4998 | #include <$ac_hdr> | |
4999 | EOF | |
5000 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 5001 | { (eval echo configure:5002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5002 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5003 | if test -z "$ac_err"; then | |
5004 | rm -rf conftest* | |
5005 | eval "ac_cv_header_$ac_safe=yes" | |
5006 | else | |
5007 | echo "$ac_err" >&5 | |
5008 | echo "configure: failed program was:" >&5 | |
5009 | cat conftest.$ac_ext >&5 | |
5010 | rm -rf conftest* | |
5011 | eval "ac_cv_header_$ac_safe=no" | |
5012 | fi | |
5013 | rm -f conftest* | |
5014 | fi | |
5015 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5016 | echo "$ac_t""yes" 1>&6 | |
5017 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5018 | cat >> confdefs.h <<EOF | |
5019 | #define $ac_tr_hdr 1 | |
5020 | EOF | |
5021 | ||
5022 | else | |
5023 | echo "$ac_t""no" 1>&6 | |
5024 | fi | |
5025 | done | |
5026 | ||
5027 | for ac_hdr in sys/user.h | |
5028 | do | |
5029 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5030 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 5031 | echo "configure:5032: checking for $ac_hdr" >&5 |
5ee754fc MK |
5032 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5034 | else | |
5035 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5036 | #line 5037 "configure" |
5ee754fc MK |
5037 | #include "confdefs.h" |
5038 | #include <$ac_hdr> | |
5039 | EOF | |
5040 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 5041 | { (eval echo configure:5042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5042 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5043 | if test -z "$ac_err"; then | |
5044 | rm -rf conftest* | |
5045 | eval "ac_cv_header_$ac_safe=yes" | |
5046 | else | |
5047 | echo "$ac_err" >&5 | |
5048 | echo "configure: failed program was:" >&5 | |
5049 | cat conftest.$ac_ext >&5 | |
5050 | rm -rf conftest* | |
5051 | eval "ac_cv_header_$ac_safe=no" | |
5052 | fi | |
5053 | rm -f conftest* | |
5054 | fi | |
5055 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5056 | echo "$ac_t""yes" 1>&6 | |
5057 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5058 | cat >> confdefs.h <<EOF | |
5059 | #define $ac_tr_hdr 1 | |
5060 | EOF | |
5061 | ||
5062 | else | |
5063 | echo "$ac_t""no" 1>&6 | |
5064 | fi | |
5065 | done | |
5066 | ||
5067 | for ac_hdr in sys/wait.h wait.h | |
5068 | do | |
5069 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5070 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 5071 | echo "configure:5072: checking for $ac_hdr" >&5 |
5ee754fc MK |
5072 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5074 | else | |
5075 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5076 | #line 5077 "configure" |
5ee754fc MK |
5077 | #include "confdefs.h" |
5078 | #include <$ac_hdr> | |
5079 | EOF | |
5080 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 5081 | { (eval echo configure:5082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5082 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5083 | if test -z "$ac_err"; then | |
5084 | rm -rf conftest* | |
5085 | eval "ac_cv_header_$ac_safe=yes" | |
5086 | else | |
5087 | echo "$ac_err" >&5 | |
9608ab8b MK |
5088 | echo "configure: failed program was:" >&5 |
5089 | cat conftest.$ac_ext >&5 | |
5090 | rm -rf conftest* | |
5ee754fc | 5091 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5092 | fi |
5093 | rm -f conftest* | |
5094 | fi | |
5ee754fc | 5095 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5096 | echo "$ac_t""yes" 1>&6 |
5097 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5098 | cat >> confdefs.h <<EOF | |
5099 | #define $ac_tr_hdr 1 | |
5100 | EOF | |
5ee754fc | 5101 | |
9608ab8b MK |
5102 | else |
5103 | echo "$ac_t""no" 1>&6 | |
5104 | fi | |
5105 | done | |
5ee754fc MK |
5106 | |
5107 | for ac_hdr in termios.h termio.h sgtty.h | |
5108 | do | |
5109 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5110 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 5111 | echo "configure:5112: checking for $ac_hdr" >&5 |
5ee754fc | 5112 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5113 | echo $ac_n "(cached) $ac_c" 1>&6 |
5114 | else | |
5ee754fc | 5115 | cat > conftest.$ac_ext <<EOF |
5b5d99cf | 5116 | #line 5117 "configure" |
9608ab8b | 5117 | #include "confdefs.h" |
5ee754fc | 5118 | #include <$ac_hdr> |
9608ab8b | 5119 | EOF |
5ee754fc | 5120 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5b5d99cf | 5121 | { (eval echo configure:5122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5122 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5123 | if test -z "$ac_err"; then | |
9608ab8b | 5124 | rm -rf conftest* |
5ee754fc | 5125 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5126 | else |
5ee754fc | 5127 | echo "$ac_err" >&5 |
9608ab8b MK |
5128 | echo "configure: failed program was:" >&5 |
5129 | cat conftest.$ac_ext >&5 | |
5130 | rm -rf conftest* | |
5ee754fc | 5131 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5132 | fi |
5133 | rm -f conftest* | |
9608ab8b | 5134 | fi |
5ee754fc | 5135 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5136 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5137 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5138 | cat >> confdefs.h <<EOF | |
5139 | #define $ac_tr_hdr 1 | |
5140 | EOF | |
5141 | ||
9608ab8b MK |
5142 | else |
5143 | echo "$ac_t""no" 1>&6 | |
5144 | fi | |
5ee754fc | 5145 | done |
9608ab8b | 5146 | |
5ee754fc MK |
5147 | for ac_hdr in unistd.h |
5148 | do | |
5149 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5150 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 5151 | echo "configure:5152: checking for $ac_hdr" >&5 |
5ee754fc | 5152 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5153 | echo $ac_n "(cached) $ac_c" 1>&6 |
5154 | else | |
5ee754fc | 5155 | cat > conftest.$ac_ext <<EOF |
5b5d99cf | 5156 | #line 5157 "configure" |
9608ab8b | 5157 | #include "confdefs.h" |
5ee754fc | 5158 | #include <$ac_hdr> |
9608ab8b | 5159 | EOF |
5ee754fc | 5160 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5b5d99cf | 5161 | { (eval echo configure:5162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5162 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5163 | if test -z "$ac_err"; then | |
9608ab8b | 5164 | rm -rf conftest* |
5ee754fc | 5165 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5166 | else |
5ee754fc | 5167 | echo "$ac_err" >&5 |
9608ab8b MK |
5168 | echo "configure: failed program was:" >&5 |
5169 | cat conftest.$ac_ext >&5 | |
5170 | rm -rf conftest* | |
5ee754fc | 5171 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5172 | fi |
5173 | rm -f conftest* | |
9608ab8b | 5174 | fi |
5ee754fc | 5175 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5176 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5177 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5178 | cat >> confdefs.h <<EOF | |
5179 | #define $ac_tr_hdr 1 | |
5180 | EOF | |
5181 | ||
9608ab8b MK |
5182 | else |
5183 | echo "$ac_t""no" 1>&6 | |
5184 | fi | |
5ee754fc | 5185 | done |
9608ab8b | 5186 | |
9608ab8b | 5187 | |
5ee754fc MK |
5188 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5189 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5190 | # think that we don't have <curses.h> if we're using GCC. | |
5191 | case $host_os in | |
5192 | solaris2.[78]) | |
5193 | if test "$GCC" = yes; then | |
5194 | cat >> confdefs.h <<\EOF | |
5195 | #define _MSE_INT_H 1 | |
5196 | EOF | |
5197 | ||
5198 | fi ;; | |
5199 | esac | |
5200 | for ac_hdr in curses.h ncurses.h term.h | |
5201 | do | |
5202 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5203 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 5204 | echo "configure:5205: checking for $ac_hdr" >&5 |
5ee754fc | 5205 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5206 | echo $ac_n "(cached) $ac_c" 1>&6 |
5207 | else | |
5208 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5209 | #line 5210 "configure" |
c906108c | 5210 | #include "confdefs.h" |
5ee754fc | 5211 | #include <$ac_hdr> |
c906108c SS |
5212 | EOF |
5213 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 5214 | { (eval echo configure:5215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5215 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5216 | if test -z "$ac_err"; then | |
5217 | rm -rf conftest* | |
5ee754fc | 5218 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5219 | else |
5220 | echo "$ac_err" >&5 | |
5221 | echo "configure: failed program was:" >&5 | |
5222 | cat conftest.$ac_ext >&5 | |
5223 | rm -rf conftest* | |
5ee754fc | 5224 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5225 | fi |
5226 | rm -f conftest* | |
c906108c | 5227 | fi |
5ee754fc MK |
5228 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5229 | echo "$ac_t""yes" 1>&6 | |
5230 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5231 | cat >> confdefs.h <<EOF | |
5232 | #define $ac_tr_hdr 1 | |
c906108c | 5233 | EOF |
5ee754fc | 5234 | |
c906108c | 5235 | else |
5ee754fc | 5236 | echo "$ac_t""no" 1>&6 |
c906108c | 5237 | fi |
5ee754fc | 5238 | done |
c906108c SS |
5239 | |
5240 | ||
5ee754fc MK |
5241 | # FIXME: kettenis/20030102: In most cases we include these |
5242 | # unconditionally, so what's the point in checking these? | |
5243 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5244 | do |
5245 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5246 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 5247 | echo "configure:5248: checking for $ac_hdr" >&5 |
c906108c SS |
5248 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5249 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5250 | else | |
5251 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5252 | #line 5253 "configure" |
c906108c SS |
5253 | #include "confdefs.h" |
5254 | #include <$ac_hdr> | |
5255 | EOF | |
5256 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 5257 | { (eval echo configure:5258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5258 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5259 | if test -z "$ac_err"; then | |
5260 | rm -rf conftest* | |
5261 | eval "ac_cv_header_$ac_safe=yes" | |
5262 | else | |
5263 | echo "$ac_err" >&5 | |
5264 | echo "configure: failed program was:" >&5 | |
5265 | cat conftest.$ac_ext >&5 | |
5266 | rm -rf conftest* | |
5267 | eval "ac_cv_header_$ac_safe=no" | |
5268 | fi | |
5269 | rm -f conftest* | |
5270 | fi | |
5271 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5272 | echo "$ac_t""yes" 1>&6 | |
5273 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5274 | cat >> confdefs.h <<EOF | |
5275 | #define $ac_tr_hdr 1 | |
5276 | EOF | |
5277 | ||
5278 | else | |
5279 | echo "$ac_t""no" 1>&6 | |
5280 | fi | |
5281 | done | |
5282 | ||
5ee754fc MK |
5283 | |
5284 | # ------------------ # | |
5285 | # Checks for types. # | |
5286 | # ------------------ # | |
5287 | ||
5288 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
5b5d99cf | 5289 | echo "configure:5290: checking return type of signal handlers" >&5 |
5ee754fc | 5290 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5291 | echo $ac_n "(cached) $ac_c" 1>&6 |
5292 | else | |
5293 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5294 | #line 5295 "configure" |
c906108c SS |
5295 | #include "confdefs.h" |
5296 | #include <sys/types.h> | |
5ee754fc MK |
5297 | #include <signal.h> |
5298 | #ifdef signal | |
5299 | #undef signal | |
c906108c | 5300 | #endif |
5ee754fc MK |
5301 | #ifdef __cplusplus |
5302 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5303 | #else | |
5304 | void (*signal ()) (); | |
c906108c SS |
5305 | #endif |
5306 | ||
5ee754fc MK |
5307 | int main() { |
5308 | int i; | |
5309 | ; return 0; } | |
c906108c | 5310 | EOF |
5b5d99cf | 5311 | if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5312 | rm -rf conftest* |
5ee754fc | 5313 | ac_cv_type_signal=void |
c906108c | 5314 | else |
5ee754fc MK |
5315 | echo "configure: failed program was:" >&5 |
5316 | cat conftest.$ac_ext >&5 | |
c906108c | 5317 | rm -rf conftest* |
5ee754fc | 5318 | ac_cv_type_signal=int |
c906108c SS |
5319 | fi |
5320 | rm -f conftest* | |
c906108c SS |
5321 | fi |
5322 | ||
5ee754fc MK |
5323 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5324 | cat >> confdefs.h <<EOF | |
5325 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5326 | EOF |
5327 | ||
c906108c SS |
5328 | |
5329 | ||
5ee754fc MK |
5330 | # ------------------------------------- # |
5331 | # Checks for compiler characteristics. # | |
5332 | # ------------------------------------- # | |
5333 | ||
c906108c | 5334 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
5b5d99cf | 5335 | echo "configure:5336: checking for working const" >&5 |
c906108c SS |
5336 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5338 | else | |
5339 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5340 | #line 5341 "configure" |
c906108c SS |
5341 | #include "confdefs.h" |
5342 | ||
5343 | int main() { | |
5344 | ||
5345 | /* Ultrix mips cc rejects this. */ | |
5346 | typedef int charset[2]; const charset x; | |
5347 | /* SunOS 4.1.1 cc rejects this. */ | |
5348 | char const *const *ccp; | |
5349 | char **p; | |
5350 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5351 | struct point {int x, y;}; | |
5352 | static struct point const zero = {0,0}; | |
5353 | /* AIX XL C 1.02.0.0 rejects this. | |
5354 | It does not let you subtract one const X* pointer from another in an arm | |
5355 | of an if-expression whose if-part is not a constant expression */ | |
5356 | const char *g = "string"; | |
5357 | ccp = &g + (g ? g-g : 0); | |
5358 | /* HPUX 7.0 cc rejects these. */ | |
5359 | ++ccp; | |
5360 | p = (char**) ccp; | |
5361 | ccp = (char const *const *) p; | |
5362 | { /* SCO 3.2v4 cc rejects this. */ | |
5363 | char *t; | |
5364 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5365 | ||
5366 | *t++ = 0; | |
5367 | } | |
5368 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5369 | int x[] = {25, 17}; | |
5370 | const int *foo = &x[0]; | |
5371 | ++foo; | |
5372 | } | |
5373 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5374 | typedef const int *iptr; | |
5375 | iptr p = 0; | |
5376 | ++p; | |
5377 | } | |
5378 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5379 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5380 | struct s { int j; const int *ap[3]; }; | |
5381 | struct s *b; b->j = 5; | |
5382 | } | |
5383 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5384 | const int foo = 10; | |
5385 | } | |
5386 | ||
5387 | ; return 0; } | |
5388 | EOF | |
5b5d99cf | 5389 | if { (eval echo configure:5390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5390 | rm -rf conftest* |
5391 | ac_cv_c_const=yes | |
5392 | else | |
5393 | echo "configure: failed program was:" >&5 | |
5394 | cat conftest.$ac_ext >&5 | |
5395 | rm -rf conftest* | |
5396 | ac_cv_c_const=no | |
5397 | fi | |
5398 | rm -f conftest* | |
5399 | fi | |
5400 | ||
5401 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5402 | if test $ac_cv_c_const = no; then | |
5403 | cat >> confdefs.h <<\EOF | |
5404 | #define const | |
5405 | EOF | |
5406 | ||
5407 | fi | |
5408 | ||
bce58c09 | 5409 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
5b5d99cf | 5410 | echo "configure:5411: checking for inline" >&5 |
bce58c09 JB |
5411 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5412 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5413 | else | |
5414 | ac_cv_c_inline=no | |
5415 | for ac_kw in inline __inline__ __inline; do | |
5416 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5417 | #line 5418 "configure" |
bce58c09 JB |
5418 | #include "confdefs.h" |
5419 | ||
5420 | int main() { | |
5421 | } $ac_kw foo() { | |
5422 | ; return 0; } | |
5423 | EOF | |
5b5d99cf | 5424 | if { (eval echo configure:5425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5425 | rm -rf conftest* |
5426 | ac_cv_c_inline=$ac_kw; break | |
5427 | else | |
5428 | echo "configure: failed program was:" >&5 | |
5429 | cat conftest.$ac_ext >&5 | |
5430 | fi | |
5431 | rm -f conftest* | |
5432 | done | |
5433 | ||
5434 | fi | |
5435 | ||
5436 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5437 | case "$ac_cv_c_inline" in | |
5438 | inline | yes) ;; | |
5439 | no) cat >> confdefs.h <<\EOF | |
5440 | #define inline | |
5441 | EOF | |
5442 | ;; | |
5443 | *) cat >> confdefs.h <<EOF | |
5444 | #define inline $ac_cv_c_inline | |
5445 | EOF | |
5446 | ;; | |
5447 | esac | |
5448 | ||
c906108c | 5449 | |
5ee754fc MK |
5450 | # ------------------------------ # |
5451 | # Checks for library functions. # | |
5452 | # ------------------------------ # | |
5453 | ||
46711df8 MK |
5454 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5455 | # for constant arguments. Useless! | |
5456 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
5b5d99cf | 5457 | echo "configure:5458: checking for working alloca.h" >&5 |
46711df8 MK |
5458 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5459 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5460 | else | |
5461 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5462 | #line 5463 "configure" |
46711df8 MK |
5463 | #include "confdefs.h" |
5464 | #include <alloca.h> | |
5465 | int main() { | |
5466 | char *p = alloca(2 * sizeof(int)); | |
5467 | ; return 0; } | |
5468 | EOF | |
5b5d99cf | 5469 | if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5470 | rm -rf conftest* |
5471 | ac_cv_header_alloca_h=yes | |
5472 | else | |
5473 | echo "configure: failed program was:" >&5 | |
5474 | cat conftest.$ac_ext >&5 | |
5475 | rm -rf conftest* | |
5476 | ac_cv_header_alloca_h=no | |
5477 | fi | |
5478 | rm -f conftest* | |
5479 | fi | |
5480 | ||
5481 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5482 | if test $ac_cv_header_alloca_h = yes; then | |
5483 | cat >> confdefs.h <<\EOF | |
5484 | #define HAVE_ALLOCA_H 1 | |
5485 | EOF | |
5486 | ||
5487 | fi | |
5488 | ||
5489 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
5b5d99cf | 5490 | echo "configure:5491: checking for alloca" >&5 |
46711df8 MK |
5491 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5492 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5493 | else | |
5494 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5495 | #line 5496 "configure" |
46711df8 MK |
5496 | #include "confdefs.h" |
5497 | ||
5498 | #ifdef __GNUC__ | |
5499 | # define alloca __builtin_alloca | |
5500 | #else | |
5501 | # ifdef _MSC_VER | |
5502 | # include <malloc.h> | |
5503 | # define alloca _alloca | |
5504 | # else | |
5505 | # if HAVE_ALLOCA_H | |
5506 | # include <alloca.h> | |
5507 | # else | |
5508 | # ifdef _AIX | |
5509 | #pragma alloca | |
5510 | # else | |
5511 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5512 | char *alloca (); | |
5513 | # endif | |
5514 | # endif | |
5515 | # endif | |
5516 | # endif | |
5517 | #endif | |
5518 | ||
5519 | int main() { | |
5520 | char *p = (char *) alloca(1); | |
5521 | ; return 0; } | |
5522 | EOF | |
5b5d99cf | 5523 | if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5524 | rm -rf conftest* |
5525 | ac_cv_func_alloca_works=yes | |
5526 | else | |
5527 | echo "configure: failed program was:" >&5 | |
5528 | cat conftest.$ac_ext >&5 | |
5529 | rm -rf conftest* | |
5530 | ac_cv_func_alloca_works=no | |
5531 | fi | |
5532 | rm -f conftest* | |
5533 | fi | |
5534 | ||
5535 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5536 | if test $ac_cv_func_alloca_works = yes; then | |
5537 | cat >> confdefs.h <<\EOF | |
5538 | #define HAVE_ALLOCA 1 | |
5539 | EOF | |
5540 | ||
5541 | fi | |
5542 | ||
5543 | if test $ac_cv_func_alloca_works = no; then | |
5544 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5545 | # that cause trouble. Some versions do not even contain alloca or | |
5546 | # contain a buggy version. If you still want to use their alloca, | |
5547 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5548 | ALLOCA=alloca.${ac_objext} | |
5549 | cat >> confdefs.h <<\EOF | |
5550 | #define C_ALLOCA 1 | |
5551 | EOF | |
5552 | ||
5553 | ||
5554 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
5b5d99cf | 5555 | echo "configure:5556: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5556 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5558 | else | |
5559 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5560 | #line 5561 "configure" |
46711df8 MK |
5561 | #include "confdefs.h" |
5562 | #if defined(CRAY) && ! defined(CRAY2) | |
5563 | webecray | |
5564 | #else | |
5565 | wenotbecray | |
5566 | #endif | |
5567 | ||
5568 | EOF | |
5569 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5570 | egrep "webecray" >/dev/null 2>&1; then | |
5571 | rm -rf conftest* | |
5572 | ac_cv_os_cray=yes | |
5573 | else | |
5574 | rm -rf conftest* | |
5575 | ac_cv_os_cray=no | |
5576 | fi | |
5577 | rm -f conftest* | |
5578 | ||
5579 | fi | |
5580 | ||
5581 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5582 | if test $ac_cv_os_cray = yes; then | |
5583 | for ac_func in _getb67 GETB67 getb67; do | |
5584 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 5585 | echo "configure:5586: checking for $ac_func" >&5 |
46711df8 MK |
5586 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5587 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5588 | else | |
5589 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5590 | #line 5591 "configure" |
46711df8 MK |
5591 | #include "confdefs.h" |
5592 | /* System header to define __stub macros and hopefully few prototypes, | |
5593 | which can conflict with char $ac_func(); below. */ | |
5594 | #include <assert.h> | |
5595 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5596 | /* We use char because int might match the return type of a gcc2 | |
5597 | builtin and then its argument prototype would still apply. */ | |
5598 | char $ac_func(); | |
5599 | ||
5600 | int main() { | |
5601 | ||
5602 | /* The GNU C library defines this for functions which it implements | |
5603 | to always fail with ENOSYS. Some functions are actually named | |
5604 | something starting with __ and the normal name is an alias. */ | |
5605 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5606 | choke me | |
5607 | #else | |
5608 | $ac_func(); | |
5609 | #endif | |
5610 | ||
5611 | ; return 0; } | |
5612 | EOF | |
5b5d99cf | 5613 | if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5614 | rm -rf conftest* |
5615 | eval "ac_cv_func_$ac_func=yes" | |
5616 | else | |
5617 | echo "configure: failed program was:" >&5 | |
5618 | cat conftest.$ac_ext >&5 | |
5619 | rm -rf conftest* | |
5620 | eval "ac_cv_func_$ac_func=no" | |
5621 | fi | |
5622 | rm -f conftest* | |
5623 | fi | |
5624 | ||
5625 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5626 | echo "$ac_t""yes" 1>&6 | |
5627 | cat >> confdefs.h <<EOF | |
5628 | #define CRAY_STACKSEG_END $ac_func | |
5629 | EOF | |
5630 | ||
5631 | break | |
5632 | else | |
5633 | echo "$ac_t""no" 1>&6 | |
5634 | fi | |
5635 | ||
5636 | done | |
5637 | fi | |
5638 | ||
5639 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
5b5d99cf | 5640 | echo "configure:5641: checking stack direction for C alloca" >&5 |
46711df8 MK |
5641 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5643 | else | |
5644 | if test "$cross_compiling" = yes; then | |
5645 | ac_cv_c_stack_direction=0 | |
5646 | else | |
5647 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5648 | #line 5649 "configure" |
46711df8 MK |
5649 | #include "confdefs.h" |
5650 | find_stack_direction () | |
5651 | { | |
5652 | static char *addr = 0; | |
5653 | auto char dummy; | |
5654 | if (addr == 0) | |
5655 | { | |
5656 | addr = &dummy; | |
5657 | return find_stack_direction (); | |
5658 | } | |
5659 | else | |
5660 | return (&dummy > addr) ? 1 : -1; | |
5661 | } | |
5662 | main () | |
5663 | { | |
5664 | exit (find_stack_direction() < 0); | |
5665 | } | |
5666 | EOF | |
5b5d99cf | 5667 | if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5668 | then |
5669 | ac_cv_c_stack_direction=1 | |
5670 | else | |
5671 | echo "configure: failed program was:" >&5 | |
5672 | cat conftest.$ac_ext >&5 | |
5673 | rm -fr conftest* | |
5674 | ac_cv_c_stack_direction=-1 | |
5675 | fi | |
5676 | rm -fr conftest* | |
5677 | fi | |
5678 | ||
5679 | fi | |
5680 | ||
5681 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5682 | cat >> confdefs.h <<EOF | |
5683 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5684 | EOF | |
5685 | ||
5686 | fi | |
5687 | ||
97bf5e38 MK |
5688 | for ac_hdr in unistd.h |
5689 | do | |
5690 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5691 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5b5d99cf | 5692 | echo "configure:5693: checking for $ac_hdr" >&5 |
74c1b268 AC |
5693 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5694 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5695 | else | |
5696 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5697 | #line 5698 "configure" |
74c1b268 | 5698 | #include "confdefs.h" |
97bf5e38 | 5699 | #include <$ac_hdr> |
74c1b268 AC |
5700 | EOF |
5701 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 5702 | { (eval echo configure:5703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5703 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5704 | if test -z "$ac_err"; then | |
5705 | rm -rf conftest* | |
5706 | eval "ac_cv_header_$ac_safe=yes" | |
5707 | else | |
5708 | echo "$ac_err" >&5 | |
5709 | echo "configure: failed program was:" >&5 | |
5710 | cat conftest.$ac_ext >&5 | |
5711 | rm -rf conftest* | |
5712 | eval "ac_cv_header_$ac_safe=no" | |
5713 | fi | |
5714 | rm -f conftest* | |
5715 | fi | |
5716 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5717 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5718 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5719 | cat >> confdefs.h <<EOF | |
5720 | #define $ac_tr_hdr 1 | |
74c1b268 | 5721 | EOF |
97bf5e38 | 5722 | |
74c1b268 AC |
5723 | else |
5724 | echo "$ac_t""no" 1>&6 | |
5725 | fi | |
97bf5e38 | 5726 | done |
74c1b268 | 5727 | |
97bf5e38 MK |
5728 | for ac_func in getpagesize |
5729 | do | |
5730 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 5731 | echo "configure:5732: checking for $ac_func" >&5 |
97bf5e38 | 5732 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
5733 | echo $ac_n "(cached) $ac_c" 1>&6 |
5734 | else | |
5735 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5736 | #line 5737 "configure" |
74c1b268 AC |
5737 | #include "confdefs.h" |
5738 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5739 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5740 | #include <assert.h> |
5741 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5742 | /* We use char because int might match the return type of a gcc2 | |
5743 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5744 | char $ac_func(); |
74c1b268 AC |
5745 | |
5746 | int main() { | |
5747 | ||
5748 | /* The GNU C library defines this for functions which it implements | |
5749 | to always fail with ENOSYS. Some functions are actually named | |
5750 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5751 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5752 | choke me |
5753 | #else | |
97bf5e38 | 5754 | $ac_func(); |
74c1b268 AC |
5755 | #endif |
5756 | ||
5757 | ; return 0; } | |
5758 | EOF | |
5b5d99cf | 5759 | if { (eval echo configure:5760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5760 | rm -rf conftest* |
97bf5e38 | 5761 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5762 | else |
5763 | echo "configure: failed program was:" >&5 | |
5764 | cat conftest.$ac_ext >&5 | |
5765 | rm -rf conftest* | |
97bf5e38 | 5766 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5767 | fi |
5768 | rm -f conftest* | |
5769 | fi | |
5770 | ||
97bf5e38 | 5771 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5772 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5773 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5774 | cat >> confdefs.h <<EOF | |
5775 | #define $ac_tr_func 1 | |
5776 | EOF | |
5777 | ||
74c1b268 AC |
5778 | else |
5779 | echo "$ac_t""no" 1>&6 | |
5780 | fi | |
97bf5e38 | 5781 | done |
74c1b268 | 5782 | |
97bf5e38 | 5783 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
5b5d99cf | 5784 | echo "configure:5785: checking for working mmap" >&5 |
97bf5e38 MK |
5785 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5786 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5787 | else | |
5788 | if test "$cross_compiling" = yes; then | |
5789 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5790 | else |
5791 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5792 | #line 5793 "configure" |
74c1b268 | 5793 | #include "confdefs.h" |
97bf5e38 MK |
5794 | |
5795 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5796 | Here is a matrix of mmap possibilities: | |
5797 | mmap private not fixed | |
5798 | mmap private fixed at somewhere currently unmapped | |
5799 | mmap private fixed at somewhere already mapped | |
5800 | mmap shared not fixed | |
5801 | mmap shared fixed at somewhere currently unmapped | |
5802 | mmap shared fixed at somewhere already mapped | |
5803 | For private mappings, we should verify that changes cannot be read() | |
5804 | back from the file, nor mmap's back from the file at a different | |
5805 | address. (There have been systems where private was not correctly | |
5806 | implemented like the infamous i386 svr4.0, and systems where the | |
5807 | VM page cache was not coherent with the filesystem buffer cache | |
5808 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5809 | For shared mappings, we should conversely verify that changes get | |
5810 | propogated back to all the places they're supposed to be. | |
5811 | ||
5812 | Grep wants private fixed already mapped. | |
5813 | The main things grep needs to know about mmap are: | |
5814 | * does it exist and is it safe to write into the mmap'd area | |
5815 | * how to use it (BSD variants) */ | |
74c1b268 | 5816 | #include <sys/types.h> |
97bf5e38 MK |
5817 | #include <fcntl.h> |
5818 | #include <sys/mman.h> | |
5819 | ||
5820 | /* This mess was copied from the GNU getpagesize.h. */ | |
5821 | #ifndef HAVE_GETPAGESIZE | |
5822 | # ifdef HAVE_UNISTD_H | |
5823 | # include <unistd.h> | |
5824 | # endif | |
5825 | ||
5826 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5827 | # ifndef HAVE_SYS_PARAM_H | |
5828 | # define HAVE_SYS_PARAM_H 1 | |
5829 | # endif | |
5830 | ||
5831 | # ifdef _SC_PAGESIZE | |
5832 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5833 | # else /* no _SC_PAGESIZE */ | |
5834 | # ifdef HAVE_SYS_PARAM_H | |
5835 | # include <sys/param.h> | |
5836 | # ifdef EXEC_PAGESIZE | |
5837 | # define getpagesize() EXEC_PAGESIZE | |
5838 | # else /* no EXEC_PAGESIZE */ | |
5839 | # ifdef NBPG | |
5840 | # define getpagesize() NBPG * CLSIZE | |
5841 | # ifndef CLSIZE | |
5842 | # define CLSIZE 1 | |
5843 | # endif /* no CLSIZE */ | |
5844 | # else /* no NBPG */ | |
5845 | # ifdef NBPC | |
5846 | # define getpagesize() NBPC | |
5847 | # else /* no NBPC */ | |
5848 | # ifdef PAGESIZE | |
5849 | # define getpagesize() PAGESIZE | |
5850 | # endif /* PAGESIZE */ | |
5851 | # endif /* no NBPC */ | |
5852 | # endif /* no NBPG */ | |
5853 | # endif /* no EXEC_PAGESIZE */ | |
5854 | # else /* no HAVE_SYS_PARAM_H */ | |
5855 | # define getpagesize() 8192 /* punt totally */ | |
5856 | # endif /* no HAVE_SYS_PARAM_H */ | |
5857 | # endif /* no _SC_PAGESIZE */ | |
5858 | ||
5859 | #endif /* no HAVE_GETPAGESIZE */ | |
5860 | ||
74c1b268 | 5861 | #ifdef __cplusplus |
97bf5e38 | 5862 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5863 | #else |
97bf5e38 | 5864 | char *malloc(); |
74c1b268 | 5865 | #endif |
74c1b268 | 5866 | |
97bf5e38 MK |
5867 | int |
5868 | main() | |
5869 | { | |
5870 | char *data, *data2, *data3; | |
5871 | int i, pagesize; | |
5872 | int fd; | |
74c1b268 | 5873 | |
97bf5e38 | 5874 | pagesize = getpagesize(); |
74c1b268 | 5875 | |
97bf5e38 MK |
5876 | /* |
5877 | * First, make a file with some known garbage in it. | |
5878 | */ | |
5879 | data = malloc(pagesize); | |
5880 | if (!data) | |
5881 | exit(1); | |
5882 | for (i = 0; i < pagesize; ++i) | |
5883 | *(data + i) = rand(); | |
5884 | umask(0); | |
5885 | fd = creat("conftestmmap", 0600); | |
5886 | if (fd < 0) | |
5887 | exit(1); | |
5888 | if (write(fd, data, pagesize) != pagesize) | |
5889 | exit(1); | |
5890 | close(fd); | |
74c1b268 | 5891 | |
97bf5e38 MK |
5892 | /* |
5893 | * Next, try to mmap the file at a fixed address which | |
5894 | * already has something else allocated at it. If we can, | |
5895 | * also make sure that we see the same garbage. | |
5896 | */ | |
5897 | fd = open("conftestmmap", O_RDWR); | |
5898 | if (fd < 0) | |
5899 | exit(1); | |
5900 | data2 = malloc(2 * pagesize); | |
5901 | if (!data2) | |
5902 | exit(1); | |
5903 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5904 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5905 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5906 | exit(1); | |
5907 | for (i = 0; i < pagesize; ++i) | |
5908 | if (*(data + i) != *(data2 + i)) | |
5909 | exit(1); | |
74c1b268 | 5910 | |
97bf5e38 MK |
5911 | /* |
5912 | * Finally, make sure that changes to the mapped area | |
5913 | * do not percolate back to the file as seen by read(). | |
5914 | * (This is a bug on some variants of i386 svr4.0.) | |
5915 | */ | |
5916 | for (i = 0; i < pagesize; ++i) | |
5917 | *(data2 + i) = *(data2 + i) + 1; | |
5918 | data3 = malloc(pagesize); | |
5919 | if (!data3) | |
5920 | exit(1); | |
5921 | if (read(fd, data3, pagesize) != pagesize) | |
5922 | exit(1); | |
5923 | for (i = 0; i < pagesize; ++i) | |
5924 | if (*(data + i) != *(data3 + i)) | |
5925 | exit(1); | |
5926 | close(fd); | |
5927 | unlink("conftestmmap"); | |
5928 | exit(0); | |
74c1b268 | 5929 | } |
97bf5e38 | 5930 | |
74c1b268 | 5931 | EOF |
5b5d99cf | 5932 | if { (eval echo configure:5933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 5933 | then |
97bf5e38 | 5934 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
5935 | else |
5936 | echo "configure: failed program was:" >&5 | |
5937 | cat conftest.$ac_ext >&5 | |
5938 | rm -fr conftest* | |
97bf5e38 | 5939 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
5940 | fi |
5941 | rm -fr conftest* | |
5942 | fi | |
5943 | ||
5944 | fi | |
5945 | ||
97bf5e38 MK |
5946 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
5947 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 5948 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5949 | #define HAVE_MMAP 1 |
74c1b268 AC |
5950 | EOF |
5951 | ||
5952 | fi | |
5953 | ||
97bf5e38 | 5954 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
5b5d99cf | 5955 | echo "configure:5956: checking for pid_t" >&5 |
97bf5e38 | 5956 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 5957 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
5958 | else |
5959 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5960 | #line 5961 "configure" |
0200359f | 5961 | #include "confdefs.h" |
97bf5e38 MK |
5962 | #include <sys/types.h> |
5963 | #if STDC_HEADERS | |
5964 | #include <stdlib.h> | |
5965 | #include <stddef.h> | |
0200359f | 5966 | #endif |
0200359f | 5967 | EOF |
97bf5e38 MK |
5968 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5969 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5970 | rm -rf conftest* | |
5971 | ac_cv_type_pid_t=yes | |
0200359f | 5972 | else |
97bf5e38 MK |
5973 | rm -rf conftest* |
5974 | ac_cv_type_pid_t=no | |
0200359f | 5975 | fi |
97bf5e38 | 5976 | rm -f conftest* |
0200359f MK |
5977 | |
5978 | fi | |
97bf5e38 MK |
5979 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
5980 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 5981 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5982 | #define pid_t int |
0200359f MK |
5983 | EOF |
5984 | ||
5985 | fi | |
5986 | ||
97bf5e38 MK |
5987 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
5988 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
5b5d99cf | 5989 | echo "configure:5990: checking for vfork.h" >&5 |
97bf5e38 | 5990 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
5991 | echo $ac_n "(cached) $ac_c" 1>&6 |
5992 | else | |
5993 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 5994 | #line 5995 "configure" |
72473524 | 5995 | #include "confdefs.h" |
97bf5e38 | 5996 | #include <vfork.h> |
72473524 | 5997 | EOF |
97bf5e38 | 5998 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5b5d99cf | 5999 | { (eval echo configure:6000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6000 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6001 | if test -z "$ac_err"; then | |
72473524 | 6002 | rm -rf conftest* |
97bf5e38 | 6003 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6004 | else |
97bf5e38 | 6005 | echo "$ac_err" >&5 |
72473524 DJ |
6006 | echo "configure: failed program was:" >&5 |
6007 | cat conftest.$ac_ext >&5 | |
6008 | rm -rf conftest* | |
97bf5e38 | 6009 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6010 | fi |
6011 | rm -f conftest* | |
6012 | fi | |
97bf5e38 MK |
6013 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6014 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6015 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6016 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6017 | EOF |
6018 | ||
97bf5e38 MK |
6019 | else |
6020 | echo "$ac_t""no" 1>&6 | |
72473524 | 6021 | fi |
c906108c | 6022 | |
97bf5e38 | 6023 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
5b5d99cf | 6024 | echo "configure:6025: checking for working vfork" >&5 |
97bf5e38 MK |
6025 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6027 | else | |
6028 | if test "$cross_compiling" = yes; then | |
6029 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
5b5d99cf | 6030 | echo "configure:6031: checking for vfork" >&5 |
97bf5e38 | 6031 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6032 | echo $ac_n "(cached) $ac_c" 1>&6 |
6033 | else | |
6034 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6035 | #line 6036 "configure" |
2b2d558c | 6036 | #include "confdefs.h" |
97bf5e38 MK |
6037 | /* System header to define __stub macros and hopefully few prototypes, |
6038 | which can conflict with char vfork(); below. */ | |
6039 | #include <assert.h> | |
6040 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6041 | /* We use char because int might match the return type of a gcc2 | |
6042 | builtin and then its argument prototype would still apply. */ | |
6043 | char vfork(); | |
2b2d558c MK |
6044 | |
6045 | int main() { | |
97bf5e38 MK |
6046 | |
6047 | /* The GNU C library defines this for functions which it implements | |
6048 | to always fail with ENOSYS. Some functions are actually named | |
6049 | something starting with __ and the normal name is an alias. */ | |
6050 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6051 | choke me | |
6052 | #else | |
6053 | vfork(); | |
6054 | #endif | |
6055 | ||
2b2d558c MK |
6056 | ; return 0; } |
6057 | EOF | |
5b5d99cf | 6058 | if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6059 | rm -rf conftest* |
97bf5e38 | 6060 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6061 | else |
6062 | echo "configure: failed program was:" >&5 | |
6063 | cat conftest.$ac_ext >&5 | |
6064 | rm -rf conftest* | |
97bf5e38 | 6065 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6066 | fi |
6067 | rm -f conftest* | |
6068 | fi | |
6069 | ||
97bf5e38 MK |
6070 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6071 | echo "$ac_t""yes" 1>&6 | |
6072 | : | |
6073 | else | |
6074 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6075 | fi |
6076 | ||
97bf5e38 | 6077 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6078 | else |
6079 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6080 | #line 6081 "configure" |
7dfa765c | 6081 | #include "confdefs.h" |
97bf5e38 MK |
6082 | /* Thanks to Paul Eggert for this test. */ |
6083 | #include <stdio.h> | |
6084 | #include <sys/types.h> | |
6085 | #include <sys/stat.h> | |
6086 | #ifdef HAVE_UNISTD_H | |
6087 | #include <unistd.h> | |
6088 | #endif | |
6089 | #ifdef HAVE_VFORK_H | |
6090 | #include <vfork.h> | |
6091 | #endif | |
6092 | /* On some sparc systems, changes by the child to local and incoming | |
6093 | argument registers are propagated back to the parent. | |
6094 | The compiler is told about this with #include <vfork.h>, | |
6095 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6096 | Test for this by using a static variable whose address | |
6097 | is put into a register that is clobbered by the vfork. */ | |
6098 | static | |
6099 | #ifdef __cplusplus | |
6100 | sparc_address_test (int arg) | |
6101 | #else | |
6102 | sparc_address_test (arg) int arg; | |
6103 | #endif | |
6104 | { | |
6105 | static pid_t child; | |
6106 | if (!child) { | |
6107 | child = vfork (); | |
6108 | if (child < 0) { | |
6109 | perror ("vfork"); | |
6110 | _exit(2); | |
6111 | } | |
6112 | if (!child) { | |
6113 | arg = getpid(); | |
6114 | write(-1, "", 0); | |
6115 | _exit (arg); | |
6116 | } | |
6117 | } | |
6118 | } | |
6119 | main() { | |
6120 | pid_t parent = getpid (); | |
6121 | pid_t child; | |
7dfa765c | 6122 | |
97bf5e38 | 6123 | sparc_address_test (); |
7dfa765c | 6124 | |
97bf5e38 | 6125 | child = vfork (); |
7dfa765c | 6126 | |
97bf5e38 MK |
6127 | if (child == 0) { |
6128 | /* Here is another test for sparc vfork register problems. | |
6129 | This test uses lots of local variables, at least | |
6130 | as many local variables as main has allocated so far | |
6131 | including compiler temporaries. 4 locals are enough for | |
6132 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6133 | A buggy compiler should reuse the register of parent | |
6134 | for one of the local variables, since it will think that | |
6135 | parent can't possibly be used any more in this routine. | |
6136 | Assigning to the local variable will thus munge parent | |
6137 | in the parent process. */ | |
6138 | pid_t | |
6139 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6140 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6141 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6142 | use the same hardware register for all 8 local variables. */ | |
6143 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6144 | || p != p5 || p != p6 || p != p7) | |
6145 | _exit(1); | |
7dfa765c | 6146 | |
97bf5e38 MK |
6147 | /* On some systems (e.g. IRIX 3.3), |
6148 | vfork doesn't separate parent from child file descriptors. | |
6149 | If the child closes a descriptor before it execs or exits, | |
6150 | this munges the parent's descriptor as well. | |
6151 | Test for this by closing stdout in the child. */ | |
6152 | _exit(close(fileno(stdout)) != 0); | |
6153 | } else { | |
6154 | int status; | |
6155 | struct stat st; | |
64bb1671 | 6156 | |
97bf5e38 MK |
6157 | while (wait(&status) != child) |
6158 | ; | |
6159 | exit( | |
6160 | /* Was there some problem with vforking? */ | |
6161 | child < 0 | |
64bb1671 | 6162 | |
97bf5e38 MK |
6163 | /* Did the child fail? (This shouldn't happen.) */ |
6164 | || status | |
64bb1671 | 6165 | |
97bf5e38 MK |
6166 | /* Did the vfork/compiler bug occur? */ |
6167 | || parent != getpid() | |
6168 | ||
6169 | /* Did the file descriptor bug occur? */ | |
6170 | || fstat(fileno(stdout), &st) != 0 | |
6171 | ); | |
6172 | } | |
6173 | } | |
5c44784c | 6174 | EOF |
5b5d99cf | 6175 | if { (eval echo configure:6176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6176 | then |
6177 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6178 | else |
6179 | echo "configure: failed program was:" >&5 | |
6180 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6181 | rm -fr conftest* |
6182 | ac_cv_func_vfork_works=no | |
5c44784c | 6183 | fi |
97bf5e38 | 6184 | rm -fr conftest* |
5c44784c JM |
6185 | fi |
6186 | ||
0afdd437 MK |
6187 | fi |
6188 | ||
97bf5e38 MK |
6189 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6190 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6191 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6192 | #define vfork fork |
0afdd437 MK |
6193 | EOF |
6194 | ||
6195 | fi | |
6196 | ||
97bf5e38 MK |
6197 | for ac_func in canonicalize_file_name realpath |
6198 | do | |
6199 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 6200 | echo "configure:6201: checking for $ac_func" >&5 |
97bf5e38 | 6201 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6202 | echo $ac_n "(cached) $ac_c" 1>&6 |
6203 | else | |
6204 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6205 | #line 6206 "configure" |
7e89e357 | 6206 | #include "confdefs.h" |
97bf5e38 MK |
6207 | /* System header to define __stub macros and hopefully few prototypes, |
6208 | which can conflict with char $ac_func(); below. */ | |
6209 | #include <assert.h> | |
6210 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6211 | /* We use char because int might match the return type of a gcc2 | |
6212 | builtin and then its argument prototype would still apply. */ | |
6213 | char $ac_func(); | |
6214 | ||
7e89e357 | 6215 | int main() { |
97bf5e38 MK |
6216 | |
6217 | /* The GNU C library defines this for functions which it implements | |
6218 | to always fail with ENOSYS. Some functions are actually named | |
6219 | something starting with __ and the normal name is an alias. */ | |
6220 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6221 | choke me | |
6222 | #else | |
6223 | $ac_func(); | |
6224 | #endif | |
6225 | ||
7e89e357 JT |
6226 | ; return 0; } |
6227 | EOF | |
5b5d99cf | 6228 | if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6229 | rm -rf conftest* |
97bf5e38 | 6230 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6231 | else |
6232 | echo "configure: failed program was:" >&5 | |
6233 | cat conftest.$ac_ext >&5 | |
6234 | rm -rf conftest* | |
97bf5e38 | 6235 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6236 | fi |
6237 | rm -f conftest* | |
6238 | fi | |
6239 | ||
97bf5e38 MK |
6240 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6241 | echo "$ac_t""yes" 1>&6 | |
6242 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6243 | cat >> confdefs.h <<EOF | |
6244 | #define $ac_tr_func 1 | |
7e89e357 | 6245 | EOF |
97bf5e38 MK |
6246 | |
6247 | else | |
6248 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6249 | fi |
97bf5e38 | 6250 | done |
7e89e357 | 6251 | |
97bf5e38 | 6252 | for ac_func in poll |
7be570e7 JM |
6253 | do |
6254 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 6255 | echo "configure:6256: checking for $ac_func" >&5 |
7be570e7 JM |
6256 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6257 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6258 | else | |
6259 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6260 | #line 6261 "configure" |
7be570e7 JM |
6261 | #include "confdefs.h" |
6262 | /* System header to define __stub macros and hopefully few prototypes, | |
6263 | which can conflict with char $ac_func(); below. */ | |
6264 | #include <assert.h> | |
6265 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6266 | /* We use char because int might match the return type of a gcc2 | |
6267 | builtin and then its argument prototype would still apply. */ | |
6268 | char $ac_func(); | |
6269 | ||
6270 | int main() { | |
6271 | ||
6272 | /* The GNU C library defines this for functions which it implements | |
6273 | to always fail with ENOSYS. Some functions are actually named | |
6274 | something starting with __ and the normal name is an alias. */ | |
6275 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6276 | choke me | |
6277 | #else | |
6278 | $ac_func(); | |
6279 | #endif | |
6280 | ||
6281 | ; return 0; } | |
6282 | EOF | |
5b5d99cf | 6283 | if { (eval echo configure:6284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6284 | rm -rf conftest* |
6285 | eval "ac_cv_func_$ac_func=yes" | |
6286 | else | |
6287 | echo "configure: failed program was:" >&5 | |
6288 | cat conftest.$ac_ext >&5 | |
6289 | rm -rf conftest* | |
6290 | eval "ac_cv_func_$ac_func=no" | |
6291 | fi | |
6292 | rm -f conftest* | |
6293 | fi | |
6294 | ||
6295 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6296 | echo "$ac_t""yes" 1>&6 | |
6297 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6298 | cat >> confdefs.h <<EOF | |
6299 | #define $ac_tr_func 1 | |
6300 | EOF | |
6301 | ||
6302 | else | |
6303 | echo "$ac_t""no" 1>&6 | |
6304 | fi | |
6305 | done | |
6306 | ||
6307 | for ac_func in pread64 | |
6308 | do | |
6309 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 6310 | echo "configure:6311: checking for $ac_func" >&5 |
14abd0fb MK |
6311 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6312 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6313 | else | |
6314 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6315 | #line 6316 "configure" |
14abd0fb MK |
6316 | #include "confdefs.h" |
6317 | /* System header to define __stub macros and hopefully few prototypes, | |
6318 | which can conflict with char $ac_func(); below. */ | |
6319 | #include <assert.h> | |
6320 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6321 | /* We use char because int might match the return type of a gcc2 | |
6322 | builtin and then its argument prototype would still apply. */ | |
6323 | char $ac_func(); | |
6324 | ||
6325 | int main() { | |
6326 | ||
6327 | /* The GNU C library defines this for functions which it implements | |
6328 | to always fail with ENOSYS. Some functions are actually named | |
6329 | something starting with __ and the normal name is an alias. */ | |
6330 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6331 | choke me | |
6332 | #else | |
6333 | $ac_func(); | |
6334 | #endif | |
6335 | ||
6336 | ; return 0; } | |
6337 | EOF | |
5b5d99cf | 6338 | if { (eval echo configure:6339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6339 | rm -rf conftest* |
6340 | eval "ac_cv_func_$ac_func=yes" | |
6341 | else | |
6342 | echo "configure: failed program was:" >&5 | |
6343 | cat conftest.$ac_ext >&5 | |
6344 | rm -rf conftest* | |
6345 | eval "ac_cv_func_$ac_func=no" | |
6346 | fi | |
6347 | rm -f conftest* | |
6348 | fi | |
6349 | ||
6350 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6351 | echo "$ac_t""yes" 1>&6 | |
6352 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6353 | cat >> confdefs.h <<EOF | |
6354 | #define $ac_tr_func 1 | |
6355 | EOF | |
6356 | ||
6357 | else | |
6358 | echo "$ac_t""no" 1>&6 | |
6359 | fi | |
6360 | done | |
6361 | ||
97bf5e38 MK |
6362 | for ac_func in sbrk |
6363 | do | |
6364 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 6365 | echo "configure:6366: checking for $ac_func" >&5 |
97bf5e38 | 6366 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6367 | echo $ac_n "(cached) $ac_c" 1>&6 |
6368 | else | |
6369 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6370 | #line 6371 "configure" |
c906108c | 6371 | #include "confdefs.h" |
97bf5e38 MK |
6372 | /* System header to define __stub macros and hopefully few prototypes, |
6373 | which can conflict with char $ac_func(); below. */ | |
6374 | #include <assert.h> | |
6375 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6376 | /* We use char because int might match the return type of a gcc2 | |
6377 | builtin and then its argument prototype would still apply. */ | |
6378 | char $ac_func(); | |
c906108c | 6379 | |
97bf5e38 MK |
6380 | int main() { |
6381 | ||
6382 | /* The GNU C library defines this for functions which it implements | |
6383 | to always fail with ENOSYS. Some functions are actually named | |
6384 | something starting with __ and the normal name is an alias. */ | |
6385 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6386 | choke me | |
c906108c | 6387 | #else |
97bf5e38 | 6388 | $ac_func(); |
c906108c | 6389 | #endif |
97bf5e38 | 6390 | |
c906108c SS |
6391 | ; return 0; } |
6392 | EOF | |
5b5d99cf | 6393 | if { (eval echo configure:6394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6394 | rm -rf conftest* |
97bf5e38 | 6395 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6396 | else |
6397 | echo "configure: failed program was:" >&5 | |
6398 | cat conftest.$ac_ext >&5 | |
6399 | rm -rf conftest* | |
97bf5e38 | 6400 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6401 | fi |
6402 | rm -f conftest* | |
6403 | fi | |
6404 | ||
97bf5e38 MK |
6405 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6406 | echo "$ac_t""yes" 1>&6 | |
6407 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6408 | cat >> confdefs.h <<EOF | |
6409 | #define $ac_tr_func 1 | |
c906108c | 6410 | EOF |
97bf5e38 MK |
6411 | |
6412 | else | |
6413 | echo "$ac_t""no" 1>&6 | |
c906108c | 6414 | fi |
97bf5e38 | 6415 | done |
c906108c | 6416 | |
97bf5e38 MK |
6417 | for ac_func in setpgid setpgrp |
6418 | do | |
6419 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 6420 | echo "configure:6421: checking for $ac_func" >&5 |
97bf5e38 | 6421 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6422 | echo $ac_n "(cached) $ac_c" 1>&6 |
6423 | else | |
6424 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6425 | #line 6426 "configure" |
c906108c | 6426 | #include "confdefs.h" |
97bf5e38 MK |
6427 | /* System header to define __stub macros and hopefully few prototypes, |
6428 | which can conflict with char $ac_func(); below. */ | |
6429 | #include <assert.h> | |
6430 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6431 | /* We use char because int might match the return type of a gcc2 | |
6432 | builtin and then its argument prototype would still apply. */ | |
6433 | char $ac_func(); | |
c906108c | 6434 | |
97bf5e38 MK |
6435 | int main() { |
6436 | ||
6437 | /* The GNU C library defines this for functions which it implements | |
6438 | to always fail with ENOSYS. Some functions are actually named | |
6439 | something starting with __ and the normal name is an alias. */ | |
6440 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6441 | choke me | |
c906108c | 6442 | #else |
97bf5e38 | 6443 | $ac_func(); |
c906108c | 6444 | #endif |
97bf5e38 | 6445 | |
c906108c SS |
6446 | ; return 0; } |
6447 | EOF | |
5b5d99cf | 6448 | if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6449 | rm -rf conftest* |
97bf5e38 | 6450 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6451 | else |
6452 | echo "configure: failed program was:" >&5 | |
6453 | cat conftest.$ac_ext >&5 | |
6454 | rm -rf conftest* | |
97bf5e38 | 6455 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6456 | fi |
6457 | rm -f conftest* | |
6458 | fi | |
6459 | ||
97bf5e38 MK |
6460 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6461 | echo "$ac_t""yes" 1>&6 | |
6462 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6463 | cat >> confdefs.h <<EOF | |
6464 | #define $ac_tr_func 1 | |
c906108c | 6465 | EOF |
97bf5e38 MK |
6466 | |
6467 | else | |
6468 | echo "$ac_t""no" 1>&6 | |
c906108c | 6469 | fi |
97bf5e38 | 6470 | done |
c906108c | 6471 | |
e1ea1d75 | 6472 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6473 | do |
6474 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 6475 | echo "configure:6476: checking for $ac_func" >&5 |
97bf5e38 | 6476 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6477 | echo $ac_n "(cached) $ac_c" 1>&6 |
6478 | else | |
6479 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6480 | #line 6481 "configure" |
c906108c | 6481 | #include "confdefs.h" |
97bf5e38 MK |
6482 | /* System header to define __stub macros and hopefully few prototypes, |
6483 | which can conflict with char $ac_func(); below. */ | |
6484 | #include <assert.h> | |
6485 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6486 | /* We use char because int might match the return type of a gcc2 | |
6487 | builtin and then its argument prototype would still apply. */ | |
6488 | char $ac_func(); | |
c906108c | 6489 | |
97bf5e38 MK |
6490 | int main() { |
6491 | ||
6492 | /* The GNU C library defines this for functions which it implements | |
6493 | to always fail with ENOSYS. Some functions are actually named | |
6494 | something starting with __ and the normal name is an alias. */ | |
6495 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6496 | choke me | |
c906108c | 6497 | #else |
97bf5e38 | 6498 | $ac_func(); |
c906108c | 6499 | #endif |
97bf5e38 | 6500 | |
c906108c SS |
6501 | ; return 0; } |
6502 | EOF | |
5b5d99cf | 6503 | if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6504 | rm -rf conftest* |
97bf5e38 | 6505 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6506 | else |
6507 | echo "configure: failed program was:" >&5 | |
6508 | cat conftest.$ac_ext >&5 | |
6509 | rm -rf conftest* | |
97bf5e38 | 6510 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6511 | fi |
6512 | rm -f conftest* | |
6513 | fi | |
6514 | ||
97bf5e38 MK |
6515 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6516 | echo "$ac_t""yes" 1>&6 | |
6517 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6518 | cat >> confdefs.h <<EOF | |
6519 | #define $ac_tr_func 1 | |
c906108c | 6520 | EOF |
e1ea1d75 | 6521 | |
97bf5e38 MK |
6522 | else |
6523 | echo "$ac_t""no" 1>&6 | |
c906108c | 6524 | fi |
97bf5e38 | 6525 | done |
c906108c | 6526 | |
97bf5e38 MK |
6527 | for ac_func in socketpair |
6528 | do | |
6529 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5b5d99cf | 6530 | echo "configure:6531: checking for $ac_func" >&5 |
97bf5e38 | 6531 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6532 | echo $ac_n "(cached) $ac_c" 1>&6 |
6533 | else | |
6534 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6535 | #line 6536 "configure" |
c906108c | 6536 | #include "confdefs.h" |
97bf5e38 MK |
6537 | /* System header to define __stub macros and hopefully few prototypes, |
6538 | which can conflict with char $ac_func(); below. */ | |
6539 | #include <assert.h> | |
6540 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6541 | /* We use char because int might match the return type of a gcc2 | |
6542 | builtin and then its argument prototype would still apply. */ | |
6543 | char $ac_func(); | |
c906108c | 6544 | |
97bf5e38 MK |
6545 | int main() { |
6546 | ||
6547 | /* The GNU C library defines this for functions which it implements | |
6548 | to always fail with ENOSYS. Some functions are actually named | |
6549 | something starting with __ and the normal name is an alias. */ | |
6550 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6551 | choke me | |
c906108c | 6552 | #else |
97bf5e38 | 6553 | $ac_func(); |
c906108c | 6554 | #endif |
97bf5e38 | 6555 | |
c906108c SS |
6556 | ; return 0; } |
6557 | EOF | |
5b5d99cf | 6558 | if { (eval echo configure:6559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6559 | rm -rf conftest* |
97bf5e38 | 6560 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6561 | else |
6562 | echo "configure: failed program was:" >&5 | |
6563 | cat conftest.$ac_ext >&5 | |
6564 | rm -rf conftest* | |
97bf5e38 | 6565 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6566 | fi |
6567 | rm -f conftest* | |
6568 | fi | |
6569 | ||
97bf5e38 MK |
6570 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6571 | echo "$ac_t""yes" 1>&6 | |
6572 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6573 | cat >> confdefs.h <<EOF | |
6574 | #define $ac_tr_func 1 | |
c906108c | 6575 | EOF |
97bf5e38 MK |
6576 | |
6577 | else | |
6578 | echo "$ac_t""no" 1>&6 | |
c906108c | 6579 | fi |
97bf5e38 | 6580 | done |
c906108c | 6581 | |
97bf5e38 MK |
6582 | |
6583 | if test "$cross_compiling" = no; then | |
6584 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
5b5d99cf | 6585 | echo "configure:6586: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6586 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6587 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6588 | else |
6589 | if test "$cross_compiling" = yes; then | |
6590 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6591 | else |
6592 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6593 | #line 6594 "configure" |
c906108c SS |
6594 | #include "confdefs.h" |
6595 | ||
c906108c SS |
6596 | #ifdef HAVE_UNISTD_H |
6597 | #include <unistd.h> | |
6598 | #endif | |
97bf5e38 MK |
6599 | |
6600 | /* | |
6601 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6602 | * successfully. | |
6603 | */ | |
6604 | main() | |
6605 | { | |
6606 | if (setpgrp(1,1) == -1) | |
6607 | exit(0); | |
6608 | else | |
6609 | exit(1); | |
6610 | } | |
6611 | ||
c906108c | 6612 | EOF |
5b5d99cf | 6613 | if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6614 | then |
6615 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6616 | else |
6617 | echo "configure: failed program was:" >&5 | |
6618 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6619 | rm -fr conftest* |
6620 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6621 | fi |
97bf5e38 | 6622 | rm -fr conftest* |
c906108c SS |
6623 | fi |
6624 | ||
97bf5e38 MK |
6625 | |
6626 | fi | |
6627 | ||
6628 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6629 | if test $ac_cv_func_setpgrp_void = yes; then | |
6630 | cat >> confdefs.h <<\EOF | |
6631 | #define SETPGRP_VOID 1 | |
c906108c SS |
6632 | EOF |
6633 | ||
6634 | fi | |
6635 | ||
97bf5e38 MK |
6636 | else |
6637 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
5b5d99cf | 6638 | echo "configure:6639: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6639 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
6640 | echo $ac_n "(cached) $ac_c" 1>&6 |
6641 | else | |
6642 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6643 | #line 6644 "configure" |
b83266a0 SS |
6644 | #include "confdefs.h" |
6645 | ||
b83266a0 | 6646 | #include <unistd.h> |
97bf5e38 | 6647 | |
b83266a0 | 6648 | int main() { |
97bf5e38 MK |
6649 | |
6650 | if (setpgrp(1,1) == -1) | |
6651 | exit (0); | |
6652 | else | |
6653 | exit (1); | |
6654 | ||
b83266a0 SS |
6655 | ; return 0; } |
6656 | EOF | |
5b5d99cf | 6657 | if { (eval echo configure:6658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6658 | rm -rf conftest* |
97bf5e38 | 6659 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6660 | else |
6661 | echo "configure: failed program was:" >&5 | |
6662 | cat conftest.$ac_ext >&5 | |
6663 | rm -rf conftest* | |
97bf5e38 | 6664 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6665 | fi |
6666 | rm -f conftest* | |
6667 | fi | |
6668 | ||
97bf5e38 MK |
6669 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6670 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6671 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6672 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6673 | EOF |
6674 | ||
97bf5e38 | 6675 | fi |
b83266a0 SS |
6676 | fi |
6677 | ||
97bf5e38 MK |
6678 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6679 | # since sigsetjmp might only be defined as a macro. | |
6680 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
5b5d99cf | 6681 | echo "configure:6682: checking for sigsetjmp" >&5 |
97bf5e38 | 6682 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
6683 | echo $ac_n "(cached) $ac_c" 1>&6 |
6684 | else | |
6685 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6686 | #line 6687 "configure" |
a4db0f07 RH |
6687 | #include "confdefs.h" |
6688 | ||
97bf5e38 MK |
6689 | #include <setjmp.h> |
6690 | ||
a4db0f07 | 6691 | int main() { |
97bf5e38 | 6692 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6693 | ; return 0; } |
6694 | EOF | |
5b5d99cf | 6695 | if { (eval echo configure:6696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6696 | rm -rf conftest* |
97bf5e38 | 6697 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6698 | else |
6699 | echo "configure: failed program was:" >&5 | |
6700 | cat conftest.$ac_ext >&5 | |
6701 | rm -rf conftest* | |
97bf5e38 | 6702 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6703 | fi |
6704 | rm -f conftest* | |
6705 | fi | |
6706 | ||
97bf5e38 MK |
6707 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6708 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6709 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6710 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6711 | EOF |
6712 | ||
6713 | fi | |
c906108c | 6714 | |
06825bd1 MK |
6715 | # Assume we'll default to using the included libiberty regex. |
6716 | gdb_use_included_regex=yes | |
6717 | ||
6718 | # However, if the system regex is GNU regex, then default to *not* | |
6719 | # using the included regex. | |
6720 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
5b5d99cf | 6721 | echo "configure:6722: checking for GNU regex" >&5 |
06825bd1 MK |
6722 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6723 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6724 | else | |
6725 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6726 | #line 6727 "configure" |
06825bd1 MK |
6727 | #include "confdefs.h" |
6728 | #include <gnu-versions.h> | |
6729 | int main() { | |
6730 | #define REGEX_INTERFACE_VERSION 1 | |
6731 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
6732 | # error "Version mismatch" | |
6733 | #endif | |
6734 | ; return 0; } | |
6735 | EOF | |
5b5d99cf | 6736 | if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
6737 | rm -rf conftest* |
6738 | gdb_cv_have_gnu_regex=yes | |
6739 | else | |
6740 | echo "configure: failed program was:" >&5 | |
6741 | cat conftest.$ac_ext >&5 | |
6742 | rm -rf conftest* | |
6743 | gdb_cv_have_gnu_regex=no | |
6744 | fi | |
6745 | rm -f conftest* | |
6746 | fi | |
6747 | ||
6748 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
6749 | if test $gdb_cv_have_gnu_regex = yes; then | |
6750 | gdb_use_included_regex=no | |
6751 | fi | |
6752 | ||
6753 | # Check whether --with-included-regex or --without-included-regex was given. | |
6754 | if test "${with_included_regex+set}" = set; then | |
6755 | withval="$with_included_regex" | |
6756 | gdb_with_regex=$withval | |
6757 | else | |
6758 | gdb_with_regex=$gdb_use_included_regex | |
6759 | fi | |
6760 | ||
6761 | if test "$gdb_with_regex" = yes; then | |
6762 | cat >> confdefs.h <<\EOF | |
6763 | #define USE_INCLUDED_REGEX 1 | |
6764 | EOF | |
6765 | ||
6766 | fi | |
6767 | ||
97bf5e38 MK |
6768 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6769 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6770 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
5b5d99cf | 6771 | echo "configure:6772: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
6772 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
6773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6774 | else | |
6775 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6776 | #line 6777 "configure" |
c906108c | 6777 | #include "confdefs.h" |
97bf5e38 MK |
6778 | #include <machine/reg.h> |
6779 | int main() { | |
6780 | struct reg r; r.r_fs; | |
6781 | ; return 0; } | |
c906108c | 6782 | EOF |
5b5d99cf | 6783 | if { (eval echo configure:6784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6784 | rm -rf conftest* |
97bf5e38 | 6785 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6786 | else |
97bf5e38 MK |
6787 | echo "configure: failed program was:" >&5 |
6788 | cat conftest.$ac_ext >&5 | |
c906108c | 6789 | rm -rf conftest* |
97bf5e38 | 6790 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6791 | fi |
6792 | rm -f conftest* | |
97bf5e38 | 6793 | fi |
c906108c | 6794 | |
97bf5e38 MK |
6795 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6796 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6797 | cat >> confdefs.h <<\EOF | |
6798 | #define HAVE_STRUCT_REG_R_FS 1 | |
6799 | EOF | |
6800 | ||
6801 | fi | |
6802 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
5b5d99cf | 6803 | echo "configure:6804: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
6804 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
6805 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6806 | else | |
6807 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6808 | #line 6809 "configure" |
c906108c | 6809 | #include "confdefs.h" |
97bf5e38 MK |
6810 | #include <machine/reg.h> |
6811 | int main() { | |
6812 | struct reg r; r.r_gs; | |
6813 | ; return 0; } | |
c906108c | 6814 | EOF |
5b5d99cf | 6815 | if { (eval echo configure:6816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6816 | rm -rf conftest* |
97bf5e38 | 6817 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6818 | else |
97bf5e38 MK |
6819 | echo "configure: failed program was:" >&5 |
6820 | cat conftest.$ac_ext >&5 | |
c906108c | 6821 | rm -rf conftest* |
97bf5e38 | 6822 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6823 | fi |
6824 | rm -f conftest* | |
c906108c | 6825 | fi |
c906108c | 6826 | |
97bf5e38 MK |
6827 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6828 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6829 | cat >> confdefs.h <<\EOF | |
6830 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6831 | EOF |
6832 | ||
c906108c SS |
6833 | fi |
6834 | ||
97bf5e38 MK |
6835 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6836 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
5b5d99cf | 6837 | echo "configure:6838: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 6838 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
6839 | echo $ac_n "(cached) $ac_c" 1>&6 |
6840 | else | |
6841 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6842 | #line 6843 "configure" |
c906108c | 6843 | #include "confdefs.h" |
97bf5e38 | 6844 | #include <sys/ptrace.h> |
c906108c | 6845 | int main() { |
97bf5e38 | 6846 | PTRACE_GETREGS; |
c906108c SS |
6847 | ; return 0; } |
6848 | EOF | |
5b5d99cf | 6849 | if { (eval echo configure:6850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6850 | rm -rf conftest* |
97bf5e38 | 6851 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6852 | else |
6853 | echo "configure: failed program was:" >&5 | |
6854 | cat conftest.$ac_ext >&5 | |
6855 | rm -rf conftest* | |
97bf5e38 | 6856 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6857 | fi |
6858 | rm -f conftest* | |
6859 | fi | |
6860 | ||
97bf5e38 MK |
6861 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6862 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6863 | cat >> confdefs.h <<\EOF | |
6864 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
6865 | EOF |
6866 | ||
97bf5e38 | 6867 | fi |
c906108c | 6868 | |
97bf5e38 MK |
6869 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6870 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
5b5d99cf | 6871 | echo "configure:6872: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 6872 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
6873 | echo $ac_n "(cached) $ac_c" 1>&6 |
6874 | else | |
6875 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6876 | #line 6877 "configure" |
c906108c | 6877 | #include "confdefs.h" |
97bf5e38 | 6878 | #include <sys/ptrace.h> |
c906108c | 6879 | int main() { |
97bf5e38 | 6880 | PTRACE_GETFPXREGS; |
c906108c SS |
6881 | ; return 0; } |
6882 | EOF | |
5b5d99cf | 6883 | if { (eval echo configure:6884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6884 | rm -rf conftest* |
97bf5e38 | 6885 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
6886 | else |
6887 | echo "configure: failed program was:" >&5 | |
6888 | cat conftest.$ac_ext >&5 | |
6889 | rm -rf conftest* | |
97bf5e38 | 6890 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
6891 | fi |
6892 | rm -f conftest* | |
6893 | fi | |
6894 | ||
97bf5e38 MK |
6895 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
6896 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
6897 | cat >> confdefs.h <<\EOF | |
6898 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
6899 | EOF |
6900 | ||
97bf5e38 | 6901 | fi |
c906108c | 6902 | |
97bf5e38 MK |
6903 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
6904 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
5b5d99cf | 6905 | echo "configure:6906: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 6906 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
6907 | echo $ac_n "(cached) $ac_c" 1>&6 |
6908 | else | |
6909 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6910 | #line 6911 "configure" |
c906108c | 6911 | #include "confdefs.h" |
97bf5e38 MK |
6912 | #include <sys/types.h> |
6913 | #include <sys/ptrace.h> | |
c906108c | 6914 | int main() { |
97bf5e38 | 6915 | PT_GETDBREGS; |
c906108c SS |
6916 | ; return 0; } |
6917 | EOF | |
5b5d99cf | 6918 | if { (eval echo configure:6919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6919 | rm -rf conftest* |
97bf5e38 | 6920 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
6921 | else |
6922 | echo "configure: failed program was:" >&5 | |
6923 | cat conftest.$ac_ext >&5 | |
6924 | rm -rf conftest* | |
97bf5e38 | 6925 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
6926 | fi |
6927 | rm -f conftest* | |
6928 | fi | |
6929 | ||
97bf5e38 MK |
6930 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
6931 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
6932 | cat >> confdefs.h <<\EOF | |
6933 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
6934 | EOF |
6935 | ||
97bf5e38 | 6936 | fi |
c906108c | 6937 | |
97bf5e38 MK |
6938 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
6939 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
5b5d99cf | 6940 | echo "configure:6941: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 6941 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
6942 | echo $ac_n "(cached) $ac_c" 1>&6 |
6943 | else | |
6944 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6945 | #line 6946 "configure" |
c906108c | 6946 | #include "confdefs.h" |
97bf5e38 MK |
6947 | #include <sys/types.h> |
6948 | #include <sys/ptrace.h> | |
c906108c | 6949 | int main() { |
97bf5e38 | 6950 | PT_GETXMMREGS; |
c906108c SS |
6951 | ; return 0; } |
6952 | EOF | |
5b5d99cf | 6953 | if { (eval echo configure:6954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6954 | rm -rf conftest* |
97bf5e38 | 6955 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
6956 | else |
6957 | echo "configure: failed program was:" >&5 | |
6958 | cat conftest.$ac_ext >&5 | |
6959 | rm -rf conftest* | |
97bf5e38 | 6960 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
6961 | fi |
6962 | rm -f conftest* | |
6963 | fi | |
6964 | ||
97bf5e38 MK |
6965 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
6966 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
6967 | cat >> confdefs.h <<\EOF | |
6968 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
6969 | EOF |
6970 | ||
97bf5e38 | 6971 | fi |
c906108c | 6972 | |
97bf5e38 MK |
6973 | |
6974 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
5b5d99cf | 6975 | echo "configure:6976: checking whether malloc must be declared" >&5 |
97bf5e38 | 6976 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
6977 | echo $ac_n "(cached) $ac_c" 1>&6 |
6978 | else | |
6979 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 6980 | #line 6981 "configure" |
3862412b | 6981 | #include "confdefs.h" |
e17bf198 | 6982 | |
97bf5e38 MK |
6983 | #include <stdio.h> |
6984 | #ifdef HAVE_STRING_H | |
6985 | #include <string.h> | |
6986 | #else | |
6987 | #ifdef HAVE_STRINGS_H | |
6988 | #include <strings.h> | |
6989 | #endif | |
6990 | #endif | |
6991 | #ifdef HAVE_STDLIB_H | |
6992 | #include <stdlib.h> | |
6993 | #endif | |
6994 | #ifdef HAVE_UNISTD_H | |
6995 | #include <unistd.h> | |
6996 | #endif | |
3862412b | 6997 | int main() { |
97bf5e38 | 6998 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
6999 | ; return 0; } |
7000 | EOF | |
5b5d99cf | 7001 | if { (eval echo configure:7002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7002 | rm -rf conftest* |
97bf5e38 | 7003 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7004 | else |
7005 | echo "configure: failed program was:" >&5 | |
7006 | cat conftest.$ac_ext >&5 | |
7007 | rm -rf conftest* | |
97bf5e38 | 7008 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7009 | fi |
7010 | rm -f conftest* | |
7011 | fi | |
7012 | ||
97bf5e38 MK |
7013 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7014 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7015 | cat >> confdefs.h <<\EOF | |
7016 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7017 | EOF |
7018 | ||
97bf5e38 | 7019 | fi |
3862412b | 7020 | |
97bf5e38 | 7021 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
5b5d99cf | 7022 | echo "configure:7023: checking whether realloc must be declared" >&5 |
97bf5e38 | 7023 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7024 | echo $ac_n "(cached) $ac_c" 1>&6 |
7025 | else | |
7026 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7027 | #line 7028 "configure" |
3862412b | 7028 | #include "confdefs.h" |
e17bf198 | 7029 | |
97bf5e38 MK |
7030 | #include <stdio.h> |
7031 | #ifdef HAVE_STRING_H | |
7032 | #include <string.h> | |
7033 | #else | |
7034 | #ifdef HAVE_STRINGS_H | |
7035 | #include <strings.h> | |
7036 | #endif | |
7037 | #endif | |
7038 | #ifdef HAVE_STDLIB_H | |
7039 | #include <stdlib.h> | |
7040 | #endif | |
7041 | #ifdef HAVE_UNISTD_H | |
7042 | #include <unistd.h> | |
7043 | #endif | |
3862412b | 7044 | int main() { |
97bf5e38 | 7045 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7046 | ; return 0; } |
7047 | EOF | |
5b5d99cf | 7048 | if { (eval echo configure:7049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7049 | rm -rf conftest* |
97bf5e38 | 7050 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7051 | else |
7052 | echo "configure: failed program was:" >&5 | |
7053 | cat conftest.$ac_ext >&5 | |
7054 | rm -rf conftest* | |
97bf5e38 | 7055 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7056 | fi |
7057 | rm -f conftest* | |
7058 | fi | |
7059 | ||
97bf5e38 MK |
7060 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7061 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7062 | cat >> confdefs.h <<\EOF | |
7063 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7064 | EOF |
7065 | ||
97bf5e38 | 7066 | fi |
3862412b | 7067 | |
97bf5e38 | 7068 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
5b5d99cf | 7069 | echo "configure:7070: checking whether free must be declared" >&5 |
97bf5e38 | 7070 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7071 | echo $ac_n "(cached) $ac_c" 1>&6 |
7072 | else | |
7073 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7074 | #line 7075 "configure" |
451928c5 | 7075 | #include "confdefs.h" |
e17bf198 | 7076 | |
97bf5e38 MK |
7077 | #include <stdio.h> |
7078 | #ifdef HAVE_STRING_H | |
7079 | #include <string.h> | |
7080 | #else | |
7081 | #ifdef HAVE_STRINGS_H | |
7082 | #include <strings.h> | |
7083 | #endif | |
7084 | #endif | |
7085 | #ifdef HAVE_STDLIB_H | |
7086 | #include <stdlib.h> | |
7087 | #endif | |
7088 | #ifdef HAVE_UNISTD_H | |
7089 | #include <unistd.h> | |
7090 | #endif | |
451928c5 | 7091 | int main() { |
97bf5e38 | 7092 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7093 | ; return 0; } |
7094 | EOF | |
5b5d99cf | 7095 | if { (eval echo configure:7096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7096 | rm -rf conftest* |
97bf5e38 | 7097 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7098 | else |
7099 | echo "configure: failed program was:" >&5 | |
7100 | cat conftest.$ac_ext >&5 | |
7101 | rm -rf conftest* | |
97bf5e38 | 7102 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7103 | fi |
7104 | rm -f conftest* | |
7105 | fi | |
7106 | ||
97bf5e38 MK |
7107 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7108 | if test $bfd_cv_decl_needed_free = yes; then | |
7109 | cat >> confdefs.h <<\EOF | |
7110 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7111 | EOF |
7112 | ||
97bf5e38 | 7113 | fi |
451928c5 | 7114 | |
97bf5e38 | 7115 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
5b5d99cf | 7116 | echo "configure:7117: checking whether strerror must be declared" >&5 |
97bf5e38 | 7117 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7118 | echo $ac_n "(cached) $ac_c" 1>&6 |
7119 | else | |
7120 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7121 | #line 7122 "configure" |
451928c5 | 7122 | #include "confdefs.h" |
e17bf198 | 7123 | |
97bf5e38 MK |
7124 | #include <stdio.h> |
7125 | #ifdef HAVE_STRING_H | |
7126 | #include <string.h> | |
7127 | #else | |
7128 | #ifdef HAVE_STRINGS_H | |
7129 | #include <strings.h> | |
7130 | #endif | |
7131 | #endif | |
7132 | #ifdef HAVE_STDLIB_H | |
7133 | #include <stdlib.h> | |
7134 | #endif | |
7135 | #ifdef HAVE_UNISTD_H | |
7136 | #include <unistd.h> | |
7137 | #endif | |
451928c5 | 7138 | int main() { |
97bf5e38 | 7139 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7140 | ; return 0; } |
7141 | EOF | |
5b5d99cf | 7142 | if { (eval echo configure:7143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7143 | rm -rf conftest* |
97bf5e38 | 7144 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7145 | else |
7146 | echo "configure: failed program was:" >&5 | |
7147 | cat conftest.$ac_ext >&5 | |
7148 | rm -rf conftest* | |
97bf5e38 | 7149 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7150 | fi |
7151 | rm -f conftest* | |
7152 | fi | |
7153 | ||
97bf5e38 MK |
7154 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7155 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7156 | cat >> confdefs.h <<\EOF | |
7157 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7158 | EOF |
7159 | ||
97bf5e38 | 7160 | fi |
451928c5 | 7161 | |
97bf5e38 | 7162 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
5b5d99cf | 7163 | echo "configure:7164: checking whether strdup must be declared" >&5 |
97bf5e38 | 7164 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7165 | echo $ac_n "(cached) $ac_c" 1>&6 |
7166 | else | |
7167 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7168 | #line 7169 "configure" |
3862412b | 7169 | #include "confdefs.h" |
e17bf198 | 7170 | |
97bf5e38 MK |
7171 | #include <stdio.h> |
7172 | #ifdef HAVE_STRING_H | |
7173 | #include <string.h> | |
7174 | #else | |
7175 | #ifdef HAVE_STRINGS_H | |
7176 | #include <strings.h> | |
7177 | #endif | |
7178 | #endif | |
7179 | #ifdef HAVE_STDLIB_H | |
7180 | #include <stdlib.h> | |
7181 | #endif | |
7182 | #ifdef HAVE_UNISTD_H | |
7183 | #include <unistd.h> | |
7184 | #endif | |
3862412b | 7185 | int main() { |
97bf5e38 | 7186 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7187 | ; return 0; } |
7188 | EOF | |
5b5d99cf | 7189 | if { (eval echo configure:7190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7190 | rm -rf conftest* |
97bf5e38 | 7191 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7192 | else |
7193 | echo "configure: failed program was:" >&5 | |
7194 | cat conftest.$ac_ext >&5 | |
7195 | rm -rf conftest* | |
97bf5e38 | 7196 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7197 | fi |
7198 | rm -f conftest* | |
7199 | fi | |
7200 | ||
97bf5e38 MK |
7201 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7202 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7203 | cat >> confdefs.h <<\EOF | |
7204 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7205 | EOF |
7206 | ||
97bf5e38 | 7207 | fi |
3862412b | 7208 | |
97bf5e38 | 7209 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
5b5d99cf | 7210 | echo "configure:7211: checking whether strstr must be declared" >&5 |
97bf5e38 | 7211 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7212 | echo $ac_n "(cached) $ac_c" 1>&6 |
7213 | else | |
7214 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7215 | #line 7216 "configure" |
3862412b | 7216 | #include "confdefs.h" |
e17bf198 | 7217 | |
97bf5e38 MK |
7218 | #include <stdio.h> |
7219 | #ifdef HAVE_STRING_H | |
7220 | #include <string.h> | |
7221 | #else | |
7222 | #ifdef HAVE_STRINGS_H | |
7223 | #include <strings.h> | |
7224 | #endif | |
7225 | #endif | |
7226 | #ifdef HAVE_STDLIB_H | |
7227 | #include <stdlib.h> | |
7228 | #endif | |
7229 | #ifdef HAVE_UNISTD_H | |
7230 | #include <unistd.h> | |
7231 | #endif | |
3862412b | 7232 | int main() { |
97bf5e38 | 7233 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7234 | ; return 0; } |
7235 | EOF | |
5b5d99cf | 7236 | if { (eval echo configure:7237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7237 | rm -rf conftest* |
97bf5e38 | 7238 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7239 | else |
7240 | echo "configure: failed program was:" >&5 | |
7241 | cat conftest.$ac_ext >&5 | |
7242 | rm -rf conftest* | |
97bf5e38 | 7243 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7244 | fi |
7245 | rm -f conftest* | |
7246 | fi | |
7247 | ||
97bf5e38 MK |
7248 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7249 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7250 | cat >> confdefs.h <<\EOF | |
7251 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7252 | EOF |
7253 | ||
97bf5e38 | 7254 | fi |
3862412b | 7255 | |
97bf5e38 | 7256 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
5b5d99cf | 7257 | echo "configure:7258: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7258 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7259 | echo $ac_n "(cached) $ac_c" 1>&6 |
7260 | else | |
7261 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7262 | #line 7263 "configure" |
596c9d4b KB |
7263 | #include "confdefs.h" |
7264 | ||
97bf5e38 MK |
7265 | #include <stdio.h> |
7266 | #ifdef HAVE_STRING_H | |
7267 | #include <string.h> | |
7268 | #else | |
7269 | #ifdef HAVE_STRINGS_H | |
7270 | #include <strings.h> | |
7271 | #endif | |
7272 | #endif | |
7273 | #ifdef HAVE_STDLIB_H | |
7274 | #include <stdlib.h> | |
7275 | #endif | |
7276 | #ifdef HAVE_UNISTD_H | |
7277 | #include <unistd.h> | |
7278 | #endif | |
596c9d4b | 7279 | int main() { |
97bf5e38 | 7280 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7281 | ; return 0; } |
7282 | EOF | |
5b5d99cf | 7283 | if { (eval echo configure:7284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7284 | rm -rf conftest* |
97bf5e38 | 7285 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7286 | else |
7287 | echo "configure: failed program was:" >&5 | |
7288 | cat conftest.$ac_ext >&5 | |
7289 | rm -rf conftest* | |
97bf5e38 | 7290 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7291 | fi |
7292 | rm -f conftest* | |
7293 | fi | |
7294 | ||
97bf5e38 MK |
7295 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7296 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7297 | cat >> confdefs.h <<\EOF | |
7298 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7299 | EOF |
7300 | ||
97bf5e38 | 7301 | fi |
596c9d4b | 7302 | |
97bf5e38 MK |
7303 | |
7304 | # The following save_state_t checkery is only necessary for HPUX | |
7305 | # versions earlier than 10.20. When those fade from memory, this | |
7306 | # could be expunged. --jsm 1999-03-22 | |
7307 | ||
7308 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
5b5d99cf | 7309 | echo "configure:7310: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7310 | cat > conftest.$ac_ext <<EOF |
5b5d99cf | 7311 | #line 7312 "configure" |
97bf5e38 MK |
7312 | #include "confdefs.h" |
7313 | #include <machine/save_state.h> | |
7314 | EOF | |
7315 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7316 | egrep "save_state_t" >/dev/null 2>&1; then | |
7317 | rm -rf conftest* | |
7318 | gdb_cv_hpux_savestate=yes | |
7319 | else | |
7320 | rm -rf conftest* | |
7321 | gdb_cv_hpux_savestate=no | |
7322 | fi | |
7323 | rm -f conftest* | |
7324 | ||
7325 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7326 | #line 7327 "configure" |
97bf5e38 MK |
7327 | #include "confdefs.h" |
7328 | #include <machine/save_state.h> | |
7329 | EOF | |
7330 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7331 | egrep "ss_wide" >/dev/null 2>&1; then | |
7332 | rm -rf conftest* | |
7333 | gdb_cv_hpux_sswide=yes | |
7334 | else | |
7335 | rm -rf conftest* | |
7336 | gdb_cv_hpux_sswide=no | |
7337 | fi | |
7338 | rm -f conftest* | |
7339 | ||
7340 | if test $gdb_cv_hpux_savestate = yes | |
7341 | then | |
7342 | cat >> confdefs.h <<\EOF | |
7343 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7344 | EOF | |
7345 | ||
7346 | fi | |
7347 | if test $gdb_cv_hpux_sswide = yes | |
7348 | then | |
7349 | cat >> confdefs.h <<\EOF | |
7350 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7351 | EOF | |
7352 | ||
7353 | fi | |
7354 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7355 | ||
7356 | ||
7357 | # If we are configured native on GNU/Linux, work around problems with | |
7358 | # sys/procfs.h | |
7359 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7360 | ||
7361 | if test "${target}" = "${host}"; then | |
7362 | case "${host}" in | |
7363 | i[3456]86-*-linux*) | |
7364 | cat >> confdefs.h <<\EOF | |
7365 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7366 | EOF | |
7367 | ||
7368 | cat >> confdefs.h <<\EOF | |
7369 | #define sys_quotactl 1 | |
7370 | EOF | |
7371 | ||
7372 | ;; | |
7373 | ia64-*-aix*) | |
7374 | cat >> confdefs.h <<\EOF | |
7375 | #define NEW_PROC_API 1 | |
7376 | EOF | |
7377 | ||
7378 | ;; | |
7379 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7380 | cat >> confdefs.h <<\EOF | |
7381 | #define NEW_PROC_API 1 | |
7382 | EOF | |
7383 | ||
7384 | ;; | |
7385 | *-*-solaris2.[678]) | |
7386 | cat >> confdefs.h <<\EOF | |
7387 | #define NEW_PROC_API 1 | |
7388 | EOF | |
7389 | ||
7390 | ;; | |
7391 | esac | |
7392 | fi | |
7393 | ||
7394 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7395 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
5b5d99cf | 7396 | echo "configure:7397: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7397 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7398 | echo $ac_n "(cached) $ac_c" 1>&6 |
7399 | else | |
7400 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7401 | #line 7402 "configure" |
596c9d4b KB |
7402 | #include "confdefs.h" |
7403 | ||
7404 | #define _SYSCALL32 | |
7405 | #include <sys/procfs.h> | |
7406 | int main() { | |
97bf5e38 | 7407 | pstatus_t avar |
596c9d4b KB |
7408 | ; return 0; } |
7409 | EOF | |
5b5d99cf | 7410 | if { (eval echo configure:7411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7411 | rm -rf conftest* |
97bf5e38 | 7412 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7413 | else |
7414 | echo "configure: failed program was:" >&5 | |
7415 | cat conftest.$ac_ext >&5 | |
7416 | rm -rf conftest* | |
97bf5e38 | 7417 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7418 | |
7419 | fi | |
7420 | rm -f conftest* | |
7421 | fi | |
7422 | ||
97bf5e38 | 7423 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7424 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7425 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7426 | EOF |
7427 | ||
7428 | fi | |
97bf5e38 | 7429 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7430 | |
97bf5e38 | 7431 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7432 | echo "configure:7433: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7433 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7434 | echo $ac_n "(cached) $ac_c" 1>&6 |
7435 | else | |
7436 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7437 | #line 7438 "configure" |
596c9d4b KB |
7438 | #include "confdefs.h" |
7439 | ||
7440 | #define _SYSCALL32 | |
7441 | #include <sys/procfs.h> | |
7442 | int main() { | |
97bf5e38 | 7443 | prrun_t avar |
596c9d4b KB |
7444 | ; return 0; } |
7445 | EOF | |
5b5d99cf | 7446 | if { (eval echo configure:7447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7447 | rm -rf conftest* |
97bf5e38 | 7448 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7449 | else |
7450 | echo "configure: failed program was:" >&5 | |
7451 | cat conftest.$ac_ext >&5 | |
7452 | rm -rf conftest* | |
97bf5e38 | 7453 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7454 | |
7455 | fi | |
7456 | rm -f conftest* | |
7457 | fi | |
7458 | ||
97bf5e38 | 7459 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7460 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7461 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7462 | EOF |
7463 | ||
7464 | fi | |
97bf5e38 | 7465 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7466 | |
97bf5e38 | 7467 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7468 | echo "configure:7469: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7469 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7470 | echo $ac_n "(cached) $ac_c" 1>&6 |
7471 | else | |
7472 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7473 | #line 7474 "configure" |
596c9d4b KB |
7474 | #include "confdefs.h" |
7475 | ||
7476 | #define _SYSCALL32 | |
7477 | #include <sys/procfs.h> | |
7478 | int main() { | |
97bf5e38 | 7479 | gregset_t avar |
596c9d4b KB |
7480 | ; return 0; } |
7481 | EOF | |
5b5d99cf | 7482 | if { (eval echo configure:7483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7483 | rm -rf conftest* |
97bf5e38 | 7484 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7485 | else |
7486 | echo "configure: failed program was:" >&5 | |
7487 | cat conftest.$ac_ext >&5 | |
7488 | rm -rf conftest* | |
97bf5e38 | 7489 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7490 | |
7491 | fi | |
7492 | rm -f conftest* | |
7493 | fi | |
7494 | ||
97bf5e38 | 7495 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7496 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7497 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7498 | EOF |
7499 | ||
7500 | fi | |
97bf5e38 | 7501 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7502 | |
97bf5e38 | 7503 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7504 | echo "configure:7505: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7505 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7506 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7507 | else |
7508 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7509 | #line 7510 "configure" |
d84dd0c5 | 7510 | #include "confdefs.h" |
97bf5e38 MK |
7511 | |
7512 | #define _SYSCALL32 | |
d84dd0c5 | 7513 | #include <sys/procfs.h> |
97bf5e38 MK |
7514 | int main() { |
7515 | fpregset_t avar | |
7516 | ; return 0; } | |
d84dd0c5 | 7517 | EOF |
5b5d99cf | 7518 | if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7519 | rm -rf conftest* |
7520 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7521 | else |
7522 | echo "configure: failed program was:" >&5 | |
7523 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7524 | rm -rf conftest* |
7525 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7526 | ||
d84dd0c5 | 7527 | fi |
97bf5e38 | 7528 | rm -f conftest* |
d84dd0c5 MK |
7529 | fi |
7530 | ||
97bf5e38 MK |
7531 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7532 | cat >> confdefs.h <<\EOF | |
7533 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7534 | EOF |
7535 | ||
97bf5e38 MK |
7536 | fi |
7537 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7538 | |
97bf5e38 | 7539 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7540 | echo "configure:7541: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7541 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7542 | echo $ac_n "(cached) $ac_c" 1>&6 |
7543 | else | |
7544 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7545 | #line 7546 "configure" |
c906108c | 7546 | #include "confdefs.h" |
c906108c | 7547 | |
97bf5e38 MK |
7548 | #define _SYSCALL32 |
7549 | #include <sys/procfs.h> | |
c906108c | 7550 | int main() { |
97bf5e38 | 7551 | prgregset_t avar |
c906108c SS |
7552 | ; return 0; } |
7553 | EOF | |
5b5d99cf | 7554 | if { (eval echo configure:7555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7555 | rm -rf conftest* |
97bf5e38 | 7556 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7557 | else |
7558 | echo "configure: failed program was:" >&5 | |
7559 | cat conftest.$ac_ext >&5 | |
7560 | rm -rf conftest* | |
97bf5e38 MK |
7561 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7562 | ||
c906108c SS |
7563 | fi |
7564 | rm -f conftest* | |
7565 | fi | |
7566 | ||
97bf5e38 MK |
7567 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7568 | cat >> confdefs.h <<\EOF | |
7569 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7570 | EOF |
7571 | ||
97bf5e38 MK |
7572 | fi |
7573 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7574 | |
97bf5e38 | 7575 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7576 | echo "configure:7577: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7577 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
7578 | echo $ac_n "(cached) $ac_c" 1>&6 |
7579 | else | |
7580 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7581 | #line 7582 "configure" |
d45fe813 | 7582 | #include "confdefs.h" |
97bf5e38 MK |
7583 | |
7584 | #define _SYSCALL32 | |
7585 | #include <sys/procfs.h> | |
d45fe813 | 7586 | int main() { |
97bf5e38 | 7587 | prfpregset_t avar |
d45fe813 KB |
7588 | ; return 0; } |
7589 | EOF | |
5b5d99cf | 7590 | if { (eval echo configure:7591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7591 | rm -rf conftest* |
97bf5e38 | 7592 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7593 | else |
7594 | echo "configure: failed program was:" >&5 | |
7595 | cat conftest.$ac_ext >&5 | |
7596 | rm -rf conftest* | |
97bf5e38 MK |
7597 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7598 | ||
d45fe813 KB |
7599 | fi |
7600 | rm -f conftest* | |
7601 | fi | |
7602 | ||
97bf5e38 MK |
7603 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7604 | cat >> confdefs.h <<\EOF | |
7605 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7606 | EOF |
7607 | ||
97bf5e38 MK |
7608 | fi |
7609 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7610 | |
97bf5e38 | 7611 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7612 | echo "configure:7613: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7613 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7614 | echo $ac_n "(cached) $ac_c" 1>&6 |
7615 | else | |
7616 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7617 | #line 7618 "configure" |
d45fe813 | 7618 | #include "confdefs.h" |
97bf5e38 MK |
7619 | |
7620 | #define _SYSCALL32 | |
7621 | #include <sys/procfs.h> | |
d45fe813 | 7622 | int main() { |
97bf5e38 | 7623 | prgregset32_t avar |
d45fe813 KB |
7624 | ; return 0; } |
7625 | EOF | |
5b5d99cf | 7626 | if { (eval echo configure:7627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7627 | rm -rf conftest* |
97bf5e38 | 7628 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7629 | else |
7630 | echo "configure: failed program was:" >&5 | |
7631 | cat conftest.$ac_ext >&5 | |
7632 | rm -rf conftest* | |
97bf5e38 MK |
7633 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7634 | ||
d45fe813 KB |
7635 | fi |
7636 | rm -f conftest* | |
7637 | fi | |
7638 | ||
97bf5e38 MK |
7639 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7640 | cat >> confdefs.h <<\EOF | |
7641 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7642 | EOF |
7643 | ||
97bf5e38 MK |
7644 | fi |
7645 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7646 | |
97bf5e38 | 7647 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7648 | echo "configure:7649: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7649 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7650 | echo $ac_n "(cached) $ac_c" 1>&6 |
7651 | else | |
7652 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7653 | #line 7654 "configure" |
d45fe813 | 7654 | #include "confdefs.h" |
97bf5e38 MK |
7655 | |
7656 | #define _SYSCALL32 | |
7657 | #include <sys/procfs.h> | |
d45fe813 | 7658 | int main() { |
97bf5e38 | 7659 | prfpregset32_t avar |
d45fe813 KB |
7660 | ; return 0; } |
7661 | EOF | |
5b5d99cf | 7662 | if { (eval echo configure:7663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7663 | rm -rf conftest* |
97bf5e38 | 7664 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7665 | else |
7666 | echo "configure: failed program was:" >&5 | |
7667 | cat conftest.$ac_ext >&5 | |
7668 | rm -rf conftest* | |
97bf5e38 MK |
7669 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7670 | ||
d45fe813 KB |
7671 | fi |
7672 | rm -f conftest* | |
7673 | fi | |
7674 | ||
97bf5e38 MK |
7675 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7676 | cat >> confdefs.h <<\EOF | |
7677 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7678 | EOF |
7679 | ||
97bf5e38 MK |
7680 | fi |
7681 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7682 | |
97bf5e38 | 7683 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7684 | echo "configure:7685: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 7685 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
7686 | echo $ac_n "(cached) $ac_c" 1>&6 |
7687 | else | |
7688 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7689 | #line 7690 "configure" |
d45fe813 | 7690 | #include "confdefs.h" |
97bf5e38 | 7691 | |
d45fe813 | 7692 | #define _SYSCALL32 |
97bf5e38 | 7693 | #include <sys/procfs.h> |
d45fe813 | 7694 | int main() { |
97bf5e38 | 7695 | lwpid_t avar |
d45fe813 KB |
7696 | ; return 0; } |
7697 | EOF | |
5b5d99cf | 7698 | if { (eval echo configure:7699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7699 | rm -rf conftest* |
97bf5e38 | 7700 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7701 | else |
7702 | echo "configure: failed program was:" >&5 | |
7703 | cat conftest.$ac_ext >&5 | |
7704 | rm -rf conftest* | |
97bf5e38 MK |
7705 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7706 | ||
d45fe813 KB |
7707 | fi |
7708 | rm -f conftest* | |
7709 | fi | |
7710 | ||
97bf5e38 MK |
7711 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7712 | cat >> confdefs.h <<\EOF | |
7713 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7714 | EOF |
7715 | ||
97bf5e38 MK |
7716 | fi |
7717 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7718 | |
97bf5e38 | 7719 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7720 | echo "configure:7721: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 7721 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
7722 | echo $ac_n "(cached) $ac_c" 1>&6 |
7723 | else | |
7724 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7725 | #line 7726 "configure" |
c906108c SS |
7726 | #include "confdefs.h" |
7727 | ||
97bf5e38 MK |
7728 | #define _SYSCALL32 |
7729 | #include <sys/procfs.h> | |
c906108c | 7730 | int main() { |
97bf5e38 | 7731 | psaddr_t avar |
c906108c SS |
7732 | ; return 0; } |
7733 | EOF | |
5b5d99cf | 7734 | if { (eval echo configure:7735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7735 | rm -rf conftest* |
97bf5e38 | 7736 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7737 | else |
7738 | echo "configure: failed program was:" >&5 | |
7739 | cat conftest.$ac_ext >&5 | |
7740 | rm -rf conftest* | |
97bf5e38 MK |
7741 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7742 | ||
c906108c SS |
7743 | fi |
7744 | rm -f conftest* | |
7745 | fi | |
7746 | ||
97bf5e38 MK |
7747 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7748 | cat >> confdefs.h <<\EOF | |
7749 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7750 | EOF |
7751 | ||
97bf5e38 MK |
7752 | fi |
7753 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7754 | |
97bf5e38 | 7755 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7756 | echo "configure:7757: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 7757 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 7758 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7759 | else |
7760 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7761 | #line 7762 "configure" |
c906108c SS |
7762 | #include "confdefs.h" |
7763 | ||
97bf5e38 MK |
7764 | #define _SYSCALL32 |
7765 | #include <sys/procfs.h> | |
7766 | int main() { | |
7767 | prsysent_t avar | |
7768 | ; return 0; } | |
c906108c | 7769 | EOF |
5b5d99cf | 7770 | if { (eval echo configure:7771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7771 | rm -rf conftest* |
7772 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7773 | else |
7774 | echo "configure: failed program was:" >&5 | |
7775 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7776 | rm -rf conftest* |
7777 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7778 | ||
c906108c | 7779 | fi |
97bf5e38 | 7780 | rm -f conftest* |
c906108c SS |
7781 | fi |
7782 | ||
97bf5e38 MK |
7783 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7784 | cat >> confdefs.h <<\EOF | |
7785 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7786 | EOF |
7787 | ||
97bf5e38 MK |
7788 | fi |
7789 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7790 | |
97bf5e38 | 7791 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7792 | echo "configure:7793: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 7793 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
7794 | echo $ac_n "(cached) $ac_c" 1>&6 |
7795 | else | |
7796 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7797 | #line 7798 "configure" |
c906108c SS |
7798 | #include "confdefs.h" |
7799 | ||
97bf5e38 MK |
7800 | #define _SYSCALL32 |
7801 | #include <sys/procfs.h> | |
c906108c | 7802 | int main() { |
97bf5e38 | 7803 | pr_sigset_t avar |
c906108c SS |
7804 | ; return 0; } |
7805 | EOF | |
5b5d99cf | 7806 | if { (eval echo configure:7807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7807 | rm -rf conftest* |
97bf5e38 | 7808 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7809 | else |
7810 | echo "configure: failed program was:" >&5 | |
7811 | cat conftest.$ac_ext >&5 | |
7812 | rm -rf conftest* | |
97bf5e38 MK |
7813 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7814 | ||
c906108c SS |
7815 | fi |
7816 | rm -f conftest* | |
7817 | fi | |
7818 | ||
97bf5e38 MK |
7819 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7820 | cat >> confdefs.h <<\EOF | |
7821 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7822 | EOF |
7823 | ||
97bf5e38 MK |
7824 | fi |
7825 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7826 | |
97bf5e38 | 7827 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
5b5d99cf | 7828 | echo "configure:7829: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 7829 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 7830 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7831 | else |
7832 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7833 | #line 7834 "configure" |
c906108c SS |
7834 | #include "confdefs.h" |
7835 | ||
97bf5e38 MK |
7836 | #define _SYSCALL32 |
7837 | #include <sys/procfs.h> | |
7838 | int main() { | |
7839 | pr_sigaction64_t avar | |
7840 | ; return 0; } | |
c906108c | 7841 | EOF |
5b5d99cf | 7842 | if { (eval echo configure:7843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7843 | rm -rf conftest* |
7844 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
7845 | else |
7846 | echo "configure: failed program was:" >&5 | |
7847 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7848 | rm -rf conftest* |
7849 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
7850 | ||
c906108c | 7851 | fi |
97bf5e38 | 7852 | rm -f conftest* |
c906108c SS |
7853 | fi |
7854 | ||
97bf5e38 MK |
7855 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
7856 | cat >> confdefs.h <<\EOF | |
7857 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
7858 | EOF |
7859 | ||
97bf5e38 MK |
7860 | fi |
7861 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
7862 | ||
7863 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
5b5d99cf | 7864 | echo "configure:7865: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
7865 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
7866 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7867 | else | |
7868 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7869 | #line 7870 "configure" |
97bf5e38 MK |
7870 | #include "confdefs.h" |
7871 | ||
7872 | #define _SYSCALL32 | |
7873 | #include <sys/procfs.h> | |
7874 | int main() { | |
7875 | pr_siginfo64_t avar | |
7876 | ; return 0; } | |
7877 | EOF | |
5b5d99cf | 7878 | if { (eval echo configure:7879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7879 | rm -rf conftest* |
7880 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
7881 | else | |
7882 | echo "configure: failed program was:" >&5 | |
7883 | cat conftest.$ac_ext >&5 | |
7884 | rm -rf conftest* | |
7885 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
7886 | ||
7887 | fi | |
7888 | rm -f conftest* | |
c906108c | 7889 | fi |
c906108c | 7890 | |
97bf5e38 MK |
7891 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
7892 | cat >> confdefs.h <<\EOF | |
7893 | #define HAVE_PR_SIGINFO64_T 1 | |
7894 | EOF | |
c906108c | 7895 | |
97bf5e38 MK |
7896 | fi |
7897 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
7898 | ||
7899 | ||
7900 | ||
7901 | ||
7902 | ||
7903 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
7904 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
5b5d99cf | 7905 | echo "configure:7906: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 7906 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
7907 | echo $ac_n "(cached) $ac_c" 1>&6 |
7908 | else | |
7909 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 7910 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7911 | else |
7912 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7913 | #line 7914 "configure" |
c906108c | 7914 | #include "confdefs.h" |
97bf5e38 MK |
7915 | #include <sys/procfs.h> |
7916 | int main () | |
7917 | { | |
7918 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
7919 | return 1; | |
7920 | return 0; | |
7921 | } | |
c906108c | 7922 | EOF |
5b5d99cf | 7923 | if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 7924 | then |
97bf5e38 | 7925 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
7926 | else |
7927 | echo "configure: failed program was:" >&5 | |
7928 | cat conftest.$ac_ext >&5 | |
7929 | rm -fr conftest* | |
97bf5e38 | 7930 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7931 | fi |
7932 | rm -fr conftest* | |
7933 | fi | |
7934 | ||
7935 | fi | |
7936 | ||
97bf5e38 MK |
7937 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
7938 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
7939 | cat >> confdefs.h <<\EOF | |
7940 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
7941 | EOF |
7942 | ||
97bf5e38 MK |
7943 | fi |
7944 | fi | |
c906108c | 7945 | |
97bf5e38 MK |
7946 | |
7947 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
5b5d99cf | 7948 | echo "configure:7949: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 7949 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
7950 | echo $ac_n "(cached) $ac_c" 1>&6 |
7951 | else | |
7952 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7953 | #line 7954 "configure" |
c906108c | 7954 | #include "confdefs.h" |
97bf5e38 MK |
7955 | #include <unistd.h> |
7956 | #include <sys/types.h> | |
7957 | #include <sys/procfs.h> | |
7958 | ||
7959 | int main() { | |
7960 | ||
7961 | int dummy;; | |
7962 | dummy = ioctl(0, PIOCSET, &dummy); | |
7963 | ||
7964 | ; return 0; } | |
c906108c | 7965 | EOF |
5b5d99cf | 7966 | if { (eval echo configure:7967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7967 | rm -rf conftest* |
97bf5e38 | 7968 | gdb_cv_have_procfs_piocset=yes |
c906108c | 7969 | else |
c906108c SS |
7970 | echo "configure: failed program was:" >&5 |
7971 | cat conftest.$ac_ext >&5 | |
7972 | rm -rf conftest* | |
97bf5e38 | 7973 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
7974 | fi |
7975 | rm -f conftest* | |
7976 | fi | |
97bf5e38 MK |
7977 | |
7978 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
7979 | if test $gdb_cv_have_procfs_piocset = yes; then | |
7980 | cat >> confdefs.h <<\EOF | |
7981 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 7982 | EOF |
97bf5e38 MK |
7983 | |
7984 | fi | |
c906108c | 7985 | fi |
c906108c | 7986 | |
97bf5e38 MK |
7987 | if test ${host} = ${target} ; then |
7988 | ||
7989 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
5b5d99cf | 7990 | echo "configure:7991: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 7991 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
7992 | echo $ac_n "(cached) $ac_c" 1>&6 |
7993 | else | |
7994 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 7995 | #line 7996 "configure" |
c906108c | 7996 | #include "confdefs.h" |
97bf5e38 | 7997 | #include <link.h> |
c906108c | 7998 | int main() { |
97bf5e38 | 7999 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8000 | ; return 0; } |
8001 | EOF | |
5b5d99cf | 8002 | if { (eval echo configure:8003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8003 | rm -rf conftest* |
97bf5e38 | 8004 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8005 | else |
8006 | echo "configure: failed program was:" >&5 | |
8007 | cat conftest.$ac_ext >&5 | |
8008 | rm -rf conftest* | |
97bf5e38 | 8009 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8010 | fi |
8011 | rm -f conftest* | |
8012 | fi | |
8013 | ||
97bf5e38 MK |
8014 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8015 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8016 | cat >> confdefs.h <<\EOF | |
8017 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8018 | EOF |
97bf5e38 MK |
8019 | |
8020 | fi | |
8021 | ||
8022 | ||
8023 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
5b5d99cf | 8024 | echo "configure:8025: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8025 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8027 | else |
97bf5e38 | 8028 | cat > conftest.$ac_ext <<EOF |
5b5d99cf | 8029 | #line 8030 "configure" |
97bf5e38 MK |
8030 | #include "confdefs.h" |
8031 | #include <sys/types.h> | |
8032 | #include <link.h> | |
8033 | int main() { | |
8034 | struct link_map lm; (void) lm.lm_addr; | |
8035 | ; return 0; } | |
8036 | EOF | |
5b5d99cf | 8037 | if { (eval echo configure:8038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8038 | rm -rf conftest* |
8039 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8040 | else | |
8041 | echo "configure: failed program was:" >&5 | |
8042 | cat conftest.$ac_ext >&5 | |
8043 | rm -rf conftest* | |
8044 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8045 | fi | |
8046 | rm -f conftest* | |
c906108c | 8047 | fi |
c906108c | 8048 | |
97bf5e38 MK |
8049 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8050 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8051 | cat >> confdefs.h <<\EOF | |
8052 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8053 | EOF | |
8054 | ||
8055 | fi | |
8056 | ||
8057 | ||
8058 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
5b5d99cf | 8059 | echo "configure:8060: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8060 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8061 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8062 | else |
8063 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8064 | #line 8065 "configure" |
c906108c | 8065 | #include "confdefs.h" |
97bf5e38 MK |
8066 | #include <sys/types.h> |
8067 | #ifdef HAVE_NLIST_H | |
8068 | #include <nlist.h> | |
8069 | #endif | |
8070 | #include <link.h> | |
8071 | int main() { | |
8072 | struct so_map lm; (void) lm.som_addr; | |
8073 | ; return 0; } | |
8074 | EOF | |
5b5d99cf | 8075 | if { (eval echo configure:8076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8076 | rm -rf conftest* |
8077 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8078 | else | |
8079 | echo "configure: failed program was:" >&5 | |
8080 | cat conftest.$ac_ext >&5 | |
8081 | rm -rf conftest* | |
8082 | gdb_cv_have_struct_so_map_with_som_members=no | |
8083 | fi | |
8084 | rm -f conftest* | |
8085 | fi | |
c906108c | 8086 | |
97bf5e38 MK |
8087 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8088 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8089 | cat >> confdefs.h <<\EOF | |
8090 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8091 | EOF | |
c906108c | 8092 | |
97bf5e38 | 8093 | fi |
c906108c | 8094 | |
97bf5e38 MK |
8095 | |
8096 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
5b5d99cf | 8097 | echo "configure:8098: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8098 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8099 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8100 | else | |
8101 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8102 | #line 8103 "configure" |
97bf5e38 MK |
8103 | #include "confdefs.h" |
8104 | #define _SYSCALL32 | |
8105 | #include <sys/link.h> | |
8106 | int main() { | |
8107 | struct link_map32 l; | |
8108 | ; return 0; } | |
8109 | EOF | |
5b5d99cf | 8110 | if { (eval echo configure:8111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8111 | rm -rf conftest* |
8112 | gdb_cv_have_struct_link_map32=yes | |
8113 | else | |
8114 | echo "configure: failed program was:" >&5 | |
8115 | cat conftest.$ac_ext >&5 | |
8116 | rm -rf conftest* | |
8117 | gdb_cv_have_struct_link_map32=no | |
8118 | fi | |
8119 | rm -f conftest* | |
8120 | fi | |
c906108c | 8121 | |
97bf5e38 MK |
8122 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8123 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8124 | cat >> confdefs.h <<\EOF | |
8125 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8126 | EOF | |
c906108c | 8127 | |
97bf5e38 MK |
8128 | cat >> confdefs.h <<\EOF |
8129 | #define _SYSCALL32 1 | |
8130 | EOF | |
c906108c | 8131 | |
97bf5e38 MK |
8132 | fi |
8133 | fi | |
c906108c | 8134 | |
c906108c | 8135 | |
97bf5e38 | 8136 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
5b5d99cf | 8137 | echo "configure:8138: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8138 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8139 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8140 | else | |
8141 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8142 | #line 8143 "configure" |
97bf5e38 | 8143 | #include "confdefs.h" |
c906108c | 8144 | |
97bf5e38 | 8145 | int main() { |
c906108c | 8146 | |
97bf5e38 MK |
8147 | extern long long foo; |
8148 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8149 | |
97bf5e38 MK |
8150 | ; return 0; } |
8151 | EOF | |
5b5d99cf | 8152 | if { (eval echo configure:8153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8153 | rm -rf conftest* |
8154 | gdb_cv_c_long_long=yes | |
8155 | else | |
8156 | echo "configure: failed program was:" >&5 | |
8157 | cat conftest.$ac_ext >&5 | |
8158 | rm -rf conftest* | |
8159 | gdb_cv_c_long_long=no | |
8160 | fi | |
8161 | rm -f conftest* | |
8162 | fi | |
c906108c | 8163 | |
97bf5e38 MK |
8164 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8165 | if test $gdb_cv_c_long_long = yes; then | |
8166 | cat >> confdefs.h <<\EOF | |
8167 | #define CC_HAS_LONG_LONG 1 | |
8168 | EOF | |
8169 | ||
8170 | fi | |
8171 | ||
8172 | ||
8173 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
5b5d99cf | 8174 | echo "configure:8175: checking for long long support in printf" >&5 |
97bf5e38 MK |
8175 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8176 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8177 | else | |
8178 | if test "$cross_compiling" = yes; then | |
8179 | gdb_cv_printf_has_long_long=no | |
8180 | else | |
8181 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8182 | #line 8183 "configure" |
97bf5e38 MK |
8183 | #include "confdefs.h" |
8184 | ||
8185 | int main () { | |
8186 | char buf[32]; | |
8187 | long long l = 0; | |
8188 | l = (l << 16) + 0x0123; | |
8189 | l = (l << 16) + 0x4567; | |
8190 | l = (l << 16) + 0x89ab; | |
8191 | l = (l << 16) + 0xcdef; | |
8192 | sprintf (buf, "0x%016llx", l); | |
8193 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8194 | } |
97bf5e38 | 8195 | EOF |
5b5d99cf | 8196 | if { (eval echo configure:8197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8197 | then |
8198 | gdb_cv_printf_has_long_long=yes | |
8199 | else | |
8200 | echo "configure: failed program was:" >&5 | |
8201 | cat conftest.$ac_ext >&5 | |
8202 | rm -fr conftest* | |
8203 | gdb_cv_printf_has_long_long=no | |
8204 | fi | |
8205 | rm -fr conftest* | |
8206 | fi | |
8207 | ||
8208 | fi | |
8209 | ||
8210 | if test $gdb_cv_printf_has_long_long = yes; then | |
8211 | cat >> confdefs.h <<\EOF | |
8212 | #define PRINTF_HAS_LONG_LONG 1 | |
8213 | EOF | |
8214 | ||
8215 | fi | |
8216 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8217 | ||
8218 | ||
8219 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
5b5d99cf | 8220 | echo "configure:8221: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8221 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8223 | else | |
8224 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8225 | #line 8226 "configure" |
97bf5e38 MK |
8226 | #include "confdefs.h" |
8227 | ||
8228 | int main() { | |
8229 | long double foo; | |
8230 | ; return 0; } | |
8231 | EOF | |
5b5d99cf | 8232 | if { (eval echo configure:8233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8233 | rm -rf conftest* |
8234 | ac_cv_c_long_double=yes | |
8235 | else | |
8236 | echo "configure: failed program was:" >&5 | |
8237 | cat conftest.$ac_ext >&5 | |
8238 | rm -rf conftest* | |
8239 | ac_cv_c_long_double=no | |
8240 | fi | |
8241 | rm -f conftest* | |
8242 | fi | |
c906108c | 8243 | |
97bf5e38 MK |
8244 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8245 | if test $ac_cv_c_long_double = yes; then | |
8246 | cat >> confdefs.h <<\EOF | |
8247 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8248 | EOF |
97bf5e38 MK |
8249 | |
8250 | fi | |
8251 | ||
8252 | ||
8253 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
5b5d99cf | 8254 | echo "configure:8255: checking for long double support in printf" >&5 |
97bf5e38 MK |
8255 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8256 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8257 | else | |
8258 | if test "$cross_compiling" = yes; then | |
8259 | gdb_cv_printf_has_long_double=no | |
8260 | else | |
8261 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8262 | #line 8263 "configure" |
97bf5e38 MK |
8263 | #include "confdefs.h" |
8264 | ||
8265 | int main () { | |
8266 | char buf[16]; | |
8267 | long double f = 3.141592653; | |
8268 | sprintf (buf, "%Lg", f); | |
8269 | return (strncmp ("3.14159", buf, 7)); | |
8270 | } | |
8271 | EOF | |
5b5d99cf | 8272 | if { (eval echo configure:8273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8273 | then |
97bf5e38 | 8274 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8275 | else |
8276 | echo "configure: failed program was:" >&5 | |
8277 | cat conftest.$ac_ext >&5 | |
8278 | rm -fr conftest* | |
97bf5e38 | 8279 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8280 | fi |
8281 | rm -fr conftest* | |
8282 | fi | |
8283 | ||
8284 | fi | |
8285 | ||
97bf5e38 | 8286 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8287 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8288 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8289 | EOF | |
8290 | ||
8291 | fi | |
8292 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8293 | ||
8294 | ||
8295 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
5b5d99cf | 8296 | echo "configure:8297: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8297 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8298 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8299 | else | |
8300 | if test "$cross_compiling" = yes; then | |
8301 | gdb_cv_scanf_has_long_double=no | |
8302 | else | |
8303 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8304 | #line 8305 "configure" |
97bf5e38 MK |
8305 | #include "confdefs.h" |
8306 | ||
8307 | int main () { | |
8308 | char *buf = "3.141592653"; | |
8309 | long double f = 0; | |
8310 | sscanf (buf, "%Lg", &f); | |
8311 | return !(f > 3.14159 && f < 3.14160); | |
8312 | } | |
c906108c | 8313 | EOF |
5b5d99cf | 8314 | if { (eval echo configure:8315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8315 | then |
8316 | gdb_cv_scanf_has_long_double=yes | |
8317 | else | |
8318 | echo "configure: failed program was:" >&5 | |
8319 | cat conftest.$ac_ext >&5 | |
8320 | rm -fr conftest* | |
8321 | gdb_cv_scanf_has_long_double=no | |
8322 | fi | |
8323 | rm -fr conftest* | |
8324 | fi | |
c906108c SS |
8325 | |
8326 | fi | |
8327 | ||
97bf5e38 MK |
8328 | if test $gdb_cv_scanf_has_long_double = yes; then |
8329 | cat >> confdefs.h <<\EOF | |
8330 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8331 | EOF | |
8332 | ||
8333 | fi | |
8334 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8335 | |
438013df AO |
8336 | case ${host_os} in |
8337 | aix*) | |
8338 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
5b5d99cf | 8339 | echo "configure:8340: checking for -bbigtoc option" >&5 |
438013df AO |
8340 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8341 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8342 | else | |
8343 | ||
8344 | SAVE_LDFLAGS=$LDFLAGS | |
8345 | ||
8346 | case $GCC in | |
8347 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8348 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8349 | esac | |
8350 | ||
8351 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8352 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8353 | #line 8354 "configure" |
438013df AO |
8354 | #include "confdefs.h" |
8355 | ||
8356 | int main() { | |
8357 | int i; | |
8358 | ; return 0; } | |
8359 | EOF | |
5b5d99cf | 8360 | if { (eval echo configure:8361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8361 | : |
8362 | else | |
8363 | echo "configure: failed program was:" >&5 | |
8364 | cat conftest.$ac_ext >&5 | |
8365 | rm -rf conftest* | |
8366 | gdb_cv_bigtoc= | |
8367 | fi | |
8368 | rm -f conftest* | |
8369 | ||
8370 | fi | |
8371 | ||
8372 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8373 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8374 | ;; | |
8375 | esac | |
8376 | ||
c906108c SS |
8377 | |
8378 | ||
8379 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8380 | case ${host_os} in | |
8381 | hpux*) | |
8382 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
5b5d99cf | 8383 | echo "configure:8384: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8384 | if test -f /usr/include/dce/cma_config.h ; then |
8385 | if test "$GCC" = "yes" ; then | |
8386 | echo "$ac_t""yes" 1>&6 | |
8387 | cat >> confdefs.h <<\EOF | |
8388 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8389 | EOF | |
8390 | ||
66b965bb | 8391 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8392 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8393 | else | |
8394 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8395 | fi | |
8396 | else | |
8397 | echo "$ac_t""no" 1>&6 | |
8398 | fi | |
8399 | ;; | |
8400 | solaris*) | |
d92419e5 JB |
8401 | # See if thread_db library is around for Solaris thread debugging. |
8402 | # Note that we must explicitly test for version 1 of the library | |
8403 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8404 | # the same API. | |
c906108c | 8405 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
5b5d99cf | 8406 | echo "configure:8407: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8407 | if test -f /usr/lib/libthread_db.so.1 ; then |
8408 | echo "$ac_t""yes" 1>&6 | |
8409 | cat >> confdefs.h <<\EOF | |
8410 | #define HAVE_THREAD_DB_LIB 1 | |
8411 | EOF | |
8412 | ||
66b965bb | 8413 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8414 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8415 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
5b5d99cf | 8416 | echo "configure:8417: checking for dlopen in -ldl" >&5 |
c906108c SS |
8417 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8418 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8419 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8420 | else | |
8421 | ac_save_LIBS="$LIBS" | |
8422 | LIBS="-ldl $LIBS" | |
8423 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8424 | #line 8425 "configure" |
c906108c SS |
8425 | #include "confdefs.h" |
8426 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8427 | /* We use char because int might match the return type of a gcc2 | |
8428 | builtin and then its argument prototype would still apply. */ | |
8429 | char dlopen(); | |
8430 | ||
8431 | int main() { | |
8432 | dlopen() | |
8433 | ; return 0; } | |
8434 | EOF | |
5b5d99cf | 8435 | if { (eval echo configure:8436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8436 | rm -rf conftest* |
8437 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8438 | else | |
8439 | echo "configure: failed program was:" >&5 | |
8440 | cat conftest.$ac_ext >&5 | |
8441 | rm -rf conftest* | |
8442 | eval "ac_cv_lib_$ac_lib_var=no" | |
8443 | fi | |
8444 | rm -f conftest* | |
8445 | LIBS="$ac_save_LIBS" | |
8446 | ||
8447 | fi | |
8448 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8449 | echo "$ac_t""yes" 1>&6 | |
8450 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8451 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8452 | cat >> confdefs.h <<EOF | |
8453 | #define $ac_tr_lib 1 | |
8454 | EOF | |
8455 | ||
8456 | LIBS="-ldl $LIBS" | |
8457 | ||
8458 | else | |
8459 | echo "$ac_t""no" 1>&6 | |
8460 | fi | |
8461 | ||
8462 | if test "$GCC" = "yes" ; then | |
8463 | # The GNU linker requires the -export-dynamic option to make | |
8464 | # all symbols visible in the dynamic symbol table. | |
8465 | hold_ldflags=$LDFLAGS | |
8466 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
5b5d99cf | 8467 | echo "configure:8468: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8468 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8469 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8470 | #line 8471 "configure" |
c906108c SS |
8471 | #include "confdefs.h" |
8472 | ||
8473 | int main() { | |
8474 | int i; | |
8475 | ; return 0; } | |
8476 | EOF | |
5b5d99cf | 8477 | if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8478 | rm -rf conftest* |
8479 | found=yes | |
8480 | else | |
8481 | echo "configure: failed program was:" >&5 | |
8482 | cat conftest.$ac_ext >&5 | |
8483 | rm -rf conftest* | |
8484 | found=no | |
8485 | fi | |
8486 | rm -f conftest* | |
8487 | LDFLAGS=$hold_ldflags | |
8488 | echo "$ac_t""$found" 1>&6 | |
8489 | if test $found = yes; then | |
8490 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8491 | fi | |
8492 | fi | |
8493 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8494 | # at one point. | |
8495 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
5b5d99cf | 8496 | echo "configure:8497: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8497 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8498 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8499 | else | |
8500 | ||
8501 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8502 | #line 8503 "configure" |
c906108c SS |
8503 | #include "confdefs.h" |
8504 | ||
8505 | #include <proc_service.h> | |
8506 | ps_err_e ps_pdwrite | |
8507 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8508 | ||
8509 | int main() { | |
8510 | ||
8511 | ; return 0; } | |
8512 | EOF | |
5b5d99cf | 8513 | if { (eval echo configure:8514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8514 | rm -rf conftest* |
8515 | gdb_cv_proc_service_is_old=no | |
8516 | else | |
8517 | echo "configure: failed program was:" >&5 | |
8518 | cat conftest.$ac_ext >&5 | |
8519 | rm -rf conftest* | |
8520 | gdb_cv_proc_service_is_old=yes | |
8521 | fi | |
8522 | rm -f conftest* | |
8523 | ||
8524 | fi | |
8525 | ||
8526 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8527 | if test $gdb_cv_proc_service_is_old = yes; then | |
8528 | cat >> confdefs.h <<\EOF | |
8529 | #define PROC_SERVICE_IS_OLD 1 | |
8530 | EOF | |
8531 | ||
8532 | fi | |
8533 | else | |
8534 | echo "$ac_t""no" 1>&6 | |
8535 | fi | |
8536 | ;; | |
d92419e5 JB |
8537 | aix*) |
8538 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
5b5d99cf | 8539 | echo "configure:8540: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8540 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8541 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8542 | else | |
8543 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8544 | #line 8545 "configure" |
d92419e5 JB |
8545 | #include "confdefs.h" |
8546 | #include <sys/pthdebug.h> | |
8547 | int main() { | |
8548 | #ifndef PTHDB_VERSION_3 | |
8549 | #error | |
8550 | #endif | |
8551 | ; return 0; } | |
8552 | EOF | |
5b5d99cf | 8553 | if { (eval echo configure:8554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8554 | rm -rf conftest* |
8555 | gdb_cv_have_aix_thread_debug=yes | |
8556 | else | |
8557 | echo "configure: failed program was:" >&5 | |
8558 | cat conftest.$ac_ext >&5 | |
8559 | rm -rf conftest* | |
8560 | gdb_cv_have_aix_thread_debug=no | |
8561 | fi | |
8562 | rm -f conftest* | |
8563 | fi | |
8564 | ||
8565 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8566 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8567 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8568 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8569 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8570 | fi | |
8571 | ;; | |
c906108c SS |
8572 | esac |
8573 | ||
8574 | fi | |
8575 | ||
3f47be5c EZ |
8576 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8577 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
5b5d99cf | 8578 | echo "configure:8579: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8579 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8580 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8581 | else | |
8582 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8583 | #line 8584 "configure" |
3f47be5c EZ |
8584 | #include "confdefs.h" |
8585 | #include <thread_db.h> | |
8586 | int main() { | |
8587 | int i = TD_NOTALLOC; | |
8588 | ; return 0; } | |
8589 | EOF | |
5b5d99cf | 8590 | if { (eval echo configure:8591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8591 | rm -rf conftest* |
8592 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8593 | else | |
8594 | echo "configure: failed program was:" >&5 | |
8595 | cat conftest.$ac_ext >&5 | |
8596 | rm -rf conftest* | |
8597 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8598 | ||
8599 | fi | |
8600 | rm -f conftest* | |
8601 | ||
8602 | fi | |
8603 | ||
8604 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8605 | fi | |
8606 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8607 | cat >> confdefs.h <<\EOF | |
8608 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8609 | EOF | |
8610 | ||
8611 | fi | |
8612 | ||
fb40c209 | 8613 | |
030292b7 DJ |
8614 | # Check whether --with-sysroot or --without-sysroot was given. |
8615 | if test "${with_sysroot+set}" = set; then | |
8616 | withval="$with_sysroot" | |
8617 | ||
8618 | case ${with_sysroot} in | |
8619 | yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;; | |
8620 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; | |
8621 | esac | |
8622 | ||
8623 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
8624 | ||
8625 | if test "x$exec_prefix" = xNONE; then | |
8626 | if test "x$prefix" = xNONE; then | |
8627 | test_prefix=/usr/local | |
8628 | else | |
8629 | test_prefix=$prefix | |
8630 | fi | |
8631 | else | |
8632 | test_prefix=$exec_prefix | |
8633 | fi | |
8634 | case ${TARGET_SYSTEM_ROOT} in | |
8635 | ${test_prefix}*) | |
8636 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" | |
8637 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
8638 | ;; | |
8639 | esac | |
8640 | ||
8641 | else | |
8642 | ||
8643 | TARGET_SYSTEM_ROOT= | |
8644 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
8645 | ||
8646 | fi | |
8647 | ||
8648 | ||
8649 | ||
8650 | ||
3b851bce AC |
8651 | # NOTE: Don't add -Wall or -Wunused, they both include |
8652 | # -Wunused-parameter which reports bogus warnings. | |
8653 | # NOTE: If you add to this list, remember to update | |
8654 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8655 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8656 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8657 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8658 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8659 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8660 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8661 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8662 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8663 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8664 | if test "${enable_build_warnings+set}" = set; then | |
8665 | enableval="$enable_build_warnings" | |
1decb323 | 8666 | case "${enableval}" in |
c906108c SS |
8667 | yes) ;; |
8668 | no) build_warnings="-w";; | |
8669 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8670 | build_warnings="${build_warnings} ${t}";; | |
8671 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8672 | build_warnings="${t} ${build_warnings}";; | |
8673 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8674 | esac | |
d4f3574e | 8675 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8676 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8677 | fi |
1decb323 | 8678 | fi |
3b851bce AC |
8679 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8680 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8681 | enableval="$enable_gdb_build_warnings" | |
8682 | case "${enableval}" in | |
8683 | yes) ;; | |
8684 | no) build_warnings="-w";; | |
8685 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8686 | build_warnings="${build_warnings} ${t}";; | |
8687 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8688 | build_warnings="${t} ${build_warnings}";; | |
8689 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8690 | esac | |
8691 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8692 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8693 | fi | |
8694 | fi | |
104c1213 JM |
8695 | WARN_CFLAGS="" |
8696 | WERROR_CFLAGS="" | |
c906108c SS |
8697 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8698 | then | |
746a987d | 8699 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
5b5d99cf | 8700 | echo "configure:8701: checking compiler warning flags" >&5 |
746a987d AC |
8701 | # Separate out the -Werror flag as some files just cannot be |
8702 | # compiled with it enabled. | |
8703 | for w in ${build_warnings}; do | |
8704 | case $w in | |
8705 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8706 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8707 | saved_CFLAGS="$CFLAGS" |
8708 | CFLAGS="$CFLAGS $w" | |
8709 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8710 | #line 8711 "configure" |
4536bbc6 AC |
8711 | #include "confdefs.h" |
8712 | ||
8713 | int main() { | |
8714 | ||
8715 | ; return 0; } | |
8716 | EOF | |
5b5d99cf | 8717 | if { (eval echo configure:8718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8718 | rm -rf conftest* |
8719 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8720 | else | |
8721 | echo "configure: failed program was:" >&5 | |
8722 | cat conftest.$ac_ext >&5 | |
8723 | fi | |
8724 | rm -f conftest* | |
8725 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8726 | esac |
8727 | done | |
8728 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8729 | fi |
8730 | ||
8731 | ||
104c1213 | 8732 | |
c906108c SS |
8733 | MMALLOC_CFLAGS= |
8734 | MMALLOC= | |
8735 | ||
8736 | ||
8737 | ||
8738 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8739 | if test "${with_mmalloc+set}" = set; then | |
8740 | withval="$with_mmalloc" | |
8741 | case "${withval}" in | |
8742 | yes) want_mmalloc=true ;; | |
8743 | no) want_mmalloc=false;; | |
8744 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8745 | esac | |
8746 | else | |
8747 | want_mmalloc=false | |
8748 | fi | |
8749 | ||
8750 | if test x$want_mmalloc = xtrue; then | |
8751 | cat >> confdefs.h <<\EOF | |
8752 | #define USE_MMALLOC 1 | |
8753 | EOF | |
8754 | ||
8755 | cat >> confdefs.h <<\EOF | |
8756 | #define MMCHECK_FORCE 1 | |
8757 | EOF | |
8758 | ||
8759 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8760 | MMALLOC='../mmalloc/libmmalloc.a' | |
8761 | fi | |
8762 | ||
7a292a7a SS |
8763 | # In the Cygwin environment, we need some additional flags. |
8764 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
5b5d99cf | 8765 | echo "configure:8766: checking for cygwin" >&5 |
7a292a7a SS |
8766 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8767 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8768 | else | |
8769 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 8770 | #line 8771 "configure" |
7a292a7a SS |
8771 | #include "confdefs.h" |
8772 | ||
8773 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8774 | lose | |
8775 | #endif | |
8776 | EOF | |
8777 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8778 | egrep "lose" >/dev/null 2>&1; then | |
8779 | rm -rf conftest* | |
8780 | gdb_cv_os_cygwin=yes | |
8781 | else | |
8782 | rm -rf conftest* | |
8783 | gdb_cv_os_cygwin=no | |
8784 | fi | |
8785 | rm -f conftest* | |
8786 | ||
8787 | fi | |
8788 | ||
8789 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8790 | ||
aff38e61 AC |
8791 | |
8792 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
8793 | case ${host} in | |
95cbc983 AC |
8794 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
8795 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
8796 | esac |
8797 | ||
8798 | ||
cd0fc7c3 SS |
8799 | # libreadline needs libuser32.a in a cygwin environment |
8800 | WIN32LIBS= | |
8801 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
8802 | WIN32LIBS="-luser32" |
8803 | case "${target}" in | |
8804 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
8805 | ;; | |
8806 | esac | |
cd0fc7c3 | 8807 | fi |
c906108c | 8808 | |
7a292a7a | 8809 | |
3fc11d3e JM |
8810 | LIBGUI="../libgui/src/libgui.a" |
8811 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
8812 | ||
8813 | ||
7a292a7a | 8814 | |
3fc11d3e JM |
8815 | WIN32LDAPP= |
8816 | ||
8817 | ||
8818 | ||
8819 | configdir="unix" | |
8820 | ||
8821 | GDBTKLIBS= | |
8822 | if test "${enable_gdbtk}" = "yes"; then | |
8823 | ||
d1c3b63a KS |
8824 | # Gdbtk must have an absolute path to srcdir in order to run |
8825 | # properly when not installed. | |
8826 | here=`pwd` | |
8827 | cd ${srcdir} | |
8828 | GDBTK_SRC_DIR=`pwd` | |
8829 | cd $here | |
8830 | ||
3fc11d3e JM |
8831 | |
8832 | # | |
8833 | # Ok, lets find the tcl configuration | |
8834 | # First, look for one uninstalled. | |
8835 | # the alternative search directory is invoked by --with-tclconfig | |
8836 | # | |
8837 | ||
8838 | if test x"${no_tcl}" = x ; then | |
8839 | # we reset no_tcl in case something fails here | |
8840 | no_tcl=true | |
8841 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
8842 | if test "${with_tclconfig+set}" = set; then | |
8843 | withval="$with_tclconfig" | |
8844 | with_tclconfig=${withval} | |
8845 | fi | |
8846 | ||
8847 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
5b5d99cf | 8848 | echo "configure:8849: checking for Tcl configuration" >&5 |
3fc11d3e JM |
8849 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
8850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8851 | else | |
8852 | ||
8853 | ||
8854 | # First check to see if --with-tclconfig was specified. | |
8855 | if test x"${with_tclconfig}" != x ; then | |
8856 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
8857 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
8858 | else | |
8859 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
8860 | fi | |
8861 | fi | |
8862 | ||
8863 | # then check for a private Tcl installation | |
8864 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8865 | for i in \ | |
8866 | ../tcl \ | |
8867 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
8868 | ../../tcl \ | |
8869 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
8870 | ../../../tcl \ | |
8871 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8872 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8873 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8874 | break | |
8875 | fi | |
8876 | done | |
8877 | fi | |
8878 | # check in a few common install locations | |
8879 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8880 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8881 | if test -f "$i/tclConfig.sh" ; then | |
8882 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
8883 | break | |
8884 | fi | |
8885 | done | |
8886 | fi | |
8887 | # check in a few other private locations | |
8888 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8889 | for i in \ | |
8890 | ${srcdir}/../tcl \ | |
8891 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8892 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8893 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8894 | break | |
8895 | fi | |
8896 | done | |
8897 | fi | |
8898 | ||
8899 | fi | |
8900 | ||
8901 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8902 | TCLCONFIG="# no Tcl configs found" | |
8903 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
8904 | else | |
8905 | no_tcl= | |
8906 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
8907 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
8908 | fi | |
8909 | fi | |
8910 | ||
8911 | if test -z "${no_tcl}"; then | |
8912 | ||
8913 | . $TCLCONFIG | |
8914 | ||
8915 | ||
8916 | ||
8917 | ||
8918 | ||
8919 | ||
8920 | ||
8921 | ||
8922 | ||
8923 | ||
8924 | ||
8925 | ||
8926 | ||
8927 | ||
8928 | ||
8929 | ||
8930 | ||
8931 | ||
8932 | ||
8933 | ||
8934 | ||
8935 | ||
8936 | ||
8937 | ||
8938 | ||
8939 | ||
8940 | # | |
8941 | # Ok, lets find the tk configuration | |
8942 | # First, look for one uninstalled. | |
8943 | # the alternative search directory is invoked by --with-tkconfig | |
8944 | # | |
8945 | ||
8946 | if test x"${no_tk}" = x ; then | |
8947 | # we reset no_tk in case something fails here | |
8948 | no_tk=true | |
8949 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
8950 | if test "${with_tkconfig+set}" = set; then | |
8951 | withval="$with_tkconfig" | |
8952 | with_tkconfig=${withval} | |
8953 | fi | |
8954 | ||
8955 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
5b5d99cf | 8956 | echo "configure:8957: checking for Tk configuration" >&5 |
3fc11d3e JM |
8957 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
8958 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8959 | else | |
8960 | ||
8961 | ||
8962 | # First check to see if --with-tkconfig was specified. | |
8963 | if test x"${with_tkconfig}" != x ; then | |
8964 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
8965 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
8966 | else | |
8967 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
8968 | fi | |
8969 | fi | |
8970 | ||
8971 | # then check for a private Tk library | |
8972 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8973 | for i in \ | |
8974 | ../tk \ | |
8975 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
8976 | ../../tk \ | |
8977 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
8978 | ../../../tk \ | |
8979 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8980 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8981 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8982 | break | |
8983 | fi | |
8984 | done | |
8985 | fi | |
8986 | # check in a few common install locations | |
8987 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8988 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8989 | if test -f "$i/tkConfig.sh" ; then | |
8990 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
8991 | break | |
8992 | fi | |
8993 | done | |
8994 | fi | |
8995 | # check in a few other private locations | |
8996 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8997 | for i in \ | |
8998 | ${srcdir}/../tk \ | |
8999 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9000 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9001 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9002 | break | |
9003 | fi | |
9004 | done | |
9005 | fi | |
9006 | ||
9007 | fi | |
9008 | ||
9009 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9010 | TKCONFIG="# no Tk configs found" | |
9011 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9012 | else | |
9013 | no_tk= | |
9014 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9015 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9016 | fi | |
9017 | fi | |
9018 | ||
9019 | ||
9020 | ||
dd2504ab JM |
9021 | # now look for Tcl library stuff |
9022 | ||
9023 | case "${host}" in | |
9024 | *-*-cygwin*) | |
9025 | tcldir=../tcl/win/ | |
9026 | ;; | |
9027 | *) | |
9028 | tcldir=../tcl/unix/ | |
9029 | ;; | |
9030 | esac | |
9031 | ||
9032 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9033 | ||
3fc11d3e JM |
9034 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9035 | # point to doing Tcl. | |
9036 | if test -z "${no_tk}"; then | |
9037 | ||
9038 | if test -f "$TKCONFIG" ; then | |
9039 | . $TKCONFIG | |
9040 | fi | |
9041 | ||
9042 | ||
9043 | ||
9044 | ||
9045 | ||
9046 | ||
9047 | ||
9048 | ||
9049 | ||
9050 | ||
9051 | ||
9052 | ||
9053 | ||
9054 | ||
9055 | # | |
9056 | # Ok, lets find the tcl source trees so we can use the headers | |
9057 | # Warning: transition of version 9 to 10 will break this algorithm | |
9058 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9059 | # be careful that we don't match stuff like tclX by accident. | |
9060 | # the alternative search directory is involked by --with-tclinclude | |
9061 | # | |
9062 | ||
9063 | no_tcl=true | |
9064 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
5b5d99cf | 9065 | echo "configure:9066: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9066 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9067 | if test "${with_tclinclude+set}" = set; then | |
9068 | withval="$with_tclinclude" | |
9069 | with_tclinclude=${withval} | |
9070 | fi | |
9071 | ||
9072 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9074 | else | |
9075 | ||
9076 | # first check to see if --with-tclinclude was specified | |
9077 | if test x"${with_tclinclude}" != x ; then | |
9078 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9079 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9080 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9081 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9082 | else | |
9083 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9084 | fi | |
9085 | fi | |
9086 | ||
9087 | # next check if it came with Tcl configuration file | |
9088 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9089 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9090 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9091 | fi | |
9092 | fi | |
9093 | ||
9094 | # next check in private source directory | |
9095 | # | |
9096 | # since ls returns lowest version numbers first, reverse its output | |
9097 | if test x"${ac_cv_c_tclh}" = x ; then | |
9098 | for i in \ | |
9099 | ${srcdir}/../tcl \ | |
9100 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9101 | ${srcdir}/../../tcl \ | |
9102 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9103 | ${srcdir}/../../../tcl \ | |
9104 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9105 | if test -f $i/generic/tclInt.h ; then | |
9106 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9107 | break | |
9108 | fi | |
9109 | done | |
9110 | fi | |
9111 | # finally check in a few common install locations | |
9112 | # | |
9113 | # since ls returns lowest version numbers first, reverse its output | |
9114 | if test x"${ac_cv_c_tclh}" = x ; then | |
9115 | for i in \ | |
9116 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9117 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9118 | /usr/local/src/tcl \ | |
9119 | /usr/local/lib/tcl \ | |
9120 | ${prefix}/include ; do | |
9121 | if test -f $i/generic/tclInt.h ; then | |
9122 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9123 | break | |
9124 | fi | |
9125 | done | |
9126 | fi | |
9127 | # see if one is installed | |
9128 | if test x"${ac_cv_c_tclh}" = x ; then | |
9129 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9130 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
5b5d99cf | 9131 | echo "configure:9132: checking for tclInt.h" >&5 |
3fc11d3e JM |
9132 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9134 | else | |
9135 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 9136 | #line 9137 "configure" |
3fc11d3e JM |
9137 | #include "confdefs.h" |
9138 | #include <tclInt.h> | |
9139 | EOF | |
9140 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 9141 | { (eval echo configure:9142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9142 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9143 | if test -z "$ac_err"; then | |
9144 | rm -rf conftest* | |
9145 | eval "ac_cv_header_$ac_safe=yes" | |
9146 | else | |
9147 | echo "$ac_err" >&5 | |
9148 | echo "configure: failed program was:" >&5 | |
9149 | cat conftest.$ac_ext >&5 | |
9150 | rm -rf conftest* | |
9151 | eval "ac_cv_header_$ac_safe=no" | |
9152 | fi | |
9153 | rm -f conftest* | |
9154 | fi | |
9155 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9156 | echo "$ac_t""yes" 1>&6 | |
9157 | ac_cv_c_tclh=installed | |
9158 | else | |
9159 | echo "$ac_t""no" 1>&6 | |
9160 | ac_cv_c_tclh="" | |
9161 | fi | |
9162 | ||
9163 | fi | |
9164 | ||
9165 | fi | |
9166 | ||
9167 | if test x"${ac_cv_c_tclh}" = x ; then | |
9168 | TCLHDIR="# no Tcl private headers found" | |
9169 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9170 | fi | |
9171 | if test x"${ac_cv_c_tclh}" != x ; then | |
9172 | no_tcl="" | |
9173 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9174 | echo "$ac_t""is installed" 1>&6 | |
9175 | TCLHDIR="" | |
9176 | else | |
9177 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9178 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9179 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9180 | fi | |
9181 | fi | |
9182 | ||
9183 | ||
9184 | ||
9185 | ||
9186 | # | |
9187 | # Ok, lets find the tk source trees so we can use the headers | |
9188 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9189 | # in preference to any others. Same logic is used when choosing library | |
9190 | # and again with Tcl. The search order is the best place to look first, then in | |
9191 | # decreasing significance. The loop breaks if the trigger file is found. | |
9192 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9193 | # directory. This converts the path from a relative to an absolute, so | |
9194 | # recursive cache variables for the path will work right. We check all | |
9195 | # the possible paths in one loop rather than many seperate loops to speed | |
9196 | # things up. | |
9197 | # the alternative search directory is involked by --with-tkinclude | |
9198 | # | |
9199 | no_tk=true | |
9200 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
5b5d99cf | 9201 | echo "configure:9202: checking for Tk private headers" >&5 |
3fc11d3e JM |
9202 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9203 | if test "${with_tkinclude+set}" = set; then | |
9204 | withval="$with_tkinclude" | |
9205 | with_tkinclude=${withval} | |
9206 | fi | |
9207 | ||
9208 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9209 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9210 | else | |
9211 | ||
9212 | # first check to see if --with-tkinclude was specified | |
9213 | if test x"${with_tkinclude}" != x ; then | |
9214 | if test -f ${with_tkinclude}/tk.h ; then | |
9215 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9216 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9217 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9218 | else | |
9219 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9220 | fi | |
9221 | fi | |
9222 | ||
9223 | # next check if it came with Tk configuration file | |
9224 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9225 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9226 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9227 | fi | |
9228 | fi | |
9229 | ||
9230 | # next check in private source directory | |
9231 | # | |
9232 | # since ls returns lowest version numbers first, reverse its output | |
9233 | if test x"${ac_cv_c_tkh}" = x ; then | |
9234 | for i in \ | |
9235 | ${srcdir}/../tk \ | |
9236 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9237 | ${srcdir}/../../tk \ | |
9238 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9239 | ${srcdir}/../../../tk \ | |
9240 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9241 | if test -f $i/generic/tk.h ; then | |
9242 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9243 | break | |
9244 | fi | |
9245 | done | |
9246 | fi | |
9247 | # finally check in a few common install locations | |
9248 | # | |
9249 | # since ls returns lowest version numbers first, reverse its output | |
9250 | if test x"${ac_cv_c_tkh}" = x ; then | |
9251 | for i in \ | |
9252 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9253 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9254 | /usr/local/src/tk \ | |
9255 | /usr/local/lib/tk \ | |
9256 | ${prefix}/include ; do | |
9257 | if test -f $i/generic/tk.h ; then | |
9258 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9259 | break | |
9260 | fi | |
9261 | done | |
9262 | fi | |
9263 | # see if one is installed | |
9264 | if test x"${ac_cv_c_tkh}" = x ; then | |
9265 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9266 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
5b5d99cf | 9267 | echo "configure:9268: checking for tk.h" >&5 |
3fc11d3e JM |
9268 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9270 | else | |
9271 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 9272 | #line 9273 "configure" |
3fc11d3e JM |
9273 | #include "confdefs.h" |
9274 | #include <tk.h> | |
9275 | EOF | |
9276 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 9277 | { (eval echo configure:9278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9278 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9279 | if test -z "$ac_err"; then | |
9280 | rm -rf conftest* | |
9281 | eval "ac_cv_header_$ac_safe=yes" | |
9282 | else | |
9283 | echo "$ac_err" >&5 | |
9284 | echo "configure: failed program was:" >&5 | |
9285 | cat conftest.$ac_ext >&5 | |
9286 | rm -rf conftest* | |
9287 | eval "ac_cv_header_$ac_safe=no" | |
9288 | fi | |
9289 | rm -f conftest* | |
9290 | fi | |
9291 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9292 | echo "$ac_t""yes" 1>&6 | |
9293 | ac_cv_c_tkh=installed | |
9294 | else | |
9295 | echo "$ac_t""no" 1>&6 | |
9296 | ac_cv_c_tkh="" | |
9297 | fi | |
9298 | ||
9299 | fi | |
9300 | ||
9301 | fi | |
9302 | ||
9303 | if test x"${ac_cv_c_tkh}" != x ; then | |
9304 | no_tk="" | |
9305 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9306 | echo "$ac_t""is installed" 1>&6 | |
9307 | TKHDIR="" | |
9308 | else | |
9309 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9310 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9311 | TKHDIR="-I${ac_cv_c_tkh}" | |
9312 | fi | |
9313 | else | |
9314 | TKHDIR="# no Tk directory found" | |
9315 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9316 | no_tk=true | |
9317 | fi | |
9318 | ||
9319 | ||
9320 | ||
9321 | ||
9322 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
5b5d99cf | 9323 | echo "configure:9324: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9324 | if test x"${ac_cv_c_itclh}" = x ; then |
9325 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9326 | if test -f $i/generic/itcl.h ; then | |
9327 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9328 | break | |
9329 | fi | |
9330 | done | |
9331 | fi | |
9332 | if test x"${ac_cv_c_itclh}" = x ; then | |
9333 | ITCLHDIR="# no Itcl private headers found" | |
9334 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9335 | fi | |
9336 | if test x"${ac_cv_c_itclh}" != x ; then | |
9337 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9338 | fi | |
9339 | # should always be here | |
9340 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9341 | ||
9342 | #AC_SUBST(ITCLLIB) | |
9343 | ||
9344 | ||
9345 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
5b5d99cf | 9346 | echo "configure:9347: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9347 | if test x"${ac_cv_c_itkh}" = x ; then |
9348 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9349 | if test -f $i/generic/itk.h ; then | |
9350 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9351 | break | |
9352 | fi | |
9353 | done | |
9354 | fi | |
9355 | if test x"${ac_cv_c_itkh}" = x ; then | |
9356 | ITKHDIR="# no Itk private headers found" | |
9357 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9358 | fi | |
9359 | if test x"${ac_cv_c_itkh}" != x ; then | |
9360 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9361 | fi | |
9362 | # should always be here | |
9363 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9364 | ||
9365 | #AC_SUBST(ITKLIB) | |
9366 | ||
3fc11d3e | 9367 | |
dd2504ab JM |
9368 | |
9369 | # now look for Tk library stuff | |
9370 | ||
9371 | case "${host}" in | |
9372 | *-*-cygwin*) | |
9373 | tkdir=../tk/win/ | |
9374 | ;; | |
9375 | *) | |
9376 | tkdir=../tk/unix/ | |
9377 | ;; | |
9378 | esac | |
9379 | ||
9380 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9381 | ||
3fc11d3e JM |
9382 | # now look for Itcl library stuff |
9383 | ||
9384 | ||
9385 | # | |
9386 | # Ok, lets find the itcl configuration | |
9387 | # First, look for one uninstalled. | |
9388 | # the alternative search directory is invoked by --with-itclconfig | |
9389 | # | |
9390 | ||
9391 | if test x"${no_itcl}" = x ; then | |
9392 | # we reset no_itcl in case something fails here | |
9393 | no_itcl=true | |
9394 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9395 | if test "${with_itclconfig+set}" = set; then | |
9396 | withval="$with_itclconfig" | |
9397 | with_itclconfig=${withval} | |
9398 | fi | |
9399 | ||
9400 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
5b5d99cf | 9401 | echo "configure:9402: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9402 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9403 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9404 | else | |
9405 | ||
9406 | ||
9407 | # First check to see if --with-itclconfig was specified. | |
9408 | if test x"${with_itclconfig}" != x ; then | |
9409 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9410 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9411 | else | |
9412 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9413 | fi | |
9414 | fi | |
9415 | ||
9416 | # then check for a private Itcl library | |
9417 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9418 | for i in \ | |
9419 | ../itcl/itcl \ | |
9420 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9421 | ../../itcl \ | |
9422 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9423 | ../../../itcl \ | |
9424 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9425 | if test -f "$i/itclConfig.sh" ; then | |
9426 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9427 | break | |
9428 | fi | |
9429 | done | |
9430 | fi | |
9431 | # check in a few common install locations | |
9432 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9433 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9434 | if test -f "$i/itclConfig.sh" ; then | |
9435 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9436 | break | |
9437 | fi | |
9438 | done | |
9439 | fi | |
9440 | # check in a few other private locations | |
9441 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9442 | for i in \ | |
9443 | ${srcdir}/../itcl/itcl \ | |
9444 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9445 | if test -f "$i/itclConfig.sh" ; then | |
9446 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9447 | break | |
9448 | fi | |
9449 | done | |
9450 | fi | |
9451 | ||
9452 | fi | |
9453 | ||
9454 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9455 | ITCLCONFIG="# no Itcl configs found" | |
9456 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9457 | else | |
9458 | no_itcl= | |
9459 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9460 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9461 | fi | |
9462 | fi | |
9463 | ||
9464 | if test -z "${no_itcl}"; then | |
9465 | ||
9466 | if test -f "$ITCLCONFIG" ; then | |
9467 | . $ITCLCONFIG | |
9468 | fi | |
9469 | ||
9470 | ||
9471 | ||
9472 | ||
9473 | ||
9474 | ||
9475 | ||
9476 | ||
9477 | ||
9478 | ||
3fc11d3e JM |
9479 | |
9480 | ||
9481 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9482 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9483 | fi |
9484 | ||
9485 | ||
9486 | # now look for Itk library stuff | |
9487 | ||
9488 | # | |
9489 | # Ok, lets find the itk configuration | |
9490 | # First, look for one uninstalled. | |
9491 | # the alternative search directory is invoked by --with-itkconfig | |
9492 | # | |
9493 | ||
9494 | if test x"${no_itk}" = x ; then | |
9495 | # we reset no_itk in case something fails here | |
9496 | no_itk=true | |
9497 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9498 | if test "${with_itkconfig+set}" = set; then | |
9499 | withval="$with_itkconfig" | |
9500 | with_itkconfig=${withval} | |
9501 | fi | |
9502 | ||
9503 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
5b5d99cf | 9504 | echo "configure:9505: checking for Itk configuration" >&5 |
3fc11d3e JM |
9505 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9506 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9507 | else | |
9508 | ||
9509 | ||
9510 | # First check to see if --with-itkconfig was specified. | |
9511 | if test x"${with_itkconfig}" != x ; then | |
9512 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9513 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9514 | else | |
9515 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9516 | fi | |
9517 | fi | |
9518 | ||
9519 | # then check for a private Itk library | |
9520 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9521 | for i in \ | |
9522 | ../itcl/itk \ | |
9523 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9524 | ../../itk \ | |
9525 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9526 | ../../../itk \ | |
9527 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9528 | if test -f "$i/itkConfig.sh" ; then | |
9529 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9530 | break | |
9531 | fi | |
9532 | done | |
9533 | fi | |
9534 | # check in a few common install locations | |
9535 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9536 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9537 | if test -f "$i/itkConfig.sh" ; then | |
9538 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9539 | break | |
9540 | fi | |
9541 | done | |
9542 | fi | |
9543 | # check in a few other private locations | |
9544 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9545 | for i in \ | |
9546 | ${srcdir}/../itcl/itk \ | |
9547 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9548 | if test -f "$i/itkConfig.sh" ; then | |
9549 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9550 | break | |
9551 | fi | |
9552 | done | |
9553 | fi | |
9554 | ||
9555 | fi | |
9556 | ||
9557 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9558 | ITKCONFIG="# no Itk configs found" | |
9559 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9560 | else | |
9561 | no_itk= | |
9562 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9563 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9564 | fi | |
9565 | fi | |
9566 | ||
9567 | ||
9568 | if test -z "${no_itcl}"; then | |
9569 | ||
9570 | if test -f "$ITKCONFIG" ; then | |
9571 | . $ITKCONFIG | |
9572 | fi | |
9573 | ||
9574 | ||
9575 | ||
9576 | ||
9577 | ||
9578 | ||
9579 | ||
9580 | ||
9581 | ||
9582 | ||
9583 | ||
9584 | ||
3fc11d3e | 9585 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9586 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9587 | fi |
9588 | ||
4226a5a5 | 9589 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9590 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9591 | # know whether 8.2 will or not, but I bet it will. | |
9592 | # I don't have to worry about 7.x since we don't support it. | |
9593 | GDBTK_CFLAGS="" | |
9594 | if test "$GCC" = "yes"; then | |
9595 | if test "$TCL_VERSION" != "8.0" ; then | |
9596 | GDBTK_CFLAGS="-fwritable-strings" | |
9597 | fi | |
9598 | fi | |
9599 | ||
9600 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9601 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9602 | # Yes, the ordering seems wrong here. But it isn't. |
9603 | # TK_LIBS is the list of libraries that need to be linked | |
9604 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9605 | # were in LIBS then any link tests after this point would | |
9606 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9607 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9608 | |
9609 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9610 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9611 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9612 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9613 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9614 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9615 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9616 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9617 | |
9618 | if test x$gdb_cv_os_cygwin = xyes; then | |
9619 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9620 | WIN32LDAPP="-Wl,--subsystem,console" | |
9621 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9622 | fi | |
9623 | fi | |
9624 | fi | |
ffc6a242 | 9625 | |
ffc6a242 | 9626 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
9627 | fi |
9628 | ||
9629 | ||
9630 | ||
9631 | ||
9632 | ||
9633 | ||
9634 | ||
9635 | ||
9636 | ||
9637 | ||
9638 | ||
9639 | ||
9640 | ||
dd2504ab | 9641 | |
c906108c SS |
9642 | # If we find X, set shell vars x_includes and x_libraries to the |
9643 | # paths, otherwise set no_x=yes. | |
9644 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9645 | # --without-x overrides everything else, but does not touch the cache. | |
9646 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
5b5d99cf | 9647 | echo "configure:9648: checking for X" >&5 |
c906108c SS |
9648 | |
9649 | # Check whether --with-x or --without-x was given. | |
9650 | if test "${with_x+set}" = set; then | |
9651 | withval="$with_x" | |
9652 | : | |
9653 | fi | |
9654 | ||
9655 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9656 | if test "x$with_x" = xno; then | |
9657 | # The user explicitly disabled X. | |
9658 | have_x=disabled | |
9659 | else | |
9660 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9661 | # Both variables are already set. | |
9662 | have_x=yes | |
9663 | else | |
9664 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9665 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9666 | else | |
9667 | # One or both of the vars are not set, and there is no cached value. | |
9668 | ac_x_includes=NO ac_x_libraries=NO | |
9669 | rm -fr conftestdir | |
9670 | if mkdir conftestdir; then | |
9671 | cd conftestdir | |
9672 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9673 | cat > Imakefile <<'EOF' | |
9674 | acfindx: | |
9675 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9676 | EOF | |
9677 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9678 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9679 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9680 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9681 | for ac_extension in a so sl; do | |
9682 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9683 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9684 | ac_im_usrlibdir=$ac_im_libdir; break | |
9685 | fi | |
9686 | done | |
9687 | # Screen out bogus values from the imake configuration. They are | |
9688 | # bogus both because they are the default anyway, and because | |
9689 | # using them would break gcc on systems where it needs fixed includes. | |
9690 | case "$ac_im_incroot" in | |
9691 | /usr/include) ;; | |
9692 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9693 | esac | |
9694 | case "$ac_im_usrlibdir" in | |
9695 | /usr/lib | /lib) ;; | |
9696 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9697 | esac | |
9698 | fi | |
9699 | cd .. | |
9700 | rm -fr conftestdir | |
9701 | fi | |
9702 | ||
9703 | if test "$ac_x_includes" = NO; then | |
9704 | # Guess where to find include files, by looking for this one X11 .h file. | |
9705 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9706 | ||
9707 | # First, try using that file with no special directory specified. | |
9708 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 9709 | #line 9710 "configure" |
c906108c SS |
9710 | #include "confdefs.h" |
9711 | #include <$x_direct_test_include> | |
9712 | EOF | |
9713 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5b5d99cf | 9714 | { (eval echo configure:9715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9715 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9716 | if test -z "$ac_err"; then | |
9717 | rm -rf conftest* | |
9718 | # We can compile using X headers with no special include directory. | |
9719 | ac_x_includes= | |
9720 | else | |
9721 | echo "$ac_err" >&5 | |
9722 | echo "configure: failed program was:" >&5 | |
9723 | cat conftest.$ac_ext >&5 | |
9724 | rm -rf conftest* | |
9725 | # Look for the header file in a standard set of common directories. | |
9726 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9727 | for ac_dir in \ | |
9728 | /usr/X11/include \ | |
9729 | /usr/X11R6/include \ | |
9730 | /usr/X11R5/include \ | |
9731 | /usr/X11R4/include \ | |
9732 | \ | |
9733 | /usr/include/X11 \ | |
9734 | /usr/include/X11R6 \ | |
9735 | /usr/include/X11R5 \ | |
9736 | /usr/include/X11R4 \ | |
9737 | \ | |
9738 | /usr/local/X11/include \ | |
9739 | /usr/local/X11R6/include \ | |
9740 | /usr/local/X11R5/include \ | |
9741 | /usr/local/X11R4/include \ | |
9742 | \ | |
9743 | /usr/local/include/X11 \ | |
9744 | /usr/local/include/X11R6 \ | |
9745 | /usr/local/include/X11R5 \ | |
9746 | /usr/local/include/X11R4 \ | |
9747 | \ | |
9748 | /usr/X386/include \ | |
9749 | /usr/x386/include \ | |
9750 | /usr/XFree86/include/X11 \ | |
9751 | \ | |
9752 | /usr/include \ | |
9753 | /usr/local/include \ | |
9754 | /usr/unsupported/include \ | |
9755 | /usr/athena/include \ | |
9756 | /usr/local/x11r5/include \ | |
9757 | /usr/lpp/Xamples/include \ | |
9758 | \ | |
9759 | /usr/openwin/include \ | |
9760 | /usr/openwin/share/include \ | |
9761 | ; \ | |
9762 | do | |
9763 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9764 | ac_x_includes=$ac_dir | |
9765 | break | |
9766 | fi | |
9767 | done | |
9768 | fi | |
9769 | rm -f conftest* | |
9770 | fi # $ac_x_includes = NO | |
9771 | ||
9772 | if test "$ac_x_libraries" = NO; then | |
9773 | # Check for the libraries. | |
9774 | ||
9775 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9776 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9777 | ||
9778 | # See if we find them without any special options. | |
9779 | # Don't add to $LIBS permanently. | |
9780 | ac_save_LIBS="$LIBS" | |
9781 | LIBS="-l$x_direct_test_library $LIBS" | |
9782 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 9783 | #line 9784 "configure" |
c906108c SS |
9784 | #include "confdefs.h" |
9785 | ||
9786 | int main() { | |
9787 | ${x_direct_test_function}() | |
9788 | ; return 0; } | |
9789 | EOF | |
5b5d99cf | 9790 | if { (eval echo configure:9791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9791 | rm -rf conftest* |
9792 | LIBS="$ac_save_LIBS" | |
9793 | # We can link X programs with no special library path. | |
9794 | ac_x_libraries= | |
9795 | else | |
9796 | echo "configure: failed program was:" >&5 | |
9797 | cat conftest.$ac_ext >&5 | |
9798 | rm -rf conftest* | |
9799 | LIBS="$ac_save_LIBS" | |
9800 | # First see if replacing the include by lib works. | |
9801 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9802 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
9803 | /usr/X11/lib \ | |
9804 | /usr/X11R6/lib \ | |
9805 | /usr/X11R5/lib \ | |
9806 | /usr/X11R4/lib \ | |
9807 | \ | |
9808 | /usr/lib/X11 \ | |
9809 | /usr/lib/X11R6 \ | |
9810 | /usr/lib/X11R5 \ | |
9811 | /usr/lib/X11R4 \ | |
9812 | \ | |
9813 | /usr/local/X11/lib \ | |
9814 | /usr/local/X11R6/lib \ | |
9815 | /usr/local/X11R5/lib \ | |
9816 | /usr/local/X11R4/lib \ | |
9817 | \ | |
9818 | /usr/local/lib/X11 \ | |
9819 | /usr/local/lib/X11R6 \ | |
9820 | /usr/local/lib/X11R5 \ | |
9821 | /usr/local/lib/X11R4 \ | |
9822 | \ | |
9823 | /usr/X386/lib \ | |
9824 | /usr/x386/lib \ | |
9825 | /usr/XFree86/lib/X11 \ | |
9826 | \ | |
9827 | /usr/lib \ | |
9828 | /usr/local/lib \ | |
9829 | /usr/unsupported/lib \ | |
9830 | /usr/athena/lib \ | |
9831 | /usr/local/x11r5/lib \ | |
9832 | /usr/lpp/Xamples/lib \ | |
9833 | /lib/usr/lib/X11 \ | |
9834 | \ | |
9835 | /usr/openwin/lib \ | |
9836 | /usr/openwin/share/lib \ | |
9837 | ; \ | |
9838 | do | |
9839 | for ac_extension in a so sl; do | |
9840 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
9841 | ac_x_libraries=$ac_dir | |
9842 | break 2 | |
9843 | fi | |
9844 | done | |
9845 | done | |
9846 | fi | |
9847 | rm -f conftest* | |
9848 | fi # $ac_x_libraries = NO | |
9849 | ||
9850 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
9851 | # Didn't find X anywhere. Cache the known absence of X. | |
9852 | ac_cv_have_x="have_x=no" | |
9853 | else | |
9854 | # Record where we found X for the cache. | |
9855 | ac_cv_have_x="have_x=yes \ | |
9856 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
9857 | fi | |
9858 | fi | |
9859 | fi | |
9860 | eval "$ac_cv_have_x" | |
9861 | fi # $with_x != no | |
9862 | ||
9863 | if test "$have_x" != yes; then | |
9864 | echo "$ac_t""$have_x" 1>&6 | |
9865 | no_x=yes | |
9866 | else | |
9867 | # If each of the values was on the command line, it overrides each guess. | |
9868 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9869 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9870 | # Update the cache value to reflect the command line values. | |
9871 | ac_cv_have_x="have_x=yes \ | |
9872 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
9873 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
9874 | fi | |
9875 | ||
9876 | ||
7a292a7a SS |
9877 | |
9878 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
9879 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
9880 | # This code just checks for a few cases where we'd like to ignore those | |
9881 | # definitions, even when they're present in the '.mt' file. These cases | |
9882 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 9883 | # not part of the source tree. |
7a292a7a SS |
9884 | # |
9885 | # Check whether --enable-sim or --disable-sim was given. | |
9886 | if test "${enable_sim+set}" = set; then | |
9887 | enableval="$enable_sim" | |
9888 | echo "enable_sim = $enable_sim"; | |
9889 | echo "enableval = ${enableval}"; | |
9890 | case "${enableval}" in | |
9891 | yes) ignore_sim=false ;; | |
9892 | no) ignore_sim=true ;; | |
9893 | *) ignore_sim=false ;; | |
9894 | esac | |
9895 | else | |
9896 | ignore_sim=false | |
9897 | fi | |
9898 | ||
9899 | ||
9900 | if test ! -d "${srcdir}/../sim"; then | |
9901 | ignore_sim=true | |
9902 | fi | |
9903 | ||
9904 | if test "${ignore_sim}" = "true"; then | |
9905 | IGNORE_SIM="SIM=" | |
9906 | IGNORE_SIM_OBS="SIM_OBS=" | |
9907 | else | |
9908 | IGNORE_SIM="" | |
9909 | IGNORE_SIM_OBS="" | |
9910 | cat >> confdefs.h <<\EOF | |
9911 | #define WITH_SIM 1 | |
9912 | EOF | |
9913 | ||
9914 | fi | |
9915 | ||
9916 | ||
9917 | ||
c906108c SS |
9918 | |
9919 | ||
9920 | ||
9921 | ||
9922 | ||
9923 | ||
dfcd3bfb | 9924 | |
e56ac5c3 AC |
9925 | |
9926 | ||
b3a90332 AC |
9927 | |
9928 | ||
b46cd165 | 9929 | |
d28f9cdf | 9930 | |
c906108c SS |
9931 | # target_subdir is used by the testsuite to find the target libraries. |
9932 | target_subdir= | |
9933 | if test "${host}" != "${target}"; then | |
9934 | target_subdir="${target_alias}/" | |
9935 | fi | |
9936 | ||
9937 | ||
9938 | frags= | |
9939 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
9940 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
9941 | # When building a native debuger the .mh file containing things |
9942 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
9943 | # since it no longer contains anything useful. | |
9944 | if test "${target}" = "${host}"; then | |
9945 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
9946 | else | |
9947 | host_makefile_frag=/dev/null | |
9948 | fi | |
c906108c SS |
9949 | fi |
9950 | frags="$frags $host_makefile_frag" | |
9951 | ||
9952 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
9953 | if test ! -f ${target_makefile_frag}; then | |
9954 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
9955 | fi | |
9956 | frags="$frags $target_makefile_frag" | |
9957 | ||
9958 | ||
9959 | ||
9960 | ||
9961 | ||
9962 | hostfile=`sed -n ' | |
9963 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9964 | ' ${host_makefile_frag}` | |
9965 | ||
9966 | targetfile=`sed -n ' | |
9967 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9968 | ' ${target_makefile_frag}` | |
9969 | ||
6166d547 AC |
9970 | GDB_MULTI_ARCH=`sed -n ' |
9971 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
9972 | ' ${target_makefile_frag}` | |
9973 | ||
c906108c | 9974 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
9975 | # We pick this up from the host configuration file (.mh) because we |
9976 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
9977 | nativefile=`sed -n ' |
9978 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9979 | ' ${host_makefile_frag}` | |
c906108c SS |
9980 | fi |
9981 | ||
9982 | ||
6166d547 AC |
9983 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
9984 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
9985 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
9986 | # will be the default. | |
9987 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
9988 | case "${gdb_multi_arch}" in | |
9989 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
9990 | no ) GDB_MULTI_ARCH=0 ;; | |
9991 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
9992 | esac | |
9993 | fi | |
9994 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
9995 | cat >> confdefs.h <<EOF | |
9996 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
9997 | EOF | |
9998 | ||
9999 | fi | |
6c5cfe5b | 10000 | # Warn the user when they use an old practice |
6166d547 AC |
10001 | case "${GDB_MULTI_ARCH}" in |
10002 | "" ) ;; | |
10003 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
10004 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
10005 | GDB_MULTI_ARCH_PURE ) | |
10006 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 10007 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 10008 | targetfile="" |
6166d547 AC |
10009 | fi ;; |
10010 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
10011 | esac | |
10012 | ||
b00a8037 DJ |
10013 | if test x"${gdb_osabi}" != x ; then |
10014 | cat >> confdefs.h <<EOF | |
10015 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10016 | EOF | |
10017 | ||
10018 | fi | |
10019 | ||
8dcde887 MK |
10020 | # Enable multi-ice-gdb-server. |
10021 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10022 | if test "${enable_multi_ice+set}" = set; then | |
10023 | enableval="$enable_multi_ice" | |
10024 | case $enableval in | |
10025 | yes | no) | |
10026 | ;; | |
10027 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10028 | esac | |
96baa820 JM |
10029 | fi |
10030 | ||
8dcde887 MK |
10031 | if test "x$enable_multi_ice" = xyes; then |
10032 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10033 | fi |
10034 | ||
8dcde887 MK |
10035 | # We only build gdbserver automatically if host and target are the same. |
10036 | if test "x$target" = "x$host"; then | |
10037 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
5b5d99cf | 10038 | echo "configure:10039: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10039 | if test "x$build_gdbserver" = xyes; then |
10040 | configdirs="$configdirs gdbserver" | |
10041 | echo "$ac_t""yes" 1>&6 | |
10042 | else | |
10043 | echo "$ac_t""no" 1>&6 | |
10044 | fi | |
10045 | fi | |
10046 | ||
10047 | subdirs="doc testsuite $configdirs" | |
10048 | ||
96baa820 | 10049 | |
c906108c | 10050 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10051 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10052 | # version. | |
c906108c SS |
10053 | |
10054 | files= | |
10055 | links= | |
5a2402b8 | 10056 | |
c906108c | 10057 | rm -f xm.h |
5a2402b8 | 10058 | xm_h="" |
c906108c | 10059 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10060 | xm_h=xm.h |
10061 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10062 | files="${files} ${GDB_XM_FILE}" | |
10063 | links="${links} xm.h" | |
10064 | cat >> confdefs.h <<EOF | |
10065 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10066 | EOF | |
10067 | ||
c906108c | 10068 | fi |
5a2402b8 AC |
10069 | |
10070 | ||
c906108c | 10071 | rm -f tm.h |
5a2402b8 | 10072 | tm_h="" |
c906108c | 10073 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10074 | tm_h=tm.h |
10075 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10076 | files="${files} ${GDB_TM_FILE}" | |
10077 | links="${links} tm.h" | |
10078 | cat >> confdefs.h <<EOF | |
10079 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10080 | EOF | |
10081 | ||
c906108c | 10082 | fi |
5a2402b8 AC |
10083 | |
10084 | ||
c906108c | 10085 | rm -f nm.h |
5a2402b8 | 10086 | nm_h="" |
c906108c | 10087 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10088 | nm_h=nm.h |
10089 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10090 | files="${files} ${GDB_NM_FILE}" | |
10091 | links="${links} nm.h" | |
10092 | cat >> confdefs.h <<EOF | |
10093 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10094 | EOF | |
10095 | ||
c906108c | 10096 | fi |
5a2402b8 AC |
10097 | |
10098 | ||
c906108c SS |
10099 | |
10100 | ||
10101 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
5b5d99cf | 10102 | echo "configure:10103: checking for Cygwin environment" >&5 |
c906108c SS |
10103 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10104 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10105 | else | |
10106 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 10107 | #line 10108 "configure" |
c906108c SS |
10108 | #include "confdefs.h" |
10109 | ||
10110 | int main() { | |
10111 | ||
10112 | #ifndef __CYGWIN__ | |
10113 | #define __CYGWIN__ __CYGWIN32__ | |
10114 | #endif | |
10115 | return __CYGWIN__; | |
10116 | ; return 0; } | |
10117 | EOF | |
5b5d99cf | 10118 | if { (eval echo configure:10119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10119 | rm -rf conftest* |
10120 | ac_cv_cygwin=yes | |
10121 | else | |
10122 | echo "configure: failed program was:" >&5 | |
10123 | cat conftest.$ac_ext >&5 | |
10124 | rm -rf conftest* | |
10125 | ac_cv_cygwin=no | |
10126 | fi | |
10127 | rm -f conftest* | |
10128 | rm -f conftest* | |
10129 | fi | |
10130 | ||
10131 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10132 | CYGWIN= | |
10133 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10134 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
5b5d99cf | 10135 | echo "configure:10136: checking for mingw32 environment" >&5 |
c906108c SS |
10136 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10137 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10138 | else | |
10139 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 10140 | #line 10141 "configure" |
c906108c SS |
10141 | #include "confdefs.h" |
10142 | ||
10143 | int main() { | |
10144 | return __MINGW32__; | |
10145 | ; return 0; } | |
10146 | EOF | |
5b5d99cf | 10147 | if { (eval echo configure:10148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10148 | rm -rf conftest* |
10149 | ac_cv_mingw32=yes | |
10150 | else | |
10151 | echo "configure: failed program was:" >&5 | |
10152 | cat conftest.$ac_ext >&5 | |
10153 | rm -rf conftest* | |
10154 | ac_cv_mingw32=no | |
10155 | fi | |
10156 | rm -f conftest* | |
10157 | rm -f conftest* | |
10158 | fi | |
10159 | ||
10160 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10161 | MINGW32= | |
10162 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10163 | ||
10164 | ||
10165 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
5b5d99cf | 10166 | echo "configure:10167: checking for executable suffix" >&5 |
c906108c SS |
10167 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10168 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10169 | else | |
10170 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10171 | ac_cv_exeext=.exe | |
10172 | else | |
10173 | rm -f conftest* | |
10174 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10175 | ac_cv_exeext= | |
5b5d99cf | 10176 | if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10177 | for file in conftest.*; do |
10178 | case $file in | |
b00a8037 | 10179 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10180 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10181 | esac | |
10182 | done | |
10183 | else | |
10184 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10185 | fi | |
10186 | rm -f conftest* | |
10187 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10188 | fi | |
10189 | fi | |
10190 | ||
10191 | EXEEXT="" | |
10192 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10193 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10194 | ac_exeext=$EXEEXT | |
10195 | ||
10196 | ||
234b45d4 KB |
10197 | |
10198 | cat >> confdefs.h <<\EOF | |
10199 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10200 | EOF | |
10201 | ||
10202 | ||
10203 | ||
10204 | ||
10205 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10206 | if test "${with_libiconv_prefix+set}" = set; then | |
10207 | withval="$with_libiconv_prefix" | |
10208 | ||
10209 | for dir in `echo "$withval" | tr : ' '`; do | |
10210 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10211 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10212 | done | |
10213 | ||
10214 | fi | |
10215 | ||
10216 | ||
10217 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
5b5d99cf | 10218 | echo "configure:10219: checking for iconv" >&5 |
234b45d4 KB |
10219 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10220 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10221 | else | |
10222 | ||
10223 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10224 | am_cv_lib_iconv=no | |
10225 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 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 | |
5b5d99cf | 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_func_iconv=yes | |
10239 | else | |
10240 | echo "configure: failed program was:" >&5 | |
10241 | cat conftest.$ac_ext >&5 | |
10242 | fi | |
10243 | rm -f conftest* | |
10244 | if test "$am_cv_func_iconv" != yes; then | |
10245 | am_save_LIBS="$LIBS" | |
10246 | LIBS="$LIBS -liconv" | |
10247 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 10248 | #line 10249 "configure" |
234b45d4 KB |
10249 | #include "confdefs.h" |
10250 | #include <stdlib.h> | |
10251 | #include <iconv.h> | |
10252 | int main() { | |
10253 | iconv_t cd = iconv_open("",""); | |
10254 | iconv(cd,NULL,NULL,NULL,NULL); | |
10255 | iconv_close(cd); | |
10256 | ; return 0; } | |
10257 | EOF | |
5b5d99cf | 10258 | if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10259 | rm -rf conftest* |
10260 | am_cv_lib_iconv=yes | |
10261 | am_cv_func_iconv=yes | |
10262 | else | |
10263 | echo "configure: failed program was:" >&5 | |
10264 | cat conftest.$ac_ext >&5 | |
10265 | fi | |
10266 | rm -f conftest* | |
10267 | LIBS="$am_save_LIBS" | |
10268 | fi | |
10269 | ||
10270 | fi | |
10271 | ||
10272 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10273 | if test "$am_cv_func_iconv" = yes; then | |
10274 | cat >> confdefs.h <<\EOF | |
10275 | #define HAVE_ICONV 1 | |
10276 | EOF | |
10277 | ||
10278 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
5b5d99cf | 10279 | echo "configure:10280: checking for iconv declaration" >&5 |
234b45d4 KB |
10280 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10281 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10282 | else | |
10283 | ||
10284 | cat > conftest.$ac_ext <<EOF | |
5b5d99cf | 10285 | #line 10286 "configure" |
234b45d4 KB |
10286 | #include "confdefs.h" |
10287 | ||
10288 | #include <stdlib.h> | |
10289 | #include <iconv.h> | |
10290 | extern | |
10291 | #ifdef __cplusplus | |
10292 | "C" | |
10293 | #endif | |
10294 | #if defined(__STDC__) || defined(__cplusplus) | |
10295 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10296 | #else | |
10297 | size_t iconv(); | |
10298 | #endif | |
10299 | ||
10300 | int main() { | |
10301 | ||
10302 | ; return 0; } | |
10303 | EOF | |
5b5d99cf | 10304 | if { (eval echo configure:10305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10305 | rm -rf conftest* |
10306 | am_cv_proto_iconv_arg1="" | |
10307 | else | |
10308 | echo "configure: failed program was:" >&5 | |
10309 | cat conftest.$ac_ext >&5 | |
10310 | rm -rf conftest* | |
10311 | am_cv_proto_iconv_arg1="const" | |
10312 | fi | |
10313 | rm -f conftest* | |
10314 | 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);" | |
10315 | fi | |
10316 | ||
10317 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10318 | echo "$ac_t""${ac_t:- | |
10319 | }$am_cv_proto_iconv" 1>&6 | |
10320 | cat >> confdefs.h <<EOF | |
10321 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10322 | EOF | |
10323 | ||
10324 | fi | |
10325 | LIBICONV= | |
10326 | if test "$am_cv_lib_iconv" = yes; then | |
10327 | LIBICONV="-liconv" | |
10328 | fi | |
10329 | ||
10330 | ||
10331 | ||
c906108c SS |
10332 | trap '' 1 2 15 |
10333 | cat > confcache <<\EOF | |
10334 | # This file is a shell script that caches the results of configure | |
10335 | # tests run on this system so they can be shared between configure | |
10336 | # scripts and configure runs. It is not useful on other systems. | |
10337 | # If it contains results you don't want to keep, you may remove or edit it. | |
10338 | # | |
10339 | # By default, configure uses ./config.cache as the cache file, | |
10340 | # creating it if it does not exist already. You can give configure | |
10341 | # the --cache-file=FILE option to use a different cache file; that is | |
10342 | # what configure does when it calls configure scripts in | |
10343 | # subdirectories, so they share the cache. | |
10344 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10345 | # config.status only pays attention to the cache file if you give it the | |
10346 | # --recheck option to rerun configure. | |
10347 | # | |
10348 | EOF | |
10349 | # The following way of writing the cache mishandles newlines in values, | |
10350 | # but we know of no workaround that is simple, portable, and efficient. | |
10351 | # So, don't put newlines in cache variables' values. | |
10352 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10353 | # and sets the high bit in the cache file unless we assign to the vars. | |
10354 | (set) 2>&1 | | |
10355 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10356 | *ac_space=\ *) | |
10357 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10358 | # turns \\\\ into \\, and sed turns \\ into \). | |
10359 | sed -n \ | |
10360 | -e "s/'/'\\\\''/g" \ | |
10361 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10362 | ;; | |
10363 | *) | |
10364 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10365 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10366 | ;; | |
10367 | esac >> confcache | |
10368 | if cmp -s $cache_file confcache; then | |
10369 | : | |
10370 | else | |
10371 | if test -w $cache_file; then | |
10372 | echo "updating cache $cache_file" | |
10373 | cat confcache > $cache_file | |
10374 | else | |
10375 | echo "not updating unwritable cache $cache_file" | |
10376 | fi | |
10377 | fi | |
10378 | rm -f confcache | |
10379 | ||
10380 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10381 | ||
10382 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10383 | # Let make expand exec_prefix. | |
10384 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10385 | ||
10386 | # Any assignment to VPATH causes Sun make to only execute | |
10387 | # the first set of double-colon rules, so remove it if not needed. | |
10388 | # If there is a colon in the path, we need to keep it. | |
10389 | if test "x$srcdir" = x.; then | |
10390 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10391 | fi | |
10392 | ||
10393 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10394 | ||
10395 | DEFS=-DHAVE_CONFIG_H | |
10396 | ||
10397 | # Without the "./", some shells look in PATH for config.status. | |
10398 | : ${CONFIG_STATUS=./config.status} | |
10399 | ||
10400 | echo creating $CONFIG_STATUS | |
10401 | rm -f $CONFIG_STATUS | |
10402 | cat > $CONFIG_STATUS <<EOF | |
10403 | #! /bin/sh | |
10404 | # Generated automatically by configure. | |
10405 | # Run this file to recreate the current configuration. | |
10406 | # This directory was configured as follows, | |
10407 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10408 | # | |
10409 | # $0 $ac_configure_args | |
10410 | # | |
10411 | # Compiler output produced by configure, useful for debugging | |
10412 | # configure, is in ./config.log if it exists. | |
10413 | ||
10414 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10415 | for ac_option | |
10416 | do | |
10417 | case "\$ac_option" in | |
10418 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10419 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10420 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10421 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10422 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10423 | exit 0 ;; | |
10424 | -help | --help | --hel | --he | --h) | |
10425 | echo "\$ac_cs_usage"; exit 0 ;; | |
10426 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10427 | esac | |
10428 | done | |
10429 | ||
10430 | ac_given_srcdir=$srcdir | |
10431 | ac_given_INSTALL="$INSTALL" | |
10432 | ||
ed952ac5 | 10433 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10434 | EOF |
10435 | cat >> $CONFIG_STATUS <<EOF | |
10436 | ||
10437 | # Protect against being on the right side of a sed subst in config.status. | |
10438 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10439 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10440 | $ac_vpsub | |
10441 | $extrasub | |
10442 | s%@SHELL@%$SHELL%g | |
10443 | s%@CFLAGS@%$CFLAGS%g | |
10444 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10445 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10446 | s%@FFLAGS@%$FFLAGS%g | |
10447 | s%@DEFS@%$DEFS%g | |
10448 | s%@LDFLAGS@%$LDFLAGS%g | |
10449 | s%@LIBS@%$LIBS%g | |
10450 | s%@exec_prefix@%$exec_prefix%g | |
10451 | s%@prefix@%$prefix%g | |
10452 | s%@program_transform_name@%$program_transform_name%g | |
10453 | s%@bindir@%$bindir%g | |
10454 | s%@sbindir@%$sbindir%g | |
10455 | s%@libexecdir@%$libexecdir%g | |
10456 | s%@datadir@%$datadir%g | |
10457 | s%@sysconfdir@%$sysconfdir%g | |
10458 | s%@sharedstatedir@%$sharedstatedir%g | |
10459 | s%@localstatedir@%$localstatedir%g | |
10460 | s%@libdir@%$libdir%g | |
10461 | s%@includedir@%$includedir%g | |
10462 | s%@oldincludedir@%$oldincludedir%g | |
10463 | s%@infodir@%$infodir%g | |
10464 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10465 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10466 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10467 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10468 | s%@CC@%$CC%g |
10469 | s%@CPP@%$CPP%g | |
10470 | s%@host@%$host%g | |
10471 | s%@host_alias@%$host_alias%g | |
10472 | s%@host_cpu@%$host_cpu%g | |
10473 | s%@host_vendor@%$host_vendor%g | |
10474 | s%@host_os@%$host_os%g | |
10475 | s%@target@%$target%g | |
10476 | s%@target_alias@%$target_alias%g | |
10477 | s%@target_cpu@%$target_cpu%g | |
10478 | s%@target_vendor@%$target_vendor%g | |
10479 | s%@target_os@%$target_os%g | |
10480 | s%@build@%$build%g | |
10481 | s%@build_alias@%$build_alias%g | |
10482 | s%@build_cpu@%$build_cpu%g | |
10483 | s%@build_vendor@%$build_vendor%g | |
10484 | s%@build_os@%$build_os%g | |
c906108c | 10485 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10486 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10487 | s%@ALLOCA@%$ALLOCA%g |
10488 | s%@USE_NLS@%$USE_NLS%g | |
10489 | s%@MSGFMT@%$MSGFMT%g | |
10490 | s%@GMSGFMT@%$GMSGFMT%g | |
10491 | s%@XGETTEXT@%$XGETTEXT%g | |
10492 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10493 | s%@CATALOGS@%$CATALOGS%g | |
10494 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10495 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10496 | s%@GMOFILES@%$GMOFILES%g | |
10497 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10498 | s%@INTLDEPS@%$INTLDEPS%g | |
10499 | s%@INTLLIBS@%$INTLLIBS%g | |
10500 | s%@INTLOBJS@%$INTLOBJS%g | |
10501 | s%@POFILES@%$POFILES%g | |
10502 | s%@POSUB@%$POSUB%g | |
10503 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10504 | s%@GT_NO@%$GT_NO%g | |
10505 | s%@GT_YES@%$GT_YES%g | |
10506 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10507 | s%@l@%$l%g | |
8dcde887 | 10508 | s%@subdirs@%$subdirs%g |
7a292a7a | 10509 | s%@AWK@%$AWK%g |
c906108c SS |
10510 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10511 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10512 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10513 | s%@LN_S@%$LN_S%g |
10514 | s%@YACC@%$YACC%g | |
c906108c | 10515 | s%@AR@%$AR%g |
95ca63c4 CF |
10516 | s%@DLLTOOL@%$DLLTOOL%g |
10517 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10518 | s%@MIG@%$MIG%g |
c906108c | 10519 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
10520 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
10521 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 10522 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10523 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10524 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10525 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10526 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10527 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10528 | s%@LIBGUI@%$LIBGUI%g |
10529 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10530 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10531 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10532 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10533 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10534 | s%@TCL_CC@%$TCL_CC%g | |
10535 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10536 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10537 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10538 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10539 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10540 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10541 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10542 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
10543 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
10544 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10545 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10546 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10547 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10548 | s%@TK_VERSION@%$TK_VERSION%g | |
10549 | s%@TK_DEFS@%$TK_DEFS%g | |
10550 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10551 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10552 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10553 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10554 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10555 | s%@TCLHDIR@%$TCLHDIR%g | |
10556 | s%@TKHDIR@%$TKHDIR%g | |
10557 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10558 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10559 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10560 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10561 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10562 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10563 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10564 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10565 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10566 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10567 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10568 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10569 | s%@X_CFLAGS@%$X_CFLAGS%g |
10570 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10571 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10572 | s%@TCL_DEPS@%$TCL_DEPS%g |
10573 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10574 | s%@ITCLLIB@%$ITCLLIB%g |
10575 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10576 | s%@ITKLIB@%$ITKLIB%g | |
10577 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10578 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10579 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10580 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10581 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10582 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 10583 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 10584 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c | 10585 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
66b965bb | 10586 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10587 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10588 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10589 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10590 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10591 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10592 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10593 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10594 | s%@target_subdir@%$target_subdir%g |
10595 | /@host_makefile_frag@/r $host_makefile_frag | |
10596 | s%@host_makefile_frag@%%g | |
10597 | /@target_makefile_frag@/r $target_makefile_frag | |
10598 | s%@target_makefile_frag@%%g | |
10599 | s%@frags@%$frags%g | |
5a2402b8 AC |
10600 | s%@xm_h@%$xm_h%g |
10601 | s%@tm_h@%$tm_h%g | |
10602 | s%@nm_h@%$nm_h%g | |
c906108c | 10603 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10604 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10605 | |
10606 | CEOF | |
10607 | EOF | |
10608 | ||
10609 | cat >> $CONFIG_STATUS <<\EOF | |
10610 | ||
10611 | # Split the substitutions into bite-sized pieces for seds with | |
10612 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10613 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10614 | ac_file=1 # Number of current file. |
10615 | ac_beg=1 # First line for current file. | |
10616 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10617 | ac_more_lines=: | |
10618 | ac_sed_cmds="" | |
10619 | while $ac_more_lines; do | |
10620 | if test $ac_beg -gt 1; then | |
10621 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10622 | else | |
10623 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10624 | fi | |
10625 | if test ! -s conftest.s$ac_file; then | |
10626 | ac_more_lines=false | |
10627 | rm -f conftest.s$ac_file | |
10628 | else | |
10629 | if test -z "$ac_sed_cmds"; then | |
10630 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10631 | else | |
10632 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10633 | fi | |
10634 | ac_file=`expr $ac_file + 1` | |
10635 | ac_beg=$ac_end | |
10636 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10637 | fi | |
10638 | done | |
10639 | if test -z "$ac_sed_cmds"; then | |
10640 | ac_sed_cmds=cat | |
10641 | fi | |
10642 | EOF | |
10643 | ||
10644 | cat >> $CONFIG_STATUS <<EOF | |
10645 | ||
ed952ac5 | 10646 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10647 | EOF |
10648 | cat >> $CONFIG_STATUS <<\EOF | |
10649 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10650 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10651 | case "$ac_file" in | |
10652 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10653 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10654 | *) ac_file_in="${ac_file}.in" ;; | |
10655 | esac | |
10656 | ||
10657 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10658 | ||
10659 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10660 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10661 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10662 | # The file is in a subdirectory. | |
10663 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10664 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10665 | # A "../" for each directory in $ac_dir_suffix. | |
10666 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10667 | else | |
10668 | ac_dir_suffix= ac_dots= | |
10669 | fi | |
10670 | ||
10671 | case "$ac_given_srcdir" in | |
10672 | .) srcdir=. | |
10673 | if test -z "$ac_dots"; then top_srcdir=. | |
10674 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10675 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10676 | *) # Relative path. | |
10677 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10678 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10679 | esac | |
10680 | ||
10681 | case "$ac_given_INSTALL" in | |
10682 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10683 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10684 | esac | |
10685 | ||
10686 | echo creating "$ac_file" | |
10687 | rm -f "$ac_file" | |
10688 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10689 | case "$ac_file" in | |
10690 | *Makefile*) ac_comsub="1i\\ | |
10691 | # $configure_input" ;; | |
10692 | *) ac_comsub= ;; | |
10693 | esac | |
10694 | ||
10695 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10696 | sed -e "$ac_comsub | |
10697 | s%@configure_input@%$configure_input%g | |
10698 | s%@srcdir@%$srcdir%g | |
10699 | s%@top_srcdir@%$top_srcdir%g | |
10700 | s%@INSTALL@%$INSTALL%g | |
10701 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10702 | fi; done | |
10703 | rm -f conftest.s* | |
10704 | ||
10705 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10706 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10707 | # | |
10708 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10709 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10710 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10711 | ac_dC='\3' | |
10712 | ac_dD='%g' | |
10713 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10714 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10715 | ac_uB='\([ ]\)%\1#\2define\3' | |
10716 | ac_uC=' ' | |
10717 | ac_uD='\4%g' | |
10718 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10719 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10720 | ac_eB='$%\1#\2define\3' | |
10721 | ac_eC=' ' | |
10722 | ac_eD='%g' | |
10723 | ||
10724 | if test "${CONFIG_HEADERS+set}" != set; then | |
10725 | EOF | |
10726 | cat >> $CONFIG_STATUS <<EOF | |
10727 | CONFIG_HEADERS="config.h:config.in" | |
10728 | EOF | |
10729 | cat >> $CONFIG_STATUS <<\EOF | |
10730 | fi | |
10731 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10732 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10733 | case "$ac_file" in | |
10734 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10735 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10736 | *) ac_file_in="${ac_file}.in" ;; | |
10737 | esac | |
10738 | ||
10739 | echo creating $ac_file | |
10740 | ||
10741 | rm -f conftest.frag conftest.in conftest.out | |
10742 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10743 | cat $ac_file_inputs > conftest.in | |
10744 | ||
10745 | EOF | |
10746 | ||
10747 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10748 | # the proper values into config.h.in to produce config.h. And first: | |
10749 | # Protect against being on the right side of a sed subst in config.status. | |
10750 | # Protect against being in an unquoted here document in config.status. | |
10751 | rm -f conftest.vals | |
10752 | cat > conftest.hdr <<\EOF | |
10753 | s/[\\&%]/\\&/g | |
10754 | s%[\\$`]%\\&%g | |
10755 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10756 | s%ac_d%ac_u%gp | |
10757 | s%ac_u%ac_e%gp | |
10758 | EOF | |
10759 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10760 | rm -f conftest.hdr | |
10761 | ||
10762 | # This sed command replaces #undef with comments. This is necessary, for | |
10763 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10764 | # on some systems where configure will not decide to define it. | |
10765 | cat >> conftest.vals <<\EOF | |
10766 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10767 | EOF | |
10768 | ||
10769 | # Break up conftest.vals because some shells have a limit on | |
10770 | # the size of here documents, and old seds have small limits too. | |
10771 | ||
10772 | rm -f conftest.tail | |
10773 | while : | |
10774 | do | |
10775 | ac_lines=`grep -c . conftest.vals` | |
10776 | # grep -c gives empty output for an empty file on some AIX systems. | |
10777 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10778 | # Write a limited-size here document to conftest.frag. | |
10779 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10780 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10781 | echo 'CEOF | |
10782 | sed -f conftest.frag conftest.in > conftest.out | |
10783 | rm -f conftest.in | |
10784 | mv conftest.out conftest.in | |
10785 | ' >> $CONFIG_STATUS | |
10786 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10787 | rm -f conftest.vals | |
10788 | mv conftest.tail conftest.vals | |
10789 | done | |
10790 | rm -f conftest.vals | |
10791 | ||
10792 | cat >> $CONFIG_STATUS <<\EOF | |
10793 | rm -f conftest.frag conftest.h | |
10794 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
10795 | cat conftest.in >> conftest.h | |
10796 | rm -f conftest.in | |
10797 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
10798 | echo "$ac_file is unchanged" | |
10799 | rm -f conftest.h | |
10800 | else | |
10801 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10802 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10803 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10804 | # The file is in a subdirectory. | |
10805 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10806 | fi | |
10807 | rm -f $ac_file | |
10808 | mv conftest.h $ac_file | |
10809 | fi | |
10810 | fi; done | |
10811 | ||
10812 | EOF | |
10813 | ||
10814 | cat >> $CONFIG_STATUS <<EOF | |
10815 | ac_sources="$files" | |
10816 | ac_dests="$links" | |
10817 | EOF | |
10818 | ||
10819 | cat >> $CONFIG_STATUS <<\EOF | |
10820 | srcdir=$ac_given_srcdir | |
10821 | while test -n "$ac_sources"; do | |
10822 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
10823 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
10824 | ||
10825 | echo "linking $srcdir/$ac_source to $ac_dest" | |
10826 | ||
10827 | if test ! -r $srcdir/$ac_source; then | |
10828 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
10829 | fi | |
10830 | rm -f $ac_dest | |
10831 | ||
10832 | # Make relative symlinks. | |
10833 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10834 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
10835 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
10836 | # The dest file is in a subdirectory. | |
10837 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
10838 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
10839 | # A "../" for each directory in $ac_dest_dir_suffix. | |
10840 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
10841 | else | |
10842 | ac_dest_dir_suffix= ac_dots= | |
10843 | fi | |
10844 | ||
10845 | case "$srcdir" in | |
10846 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
10847 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
10848 | esac | |
10849 | ||
10850 | # Make a symlink if possible; otherwise try a hard link. | |
10851 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
10852 | ln $srcdir/$ac_source $ac_dest; then : | |
10853 | else | |
10854 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
10855 | fi | |
10856 | done | |
10857 | EOF | |
10858 | cat >> $CONFIG_STATUS <<EOF | |
10859 | ||
10860 | gdb_host_cpu=$gdb_host_cpu | |
10861 | gdb_target_cpu=$gdb_target_cpu | |
10862 | nativefile=$nativefile | |
10863 | ||
10864 | EOF | |
10865 | cat >> $CONFIG_STATUS <<\EOF | |
10866 | ||
10867 | if test "${nativefile}" = ""; then | |
c4620205 | 10868 | < Makefile \ |
e27da16d JT |
10869 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
10870 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
10871 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
10872 | > Makefile.tem | |
c906108c SS |
10873 | mv -f Makefile.tem Makefile |
10874 | fi | |
10875 | ||
10876 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
10877 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
10878 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
10879 | mv -f Makefile.tmp Makefile | |
10880 | ||
2acceee2 | 10881 | |
c906108c SS |
10882 | case x$CONFIG_HEADERS in |
10883 | xconfig.h:config.in) | |
10884 | echo > stamp-h ;; | |
10885 | esac | |
10886 | ||
10887 | exit 0 | |
10888 | EOF | |
10889 | chmod +x $CONFIG_STATUS | |
10890 | rm -fr confdefs* $ac_clean_files | |
10891 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
10892 | ||
10893 | if test "$no_recursion" != yes; then | |
10894 | ||
10895 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
10896 | ac_sub_configure_args= | |
10897 | ac_prev= | |
10898 | for ac_arg in $ac_configure_args; do | |
10899 | if test -n "$ac_prev"; then | |
10900 | ac_prev= | |
10901 | continue | |
10902 | fi | |
10903 | case "$ac_arg" in | |
10904 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
10905 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
10906 | ac_prev=cache_file ;; | |
10907 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
10908 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
10909 | ;; | |
10910 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
10911 | ac_prev=srcdir ;; | |
10912 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
10913 | ;; | |
10914 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
10915 | esac | |
10916 | done | |
10917 | ||
8dcde887 | 10918 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
10919 | |
10920 | # Do not complain, so a configure script can configure whichever | |
10921 | # parts of a large source tree are present. | |
10922 | if test ! -d $srcdir/$ac_config_dir; then | |
10923 | continue | |
10924 | fi | |
10925 | ||
10926 | echo configuring in $ac_config_dir | |
10927 | ||
10928 | case "$srcdir" in | |
10929 | .) ;; | |
10930 | *) | |
10931 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
10932 | else | |
10933 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
10934 | fi | |
10935 | ;; | |
10936 | esac | |
10937 | ||
10938 | ac_popdir=`pwd` | |
10939 | cd $ac_config_dir | |
10940 | ||
10941 | # A "../" for each directory in /$ac_config_dir. | |
10942 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
10943 | ||
10944 | case "$srcdir" in | |
10945 | .) # No --srcdir option. We are building in place. | |
10946 | ac_sub_srcdir=$srcdir ;; | |
10947 | /*) # Absolute path. | |
10948 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
10949 | *) # Relative path. | |
10950 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
10951 | esac | |
10952 | ||
10953 | # Check for guested configure; otherwise get Cygnus style configure. | |
10954 | if test -f $ac_sub_srcdir/configure; then | |
10955 | ac_sub_configure=$ac_sub_srcdir/configure | |
10956 | elif test -f $ac_sub_srcdir/configure.in; then | |
10957 | ac_sub_configure=$ac_configure | |
10958 | else | |
10959 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
10960 | ac_sub_configure= | |
10961 | fi | |
10962 | ||
10963 | # The recursion is here. | |
10964 | if test -n "$ac_sub_configure"; then | |
10965 | ||
10966 | # Make the cache file name correct relative to the subdirectory. | |
10967 | case "$cache_file" in | |
10968 | /*) ac_sub_cache_file=$cache_file ;; | |
10969 | *) # Relative path. | |
10970 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
10971 | esac | |
10972 | case "$ac_given_INSTALL" in | |
10973 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10974 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10975 | esac | |
10976 | ||
10977 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
10978 | # The eval makes quoting arguments work. | |
10979 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
10980 | then : | |
10981 | else | |
10982 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
10983 | fi | |
10984 | fi | |
10985 | ||
10986 | cd $ac_popdir | |
10987 | done | |
10988 | fi | |
10989 | ||
10990 | ||
10991 | exit 0 |