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 | ||
06825bd1 MK |
3034 | # Enable TUI. |
3035 | # Check whether --enable-tui or --disable-tui was given. | |
3036 | if test "${enable_tui+set}" = set; then | |
3037 | enableval="$enable_tui" | |
3038 | case $enableval in | |
3039 | yes | no) | |
3040 | ;; | |
3041 | *) | |
3042 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3043 | esac | |
c324d747 AC |
3044 | else |
3045 | enable_tui=yes | |
06825bd1 MK |
3046 | fi |
3047 | ||
3048 | if test x"$enable_tui" = xyes; then | |
3049 | if test -d $srcdir/tui; then | |
7613d933 | 3050 | if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then |
c324d747 AC |
3051 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
3052 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3053 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3054 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3055 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
226361c4 AC |
3056 | CONFIG_ALL="${CONFIG_ALL} all-tui" |
3057 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
3058 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
3059 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
c324d747 | 3060 | fi |
06825bd1 MK |
3061 | fi |
3062 | fi | |
3063 | ||
8ee53726 MK |
3064 | # Enable gdbtk. |
3065 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3066 | if test "${enable_gdbtk+set}" = set; then | |
3067 | enableval="$enable_gdbtk" | |
3068 | case $enableval in | |
3069 | yes | no) | |
3070 | ;; | |
3071 | *) | |
3072 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3073 | esac | |
3074 | else | |
3075 | if test -d $srcdir/gdbtk; then | |
3076 | enable_gdbtk=yes | |
3077 | else | |
3078 | enable_gdbtk=no | |
3079 | fi | |
3080 | fi | |
3081 | ||
3082 | # We unconditionally disable gdbtk tests on selected platforms. | |
3083 | case $host_os in | |
3084 | go32* | windows*) | |
3085 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3086 | enable_gdbtk=no ;; | |
3087 | esac | |
3088 | ||
0e5d83e3 JJ |
3089 | # Libunwind support. |
3090 | # Check whether --with-libunwind or --without-libunwind was given. | |
3091 | if test "${with_libunwind+set}" = set; then | |
3092 | withval="$with_libunwind" | |
3093 | case "${withval}" in | |
3094 | yes) enable_libunwind=yes ;; | |
3095 | no) enable_libunwind=no ;; | |
3096 | *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;; | |
3097 | esac | |
3098 | else | |
3099 | ||
3100 | for ac_hdr in libunwind.h | |
3101 | do | |
3102 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3103 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 3104 | echo "configure:3105: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3105 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3106 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3107 | else | |
3108 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3109 | #line 3110 "configure" |
0e5d83e3 JJ |
3110 | #include "confdefs.h" |
3111 | #include <$ac_hdr> | |
3112 | EOF | |
3113 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 3114 | { (eval echo configure:3115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3115 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3116 | if test -z "$ac_err"; then | |
3117 | rm -rf conftest* | |
3118 | eval "ac_cv_header_$ac_safe=yes" | |
3119 | else | |
3120 | echo "$ac_err" >&5 | |
3121 | echo "configure: failed program was:" >&5 | |
3122 | cat conftest.$ac_ext >&5 | |
3123 | rm -rf conftest* | |
3124 | eval "ac_cv_header_$ac_safe=no" | |
3125 | fi | |
3126 | rm -f conftest* | |
3127 | fi | |
3128 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3129 | echo "$ac_t""yes" 1>&6 | |
3130 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3131 | cat >> confdefs.h <<EOF | |
3132 | #define $ac_tr_hdr 1 | |
3133 | EOF | |
3134 | ||
3135 | else | |
3136 | echo "$ac_t""no" 1>&6 | |
3137 | fi | |
3138 | done | |
3139 | ||
3140 | for ac_hdr in libunwind-ia64.h | |
3141 | do | |
3142 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3143 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 3144 | echo "configure:3145: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3145 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3146 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3147 | else | |
3148 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3149 | #line 3150 "configure" |
0e5d83e3 JJ |
3150 | #include "confdefs.h" |
3151 | #include <$ac_hdr> | |
3152 | EOF | |
3153 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 3154 | { (eval echo configure:3155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3155 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3156 | if test -z "$ac_err"; then | |
3157 | rm -rf conftest* | |
3158 | eval "ac_cv_header_$ac_safe=yes" | |
3159 | else | |
3160 | echo "$ac_err" >&5 | |
3161 | echo "configure: failed program was:" >&5 | |
3162 | cat conftest.$ac_ext >&5 | |
3163 | rm -rf conftest* | |
3164 | eval "ac_cv_header_$ac_safe=no" | |
3165 | fi | |
3166 | rm -f conftest* | |
3167 | fi | |
3168 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3169 | echo "$ac_t""yes" 1>&6 | |
3170 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3171 | cat >> confdefs.h <<EOF | |
3172 | #define $ac_tr_hdr 1 | |
3173 | EOF | |
3174 | ||
3175 | else | |
3176 | echo "$ac_t""no" 1>&6 | |
3177 | fi | |
3178 | done | |
3179 | ||
3180 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then | |
3181 | enable_libunwind=yes; | |
3182 | fi | |
3183 | ||
3184 | fi | |
3185 | ||
3186 | ||
3187 | if test x"$enable_libunwind" = xyes; then | |
3188 | for ac_hdr in libunwind.h | |
3189 | do | |
3190 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3191 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 3192 | echo "configure:3193: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3193 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3194 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3195 | else | |
3196 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3197 | #line 3198 "configure" |
0e5d83e3 JJ |
3198 | #include "confdefs.h" |
3199 | #include <$ac_hdr> | |
3200 | EOF | |
3201 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 3202 | { (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3203 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3204 | if test -z "$ac_err"; then | |
3205 | rm -rf conftest* | |
3206 | eval "ac_cv_header_$ac_safe=yes" | |
3207 | else | |
3208 | echo "$ac_err" >&5 | |
3209 | echo "configure: failed program was:" >&5 | |
3210 | cat conftest.$ac_ext >&5 | |
3211 | rm -rf conftest* | |
3212 | eval "ac_cv_header_$ac_safe=no" | |
3213 | fi | |
3214 | rm -f conftest* | |
3215 | fi | |
3216 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3217 | echo "$ac_t""yes" 1>&6 | |
3218 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3219 | cat >> confdefs.h <<EOF | |
3220 | #define $ac_tr_hdr 1 | |
3221 | EOF | |
3222 | ||
3223 | else | |
3224 | echo "$ac_t""no" 1>&6 | |
3225 | fi | |
3226 | done | |
3227 | ||
3228 | for ac_hdr in libunwind-ia64.h | |
3229 | do | |
3230 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3231 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 3232 | echo "configure:3233: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3233 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3235 | else | |
3236 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3237 | #line 3238 "configure" |
0e5d83e3 JJ |
3238 | #include "confdefs.h" |
3239 | #include <$ac_hdr> | |
3240 | EOF | |
3241 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 3242 | { (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3243 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3244 | if test -z "$ac_err"; then | |
3245 | rm -rf conftest* | |
3246 | eval "ac_cv_header_$ac_safe=yes" | |
3247 | else | |
3248 | echo "$ac_err" >&5 | |
3249 | echo "configure: failed program was:" >&5 | |
3250 | cat conftest.$ac_ext >&5 | |
3251 | rm -rf conftest* | |
3252 | eval "ac_cv_header_$ac_safe=no" | |
3253 | fi | |
3254 | rm -f conftest* | |
3255 | fi | |
3256 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3257 | echo "$ac_t""yes" 1>&6 | |
3258 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3259 | cat >> confdefs.h <<EOF | |
3260 | #define $ac_tr_hdr 1 | |
3261 | EOF | |
3262 | ||
3263 | else | |
3264 | echo "$ac_t""no" 1>&6 | |
3265 | fi | |
3266 | done | |
3267 | ||
3268 | cat >> confdefs.h <<\EOF | |
3269 | #define HAVE_LIBUNWIND 1 | |
3270 | EOF | |
3271 | ||
3272 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
3273 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
3274 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
3275 | fi | |
3276 | ||
d28f9cdf DJ |
3277 | # Profiling support. |
3278 | # Check whether --enable-profiling or --disable-profiling was given. | |
3279 | if test "${enable_profiling+set}" = set; then | |
3280 | enableval="$enable_profiling" | |
3281 | case $enableval in | |
3282 | yes | no) | |
3283 | ;; | |
3284 | *) | |
3285 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3286 | esac | |
3287 | else | |
3288 | enable_profiling=no | |
3289 | fi | |
3290 | ||
3291 | ||
d9feb4e7 DJ |
3292 | for ac_func in monstartup _mcleanup |
3293 | do | |
3294 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 3295 | echo "configure:3296: checking for $ac_func" >&5 |
d9feb4e7 | 3296 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
d28f9cdf DJ |
3297 | echo $ac_n "(cached) $ac_c" 1>&6 |
3298 | else | |
3299 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3300 | #line 3301 "configure" |
d28f9cdf DJ |
3301 | #include "confdefs.h" |
3302 | /* System header to define __stub macros and hopefully few prototypes, | |
d9feb4e7 | 3303 | which can conflict with char $ac_func(); below. */ |
d28f9cdf DJ |
3304 | #include <assert.h> |
3305 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3306 | /* We use char because int might match the return type of a gcc2 | |
3307 | builtin and then its argument prototype would still apply. */ | |
d9feb4e7 | 3308 | char $ac_func(); |
d28f9cdf DJ |
3309 | |
3310 | int main() { | |
3311 | ||
3312 | /* The GNU C library defines this for functions which it implements | |
3313 | to always fail with ENOSYS. Some functions are actually named | |
3314 | something starting with __ and the normal name is an alias. */ | |
d9feb4e7 | 3315 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
d28f9cdf DJ |
3316 | choke me |
3317 | #else | |
d9feb4e7 | 3318 | $ac_func(); |
d28f9cdf DJ |
3319 | #endif |
3320 | ||
3321 | ; return 0; } | |
3322 | EOF | |
02d62932 | 3323 | if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf | 3324 | rm -rf conftest* |
d9feb4e7 | 3325 | eval "ac_cv_func_$ac_func=yes" |
d28f9cdf DJ |
3326 | else |
3327 | echo "configure: failed program was:" >&5 | |
3328 | cat conftest.$ac_ext >&5 | |
3329 | rm -rf conftest* | |
d9feb4e7 | 3330 | eval "ac_cv_func_$ac_func=no" |
d28f9cdf DJ |
3331 | fi |
3332 | rm -f conftest* | |
3333 | fi | |
3334 | ||
d9feb4e7 | 3335 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
d28f9cdf | 3336 | echo "$ac_t""yes" 1>&6 |
d9feb4e7 DJ |
3337 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
3338 | cat >> confdefs.h <<EOF | |
3339 | #define $ac_tr_func 1 | |
3340 | EOF | |
3341 | ||
d28f9cdf DJ |
3342 | else |
3343 | echo "$ac_t""no" 1>&6 | |
d28f9cdf | 3344 | fi |
d9feb4e7 | 3345 | done |
d28f9cdf | 3346 | |
b0b1c2c0 | 3347 | echo $ac_n "checking for _etext""... $ac_c" 1>&6 |
02d62932 | 3348 | echo "configure:3349: checking for _etext" >&5 |
b0b1c2c0 MK |
3349 | if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then |
3350 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3351 | else | |
3352 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3353 | #line 3354 "configure" |
b0b1c2c0 MK |
3354 | #include "confdefs.h" |
3355 | #include <stdlib.h> | |
3356 | extern char _etext; | |
3357 | ||
3358 | int main() { | |
3359 | free (&_etext); | |
3360 | ; return 0; } | |
3361 | EOF | |
02d62932 | 3362 | if { (eval echo configure:3363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b0b1c2c0 MK |
3363 | rm -rf conftest* |
3364 | ac_cv_var__etext=yes | |
3365 | else | |
3366 | echo "configure: failed program was:" >&5 | |
3367 | cat conftest.$ac_ext >&5 | |
3368 | rm -rf conftest* | |
3369 | ac_cv_var__etext=no | |
3370 | fi | |
3371 | rm -f conftest* | |
3372 | fi | |
3373 | ||
3374 | echo "$ac_t""$ac_cv_var__etext" 1>&6 | |
3375 | if test $ac_cv_var__etext = yes; then | |
3376 | cat >> confdefs.h <<\EOF | |
3377 | #define HAVE__ETEXT 1 | |
3378 | EOF | |
3379 | ||
3380 | fi | |
d9feb4e7 DJ |
3381 | if test "$enable_profiling" = yes ; then |
3382 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
3383 | { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; } | |
3384 | fi | |
3385 | PROFILE_CFLAGS=-pg | |
3386 | OLD_CFLAGS="$CFLAGS" | |
3387 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
d28f9cdf | 3388 | |
d9feb4e7 | 3389 | echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6 |
02d62932 | 3390 | echo "configure:3391: checking whether $CC supports -pg" >&5 |
d9feb4e7 | 3391 | if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then |
d28f9cdf DJ |
3392 | echo $ac_n "(cached) $ac_c" 1>&6 |
3393 | else | |
3394 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3395 | #line 3396 "configure" |
d28f9cdf | 3396 | #include "confdefs.h" |
d28f9cdf DJ |
3397 | |
3398 | int main() { | |
d9feb4e7 | 3399 | int x; |
d28f9cdf DJ |
3400 | ; return 0; } |
3401 | EOF | |
02d62932 | 3402 | if { (eval echo configure:3403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d28f9cdf | 3403 | rm -rf conftest* |
d9feb4e7 | 3404 | ac_cv_cc_supports_pg=yes |
d28f9cdf DJ |
3405 | else |
3406 | echo "configure: failed program was:" >&5 | |
3407 | cat conftest.$ac_ext >&5 | |
3408 | rm -rf conftest* | |
d9feb4e7 | 3409 | ac_cv_cc_supports_pg=no |
d28f9cdf DJ |
3410 | fi |
3411 | rm -f conftest* | |
3412 | fi | |
3413 | ||
d9feb4e7 | 3414 | echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6 |
d28f9cdf | 3415 | |
d9feb4e7 DJ |
3416 | if test $ac_cv_cc_supports_pg = no; then |
3417 | { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; } | |
3418 | fi | |
d28f9cdf DJ |
3419 | |
3420 | CFLAGS="$OLD_CFLAGS" | |
3421 | fi | |
3422 | ||
8bb2c122 MK |
3423 | # --------------------- # |
3424 | # Checks for programs. # | |
3425 | # --------------------- # | |
3426 | ||
d836ee13 | 3427 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3428 | do |
3429 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3430 | set dummy $ac_prog; ac_word=$2 | |
3431 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
02d62932 | 3432 | echo "configure:3433: checking for $ac_word" >&5 |
7a292a7a SS |
3433 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3434 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3435 | else | |
3436 | if test -n "$AWK"; then | |
3437 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3438 | else | |
3439 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3440 | ac_dummy="$PATH" | |
3441 | for ac_dir in $ac_dummy; do | |
3442 | test -z "$ac_dir" && ac_dir=. | |
3443 | if test -f $ac_dir/$ac_word; then | |
3444 | ac_cv_prog_AWK="$ac_prog" | |
3445 | break | |
3446 | fi | |
3447 | done | |
3448 | IFS="$ac_save_ifs" | |
3449 | fi | |
3450 | fi | |
3451 | AWK="$ac_cv_prog_AWK" | |
3452 | if test -n "$AWK"; then | |
3453 | echo "$ac_t""$AWK" 1>&6 | |
3454 | else | |
3455 | echo "$ac_t""no" 1>&6 | |
3456 | fi | |
3457 | ||
3458 | test -n "$AWK" && break | |
3459 | done | |
3460 | ||
c906108c SS |
3461 | # Find a good install program. We prefer a C program (faster), |
3462 | # so one script is as good as another. But avoid the broken or | |
3463 | # incompatible versions: | |
3464 | # SysV /etc/install, /usr/sbin/install | |
3465 | # SunOS /usr/etc/install | |
3466 | # IRIX /sbin/install | |
3467 | # AIX /bin/install | |
3468 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3469 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3470 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3471 | # ./install, which can be erroneously created by make from ./install.sh. | |
3472 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
02d62932 | 3473 | echo "configure:3474: checking for a BSD compatible install" >&5 |
c906108c SS |
3474 | if test -z "$INSTALL"; then |
3475 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3476 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3477 | else | |
3478 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3479 | for ac_dir in $PATH; do | |
3480 | # Account for people who put trailing slashes in PATH elements. | |
3481 | case "$ac_dir/" in | |
3482 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3483 | *) | |
3484 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3485 | # Don't use installbsd from OSF since it installs stuff as root | |
3486 | # by default. | |
3487 | for ac_prog in ginstall scoinst install; do | |
3488 | if test -f $ac_dir/$ac_prog; then | |
3489 | if test $ac_prog = install && | |
3490 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3491 | # AIX install. It has an incompatible calling convention. | |
3492 | : | |
3493 | else | |
3494 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3495 | break 2 | |
3496 | fi | |
3497 | fi | |
3498 | done | |
3499 | ;; | |
3500 | esac | |
3501 | done | |
3502 | IFS="$ac_save_IFS" | |
3503 | ||
3504 | fi | |
3505 | if test "${ac_cv_path_install+set}" = set; then | |
3506 | INSTALL="$ac_cv_path_install" | |
3507 | else | |
3508 | # As a last resort, use the slow shell script. We don't cache a | |
3509 | # path for INSTALL within a source directory, because that will | |
3510 | # break other packages using the cache if that directory is | |
3511 | # removed, or if the path is relative. | |
3512 | INSTALL="$ac_install_sh" | |
3513 | fi | |
3514 | fi | |
3515 | echo "$ac_t""$INSTALL" 1>&6 | |
3516 | ||
3517 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3518 | # It thinks the first close brace ends the variable substitution. | |
3519 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3520 | ||
3521 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3522 | ||
3523 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3524 | ||
8bb2c122 | 3525 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
02d62932 | 3526 | echo "configure:3527: checking whether ln -s works" >&5 |
8bb2c122 MK |
3527 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3528 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3529 | else |
8bb2c122 MK |
3530 | rm -f conftestdata |
3531 | if ln -s X conftestdata 2>/dev/null | |
3532 | then | |
3533 | rm -f conftestdata | |
3534 | ac_cv_prog_LN_S="ln -s" | |
3535 | else | |
3536 | ac_cv_prog_LN_S=ln | |
3537 | fi | |
3538 | fi | |
3539 | LN_S="$ac_cv_prog_LN_S" | |
3540 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3541 | echo "$ac_t""yes" 1>&6 | |
3542 | else | |
3543 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3544 | fi |
3545 | ||
8bb2c122 MK |
3546 | # Extract the first word of "ranlib", so it can be a program name with args. |
3547 | set dummy ranlib; ac_word=$2 | |
c906108c | 3548 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
02d62932 | 3549 | echo "configure:3550: checking for $ac_word" >&5 |
8bb2c122 | 3550 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3551 | echo $ac_n "(cached) $ac_c" 1>&6 |
3552 | else | |
8bb2c122 MK |
3553 | if test -n "$RANLIB"; then |
3554 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3555 | else |
3556 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3557 | ac_dummy="$PATH" | |
3558 | for ac_dir in $ac_dummy; do | |
3559 | test -z "$ac_dir" && ac_dir=. | |
3560 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3561 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3562 | break |
3563 | fi | |
3564 | done | |
3565 | IFS="$ac_save_ifs" | |
8bb2c122 | 3566 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3567 | fi |
3568 | fi | |
8bb2c122 MK |
3569 | RANLIB="$ac_cv_prog_RANLIB" |
3570 | if test -n "$RANLIB"; then | |
3571 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3572 | else |
3573 | echo "$ac_t""no" 1>&6 | |
3574 | fi | |
3575 | ||
8bb2c122 MK |
3576 | for ac_prog in 'bison -y' byacc |
3577 | do | |
3578 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3579 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3580 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
02d62932 | 3581 | echo "configure:3582: checking for $ac_word" >&5 |
8bb2c122 | 3582 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3583 | echo $ac_n "(cached) $ac_c" 1>&6 |
3584 | else | |
8bb2c122 MK |
3585 | if test -n "$YACC"; then |
3586 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3587 | else |
3588 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3589 | ac_dummy="$PATH" | |
3590 | for ac_dir in $ac_dummy; do | |
3591 | test -z "$ac_dir" && ac_dir=. | |
3592 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3593 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3594 | break |
3595 | fi | |
3596 | done | |
3597 | IFS="$ac_save_ifs" | |
3598 | fi | |
3599 | fi | |
8bb2c122 MK |
3600 | YACC="$ac_cv_prog_YACC" |
3601 | if test -n "$YACC"; then | |
3602 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3603 | else |
3604 | echo "$ac_t""no" 1>&6 | |
3605 | fi | |
3606 | ||
8bb2c122 MK |
3607 | test -n "$YACC" && break |
3608 | done | |
3609 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3610 | |
8bb2c122 MK |
3611 | |
3612 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3613 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3614 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
02d62932 | 3615 | echo "configure:3616: checking for $ac_word" >&5 |
8bb2c122 | 3616 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3617 | echo $ac_n "(cached) $ac_c" 1>&6 |
3618 | else | |
8bb2c122 MK |
3619 | if test -n "$AR"; then |
3620 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3621 | else |
3622 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3623 | ac_dummy="$PATH" | |
3624 | for ac_dir in $ac_dummy; do | |
3625 | test -z "$ac_dir" && ac_dir=. | |
3626 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3627 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3628 | break |
3629 | fi | |
3630 | done | |
3631 | IFS="$ac_save_ifs" | |
8bb2c122 | 3632 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3633 | fi |
3634 | fi | |
8bb2c122 MK |
3635 | AR="$ac_cv_prog_AR" |
3636 | if test -n "$AR"; then | |
3637 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3638 | else |
3639 | echo "$ac_t""no" 1>&6 | |
3640 | fi | |
3641 | ||
8bb2c122 | 3642 | |
c906108c | 3643 | |
95ca63c4 CF |
3644 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3645 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3646 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
02d62932 | 3647 | echo "configure:3648: checking for $ac_word" >&5 |
95ca63c4 CF |
3648 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3649 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3650 | else | |
3651 | if test -n "$DLLTOOL"; then | |
3652 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3653 | else | |
3654 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3655 | ac_dummy="$PATH" | |
3656 | for ac_dir in $ac_dummy; do | |
3657 | test -z "$ac_dir" && ac_dir=. | |
3658 | if test -f $ac_dir/$ac_word; then | |
3659 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3660 | break | |
3661 | fi | |
3662 | done | |
3663 | IFS="$ac_save_ifs" | |
3664 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3665 | fi | |
3666 | fi | |
3667 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3668 | if test -n "$DLLTOOL"; then | |
3669 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3670 | else | |
3671 | echo "$ac_t""no" 1>&6 | |
3672 | fi | |
3673 | ||
3674 | ||
3675 | ||
3676 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3677 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3678 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
02d62932 | 3679 | echo "configure:3680: checking for $ac_word" >&5 |
95ca63c4 CF |
3680 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3681 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3682 | else | |
3683 | if test -n "$WINDRES"; then | |
3684 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3685 | else | |
3686 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3687 | ac_dummy="$PATH" | |
3688 | for ac_dir in $ac_dummy; do | |
3689 | test -z "$ac_dir" && ac_dir=. | |
3690 | if test -f $ac_dir/$ac_word; then | |
3691 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3692 | break | |
3693 | fi | |
3694 | done | |
3695 | IFS="$ac_save_ifs" | |
3696 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3697 | fi | |
3698 | fi | |
3699 | WINDRES="$ac_cv_prog_WINDRES" | |
3700 | if test -n "$WINDRES"; then | |
3701 | echo "$ac_t""$WINDRES" 1>&6 | |
3702 | else | |
3703 | echo "$ac_t""no" 1>&6 | |
3704 | fi | |
3705 | ||
3706 | ||
3707 | ||
c906108c | 3708 | |
8bb2c122 | 3709 | # Needed for GNU/Hurd. |
75c6e08a MK |
3710 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3711 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3712 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
02d62932 | 3713 | echo "configure:3714: checking for $ac_word" >&5 |
75c6e08a MK |
3714 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3715 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3716 | else | |
3717 | if test -n "$MIG"; then | |
3718 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3719 | else | |
3720 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3721 | ac_dummy="$PATH" | |
3722 | for ac_dir in $ac_dummy; do | |
3723 | test -z "$ac_dir" && ac_dir=. | |
3724 | if test -f $ac_dir/$ac_word; then | |
3725 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3726 | break | |
3727 | fi | |
3728 | done | |
3729 | IFS="$ac_save_ifs" | |
3730 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3731 | fi | |
3732 | fi | |
3733 | MIG="$ac_cv_prog_MIG" | |
3734 | if test -n "$MIG"; then | |
3735 | echo "$ac_t""$MIG" 1>&6 | |
3736 | else | |
3737 | echo "$ac_t""no" 1>&6 | |
3738 | fi | |
3739 | ||
3740 | ||
3741 | ||
3742 | ||
9a156167 MK |
3743 | # ---------------------- # |
3744 | # Checks for libraries. # | |
3745 | # ---------------------- # | |
3746 | ||
3747 | # We might need to link with -lm; most simulators need it. | |
3748 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
02d62932 | 3749 | echo "configure:3750: checking for main in -lm" >&5 |
9a156167 MK |
3750 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3751 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3752 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3753 | else | |
3754 | ac_save_LIBS="$LIBS" | |
3755 | LIBS="-lm $LIBS" | |
3756 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3757 | #line 3758 "configure" |
9a156167 MK |
3758 | #include "confdefs.h" |
3759 | ||
3760 | int main() { | |
3761 | main() | |
3762 | ; return 0; } | |
3763 | EOF | |
02d62932 | 3764 | if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3765 | rm -rf conftest* |
3766 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3767 | else | |
3768 | echo "configure: failed program was:" >&5 | |
3769 | cat conftest.$ac_ext >&5 | |
3770 | rm -rf conftest* | |
3771 | eval "ac_cv_lib_$ac_lib_var=no" | |
3772 | fi | |
3773 | rm -f conftest* | |
3774 | LIBS="$ac_save_LIBS" | |
3775 | ||
3776 | fi | |
3777 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3778 | echo "$ac_t""yes" 1>&6 | |
3779 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3780 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3781 | cat >> confdefs.h <<EOF | |
3782 | #define $ac_tr_lib 1 | |
3783 | EOF | |
3784 | ||
3785 | LIBS="-lm $LIBS" | |
3786 | ||
3787 | else | |
3788 | echo "$ac_t""no" 1>&6 | |
3789 | fi | |
3790 | ||
3791 | ||
3792 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3793 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3794 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3795 | # is known to have this problem). Therefore we avoid libw if we can. | |
3796 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
02d62932 | 3797 | echo "configure:3798: checking for wctype" >&5 |
9a156167 MK |
3798 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3799 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3800 | else | |
3801 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3802 | #line 3803 "configure" |
9a156167 MK |
3803 | #include "confdefs.h" |
3804 | /* System header to define __stub macros and hopefully few prototypes, | |
3805 | which can conflict with char wctype(); below. */ | |
3806 | #include <assert.h> | |
3807 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3808 | /* We use char because int might match the return type of a gcc2 | |
3809 | builtin and then its argument prototype would still apply. */ | |
3810 | char wctype(); | |
3811 | ||
3812 | int main() { | |
3813 | ||
3814 | /* The GNU C library defines this for functions which it implements | |
3815 | to always fail with ENOSYS. Some functions are actually named | |
3816 | something starting with __ and the normal name is an alias. */ | |
3817 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3818 | choke me | |
3819 | #else | |
3820 | wctype(); | |
3821 | #endif | |
3822 | ||
3823 | ; return 0; } | |
3824 | EOF | |
02d62932 | 3825 | if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3826 | rm -rf conftest* |
3827 | eval "ac_cv_func_wctype=yes" | |
3828 | else | |
3829 | echo "configure: failed program was:" >&5 | |
3830 | cat conftest.$ac_ext >&5 | |
3831 | rm -rf conftest* | |
3832 | eval "ac_cv_func_wctype=no" | |
3833 | fi | |
3834 | rm -f conftest* | |
3835 | fi | |
3836 | ||
3837 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3838 | echo "$ac_t""yes" 1>&6 | |
3839 | : | |
3840 | else | |
3841 | echo "$ac_t""no" 1>&6 | |
3842 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
02d62932 | 3843 | echo "configure:3844: checking for wctype in -lw" >&5 |
9a156167 MK |
3844 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3845 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3847 | else | |
3848 | ac_save_LIBS="$LIBS" | |
3849 | LIBS="-lw $LIBS" | |
3850 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3851 | #line 3852 "configure" |
9a156167 MK |
3852 | #include "confdefs.h" |
3853 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3854 | /* We use char because int might match the return type of a gcc2 | |
3855 | builtin and then its argument prototype would still apply. */ | |
3856 | char wctype(); | |
3857 | ||
3858 | int main() { | |
3859 | wctype() | |
3860 | ; return 0; } | |
3861 | EOF | |
02d62932 | 3862 | if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3863 | rm -rf conftest* |
3864 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3865 | else | |
3866 | echo "configure: failed program was:" >&5 | |
3867 | cat conftest.$ac_ext >&5 | |
3868 | rm -rf conftest* | |
3869 | eval "ac_cv_lib_$ac_lib_var=no" | |
3870 | fi | |
3871 | rm -f conftest* | |
3872 | LIBS="$ac_save_LIBS" | |
3873 | ||
3874 | fi | |
3875 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3876 | echo "$ac_t""yes" 1>&6 | |
3877 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3878 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3879 | cat >> confdefs.h <<EOF | |
3880 | #define $ac_tr_lib 1 | |
3881 | EOF | |
3882 | ||
3883 | LIBS="-lw $LIBS" | |
3884 | ||
3885 | else | |
3886 | echo "$ac_t""no" 1>&6 | |
3887 | fi | |
3888 | ||
3889 | fi | |
3890 | ||
3891 | ||
c890192f MK |
3892 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
3893 | ||
3894 | echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 | |
02d62932 | 3895 | echo "configure:3896: checking for library containing gethostbyname" >&5 |
c890192f MK |
3896 | if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then |
3897 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3898 | else | |
3899 | ac_func_search_save_LIBS="$LIBS" | |
3900 | ac_cv_search_gethostbyname="no" | |
3901 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3902 | #line 3903 "configure" |
c890192f MK |
3903 | #include "confdefs.h" |
3904 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3905 | /* We use char because int might match the return type of a gcc2 | |
3906 | builtin and then its argument prototype would still apply. */ | |
3907 | char gethostbyname(); | |
3908 | ||
3909 | int main() { | |
3910 | gethostbyname() | |
3911 | ; return 0; } | |
3912 | EOF | |
02d62932 | 3913 | if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3914 | rm -rf conftest* |
3915 | ac_cv_search_gethostbyname="none required" | |
3916 | else | |
3917 | echo "configure: failed program was:" >&5 | |
3918 | cat conftest.$ac_ext >&5 | |
3919 | fi | |
3920 | rm -f conftest* | |
3921 | test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do | |
3922 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3923 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3924 | #line 3925 "configure" |
c890192f MK |
3925 | #include "confdefs.h" |
3926 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3927 | /* We use char because int might match the return type of a gcc2 | |
3928 | builtin and then its argument prototype would still apply. */ | |
3929 | char gethostbyname(); | |
3930 | ||
3931 | int main() { | |
3932 | gethostbyname() | |
3933 | ; return 0; } | |
3934 | EOF | |
02d62932 | 3935 | if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3936 | rm -rf conftest* |
3937 | ac_cv_search_gethostbyname="-l$i" | |
3938 | break | |
3939 | else | |
3940 | echo "configure: failed program was:" >&5 | |
3941 | cat conftest.$ac_ext >&5 | |
3942 | fi | |
3943 | rm -f conftest* | |
3944 | done | |
3945 | LIBS="$ac_func_search_save_LIBS" | |
3946 | fi | |
3947 | ||
3948 | echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6 | |
3949 | if test "$ac_cv_search_gethostbyname" != "no"; then | |
3950 | test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" | |
3951 | ||
3952 | else : | |
3953 | ||
3954 | fi | |
3955 | ||
9a156167 MK |
3956 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
3957 | ||
3958 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
02d62932 | 3959 | echo "configure:3960: checking for library containing socketpair" >&5 |
9a156167 MK |
3960 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3961 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3962 | else | |
3963 | ac_func_search_save_LIBS="$LIBS" | |
3964 | ac_cv_search_socketpair="no" | |
3965 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3966 | #line 3967 "configure" |
9a156167 MK |
3967 | #include "confdefs.h" |
3968 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3969 | /* We use char because int might match the return type of a gcc2 | |
3970 | builtin and then its argument prototype would still apply. */ | |
3971 | char socketpair(); | |
3972 | ||
3973 | int main() { | |
3974 | socketpair() | |
3975 | ; return 0; } | |
3976 | EOF | |
02d62932 | 3977 | if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3978 | rm -rf conftest* |
3979 | ac_cv_search_socketpair="none required" | |
3980 | else | |
3981 | echo "configure: failed program was:" >&5 | |
3982 | cat conftest.$ac_ext >&5 | |
3983 | fi | |
3984 | rm -f conftest* | |
3985 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3986 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3987 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 3988 | #line 3989 "configure" |
9a156167 MK |
3989 | #include "confdefs.h" |
3990 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3991 | /* We use char because int might match the return type of a gcc2 | |
3992 | builtin and then its argument prototype would still apply. */ | |
3993 | char socketpair(); | |
3994 | ||
3995 | int main() { | |
3996 | socketpair() | |
3997 | ; return 0; } | |
3998 | EOF | |
02d62932 | 3999 | if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4000 | rm -rf conftest* |
4001 | ac_cv_search_socketpair="-l$i" | |
4002 | break | |
4003 | else | |
4004 | echo "configure: failed program was:" >&5 | |
4005 | cat conftest.$ac_ext >&5 | |
4006 | fi | |
4007 | rm -f conftest* | |
4008 | done | |
4009 | LIBS="$ac_func_search_save_LIBS" | |
4010 | fi | |
4011 | ||
4012 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
4013 | if test "$ac_cv_search_socketpair" != "no"; then | |
4014 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
4015 | ||
4016 | else : | |
4017 | ||
4018 | fi | |
4019 | ||
06825bd1 MK |
4020 | # Since GDB uses Readline, we need termcap functionality, so we need |
4021 | # to find a library that provides that. When GDB is configured with | |
c324d747 | 4022 | # the TUI, we need full curses functionality. |
06825bd1 MK |
4023 | |
4024 | case $host_os in | |
4025 | cygwin*) | |
4026 | if test -d $srcdir/libtermcap; then | |
4027 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
4028 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
4029 | fi ;; | |
40a7debc | 4030 | go32* | *djgpp*) |
06825bd1 MK |
4031 | ac_cv_search_tgetent="none required" |
4032 | ;; | |
4033 | aix*) | |
4034 | # Readline prefers curses over termcap on AIX. | |
4035 | # ??? Why? | |
4036 | ||
4037 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
02d62932 | 4038 | echo "configure:4039: checking for library containing tgetent" >&5 |
06825bd1 MK |
4039 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4040 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4041 | else | |
4042 | ac_func_search_save_LIBS="$LIBS" | |
4043 | ac_cv_search_tgetent="no" | |
4044 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4045 | #line 4046 "configure" |
06825bd1 MK |
4046 | #include "confdefs.h" |
4047 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4048 | /* We use char because int might match the return type of a gcc2 | |
4049 | builtin and then its argument prototype would still apply. */ | |
4050 | char tgetent(); | |
4051 | ||
4052 | int main() { | |
4053 | tgetent() | |
4054 | ; return 0; } | |
4055 | EOF | |
02d62932 | 4056 | if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4057 | rm -rf conftest* |
4058 | ac_cv_search_tgetent="none required" | |
4059 | else | |
4060 | echo "configure: failed program was:" >&5 | |
4061 | cat conftest.$ac_ext >&5 | |
4062 | fi | |
4063 | rm -f conftest* | |
4064 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
4065 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4066 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4067 | #line 4068 "configure" |
06825bd1 MK |
4068 | #include "confdefs.h" |
4069 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4070 | /* We use char because int might match the return type of a gcc2 | |
4071 | builtin and then its argument prototype would still apply. */ | |
4072 | char tgetent(); | |
4073 | ||
4074 | int main() { | |
4075 | tgetent() | |
4076 | ; return 0; } | |
4077 | EOF | |
02d62932 | 4078 | if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4079 | rm -rf conftest* |
4080 | ac_cv_search_tgetent="-l$i" | |
4081 | break | |
4082 | else | |
4083 | echo "configure: failed program was:" >&5 | |
4084 | cat conftest.$ac_ext >&5 | |
4085 | fi | |
4086 | rm -f conftest* | |
4087 | done | |
4088 | LIBS="$ac_func_search_save_LIBS" | |
4089 | fi | |
4090 | ||
4091 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4092 | if test "$ac_cv_search_tgetent" != "no"; then | |
4093 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4094 | ||
4095 | else : | |
4096 | ||
4097 | fi | |
4098 | ;; | |
4099 | esac | |
4100 | ||
4101 | # Note: We used to check for libtermlib and libterminfo too, but | |
4102 | # Readline doesn't, so I think we're safe with leaving them out. | |
4103 | ||
4104 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
02d62932 | 4105 | echo "configure:4106: checking for library containing tgetent" >&5 |
06825bd1 MK |
4106 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4108 | else | |
4109 | ac_func_search_save_LIBS="$LIBS" | |
4110 | ac_cv_search_tgetent="no" | |
4111 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4112 | #line 4113 "configure" |
06825bd1 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 tgetent(); | |
4118 | ||
4119 | int main() { | |
4120 | tgetent() | |
4121 | ; return 0; } | |
4122 | EOF | |
02d62932 | 4123 | if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4124 | rm -rf conftest* |
4125 | ac_cv_search_tgetent="none required" | |
4126 | else | |
4127 | echo "configure: failed program was:" >&5 | |
4128 | cat conftest.$ac_ext >&5 | |
4129 | fi | |
4130 | rm -f conftest* | |
4131 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
4132 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4133 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4134 | #line 4135 "configure" |
06825bd1 MK |
4135 | #include "confdefs.h" |
4136 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4137 | /* We use char because int might match the return type of a gcc2 | |
4138 | builtin and then its argument prototype would still apply. */ | |
4139 | char tgetent(); | |
4140 | ||
4141 | int main() { | |
4142 | tgetent() | |
4143 | ; return 0; } | |
4144 | EOF | |
02d62932 | 4145 | if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4146 | rm -rf conftest* |
4147 | ac_cv_search_tgetent="-l$i" | |
4148 | break | |
4149 | else | |
4150 | echo "configure: failed program was:" >&5 | |
4151 | cat conftest.$ac_ext >&5 | |
4152 | fi | |
4153 | rm -f conftest* | |
4154 | done | |
4155 | LIBS="$ac_func_search_save_LIBS" | |
4156 | fi | |
4157 | ||
4158 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4159 | if test "$ac_cv_search_tgetent" != "no"; then | |
4160 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4161 | ||
4162 | else : | |
4163 | ||
4164 | fi | |
4165 | ||
4166 | if test "$ac_cv_search_tgetent" = no; then | |
4167 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
4168 | fi | |
4169 | ||
02d62932 MC |
4170 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over |
4171 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
4172 | # Makefile fragments. That's why we need to have `Hcurses' before | |
4173 | # `curses'. I don't see why we should use HP curses if a more | |
4174 | # standard curses is available, except that according to HP's | |
4175 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
4176 | # HP-UX 10.10 and 10.20. | |
4177 | ||
4178 | case $host_os in | |
4179 | osf5.*) | |
4180 | # ncurses does not work on native alphaev68-dec-osf5.1 | |
4181 | # -- chastain 2004-04-24 | |
4182 | ||
4183 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
4184 | echo "configure:4185: checking for library containing initscr" >&5 | |
4185 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then | |
4186 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4187 | else | |
4188 | ac_func_search_save_LIBS="$LIBS" | |
4189 | ac_cv_search_initscr="no" | |
4190 | cat > conftest.$ac_ext <<EOF | |
4191 | #line 4192 "configure" | |
4192 | #include "confdefs.h" | |
4193 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4194 | /* We use char because int might match the return type of a gcc2 | |
4195 | builtin and then its argument prototype would still apply. */ | |
4196 | char initscr(); | |
4197 | ||
4198 | int main() { | |
4199 | initscr() | |
4200 | ; return 0; } | |
4201 | EOF | |
4202 | if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4203 | rm -rf conftest* | |
4204 | ac_cv_search_initscr="none required" | |
4205 | else | |
4206 | echo "configure: failed program was:" >&5 | |
4207 | cat conftest.$ac_ext >&5 | |
4208 | fi | |
4209 | rm -f conftest* | |
4210 | test "$ac_cv_search_initscr" = "no" && for i in curses; do | |
4211 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4212 | cat > conftest.$ac_ext <<EOF | |
4213 | #line 4214 "configure" | |
4214 | #include "confdefs.h" | |
4215 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4216 | /* We use char because int might match the return type of a gcc2 | |
4217 | builtin and then its argument prototype would still apply. */ | |
4218 | char initscr(); | |
4219 | ||
4220 | int main() { | |
4221 | initscr() | |
4222 | ; return 0; } | |
4223 | EOF | |
4224 | if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4225 | rm -rf conftest* | |
4226 | ac_cv_search_initscr="-l$i" | |
4227 | break | |
4228 | else | |
4229 | echo "configure: failed program was:" >&5 | |
4230 | cat conftest.$ac_ext >&5 | |
4231 | fi | |
4232 | rm -f conftest* | |
4233 | done | |
4234 | LIBS="$ac_func_search_save_LIBS" | |
4235 | fi | |
4236 | ||
4237 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
4238 | if test "$ac_cv_search_initscr" != "no"; then | |
4239 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
4240 | ||
4241 | else : | |
4242 | echo "configure: warning: no curses library found" 1>&2 | |
4243 | fi | |
4244 | ;; | |
4245 | *) | |
4246 | ||
4247 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
4248 | echo "configure:4249: checking for library containing initscr" >&5 | |
4249 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then | |
4250 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4251 | else | |
4252 | ac_func_search_save_LIBS="$LIBS" | |
4253 | ac_cv_search_initscr="no" | |
4254 | cat > conftest.$ac_ext <<EOF | |
4255 | #line 4256 "configure" | |
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 initscr(); | |
4261 | ||
4262 | int main() { | |
4263 | initscr() | |
4264 | ; return 0; } | |
4265 | EOF | |
4266 | if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4267 | rm -rf conftest* | |
4268 | ac_cv_search_initscr="none required" | |
4269 | else | |
4270 | echo "configure: failed program was:" >&5 | |
4271 | cat conftest.$ac_ext >&5 | |
4272 | fi | |
4273 | rm -f conftest* | |
4274 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do | |
4275 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4276 | cat > conftest.$ac_ext <<EOF | |
4277 | #line 4278 "configure" | |
4278 | #include "confdefs.h" | |
4279 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4280 | /* We use char because int might match the return type of a gcc2 | |
4281 | builtin and then its argument prototype would still apply. */ | |
4282 | char initscr(); | |
4283 | ||
4284 | int main() { | |
4285 | initscr() | |
4286 | ; return 0; } | |
4287 | EOF | |
4288 | if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4289 | rm -rf conftest* | |
4290 | ac_cv_search_initscr="-l$i" | |
4291 | break | |
4292 | else | |
4293 | echo "configure: failed program was:" >&5 | |
4294 | cat conftest.$ac_ext >&5 | |
4295 | fi | |
4296 | rm -f conftest* | |
4297 | done | |
4298 | LIBS="$ac_func_search_save_LIBS" | |
4299 | fi | |
4300 | ||
4301 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
4302 | if test "$ac_cv_search_initscr" != "no"; then | |
4303 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
4304 | ||
4305 | else : | |
4306 | echo "configure: warning: no curses library found" 1>&2 | |
4307 | fi | |
4308 | ;; | |
4309 | esac | |
4310 | ||
4311 | # Check whether the wborder function is provided by the curses | |
4312 | # library detected above. In certain implementations such as | |
4313 | # the HP/UX Hcurses for instance, this function is provided by an | |
4314 | # additional library. So if we did not find this function inside | |
4315 | # the curses library, try some alternate libraries we know might | |
4316 | # provide it. | |
4317 | ||
4318 | echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6 | |
4319 | echo "configure:4320: checking for library containing wborder" >&5 | |
4320 | if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then | |
4321 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4322 | else | |
4323 | ac_func_search_save_LIBS="$LIBS" | |
4324 | ac_cv_search_wborder="no" | |
4325 | cat > conftest.$ac_ext <<EOF | |
4326 | #line 4327 "configure" | |
4327 | #include "confdefs.h" | |
4328 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4329 | /* We use char because int might match the return type of a gcc2 | |
4330 | builtin and then its argument prototype would still apply. */ | |
4331 | char wborder(); | |
4332 | ||
4333 | int main() { | |
4334 | wborder() | |
4335 | ; return 0; } | |
4336 | EOF | |
4337 | if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4338 | rm -rf conftest* | |
4339 | ac_cv_search_wborder="none required" | |
4340 | else | |
4341 | echo "configure: failed program was:" >&5 | |
4342 | cat conftest.$ac_ext >&5 | |
4343 | fi | |
4344 | rm -f conftest* | |
4345 | test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do | |
4346 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4347 | cat > conftest.$ac_ext <<EOF | |
4348 | #line 4349 "configure" | |
4349 | #include "confdefs.h" | |
4350 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4351 | /* We use char because int might match the return type of a gcc2 | |
4352 | builtin and then its argument prototype would still apply. */ | |
4353 | char wborder(); | |
4354 | ||
4355 | int main() { | |
4356 | wborder() | |
4357 | ; return 0; } | |
4358 | EOF | |
4359 | if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4360 | rm -rf conftest* | |
4361 | ac_cv_search_wborder="-l$i" | |
4362 | break | |
4363 | else | |
4364 | echo "configure: failed program was:" >&5 | |
4365 | cat conftest.$ac_ext >&5 | |
4366 | fi | |
4367 | rm -f conftest* | |
4368 | done | |
4369 | LIBS="$ac_func_search_save_LIBS" | |
4370 | fi | |
4371 | ||
4372 | echo "$ac_t""$ac_cv_search_wborder" 1>&6 | |
4373 | if test "$ac_cv_search_wborder" != "no"; then | |
4374 | test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS" | |
4375 | ||
4376 | else : | |
4377 | echo "configure: warning: wborder function not found, tui will be disabled" 1>&2 | |
4378 | fi | |
4379 | ||
5ee754fc MK |
4380 | # ------------------------- # |
4381 | # Checks for header files. # | |
4382 | # ------------------------- # | |
4383 | ||
4384 | ac_header_dirent=no | |
4385 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4386 | do | |
4387 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4388 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
02d62932 | 4389 | echo "configure:4390: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 4390 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
4391 | echo $ac_n "(cached) $ac_c" 1>&6 |
4392 | else | |
4393 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4394 | #line 4395 "configure" |
c906108c SS |
4395 | #include "confdefs.h" |
4396 | #include <sys/types.h> | |
5ee754fc MK |
4397 | #include <$ac_hdr> |
4398 | int main() { | |
4399 | DIR *dirp = 0; | |
4400 | ; return 0; } | |
4401 | EOF | |
02d62932 | 4402 | if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4403 | rm -rf conftest* |
4404 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4405 | else | |
4406 | echo "configure: failed program was:" >&5 | |
4407 | cat conftest.$ac_ext >&5 | |
4408 | rm -rf conftest* | |
4409 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4410 | fi | |
4411 | rm -f conftest* | |
4412 | fi | |
4413 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4414 | echo "$ac_t""yes" 1>&6 | |
4415 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4416 | cat >> confdefs.h <<EOF | |
4417 | #define $ac_tr_hdr 1 | |
4418 | EOF | |
4419 | ac_header_dirent=$ac_hdr; break | |
4420 | else | |
4421 | echo "$ac_t""no" 1>&6 | |
4422 | fi | |
4423 | done | |
4424 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4425 | if test $ac_header_dirent = dirent.h; then | |
4426 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
02d62932 | 4427 | echo "configure:4428: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4428 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4429 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4430 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4431 | else | |
4432 | ac_save_LIBS="$LIBS" | |
4433 | LIBS="-ldir $LIBS" | |
4434 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4435 | #line 4436 "configure" |
5ee754fc MK |
4436 | #include "confdefs.h" |
4437 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4438 | /* We use char because int might match the return type of a gcc2 | |
4439 | builtin and then its argument prototype would still apply. */ | |
4440 | char opendir(); | |
c906108c SS |
4441 | |
4442 | int main() { | |
5ee754fc | 4443 | opendir() |
c906108c SS |
4444 | ; return 0; } |
4445 | EOF | |
02d62932 | 4446 | if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4447 | rm -rf conftest* |
5ee754fc | 4448 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4449 | else |
4450 | echo "configure: failed program was:" >&5 | |
4451 | cat conftest.$ac_ext >&5 | |
4452 | rm -rf conftest* | |
5ee754fc | 4453 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4454 | fi |
4455 | rm -f conftest* | |
5ee754fc MK |
4456 | LIBS="$ac_save_LIBS" |
4457 | ||
4458 | fi | |
4459 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4460 | echo "$ac_t""yes" 1>&6 | |
4461 | LIBS="$LIBS -ldir" | |
4462 | else | |
4463 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4464 | fi |
4465 | ||
5ee754fc MK |
4466 | else |
4467 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
02d62932 | 4468 | echo "configure:4469: checking for opendir in -lx" >&5 |
5ee754fc MK |
4469 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4470 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4471 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4472 | else | |
4473 | ac_save_LIBS="$LIBS" | |
4474 | LIBS="-lx $LIBS" | |
4475 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4476 | #line 4477 "configure" |
5ee754fc MK |
4477 | #include "confdefs.h" |
4478 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4479 | /* We use char because int might match the return type of a gcc2 | |
4480 | builtin and then its argument prototype would still apply. */ | |
4481 | char opendir(); | |
4482 | ||
4483 | int main() { | |
4484 | opendir() | |
4485 | ; return 0; } | |
c906108c | 4486 | EOF |
02d62932 | 4487 | if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4488 | rm -rf conftest* |
4489 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4490 | else | |
4491 | echo "configure: failed program was:" >&5 | |
4492 | cat conftest.$ac_ext >&5 | |
4493 | rm -rf conftest* | |
4494 | eval "ac_cv_lib_$ac_lib_var=no" | |
4495 | fi | |
4496 | rm -f conftest* | |
4497 | LIBS="$ac_save_LIBS" | |
c906108c | 4498 | |
5ee754fc MK |
4499 | fi |
4500 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4501 | echo "$ac_t""yes" 1>&6 | |
4502 | LIBS="$LIBS -lx" | |
4503 | else | |
4504 | echo "$ac_t""no" 1>&6 | |
4505 | fi | |
c906108c | 4506 | |
5ee754fc | 4507 | fi |
c906108c | 4508 | |
5ee754fc | 4509 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
02d62932 | 4510 | echo "configure:4511: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4511 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4512 | echo $ac_n "(cached) $ac_c" 1>&6 |
4513 | else | |
4514 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4515 | #line 4516 "configure" |
9608ab8b MK |
4516 | #include "confdefs.h" |
4517 | #include <sys/types.h> | |
5ee754fc MK |
4518 | #include <sys/stat.h> |
4519 | ||
4520 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4521 | # if S_ISBLK (S_IFDIR) | |
4522 | You lose. | |
4523 | # endif | |
4524 | #endif | |
4525 | ||
4526 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4527 | # if S_ISBLK (S_IFCHR) | |
4528 | You lose. | |
4529 | # endif | |
4530 | #endif | |
4531 | ||
4532 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4533 | # if S_ISLNK (S_IFREG) | |
4534 | You lose. | |
4535 | # endif | |
4536 | #endif | |
4537 | ||
4538 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4539 | # if S_ISSOCK (S_IFREG) | |
4540 | You lose. | |
4541 | # endif | |
4542 | #endif | |
4543 | ||
9608ab8b | 4544 | EOF |
5ee754fc MK |
4545 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4546 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4547 | rm -rf conftest* |
5ee754fc MK |
4548 | ac_cv_header_stat_broken=yes |
4549 | else | |
4550 | rm -rf conftest* | |
4551 | ac_cv_header_stat_broken=no | |
4552 | fi | |
4553 | rm -f conftest* | |
4554 | ||
4555 | fi | |
4556 | ||
4557 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4558 | if test $ac_cv_header_stat_broken = yes; then | |
4559 | cat >> confdefs.h <<\EOF | |
4560 | #define STAT_MACROS_BROKEN 1 | |
4561 | EOF | |
4562 | ||
4563 | fi | |
4564 | ||
4565 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
02d62932 | 4566 | echo "configure:4567: checking for ANSI C header files" >&5 |
5ee754fc MK |
4567 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4568 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4569 | else | |
4570 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4571 | #line 4572 "configure" |
5ee754fc MK |
4572 | #include "confdefs.h" |
4573 | #include <stdlib.h> | |
4574 | #include <stdarg.h> | |
4575 | #include <string.h> | |
4576 | #include <float.h> | |
4577 | EOF | |
4578 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4579 | { (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4580 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4581 | if test -z "$ac_err"; then | |
4582 | rm -rf conftest* | |
4583 | ac_cv_header_stdc=yes | |
4584 | else | |
4585 | echo "$ac_err" >&5 | |
4586 | echo "configure: failed program was:" >&5 | |
4587 | cat conftest.$ac_ext >&5 | |
4588 | rm -rf conftest* | |
4589 | ac_cv_header_stdc=no | |
4590 | fi | |
4591 | rm -f conftest* | |
4592 | ||
4593 | if test $ac_cv_header_stdc = yes; then | |
4594 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4595 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4596 | #line 4597 "configure" |
5ee754fc MK |
4597 | #include "confdefs.h" |
4598 | #include <string.h> | |
4599 | EOF | |
4600 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4601 | egrep "memchr" >/dev/null 2>&1; then | |
4602 | : | |
4603 | else | |
4604 | rm -rf conftest* | |
4605 | ac_cv_header_stdc=no | |
4606 | fi | |
4607 | rm -f conftest* | |
4608 | ||
4609 | fi | |
4610 | ||
4611 | if test $ac_cv_header_stdc = yes; then | |
4612 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4613 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4614 | #line 4615 "configure" |
5ee754fc MK |
4615 | #include "confdefs.h" |
4616 | #include <stdlib.h> | |
4617 | EOF | |
4618 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4619 | egrep "free" >/dev/null 2>&1; then | |
4620 | : | |
4621 | else | |
4622 | rm -rf conftest* | |
4623 | ac_cv_header_stdc=no | |
4624 | fi | |
4625 | rm -f conftest* | |
4626 | ||
4627 | fi | |
4628 | ||
4629 | if test $ac_cv_header_stdc = yes; then | |
4630 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4631 | if test "$cross_compiling" = yes; then | |
4632 | : | |
4633 | else | |
4634 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4635 | #line 4636 "configure" |
5ee754fc MK |
4636 | #include "confdefs.h" |
4637 | #include <ctype.h> | |
4638 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4639 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4640 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4641 | int main () { int i; for (i = 0; i < 256; i++) | |
4642 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4643 | exit (0); } | |
4644 | ||
4645 | EOF | |
02d62932 | 4646 | if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4647 | then |
4648 | : | |
9608ab8b | 4649 | else |
5ee754fc MK |
4650 | echo "configure: failed program was:" >&5 |
4651 | cat conftest.$ac_ext >&5 | |
4652 | rm -fr conftest* | |
4653 | ac_cv_header_stdc=no | |
4654 | fi | |
4655 | rm -fr conftest* | |
4656 | fi | |
4657 | ||
4658 | fi | |
4659 | fi | |
4660 | ||
4661 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4662 | if test $ac_cv_header_stdc = yes; then | |
4663 | cat >> confdefs.h <<\EOF | |
4664 | #define STDC_HEADERS 1 | |
4665 | EOF | |
4666 | ||
4667 | fi | |
4668 | ||
4669 | for ac_hdr in link.h | |
4670 | do | |
4671 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4672 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4673 | echo "configure:4674: checking for $ac_hdr" >&5 |
5ee754fc MK |
4674 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4675 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4676 | else | |
4677 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4678 | #line 4679 "configure" |
5ee754fc MK |
4679 | #include "confdefs.h" |
4680 | #include <$ac_hdr> | |
4681 | EOF | |
4682 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4683 | { (eval echo configure:4684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4684 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4685 | if test -z "$ac_err"; then | |
4686 | rm -rf conftest* | |
4687 | eval "ac_cv_header_$ac_safe=yes" | |
4688 | else | |
4689 | echo "$ac_err" >&5 | |
4690 | echo "configure: failed program was:" >&5 | |
4691 | cat conftest.$ac_ext >&5 | |
4692 | rm -rf conftest* | |
4693 | eval "ac_cv_header_$ac_safe=no" | |
4694 | fi | |
4695 | rm -f conftest* | |
4696 | fi | |
4697 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4698 | echo "$ac_t""yes" 1>&6 | |
4699 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4700 | cat >> confdefs.h <<EOF | |
4701 | #define $ac_tr_hdr 1 | |
4702 | EOF | |
4703 | ||
4704 | else | |
4705 | echo "$ac_t""no" 1>&6 | |
4706 | fi | |
4707 | done | |
4708 | ||
78434e59 | 4709 | for ac_hdr in machine/reg.h |
5ee754fc MK |
4710 | do |
4711 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4712 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4713 | echo "configure:4714: checking for $ac_hdr" >&5 |
5ee754fc MK |
4714 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4715 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4716 | else | |
4717 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4718 | #line 4719 "configure" |
5ee754fc MK |
4719 | #include "confdefs.h" |
4720 | #include <$ac_hdr> | |
4721 | EOF | |
4722 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4723 | { (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4724 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4725 | if test -z "$ac_err"; then | |
4726 | rm -rf conftest* | |
4727 | eval "ac_cv_header_$ac_safe=yes" | |
4728 | else | |
4729 | echo "$ac_err" >&5 | |
4730 | echo "configure: failed program was:" >&5 | |
4731 | cat conftest.$ac_ext >&5 | |
4732 | rm -rf conftest* | |
4733 | eval "ac_cv_header_$ac_safe=no" | |
4734 | fi | |
4735 | rm -f conftest* | |
4736 | fi | |
4737 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4738 | echo "$ac_t""yes" 1>&6 | |
4739 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4740 | cat >> confdefs.h <<EOF | |
4741 | #define $ac_tr_hdr 1 | |
4742 | EOF | |
4743 | ||
4744 | else | |
4745 | echo "$ac_t""no" 1>&6 | |
4746 | fi | |
4747 | done | |
4748 | ||
78434e59 | 4749 | for ac_hdr in nlist.h |
5ee754fc MK |
4750 | do |
4751 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4752 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4753 | echo "configure:4754: checking for $ac_hdr" >&5 |
5ee754fc MK |
4754 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4755 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4756 | else | |
4757 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4758 | #line 4759 "configure" |
5ee754fc MK |
4759 | #include "confdefs.h" |
4760 | #include <$ac_hdr> | |
4761 | EOF | |
4762 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4763 | { (eval echo configure:4764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4764 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4765 | if test -z "$ac_err"; then | |
4766 | rm -rf conftest* | |
4767 | eval "ac_cv_header_$ac_safe=yes" | |
4768 | else | |
4769 | echo "$ac_err" >&5 | |
4770 | echo "configure: failed program was:" >&5 | |
4771 | cat conftest.$ac_ext >&5 | |
4772 | rm -rf conftest* | |
4773 | eval "ac_cv_header_$ac_safe=no" | |
4774 | fi | |
4775 | rm -f conftest* | |
4776 | fi | |
4777 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4778 | echo "$ac_t""yes" 1>&6 | |
4779 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4780 | cat >> confdefs.h <<EOF | |
4781 | #define $ac_tr_hdr 1 | |
4782 | EOF | |
4783 | ||
4784 | else | |
4785 | echo "$ac_t""no" 1>&6 | |
4786 | fi | |
4787 | done | |
4788 | ||
78434e59 | 4789 | for ac_hdr in poll.h sys/poll.h |
5ee754fc MK |
4790 | do |
4791 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4792 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4793 | echo "configure:4794: checking for $ac_hdr" >&5 |
5ee754fc MK |
4794 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4795 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4796 | else | |
4797 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4798 | #line 4799 "configure" |
5ee754fc MK |
4799 | #include "confdefs.h" |
4800 | #include <$ac_hdr> | |
4801 | EOF | |
4802 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4803 | { (eval echo configure:4804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4804 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4805 | if test -z "$ac_err"; then | |
4806 | rm -rf conftest* | |
4807 | eval "ac_cv_header_$ac_safe=yes" | |
4808 | else | |
4809 | echo "$ac_err" >&5 | |
4810 | echo "configure: failed program was:" >&5 | |
4811 | cat conftest.$ac_ext >&5 | |
4812 | rm -rf conftest* | |
4813 | eval "ac_cv_header_$ac_safe=no" | |
4814 | fi | |
4815 | rm -f conftest* | |
4816 | fi | |
4817 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4818 | echo "$ac_t""yes" 1>&6 | |
4819 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4820 | cat >> confdefs.h <<EOF | |
4821 | #define $ac_tr_hdr 1 | |
4822 | EOF | |
4823 | ||
4824 | else | |
4825 | echo "$ac_t""no" 1>&6 | |
4826 | fi | |
4827 | done | |
4828 | ||
a2f23071 | 4829 | for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h |
5ee754fc MK |
4830 | do |
4831 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4832 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4833 | echo "configure:4834: checking for $ac_hdr" >&5 |
5ee754fc MK |
4834 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4835 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4836 | else | |
4837 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4838 | #line 4839 "configure" |
5ee754fc MK |
4839 | #include "confdefs.h" |
4840 | #include <$ac_hdr> | |
4841 | EOF | |
4842 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4843 | { (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4844 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4845 | if test -z "$ac_err"; then | |
4846 | rm -rf conftest* | |
4847 | eval "ac_cv_header_$ac_safe=yes" | |
4848 | else | |
4849 | echo "$ac_err" >&5 | |
4850 | echo "configure: failed program was:" >&5 | |
4851 | cat conftest.$ac_ext >&5 | |
4852 | rm -rf conftest* | |
4853 | eval "ac_cv_header_$ac_safe=no" | |
4854 | fi | |
4855 | rm -f conftest* | |
4856 | fi | |
4857 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4858 | echo "$ac_t""yes" 1>&6 | |
4859 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4860 | cat >> confdefs.h <<EOF | |
4861 | #define $ac_tr_hdr 1 | |
4862 | EOF | |
4863 | ||
4864 | else | |
4865 | echo "$ac_t""no" 1>&6 | |
4866 | fi | |
4867 | done | |
4868 | ||
78434e59 | 4869 | for ac_hdr in stddef.h |
5ee754fc MK |
4870 | do |
4871 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4872 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4873 | echo "configure:4874: checking for $ac_hdr" >&5 |
5ee754fc MK |
4874 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4875 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4876 | else | |
4877 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4878 | #line 4879 "configure" |
5ee754fc MK |
4879 | #include "confdefs.h" |
4880 | #include <$ac_hdr> | |
4881 | EOF | |
4882 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4883 | { (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4884 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4885 | if test -z "$ac_err"; then | |
4886 | rm -rf conftest* | |
4887 | eval "ac_cv_header_$ac_safe=yes" | |
4888 | else | |
4889 | echo "$ac_err" >&5 | |
4890 | echo "configure: failed program was:" >&5 | |
4891 | cat conftest.$ac_ext >&5 | |
4892 | rm -rf conftest* | |
4893 | eval "ac_cv_header_$ac_safe=no" | |
4894 | fi | |
4895 | rm -f conftest* | |
4896 | fi | |
4897 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4898 | echo "$ac_t""yes" 1>&6 | |
4899 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4900 | cat >> confdefs.h <<EOF | |
4901 | #define $ac_tr_hdr 1 | |
4902 | EOF | |
4903 | ||
4904 | else | |
4905 | echo "$ac_t""no" 1>&6 | |
4906 | fi | |
4907 | done | |
4908 | ||
78434e59 | 4909 | for ac_hdr in stdlib.h |
5ee754fc MK |
4910 | do |
4911 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4912 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4913 | echo "configure:4914: checking for $ac_hdr" >&5 |
5ee754fc MK |
4914 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4915 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4916 | else | |
4917 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4918 | #line 4919 "configure" |
5ee754fc MK |
4919 | #include "confdefs.h" |
4920 | #include <$ac_hdr> | |
4921 | EOF | |
4922 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4923 | { (eval echo configure:4924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4924 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4925 | if test -z "$ac_err"; then | |
4926 | rm -rf conftest* | |
4927 | eval "ac_cv_header_$ac_safe=yes" | |
4928 | else | |
4929 | echo "$ac_err" >&5 | |
4930 | echo "configure: failed program was:" >&5 | |
4931 | cat conftest.$ac_ext >&5 | |
4932 | rm -rf conftest* | |
4933 | eval "ac_cv_header_$ac_safe=no" | |
4934 | fi | |
4935 | rm -f conftest* | |
4936 | fi | |
4937 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4938 | echo "$ac_t""yes" 1>&6 | |
4939 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4940 | cat >> confdefs.h <<EOF | |
4941 | #define $ac_tr_hdr 1 | |
4942 | EOF | |
4943 | ||
4944 | else | |
4945 | echo "$ac_t""no" 1>&6 | |
4946 | fi | |
4947 | done | |
4948 | ||
78434e59 | 4949 | for ac_hdr in stdint.h |
5ee754fc MK |
4950 | do |
4951 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4952 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4953 | echo "configure:4954: checking for $ac_hdr" >&5 |
5ee754fc MK |
4954 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4955 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4956 | else | |
4957 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4958 | #line 4959 "configure" |
5ee754fc MK |
4959 | #include "confdefs.h" |
4960 | #include <$ac_hdr> | |
4961 | EOF | |
4962 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 4963 | { (eval echo configure:4964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4964 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4965 | if test -z "$ac_err"; then | |
4966 | rm -rf conftest* | |
4967 | eval "ac_cv_header_$ac_safe=yes" | |
4968 | else | |
4969 | echo "$ac_err" >&5 | |
4970 | echo "configure: failed program was:" >&5 | |
4971 | cat conftest.$ac_ext >&5 | |
4972 | rm -rf conftest* | |
4973 | eval "ac_cv_header_$ac_safe=no" | |
4974 | fi | |
4975 | rm -f conftest* | |
4976 | fi | |
4977 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4978 | echo "$ac_t""yes" 1>&6 | |
4979 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4980 | cat >> confdefs.h <<EOF | |
4981 | #define $ac_tr_hdr 1 | |
4982 | EOF | |
4983 | ||
4984 | else | |
4985 | echo "$ac_t""no" 1>&6 | |
4986 | fi | |
4987 | done | |
4988 | ||
78434e59 | 4989 | for ac_hdr in string.h memory.h strings.h |
5ee754fc MK |
4990 | do |
4991 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4992 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 4993 | echo "configure:4994: checking for $ac_hdr" >&5 |
5ee754fc MK |
4994 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4995 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4996 | else | |
4997 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 4998 | #line 4999 "configure" |
5ee754fc MK |
4999 | #include "confdefs.h" |
5000 | #include <$ac_hdr> | |
5001 | EOF | |
5002 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5003 | { (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5004 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5005 | if test -z "$ac_err"; then | |
5006 | rm -rf conftest* | |
5007 | eval "ac_cv_header_$ac_safe=yes" | |
5008 | else | |
5009 | echo "$ac_err" >&5 | |
5010 | echo "configure: failed program was:" >&5 | |
5011 | cat conftest.$ac_ext >&5 | |
5012 | rm -rf conftest* | |
5013 | eval "ac_cv_header_$ac_safe=no" | |
5014 | fi | |
5015 | rm -f conftest* | |
5016 | fi | |
5017 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5018 | echo "$ac_t""yes" 1>&6 | |
5019 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5020 | cat >> confdefs.h <<EOF | |
5021 | #define $ac_tr_hdr 1 | |
5022 | EOF | |
5023 | ||
5024 | else | |
5025 | echo "$ac_t""no" 1>&6 | |
5026 | fi | |
5027 | done | |
5028 | ||
78434e59 | 5029 | for ac_hdr in sys/fault.h |
5ee754fc MK |
5030 | do |
5031 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5032 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5033 | echo "configure:5034: checking for $ac_hdr" >&5 |
5ee754fc MK |
5034 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5035 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5036 | else | |
5037 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5038 | #line 5039 "configure" |
5ee754fc MK |
5039 | #include "confdefs.h" |
5040 | #include <$ac_hdr> | |
5041 | EOF | |
5042 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5043 | { (eval echo configure:5044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5044 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5045 | if test -z "$ac_err"; then | |
5046 | rm -rf conftest* | |
5047 | eval "ac_cv_header_$ac_safe=yes" | |
5048 | else | |
5049 | echo "$ac_err" >&5 | |
5050 | echo "configure: failed program was:" >&5 | |
5051 | cat conftest.$ac_ext >&5 | |
5052 | rm -rf conftest* | |
5053 | eval "ac_cv_header_$ac_safe=no" | |
5054 | fi | |
5055 | rm -f conftest* | |
5056 | fi | |
5057 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5058 | echo "$ac_t""yes" 1>&6 | |
5059 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5060 | cat >> confdefs.h <<EOF | |
5061 | #define $ac_tr_hdr 1 | |
5062 | EOF | |
5063 | ||
5064 | else | |
5065 | echo "$ac_t""no" 1>&6 | |
5066 | fi | |
5067 | done | |
5068 | ||
78434e59 | 5069 | for ac_hdr in sys/file.h |
5ee754fc MK |
5070 | do |
5071 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5072 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5073 | echo "configure:5074: checking for $ac_hdr" >&5 |
5ee754fc MK |
5074 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5075 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5076 | else | |
5077 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5078 | #line 5079 "configure" |
5ee754fc MK |
5079 | #include "confdefs.h" |
5080 | #include <$ac_hdr> | |
5081 | EOF | |
5082 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5083 | { (eval echo configure:5084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5084 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5085 | if test -z "$ac_err"; then | |
5086 | rm -rf conftest* | |
5087 | eval "ac_cv_header_$ac_safe=yes" | |
5088 | else | |
5089 | echo "$ac_err" >&5 | |
5090 | echo "configure: failed program was:" >&5 | |
5091 | cat conftest.$ac_ext >&5 | |
5092 | rm -rf conftest* | |
5093 | eval "ac_cv_header_$ac_safe=no" | |
5094 | fi | |
5095 | rm -f conftest* | |
5096 | fi | |
5097 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5098 | echo "$ac_t""yes" 1>&6 | |
5099 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5100 | cat >> confdefs.h <<EOF | |
5101 | #define $ac_tr_hdr 1 | |
5102 | EOF | |
5103 | ||
5104 | else | |
5105 | echo "$ac_t""no" 1>&6 | |
5106 | fi | |
5107 | done | |
5108 | ||
78434e59 | 5109 | for ac_hdr in sys/filio.h |
5ee754fc MK |
5110 | do |
5111 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5112 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5113 | echo "configure:5114: checking for $ac_hdr" >&5 |
5ee754fc MK |
5114 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5115 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5116 | else | |
5117 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5118 | #line 5119 "configure" |
5ee754fc MK |
5119 | #include "confdefs.h" |
5120 | #include <$ac_hdr> | |
5121 | EOF | |
5122 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5123 | { (eval echo configure:5124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5124 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5125 | if test -z "$ac_err"; then | |
5126 | rm -rf conftest* | |
5127 | eval "ac_cv_header_$ac_safe=yes" | |
5128 | else | |
5129 | echo "$ac_err" >&5 | |
5130 | echo "configure: failed program was:" >&5 | |
5131 | cat conftest.$ac_ext >&5 | |
5132 | rm -rf conftest* | |
5133 | eval "ac_cv_header_$ac_safe=no" | |
5134 | fi | |
5135 | rm -f conftest* | |
5136 | fi | |
5137 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5138 | echo "$ac_t""yes" 1>&6 | |
5139 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5140 | cat >> confdefs.h <<EOF | |
5141 | #define $ac_tr_hdr 1 | |
5142 | EOF | |
5143 | ||
5144 | else | |
5145 | echo "$ac_t""no" 1>&6 | |
5146 | fi | |
5147 | done | |
5148 | ||
78434e59 | 5149 | for ac_hdr in sys/ioctl.h |
5ee754fc MK |
5150 | do |
5151 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5152 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5153 | echo "configure:5154: checking for $ac_hdr" >&5 |
5ee754fc MK |
5154 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5155 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5156 | else | |
5157 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5158 | #line 5159 "configure" |
5ee754fc MK |
5159 | #include "confdefs.h" |
5160 | #include <$ac_hdr> | |
5161 | EOF | |
5162 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5163 | { (eval echo configure:5164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5164 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5165 | if test -z "$ac_err"; then | |
5166 | rm -rf conftest* | |
5167 | eval "ac_cv_header_$ac_safe=yes" | |
5168 | else | |
5169 | echo "$ac_err" >&5 | |
5170 | echo "configure: failed program was:" >&5 | |
5171 | cat conftest.$ac_ext >&5 | |
5172 | rm -rf conftest* | |
5173 | eval "ac_cv_header_$ac_safe=no" | |
5174 | fi | |
5175 | rm -f conftest* | |
5176 | fi | |
5177 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5178 | echo "$ac_t""yes" 1>&6 | |
5179 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5180 | cat >> confdefs.h <<EOF | |
5181 | #define $ac_tr_hdr 1 | |
5182 | EOF | |
5183 | ||
5184 | else | |
5185 | echo "$ac_t""no" 1>&6 | |
5186 | fi | |
5187 | done | |
5188 | ||
78434e59 | 5189 | for ac_hdr in sys/param.h |
5ee754fc MK |
5190 | do |
5191 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5192 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5193 | echo "configure:5194: checking for $ac_hdr" >&5 |
5ee754fc MK |
5194 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5195 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5196 | else | |
5197 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5198 | #line 5199 "configure" |
5ee754fc MK |
5199 | #include "confdefs.h" |
5200 | #include <$ac_hdr> | |
5201 | EOF | |
5202 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5203 | { (eval echo configure:5204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5204 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5205 | if test -z "$ac_err"; then | |
5206 | rm -rf conftest* | |
5207 | eval "ac_cv_header_$ac_safe=yes" | |
5208 | else | |
5209 | echo "$ac_err" >&5 | |
5210 | echo "configure: failed program was:" >&5 | |
5211 | cat conftest.$ac_ext >&5 | |
5212 | rm -rf conftest* | |
5213 | eval "ac_cv_header_$ac_safe=no" | |
5214 | fi | |
5215 | rm -f conftest* | |
5216 | fi | |
5217 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5218 | echo "$ac_t""yes" 1>&6 | |
5219 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5220 | cat >> confdefs.h <<EOF | |
5221 | #define $ac_tr_hdr 1 | |
5222 | EOF | |
5223 | ||
5224 | else | |
5225 | echo "$ac_t""no" 1>&6 | |
5226 | fi | |
5227 | done | |
5228 | ||
78434e59 | 5229 | for ac_hdr in sys/proc.h |
5ee754fc MK |
5230 | do |
5231 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5232 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5233 | echo "configure:5234: checking for $ac_hdr" >&5 |
5ee754fc MK |
5234 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5236 | else | |
5237 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5238 | #line 5239 "configure" |
5ee754fc MK |
5239 | #include "confdefs.h" |
5240 | #include <$ac_hdr> | |
5241 | EOF | |
5242 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5243 | { (eval echo configure:5244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5244 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5245 | if test -z "$ac_err"; then | |
5246 | rm -rf conftest* | |
5247 | eval "ac_cv_header_$ac_safe=yes" | |
5248 | else | |
5249 | echo "$ac_err" >&5 | |
5250 | echo "configure: failed program was:" >&5 | |
5251 | cat conftest.$ac_ext >&5 | |
5252 | rm -rf conftest* | |
5253 | eval "ac_cv_header_$ac_safe=no" | |
5254 | fi | |
5255 | rm -f conftest* | |
5256 | fi | |
5257 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5258 | echo "$ac_t""yes" 1>&6 | |
5259 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5260 | cat >> confdefs.h <<EOF | |
5261 | #define $ac_tr_hdr 1 | |
5262 | EOF | |
5263 | ||
5264 | else | |
5265 | echo "$ac_t""no" 1>&6 | |
5266 | fi | |
5267 | done | |
5268 | ||
78434e59 | 5269 | for ac_hdr in sys/procfs.h |
5ee754fc MK |
5270 | do |
5271 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5272 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5273 | echo "configure:5274: checking for $ac_hdr" >&5 |
5ee754fc MK |
5274 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5275 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5276 | else | |
5277 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5278 | #line 5279 "configure" |
5ee754fc MK |
5279 | #include "confdefs.h" |
5280 | #include <$ac_hdr> | |
5281 | EOF | |
5282 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5283 | { (eval echo configure:5284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5284 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5285 | if test -z "$ac_err"; then | |
5286 | rm -rf conftest* | |
5287 | eval "ac_cv_header_$ac_safe=yes" | |
5288 | else | |
5289 | echo "$ac_err" >&5 | |
5290 | echo "configure: failed program was:" >&5 | |
5291 | cat conftest.$ac_ext >&5 | |
5292 | rm -rf conftest* | |
5293 | eval "ac_cv_header_$ac_safe=no" | |
5294 | fi | |
5295 | rm -f conftest* | |
5296 | fi | |
5297 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5298 | echo "$ac_t""yes" 1>&6 | |
5299 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5300 | cat >> confdefs.h <<EOF | |
5301 | #define $ac_tr_hdr 1 | |
5302 | EOF | |
5303 | ||
5304 | else | |
5305 | echo "$ac_t""no" 1>&6 | |
5306 | fi | |
5307 | done | |
5308 | ||
78434e59 | 5309 | for ac_hdr in sys/ptrace.h ptrace.h |
5ee754fc MK |
5310 | do |
5311 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5312 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5313 | echo "configure:5314: checking for $ac_hdr" >&5 |
5ee754fc MK |
5314 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5315 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5316 | else | |
5317 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5318 | #line 5319 "configure" |
5ee754fc MK |
5319 | #include "confdefs.h" |
5320 | #include <$ac_hdr> | |
5321 | EOF | |
5322 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5323 | { (eval echo configure:5324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5324 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5325 | if test -z "$ac_err"; then | |
5326 | rm -rf conftest* | |
5327 | eval "ac_cv_header_$ac_safe=yes" | |
5328 | else | |
5329 | echo "$ac_err" >&5 | |
5330 | echo "configure: failed program was:" >&5 | |
5331 | cat conftest.$ac_ext >&5 | |
5332 | rm -rf conftest* | |
5333 | eval "ac_cv_header_$ac_safe=no" | |
5334 | fi | |
5335 | rm -f conftest* | |
5336 | fi | |
5337 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5338 | echo "$ac_t""yes" 1>&6 | |
5339 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5340 | cat >> confdefs.h <<EOF | |
5341 | #define $ac_tr_hdr 1 | |
5342 | EOF | |
5343 | ||
5344 | else | |
5345 | echo "$ac_t""no" 1>&6 | |
5346 | fi | |
5347 | done | |
5348 | ||
78434e59 | 5349 | for ac_hdr in sys/reg.h sys/debugreg.h |
5ee754fc MK |
5350 | do |
5351 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5352 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5353 | echo "configure:5354: checking for $ac_hdr" >&5 |
5ee754fc MK |
5354 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5355 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5356 | else | |
5357 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5358 | #line 5359 "configure" |
5ee754fc MK |
5359 | #include "confdefs.h" |
5360 | #include <$ac_hdr> | |
5361 | EOF | |
5362 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5363 | { (eval echo configure:5364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5364 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5365 | if test -z "$ac_err"; then | |
5366 | rm -rf conftest* | |
5367 | eval "ac_cv_header_$ac_safe=yes" | |
5368 | else | |
5369 | echo "$ac_err" >&5 | |
5370 | echo "configure: failed program was:" >&5 | |
5371 | cat conftest.$ac_ext >&5 | |
5372 | rm -rf conftest* | |
5373 | eval "ac_cv_header_$ac_safe=no" | |
5374 | fi | |
5375 | rm -f conftest* | |
5376 | fi | |
5377 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5378 | echo "$ac_t""yes" 1>&6 | |
5379 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5380 | cat >> confdefs.h <<EOF | |
5381 | #define $ac_tr_hdr 1 | |
5382 | EOF | |
5383 | ||
5384 | else | |
5385 | echo "$ac_t""no" 1>&6 | |
5386 | fi | |
5387 | done | |
5388 | ||
78434e59 | 5389 | for ac_hdr in sys/select.h |
5ee754fc MK |
5390 | do |
5391 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5392 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5393 | echo "configure:5394: checking for $ac_hdr" >&5 |
5ee754fc MK |
5394 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5395 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5396 | else | |
5397 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5398 | #line 5399 "configure" |
5ee754fc MK |
5399 | #include "confdefs.h" |
5400 | #include <$ac_hdr> | |
5401 | EOF | |
5402 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5403 | { (eval echo configure:5404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5404 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5405 | if test -z "$ac_err"; then | |
5406 | rm -rf conftest* | |
5407 | eval "ac_cv_header_$ac_safe=yes" | |
5408 | else | |
5409 | echo "$ac_err" >&5 | |
5410 | echo "configure: failed program was:" >&5 | |
5411 | cat conftest.$ac_ext >&5 | |
5412 | rm -rf conftest* | |
5413 | eval "ac_cv_header_$ac_safe=no" | |
5414 | fi | |
5415 | rm -f conftest* | |
5416 | fi | |
5417 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5418 | echo "$ac_t""yes" 1>&6 | |
5419 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5420 | cat >> confdefs.h <<EOF | |
5421 | #define $ac_tr_hdr 1 | |
5422 | EOF | |
5423 | ||
5424 | else | |
5425 | echo "$ac_t""no" 1>&6 | |
5426 | fi | |
5427 | done | |
5428 | ||
78434e59 | 5429 | for ac_hdr in sys/syscall.h |
5ee754fc MK |
5430 | do |
5431 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5432 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5433 | echo "configure:5434: checking for $ac_hdr" >&5 |
5ee754fc MK |
5434 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5435 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5436 | else | |
5437 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5438 | #line 5439 "configure" |
5ee754fc MK |
5439 | #include "confdefs.h" |
5440 | #include <$ac_hdr> | |
5441 | EOF | |
5442 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5443 | { (eval echo configure:5444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5444 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5445 | if test -z "$ac_err"; then | |
5446 | rm -rf conftest* | |
5447 | eval "ac_cv_header_$ac_safe=yes" | |
5448 | else | |
5449 | echo "$ac_err" >&5 | |
5450 | echo "configure: failed program was:" >&5 | |
5451 | cat conftest.$ac_ext >&5 | |
5452 | rm -rf conftest* | |
5453 | eval "ac_cv_header_$ac_safe=no" | |
5454 | fi | |
5455 | rm -f conftest* | |
5456 | fi | |
5457 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5458 | echo "$ac_t""yes" 1>&6 | |
5459 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5460 | cat >> confdefs.h <<EOF | |
5461 | #define $ac_tr_hdr 1 | |
5462 | EOF | |
5463 | ||
5464 | else | |
5465 | echo "$ac_t""no" 1>&6 | |
5466 | fi | |
5467 | done | |
5468 | ||
78434e59 | 5469 | for ac_hdr in sys/user.h |
5ee754fc MK |
5470 | do |
5471 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5472 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5473 | echo "configure:5474: checking for $ac_hdr" >&5 |
5ee754fc MK |
5474 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5475 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5476 | else | |
5477 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5478 | #line 5479 "configure" |
5ee754fc MK |
5479 | #include "confdefs.h" |
5480 | #include <$ac_hdr> | |
5481 | EOF | |
5482 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5483 | { (eval echo configure:5484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5484 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5485 | if test -z "$ac_err"; then | |
5486 | rm -rf conftest* | |
5487 | eval "ac_cv_header_$ac_safe=yes" | |
5488 | else | |
5489 | echo "$ac_err" >&5 | |
9608ab8b MK |
5490 | echo "configure: failed program was:" >&5 |
5491 | cat conftest.$ac_ext >&5 | |
5492 | rm -rf conftest* | |
5ee754fc | 5493 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5494 | fi |
5495 | rm -f conftest* | |
5496 | fi | |
5ee754fc | 5497 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5498 | echo "$ac_t""yes" 1>&6 |
5499 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5500 | cat >> confdefs.h <<EOF | |
5501 | #define $ac_tr_hdr 1 | |
5502 | EOF | |
5ee754fc | 5503 | |
9608ab8b MK |
5504 | else |
5505 | echo "$ac_t""no" 1>&6 | |
5506 | fi | |
5507 | done | |
5ee754fc | 5508 | |
78434e59 | 5509 | for ac_hdr in sys/wait.h wait.h |
5ee754fc MK |
5510 | do |
5511 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5512 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5513 | echo "configure:5514: checking for $ac_hdr" >&5 |
5ee754fc | 5514 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5515 | echo $ac_n "(cached) $ac_c" 1>&6 |
5516 | else | |
5ee754fc | 5517 | cat > conftest.$ac_ext <<EOF |
02d62932 | 5518 | #line 5519 "configure" |
9608ab8b | 5519 | #include "confdefs.h" |
5ee754fc | 5520 | #include <$ac_hdr> |
9608ab8b | 5521 | EOF |
5ee754fc | 5522 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
02d62932 | 5523 | { (eval echo configure:5524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5524 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5525 | if test -z "$ac_err"; then | |
9608ab8b | 5526 | rm -rf conftest* |
5ee754fc | 5527 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5528 | else |
5ee754fc | 5529 | echo "$ac_err" >&5 |
9608ab8b MK |
5530 | echo "configure: failed program was:" >&5 |
5531 | cat conftest.$ac_ext >&5 | |
5532 | rm -rf conftest* | |
5ee754fc | 5533 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5534 | fi |
5535 | rm -f conftest* | |
9608ab8b | 5536 | fi |
5ee754fc | 5537 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5538 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5539 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5540 | cat >> confdefs.h <<EOF | |
5541 | #define $ac_tr_hdr 1 | |
5542 | EOF | |
5543 | ||
9608ab8b MK |
5544 | else |
5545 | echo "$ac_t""no" 1>&6 | |
5546 | fi | |
5ee754fc | 5547 | done |
9608ab8b | 5548 | |
78434e59 | 5549 | for ac_hdr in termios.h termio.h sgtty.h |
5ee754fc MK |
5550 | do |
5551 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5552 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5553 | echo "configure:5554: checking for $ac_hdr" >&5 |
5ee754fc | 5554 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5555 | echo $ac_n "(cached) $ac_c" 1>&6 |
5556 | else | |
5ee754fc | 5557 | cat > conftest.$ac_ext <<EOF |
02d62932 | 5558 | #line 5559 "configure" |
9608ab8b | 5559 | #include "confdefs.h" |
5ee754fc | 5560 | #include <$ac_hdr> |
9608ab8b | 5561 | EOF |
5ee754fc | 5562 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
02d62932 | 5563 | { (eval echo configure:5564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5564 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5565 | if test -z "$ac_err"; then | |
9608ab8b | 5566 | rm -rf conftest* |
5ee754fc | 5567 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5568 | else |
5ee754fc | 5569 | echo "$ac_err" >&5 |
9608ab8b MK |
5570 | echo "configure: failed program was:" >&5 |
5571 | cat conftest.$ac_ext >&5 | |
5572 | rm -rf conftest* | |
5ee754fc | 5573 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5574 | fi |
5575 | rm -f conftest* | |
9608ab8b | 5576 | fi |
5ee754fc | 5577 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5578 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5579 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5580 | cat >> confdefs.h <<EOF | |
5581 | #define $ac_tr_hdr 1 | |
5582 | EOF | |
5583 | ||
9608ab8b MK |
5584 | else |
5585 | echo "$ac_t""no" 1>&6 | |
5586 | fi | |
5ee754fc | 5587 | done |
9608ab8b | 5588 | |
78434e59 MK |
5589 | for ac_hdr in unistd.h |
5590 | do | |
5591 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5592 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5593 | echo "configure:5594: checking for $ac_hdr" >&5 |
78434e59 MK |
5594 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5595 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5596 | else | |
5597 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5598 | #line 5599 "configure" |
78434e59 MK |
5599 | #include "confdefs.h" |
5600 | #include <$ac_hdr> | |
5601 | EOF | |
5602 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5603 | { (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
78434e59 MK |
5604 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5605 | if test -z "$ac_err"; then | |
5606 | rm -rf conftest* | |
5607 | eval "ac_cv_header_$ac_safe=yes" | |
5608 | else | |
5609 | echo "$ac_err" >&5 | |
5610 | echo "configure: failed program was:" >&5 | |
5611 | cat conftest.$ac_ext >&5 | |
5612 | rm -rf conftest* | |
5613 | eval "ac_cv_header_$ac_safe=no" | |
5614 | fi | |
5615 | rm -f conftest* | |
5616 | fi | |
5617 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5618 | echo "$ac_t""yes" 1>&6 | |
5619 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5620 | cat >> confdefs.h <<EOF | |
5621 | #define $ac_tr_hdr 1 | |
5622 | EOF | |
5623 | ||
5624 | else | |
5625 | echo "$ac_t""no" 1>&6 | |
5626 | fi | |
5627 | done | |
5628 | ||
9608ab8b | 5629 | |
5ee754fc MK |
5630 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5631 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5632 | # think that we don't have <curses.h> if we're using GCC. | |
5633 | case $host_os in | |
5634 | solaris2.[78]) | |
5635 | if test "$GCC" = yes; then | |
5636 | cat >> confdefs.h <<\EOF | |
5637 | #define _MSE_INT_H 1 | |
5638 | EOF | |
5639 | ||
5640 | fi ;; | |
5641 | esac | |
5642 | for ac_hdr in curses.h ncurses.h term.h | |
5643 | do | |
5644 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5645 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5646 | echo "configure:5647: checking for $ac_hdr" >&5 |
5ee754fc | 5647 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5648 | echo $ac_n "(cached) $ac_c" 1>&6 |
5649 | else | |
5650 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5651 | #line 5652 "configure" |
c906108c | 5652 | #include "confdefs.h" |
5ee754fc | 5653 | #include <$ac_hdr> |
c906108c SS |
5654 | EOF |
5655 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5656 | { (eval echo configure:5657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5657 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5658 | if test -z "$ac_err"; then | |
5659 | rm -rf conftest* | |
5ee754fc | 5660 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5661 | else |
5662 | echo "$ac_err" >&5 | |
5663 | echo "configure: failed program was:" >&5 | |
5664 | cat conftest.$ac_ext >&5 | |
5665 | rm -rf conftest* | |
5ee754fc | 5666 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5667 | fi |
5668 | rm -f conftest* | |
c906108c | 5669 | fi |
5ee754fc MK |
5670 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5671 | echo "$ac_t""yes" 1>&6 | |
5672 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5673 | cat >> confdefs.h <<EOF | |
5674 | #define $ac_tr_hdr 1 | |
c906108c | 5675 | EOF |
5ee754fc | 5676 | |
c906108c | 5677 | else |
5ee754fc | 5678 | echo "$ac_t""no" 1>&6 |
c906108c | 5679 | fi |
5ee754fc | 5680 | done |
c906108c SS |
5681 | |
5682 | ||
5ee754fc MK |
5683 | # FIXME: kettenis/20030102: In most cases we include these |
5684 | # unconditionally, so what's the point in checking these? | |
5685 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5686 | do |
5687 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5688 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 5689 | echo "configure:5690: checking for $ac_hdr" >&5 |
c906108c SS |
5690 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5692 | else | |
5693 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5694 | #line 5695 "configure" |
c906108c SS |
5695 | #include "confdefs.h" |
5696 | #include <$ac_hdr> | |
5697 | EOF | |
5698 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 5699 | { (eval echo configure:5700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5700 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5701 | if test -z "$ac_err"; then | |
5702 | rm -rf conftest* | |
5703 | eval "ac_cv_header_$ac_safe=yes" | |
5704 | else | |
5705 | echo "$ac_err" >&5 | |
5706 | echo "configure: failed program was:" >&5 | |
5707 | cat conftest.$ac_ext >&5 | |
5708 | rm -rf conftest* | |
5709 | eval "ac_cv_header_$ac_safe=no" | |
5710 | fi | |
5711 | rm -f conftest* | |
5712 | fi | |
5713 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5714 | echo "$ac_t""yes" 1>&6 | |
5715 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5716 | cat >> confdefs.h <<EOF | |
5717 | #define $ac_tr_hdr 1 | |
5718 | EOF | |
5719 | ||
5720 | else | |
5721 | echo "$ac_t""no" 1>&6 | |
5722 | fi | |
5723 | done | |
5724 | ||
5ee754fc | 5725 | |
40a7debc | 5726 | echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6 |
02d62932 | 5727 | echo "configure:5728: checking for member st_blocks in struct stat" >&5 |
40a7debc EZ |
5728 | if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then |
5729 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5730 | else | |
5731 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5732 | #line 5733 "configure" |
40a7debc EZ |
5733 | #include "confdefs.h" |
5734 | #include <sys/types.h> | |
5735 | #include <sys/stat.h> | |
5736 | int main() { | |
5737 | struct stat st; (void) st.st_blocks; | |
5738 | ; return 0; } | |
5739 | EOF | |
02d62932 | 5740 | if { (eval echo configure:5741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
40a7debc EZ |
5741 | rm -rf conftest* |
5742 | gdb_cv_have_struct_stat_with_st_blocks_member=yes | |
5743 | else | |
5744 | echo "configure: failed program was:" >&5 | |
5745 | cat conftest.$ac_ext >&5 | |
5746 | rm -rf conftest* | |
5747 | gdb_cv_have_struct_stat_with_st_blocks_member=no | |
5748 | fi | |
5749 | rm -f conftest* | |
5750 | fi | |
5751 | ||
5752 | echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6 | |
5753 | if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then | |
5754 | cat >> confdefs.h <<\EOF | |
5755 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
5756 | EOF | |
5757 | ||
5758 | fi | |
b9362cc7 AC |
5759 | # ------------------------- # |
5760 | # Checks for declarations. # | |
5761 | # ------------------------- # | |
5762 | ||
5763 | for ac_func in getopt | |
5764 | do | |
5765 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5766 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
02d62932 | 5767 | echo "configure:5768: checking whether $ac_func is declared" >&5 |
b9362cc7 AC |
5768 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
5769 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5770 | else | |
5771 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5772 | #line 5773 "configure" |
b9362cc7 AC |
5773 | #include "confdefs.h" |
5774 | #undef $ac_tr_decl | |
5775 | #define $ac_tr_decl 1 | |
5776 | ||
5777 | ||
5778 | int main() { | |
5779 | #ifndef $ac_func | |
5780 | char *(*pfn) = (char *(*)) $ac_func ; | |
5781 | #endif | |
5782 | ; return 0; } | |
5783 | EOF | |
02d62932 | 5784 | if { (eval echo configure:5785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9362cc7 AC |
5785 | rm -rf conftest* |
5786 | eval "gcc_cv_have_decl_$ac_func=yes" | |
5787 | else | |
5788 | echo "configure: failed program was:" >&5 | |
5789 | cat conftest.$ac_ext >&5 | |
5790 | rm -rf conftest* | |
5791 | eval "gcc_cv_have_decl_$ac_func=no" | |
5792 | fi | |
5793 | rm -f conftest* | |
5794 | fi | |
5795 | ||
5796 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5797 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
5798 | #define $ac_tr_decl 1 | |
5799 | EOF | |
5800 | ||
5801 | else | |
5802 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
5803 | #define $ac_tr_decl 0 | |
5804 | EOF | |
5805 | ||
5806 | fi | |
5807 | ||
5808 | done | |
5809 | if test x = y ; then | |
5810 | cat >> confdefs.h <<\EOF | |
5811 | #define HAVE_DECL_GETOPT 1 | |
5812 | EOF | |
5813 | fi | |
5814 | ||
5815 | ||
5ee754fc MK |
5816 | # ------------------ # |
5817 | # Checks for types. # | |
5818 | # ------------------ # | |
5819 | ||
5820 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
02d62932 | 5821 | echo "configure:5822: checking return type of signal handlers" >&5 |
5ee754fc | 5822 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5823 | echo $ac_n "(cached) $ac_c" 1>&6 |
5824 | else | |
5825 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5826 | #line 5827 "configure" |
c906108c SS |
5827 | #include "confdefs.h" |
5828 | #include <sys/types.h> | |
5ee754fc MK |
5829 | #include <signal.h> |
5830 | #ifdef signal | |
5831 | #undef signal | |
c906108c | 5832 | #endif |
5ee754fc MK |
5833 | #ifdef __cplusplus |
5834 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5835 | #else | |
5836 | void (*signal ()) (); | |
c906108c SS |
5837 | #endif |
5838 | ||
5ee754fc MK |
5839 | int main() { |
5840 | int i; | |
5841 | ; return 0; } | |
c906108c | 5842 | EOF |
02d62932 | 5843 | if { (eval echo configure:5844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5844 | rm -rf conftest* |
5ee754fc | 5845 | ac_cv_type_signal=void |
c906108c | 5846 | else |
5ee754fc MK |
5847 | echo "configure: failed program was:" >&5 |
5848 | cat conftest.$ac_ext >&5 | |
c906108c | 5849 | rm -rf conftest* |
5ee754fc | 5850 | ac_cv_type_signal=int |
c906108c SS |
5851 | fi |
5852 | rm -f conftest* | |
c906108c SS |
5853 | fi |
5854 | ||
5ee754fc MK |
5855 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5856 | cat >> confdefs.h <<EOF | |
5857 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5858 | EOF |
5859 | ||
c906108c SS |
5860 | |
5861 | ||
5ee754fc MK |
5862 | # ------------------------------------- # |
5863 | # Checks for compiler characteristics. # | |
5864 | # ------------------------------------- # | |
5865 | ||
c906108c | 5866 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
02d62932 | 5867 | echo "configure:5868: checking for working const" >&5 |
c906108c SS |
5868 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5869 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5870 | else | |
5871 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5872 | #line 5873 "configure" |
c906108c SS |
5873 | #include "confdefs.h" |
5874 | ||
5875 | int main() { | |
5876 | ||
5877 | /* Ultrix mips cc rejects this. */ | |
5878 | typedef int charset[2]; const charset x; | |
5879 | /* SunOS 4.1.1 cc rejects this. */ | |
5880 | char const *const *ccp; | |
5881 | char **p; | |
5882 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5883 | struct point {int x, y;}; | |
5884 | static struct point const zero = {0,0}; | |
5885 | /* AIX XL C 1.02.0.0 rejects this. | |
5886 | It does not let you subtract one const X* pointer from another in an arm | |
5887 | of an if-expression whose if-part is not a constant expression */ | |
5888 | const char *g = "string"; | |
5889 | ccp = &g + (g ? g-g : 0); | |
5890 | /* HPUX 7.0 cc rejects these. */ | |
5891 | ++ccp; | |
5892 | p = (char**) ccp; | |
5893 | ccp = (char const *const *) p; | |
5894 | { /* SCO 3.2v4 cc rejects this. */ | |
5895 | char *t; | |
5896 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5897 | ||
5898 | *t++ = 0; | |
5899 | } | |
5900 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5901 | int x[] = {25, 17}; | |
5902 | const int *foo = &x[0]; | |
5903 | ++foo; | |
5904 | } | |
5905 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5906 | typedef const int *iptr; | |
5907 | iptr p = 0; | |
5908 | ++p; | |
5909 | } | |
5910 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5911 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5912 | struct s { int j; const int *ap[3]; }; | |
5913 | struct s *b; b->j = 5; | |
5914 | } | |
5915 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5916 | const int foo = 10; | |
5917 | } | |
5918 | ||
5919 | ; return 0; } | |
5920 | EOF | |
02d62932 | 5921 | if { (eval echo configure:5922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5922 | rm -rf conftest* |
5923 | ac_cv_c_const=yes | |
5924 | else | |
5925 | echo "configure: failed program was:" >&5 | |
5926 | cat conftest.$ac_ext >&5 | |
5927 | rm -rf conftest* | |
5928 | ac_cv_c_const=no | |
5929 | fi | |
5930 | rm -f conftest* | |
5931 | fi | |
5932 | ||
5933 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5934 | if test $ac_cv_c_const = no; then | |
5935 | cat >> confdefs.h <<\EOF | |
5936 | #define const | |
5937 | EOF | |
5938 | ||
5939 | fi | |
5940 | ||
bce58c09 | 5941 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
02d62932 | 5942 | echo "configure:5943: checking for inline" >&5 |
bce58c09 JB |
5943 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5944 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5945 | else | |
5946 | ac_cv_c_inline=no | |
5947 | for ac_kw in inline __inline__ __inline; do | |
5948 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5949 | #line 5950 "configure" |
bce58c09 JB |
5950 | #include "confdefs.h" |
5951 | ||
5952 | int main() { | |
5953 | } $ac_kw foo() { | |
5954 | ; return 0; } | |
5955 | EOF | |
02d62932 | 5956 | if { (eval echo configure:5957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5957 | rm -rf conftest* |
5958 | ac_cv_c_inline=$ac_kw; break | |
5959 | else | |
5960 | echo "configure: failed program was:" >&5 | |
5961 | cat conftest.$ac_ext >&5 | |
5962 | fi | |
5963 | rm -f conftest* | |
5964 | done | |
5965 | ||
5966 | fi | |
5967 | ||
5968 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5969 | case "$ac_cv_c_inline" in | |
5970 | inline | yes) ;; | |
5971 | no) cat >> confdefs.h <<\EOF | |
5972 | #define inline | |
5973 | EOF | |
5974 | ;; | |
5975 | *) cat >> confdefs.h <<EOF | |
5976 | #define inline $ac_cv_c_inline | |
5977 | EOF | |
5978 | ;; | |
5979 | esac | |
5980 | ||
c906108c | 5981 | |
5ee754fc MK |
5982 | # ------------------------------ # |
5983 | # Checks for library functions. # | |
5984 | # ------------------------------ # | |
5985 | ||
46711df8 MK |
5986 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5987 | # for constant arguments. Useless! | |
5988 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
02d62932 | 5989 | echo "configure:5990: checking for working alloca.h" >&5 |
46711df8 MK |
5990 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5991 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5992 | else | |
5993 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 5994 | #line 5995 "configure" |
46711df8 MK |
5995 | #include "confdefs.h" |
5996 | #include <alloca.h> | |
5997 | int main() { | |
5998 | char *p = alloca(2 * sizeof(int)); | |
5999 | ; return 0; } | |
6000 | EOF | |
02d62932 | 6001 | if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6002 | rm -rf conftest* |
6003 | ac_cv_header_alloca_h=yes | |
6004 | else | |
6005 | echo "configure: failed program was:" >&5 | |
6006 | cat conftest.$ac_ext >&5 | |
6007 | rm -rf conftest* | |
6008 | ac_cv_header_alloca_h=no | |
6009 | fi | |
6010 | rm -f conftest* | |
6011 | fi | |
6012 | ||
6013 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
6014 | if test $ac_cv_header_alloca_h = yes; then | |
6015 | cat >> confdefs.h <<\EOF | |
6016 | #define HAVE_ALLOCA_H 1 | |
6017 | EOF | |
6018 | ||
6019 | fi | |
6020 | ||
6021 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
02d62932 | 6022 | echo "configure:6023: checking for alloca" >&5 |
46711df8 MK |
6023 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
6024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6025 | else | |
6026 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6027 | #line 6028 "configure" |
46711df8 MK |
6028 | #include "confdefs.h" |
6029 | ||
6030 | #ifdef __GNUC__ | |
6031 | # define alloca __builtin_alloca | |
6032 | #else | |
6033 | # ifdef _MSC_VER | |
6034 | # include <malloc.h> | |
6035 | # define alloca _alloca | |
6036 | # else | |
6037 | # if HAVE_ALLOCA_H | |
6038 | # include <alloca.h> | |
6039 | # else | |
6040 | # ifdef _AIX | |
6041 | #pragma alloca | |
6042 | # else | |
6043 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
6044 | char *alloca (); | |
6045 | # endif | |
6046 | # endif | |
6047 | # endif | |
6048 | # endif | |
6049 | #endif | |
6050 | ||
6051 | int main() { | |
6052 | char *p = (char *) alloca(1); | |
6053 | ; return 0; } | |
6054 | EOF | |
02d62932 | 6055 | if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6056 | rm -rf conftest* |
6057 | ac_cv_func_alloca_works=yes | |
6058 | else | |
6059 | echo "configure: failed program was:" >&5 | |
6060 | cat conftest.$ac_ext >&5 | |
6061 | rm -rf conftest* | |
6062 | ac_cv_func_alloca_works=no | |
6063 | fi | |
6064 | rm -f conftest* | |
6065 | fi | |
6066 | ||
6067 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
6068 | if test $ac_cv_func_alloca_works = yes; then | |
6069 | cat >> confdefs.h <<\EOF | |
6070 | #define HAVE_ALLOCA 1 | |
6071 | EOF | |
6072 | ||
6073 | fi | |
6074 | ||
6075 | if test $ac_cv_func_alloca_works = no; then | |
6076 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
6077 | # that cause trouble. Some versions do not even contain alloca or | |
6078 | # contain a buggy version. If you still want to use their alloca, | |
6079 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
6080 | ALLOCA=alloca.${ac_objext} | |
6081 | cat >> confdefs.h <<\EOF | |
6082 | #define C_ALLOCA 1 | |
6083 | EOF | |
6084 | ||
6085 | ||
6086 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
02d62932 | 6087 | echo "configure:6088: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
6088 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
6089 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6090 | else | |
6091 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6092 | #line 6093 "configure" |
46711df8 MK |
6093 | #include "confdefs.h" |
6094 | #if defined(CRAY) && ! defined(CRAY2) | |
6095 | webecray | |
6096 | #else | |
6097 | wenotbecray | |
6098 | #endif | |
6099 | ||
6100 | EOF | |
6101 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6102 | egrep "webecray" >/dev/null 2>&1; then | |
6103 | rm -rf conftest* | |
6104 | ac_cv_os_cray=yes | |
6105 | else | |
6106 | rm -rf conftest* | |
6107 | ac_cv_os_cray=no | |
6108 | fi | |
6109 | rm -f conftest* | |
6110 | ||
6111 | fi | |
6112 | ||
6113 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
6114 | if test $ac_cv_os_cray = yes; then | |
6115 | for ac_func in _getb67 GETB67 getb67; do | |
6116 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 6117 | echo "configure:6118: checking for $ac_func" >&5 |
46711df8 MK |
6118 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6120 | else | |
6121 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6122 | #line 6123 "configure" |
46711df8 MK |
6123 | #include "confdefs.h" |
6124 | /* System header to define __stub macros and hopefully few prototypes, | |
6125 | which can conflict with char $ac_func(); below. */ | |
6126 | #include <assert.h> | |
6127 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6128 | /* We use char because int might match the return type of a gcc2 | |
6129 | builtin and then its argument prototype would still apply. */ | |
6130 | char $ac_func(); | |
6131 | ||
6132 | int main() { | |
6133 | ||
6134 | /* The GNU C library defines this for functions which it implements | |
6135 | to always fail with ENOSYS. Some functions are actually named | |
6136 | something starting with __ and the normal name is an alias. */ | |
6137 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6138 | choke me | |
6139 | #else | |
6140 | $ac_func(); | |
6141 | #endif | |
6142 | ||
6143 | ; return 0; } | |
6144 | EOF | |
02d62932 | 6145 | if { (eval echo configure:6146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6146 | rm -rf conftest* |
6147 | eval "ac_cv_func_$ac_func=yes" | |
6148 | else | |
6149 | echo "configure: failed program was:" >&5 | |
6150 | cat conftest.$ac_ext >&5 | |
6151 | rm -rf conftest* | |
6152 | eval "ac_cv_func_$ac_func=no" | |
6153 | fi | |
6154 | rm -f conftest* | |
6155 | fi | |
6156 | ||
6157 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6158 | echo "$ac_t""yes" 1>&6 | |
6159 | cat >> confdefs.h <<EOF | |
6160 | #define CRAY_STACKSEG_END $ac_func | |
6161 | EOF | |
6162 | ||
6163 | break | |
6164 | else | |
6165 | echo "$ac_t""no" 1>&6 | |
6166 | fi | |
6167 | ||
6168 | done | |
6169 | fi | |
6170 | ||
6171 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
02d62932 | 6172 | echo "configure:6173: checking stack direction for C alloca" >&5 |
46711df8 MK |
6173 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
6174 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6175 | else | |
6176 | if test "$cross_compiling" = yes; then | |
6177 | ac_cv_c_stack_direction=0 | |
6178 | else | |
6179 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6180 | #line 6181 "configure" |
46711df8 MK |
6181 | #include "confdefs.h" |
6182 | find_stack_direction () | |
6183 | { | |
6184 | static char *addr = 0; | |
6185 | auto char dummy; | |
6186 | if (addr == 0) | |
6187 | { | |
6188 | addr = &dummy; | |
6189 | return find_stack_direction (); | |
6190 | } | |
6191 | else | |
6192 | return (&dummy > addr) ? 1 : -1; | |
6193 | } | |
6194 | main () | |
6195 | { | |
6196 | exit (find_stack_direction() < 0); | |
6197 | } | |
6198 | EOF | |
02d62932 | 6199 | if { (eval echo configure:6200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
6200 | then |
6201 | ac_cv_c_stack_direction=1 | |
6202 | else | |
6203 | echo "configure: failed program was:" >&5 | |
6204 | cat conftest.$ac_ext >&5 | |
6205 | rm -fr conftest* | |
6206 | ac_cv_c_stack_direction=-1 | |
6207 | fi | |
6208 | rm -fr conftest* | |
6209 | fi | |
6210 | ||
6211 | fi | |
6212 | ||
6213 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
6214 | cat >> confdefs.h <<EOF | |
6215 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6216 | EOF | |
6217 | ||
6218 | fi | |
6219 | ||
d836ee13 | 6220 | for ac_hdr in unistd.h |
97bf5e38 MK |
6221 | do |
6222 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
6223 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
02d62932 | 6224 | echo "configure:6225: checking for $ac_hdr" >&5 |
74c1b268 AC |
6225 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6226 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6227 | else | |
6228 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6229 | #line 6230 "configure" |
74c1b268 | 6230 | #include "confdefs.h" |
97bf5e38 | 6231 | #include <$ac_hdr> |
74c1b268 AC |
6232 | EOF |
6233 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
02d62932 | 6234 | { (eval echo configure:6235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
6235 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6236 | if test -z "$ac_err"; then | |
6237 | rm -rf conftest* | |
6238 | eval "ac_cv_header_$ac_safe=yes" | |
6239 | else | |
6240 | echo "$ac_err" >&5 | |
6241 | echo "configure: failed program was:" >&5 | |
6242 | cat conftest.$ac_ext >&5 | |
6243 | rm -rf conftest* | |
6244 | eval "ac_cv_header_$ac_safe=no" | |
6245 | fi | |
6246 | rm -f conftest* | |
6247 | fi | |
6248 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6249 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
6250 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
6251 | cat >> confdefs.h <<EOF | |
6252 | #define $ac_tr_hdr 1 | |
74c1b268 | 6253 | EOF |
97bf5e38 | 6254 | |
74c1b268 AC |
6255 | else |
6256 | echo "$ac_t""no" 1>&6 | |
6257 | fi | |
97bf5e38 | 6258 | done |
74c1b268 | 6259 | |
97bf5e38 MK |
6260 | for ac_func in getpagesize |
6261 | do | |
6262 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 6263 | echo "configure:6264: checking for $ac_func" >&5 |
97bf5e38 | 6264 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
6265 | echo $ac_n "(cached) $ac_c" 1>&6 |
6266 | else | |
6267 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6268 | #line 6269 "configure" |
74c1b268 AC |
6269 | #include "confdefs.h" |
6270 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 6271 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
6272 | #include <assert.h> |
6273 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6274 | /* We use char because int might match the return type of a gcc2 | |
6275 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 6276 | char $ac_func(); |
74c1b268 AC |
6277 | |
6278 | int main() { | |
6279 | ||
6280 | /* The GNU C library defines this for functions which it implements | |
6281 | to always fail with ENOSYS. Some functions are actually named | |
6282 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 6283 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
6284 | choke me |
6285 | #else | |
97bf5e38 | 6286 | $ac_func(); |
74c1b268 AC |
6287 | #endif |
6288 | ||
6289 | ; return 0; } | |
6290 | EOF | |
02d62932 | 6291 | if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 6292 | rm -rf conftest* |
97bf5e38 | 6293 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
6294 | else |
6295 | echo "configure: failed program was:" >&5 | |
6296 | cat conftest.$ac_ext >&5 | |
6297 | rm -rf conftest* | |
97bf5e38 | 6298 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
6299 | fi |
6300 | rm -f conftest* | |
6301 | fi | |
6302 | ||
97bf5e38 | 6303 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 6304 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
6305 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6306 | cat >> confdefs.h <<EOF | |
6307 | #define $ac_tr_func 1 | |
6308 | EOF | |
6309 | ||
74c1b268 AC |
6310 | else |
6311 | echo "$ac_t""no" 1>&6 | |
6312 | fi | |
97bf5e38 | 6313 | done |
74c1b268 | 6314 | |
97bf5e38 | 6315 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
02d62932 | 6316 | echo "configure:6317: checking for working mmap" >&5 |
97bf5e38 MK |
6317 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6318 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6319 | else | |
6320 | if test "$cross_compiling" = yes; then | |
6321 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
6322 | else |
6323 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6324 | #line 6325 "configure" |
74c1b268 | 6325 | #include "confdefs.h" |
97bf5e38 MK |
6326 | |
6327 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6328 | Here is a matrix of mmap possibilities: | |
6329 | mmap private not fixed | |
6330 | mmap private fixed at somewhere currently unmapped | |
6331 | mmap private fixed at somewhere already mapped | |
6332 | mmap shared not fixed | |
6333 | mmap shared fixed at somewhere currently unmapped | |
6334 | mmap shared fixed at somewhere already mapped | |
6335 | For private mappings, we should verify that changes cannot be read() | |
6336 | back from the file, nor mmap's back from the file at a different | |
6337 | address. (There have been systems where private was not correctly | |
6338 | implemented like the infamous i386 svr4.0, and systems where the | |
6339 | VM page cache was not coherent with the filesystem buffer cache | |
6340 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6341 | For shared mappings, we should conversely verify that changes get | |
6342 | propogated back to all the places they're supposed to be. | |
6343 | ||
6344 | Grep wants private fixed already mapped. | |
6345 | The main things grep needs to know about mmap are: | |
6346 | * does it exist and is it safe to write into the mmap'd area | |
6347 | * how to use it (BSD variants) */ | |
74c1b268 | 6348 | #include <sys/types.h> |
97bf5e38 MK |
6349 | #include <fcntl.h> |
6350 | #include <sys/mman.h> | |
6351 | ||
6352 | /* This mess was copied from the GNU getpagesize.h. */ | |
6353 | #ifndef HAVE_GETPAGESIZE | |
d836ee13 AC |
6354 | # ifdef HAVE_UNISTD_H |
6355 | # include <unistd.h> | |
6356 | # endif | |
97bf5e38 MK |
6357 | |
6358 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6359 | # ifndef HAVE_SYS_PARAM_H | |
6360 | # define HAVE_SYS_PARAM_H 1 | |
6361 | # endif | |
6362 | ||
6363 | # ifdef _SC_PAGESIZE | |
6364 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6365 | # else /* no _SC_PAGESIZE */ | |
6366 | # ifdef HAVE_SYS_PARAM_H | |
6367 | # include <sys/param.h> | |
6368 | # ifdef EXEC_PAGESIZE | |
6369 | # define getpagesize() EXEC_PAGESIZE | |
6370 | # else /* no EXEC_PAGESIZE */ | |
6371 | # ifdef NBPG | |
6372 | # define getpagesize() NBPG * CLSIZE | |
6373 | # ifndef CLSIZE | |
6374 | # define CLSIZE 1 | |
6375 | # endif /* no CLSIZE */ | |
6376 | # else /* no NBPG */ | |
6377 | # ifdef NBPC | |
6378 | # define getpagesize() NBPC | |
6379 | # else /* no NBPC */ | |
6380 | # ifdef PAGESIZE | |
6381 | # define getpagesize() PAGESIZE | |
6382 | # endif /* PAGESIZE */ | |
6383 | # endif /* no NBPC */ | |
6384 | # endif /* no NBPG */ | |
6385 | # endif /* no EXEC_PAGESIZE */ | |
6386 | # else /* no HAVE_SYS_PARAM_H */ | |
6387 | # define getpagesize() 8192 /* punt totally */ | |
6388 | # endif /* no HAVE_SYS_PARAM_H */ | |
6389 | # endif /* no _SC_PAGESIZE */ | |
6390 | ||
6391 | #endif /* no HAVE_GETPAGESIZE */ | |
6392 | ||
74c1b268 | 6393 | #ifdef __cplusplus |
97bf5e38 | 6394 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 6395 | #else |
97bf5e38 | 6396 | char *malloc(); |
74c1b268 | 6397 | #endif |
74c1b268 | 6398 | |
97bf5e38 MK |
6399 | int |
6400 | main() | |
6401 | { | |
6402 | char *data, *data2, *data3; | |
6403 | int i, pagesize; | |
6404 | int fd; | |
74c1b268 | 6405 | |
97bf5e38 | 6406 | pagesize = getpagesize(); |
74c1b268 | 6407 | |
97bf5e38 MK |
6408 | /* |
6409 | * First, make a file with some known garbage in it. | |
6410 | */ | |
6411 | data = malloc(pagesize); | |
6412 | if (!data) | |
6413 | exit(1); | |
6414 | for (i = 0; i < pagesize; ++i) | |
6415 | *(data + i) = rand(); | |
6416 | umask(0); | |
6417 | fd = creat("conftestmmap", 0600); | |
6418 | if (fd < 0) | |
6419 | exit(1); | |
6420 | if (write(fd, data, pagesize) != pagesize) | |
6421 | exit(1); | |
6422 | close(fd); | |
74c1b268 | 6423 | |
97bf5e38 MK |
6424 | /* |
6425 | * Next, try to mmap the file at a fixed address which | |
6426 | * already has something else allocated at it. If we can, | |
6427 | * also make sure that we see the same garbage. | |
6428 | */ | |
6429 | fd = open("conftestmmap", O_RDWR); | |
6430 | if (fd < 0) | |
6431 | exit(1); | |
6432 | data2 = malloc(2 * pagesize); | |
6433 | if (!data2) | |
6434 | exit(1); | |
6435 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6436 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6437 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6438 | exit(1); | |
6439 | for (i = 0; i < pagesize; ++i) | |
6440 | if (*(data + i) != *(data2 + i)) | |
6441 | exit(1); | |
74c1b268 | 6442 | |
97bf5e38 MK |
6443 | /* |
6444 | * Finally, make sure that changes to the mapped area | |
6445 | * do not percolate back to the file as seen by read(). | |
6446 | * (This is a bug on some variants of i386 svr4.0.) | |
6447 | */ | |
6448 | for (i = 0; i < pagesize; ++i) | |
6449 | *(data2 + i) = *(data2 + i) + 1; | |
6450 | data3 = malloc(pagesize); | |
6451 | if (!data3) | |
6452 | exit(1); | |
6453 | if (read(fd, data3, pagesize) != pagesize) | |
6454 | exit(1); | |
6455 | for (i = 0; i < pagesize; ++i) | |
6456 | if (*(data + i) != *(data3 + i)) | |
6457 | exit(1); | |
6458 | close(fd); | |
6459 | unlink("conftestmmap"); | |
6460 | exit(0); | |
74c1b268 | 6461 | } |
97bf5e38 | 6462 | |
74c1b268 | 6463 | EOF |
02d62932 | 6464 | if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6465 | then |
97bf5e38 | 6466 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6467 | else |
6468 | echo "configure: failed program was:" >&5 | |
6469 | cat conftest.$ac_ext >&5 | |
6470 | rm -fr conftest* | |
97bf5e38 | 6471 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6472 | fi |
6473 | rm -fr conftest* | |
6474 | fi | |
6475 | ||
6476 | fi | |
6477 | ||
97bf5e38 MK |
6478 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6479 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6480 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6481 | #define HAVE_MMAP 1 |
74c1b268 AC |
6482 | EOF |
6483 | ||
6484 | fi | |
6485 | ||
97bf5e38 | 6486 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
02d62932 | 6487 | echo "configure:6488: checking for pid_t" >&5 |
97bf5e38 | 6488 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6489 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6490 | else |
6491 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6492 | #line 6493 "configure" |
0200359f | 6493 | #include "confdefs.h" |
97bf5e38 MK |
6494 | #include <sys/types.h> |
6495 | #if STDC_HEADERS | |
6496 | #include <stdlib.h> | |
6497 | #include <stddef.h> | |
0200359f | 6498 | #endif |
0200359f | 6499 | EOF |
97bf5e38 MK |
6500 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6501 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6502 | rm -rf conftest* | |
6503 | ac_cv_type_pid_t=yes | |
0200359f | 6504 | else |
97bf5e38 MK |
6505 | rm -rf conftest* |
6506 | ac_cv_type_pid_t=no | |
0200359f | 6507 | fi |
97bf5e38 | 6508 | rm -f conftest* |
0200359f MK |
6509 | |
6510 | fi | |
97bf5e38 MK |
6511 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6512 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6513 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6514 | #define pid_t int |
0200359f MK |
6515 | EOF |
6516 | ||
6517 | fi | |
6518 | ||
97bf5e38 MK |
6519 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6520 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
02d62932 | 6521 | echo "configure:6522: checking for vfork.h" >&5 |
97bf5e38 | 6522 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6523 | echo $ac_n "(cached) $ac_c" 1>&6 |
6524 | else | |
6525 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6526 | #line 6527 "configure" |
72473524 | 6527 | #include "confdefs.h" |
97bf5e38 | 6528 | #include <vfork.h> |
72473524 | 6529 | EOF |
97bf5e38 | 6530 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
02d62932 | 6531 | { (eval echo configure:6532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6532 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6533 | if test -z "$ac_err"; then | |
72473524 | 6534 | rm -rf conftest* |
97bf5e38 | 6535 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6536 | else |
97bf5e38 | 6537 | echo "$ac_err" >&5 |
72473524 DJ |
6538 | echo "configure: failed program was:" >&5 |
6539 | cat conftest.$ac_ext >&5 | |
6540 | rm -rf conftest* | |
97bf5e38 | 6541 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6542 | fi |
6543 | rm -f conftest* | |
6544 | fi | |
97bf5e38 MK |
6545 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6546 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6547 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6548 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6549 | EOF |
6550 | ||
97bf5e38 MK |
6551 | else |
6552 | echo "$ac_t""no" 1>&6 | |
72473524 | 6553 | fi |
c906108c | 6554 | |
97bf5e38 | 6555 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
02d62932 | 6556 | echo "configure:6557: checking for working vfork" >&5 |
97bf5e38 MK |
6557 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6558 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6559 | else | |
6560 | if test "$cross_compiling" = yes; then | |
6561 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
02d62932 | 6562 | echo "configure:6563: checking for vfork" >&5 |
97bf5e38 | 6563 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6564 | echo $ac_n "(cached) $ac_c" 1>&6 |
6565 | else | |
6566 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6567 | #line 6568 "configure" |
2b2d558c | 6568 | #include "confdefs.h" |
97bf5e38 MK |
6569 | /* System header to define __stub macros and hopefully few prototypes, |
6570 | which can conflict with char vfork(); below. */ | |
6571 | #include <assert.h> | |
6572 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6573 | /* We use char because int might match the return type of a gcc2 | |
6574 | builtin and then its argument prototype would still apply. */ | |
6575 | char vfork(); | |
2b2d558c MK |
6576 | |
6577 | int main() { | |
97bf5e38 MK |
6578 | |
6579 | /* The GNU C library defines this for functions which it implements | |
6580 | to always fail with ENOSYS. Some functions are actually named | |
6581 | something starting with __ and the normal name is an alias. */ | |
6582 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6583 | choke me | |
6584 | #else | |
6585 | vfork(); | |
6586 | #endif | |
6587 | ||
2b2d558c MK |
6588 | ; return 0; } |
6589 | EOF | |
02d62932 | 6590 | if { (eval echo configure:6591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6591 | rm -rf conftest* |
97bf5e38 | 6592 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6593 | else |
6594 | echo "configure: failed program was:" >&5 | |
6595 | cat conftest.$ac_ext >&5 | |
6596 | rm -rf conftest* | |
97bf5e38 | 6597 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6598 | fi |
6599 | rm -f conftest* | |
6600 | fi | |
6601 | ||
97bf5e38 MK |
6602 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6603 | echo "$ac_t""yes" 1>&6 | |
6604 | : | |
6605 | else | |
6606 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6607 | fi |
6608 | ||
97bf5e38 | 6609 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6610 | else |
6611 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6612 | #line 6613 "configure" |
7dfa765c | 6613 | #include "confdefs.h" |
97bf5e38 MK |
6614 | /* Thanks to Paul Eggert for this test. */ |
6615 | #include <stdio.h> | |
6616 | #include <sys/types.h> | |
6617 | #include <sys/stat.h> | |
6618 | #ifdef HAVE_UNISTD_H | |
6619 | #include <unistd.h> | |
6620 | #endif | |
6621 | #ifdef HAVE_VFORK_H | |
6622 | #include <vfork.h> | |
6623 | #endif | |
6624 | /* On some sparc systems, changes by the child to local and incoming | |
6625 | argument registers are propagated back to the parent. | |
6626 | The compiler is told about this with #include <vfork.h>, | |
6627 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6628 | Test for this by using a static variable whose address | |
6629 | is put into a register that is clobbered by the vfork. */ | |
6630 | static | |
6631 | #ifdef __cplusplus | |
6632 | sparc_address_test (int arg) | |
6633 | #else | |
6634 | sparc_address_test (arg) int arg; | |
6635 | #endif | |
6636 | { | |
6637 | static pid_t child; | |
6638 | if (!child) { | |
6639 | child = vfork (); | |
6640 | if (child < 0) { | |
6641 | perror ("vfork"); | |
6642 | _exit(2); | |
6643 | } | |
6644 | if (!child) { | |
6645 | arg = getpid(); | |
6646 | write(-1, "", 0); | |
6647 | _exit (arg); | |
6648 | } | |
6649 | } | |
6650 | } | |
6651 | main() { | |
6652 | pid_t parent = getpid (); | |
6653 | pid_t child; | |
7dfa765c | 6654 | |
97bf5e38 | 6655 | sparc_address_test (); |
7dfa765c | 6656 | |
97bf5e38 | 6657 | child = vfork (); |
7dfa765c | 6658 | |
97bf5e38 MK |
6659 | if (child == 0) { |
6660 | /* Here is another test for sparc vfork register problems. | |
6661 | This test uses lots of local variables, at least | |
6662 | as many local variables as main has allocated so far | |
6663 | including compiler temporaries. 4 locals are enough for | |
6664 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6665 | A buggy compiler should reuse the register of parent | |
6666 | for one of the local variables, since it will think that | |
6667 | parent can't possibly be used any more in this routine. | |
6668 | Assigning to the local variable will thus munge parent | |
6669 | in the parent process. */ | |
6670 | pid_t | |
6671 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6672 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6673 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6674 | use the same hardware register for all 8 local variables. */ | |
6675 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6676 | || p != p5 || p != p6 || p != p7) | |
6677 | _exit(1); | |
7dfa765c | 6678 | |
97bf5e38 MK |
6679 | /* On some systems (e.g. IRIX 3.3), |
6680 | vfork doesn't separate parent from child file descriptors. | |
6681 | If the child closes a descriptor before it execs or exits, | |
6682 | this munges the parent's descriptor as well. | |
6683 | Test for this by closing stdout in the child. */ | |
6684 | _exit(close(fileno(stdout)) != 0); | |
6685 | } else { | |
6686 | int status; | |
6687 | struct stat st; | |
64bb1671 | 6688 | |
97bf5e38 MK |
6689 | while (wait(&status) != child) |
6690 | ; | |
6691 | exit( | |
6692 | /* Was there some problem with vforking? */ | |
6693 | child < 0 | |
64bb1671 | 6694 | |
97bf5e38 MK |
6695 | /* Did the child fail? (This shouldn't happen.) */ |
6696 | || status | |
64bb1671 | 6697 | |
97bf5e38 MK |
6698 | /* Did the vfork/compiler bug occur? */ |
6699 | || parent != getpid() | |
6700 | ||
6701 | /* Did the file descriptor bug occur? */ | |
6702 | || fstat(fileno(stdout), &st) != 0 | |
6703 | ); | |
6704 | } | |
6705 | } | |
5c44784c | 6706 | EOF |
02d62932 | 6707 | if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6708 | then |
6709 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6710 | else |
6711 | echo "configure: failed program was:" >&5 | |
6712 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6713 | rm -fr conftest* |
6714 | ac_cv_func_vfork_works=no | |
5c44784c | 6715 | fi |
97bf5e38 | 6716 | rm -fr conftest* |
5c44784c JM |
6717 | fi |
6718 | ||
0afdd437 MK |
6719 | fi |
6720 | ||
97bf5e38 MK |
6721 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6722 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6723 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6724 | #define vfork fork |
0afdd437 MK |
6725 | EOF |
6726 | ||
6727 | fi | |
6728 | ||
97bf5e38 MK |
6729 | for ac_func in canonicalize_file_name realpath |
6730 | do | |
6731 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 6732 | echo "configure:6733: checking for $ac_func" >&5 |
97bf5e38 | 6733 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6734 | echo $ac_n "(cached) $ac_c" 1>&6 |
6735 | else | |
6736 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6737 | #line 6738 "configure" |
7e89e357 | 6738 | #include "confdefs.h" |
97bf5e38 MK |
6739 | /* System header to define __stub macros and hopefully few prototypes, |
6740 | which can conflict with char $ac_func(); below. */ | |
6741 | #include <assert.h> | |
6742 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6743 | /* We use char because int might match the return type of a gcc2 | |
6744 | builtin and then its argument prototype would still apply. */ | |
6745 | char $ac_func(); | |
6746 | ||
7e89e357 | 6747 | int main() { |
97bf5e38 MK |
6748 | |
6749 | /* The GNU C library defines this for functions which it implements | |
6750 | to always fail with ENOSYS. Some functions are actually named | |
6751 | something starting with __ and the normal name is an alias. */ | |
6752 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6753 | choke me | |
6754 | #else | |
6755 | $ac_func(); | |
6756 | #endif | |
6757 | ||
7e89e357 JT |
6758 | ; return 0; } |
6759 | EOF | |
02d62932 | 6760 | if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6761 | rm -rf conftest* |
97bf5e38 | 6762 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6763 | else |
6764 | echo "configure: failed program was:" >&5 | |
6765 | cat conftest.$ac_ext >&5 | |
6766 | rm -rf conftest* | |
97bf5e38 | 6767 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6768 | fi |
6769 | rm -f conftest* | |
6770 | fi | |
6771 | ||
97bf5e38 MK |
6772 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6773 | echo "$ac_t""yes" 1>&6 | |
6774 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6775 | cat >> confdefs.h <<EOF | |
6776 | #define $ac_tr_func 1 | |
7e89e357 | 6777 | EOF |
97bf5e38 MK |
6778 | |
6779 | else | |
6780 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6781 | fi |
97bf5e38 | 6782 | done |
7e89e357 | 6783 | |
97bf5e38 | 6784 | for ac_func in poll |
7be570e7 JM |
6785 | do |
6786 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 6787 | echo "configure:6788: checking for $ac_func" >&5 |
7be570e7 JM |
6788 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6789 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6790 | else | |
6791 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6792 | #line 6793 "configure" |
7be570e7 JM |
6793 | #include "confdefs.h" |
6794 | /* System header to define __stub macros and hopefully few prototypes, | |
6795 | which can conflict with char $ac_func(); below. */ | |
6796 | #include <assert.h> | |
6797 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6798 | /* We use char because int might match the return type of a gcc2 | |
6799 | builtin and then its argument prototype would still apply. */ | |
6800 | char $ac_func(); | |
6801 | ||
6802 | int main() { | |
6803 | ||
6804 | /* The GNU C library defines this for functions which it implements | |
6805 | to always fail with ENOSYS. Some functions are actually named | |
6806 | something starting with __ and the normal name is an alias. */ | |
6807 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6808 | choke me | |
6809 | #else | |
6810 | $ac_func(); | |
6811 | #endif | |
6812 | ||
6813 | ; return 0; } | |
6814 | EOF | |
02d62932 | 6815 | if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6816 | rm -rf conftest* |
6817 | eval "ac_cv_func_$ac_func=yes" | |
6818 | else | |
6819 | echo "configure: failed program was:" >&5 | |
6820 | cat conftest.$ac_ext >&5 | |
6821 | rm -rf conftest* | |
6822 | eval "ac_cv_func_$ac_func=no" | |
6823 | fi | |
6824 | rm -f conftest* | |
6825 | fi | |
6826 | ||
6827 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6828 | echo "$ac_t""yes" 1>&6 | |
6829 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6830 | cat >> confdefs.h <<EOF | |
6831 | #define $ac_tr_func 1 | |
6832 | EOF | |
6833 | ||
6834 | else | |
6835 | echo "$ac_t""no" 1>&6 | |
6836 | fi | |
6837 | done | |
6838 | ||
6839 | for ac_func in pread64 | |
6840 | do | |
6841 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 6842 | echo "configure:6843: checking for $ac_func" >&5 |
14abd0fb MK |
6843 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6845 | else | |
6846 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6847 | #line 6848 "configure" |
14abd0fb MK |
6848 | #include "confdefs.h" |
6849 | /* System header to define __stub macros and hopefully few prototypes, | |
6850 | which can conflict with char $ac_func(); below. */ | |
6851 | #include <assert.h> | |
6852 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6853 | /* We use char because int might match the return type of a gcc2 | |
6854 | builtin and then its argument prototype would still apply. */ | |
6855 | char $ac_func(); | |
6856 | ||
6857 | int main() { | |
6858 | ||
6859 | /* The GNU C library defines this for functions which it implements | |
6860 | to always fail with ENOSYS. Some functions are actually named | |
6861 | something starting with __ and the normal name is an alias. */ | |
6862 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6863 | choke me | |
6864 | #else | |
6865 | $ac_func(); | |
6866 | #endif | |
6867 | ||
6868 | ; return 0; } | |
6869 | EOF | |
02d62932 | 6870 | if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6871 | rm -rf conftest* |
6872 | eval "ac_cv_func_$ac_func=yes" | |
6873 | else | |
6874 | echo "configure: failed program was:" >&5 | |
6875 | cat conftest.$ac_ext >&5 | |
6876 | rm -rf conftest* | |
6877 | eval "ac_cv_func_$ac_func=no" | |
6878 | fi | |
6879 | rm -f conftest* | |
6880 | fi | |
6881 | ||
6882 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6883 | echo "$ac_t""yes" 1>&6 | |
6884 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6885 | cat >> confdefs.h <<EOF | |
6886 | #define $ac_tr_func 1 | |
6887 | EOF | |
6888 | ||
6889 | else | |
6890 | echo "$ac_t""no" 1>&6 | |
6891 | fi | |
6892 | done | |
6893 | ||
97bf5e38 MK |
6894 | for ac_func in sbrk |
6895 | do | |
6896 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 6897 | echo "configure:6898: checking for $ac_func" >&5 |
97bf5e38 | 6898 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6899 | echo $ac_n "(cached) $ac_c" 1>&6 |
6900 | else | |
6901 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6902 | #line 6903 "configure" |
c906108c | 6903 | #include "confdefs.h" |
97bf5e38 MK |
6904 | /* System header to define __stub macros and hopefully few prototypes, |
6905 | which can conflict with char $ac_func(); below. */ | |
6906 | #include <assert.h> | |
6907 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6908 | /* We use char because int might match the return type of a gcc2 | |
6909 | builtin and then its argument prototype would still apply. */ | |
6910 | char $ac_func(); | |
c906108c | 6911 | |
97bf5e38 MK |
6912 | int main() { |
6913 | ||
6914 | /* The GNU C library defines this for functions which it implements | |
6915 | to always fail with ENOSYS. Some functions are actually named | |
6916 | something starting with __ and the normal name is an alias. */ | |
6917 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6918 | choke me | |
c906108c | 6919 | #else |
97bf5e38 | 6920 | $ac_func(); |
c906108c | 6921 | #endif |
97bf5e38 | 6922 | |
c906108c SS |
6923 | ; return 0; } |
6924 | EOF | |
02d62932 | 6925 | if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6926 | rm -rf conftest* |
97bf5e38 | 6927 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6928 | else |
6929 | echo "configure: failed program was:" >&5 | |
6930 | cat conftest.$ac_ext >&5 | |
6931 | rm -rf conftest* | |
97bf5e38 | 6932 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6933 | fi |
6934 | rm -f conftest* | |
6935 | fi | |
6936 | ||
97bf5e38 MK |
6937 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6938 | echo "$ac_t""yes" 1>&6 | |
6939 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6940 | cat >> confdefs.h <<EOF | |
6941 | #define $ac_tr_func 1 | |
c906108c | 6942 | EOF |
97bf5e38 MK |
6943 | |
6944 | else | |
6945 | echo "$ac_t""no" 1>&6 | |
c906108c | 6946 | fi |
97bf5e38 | 6947 | done |
c906108c | 6948 | |
97bf5e38 MK |
6949 | for ac_func in setpgid setpgrp |
6950 | do | |
6951 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 6952 | echo "configure:6953: checking for $ac_func" >&5 |
97bf5e38 | 6953 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6954 | echo $ac_n "(cached) $ac_c" 1>&6 |
6955 | else | |
6956 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 6957 | #line 6958 "configure" |
c906108c | 6958 | #include "confdefs.h" |
97bf5e38 MK |
6959 | /* System header to define __stub macros and hopefully few prototypes, |
6960 | which can conflict with char $ac_func(); below. */ | |
6961 | #include <assert.h> | |
6962 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6963 | /* We use char because int might match the return type of a gcc2 | |
6964 | builtin and then its argument prototype would still apply. */ | |
6965 | char $ac_func(); | |
c906108c | 6966 | |
97bf5e38 MK |
6967 | int main() { |
6968 | ||
6969 | /* The GNU C library defines this for functions which it implements | |
6970 | to always fail with ENOSYS. Some functions are actually named | |
6971 | something starting with __ and the normal name is an alias. */ | |
6972 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6973 | choke me | |
c906108c | 6974 | #else |
97bf5e38 | 6975 | $ac_func(); |
c906108c | 6976 | #endif |
97bf5e38 | 6977 | |
c906108c SS |
6978 | ; return 0; } |
6979 | EOF | |
02d62932 | 6980 | if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6981 | rm -rf conftest* |
97bf5e38 | 6982 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6983 | else |
6984 | echo "configure: failed program was:" >&5 | |
6985 | cat conftest.$ac_ext >&5 | |
6986 | rm -rf conftest* | |
97bf5e38 | 6987 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6988 | fi |
6989 | rm -f conftest* | |
6990 | fi | |
6991 | ||
97bf5e38 MK |
6992 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6993 | echo "$ac_t""yes" 1>&6 | |
6994 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6995 | cat >> confdefs.h <<EOF | |
6996 | #define $ac_tr_func 1 | |
c906108c | 6997 | EOF |
97bf5e38 MK |
6998 | |
6999 | else | |
7000 | echo "$ac_t""no" 1>&6 | |
c906108c | 7001 | fi |
97bf5e38 | 7002 | done |
c906108c | 7003 | |
e1ea1d75 | 7004 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
7005 | do |
7006 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 7007 | echo "configure:7008: checking for $ac_func" >&5 |
97bf5e38 | 7008 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
7009 | echo $ac_n "(cached) $ac_c" 1>&6 |
7010 | else | |
7011 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7012 | #line 7013 "configure" |
c906108c | 7013 | #include "confdefs.h" |
97bf5e38 MK |
7014 | /* System header to define __stub macros and hopefully few prototypes, |
7015 | which can conflict with char $ac_func(); below. */ | |
7016 | #include <assert.h> | |
7017 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7018 | /* We use char because int might match the return type of a gcc2 | |
7019 | builtin and then its argument prototype would still apply. */ | |
7020 | char $ac_func(); | |
c906108c | 7021 | |
97bf5e38 MK |
7022 | int main() { |
7023 | ||
7024 | /* The GNU C library defines this for functions which it implements | |
7025 | to always fail with ENOSYS. Some functions are actually named | |
7026 | something starting with __ and the normal name is an alias. */ | |
7027 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7028 | choke me | |
c906108c | 7029 | #else |
97bf5e38 | 7030 | $ac_func(); |
c906108c | 7031 | #endif |
97bf5e38 | 7032 | |
c906108c SS |
7033 | ; return 0; } |
7034 | EOF | |
02d62932 | 7035 | if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 7036 | rm -rf conftest* |
97bf5e38 | 7037 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
7038 | else |
7039 | echo "configure: failed program was:" >&5 | |
7040 | cat conftest.$ac_ext >&5 | |
7041 | rm -rf conftest* | |
97bf5e38 | 7042 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
7043 | fi |
7044 | rm -f conftest* | |
7045 | fi | |
7046 | ||
97bf5e38 MK |
7047 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
7048 | echo "$ac_t""yes" 1>&6 | |
7049 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7050 | cat >> confdefs.h <<EOF | |
7051 | #define $ac_tr_func 1 | |
c906108c | 7052 | EOF |
e1ea1d75 | 7053 | |
97bf5e38 MK |
7054 | else |
7055 | echo "$ac_t""no" 1>&6 | |
c906108c | 7056 | fi |
97bf5e38 | 7057 | done |
c906108c | 7058 | |
97bf5e38 MK |
7059 | for ac_func in socketpair |
7060 | do | |
7061 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 7062 | echo "configure:7063: checking for $ac_func" >&5 |
97bf5e38 | 7063 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
7064 | echo $ac_n "(cached) $ac_c" 1>&6 |
7065 | else | |
7066 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7067 | #line 7068 "configure" |
c906108c | 7068 | #include "confdefs.h" |
97bf5e38 MK |
7069 | /* System header to define __stub macros and hopefully few prototypes, |
7070 | which can conflict with char $ac_func(); below. */ | |
7071 | #include <assert.h> | |
7072 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7073 | /* We use char because int might match the return type of a gcc2 | |
7074 | builtin and then its argument prototype would still apply. */ | |
7075 | char $ac_func(); | |
c906108c | 7076 | |
97bf5e38 MK |
7077 | int main() { |
7078 | ||
7079 | /* The GNU C library defines this for functions which it implements | |
7080 | to always fail with ENOSYS. Some functions are actually named | |
7081 | something starting with __ and the normal name is an alias. */ | |
7082 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7083 | choke me | |
c906108c | 7084 | #else |
97bf5e38 | 7085 | $ac_func(); |
c906108c | 7086 | #endif |
97bf5e38 | 7087 | |
c906108c SS |
7088 | ; return 0; } |
7089 | EOF | |
02d62932 | 7090 | if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 7091 | rm -rf conftest* |
97bf5e38 | 7092 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
7093 | else |
7094 | echo "configure: failed program was:" >&5 | |
7095 | cat conftest.$ac_ext >&5 | |
7096 | rm -rf conftest* | |
97bf5e38 | 7097 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
7098 | fi |
7099 | rm -f conftest* | |
7100 | fi | |
7101 | ||
97bf5e38 MK |
7102 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
7103 | echo "$ac_t""yes" 1>&6 | |
7104 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7105 | cat >> confdefs.h <<EOF | |
7106 | #define $ac_tr_func 1 | |
c906108c | 7107 | EOF |
97bf5e38 MK |
7108 | |
7109 | else | |
7110 | echo "$ac_t""no" 1>&6 | |
c906108c | 7111 | fi |
97bf5e38 | 7112 | done |
c906108c | 7113 | |
b757528f JJ |
7114 | for ac_func in syscall |
7115 | do | |
7116 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
02d62932 | 7117 | echo "configure:7118: checking for $ac_func" >&5 |
b757528f JJ |
7118 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7120 | else | |
7121 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7122 | #line 7123 "configure" |
b757528f JJ |
7123 | #include "confdefs.h" |
7124 | /* System header to define __stub macros and hopefully few prototypes, | |
7125 | which can conflict with char $ac_func(); below. */ | |
7126 | #include <assert.h> | |
7127 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7128 | /* We use char because int might match the return type of a gcc2 | |
7129 | builtin and then its argument prototype would still apply. */ | |
7130 | char $ac_func(); | |
7131 | ||
7132 | int main() { | |
7133 | ||
7134 | /* The GNU C library defines this for functions which it implements | |
7135 | to always fail with ENOSYS. Some functions are actually named | |
7136 | something starting with __ and the normal name is an alias. */ | |
7137 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7138 | choke me | |
7139 | #else | |
7140 | $ac_func(); | |
7141 | #endif | |
7142 | ||
7143 | ; return 0; } | |
7144 | EOF | |
02d62932 | 7145 | if { (eval echo configure:7146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
7146 | rm -rf conftest* |
7147 | eval "ac_cv_func_$ac_func=yes" | |
7148 | else | |
7149 | echo "configure: failed program was:" >&5 | |
7150 | cat conftest.$ac_ext >&5 | |
7151 | rm -rf conftest* | |
7152 | eval "ac_cv_func_$ac_func=no" | |
7153 | fi | |
7154 | rm -f conftest* | |
7155 | fi | |
7156 | ||
7157 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7158 | echo "$ac_t""yes" 1>&6 | |
7159 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7160 | cat >> confdefs.h <<EOF | |
7161 | #define $ac_tr_func 1 | |
7162 | EOF | |
7163 | ||
7164 | else | |
7165 | echo "$ac_t""no" 1>&6 | |
7166 | fi | |
7167 | done | |
7168 | ||
97bf5e38 MK |
7169 | |
7170 | if test "$cross_compiling" = no; then | |
7171 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
02d62932 | 7172 | echo "configure:7173: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7173 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 7174 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
7175 | else |
7176 | if test "$cross_compiling" = yes; then | |
7177 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
7178 | else |
7179 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7180 | #line 7181 "configure" |
c906108c SS |
7181 | #include "confdefs.h" |
7182 | ||
c906108c SS |
7183 | #ifdef HAVE_UNISTD_H |
7184 | #include <unistd.h> | |
7185 | #endif | |
97bf5e38 MK |
7186 | |
7187 | /* | |
7188 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
7189 | * successfully. | |
7190 | */ | |
7191 | main() | |
7192 | { | |
7193 | if (setpgrp(1,1) == -1) | |
7194 | exit(0); | |
7195 | else | |
7196 | exit(1); | |
7197 | } | |
7198 | ||
c906108c | 7199 | EOF |
02d62932 | 7200 | if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7201 | then |
7202 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
7203 | else |
7204 | echo "configure: failed program was:" >&5 | |
7205 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7206 | rm -fr conftest* |
7207 | ac_cv_func_setpgrp_void=yes | |
c906108c | 7208 | fi |
97bf5e38 | 7209 | rm -fr conftest* |
c906108c SS |
7210 | fi |
7211 | ||
97bf5e38 MK |
7212 | |
7213 | fi | |
7214 | ||
7215 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
7216 | if test $ac_cv_func_setpgrp_void = yes; then | |
7217 | cat >> confdefs.h <<\EOF | |
7218 | #define SETPGRP_VOID 1 | |
c906108c SS |
7219 | EOF |
7220 | ||
7221 | fi | |
7222 | ||
97bf5e38 MK |
7223 | else |
7224 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
02d62932 | 7225 | echo "configure:7226: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7226 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
7227 | echo $ac_n "(cached) $ac_c" 1>&6 |
7228 | else | |
7229 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7230 | #line 7231 "configure" |
b83266a0 SS |
7231 | #include "confdefs.h" |
7232 | ||
b83266a0 | 7233 | #include <unistd.h> |
97bf5e38 | 7234 | |
b83266a0 | 7235 | int main() { |
97bf5e38 MK |
7236 | |
7237 | if (setpgrp(1,1) == -1) | |
7238 | exit (0); | |
7239 | else | |
7240 | exit (1); | |
7241 | ||
b83266a0 SS |
7242 | ; return 0; } |
7243 | EOF | |
02d62932 | 7244 | if { (eval echo configure:7245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 7245 | rm -rf conftest* |
97bf5e38 | 7246 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
7247 | else |
7248 | echo "configure: failed program was:" >&5 | |
7249 | cat conftest.$ac_ext >&5 | |
7250 | rm -rf conftest* | |
97bf5e38 | 7251 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
7252 | fi |
7253 | rm -f conftest* | |
7254 | fi | |
7255 | ||
97bf5e38 MK |
7256 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
7257 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 7258 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7259 | #define SETPGRP_VOID 1 |
b83266a0 SS |
7260 | EOF |
7261 | ||
97bf5e38 | 7262 | fi |
b83266a0 SS |
7263 | fi |
7264 | ||
97bf5e38 MK |
7265 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
7266 | # since sigsetjmp might only be defined as a macro. | |
7267 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
02d62932 | 7268 | echo "configure:7269: checking for sigsetjmp" >&5 |
97bf5e38 | 7269 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
7270 | echo $ac_n "(cached) $ac_c" 1>&6 |
7271 | else | |
7272 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7273 | #line 7274 "configure" |
a4db0f07 RH |
7274 | #include "confdefs.h" |
7275 | ||
97bf5e38 MK |
7276 | #include <setjmp.h> |
7277 | ||
a4db0f07 | 7278 | int main() { |
97bf5e38 | 7279 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
7280 | ; return 0; } |
7281 | EOF | |
02d62932 | 7282 | if { (eval echo configure:7283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 7283 | rm -rf conftest* |
97bf5e38 | 7284 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
7285 | else |
7286 | echo "configure: failed program was:" >&5 | |
7287 | cat conftest.$ac_ext >&5 | |
7288 | rm -rf conftest* | |
97bf5e38 | 7289 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
7290 | fi |
7291 | rm -f conftest* | |
7292 | fi | |
7293 | ||
97bf5e38 MK |
7294 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
7295 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 7296 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7297 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
7298 | EOF |
7299 | ||
7300 | fi | |
c906108c | 7301 | |
06825bd1 MK |
7302 | # Assume we'll default to using the included libiberty regex. |
7303 | gdb_use_included_regex=yes | |
7304 | ||
7305 | # However, if the system regex is GNU regex, then default to *not* | |
7306 | # using the included regex. | |
7307 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
02d62932 | 7308 | echo "configure:7309: checking for GNU regex" >&5 |
06825bd1 MK |
7309 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
7310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7311 | else | |
7312 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7313 | #line 7314 "configure" |
06825bd1 MK |
7314 | #include "confdefs.h" |
7315 | #include <gnu-versions.h> | |
7316 | int main() { | |
7317 | #define REGEX_INTERFACE_VERSION 1 | |
7318 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
7319 | # error "Version mismatch" | |
7320 | #endif | |
7321 | ; return 0; } | |
7322 | EOF | |
02d62932 | 7323 | if { (eval echo configure:7324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
7324 | rm -rf conftest* |
7325 | gdb_cv_have_gnu_regex=yes | |
7326 | else | |
7327 | echo "configure: failed program was:" >&5 | |
7328 | cat conftest.$ac_ext >&5 | |
7329 | rm -rf conftest* | |
7330 | gdb_cv_have_gnu_regex=no | |
7331 | fi | |
7332 | rm -f conftest* | |
7333 | fi | |
7334 | ||
7335 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
7336 | if test $gdb_cv_have_gnu_regex = yes; then | |
7337 | gdb_use_included_regex=no | |
7338 | fi | |
7339 | ||
7340 | # Check whether --with-included-regex or --without-included-regex was given. | |
7341 | if test "${with_included_regex+set}" = set; then | |
7342 | withval="$with_included_regex" | |
7343 | gdb_with_regex=$withval | |
7344 | else | |
7345 | gdb_with_regex=$gdb_use_included_regex | |
7346 | fi | |
7347 | ||
7348 | if test "$gdb_with_regex" = yes; then | |
7349 | cat >> confdefs.h <<\EOF | |
7350 | #define USE_INCLUDED_REGEX 1 | |
7351 | EOF | |
7352 | ||
7353 | fi | |
7354 | ||
78434e59 MK |
7355 | # See if <machine/reg.h> degines `struct reg'. |
7356 | echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6 | |
02d62932 | 7357 | echo "configure:7358: checking for struct reg in machine/reg.h" >&5 |
78434e59 MK |
7358 | if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then |
7359 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7360 | else | |
7361 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7362 | #line 7363 "configure" |
78434e59 MK |
7363 | #include "confdefs.h" |
7364 | #include <sys/types.h> | |
7365 | #include <machine/reg.h> | |
7366 | int main() { | |
7367 | struct reg r; | |
7368 | ; return 0; } | |
7369 | EOF | |
02d62932 | 7370 | if { (eval echo configure:7371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
78434e59 MK |
7371 | rm -rf conftest* |
7372 | gdb_cv_struct_reg=yes | |
7373 | else | |
7374 | echo "configure: failed program was:" >&5 | |
7375 | cat conftest.$ac_ext >&5 | |
7376 | rm -rf conftest* | |
7377 | gdb_cv_struct_reg=no | |
7378 | fi | |
7379 | rm -f conftest* | |
7380 | fi | |
7381 | ||
7382 | echo "$ac_t""$gdb_cv_struct_reg" 1>&6 | |
7383 | if test $gdb_cv_struct_reg = yes; then | |
7384 | cat >> confdefs.h <<\EOF | |
7385 | #define HAVE_STRUCT_REG 1 | |
7386 | EOF | |
7387 | ||
7388 | fi | |
7389 | ||
97bf5e38 MK |
7390 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7391 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
7392 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
02d62932 | 7393 | echo "configure:7394: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
7394 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7395 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7396 | else | |
7397 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7398 | #line 7399 "configure" |
c906108c | 7399 | #include "confdefs.h" |
97bf5e38 MK |
7400 | #include <machine/reg.h> |
7401 | int main() { | |
7402 | struct reg r; r.r_fs; | |
7403 | ; return 0; } | |
c906108c | 7404 | EOF |
02d62932 | 7405 | if { (eval echo configure:7406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7406 | rm -rf conftest* |
97bf5e38 | 7407 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 7408 | else |
97bf5e38 MK |
7409 | echo "configure: failed program was:" >&5 |
7410 | cat conftest.$ac_ext >&5 | |
c906108c | 7411 | rm -rf conftest* |
97bf5e38 | 7412 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
7413 | fi |
7414 | rm -f conftest* | |
97bf5e38 | 7415 | fi |
c906108c | 7416 | |
97bf5e38 MK |
7417 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
7418 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7419 | cat >> confdefs.h <<\EOF | |
7420 | #define HAVE_STRUCT_REG_R_FS 1 | |
7421 | EOF | |
7422 | ||
7423 | fi | |
7424 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
02d62932 | 7425 | echo "configure:7426: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
7426 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7427 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7428 | else | |
7429 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7430 | #line 7431 "configure" |
c906108c | 7431 | #include "confdefs.h" |
97bf5e38 MK |
7432 | #include <machine/reg.h> |
7433 | int main() { | |
7434 | struct reg r; r.r_gs; | |
7435 | ; return 0; } | |
c906108c | 7436 | EOF |
02d62932 | 7437 | if { (eval echo configure:7438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7438 | rm -rf conftest* |
97bf5e38 | 7439 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 7440 | else |
97bf5e38 MK |
7441 | echo "configure: failed program was:" >&5 |
7442 | cat conftest.$ac_ext >&5 | |
c906108c | 7443 | rm -rf conftest* |
97bf5e38 | 7444 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
7445 | fi |
7446 | rm -f conftest* | |
c906108c | 7447 | fi |
c906108c | 7448 | |
97bf5e38 MK |
7449 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
7450 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7451 | cat >> confdefs.h <<\EOF | |
7452 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
7453 | EOF |
7454 | ||
c906108c SS |
7455 | fi |
7456 | ||
97bf5e38 MK |
7457 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
7458 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
02d62932 | 7459 | echo "configure:7460: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 7460 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
7461 | echo $ac_n "(cached) $ac_c" 1>&6 |
7462 | else | |
7463 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7464 | #line 7465 "configure" |
c906108c | 7465 | #include "confdefs.h" |
97bf5e38 | 7466 | #include <sys/ptrace.h> |
c906108c | 7467 | int main() { |
97bf5e38 | 7468 | PTRACE_GETREGS; |
c906108c SS |
7469 | ; return 0; } |
7470 | EOF | |
02d62932 | 7471 | if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7472 | rm -rf conftest* |
97bf5e38 | 7473 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
7474 | else |
7475 | echo "configure: failed program was:" >&5 | |
7476 | cat conftest.$ac_ext >&5 | |
7477 | rm -rf conftest* | |
97bf5e38 | 7478 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
7479 | fi |
7480 | rm -f conftest* | |
7481 | fi | |
7482 | ||
97bf5e38 MK |
7483 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
7484 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
7485 | cat >> confdefs.h <<\EOF | |
7486 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7487 | EOF |
7488 | ||
97bf5e38 | 7489 | fi |
c906108c | 7490 | |
97bf5e38 MK |
7491 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7492 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
02d62932 | 7493 | echo "configure:7494: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7494 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7495 | echo $ac_n "(cached) $ac_c" 1>&6 |
7496 | else | |
7497 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7498 | #line 7499 "configure" |
c906108c | 7499 | #include "confdefs.h" |
97bf5e38 | 7500 | #include <sys/ptrace.h> |
c906108c | 7501 | int main() { |
97bf5e38 | 7502 | PTRACE_GETFPXREGS; |
c906108c SS |
7503 | ; return 0; } |
7504 | EOF | |
02d62932 | 7505 | if { (eval echo configure:7506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7506 | rm -rf conftest* |
97bf5e38 | 7507 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7508 | else |
7509 | echo "configure: failed program was:" >&5 | |
7510 | cat conftest.$ac_ext >&5 | |
7511 | rm -rf conftest* | |
97bf5e38 | 7512 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7513 | fi |
7514 | rm -f conftest* | |
7515 | fi | |
7516 | ||
97bf5e38 MK |
7517 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7518 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7519 | cat >> confdefs.h <<\EOF | |
7520 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7521 | EOF |
7522 | ||
97bf5e38 | 7523 | fi |
c906108c | 7524 | |
97bf5e38 MK |
7525 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7526 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
02d62932 | 7527 | echo "configure:7528: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7528 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7529 | echo $ac_n "(cached) $ac_c" 1>&6 |
7530 | else | |
7531 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7532 | #line 7533 "configure" |
c906108c | 7533 | #include "confdefs.h" |
97bf5e38 MK |
7534 | #include <sys/types.h> |
7535 | #include <sys/ptrace.h> | |
c906108c | 7536 | int main() { |
97bf5e38 | 7537 | PT_GETDBREGS; |
c906108c SS |
7538 | ; return 0; } |
7539 | EOF | |
02d62932 | 7540 | if { (eval echo configure:7541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7541 | rm -rf conftest* |
97bf5e38 | 7542 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7543 | else |
7544 | echo "configure: failed program was:" >&5 | |
7545 | cat conftest.$ac_ext >&5 | |
7546 | rm -rf conftest* | |
97bf5e38 | 7547 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7548 | fi |
7549 | rm -f conftest* | |
7550 | fi | |
7551 | ||
97bf5e38 MK |
7552 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7553 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7554 | cat >> confdefs.h <<\EOF | |
7555 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7556 | EOF |
7557 | ||
97bf5e38 | 7558 | fi |
c906108c | 7559 | |
97bf5e38 MK |
7560 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7561 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
02d62932 | 7562 | echo "configure:7563: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7563 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7564 | echo $ac_n "(cached) $ac_c" 1>&6 |
7565 | else | |
7566 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7567 | #line 7568 "configure" |
c906108c | 7568 | #include "confdefs.h" |
97bf5e38 MK |
7569 | #include <sys/types.h> |
7570 | #include <sys/ptrace.h> | |
c906108c | 7571 | int main() { |
97bf5e38 | 7572 | PT_GETXMMREGS; |
c906108c SS |
7573 | ; return 0; } |
7574 | EOF | |
02d62932 | 7575 | if { (eval echo configure:7576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7576 | rm -rf conftest* |
97bf5e38 | 7577 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7578 | else |
7579 | echo "configure: failed program was:" >&5 | |
7580 | cat conftest.$ac_ext >&5 | |
7581 | rm -rf conftest* | |
97bf5e38 | 7582 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7583 | fi |
7584 | rm -f conftest* | |
7585 | fi | |
7586 | ||
97bf5e38 MK |
7587 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7588 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7589 | cat >> confdefs.h <<\EOF | |
7590 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7591 | EOF |
7592 | ||
97bf5e38 | 7593 | fi |
c906108c | 7594 | |
27ca5dad | 7595 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7596 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7597 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
02d62932 | 7598 | echo "configure:7599: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7599 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7600 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7601 | else | |
7602 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7603 | #line 7604 "configure" |
27ca5dad MC |
7604 | #include "confdefs.h" |
7605 | #include <stdint.h> | |
7606 | int main() { | |
7607 | uintptr_t foo = 0; | |
7608 | ; return 0; } | |
7609 | EOF | |
02d62932 | 7610 | if { (eval echo configure:7611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7611 | rm -rf conftest* |
7612 | gdb_cv_have_uintptr_t=yes | |
7613 | else | |
7614 | echo "configure: failed program was:" >&5 | |
7615 | cat conftest.$ac_ext >&5 | |
7616 | rm -rf conftest* | |
7617 | gdb_cv_have_uintptr_t=no | |
7618 | fi | |
7619 | rm -f conftest* | |
7620 | fi | |
7621 | ||
7622 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 | |
7623 | if test $gdb_cv_have_uintptr_t = yes; then | |
7624 | cat >> confdefs.h <<\EOF | |
7625 | #define HAVE_UINTPTR_T 1 | |
7626 | EOF | |
7627 | ||
7628 | fi | |
97bf5e38 MK |
7629 | |
7630 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
02d62932 | 7631 | echo "configure:7632: checking whether malloc must be declared" >&5 |
97bf5e38 | 7632 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7633 | echo $ac_n "(cached) $ac_c" 1>&6 |
7634 | else | |
7635 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7636 | #line 7637 "configure" |
3862412b | 7637 | #include "confdefs.h" |
e17bf198 | 7638 | |
97bf5e38 MK |
7639 | #include <stdio.h> |
7640 | #ifdef HAVE_STRING_H | |
7641 | #include <string.h> | |
7642 | #else | |
7643 | #ifdef HAVE_STRINGS_H | |
7644 | #include <strings.h> | |
7645 | #endif | |
7646 | #endif | |
7647 | #ifdef HAVE_STDLIB_H | |
7648 | #include <stdlib.h> | |
7649 | #endif | |
7650 | #ifdef HAVE_UNISTD_H | |
7651 | #include <unistd.h> | |
7652 | #endif | |
3862412b | 7653 | int main() { |
97bf5e38 | 7654 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7655 | ; return 0; } |
7656 | EOF | |
02d62932 | 7657 | if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7658 | rm -rf conftest* |
97bf5e38 | 7659 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7660 | else |
7661 | echo "configure: failed program was:" >&5 | |
7662 | cat conftest.$ac_ext >&5 | |
7663 | rm -rf conftest* | |
97bf5e38 | 7664 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7665 | fi |
7666 | rm -f conftest* | |
7667 | fi | |
7668 | ||
97bf5e38 MK |
7669 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7670 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7671 | cat >> confdefs.h <<\EOF | |
7672 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7673 | EOF |
7674 | ||
97bf5e38 | 7675 | fi |
3862412b | 7676 | |
97bf5e38 | 7677 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
02d62932 | 7678 | echo "configure:7679: checking whether realloc must be declared" >&5 |
97bf5e38 | 7679 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7680 | echo $ac_n "(cached) $ac_c" 1>&6 |
7681 | else | |
7682 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7683 | #line 7684 "configure" |
3862412b | 7684 | #include "confdefs.h" |
e17bf198 | 7685 | |
97bf5e38 MK |
7686 | #include <stdio.h> |
7687 | #ifdef HAVE_STRING_H | |
7688 | #include <string.h> | |
7689 | #else | |
7690 | #ifdef HAVE_STRINGS_H | |
7691 | #include <strings.h> | |
7692 | #endif | |
7693 | #endif | |
7694 | #ifdef HAVE_STDLIB_H | |
7695 | #include <stdlib.h> | |
7696 | #endif | |
7697 | #ifdef HAVE_UNISTD_H | |
7698 | #include <unistd.h> | |
7699 | #endif | |
3862412b | 7700 | int main() { |
97bf5e38 | 7701 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7702 | ; return 0; } |
7703 | EOF | |
02d62932 | 7704 | if { (eval echo configure:7705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7705 | rm -rf conftest* |
97bf5e38 | 7706 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7707 | else |
7708 | echo "configure: failed program was:" >&5 | |
7709 | cat conftest.$ac_ext >&5 | |
7710 | rm -rf conftest* | |
97bf5e38 | 7711 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7712 | fi |
7713 | rm -f conftest* | |
7714 | fi | |
7715 | ||
97bf5e38 MK |
7716 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7717 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7718 | cat >> confdefs.h <<\EOF | |
7719 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7720 | EOF |
7721 | ||
97bf5e38 | 7722 | fi |
3862412b | 7723 | |
97bf5e38 | 7724 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
02d62932 | 7725 | echo "configure:7726: checking whether free must be declared" >&5 |
97bf5e38 | 7726 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7727 | echo $ac_n "(cached) $ac_c" 1>&6 |
7728 | else | |
7729 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7730 | #line 7731 "configure" |
451928c5 | 7731 | #include "confdefs.h" |
e17bf198 | 7732 | |
97bf5e38 MK |
7733 | #include <stdio.h> |
7734 | #ifdef HAVE_STRING_H | |
7735 | #include <string.h> | |
7736 | #else | |
7737 | #ifdef HAVE_STRINGS_H | |
7738 | #include <strings.h> | |
7739 | #endif | |
7740 | #endif | |
7741 | #ifdef HAVE_STDLIB_H | |
7742 | #include <stdlib.h> | |
7743 | #endif | |
7744 | #ifdef HAVE_UNISTD_H | |
7745 | #include <unistd.h> | |
7746 | #endif | |
451928c5 | 7747 | int main() { |
97bf5e38 | 7748 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7749 | ; return 0; } |
7750 | EOF | |
02d62932 | 7751 | if { (eval echo configure:7752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7752 | rm -rf conftest* |
97bf5e38 | 7753 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7754 | else |
7755 | echo "configure: failed program was:" >&5 | |
7756 | cat conftest.$ac_ext >&5 | |
7757 | rm -rf conftest* | |
97bf5e38 | 7758 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7759 | fi |
7760 | rm -f conftest* | |
7761 | fi | |
7762 | ||
97bf5e38 MK |
7763 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7764 | if test $bfd_cv_decl_needed_free = yes; then | |
7765 | cat >> confdefs.h <<\EOF | |
7766 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7767 | EOF |
7768 | ||
97bf5e38 | 7769 | fi |
451928c5 | 7770 | |
97bf5e38 | 7771 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
02d62932 | 7772 | echo "configure:7773: checking whether strerror must be declared" >&5 |
97bf5e38 | 7773 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7774 | echo $ac_n "(cached) $ac_c" 1>&6 |
7775 | else | |
7776 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7777 | #line 7778 "configure" |
451928c5 | 7778 | #include "confdefs.h" |
e17bf198 | 7779 | |
97bf5e38 MK |
7780 | #include <stdio.h> |
7781 | #ifdef HAVE_STRING_H | |
7782 | #include <string.h> | |
7783 | #else | |
7784 | #ifdef HAVE_STRINGS_H | |
7785 | #include <strings.h> | |
7786 | #endif | |
7787 | #endif | |
7788 | #ifdef HAVE_STDLIB_H | |
7789 | #include <stdlib.h> | |
7790 | #endif | |
7791 | #ifdef HAVE_UNISTD_H | |
7792 | #include <unistd.h> | |
7793 | #endif | |
451928c5 | 7794 | int main() { |
97bf5e38 | 7795 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7796 | ; return 0; } |
7797 | EOF | |
02d62932 | 7798 | if { (eval echo configure:7799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7799 | rm -rf conftest* |
97bf5e38 | 7800 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7801 | else |
7802 | echo "configure: failed program was:" >&5 | |
7803 | cat conftest.$ac_ext >&5 | |
7804 | rm -rf conftest* | |
97bf5e38 | 7805 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7806 | fi |
7807 | rm -f conftest* | |
7808 | fi | |
7809 | ||
97bf5e38 MK |
7810 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7811 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7812 | cat >> confdefs.h <<\EOF | |
7813 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7814 | EOF |
7815 | ||
97bf5e38 | 7816 | fi |
451928c5 | 7817 | |
97bf5e38 | 7818 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
02d62932 | 7819 | echo "configure:7820: checking whether strdup must be declared" >&5 |
97bf5e38 | 7820 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7821 | echo $ac_n "(cached) $ac_c" 1>&6 |
7822 | else | |
7823 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7824 | #line 7825 "configure" |
3862412b | 7825 | #include "confdefs.h" |
e17bf198 | 7826 | |
97bf5e38 MK |
7827 | #include <stdio.h> |
7828 | #ifdef HAVE_STRING_H | |
7829 | #include <string.h> | |
7830 | #else | |
7831 | #ifdef HAVE_STRINGS_H | |
7832 | #include <strings.h> | |
7833 | #endif | |
7834 | #endif | |
7835 | #ifdef HAVE_STDLIB_H | |
7836 | #include <stdlib.h> | |
7837 | #endif | |
7838 | #ifdef HAVE_UNISTD_H | |
7839 | #include <unistd.h> | |
7840 | #endif | |
3862412b | 7841 | int main() { |
97bf5e38 | 7842 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7843 | ; return 0; } |
7844 | EOF | |
02d62932 | 7845 | if { (eval echo configure:7846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7846 | rm -rf conftest* |
97bf5e38 | 7847 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7848 | else |
7849 | echo "configure: failed program was:" >&5 | |
7850 | cat conftest.$ac_ext >&5 | |
7851 | rm -rf conftest* | |
97bf5e38 | 7852 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7853 | fi |
7854 | rm -f conftest* | |
7855 | fi | |
7856 | ||
97bf5e38 MK |
7857 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7858 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7859 | cat >> confdefs.h <<\EOF | |
7860 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7861 | EOF |
7862 | ||
97bf5e38 | 7863 | fi |
3862412b | 7864 | |
97bf5e38 | 7865 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
02d62932 | 7866 | echo "configure:7867: checking whether strstr must be declared" >&5 |
97bf5e38 | 7867 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7868 | echo $ac_n "(cached) $ac_c" 1>&6 |
7869 | else | |
7870 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7871 | #line 7872 "configure" |
3862412b | 7872 | #include "confdefs.h" |
e17bf198 | 7873 | |
97bf5e38 MK |
7874 | #include <stdio.h> |
7875 | #ifdef HAVE_STRING_H | |
7876 | #include <string.h> | |
7877 | #else | |
7878 | #ifdef HAVE_STRINGS_H | |
7879 | #include <strings.h> | |
7880 | #endif | |
7881 | #endif | |
7882 | #ifdef HAVE_STDLIB_H | |
7883 | #include <stdlib.h> | |
7884 | #endif | |
7885 | #ifdef HAVE_UNISTD_H | |
7886 | #include <unistd.h> | |
7887 | #endif | |
3862412b | 7888 | int main() { |
97bf5e38 | 7889 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7890 | ; return 0; } |
7891 | EOF | |
02d62932 | 7892 | if { (eval echo configure:7893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7893 | rm -rf conftest* |
97bf5e38 | 7894 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7895 | else |
7896 | echo "configure: failed program was:" >&5 | |
7897 | cat conftest.$ac_ext >&5 | |
7898 | rm -rf conftest* | |
97bf5e38 | 7899 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7900 | fi |
7901 | rm -f conftest* | |
7902 | fi | |
7903 | ||
97bf5e38 MK |
7904 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7905 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7906 | cat >> confdefs.h <<\EOF | |
7907 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7908 | EOF |
7909 | ||
97bf5e38 | 7910 | fi |
3862412b | 7911 | |
97bf5e38 | 7912 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
02d62932 | 7913 | echo "configure:7914: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7914 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7915 | echo $ac_n "(cached) $ac_c" 1>&6 |
7916 | else | |
7917 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7918 | #line 7919 "configure" |
596c9d4b KB |
7919 | #include "confdefs.h" |
7920 | ||
97bf5e38 MK |
7921 | #include <stdio.h> |
7922 | #ifdef HAVE_STRING_H | |
7923 | #include <string.h> | |
7924 | #else | |
7925 | #ifdef HAVE_STRINGS_H | |
7926 | #include <strings.h> | |
7927 | #endif | |
7928 | #endif | |
7929 | #ifdef HAVE_STDLIB_H | |
7930 | #include <stdlib.h> | |
7931 | #endif | |
7932 | #ifdef HAVE_UNISTD_H | |
7933 | #include <unistd.h> | |
7934 | #endif | |
596c9d4b | 7935 | int main() { |
97bf5e38 | 7936 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7937 | ; return 0; } |
7938 | EOF | |
02d62932 | 7939 | if { (eval echo configure:7940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7940 | rm -rf conftest* |
97bf5e38 | 7941 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7942 | else |
7943 | echo "configure: failed program was:" >&5 | |
7944 | cat conftest.$ac_ext >&5 | |
7945 | rm -rf conftest* | |
97bf5e38 | 7946 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7947 | fi |
7948 | rm -f conftest* | |
7949 | fi | |
7950 | ||
97bf5e38 MK |
7951 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7952 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7953 | cat >> confdefs.h <<\EOF | |
7954 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7955 | EOF |
7956 | ||
97bf5e38 | 7957 | fi |
596c9d4b | 7958 | |
97bf5e38 MK |
7959 | |
7960 | # The following save_state_t checkery is only necessary for HPUX | |
7961 | # versions earlier than 10.20. When those fade from memory, this | |
7962 | # could be expunged. --jsm 1999-03-22 | |
7963 | ||
7964 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
02d62932 | 7965 | echo "configure:7966: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7966 | cat > conftest.$ac_ext <<EOF |
02d62932 | 7967 | #line 7968 "configure" |
97bf5e38 MK |
7968 | #include "confdefs.h" |
7969 | #include <machine/save_state.h> | |
7970 | EOF | |
7971 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7972 | egrep "save_state_t" >/dev/null 2>&1; then | |
7973 | rm -rf conftest* | |
7974 | gdb_cv_hpux_savestate=yes | |
7975 | else | |
7976 | rm -rf conftest* | |
7977 | gdb_cv_hpux_savestate=no | |
7978 | fi | |
7979 | rm -f conftest* | |
7980 | ||
7981 | cat > conftest.$ac_ext <<EOF | |
02d62932 | 7982 | #line 7983 "configure" |
97bf5e38 MK |
7983 | #include "confdefs.h" |
7984 | #include <machine/save_state.h> | |
7985 | EOF | |
7986 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7987 | egrep "ss_wide" >/dev/null 2>&1; then | |
7988 | rm -rf conftest* | |
7989 | gdb_cv_hpux_sswide=yes | |
7990 | else | |
7991 | rm -rf conftest* | |
7992 | gdb_cv_hpux_sswide=no | |
7993 | fi | |
7994 | rm -f conftest* | |
7995 | ||
7996 | if test $gdb_cv_hpux_savestate = yes | |
7997 | then | |
7998 | cat >> confdefs.h <<\EOF | |
7999 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
8000 | EOF | |
8001 | ||
8002 | fi | |
8003 | if test $gdb_cv_hpux_sswide = yes | |
8004 | then | |
8005 | cat >> confdefs.h <<\EOF | |
8006 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
8007 | EOF | |
8008 | ||
8009 | fi | |
8010 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
8011 | ||
8012 | ||
8013 | # If we are configured native on GNU/Linux, work around problems with | |
8014 | # sys/procfs.h | |
8015 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
8016 | ||
8017 | if test "${target}" = "${host}"; then | |
8018 | case "${host}" in | |
8019 | i[3456]86-*-linux*) | |
8020 | cat >> confdefs.h <<\EOF | |
8021 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
8022 | EOF | |
8023 | ||
8024 | cat >> confdefs.h <<\EOF | |
8025 | #define sys_quotactl 1 | |
8026 | EOF | |
8027 | ||
8028 | ;; | |
8029 | ia64-*-aix*) | |
8030 | cat >> confdefs.h <<\EOF | |
8031 | #define NEW_PROC_API 1 | |
8032 | EOF | |
8033 | ||
8034 | ;; | |
8035 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
8036 | cat >> confdefs.h <<\EOF | |
8037 | #define NEW_PROC_API 1 | |
8038 | EOF | |
8039 | ||
8040 | ;; | |
e7c61be3 | 8041 | *-*-solaris2.[6789]) |
97bf5e38 MK |
8042 | cat >> confdefs.h <<\EOF |
8043 | #define NEW_PROC_API 1 | |
c960c18f AC |
8044 | EOF |
8045 | ||
8046 | ;; | |
8047 | mips-sgi-irix5*) | |
8048 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
8049 | cat >> confdefs.h <<\EOF | |
8050 | #define _KMEMUSER 1 | |
97bf5e38 MK |
8051 | EOF |
8052 | ||
8053 | ;; | |
8054 | esac | |
8055 | fi | |
8056 | ||
8057 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
8058 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
c960c18f | 8059 | echo "configure:8060: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 8060 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
8061 | echo $ac_n "(cached) $ac_c" 1>&6 |
8062 | else | |
8063 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8064 | #line 8065 "configure" |
596c9d4b KB |
8065 | #include "confdefs.h" |
8066 | ||
8067 | #define _SYSCALL32 | |
8068 | #include <sys/procfs.h> | |
8069 | int main() { | |
97bf5e38 | 8070 | pstatus_t avar |
596c9d4b KB |
8071 | ; return 0; } |
8072 | EOF | |
c960c18f | 8073 | if { (eval echo configure:8074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8074 | rm -rf conftest* |
97bf5e38 | 8075 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
8076 | else |
8077 | echo "configure: failed program was:" >&5 | |
8078 | cat conftest.$ac_ext >&5 | |
8079 | rm -rf conftest* | |
97bf5e38 | 8080 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
8081 | |
8082 | fi | |
8083 | rm -f conftest* | |
8084 | fi | |
8085 | ||
97bf5e38 | 8086 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 8087 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8088 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
8089 | EOF |
8090 | ||
8091 | fi | |
97bf5e38 | 8092 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 8093 | |
97bf5e38 | 8094 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8095 | echo "configure:8096: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 8096 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
8097 | echo $ac_n "(cached) $ac_c" 1>&6 |
8098 | else | |
8099 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8100 | #line 8101 "configure" |
596c9d4b KB |
8101 | #include "confdefs.h" |
8102 | ||
8103 | #define _SYSCALL32 | |
8104 | #include <sys/procfs.h> | |
8105 | int main() { | |
97bf5e38 | 8106 | prrun_t avar |
596c9d4b KB |
8107 | ; return 0; } |
8108 | EOF | |
c960c18f | 8109 | if { (eval echo configure:8110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8110 | rm -rf conftest* |
97bf5e38 | 8111 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
8112 | else |
8113 | echo "configure: failed program was:" >&5 | |
8114 | cat conftest.$ac_ext >&5 | |
8115 | rm -rf conftest* | |
97bf5e38 | 8116 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
8117 | |
8118 | fi | |
8119 | rm -f conftest* | |
8120 | fi | |
8121 | ||
97bf5e38 | 8122 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 8123 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8124 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
8125 | EOF |
8126 | ||
8127 | fi | |
97bf5e38 | 8128 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 8129 | |
97bf5e38 | 8130 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8131 | echo "configure:8132: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8132 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
8133 | echo $ac_n "(cached) $ac_c" 1>&6 |
8134 | else | |
8135 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8136 | #line 8137 "configure" |
596c9d4b KB |
8137 | #include "confdefs.h" |
8138 | ||
8139 | #define _SYSCALL32 | |
8140 | #include <sys/procfs.h> | |
8141 | int main() { | |
97bf5e38 | 8142 | gregset_t avar |
596c9d4b KB |
8143 | ; return 0; } |
8144 | EOF | |
c960c18f | 8145 | if { (eval echo configure:8146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8146 | rm -rf conftest* |
97bf5e38 | 8147 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
8148 | else |
8149 | echo "configure: failed program was:" >&5 | |
8150 | cat conftest.$ac_ext >&5 | |
8151 | rm -rf conftest* | |
97bf5e38 | 8152 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
8153 | |
8154 | fi | |
8155 | rm -f conftest* | |
8156 | fi | |
8157 | ||
97bf5e38 | 8158 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 8159 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8160 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
8161 | EOF |
8162 | ||
8163 | fi | |
97bf5e38 | 8164 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 8165 | |
97bf5e38 | 8166 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8167 | echo "configure:8168: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8168 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 8169 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
8170 | else |
8171 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8172 | #line 8173 "configure" |
d84dd0c5 | 8173 | #include "confdefs.h" |
97bf5e38 MK |
8174 | |
8175 | #define _SYSCALL32 | |
d84dd0c5 | 8176 | #include <sys/procfs.h> |
97bf5e38 MK |
8177 | int main() { |
8178 | fpregset_t avar | |
8179 | ; return 0; } | |
d84dd0c5 | 8180 | EOF |
c960c18f | 8181 | if { (eval echo configure:8182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8182 | rm -rf conftest* |
8183 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
8184 | else |
8185 | echo "configure: failed program was:" >&5 | |
8186 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8187 | rm -rf conftest* |
8188 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8189 | ||
d84dd0c5 | 8190 | fi |
97bf5e38 | 8191 | rm -f conftest* |
d84dd0c5 MK |
8192 | fi |
8193 | ||
97bf5e38 MK |
8194 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
8195 | cat >> confdefs.h <<\EOF | |
8196 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
8197 | EOF |
8198 | ||
97bf5e38 MK |
8199 | fi |
8200 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 8201 | |
97bf5e38 | 8202 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8203 | echo "configure:8204: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8204 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
8205 | echo $ac_n "(cached) $ac_c" 1>&6 |
8206 | else | |
8207 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8208 | #line 8209 "configure" |
c906108c | 8209 | #include "confdefs.h" |
c906108c | 8210 | |
97bf5e38 MK |
8211 | #define _SYSCALL32 |
8212 | #include <sys/procfs.h> | |
c906108c | 8213 | int main() { |
97bf5e38 | 8214 | prgregset_t avar |
c906108c SS |
8215 | ; return 0; } |
8216 | EOF | |
c960c18f | 8217 | if { (eval echo configure:8218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8218 | rm -rf conftest* |
97bf5e38 | 8219 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
8220 | else |
8221 | echo "configure: failed program was:" >&5 | |
8222 | cat conftest.$ac_ext >&5 | |
8223 | rm -rf conftest* | |
97bf5e38 MK |
8224 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
8225 | ||
c906108c SS |
8226 | fi |
8227 | rm -f conftest* | |
8228 | fi | |
8229 | ||
97bf5e38 MK |
8230 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
8231 | cat >> confdefs.h <<\EOF | |
8232 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
8233 | EOF |
8234 | ||
97bf5e38 MK |
8235 | fi |
8236 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 8237 | |
97bf5e38 | 8238 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8239 | echo "configure:8240: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8240 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
8241 | echo $ac_n "(cached) $ac_c" 1>&6 |
8242 | else | |
8243 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8244 | #line 8245 "configure" |
d45fe813 | 8245 | #include "confdefs.h" |
97bf5e38 MK |
8246 | |
8247 | #define _SYSCALL32 | |
8248 | #include <sys/procfs.h> | |
d45fe813 | 8249 | int main() { |
97bf5e38 | 8250 | prfpregset_t avar |
d45fe813 KB |
8251 | ; return 0; } |
8252 | EOF | |
c960c18f | 8253 | if { (eval echo configure:8254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8254 | rm -rf conftest* |
97bf5e38 | 8255 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
8256 | else |
8257 | echo "configure: failed program was:" >&5 | |
8258 | cat conftest.$ac_ext >&5 | |
8259 | rm -rf conftest* | |
97bf5e38 MK |
8260 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
8261 | ||
d45fe813 KB |
8262 | fi |
8263 | rm -f conftest* | |
8264 | fi | |
8265 | ||
97bf5e38 MK |
8266 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
8267 | cat >> confdefs.h <<\EOF | |
8268 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
8269 | EOF |
8270 | ||
97bf5e38 MK |
8271 | fi |
8272 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 8273 | |
97bf5e38 | 8274 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8275 | echo "configure:8276: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8276 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8277 | echo $ac_n "(cached) $ac_c" 1>&6 |
8278 | else | |
8279 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8280 | #line 8281 "configure" |
d45fe813 | 8281 | #include "confdefs.h" |
97bf5e38 MK |
8282 | |
8283 | #define _SYSCALL32 | |
8284 | #include <sys/procfs.h> | |
d45fe813 | 8285 | int main() { |
97bf5e38 | 8286 | prgregset32_t avar |
d45fe813 KB |
8287 | ; return 0; } |
8288 | EOF | |
c960c18f | 8289 | if { (eval echo configure:8290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8290 | rm -rf conftest* |
97bf5e38 | 8291 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
8292 | else |
8293 | echo "configure: failed program was:" >&5 | |
8294 | cat conftest.$ac_ext >&5 | |
8295 | rm -rf conftest* | |
97bf5e38 MK |
8296 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
8297 | ||
d45fe813 KB |
8298 | fi |
8299 | rm -f conftest* | |
8300 | fi | |
8301 | ||
97bf5e38 MK |
8302 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
8303 | cat >> confdefs.h <<\EOF | |
8304 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
8305 | EOF |
8306 | ||
97bf5e38 MK |
8307 | fi |
8308 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 8309 | |
97bf5e38 | 8310 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8311 | echo "configure:8312: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8312 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8313 | echo $ac_n "(cached) $ac_c" 1>&6 |
8314 | else | |
8315 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8316 | #line 8317 "configure" |
d45fe813 | 8317 | #include "confdefs.h" |
97bf5e38 MK |
8318 | |
8319 | #define _SYSCALL32 | |
8320 | #include <sys/procfs.h> | |
d45fe813 | 8321 | int main() { |
97bf5e38 | 8322 | prfpregset32_t avar |
d45fe813 KB |
8323 | ; return 0; } |
8324 | EOF | |
c960c18f | 8325 | if { (eval echo configure:8326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8326 | rm -rf conftest* |
97bf5e38 | 8327 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
8328 | else |
8329 | echo "configure: failed program was:" >&5 | |
8330 | cat conftest.$ac_ext >&5 | |
8331 | rm -rf conftest* | |
97bf5e38 MK |
8332 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
8333 | ||
d45fe813 KB |
8334 | fi |
8335 | rm -f conftest* | |
8336 | fi | |
8337 | ||
97bf5e38 MK |
8338 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
8339 | cat >> confdefs.h <<\EOF | |
8340 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
8341 | EOF |
8342 | ||
97bf5e38 MK |
8343 | fi |
8344 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 8345 | |
97bf5e38 | 8346 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8347 | echo "configure:8348: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 8348 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
8349 | echo $ac_n "(cached) $ac_c" 1>&6 |
8350 | else | |
8351 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8352 | #line 8353 "configure" |
d45fe813 | 8353 | #include "confdefs.h" |
97bf5e38 | 8354 | |
d45fe813 | 8355 | #define _SYSCALL32 |
97bf5e38 | 8356 | #include <sys/procfs.h> |
d45fe813 | 8357 | int main() { |
97bf5e38 | 8358 | lwpid_t avar |
d45fe813 KB |
8359 | ; return 0; } |
8360 | EOF | |
c960c18f | 8361 | if { (eval echo configure:8362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8362 | rm -rf conftest* |
97bf5e38 | 8363 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
8364 | else |
8365 | echo "configure: failed program was:" >&5 | |
8366 | cat conftest.$ac_ext >&5 | |
8367 | rm -rf conftest* | |
97bf5e38 MK |
8368 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
8369 | ||
d45fe813 KB |
8370 | fi |
8371 | rm -f conftest* | |
8372 | fi | |
8373 | ||
97bf5e38 MK |
8374 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
8375 | cat >> confdefs.h <<\EOF | |
8376 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
8377 | EOF |
8378 | ||
97bf5e38 MK |
8379 | fi |
8380 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 8381 | |
97bf5e38 | 8382 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8383 | echo "configure:8384: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 8384 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
8385 | echo $ac_n "(cached) $ac_c" 1>&6 |
8386 | else | |
8387 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8388 | #line 8389 "configure" |
c906108c SS |
8389 | #include "confdefs.h" |
8390 | ||
97bf5e38 MK |
8391 | #define _SYSCALL32 |
8392 | #include <sys/procfs.h> | |
c906108c | 8393 | int main() { |
97bf5e38 | 8394 | psaddr_t avar |
c906108c SS |
8395 | ; return 0; } |
8396 | EOF | |
c960c18f | 8397 | if { (eval echo configure:8398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8398 | rm -rf conftest* |
97bf5e38 | 8399 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
8400 | else |
8401 | echo "configure: failed program was:" >&5 | |
8402 | cat conftest.$ac_ext >&5 | |
8403 | rm -rf conftest* | |
97bf5e38 MK |
8404 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
8405 | ||
c906108c SS |
8406 | fi |
8407 | rm -f conftest* | |
8408 | fi | |
8409 | ||
97bf5e38 MK |
8410 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
8411 | cat >> confdefs.h <<\EOF | |
8412 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
8413 | EOF |
8414 | ||
97bf5e38 MK |
8415 | fi |
8416 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 8417 | |
97bf5e38 | 8418 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8419 | echo "configure:8420: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 8420 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 8421 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8422 | else |
8423 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8424 | #line 8425 "configure" |
c906108c SS |
8425 | #include "confdefs.h" |
8426 | ||
97bf5e38 MK |
8427 | #define _SYSCALL32 |
8428 | #include <sys/procfs.h> | |
8429 | int main() { | |
8430 | prsysent_t avar | |
8431 | ; return 0; } | |
c906108c | 8432 | EOF |
c960c18f | 8433 | if { (eval echo configure:8434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8434 | rm -rf conftest* |
8435 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
8436 | else |
8437 | echo "configure: failed program was:" >&5 | |
8438 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8439 | rm -rf conftest* |
8440 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
8441 | ||
c906108c | 8442 | fi |
97bf5e38 | 8443 | rm -f conftest* |
c906108c SS |
8444 | fi |
8445 | ||
97bf5e38 MK |
8446 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
8447 | cat >> confdefs.h <<\EOF | |
8448 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
8449 | EOF |
8450 | ||
97bf5e38 MK |
8451 | fi |
8452 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 8453 | |
97bf5e38 | 8454 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8455 | echo "configure:8456: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 8456 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
8457 | echo $ac_n "(cached) $ac_c" 1>&6 |
8458 | else | |
8459 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8460 | #line 8461 "configure" |
c906108c SS |
8461 | #include "confdefs.h" |
8462 | ||
97bf5e38 MK |
8463 | #define _SYSCALL32 |
8464 | #include <sys/procfs.h> | |
c906108c | 8465 | int main() { |
97bf5e38 | 8466 | pr_sigset_t avar |
c906108c SS |
8467 | ; return 0; } |
8468 | EOF | |
c960c18f | 8469 | if { (eval echo configure:8470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8470 | rm -rf conftest* |
97bf5e38 | 8471 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
8472 | else |
8473 | echo "configure: failed program was:" >&5 | |
8474 | cat conftest.$ac_ext >&5 | |
8475 | rm -rf conftest* | |
97bf5e38 MK |
8476 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
8477 | ||
c906108c SS |
8478 | fi |
8479 | rm -f conftest* | |
8480 | fi | |
8481 | ||
97bf5e38 MK |
8482 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
8483 | cat >> confdefs.h <<\EOF | |
8484 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
8485 | EOF |
8486 | ||
97bf5e38 MK |
8487 | fi |
8488 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 8489 | |
97bf5e38 | 8490 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
c960c18f | 8491 | echo "configure:8492: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 8492 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8493 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8494 | else |
8495 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8496 | #line 8497 "configure" |
c906108c SS |
8497 | #include "confdefs.h" |
8498 | ||
97bf5e38 MK |
8499 | #define _SYSCALL32 |
8500 | #include <sys/procfs.h> | |
8501 | int main() { | |
8502 | pr_sigaction64_t avar | |
8503 | ; return 0; } | |
c906108c | 8504 | EOF |
c960c18f | 8505 | if { (eval echo configure:8506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8506 | rm -rf conftest* |
8507 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8508 | else |
8509 | echo "configure: failed program was:" >&5 | |
8510 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8511 | rm -rf conftest* |
8512 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8513 | ||
c906108c | 8514 | fi |
97bf5e38 | 8515 | rm -f conftest* |
c906108c SS |
8516 | fi |
8517 | ||
97bf5e38 MK |
8518 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8519 | cat >> confdefs.h <<\EOF | |
8520 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8521 | EOF |
8522 | ||
97bf5e38 MK |
8523 | fi |
8524 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8525 | ||
8526 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
c960c18f | 8527 | echo "configure:8528: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8528 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8530 | else | |
8531 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8532 | #line 8533 "configure" |
97bf5e38 MK |
8533 | #include "confdefs.h" |
8534 | ||
8535 | #define _SYSCALL32 | |
8536 | #include <sys/procfs.h> | |
8537 | int main() { | |
8538 | pr_siginfo64_t avar | |
8539 | ; return 0; } | |
8540 | EOF | |
c960c18f | 8541 | if { (eval echo configure:8542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8542 | rm -rf conftest* |
8543 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8544 | else | |
8545 | echo "configure: failed program was:" >&5 | |
8546 | cat conftest.$ac_ext >&5 | |
8547 | rm -rf conftest* | |
8548 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8549 | ||
8550 | fi | |
8551 | rm -f conftest* | |
c906108c | 8552 | fi |
c906108c | 8553 | |
97bf5e38 MK |
8554 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8555 | cat >> confdefs.h <<\EOF | |
8556 | #define HAVE_PR_SIGINFO64_T 1 | |
8557 | EOF | |
c906108c | 8558 | |
97bf5e38 MK |
8559 | fi |
8560 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8561 | ||
8562 | ||
8563 | ||
8564 | ||
8565 | ||
8566 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8567 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
c960c18f | 8568 | echo "configure:8569: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8569 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8570 | echo $ac_n "(cached) $ac_c" 1>&6 |
8571 | else | |
8572 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8573 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8574 | else |
8575 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8576 | #line 8577 "configure" |
c906108c | 8577 | #include "confdefs.h" |
97bf5e38 MK |
8578 | #include <sys/procfs.h> |
8579 | int main () | |
8580 | { | |
8581 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8582 | return 1; | |
8583 | return 0; | |
8584 | } | |
c906108c | 8585 | EOF |
c960c18f | 8586 | if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8587 | then |
97bf5e38 | 8588 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8589 | else |
8590 | echo "configure: failed program was:" >&5 | |
8591 | cat conftest.$ac_ext >&5 | |
8592 | rm -fr conftest* | |
97bf5e38 | 8593 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8594 | fi |
8595 | rm -fr conftest* | |
8596 | fi | |
8597 | ||
8598 | fi | |
8599 | ||
97bf5e38 MK |
8600 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8601 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8602 | cat >> confdefs.h <<\EOF | |
8603 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8604 | EOF |
8605 | ||
97bf5e38 MK |
8606 | fi |
8607 | fi | |
c906108c | 8608 | |
97bf5e38 MK |
8609 | |
8610 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
c960c18f | 8611 | echo "configure:8612: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8612 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8613 | echo $ac_n "(cached) $ac_c" 1>&6 |
8614 | else | |
8615 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8616 | #line 8617 "configure" |
c906108c | 8617 | #include "confdefs.h" |
97bf5e38 MK |
8618 | #include <unistd.h> |
8619 | #include <sys/types.h> | |
8620 | #include <sys/procfs.h> | |
8621 | ||
8622 | int main() { | |
8623 | ||
8624 | int dummy;; | |
8625 | dummy = ioctl(0, PIOCSET, &dummy); | |
8626 | ||
8627 | ; return 0; } | |
c906108c | 8628 | EOF |
c960c18f | 8629 | if { (eval echo configure:8630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8630 | rm -rf conftest* |
97bf5e38 | 8631 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8632 | else |
c906108c SS |
8633 | echo "configure: failed program was:" >&5 |
8634 | cat conftest.$ac_ext >&5 | |
8635 | rm -rf conftest* | |
97bf5e38 | 8636 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8637 | fi |
8638 | rm -f conftest* | |
8639 | fi | |
97bf5e38 MK |
8640 | |
8641 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8642 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8643 | cat >> confdefs.h <<\EOF | |
8644 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8645 | EOF |
97bf5e38 MK |
8646 | |
8647 | fi | |
c906108c | 8648 | fi |
c906108c | 8649 | |
97bf5e38 MK |
8650 | if test ${host} = ${target} ; then |
8651 | ||
8652 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
c960c18f | 8653 | echo "configure:8654: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8654 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8655 | echo $ac_n "(cached) $ac_c" 1>&6 |
8656 | else | |
8657 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8658 | #line 8659 "configure" |
c906108c | 8659 | #include "confdefs.h" |
97bf5e38 | 8660 | #include <link.h> |
c906108c | 8661 | int main() { |
97bf5e38 | 8662 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8663 | ; return 0; } |
8664 | EOF | |
c960c18f | 8665 | if { (eval echo configure:8666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8666 | rm -rf conftest* |
97bf5e38 | 8667 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8668 | else |
8669 | echo "configure: failed program was:" >&5 | |
8670 | cat conftest.$ac_ext >&5 | |
8671 | rm -rf conftest* | |
97bf5e38 | 8672 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8673 | fi |
8674 | rm -f conftest* | |
8675 | fi | |
8676 | ||
97bf5e38 MK |
8677 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8678 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8679 | cat >> confdefs.h <<\EOF | |
8680 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8681 | EOF |
97bf5e38 MK |
8682 | |
8683 | fi | |
8684 | ||
8685 | ||
8686 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
c960c18f | 8687 | echo "configure:8688: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8688 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8689 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8690 | else |
97bf5e38 | 8691 | cat > conftest.$ac_ext <<EOF |
c960c18f | 8692 | #line 8693 "configure" |
97bf5e38 MK |
8693 | #include "confdefs.h" |
8694 | #include <sys/types.h> | |
8695 | #include <link.h> | |
8696 | int main() { | |
8697 | struct link_map lm; (void) lm.lm_addr; | |
8698 | ; return 0; } | |
8699 | EOF | |
c960c18f | 8700 | if { (eval echo configure:8701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8701 | rm -rf conftest* |
8702 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8703 | else | |
8704 | echo "configure: failed program was:" >&5 | |
8705 | cat conftest.$ac_ext >&5 | |
8706 | rm -rf conftest* | |
8707 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8708 | fi | |
8709 | rm -f conftest* | |
c906108c | 8710 | fi |
c906108c | 8711 | |
97bf5e38 MK |
8712 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8713 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8714 | cat >> confdefs.h <<\EOF | |
8715 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8716 | EOF | |
8717 | ||
8718 | fi | |
8719 | ||
8720 | ||
8721 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
c960c18f | 8722 | echo "configure:8723: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8723 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8724 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8725 | else |
8726 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8727 | #line 8728 "configure" |
c906108c | 8728 | #include "confdefs.h" |
97bf5e38 MK |
8729 | #include <sys/types.h> |
8730 | #ifdef HAVE_NLIST_H | |
8731 | #include <nlist.h> | |
8732 | #endif | |
8733 | #include <link.h> | |
8734 | int main() { | |
8735 | struct so_map lm; (void) lm.som_addr; | |
8736 | ; return 0; } | |
8737 | EOF | |
c960c18f | 8738 | if { (eval echo configure:8739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8739 | rm -rf conftest* |
8740 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8741 | else | |
8742 | echo "configure: failed program was:" >&5 | |
8743 | cat conftest.$ac_ext >&5 | |
8744 | rm -rf conftest* | |
8745 | gdb_cv_have_struct_so_map_with_som_members=no | |
8746 | fi | |
8747 | rm -f conftest* | |
8748 | fi | |
c906108c | 8749 | |
97bf5e38 MK |
8750 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8751 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8752 | cat >> confdefs.h <<\EOF | |
8753 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8754 | EOF | |
c906108c | 8755 | |
97bf5e38 | 8756 | fi |
c906108c | 8757 | |
97bf5e38 MK |
8758 | |
8759 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
c960c18f | 8760 | echo "configure:8761: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8761 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8762 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8763 | else | |
8764 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8765 | #line 8766 "configure" |
97bf5e38 MK |
8766 | #include "confdefs.h" |
8767 | #define _SYSCALL32 | |
8768 | #include <sys/link.h> | |
8769 | int main() { | |
8770 | struct link_map32 l; | |
8771 | ; return 0; } | |
8772 | EOF | |
c960c18f | 8773 | if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8774 | rm -rf conftest* |
8775 | gdb_cv_have_struct_link_map32=yes | |
8776 | else | |
8777 | echo "configure: failed program was:" >&5 | |
8778 | cat conftest.$ac_ext >&5 | |
8779 | rm -rf conftest* | |
8780 | gdb_cv_have_struct_link_map32=no | |
8781 | fi | |
8782 | rm -f conftest* | |
8783 | fi | |
c906108c | 8784 | |
97bf5e38 MK |
8785 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8786 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8787 | cat >> confdefs.h <<\EOF | |
8788 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8789 | EOF | |
c906108c | 8790 | |
97bf5e38 MK |
8791 | cat >> confdefs.h <<\EOF |
8792 | #define _SYSCALL32 1 | |
8793 | EOF | |
c906108c | 8794 | |
97bf5e38 MK |
8795 | fi |
8796 | fi | |
c906108c | 8797 | |
c906108c | 8798 | |
97bf5e38 | 8799 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
c960c18f | 8800 | echo "configure:8801: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8801 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8802 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8803 | else | |
8804 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8805 | #line 8806 "configure" |
97bf5e38 | 8806 | #include "confdefs.h" |
c906108c | 8807 | |
97bf5e38 | 8808 | int main() { |
c906108c | 8809 | |
97bf5e38 MK |
8810 | extern long long foo; |
8811 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8812 | |
97bf5e38 MK |
8813 | ; return 0; } |
8814 | EOF | |
c960c18f | 8815 | if { (eval echo configure:8816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8816 | rm -rf conftest* |
8817 | gdb_cv_c_long_long=yes | |
8818 | else | |
8819 | echo "configure: failed program was:" >&5 | |
8820 | cat conftest.$ac_ext >&5 | |
8821 | rm -rf conftest* | |
8822 | gdb_cv_c_long_long=no | |
8823 | fi | |
8824 | rm -f conftest* | |
8825 | fi | |
c906108c | 8826 | |
97bf5e38 MK |
8827 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8828 | if test $gdb_cv_c_long_long = yes; then | |
8829 | cat >> confdefs.h <<\EOF | |
8830 | #define CC_HAS_LONG_LONG 1 | |
8831 | EOF | |
8832 | ||
8833 | fi | |
8834 | ||
8835 | ||
8836 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
c960c18f | 8837 | echo "configure:8838: checking for long long support in printf" >&5 |
97bf5e38 MK |
8838 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8839 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8840 | else | |
8841 | if test "$cross_compiling" = yes; then | |
8842 | gdb_cv_printf_has_long_long=no | |
8843 | else | |
8844 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8845 | #line 8846 "configure" |
97bf5e38 MK |
8846 | #include "confdefs.h" |
8847 | ||
8848 | int main () { | |
8849 | char buf[32]; | |
8850 | long long l = 0; | |
8851 | l = (l << 16) + 0x0123; | |
8852 | l = (l << 16) + 0x4567; | |
8853 | l = (l << 16) + 0x89ab; | |
8854 | l = (l << 16) + 0xcdef; | |
8855 | sprintf (buf, "0x%016llx", l); | |
8856 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8857 | } |
97bf5e38 | 8858 | EOF |
c960c18f | 8859 | if { (eval echo configure:8860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8860 | then |
8861 | gdb_cv_printf_has_long_long=yes | |
8862 | else | |
8863 | echo "configure: failed program was:" >&5 | |
8864 | cat conftest.$ac_ext >&5 | |
8865 | rm -fr conftest* | |
8866 | gdb_cv_printf_has_long_long=no | |
8867 | fi | |
8868 | rm -fr conftest* | |
8869 | fi | |
8870 | ||
8871 | fi | |
8872 | ||
8873 | if test $gdb_cv_printf_has_long_long = yes; then | |
8874 | cat >> confdefs.h <<\EOF | |
8875 | #define PRINTF_HAS_LONG_LONG 1 | |
8876 | EOF | |
8877 | ||
8878 | fi | |
8879 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8880 | ||
8881 | ||
8882 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
c960c18f | 8883 | echo "configure:8884: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8884 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8885 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8886 | else | |
8887 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8888 | #line 8889 "configure" |
97bf5e38 MK |
8889 | #include "confdefs.h" |
8890 | ||
8891 | int main() { | |
8892 | long double foo; | |
8893 | ; return 0; } | |
8894 | EOF | |
c960c18f | 8895 | if { (eval echo configure:8896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8896 | rm -rf conftest* |
8897 | ac_cv_c_long_double=yes | |
8898 | else | |
8899 | echo "configure: failed program was:" >&5 | |
8900 | cat conftest.$ac_ext >&5 | |
8901 | rm -rf conftest* | |
8902 | ac_cv_c_long_double=no | |
8903 | fi | |
8904 | rm -f conftest* | |
8905 | fi | |
c906108c | 8906 | |
97bf5e38 MK |
8907 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8908 | if test $ac_cv_c_long_double = yes; then | |
8909 | cat >> confdefs.h <<\EOF | |
8910 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8911 | EOF |
97bf5e38 MK |
8912 | |
8913 | fi | |
8914 | ||
8915 | ||
8916 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
c960c18f | 8917 | echo "configure:8918: checking for long double support in printf" >&5 |
97bf5e38 MK |
8918 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8919 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8920 | else | |
8921 | if test "$cross_compiling" = yes; then | |
8922 | gdb_cv_printf_has_long_double=no | |
8923 | else | |
8924 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8925 | #line 8926 "configure" |
97bf5e38 MK |
8926 | #include "confdefs.h" |
8927 | ||
8928 | int main () { | |
8929 | char buf[16]; | |
8930 | long double f = 3.141592653; | |
8931 | sprintf (buf, "%Lg", f); | |
8932 | return (strncmp ("3.14159", buf, 7)); | |
8933 | } | |
8934 | EOF | |
c960c18f | 8935 | if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8936 | then |
97bf5e38 | 8937 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8938 | else |
8939 | echo "configure: failed program was:" >&5 | |
8940 | cat conftest.$ac_ext >&5 | |
8941 | rm -fr conftest* | |
97bf5e38 | 8942 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8943 | fi |
8944 | rm -fr conftest* | |
8945 | fi | |
8946 | ||
8947 | fi | |
8948 | ||
97bf5e38 | 8949 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8950 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8951 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8952 | EOF | |
8953 | ||
8954 | fi | |
8955 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8956 | ||
8957 | ||
8958 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
c960c18f | 8959 | echo "configure:8960: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8960 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8961 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8962 | else | |
8963 | if test "$cross_compiling" = yes; then | |
8964 | gdb_cv_scanf_has_long_double=no | |
8965 | else | |
8966 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 8967 | #line 8968 "configure" |
97bf5e38 MK |
8968 | #include "confdefs.h" |
8969 | ||
8970 | int main () { | |
8971 | char *buf = "3.141592653"; | |
8972 | long double f = 0; | |
8973 | sscanf (buf, "%Lg", &f); | |
8974 | return !(f > 3.14159 && f < 3.14160); | |
8975 | } | |
c906108c | 8976 | EOF |
c960c18f | 8977 | if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8978 | then |
8979 | gdb_cv_scanf_has_long_double=yes | |
8980 | else | |
8981 | echo "configure: failed program was:" >&5 | |
8982 | cat conftest.$ac_ext >&5 | |
8983 | rm -fr conftest* | |
8984 | gdb_cv_scanf_has_long_double=no | |
8985 | fi | |
8986 | rm -fr conftest* | |
8987 | fi | |
c906108c SS |
8988 | |
8989 | fi | |
8990 | ||
97bf5e38 MK |
8991 | if test $gdb_cv_scanf_has_long_double = yes; then |
8992 | cat >> confdefs.h <<\EOF | |
8993 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8994 | EOF | |
8995 | ||
8996 | fi | |
8997 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8998 | |
438013df AO |
8999 | case ${host_os} in |
9000 | aix*) | |
9001 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
c960c18f | 9002 | echo "configure:9003: checking for -bbigtoc option" >&5 |
438013df AO |
9003 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
9004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9005 | else | |
9006 | ||
9007 | SAVE_LDFLAGS=$LDFLAGS | |
9008 | ||
9009 | case $GCC in | |
9010 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
9011 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
9012 | esac | |
9013 | ||
9014 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
9015 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9016 | #line 9017 "configure" |
438013df AO |
9017 | #include "confdefs.h" |
9018 | ||
9019 | int main() { | |
9020 | int i; | |
9021 | ; return 0; } | |
9022 | EOF | |
c960c18f | 9023 | if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
9024 | : |
9025 | else | |
9026 | echo "configure: failed program was:" >&5 | |
9027 | cat conftest.$ac_ext >&5 | |
9028 | rm -rf conftest* | |
9029 | gdb_cv_bigtoc= | |
9030 | fi | |
9031 | rm -f conftest* | |
9032 | ||
9033 | fi | |
9034 | ||
9035 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
9036 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
9037 | ;; | |
9038 | esac | |
9039 | ||
c906108c SS |
9040 | |
9041 | ||
9042 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
9043 | case ${host_os} in | |
9044 | hpux*) | |
9045 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
c960c18f | 9046 | echo "configure:9047: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
9047 | if test -f /usr/include/dce/cma_config.h ; then |
9048 | if test "$GCC" = "yes" ; then | |
9049 | echo "$ac_t""yes" 1>&6 | |
9050 | cat >> confdefs.h <<\EOF | |
9051 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
9052 | EOF | |
9053 | ||
3483b318 | 9054 | CONFIG_OBS="${CONFIG_OBS} hpux-thread.o" |
c906108c SS |
9055 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
9056 | else | |
9057 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
9058 | fi | |
9059 | else | |
9060 | echo "$ac_t""no" 1>&6 | |
9061 | fi | |
9062 | ;; | |
9063 | solaris*) | |
d92419e5 JB |
9064 | # See if thread_db library is around for Solaris thread debugging. |
9065 | # Note that we must explicitly test for version 1 of the library | |
9066 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
9067 | # the same API. | |
c906108c | 9068 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
c960c18f | 9069 | echo "configure:9070: checking for Solaris thread debugging library" >&5 |
c906108c SS |
9070 | if test -f /usr/lib/libthread_db.so.1 ; then |
9071 | echo "$ac_t""yes" 1>&6 | |
9072 | cat >> confdefs.h <<\EOF | |
9073 | #define HAVE_THREAD_DB_LIB 1 | |
9074 | EOF | |
9075 | ||
3483b318 | 9076 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c SS |
9077 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
9078 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
c960c18f | 9079 | echo "configure:9080: checking for dlopen in -ldl" >&5 |
c906108c SS |
9080 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
9081 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
9082 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9083 | else | |
9084 | ac_save_LIBS="$LIBS" | |
9085 | LIBS="-ldl $LIBS" | |
9086 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9087 | #line 9088 "configure" |
c906108c SS |
9088 | #include "confdefs.h" |
9089 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9090 | /* We use char because int might match the return type of a gcc2 | |
9091 | builtin and then its argument prototype would still apply. */ | |
9092 | char dlopen(); | |
9093 | ||
9094 | int main() { | |
9095 | dlopen() | |
9096 | ; return 0; } | |
9097 | EOF | |
c960c18f | 9098 | if { (eval echo configure:9099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9099 | rm -rf conftest* |
9100 | eval "ac_cv_lib_$ac_lib_var=yes" | |
9101 | else | |
9102 | echo "configure: failed program was:" >&5 | |
9103 | cat conftest.$ac_ext >&5 | |
9104 | rm -rf conftest* | |
9105 | eval "ac_cv_lib_$ac_lib_var=no" | |
9106 | fi | |
9107 | rm -f conftest* | |
9108 | LIBS="$ac_save_LIBS" | |
9109 | ||
9110 | fi | |
9111 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
9112 | echo "$ac_t""yes" 1>&6 | |
9113 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
9114 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
9115 | cat >> confdefs.h <<EOF | |
9116 | #define $ac_tr_lib 1 | |
9117 | EOF | |
9118 | ||
9119 | LIBS="-ldl $LIBS" | |
9120 | ||
9121 | else | |
9122 | echo "$ac_t""no" 1>&6 | |
9123 | fi | |
9124 | ||
9125 | if test "$GCC" = "yes" ; then | |
9126 | # The GNU linker requires the -export-dynamic option to make | |
9127 | # all symbols visible in the dynamic symbol table. | |
9128 | hold_ldflags=$LDFLAGS | |
9129 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
c960c18f | 9130 | echo "configure:9131: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
9131 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
9132 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9133 | #line 9134 "configure" |
c906108c SS |
9134 | #include "confdefs.h" |
9135 | ||
9136 | int main() { | |
9137 | int i; | |
9138 | ; return 0; } | |
9139 | EOF | |
c960c18f | 9140 | if { (eval echo configure:9141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9141 | rm -rf conftest* |
9142 | found=yes | |
9143 | else | |
9144 | echo "configure: failed program was:" >&5 | |
9145 | cat conftest.$ac_ext >&5 | |
9146 | rm -rf conftest* | |
9147 | found=no | |
9148 | fi | |
9149 | rm -f conftest* | |
9150 | LDFLAGS=$hold_ldflags | |
9151 | echo "$ac_t""$found" 1>&6 | |
9152 | if test $found = yes; then | |
9153 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
9154 | fi | |
9155 | fi | |
9156 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
9157 | # at one point. | |
9158 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
c960c18f | 9159 | echo "configure:9160: checking if <proc_service.h> is old" >&5 |
c906108c SS |
9160 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
9161 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9162 | else | |
9163 | ||
9164 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9165 | #line 9166 "configure" |
c906108c SS |
9166 | #include "confdefs.h" |
9167 | ||
9168 | #include <proc_service.h> | |
9169 | ps_err_e ps_pdwrite | |
9170 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
9171 | ||
9172 | int main() { | |
9173 | ||
9174 | ; return 0; } | |
9175 | EOF | |
c960c18f | 9176 | if { (eval echo configure:9177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9177 | rm -rf conftest* |
9178 | gdb_cv_proc_service_is_old=no | |
9179 | else | |
9180 | echo "configure: failed program was:" >&5 | |
9181 | cat conftest.$ac_ext >&5 | |
9182 | rm -rf conftest* | |
9183 | gdb_cv_proc_service_is_old=yes | |
9184 | fi | |
9185 | rm -f conftest* | |
9186 | ||
9187 | fi | |
9188 | ||
9189 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
9190 | if test $gdb_cv_proc_service_is_old = yes; then | |
9191 | cat >> confdefs.h <<\EOF | |
9192 | #define PROC_SERVICE_IS_OLD 1 | |
9193 | EOF | |
9194 | ||
9195 | fi | |
9196 | else | |
9197 | echo "$ac_t""no" 1>&6 | |
9198 | fi | |
9199 | ;; | |
d92419e5 JB |
9200 | aix*) |
9201 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
c960c18f | 9202 | echo "configure:9203: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
9203 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
9204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9205 | else | |
9206 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9207 | #line 9208 "configure" |
d92419e5 JB |
9208 | #include "confdefs.h" |
9209 | #include <sys/pthdebug.h> | |
9210 | int main() { | |
9211 | #ifndef PTHDB_VERSION_3 | |
9212 | #error | |
9213 | #endif | |
9214 | ; return 0; } | |
9215 | EOF | |
c960c18f | 9216 | if { (eval echo configure:9217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
9217 | rm -rf conftest* |
9218 | gdb_cv_have_aix_thread_debug=yes | |
9219 | else | |
9220 | echo "configure: failed program was:" >&5 | |
9221 | cat conftest.$ac_ext >&5 | |
9222 | rm -rf conftest* | |
9223 | gdb_cv_have_aix_thread_debug=no | |
9224 | fi | |
9225 | rm -f conftest* | |
9226 | fi | |
9227 | ||
9228 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
9229 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
9230 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 9231 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
9232 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
9233 | fi | |
9234 | ;; | |
c906108c SS |
9235 | esac |
9236 | ||
9237 | fi | |
9238 | ||
3f47be5c EZ |
9239 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
9240 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
c960c18f | 9241 | echo "configure:9242: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
9242 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
9243 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9244 | else | |
9245 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9246 | #line 9247 "configure" |
3f47be5c EZ |
9247 | #include "confdefs.h" |
9248 | #include <thread_db.h> | |
9249 | int main() { | |
9250 | int i = TD_NOTALLOC; | |
9251 | ; return 0; } | |
9252 | EOF | |
c960c18f | 9253 | if { (eval echo configure:9254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
9254 | rm -rf conftest* |
9255 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
9256 | else | |
9257 | echo "configure: failed program was:" >&5 | |
9258 | cat conftest.$ac_ext >&5 | |
9259 | rm -rf conftest* | |
9260 | gdb_cv_thread_db_h_has_td_notalloc=no | |
9261 | ||
9262 | fi | |
9263 | rm -f conftest* | |
9264 | ||
9265 | fi | |
9266 | ||
9267 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
9268 | fi | |
9269 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
9270 | cat >> confdefs.h <<\EOF | |
9271 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
9272 | EOF | |
9273 | ||
9274 | fi | |
9275 | ||
b757528f JJ |
9276 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
9277 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
c960c18f | 9278 | echo "configure:9279: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
9279 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
9280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9281 | else | |
9282 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9283 | #line 9284 "configure" |
b757528f JJ |
9284 | #include "confdefs.h" |
9285 | #include <sys/syscall.h> | |
9286 | int main() { | |
9287 | int i = __NR_tkill; | |
9288 | ; return 0; } | |
9289 | EOF | |
c960c18f | 9290 | if { (eval echo configure:9291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
9291 | rm -rf conftest* |
9292 | gdb_cv_sys_syscall_h_has_tkill=yes | |
9293 | else | |
9294 | echo "configure: failed program was:" >&5 | |
9295 | cat conftest.$ac_ext >&5 | |
9296 | rm -rf conftest* | |
9297 | gdb_cv_sys_syscall_h_has_tkill=no | |
9298 | ||
9299 | fi | |
9300 | rm -f conftest* | |
9301 | ||
9302 | fi | |
9303 | ||
9304 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
9305 | fi | |
9306 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
9307 | cat >> confdefs.h <<\EOF | |
9308 | #define HAVE_TKILL_SYSCALL 1 | |
9309 | EOF | |
9310 | ||
9311 | fi | |
9312 | ||
fb40c209 | 9313 | |
030292b7 DJ |
9314 | # Check whether --with-sysroot or --without-sysroot was given. |
9315 | if test "${with_sysroot+set}" = set; then | |
9316 | withval="$with_sysroot" | |
9317 | ||
9318 | case ${with_sysroot} in | |
715d1656 | 9319 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
9320 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
9321 | esac | |
9322 | ||
9323 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
9324 | ||
9325 | if test "x$exec_prefix" = xNONE; then | |
9326 | if test "x$prefix" = xNONE; then | |
9327 | test_prefix=/usr/local | |
9328 | else | |
9329 | test_prefix=$prefix | |
9330 | fi | |
9331 | else | |
9332 | test_prefix=$exec_prefix | |
9333 | fi | |
9334 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
9335 | "${test_prefix}"|"${test_prefix}/"*|\ |
9336 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
9337 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
9338 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
9339 | ;; | |
9340 | esac | |
9341 | ||
9342 | else | |
9343 | ||
9344 | TARGET_SYSTEM_ROOT= | |
9345 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
9346 | ||
9347 | fi | |
9348 | ||
9349 | ||
9350 | ||
9351 | ||
3b851bce AC |
9352 | # NOTE: Don't add -Wall or -Wunused, they both include |
9353 | # -Wunused-parameter which reports bogus warnings. | |
9354 | # NOTE: If you add to this list, remember to update | |
9355 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 9356 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
0f0cffd2 | 9357 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \ |
4566dfcf | 9358 | -Wunused-label -Wunused-function" |
d8038014 | 9359 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
0f0cffd2 | 9360 | # -Wunused-function -Wunused-variable -Wunused-value |
93d56215 | 9361 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
9362 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
9363 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
9364 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
9365 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
9366 | if test "${enable_build_warnings+set}" = set; then | |
9367 | enableval="$enable_build_warnings" | |
1decb323 | 9368 | case "${enableval}" in |
c906108c SS |
9369 | yes) ;; |
9370 | no) build_warnings="-w";; | |
9371 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9372 | build_warnings="${build_warnings} ${t}";; | |
9373 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9374 | build_warnings="${t} ${build_warnings}";; | |
9375 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9376 | esac | |
d4f3574e | 9377 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 9378 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 9379 | fi |
1decb323 | 9380 | fi |
3b851bce AC |
9381 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
9382 | if test "${enable_gdb_build_warnings+set}" = set; then | |
9383 | enableval="$enable_gdb_build_warnings" | |
9384 | case "${enableval}" in | |
9385 | yes) ;; | |
9386 | no) build_warnings="-w";; | |
9387 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9388 | build_warnings="${build_warnings} ${t}";; | |
9389 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9390 | build_warnings="${t} ${build_warnings}";; | |
9391 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9392 | esac | |
9393 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9394 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9395 | fi | |
9396 | fi | |
104c1213 JM |
9397 | WARN_CFLAGS="" |
9398 | WERROR_CFLAGS="" | |
c906108c SS |
9399 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
9400 | then | |
746a987d | 9401 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
c960c18f | 9402 | echo "configure:9403: checking compiler warning flags" >&5 |
746a987d AC |
9403 | # Separate out the -Werror flag as some files just cannot be |
9404 | # compiled with it enabled. | |
9405 | for w in ${build_warnings}; do | |
9406 | case $w in | |
9407 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
9408 | *) # Check that GCC accepts it | |
4536bbc6 AC |
9409 | saved_CFLAGS="$CFLAGS" |
9410 | CFLAGS="$CFLAGS $w" | |
9411 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9412 | #line 9413 "configure" |
4536bbc6 AC |
9413 | #include "confdefs.h" |
9414 | ||
9415 | int main() { | |
9416 | ||
9417 | ; return 0; } | |
9418 | EOF | |
c960c18f | 9419 | if { (eval echo configure:9420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
9420 | rm -rf conftest* |
9421 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9422 | else | |
9423 | echo "configure: failed program was:" >&5 | |
9424 | cat conftest.$ac_ext >&5 | |
9425 | fi | |
9426 | rm -f conftest* | |
9427 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
9428 | esac |
9429 | done | |
9430 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
9431 | fi |
9432 | ||
9433 | ||
104c1213 | 9434 | |
7a292a7a SS |
9435 | # In the Cygwin environment, we need some additional flags. |
9436 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
c960c18f | 9437 | echo "configure:9438: checking for cygwin" >&5 |
7a292a7a SS |
9438 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9439 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9440 | else | |
9441 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9442 | #line 9443 "configure" |
7a292a7a SS |
9443 | #include "confdefs.h" |
9444 | ||
9445 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
9446 | lose | |
9447 | #endif | |
9448 | EOF | |
9449 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9450 | egrep "lose" >/dev/null 2>&1; then | |
9451 | rm -rf conftest* | |
9452 | gdb_cv_os_cygwin=yes | |
9453 | else | |
9454 | rm -rf conftest* | |
9455 | gdb_cv_os_cygwin=no | |
9456 | fi | |
9457 | rm -f conftest* | |
9458 | ||
9459 | fi | |
9460 | ||
9461 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
9462 | ||
aff38e61 AC |
9463 | |
9464 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9465 | case ${host} in | |
95cbc983 AC |
9466 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9467 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9468 | esac |
9469 | ||
9470 | ||
cd0fc7c3 SS |
9471 | # libreadline needs libuser32.a in a cygwin environment |
9472 | WIN32LIBS= | |
9473 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9474 | WIN32LIBS="-luser32" |
9475 | case "${target}" in | |
9476 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9477 | ;; | |
9478 | esac | |
cd0fc7c3 | 9479 | fi |
c906108c | 9480 | |
7a292a7a | 9481 | |
3fc11d3e JM |
9482 | LIBGUI="../libgui/src/libgui.a" |
9483 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9484 | ||
9485 | ||
7a292a7a | 9486 | |
3fc11d3e JM |
9487 | WIN32LDAPP= |
9488 | ||
9489 | ||
9490 | ||
9491 | configdir="unix" | |
9492 | ||
9493 | GDBTKLIBS= | |
9494 | if test "${enable_gdbtk}" = "yes"; then | |
9495 | ||
d1c3b63a KS |
9496 | # Gdbtk must have an absolute path to srcdir in order to run |
9497 | # properly when not installed. | |
9498 | here=`pwd` | |
9499 | cd ${srcdir} | |
9500 | GDBTK_SRC_DIR=`pwd` | |
9501 | cd $here | |
9502 | ||
3fc11d3e JM |
9503 | |
9504 | # | |
9505 | # Ok, lets find the tcl configuration | |
9506 | # First, look for one uninstalled. | |
9507 | # the alternative search directory is invoked by --with-tclconfig | |
9508 | # | |
9509 | ||
9510 | if test x"${no_tcl}" = x ; then | |
9511 | # we reset no_tcl in case something fails here | |
9512 | no_tcl=true | |
9513 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9514 | if test "${with_tclconfig+set}" = set; then | |
9515 | withval="$with_tclconfig" | |
9516 | with_tclconfig=${withval} | |
9517 | fi | |
9518 | ||
9519 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
c960c18f | 9520 | echo "configure:9521: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9521 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9522 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9523 | else | |
9524 | ||
9525 | ||
9526 | # First check to see if --with-tclconfig was specified. | |
9527 | if test x"${with_tclconfig}" != x ; then | |
9528 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9529 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9530 | else | |
9531 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9532 | fi | |
9533 | fi | |
9534 | ||
9535 | # then check for a private Tcl installation | |
9536 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9537 | for i in \ | |
9538 | ../tcl \ | |
9539 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9540 | ../../tcl \ | |
9541 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9542 | ../../../tcl \ | |
9543 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9544 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9545 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9546 | break | |
9547 | fi | |
9548 | done | |
9549 | fi | |
9550 | # check in a few common install locations | |
9551 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9552 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9553 | if test -f "$i/tclConfig.sh" ; then | |
9554 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9555 | break | |
9556 | fi | |
9557 | done | |
9558 | fi | |
9559 | # check in a few other private locations | |
9560 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9561 | for i in \ | |
9562 | ${srcdir}/../tcl \ | |
9563 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9564 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9565 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9566 | break | |
9567 | fi | |
9568 | done | |
9569 | fi | |
9570 | ||
9571 | fi | |
9572 | ||
9573 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9574 | TCLCONFIG="# no Tcl configs found" | |
9575 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9576 | else | |
9577 | no_tcl= | |
9578 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9579 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9580 | fi | |
9581 | fi | |
9582 | ||
9583 | if test -z "${no_tcl}"; then | |
9584 | ||
9585 | . $TCLCONFIG | |
9586 | ||
9587 | ||
9588 | ||
9589 | ||
9590 | ||
9591 | ||
9592 | ||
9593 | ||
9594 | ||
9595 | ||
9596 | ||
9597 | ||
9598 | ||
9599 | ||
9600 | ||
9601 | ||
9602 | ||
9603 | ||
9604 | ||
9605 | ||
033afc63 | 9606 | |
3fc11d3e JM |
9607 | |
9608 | ||
9609 | ||
9610 | ||
9611 | ||
9612 | ||
9613 | # | |
9614 | # Ok, lets find the tk configuration | |
9615 | # First, look for one uninstalled. | |
9616 | # the alternative search directory is invoked by --with-tkconfig | |
9617 | # | |
9618 | ||
9619 | if test x"${no_tk}" = x ; then | |
9620 | # we reset no_tk in case something fails here | |
9621 | no_tk=true | |
9622 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9623 | if test "${with_tkconfig+set}" = set; then | |
9624 | withval="$with_tkconfig" | |
9625 | with_tkconfig=${withval} | |
9626 | fi | |
9627 | ||
9628 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
c960c18f | 9629 | echo "configure:9630: checking for Tk configuration" >&5 |
3fc11d3e JM |
9630 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9631 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9632 | else | |
9633 | ||
9634 | ||
9635 | # First check to see if --with-tkconfig was specified. | |
9636 | if test x"${with_tkconfig}" != x ; then | |
9637 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9638 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9639 | else | |
9640 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9641 | fi | |
9642 | fi | |
9643 | ||
9644 | # then check for a private Tk library | |
9645 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9646 | for i in \ | |
9647 | ../tk \ | |
9648 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9649 | ../../tk \ | |
9650 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9651 | ../../../tk \ | |
9652 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9653 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9654 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9655 | break | |
9656 | fi | |
9657 | done | |
9658 | fi | |
9659 | # check in a few common install locations | |
9660 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9661 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9662 | if test -f "$i/tkConfig.sh" ; then | |
9663 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9664 | break | |
9665 | fi | |
9666 | done | |
9667 | fi | |
9668 | # check in a few other private locations | |
9669 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9670 | for i in \ | |
9671 | ${srcdir}/../tk \ | |
9672 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9673 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9674 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9675 | break | |
9676 | fi | |
9677 | done | |
9678 | fi | |
9679 | ||
9680 | fi | |
9681 | ||
9682 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9683 | TKCONFIG="# no Tk configs found" | |
9684 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9685 | else | |
9686 | no_tk= | |
9687 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9688 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9689 | fi | |
9690 | fi | |
9691 | ||
9692 | ||
9693 | ||
dd2504ab JM |
9694 | # now look for Tcl library stuff |
9695 | ||
9696 | case "${host}" in | |
9697 | *-*-cygwin*) | |
9698 | tcldir=../tcl/win/ | |
9699 | ;; | |
9700 | *) | |
9701 | tcldir=../tcl/unix/ | |
9702 | ;; | |
9703 | esac | |
9704 | ||
9705 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9706 | ||
3fc11d3e JM |
9707 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9708 | # point to doing Tcl. | |
9709 | if test -z "${no_tk}"; then | |
9710 | ||
9711 | if test -f "$TKCONFIG" ; then | |
9712 | . $TKCONFIG | |
9713 | fi | |
9714 | ||
9715 | ||
9716 | ||
9717 | ||
9718 | ||
9719 | ||
9720 | ||
9721 | ||
9722 | ||
9723 | ||
9724 | ||
9725 | ||
9726 | ||
9727 | ||
9728 | # | |
9729 | # Ok, lets find the tcl source trees so we can use the headers | |
9730 | # Warning: transition of version 9 to 10 will break this algorithm | |
9731 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9732 | # be careful that we don't match stuff like tclX by accident. | |
9733 | # the alternative search directory is involked by --with-tclinclude | |
9734 | # | |
9735 | ||
9736 | no_tcl=true | |
9737 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
c960c18f | 9738 | echo "configure:9739: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9739 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9740 | if test "${with_tclinclude+set}" = set; then | |
9741 | withval="$with_tclinclude" | |
9742 | with_tclinclude=${withval} | |
9743 | fi | |
9744 | ||
9745 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9746 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9747 | else | |
9748 | ||
9749 | # first check to see if --with-tclinclude was specified | |
9750 | if test x"${with_tclinclude}" != x ; then | |
9751 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9752 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9753 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9754 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9755 | else | |
9756 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9757 | fi | |
9758 | fi | |
9759 | ||
9760 | # next check if it came with Tcl configuration file | |
9761 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9762 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9763 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9764 | fi | |
9765 | fi | |
9766 | ||
9767 | # next check in private source directory | |
9768 | # | |
9769 | # since ls returns lowest version numbers first, reverse its output | |
9770 | if test x"${ac_cv_c_tclh}" = x ; then | |
9771 | for i in \ | |
9772 | ${srcdir}/../tcl \ | |
9773 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9774 | ${srcdir}/../../tcl \ | |
9775 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9776 | ${srcdir}/../../../tcl \ | |
9777 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9778 | if test -f $i/generic/tclInt.h ; then | |
9779 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9780 | break | |
9781 | fi | |
9782 | done | |
9783 | fi | |
9784 | # finally check in a few common install locations | |
9785 | # | |
9786 | # since ls returns lowest version numbers first, reverse its output | |
9787 | if test x"${ac_cv_c_tclh}" = x ; then | |
9788 | for i in \ | |
9789 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9790 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9791 | /usr/local/src/tcl \ | |
9792 | /usr/local/lib/tcl \ | |
9793 | ${prefix}/include ; do | |
9794 | if test -f $i/generic/tclInt.h ; then | |
9795 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9796 | break | |
9797 | fi | |
9798 | done | |
9799 | fi | |
9800 | # see if one is installed | |
9801 | if test x"${ac_cv_c_tclh}" = x ; then | |
9802 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9803 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
c960c18f | 9804 | echo "configure:9805: checking for tclInt.h" >&5 |
3fc11d3e JM |
9805 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9807 | else | |
9808 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9809 | #line 9810 "configure" |
3fc11d3e JM |
9810 | #include "confdefs.h" |
9811 | #include <tclInt.h> | |
9812 | EOF | |
9813 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
c960c18f | 9814 | { (eval echo configure:9815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9815 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9816 | if test -z "$ac_err"; then | |
9817 | rm -rf conftest* | |
9818 | eval "ac_cv_header_$ac_safe=yes" | |
9819 | else | |
9820 | echo "$ac_err" >&5 | |
9821 | echo "configure: failed program was:" >&5 | |
9822 | cat conftest.$ac_ext >&5 | |
9823 | rm -rf conftest* | |
9824 | eval "ac_cv_header_$ac_safe=no" | |
9825 | fi | |
9826 | rm -f conftest* | |
9827 | fi | |
9828 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9829 | echo "$ac_t""yes" 1>&6 | |
9830 | ac_cv_c_tclh=installed | |
9831 | else | |
9832 | echo "$ac_t""no" 1>&6 | |
9833 | ac_cv_c_tclh="" | |
9834 | fi | |
9835 | ||
9836 | fi | |
9837 | ||
9838 | fi | |
9839 | ||
9840 | if test x"${ac_cv_c_tclh}" = x ; then | |
9841 | TCLHDIR="# no Tcl private headers found" | |
9842 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9843 | fi | |
9844 | if test x"${ac_cv_c_tclh}" != x ; then | |
9845 | no_tcl="" | |
9846 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9847 | echo "$ac_t""is installed" 1>&6 | |
9848 | TCLHDIR="" | |
9849 | else | |
9850 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9851 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9852 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9853 | fi | |
9854 | fi | |
9855 | ||
9856 | ||
9857 | ||
9858 | ||
9859 | # | |
9860 | # Ok, lets find the tk source trees so we can use the headers | |
9861 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9862 | # in preference to any others. Same logic is used when choosing library | |
9863 | # and again with Tcl. The search order is the best place to look first, then in | |
9864 | # decreasing significance. The loop breaks if the trigger file is found. | |
9865 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9866 | # directory. This converts the path from a relative to an absolute, so | |
9867 | # recursive cache variables for the path will work right. We check all | |
9868 | # the possible paths in one loop rather than many seperate loops to speed | |
9869 | # things up. | |
9870 | # the alternative search directory is involked by --with-tkinclude | |
9871 | # | |
9872 | no_tk=true | |
9873 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
c960c18f | 9874 | echo "configure:9875: checking for Tk private headers" >&5 |
3fc11d3e JM |
9875 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9876 | if test "${with_tkinclude+set}" = set; then | |
9877 | withval="$with_tkinclude" | |
9878 | with_tkinclude=${withval} | |
9879 | fi | |
9880 | ||
9881 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9882 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9883 | else | |
9884 | ||
9885 | # first check to see if --with-tkinclude was specified | |
9886 | if test x"${with_tkinclude}" != x ; then | |
9887 | if test -f ${with_tkinclude}/tk.h ; then | |
9888 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9889 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9890 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9891 | else | |
9892 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9893 | fi | |
9894 | fi | |
9895 | ||
9896 | # next check if it came with Tk configuration file | |
9897 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9898 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9899 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9900 | fi | |
9901 | fi | |
9902 | ||
9903 | # next check in private source directory | |
9904 | # | |
9905 | # since ls returns lowest version numbers first, reverse its output | |
9906 | if test x"${ac_cv_c_tkh}" = x ; then | |
9907 | for i in \ | |
9908 | ${srcdir}/../tk \ | |
9909 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9910 | ${srcdir}/../../tk \ | |
9911 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9912 | ${srcdir}/../../../tk \ | |
9913 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9914 | if test -f $i/generic/tk.h ; then | |
9915 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9916 | break | |
9917 | fi | |
9918 | done | |
9919 | fi | |
9920 | # finally check in a few common install locations | |
9921 | # | |
9922 | # since ls returns lowest version numbers first, reverse its output | |
9923 | if test x"${ac_cv_c_tkh}" = x ; then | |
9924 | for i in \ | |
9925 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9926 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9927 | /usr/local/src/tk \ | |
9928 | /usr/local/lib/tk \ | |
9929 | ${prefix}/include ; do | |
9930 | if test -f $i/generic/tk.h ; then | |
9931 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9932 | break | |
9933 | fi | |
9934 | done | |
9935 | fi | |
9936 | # see if one is installed | |
9937 | if test x"${ac_cv_c_tkh}" = x ; then | |
9938 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9939 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
c960c18f | 9940 | echo "configure:9941: checking for tk.h" >&5 |
3fc11d3e JM |
9941 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9943 | else | |
9944 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 9945 | #line 9946 "configure" |
3fc11d3e JM |
9946 | #include "confdefs.h" |
9947 | #include <tk.h> | |
9948 | EOF | |
9949 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
c960c18f | 9950 | { (eval echo configure:9951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9951 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9952 | if test -z "$ac_err"; then | |
9953 | rm -rf conftest* | |
9954 | eval "ac_cv_header_$ac_safe=yes" | |
9955 | else | |
9956 | echo "$ac_err" >&5 | |
9957 | echo "configure: failed program was:" >&5 | |
9958 | cat conftest.$ac_ext >&5 | |
9959 | rm -rf conftest* | |
9960 | eval "ac_cv_header_$ac_safe=no" | |
9961 | fi | |
9962 | rm -f conftest* | |
9963 | fi | |
9964 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9965 | echo "$ac_t""yes" 1>&6 | |
9966 | ac_cv_c_tkh=installed | |
9967 | else | |
9968 | echo "$ac_t""no" 1>&6 | |
9969 | ac_cv_c_tkh="" | |
9970 | fi | |
9971 | ||
9972 | fi | |
9973 | ||
9974 | fi | |
9975 | ||
9976 | if test x"${ac_cv_c_tkh}" != x ; then | |
9977 | no_tk="" | |
9978 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9979 | echo "$ac_t""is installed" 1>&6 | |
9980 | TKHDIR="" | |
9981 | else | |
9982 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9983 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9984 | TKHDIR="-I${ac_cv_c_tkh}" | |
9985 | fi | |
9986 | else | |
9987 | TKHDIR="# no Tk directory found" | |
9988 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9989 | no_tk=true | |
9990 | fi | |
9991 | ||
9992 | ||
9993 | ||
9994 | ||
9995 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
c960c18f | 9996 | echo "configure:9997: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9997 | if test x"${ac_cv_c_itclh}" = x ; then |
9998 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9999 | if test -f $i/generic/itcl.h ; then | |
10000 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
10001 | break | |
10002 | fi | |
10003 | done | |
10004 | fi | |
10005 | if test x"${ac_cv_c_itclh}" = x ; then | |
10006 | ITCLHDIR="# no Itcl private headers found" | |
10007 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
10008 | fi | |
10009 | if test x"${ac_cv_c_itclh}" != x ; then | |
10010 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
10011 | fi | |
10012 | # should always be here | |
10013 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
10014 | ||
10015 | #AC_SUBST(ITCLLIB) | |
10016 | ||
10017 | ||
10018 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
c960c18f | 10019 | echo "configure:10020: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
10020 | if test x"${ac_cv_c_itkh}" = x ; then |
10021 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
10022 | if test -f $i/generic/itk.h ; then | |
10023 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
10024 | break | |
10025 | fi | |
10026 | done | |
10027 | fi | |
10028 | if test x"${ac_cv_c_itkh}" = x ; then | |
10029 | ITKHDIR="# no Itk private headers found" | |
10030 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
10031 | fi | |
10032 | if test x"${ac_cv_c_itkh}" != x ; then | |
10033 | ITKHDIR="-I${ac_cv_c_itkh}" | |
10034 | fi | |
10035 | # should always be here | |
10036 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
10037 | ||
10038 | #AC_SUBST(ITKLIB) | |
10039 | ||
3fc11d3e | 10040 | |
dd2504ab JM |
10041 | |
10042 | # now look for Tk library stuff | |
10043 | ||
10044 | case "${host}" in | |
10045 | *-*-cygwin*) | |
10046 | tkdir=../tk/win/ | |
10047 | ;; | |
10048 | *) | |
10049 | tkdir=../tk/unix/ | |
10050 | ;; | |
10051 | esac | |
10052 | ||
10053 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
10054 | ||
3fc11d3e JM |
10055 | # now look for Itcl library stuff |
10056 | ||
10057 | ||
10058 | # | |
10059 | # Ok, lets find the itcl configuration | |
10060 | # First, look for one uninstalled. | |
10061 | # the alternative search directory is invoked by --with-itclconfig | |
10062 | # | |
10063 | ||
10064 | if test x"${no_itcl}" = x ; then | |
10065 | # we reset no_itcl in case something fails here | |
10066 | no_itcl=true | |
10067 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
10068 | if test "${with_itclconfig+set}" = set; then | |
10069 | withval="$with_itclconfig" | |
10070 | with_itclconfig=${withval} | |
10071 | fi | |
10072 | ||
10073 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
c960c18f | 10074 | echo "configure:10075: checking for Itcl configuration" >&5 |
3fc11d3e JM |
10075 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
10076 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10077 | else | |
10078 | ||
10079 | ||
10080 | # First check to see if --with-itclconfig was specified. | |
10081 | if test x"${with_itclconfig}" != x ; then | |
10082 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
10083 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
10084 | else | |
10085 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
10086 | fi | |
10087 | fi | |
10088 | ||
10089 | # then check for a private Itcl library | |
10090 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10091 | for i in \ | |
10092 | ../itcl/itcl \ | |
10093 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
10094 | ../../itcl \ | |
10095 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
10096 | ../../../itcl \ | |
10097 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
10098 | if test -f "$i/itclConfig.sh" ; then | |
10099 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10100 | break | |
10101 | fi | |
10102 | done | |
10103 | fi | |
10104 | # check in a few common install locations | |
10105 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10106 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10107 | if test -f "$i/itclConfig.sh" ; then | |
10108 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10109 | break | |
10110 | fi | |
10111 | done | |
10112 | fi | |
10113 | # check in a few other private locations | |
10114 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10115 | for i in \ | |
10116 | ${srcdir}/../itcl/itcl \ | |
10117 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
10118 | if test -f "$i/itclConfig.sh" ; then | |
10119 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10120 | break | |
10121 | fi | |
10122 | done | |
10123 | fi | |
10124 | ||
10125 | fi | |
10126 | ||
10127 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10128 | ITCLCONFIG="# no Itcl configs found" | |
10129 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
10130 | else | |
10131 | no_itcl= | |
10132 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
10133 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
10134 | fi | |
10135 | fi | |
10136 | ||
10137 | if test -z "${no_itcl}"; then | |
10138 | ||
10139 | if test -f "$ITCLCONFIG" ; then | |
10140 | . $ITCLCONFIG | |
10141 | fi | |
10142 | ||
10143 | ||
10144 | ||
10145 | ||
10146 | ||
10147 | ||
10148 | ||
10149 | ||
10150 | ||
10151 | ||
3fc11d3e JM |
10152 | |
10153 | ||
10154 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 10155 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
10156 | fi |
10157 | ||
10158 | ||
10159 | # now look for Itk library stuff | |
10160 | ||
10161 | # | |
10162 | # Ok, lets find the itk configuration | |
10163 | # First, look for one uninstalled. | |
10164 | # the alternative search directory is invoked by --with-itkconfig | |
10165 | # | |
10166 | ||
10167 | if test x"${no_itk}" = x ; then | |
10168 | # we reset no_itk in case something fails here | |
10169 | no_itk=true | |
10170 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
10171 | if test "${with_itkconfig+set}" = set; then | |
10172 | withval="$with_itkconfig" | |
10173 | with_itkconfig=${withval} | |
10174 | fi | |
10175 | ||
10176 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
c960c18f | 10177 | echo "configure:10178: checking for Itk configuration" >&5 |
3fc11d3e JM |
10178 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
10179 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10180 | else | |
10181 | ||
10182 | ||
10183 | # First check to see if --with-itkconfig was specified. | |
10184 | if test x"${with_itkconfig}" != x ; then | |
10185 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
10186 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
10187 | else | |
10188 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
10189 | fi | |
10190 | fi | |
10191 | ||
10192 | # then check for a private Itk library | |
10193 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10194 | for i in \ | |
10195 | ../itcl/itk \ | |
10196 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
10197 | ../../itk \ | |
10198 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
10199 | ../../../itk \ | |
10200 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
10201 | if test -f "$i/itkConfig.sh" ; then | |
10202 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10203 | break | |
10204 | fi | |
10205 | done | |
10206 | fi | |
10207 | # check in a few common install locations | |
10208 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10209 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10210 | if test -f "$i/itkConfig.sh" ; then | |
10211 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10212 | break | |
10213 | fi | |
10214 | done | |
10215 | fi | |
10216 | # check in a few other private locations | |
10217 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10218 | for i in \ | |
10219 | ${srcdir}/../itcl/itk \ | |
10220 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
10221 | if test -f "$i/itkConfig.sh" ; then | |
10222 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10223 | break | |
10224 | fi | |
10225 | done | |
10226 | fi | |
10227 | ||
10228 | fi | |
10229 | ||
10230 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10231 | ITKCONFIG="# no Itk configs found" | |
10232 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
10233 | else | |
10234 | no_itk= | |
10235 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
10236 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
10237 | fi | |
10238 | fi | |
10239 | ||
10240 | ||
10241 | if test -z "${no_itcl}"; then | |
10242 | ||
10243 | if test -f "$ITKCONFIG" ; then | |
10244 | . $ITKCONFIG | |
10245 | fi | |
10246 | ||
10247 | ||
10248 | ||
10249 | ||
10250 | ||
10251 | ||
10252 | ||
10253 | ||
10254 | ||
10255 | ||
10256 | ||
10257 | ||
3fc11d3e | 10258 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 10259 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
10260 | fi |
10261 | ||
4226a5a5 | 10262 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
10263 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
10264 | # know whether 8.2 will or not, but I bet it will. | |
10265 | # I don't have to worry about 7.x since we don't support it. | |
10266 | GDBTK_CFLAGS="" | |
10267 | if test "$GCC" = "yes"; then | |
10268 | if test "$TCL_VERSION" != "8.0" ; then | |
10269 | GDBTK_CFLAGS="-fwritable-strings" | |
10270 | fi | |
10271 | fi | |
10272 | ||
10273 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 10274 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
10275 | # Yes, the ordering seems wrong here. But it isn't. |
10276 | # TK_LIBS is the list of libraries that need to be linked | |
10277 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
10278 | # were in LIBS then any link tests after this point would | |
10279 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
10280 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
10281 | |
10282 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
10283 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
10284 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
33f8ca73 AC |
10285 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" |
10286 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
10287 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
10288 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e JM |
10289 | |
10290 | if test x$gdb_cv_os_cygwin = xyes; then | |
10291 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
10292 | WIN32LDAPP="-Wl,--subsystem,console" | |
10293 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
10294 | fi | |
10295 | fi | |
10296 | fi | |
ffc6a242 | 10297 | |
ffc6a242 | 10298 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
10299 | fi |
10300 | ||
10301 | ||
10302 | ||
10303 | ||
10304 | ||
10305 | ||
10306 | ||
10307 | ||
10308 | ||
10309 | ||
10310 | ||
10311 | ||
10312 | ||
dd2504ab | 10313 | |
c906108c SS |
10314 | # If we find X, set shell vars x_includes and x_libraries to the |
10315 | # paths, otherwise set no_x=yes. | |
10316 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
10317 | # --without-x overrides everything else, but does not touch the cache. | |
10318 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
c960c18f | 10319 | echo "configure:10320: checking for X" >&5 |
c906108c SS |
10320 | |
10321 | # Check whether --with-x or --without-x was given. | |
10322 | if test "${with_x+set}" = set; then | |
10323 | withval="$with_x" | |
10324 | : | |
10325 | fi | |
10326 | ||
10327 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
10328 | if test "x$with_x" = xno; then | |
10329 | # The user explicitly disabled X. | |
10330 | have_x=disabled | |
10331 | else | |
10332 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
10333 | # Both variables are already set. | |
10334 | have_x=yes | |
10335 | else | |
10336 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
10337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10338 | else | |
10339 | # One or both of the vars are not set, and there is no cached value. | |
10340 | ac_x_includes=NO ac_x_libraries=NO | |
10341 | rm -fr conftestdir | |
10342 | if mkdir conftestdir; then | |
10343 | cd conftestdir | |
10344 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
10345 | cat > Imakefile <<'EOF' | |
10346 | acfindx: | |
10347 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
10348 | EOF | |
10349 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
10350 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
10351 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
10352 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
10353 | for ac_extension in a so sl; do | |
10354 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
10355 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
10356 | ac_im_usrlibdir=$ac_im_libdir; break | |
10357 | fi | |
10358 | done | |
10359 | # Screen out bogus values from the imake configuration. They are | |
10360 | # bogus both because they are the default anyway, and because | |
10361 | # using them would break gcc on systems where it needs fixed includes. | |
10362 | case "$ac_im_incroot" in | |
10363 | /usr/include) ;; | |
10364 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
10365 | esac | |
10366 | case "$ac_im_usrlibdir" in | |
10367 | /usr/lib | /lib) ;; | |
10368 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
10369 | esac | |
10370 | fi | |
10371 | cd .. | |
10372 | rm -fr conftestdir | |
10373 | fi | |
10374 | ||
10375 | if test "$ac_x_includes" = NO; then | |
10376 | # Guess where to find include files, by looking for this one X11 .h file. | |
10377 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
10378 | ||
10379 | # First, try using that file with no special directory specified. | |
10380 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 10381 | #line 10382 "configure" |
c906108c SS |
10382 | #include "confdefs.h" |
10383 | #include <$x_direct_test_include> | |
10384 | EOF | |
10385 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
c960c18f | 10386 | { (eval echo configure:10387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
10387 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10388 | if test -z "$ac_err"; then | |
10389 | rm -rf conftest* | |
10390 | # We can compile using X headers with no special include directory. | |
10391 | ac_x_includes= | |
10392 | else | |
10393 | echo "$ac_err" >&5 | |
10394 | echo "configure: failed program was:" >&5 | |
10395 | cat conftest.$ac_ext >&5 | |
10396 | rm -rf conftest* | |
10397 | # Look for the header file in a standard set of common directories. | |
10398 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10399 | for ac_dir in \ | |
10400 | /usr/X11/include \ | |
10401 | /usr/X11R6/include \ | |
10402 | /usr/X11R5/include \ | |
10403 | /usr/X11R4/include \ | |
10404 | \ | |
10405 | /usr/include/X11 \ | |
10406 | /usr/include/X11R6 \ | |
10407 | /usr/include/X11R5 \ | |
10408 | /usr/include/X11R4 \ | |
10409 | \ | |
10410 | /usr/local/X11/include \ | |
10411 | /usr/local/X11R6/include \ | |
10412 | /usr/local/X11R5/include \ | |
10413 | /usr/local/X11R4/include \ | |
10414 | \ | |
10415 | /usr/local/include/X11 \ | |
10416 | /usr/local/include/X11R6 \ | |
10417 | /usr/local/include/X11R5 \ | |
10418 | /usr/local/include/X11R4 \ | |
10419 | \ | |
10420 | /usr/X386/include \ | |
10421 | /usr/x386/include \ | |
10422 | /usr/XFree86/include/X11 \ | |
10423 | \ | |
10424 | /usr/include \ | |
10425 | /usr/local/include \ | |
10426 | /usr/unsupported/include \ | |
10427 | /usr/athena/include \ | |
10428 | /usr/local/x11r5/include \ | |
10429 | /usr/lpp/Xamples/include \ | |
10430 | \ | |
10431 | /usr/openwin/include \ | |
10432 | /usr/openwin/share/include \ | |
10433 | ; \ | |
10434 | do | |
10435 | if test -r "$ac_dir/$x_direct_test_include"; then | |
10436 | ac_x_includes=$ac_dir | |
10437 | break | |
10438 | fi | |
10439 | done | |
10440 | fi | |
10441 | rm -f conftest* | |
10442 | fi # $ac_x_includes = NO | |
10443 | ||
10444 | if test "$ac_x_libraries" = NO; then | |
10445 | # Check for the libraries. | |
10446 | ||
10447 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
10448 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
10449 | ||
10450 | # See if we find them without any special options. | |
10451 | # Don't add to $LIBS permanently. | |
10452 | ac_save_LIBS="$LIBS" | |
10453 | LIBS="-l$x_direct_test_library $LIBS" | |
10454 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 10455 | #line 10456 "configure" |
c906108c SS |
10456 | #include "confdefs.h" |
10457 | ||
10458 | int main() { | |
10459 | ${x_direct_test_function}() | |
10460 | ; return 0; } | |
10461 | EOF | |
c960c18f | 10462 | if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10463 | rm -rf conftest* |
10464 | LIBS="$ac_save_LIBS" | |
10465 | # We can link X programs with no special library path. | |
10466 | ac_x_libraries= | |
10467 | else | |
10468 | echo "configure: failed program was:" >&5 | |
10469 | cat conftest.$ac_ext >&5 | |
10470 | rm -rf conftest* | |
10471 | LIBS="$ac_save_LIBS" | |
10472 | # First see if replacing the include by lib works. | |
10473 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10474 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10475 | /usr/X11/lib \ | |
10476 | /usr/X11R6/lib \ | |
10477 | /usr/X11R5/lib \ | |
10478 | /usr/X11R4/lib \ | |
10479 | \ | |
10480 | /usr/lib/X11 \ | |
10481 | /usr/lib/X11R6 \ | |
10482 | /usr/lib/X11R5 \ | |
10483 | /usr/lib/X11R4 \ | |
10484 | \ | |
10485 | /usr/local/X11/lib \ | |
10486 | /usr/local/X11R6/lib \ | |
10487 | /usr/local/X11R5/lib \ | |
10488 | /usr/local/X11R4/lib \ | |
10489 | \ | |
10490 | /usr/local/lib/X11 \ | |
10491 | /usr/local/lib/X11R6 \ | |
10492 | /usr/local/lib/X11R5 \ | |
10493 | /usr/local/lib/X11R4 \ | |
10494 | \ | |
10495 | /usr/X386/lib \ | |
10496 | /usr/x386/lib \ | |
10497 | /usr/XFree86/lib/X11 \ | |
10498 | \ | |
10499 | /usr/lib \ | |
10500 | /usr/local/lib \ | |
10501 | /usr/unsupported/lib \ | |
10502 | /usr/athena/lib \ | |
10503 | /usr/local/x11r5/lib \ | |
10504 | /usr/lpp/Xamples/lib \ | |
10505 | /lib/usr/lib/X11 \ | |
10506 | \ | |
10507 | /usr/openwin/lib \ | |
10508 | /usr/openwin/share/lib \ | |
10509 | ; \ | |
10510 | do | |
10511 | for ac_extension in a so sl; do | |
10512 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10513 | ac_x_libraries=$ac_dir | |
10514 | break 2 | |
10515 | fi | |
10516 | done | |
10517 | done | |
10518 | fi | |
10519 | rm -f conftest* | |
10520 | fi # $ac_x_libraries = NO | |
10521 | ||
10522 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10523 | # Didn't find X anywhere. Cache the known absence of X. | |
10524 | ac_cv_have_x="have_x=no" | |
10525 | else | |
10526 | # Record where we found X for the cache. | |
10527 | ac_cv_have_x="have_x=yes \ | |
10528 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10529 | fi | |
10530 | fi | |
10531 | fi | |
10532 | eval "$ac_cv_have_x" | |
10533 | fi # $with_x != no | |
10534 | ||
10535 | if test "$have_x" != yes; then | |
10536 | echo "$ac_t""$have_x" 1>&6 | |
10537 | no_x=yes | |
10538 | else | |
10539 | # If each of the values was on the command line, it overrides each guess. | |
10540 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10541 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10542 | # Update the cache value to reflect the command line values. | |
10543 | ac_cv_have_x="have_x=yes \ | |
10544 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10545 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10546 | fi | |
10547 | ||
10548 | ||
7a292a7a SS |
10549 | |
10550 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
10551 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10552 | # This code just checks for a few cases where we'd like to ignore those | |
10553 | # definitions, even when they're present in the '.mt' file. These cases | |
10554 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10555 | # not part of the source tree. |
7a292a7a SS |
10556 | # |
10557 | # Check whether --enable-sim or --disable-sim was given. | |
10558 | if test "${enable_sim+set}" = set; then | |
10559 | enableval="$enable_sim" | |
10560 | echo "enable_sim = $enable_sim"; | |
10561 | echo "enableval = ${enableval}"; | |
10562 | case "${enableval}" in | |
10563 | yes) ignore_sim=false ;; | |
10564 | no) ignore_sim=true ;; | |
10565 | *) ignore_sim=false ;; | |
10566 | esac | |
10567 | else | |
10568 | ignore_sim=false | |
10569 | fi | |
10570 | ||
10571 | ||
10572 | if test ! -d "${srcdir}/../sim"; then | |
10573 | ignore_sim=true | |
10574 | fi | |
10575 | ||
10576 | if test "${ignore_sim}" = "true"; then | |
10577 | IGNORE_SIM="SIM=" | |
10578 | IGNORE_SIM_OBS="SIM_OBS=" | |
10579 | else | |
10580 | IGNORE_SIM="" | |
10581 | IGNORE_SIM_OBS="" | |
10582 | cat >> confdefs.h <<\EOF | |
10583 | #define WITH_SIM 1 | |
10584 | EOF | |
10585 | ||
10586 | fi | |
10587 | ||
10588 | ||
10589 | ||
c906108c SS |
10590 | |
10591 | ||
10592 | ||
10593 | ||
10594 | ||
10595 | ||
dfcd3bfb | 10596 | |
e56ac5c3 AC |
10597 | |
10598 | ||
b3a90332 AC |
10599 | |
10600 | ||
c906108c SS |
10601 | # target_subdir is used by the testsuite to find the target libraries. |
10602 | target_subdir= | |
10603 | if test "${host}" != "${target}"; then | |
10604 | target_subdir="${target_alias}/" | |
10605 | fi | |
10606 | ||
10607 | ||
10608 | frags= | |
10609 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10610 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
10611 | # When building a native debuger the .mh file containing things |
10612 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
10613 | # since it no longer contains anything useful. | |
10614 | if test "${target}" = "${host}"; then | |
10615 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10616 | else | |
10617 | host_makefile_frag=/dev/null | |
10618 | fi | |
c906108c SS |
10619 | fi |
10620 | frags="$frags $host_makefile_frag" | |
10621 | ||
10622 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10623 | if test ! -f ${target_makefile_frag}; then | |
10624 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
10625 | fi | |
10626 | frags="$frags $target_makefile_frag" | |
10627 | ||
10628 | ||
10629 | ||
10630 | ||
10631 | ||
10632 | hostfile=`sed -n ' | |
10633 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10634 | ' ${host_makefile_frag}` | |
10635 | ||
10636 | targetfile=`sed -n ' | |
10637 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10638 | ' ${target_makefile_frag}` | |
10639 | ||
c906108c | 10640 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10641 | # We pick this up from the host configuration file (.mh) because we |
10642 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10643 | nativefile=`sed -n ' |
10644 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10645 | ' ${host_makefile_frag}` | |
c906108c SS |
10646 | fi |
10647 | ||
10648 | ||
b00a8037 DJ |
10649 | if test x"${gdb_osabi}" != x ; then |
10650 | cat >> confdefs.h <<EOF | |
10651 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10652 | EOF | |
10653 | ||
10654 | fi | |
10655 | ||
8dcde887 MK |
10656 | # Enable multi-ice-gdb-server. |
10657 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10658 | if test "${enable_multi_ice+set}" = set; then | |
10659 | enableval="$enable_multi_ice" | |
10660 | case $enableval in | |
10661 | yes | no) | |
10662 | ;; | |
10663 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10664 | esac | |
96baa820 JM |
10665 | fi |
10666 | ||
8dcde887 MK |
10667 | if test "x$enable_multi_ice" = xyes; then |
10668 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10669 | fi |
10670 | ||
8dcde887 MK |
10671 | # We only build gdbserver automatically if host and target are the same. |
10672 | if test "x$target" = "x$host"; then | |
10673 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
c960c18f | 10674 | echo "configure:10675: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10675 | if test "x$build_gdbserver" = xyes; then |
10676 | configdirs="$configdirs gdbserver" | |
10677 | echo "$ac_t""yes" 1>&6 | |
10678 | else | |
10679 | echo "$ac_t""no" 1>&6 | |
10680 | fi | |
10681 | fi | |
10682 | ||
10683 | subdirs="doc testsuite $configdirs" | |
10684 | ||
96baa820 | 10685 | |
c906108c | 10686 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10687 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10688 | # version. | |
c906108c SS |
10689 | |
10690 | files= | |
10691 | links= | |
5a2402b8 | 10692 | |
c906108c | 10693 | rm -f xm.h |
5a2402b8 | 10694 | xm_h="" |
c906108c | 10695 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10696 | xm_h=xm.h |
10697 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10698 | files="${files} ${GDB_XM_FILE}" | |
10699 | links="${links} xm.h" | |
10700 | cat >> confdefs.h <<EOF | |
10701 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10702 | EOF | |
10703 | ||
c906108c | 10704 | fi |
5a2402b8 AC |
10705 | |
10706 | ||
c906108c | 10707 | rm -f tm.h |
5a2402b8 | 10708 | tm_h="" |
c906108c | 10709 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10710 | tm_h=tm.h |
10711 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10712 | files="${files} ${GDB_TM_FILE}" | |
10713 | links="${links} tm.h" | |
10714 | cat >> confdefs.h <<EOF | |
10715 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10716 | EOF | |
10717 | ||
c906108c | 10718 | fi |
5a2402b8 AC |
10719 | |
10720 | ||
c906108c | 10721 | rm -f nm.h |
5a2402b8 | 10722 | nm_h="" |
c906108c | 10723 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10724 | nm_h=nm.h |
10725 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10726 | files="${files} ${GDB_NM_FILE}" | |
10727 | links="${links} nm.h" | |
10728 | cat >> confdefs.h <<EOF | |
10729 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10730 | EOF | |
10731 | ||
c906108c | 10732 | fi |
5a2402b8 AC |
10733 | |
10734 | ||
c906108c SS |
10735 | |
10736 | ||
10737 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
c960c18f | 10738 | echo "configure:10739: checking for Cygwin environment" >&5 |
c906108c SS |
10739 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10740 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10741 | else | |
10742 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 10743 | #line 10744 "configure" |
c906108c SS |
10744 | #include "confdefs.h" |
10745 | ||
10746 | int main() { | |
10747 | ||
10748 | #ifndef __CYGWIN__ | |
10749 | #define __CYGWIN__ __CYGWIN32__ | |
10750 | #endif | |
10751 | return __CYGWIN__; | |
10752 | ; return 0; } | |
10753 | EOF | |
c960c18f | 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_cygwin=yes | |
10757 | else | |
10758 | echo "configure: failed program was:" >&5 | |
10759 | cat conftest.$ac_ext >&5 | |
10760 | rm -rf conftest* | |
10761 | ac_cv_cygwin=no | |
10762 | fi | |
10763 | rm -f conftest* | |
10764 | rm -f conftest* | |
10765 | fi | |
10766 | ||
10767 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10768 | CYGWIN= | |
10769 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10770 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
c960c18f | 10771 | echo "configure:10772: checking for mingw32 environment" >&5 |
c906108c SS |
10772 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10774 | else | |
10775 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 10776 | #line 10777 "configure" |
c906108c SS |
10777 | #include "confdefs.h" |
10778 | ||
10779 | int main() { | |
10780 | return __MINGW32__; | |
10781 | ; return 0; } | |
10782 | EOF | |
c960c18f | 10783 | if { (eval echo configure:10784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10784 | rm -rf conftest* |
10785 | ac_cv_mingw32=yes | |
10786 | else | |
10787 | echo "configure: failed program was:" >&5 | |
10788 | cat conftest.$ac_ext >&5 | |
10789 | rm -rf conftest* | |
10790 | ac_cv_mingw32=no | |
10791 | fi | |
10792 | rm -f conftest* | |
10793 | rm -f conftest* | |
10794 | fi | |
10795 | ||
10796 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10797 | MINGW32= | |
10798 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10799 | ||
10800 | ||
10801 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
c960c18f | 10802 | echo "configure:10803: checking for executable suffix" >&5 |
c906108c SS |
10803 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10805 | else | |
10806 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10807 | ac_cv_exeext=.exe | |
10808 | else | |
10809 | rm -f conftest* | |
10810 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10811 | ac_cv_exeext= | |
c960c18f | 10812 | if { (eval echo configure:10813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10813 | for file in conftest.*; do |
10814 | case $file in | |
d836ee13 | 10815 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10816 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10817 | esac | |
10818 | done | |
10819 | else | |
10820 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10821 | fi | |
10822 | rm -f conftest* | |
10823 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10824 | fi | |
10825 | fi | |
10826 | ||
10827 | EXEEXT="" | |
10828 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10829 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10830 | ac_exeext=$EXEEXT | |
10831 | ||
10832 | ||
234b45d4 KB |
10833 | |
10834 | cat >> confdefs.h <<\EOF | |
10835 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10836 | EOF | |
10837 | ||
10838 | ||
10839 | ||
10840 | ||
10841 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10842 | if test "${with_libiconv_prefix+set}" = set; then | |
10843 | withval="$with_libiconv_prefix" | |
10844 | ||
10845 | for dir in `echo "$withval" | tr : ' '`; do | |
10846 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10847 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10848 | done | |
10849 | ||
10850 | fi | |
10851 | ||
10852 | ||
10853 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
c960c18f | 10854 | echo "configure:10855: checking for iconv" >&5 |
234b45d4 KB |
10855 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10857 | else | |
10858 | ||
10859 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10860 | am_cv_lib_iconv=no | |
10861 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 10862 | #line 10863 "configure" |
234b45d4 KB |
10863 | #include "confdefs.h" |
10864 | #include <stdlib.h> | |
10865 | #include <iconv.h> | |
10866 | int main() { | |
10867 | iconv_t cd = iconv_open("",""); | |
10868 | iconv(cd,NULL,NULL,NULL,NULL); | |
10869 | iconv_close(cd); | |
10870 | ; return 0; } | |
10871 | EOF | |
c960c18f | 10872 | if { (eval echo configure:10873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10873 | rm -rf conftest* |
10874 | am_cv_func_iconv=yes | |
10875 | else | |
10876 | echo "configure: failed program was:" >&5 | |
10877 | cat conftest.$ac_ext >&5 | |
10878 | fi | |
10879 | rm -f conftest* | |
10880 | if test "$am_cv_func_iconv" != yes; then | |
10881 | am_save_LIBS="$LIBS" | |
10882 | LIBS="$LIBS -liconv" | |
10883 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 10884 | #line 10885 "configure" |
234b45d4 KB |
10885 | #include "confdefs.h" |
10886 | #include <stdlib.h> | |
10887 | #include <iconv.h> | |
10888 | int main() { | |
10889 | iconv_t cd = iconv_open("",""); | |
10890 | iconv(cd,NULL,NULL,NULL,NULL); | |
10891 | iconv_close(cd); | |
10892 | ; return 0; } | |
10893 | EOF | |
c960c18f | 10894 | if { (eval echo configure:10895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10895 | rm -rf conftest* |
10896 | am_cv_lib_iconv=yes | |
10897 | am_cv_func_iconv=yes | |
10898 | else | |
10899 | echo "configure: failed program was:" >&5 | |
10900 | cat conftest.$ac_ext >&5 | |
10901 | fi | |
10902 | rm -f conftest* | |
10903 | LIBS="$am_save_LIBS" | |
10904 | fi | |
10905 | ||
10906 | fi | |
10907 | ||
10908 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10909 | if test "$am_cv_func_iconv" = yes; then | |
10910 | cat >> confdefs.h <<\EOF | |
10911 | #define HAVE_ICONV 1 | |
10912 | EOF | |
10913 | ||
10914 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
c960c18f | 10915 | echo "configure:10916: checking for iconv declaration" >&5 |
234b45d4 KB |
10916 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10917 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10918 | else | |
10919 | ||
10920 | cat > conftest.$ac_ext <<EOF | |
c960c18f | 10921 | #line 10922 "configure" |
234b45d4 KB |
10922 | #include "confdefs.h" |
10923 | ||
10924 | #include <stdlib.h> | |
10925 | #include <iconv.h> | |
10926 | extern | |
10927 | #ifdef __cplusplus | |
10928 | "C" | |
10929 | #endif | |
10930 | #if defined(__STDC__) || defined(__cplusplus) | |
10931 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10932 | #else | |
10933 | size_t iconv(); | |
10934 | #endif | |
10935 | ||
10936 | int main() { | |
10937 | ||
10938 | ; return 0; } | |
10939 | EOF | |
c960c18f | 10940 | if { (eval echo configure:10941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10941 | rm -rf conftest* |
10942 | am_cv_proto_iconv_arg1="" | |
10943 | else | |
10944 | echo "configure: failed program was:" >&5 | |
10945 | cat conftest.$ac_ext >&5 | |
10946 | rm -rf conftest* | |
10947 | am_cv_proto_iconv_arg1="const" | |
10948 | fi | |
10949 | rm -f conftest* | |
10950 | 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);" | |
10951 | fi | |
10952 | ||
10953 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10954 | echo "$ac_t""${ac_t:- | |
10955 | }$am_cv_proto_iconv" 1>&6 | |
10956 | cat >> confdefs.h <<EOF | |
10957 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10958 | EOF | |
10959 | ||
10960 | fi | |
10961 | LIBICONV= | |
10962 | if test "$am_cv_lib_iconv" = yes; then | |
10963 | LIBICONV="-liconv" | |
10964 | fi | |
10965 | ||
10966 | ||
10967 | ||
c906108c SS |
10968 | trap '' 1 2 15 |
10969 | cat > confcache <<\EOF | |
10970 | # This file is a shell script that caches the results of configure | |
10971 | # tests run on this system so they can be shared between configure | |
10972 | # scripts and configure runs. It is not useful on other systems. | |
10973 | # If it contains results you don't want to keep, you may remove or edit it. | |
10974 | # | |
10975 | # By default, configure uses ./config.cache as the cache file, | |
10976 | # creating it if it does not exist already. You can give configure | |
10977 | # the --cache-file=FILE option to use a different cache file; that is | |
10978 | # what configure does when it calls configure scripts in | |
10979 | # subdirectories, so they share the cache. | |
10980 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10981 | # config.status only pays attention to the cache file if you give it the | |
10982 | # --recheck option to rerun configure. | |
10983 | # | |
10984 | EOF | |
10985 | # The following way of writing the cache mishandles newlines in values, | |
10986 | # but we know of no workaround that is simple, portable, and efficient. | |
10987 | # So, don't put newlines in cache variables' values. | |
10988 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10989 | # and sets the high bit in the cache file unless we assign to the vars. | |
10990 | (set) 2>&1 | | |
10991 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10992 | *ac_space=\ *) | |
10993 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10994 | # turns \\\\ into \\, and sed turns \\ into \). | |
10995 | sed -n \ | |
10996 | -e "s/'/'\\\\''/g" \ | |
10997 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10998 | ;; | |
10999 | *) | |
11000 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
11001 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
11002 | ;; | |
11003 | esac >> confcache | |
11004 | if cmp -s $cache_file confcache; then | |
11005 | : | |
11006 | else | |
11007 | if test -w $cache_file; then | |
11008 | echo "updating cache $cache_file" | |
11009 | cat confcache > $cache_file | |
11010 | else | |
11011 | echo "not updating unwritable cache $cache_file" | |
11012 | fi | |
11013 | fi | |
11014 | rm -f confcache | |
11015 | ||
11016 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
11017 | ||
11018 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
11019 | # Let make expand exec_prefix. | |
11020 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
11021 | ||
11022 | # Any assignment to VPATH causes Sun make to only execute | |
11023 | # the first set of double-colon rules, so remove it if not needed. | |
11024 | # If there is a colon in the path, we need to keep it. | |
11025 | if test "x$srcdir" = x.; then | |
11026 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
11027 | fi | |
11028 | ||
11029 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
11030 | ||
11031 | DEFS=-DHAVE_CONFIG_H | |
11032 | ||
11033 | # Without the "./", some shells look in PATH for config.status. | |
11034 | : ${CONFIG_STATUS=./config.status} | |
11035 | ||
11036 | echo creating $CONFIG_STATUS | |
11037 | rm -f $CONFIG_STATUS | |
11038 | cat > $CONFIG_STATUS <<EOF | |
11039 | #! /bin/sh | |
11040 | # Generated automatically by configure. | |
11041 | # Run this file to recreate the current configuration. | |
11042 | # This directory was configured as follows, | |
11043 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
11044 | # | |
11045 | # $0 $ac_configure_args | |
11046 | # | |
11047 | # Compiler output produced by configure, useful for debugging | |
11048 | # configure, is in ./config.log if it exists. | |
11049 | ||
11050 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
11051 | for ac_option | |
11052 | do | |
11053 | case "\$ac_option" in | |
11054 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
11055 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
11056 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
11057 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
11058 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
11059 | exit 0 ;; | |
11060 | -help | --help | --hel | --he | --h) | |
11061 | echo "\$ac_cs_usage"; exit 0 ;; | |
11062 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
11063 | esac | |
11064 | done | |
11065 | ||
11066 | ac_given_srcdir=$srcdir | |
11067 | ac_given_INSTALL="$INSTALL" | |
11068 | ||
ed952ac5 | 11069 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
11070 | EOF |
11071 | cat >> $CONFIG_STATUS <<EOF | |
11072 | ||
11073 | # Protect against being on the right side of a sed subst in config.status. | |
11074 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
11075 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
11076 | $ac_vpsub | |
11077 | $extrasub | |
11078 | s%@SHELL@%$SHELL%g | |
11079 | s%@CFLAGS@%$CFLAGS%g | |
11080 | s%@CPPFLAGS@%$CPPFLAGS%g | |
11081 | s%@CXXFLAGS@%$CXXFLAGS%g | |
11082 | s%@FFLAGS@%$FFLAGS%g | |
11083 | s%@DEFS@%$DEFS%g | |
11084 | s%@LDFLAGS@%$LDFLAGS%g | |
11085 | s%@LIBS@%$LIBS%g | |
11086 | s%@exec_prefix@%$exec_prefix%g | |
11087 | s%@prefix@%$prefix%g | |
11088 | s%@program_transform_name@%$program_transform_name%g | |
11089 | s%@bindir@%$bindir%g | |
11090 | s%@sbindir@%$sbindir%g | |
11091 | s%@libexecdir@%$libexecdir%g | |
11092 | s%@datadir@%$datadir%g | |
11093 | s%@sysconfdir@%$sysconfdir%g | |
11094 | s%@sharedstatedir@%$sharedstatedir%g | |
11095 | s%@localstatedir@%$localstatedir%g | |
11096 | s%@libdir@%$libdir%g | |
11097 | s%@includedir@%$includedir%g | |
11098 | s%@oldincludedir@%$oldincludedir%g | |
11099 | s%@infodir@%$infodir%g | |
11100 | s%@mandir@%$mandir%g | |
413ccac7 AC |
11101 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
11102 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
11103 | s%@MAINT@%$MAINT%g | |
c906108c SS |
11104 | s%@CC@%$CC%g |
11105 | s%@CPP@%$CPP%g | |
11106 | s%@host@%$host%g | |
11107 | s%@host_alias@%$host_alias%g | |
11108 | s%@host_cpu@%$host_cpu%g | |
11109 | s%@host_vendor@%$host_vendor%g | |
11110 | s%@host_os@%$host_os%g | |
11111 | s%@target@%$target%g | |
11112 | s%@target_alias@%$target_alias%g | |
11113 | s%@target_cpu@%$target_cpu%g | |
11114 | s%@target_vendor@%$target_vendor%g | |
11115 | s%@target_os@%$target_os%g | |
11116 | s%@build@%$build%g | |
11117 | s%@build_alias@%$build_alias%g | |
11118 | s%@build_cpu@%$build_cpu%g | |
11119 | s%@build_vendor@%$build_vendor%g | |
11120 | s%@build_os@%$build_os%g | |
c906108c | 11121 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 11122 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
11123 | s%@ALLOCA@%$ALLOCA%g |
11124 | s%@USE_NLS@%$USE_NLS%g | |
11125 | s%@MSGFMT@%$MSGFMT%g | |
11126 | s%@GMSGFMT@%$GMSGFMT%g | |
11127 | s%@XGETTEXT@%$XGETTEXT%g | |
11128 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
11129 | s%@CATALOGS@%$CATALOGS%g | |
11130 | s%@CATOBJEXT@%$CATOBJEXT%g | |
11131 | s%@DATADIRNAME@%$DATADIRNAME%g | |
11132 | s%@GMOFILES@%$GMOFILES%g | |
11133 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
11134 | s%@INTLDEPS@%$INTLDEPS%g | |
11135 | s%@INTLLIBS@%$INTLLIBS%g | |
11136 | s%@INTLOBJS@%$INTLOBJS%g | |
11137 | s%@POFILES@%$POFILES%g | |
11138 | s%@POSUB@%$POSUB%g | |
11139 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
11140 | s%@GT_NO@%$GT_NO%g | |
11141 | s%@GT_YES@%$GT_YES%g | |
11142 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
11143 | s%@l@%$l%g | |
8dcde887 | 11144 | s%@subdirs@%$subdirs%g |
7a292a7a | 11145 | s%@AWK@%$AWK%g |
c906108c SS |
11146 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
11147 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
11148 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
11149 | s%@LN_S@%$LN_S%g |
11150 | s%@YACC@%$YACC%g | |
c906108c | 11151 | s%@AR@%$AR%g |
95ca63c4 CF |
11152 | s%@DLLTOOL@%$DLLTOOL%g |
11153 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 11154 | s%@MIG@%$MIG%g |
c906108c | 11155 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
11156 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
11157 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 11158 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 11159 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
aff38e61 | 11160 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 11161 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
11162 | s%@LIBGUI@%$LIBGUI%g |
11163 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
11164 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
11165 | s%@TCL_VERSION@%$TCL_VERSION%g | |
11166 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
11167 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
11168 | s%@TCL_CC@%$TCL_CC%g | |
11169 | s%@TCL_DEFS@%$TCL_DEFS%g | |
11170 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
11171 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
11172 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
11173 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
11174 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
11175 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
11176 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 11177 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
11178 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
11179 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
11180 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
11181 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
11182 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
11183 | s%@TK_VERSION@%$TK_VERSION%g | |
11184 | s%@TK_DEFS@%$TK_DEFS%g | |
11185 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
11186 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
11187 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
11188 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
11189 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
11190 | s%@TCLHDIR@%$TCLHDIR%g | |
11191 | s%@TKHDIR@%$TKHDIR%g | |
11192 | s%@ITCLHDIR@%$ITCLHDIR%g | |
11193 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
11194 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
11195 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
11196 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
11197 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
11198 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
11199 | s%@ITK_VERSION@%$ITK_VERSION%g | |
11200 | s%@ITK_DEFS@%$ITK_DEFS%g | |
11201 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
11202 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
11203 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
11204 | s%@X_CFLAGS@%$X_CFLAGS%g |
11205 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
11206 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
11207 | s%@TCL_DEPS@%$TCL_DEPS%g |
11208 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
11209 | s%@ITCLLIB@%$ITCLLIB%g |
11210 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
11211 | s%@ITKLIB@%$ITKLIB%g | |
11212 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
11213 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
11214 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 11215 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
11216 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
11217 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 11218 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 11219 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c SS |
11220 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
11221 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
11222 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
b3a90332 AC |
11223 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
11224 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
11225 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
11226 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
11227 | s%@target_subdir@%$target_subdir%g |
11228 | /@host_makefile_frag@/r $host_makefile_frag | |
11229 | s%@host_makefile_frag@%%g | |
11230 | /@target_makefile_frag@/r $target_makefile_frag | |
11231 | s%@target_makefile_frag@%%g | |
11232 | s%@frags@%$frags%g | |
5a2402b8 AC |
11233 | s%@xm_h@%$xm_h%g |
11234 | s%@tm_h@%$tm_h%g | |
11235 | s%@nm_h@%$nm_h%g | |
c906108c | 11236 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 11237 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
11238 | |
11239 | CEOF | |
11240 | EOF | |
11241 | ||
11242 | cat >> $CONFIG_STATUS <<\EOF | |
11243 | ||
11244 | # Split the substitutions into bite-sized pieces for seds with | |
11245 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 11246 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
11247 | ac_file=1 # Number of current file. |
11248 | ac_beg=1 # First line for current file. | |
11249 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
11250 | ac_more_lines=: | |
11251 | ac_sed_cmds="" | |
11252 | while $ac_more_lines; do | |
11253 | if test $ac_beg -gt 1; then | |
11254 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
11255 | else | |
11256 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
11257 | fi | |
11258 | if test ! -s conftest.s$ac_file; then | |
11259 | ac_more_lines=false | |
11260 | rm -f conftest.s$ac_file | |
11261 | else | |
11262 | if test -z "$ac_sed_cmds"; then | |
11263 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
11264 | else | |
11265 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
11266 | fi | |
11267 | ac_file=`expr $ac_file + 1` | |
11268 | ac_beg=$ac_end | |
11269 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
11270 | fi | |
11271 | done | |
11272 | if test -z "$ac_sed_cmds"; then | |
11273 | ac_sed_cmds=cat | |
11274 | fi | |
11275 | EOF | |
11276 | ||
11277 | cat >> $CONFIG_STATUS <<EOF | |
11278 | ||
ed952ac5 | 11279 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
11280 | EOF |
11281 | cat >> $CONFIG_STATUS <<\EOF | |
11282 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
11283 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11284 | case "$ac_file" in | |
11285 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11286 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11287 | *) ac_file_in="${ac_file}.in" ;; | |
11288 | esac | |
11289 | ||
11290 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
11291 | ||
11292 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11293 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11294 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11295 | # The file is in a subdirectory. | |
11296 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11297 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
11298 | # A "../" for each directory in $ac_dir_suffix. | |
11299 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
11300 | else | |
11301 | ac_dir_suffix= ac_dots= | |
11302 | fi | |
11303 | ||
11304 | case "$ac_given_srcdir" in | |
11305 | .) srcdir=. | |
11306 | if test -z "$ac_dots"; then top_srcdir=. | |
11307 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
11308 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
11309 | *) # Relative path. | |
11310 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
11311 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
11312 | esac | |
11313 | ||
11314 | case "$ac_given_INSTALL" in | |
11315 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11316 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11317 | esac | |
11318 | ||
11319 | echo creating "$ac_file" | |
11320 | rm -f "$ac_file" | |
11321 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
11322 | case "$ac_file" in | |
11323 | *Makefile*) ac_comsub="1i\\ | |
11324 | # $configure_input" ;; | |
11325 | *) ac_comsub= ;; | |
11326 | esac | |
11327 | ||
11328 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11329 | sed -e "$ac_comsub | |
11330 | s%@configure_input@%$configure_input%g | |
11331 | s%@srcdir@%$srcdir%g | |
11332 | s%@top_srcdir@%$top_srcdir%g | |
11333 | s%@INSTALL@%$INSTALL%g | |
11334 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
11335 | fi; done | |
11336 | rm -f conftest.s* | |
11337 | ||
11338 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
11339 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
11340 | # | |
11341 | # ac_d sets the value in "#define NAME VALUE" lines. | |
11342 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
11343 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
11344 | ac_dC='\3' | |
11345 | ac_dD='%g' | |
11346 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
11347 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11348 | ac_uB='\([ ]\)%\1#\2define\3' | |
11349 | ac_uC=' ' | |
11350 | ac_uD='\4%g' | |
11351 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
11352 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11353 | ac_eB='$%\1#\2define\3' | |
11354 | ac_eC=' ' | |
11355 | ac_eD='%g' | |
11356 | ||
11357 | if test "${CONFIG_HEADERS+set}" != set; then | |
11358 | EOF | |
11359 | cat >> $CONFIG_STATUS <<EOF | |
11360 | CONFIG_HEADERS="config.h:config.in" | |
11361 | EOF | |
11362 | cat >> $CONFIG_STATUS <<\EOF | |
11363 | fi | |
11364 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
11365 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11366 | case "$ac_file" in | |
11367 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11368 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11369 | *) ac_file_in="${ac_file}.in" ;; | |
11370 | esac | |
11371 | ||
11372 | echo creating $ac_file | |
11373 | ||
11374 | rm -f conftest.frag conftest.in conftest.out | |
11375 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11376 | cat $ac_file_inputs > conftest.in | |
11377 | ||
11378 | EOF | |
11379 | ||
11380 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
11381 | # the proper values into config.h.in to produce config.h. And first: | |
11382 | # Protect against being on the right side of a sed subst in config.status. | |
11383 | # Protect against being in an unquoted here document in config.status. | |
11384 | rm -f conftest.vals | |
11385 | cat > conftest.hdr <<\EOF | |
11386 | s/[\\&%]/\\&/g | |
11387 | s%[\\$`]%\\&%g | |
11388 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
11389 | s%ac_d%ac_u%gp | |
11390 | s%ac_u%ac_e%gp | |
11391 | EOF | |
11392 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
11393 | rm -f conftest.hdr | |
11394 | ||
11395 | # This sed command replaces #undef with comments. This is necessary, for | |
11396 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
11397 | # on some systems where configure will not decide to define it. | |
11398 | cat >> conftest.vals <<\EOF | |
11399 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
11400 | EOF | |
11401 | ||
11402 | # Break up conftest.vals because some shells have a limit on | |
11403 | # the size of here documents, and old seds have small limits too. | |
11404 | ||
11405 | rm -f conftest.tail | |
11406 | while : | |
11407 | do | |
11408 | ac_lines=`grep -c . conftest.vals` | |
11409 | # grep -c gives empty output for an empty file on some AIX systems. | |
11410 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
11411 | # Write a limited-size here document to conftest.frag. | |
11412 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
11413 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
11414 | echo 'CEOF | |
11415 | sed -f conftest.frag conftest.in > conftest.out | |
11416 | rm -f conftest.in | |
11417 | mv conftest.out conftest.in | |
11418 | ' >> $CONFIG_STATUS | |
11419 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
11420 | rm -f conftest.vals | |
11421 | mv conftest.tail conftest.vals | |
11422 | done | |
11423 | rm -f conftest.vals | |
11424 | ||
11425 | cat >> $CONFIG_STATUS <<\EOF | |
11426 | rm -f conftest.frag conftest.h | |
11427 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11428 | cat conftest.in >> conftest.h | |
11429 | rm -f conftest.in | |
11430 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11431 | echo "$ac_file is unchanged" | |
11432 | rm -f conftest.h | |
11433 | else | |
11434 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11435 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11436 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11437 | # The file is in a subdirectory. | |
11438 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11439 | fi | |
11440 | rm -f $ac_file | |
11441 | mv conftest.h $ac_file | |
11442 | fi | |
11443 | fi; done | |
11444 | ||
11445 | EOF | |
11446 | ||
11447 | cat >> $CONFIG_STATUS <<EOF | |
11448 | ac_sources="$files" | |
11449 | ac_dests="$links" | |
11450 | EOF | |
11451 | ||
11452 | cat >> $CONFIG_STATUS <<\EOF | |
11453 | srcdir=$ac_given_srcdir | |
11454 | while test -n "$ac_sources"; do | |
11455 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11456 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11457 | ||
11458 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11459 | ||
11460 | if test ! -r $srcdir/$ac_source; then | |
11461 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11462 | fi | |
11463 | rm -f $ac_dest | |
11464 | ||
11465 | # Make relative symlinks. | |
11466 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11467 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11468 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11469 | # The dest file is in a subdirectory. | |
11470 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11471 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11472 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11473 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11474 | else | |
11475 | ac_dest_dir_suffix= ac_dots= | |
11476 | fi | |
11477 | ||
11478 | case "$srcdir" in | |
11479 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11480 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11481 | esac | |
11482 | ||
11483 | # Make a symlink if possible; otherwise try a hard link. | |
11484 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11485 | ln $srcdir/$ac_source $ac_dest; then : | |
11486 | else | |
11487 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11488 | fi | |
11489 | done | |
11490 | EOF | |
11491 | cat >> $CONFIG_STATUS <<EOF | |
11492 | ||
11493 | gdb_host_cpu=$gdb_host_cpu | |
11494 | gdb_target_cpu=$gdb_target_cpu | |
11495 | nativefile=$nativefile | |
11496 | ||
11497 | EOF | |
11498 | cat >> $CONFIG_STATUS <<\EOF | |
11499 | ||
7ee6d7eb | 11500 | if test "${nativefile}" = ""; then |
c4620205 | 11501 | < Makefile \ |
e27da16d JT |
11502 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
11503 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
11504 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
11505 | > Makefile.tem | |
c906108c SS |
11506 | mv -f Makefile.tem Makefile |
11507 | fi | |
11508 | ||
11509 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
11510 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
11511 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11512 | mv -f Makefile.tmp Makefile | |
11513 | ||
2acceee2 | 11514 | |
c906108c SS |
11515 | case x$CONFIG_HEADERS in |
11516 | xconfig.h:config.in) | |
11517 | echo > stamp-h ;; | |
11518 | esac | |
11519 | ||
11520 | exit 0 | |
11521 | EOF | |
11522 | chmod +x $CONFIG_STATUS | |
11523 | rm -fr confdefs* $ac_clean_files | |
11524 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11525 | ||
11526 | if test "$no_recursion" != yes; then | |
11527 | ||
11528 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11529 | ac_sub_configure_args= | |
11530 | ac_prev= | |
11531 | for ac_arg in $ac_configure_args; do | |
11532 | if test -n "$ac_prev"; then | |
11533 | ac_prev= | |
11534 | continue | |
11535 | fi | |
11536 | case "$ac_arg" in | |
11537 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11538 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11539 | ac_prev=cache_file ;; | |
11540 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11541 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11542 | ;; | |
11543 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11544 | ac_prev=srcdir ;; | |
11545 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11546 | ;; | |
11547 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11548 | esac | |
11549 | done | |
11550 | ||
8dcde887 | 11551 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11552 | |
11553 | # Do not complain, so a configure script can configure whichever | |
11554 | # parts of a large source tree are present. | |
11555 | if test ! -d $srcdir/$ac_config_dir; then | |
11556 | continue | |
11557 | fi | |
11558 | ||
11559 | echo configuring in $ac_config_dir | |
11560 | ||
11561 | case "$srcdir" in | |
11562 | .) ;; | |
11563 | *) | |
11564 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11565 | else | |
11566 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11567 | fi | |
11568 | ;; | |
11569 | esac | |
11570 | ||
11571 | ac_popdir=`pwd` | |
11572 | cd $ac_config_dir | |
11573 | ||
11574 | # A "../" for each directory in /$ac_config_dir. | |
11575 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11576 | ||
11577 | case "$srcdir" in | |
11578 | .) # No --srcdir option. We are building in place. | |
11579 | ac_sub_srcdir=$srcdir ;; | |
11580 | /*) # Absolute path. | |
11581 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11582 | *) # Relative path. | |
11583 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11584 | esac | |
11585 | ||
11586 | # Check for guested configure; otherwise get Cygnus style configure. | |
11587 | if test -f $ac_sub_srcdir/configure; then | |
11588 | ac_sub_configure=$ac_sub_srcdir/configure | |
11589 | elif test -f $ac_sub_srcdir/configure.in; then | |
11590 | ac_sub_configure=$ac_configure | |
11591 | else | |
11592 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11593 | ac_sub_configure= | |
11594 | fi | |
11595 | ||
11596 | # The recursion is here. | |
11597 | if test -n "$ac_sub_configure"; then | |
11598 | ||
11599 | # Make the cache file name correct relative to the subdirectory. | |
11600 | case "$cache_file" in | |
11601 | /*) ac_sub_cache_file=$cache_file ;; | |
11602 | *) # Relative path. | |
11603 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11604 | esac | |
11605 | case "$ac_given_INSTALL" in | |
11606 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11607 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11608 | esac | |
11609 | ||
11610 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11611 | # The eval makes quoting arguments work. | |
11612 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11613 | then : | |
11614 | else | |
11615 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11616 | fi | |
11617 | fi | |
11618 | ||
11619 | cd $ac_popdir | |
11620 | done | |
11621 | fi | |
11622 | ||
11623 | ||
11624 | exit 0 |