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 | 30 | --enable-gdbtk enable gdbtk graphical user interface (GUI)" |
0e5d83e3 JJ |
31 | ac_help="$ac_help |
32 | --with-libunwind Use libunwind frame unwinding support" | |
d28f9cdf DJ |
33 | ac_help="$ac_help |
34 | --enable-profiling enable profiling of GDB" | |
06825bd1 MK |
35 | ac_help="$ac_help |
36 | --without-included-regex don't use included regex; this is the default | |
37 | on systems with version 2 of the GNU C library | |
38 | (use with caution on other system)" | |
030292b7 DJ |
39 | ac_help="$ac_help |
40 | --with-sysroot[=DIR] Search for usr/lib et al within DIR." | |
c906108c SS |
41 | ac_help="$ac_help |
42 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
43 | ac_help="$ac_help |
44 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
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= | |
d836ee13 | 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 | |
d836ee13 | 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 | ||
d836ee13 AC |
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. | |
d836ee13 AC |
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 |
d836ee13 AC |
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 |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | ||
d836ee13 | 738 | #line 739 "configure" |
c906108c SS |
739 | #include "confdefs.h" |
740 | ||
741 | main(){return(0);} | |
742 | EOF | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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 | |
d836ee13 | 919 | echo "configure:920: checking for AIX" >&5 |
c906108c | 920 | cat > conftest.$ac_ext <<EOF |
d836ee13 | 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 |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 1131 | echo "configure:1132: checking build system type" >&5 |
c906108c SS |
1132 | |
1133 | build_alias=$build | |
1134 | case "$build_alias" in | |
1135 | NONE) | |
1136 | case $nonopt in | |
1137 | NONE) build_alias=$host_alias ;; | |
1138 | *) build_alias=$nonopt ;; | |
1139 | esac ;; | |
1140 | esac | |
1141 | ||
1142 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1143 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1144 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1145 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1146 | echo "$ac_t""$build" 1>&6 | |
1147 | ||
1148 | test "$host_alias" != "$target_alias" && | |
1149 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1150 | NONENONEs,x,x, && | |
1151 | program_prefix=${target_alias}- | |
1152 | ||
1153 | ||
8bb2c122 MK |
1154 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1155 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1156 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1157 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
f6e85fc8 | 1158 | # AC_PROG_RANLIB. This can be removed when we switch to Autoconf |
8bb2c122 MK |
1159 | # 2.5x. |
1160 | if test $host != $build; then | |
1161 | ac_tool_prefix=${host_alias}- | |
1162 | else | |
1163 | ac_tool_prefix= | |
1164 | fi | |
1165 | ||
1166 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1167 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1168 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 1479 | #line 1480 "configure" |
c906108c SS |
1480 | #include "confdefs.h" |
1481 | ||
1482 | int main() { | |
1483 | } $ac_kw foo() { | |
1484 | ; return 0; } | |
1485 | EOF | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | ||
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 AC |
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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 2409 | #line 2410 "configure" |
c906108c SS |
2410 | #include "confdefs.h" |
2411 | ||
2412 | int main() { | |
2413 | return (int) gettext ("") | |
2414 | ; return 0; } | |
2415 | EOF | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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 | |
d836ee13 | 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" | |
d836ee13 | 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= | |
2928 | CONFIG_DEPS= | |
2929 | CONFIG_SRCS= | |
fb40c209 | 2930 | ENABLE_CFLAGS= |
b3a90332 AC |
2931 | CONFIG_ALL= |
2932 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2933 | CONFIG_INSTALL= |
2934 | CONFIG_UNINSTALL= | |
c906108c | 2935 | |
8dcde887 | 2936 | subdirs="doc testsuite" |
96baa820 | 2937 | |
8dcde887 | 2938 | configdirs= |
96baa820 | 2939 | |
27e9bf90 | 2940 | . $srcdir/configure.host |
c906108c | 2941 | |
27e9bf90 | 2942 | . $srcdir/configure.tgt |
c906108c | 2943 | |
27e9bf90 MK |
2944 | # Fetch the default architecture and default target vector from BFD. |
2945 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2946 | |
27e9bf90 MK |
2947 | # We only want the first architecture, so strip off the others if |
2948 | # there is more than one. | |
2949 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2950 | |
27e9bf90 MK |
2951 | if test "x$targ_archs" != x; then |
2952 | cat >> confdefs.h <<EOF | |
2953 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2954 | EOF |
2955 | ||
2956 | fi | |
27e9bf90 MK |
2957 | if test "x$targ_defvec" != x; then |
2958 | cat >> confdefs.h <<EOF | |
2959 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2960 | EOF |
2961 | ||
2962 | fi | |
c906108c | 2963 | |
8bb2c122 MK |
2964 | if test "$program_transform_name" = s,x,x,; then |
2965 | program_transform_name= | |
2966 | else | |
2967 | # Double any \ or $. echo might interpret backslashes. | |
2968 | cat <<\EOF_SED > conftestsed | |
2969 | s,\\,\\\\,g; s,\$,$$,g | |
2970 | EOF_SED | |
2971 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2972 | rm -f conftestsed | |
2973 | fi | |
2974 | test "$program_prefix" != NONE && | |
2975 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2976 | # Use a double $ so make ignores it. | |
2977 | test "$program_suffix" != NONE && | |
2978 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2979 | ||
2980 | # sed with no file args requires a program. | |
2981 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2982 | ||
2983 | ||
627af7ea MK |
2984 | # The CLI cannot be disabled yet, but may be in the future. |
2985 | ||
2986 | # Enable CLI. | |
2987 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2988 | if test "${enable_gdbcli+set}" = set; then | |
2989 | enableval="$enable_gdbcli" | |
2990 | case $enableval in | |
2991 | yes) | |
2992 | ;; | |
2993 | no) | |
2994 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2995 | *) | |
2996 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2997 | esac | |
2998 | else | |
2999 | enable_gdbcli=yes | |
3000 | fi | |
3001 | ||
3002 | if test x"$enable_gdbcli" = xyes; then | |
3003 | if test -d $srcdir/cli; then | |
3004 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
3005 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
3006 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
627af7ea | 3007 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" |
627af7ea MK |
3008 | fi |
3009 | fi | |
3010 | ||
3011 | # Enable MI. | |
3012 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
3013 | if test "${enable_gdbmi+set}" = set; then | |
3014 | enableval="$enable_gdbmi" | |
3015 | case $enableval in | |
3016 | yes | no) | |
3017 | ;; | |
3018 | *) | |
3019 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3020 | esac | |
3021 | else | |
3022 | enable_gdbmi=yes | |
3023 | fi | |
3024 | ||
3025 | if test x"$enable_gdbmi" = xyes; then | |
3026 | if test -d $srcdir/mi; then | |
3027 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3028 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3029 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
627af7ea | 3030 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" |
627af7ea MK |
3031 | fi |
3032 | fi | |
3033 | ||
c324d747 AC |
3034 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over |
3035 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3036 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3037 | # `curses'. I don't see why we should use HP curses if a more | |
3038 | # standard curses is available, except that according to HP's | |
3039 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3040 | # HP-UX 10.10 and 10.20. | |
3041 | ||
3042 | ||
3043 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
3044 | echo "configure:3045: checking for library containing initscr" >&5 | |
3045 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then | |
3046 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3047 | else | |
3048 | ac_func_search_save_LIBS="$LIBS" | |
3049 | ac_cv_search_initscr="no" | |
3050 | cat > conftest.$ac_ext <<EOF | |
3051 | #line 3052 "configure" | |
3052 | #include "confdefs.h" | |
3053 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3054 | /* We use char because int might match the return type of a gcc2 | |
3055 | builtin and then its argument prototype would still apply. */ | |
3056 | char initscr(); | |
3057 | ||
3058 | int main() { | |
3059 | initscr() | |
3060 | ; return 0; } | |
3061 | EOF | |
3062 | if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3063 | rm -rf conftest* | |
3064 | ac_cv_search_initscr="none required" | |
3065 | else | |
3066 | echo "configure: failed program was:" >&5 | |
3067 | cat conftest.$ac_ext >&5 | |
3068 | fi | |
3069 | rm -f conftest* | |
3070 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do | |
3071 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3072 | cat > conftest.$ac_ext <<EOF | |
3073 | #line 3074 "configure" | |
3074 | #include "confdefs.h" | |
3075 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3076 | /* We use char because int might match the return type of a gcc2 | |
3077 | builtin and then its argument prototype would still apply. */ | |
3078 | char initscr(); | |
3079 | ||
3080 | int main() { | |
3081 | initscr() | |
3082 | ; return 0; } | |
3083 | EOF | |
3084 | if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3085 | rm -rf conftest* | |
3086 | ac_cv_search_initscr="-l$i" | |
3087 | break | |
3088 | else | |
3089 | echo "configure: failed program was:" >&5 | |
3090 | cat conftest.$ac_ext >&5 | |
3091 | fi | |
3092 | rm -f conftest* | |
3093 | done | |
3094 | LIBS="$ac_func_search_save_LIBS" | |
3095 | fi | |
3096 | ||
3097 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3098 | if test "$ac_cv_search_initscr" != "no"; then | |
3099 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3100 | ||
3101 | else : | |
3102 | echo "configure: warning: no curses library found" 1>&2 | |
3103 | fi | |
3104 | ||
66745969 JB |
3105 | # Check whether the wborder function is provided by the curses |
3106 | # library detected above. In certain implementations such as | |
3107 | # the HP/UX Hcurses for instance, this function is provided by an | |
3108 | # additional library. So if we did not find this function inside | |
3109 | # the curses library, try some alternate libraries we know might | |
3110 | # provide it. | |
3111 | echo $ac_n "checking for wborder""... $ac_c" 1>&6 | |
3112 | echo "configure:3113: checking for wborder" >&5 | |
3113 | if eval "test \"`echo '$''{'ac_cv_func_wborder'+set}'`\" = set"; then | |
3114 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3115 | else | |
3116 | cat > conftest.$ac_ext <<EOF | |
3117 | #line 3118 "configure" | |
3118 | #include "confdefs.h" | |
3119 | /* System header to define __stub macros and hopefully few prototypes, | |
3120 | which can conflict with char wborder(); below. */ | |
3121 | #include <assert.h> | |
3122 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3123 | /* We use char because int might match the return type of a gcc2 | |
3124 | builtin and then its argument prototype would still apply. */ | |
3125 | char wborder(); | |
3126 | ||
3127 | int main() { | |
3128 | ||
3129 | /* The GNU C library defines this for functions which it implements | |
3130 | to always fail with ENOSYS. Some functions are actually named | |
3131 | something starting with __ and the normal name is an alias. */ | |
3132 | #if defined (__stub_wborder) || defined (__stub___wborder) | |
3133 | choke me | |
3134 | #else | |
3135 | wborder(); | |
3136 | #endif | |
3137 | ||
3138 | ; return 0; } | |
3139 | EOF | |
3140 | if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3141 | rm -rf conftest* | |
3142 | eval "ac_cv_func_wborder=yes" | |
3143 | else | |
3144 | echo "configure: failed program was:" >&5 | |
3145 | cat conftest.$ac_ext >&5 | |
3146 | rm -rf conftest* | |
3147 | eval "ac_cv_func_wborder=no" | |
3148 | fi | |
3149 | rm -f conftest* | |
3150 | fi | |
3151 | ||
3152 | if eval "test \"`echo '$ac_cv_func_'wborder`\" = yes"; then | |
3153 | echo "$ac_t""yes" 1>&6 | |
3154 | wborder_available=yes | |
3155 | else | |
3156 | echo "$ac_t""no" 1>&6 | |
3157 | ||
3158 | echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6 | |
3159 | echo "configure:3160: checking for library containing wborder" >&5 | |
3160 | if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then | |
3161 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3162 | else | |
3163 | ac_func_search_save_LIBS="$LIBS" | |
3164 | ac_cv_search_wborder="no" | |
3165 | cat > conftest.$ac_ext <<EOF | |
3166 | #line 3167 "configure" | |
3167 | #include "confdefs.h" | |
3168 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3169 | /* We use char because int might match the return type of a gcc2 | |
3170 | builtin and then its argument prototype would still apply. */ | |
3171 | char wborder(); | |
3172 | ||
3173 | int main() { | |
3174 | wborder() | |
3175 | ; return 0; } | |
3176 | EOF | |
3177 | if { (eval echo configure:3178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3178 | rm -rf conftest* | |
3179 | ac_cv_search_wborder="none required" | |
3180 | else | |
3181 | echo "configure: failed program was:" >&5 | |
3182 | cat conftest.$ac_ext >&5 | |
3183 | fi | |
3184 | rm -f conftest* | |
3185 | test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do | |
3186 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3187 | cat > conftest.$ac_ext <<EOF | |
3188 | #line 3189 "configure" | |
3189 | #include "confdefs.h" | |
3190 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3191 | /* We use char because int might match the return type of a gcc2 | |
3192 | builtin and then its argument prototype would still apply. */ | |
3193 | char wborder(); | |
3194 | ||
3195 | int main() { | |
3196 | wborder() | |
3197 | ; return 0; } | |
3198 | EOF | |
3199 | if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3200 | rm -rf conftest* | |
3201 | ac_cv_search_wborder="-l$i" | |
3202 | break | |
3203 | else | |
3204 | echo "configure: failed program was:" >&5 | |
3205 | cat conftest.$ac_ext >&5 | |
3206 | fi | |
3207 | rm -f conftest* | |
3208 | done | |
3209 | LIBS="$ac_func_search_save_LIBS" | |
3210 | fi | |
3211 | ||
3212 | echo "$ac_t""$ac_cv_search_wborder" 1>&6 | |
3213 | if test "$ac_cv_search_wborder" != "no"; then | |
3214 | test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS" | |
3215 | wborder_available=yes | |
3216 | else : | |
3217 | echo "configure: warning: no wborder function found" 1>&2 | |
3218 | fi | |
3219 | fi | |
3220 | ||
3221 | ||
06825bd1 MK |
3222 | # Enable TUI. |
3223 | # Check whether --enable-tui or --disable-tui was given. | |
3224 | if test "${enable_tui+set}" = set; then | |
3225 | enableval="$enable_tui" | |
3226 | case $enableval in | |
3227 | yes | no) | |
3228 | ;; | |
3229 | *) | |
3230 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3231 | esac | |
c324d747 AC |
3232 | else |
3233 | enable_tui=yes | |
06825bd1 MK |
3234 | fi |
3235 | ||
3236 | if test x"$enable_tui" = xyes; then | |
3237 | if test -d $srcdir/tui; then | |
66745969 | 3238 | if test "$ac_cv_search_initscr" != no -a "$wborder_available" = "yes"; then |
c324d747 AC |
3239 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
3240 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3241 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3242 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3243 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
226361c4 AC |
3244 | CONFIG_ALL="${CONFIG_ALL} all-tui" |
3245 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
3246 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
3247 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
c324d747 | 3248 | fi |
06825bd1 MK |
3249 | fi |
3250 | fi | |
3251 | ||
8ee53726 MK |
3252 | # Enable gdbtk. |
3253 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3254 | if test "${enable_gdbtk+set}" = set; then | |
3255 | enableval="$enable_gdbtk" | |
3256 | case $enableval in | |
3257 | yes | no) | |
3258 | ;; | |
3259 | *) | |
3260 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3261 | esac | |
3262 | else | |
3263 | if test -d $srcdir/gdbtk; then | |
3264 | enable_gdbtk=yes | |
3265 | else | |
3266 | enable_gdbtk=no | |
3267 | fi | |
3268 | fi | |
3269 | ||
3270 | # We unconditionally disable gdbtk tests on selected platforms. | |
3271 | case $host_os in | |
3272 | go32* | windows*) | |
3273 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3274 | enable_gdbtk=no ;; | |
3275 | esac | |
3276 | ||
0e5d83e3 JJ |
3277 | # Libunwind support. |
3278 | # Check whether --with-libunwind or --without-libunwind was given. | |
3279 | if test "${with_libunwind+set}" = set; then | |
3280 | withval="$with_libunwind" | |
3281 | case "${withval}" in | |
3282 | yes) enable_libunwind=yes ;; | |
3283 | no) enable_libunwind=no ;; | |
3284 | *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;; | |
3285 | esac | |
3286 | else | |
3287 | ||
3288 | for ac_hdr in libunwind.h | |
3289 | do | |
3290 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3291 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 3292 | echo "configure:3293: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3293 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3294 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3295 | else | |
3296 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3297 | #line 3298 "configure" |
0e5d83e3 JJ |
3298 | #include "confdefs.h" |
3299 | #include <$ac_hdr> | |
3300 | EOF | |
3301 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 3302 | { (eval echo configure:3303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3303 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3304 | if test -z "$ac_err"; then | |
3305 | rm -rf conftest* | |
3306 | eval "ac_cv_header_$ac_safe=yes" | |
3307 | else | |
3308 | echo "$ac_err" >&5 | |
3309 | echo "configure: failed program was:" >&5 | |
3310 | cat conftest.$ac_ext >&5 | |
3311 | rm -rf conftest* | |
3312 | eval "ac_cv_header_$ac_safe=no" | |
3313 | fi | |
3314 | rm -f conftest* | |
3315 | fi | |
3316 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3317 | echo "$ac_t""yes" 1>&6 | |
3318 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3319 | cat >> confdefs.h <<EOF | |
3320 | #define $ac_tr_hdr 1 | |
3321 | EOF | |
3322 | ||
3323 | else | |
3324 | echo "$ac_t""no" 1>&6 | |
3325 | fi | |
3326 | done | |
3327 | ||
3328 | for ac_hdr in libunwind-ia64.h | |
3329 | do | |
3330 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3331 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 3332 | echo "configure:3333: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3333 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3334 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3335 | else | |
3336 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3337 | #line 3338 "configure" |
0e5d83e3 JJ |
3338 | #include "confdefs.h" |
3339 | #include <$ac_hdr> | |
3340 | EOF | |
3341 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 3342 | { (eval echo configure:3343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3343 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3344 | if test -z "$ac_err"; then | |
3345 | rm -rf conftest* | |
3346 | eval "ac_cv_header_$ac_safe=yes" | |
3347 | else | |
3348 | echo "$ac_err" >&5 | |
3349 | echo "configure: failed program was:" >&5 | |
3350 | cat conftest.$ac_ext >&5 | |
3351 | rm -rf conftest* | |
3352 | eval "ac_cv_header_$ac_safe=no" | |
3353 | fi | |
3354 | rm -f conftest* | |
3355 | fi | |
3356 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3357 | echo "$ac_t""yes" 1>&6 | |
3358 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3359 | cat >> confdefs.h <<EOF | |
3360 | #define $ac_tr_hdr 1 | |
3361 | EOF | |
3362 | ||
3363 | else | |
3364 | echo "$ac_t""no" 1>&6 | |
3365 | fi | |
3366 | done | |
3367 | ||
3368 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then | |
3369 | enable_libunwind=yes; | |
3370 | fi | |
3371 | ||
3372 | fi | |
3373 | ||
3374 | ||
3375 | if test x"$enable_libunwind" = xyes; then | |
3376 | for ac_hdr in libunwind.h | |
3377 | do | |
3378 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3379 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 3380 | echo "configure:3381: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3381 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3382 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3383 | else | |
3384 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3385 | #line 3386 "configure" |
0e5d83e3 JJ |
3386 | #include "confdefs.h" |
3387 | #include <$ac_hdr> | |
3388 | EOF | |
3389 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 3390 | { (eval echo configure:3391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3391 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3392 | if test -z "$ac_err"; then | |
3393 | rm -rf conftest* | |
3394 | eval "ac_cv_header_$ac_safe=yes" | |
3395 | else | |
3396 | echo "$ac_err" >&5 | |
3397 | echo "configure: failed program was:" >&5 | |
3398 | cat conftest.$ac_ext >&5 | |
3399 | rm -rf conftest* | |
3400 | eval "ac_cv_header_$ac_safe=no" | |
3401 | fi | |
3402 | rm -f conftest* | |
3403 | fi | |
3404 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3405 | echo "$ac_t""yes" 1>&6 | |
3406 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3407 | cat >> confdefs.h <<EOF | |
3408 | #define $ac_tr_hdr 1 | |
3409 | EOF | |
3410 | ||
3411 | else | |
3412 | echo "$ac_t""no" 1>&6 | |
3413 | fi | |
3414 | done | |
3415 | ||
3416 | for ac_hdr in libunwind-ia64.h | |
3417 | do | |
3418 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3419 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 3420 | echo "configure:3421: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3421 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3422 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3423 | else | |
3424 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3425 | #line 3426 "configure" |
0e5d83e3 JJ |
3426 | #include "confdefs.h" |
3427 | #include <$ac_hdr> | |
3428 | EOF | |
3429 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 3430 | { (eval echo configure:3431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3431 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3432 | if test -z "$ac_err"; then | |
3433 | rm -rf conftest* | |
3434 | eval "ac_cv_header_$ac_safe=yes" | |
3435 | else | |
3436 | echo "$ac_err" >&5 | |
3437 | echo "configure: failed program was:" >&5 | |
3438 | cat conftest.$ac_ext >&5 | |
3439 | rm -rf conftest* | |
3440 | eval "ac_cv_header_$ac_safe=no" | |
3441 | fi | |
3442 | rm -f conftest* | |
3443 | fi | |
3444 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3445 | echo "$ac_t""yes" 1>&6 | |
3446 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3447 | cat >> confdefs.h <<EOF | |
3448 | #define $ac_tr_hdr 1 | |
3449 | EOF | |
3450 | ||
3451 | else | |
3452 | echo "$ac_t""no" 1>&6 | |
3453 | fi | |
3454 | done | |
3455 | ||
3456 | cat >> confdefs.h <<\EOF | |
3457 | #define HAVE_LIBUNWIND 1 | |
3458 | EOF | |
3459 | ||
3460 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
3461 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
3462 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
3463 | fi | |
3464 | ||
d28f9cdf DJ |
3465 | # Profiling support. |
3466 | # Check whether --enable-profiling or --disable-profiling was given. | |
3467 | if test "${enable_profiling+set}" = set; then | |
3468 | enableval="$enable_profiling" | |
3469 | case $enableval in | |
3470 | yes | no) | |
3471 | ;; | |
3472 | *) | |
3473 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3474 | esac | |
3475 | else | |
3476 | enable_profiling=no | |
3477 | fi | |
3478 | ||
3479 | ||
d9feb4e7 DJ |
3480 | for ac_func in monstartup _mcleanup |
3481 | do | |
3482 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 3483 | echo "configure:3484: checking for $ac_func" >&5 |
d9feb4e7 | 3484 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
d28f9cdf DJ |
3485 | echo $ac_n "(cached) $ac_c" 1>&6 |
3486 | else | |
3487 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3488 | #line 3489 "configure" |
d28f9cdf DJ |
3489 | #include "confdefs.h" |
3490 | /* System header to define __stub macros and hopefully few prototypes, | |
d9feb4e7 | 3491 | which can conflict with char $ac_func(); below. */ |
d28f9cdf DJ |
3492 | #include <assert.h> |
3493 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3494 | /* We use char because int might match the return type of a gcc2 | |
3495 | builtin and then its argument prototype would still apply. */ | |
d9feb4e7 | 3496 | char $ac_func(); |
d28f9cdf DJ |
3497 | |
3498 | int main() { | |
3499 | ||
3500 | /* The GNU C library defines this for functions which it implements | |
3501 | to always fail with ENOSYS. Some functions are actually named | |
3502 | something starting with __ and the normal name is an alias. */ | |
d9feb4e7 | 3503 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
d28f9cdf DJ |
3504 | choke me |
3505 | #else | |
d9feb4e7 | 3506 | $ac_func(); |
d28f9cdf DJ |
3507 | #endif |
3508 | ||
3509 | ; return 0; } | |
3510 | EOF | |
66745969 | 3511 | if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf | 3512 | rm -rf conftest* |
d9feb4e7 | 3513 | eval "ac_cv_func_$ac_func=yes" |
d28f9cdf DJ |
3514 | else |
3515 | echo "configure: failed program was:" >&5 | |
3516 | cat conftest.$ac_ext >&5 | |
3517 | rm -rf conftest* | |
d9feb4e7 | 3518 | eval "ac_cv_func_$ac_func=no" |
d28f9cdf DJ |
3519 | fi |
3520 | rm -f conftest* | |
3521 | fi | |
3522 | ||
d9feb4e7 | 3523 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
d28f9cdf | 3524 | echo "$ac_t""yes" 1>&6 |
d9feb4e7 DJ |
3525 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
3526 | cat >> confdefs.h <<EOF | |
3527 | #define $ac_tr_func 1 | |
3528 | EOF | |
3529 | ||
d28f9cdf DJ |
3530 | else |
3531 | echo "$ac_t""no" 1>&6 | |
d28f9cdf | 3532 | fi |
d9feb4e7 | 3533 | done |
d28f9cdf | 3534 | |
b0b1c2c0 | 3535 | echo $ac_n "checking for _etext""... $ac_c" 1>&6 |
66745969 | 3536 | echo "configure:3537: checking for _etext" >&5 |
b0b1c2c0 MK |
3537 | if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then |
3538 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3539 | else | |
3540 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3541 | #line 3542 "configure" |
b0b1c2c0 MK |
3542 | #include "confdefs.h" |
3543 | #include <stdlib.h> | |
3544 | extern char _etext; | |
3545 | ||
3546 | int main() { | |
3547 | free (&_etext); | |
3548 | ; return 0; } | |
3549 | EOF | |
66745969 | 3550 | if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b0b1c2c0 MK |
3551 | rm -rf conftest* |
3552 | ac_cv_var__etext=yes | |
3553 | else | |
3554 | echo "configure: failed program was:" >&5 | |
3555 | cat conftest.$ac_ext >&5 | |
3556 | rm -rf conftest* | |
3557 | ac_cv_var__etext=no | |
3558 | fi | |
3559 | rm -f conftest* | |
3560 | fi | |
3561 | ||
3562 | echo "$ac_t""$ac_cv_var__etext" 1>&6 | |
3563 | if test $ac_cv_var__etext = yes; then | |
3564 | cat >> confdefs.h <<\EOF | |
3565 | #define HAVE__ETEXT 1 | |
3566 | EOF | |
3567 | ||
3568 | fi | |
d9feb4e7 DJ |
3569 | if test "$enable_profiling" = yes ; then |
3570 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
3571 | { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; } | |
3572 | fi | |
3573 | PROFILE_CFLAGS=-pg | |
3574 | OLD_CFLAGS="$CFLAGS" | |
3575 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
d28f9cdf | 3576 | |
d9feb4e7 | 3577 | echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6 |
66745969 | 3578 | echo "configure:3579: checking whether $CC supports -pg" >&5 |
d9feb4e7 | 3579 | if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then |
d28f9cdf DJ |
3580 | echo $ac_n "(cached) $ac_c" 1>&6 |
3581 | else | |
3582 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3583 | #line 3584 "configure" |
d28f9cdf | 3584 | #include "confdefs.h" |
d28f9cdf DJ |
3585 | |
3586 | int main() { | |
d9feb4e7 | 3587 | int x; |
d28f9cdf DJ |
3588 | ; return 0; } |
3589 | EOF | |
66745969 | 3590 | if { (eval echo configure:3591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d28f9cdf | 3591 | rm -rf conftest* |
d9feb4e7 | 3592 | ac_cv_cc_supports_pg=yes |
d28f9cdf DJ |
3593 | else |
3594 | echo "configure: failed program was:" >&5 | |
3595 | cat conftest.$ac_ext >&5 | |
3596 | rm -rf conftest* | |
d9feb4e7 | 3597 | ac_cv_cc_supports_pg=no |
d28f9cdf DJ |
3598 | fi |
3599 | rm -f conftest* | |
3600 | fi | |
3601 | ||
d9feb4e7 | 3602 | echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6 |
d28f9cdf | 3603 | |
d9feb4e7 DJ |
3604 | if test $ac_cv_cc_supports_pg = no; then |
3605 | { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; } | |
3606 | fi | |
d28f9cdf DJ |
3607 | |
3608 | CFLAGS="$OLD_CFLAGS" | |
3609 | fi | |
3610 | ||
8bb2c122 MK |
3611 | # --------------------- # |
3612 | # Checks for programs. # | |
3613 | # --------------------- # | |
3614 | ||
d836ee13 | 3615 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3616 | do |
3617 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3618 | set dummy $ac_prog; ac_word=$2 | |
3619 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
66745969 | 3620 | echo "configure:3621: checking for $ac_word" >&5 |
7a292a7a SS |
3621 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3622 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3623 | else | |
3624 | if test -n "$AWK"; then | |
3625 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3626 | else | |
3627 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3628 | ac_dummy="$PATH" | |
3629 | for ac_dir in $ac_dummy; do | |
3630 | test -z "$ac_dir" && ac_dir=. | |
3631 | if test -f $ac_dir/$ac_word; then | |
3632 | ac_cv_prog_AWK="$ac_prog" | |
3633 | break | |
3634 | fi | |
3635 | done | |
3636 | IFS="$ac_save_ifs" | |
3637 | fi | |
3638 | fi | |
3639 | AWK="$ac_cv_prog_AWK" | |
3640 | if test -n "$AWK"; then | |
3641 | echo "$ac_t""$AWK" 1>&6 | |
3642 | else | |
3643 | echo "$ac_t""no" 1>&6 | |
3644 | fi | |
3645 | ||
3646 | test -n "$AWK" && break | |
3647 | done | |
3648 | ||
c906108c SS |
3649 | # Find a good install program. We prefer a C program (faster), |
3650 | # so one script is as good as another. But avoid the broken or | |
3651 | # incompatible versions: | |
3652 | # SysV /etc/install, /usr/sbin/install | |
3653 | # SunOS /usr/etc/install | |
3654 | # IRIX /sbin/install | |
3655 | # AIX /bin/install | |
3656 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3657 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3658 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3659 | # ./install, which can be erroneously created by make from ./install.sh. | |
3660 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
66745969 | 3661 | echo "configure:3662: checking for a BSD compatible install" >&5 |
c906108c SS |
3662 | if test -z "$INSTALL"; then |
3663 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3664 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3665 | else | |
3666 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3667 | for ac_dir in $PATH; do | |
3668 | # Account for people who put trailing slashes in PATH elements. | |
3669 | case "$ac_dir/" in | |
3670 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3671 | *) | |
3672 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3673 | # Don't use installbsd from OSF since it installs stuff as root | |
3674 | # by default. | |
3675 | for ac_prog in ginstall scoinst install; do | |
3676 | if test -f $ac_dir/$ac_prog; then | |
3677 | if test $ac_prog = install && | |
3678 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3679 | # AIX install. It has an incompatible calling convention. | |
3680 | : | |
3681 | else | |
3682 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3683 | break 2 | |
3684 | fi | |
3685 | fi | |
3686 | done | |
3687 | ;; | |
3688 | esac | |
3689 | done | |
3690 | IFS="$ac_save_IFS" | |
3691 | ||
3692 | fi | |
3693 | if test "${ac_cv_path_install+set}" = set; then | |
3694 | INSTALL="$ac_cv_path_install" | |
3695 | else | |
3696 | # As a last resort, use the slow shell script. We don't cache a | |
3697 | # path for INSTALL within a source directory, because that will | |
3698 | # break other packages using the cache if that directory is | |
3699 | # removed, or if the path is relative. | |
3700 | INSTALL="$ac_install_sh" | |
3701 | fi | |
3702 | fi | |
3703 | echo "$ac_t""$INSTALL" 1>&6 | |
3704 | ||
3705 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3706 | # It thinks the first close brace ends the variable substitution. | |
3707 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3708 | ||
3709 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3710 | ||
3711 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3712 | ||
8bb2c122 | 3713 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
66745969 | 3714 | echo "configure:3715: checking whether ln -s works" >&5 |
8bb2c122 MK |
3715 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3716 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3717 | else |
8bb2c122 MK |
3718 | rm -f conftestdata |
3719 | if ln -s X conftestdata 2>/dev/null | |
3720 | then | |
3721 | rm -f conftestdata | |
3722 | ac_cv_prog_LN_S="ln -s" | |
3723 | else | |
3724 | ac_cv_prog_LN_S=ln | |
3725 | fi | |
3726 | fi | |
3727 | LN_S="$ac_cv_prog_LN_S" | |
3728 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3729 | echo "$ac_t""yes" 1>&6 | |
3730 | else | |
3731 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3732 | fi |
3733 | ||
8bb2c122 MK |
3734 | # Extract the first word of "ranlib", so it can be a program name with args. |
3735 | set dummy ranlib; ac_word=$2 | |
c906108c | 3736 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
66745969 | 3737 | echo "configure:3738: checking for $ac_word" >&5 |
8bb2c122 | 3738 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3739 | echo $ac_n "(cached) $ac_c" 1>&6 |
3740 | else | |
8bb2c122 MK |
3741 | if test -n "$RANLIB"; then |
3742 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3743 | else |
3744 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3745 | ac_dummy="$PATH" | |
3746 | for ac_dir in $ac_dummy; do | |
3747 | test -z "$ac_dir" && ac_dir=. | |
3748 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3749 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3750 | break |
3751 | fi | |
3752 | done | |
3753 | IFS="$ac_save_ifs" | |
8bb2c122 | 3754 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3755 | fi |
3756 | fi | |
8bb2c122 MK |
3757 | RANLIB="$ac_cv_prog_RANLIB" |
3758 | if test -n "$RANLIB"; then | |
3759 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3760 | else |
3761 | echo "$ac_t""no" 1>&6 | |
3762 | fi | |
3763 | ||
8bb2c122 MK |
3764 | for ac_prog in 'bison -y' byacc |
3765 | do | |
3766 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3767 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3768 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
66745969 | 3769 | echo "configure:3770: checking for $ac_word" >&5 |
8bb2c122 | 3770 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3771 | echo $ac_n "(cached) $ac_c" 1>&6 |
3772 | else | |
8bb2c122 MK |
3773 | if test -n "$YACC"; then |
3774 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3775 | else |
3776 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3777 | ac_dummy="$PATH" | |
3778 | for ac_dir in $ac_dummy; do | |
3779 | test -z "$ac_dir" && ac_dir=. | |
3780 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3781 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3782 | break |
3783 | fi | |
3784 | done | |
3785 | IFS="$ac_save_ifs" | |
3786 | fi | |
3787 | fi | |
8bb2c122 MK |
3788 | YACC="$ac_cv_prog_YACC" |
3789 | if test -n "$YACC"; then | |
3790 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3791 | else |
3792 | echo "$ac_t""no" 1>&6 | |
3793 | fi | |
3794 | ||
8bb2c122 MK |
3795 | test -n "$YACC" && break |
3796 | done | |
3797 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3798 | |
8bb2c122 MK |
3799 | |
3800 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3801 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3802 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
66745969 | 3803 | echo "configure:3804: checking for $ac_word" >&5 |
8bb2c122 | 3804 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3805 | echo $ac_n "(cached) $ac_c" 1>&6 |
3806 | else | |
8bb2c122 MK |
3807 | if test -n "$AR"; then |
3808 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3809 | else |
3810 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3811 | ac_dummy="$PATH" | |
3812 | for ac_dir in $ac_dummy; do | |
3813 | test -z "$ac_dir" && ac_dir=. | |
3814 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3815 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3816 | break |
3817 | fi | |
3818 | done | |
3819 | IFS="$ac_save_ifs" | |
8bb2c122 | 3820 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3821 | fi |
3822 | fi | |
8bb2c122 MK |
3823 | AR="$ac_cv_prog_AR" |
3824 | if test -n "$AR"; then | |
3825 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3826 | else |
3827 | echo "$ac_t""no" 1>&6 | |
3828 | fi | |
3829 | ||
8bb2c122 | 3830 | |
c906108c | 3831 | |
95ca63c4 CF |
3832 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3833 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3834 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
66745969 | 3835 | echo "configure:3836: checking for $ac_word" >&5 |
95ca63c4 CF |
3836 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3838 | else | |
3839 | if test -n "$DLLTOOL"; then | |
3840 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3841 | else | |
3842 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3843 | ac_dummy="$PATH" | |
3844 | for ac_dir in $ac_dummy; do | |
3845 | test -z "$ac_dir" && ac_dir=. | |
3846 | if test -f $ac_dir/$ac_word; then | |
3847 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3848 | break | |
3849 | fi | |
3850 | done | |
3851 | IFS="$ac_save_ifs" | |
3852 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3853 | fi | |
3854 | fi | |
3855 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3856 | if test -n "$DLLTOOL"; then | |
3857 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3858 | else | |
3859 | echo "$ac_t""no" 1>&6 | |
3860 | fi | |
3861 | ||
3862 | ||
3863 | ||
3864 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3865 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3866 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
66745969 | 3867 | echo "configure:3868: checking for $ac_word" >&5 |
95ca63c4 CF |
3868 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3869 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3870 | else | |
3871 | if test -n "$WINDRES"; then | |
3872 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3873 | else | |
3874 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3875 | ac_dummy="$PATH" | |
3876 | for ac_dir in $ac_dummy; do | |
3877 | test -z "$ac_dir" && ac_dir=. | |
3878 | if test -f $ac_dir/$ac_word; then | |
3879 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3880 | break | |
3881 | fi | |
3882 | done | |
3883 | IFS="$ac_save_ifs" | |
3884 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3885 | fi | |
3886 | fi | |
3887 | WINDRES="$ac_cv_prog_WINDRES" | |
3888 | if test -n "$WINDRES"; then | |
3889 | echo "$ac_t""$WINDRES" 1>&6 | |
3890 | else | |
3891 | echo "$ac_t""no" 1>&6 | |
3892 | fi | |
3893 | ||
3894 | ||
3895 | ||
c906108c | 3896 | |
8bb2c122 | 3897 | # Needed for GNU/Hurd. |
75c6e08a MK |
3898 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3899 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3900 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
66745969 | 3901 | echo "configure:3902: checking for $ac_word" >&5 |
75c6e08a MK |
3902 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3903 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3904 | else | |
3905 | if test -n "$MIG"; then | |
3906 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3907 | else | |
3908 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3909 | ac_dummy="$PATH" | |
3910 | for ac_dir in $ac_dummy; do | |
3911 | test -z "$ac_dir" && ac_dir=. | |
3912 | if test -f $ac_dir/$ac_word; then | |
3913 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3914 | break | |
3915 | fi | |
3916 | done | |
3917 | IFS="$ac_save_ifs" | |
3918 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3919 | fi | |
3920 | fi | |
3921 | MIG="$ac_cv_prog_MIG" | |
3922 | if test -n "$MIG"; then | |
3923 | echo "$ac_t""$MIG" 1>&6 | |
3924 | else | |
3925 | echo "$ac_t""no" 1>&6 | |
3926 | fi | |
3927 | ||
3928 | ||
3929 | ||
3930 | ||
9a156167 MK |
3931 | # ---------------------- # |
3932 | # Checks for libraries. # | |
3933 | # ---------------------- # | |
3934 | ||
3935 | # We might need to link with -lm; most simulators need it. | |
3936 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
66745969 | 3937 | echo "configure:3938: checking for main in -lm" >&5 |
9a156167 MK |
3938 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3939 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3940 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3941 | else | |
3942 | ac_save_LIBS="$LIBS" | |
3943 | LIBS="-lm $LIBS" | |
3944 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3945 | #line 3946 "configure" |
9a156167 MK |
3946 | #include "confdefs.h" |
3947 | ||
3948 | int main() { | |
3949 | main() | |
3950 | ; return 0; } | |
3951 | EOF | |
66745969 | 3952 | if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3953 | rm -rf conftest* |
3954 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3955 | else | |
3956 | echo "configure: failed program was:" >&5 | |
3957 | cat conftest.$ac_ext >&5 | |
3958 | rm -rf conftest* | |
3959 | eval "ac_cv_lib_$ac_lib_var=no" | |
3960 | fi | |
3961 | rm -f conftest* | |
3962 | LIBS="$ac_save_LIBS" | |
3963 | ||
3964 | fi | |
3965 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3966 | echo "$ac_t""yes" 1>&6 | |
3967 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3968 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3969 | cat >> confdefs.h <<EOF | |
3970 | #define $ac_tr_lib 1 | |
3971 | EOF | |
3972 | ||
3973 | LIBS="-lm $LIBS" | |
3974 | ||
3975 | else | |
3976 | echo "$ac_t""no" 1>&6 | |
3977 | fi | |
3978 | ||
3979 | ||
3980 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3981 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3982 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3983 | # is known to have this problem). Therefore we avoid libw if we can. | |
3984 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
66745969 | 3985 | echo "configure:3986: checking for wctype" >&5 |
9a156167 MK |
3986 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3987 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3988 | else | |
3989 | cat > conftest.$ac_ext <<EOF | |
66745969 | 3990 | #line 3991 "configure" |
9a156167 MK |
3991 | #include "confdefs.h" |
3992 | /* System header to define __stub macros and hopefully few prototypes, | |
3993 | which can conflict with char wctype(); below. */ | |
3994 | #include <assert.h> | |
3995 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3996 | /* We use char because int might match the return type of a gcc2 | |
3997 | builtin and then its argument prototype would still apply. */ | |
3998 | char wctype(); | |
3999 | ||
4000 | int main() { | |
4001 | ||
4002 | /* The GNU C library defines this for functions which it implements | |
4003 | to always fail with ENOSYS. Some functions are actually named | |
4004 | something starting with __ and the normal name is an alias. */ | |
4005 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
4006 | choke me | |
4007 | #else | |
4008 | wctype(); | |
4009 | #endif | |
4010 | ||
4011 | ; return 0; } | |
4012 | EOF | |
66745969 | 4013 | if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4014 | rm -rf conftest* |
4015 | eval "ac_cv_func_wctype=yes" | |
4016 | else | |
4017 | echo "configure: failed program was:" >&5 | |
4018 | cat conftest.$ac_ext >&5 | |
4019 | rm -rf conftest* | |
4020 | eval "ac_cv_func_wctype=no" | |
4021 | fi | |
4022 | rm -f conftest* | |
4023 | fi | |
4024 | ||
4025 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
4026 | echo "$ac_t""yes" 1>&6 | |
4027 | : | |
4028 | else | |
4029 | echo "$ac_t""no" 1>&6 | |
4030 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
66745969 | 4031 | echo "configure:4032: checking for wctype in -lw" >&5 |
9a156167 MK |
4032 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
4033 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4034 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4035 | else | |
4036 | ac_save_LIBS="$LIBS" | |
4037 | LIBS="-lw $LIBS" | |
4038 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4039 | #line 4040 "configure" |
9a156167 MK |
4040 | #include "confdefs.h" |
4041 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4042 | /* We use char because int might match the return type of a gcc2 | |
4043 | builtin and then its argument prototype would still apply. */ | |
4044 | char wctype(); | |
4045 | ||
4046 | int main() { | |
4047 | wctype() | |
4048 | ; return 0; } | |
4049 | EOF | |
66745969 | 4050 | if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4051 | rm -rf conftest* |
4052 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4053 | else | |
4054 | echo "configure: failed program was:" >&5 | |
4055 | cat conftest.$ac_ext >&5 | |
4056 | rm -rf conftest* | |
4057 | eval "ac_cv_lib_$ac_lib_var=no" | |
4058 | fi | |
4059 | rm -f conftest* | |
4060 | LIBS="$ac_save_LIBS" | |
4061 | ||
4062 | fi | |
4063 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4064 | echo "$ac_t""yes" 1>&6 | |
4065 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4066 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4067 | cat >> confdefs.h <<EOF | |
4068 | #define $ac_tr_lib 1 | |
4069 | EOF | |
4070 | ||
4071 | LIBS="-lw $LIBS" | |
4072 | ||
4073 | else | |
4074 | echo "$ac_t""no" 1>&6 | |
4075 | fi | |
4076 | ||
4077 | fi | |
4078 | ||
4079 | ||
c890192f MK |
4080 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
4081 | ||
4082 | echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 | |
66745969 | 4083 | echo "configure:4084: checking for library containing gethostbyname" >&5 |
c890192f MK |
4084 | if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then |
4085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4086 | else | |
4087 | ac_func_search_save_LIBS="$LIBS" | |
4088 | ac_cv_search_gethostbyname="no" | |
4089 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4090 | #line 4091 "configure" |
c890192f MK |
4091 | #include "confdefs.h" |
4092 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4093 | /* We use char because int might match the return type of a gcc2 | |
4094 | builtin and then its argument prototype would still apply. */ | |
4095 | char gethostbyname(); | |
4096 | ||
4097 | int main() { | |
4098 | gethostbyname() | |
4099 | ; return 0; } | |
4100 | EOF | |
66745969 | 4101 | if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
4102 | rm -rf conftest* |
4103 | ac_cv_search_gethostbyname="none required" | |
4104 | else | |
4105 | echo "configure: failed program was:" >&5 | |
4106 | cat conftest.$ac_ext >&5 | |
4107 | fi | |
4108 | rm -f conftest* | |
4109 | test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do | |
4110 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4111 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4112 | #line 4113 "configure" |
c890192f MK |
4113 | #include "confdefs.h" |
4114 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4115 | /* We use char because int might match the return type of a gcc2 | |
4116 | builtin and then its argument prototype would still apply. */ | |
4117 | char gethostbyname(); | |
4118 | ||
4119 | int main() { | |
4120 | gethostbyname() | |
4121 | ; return 0; } | |
4122 | EOF | |
66745969 | 4123 | if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
4124 | rm -rf conftest* |
4125 | ac_cv_search_gethostbyname="-l$i" | |
4126 | break | |
4127 | else | |
4128 | echo "configure: failed program was:" >&5 | |
4129 | cat conftest.$ac_ext >&5 | |
4130 | fi | |
4131 | rm -f conftest* | |
4132 | done | |
4133 | LIBS="$ac_func_search_save_LIBS" | |
4134 | fi | |
4135 | ||
4136 | echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6 | |
4137 | if test "$ac_cv_search_gethostbyname" != "no"; then | |
4138 | test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" | |
4139 | ||
4140 | else : | |
4141 | ||
4142 | fi | |
4143 | ||
9a156167 MK |
4144 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
4145 | ||
4146 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
66745969 | 4147 | echo "configure:4148: checking for library containing socketpair" >&5 |
9a156167 MK |
4148 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
4149 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4150 | else | |
4151 | ac_func_search_save_LIBS="$LIBS" | |
4152 | ac_cv_search_socketpair="no" | |
4153 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4154 | #line 4155 "configure" |
9a156167 MK |
4155 | #include "confdefs.h" |
4156 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4157 | /* We use char because int might match the return type of a gcc2 | |
4158 | builtin and then its argument prototype would still apply. */ | |
4159 | char socketpair(); | |
4160 | ||
4161 | int main() { | |
4162 | socketpair() | |
4163 | ; return 0; } | |
4164 | EOF | |
66745969 | 4165 | if { (eval echo configure:4166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4166 | rm -rf conftest* |
4167 | ac_cv_search_socketpair="none required" | |
4168 | else | |
4169 | echo "configure: failed program was:" >&5 | |
4170 | cat conftest.$ac_ext >&5 | |
4171 | fi | |
4172 | rm -f conftest* | |
4173 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
4174 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4175 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4176 | #line 4177 "configure" |
9a156167 MK |
4177 | #include "confdefs.h" |
4178 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4179 | /* We use char because int might match the return type of a gcc2 | |
4180 | builtin and then its argument prototype would still apply. */ | |
4181 | char socketpair(); | |
4182 | ||
4183 | int main() { | |
4184 | socketpair() | |
4185 | ; return 0; } | |
4186 | EOF | |
66745969 | 4187 | if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4188 | rm -rf conftest* |
4189 | ac_cv_search_socketpair="-l$i" | |
4190 | break | |
4191 | else | |
4192 | echo "configure: failed program was:" >&5 | |
4193 | cat conftest.$ac_ext >&5 | |
4194 | fi | |
4195 | rm -f conftest* | |
4196 | done | |
4197 | LIBS="$ac_func_search_save_LIBS" | |
4198 | fi | |
4199 | ||
4200 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
4201 | if test "$ac_cv_search_socketpair" != "no"; then | |
4202 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
4203 | ||
4204 | else : | |
4205 | ||
4206 | fi | |
4207 | ||
06825bd1 MK |
4208 | # Since GDB uses Readline, we need termcap functionality, so we need |
4209 | # to find a library that provides that. When GDB is configured with | |
c324d747 | 4210 | # the TUI, we need full curses functionality. |
06825bd1 MK |
4211 | |
4212 | case $host_os in | |
4213 | cygwin*) | |
4214 | if test -d $srcdir/libtermcap; then | |
4215 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
4216 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
4217 | fi ;; | |
40a7debc | 4218 | go32* | *djgpp*) |
06825bd1 MK |
4219 | ac_cv_search_tgetent="none required" |
4220 | ;; | |
4221 | aix*) | |
4222 | # Readline prefers curses over termcap on AIX. | |
4223 | # ??? Why? | |
4224 | ||
4225 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
66745969 | 4226 | echo "configure:4227: checking for library containing tgetent" >&5 |
06825bd1 MK |
4227 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4228 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4229 | else | |
4230 | ac_func_search_save_LIBS="$LIBS" | |
4231 | ac_cv_search_tgetent="no" | |
4232 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4233 | #line 4234 "configure" |
06825bd1 MK |
4234 | #include "confdefs.h" |
4235 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4236 | /* We use char because int might match the return type of a gcc2 | |
4237 | builtin and then its argument prototype would still apply. */ | |
4238 | char tgetent(); | |
4239 | ||
4240 | int main() { | |
4241 | tgetent() | |
4242 | ; return 0; } | |
4243 | EOF | |
66745969 | 4244 | if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4245 | rm -rf conftest* |
4246 | ac_cv_search_tgetent="none required" | |
4247 | else | |
4248 | echo "configure: failed program was:" >&5 | |
4249 | cat conftest.$ac_ext >&5 | |
4250 | fi | |
4251 | rm -f conftest* | |
4252 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
4253 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4254 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4255 | #line 4256 "configure" |
06825bd1 MK |
4256 | #include "confdefs.h" |
4257 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4258 | /* We use char because int might match the return type of a gcc2 | |
4259 | builtin and then its argument prototype would still apply. */ | |
4260 | char tgetent(); | |
4261 | ||
4262 | int main() { | |
4263 | tgetent() | |
4264 | ; return 0; } | |
4265 | EOF | |
66745969 | 4266 | if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4267 | rm -rf conftest* |
4268 | ac_cv_search_tgetent="-l$i" | |
4269 | break | |
4270 | else | |
4271 | echo "configure: failed program was:" >&5 | |
4272 | cat conftest.$ac_ext >&5 | |
4273 | fi | |
4274 | rm -f conftest* | |
4275 | done | |
4276 | LIBS="$ac_func_search_save_LIBS" | |
4277 | fi | |
4278 | ||
4279 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4280 | if test "$ac_cv_search_tgetent" != "no"; then | |
4281 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4282 | ||
4283 | else : | |
4284 | ||
4285 | fi | |
4286 | ;; | |
4287 | esac | |
4288 | ||
4289 | # Note: We used to check for libtermlib and libterminfo too, but | |
4290 | # Readline doesn't, so I think we're safe with leaving them out. | |
4291 | ||
4292 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
66745969 | 4293 | echo "configure:4294: checking for library containing tgetent" >&5 |
06825bd1 MK |
4294 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4295 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4296 | else | |
4297 | ac_func_search_save_LIBS="$LIBS" | |
4298 | ac_cv_search_tgetent="no" | |
4299 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4300 | #line 4301 "configure" |
06825bd1 MK |
4301 | #include "confdefs.h" |
4302 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4303 | /* We use char because int might match the return type of a gcc2 | |
4304 | builtin and then its argument prototype would still apply. */ | |
4305 | char tgetent(); | |
4306 | ||
4307 | int main() { | |
4308 | tgetent() | |
4309 | ; return 0; } | |
4310 | EOF | |
66745969 | 4311 | if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4312 | rm -rf conftest* |
4313 | ac_cv_search_tgetent="none required" | |
4314 | else | |
4315 | echo "configure: failed program was:" >&5 | |
4316 | cat conftest.$ac_ext >&5 | |
4317 | fi | |
4318 | rm -f conftest* | |
4319 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
4320 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4321 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4322 | #line 4323 "configure" |
06825bd1 MK |
4323 | #include "confdefs.h" |
4324 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4325 | /* We use char because int might match the return type of a gcc2 | |
4326 | builtin and then its argument prototype would still apply. */ | |
4327 | char tgetent(); | |
4328 | ||
4329 | int main() { | |
4330 | tgetent() | |
4331 | ; return 0; } | |
4332 | EOF | |
66745969 | 4333 | if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4334 | rm -rf conftest* |
4335 | ac_cv_search_tgetent="-l$i" | |
4336 | break | |
4337 | else | |
4338 | echo "configure: failed program was:" >&5 | |
4339 | cat conftest.$ac_ext >&5 | |
4340 | fi | |
4341 | rm -f conftest* | |
4342 | done | |
4343 | LIBS="$ac_func_search_save_LIBS" | |
4344 | fi | |
4345 | ||
4346 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4347 | if test "$ac_cv_search_tgetent" != "no"; then | |
4348 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4349 | ||
4350 | else : | |
4351 | ||
4352 | fi | |
4353 | ||
4354 | if test "$ac_cv_search_tgetent" = no; then | |
4355 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
4356 | fi | |
4357 | ||
5ee754fc MK |
4358 | # ------------------------- # |
4359 | # Checks for header files. # | |
4360 | # ------------------------- # | |
4361 | ||
4362 | ac_header_dirent=no | |
4363 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4364 | do | |
4365 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4366 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
66745969 | 4367 | echo "configure:4368: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 4368 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
4369 | echo $ac_n "(cached) $ac_c" 1>&6 |
4370 | else | |
4371 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4372 | #line 4373 "configure" |
c906108c SS |
4373 | #include "confdefs.h" |
4374 | #include <sys/types.h> | |
5ee754fc MK |
4375 | #include <$ac_hdr> |
4376 | int main() { | |
4377 | DIR *dirp = 0; | |
4378 | ; return 0; } | |
4379 | EOF | |
66745969 | 4380 | if { (eval echo configure:4381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4381 | rm -rf conftest* |
4382 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4383 | else | |
4384 | echo "configure: failed program was:" >&5 | |
4385 | cat conftest.$ac_ext >&5 | |
4386 | rm -rf conftest* | |
4387 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4388 | fi | |
4389 | rm -f conftest* | |
4390 | fi | |
4391 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4392 | echo "$ac_t""yes" 1>&6 | |
4393 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4394 | cat >> confdefs.h <<EOF | |
4395 | #define $ac_tr_hdr 1 | |
4396 | EOF | |
4397 | ac_header_dirent=$ac_hdr; break | |
4398 | else | |
4399 | echo "$ac_t""no" 1>&6 | |
4400 | fi | |
4401 | done | |
4402 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4403 | if test $ac_header_dirent = dirent.h; then | |
4404 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
66745969 | 4405 | echo "configure:4406: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4406 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4407 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4408 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4409 | else | |
4410 | ac_save_LIBS="$LIBS" | |
4411 | LIBS="-ldir $LIBS" | |
4412 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4413 | #line 4414 "configure" |
5ee754fc MK |
4414 | #include "confdefs.h" |
4415 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4416 | /* We use char because int might match the return type of a gcc2 | |
4417 | builtin and then its argument prototype would still apply. */ | |
4418 | char opendir(); | |
c906108c SS |
4419 | |
4420 | int main() { | |
5ee754fc | 4421 | opendir() |
c906108c SS |
4422 | ; return 0; } |
4423 | EOF | |
66745969 | 4424 | if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4425 | rm -rf conftest* |
5ee754fc | 4426 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4427 | else |
4428 | echo "configure: failed program was:" >&5 | |
4429 | cat conftest.$ac_ext >&5 | |
4430 | rm -rf conftest* | |
5ee754fc | 4431 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4432 | fi |
4433 | rm -f conftest* | |
5ee754fc MK |
4434 | LIBS="$ac_save_LIBS" |
4435 | ||
4436 | fi | |
4437 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4438 | echo "$ac_t""yes" 1>&6 | |
4439 | LIBS="$LIBS -ldir" | |
4440 | else | |
4441 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4442 | fi |
4443 | ||
5ee754fc MK |
4444 | else |
4445 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
66745969 | 4446 | echo "configure:4447: checking for opendir in -lx" >&5 |
5ee754fc MK |
4447 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4448 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4449 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4450 | else | |
4451 | ac_save_LIBS="$LIBS" | |
4452 | LIBS="-lx $LIBS" | |
4453 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4454 | #line 4455 "configure" |
5ee754fc MK |
4455 | #include "confdefs.h" |
4456 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4457 | /* We use char because int might match the return type of a gcc2 | |
4458 | builtin and then its argument prototype would still apply. */ | |
4459 | char opendir(); | |
4460 | ||
4461 | int main() { | |
4462 | opendir() | |
4463 | ; return 0; } | |
c906108c | 4464 | EOF |
66745969 | 4465 | if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4466 | rm -rf conftest* |
4467 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4468 | else | |
4469 | echo "configure: failed program was:" >&5 | |
4470 | cat conftest.$ac_ext >&5 | |
4471 | rm -rf conftest* | |
4472 | eval "ac_cv_lib_$ac_lib_var=no" | |
4473 | fi | |
4474 | rm -f conftest* | |
4475 | LIBS="$ac_save_LIBS" | |
c906108c | 4476 | |
5ee754fc MK |
4477 | fi |
4478 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4479 | echo "$ac_t""yes" 1>&6 | |
4480 | LIBS="$LIBS -lx" | |
4481 | else | |
4482 | echo "$ac_t""no" 1>&6 | |
4483 | fi | |
c906108c | 4484 | |
5ee754fc | 4485 | fi |
c906108c | 4486 | |
5ee754fc | 4487 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
66745969 | 4488 | echo "configure:4489: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4489 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4490 | echo $ac_n "(cached) $ac_c" 1>&6 |
4491 | else | |
4492 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4493 | #line 4494 "configure" |
9608ab8b MK |
4494 | #include "confdefs.h" |
4495 | #include <sys/types.h> | |
5ee754fc MK |
4496 | #include <sys/stat.h> |
4497 | ||
4498 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4499 | # if S_ISBLK (S_IFDIR) | |
4500 | You lose. | |
4501 | # endif | |
4502 | #endif | |
4503 | ||
4504 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4505 | # if S_ISBLK (S_IFCHR) | |
4506 | You lose. | |
4507 | # endif | |
4508 | #endif | |
4509 | ||
4510 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4511 | # if S_ISLNK (S_IFREG) | |
4512 | You lose. | |
4513 | # endif | |
4514 | #endif | |
4515 | ||
4516 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4517 | # if S_ISSOCK (S_IFREG) | |
4518 | You lose. | |
4519 | # endif | |
4520 | #endif | |
4521 | ||
9608ab8b | 4522 | EOF |
5ee754fc MK |
4523 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4524 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4525 | rm -rf conftest* |
5ee754fc MK |
4526 | ac_cv_header_stat_broken=yes |
4527 | else | |
4528 | rm -rf conftest* | |
4529 | ac_cv_header_stat_broken=no | |
4530 | fi | |
4531 | rm -f conftest* | |
4532 | ||
4533 | fi | |
4534 | ||
4535 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4536 | if test $ac_cv_header_stat_broken = yes; then | |
4537 | cat >> confdefs.h <<\EOF | |
4538 | #define STAT_MACROS_BROKEN 1 | |
4539 | EOF | |
4540 | ||
4541 | fi | |
4542 | ||
4543 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
66745969 | 4544 | echo "configure:4545: checking for ANSI C header files" >&5 |
5ee754fc MK |
4545 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4547 | else | |
4548 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4549 | #line 4550 "configure" |
5ee754fc MK |
4550 | #include "confdefs.h" |
4551 | #include <stdlib.h> | |
4552 | #include <stdarg.h> | |
4553 | #include <string.h> | |
4554 | #include <float.h> | |
4555 | EOF | |
4556 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4557 | { (eval echo configure:4558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4558 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4559 | if test -z "$ac_err"; then | |
4560 | rm -rf conftest* | |
4561 | ac_cv_header_stdc=yes | |
4562 | else | |
4563 | echo "$ac_err" >&5 | |
4564 | echo "configure: failed program was:" >&5 | |
4565 | cat conftest.$ac_ext >&5 | |
4566 | rm -rf conftest* | |
4567 | ac_cv_header_stdc=no | |
4568 | fi | |
4569 | rm -f conftest* | |
4570 | ||
4571 | if test $ac_cv_header_stdc = yes; then | |
4572 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4573 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4574 | #line 4575 "configure" |
5ee754fc MK |
4575 | #include "confdefs.h" |
4576 | #include <string.h> | |
4577 | EOF | |
4578 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4579 | egrep "memchr" >/dev/null 2>&1; then | |
4580 | : | |
4581 | else | |
4582 | rm -rf conftest* | |
4583 | ac_cv_header_stdc=no | |
4584 | fi | |
4585 | rm -f conftest* | |
4586 | ||
4587 | fi | |
4588 | ||
4589 | if test $ac_cv_header_stdc = yes; then | |
4590 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4591 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4592 | #line 4593 "configure" |
5ee754fc MK |
4593 | #include "confdefs.h" |
4594 | #include <stdlib.h> | |
4595 | EOF | |
4596 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4597 | egrep "free" >/dev/null 2>&1; then | |
4598 | : | |
4599 | else | |
4600 | rm -rf conftest* | |
4601 | ac_cv_header_stdc=no | |
4602 | fi | |
4603 | rm -f conftest* | |
4604 | ||
4605 | fi | |
4606 | ||
4607 | if test $ac_cv_header_stdc = yes; then | |
4608 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4609 | if test "$cross_compiling" = yes; then | |
4610 | : | |
4611 | else | |
4612 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4613 | #line 4614 "configure" |
5ee754fc MK |
4614 | #include "confdefs.h" |
4615 | #include <ctype.h> | |
4616 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4617 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4618 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4619 | int main () { int i; for (i = 0; i < 256; i++) | |
4620 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4621 | exit (0); } | |
4622 | ||
4623 | EOF | |
66745969 | 4624 | if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4625 | then |
4626 | : | |
9608ab8b | 4627 | else |
5ee754fc MK |
4628 | echo "configure: failed program was:" >&5 |
4629 | cat conftest.$ac_ext >&5 | |
4630 | rm -fr conftest* | |
4631 | ac_cv_header_stdc=no | |
4632 | fi | |
4633 | rm -fr conftest* | |
4634 | fi | |
4635 | ||
4636 | fi | |
4637 | fi | |
4638 | ||
4639 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4640 | if test $ac_cv_header_stdc = yes; then | |
4641 | cat >> confdefs.h <<\EOF | |
4642 | #define STDC_HEADERS 1 | |
4643 | EOF | |
4644 | ||
4645 | fi | |
4646 | ||
4647 | for ac_hdr in link.h | |
4648 | do | |
4649 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4650 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4651 | echo "configure:4652: checking for $ac_hdr" >&5 |
5ee754fc MK |
4652 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4653 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4654 | else | |
4655 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4656 | #line 4657 "configure" |
5ee754fc MK |
4657 | #include "confdefs.h" |
4658 | #include <$ac_hdr> | |
4659 | EOF | |
4660 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4661 | { (eval echo configure:4662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4662 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4663 | if test -z "$ac_err"; then | |
4664 | rm -rf conftest* | |
4665 | eval "ac_cv_header_$ac_safe=yes" | |
4666 | else | |
4667 | echo "$ac_err" >&5 | |
4668 | echo "configure: failed program was:" >&5 | |
4669 | cat conftest.$ac_ext >&5 | |
4670 | rm -rf conftest* | |
4671 | eval "ac_cv_header_$ac_safe=no" | |
4672 | fi | |
4673 | rm -f conftest* | |
4674 | fi | |
4675 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4676 | echo "$ac_t""yes" 1>&6 | |
4677 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4678 | cat >> confdefs.h <<EOF | |
4679 | #define $ac_tr_hdr 1 | |
4680 | EOF | |
4681 | ||
4682 | else | |
4683 | echo "$ac_t""no" 1>&6 | |
4684 | fi | |
4685 | done | |
4686 | ||
78434e59 | 4687 | for ac_hdr in machine/reg.h |
5ee754fc MK |
4688 | do |
4689 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4690 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4691 | echo "configure:4692: checking for $ac_hdr" >&5 |
5ee754fc MK |
4692 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4694 | else | |
4695 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4696 | #line 4697 "configure" |
5ee754fc MK |
4697 | #include "confdefs.h" |
4698 | #include <$ac_hdr> | |
4699 | EOF | |
4700 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4701 | { (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4702 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4703 | if test -z "$ac_err"; then | |
4704 | rm -rf conftest* | |
4705 | eval "ac_cv_header_$ac_safe=yes" | |
4706 | else | |
4707 | echo "$ac_err" >&5 | |
4708 | echo "configure: failed program was:" >&5 | |
4709 | cat conftest.$ac_ext >&5 | |
4710 | rm -rf conftest* | |
4711 | eval "ac_cv_header_$ac_safe=no" | |
4712 | fi | |
4713 | rm -f conftest* | |
4714 | fi | |
4715 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4716 | echo "$ac_t""yes" 1>&6 | |
4717 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4718 | cat >> confdefs.h <<EOF | |
4719 | #define $ac_tr_hdr 1 | |
4720 | EOF | |
4721 | ||
4722 | else | |
4723 | echo "$ac_t""no" 1>&6 | |
4724 | fi | |
4725 | done | |
4726 | ||
78434e59 | 4727 | for ac_hdr in nlist.h |
5ee754fc MK |
4728 | do |
4729 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4730 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4731 | echo "configure:4732: checking for $ac_hdr" >&5 |
5ee754fc MK |
4732 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4734 | else | |
4735 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4736 | #line 4737 "configure" |
5ee754fc MK |
4737 | #include "confdefs.h" |
4738 | #include <$ac_hdr> | |
4739 | EOF | |
4740 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4741 | { (eval echo configure:4742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4742 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4743 | if test -z "$ac_err"; then | |
4744 | rm -rf conftest* | |
4745 | eval "ac_cv_header_$ac_safe=yes" | |
4746 | else | |
4747 | echo "$ac_err" >&5 | |
4748 | echo "configure: failed program was:" >&5 | |
4749 | cat conftest.$ac_ext >&5 | |
4750 | rm -rf conftest* | |
4751 | eval "ac_cv_header_$ac_safe=no" | |
4752 | fi | |
4753 | rm -f conftest* | |
4754 | fi | |
4755 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4756 | echo "$ac_t""yes" 1>&6 | |
4757 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4758 | cat >> confdefs.h <<EOF | |
4759 | #define $ac_tr_hdr 1 | |
4760 | EOF | |
4761 | ||
4762 | else | |
4763 | echo "$ac_t""no" 1>&6 | |
4764 | fi | |
4765 | done | |
4766 | ||
78434e59 | 4767 | for ac_hdr in poll.h sys/poll.h |
5ee754fc MK |
4768 | do |
4769 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4770 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4771 | echo "configure:4772: checking for $ac_hdr" >&5 |
5ee754fc MK |
4772 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4774 | else | |
4775 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4776 | #line 4777 "configure" |
5ee754fc MK |
4777 | #include "confdefs.h" |
4778 | #include <$ac_hdr> | |
4779 | EOF | |
4780 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4781 | { (eval echo configure:4782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4782 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4783 | if test -z "$ac_err"; then | |
4784 | rm -rf conftest* | |
4785 | eval "ac_cv_header_$ac_safe=yes" | |
4786 | else | |
4787 | echo "$ac_err" >&5 | |
4788 | echo "configure: failed program was:" >&5 | |
4789 | cat conftest.$ac_ext >&5 | |
4790 | rm -rf conftest* | |
4791 | eval "ac_cv_header_$ac_safe=no" | |
4792 | fi | |
4793 | rm -f conftest* | |
4794 | fi | |
4795 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4796 | echo "$ac_t""yes" 1>&6 | |
4797 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4798 | cat >> confdefs.h <<EOF | |
4799 | #define $ac_tr_hdr 1 | |
4800 | EOF | |
4801 | ||
4802 | else | |
4803 | echo "$ac_t""no" 1>&6 | |
4804 | fi | |
4805 | done | |
4806 | ||
78434e59 | 4807 | for ac_hdr in proc_service.h thread_db.h |
5ee754fc MK |
4808 | do |
4809 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4810 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4811 | echo "configure:4812: checking for $ac_hdr" >&5 |
5ee754fc MK |
4812 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4813 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4814 | else | |
4815 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4816 | #line 4817 "configure" |
5ee754fc MK |
4817 | #include "confdefs.h" |
4818 | #include <$ac_hdr> | |
4819 | EOF | |
4820 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4821 | { (eval echo configure:4822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4822 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4823 | if test -z "$ac_err"; then | |
4824 | rm -rf conftest* | |
4825 | eval "ac_cv_header_$ac_safe=yes" | |
4826 | else | |
4827 | echo "$ac_err" >&5 | |
4828 | echo "configure: failed program was:" >&5 | |
4829 | cat conftest.$ac_ext >&5 | |
4830 | rm -rf conftest* | |
4831 | eval "ac_cv_header_$ac_safe=no" | |
4832 | fi | |
4833 | rm -f conftest* | |
4834 | fi | |
4835 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4836 | echo "$ac_t""yes" 1>&6 | |
4837 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4838 | cat >> confdefs.h <<EOF | |
4839 | #define $ac_tr_hdr 1 | |
4840 | EOF | |
4841 | ||
4842 | else | |
4843 | echo "$ac_t""no" 1>&6 | |
4844 | fi | |
4845 | done | |
4846 | ||
78434e59 | 4847 | for ac_hdr in stddef.h |
5ee754fc MK |
4848 | do |
4849 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4850 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4851 | echo "configure:4852: checking for $ac_hdr" >&5 |
5ee754fc MK |
4852 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4853 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4854 | else | |
4855 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4856 | #line 4857 "configure" |
5ee754fc MK |
4857 | #include "confdefs.h" |
4858 | #include <$ac_hdr> | |
4859 | EOF | |
4860 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4861 | { (eval echo configure:4862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4862 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4863 | if test -z "$ac_err"; then | |
4864 | rm -rf conftest* | |
4865 | eval "ac_cv_header_$ac_safe=yes" | |
4866 | else | |
4867 | echo "$ac_err" >&5 | |
4868 | echo "configure: failed program was:" >&5 | |
4869 | cat conftest.$ac_ext >&5 | |
4870 | rm -rf conftest* | |
4871 | eval "ac_cv_header_$ac_safe=no" | |
4872 | fi | |
4873 | rm -f conftest* | |
4874 | fi | |
4875 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4876 | echo "$ac_t""yes" 1>&6 | |
4877 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4878 | cat >> confdefs.h <<EOF | |
4879 | #define $ac_tr_hdr 1 | |
4880 | EOF | |
4881 | ||
4882 | else | |
4883 | echo "$ac_t""no" 1>&6 | |
4884 | fi | |
4885 | done | |
4886 | ||
78434e59 | 4887 | for ac_hdr in stdlib.h |
5ee754fc MK |
4888 | do |
4889 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4890 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4891 | echo "configure:4892: checking for $ac_hdr" >&5 |
5ee754fc MK |
4892 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4893 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4894 | else | |
4895 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4896 | #line 4897 "configure" |
5ee754fc MK |
4897 | #include "confdefs.h" |
4898 | #include <$ac_hdr> | |
4899 | EOF | |
4900 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4901 | { (eval echo configure:4902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4902 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4903 | if test -z "$ac_err"; then | |
4904 | rm -rf conftest* | |
4905 | eval "ac_cv_header_$ac_safe=yes" | |
4906 | else | |
4907 | echo "$ac_err" >&5 | |
4908 | echo "configure: failed program was:" >&5 | |
4909 | cat conftest.$ac_ext >&5 | |
4910 | rm -rf conftest* | |
4911 | eval "ac_cv_header_$ac_safe=no" | |
4912 | fi | |
4913 | rm -f conftest* | |
4914 | fi | |
4915 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4916 | echo "$ac_t""yes" 1>&6 | |
4917 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4918 | cat >> confdefs.h <<EOF | |
4919 | #define $ac_tr_hdr 1 | |
4920 | EOF | |
4921 | ||
4922 | else | |
4923 | echo "$ac_t""no" 1>&6 | |
4924 | fi | |
4925 | done | |
4926 | ||
78434e59 | 4927 | for ac_hdr in stdint.h |
5ee754fc MK |
4928 | do |
4929 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4930 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4931 | echo "configure:4932: checking for $ac_hdr" >&5 |
5ee754fc MK |
4932 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4933 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4934 | else | |
4935 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4936 | #line 4937 "configure" |
5ee754fc MK |
4937 | #include "confdefs.h" |
4938 | #include <$ac_hdr> | |
4939 | EOF | |
4940 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4941 | { (eval echo configure:4942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4942 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4943 | if test -z "$ac_err"; then | |
4944 | rm -rf conftest* | |
4945 | eval "ac_cv_header_$ac_safe=yes" | |
4946 | else | |
4947 | echo "$ac_err" >&5 | |
4948 | echo "configure: failed program was:" >&5 | |
4949 | cat conftest.$ac_ext >&5 | |
4950 | rm -rf conftest* | |
4951 | eval "ac_cv_header_$ac_safe=no" | |
4952 | fi | |
4953 | rm -f conftest* | |
4954 | fi | |
4955 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4956 | echo "$ac_t""yes" 1>&6 | |
4957 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4958 | cat >> confdefs.h <<EOF | |
4959 | #define $ac_tr_hdr 1 | |
4960 | EOF | |
4961 | ||
4962 | else | |
4963 | echo "$ac_t""no" 1>&6 | |
4964 | fi | |
4965 | done | |
4966 | ||
78434e59 | 4967 | for ac_hdr in string.h memory.h strings.h |
5ee754fc MK |
4968 | do |
4969 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4970 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 4971 | echo "configure:4972: checking for $ac_hdr" >&5 |
5ee754fc MK |
4972 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4973 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4974 | else | |
4975 | cat > conftest.$ac_ext <<EOF | |
66745969 | 4976 | #line 4977 "configure" |
5ee754fc MK |
4977 | #include "confdefs.h" |
4978 | #include <$ac_hdr> | |
4979 | EOF | |
4980 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 4981 | { (eval echo configure:4982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4982 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4983 | if test -z "$ac_err"; then | |
4984 | rm -rf conftest* | |
4985 | eval "ac_cv_header_$ac_safe=yes" | |
4986 | else | |
4987 | echo "$ac_err" >&5 | |
4988 | echo "configure: failed program was:" >&5 | |
4989 | cat conftest.$ac_ext >&5 | |
4990 | rm -rf conftest* | |
4991 | eval "ac_cv_header_$ac_safe=no" | |
4992 | fi | |
4993 | rm -f conftest* | |
4994 | fi | |
4995 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4996 | echo "$ac_t""yes" 1>&6 | |
4997 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4998 | cat >> confdefs.h <<EOF | |
4999 | #define $ac_tr_hdr 1 | |
5000 | EOF | |
5001 | ||
5002 | else | |
5003 | echo "$ac_t""no" 1>&6 | |
5004 | fi | |
5005 | done | |
5006 | ||
78434e59 | 5007 | for ac_hdr in sys/fault.h |
5ee754fc MK |
5008 | do |
5009 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5010 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5011 | echo "configure:5012: checking for $ac_hdr" >&5 |
5ee754fc MK |
5012 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5013 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5014 | else | |
5015 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5016 | #line 5017 "configure" |
5ee754fc MK |
5017 | #include "confdefs.h" |
5018 | #include <$ac_hdr> | |
5019 | EOF | |
5020 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5021 | { (eval echo configure:5022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5022 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5023 | if test -z "$ac_err"; then | |
5024 | rm -rf conftest* | |
5025 | eval "ac_cv_header_$ac_safe=yes" | |
5026 | else | |
5027 | echo "$ac_err" >&5 | |
5028 | echo "configure: failed program was:" >&5 | |
5029 | cat conftest.$ac_ext >&5 | |
5030 | rm -rf conftest* | |
5031 | eval "ac_cv_header_$ac_safe=no" | |
5032 | fi | |
5033 | rm -f conftest* | |
5034 | fi | |
5035 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5036 | echo "$ac_t""yes" 1>&6 | |
5037 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5038 | cat >> confdefs.h <<EOF | |
5039 | #define $ac_tr_hdr 1 | |
5040 | EOF | |
5041 | ||
5042 | else | |
5043 | echo "$ac_t""no" 1>&6 | |
5044 | fi | |
5045 | done | |
5046 | ||
78434e59 | 5047 | for ac_hdr in sys/file.h |
5ee754fc MK |
5048 | do |
5049 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5050 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5051 | echo "configure:5052: checking for $ac_hdr" >&5 |
5ee754fc MK |
5052 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5053 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5054 | else | |
5055 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5056 | #line 5057 "configure" |
5ee754fc MK |
5057 | #include "confdefs.h" |
5058 | #include <$ac_hdr> | |
5059 | EOF | |
5060 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5061 | { (eval echo configure:5062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5062 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5063 | if test -z "$ac_err"; then | |
5064 | rm -rf conftest* | |
5065 | eval "ac_cv_header_$ac_safe=yes" | |
5066 | else | |
5067 | echo "$ac_err" >&5 | |
5068 | echo "configure: failed program was:" >&5 | |
5069 | cat conftest.$ac_ext >&5 | |
5070 | rm -rf conftest* | |
5071 | eval "ac_cv_header_$ac_safe=no" | |
5072 | fi | |
5073 | rm -f conftest* | |
5074 | fi | |
5075 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5076 | echo "$ac_t""yes" 1>&6 | |
5077 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5078 | cat >> confdefs.h <<EOF | |
5079 | #define $ac_tr_hdr 1 | |
5080 | EOF | |
5081 | ||
5082 | else | |
5083 | echo "$ac_t""no" 1>&6 | |
5084 | fi | |
5085 | done | |
5086 | ||
78434e59 | 5087 | for ac_hdr in sys/filio.h |
5ee754fc MK |
5088 | do |
5089 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5090 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5091 | echo "configure:5092: checking for $ac_hdr" >&5 |
5ee754fc MK |
5092 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5093 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5094 | else | |
5095 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5096 | #line 5097 "configure" |
5ee754fc MK |
5097 | #include "confdefs.h" |
5098 | #include <$ac_hdr> | |
5099 | EOF | |
5100 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5101 | { (eval echo configure:5102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5102 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5103 | if test -z "$ac_err"; then | |
5104 | rm -rf conftest* | |
5105 | eval "ac_cv_header_$ac_safe=yes" | |
5106 | else | |
5107 | echo "$ac_err" >&5 | |
5108 | echo "configure: failed program was:" >&5 | |
5109 | cat conftest.$ac_ext >&5 | |
5110 | rm -rf conftest* | |
5111 | eval "ac_cv_header_$ac_safe=no" | |
5112 | fi | |
5113 | rm -f conftest* | |
5114 | fi | |
5115 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5116 | echo "$ac_t""yes" 1>&6 | |
5117 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5118 | cat >> confdefs.h <<EOF | |
5119 | #define $ac_tr_hdr 1 | |
5120 | EOF | |
5121 | ||
5122 | else | |
5123 | echo "$ac_t""no" 1>&6 | |
5124 | fi | |
5125 | done | |
5126 | ||
78434e59 | 5127 | for ac_hdr in sys/ioctl.h |
5ee754fc MK |
5128 | do |
5129 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5130 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5131 | echo "configure:5132: checking for $ac_hdr" >&5 |
5ee754fc MK |
5132 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5134 | else | |
5135 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5136 | #line 5137 "configure" |
5ee754fc MK |
5137 | #include "confdefs.h" |
5138 | #include <$ac_hdr> | |
5139 | EOF | |
5140 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5141 | { (eval echo configure:5142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5142 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5143 | if test -z "$ac_err"; then | |
5144 | rm -rf conftest* | |
5145 | eval "ac_cv_header_$ac_safe=yes" | |
5146 | else | |
5147 | echo "$ac_err" >&5 | |
5148 | echo "configure: failed program was:" >&5 | |
5149 | cat conftest.$ac_ext >&5 | |
5150 | rm -rf conftest* | |
5151 | eval "ac_cv_header_$ac_safe=no" | |
5152 | fi | |
5153 | rm -f conftest* | |
5154 | fi | |
5155 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5156 | echo "$ac_t""yes" 1>&6 | |
5157 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5158 | cat >> confdefs.h <<EOF | |
5159 | #define $ac_tr_hdr 1 | |
5160 | EOF | |
5161 | ||
5162 | else | |
5163 | echo "$ac_t""no" 1>&6 | |
5164 | fi | |
5165 | done | |
5166 | ||
78434e59 | 5167 | for ac_hdr in sys/param.h |
5ee754fc MK |
5168 | do |
5169 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5170 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5171 | echo "configure:5172: checking for $ac_hdr" >&5 |
5ee754fc MK |
5172 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5174 | else | |
5175 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5176 | #line 5177 "configure" |
5ee754fc MK |
5177 | #include "confdefs.h" |
5178 | #include <$ac_hdr> | |
5179 | EOF | |
5180 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5181 | { (eval echo configure:5182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5182 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5183 | if test -z "$ac_err"; then | |
5184 | rm -rf conftest* | |
5185 | eval "ac_cv_header_$ac_safe=yes" | |
5186 | else | |
5187 | echo "$ac_err" >&5 | |
5188 | echo "configure: failed program was:" >&5 | |
5189 | cat conftest.$ac_ext >&5 | |
5190 | rm -rf conftest* | |
5191 | eval "ac_cv_header_$ac_safe=no" | |
5192 | fi | |
5193 | rm -f conftest* | |
5194 | fi | |
5195 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5196 | echo "$ac_t""yes" 1>&6 | |
5197 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5198 | cat >> confdefs.h <<EOF | |
5199 | #define $ac_tr_hdr 1 | |
5200 | EOF | |
5201 | ||
5202 | else | |
5203 | echo "$ac_t""no" 1>&6 | |
5204 | fi | |
5205 | done | |
5206 | ||
78434e59 | 5207 | for ac_hdr in sys/proc.h |
5ee754fc MK |
5208 | do |
5209 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5210 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5211 | echo "configure:5212: checking for $ac_hdr" >&5 |
5ee754fc MK |
5212 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5214 | else | |
5215 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5216 | #line 5217 "configure" |
5ee754fc MK |
5217 | #include "confdefs.h" |
5218 | #include <$ac_hdr> | |
5219 | EOF | |
5220 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5221 | { (eval echo configure:5222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5222 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5223 | if test -z "$ac_err"; then | |
5224 | rm -rf conftest* | |
5225 | eval "ac_cv_header_$ac_safe=yes" | |
5226 | else | |
5227 | echo "$ac_err" >&5 | |
5228 | echo "configure: failed program was:" >&5 | |
5229 | cat conftest.$ac_ext >&5 | |
5230 | rm -rf conftest* | |
5231 | eval "ac_cv_header_$ac_safe=no" | |
5232 | fi | |
5233 | rm -f conftest* | |
5234 | fi | |
5235 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5236 | echo "$ac_t""yes" 1>&6 | |
5237 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5238 | cat >> confdefs.h <<EOF | |
5239 | #define $ac_tr_hdr 1 | |
5240 | EOF | |
5241 | ||
5242 | else | |
5243 | echo "$ac_t""no" 1>&6 | |
5244 | fi | |
5245 | done | |
5246 | ||
78434e59 | 5247 | for ac_hdr in sys/procfs.h |
5ee754fc MK |
5248 | do |
5249 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5250 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5251 | echo "configure:5252: checking for $ac_hdr" >&5 |
5ee754fc MK |
5252 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5253 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5254 | else | |
5255 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5256 | #line 5257 "configure" |
5ee754fc MK |
5257 | #include "confdefs.h" |
5258 | #include <$ac_hdr> | |
5259 | EOF | |
5260 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5261 | { (eval echo configure:5262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5262 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5263 | if test -z "$ac_err"; then | |
5264 | rm -rf conftest* | |
5265 | eval "ac_cv_header_$ac_safe=yes" | |
5266 | else | |
5267 | echo "$ac_err" >&5 | |
5268 | echo "configure: failed program was:" >&5 | |
5269 | cat conftest.$ac_ext >&5 | |
5270 | rm -rf conftest* | |
5271 | eval "ac_cv_header_$ac_safe=no" | |
5272 | fi | |
5273 | rm -f conftest* | |
5274 | fi | |
5275 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5276 | echo "$ac_t""yes" 1>&6 | |
5277 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5278 | cat >> confdefs.h <<EOF | |
5279 | #define $ac_tr_hdr 1 | |
5280 | EOF | |
5281 | ||
5282 | else | |
5283 | echo "$ac_t""no" 1>&6 | |
5284 | fi | |
5285 | done | |
5286 | ||
78434e59 | 5287 | for ac_hdr in sys/ptrace.h ptrace.h |
5ee754fc MK |
5288 | do |
5289 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5290 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5291 | echo "configure:5292: checking for $ac_hdr" >&5 |
5ee754fc MK |
5292 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5293 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5294 | else | |
5295 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5296 | #line 5297 "configure" |
5ee754fc MK |
5297 | #include "confdefs.h" |
5298 | #include <$ac_hdr> | |
5299 | EOF | |
5300 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5301 | { (eval echo configure:5302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5302 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5303 | if test -z "$ac_err"; then | |
5304 | rm -rf conftest* | |
5305 | eval "ac_cv_header_$ac_safe=yes" | |
5306 | else | |
5307 | echo "$ac_err" >&5 | |
5308 | echo "configure: failed program was:" >&5 | |
5309 | cat conftest.$ac_ext >&5 | |
5310 | rm -rf conftest* | |
5311 | eval "ac_cv_header_$ac_safe=no" | |
5312 | fi | |
5313 | rm -f conftest* | |
5314 | fi | |
5315 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5316 | echo "$ac_t""yes" 1>&6 | |
5317 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5318 | cat >> confdefs.h <<EOF | |
5319 | #define $ac_tr_hdr 1 | |
5320 | EOF | |
5321 | ||
5322 | else | |
5323 | echo "$ac_t""no" 1>&6 | |
5324 | fi | |
5325 | done | |
5326 | ||
78434e59 | 5327 | for ac_hdr in sys/reg.h sys/debugreg.h |
5ee754fc MK |
5328 | do |
5329 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5330 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5331 | echo "configure:5332: checking for $ac_hdr" >&5 |
5ee754fc MK |
5332 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5333 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5334 | else | |
5335 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5336 | #line 5337 "configure" |
5ee754fc MK |
5337 | #include "confdefs.h" |
5338 | #include <$ac_hdr> | |
5339 | EOF | |
5340 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5341 | { (eval echo configure:5342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5342 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5343 | if test -z "$ac_err"; then | |
5344 | rm -rf conftest* | |
5345 | eval "ac_cv_header_$ac_safe=yes" | |
5346 | else | |
5347 | echo "$ac_err" >&5 | |
5348 | echo "configure: failed program was:" >&5 | |
5349 | cat conftest.$ac_ext >&5 | |
5350 | rm -rf conftest* | |
5351 | eval "ac_cv_header_$ac_safe=no" | |
5352 | fi | |
5353 | rm -f conftest* | |
5354 | fi | |
5355 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5356 | echo "$ac_t""yes" 1>&6 | |
5357 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5358 | cat >> confdefs.h <<EOF | |
5359 | #define $ac_tr_hdr 1 | |
5360 | EOF | |
5361 | ||
5362 | else | |
5363 | echo "$ac_t""no" 1>&6 | |
5364 | fi | |
5365 | done | |
5366 | ||
78434e59 | 5367 | for ac_hdr in sys/select.h |
5ee754fc MK |
5368 | do |
5369 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5370 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5371 | echo "configure:5372: checking for $ac_hdr" >&5 |
5ee754fc MK |
5372 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5373 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5374 | else | |
5375 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5376 | #line 5377 "configure" |
5ee754fc MK |
5377 | #include "confdefs.h" |
5378 | #include <$ac_hdr> | |
5379 | EOF | |
5380 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5381 | { (eval echo configure:5382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5382 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5383 | if test -z "$ac_err"; then | |
5384 | rm -rf conftest* | |
5385 | eval "ac_cv_header_$ac_safe=yes" | |
5386 | else | |
5387 | echo "$ac_err" >&5 | |
5388 | echo "configure: failed program was:" >&5 | |
5389 | cat conftest.$ac_ext >&5 | |
5390 | rm -rf conftest* | |
5391 | eval "ac_cv_header_$ac_safe=no" | |
5392 | fi | |
5393 | rm -f conftest* | |
5394 | fi | |
5395 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5396 | echo "$ac_t""yes" 1>&6 | |
5397 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5398 | cat >> confdefs.h <<EOF | |
5399 | #define $ac_tr_hdr 1 | |
5400 | EOF | |
5401 | ||
5402 | else | |
5403 | echo "$ac_t""no" 1>&6 | |
5404 | fi | |
5405 | done | |
5406 | ||
78434e59 | 5407 | for ac_hdr in sys/syscall.h |
5ee754fc MK |
5408 | do |
5409 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5410 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5411 | echo "configure:5412: checking for $ac_hdr" >&5 |
5ee754fc MK |
5412 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5413 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5414 | else | |
5415 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5416 | #line 5417 "configure" |
5ee754fc MK |
5417 | #include "confdefs.h" |
5418 | #include <$ac_hdr> | |
5419 | EOF | |
5420 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5421 | { (eval echo configure:5422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5422 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5423 | if test -z "$ac_err"; then | |
5424 | rm -rf conftest* | |
5425 | eval "ac_cv_header_$ac_safe=yes" | |
5426 | else | |
5427 | echo "$ac_err" >&5 | |
5428 | echo "configure: failed program was:" >&5 | |
5429 | cat conftest.$ac_ext >&5 | |
5430 | rm -rf conftest* | |
5431 | eval "ac_cv_header_$ac_safe=no" | |
5432 | fi | |
5433 | rm -f conftest* | |
5434 | fi | |
5435 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5436 | echo "$ac_t""yes" 1>&6 | |
5437 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5438 | cat >> confdefs.h <<EOF | |
5439 | #define $ac_tr_hdr 1 | |
5440 | EOF | |
5441 | ||
5442 | else | |
5443 | echo "$ac_t""no" 1>&6 | |
5444 | fi | |
5445 | done | |
5446 | ||
78434e59 | 5447 | for ac_hdr in sys/user.h |
5ee754fc MK |
5448 | do |
5449 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5450 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5451 | echo "configure:5452: checking for $ac_hdr" >&5 |
5ee754fc MK |
5452 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5453 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5454 | else | |
5455 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5456 | #line 5457 "configure" |
5ee754fc MK |
5457 | #include "confdefs.h" |
5458 | #include <$ac_hdr> | |
5459 | EOF | |
5460 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5461 | { (eval echo configure:5462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5462 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5463 | if test -z "$ac_err"; then | |
5464 | rm -rf conftest* | |
5465 | eval "ac_cv_header_$ac_safe=yes" | |
5466 | else | |
5467 | echo "$ac_err" >&5 | |
9608ab8b MK |
5468 | echo "configure: failed program was:" >&5 |
5469 | cat conftest.$ac_ext >&5 | |
5470 | rm -rf conftest* | |
5ee754fc | 5471 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5472 | fi |
5473 | rm -f conftest* | |
5474 | fi | |
5ee754fc | 5475 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5476 | echo "$ac_t""yes" 1>&6 |
5477 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5478 | cat >> confdefs.h <<EOF | |
5479 | #define $ac_tr_hdr 1 | |
5480 | EOF | |
5ee754fc | 5481 | |
9608ab8b MK |
5482 | else |
5483 | echo "$ac_t""no" 1>&6 | |
5484 | fi | |
5485 | done | |
5ee754fc | 5486 | |
78434e59 | 5487 | for ac_hdr in sys/wait.h wait.h |
5ee754fc MK |
5488 | do |
5489 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5490 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5491 | echo "configure:5492: checking for $ac_hdr" >&5 |
5ee754fc | 5492 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5493 | echo $ac_n "(cached) $ac_c" 1>&6 |
5494 | else | |
5ee754fc | 5495 | cat > conftest.$ac_ext <<EOF |
66745969 | 5496 | #line 5497 "configure" |
9608ab8b | 5497 | #include "confdefs.h" |
5ee754fc | 5498 | #include <$ac_hdr> |
9608ab8b | 5499 | EOF |
5ee754fc | 5500 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
66745969 | 5501 | { (eval echo configure:5502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5502 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5503 | if test -z "$ac_err"; then | |
9608ab8b | 5504 | rm -rf conftest* |
5ee754fc | 5505 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5506 | else |
5ee754fc | 5507 | echo "$ac_err" >&5 |
9608ab8b MK |
5508 | echo "configure: failed program was:" >&5 |
5509 | cat conftest.$ac_ext >&5 | |
5510 | rm -rf conftest* | |
5ee754fc | 5511 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5512 | fi |
5513 | rm -f conftest* | |
9608ab8b | 5514 | fi |
5ee754fc | 5515 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5516 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5517 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5518 | cat >> confdefs.h <<EOF | |
5519 | #define $ac_tr_hdr 1 | |
5520 | EOF | |
5521 | ||
9608ab8b MK |
5522 | else |
5523 | echo "$ac_t""no" 1>&6 | |
5524 | fi | |
5ee754fc | 5525 | done |
9608ab8b | 5526 | |
78434e59 | 5527 | for ac_hdr in termios.h termio.h sgtty.h |
5ee754fc MK |
5528 | do |
5529 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5530 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5531 | echo "configure:5532: checking for $ac_hdr" >&5 |
5ee754fc | 5532 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5533 | echo $ac_n "(cached) $ac_c" 1>&6 |
5534 | else | |
5ee754fc | 5535 | cat > conftest.$ac_ext <<EOF |
66745969 | 5536 | #line 5537 "configure" |
9608ab8b | 5537 | #include "confdefs.h" |
5ee754fc | 5538 | #include <$ac_hdr> |
9608ab8b | 5539 | EOF |
5ee754fc | 5540 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
66745969 | 5541 | { (eval echo configure:5542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5542 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5543 | if test -z "$ac_err"; then | |
9608ab8b | 5544 | rm -rf conftest* |
5ee754fc | 5545 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5546 | else |
5ee754fc | 5547 | echo "$ac_err" >&5 |
9608ab8b MK |
5548 | echo "configure: failed program was:" >&5 |
5549 | cat conftest.$ac_ext >&5 | |
5550 | rm -rf conftest* | |
5ee754fc | 5551 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5552 | fi |
5553 | rm -f conftest* | |
9608ab8b | 5554 | fi |
5ee754fc | 5555 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5556 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5557 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5558 | cat >> confdefs.h <<EOF | |
5559 | #define $ac_tr_hdr 1 | |
5560 | EOF | |
5561 | ||
9608ab8b MK |
5562 | else |
5563 | echo "$ac_t""no" 1>&6 | |
5564 | fi | |
5ee754fc | 5565 | done |
9608ab8b | 5566 | |
78434e59 MK |
5567 | for ac_hdr in unistd.h |
5568 | do | |
5569 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5570 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5571 | echo "configure:5572: checking for $ac_hdr" >&5 |
78434e59 MK |
5572 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5574 | else | |
5575 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5576 | #line 5577 "configure" |
78434e59 MK |
5577 | #include "confdefs.h" |
5578 | #include <$ac_hdr> | |
5579 | EOF | |
5580 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5581 | { (eval echo configure:5582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
78434e59 MK |
5582 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5583 | if test -z "$ac_err"; then | |
5584 | rm -rf conftest* | |
5585 | eval "ac_cv_header_$ac_safe=yes" | |
5586 | else | |
5587 | echo "$ac_err" >&5 | |
5588 | echo "configure: failed program was:" >&5 | |
5589 | cat conftest.$ac_ext >&5 | |
5590 | rm -rf conftest* | |
5591 | eval "ac_cv_header_$ac_safe=no" | |
5592 | fi | |
5593 | rm -f conftest* | |
5594 | fi | |
5595 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5596 | echo "$ac_t""yes" 1>&6 | |
5597 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5598 | cat >> confdefs.h <<EOF | |
5599 | #define $ac_tr_hdr 1 | |
5600 | EOF | |
5601 | ||
5602 | else | |
5603 | echo "$ac_t""no" 1>&6 | |
5604 | fi | |
5605 | done | |
5606 | ||
9608ab8b | 5607 | |
5ee754fc MK |
5608 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5609 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5610 | # think that we don't have <curses.h> if we're using GCC. | |
5611 | case $host_os in | |
5612 | solaris2.[78]) | |
5613 | if test "$GCC" = yes; then | |
5614 | cat >> confdefs.h <<\EOF | |
5615 | #define _MSE_INT_H 1 | |
5616 | EOF | |
5617 | ||
5618 | fi ;; | |
5619 | esac | |
5620 | for ac_hdr in curses.h ncurses.h term.h | |
5621 | do | |
5622 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5623 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5624 | echo "configure:5625: checking for $ac_hdr" >&5 |
5ee754fc | 5625 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5626 | echo $ac_n "(cached) $ac_c" 1>&6 |
5627 | else | |
5628 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5629 | #line 5630 "configure" |
c906108c | 5630 | #include "confdefs.h" |
5ee754fc | 5631 | #include <$ac_hdr> |
c906108c SS |
5632 | EOF |
5633 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5634 | { (eval echo configure:5635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5635 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5636 | if test -z "$ac_err"; then | |
5637 | rm -rf conftest* | |
5ee754fc | 5638 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5639 | else |
5640 | echo "$ac_err" >&5 | |
5641 | echo "configure: failed program was:" >&5 | |
5642 | cat conftest.$ac_ext >&5 | |
5643 | rm -rf conftest* | |
5ee754fc | 5644 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5645 | fi |
5646 | rm -f conftest* | |
c906108c | 5647 | fi |
5ee754fc MK |
5648 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5649 | echo "$ac_t""yes" 1>&6 | |
5650 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5651 | cat >> confdefs.h <<EOF | |
5652 | #define $ac_tr_hdr 1 | |
c906108c | 5653 | EOF |
5ee754fc | 5654 | |
c906108c | 5655 | else |
5ee754fc | 5656 | echo "$ac_t""no" 1>&6 |
c906108c | 5657 | fi |
5ee754fc | 5658 | done |
c906108c SS |
5659 | |
5660 | ||
5ee754fc MK |
5661 | # FIXME: kettenis/20030102: In most cases we include these |
5662 | # unconditionally, so what's the point in checking these? | |
5663 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5664 | do |
5665 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5666 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 5667 | echo "configure:5668: checking for $ac_hdr" >&5 |
c906108c SS |
5668 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5670 | else | |
5671 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5672 | #line 5673 "configure" |
c906108c SS |
5673 | #include "confdefs.h" |
5674 | #include <$ac_hdr> | |
5675 | EOF | |
5676 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 5677 | { (eval echo configure:5678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5678 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5679 | if test -z "$ac_err"; then | |
5680 | rm -rf conftest* | |
5681 | eval "ac_cv_header_$ac_safe=yes" | |
5682 | else | |
5683 | echo "$ac_err" >&5 | |
5684 | echo "configure: failed program was:" >&5 | |
5685 | cat conftest.$ac_ext >&5 | |
5686 | rm -rf conftest* | |
5687 | eval "ac_cv_header_$ac_safe=no" | |
5688 | fi | |
5689 | rm -f conftest* | |
5690 | fi | |
5691 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5692 | echo "$ac_t""yes" 1>&6 | |
5693 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5694 | cat >> confdefs.h <<EOF | |
5695 | #define $ac_tr_hdr 1 | |
5696 | EOF | |
5697 | ||
5698 | else | |
5699 | echo "$ac_t""no" 1>&6 | |
5700 | fi | |
5701 | done | |
5702 | ||
5ee754fc | 5703 | |
40a7debc | 5704 | echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6 |
66745969 | 5705 | echo "configure:5706: checking for member st_blocks in struct stat" >&5 |
40a7debc EZ |
5706 | if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then |
5707 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5708 | else | |
5709 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5710 | #line 5711 "configure" |
40a7debc EZ |
5711 | #include "confdefs.h" |
5712 | #include <sys/types.h> | |
5713 | #include <sys/stat.h> | |
5714 | int main() { | |
5715 | struct stat st; (void) st.st_blocks; | |
5716 | ; return 0; } | |
5717 | EOF | |
66745969 | 5718 | if { (eval echo configure:5719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
40a7debc EZ |
5719 | rm -rf conftest* |
5720 | gdb_cv_have_struct_stat_with_st_blocks_member=yes | |
5721 | else | |
5722 | echo "configure: failed program was:" >&5 | |
5723 | cat conftest.$ac_ext >&5 | |
5724 | rm -rf conftest* | |
5725 | gdb_cv_have_struct_stat_with_st_blocks_member=no | |
5726 | fi | |
5727 | rm -f conftest* | |
5728 | fi | |
5729 | ||
5730 | echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6 | |
5731 | if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then | |
5732 | cat >> confdefs.h <<\EOF | |
5733 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
5734 | EOF | |
5735 | ||
5736 | fi | |
b9362cc7 AC |
5737 | # ------------------------- # |
5738 | # Checks for declarations. # | |
5739 | # ------------------------- # | |
5740 | ||
5741 | for ac_func in getopt | |
5742 | do | |
5743 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5744 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
66745969 | 5745 | echo "configure:5746: checking whether $ac_func is declared" >&5 |
b9362cc7 AC |
5746 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
5747 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5748 | else | |
5749 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5750 | #line 5751 "configure" |
b9362cc7 AC |
5751 | #include "confdefs.h" |
5752 | #undef $ac_tr_decl | |
5753 | #define $ac_tr_decl 1 | |
5754 | ||
5755 | ||
5756 | int main() { | |
5757 | #ifndef $ac_func | |
5758 | char *(*pfn) = (char *(*)) $ac_func ; | |
5759 | #endif | |
5760 | ; return 0; } | |
5761 | EOF | |
66745969 | 5762 | if { (eval echo configure:5763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9362cc7 AC |
5763 | rm -rf conftest* |
5764 | eval "gcc_cv_have_decl_$ac_func=yes" | |
5765 | else | |
5766 | echo "configure: failed program was:" >&5 | |
5767 | cat conftest.$ac_ext >&5 | |
5768 | rm -rf conftest* | |
5769 | eval "gcc_cv_have_decl_$ac_func=no" | |
5770 | fi | |
5771 | rm -f conftest* | |
5772 | fi | |
5773 | ||
5774 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5775 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
5776 | #define $ac_tr_decl 1 | |
5777 | EOF | |
5778 | ||
5779 | else | |
5780 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
5781 | #define $ac_tr_decl 0 | |
5782 | EOF | |
5783 | ||
5784 | fi | |
5785 | ||
5786 | done | |
5787 | if test x = y ; then | |
5788 | cat >> confdefs.h <<\EOF | |
5789 | #define HAVE_DECL_GETOPT 1 | |
5790 | EOF | |
5791 | fi | |
5792 | ||
5793 | ||
5ee754fc MK |
5794 | # ------------------ # |
5795 | # Checks for types. # | |
5796 | # ------------------ # | |
5797 | ||
5798 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
66745969 | 5799 | echo "configure:5800: checking return type of signal handlers" >&5 |
5ee754fc | 5800 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5801 | echo $ac_n "(cached) $ac_c" 1>&6 |
5802 | else | |
5803 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5804 | #line 5805 "configure" |
c906108c SS |
5805 | #include "confdefs.h" |
5806 | #include <sys/types.h> | |
5ee754fc MK |
5807 | #include <signal.h> |
5808 | #ifdef signal | |
5809 | #undef signal | |
c906108c | 5810 | #endif |
5ee754fc MK |
5811 | #ifdef __cplusplus |
5812 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5813 | #else | |
5814 | void (*signal ()) (); | |
c906108c SS |
5815 | #endif |
5816 | ||
5ee754fc MK |
5817 | int main() { |
5818 | int i; | |
5819 | ; return 0; } | |
c906108c | 5820 | EOF |
66745969 | 5821 | if { (eval echo configure:5822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5822 | rm -rf conftest* |
5ee754fc | 5823 | ac_cv_type_signal=void |
c906108c | 5824 | else |
5ee754fc MK |
5825 | echo "configure: failed program was:" >&5 |
5826 | cat conftest.$ac_ext >&5 | |
c906108c | 5827 | rm -rf conftest* |
5ee754fc | 5828 | ac_cv_type_signal=int |
c906108c SS |
5829 | fi |
5830 | rm -f conftest* | |
c906108c SS |
5831 | fi |
5832 | ||
5ee754fc MK |
5833 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5834 | cat >> confdefs.h <<EOF | |
5835 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5836 | EOF |
5837 | ||
c906108c SS |
5838 | |
5839 | ||
5ee754fc MK |
5840 | # ------------------------------------- # |
5841 | # Checks for compiler characteristics. # | |
5842 | # ------------------------------------- # | |
5843 | ||
c906108c | 5844 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
66745969 | 5845 | echo "configure:5846: checking for working const" >&5 |
c906108c SS |
5846 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5847 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5848 | else | |
5849 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5850 | #line 5851 "configure" |
c906108c SS |
5851 | #include "confdefs.h" |
5852 | ||
5853 | int main() { | |
5854 | ||
5855 | /* Ultrix mips cc rejects this. */ | |
5856 | typedef int charset[2]; const charset x; | |
5857 | /* SunOS 4.1.1 cc rejects this. */ | |
5858 | char const *const *ccp; | |
5859 | char **p; | |
5860 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5861 | struct point {int x, y;}; | |
5862 | static struct point const zero = {0,0}; | |
5863 | /* AIX XL C 1.02.0.0 rejects this. | |
5864 | It does not let you subtract one const X* pointer from another in an arm | |
5865 | of an if-expression whose if-part is not a constant expression */ | |
5866 | const char *g = "string"; | |
5867 | ccp = &g + (g ? g-g : 0); | |
5868 | /* HPUX 7.0 cc rejects these. */ | |
5869 | ++ccp; | |
5870 | p = (char**) ccp; | |
5871 | ccp = (char const *const *) p; | |
5872 | { /* SCO 3.2v4 cc rejects this. */ | |
5873 | char *t; | |
5874 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5875 | ||
5876 | *t++ = 0; | |
5877 | } | |
5878 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5879 | int x[] = {25, 17}; | |
5880 | const int *foo = &x[0]; | |
5881 | ++foo; | |
5882 | } | |
5883 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5884 | typedef const int *iptr; | |
5885 | iptr p = 0; | |
5886 | ++p; | |
5887 | } | |
5888 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5889 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5890 | struct s { int j; const int *ap[3]; }; | |
5891 | struct s *b; b->j = 5; | |
5892 | } | |
5893 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5894 | const int foo = 10; | |
5895 | } | |
5896 | ||
5897 | ; return 0; } | |
5898 | EOF | |
66745969 | 5899 | if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5900 | rm -rf conftest* |
5901 | ac_cv_c_const=yes | |
5902 | else | |
5903 | echo "configure: failed program was:" >&5 | |
5904 | cat conftest.$ac_ext >&5 | |
5905 | rm -rf conftest* | |
5906 | ac_cv_c_const=no | |
5907 | fi | |
5908 | rm -f conftest* | |
5909 | fi | |
5910 | ||
5911 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5912 | if test $ac_cv_c_const = no; then | |
5913 | cat >> confdefs.h <<\EOF | |
5914 | #define const | |
5915 | EOF | |
5916 | ||
5917 | fi | |
5918 | ||
bce58c09 | 5919 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
66745969 | 5920 | echo "configure:5921: checking for inline" >&5 |
bce58c09 JB |
5921 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5922 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5923 | else | |
5924 | ac_cv_c_inline=no | |
5925 | for ac_kw in inline __inline__ __inline; do | |
5926 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5927 | #line 5928 "configure" |
bce58c09 JB |
5928 | #include "confdefs.h" |
5929 | ||
5930 | int main() { | |
5931 | } $ac_kw foo() { | |
5932 | ; return 0; } | |
5933 | EOF | |
66745969 | 5934 | if { (eval echo configure:5935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5935 | rm -rf conftest* |
5936 | ac_cv_c_inline=$ac_kw; break | |
5937 | else | |
5938 | echo "configure: failed program was:" >&5 | |
5939 | cat conftest.$ac_ext >&5 | |
5940 | fi | |
5941 | rm -f conftest* | |
5942 | done | |
5943 | ||
5944 | fi | |
5945 | ||
5946 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5947 | case "$ac_cv_c_inline" in | |
5948 | inline | yes) ;; | |
5949 | no) cat >> confdefs.h <<\EOF | |
5950 | #define inline | |
5951 | EOF | |
5952 | ;; | |
5953 | *) cat >> confdefs.h <<EOF | |
5954 | #define inline $ac_cv_c_inline | |
5955 | EOF | |
5956 | ;; | |
5957 | esac | |
5958 | ||
c906108c | 5959 | |
5ee754fc MK |
5960 | # ------------------------------ # |
5961 | # Checks for library functions. # | |
5962 | # ------------------------------ # | |
5963 | ||
46711df8 MK |
5964 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5965 | # for constant arguments. Useless! | |
5966 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
66745969 | 5967 | echo "configure:5968: checking for working alloca.h" >&5 |
46711df8 MK |
5968 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5969 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5970 | else | |
5971 | cat > conftest.$ac_ext <<EOF | |
66745969 | 5972 | #line 5973 "configure" |
46711df8 MK |
5973 | #include "confdefs.h" |
5974 | #include <alloca.h> | |
5975 | int main() { | |
5976 | char *p = alloca(2 * sizeof(int)); | |
5977 | ; return 0; } | |
5978 | EOF | |
66745969 | 5979 | if { (eval echo configure:5980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5980 | rm -rf conftest* |
5981 | ac_cv_header_alloca_h=yes | |
5982 | else | |
5983 | echo "configure: failed program was:" >&5 | |
5984 | cat conftest.$ac_ext >&5 | |
5985 | rm -rf conftest* | |
5986 | ac_cv_header_alloca_h=no | |
5987 | fi | |
5988 | rm -f conftest* | |
5989 | fi | |
5990 | ||
5991 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5992 | if test $ac_cv_header_alloca_h = yes; then | |
5993 | cat >> confdefs.h <<\EOF | |
5994 | #define HAVE_ALLOCA_H 1 | |
5995 | EOF | |
5996 | ||
5997 | fi | |
5998 | ||
5999 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
66745969 | 6000 | echo "configure:6001: checking for alloca" >&5 |
46711df8 MK |
6001 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
6002 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6003 | else | |
6004 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6005 | #line 6006 "configure" |
46711df8 MK |
6006 | #include "confdefs.h" |
6007 | ||
6008 | #ifdef __GNUC__ | |
6009 | # define alloca __builtin_alloca | |
6010 | #else | |
6011 | # ifdef _MSC_VER | |
6012 | # include <malloc.h> | |
6013 | # define alloca _alloca | |
6014 | # else | |
6015 | # if HAVE_ALLOCA_H | |
6016 | # include <alloca.h> | |
6017 | # else | |
6018 | # ifdef _AIX | |
6019 | #pragma alloca | |
6020 | # else | |
6021 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
6022 | char *alloca (); | |
6023 | # endif | |
6024 | # endif | |
6025 | # endif | |
6026 | # endif | |
6027 | #endif | |
6028 | ||
6029 | int main() { | |
6030 | char *p = (char *) alloca(1); | |
6031 | ; return 0; } | |
6032 | EOF | |
66745969 | 6033 | if { (eval echo configure:6034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6034 | rm -rf conftest* |
6035 | ac_cv_func_alloca_works=yes | |
6036 | else | |
6037 | echo "configure: failed program was:" >&5 | |
6038 | cat conftest.$ac_ext >&5 | |
6039 | rm -rf conftest* | |
6040 | ac_cv_func_alloca_works=no | |
6041 | fi | |
6042 | rm -f conftest* | |
6043 | fi | |
6044 | ||
6045 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
6046 | if test $ac_cv_func_alloca_works = yes; then | |
6047 | cat >> confdefs.h <<\EOF | |
6048 | #define HAVE_ALLOCA 1 | |
6049 | EOF | |
6050 | ||
6051 | fi | |
6052 | ||
6053 | if test $ac_cv_func_alloca_works = no; then | |
6054 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
6055 | # that cause trouble. Some versions do not even contain alloca or | |
6056 | # contain a buggy version. If you still want to use their alloca, | |
6057 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
6058 | ALLOCA=alloca.${ac_objext} | |
6059 | cat >> confdefs.h <<\EOF | |
6060 | #define C_ALLOCA 1 | |
6061 | EOF | |
6062 | ||
6063 | ||
6064 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
66745969 | 6065 | echo "configure:6066: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
6066 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
6067 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6068 | else | |
6069 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6070 | #line 6071 "configure" |
46711df8 MK |
6071 | #include "confdefs.h" |
6072 | #if defined(CRAY) && ! defined(CRAY2) | |
6073 | webecray | |
6074 | #else | |
6075 | wenotbecray | |
6076 | #endif | |
6077 | ||
6078 | EOF | |
6079 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6080 | egrep "webecray" >/dev/null 2>&1; then | |
6081 | rm -rf conftest* | |
6082 | ac_cv_os_cray=yes | |
6083 | else | |
6084 | rm -rf conftest* | |
6085 | ac_cv_os_cray=no | |
6086 | fi | |
6087 | rm -f conftest* | |
6088 | ||
6089 | fi | |
6090 | ||
6091 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
6092 | if test $ac_cv_os_cray = yes; then | |
6093 | for ac_func in _getb67 GETB67 getb67; do | |
6094 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6095 | echo "configure:6096: checking for $ac_func" >&5 |
46711df8 MK |
6096 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6097 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6098 | else | |
6099 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6100 | #line 6101 "configure" |
46711df8 MK |
6101 | #include "confdefs.h" |
6102 | /* System header to define __stub macros and hopefully few prototypes, | |
6103 | which can conflict with char $ac_func(); below. */ | |
6104 | #include <assert.h> | |
6105 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6106 | /* We use char because int might match the return type of a gcc2 | |
6107 | builtin and then its argument prototype would still apply. */ | |
6108 | char $ac_func(); | |
6109 | ||
6110 | int main() { | |
6111 | ||
6112 | /* The GNU C library defines this for functions which it implements | |
6113 | to always fail with ENOSYS. Some functions are actually named | |
6114 | something starting with __ and the normal name is an alias. */ | |
6115 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6116 | choke me | |
6117 | #else | |
6118 | $ac_func(); | |
6119 | #endif | |
6120 | ||
6121 | ; return 0; } | |
6122 | EOF | |
66745969 | 6123 | if { (eval echo configure:6124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6124 | rm -rf conftest* |
6125 | eval "ac_cv_func_$ac_func=yes" | |
6126 | else | |
6127 | echo "configure: failed program was:" >&5 | |
6128 | cat conftest.$ac_ext >&5 | |
6129 | rm -rf conftest* | |
6130 | eval "ac_cv_func_$ac_func=no" | |
6131 | fi | |
6132 | rm -f conftest* | |
6133 | fi | |
6134 | ||
6135 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6136 | echo "$ac_t""yes" 1>&6 | |
6137 | cat >> confdefs.h <<EOF | |
6138 | #define CRAY_STACKSEG_END $ac_func | |
6139 | EOF | |
6140 | ||
6141 | break | |
6142 | else | |
6143 | echo "$ac_t""no" 1>&6 | |
6144 | fi | |
6145 | ||
6146 | done | |
6147 | fi | |
6148 | ||
6149 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
66745969 | 6150 | echo "configure:6151: checking stack direction for C alloca" >&5 |
46711df8 MK |
6151 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
6152 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6153 | else | |
6154 | if test "$cross_compiling" = yes; then | |
6155 | ac_cv_c_stack_direction=0 | |
6156 | else | |
6157 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6158 | #line 6159 "configure" |
46711df8 MK |
6159 | #include "confdefs.h" |
6160 | find_stack_direction () | |
6161 | { | |
6162 | static char *addr = 0; | |
6163 | auto char dummy; | |
6164 | if (addr == 0) | |
6165 | { | |
6166 | addr = &dummy; | |
6167 | return find_stack_direction (); | |
6168 | } | |
6169 | else | |
6170 | return (&dummy > addr) ? 1 : -1; | |
6171 | } | |
6172 | main () | |
6173 | { | |
6174 | exit (find_stack_direction() < 0); | |
6175 | } | |
6176 | EOF | |
66745969 | 6177 | if { (eval echo configure:6178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
6178 | then |
6179 | ac_cv_c_stack_direction=1 | |
6180 | else | |
6181 | echo "configure: failed program was:" >&5 | |
6182 | cat conftest.$ac_ext >&5 | |
6183 | rm -fr conftest* | |
6184 | ac_cv_c_stack_direction=-1 | |
6185 | fi | |
6186 | rm -fr conftest* | |
6187 | fi | |
6188 | ||
6189 | fi | |
6190 | ||
6191 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
6192 | cat >> confdefs.h <<EOF | |
6193 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6194 | EOF | |
6195 | ||
6196 | fi | |
6197 | ||
d836ee13 | 6198 | for ac_hdr in unistd.h |
97bf5e38 MK |
6199 | do |
6200 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
6201 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
66745969 | 6202 | echo "configure:6203: checking for $ac_hdr" >&5 |
74c1b268 AC |
6203 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6205 | else | |
6206 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6207 | #line 6208 "configure" |
74c1b268 | 6208 | #include "confdefs.h" |
97bf5e38 | 6209 | #include <$ac_hdr> |
74c1b268 AC |
6210 | EOF |
6211 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 6212 | { (eval echo configure:6213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
6213 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6214 | if test -z "$ac_err"; then | |
6215 | rm -rf conftest* | |
6216 | eval "ac_cv_header_$ac_safe=yes" | |
6217 | else | |
6218 | echo "$ac_err" >&5 | |
6219 | echo "configure: failed program was:" >&5 | |
6220 | cat conftest.$ac_ext >&5 | |
6221 | rm -rf conftest* | |
6222 | eval "ac_cv_header_$ac_safe=no" | |
6223 | fi | |
6224 | rm -f conftest* | |
6225 | fi | |
6226 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6227 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
6228 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
6229 | cat >> confdefs.h <<EOF | |
6230 | #define $ac_tr_hdr 1 | |
74c1b268 | 6231 | EOF |
97bf5e38 | 6232 | |
74c1b268 AC |
6233 | else |
6234 | echo "$ac_t""no" 1>&6 | |
6235 | fi | |
97bf5e38 | 6236 | done |
74c1b268 | 6237 | |
97bf5e38 MK |
6238 | for ac_func in getpagesize |
6239 | do | |
6240 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6241 | echo "configure:6242: checking for $ac_func" >&5 |
97bf5e38 | 6242 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
6243 | echo $ac_n "(cached) $ac_c" 1>&6 |
6244 | else | |
6245 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6246 | #line 6247 "configure" |
74c1b268 AC |
6247 | #include "confdefs.h" |
6248 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 6249 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
6250 | #include <assert.h> |
6251 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6252 | /* We use char because int might match the return type of a gcc2 | |
6253 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 6254 | char $ac_func(); |
74c1b268 AC |
6255 | |
6256 | int main() { | |
6257 | ||
6258 | /* The GNU C library defines this for functions which it implements | |
6259 | to always fail with ENOSYS. Some functions are actually named | |
6260 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 6261 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
6262 | choke me |
6263 | #else | |
97bf5e38 | 6264 | $ac_func(); |
74c1b268 AC |
6265 | #endif |
6266 | ||
6267 | ; return 0; } | |
6268 | EOF | |
66745969 | 6269 | if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 6270 | rm -rf conftest* |
97bf5e38 | 6271 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
6272 | else |
6273 | echo "configure: failed program was:" >&5 | |
6274 | cat conftest.$ac_ext >&5 | |
6275 | rm -rf conftest* | |
97bf5e38 | 6276 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
6277 | fi |
6278 | rm -f conftest* | |
6279 | fi | |
6280 | ||
97bf5e38 | 6281 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 6282 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
6283 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6284 | cat >> confdefs.h <<EOF | |
6285 | #define $ac_tr_func 1 | |
6286 | EOF | |
6287 | ||
74c1b268 AC |
6288 | else |
6289 | echo "$ac_t""no" 1>&6 | |
6290 | fi | |
97bf5e38 | 6291 | done |
74c1b268 | 6292 | |
97bf5e38 | 6293 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
66745969 | 6294 | echo "configure:6295: checking for working mmap" >&5 |
97bf5e38 MK |
6295 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6296 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6297 | else | |
6298 | if test "$cross_compiling" = yes; then | |
6299 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
6300 | else |
6301 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6302 | #line 6303 "configure" |
74c1b268 | 6303 | #include "confdefs.h" |
97bf5e38 MK |
6304 | |
6305 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6306 | Here is a matrix of mmap possibilities: | |
6307 | mmap private not fixed | |
6308 | mmap private fixed at somewhere currently unmapped | |
6309 | mmap private fixed at somewhere already mapped | |
6310 | mmap shared not fixed | |
6311 | mmap shared fixed at somewhere currently unmapped | |
6312 | mmap shared fixed at somewhere already mapped | |
6313 | For private mappings, we should verify that changes cannot be read() | |
6314 | back from the file, nor mmap's back from the file at a different | |
6315 | address. (There have been systems where private was not correctly | |
6316 | implemented like the infamous i386 svr4.0, and systems where the | |
6317 | VM page cache was not coherent with the filesystem buffer cache | |
6318 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6319 | For shared mappings, we should conversely verify that changes get | |
6320 | propogated back to all the places they're supposed to be. | |
6321 | ||
6322 | Grep wants private fixed already mapped. | |
6323 | The main things grep needs to know about mmap are: | |
6324 | * does it exist and is it safe to write into the mmap'd area | |
6325 | * how to use it (BSD variants) */ | |
74c1b268 | 6326 | #include <sys/types.h> |
97bf5e38 MK |
6327 | #include <fcntl.h> |
6328 | #include <sys/mman.h> | |
6329 | ||
6330 | /* This mess was copied from the GNU getpagesize.h. */ | |
6331 | #ifndef HAVE_GETPAGESIZE | |
d836ee13 AC |
6332 | # ifdef HAVE_UNISTD_H |
6333 | # include <unistd.h> | |
6334 | # endif | |
97bf5e38 MK |
6335 | |
6336 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6337 | # ifndef HAVE_SYS_PARAM_H | |
6338 | # define HAVE_SYS_PARAM_H 1 | |
6339 | # endif | |
6340 | ||
6341 | # ifdef _SC_PAGESIZE | |
6342 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6343 | # else /* no _SC_PAGESIZE */ | |
6344 | # ifdef HAVE_SYS_PARAM_H | |
6345 | # include <sys/param.h> | |
6346 | # ifdef EXEC_PAGESIZE | |
6347 | # define getpagesize() EXEC_PAGESIZE | |
6348 | # else /* no EXEC_PAGESIZE */ | |
6349 | # ifdef NBPG | |
6350 | # define getpagesize() NBPG * CLSIZE | |
6351 | # ifndef CLSIZE | |
6352 | # define CLSIZE 1 | |
6353 | # endif /* no CLSIZE */ | |
6354 | # else /* no NBPG */ | |
6355 | # ifdef NBPC | |
6356 | # define getpagesize() NBPC | |
6357 | # else /* no NBPC */ | |
6358 | # ifdef PAGESIZE | |
6359 | # define getpagesize() PAGESIZE | |
6360 | # endif /* PAGESIZE */ | |
6361 | # endif /* no NBPC */ | |
6362 | # endif /* no NBPG */ | |
6363 | # endif /* no EXEC_PAGESIZE */ | |
6364 | # else /* no HAVE_SYS_PARAM_H */ | |
6365 | # define getpagesize() 8192 /* punt totally */ | |
6366 | # endif /* no HAVE_SYS_PARAM_H */ | |
6367 | # endif /* no _SC_PAGESIZE */ | |
6368 | ||
6369 | #endif /* no HAVE_GETPAGESIZE */ | |
6370 | ||
74c1b268 | 6371 | #ifdef __cplusplus |
97bf5e38 | 6372 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 6373 | #else |
97bf5e38 | 6374 | char *malloc(); |
74c1b268 | 6375 | #endif |
74c1b268 | 6376 | |
97bf5e38 MK |
6377 | int |
6378 | main() | |
6379 | { | |
6380 | char *data, *data2, *data3; | |
6381 | int i, pagesize; | |
6382 | int fd; | |
74c1b268 | 6383 | |
97bf5e38 | 6384 | pagesize = getpagesize(); |
74c1b268 | 6385 | |
97bf5e38 MK |
6386 | /* |
6387 | * First, make a file with some known garbage in it. | |
6388 | */ | |
6389 | data = malloc(pagesize); | |
6390 | if (!data) | |
6391 | exit(1); | |
6392 | for (i = 0; i < pagesize; ++i) | |
6393 | *(data + i) = rand(); | |
6394 | umask(0); | |
6395 | fd = creat("conftestmmap", 0600); | |
6396 | if (fd < 0) | |
6397 | exit(1); | |
6398 | if (write(fd, data, pagesize) != pagesize) | |
6399 | exit(1); | |
6400 | close(fd); | |
74c1b268 | 6401 | |
97bf5e38 MK |
6402 | /* |
6403 | * Next, try to mmap the file at a fixed address which | |
6404 | * already has something else allocated at it. If we can, | |
6405 | * also make sure that we see the same garbage. | |
6406 | */ | |
6407 | fd = open("conftestmmap", O_RDWR); | |
6408 | if (fd < 0) | |
6409 | exit(1); | |
6410 | data2 = malloc(2 * pagesize); | |
6411 | if (!data2) | |
6412 | exit(1); | |
6413 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6414 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6415 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6416 | exit(1); | |
6417 | for (i = 0; i < pagesize; ++i) | |
6418 | if (*(data + i) != *(data2 + i)) | |
6419 | exit(1); | |
74c1b268 | 6420 | |
97bf5e38 MK |
6421 | /* |
6422 | * Finally, make sure that changes to the mapped area | |
6423 | * do not percolate back to the file as seen by read(). | |
6424 | * (This is a bug on some variants of i386 svr4.0.) | |
6425 | */ | |
6426 | for (i = 0; i < pagesize; ++i) | |
6427 | *(data2 + i) = *(data2 + i) + 1; | |
6428 | data3 = malloc(pagesize); | |
6429 | if (!data3) | |
6430 | exit(1); | |
6431 | if (read(fd, data3, pagesize) != pagesize) | |
6432 | exit(1); | |
6433 | for (i = 0; i < pagesize; ++i) | |
6434 | if (*(data + i) != *(data3 + i)) | |
6435 | exit(1); | |
6436 | close(fd); | |
6437 | unlink("conftestmmap"); | |
6438 | exit(0); | |
74c1b268 | 6439 | } |
97bf5e38 | 6440 | |
74c1b268 | 6441 | EOF |
66745969 | 6442 | if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6443 | then |
97bf5e38 | 6444 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6445 | else |
6446 | echo "configure: failed program was:" >&5 | |
6447 | cat conftest.$ac_ext >&5 | |
6448 | rm -fr conftest* | |
97bf5e38 | 6449 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6450 | fi |
6451 | rm -fr conftest* | |
6452 | fi | |
6453 | ||
6454 | fi | |
6455 | ||
97bf5e38 MK |
6456 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6457 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6458 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6459 | #define HAVE_MMAP 1 |
74c1b268 AC |
6460 | EOF |
6461 | ||
6462 | fi | |
6463 | ||
97bf5e38 | 6464 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
66745969 | 6465 | echo "configure:6466: checking for pid_t" >&5 |
97bf5e38 | 6466 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6467 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6468 | else |
6469 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6470 | #line 6471 "configure" |
0200359f | 6471 | #include "confdefs.h" |
97bf5e38 MK |
6472 | #include <sys/types.h> |
6473 | #if STDC_HEADERS | |
6474 | #include <stdlib.h> | |
6475 | #include <stddef.h> | |
0200359f | 6476 | #endif |
0200359f | 6477 | EOF |
97bf5e38 MK |
6478 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6479 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6480 | rm -rf conftest* | |
6481 | ac_cv_type_pid_t=yes | |
0200359f | 6482 | else |
97bf5e38 MK |
6483 | rm -rf conftest* |
6484 | ac_cv_type_pid_t=no | |
0200359f | 6485 | fi |
97bf5e38 | 6486 | rm -f conftest* |
0200359f MK |
6487 | |
6488 | fi | |
97bf5e38 MK |
6489 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6490 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6491 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6492 | #define pid_t int |
0200359f MK |
6493 | EOF |
6494 | ||
6495 | fi | |
6496 | ||
97bf5e38 MK |
6497 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6498 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
66745969 | 6499 | echo "configure:6500: checking for vfork.h" >&5 |
97bf5e38 | 6500 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6501 | echo $ac_n "(cached) $ac_c" 1>&6 |
6502 | else | |
6503 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6504 | #line 6505 "configure" |
72473524 | 6505 | #include "confdefs.h" |
97bf5e38 | 6506 | #include <vfork.h> |
72473524 | 6507 | EOF |
97bf5e38 | 6508 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
66745969 | 6509 | { (eval echo configure:6510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6510 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6511 | if test -z "$ac_err"; then | |
72473524 | 6512 | rm -rf conftest* |
97bf5e38 | 6513 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6514 | else |
97bf5e38 | 6515 | echo "$ac_err" >&5 |
72473524 DJ |
6516 | echo "configure: failed program was:" >&5 |
6517 | cat conftest.$ac_ext >&5 | |
6518 | rm -rf conftest* | |
97bf5e38 | 6519 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6520 | fi |
6521 | rm -f conftest* | |
6522 | fi | |
97bf5e38 MK |
6523 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6524 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6525 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6526 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6527 | EOF |
6528 | ||
97bf5e38 MK |
6529 | else |
6530 | echo "$ac_t""no" 1>&6 | |
72473524 | 6531 | fi |
c906108c | 6532 | |
97bf5e38 | 6533 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
66745969 | 6534 | echo "configure:6535: checking for working vfork" >&5 |
97bf5e38 MK |
6535 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6537 | else | |
6538 | if test "$cross_compiling" = yes; then | |
6539 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
66745969 | 6540 | echo "configure:6541: checking for vfork" >&5 |
97bf5e38 | 6541 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6542 | echo $ac_n "(cached) $ac_c" 1>&6 |
6543 | else | |
6544 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6545 | #line 6546 "configure" |
2b2d558c | 6546 | #include "confdefs.h" |
97bf5e38 MK |
6547 | /* System header to define __stub macros and hopefully few prototypes, |
6548 | which can conflict with char vfork(); below. */ | |
6549 | #include <assert.h> | |
6550 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6551 | /* We use char because int might match the return type of a gcc2 | |
6552 | builtin and then its argument prototype would still apply. */ | |
6553 | char vfork(); | |
2b2d558c MK |
6554 | |
6555 | int main() { | |
97bf5e38 MK |
6556 | |
6557 | /* The GNU C library defines this for functions which it implements | |
6558 | to always fail with ENOSYS. Some functions are actually named | |
6559 | something starting with __ and the normal name is an alias. */ | |
6560 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6561 | choke me | |
6562 | #else | |
6563 | vfork(); | |
6564 | #endif | |
6565 | ||
2b2d558c MK |
6566 | ; return 0; } |
6567 | EOF | |
66745969 | 6568 | if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6569 | rm -rf conftest* |
97bf5e38 | 6570 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6571 | else |
6572 | echo "configure: failed program was:" >&5 | |
6573 | cat conftest.$ac_ext >&5 | |
6574 | rm -rf conftest* | |
97bf5e38 | 6575 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6576 | fi |
6577 | rm -f conftest* | |
6578 | fi | |
6579 | ||
97bf5e38 MK |
6580 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6581 | echo "$ac_t""yes" 1>&6 | |
6582 | : | |
6583 | else | |
6584 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6585 | fi |
6586 | ||
97bf5e38 | 6587 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6588 | else |
6589 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6590 | #line 6591 "configure" |
7dfa765c | 6591 | #include "confdefs.h" |
97bf5e38 MK |
6592 | /* Thanks to Paul Eggert for this test. */ |
6593 | #include <stdio.h> | |
6594 | #include <sys/types.h> | |
6595 | #include <sys/stat.h> | |
6596 | #ifdef HAVE_UNISTD_H | |
6597 | #include <unistd.h> | |
6598 | #endif | |
6599 | #ifdef HAVE_VFORK_H | |
6600 | #include <vfork.h> | |
6601 | #endif | |
6602 | /* On some sparc systems, changes by the child to local and incoming | |
6603 | argument registers are propagated back to the parent. | |
6604 | The compiler is told about this with #include <vfork.h>, | |
6605 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6606 | Test for this by using a static variable whose address | |
6607 | is put into a register that is clobbered by the vfork. */ | |
6608 | static | |
6609 | #ifdef __cplusplus | |
6610 | sparc_address_test (int arg) | |
6611 | #else | |
6612 | sparc_address_test (arg) int arg; | |
6613 | #endif | |
6614 | { | |
6615 | static pid_t child; | |
6616 | if (!child) { | |
6617 | child = vfork (); | |
6618 | if (child < 0) { | |
6619 | perror ("vfork"); | |
6620 | _exit(2); | |
6621 | } | |
6622 | if (!child) { | |
6623 | arg = getpid(); | |
6624 | write(-1, "", 0); | |
6625 | _exit (arg); | |
6626 | } | |
6627 | } | |
6628 | } | |
6629 | main() { | |
6630 | pid_t parent = getpid (); | |
6631 | pid_t child; | |
7dfa765c | 6632 | |
97bf5e38 | 6633 | sparc_address_test (); |
7dfa765c | 6634 | |
97bf5e38 | 6635 | child = vfork (); |
7dfa765c | 6636 | |
97bf5e38 MK |
6637 | if (child == 0) { |
6638 | /* Here is another test for sparc vfork register problems. | |
6639 | This test uses lots of local variables, at least | |
6640 | as many local variables as main has allocated so far | |
6641 | including compiler temporaries. 4 locals are enough for | |
6642 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6643 | A buggy compiler should reuse the register of parent | |
6644 | for one of the local variables, since it will think that | |
6645 | parent can't possibly be used any more in this routine. | |
6646 | Assigning to the local variable will thus munge parent | |
6647 | in the parent process. */ | |
6648 | pid_t | |
6649 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6650 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6651 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6652 | use the same hardware register for all 8 local variables. */ | |
6653 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6654 | || p != p5 || p != p6 || p != p7) | |
6655 | _exit(1); | |
7dfa765c | 6656 | |
97bf5e38 MK |
6657 | /* On some systems (e.g. IRIX 3.3), |
6658 | vfork doesn't separate parent from child file descriptors. | |
6659 | If the child closes a descriptor before it execs or exits, | |
6660 | this munges the parent's descriptor as well. | |
6661 | Test for this by closing stdout in the child. */ | |
6662 | _exit(close(fileno(stdout)) != 0); | |
6663 | } else { | |
6664 | int status; | |
6665 | struct stat st; | |
64bb1671 | 6666 | |
97bf5e38 MK |
6667 | while (wait(&status) != child) |
6668 | ; | |
6669 | exit( | |
6670 | /* Was there some problem with vforking? */ | |
6671 | child < 0 | |
64bb1671 | 6672 | |
97bf5e38 MK |
6673 | /* Did the child fail? (This shouldn't happen.) */ |
6674 | || status | |
64bb1671 | 6675 | |
97bf5e38 MK |
6676 | /* Did the vfork/compiler bug occur? */ |
6677 | || parent != getpid() | |
6678 | ||
6679 | /* Did the file descriptor bug occur? */ | |
6680 | || fstat(fileno(stdout), &st) != 0 | |
6681 | ); | |
6682 | } | |
6683 | } | |
5c44784c | 6684 | EOF |
66745969 | 6685 | if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6686 | then |
6687 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6688 | else |
6689 | echo "configure: failed program was:" >&5 | |
6690 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6691 | rm -fr conftest* |
6692 | ac_cv_func_vfork_works=no | |
5c44784c | 6693 | fi |
97bf5e38 | 6694 | rm -fr conftest* |
5c44784c JM |
6695 | fi |
6696 | ||
0afdd437 MK |
6697 | fi |
6698 | ||
97bf5e38 MK |
6699 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6700 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6701 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6702 | #define vfork fork |
0afdd437 MK |
6703 | EOF |
6704 | ||
6705 | fi | |
6706 | ||
97bf5e38 MK |
6707 | for ac_func in canonicalize_file_name realpath |
6708 | do | |
6709 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6710 | echo "configure:6711: checking for $ac_func" >&5 |
97bf5e38 | 6711 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6712 | echo $ac_n "(cached) $ac_c" 1>&6 |
6713 | else | |
6714 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6715 | #line 6716 "configure" |
7e89e357 | 6716 | #include "confdefs.h" |
97bf5e38 MK |
6717 | /* System header to define __stub macros and hopefully few prototypes, |
6718 | which can conflict with char $ac_func(); below. */ | |
6719 | #include <assert.h> | |
6720 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6721 | /* We use char because int might match the return type of a gcc2 | |
6722 | builtin and then its argument prototype would still apply. */ | |
6723 | char $ac_func(); | |
6724 | ||
7e89e357 | 6725 | int main() { |
97bf5e38 MK |
6726 | |
6727 | /* The GNU C library defines this for functions which it implements | |
6728 | to always fail with ENOSYS. Some functions are actually named | |
6729 | something starting with __ and the normal name is an alias. */ | |
6730 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6731 | choke me | |
6732 | #else | |
6733 | $ac_func(); | |
6734 | #endif | |
6735 | ||
7e89e357 JT |
6736 | ; return 0; } |
6737 | EOF | |
66745969 | 6738 | if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6739 | rm -rf conftest* |
97bf5e38 | 6740 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6741 | else |
6742 | echo "configure: failed program was:" >&5 | |
6743 | cat conftest.$ac_ext >&5 | |
6744 | rm -rf conftest* | |
97bf5e38 | 6745 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6746 | fi |
6747 | rm -f conftest* | |
6748 | fi | |
6749 | ||
97bf5e38 MK |
6750 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6751 | echo "$ac_t""yes" 1>&6 | |
6752 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6753 | cat >> confdefs.h <<EOF | |
6754 | #define $ac_tr_func 1 | |
7e89e357 | 6755 | EOF |
97bf5e38 MK |
6756 | |
6757 | else | |
6758 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6759 | fi |
97bf5e38 | 6760 | done |
7e89e357 | 6761 | |
97bf5e38 | 6762 | for ac_func in poll |
7be570e7 JM |
6763 | do |
6764 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6765 | echo "configure:6766: checking for $ac_func" >&5 |
7be570e7 JM |
6766 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6767 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6768 | else | |
6769 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6770 | #line 6771 "configure" |
7be570e7 JM |
6771 | #include "confdefs.h" |
6772 | /* System header to define __stub macros and hopefully few prototypes, | |
6773 | which can conflict with char $ac_func(); below. */ | |
6774 | #include <assert.h> | |
6775 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6776 | /* We use char because int might match the return type of a gcc2 | |
6777 | builtin and then its argument prototype would still apply. */ | |
6778 | char $ac_func(); | |
6779 | ||
6780 | int main() { | |
6781 | ||
6782 | /* The GNU C library defines this for functions which it implements | |
6783 | to always fail with ENOSYS. Some functions are actually named | |
6784 | something starting with __ and the normal name is an alias. */ | |
6785 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6786 | choke me | |
6787 | #else | |
6788 | $ac_func(); | |
6789 | #endif | |
6790 | ||
6791 | ; return 0; } | |
6792 | EOF | |
66745969 | 6793 | if { (eval echo configure:6794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6794 | rm -rf conftest* |
6795 | eval "ac_cv_func_$ac_func=yes" | |
6796 | else | |
6797 | echo "configure: failed program was:" >&5 | |
6798 | cat conftest.$ac_ext >&5 | |
6799 | rm -rf conftest* | |
6800 | eval "ac_cv_func_$ac_func=no" | |
6801 | fi | |
6802 | rm -f conftest* | |
6803 | fi | |
6804 | ||
6805 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6806 | echo "$ac_t""yes" 1>&6 | |
6807 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6808 | cat >> confdefs.h <<EOF | |
6809 | #define $ac_tr_func 1 | |
6810 | EOF | |
6811 | ||
6812 | else | |
6813 | echo "$ac_t""no" 1>&6 | |
6814 | fi | |
6815 | done | |
6816 | ||
6817 | for ac_func in pread64 | |
6818 | do | |
6819 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6820 | echo "configure:6821: checking for $ac_func" >&5 |
14abd0fb MK |
6821 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6822 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6823 | else | |
6824 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6825 | #line 6826 "configure" |
14abd0fb MK |
6826 | #include "confdefs.h" |
6827 | /* System header to define __stub macros and hopefully few prototypes, | |
6828 | which can conflict with char $ac_func(); below. */ | |
6829 | #include <assert.h> | |
6830 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6831 | /* We use char because int might match the return type of a gcc2 | |
6832 | builtin and then its argument prototype would still apply. */ | |
6833 | char $ac_func(); | |
6834 | ||
6835 | int main() { | |
6836 | ||
6837 | /* The GNU C library defines this for functions which it implements | |
6838 | to always fail with ENOSYS. Some functions are actually named | |
6839 | something starting with __ and the normal name is an alias. */ | |
6840 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6841 | choke me | |
6842 | #else | |
6843 | $ac_func(); | |
6844 | #endif | |
6845 | ||
6846 | ; return 0; } | |
6847 | EOF | |
66745969 | 6848 | if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6849 | rm -rf conftest* |
6850 | eval "ac_cv_func_$ac_func=yes" | |
6851 | else | |
6852 | echo "configure: failed program was:" >&5 | |
6853 | cat conftest.$ac_ext >&5 | |
6854 | rm -rf conftest* | |
6855 | eval "ac_cv_func_$ac_func=no" | |
6856 | fi | |
6857 | rm -f conftest* | |
6858 | fi | |
6859 | ||
6860 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6861 | echo "$ac_t""yes" 1>&6 | |
6862 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6863 | cat >> confdefs.h <<EOF | |
6864 | #define $ac_tr_func 1 | |
6865 | EOF | |
6866 | ||
6867 | else | |
6868 | echo "$ac_t""no" 1>&6 | |
6869 | fi | |
6870 | done | |
6871 | ||
97bf5e38 MK |
6872 | for ac_func in sbrk |
6873 | do | |
6874 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6875 | echo "configure:6876: checking for $ac_func" >&5 |
97bf5e38 | 6876 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6877 | echo $ac_n "(cached) $ac_c" 1>&6 |
6878 | else | |
6879 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6880 | #line 6881 "configure" |
c906108c | 6881 | #include "confdefs.h" |
97bf5e38 MK |
6882 | /* System header to define __stub macros and hopefully few prototypes, |
6883 | which can conflict with char $ac_func(); below. */ | |
6884 | #include <assert.h> | |
6885 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6886 | /* We use char because int might match the return type of a gcc2 | |
6887 | builtin and then its argument prototype would still apply. */ | |
6888 | char $ac_func(); | |
c906108c | 6889 | |
97bf5e38 MK |
6890 | int main() { |
6891 | ||
6892 | /* The GNU C library defines this for functions which it implements | |
6893 | to always fail with ENOSYS. Some functions are actually named | |
6894 | something starting with __ and the normal name is an alias. */ | |
6895 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6896 | choke me | |
c906108c | 6897 | #else |
97bf5e38 | 6898 | $ac_func(); |
c906108c | 6899 | #endif |
97bf5e38 | 6900 | |
c906108c SS |
6901 | ; return 0; } |
6902 | EOF | |
66745969 | 6903 | if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6904 | rm -rf conftest* |
97bf5e38 | 6905 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6906 | else |
6907 | echo "configure: failed program was:" >&5 | |
6908 | cat conftest.$ac_ext >&5 | |
6909 | rm -rf conftest* | |
97bf5e38 | 6910 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6911 | fi |
6912 | rm -f conftest* | |
6913 | fi | |
6914 | ||
97bf5e38 MK |
6915 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6916 | echo "$ac_t""yes" 1>&6 | |
6917 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6918 | cat >> confdefs.h <<EOF | |
6919 | #define $ac_tr_func 1 | |
c906108c | 6920 | EOF |
97bf5e38 MK |
6921 | |
6922 | else | |
6923 | echo "$ac_t""no" 1>&6 | |
c906108c | 6924 | fi |
97bf5e38 | 6925 | done |
c906108c | 6926 | |
97bf5e38 MK |
6927 | for ac_func in setpgid setpgrp |
6928 | do | |
6929 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6930 | echo "configure:6931: checking for $ac_func" >&5 |
97bf5e38 | 6931 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6932 | echo $ac_n "(cached) $ac_c" 1>&6 |
6933 | else | |
6934 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6935 | #line 6936 "configure" |
c906108c | 6936 | #include "confdefs.h" |
97bf5e38 MK |
6937 | /* System header to define __stub macros and hopefully few prototypes, |
6938 | which can conflict with char $ac_func(); below. */ | |
6939 | #include <assert.h> | |
6940 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6941 | /* We use char because int might match the return type of a gcc2 | |
6942 | builtin and then its argument prototype would still apply. */ | |
6943 | char $ac_func(); | |
c906108c | 6944 | |
97bf5e38 MK |
6945 | int main() { |
6946 | ||
6947 | /* The GNU C library defines this for functions which it implements | |
6948 | to always fail with ENOSYS. Some functions are actually named | |
6949 | something starting with __ and the normal name is an alias. */ | |
6950 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6951 | choke me | |
c906108c | 6952 | #else |
97bf5e38 | 6953 | $ac_func(); |
c906108c | 6954 | #endif |
97bf5e38 | 6955 | |
c906108c SS |
6956 | ; return 0; } |
6957 | EOF | |
66745969 | 6958 | if { (eval echo configure:6959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6959 | rm -rf conftest* |
97bf5e38 | 6960 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6961 | else |
6962 | echo "configure: failed program was:" >&5 | |
6963 | cat conftest.$ac_ext >&5 | |
6964 | rm -rf conftest* | |
97bf5e38 | 6965 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6966 | fi |
6967 | rm -f conftest* | |
6968 | fi | |
6969 | ||
97bf5e38 MK |
6970 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6971 | echo "$ac_t""yes" 1>&6 | |
6972 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6973 | cat >> confdefs.h <<EOF | |
6974 | #define $ac_tr_func 1 | |
c906108c | 6975 | EOF |
97bf5e38 MK |
6976 | |
6977 | else | |
6978 | echo "$ac_t""no" 1>&6 | |
c906108c | 6979 | fi |
97bf5e38 | 6980 | done |
c906108c | 6981 | |
e1ea1d75 | 6982 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6983 | do |
6984 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 6985 | echo "configure:6986: checking for $ac_func" >&5 |
97bf5e38 | 6986 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6987 | echo $ac_n "(cached) $ac_c" 1>&6 |
6988 | else | |
6989 | cat > conftest.$ac_ext <<EOF | |
66745969 | 6990 | #line 6991 "configure" |
c906108c | 6991 | #include "confdefs.h" |
97bf5e38 MK |
6992 | /* System header to define __stub macros and hopefully few prototypes, |
6993 | which can conflict with char $ac_func(); below. */ | |
6994 | #include <assert.h> | |
6995 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6996 | /* We use char because int might match the return type of a gcc2 | |
6997 | builtin and then its argument prototype would still apply. */ | |
6998 | char $ac_func(); | |
c906108c | 6999 | |
97bf5e38 MK |
7000 | int main() { |
7001 | ||
7002 | /* The GNU C library defines this for functions which it implements | |
7003 | to always fail with ENOSYS. Some functions are actually named | |
7004 | something starting with __ and the normal name is an alias. */ | |
7005 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7006 | choke me | |
c906108c | 7007 | #else |
97bf5e38 | 7008 | $ac_func(); |
c906108c | 7009 | #endif |
97bf5e38 | 7010 | |
c906108c SS |
7011 | ; return 0; } |
7012 | EOF | |
66745969 | 7013 | if { (eval echo configure:7014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 7014 | rm -rf conftest* |
97bf5e38 | 7015 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
7016 | else |
7017 | echo "configure: failed program was:" >&5 | |
7018 | cat conftest.$ac_ext >&5 | |
7019 | rm -rf conftest* | |
97bf5e38 | 7020 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
7021 | fi |
7022 | rm -f conftest* | |
7023 | fi | |
7024 | ||
97bf5e38 MK |
7025 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
7026 | echo "$ac_t""yes" 1>&6 | |
7027 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7028 | cat >> confdefs.h <<EOF | |
7029 | #define $ac_tr_func 1 | |
c906108c | 7030 | EOF |
e1ea1d75 | 7031 | |
97bf5e38 MK |
7032 | else |
7033 | echo "$ac_t""no" 1>&6 | |
c906108c | 7034 | fi |
97bf5e38 | 7035 | done |
c906108c | 7036 | |
97bf5e38 MK |
7037 | for ac_func in socketpair |
7038 | do | |
7039 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 7040 | echo "configure:7041: checking for $ac_func" >&5 |
97bf5e38 | 7041 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
7042 | echo $ac_n "(cached) $ac_c" 1>&6 |
7043 | else | |
7044 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7045 | #line 7046 "configure" |
c906108c | 7046 | #include "confdefs.h" |
97bf5e38 MK |
7047 | /* System header to define __stub macros and hopefully few prototypes, |
7048 | which can conflict with char $ac_func(); below. */ | |
7049 | #include <assert.h> | |
7050 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7051 | /* We use char because int might match the return type of a gcc2 | |
7052 | builtin and then its argument prototype would still apply. */ | |
7053 | char $ac_func(); | |
c906108c | 7054 | |
97bf5e38 MK |
7055 | int main() { |
7056 | ||
7057 | /* The GNU C library defines this for functions which it implements | |
7058 | to always fail with ENOSYS. Some functions are actually named | |
7059 | something starting with __ and the normal name is an alias. */ | |
7060 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7061 | choke me | |
c906108c | 7062 | #else |
97bf5e38 | 7063 | $ac_func(); |
c906108c | 7064 | #endif |
97bf5e38 | 7065 | |
c906108c SS |
7066 | ; return 0; } |
7067 | EOF | |
66745969 | 7068 | if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 7069 | rm -rf conftest* |
97bf5e38 | 7070 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
7071 | else |
7072 | echo "configure: failed program was:" >&5 | |
7073 | cat conftest.$ac_ext >&5 | |
7074 | rm -rf conftest* | |
97bf5e38 | 7075 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
7076 | fi |
7077 | rm -f conftest* | |
7078 | fi | |
7079 | ||
97bf5e38 MK |
7080 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
7081 | echo "$ac_t""yes" 1>&6 | |
7082 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7083 | cat >> confdefs.h <<EOF | |
7084 | #define $ac_tr_func 1 | |
c906108c | 7085 | EOF |
97bf5e38 MK |
7086 | |
7087 | else | |
7088 | echo "$ac_t""no" 1>&6 | |
c906108c | 7089 | fi |
97bf5e38 | 7090 | done |
c906108c | 7091 | |
b757528f JJ |
7092 | for ac_func in syscall |
7093 | do | |
7094 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
66745969 | 7095 | echo "configure:7096: checking for $ac_func" >&5 |
b757528f JJ |
7096 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7097 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7098 | else | |
7099 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7100 | #line 7101 "configure" |
b757528f JJ |
7101 | #include "confdefs.h" |
7102 | /* System header to define __stub macros and hopefully few prototypes, | |
7103 | which can conflict with char $ac_func(); below. */ | |
7104 | #include <assert.h> | |
7105 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7106 | /* We use char because int might match the return type of a gcc2 | |
7107 | builtin and then its argument prototype would still apply. */ | |
7108 | char $ac_func(); | |
7109 | ||
7110 | int main() { | |
7111 | ||
7112 | /* The GNU C library defines this for functions which it implements | |
7113 | to always fail with ENOSYS. Some functions are actually named | |
7114 | something starting with __ and the normal name is an alias. */ | |
7115 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7116 | choke me | |
7117 | #else | |
7118 | $ac_func(); | |
7119 | #endif | |
7120 | ||
7121 | ; return 0; } | |
7122 | EOF | |
66745969 | 7123 | if { (eval echo configure:7124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
7124 | rm -rf conftest* |
7125 | eval "ac_cv_func_$ac_func=yes" | |
7126 | else | |
7127 | echo "configure: failed program was:" >&5 | |
7128 | cat conftest.$ac_ext >&5 | |
7129 | rm -rf conftest* | |
7130 | eval "ac_cv_func_$ac_func=no" | |
7131 | fi | |
7132 | rm -f conftest* | |
7133 | fi | |
7134 | ||
7135 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7136 | echo "$ac_t""yes" 1>&6 | |
7137 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7138 | cat >> confdefs.h <<EOF | |
7139 | #define $ac_tr_func 1 | |
7140 | EOF | |
7141 | ||
7142 | else | |
7143 | echo "$ac_t""no" 1>&6 | |
7144 | fi | |
7145 | done | |
7146 | ||
97bf5e38 MK |
7147 | |
7148 | if test "$cross_compiling" = no; then | |
7149 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
66745969 | 7150 | echo "configure:7151: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7151 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 7152 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
7153 | else |
7154 | if test "$cross_compiling" = yes; then | |
7155 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
7156 | else |
7157 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7158 | #line 7159 "configure" |
c906108c SS |
7159 | #include "confdefs.h" |
7160 | ||
c906108c SS |
7161 | #ifdef HAVE_UNISTD_H |
7162 | #include <unistd.h> | |
7163 | #endif | |
97bf5e38 MK |
7164 | |
7165 | /* | |
7166 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
7167 | * successfully. | |
7168 | */ | |
7169 | main() | |
7170 | { | |
7171 | if (setpgrp(1,1) == -1) | |
7172 | exit(0); | |
7173 | else | |
7174 | exit(1); | |
7175 | } | |
7176 | ||
c906108c | 7177 | EOF |
66745969 | 7178 | if { (eval echo configure:7179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7179 | then |
7180 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
7181 | else |
7182 | echo "configure: failed program was:" >&5 | |
7183 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7184 | rm -fr conftest* |
7185 | ac_cv_func_setpgrp_void=yes | |
c906108c | 7186 | fi |
97bf5e38 | 7187 | rm -fr conftest* |
c906108c SS |
7188 | fi |
7189 | ||
97bf5e38 MK |
7190 | |
7191 | fi | |
7192 | ||
7193 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
7194 | if test $ac_cv_func_setpgrp_void = yes; then | |
7195 | cat >> confdefs.h <<\EOF | |
7196 | #define SETPGRP_VOID 1 | |
c906108c SS |
7197 | EOF |
7198 | ||
7199 | fi | |
7200 | ||
97bf5e38 MK |
7201 | else |
7202 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
66745969 | 7203 | echo "configure:7204: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7204 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
7205 | echo $ac_n "(cached) $ac_c" 1>&6 |
7206 | else | |
7207 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7208 | #line 7209 "configure" |
b83266a0 SS |
7209 | #include "confdefs.h" |
7210 | ||
b83266a0 | 7211 | #include <unistd.h> |
97bf5e38 | 7212 | |
b83266a0 | 7213 | int main() { |
97bf5e38 MK |
7214 | |
7215 | if (setpgrp(1,1) == -1) | |
7216 | exit (0); | |
7217 | else | |
7218 | exit (1); | |
7219 | ||
b83266a0 SS |
7220 | ; return 0; } |
7221 | EOF | |
66745969 | 7222 | if { (eval echo configure:7223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 7223 | rm -rf conftest* |
97bf5e38 | 7224 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
7225 | else |
7226 | echo "configure: failed program was:" >&5 | |
7227 | cat conftest.$ac_ext >&5 | |
7228 | rm -rf conftest* | |
97bf5e38 | 7229 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
7230 | fi |
7231 | rm -f conftest* | |
7232 | fi | |
7233 | ||
97bf5e38 MK |
7234 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
7235 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 7236 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7237 | #define SETPGRP_VOID 1 |
b83266a0 SS |
7238 | EOF |
7239 | ||
97bf5e38 | 7240 | fi |
b83266a0 SS |
7241 | fi |
7242 | ||
97bf5e38 MK |
7243 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
7244 | # since sigsetjmp might only be defined as a macro. | |
7245 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
66745969 | 7246 | echo "configure:7247: checking for sigsetjmp" >&5 |
97bf5e38 | 7247 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
7248 | echo $ac_n "(cached) $ac_c" 1>&6 |
7249 | else | |
7250 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7251 | #line 7252 "configure" |
a4db0f07 RH |
7252 | #include "confdefs.h" |
7253 | ||
97bf5e38 MK |
7254 | #include <setjmp.h> |
7255 | ||
a4db0f07 | 7256 | int main() { |
97bf5e38 | 7257 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
7258 | ; return 0; } |
7259 | EOF | |
66745969 | 7260 | if { (eval echo configure:7261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 7261 | rm -rf conftest* |
97bf5e38 | 7262 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
7263 | else |
7264 | echo "configure: failed program was:" >&5 | |
7265 | cat conftest.$ac_ext >&5 | |
7266 | rm -rf conftest* | |
97bf5e38 | 7267 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
7268 | fi |
7269 | rm -f conftest* | |
7270 | fi | |
7271 | ||
97bf5e38 MK |
7272 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
7273 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 7274 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7275 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
7276 | EOF |
7277 | ||
7278 | fi | |
c906108c | 7279 | |
06825bd1 MK |
7280 | # Assume we'll default to using the included libiberty regex. |
7281 | gdb_use_included_regex=yes | |
7282 | ||
7283 | # However, if the system regex is GNU regex, then default to *not* | |
7284 | # using the included regex. | |
7285 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
66745969 | 7286 | echo "configure:7287: checking for GNU regex" >&5 |
06825bd1 MK |
7287 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
7288 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7289 | else | |
7290 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7291 | #line 7292 "configure" |
06825bd1 MK |
7292 | #include "confdefs.h" |
7293 | #include <gnu-versions.h> | |
7294 | int main() { | |
7295 | #define REGEX_INTERFACE_VERSION 1 | |
7296 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
7297 | # error "Version mismatch" | |
7298 | #endif | |
7299 | ; return 0; } | |
7300 | EOF | |
66745969 | 7301 | if { (eval echo configure:7302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
7302 | rm -rf conftest* |
7303 | gdb_cv_have_gnu_regex=yes | |
7304 | else | |
7305 | echo "configure: failed program was:" >&5 | |
7306 | cat conftest.$ac_ext >&5 | |
7307 | rm -rf conftest* | |
7308 | gdb_cv_have_gnu_regex=no | |
7309 | fi | |
7310 | rm -f conftest* | |
7311 | fi | |
7312 | ||
7313 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
7314 | if test $gdb_cv_have_gnu_regex = yes; then | |
7315 | gdb_use_included_regex=no | |
7316 | fi | |
7317 | ||
7318 | # Check whether --with-included-regex or --without-included-regex was given. | |
7319 | if test "${with_included_regex+set}" = set; then | |
7320 | withval="$with_included_regex" | |
7321 | gdb_with_regex=$withval | |
7322 | else | |
7323 | gdb_with_regex=$gdb_use_included_regex | |
7324 | fi | |
7325 | ||
7326 | if test "$gdb_with_regex" = yes; then | |
7327 | cat >> confdefs.h <<\EOF | |
7328 | #define USE_INCLUDED_REGEX 1 | |
7329 | EOF | |
7330 | ||
7331 | fi | |
7332 | ||
78434e59 MK |
7333 | # See if <machine/reg.h> degines `struct reg'. |
7334 | echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6 | |
66745969 | 7335 | echo "configure:7336: checking for struct reg in machine/reg.h" >&5 |
78434e59 MK |
7336 | if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then |
7337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7338 | else | |
7339 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7340 | #line 7341 "configure" |
78434e59 MK |
7341 | #include "confdefs.h" |
7342 | #include <sys/types.h> | |
7343 | #include <machine/reg.h> | |
7344 | int main() { | |
7345 | struct reg r; | |
7346 | ; return 0; } | |
7347 | EOF | |
66745969 | 7348 | if { (eval echo configure:7349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
78434e59 MK |
7349 | rm -rf conftest* |
7350 | gdb_cv_struct_reg=yes | |
7351 | else | |
7352 | echo "configure: failed program was:" >&5 | |
7353 | cat conftest.$ac_ext >&5 | |
7354 | rm -rf conftest* | |
7355 | gdb_cv_struct_reg=no | |
7356 | fi | |
7357 | rm -f conftest* | |
7358 | fi | |
7359 | ||
7360 | echo "$ac_t""$gdb_cv_struct_reg" 1>&6 | |
7361 | if test $gdb_cv_struct_reg = yes; then | |
7362 | cat >> confdefs.h <<\EOF | |
7363 | #define HAVE_STRUCT_REG 1 | |
7364 | EOF | |
7365 | ||
7366 | fi | |
7367 | ||
97bf5e38 MK |
7368 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7369 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
7370 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
66745969 | 7371 | echo "configure:7372: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
7372 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7373 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7374 | else | |
7375 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7376 | #line 7377 "configure" |
c906108c | 7377 | #include "confdefs.h" |
97bf5e38 MK |
7378 | #include <machine/reg.h> |
7379 | int main() { | |
7380 | struct reg r; r.r_fs; | |
7381 | ; return 0; } | |
c906108c | 7382 | EOF |
66745969 | 7383 | if { (eval echo configure:7384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7384 | rm -rf conftest* |
97bf5e38 | 7385 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 7386 | else |
97bf5e38 MK |
7387 | echo "configure: failed program was:" >&5 |
7388 | cat conftest.$ac_ext >&5 | |
c906108c | 7389 | rm -rf conftest* |
97bf5e38 | 7390 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
7391 | fi |
7392 | rm -f conftest* | |
97bf5e38 | 7393 | fi |
c906108c | 7394 | |
97bf5e38 MK |
7395 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
7396 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7397 | cat >> confdefs.h <<\EOF | |
7398 | #define HAVE_STRUCT_REG_R_FS 1 | |
7399 | EOF | |
7400 | ||
7401 | fi | |
7402 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
66745969 | 7403 | echo "configure:7404: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
7404 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7405 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7406 | else | |
7407 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7408 | #line 7409 "configure" |
c906108c | 7409 | #include "confdefs.h" |
97bf5e38 MK |
7410 | #include <machine/reg.h> |
7411 | int main() { | |
7412 | struct reg r; r.r_gs; | |
7413 | ; return 0; } | |
c906108c | 7414 | EOF |
66745969 | 7415 | if { (eval echo configure:7416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7416 | rm -rf conftest* |
97bf5e38 | 7417 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 7418 | else |
97bf5e38 MK |
7419 | echo "configure: failed program was:" >&5 |
7420 | cat conftest.$ac_ext >&5 | |
c906108c | 7421 | rm -rf conftest* |
97bf5e38 | 7422 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
7423 | fi |
7424 | rm -f conftest* | |
c906108c | 7425 | fi |
c906108c | 7426 | |
97bf5e38 MK |
7427 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
7428 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7429 | cat >> confdefs.h <<\EOF | |
7430 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
7431 | EOF |
7432 | ||
c906108c SS |
7433 | fi |
7434 | ||
97bf5e38 MK |
7435 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
7436 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
66745969 | 7437 | echo "configure:7438: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 7438 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
7439 | echo $ac_n "(cached) $ac_c" 1>&6 |
7440 | else | |
7441 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7442 | #line 7443 "configure" |
c906108c | 7443 | #include "confdefs.h" |
97bf5e38 | 7444 | #include <sys/ptrace.h> |
c906108c | 7445 | int main() { |
97bf5e38 | 7446 | PTRACE_GETREGS; |
c906108c SS |
7447 | ; return 0; } |
7448 | EOF | |
66745969 | 7449 | if { (eval echo configure:7450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7450 | rm -rf conftest* |
97bf5e38 | 7451 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
7452 | else |
7453 | echo "configure: failed program was:" >&5 | |
7454 | cat conftest.$ac_ext >&5 | |
7455 | rm -rf conftest* | |
97bf5e38 | 7456 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
7457 | fi |
7458 | rm -f conftest* | |
7459 | fi | |
7460 | ||
97bf5e38 MK |
7461 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
7462 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
7463 | cat >> confdefs.h <<\EOF | |
7464 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7465 | EOF |
7466 | ||
97bf5e38 | 7467 | fi |
c906108c | 7468 | |
97bf5e38 MK |
7469 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7470 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
66745969 | 7471 | echo "configure:7472: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7472 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7473 | echo $ac_n "(cached) $ac_c" 1>&6 |
7474 | else | |
7475 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7476 | #line 7477 "configure" |
c906108c | 7477 | #include "confdefs.h" |
97bf5e38 | 7478 | #include <sys/ptrace.h> |
c906108c | 7479 | int main() { |
97bf5e38 | 7480 | PTRACE_GETFPXREGS; |
c906108c SS |
7481 | ; return 0; } |
7482 | EOF | |
66745969 | 7483 | if { (eval echo configure:7484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7484 | rm -rf conftest* |
97bf5e38 | 7485 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7486 | else |
7487 | echo "configure: failed program was:" >&5 | |
7488 | cat conftest.$ac_ext >&5 | |
7489 | rm -rf conftest* | |
97bf5e38 | 7490 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7491 | fi |
7492 | rm -f conftest* | |
7493 | fi | |
7494 | ||
97bf5e38 MK |
7495 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7496 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7497 | cat >> confdefs.h <<\EOF | |
7498 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7499 | EOF |
7500 | ||
97bf5e38 | 7501 | fi |
c906108c | 7502 | |
97bf5e38 MK |
7503 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7504 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
66745969 | 7505 | echo "configure:7506: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7506 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7507 | echo $ac_n "(cached) $ac_c" 1>&6 |
7508 | else | |
7509 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7510 | #line 7511 "configure" |
c906108c | 7511 | #include "confdefs.h" |
97bf5e38 MK |
7512 | #include <sys/types.h> |
7513 | #include <sys/ptrace.h> | |
c906108c | 7514 | int main() { |
97bf5e38 | 7515 | PT_GETDBREGS; |
c906108c SS |
7516 | ; return 0; } |
7517 | EOF | |
66745969 | 7518 | if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7519 | rm -rf conftest* |
97bf5e38 | 7520 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7521 | else |
7522 | echo "configure: failed program was:" >&5 | |
7523 | cat conftest.$ac_ext >&5 | |
7524 | rm -rf conftest* | |
97bf5e38 | 7525 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7526 | fi |
7527 | rm -f conftest* | |
7528 | fi | |
7529 | ||
97bf5e38 MK |
7530 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7531 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7532 | cat >> confdefs.h <<\EOF | |
7533 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7534 | EOF |
7535 | ||
97bf5e38 | 7536 | fi |
c906108c | 7537 | |
97bf5e38 MK |
7538 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7539 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
66745969 | 7540 | echo "configure:7541: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7541 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7542 | echo $ac_n "(cached) $ac_c" 1>&6 |
7543 | else | |
7544 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7545 | #line 7546 "configure" |
c906108c | 7546 | #include "confdefs.h" |
97bf5e38 MK |
7547 | #include <sys/types.h> |
7548 | #include <sys/ptrace.h> | |
c906108c | 7549 | int main() { |
97bf5e38 | 7550 | PT_GETXMMREGS; |
c906108c SS |
7551 | ; return 0; } |
7552 | EOF | |
66745969 | 7553 | if { (eval echo configure:7554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7554 | rm -rf conftest* |
97bf5e38 | 7555 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7556 | else |
7557 | echo "configure: failed program was:" >&5 | |
7558 | cat conftest.$ac_ext >&5 | |
7559 | rm -rf conftest* | |
97bf5e38 | 7560 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7561 | fi |
7562 | rm -f conftest* | |
7563 | fi | |
7564 | ||
97bf5e38 MK |
7565 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7566 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7567 | cat >> confdefs.h <<\EOF | |
7568 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7569 | EOF |
7570 | ||
97bf5e38 | 7571 | fi |
c906108c | 7572 | |
27ca5dad | 7573 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7574 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7575 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
66745969 | 7576 | echo "configure:7577: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7577 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7578 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7579 | else | |
7580 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7581 | #line 7582 "configure" |
27ca5dad MC |
7582 | #include "confdefs.h" |
7583 | #include <stdint.h> | |
7584 | int main() { | |
7585 | uintptr_t foo = 0; | |
7586 | ; return 0; } | |
7587 | EOF | |
66745969 | 7588 | if { (eval echo configure:7589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7589 | rm -rf conftest* |
7590 | gdb_cv_have_uintptr_t=yes | |
7591 | else | |
7592 | echo "configure: failed program was:" >&5 | |
7593 | cat conftest.$ac_ext >&5 | |
7594 | rm -rf conftest* | |
7595 | gdb_cv_have_uintptr_t=no | |
7596 | fi | |
7597 | rm -f conftest* | |
7598 | fi | |
7599 | ||
7600 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 | |
7601 | if test $gdb_cv_have_uintptr_t = yes; then | |
7602 | cat >> confdefs.h <<\EOF | |
7603 | #define HAVE_UINTPTR_T 1 | |
7604 | EOF | |
7605 | ||
7606 | fi | |
97bf5e38 MK |
7607 | |
7608 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
66745969 | 7609 | echo "configure:7610: checking whether malloc must be declared" >&5 |
97bf5e38 | 7610 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7611 | echo $ac_n "(cached) $ac_c" 1>&6 |
7612 | else | |
7613 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7614 | #line 7615 "configure" |
3862412b | 7615 | #include "confdefs.h" |
e17bf198 | 7616 | |
97bf5e38 MK |
7617 | #include <stdio.h> |
7618 | #ifdef HAVE_STRING_H | |
7619 | #include <string.h> | |
7620 | #else | |
7621 | #ifdef HAVE_STRINGS_H | |
7622 | #include <strings.h> | |
7623 | #endif | |
7624 | #endif | |
7625 | #ifdef HAVE_STDLIB_H | |
7626 | #include <stdlib.h> | |
7627 | #endif | |
7628 | #ifdef HAVE_UNISTD_H | |
7629 | #include <unistd.h> | |
7630 | #endif | |
3862412b | 7631 | int main() { |
97bf5e38 | 7632 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7633 | ; return 0; } |
7634 | EOF | |
66745969 | 7635 | if { (eval echo configure:7636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7636 | rm -rf conftest* |
97bf5e38 | 7637 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7638 | else |
7639 | echo "configure: failed program was:" >&5 | |
7640 | cat conftest.$ac_ext >&5 | |
7641 | rm -rf conftest* | |
97bf5e38 | 7642 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7643 | fi |
7644 | rm -f conftest* | |
7645 | fi | |
7646 | ||
97bf5e38 MK |
7647 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7648 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7649 | cat >> confdefs.h <<\EOF | |
7650 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7651 | EOF |
7652 | ||
97bf5e38 | 7653 | fi |
3862412b | 7654 | |
97bf5e38 | 7655 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
66745969 | 7656 | echo "configure:7657: checking whether realloc must be declared" >&5 |
97bf5e38 | 7657 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7658 | echo $ac_n "(cached) $ac_c" 1>&6 |
7659 | else | |
7660 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7661 | #line 7662 "configure" |
3862412b | 7662 | #include "confdefs.h" |
e17bf198 | 7663 | |
97bf5e38 MK |
7664 | #include <stdio.h> |
7665 | #ifdef HAVE_STRING_H | |
7666 | #include <string.h> | |
7667 | #else | |
7668 | #ifdef HAVE_STRINGS_H | |
7669 | #include <strings.h> | |
7670 | #endif | |
7671 | #endif | |
7672 | #ifdef HAVE_STDLIB_H | |
7673 | #include <stdlib.h> | |
7674 | #endif | |
7675 | #ifdef HAVE_UNISTD_H | |
7676 | #include <unistd.h> | |
7677 | #endif | |
3862412b | 7678 | int main() { |
97bf5e38 | 7679 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7680 | ; return 0; } |
7681 | EOF | |
66745969 | 7682 | if { (eval echo configure:7683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7683 | rm -rf conftest* |
97bf5e38 | 7684 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7685 | else |
7686 | echo "configure: failed program was:" >&5 | |
7687 | cat conftest.$ac_ext >&5 | |
7688 | rm -rf conftest* | |
97bf5e38 | 7689 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7690 | fi |
7691 | rm -f conftest* | |
7692 | fi | |
7693 | ||
97bf5e38 MK |
7694 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7695 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7696 | cat >> confdefs.h <<\EOF | |
7697 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7698 | EOF |
7699 | ||
97bf5e38 | 7700 | fi |
3862412b | 7701 | |
97bf5e38 | 7702 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
66745969 | 7703 | echo "configure:7704: checking whether free must be declared" >&5 |
97bf5e38 | 7704 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7705 | echo $ac_n "(cached) $ac_c" 1>&6 |
7706 | else | |
7707 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7708 | #line 7709 "configure" |
451928c5 | 7709 | #include "confdefs.h" |
e17bf198 | 7710 | |
97bf5e38 MK |
7711 | #include <stdio.h> |
7712 | #ifdef HAVE_STRING_H | |
7713 | #include <string.h> | |
7714 | #else | |
7715 | #ifdef HAVE_STRINGS_H | |
7716 | #include <strings.h> | |
7717 | #endif | |
7718 | #endif | |
7719 | #ifdef HAVE_STDLIB_H | |
7720 | #include <stdlib.h> | |
7721 | #endif | |
7722 | #ifdef HAVE_UNISTD_H | |
7723 | #include <unistd.h> | |
7724 | #endif | |
451928c5 | 7725 | int main() { |
97bf5e38 | 7726 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7727 | ; return 0; } |
7728 | EOF | |
66745969 | 7729 | if { (eval echo configure:7730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7730 | rm -rf conftest* |
97bf5e38 | 7731 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7732 | else |
7733 | echo "configure: failed program was:" >&5 | |
7734 | cat conftest.$ac_ext >&5 | |
7735 | rm -rf conftest* | |
97bf5e38 | 7736 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7737 | fi |
7738 | rm -f conftest* | |
7739 | fi | |
7740 | ||
97bf5e38 MK |
7741 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7742 | if test $bfd_cv_decl_needed_free = yes; then | |
7743 | cat >> confdefs.h <<\EOF | |
7744 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7745 | EOF |
7746 | ||
97bf5e38 | 7747 | fi |
451928c5 | 7748 | |
97bf5e38 | 7749 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
66745969 | 7750 | echo "configure:7751: checking whether strerror must be declared" >&5 |
97bf5e38 | 7751 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7752 | echo $ac_n "(cached) $ac_c" 1>&6 |
7753 | else | |
7754 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7755 | #line 7756 "configure" |
451928c5 | 7756 | #include "confdefs.h" |
e17bf198 | 7757 | |
97bf5e38 MK |
7758 | #include <stdio.h> |
7759 | #ifdef HAVE_STRING_H | |
7760 | #include <string.h> | |
7761 | #else | |
7762 | #ifdef HAVE_STRINGS_H | |
7763 | #include <strings.h> | |
7764 | #endif | |
7765 | #endif | |
7766 | #ifdef HAVE_STDLIB_H | |
7767 | #include <stdlib.h> | |
7768 | #endif | |
7769 | #ifdef HAVE_UNISTD_H | |
7770 | #include <unistd.h> | |
7771 | #endif | |
451928c5 | 7772 | int main() { |
97bf5e38 | 7773 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7774 | ; return 0; } |
7775 | EOF | |
66745969 | 7776 | if { (eval echo configure:7777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7777 | rm -rf conftest* |
97bf5e38 | 7778 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7779 | else |
7780 | echo "configure: failed program was:" >&5 | |
7781 | cat conftest.$ac_ext >&5 | |
7782 | rm -rf conftest* | |
97bf5e38 | 7783 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7784 | fi |
7785 | rm -f conftest* | |
7786 | fi | |
7787 | ||
97bf5e38 MK |
7788 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7789 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7790 | cat >> confdefs.h <<\EOF | |
7791 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7792 | EOF |
7793 | ||
97bf5e38 | 7794 | fi |
451928c5 | 7795 | |
97bf5e38 | 7796 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
66745969 | 7797 | echo "configure:7798: checking whether strdup must be declared" >&5 |
97bf5e38 | 7798 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7799 | echo $ac_n "(cached) $ac_c" 1>&6 |
7800 | else | |
7801 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7802 | #line 7803 "configure" |
3862412b | 7803 | #include "confdefs.h" |
e17bf198 | 7804 | |
97bf5e38 MK |
7805 | #include <stdio.h> |
7806 | #ifdef HAVE_STRING_H | |
7807 | #include <string.h> | |
7808 | #else | |
7809 | #ifdef HAVE_STRINGS_H | |
7810 | #include <strings.h> | |
7811 | #endif | |
7812 | #endif | |
7813 | #ifdef HAVE_STDLIB_H | |
7814 | #include <stdlib.h> | |
7815 | #endif | |
7816 | #ifdef HAVE_UNISTD_H | |
7817 | #include <unistd.h> | |
7818 | #endif | |
3862412b | 7819 | int main() { |
97bf5e38 | 7820 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7821 | ; return 0; } |
7822 | EOF | |
66745969 | 7823 | if { (eval echo configure:7824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7824 | rm -rf conftest* |
97bf5e38 | 7825 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7826 | else |
7827 | echo "configure: failed program was:" >&5 | |
7828 | cat conftest.$ac_ext >&5 | |
7829 | rm -rf conftest* | |
97bf5e38 | 7830 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7831 | fi |
7832 | rm -f conftest* | |
7833 | fi | |
7834 | ||
97bf5e38 MK |
7835 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7836 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7837 | cat >> confdefs.h <<\EOF | |
7838 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7839 | EOF |
7840 | ||
97bf5e38 | 7841 | fi |
3862412b | 7842 | |
97bf5e38 | 7843 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
66745969 | 7844 | echo "configure:7845: checking whether strstr must be declared" >&5 |
97bf5e38 | 7845 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7846 | echo $ac_n "(cached) $ac_c" 1>&6 |
7847 | else | |
7848 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7849 | #line 7850 "configure" |
3862412b | 7850 | #include "confdefs.h" |
e17bf198 | 7851 | |
97bf5e38 MK |
7852 | #include <stdio.h> |
7853 | #ifdef HAVE_STRING_H | |
7854 | #include <string.h> | |
7855 | #else | |
7856 | #ifdef HAVE_STRINGS_H | |
7857 | #include <strings.h> | |
7858 | #endif | |
7859 | #endif | |
7860 | #ifdef HAVE_STDLIB_H | |
7861 | #include <stdlib.h> | |
7862 | #endif | |
7863 | #ifdef HAVE_UNISTD_H | |
7864 | #include <unistd.h> | |
7865 | #endif | |
3862412b | 7866 | int main() { |
97bf5e38 | 7867 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7868 | ; return 0; } |
7869 | EOF | |
66745969 | 7870 | if { (eval echo configure:7871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7871 | rm -rf conftest* |
97bf5e38 | 7872 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7873 | else |
7874 | echo "configure: failed program was:" >&5 | |
7875 | cat conftest.$ac_ext >&5 | |
7876 | rm -rf conftest* | |
97bf5e38 | 7877 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7878 | fi |
7879 | rm -f conftest* | |
7880 | fi | |
7881 | ||
97bf5e38 MK |
7882 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7883 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7884 | cat >> confdefs.h <<\EOF | |
7885 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7886 | EOF |
7887 | ||
97bf5e38 | 7888 | fi |
3862412b | 7889 | |
97bf5e38 | 7890 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
66745969 | 7891 | echo "configure:7892: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7892 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7893 | echo $ac_n "(cached) $ac_c" 1>&6 |
7894 | else | |
7895 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7896 | #line 7897 "configure" |
596c9d4b KB |
7897 | #include "confdefs.h" |
7898 | ||
97bf5e38 MK |
7899 | #include <stdio.h> |
7900 | #ifdef HAVE_STRING_H | |
7901 | #include <string.h> | |
7902 | #else | |
7903 | #ifdef HAVE_STRINGS_H | |
7904 | #include <strings.h> | |
7905 | #endif | |
7906 | #endif | |
7907 | #ifdef HAVE_STDLIB_H | |
7908 | #include <stdlib.h> | |
7909 | #endif | |
7910 | #ifdef HAVE_UNISTD_H | |
7911 | #include <unistd.h> | |
7912 | #endif | |
596c9d4b | 7913 | int main() { |
97bf5e38 | 7914 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7915 | ; return 0; } |
7916 | EOF | |
66745969 | 7917 | if { (eval echo configure:7918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7918 | rm -rf conftest* |
97bf5e38 | 7919 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7920 | else |
7921 | echo "configure: failed program was:" >&5 | |
7922 | cat conftest.$ac_ext >&5 | |
7923 | rm -rf conftest* | |
97bf5e38 | 7924 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7925 | fi |
7926 | rm -f conftest* | |
7927 | fi | |
7928 | ||
97bf5e38 MK |
7929 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7930 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7931 | cat >> confdefs.h <<\EOF | |
7932 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7933 | EOF |
7934 | ||
97bf5e38 | 7935 | fi |
596c9d4b | 7936 | |
97bf5e38 MK |
7937 | |
7938 | # The following save_state_t checkery is only necessary for HPUX | |
7939 | # versions earlier than 10.20. When those fade from memory, this | |
7940 | # could be expunged. --jsm 1999-03-22 | |
7941 | ||
7942 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
66745969 | 7943 | echo "configure:7944: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7944 | cat > conftest.$ac_ext <<EOF |
66745969 | 7945 | #line 7946 "configure" |
97bf5e38 MK |
7946 | #include "confdefs.h" |
7947 | #include <machine/save_state.h> | |
7948 | EOF | |
7949 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7950 | egrep "save_state_t" >/dev/null 2>&1; then | |
7951 | rm -rf conftest* | |
7952 | gdb_cv_hpux_savestate=yes | |
7953 | else | |
7954 | rm -rf conftest* | |
7955 | gdb_cv_hpux_savestate=no | |
7956 | fi | |
7957 | rm -f conftest* | |
7958 | ||
7959 | cat > conftest.$ac_ext <<EOF | |
66745969 | 7960 | #line 7961 "configure" |
97bf5e38 MK |
7961 | #include "confdefs.h" |
7962 | #include <machine/save_state.h> | |
7963 | EOF | |
7964 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7965 | egrep "ss_wide" >/dev/null 2>&1; then | |
7966 | rm -rf conftest* | |
7967 | gdb_cv_hpux_sswide=yes | |
7968 | else | |
7969 | rm -rf conftest* | |
7970 | gdb_cv_hpux_sswide=no | |
7971 | fi | |
7972 | rm -f conftest* | |
7973 | ||
7974 | if test $gdb_cv_hpux_savestate = yes | |
7975 | then | |
7976 | cat >> confdefs.h <<\EOF | |
7977 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7978 | EOF | |
7979 | ||
7980 | fi | |
7981 | if test $gdb_cv_hpux_sswide = yes | |
7982 | then | |
7983 | cat >> confdefs.h <<\EOF | |
7984 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7985 | EOF | |
7986 | ||
7987 | fi | |
7988 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7989 | ||
7990 | ||
7991 | # If we are configured native on GNU/Linux, work around problems with | |
7992 | # sys/procfs.h | |
7993 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7994 | ||
7995 | if test "${target}" = "${host}"; then | |
7996 | case "${host}" in | |
7997 | i[3456]86-*-linux*) | |
7998 | cat >> confdefs.h <<\EOF | |
7999 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
8000 | EOF | |
8001 | ||
8002 | cat >> confdefs.h <<\EOF | |
8003 | #define sys_quotactl 1 | |
8004 | EOF | |
8005 | ||
8006 | ;; | |
8007 | ia64-*-aix*) | |
8008 | cat >> confdefs.h <<\EOF | |
8009 | #define NEW_PROC_API 1 | |
8010 | EOF | |
8011 | ||
8012 | ;; | |
8013 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
8014 | cat >> confdefs.h <<\EOF | |
8015 | #define NEW_PROC_API 1 | |
8016 | EOF | |
8017 | ||
8018 | ;; | |
e7c61be3 | 8019 | *-*-solaris2.[6789]) |
97bf5e38 MK |
8020 | cat >> confdefs.h <<\EOF |
8021 | #define NEW_PROC_API 1 | |
8022 | EOF | |
8023 | ||
8024 | ;; | |
8025 | esac | |
8026 | fi | |
8027 | ||
8028 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
8029 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
66745969 | 8030 | echo "configure:8031: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 8031 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
8032 | echo $ac_n "(cached) $ac_c" 1>&6 |
8033 | else | |
8034 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8035 | #line 8036 "configure" |
596c9d4b KB |
8036 | #include "confdefs.h" |
8037 | ||
8038 | #define _SYSCALL32 | |
8039 | #include <sys/procfs.h> | |
8040 | int main() { | |
97bf5e38 | 8041 | pstatus_t avar |
596c9d4b KB |
8042 | ; return 0; } |
8043 | EOF | |
66745969 | 8044 | if { (eval echo configure:8045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8045 | rm -rf conftest* |
97bf5e38 | 8046 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
8047 | else |
8048 | echo "configure: failed program was:" >&5 | |
8049 | cat conftest.$ac_ext >&5 | |
8050 | rm -rf conftest* | |
97bf5e38 | 8051 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
8052 | |
8053 | fi | |
8054 | rm -f conftest* | |
8055 | fi | |
8056 | ||
97bf5e38 | 8057 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 8058 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8059 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
8060 | EOF |
8061 | ||
8062 | fi | |
97bf5e38 | 8063 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 8064 | |
97bf5e38 | 8065 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8066 | echo "configure:8067: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 8067 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
8068 | echo $ac_n "(cached) $ac_c" 1>&6 |
8069 | else | |
8070 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8071 | #line 8072 "configure" |
596c9d4b KB |
8072 | #include "confdefs.h" |
8073 | ||
8074 | #define _SYSCALL32 | |
8075 | #include <sys/procfs.h> | |
8076 | int main() { | |
97bf5e38 | 8077 | prrun_t avar |
596c9d4b KB |
8078 | ; return 0; } |
8079 | EOF | |
66745969 | 8080 | if { (eval echo configure:8081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8081 | rm -rf conftest* |
97bf5e38 | 8082 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
8083 | else |
8084 | echo "configure: failed program was:" >&5 | |
8085 | cat conftest.$ac_ext >&5 | |
8086 | rm -rf conftest* | |
97bf5e38 | 8087 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
8088 | |
8089 | fi | |
8090 | rm -f conftest* | |
8091 | fi | |
8092 | ||
97bf5e38 | 8093 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 8094 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8095 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
8096 | EOF |
8097 | ||
8098 | fi | |
97bf5e38 | 8099 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 8100 | |
97bf5e38 | 8101 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8102 | echo "configure:8103: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8103 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
8104 | echo $ac_n "(cached) $ac_c" 1>&6 |
8105 | else | |
8106 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8107 | #line 8108 "configure" |
596c9d4b KB |
8108 | #include "confdefs.h" |
8109 | ||
8110 | #define _SYSCALL32 | |
8111 | #include <sys/procfs.h> | |
8112 | int main() { | |
97bf5e38 | 8113 | gregset_t avar |
596c9d4b KB |
8114 | ; return 0; } |
8115 | EOF | |
66745969 | 8116 | if { (eval echo configure:8117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8117 | rm -rf conftest* |
97bf5e38 | 8118 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
8119 | else |
8120 | echo "configure: failed program was:" >&5 | |
8121 | cat conftest.$ac_ext >&5 | |
8122 | rm -rf conftest* | |
97bf5e38 | 8123 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
8124 | |
8125 | fi | |
8126 | rm -f conftest* | |
8127 | fi | |
8128 | ||
97bf5e38 | 8129 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 8130 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8131 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
8132 | EOF |
8133 | ||
8134 | fi | |
97bf5e38 | 8135 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 8136 | |
97bf5e38 | 8137 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8138 | echo "configure:8139: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8139 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 8140 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
8141 | else |
8142 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8143 | #line 8144 "configure" |
d84dd0c5 | 8144 | #include "confdefs.h" |
97bf5e38 MK |
8145 | |
8146 | #define _SYSCALL32 | |
d84dd0c5 | 8147 | #include <sys/procfs.h> |
97bf5e38 MK |
8148 | int main() { |
8149 | fpregset_t avar | |
8150 | ; return 0; } | |
d84dd0c5 | 8151 | EOF |
66745969 | 8152 | if { (eval echo configure:8153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8153 | rm -rf conftest* |
8154 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
8155 | else |
8156 | echo "configure: failed program was:" >&5 | |
8157 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8158 | rm -rf conftest* |
8159 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8160 | ||
d84dd0c5 | 8161 | fi |
97bf5e38 | 8162 | rm -f conftest* |
d84dd0c5 MK |
8163 | fi |
8164 | ||
97bf5e38 MK |
8165 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
8166 | cat >> confdefs.h <<\EOF | |
8167 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
8168 | EOF |
8169 | ||
97bf5e38 MK |
8170 | fi |
8171 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 8172 | |
97bf5e38 | 8173 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8174 | echo "configure:8175: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8175 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
8176 | echo $ac_n "(cached) $ac_c" 1>&6 |
8177 | else | |
8178 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8179 | #line 8180 "configure" |
c906108c | 8180 | #include "confdefs.h" |
c906108c | 8181 | |
97bf5e38 MK |
8182 | #define _SYSCALL32 |
8183 | #include <sys/procfs.h> | |
c906108c | 8184 | int main() { |
97bf5e38 | 8185 | prgregset_t avar |
c906108c SS |
8186 | ; return 0; } |
8187 | EOF | |
66745969 | 8188 | if { (eval echo configure:8189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8189 | rm -rf conftest* |
97bf5e38 | 8190 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
8191 | else |
8192 | echo "configure: failed program was:" >&5 | |
8193 | cat conftest.$ac_ext >&5 | |
8194 | rm -rf conftest* | |
97bf5e38 MK |
8195 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
8196 | ||
c906108c SS |
8197 | fi |
8198 | rm -f conftest* | |
8199 | fi | |
8200 | ||
97bf5e38 MK |
8201 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
8202 | cat >> confdefs.h <<\EOF | |
8203 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
8204 | EOF |
8205 | ||
97bf5e38 MK |
8206 | fi |
8207 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 8208 | |
97bf5e38 | 8209 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8210 | echo "configure:8211: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8211 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
8212 | echo $ac_n "(cached) $ac_c" 1>&6 |
8213 | else | |
8214 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8215 | #line 8216 "configure" |
d45fe813 | 8216 | #include "confdefs.h" |
97bf5e38 MK |
8217 | |
8218 | #define _SYSCALL32 | |
8219 | #include <sys/procfs.h> | |
d45fe813 | 8220 | int main() { |
97bf5e38 | 8221 | prfpregset_t avar |
d45fe813 KB |
8222 | ; return 0; } |
8223 | EOF | |
66745969 | 8224 | if { (eval echo configure:8225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8225 | rm -rf conftest* |
97bf5e38 | 8226 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
8227 | else |
8228 | echo "configure: failed program was:" >&5 | |
8229 | cat conftest.$ac_ext >&5 | |
8230 | rm -rf conftest* | |
97bf5e38 MK |
8231 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
8232 | ||
d45fe813 KB |
8233 | fi |
8234 | rm -f conftest* | |
8235 | fi | |
8236 | ||
97bf5e38 MK |
8237 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
8238 | cat >> confdefs.h <<\EOF | |
8239 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
8240 | EOF |
8241 | ||
97bf5e38 MK |
8242 | fi |
8243 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 8244 | |
97bf5e38 | 8245 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8246 | echo "configure:8247: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8247 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8248 | echo $ac_n "(cached) $ac_c" 1>&6 |
8249 | else | |
8250 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8251 | #line 8252 "configure" |
d45fe813 | 8252 | #include "confdefs.h" |
97bf5e38 MK |
8253 | |
8254 | #define _SYSCALL32 | |
8255 | #include <sys/procfs.h> | |
d45fe813 | 8256 | int main() { |
97bf5e38 | 8257 | prgregset32_t avar |
d45fe813 KB |
8258 | ; return 0; } |
8259 | EOF | |
66745969 | 8260 | if { (eval echo configure:8261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8261 | rm -rf conftest* |
97bf5e38 | 8262 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
8263 | else |
8264 | echo "configure: failed program was:" >&5 | |
8265 | cat conftest.$ac_ext >&5 | |
8266 | rm -rf conftest* | |
97bf5e38 MK |
8267 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
8268 | ||
d45fe813 KB |
8269 | fi |
8270 | rm -f conftest* | |
8271 | fi | |
8272 | ||
97bf5e38 MK |
8273 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
8274 | cat >> confdefs.h <<\EOF | |
8275 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
8276 | EOF |
8277 | ||
97bf5e38 MK |
8278 | fi |
8279 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 8280 | |
97bf5e38 | 8281 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8282 | echo "configure:8283: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8283 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8284 | echo $ac_n "(cached) $ac_c" 1>&6 |
8285 | else | |
8286 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8287 | #line 8288 "configure" |
d45fe813 | 8288 | #include "confdefs.h" |
97bf5e38 MK |
8289 | |
8290 | #define _SYSCALL32 | |
8291 | #include <sys/procfs.h> | |
d45fe813 | 8292 | int main() { |
97bf5e38 | 8293 | prfpregset32_t avar |
d45fe813 KB |
8294 | ; return 0; } |
8295 | EOF | |
66745969 | 8296 | if { (eval echo configure:8297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8297 | rm -rf conftest* |
97bf5e38 | 8298 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
8299 | else |
8300 | echo "configure: failed program was:" >&5 | |
8301 | cat conftest.$ac_ext >&5 | |
8302 | rm -rf conftest* | |
97bf5e38 MK |
8303 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
8304 | ||
d45fe813 KB |
8305 | fi |
8306 | rm -f conftest* | |
8307 | fi | |
8308 | ||
97bf5e38 MK |
8309 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
8310 | cat >> confdefs.h <<\EOF | |
8311 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
8312 | EOF |
8313 | ||
97bf5e38 MK |
8314 | fi |
8315 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 8316 | |
97bf5e38 | 8317 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8318 | echo "configure:8319: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 8319 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
8320 | echo $ac_n "(cached) $ac_c" 1>&6 |
8321 | else | |
8322 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8323 | #line 8324 "configure" |
d45fe813 | 8324 | #include "confdefs.h" |
97bf5e38 | 8325 | |
d45fe813 | 8326 | #define _SYSCALL32 |
97bf5e38 | 8327 | #include <sys/procfs.h> |
d45fe813 | 8328 | int main() { |
97bf5e38 | 8329 | lwpid_t avar |
d45fe813 KB |
8330 | ; return 0; } |
8331 | EOF | |
66745969 | 8332 | if { (eval echo configure:8333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8333 | rm -rf conftest* |
97bf5e38 | 8334 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
8335 | else |
8336 | echo "configure: failed program was:" >&5 | |
8337 | cat conftest.$ac_ext >&5 | |
8338 | rm -rf conftest* | |
97bf5e38 MK |
8339 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
8340 | ||
d45fe813 KB |
8341 | fi |
8342 | rm -f conftest* | |
8343 | fi | |
8344 | ||
97bf5e38 MK |
8345 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
8346 | cat >> confdefs.h <<\EOF | |
8347 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
8348 | EOF |
8349 | ||
97bf5e38 MK |
8350 | fi |
8351 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 8352 | |
97bf5e38 | 8353 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8354 | echo "configure:8355: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 8355 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
8356 | echo $ac_n "(cached) $ac_c" 1>&6 |
8357 | else | |
8358 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8359 | #line 8360 "configure" |
c906108c SS |
8360 | #include "confdefs.h" |
8361 | ||
97bf5e38 MK |
8362 | #define _SYSCALL32 |
8363 | #include <sys/procfs.h> | |
c906108c | 8364 | int main() { |
97bf5e38 | 8365 | psaddr_t avar |
c906108c SS |
8366 | ; return 0; } |
8367 | EOF | |
66745969 | 8368 | if { (eval echo configure:8369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8369 | rm -rf conftest* |
97bf5e38 | 8370 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
8371 | else |
8372 | echo "configure: failed program was:" >&5 | |
8373 | cat conftest.$ac_ext >&5 | |
8374 | rm -rf conftest* | |
97bf5e38 MK |
8375 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
8376 | ||
c906108c SS |
8377 | fi |
8378 | rm -f conftest* | |
8379 | fi | |
8380 | ||
97bf5e38 MK |
8381 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
8382 | cat >> confdefs.h <<\EOF | |
8383 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
8384 | EOF |
8385 | ||
97bf5e38 MK |
8386 | fi |
8387 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 8388 | |
97bf5e38 | 8389 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8390 | echo "configure:8391: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 8391 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 8392 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8393 | else |
8394 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8395 | #line 8396 "configure" |
c906108c SS |
8396 | #include "confdefs.h" |
8397 | ||
97bf5e38 MK |
8398 | #define _SYSCALL32 |
8399 | #include <sys/procfs.h> | |
8400 | int main() { | |
8401 | prsysent_t avar | |
8402 | ; return 0; } | |
c906108c | 8403 | EOF |
66745969 | 8404 | if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8405 | rm -rf conftest* |
8406 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
8407 | else |
8408 | echo "configure: failed program was:" >&5 | |
8409 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8410 | rm -rf conftest* |
8411 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
8412 | ||
c906108c | 8413 | fi |
97bf5e38 | 8414 | rm -f conftest* |
c906108c SS |
8415 | fi |
8416 | ||
97bf5e38 MK |
8417 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
8418 | cat >> confdefs.h <<\EOF | |
8419 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
8420 | EOF |
8421 | ||
97bf5e38 MK |
8422 | fi |
8423 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 8424 | |
97bf5e38 | 8425 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8426 | echo "configure:8427: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 8427 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
8428 | echo $ac_n "(cached) $ac_c" 1>&6 |
8429 | else | |
8430 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8431 | #line 8432 "configure" |
c906108c SS |
8432 | #include "confdefs.h" |
8433 | ||
97bf5e38 MK |
8434 | #define _SYSCALL32 |
8435 | #include <sys/procfs.h> | |
c906108c | 8436 | int main() { |
97bf5e38 | 8437 | pr_sigset_t avar |
c906108c SS |
8438 | ; return 0; } |
8439 | EOF | |
66745969 | 8440 | if { (eval echo configure:8441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8441 | rm -rf conftest* |
97bf5e38 | 8442 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
8443 | else |
8444 | echo "configure: failed program was:" >&5 | |
8445 | cat conftest.$ac_ext >&5 | |
8446 | rm -rf conftest* | |
97bf5e38 MK |
8447 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
8448 | ||
c906108c SS |
8449 | fi |
8450 | rm -f conftest* | |
8451 | fi | |
8452 | ||
97bf5e38 MK |
8453 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
8454 | cat >> confdefs.h <<\EOF | |
8455 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
8456 | EOF |
8457 | ||
97bf5e38 MK |
8458 | fi |
8459 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 8460 | |
97bf5e38 | 8461 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
66745969 | 8462 | echo "configure:8463: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 8463 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8464 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8465 | else |
8466 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8467 | #line 8468 "configure" |
c906108c SS |
8468 | #include "confdefs.h" |
8469 | ||
97bf5e38 MK |
8470 | #define _SYSCALL32 |
8471 | #include <sys/procfs.h> | |
8472 | int main() { | |
8473 | pr_sigaction64_t avar | |
8474 | ; return 0; } | |
c906108c | 8475 | EOF |
66745969 | 8476 | if { (eval echo configure:8477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8477 | rm -rf conftest* |
8478 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8479 | else |
8480 | echo "configure: failed program was:" >&5 | |
8481 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8482 | rm -rf conftest* |
8483 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8484 | ||
c906108c | 8485 | fi |
97bf5e38 | 8486 | rm -f conftest* |
c906108c SS |
8487 | fi |
8488 | ||
97bf5e38 MK |
8489 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8490 | cat >> confdefs.h <<\EOF | |
8491 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8492 | EOF |
8493 | ||
97bf5e38 MK |
8494 | fi |
8495 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8496 | ||
8497 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
66745969 | 8498 | echo "configure:8499: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8499 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8500 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8501 | else | |
8502 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8503 | #line 8504 "configure" |
97bf5e38 MK |
8504 | #include "confdefs.h" |
8505 | ||
8506 | #define _SYSCALL32 | |
8507 | #include <sys/procfs.h> | |
8508 | int main() { | |
8509 | pr_siginfo64_t avar | |
8510 | ; return 0; } | |
8511 | EOF | |
66745969 | 8512 | if { (eval echo configure:8513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8513 | rm -rf conftest* |
8514 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8515 | else | |
8516 | echo "configure: failed program was:" >&5 | |
8517 | cat conftest.$ac_ext >&5 | |
8518 | rm -rf conftest* | |
8519 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8520 | ||
8521 | fi | |
8522 | rm -f conftest* | |
c906108c | 8523 | fi |
c906108c | 8524 | |
97bf5e38 MK |
8525 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8526 | cat >> confdefs.h <<\EOF | |
8527 | #define HAVE_PR_SIGINFO64_T 1 | |
8528 | EOF | |
c906108c | 8529 | |
97bf5e38 MK |
8530 | fi |
8531 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8532 | ||
8533 | ||
8534 | ||
8535 | ||
8536 | ||
8537 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8538 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
66745969 | 8539 | echo "configure:8540: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8540 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8541 | echo $ac_n "(cached) $ac_c" 1>&6 |
8542 | else | |
8543 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8544 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8545 | else |
8546 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8547 | #line 8548 "configure" |
c906108c | 8548 | #include "confdefs.h" |
97bf5e38 MK |
8549 | #include <sys/procfs.h> |
8550 | int main () | |
8551 | { | |
8552 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8553 | return 1; | |
8554 | return 0; | |
8555 | } | |
c906108c | 8556 | EOF |
66745969 | 8557 | if { (eval echo configure:8558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8558 | then |
97bf5e38 | 8559 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8560 | else |
8561 | echo "configure: failed program was:" >&5 | |
8562 | cat conftest.$ac_ext >&5 | |
8563 | rm -fr conftest* | |
97bf5e38 | 8564 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8565 | fi |
8566 | rm -fr conftest* | |
8567 | fi | |
8568 | ||
8569 | fi | |
8570 | ||
97bf5e38 MK |
8571 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8572 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8573 | cat >> confdefs.h <<\EOF | |
8574 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8575 | EOF |
8576 | ||
97bf5e38 MK |
8577 | fi |
8578 | fi | |
c906108c | 8579 | |
97bf5e38 MK |
8580 | |
8581 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
66745969 | 8582 | echo "configure:8583: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8583 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8584 | echo $ac_n "(cached) $ac_c" 1>&6 |
8585 | else | |
8586 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8587 | #line 8588 "configure" |
c906108c | 8588 | #include "confdefs.h" |
97bf5e38 MK |
8589 | #include <unistd.h> |
8590 | #include <sys/types.h> | |
8591 | #include <sys/procfs.h> | |
8592 | ||
8593 | int main() { | |
8594 | ||
8595 | int dummy;; | |
8596 | dummy = ioctl(0, PIOCSET, &dummy); | |
8597 | ||
8598 | ; return 0; } | |
c906108c | 8599 | EOF |
66745969 | 8600 | if { (eval echo configure:8601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8601 | rm -rf conftest* |
97bf5e38 | 8602 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8603 | else |
c906108c SS |
8604 | echo "configure: failed program was:" >&5 |
8605 | cat conftest.$ac_ext >&5 | |
8606 | rm -rf conftest* | |
97bf5e38 | 8607 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8608 | fi |
8609 | rm -f conftest* | |
8610 | fi | |
97bf5e38 MK |
8611 | |
8612 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8613 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8614 | cat >> confdefs.h <<\EOF | |
8615 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8616 | EOF |
97bf5e38 MK |
8617 | |
8618 | fi | |
c906108c | 8619 | fi |
c906108c | 8620 | |
97bf5e38 MK |
8621 | if test ${host} = ${target} ; then |
8622 | ||
8623 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
66745969 | 8624 | echo "configure:8625: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8625 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8626 | echo $ac_n "(cached) $ac_c" 1>&6 |
8627 | else | |
8628 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8629 | #line 8630 "configure" |
c906108c | 8630 | #include "confdefs.h" |
97bf5e38 | 8631 | #include <link.h> |
c906108c | 8632 | int main() { |
97bf5e38 | 8633 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8634 | ; return 0; } |
8635 | EOF | |
66745969 | 8636 | if { (eval echo configure:8637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8637 | rm -rf conftest* |
97bf5e38 | 8638 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8639 | else |
8640 | echo "configure: failed program was:" >&5 | |
8641 | cat conftest.$ac_ext >&5 | |
8642 | rm -rf conftest* | |
97bf5e38 | 8643 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8644 | fi |
8645 | rm -f conftest* | |
8646 | fi | |
8647 | ||
97bf5e38 MK |
8648 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8649 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8650 | cat >> confdefs.h <<\EOF | |
8651 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8652 | EOF |
97bf5e38 MK |
8653 | |
8654 | fi | |
8655 | ||
8656 | ||
8657 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
66745969 | 8658 | echo "configure:8659: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8659 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8660 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8661 | else |
97bf5e38 | 8662 | cat > conftest.$ac_ext <<EOF |
66745969 | 8663 | #line 8664 "configure" |
97bf5e38 MK |
8664 | #include "confdefs.h" |
8665 | #include <sys/types.h> | |
8666 | #include <link.h> | |
8667 | int main() { | |
8668 | struct link_map lm; (void) lm.lm_addr; | |
8669 | ; return 0; } | |
8670 | EOF | |
66745969 | 8671 | if { (eval echo configure:8672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8672 | rm -rf conftest* |
8673 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8674 | else | |
8675 | echo "configure: failed program was:" >&5 | |
8676 | cat conftest.$ac_ext >&5 | |
8677 | rm -rf conftest* | |
8678 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8679 | fi | |
8680 | rm -f conftest* | |
c906108c | 8681 | fi |
c906108c | 8682 | |
97bf5e38 MK |
8683 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8684 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8685 | cat >> confdefs.h <<\EOF | |
8686 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8687 | EOF | |
8688 | ||
8689 | fi | |
8690 | ||
8691 | ||
8692 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
66745969 | 8693 | echo "configure:8694: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8694 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8695 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8696 | else |
8697 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8698 | #line 8699 "configure" |
c906108c | 8699 | #include "confdefs.h" |
97bf5e38 MK |
8700 | #include <sys/types.h> |
8701 | #ifdef HAVE_NLIST_H | |
8702 | #include <nlist.h> | |
8703 | #endif | |
8704 | #include <link.h> | |
8705 | int main() { | |
8706 | struct so_map lm; (void) lm.som_addr; | |
8707 | ; return 0; } | |
8708 | EOF | |
66745969 | 8709 | if { (eval echo configure:8710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8710 | rm -rf conftest* |
8711 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8712 | else | |
8713 | echo "configure: failed program was:" >&5 | |
8714 | cat conftest.$ac_ext >&5 | |
8715 | rm -rf conftest* | |
8716 | gdb_cv_have_struct_so_map_with_som_members=no | |
8717 | fi | |
8718 | rm -f conftest* | |
8719 | fi | |
c906108c | 8720 | |
97bf5e38 MK |
8721 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8722 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8723 | cat >> confdefs.h <<\EOF | |
8724 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8725 | EOF | |
c906108c | 8726 | |
97bf5e38 | 8727 | fi |
c906108c | 8728 | |
97bf5e38 MK |
8729 | |
8730 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
66745969 | 8731 | echo "configure:8732: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8732 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8734 | else | |
8735 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8736 | #line 8737 "configure" |
97bf5e38 MK |
8737 | #include "confdefs.h" |
8738 | #define _SYSCALL32 | |
8739 | #include <sys/link.h> | |
8740 | int main() { | |
8741 | struct link_map32 l; | |
8742 | ; return 0; } | |
8743 | EOF | |
66745969 | 8744 | if { (eval echo configure:8745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8745 | rm -rf conftest* |
8746 | gdb_cv_have_struct_link_map32=yes | |
8747 | else | |
8748 | echo "configure: failed program was:" >&5 | |
8749 | cat conftest.$ac_ext >&5 | |
8750 | rm -rf conftest* | |
8751 | gdb_cv_have_struct_link_map32=no | |
8752 | fi | |
8753 | rm -f conftest* | |
8754 | fi | |
c906108c | 8755 | |
97bf5e38 MK |
8756 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8757 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8758 | cat >> confdefs.h <<\EOF | |
8759 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8760 | EOF | |
c906108c | 8761 | |
97bf5e38 MK |
8762 | cat >> confdefs.h <<\EOF |
8763 | #define _SYSCALL32 1 | |
8764 | EOF | |
c906108c | 8765 | |
97bf5e38 MK |
8766 | fi |
8767 | fi | |
c906108c | 8768 | |
c906108c | 8769 | |
97bf5e38 | 8770 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
66745969 | 8771 | echo "configure:8772: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8772 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8774 | else | |
8775 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8776 | #line 8777 "configure" |
97bf5e38 | 8777 | #include "confdefs.h" |
c906108c | 8778 | |
97bf5e38 | 8779 | int main() { |
c906108c | 8780 | |
97bf5e38 MK |
8781 | extern long long foo; |
8782 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8783 | |
97bf5e38 MK |
8784 | ; return 0; } |
8785 | EOF | |
66745969 | 8786 | if { (eval echo configure:8787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8787 | rm -rf conftest* |
8788 | gdb_cv_c_long_long=yes | |
8789 | else | |
8790 | echo "configure: failed program was:" >&5 | |
8791 | cat conftest.$ac_ext >&5 | |
8792 | rm -rf conftest* | |
8793 | gdb_cv_c_long_long=no | |
8794 | fi | |
8795 | rm -f conftest* | |
8796 | fi | |
c906108c | 8797 | |
97bf5e38 MK |
8798 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8799 | if test $gdb_cv_c_long_long = yes; then | |
8800 | cat >> confdefs.h <<\EOF | |
8801 | #define CC_HAS_LONG_LONG 1 | |
8802 | EOF | |
8803 | ||
8804 | fi | |
8805 | ||
8806 | ||
8807 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
66745969 | 8808 | echo "configure:8809: checking for long long support in printf" >&5 |
97bf5e38 MK |
8809 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8810 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8811 | else | |
8812 | if test "$cross_compiling" = yes; then | |
8813 | gdb_cv_printf_has_long_long=no | |
8814 | else | |
8815 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8816 | #line 8817 "configure" |
97bf5e38 MK |
8817 | #include "confdefs.h" |
8818 | ||
8819 | int main () { | |
8820 | char buf[32]; | |
8821 | long long l = 0; | |
8822 | l = (l << 16) + 0x0123; | |
8823 | l = (l << 16) + 0x4567; | |
8824 | l = (l << 16) + 0x89ab; | |
8825 | l = (l << 16) + 0xcdef; | |
8826 | sprintf (buf, "0x%016llx", l); | |
8827 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8828 | } |
97bf5e38 | 8829 | EOF |
66745969 | 8830 | if { (eval echo configure:8831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8831 | then |
8832 | gdb_cv_printf_has_long_long=yes | |
8833 | else | |
8834 | echo "configure: failed program was:" >&5 | |
8835 | cat conftest.$ac_ext >&5 | |
8836 | rm -fr conftest* | |
8837 | gdb_cv_printf_has_long_long=no | |
8838 | fi | |
8839 | rm -fr conftest* | |
8840 | fi | |
8841 | ||
8842 | fi | |
8843 | ||
8844 | if test $gdb_cv_printf_has_long_long = yes; then | |
8845 | cat >> confdefs.h <<\EOF | |
8846 | #define PRINTF_HAS_LONG_LONG 1 | |
8847 | EOF | |
8848 | ||
8849 | fi | |
8850 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8851 | ||
8852 | ||
8853 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
66745969 | 8854 | echo "configure:8855: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8855 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8857 | else | |
8858 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8859 | #line 8860 "configure" |
97bf5e38 MK |
8860 | #include "confdefs.h" |
8861 | ||
8862 | int main() { | |
8863 | long double foo; | |
8864 | ; return 0; } | |
8865 | EOF | |
66745969 | 8866 | if { (eval echo configure:8867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8867 | rm -rf conftest* |
8868 | ac_cv_c_long_double=yes | |
8869 | else | |
8870 | echo "configure: failed program was:" >&5 | |
8871 | cat conftest.$ac_ext >&5 | |
8872 | rm -rf conftest* | |
8873 | ac_cv_c_long_double=no | |
8874 | fi | |
8875 | rm -f conftest* | |
8876 | fi | |
c906108c | 8877 | |
97bf5e38 MK |
8878 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8879 | if test $ac_cv_c_long_double = yes; then | |
8880 | cat >> confdefs.h <<\EOF | |
8881 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8882 | EOF |
97bf5e38 MK |
8883 | |
8884 | fi | |
8885 | ||
8886 | ||
8887 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
66745969 | 8888 | echo "configure:8889: checking for long double support in printf" >&5 |
97bf5e38 MK |
8889 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8890 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8891 | else | |
8892 | if test "$cross_compiling" = yes; then | |
8893 | gdb_cv_printf_has_long_double=no | |
8894 | else | |
8895 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8896 | #line 8897 "configure" |
97bf5e38 MK |
8897 | #include "confdefs.h" |
8898 | ||
8899 | int main () { | |
8900 | char buf[16]; | |
8901 | long double f = 3.141592653; | |
8902 | sprintf (buf, "%Lg", f); | |
8903 | return (strncmp ("3.14159", buf, 7)); | |
8904 | } | |
8905 | EOF | |
66745969 | 8906 | if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8907 | then |
97bf5e38 | 8908 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8909 | else |
8910 | echo "configure: failed program was:" >&5 | |
8911 | cat conftest.$ac_ext >&5 | |
8912 | rm -fr conftest* | |
97bf5e38 | 8913 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8914 | fi |
8915 | rm -fr conftest* | |
8916 | fi | |
8917 | ||
8918 | fi | |
8919 | ||
97bf5e38 | 8920 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8921 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8922 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8923 | EOF | |
8924 | ||
8925 | fi | |
8926 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8927 | ||
8928 | ||
8929 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
66745969 | 8930 | echo "configure:8931: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8931 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8932 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8933 | else | |
8934 | if test "$cross_compiling" = yes; then | |
8935 | gdb_cv_scanf_has_long_double=no | |
8936 | else | |
8937 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8938 | #line 8939 "configure" |
97bf5e38 MK |
8939 | #include "confdefs.h" |
8940 | ||
8941 | int main () { | |
8942 | char *buf = "3.141592653"; | |
8943 | long double f = 0; | |
8944 | sscanf (buf, "%Lg", &f); | |
8945 | return !(f > 3.14159 && f < 3.14160); | |
8946 | } | |
c906108c | 8947 | EOF |
66745969 | 8948 | if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8949 | then |
8950 | gdb_cv_scanf_has_long_double=yes | |
8951 | else | |
8952 | echo "configure: failed program was:" >&5 | |
8953 | cat conftest.$ac_ext >&5 | |
8954 | rm -fr conftest* | |
8955 | gdb_cv_scanf_has_long_double=no | |
8956 | fi | |
8957 | rm -fr conftest* | |
8958 | fi | |
c906108c SS |
8959 | |
8960 | fi | |
8961 | ||
97bf5e38 MK |
8962 | if test $gdb_cv_scanf_has_long_double = yes; then |
8963 | cat >> confdefs.h <<\EOF | |
8964 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8965 | EOF | |
8966 | ||
8967 | fi | |
8968 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8969 | |
438013df AO |
8970 | case ${host_os} in |
8971 | aix*) | |
8972 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
66745969 | 8973 | echo "configure:8974: checking for -bbigtoc option" >&5 |
438013df AO |
8974 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8975 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8976 | else | |
8977 | ||
8978 | SAVE_LDFLAGS=$LDFLAGS | |
8979 | ||
8980 | case $GCC in | |
8981 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8982 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8983 | esac | |
8984 | ||
8985 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8986 | cat > conftest.$ac_ext <<EOF | |
66745969 | 8987 | #line 8988 "configure" |
438013df AO |
8988 | #include "confdefs.h" |
8989 | ||
8990 | int main() { | |
8991 | int i; | |
8992 | ; return 0; } | |
8993 | EOF | |
66745969 | 8994 | if { (eval echo configure:8995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8995 | : |
8996 | else | |
8997 | echo "configure: failed program was:" >&5 | |
8998 | cat conftest.$ac_ext >&5 | |
8999 | rm -rf conftest* | |
9000 | gdb_cv_bigtoc= | |
9001 | fi | |
9002 | rm -f conftest* | |
9003 | ||
9004 | fi | |
9005 | ||
9006 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
9007 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
9008 | ;; | |
9009 | esac | |
9010 | ||
c906108c SS |
9011 | |
9012 | ||
9013 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
9014 | case ${host_os} in | |
9015 | hpux*) | |
9016 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
66745969 | 9017 | echo "configure:9018: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
9018 | if test -f /usr/include/dce/cma_config.h ; then |
9019 | if test "$GCC" = "yes" ; then | |
9020 | echo "$ac_t""yes" 1>&6 | |
9021 | cat >> confdefs.h <<\EOF | |
9022 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
9023 | EOF | |
9024 | ||
3483b318 | 9025 | CONFIG_OBS="${CONFIG_OBS} hpux-thread.o" |
c906108c SS |
9026 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
9027 | else | |
9028 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
9029 | fi | |
9030 | else | |
9031 | echo "$ac_t""no" 1>&6 | |
9032 | fi | |
9033 | ;; | |
9034 | solaris*) | |
d92419e5 JB |
9035 | # See if thread_db library is around for Solaris thread debugging. |
9036 | # Note that we must explicitly test for version 1 of the library | |
9037 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
9038 | # the same API. | |
c906108c | 9039 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
66745969 | 9040 | echo "configure:9041: checking for Solaris thread debugging library" >&5 |
c906108c SS |
9041 | if test -f /usr/lib/libthread_db.so.1 ; then |
9042 | echo "$ac_t""yes" 1>&6 | |
9043 | cat >> confdefs.h <<\EOF | |
9044 | #define HAVE_THREAD_DB_LIB 1 | |
9045 | EOF | |
9046 | ||
3483b318 | 9047 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c SS |
9048 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
9049 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
66745969 | 9050 | echo "configure:9051: checking for dlopen in -ldl" >&5 |
c906108c SS |
9051 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
9052 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
9053 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9054 | else | |
9055 | ac_save_LIBS="$LIBS" | |
9056 | LIBS="-ldl $LIBS" | |
9057 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9058 | #line 9059 "configure" |
c906108c SS |
9059 | #include "confdefs.h" |
9060 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9061 | /* We use char because int might match the return type of a gcc2 | |
9062 | builtin and then its argument prototype would still apply. */ | |
9063 | char dlopen(); | |
9064 | ||
9065 | int main() { | |
9066 | dlopen() | |
9067 | ; return 0; } | |
9068 | EOF | |
66745969 | 9069 | if { (eval echo configure:9070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9070 | rm -rf conftest* |
9071 | eval "ac_cv_lib_$ac_lib_var=yes" | |
9072 | else | |
9073 | echo "configure: failed program was:" >&5 | |
9074 | cat conftest.$ac_ext >&5 | |
9075 | rm -rf conftest* | |
9076 | eval "ac_cv_lib_$ac_lib_var=no" | |
9077 | fi | |
9078 | rm -f conftest* | |
9079 | LIBS="$ac_save_LIBS" | |
9080 | ||
9081 | fi | |
9082 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
9083 | echo "$ac_t""yes" 1>&6 | |
9084 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
9085 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
9086 | cat >> confdefs.h <<EOF | |
9087 | #define $ac_tr_lib 1 | |
9088 | EOF | |
9089 | ||
9090 | LIBS="-ldl $LIBS" | |
9091 | ||
9092 | else | |
9093 | echo "$ac_t""no" 1>&6 | |
9094 | fi | |
9095 | ||
9096 | if test "$GCC" = "yes" ; then | |
9097 | # The GNU linker requires the -export-dynamic option to make | |
9098 | # all symbols visible in the dynamic symbol table. | |
9099 | hold_ldflags=$LDFLAGS | |
9100 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
66745969 | 9101 | echo "configure:9102: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
9102 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
9103 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9104 | #line 9105 "configure" |
c906108c SS |
9105 | #include "confdefs.h" |
9106 | ||
9107 | int main() { | |
9108 | int i; | |
9109 | ; return 0; } | |
9110 | EOF | |
66745969 | 9111 | if { (eval echo configure:9112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9112 | rm -rf conftest* |
9113 | found=yes | |
9114 | else | |
9115 | echo "configure: failed program was:" >&5 | |
9116 | cat conftest.$ac_ext >&5 | |
9117 | rm -rf conftest* | |
9118 | found=no | |
9119 | fi | |
9120 | rm -f conftest* | |
9121 | LDFLAGS=$hold_ldflags | |
9122 | echo "$ac_t""$found" 1>&6 | |
9123 | if test $found = yes; then | |
9124 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
9125 | fi | |
9126 | fi | |
9127 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
9128 | # at one point. | |
9129 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
66745969 | 9130 | echo "configure:9131: checking if <proc_service.h> is old" >&5 |
c906108c SS |
9131 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
9132 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9133 | else | |
9134 | ||
9135 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9136 | #line 9137 "configure" |
c906108c SS |
9137 | #include "confdefs.h" |
9138 | ||
9139 | #include <proc_service.h> | |
9140 | ps_err_e ps_pdwrite | |
9141 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
9142 | ||
9143 | int main() { | |
9144 | ||
9145 | ; return 0; } | |
9146 | EOF | |
66745969 | 9147 | if { (eval echo configure:9148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9148 | rm -rf conftest* |
9149 | gdb_cv_proc_service_is_old=no | |
9150 | else | |
9151 | echo "configure: failed program was:" >&5 | |
9152 | cat conftest.$ac_ext >&5 | |
9153 | rm -rf conftest* | |
9154 | gdb_cv_proc_service_is_old=yes | |
9155 | fi | |
9156 | rm -f conftest* | |
9157 | ||
9158 | fi | |
9159 | ||
9160 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
9161 | if test $gdb_cv_proc_service_is_old = yes; then | |
9162 | cat >> confdefs.h <<\EOF | |
9163 | #define PROC_SERVICE_IS_OLD 1 | |
9164 | EOF | |
9165 | ||
9166 | fi | |
9167 | else | |
9168 | echo "$ac_t""no" 1>&6 | |
9169 | fi | |
9170 | ;; | |
d92419e5 JB |
9171 | aix*) |
9172 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
66745969 | 9173 | echo "configure:9174: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
9174 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
9175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9176 | else | |
9177 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9178 | #line 9179 "configure" |
d92419e5 JB |
9179 | #include "confdefs.h" |
9180 | #include <sys/pthdebug.h> | |
9181 | int main() { | |
9182 | #ifndef PTHDB_VERSION_3 | |
9183 | #error | |
9184 | #endif | |
9185 | ; return 0; } | |
9186 | EOF | |
66745969 | 9187 | if { (eval echo configure:9188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
9188 | rm -rf conftest* |
9189 | gdb_cv_have_aix_thread_debug=yes | |
9190 | else | |
9191 | echo "configure: failed program was:" >&5 | |
9192 | cat conftest.$ac_ext >&5 | |
9193 | rm -rf conftest* | |
9194 | gdb_cv_have_aix_thread_debug=no | |
9195 | fi | |
9196 | rm -f conftest* | |
9197 | fi | |
9198 | ||
9199 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
9200 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
9201 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 9202 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
9203 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
9204 | fi | |
9205 | ;; | |
c906108c SS |
9206 | esac |
9207 | ||
9208 | fi | |
9209 | ||
3f47be5c EZ |
9210 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
9211 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
66745969 | 9212 | echo "configure:9213: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
9213 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
9214 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9215 | else | |
9216 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9217 | #line 9218 "configure" |
3f47be5c EZ |
9218 | #include "confdefs.h" |
9219 | #include <thread_db.h> | |
9220 | int main() { | |
9221 | int i = TD_NOTALLOC; | |
9222 | ; return 0; } | |
9223 | EOF | |
66745969 | 9224 | if { (eval echo configure:9225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
9225 | rm -rf conftest* |
9226 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
9227 | else | |
9228 | echo "configure: failed program was:" >&5 | |
9229 | cat conftest.$ac_ext >&5 | |
9230 | rm -rf conftest* | |
9231 | gdb_cv_thread_db_h_has_td_notalloc=no | |
9232 | ||
9233 | fi | |
9234 | rm -f conftest* | |
9235 | ||
9236 | fi | |
9237 | ||
9238 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
9239 | fi | |
9240 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
9241 | cat >> confdefs.h <<\EOF | |
9242 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
9243 | EOF | |
9244 | ||
9245 | fi | |
9246 | ||
b757528f JJ |
9247 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
9248 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
66745969 | 9249 | echo "configure:9250: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
9250 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
9251 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9252 | else | |
9253 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9254 | #line 9255 "configure" |
b757528f JJ |
9255 | #include "confdefs.h" |
9256 | #include <sys/syscall.h> | |
9257 | int main() { | |
9258 | int i = __NR_tkill; | |
9259 | ; return 0; } | |
9260 | EOF | |
66745969 | 9261 | if { (eval echo configure:9262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
9262 | rm -rf conftest* |
9263 | gdb_cv_sys_syscall_h_has_tkill=yes | |
9264 | else | |
9265 | echo "configure: failed program was:" >&5 | |
9266 | cat conftest.$ac_ext >&5 | |
9267 | rm -rf conftest* | |
9268 | gdb_cv_sys_syscall_h_has_tkill=no | |
9269 | ||
9270 | fi | |
9271 | rm -f conftest* | |
9272 | ||
9273 | fi | |
9274 | ||
9275 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
9276 | fi | |
9277 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
9278 | cat >> confdefs.h <<\EOF | |
9279 | #define HAVE_TKILL_SYSCALL 1 | |
9280 | EOF | |
9281 | ||
9282 | fi | |
9283 | ||
fb40c209 | 9284 | |
030292b7 DJ |
9285 | # Check whether --with-sysroot or --without-sysroot was given. |
9286 | if test "${with_sysroot+set}" = set; then | |
9287 | withval="$with_sysroot" | |
9288 | ||
9289 | case ${with_sysroot} in | |
715d1656 | 9290 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
9291 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
9292 | esac | |
9293 | ||
9294 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
9295 | ||
9296 | if test "x$exec_prefix" = xNONE; then | |
9297 | if test "x$prefix" = xNONE; then | |
9298 | test_prefix=/usr/local | |
9299 | else | |
9300 | test_prefix=$prefix | |
9301 | fi | |
9302 | else | |
9303 | test_prefix=$exec_prefix | |
9304 | fi | |
9305 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
9306 | "${test_prefix}"|"${test_prefix}/"*|\ |
9307 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
9308 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
9309 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
9310 | ;; | |
9311 | esac | |
9312 | ||
9313 | else | |
9314 | ||
9315 | TARGET_SYSTEM_ROOT= | |
9316 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
9317 | ||
9318 | fi | |
9319 | ||
9320 | ||
9321 | ||
9322 | ||
3b851bce AC |
9323 | # NOTE: Don't add -Wall or -Wunused, they both include |
9324 | # -Wunused-parameter which reports bogus warnings. | |
9325 | # NOTE: If you add to this list, remember to update | |
9326 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 9327 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
0f0cffd2 | 9328 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \ |
4566dfcf | 9329 | -Wunused-label -Wunused-function" |
d8038014 | 9330 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
0f0cffd2 | 9331 | # -Wunused-function -Wunused-variable -Wunused-value |
93d56215 | 9332 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
9333 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
9334 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
9335 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
9336 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
9337 | if test "${enable_build_warnings+set}" = set; then | |
9338 | enableval="$enable_build_warnings" | |
1decb323 | 9339 | case "${enableval}" in |
c906108c SS |
9340 | yes) ;; |
9341 | no) build_warnings="-w";; | |
9342 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9343 | build_warnings="${build_warnings} ${t}";; | |
9344 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9345 | build_warnings="${t} ${build_warnings}";; | |
9346 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9347 | esac | |
d4f3574e | 9348 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 9349 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 9350 | fi |
1decb323 | 9351 | fi |
3b851bce AC |
9352 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
9353 | if test "${enable_gdb_build_warnings+set}" = set; then | |
9354 | enableval="$enable_gdb_build_warnings" | |
9355 | case "${enableval}" in | |
9356 | yes) ;; | |
9357 | no) build_warnings="-w";; | |
9358 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9359 | build_warnings="${build_warnings} ${t}";; | |
9360 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9361 | build_warnings="${t} ${build_warnings}";; | |
9362 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9363 | esac | |
9364 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9365 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9366 | fi | |
9367 | fi | |
104c1213 JM |
9368 | WARN_CFLAGS="" |
9369 | WERROR_CFLAGS="" | |
c906108c SS |
9370 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
9371 | then | |
746a987d | 9372 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
66745969 | 9373 | echo "configure:9374: checking compiler warning flags" >&5 |
746a987d AC |
9374 | # Separate out the -Werror flag as some files just cannot be |
9375 | # compiled with it enabled. | |
9376 | for w in ${build_warnings}; do | |
9377 | case $w in | |
9378 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
9379 | *) # Check that GCC accepts it | |
4536bbc6 AC |
9380 | saved_CFLAGS="$CFLAGS" |
9381 | CFLAGS="$CFLAGS $w" | |
9382 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9383 | #line 9384 "configure" |
4536bbc6 AC |
9384 | #include "confdefs.h" |
9385 | ||
9386 | int main() { | |
9387 | ||
9388 | ; return 0; } | |
9389 | EOF | |
66745969 | 9390 | if { (eval echo configure:9391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
9391 | rm -rf conftest* |
9392 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9393 | else | |
9394 | echo "configure: failed program was:" >&5 | |
9395 | cat conftest.$ac_ext >&5 | |
9396 | fi | |
9397 | rm -f conftest* | |
9398 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
9399 | esac |
9400 | done | |
9401 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
9402 | fi |
9403 | ||
9404 | ||
104c1213 | 9405 | |
7a292a7a SS |
9406 | # In the Cygwin environment, we need some additional flags. |
9407 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
66745969 | 9408 | echo "configure:9409: checking for cygwin" >&5 |
7a292a7a SS |
9409 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9410 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9411 | else | |
9412 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9413 | #line 9414 "configure" |
7a292a7a SS |
9414 | #include "confdefs.h" |
9415 | ||
9416 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
9417 | lose | |
9418 | #endif | |
9419 | EOF | |
9420 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9421 | egrep "lose" >/dev/null 2>&1; then | |
9422 | rm -rf conftest* | |
9423 | gdb_cv_os_cygwin=yes | |
9424 | else | |
9425 | rm -rf conftest* | |
9426 | gdb_cv_os_cygwin=no | |
9427 | fi | |
9428 | rm -f conftest* | |
9429 | ||
9430 | fi | |
9431 | ||
9432 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
9433 | ||
aff38e61 AC |
9434 | |
9435 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9436 | case ${host} in | |
95cbc983 AC |
9437 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9438 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9439 | esac |
9440 | ||
9441 | ||
cd0fc7c3 SS |
9442 | # libreadline needs libuser32.a in a cygwin environment |
9443 | WIN32LIBS= | |
9444 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9445 | WIN32LIBS="-luser32" |
9446 | case "${target}" in | |
9447 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9448 | ;; | |
9449 | esac | |
cd0fc7c3 | 9450 | fi |
c906108c | 9451 | |
7a292a7a | 9452 | |
3fc11d3e JM |
9453 | LIBGUI="../libgui/src/libgui.a" |
9454 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9455 | ||
9456 | ||
7a292a7a | 9457 | |
3fc11d3e JM |
9458 | WIN32LDAPP= |
9459 | ||
9460 | ||
9461 | ||
9462 | configdir="unix" | |
9463 | ||
9464 | GDBTKLIBS= | |
9465 | if test "${enable_gdbtk}" = "yes"; then | |
9466 | ||
d1c3b63a KS |
9467 | # Gdbtk must have an absolute path to srcdir in order to run |
9468 | # properly when not installed. | |
9469 | here=`pwd` | |
9470 | cd ${srcdir} | |
9471 | GDBTK_SRC_DIR=`pwd` | |
9472 | cd $here | |
9473 | ||
3fc11d3e JM |
9474 | |
9475 | # | |
9476 | # Ok, lets find the tcl configuration | |
9477 | # First, look for one uninstalled. | |
9478 | # the alternative search directory is invoked by --with-tclconfig | |
9479 | # | |
9480 | ||
9481 | if test x"${no_tcl}" = x ; then | |
9482 | # we reset no_tcl in case something fails here | |
9483 | no_tcl=true | |
9484 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9485 | if test "${with_tclconfig+set}" = set; then | |
9486 | withval="$with_tclconfig" | |
9487 | with_tclconfig=${withval} | |
9488 | fi | |
9489 | ||
9490 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
66745969 | 9491 | echo "configure:9492: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9492 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9494 | else | |
9495 | ||
9496 | ||
9497 | # First check to see if --with-tclconfig was specified. | |
9498 | if test x"${with_tclconfig}" != x ; then | |
9499 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9500 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9501 | else | |
9502 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9503 | fi | |
9504 | fi | |
9505 | ||
9506 | # then check for a private Tcl installation | |
9507 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9508 | for i in \ | |
9509 | ../tcl \ | |
9510 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9511 | ../../tcl \ | |
9512 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9513 | ../../../tcl \ | |
9514 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9515 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9516 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9517 | break | |
9518 | fi | |
9519 | done | |
9520 | fi | |
9521 | # check in a few common install locations | |
9522 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9523 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9524 | if test -f "$i/tclConfig.sh" ; then | |
9525 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9526 | break | |
9527 | fi | |
9528 | done | |
9529 | fi | |
9530 | # check in a few other private locations | |
9531 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9532 | for i in \ | |
9533 | ${srcdir}/../tcl \ | |
9534 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9535 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9536 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9537 | break | |
9538 | fi | |
9539 | done | |
9540 | fi | |
9541 | ||
9542 | fi | |
9543 | ||
9544 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9545 | TCLCONFIG="# no Tcl configs found" | |
9546 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9547 | else | |
9548 | no_tcl= | |
9549 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9550 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9551 | fi | |
9552 | fi | |
9553 | ||
9554 | if test -z "${no_tcl}"; then | |
9555 | ||
9556 | . $TCLCONFIG | |
9557 | ||
9558 | ||
9559 | ||
9560 | ||
9561 | ||
9562 | ||
9563 | ||
9564 | ||
9565 | ||
9566 | ||
9567 | ||
9568 | ||
9569 | ||
9570 | ||
9571 | ||
9572 | ||
9573 | ||
9574 | ||
9575 | ||
9576 | ||
033afc63 | 9577 | |
3fc11d3e JM |
9578 | |
9579 | ||
9580 | ||
9581 | ||
9582 | ||
9583 | ||
9584 | # | |
9585 | # Ok, lets find the tk configuration | |
9586 | # First, look for one uninstalled. | |
9587 | # the alternative search directory is invoked by --with-tkconfig | |
9588 | # | |
9589 | ||
9590 | if test x"${no_tk}" = x ; then | |
9591 | # we reset no_tk in case something fails here | |
9592 | no_tk=true | |
9593 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9594 | if test "${with_tkconfig+set}" = set; then | |
9595 | withval="$with_tkconfig" | |
9596 | with_tkconfig=${withval} | |
9597 | fi | |
9598 | ||
9599 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
66745969 | 9600 | echo "configure:9601: checking for Tk configuration" >&5 |
3fc11d3e JM |
9601 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9602 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9603 | else | |
9604 | ||
9605 | ||
9606 | # First check to see if --with-tkconfig was specified. | |
9607 | if test x"${with_tkconfig}" != x ; then | |
9608 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9609 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9610 | else | |
9611 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9612 | fi | |
9613 | fi | |
9614 | ||
9615 | # then check for a private Tk library | |
9616 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9617 | for i in \ | |
9618 | ../tk \ | |
9619 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9620 | ../../tk \ | |
9621 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9622 | ../../../tk \ | |
9623 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9624 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9625 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9626 | break | |
9627 | fi | |
9628 | done | |
9629 | fi | |
9630 | # check in a few common install locations | |
9631 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9632 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9633 | if test -f "$i/tkConfig.sh" ; then | |
9634 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9635 | break | |
9636 | fi | |
9637 | done | |
9638 | fi | |
9639 | # check in a few other private locations | |
9640 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9641 | for i in \ | |
9642 | ${srcdir}/../tk \ | |
9643 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9644 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9645 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9646 | break | |
9647 | fi | |
9648 | done | |
9649 | fi | |
9650 | ||
9651 | fi | |
9652 | ||
9653 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9654 | TKCONFIG="# no Tk configs found" | |
9655 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9656 | else | |
9657 | no_tk= | |
9658 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9659 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9660 | fi | |
9661 | fi | |
9662 | ||
9663 | ||
9664 | ||
dd2504ab JM |
9665 | # now look for Tcl library stuff |
9666 | ||
9667 | case "${host}" in | |
9668 | *-*-cygwin*) | |
9669 | tcldir=../tcl/win/ | |
9670 | ;; | |
9671 | *) | |
9672 | tcldir=../tcl/unix/ | |
9673 | ;; | |
9674 | esac | |
9675 | ||
9676 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9677 | ||
3fc11d3e JM |
9678 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9679 | # point to doing Tcl. | |
9680 | if test -z "${no_tk}"; then | |
9681 | ||
9682 | if test -f "$TKCONFIG" ; then | |
9683 | . $TKCONFIG | |
9684 | fi | |
9685 | ||
9686 | ||
9687 | ||
9688 | ||
9689 | ||
9690 | ||
9691 | ||
9692 | ||
9693 | ||
9694 | ||
9695 | ||
9696 | ||
9697 | ||
9698 | ||
9699 | # | |
9700 | # Ok, lets find the tcl source trees so we can use the headers | |
9701 | # Warning: transition of version 9 to 10 will break this algorithm | |
9702 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9703 | # be careful that we don't match stuff like tclX by accident. | |
9704 | # the alternative search directory is involked by --with-tclinclude | |
9705 | # | |
9706 | ||
9707 | no_tcl=true | |
9708 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
66745969 | 9709 | echo "configure:9710: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9710 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9711 | if test "${with_tclinclude+set}" = set; then | |
9712 | withval="$with_tclinclude" | |
9713 | with_tclinclude=${withval} | |
9714 | fi | |
9715 | ||
9716 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9717 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9718 | else | |
9719 | ||
9720 | # first check to see if --with-tclinclude was specified | |
9721 | if test x"${with_tclinclude}" != x ; then | |
9722 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9723 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9724 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9725 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9726 | else | |
9727 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9728 | fi | |
9729 | fi | |
9730 | ||
9731 | # next check if it came with Tcl configuration file | |
9732 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9733 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9734 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9735 | fi | |
9736 | fi | |
9737 | ||
9738 | # next check in private source directory | |
9739 | # | |
9740 | # since ls returns lowest version numbers first, reverse its output | |
9741 | if test x"${ac_cv_c_tclh}" = x ; then | |
9742 | for i in \ | |
9743 | ${srcdir}/../tcl \ | |
9744 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9745 | ${srcdir}/../../tcl \ | |
9746 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9747 | ${srcdir}/../../../tcl \ | |
9748 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9749 | if test -f $i/generic/tclInt.h ; then | |
9750 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9751 | break | |
9752 | fi | |
9753 | done | |
9754 | fi | |
9755 | # finally check in a few common install locations | |
9756 | # | |
9757 | # since ls returns lowest version numbers first, reverse its output | |
9758 | if test x"${ac_cv_c_tclh}" = x ; then | |
9759 | for i in \ | |
9760 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9761 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9762 | /usr/local/src/tcl \ | |
9763 | /usr/local/lib/tcl \ | |
9764 | ${prefix}/include ; do | |
9765 | if test -f $i/generic/tclInt.h ; then | |
9766 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9767 | break | |
9768 | fi | |
9769 | done | |
9770 | fi | |
9771 | # see if one is installed | |
9772 | if test x"${ac_cv_c_tclh}" = x ; then | |
9773 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9774 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
66745969 | 9775 | echo "configure:9776: checking for tclInt.h" >&5 |
3fc11d3e JM |
9776 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9777 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9778 | else | |
9779 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9780 | #line 9781 "configure" |
3fc11d3e JM |
9781 | #include "confdefs.h" |
9782 | #include <tclInt.h> | |
9783 | EOF | |
9784 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 9785 | { (eval echo configure:9786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9786 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9787 | if test -z "$ac_err"; then | |
9788 | rm -rf conftest* | |
9789 | eval "ac_cv_header_$ac_safe=yes" | |
9790 | else | |
9791 | echo "$ac_err" >&5 | |
9792 | echo "configure: failed program was:" >&5 | |
9793 | cat conftest.$ac_ext >&5 | |
9794 | rm -rf conftest* | |
9795 | eval "ac_cv_header_$ac_safe=no" | |
9796 | fi | |
9797 | rm -f conftest* | |
9798 | fi | |
9799 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9800 | echo "$ac_t""yes" 1>&6 | |
9801 | ac_cv_c_tclh=installed | |
9802 | else | |
9803 | echo "$ac_t""no" 1>&6 | |
9804 | ac_cv_c_tclh="" | |
9805 | fi | |
9806 | ||
9807 | fi | |
9808 | ||
9809 | fi | |
9810 | ||
9811 | if test x"${ac_cv_c_tclh}" = x ; then | |
9812 | TCLHDIR="# no Tcl private headers found" | |
9813 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9814 | fi | |
9815 | if test x"${ac_cv_c_tclh}" != x ; then | |
9816 | no_tcl="" | |
9817 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9818 | echo "$ac_t""is installed" 1>&6 | |
9819 | TCLHDIR="" | |
9820 | else | |
9821 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9822 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9823 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9824 | fi | |
9825 | fi | |
9826 | ||
9827 | ||
9828 | ||
9829 | ||
9830 | # | |
9831 | # Ok, lets find the tk source trees so we can use the headers | |
9832 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9833 | # in preference to any others. Same logic is used when choosing library | |
9834 | # and again with Tcl. The search order is the best place to look first, then in | |
9835 | # decreasing significance. The loop breaks if the trigger file is found. | |
9836 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9837 | # directory. This converts the path from a relative to an absolute, so | |
9838 | # recursive cache variables for the path will work right. We check all | |
9839 | # the possible paths in one loop rather than many seperate loops to speed | |
9840 | # things up. | |
9841 | # the alternative search directory is involked by --with-tkinclude | |
9842 | # | |
9843 | no_tk=true | |
9844 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
66745969 | 9845 | echo "configure:9846: checking for Tk private headers" >&5 |
3fc11d3e JM |
9846 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9847 | if test "${with_tkinclude+set}" = set; then | |
9848 | withval="$with_tkinclude" | |
9849 | with_tkinclude=${withval} | |
9850 | fi | |
9851 | ||
9852 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9853 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9854 | else | |
9855 | ||
9856 | # first check to see if --with-tkinclude was specified | |
9857 | if test x"${with_tkinclude}" != x ; then | |
9858 | if test -f ${with_tkinclude}/tk.h ; then | |
9859 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9860 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9861 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9862 | else | |
9863 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9864 | fi | |
9865 | fi | |
9866 | ||
9867 | # next check if it came with Tk configuration file | |
9868 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9869 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9870 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9871 | fi | |
9872 | fi | |
9873 | ||
9874 | # next check in private source directory | |
9875 | # | |
9876 | # since ls returns lowest version numbers first, reverse its output | |
9877 | if test x"${ac_cv_c_tkh}" = x ; then | |
9878 | for i in \ | |
9879 | ${srcdir}/../tk \ | |
9880 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9881 | ${srcdir}/../../tk \ | |
9882 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9883 | ${srcdir}/../../../tk \ | |
9884 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9885 | if test -f $i/generic/tk.h ; then | |
9886 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9887 | break | |
9888 | fi | |
9889 | done | |
9890 | fi | |
9891 | # finally check in a few common install locations | |
9892 | # | |
9893 | # since ls returns lowest version numbers first, reverse its output | |
9894 | if test x"${ac_cv_c_tkh}" = x ; then | |
9895 | for i in \ | |
9896 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9897 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9898 | /usr/local/src/tk \ | |
9899 | /usr/local/lib/tk \ | |
9900 | ${prefix}/include ; do | |
9901 | if test -f $i/generic/tk.h ; then | |
9902 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9903 | break | |
9904 | fi | |
9905 | done | |
9906 | fi | |
9907 | # see if one is installed | |
9908 | if test x"${ac_cv_c_tkh}" = x ; then | |
9909 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9910 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
66745969 | 9911 | echo "configure:9912: checking for tk.h" >&5 |
3fc11d3e JM |
9912 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9913 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9914 | else | |
9915 | cat > conftest.$ac_ext <<EOF | |
66745969 | 9916 | #line 9917 "configure" |
3fc11d3e JM |
9917 | #include "confdefs.h" |
9918 | #include <tk.h> | |
9919 | EOF | |
9920 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 9921 | { (eval echo configure:9922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9922 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9923 | if test -z "$ac_err"; then | |
9924 | rm -rf conftest* | |
9925 | eval "ac_cv_header_$ac_safe=yes" | |
9926 | else | |
9927 | echo "$ac_err" >&5 | |
9928 | echo "configure: failed program was:" >&5 | |
9929 | cat conftest.$ac_ext >&5 | |
9930 | rm -rf conftest* | |
9931 | eval "ac_cv_header_$ac_safe=no" | |
9932 | fi | |
9933 | rm -f conftest* | |
9934 | fi | |
9935 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9936 | echo "$ac_t""yes" 1>&6 | |
9937 | ac_cv_c_tkh=installed | |
9938 | else | |
9939 | echo "$ac_t""no" 1>&6 | |
9940 | ac_cv_c_tkh="" | |
9941 | fi | |
9942 | ||
9943 | fi | |
9944 | ||
9945 | fi | |
9946 | ||
9947 | if test x"${ac_cv_c_tkh}" != x ; then | |
9948 | no_tk="" | |
9949 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9950 | echo "$ac_t""is installed" 1>&6 | |
9951 | TKHDIR="" | |
9952 | else | |
9953 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9954 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9955 | TKHDIR="-I${ac_cv_c_tkh}" | |
9956 | fi | |
9957 | else | |
9958 | TKHDIR="# no Tk directory found" | |
9959 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9960 | no_tk=true | |
9961 | fi | |
9962 | ||
9963 | ||
9964 | ||
9965 | ||
9966 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
66745969 | 9967 | echo "configure:9968: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9968 | if test x"${ac_cv_c_itclh}" = x ; then |
9969 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9970 | if test -f $i/generic/itcl.h ; then | |
9971 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9972 | break | |
9973 | fi | |
9974 | done | |
9975 | fi | |
9976 | if test x"${ac_cv_c_itclh}" = x ; then | |
9977 | ITCLHDIR="# no Itcl private headers found" | |
9978 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9979 | fi | |
9980 | if test x"${ac_cv_c_itclh}" != x ; then | |
9981 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9982 | fi | |
9983 | # should always be here | |
9984 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9985 | ||
9986 | #AC_SUBST(ITCLLIB) | |
9987 | ||
9988 | ||
9989 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
66745969 | 9990 | echo "configure:9991: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9991 | if test x"${ac_cv_c_itkh}" = x ; then |
9992 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9993 | if test -f $i/generic/itk.h ; then | |
9994 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9995 | break | |
9996 | fi | |
9997 | done | |
9998 | fi | |
9999 | if test x"${ac_cv_c_itkh}" = x ; then | |
10000 | ITKHDIR="# no Itk private headers found" | |
10001 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
10002 | fi | |
10003 | if test x"${ac_cv_c_itkh}" != x ; then | |
10004 | ITKHDIR="-I${ac_cv_c_itkh}" | |
10005 | fi | |
10006 | # should always be here | |
10007 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
10008 | ||
10009 | #AC_SUBST(ITKLIB) | |
10010 | ||
3fc11d3e | 10011 | |
dd2504ab JM |
10012 | |
10013 | # now look for Tk library stuff | |
10014 | ||
10015 | case "${host}" in | |
10016 | *-*-cygwin*) | |
10017 | tkdir=../tk/win/ | |
10018 | ;; | |
10019 | *) | |
10020 | tkdir=../tk/unix/ | |
10021 | ;; | |
10022 | esac | |
10023 | ||
10024 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
10025 | ||
3fc11d3e JM |
10026 | # now look for Itcl library stuff |
10027 | ||
10028 | ||
10029 | # | |
10030 | # Ok, lets find the itcl configuration | |
10031 | # First, look for one uninstalled. | |
10032 | # the alternative search directory is invoked by --with-itclconfig | |
10033 | # | |
10034 | ||
10035 | if test x"${no_itcl}" = x ; then | |
10036 | # we reset no_itcl in case something fails here | |
10037 | no_itcl=true | |
10038 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
10039 | if test "${with_itclconfig+set}" = set; then | |
10040 | withval="$with_itclconfig" | |
10041 | with_itclconfig=${withval} | |
10042 | fi | |
10043 | ||
10044 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
66745969 | 10045 | echo "configure:10046: checking for Itcl configuration" >&5 |
3fc11d3e JM |
10046 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
10047 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10048 | else | |
10049 | ||
10050 | ||
10051 | # First check to see if --with-itclconfig was specified. | |
10052 | if test x"${with_itclconfig}" != x ; then | |
10053 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
10054 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
10055 | else | |
10056 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
10057 | fi | |
10058 | fi | |
10059 | ||
10060 | # then check for a private Itcl library | |
10061 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10062 | for i in \ | |
10063 | ../itcl/itcl \ | |
10064 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
10065 | ../../itcl \ | |
10066 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
10067 | ../../../itcl \ | |
10068 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
10069 | if test -f "$i/itclConfig.sh" ; then | |
10070 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10071 | break | |
10072 | fi | |
10073 | done | |
10074 | fi | |
10075 | # check in a few common install locations | |
10076 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10077 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10078 | if test -f "$i/itclConfig.sh" ; then | |
10079 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10080 | break | |
10081 | fi | |
10082 | done | |
10083 | fi | |
10084 | # check in a few other private locations | |
10085 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10086 | for i in \ | |
10087 | ${srcdir}/../itcl/itcl \ | |
10088 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
10089 | if test -f "$i/itclConfig.sh" ; then | |
10090 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10091 | break | |
10092 | fi | |
10093 | done | |
10094 | fi | |
10095 | ||
10096 | fi | |
10097 | ||
10098 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10099 | ITCLCONFIG="# no Itcl configs found" | |
10100 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
10101 | else | |
10102 | no_itcl= | |
10103 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
10104 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
10105 | fi | |
10106 | fi | |
10107 | ||
10108 | if test -z "${no_itcl}"; then | |
10109 | ||
10110 | if test -f "$ITCLCONFIG" ; then | |
10111 | . $ITCLCONFIG | |
10112 | fi | |
10113 | ||
10114 | ||
10115 | ||
10116 | ||
10117 | ||
10118 | ||
10119 | ||
10120 | ||
10121 | ||
10122 | ||
3fc11d3e JM |
10123 | |
10124 | ||
10125 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 10126 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
10127 | fi |
10128 | ||
10129 | ||
10130 | # now look for Itk library stuff | |
10131 | ||
10132 | # | |
10133 | # Ok, lets find the itk configuration | |
10134 | # First, look for one uninstalled. | |
10135 | # the alternative search directory is invoked by --with-itkconfig | |
10136 | # | |
10137 | ||
10138 | if test x"${no_itk}" = x ; then | |
10139 | # we reset no_itk in case something fails here | |
10140 | no_itk=true | |
10141 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
10142 | if test "${with_itkconfig+set}" = set; then | |
10143 | withval="$with_itkconfig" | |
10144 | with_itkconfig=${withval} | |
10145 | fi | |
10146 | ||
10147 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
66745969 | 10148 | echo "configure:10149: checking for Itk configuration" >&5 |
3fc11d3e JM |
10149 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
10150 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10151 | else | |
10152 | ||
10153 | ||
10154 | # First check to see if --with-itkconfig was specified. | |
10155 | if test x"${with_itkconfig}" != x ; then | |
10156 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
10157 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
10158 | else | |
10159 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
10160 | fi | |
10161 | fi | |
10162 | ||
10163 | # then check for a private Itk library | |
10164 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10165 | for i in \ | |
10166 | ../itcl/itk \ | |
10167 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
10168 | ../../itk \ | |
10169 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
10170 | ../../../itk \ | |
10171 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
10172 | if test -f "$i/itkConfig.sh" ; then | |
10173 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10174 | break | |
10175 | fi | |
10176 | done | |
10177 | fi | |
10178 | # check in a few common install locations | |
10179 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10180 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10181 | if test -f "$i/itkConfig.sh" ; then | |
10182 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10183 | break | |
10184 | fi | |
10185 | done | |
10186 | fi | |
10187 | # check in a few other private locations | |
10188 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10189 | for i in \ | |
10190 | ${srcdir}/../itcl/itk \ | |
10191 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
10192 | if test -f "$i/itkConfig.sh" ; then | |
10193 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10194 | break | |
10195 | fi | |
10196 | done | |
10197 | fi | |
10198 | ||
10199 | fi | |
10200 | ||
10201 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10202 | ITKCONFIG="# no Itk configs found" | |
10203 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
10204 | else | |
10205 | no_itk= | |
10206 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
10207 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
10208 | fi | |
10209 | fi | |
10210 | ||
10211 | ||
10212 | if test -z "${no_itcl}"; then | |
10213 | ||
10214 | if test -f "$ITKCONFIG" ; then | |
10215 | . $ITKCONFIG | |
10216 | fi | |
10217 | ||
10218 | ||
10219 | ||
10220 | ||
10221 | ||
10222 | ||
10223 | ||
10224 | ||
10225 | ||
10226 | ||
10227 | ||
10228 | ||
3fc11d3e | 10229 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 10230 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
10231 | fi |
10232 | ||
4226a5a5 | 10233 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
10234 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
10235 | # know whether 8.2 will or not, but I bet it will. | |
10236 | # I don't have to worry about 7.x since we don't support it. | |
10237 | GDBTK_CFLAGS="" | |
10238 | if test "$GCC" = "yes"; then | |
10239 | if test "$TCL_VERSION" != "8.0" ; then | |
10240 | GDBTK_CFLAGS="-fwritable-strings" | |
10241 | fi | |
10242 | fi | |
10243 | ||
10244 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 10245 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
10246 | # Yes, the ordering seems wrong here. But it isn't. |
10247 | # TK_LIBS is the list of libraries that need to be linked | |
10248 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
10249 | # were in LIBS then any link tests after this point would | |
10250 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
10251 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
10252 | |
10253 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
10254 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
10255 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
33f8ca73 AC |
10256 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" |
10257 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
10258 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
10259 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e JM |
10260 | |
10261 | if test x$gdb_cv_os_cygwin = xyes; then | |
10262 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
10263 | WIN32LDAPP="-Wl,--subsystem,console" | |
10264 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
10265 | fi | |
10266 | fi | |
10267 | fi | |
ffc6a242 | 10268 | |
ffc6a242 | 10269 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
10270 | fi |
10271 | ||
10272 | ||
10273 | ||
10274 | ||
10275 | ||
10276 | ||
10277 | ||
10278 | ||
10279 | ||
10280 | ||
10281 | ||
10282 | ||
10283 | ||
dd2504ab | 10284 | |
c906108c SS |
10285 | # If we find X, set shell vars x_includes and x_libraries to the |
10286 | # paths, otherwise set no_x=yes. | |
10287 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
10288 | # --without-x overrides everything else, but does not touch the cache. | |
10289 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
66745969 | 10290 | echo "configure:10291: checking for X" >&5 |
c906108c SS |
10291 | |
10292 | # Check whether --with-x or --without-x was given. | |
10293 | if test "${with_x+set}" = set; then | |
10294 | withval="$with_x" | |
10295 | : | |
10296 | fi | |
10297 | ||
10298 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
10299 | if test "x$with_x" = xno; then | |
10300 | # The user explicitly disabled X. | |
10301 | have_x=disabled | |
10302 | else | |
10303 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
10304 | # Both variables are already set. | |
10305 | have_x=yes | |
10306 | else | |
10307 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
10308 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10309 | else | |
10310 | # One or both of the vars are not set, and there is no cached value. | |
10311 | ac_x_includes=NO ac_x_libraries=NO | |
10312 | rm -fr conftestdir | |
10313 | if mkdir conftestdir; then | |
10314 | cd conftestdir | |
10315 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
10316 | cat > Imakefile <<'EOF' | |
10317 | acfindx: | |
10318 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
10319 | EOF | |
10320 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
10321 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
10322 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
10323 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
10324 | for ac_extension in a so sl; do | |
10325 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
10326 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
10327 | ac_im_usrlibdir=$ac_im_libdir; break | |
10328 | fi | |
10329 | done | |
10330 | # Screen out bogus values from the imake configuration. They are | |
10331 | # bogus both because they are the default anyway, and because | |
10332 | # using them would break gcc on systems where it needs fixed includes. | |
10333 | case "$ac_im_incroot" in | |
10334 | /usr/include) ;; | |
10335 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
10336 | esac | |
10337 | case "$ac_im_usrlibdir" in | |
10338 | /usr/lib | /lib) ;; | |
10339 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
10340 | esac | |
10341 | fi | |
10342 | cd .. | |
10343 | rm -fr conftestdir | |
10344 | fi | |
10345 | ||
10346 | if test "$ac_x_includes" = NO; then | |
10347 | # Guess where to find include files, by looking for this one X11 .h file. | |
10348 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
10349 | ||
10350 | # First, try using that file with no special directory specified. | |
10351 | cat > conftest.$ac_ext <<EOF | |
66745969 | 10352 | #line 10353 "configure" |
c906108c SS |
10353 | #include "confdefs.h" |
10354 | #include <$x_direct_test_include> | |
10355 | EOF | |
10356 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
66745969 | 10357 | { (eval echo configure:10358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
10358 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10359 | if test -z "$ac_err"; then | |
10360 | rm -rf conftest* | |
10361 | # We can compile using X headers with no special include directory. | |
10362 | ac_x_includes= | |
10363 | else | |
10364 | echo "$ac_err" >&5 | |
10365 | echo "configure: failed program was:" >&5 | |
10366 | cat conftest.$ac_ext >&5 | |
10367 | rm -rf conftest* | |
10368 | # Look for the header file in a standard set of common directories. | |
10369 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10370 | for ac_dir in \ | |
10371 | /usr/X11/include \ | |
10372 | /usr/X11R6/include \ | |
10373 | /usr/X11R5/include \ | |
10374 | /usr/X11R4/include \ | |
10375 | \ | |
10376 | /usr/include/X11 \ | |
10377 | /usr/include/X11R6 \ | |
10378 | /usr/include/X11R5 \ | |
10379 | /usr/include/X11R4 \ | |
10380 | \ | |
10381 | /usr/local/X11/include \ | |
10382 | /usr/local/X11R6/include \ | |
10383 | /usr/local/X11R5/include \ | |
10384 | /usr/local/X11R4/include \ | |
10385 | \ | |
10386 | /usr/local/include/X11 \ | |
10387 | /usr/local/include/X11R6 \ | |
10388 | /usr/local/include/X11R5 \ | |
10389 | /usr/local/include/X11R4 \ | |
10390 | \ | |
10391 | /usr/X386/include \ | |
10392 | /usr/x386/include \ | |
10393 | /usr/XFree86/include/X11 \ | |
10394 | \ | |
10395 | /usr/include \ | |
10396 | /usr/local/include \ | |
10397 | /usr/unsupported/include \ | |
10398 | /usr/athena/include \ | |
10399 | /usr/local/x11r5/include \ | |
10400 | /usr/lpp/Xamples/include \ | |
10401 | \ | |
10402 | /usr/openwin/include \ | |
10403 | /usr/openwin/share/include \ | |
10404 | ; \ | |
10405 | do | |
10406 | if test -r "$ac_dir/$x_direct_test_include"; then | |
10407 | ac_x_includes=$ac_dir | |
10408 | break | |
10409 | fi | |
10410 | done | |
10411 | fi | |
10412 | rm -f conftest* | |
10413 | fi # $ac_x_includes = NO | |
10414 | ||
10415 | if test "$ac_x_libraries" = NO; then | |
10416 | # Check for the libraries. | |
10417 | ||
10418 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
10419 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
10420 | ||
10421 | # See if we find them without any special options. | |
10422 | # Don't add to $LIBS permanently. | |
10423 | ac_save_LIBS="$LIBS" | |
10424 | LIBS="-l$x_direct_test_library $LIBS" | |
10425 | cat > conftest.$ac_ext <<EOF | |
66745969 | 10426 | #line 10427 "configure" |
c906108c SS |
10427 | #include "confdefs.h" |
10428 | ||
10429 | int main() { | |
10430 | ${x_direct_test_function}() | |
10431 | ; return 0; } | |
10432 | EOF | |
66745969 | 10433 | if { (eval echo configure:10434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10434 | rm -rf conftest* |
10435 | LIBS="$ac_save_LIBS" | |
10436 | # We can link X programs with no special library path. | |
10437 | ac_x_libraries= | |
10438 | else | |
10439 | echo "configure: failed program was:" >&5 | |
10440 | cat conftest.$ac_ext >&5 | |
10441 | rm -rf conftest* | |
10442 | LIBS="$ac_save_LIBS" | |
10443 | # First see if replacing the include by lib works. | |
10444 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10445 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10446 | /usr/X11/lib \ | |
10447 | /usr/X11R6/lib \ | |
10448 | /usr/X11R5/lib \ | |
10449 | /usr/X11R4/lib \ | |
10450 | \ | |
10451 | /usr/lib/X11 \ | |
10452 | /usr/lib/X11R6 \ | |
10453 | /usr/lib/X11R5 \ | |
10454 | /usr/lib/X11R4 \ | |
10455 | \ | |
10456 | /usr/local/X11/lib \ | |
10457 | /usr/local/X11R6/lib \ | |
10458 | /usr/local/X11R5/lib \ | |
10459 | /usr/local/X11R4/lib \ | |
10460 | \ | |
10461 | /usr/local/lib/X11 \ | |
10462 | /usr/local/lib/X11R6 \ | |
10463 | /usr/local/lib/X11R5 \ | |
10464 | /usr/local/lib/X11R4 \ | |
10465 | \ | |
10466 | /usr/X386/lib \ | |
10467 | /usr/x386/lib \ | |
10468 | /usr/XFree86/lib/X11 \ | |
10469 | \ | |
10470 | /usr/lib \ | |
10471 | /usr/local/lib \ | |
10472 | /usr/unsupported/lib \ | |
10473 | /usr/athena/lib \ | |
10474 | /usr/local/x11r5/lib \ | |
10475 | /usr/lpp/Xamples/lib \ | |
10476 | /lib/usr/lib/X11 \ | |
10477 | \ | |
10478 | /usr/openwin/lib \ | |
10479 | /usr/openwin/share/lib \ | |
10480 | ; \ | |
10481 | do | |
10482 | for ac_extension in a so sl; do | |
10483 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10484 | ac_x_libraries=$ac_dir | |
10485 | break 2 | |
10486 | fi | |
10487 | done | |
10488 | done | |
10489 | fi | |
10490 | rm -f conftest* | |
10491 | fi # $ac_x_libraries = NO | |
10492 | ||
10493 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10494 | # Didn't find X anywhere. Cache the known absence of X. | |
10495 | ac_cv_have_x="have_x=no" | |
10496 | else | |
10497 | # Record where we found X for the cache. | |
10498 | ac_cv_have_x="have_x=yes \ | |
10499 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10500 | fi | |
10501 | fi | |
10502 | fi | |
10503 | eval "$ac_cv_have_x" | |
10504 | fi # $with_x != no | |
10505 | ||
10506 | if test "$have_x" != yes; then | |
10507 | echo "$ac_t""$have_x" 1>&6 | |
10508 | no_x=yes | |
10509 | else | |
10510 | # If each of the values was on the command line, it overrides each guess. | |
10511 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10512 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10513 | # Update the cache value to reflect the command line values. | |
10514 | ac_cv_have_x="have_x=yes \ | |
10515 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10516 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10517 | fi | |
10518 | ||
10519 | ||
7a292a7a SS |
10520 | |
10521 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
10522 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10523 | # This code just checks for a few cases where we'd like to ignore those | |
10524 | # definitions, even when they're present in the '.mt' file. These cases | |
10525 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10526 | # not part of the source tree. |
7a292a7a SS |
10527 | # |
10528 | # Check whether --enable-sim or --disable-sim was given. | |
10529 | if test "${enable_sim+set}" = set; then | |
10530 | enableval="$enable_sim" | |
10531 | echo "enable_sim = $enable_sim"; | |
10532 | echo "enableval = ${enableval}"; | |
10533 | case "${enableval}" in | |
10534 | yes) ignore_sim=false ;; | |
10535 | no) ignore_sim=true ;; | |
10536 | *) ignore_sim=false ;; | |
10537 | esac | |
10538 | else | |
10539 | ignore_sim=false | |
10540 | fi | |
10541 | ||
10542 | ||
10543 | if test ! -d "${srcdir}/../sim"; then | |
10544 | ignore_sim=true | |
10545 | fi | |
10546 | ||
10547 | if test "${ignore_sim}" = "true"; then | |
10548 | IGNORE_SIM="SIM=" | |
10549 | IGNORE_SIM_OBS="SIM_OBS=" | |
10550 | else | |
10551 | IGNORE_SIM="" | |
10552 | IGNORE_SIM_OBS="" | |
10553 | cat >> confdefs.h <<\EOF | |
10554 | #define WITH_SIM 1 | |
10555 | EOF | |
10556 | ||
10557 | fi | |
10558 | ||
10559 | ||
10560 | ||
c906108c SS |
10561 | |
10562 | ||
10563 | ||
10564 | ||
10565 | ||
10566 | ||
dfcd3bfb | 10567 | |
e56ac5c3 AC |
10568 | |
10569 | ||
b3a90332 AC |
10570 | |
10571 | ||
c906108c SS |
10572 | # target_subdir is used by the testsuite to find the target libraries. |
10573 | target_subdir= | |
10574 | if test "${host}" != "${target}"; then | |
10575 | target_subdir="${target_alias}/" | |
10576 | fi | |
10577 | ||
10578 | ||
10579 | frags= | |
10580 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10581 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
10582 | # When building a native debuger the .mh file containing things |
10583 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
10584 | # since it no longer contains anything useful. | |
10585 | if test "${target}" = "${host}"; then | |
10586 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10587 | else | |
10588 | host_makefile_frag=/dev/null | |
10589 | fi | |
c906108c SS |
10590 | fi |
10591 | frags="$frags $host_makefile_frag" | |
10592 | ||
10593 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10594 | if test ! -f ${target_makefile_frag}; then | |
10595 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
10596 | fi | |
10597 | frags="$frags $target_makefile_frag" | |
10598 | ||
10599 | ||
10600 | ||
10601 | ||
10602 | ||
10603 | hostfile=`sed -n ' | |
10604 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10605 | ' ${host_makefile_frag}` | |
10606 | ||
10607 | targetfile=`sed -n ' | |
10608 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10609 | ' ${target_makefile_frag}` | |
10610 | ||
c906108c | 10611 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10612 | # We pick this up from the host configuration file (.mh) because we |
10613 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10614 | nativefile=`sed -n ' |
10615 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10616 | ' ${host_makefile_frag}` | |
c906108c SS |
10617 | fi |
10618 | ||
10619 | ||
b00a8037 DJ |
10620 | if test x"${gdb_osabi}" != x ; then |
10621 | cat >> confdefs.h <<EOF | |
10622 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10623 | EOF | |
10624 | ||
10625 | fi | |
10626 | ||
8dcde887 MK |
10627 | # Enable multi-ice-gdb-server. |
10628 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10629 | if test "${enable_multi_ice+set}" = set; then | |
10630 | enableval="$enable_multi_ice" | |
10631 | case $enableval in | |
10632 | yes | no) | |
10633 | ;; | |
10634 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10635 | esac | |
96baa820 JM |
10636 | fi |
10637 | ||
8dcde887 MK |
10638 | if test "x$enable_multi_ice" = xyes; then |
10639 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10640 | fi |
10641 | ||
8dcde887 MK |
10642 | # We only build gdbserver automatically if host and target are the same. |
10643 | if test "x$target" = "x$host"; then | |
10644 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
66745969 | 10645 | echo "configure:10646: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10646 | if test "x$build_gdbserver" = xyes; then |
10647 | configdirs="$configdirs gdbserver" | |
10648 | echo "$ac_t""yes" 1>&6 | |
10649 | else | |
10650 | echo "$ac_t""no" 1>&6 | |
10651 | fi | |
10652 | fi | |
10653 | ||
10654 | subdirs="doc testsuite $configdirs" | |
10655 | ||
96baa820 | 10656 | |
c906108c | 10657 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10658 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10659 | # version. | |
c906108c SS |
10660 | |
10661 | files= | |
10662 | links= | |
5a2402b8 | 10663 | |
c906108c | 10664 | rm -f xm.h |
5a2402b8 | 10665 | xm_h="" |
c906108c | 10666 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10667 | xm_h=xm.h |
10668 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10669 | files="${files} ${GDB_XM_FILE}" | |
10670 | links="${links} xm.h" | |
10671 | cat >> confdefs.h <<EOF | |
10672 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10673 | EOF | |
10674 | ||
c906108c | 10675 | fi |
5a2402b8 AC |
10676 | |
10677 | ||
c906108c | 10678 | rm -f tm.h |
5a2402b8 | 10679 | tm_h="" |
c906108c | 10680 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10681 | tm_h=tm.h |
10682 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10683 | files="${files} ${GDB_TM_FILE}" | |
10684 | links="${links} tm.h" | |
10685 | cat >> confdefs.h <<EOF | |
10686 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10687 | EOF | |
10688 | ||
c906108c | 10689 | fi |
5a2402b8 AC |
10690 | |
10691 | ||
c906108c | 10692 | rm -f nm.h |
5a2402b8 | 10693 | nm_h="" |
c906108c | 10694 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10695 | nm_h=nm.h |
10696 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10697 | files="${files} ${GDB_NM_FILE}" | |
10698 | links="${links} nm.h" | |
10699 | cat >> confdefs.h <<EOF | |
10700 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10701 | EOF | |
10702 | ||
c906108c | 10703 | fi |
5a2402b8 AC |
10704 | |
10705 | ||
c906108c SS |
10706 | |
10707 | ||
10708 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
66745969 | 10709 | echo "configure:10710: checking for Cygwin environment" >&5 |
c906108c SS |
10710 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10712 | else | |
10713 | cat > conftest.$ac_ext <<EOF | |
66745969 | 10714 | #line 10715 "configure" |
c906108c SS |
10715 | #include "confdefs.h" |
10716 | ||
10717 | int main() { | |
10718 | ||
10719 | #ifndef __CYGWIN__ | |
10720 | #define __CYGWIN__ __CYGWIN32__ | |
10721 | #endif | |
10722 | return __CYGWIN__; | |
10723 | ; return 0; } | |
10724 | EOF | |
66745969 | 10725 | if { (eval echo configure:10726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10726 | rm -rf conftest* |
10727 | ac_cv_cygwin=yes | |
10728 | else | |
10729 | echo "configure: failed program was:" >&5 | |
10730 | cat conftest.$ac_ext >&5 | |
10731 | rm -rf conftest* | |
10732 | ac_cv_cygwin=no | |
10733 | fi | |
10734 | rm -f conftest* | |
10735 | rm -f conftest* | |
10736 | fi | |
10737 | ||
10738 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10739 | CYGWIN= | |
10740 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10741 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
66745969 | 10742 | echo "configure:10743: checking for mingw32 environment" >&5 |
c906108c SS |
10743 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10744 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10745 | else | |
10746 | cat > conftest.$ac_ext <<EOF | |
66745969 | 10747 | #line 10748 "configure" |
c906108c SS |
10748 | #include "confdefs.h" |
10749 | ||
10750 | int main() { | |
10751 | return __MINGW32__; | |
10752 | ; return 0; } | |
10753 | EOF | |
66745969 | 10754 | if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10755 | rm -rf conftest* |
10756 | ac_cv_mingw32=yes | |
10757 | else | |
10758 | echo "configure: failed program was:" >&5 | |
10759 | cat conftest.$ac_ext >&5 | |
10760 | rm -rf conftest* | |
10761 | ac_cv_mingw32=no | |
10762 | fi | |
10763 | rm -f conftest* | |
10764 | rm -f conftest* | |
10765 | fi | |
10766 | ||
10767 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10768 | MINGW32= | |
10769 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10770 | ||
10771 | ||
10772 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
66745969 | 10773 | echo "configure:10774: checking for executable suffix" >&5 |
c906108c SS |
10774 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10776 | else | |
10777 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10778 | ac_cv_exeext=.exe | |
10779 | else | |
10780 | rm -f conftest* | |
10781 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10782 | ac_cv_exeext= | |
66745969 | 10783 | if { (eval echo configure:10784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10784 | for file in conftest.*; do |
10785 | case $file in | |
d836ee13 | 10786 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10787 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10788 | esac | |
10789 | done | |
10790 | else | |
10791 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10792 | fi | |
10793 | rm -f conftest* | |
10794 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10795 | fi | |
10796 | fi | |
10797 | ||
10798 | EXEEXT="" | |
10799 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10800 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10801 | ac_exeext=$EXEEXT | |
10802 | ||
10803 | ||
234b45d4 KB |
10804 | |
10805 | cat >> confdefs.h <<\EOF | |
10806 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10807 | EOF | |
10808 | ||
10809 | ||
10810 | ||
10811 | ||
10812 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10813 | if test "${with_libiconv_prefix+set}" = set; then | |
10814 | withval="$with_libiconv_prefix" | |
10815 | ||
10816 | for dir in `echo "$withval" | tr : ' '`; do | |
10817 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10818 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10819 | done | |
10820 | ||
10821 | fi | |
10822 | ||
10823 | ||
10824 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
66745969 | 10825 | echo "configure:10826: checking for iconv" >&5 |
234b45d4 KB |
10826 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10828 | else | |
10829 | ||
10830 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10831 | am_cv_lib_iconv=no | |
10832 | cat > conftest.$ac_ext <<EOF | |
66745969 | 10833 | #line 10834 "configure" |
234b45d4 KB |
10834 | #include "confdefs.h" |
10835 | #include <stdlib.h> | |
10836 | #include <iconv.h> | |
10837 | int main() { | |
10838 | iconv_t cd = iconv_open("",""); | |
10839 | iconv(cd,NULL,NULL,NULL,NULL); | |
10840 | iconv_close(cd); | |
10841 | ; return 0; } | |
10842 | EOF | |
66745969 | 10843 | if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10844 | rm -rf conftest* |
10845 | am_cv_func_iconv=yes | |
10846 | else | |
10847 | echo "configure: failed program was:" >&5 | |
10848 | cat conftest.$ac_ext >&5 | |
10849 | fi | |
10850 | rm -f conftest* | |
10851 | if test "$am_cv_func_iconv" != yes; then | |
10852 | am_save_LIBS="$LIBS" | |
10853 | LIBS="$LIBS -liconv" | |
10854 | cat > conftest.$ac_ext <<EOF | |
66745969 | 10855 | #line 10856 "configure" |
234b45d4 KB |
10856 | #include "confdefs.h" |
10857 | #include <stdlib.h> | |
10858 | #include <iconv.h> | |
10859 | int main() { | |
10860 | iconv_t cd = iconv_open("",""); | |
10861 | iconv(cd,NULL,NULL,NULL,NULL); | |
10862 | iconv_close(cd); | |
10863 | ; return 0; } | |
10864 | EOF | |
66745969 | 10865 | if { (eval echo configure:10866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10866 | rm -rf conftest* |
10867 | am_cv_lib_iconv=yes | |
10868 | am_cv_func_iconv=yes | |
10869 | else | |
10870 | echo "configure: failed program was:" >&5 | |
10871 | cat conftest.$ac_ext >&5 | |
10872 | fi | |
10873 | rm -f conftest* | |
10874 | LIBS="$am_save_LIBS" | |
10875 | fi | |
10876 | ||
10877 | fi | |
10878 | ||
10879 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10880 | if test "$am_cv_func_iconv" = yes; then | |
10881 | cat >> confdefs.h <<\EOF | |
10882 | #define HAVE_ICONV 1 | |
10883 | EOF | |
10884 | ||
10885 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
66745969 | 10886 | echo "configure:10887: checking for iconv declaration" >&5 |
234b45d4 KB |
10887 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10888 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10889 | else | |
10890 | ||
10891 | cat > conftest.$ac_ext <<EOF | |
66745969 | 10892 | #line 10893 "configure" |
234b45d4 KB |
10893 | #include "confdefs.h" |
10894 | ||
10895 | #include <stdlib.h> | |
10896 | #include <iconv.h> | |
10897 | extern | |
10898 | #ifdef __cplusplus | |
10899 | "C" | |
10900 | #endif | |
10901 | #if defined(__STDC__) || defined(__cplusplus) | |
10902 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10903 | #else | |
10904 | size_t iconv(); | |
10905 | #endif | |
10906 | ||
10907 | int main() { | |
10908 | ||
10909 | ; return 0; } | |
10910 | EOF | |
66745969 | 10911 | if { (eval echo configure:10912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10912 | rm -rf conftest* |
10913 | am_cv_proto_iconv_arg1="" | |
10914 | else | |
10915 | echo "configure: failed program was:" >&5 | |
10916 | cat conftest.$ac_ext >&5 | |
10917 | rm -rf conftest* | |
10918 | am_cv_proto_iconv_arg1="const" | |
10919 | fi | |
10920 | rm -f conftest* | |
10921 | 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);" | |
10922 | fi | |
10923 | ||
10924 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10925 | echo "$ac_t""${ac_t:- | |
10926 | }$am_cv_proto_iconv" 1>&6 | |
10927 | cat >> confdefs.h <<EOF | |
10928 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10929 | EOF | |
10930 | ||
10931 | fi | |
10932 | LIBICONV= | |
10933 | if test "$am_cv_lib_iconv" = yes; then | |
10934 | LIBICONV="-liconv" | |
10935 | fi | |
10936 | ||
10937 | ||
10938 | ||
c906108c SS |
10939 | trap '' 1 2 15 |
10940 | cat > confcache <<\EOF | |
10941 | # This file is a shell script that caches the results of configure | |
10942 | # tests run on this system so they can be shared between configure | |
10943 | # scripts and configure runs. It is not useful on other systems. | |
10944 | # If it contains results you don't want to keep, you may remove or edit it. | |
10945 | # | |
10946 | # By default, configure uses ./config.cache as the cache file, | |
10947 | # creating it if it does not exist already. You can give configure | |
10948 | # the --cache-file=FILE option to use a different cache file; that is | |
10949 | # what configure does when it calls configure scripts in | |
10950 | # subdirectories, so they share the cache. | |
10951 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10952 | # config.status only pays attention to the cache file if you give it the | |
10953 | # --recheck option to rerun configure. | |
10954 | # | |
10955 | EOF | |
10956 | # The following way of writing the cache mishandles newlines in values, | |
10957 | # but we know of no workaround that is simple, portable, and efficient. | |
10958 | # So, don't put newlines in cache variables' values. | |
10959 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10960 | # and sets the high bit in the cache file unless we assign to the vars. | |
10961 | (set) 2>&1 | | |
10962 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10963 | *ac_space=\ *) | |
10964 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10965 | # turns \\\\ into \\, and sed turns \\ into \). | |
10966 | sed -n \ | |
10967 | -e "s/'/'\\\\''/g" \ | |
10968 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10969 | ;; | |
10970 | *) | |
10971 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10972 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10973 | ;; | |
10974 | esac >> confcache | |
10975 | if cmp -s $cache_file confcache; then | |
10976 | : | |
10977 | else | |
10978 | if test -w $cache_file; then | |
10979 | echo "updating cache $cache_file" | |
10980 | cat confcache > $cache_file | |
10981 | else | |
10982 | echo "not updating unwritable cache $cache_file" | |
10983 | fi | |
10984 | fi | |
10985 | rm -f confcache | |
10986 | ||
10987 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10988 | ||
10989 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10990 | # Let make expand exec_prefix. | |
10991 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10992 | ||
10993 | # Any assignment to VPATH causes Sun make to only execute | |
10994 | # the first set of double-colon rules, so remove it if not needed. | |
10995 | # If there is a colon in the path, we need to keep it. | |
10996 | if test "x$srcdir" = x.; then | |
10997 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10998 | fi | |
10999 | ||
11000 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
11001 | ||
11002 | DEFS=-DHAVE_CONFIG_H | |
11003 | ||
11004 | # Without the "./", some shells look in PATH for config.status. | |
11005 | : ${CONFIG_STATUS=./config.status} | |
11006 | ||
11007 | echo creating $CONFIG_STATUS | |
11008 | rm -f $CONFIG_STATUS | |
11009 | cat > $CONFIG_STATUS <<EOF | |
11010 | #! /bin/sh | |
11011 | # Generated automatically by configure. | |
11012 | # Run this file to recreate the current configuration. | |
11013 | # This directory was configured as follows, | |
11014 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
11015 | # | |
11016 | # $0 $ac_configure_args | |
11017 | # | |
11018 | # Compiler output produced by configure, useful for debugging | |
11019 | # configure, is in ./config.log if it exists. | |
11020 | ||
11021 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
11022 | for ac_option | |
11023 | do | |
11024 | case "\$ac_option" in | |
11025 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
11026 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
11027 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
11028 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
11029 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
11030 | exit 0 ;; | |
11031 | -help | --help | --hel | --he | --h) | |
11032 | echo "\$ac_cs_usage"; exit 0 ;; | |
11033 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
11034 | esac | |
11035 | done | |
11036 | ||
11037 | ac_given_srcdir=$srcdir | |
11038 | ac_given_INSTALL="$INSTALL" | |
11039 | ||
ed952ac5 | 11040 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
11041 | EOF |
11042 | cat >> $CONFIG_STATUS <<EOF | |
11043 | ||
11044 | # Protect against being on the right side of a sed subst in config.status. | |
11045 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
11046 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
11047 | $ac_vpsub | |
11048 | $extrasub | |
11049 | s%@SHELL@%$SHELL%g | |
11050 | s%@CFLAGS@%$CFLAGS%g | |
11051 | s%@CPPFLAGS@%$CPPFLAGS%g | |
11052 | s%@CXXFLAGS@%$CXXFLAGS%g | |
11053 | s%@FFLAGS@%$FFLAGS%g | |
11054 | s%@DEFS@%$DEFS%g | |
11055 | s%@LDFLAGS@%$LDFLAGS%g | |
11056 | s%@LIBS@%$LIBS%g | |
11057 | s%@exec_prefix@%$exec_prefix%g | |
11058 | s%@prefix@%$prefix%g | |
11059 | s%@program_transform_name@%$program_transform_name%g | |
11060 | s%@bindir@%$bindir%g | |
11061 | s%@sbindir@%$sbindir%g | |
11062 | s%@libexecdir@%$libexecdir%g | |
11063 | s%@datadir@%$datadir%g | |
11064 | s%@sysconfdir@%$sysconfdir%g | |
11065 | s%@sharedstatedir@%$sharedstatedir%g | |
11066 | s%@localstatedir@%$localstatedir%g | |
11067 | s%@libdir@%$libdir%g | |
11068 | s%@includedir@%$includedir%g | |
11069 | s%@oldincludedir@%$oldincludedir%g | |
11070 | s%@infodir@%$infodir%g | |
11071 | s%@mandir@%$mandir%g | |
413ccac7 AC |
11072 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
11073 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
11074 | s%@MAINT@%$MAINT%g | |
c906108c SS |
11075 | s%@CC@%$CC%g |
11076 | s%@CPP@%$CPP%g | |
11077 | s%@host@%$host%g | |
11078 | s%@host_alias@%$host_alias%g | |
11079 | s%@host_cpu@%$host_cpu%g | |
11080 | s%@host_vendor@%$host_vendor%g | |
11081 | s%@host_os@%$host_os%g | |
11082 | s%@target@%$target%g | |
11083 | s%@target_alias@%$target_alias%g | |
11084 | s%@target_cpu@%$target_cpu%g | |
11085 | s%@target_vendor@%$target_vendor%g | |
11086 | s%@target_os@%$target_os%g | |
11087 | s%@build@%$build%g | |
11088 | s%@build_alias@%$build_alias%g | |
11089 | s%@build_cpu@%$build_cpu%g | |
11090 | s%@build_vendor@%$build_vendor%g | |
11091 | s%@build_os@%$build_os%g | |
c906108c | 11092 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 11093 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
11094 | s%@ALLOCA@%$ALLOCA%g |
11095 | s%@USE_NLS@%$USE_NLS%g | |
11096 | s%@MSGFMT@%$MSGFMT%g | |
11097 | s%@GMSGFMT@%$GMSGFMT%g | |
11098 | s%@XGETTEXT@%$XGETTEXT%g | |
11099 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
11100 | s%@CATALOGS@%$CATALOGS%g | |
11101 | s%@CATOBJEXT@%$CATOBJEXT%g | |
11102 | s%@DATADIRNAME@%$DATADIRNAME%g | |
11103 | s%@GMOFILES@%$GMOFILES%g | |
11104 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
11105 | s%@INTLDEPS@%$INTLDEPS%g | |
11106 | s%@INTLLIBS@%$INTLLIBS%g | |
11107 | s%@INTLOBJS@%$INTLOBJS%g | |
11108 | s%@POFILES@%$POFILES%g | |
11109 | s%@POSUB@%$POSUB%g | |
11110 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
11111 | s%@GT_NO@%$GT_NO%g | |
11112 | s%@GT_YES@%$GT_YES%g | |
11113 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
11114 | s%@l@%$l%g | |
8dcde887 | 11115 | s%@subdirs@%$subdirs%g |
7a292a7a | 11116 | s%@AWK@%$AWK%g |
c906108c SS |
11117 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
11118 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
11119 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
11120 | s%@LN_S@%$LN_S%g |
11121 | s%@YACC@%$YACC%g | |
c906108c | 11122 | s%@AR@%$AR%g |
95ca63c4 CF |
11123 | s%@DLLTOOL@%$DLLTOOL%g |
11124 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 11125 | s%@MIG@%$MIG%g |
c906108c | 11126 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
11127 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
11128 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 11129 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 11130 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
aff38e61 | 11131 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 11132 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
11133 | s%@LIBGUI@%$LIBGUI%g |
11134 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
11135 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
11136 | s%@TCL_VERSION@%$TCL_VERSION%g | |
11137 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
11138 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
11139 | s%@TCL_CC@%$TCL_CC%g | |
11140 | s%@TCL_DEFS@%$TCL_DEFS%g | |
11141 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
11142 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
11143 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
11144 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
11145 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
11146 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
11147 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 11148 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
11149 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
11150 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
11151 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
11152 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
11153 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
11154 | s%@TK_VERSION@%$TK_VERSION%g | |
11155 | s%@TK_DEFS@%$TK_DEFS%g | |
11156 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
11157 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
11158 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
11159 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
11160 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
11161 | s%@TCLHDIR@%$TCLHDIR%g | |
11162 | s%@TKHDIR@%$TKHDIR%g | |
11163 | s%@ITCLHDIR@%$ITCLHDIR%g | |
11164 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
11165 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
11166 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
11167 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
11168 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
11169 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
11170 | s%@ITK_VERSION@%$ITK_VERSION%g | |
11171 | s%@ITK_DEFS@%$ITK_DEFS%g | |
11172 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
11173 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
11174 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
11175 | s%@X_CFLAGS@%$X_CFLAGS%g |
11176 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
11177 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
11178 | s%@TCL_DEPS@%$TCL_DEPS%g |
11179 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
11180 | s%@ITCLLIB@%$ITCLLIB%g |
11181 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
11182 | s%@ITKLIB@%$ITKLIB%g | |
11183 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
11184 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
11185 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 11186 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
11187 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
11188 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 11189 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 11190 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c SS |
11191 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
11192 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
11193 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
b3a90332 AC |
11194 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
11195 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
11196 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
11197 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
11198 | s%@target_subdir@%$target_subdir%g |
11199 | /@host_makefile_frag@/r $host_makefile_frag | |
11200 | s%@host_makefile_frag@%%g | |
11201 | /@target_makefile_frag@/r $target_makefile_frag | |
11202 | s%@target_makefile_frag@%%g | |
11203 | s%@frags@%$frags%g | |
5a2402b8 AC |
11204 | s%@xm_h@%$xm_h%g |
11205 | s%@tm_h@%$tm_h%g | |
11206 | s%@nm_h@%$nm_h%g | |
c906108c | 11207 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 11208 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
11209 | |
11210 | CEOF | |
11211 | EOF | |
11212 | ||
11213 | cat >> $CONFIG_STATUS <<\EOF | |
11214 | ||
11215 | # Split the substitutions into bite-sized pieces for seds with | |
11216 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 11217 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
11218 | ac_file=1 # Number of current file. |
11219 | ac_beg=1 # First line for current file. | |
11220 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
11221 | ac_more_lines=: | |
11222 | ac_sed_cmds="" | |
11223 | while $ac_more_lines; do | |
11224 | if test $ac_beg -gt 1; then | |
11225 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
11226 | else | |
11227 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
11228 | fi | |
11229 | if test ! -s conftest.s$ac_file; then | |
11230 | ac_more_lines=false | |
11231 | rm -f conftest.s$ac_file | |
11232 | else | |
11233 | if test -z "$ac_sed_cmds"; then | |
11234 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
11235 | else | |
11236 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
11237 | fi | |
11238 | ac_file=`expr $ac_file + 1` | |
11239 | ac_beg=$ac_end | |
11240 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
11241 | fi | |
11242 | done | |
11243 | if test -z "$ac_sed_cmds"; then | |
11244 | ac_sed_cmds=cat | |
11245 | fi | |
11246 | EOF | |
11247 | ||
11248 | cat >> $CONFIG_STATUS <<EOF | |
11249 | ||
ed952ac5 | 11250 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
11251 | EOF |
11252 | cat >> $CONFIG_STATUS <<\EOF | |
11253 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
11254 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11255 | case "$ac_file" in | |
11256 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11257 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11258 | *) ac_file_in="${ac_file}.in" ;; | |
11259 | esac | |
11260 | ||
11261 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
11262 | ||
11263 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11264 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11265 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11266 | # The file is in a subdirectory. | |
11267 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11268 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
11269 | # A "../" for each directory in $ac_dir_suffix. | |
11270 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
11271 | else | |
11272 | ac_dir_suffix= ac_dots= | |
11273 | fi | |
11274 | ||
11275 | case "$ac_given_srcdir" in | |
11276 | .) srcdir=. | |
11277 | if test -z "$ac_dots"; then top_srcdir=. | |
11278 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
11279 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
11280 | *) # Relative path. | |
11281 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
11282 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
11283 | esac | |
11284 | ||
11285 | case "$ac_given_INSTALL" in | |
11286 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11287 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11288 | esac | |
11289 | ||
11290 | echo creating "$ac_file" | |
11291 | rm -f "$ac_file" | |
11292 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
11293 | case "$ac_file" in | |
11294 | *Makefile*) ac_comsub="1i\\ | |
11295 | # $configure_input" ;; | |
11296 | *) ac_comsub= ;; | |
11297 | esac | |
11298 | ||
11299 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11300 | sed -e "$ac_comsub | |
11301 | s%@configure_input@%$configure_input%g | |
11302 | s%@srcdir@%$srcdir%g | |
11303 | s%@top_srcdir@%$top_srcdir%g | |
11304 | s%@INSTALL@%$INSTALL%g | |
11305 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
11306 | fi; done | |
11307 | rm -f conftest.s* | |
11308 | ||
11309 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
11310 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
11311 | # | |
11312 | # ac_d sets the value in "#define NAME VALUE" lines. | |
11313 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
11314 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
11315 | ac_dC='\3' | |
11316 | ac_dD='%g' | |
11317 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
11318 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11319 | ac_uB='\([ ]\)%\1#\2define\3' | |
11320 | ac_uC=' ' | |
11321 | ac_uD='\4%g' | |
11322 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
11323 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11324 | ac_eB='$%\1#\2define\3' | |
11325 | ac_eC=' ' | |
11326 | ac_eD='%g' | |
11327 | ||
11328 | if test "${CONFIG_HEADERS+set}" != set; then | |
11329 | EOF | |
11330 | cat >> $CONFIG_STATUS <<EOF | |
11331 | CONFIG_HEADERS="config.h:config.in" | |
11332 | EOF | |
11333 | cat >> $CONFIG_STATUS <<\EOF | |
11334 | fi | |
11335 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
11336 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11337 | case "$ac_file" in | |
11338 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11339 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11340 | *) ac_file_in="${ac_file}.in" ;; | |
11341 | esac | |
11342 | ||
11343 | echo creating $ac_file | |
11344 | ||
11345 | rm -f conftest.frag conftest.in conftest.out | |
11346 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11347 | cat $ac_file_inputs > conftest.in | |
11348 | ||
11349 | EOF | |
11350 | ||
11351 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
11352 | # the proper values into config.h.in to produce config.h. And first: | |
11353 | # Protect against being on the right side of a sed subst in config.status. | |
11354 | # Protect against being in an unquoted here document in config.status. | |
11355 | rm -f conftest.vals | |
11356 | cat > conftest.hdr <<\EOF | |
11357 | s/[\\&%]/\\&/g | |
11358 | s%[\\$`]%\\&%g | |
11359 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
11360 | s%ac_d%ac_u%gp | |
11361 | s%ac_u%ac_e%gp | |
11362 | EOF | |
11363 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
11364 | rm -f conftest.hdr | |
11365 | ||
11366 | # This sed command replaces #undef with comments. This is necessary, for | |
11367 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
11368 | # on some systems where configure will not decide to define it. | |
11369 | cat >> conftest.vals <<\EOF | |
11370 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
11371 | EOF | |
11372 | ||
11373 | # Break up conftest.vals because some shells have a limit on | |
11374 | # the size of here documents, and old seds have small limits too. | |
11375 | ||
11376 | rm -f conftest.tail | |
11377 | while : | |
11378 | do | |
11379 | ac_lines=`grep -c . conftest.vals` | |
11380 | # grep -c gives empty output for an empty file on some AIX systems. | |
11381 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
11382 | # Write a limited-size here document to conftest.frag. | |
11383 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
11384 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
11385 | echo 'CEOF | |
11386 | sed -f conftest.frag conftest.in > conftest.out | |
11387 | rm -f conftest.in | |
11388 | mv conftest.out conftest.in | |
11389 | ' >> $CONFIG_STATUS | |
11390 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
11391 | rm -f conftest.vals | |
11392 | mv conftest.tail conftest.vals | |
11393 | done | |
11394 | rm -f conftest.vals | |
11395 | ||
11396 | cat >> $CONFIG_STATUS <<\EOF | |
11397 | rm -f conftest.frag conftest.h | |
11398 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11399 | cat conftest.in >> conftest.h | |
11400 | rm -f conftest.in | |
11401 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11402 | echo "$ac_file is unchanged" | |
11403 | rm -f conftest.h | |
11404 | else | |
11405 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11406 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11407 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11408 | # The file is in a subdirectory. | |
11409 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11410 | fi | |
11411 | rm -f $ac_file | |
11412 | mv conftest.h $ac_file | |
11413 | fi | |
11414 | fi; done | |
11415 | ||
11416 | EOF | |
11417 | ||
11418 | cat >> $CONFIG_STATUS <<EOF | |
11419 | ac_sources="$files" | |
11420 | ac_dests="$links" | |
11421 | EOF | |
11422 | ||
11423 | cat >> $CONFIG_STATUS <<\EOF | |
11424 | srcdir=$ac_given_srcdir | |
11425 | while test -n "$ac_sources"; do | |
11426 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11427 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11428 | ||
11429 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11430 | ||
11431 | if test ! -r $srcdir/$ac_source; then | |
11432 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11433 | fi | |
11434 | rm -f $ac_dest | |
11435 | ||
11436 | # Make relative symlinks. | |
11437 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11438 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11439 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11440 | # The dest file is in a subdirectory. | |
11441 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11442 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11443 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11444 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11445 | else | |
11446 | ac_dest_dir_suffix= ac_dots= | |
11447 | fi | |
11448 | ||
11449 | case "$srcdir" in | |
11450 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11451 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11452 | esac | |
11453 | ||
11454 | # Make a symlink if possible; otherwise try a hard link. | |
11455 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11456 | ln $srcdir/$ac_source $ac_dest; then : | |
11457 | else | |
11458 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11459 | fi | |
11460 | done | |
11461 | EOF | |
11462 | cat >> $CONFIG_STATUS <<EOF | |
11463 | ||
11464 | gdb_host_cpu=$gdb_host_cpu | |
11465 | gdb_target_cpu=$gdb_target_cpu | |
11466 | nativefile=$nativefile | |
11467 | ||
11468 | EOF | |
11469 | cat >> $CONFIG_STATUS <<\EOF | |
11470 | ||
7ee6d7eb | 11471 | if test "${nativefile}" = ""; then |
c4620205 | 11472 | < Makefile \ |
e27da16d JT |
11473 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
11474 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
11475 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
11476 | > Makefile.tem | |
c906108c SS |
11477 | mv -f Makefile.tem Makefile |
11478 | fi | |
11479 | ||
11480 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
11481 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
11482 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11483 | mv -f Makefile.tmp Makefile | |
11484 | ||
2acceee2 | 11485 | |
c906108c SS |
11486 | case x$CONFIG_HEADERS in |
11487 | xconfig.h:config.in) | |
11488 | echo > stamp-h ;; | |
11489 | esac | |
11490 | ||
11491 | exit 0 | |
11492 | EOF | |
11493 | chmod +x $CONFIG_STATUS | |
11494 | rm -fr confdefs* $ac_clean_files | |
11495 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11496 | ||
11497 | if test "$no_recursion" != yes; then | |
11498 | ||
11499 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11500 | ac_sub_configure_args= | |
11501 | ac_prev= | |
11502 | for ac_arg in $ac_configure_args; do | |
11503 | if test -n "$ac_prev"; then | |
11504 | ac_prev= | |
11505 | continue | |
11506 | fi | |
11507 | case "$ac_arg" in | |
11508 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11509 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11510 | ac_prev=cache_file ;; | |
11511 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11512 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11513 | ;; | |
11514 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11515 | ac_prev=srcdir ;; | |
11516 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11517 | ;; | |
11518 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11519 | esac | |
11520 | done | |
11521 | ||
8dcde887 | 11522 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11523 | |
11524 | # Do not complain, so a configure script can configure whichever | |
11525 | # parts of a large source tree are present. | |
11526 | if test ! -d $srcdir/$ac_config_dir; then | |
11527 | continue | |
11528 | fi | |
11529 | ||
11530 | echo configuring in $ac_config_dir | |
11531 | ||
11532 | case "$srcdir" in | |
11533 | .) ;; | |
11534 | *) | |
11535 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11536 | else | |
11537 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11538 | fi | |
11539 | ;; | |
11540 | esac | |
11541 | ||
11542 | ac_popdir=`pwd` | |
11543 | cd $ac_config_dir | |
11544 | ||
11545 | # A "../" for each directory in /$ac_config_dir. | |
11546 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11547 | ||
11548 | case "$srcdir" in | |
11549 | .) # No --srcdir option. We are building in place. | |
11550 | ac_sub_srcdir=$srcdir ;; | |
11551 | /*) # Absolute path. | |
11552 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11553 | *) # Relative path. | |
11554 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11555 | esac | |
11556 | ||
11557 | # Check for guested configure; otherwise get Cygnus style configure. | |
11558 | if test -f $ac_sub_srcdir/configure; then | |
11559 | ac_sub_configure=$ac_sub_srcdir/configure | |
11560 | elif test -f $ac_sub_srcdir/configure.in; then | |
11561 | ac_sub_configure=$ac_configure | |
11562 | else | |
11563 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11564 | ac_sub_configure= | |
11565 | fi | |
11566 | ||
11567 | # The recursion is here. | |
11568 | if test -n "$ac_sub_configure"; then | |
11569 | ||
11570 | # Make the cache file name correct relative to the subdirectory. | |
11571 | case "$cache_file" in | |
11572 | /*) ac_sub_cache_file=$cache_file ;; | |
11573 | *) # Relative path. | |
11574 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11575 | esac | |
11576 | case "$ac_given_INSTALL" in | |
11577 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11578 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11579 | esac | |
11580 | ||
11581 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11582 | # The eval makes quoting arguments work. | |
11583 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11584 | then : | |
11585 | else | |
11586 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11587 | fi | |
11588 | fi | |
11589 | ||
11590 | cd $ac_popdir | |
11591 | done | |
11592 | fi | |
11593 | ||
11594 | ||
11595 | exit 0 |