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" | |
c906108c SS |
45 | ac_help="$ac_help |
46 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
47 | ac_help="$ac_help |
48 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
51 | ac_help="$ac_help | |
52 | --with-tclinclude=DIR Directory where tcl private headers are" | |
53 | ac_help="$ac_help | |
54 | --with-tkinclude=DIR Directory where tk private headers are" | |
55 | ac_help="$ac_help | |
56 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
57 | ac_help="$ac_help | |
58 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
59 | ac_help="$ac_help |
60 | --with-x use the X Window System" | |
7a292a7a SS |
61 | ac_help="$ac_help |
62 | --enable-sim Link gdb with simulator" | |
8dcde887 MK |
63 | ac_help="$ac_help |
64 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
65 | ac_help="$ac_help |
66 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
67 | |
68 | # Initialize some variables set by options. | |
69 | # The variables have the same names as the options, with | |
70 | # dashes changed to underlines. | |
71 | build=NONE | |
72 | cache_file=./config.cache | |
73 | exec_prefix=NONE | |
74 | host=NONE | |
75 | no_create= | |
76 | nonopt=NONE | |
77 | no_recursion= | |
78 | prefix=NONE | |
79 | program_prefix=NONE | |
80 | program_suffix=NONE | |
81 | program_transform_name=s,x,x, | |
82 | silent= | |
83 | site= | |
d3e0a5bf | 84 | sitefile= |
c906108c SS |
85 | srcdir= |
86 | target=NONE | |
87 | verbose= | |
88 | x_includes=NONE | |
89 | x_libraries=NONE | |
90 | bindir='${exec_prefix}/bin' | |
91 | sbindir='${exec_prefix}/sbin' | |
92 | libexecdir='${exec_prefix}/libexec' | |
93 | datadir='${prefix}/share' | |
94 | sysconfdir='${prefix}/etc' | |
95 | sharedstatedir='${prefix}/com' | |
96 | localstatedir='${prefix}/var' | |
97 | libdir='${exec_prefix}/lib' | |
98 | includedir='${prefix}/include' | |
99 | oldincludedir='/usr/include' | |
100 | infodir='${prefix}/info' | |
101 | mandir='${prefix}/man' | |
102 | ||
103 | # Initialize some other variables. | |
104 | subdirs= | |
105 | MFLAGS= MAKEFLAGS= | |
106 | SHELL=${CONFIG_SHELL-/bin/sh} | |
107 | # Maximum number of lines to put in a shell here document. | |
108 | ac_max_here_lines=12 | |
109 | ||
110 | ac_prev= | |
111 | for ac_option | |
112 | do | |
113 | ||
114 | # If the previous option needs an argument, assign it. | |
115 | if test -n "$ac_prev"; then | |
116 | eval "$ac_prev=\$ac_option" | |
117 | ac_prev= | |
118 | continue | |
119 | fi | |
120 | ||
121 | case "$ac_option" in | |
122 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
123 | *) ac_optarg= ;; | |
124 | esac | |
125 | ||
126 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
127 | ||
128 | case "$ac_option" in | |
129 | ||
130 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
131 | ac_prev=bindir ;; | |
132 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
133 | bindir="$ac_optarg" ;; | |
134 | ||
135 | -build | --build | --buil | --bui | --bu) | |
136 | ac_prev=build ;; | |
137 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
138 | build="$ac_optarg" ;; | |
139 | ||
140 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
141 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
142 | ac_prev=cache_file ;; | |
143 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
144 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
145 | cache_file="$ac_optarg" ;; | |
146 | ||
147 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
148 | ac_prev=datadir ;; | |
149 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
150 | | --da=*) | |
151 | datadir="$ac_optarg" ;; | |
152 | ||
153 | -disable-* | --disable-*) | |
154 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
155 | # Reject names that are not valid shell variable names. | |
156 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
157 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
158 | fi | |
159 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
160 | eval "enable_${ac_feature}=no" ;; | |
161 | ||
162 | -enable-* | --enable-*) | |
163 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
164 | # Reject names that are not valid shell variable names. | |
165 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
166 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
167 | fi | |
168 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
169 | case "$ac_option" in | |
170 | *=*) ;; | |
171 | *) ac_optarg=yes ;; | |
172 | esac | |
173 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
174 | ||
175 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
176 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
177 | | --exec | --exe | --ex) | |
178 | ac_prev=exec_prefix ;; | |
179 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
180 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
181 | | --exec=* | --exe=* | --ex=*) | |
182 | exec_prefix="$ac_optarg" ;; | |
183 | ||
184 | -gas | --gas | --ga | --g) | |
185 | # Obsolete; use --with-gas. | |
186 | with_gas=yes ;; | |
187 | ||
188 | -help | --help | --hel | --he) | |
189 | # Omit some internal or obsolete options to make the list less imposing. | |
190 | # This message is too long to be a string in the A/UX 3.1 sh. | |
191 | cat << EOF | |
192 | Usage: configure [options] [host] | |
193 | Options: [defaults in brackets after descriptions] | |
194 | Configuration: | |
195 | --cache-file=FILE cache test results in FILE | |
196 | --help print this message | |
197 | --no-create do not create output files | |
198 | --quiet, --silent do not print \`checking...' messages | |
d3e0a5bf | 199 | --site-file=FILE use FILE as the site file |
c906108c SS |
200 | --version print the version of autoconf that created configure |
201 | Directory and file names: | |
202 | --prefix=PREFIX install architecture-independent files in PREFIX | |
203 | [$ac_default_prefix] | |
204 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
205 | [same as prefix] | |
206 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
207 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
208 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
209 | --datadir=DIR read-only architecture-independent data in DIR | |
210 | [PREFIX/share] | |
211 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
212 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
213 | [PREFIX/com] | |
214 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
215 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
216 | --includedir=DIR C header files in DIR [PREFIX/include] | |
217 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
218 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
219 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
220 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
221 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
222 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
223 | --program-transform-name=PROGRAM | |
224 | run sed PROGRAM on installed program names | |
225 | EOF | |
226 | cat << EOF | |
227 | Host type: | |
228 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
229 | --host=HOST configure for HOST [guessed] | |
230 | --target=TARGET configure for TARGET [TARGET=HOST] | |
231 | Features and packages: | |
232 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
233 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
234 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
235 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
236 | --x-includes=DIR X include files are in DIR | |
237 | --x-libraries=DIR X library files are in DIR | |
238 | EOF | |
239 | if test -n "$ac_help"; then | |
240 | echo "--enable and --with options recognized:$ac_help" | |
241 | fi | |
242 | exit 0 ;; | |
243 | ||
244 | -host | --host | --hos | --ho) | |
245 | ac_prev=host ;; | |
246 | -host=* | --host=* | --hos=* | --ho=*) | |
247 | host="$ac_optarg" ;; | |
248 | ||
249 | -includedir | --includedir | --includedi | --included | --include \ | |
250 | | --includ | --inclu | --incl | --inc) | |
251 | ac_prev=includedir ;; | |
252 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
253 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
254 | includedir="$ac_optarg" ;; | |
255 | ||
256 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
257 | ac_prev=infodir ;; | |
258 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
259 | infodir="$ac_optarg" ;; | |
260 | ||
261 | -libdir | --libdir | --libdi | --libd) | |
262 | ac_prev=libdir ;; | |
263 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
264 | libdir="$ac_optarg" ;; | |
265 | ||
266 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
267 | | --libexe | --libex | --libe) | |
268 | ac_prev=libexecdir ;; | |
269 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
270 | | --libexe=* | --libex=* | --libe=*) | |
271 | libexecdir="$ac_optarg" ;; | |
272 | ||
273 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
274 | | --localstate | --localstat | --localsta | --localst \ | |
275 | | --locals | --local | --loca | --loc | --lo) | |
276 | ac_prev=localstatedir ;; | |
277 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
278 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
279 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
280 | localstatedir="$ac_optarg" ;; | |
281 | ||
282 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
283 | ac_prev=mandir ;; | |
284 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
285 | mandir="$ac_optarg" ;; | |
286 | ||
287 | -nfp | --nfp | --nf) | |
288 | # Obsolete; use --without-fp. | |
289 | with_fp=no ;; | |
290 | ||
291 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
292 | | --no-cr | --no-c) | |
293 | no_create=yes ;; | |
294 | ||
295 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
296 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
297 | no_recursion=yes ;; | |
298 | ||
299 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
300 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
301 | | --oldin | --oldi | --old | --ol | --o) | |
302 | ac_prev=oldincludedir ;; | |
303 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
304 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
305 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
306 | oldincludedir="$ac_optarg" ;; | |
307 | ||
308 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
309 | ac_prev=prefix ;; | |
310 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
311 | prefix="$ac_optarg" ;; | |
312 | ||
313 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
314 | | --program-pre | --program-pr | --program-p) | |
315 | ac_prev=program_prefix ;; | |
316 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
317 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
318 | program_prefix="$ac_optarg" ;; | |
319 | ||
320 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
321 | | --program-suf | --program-su | --program-s) | |
322 | ac_prev=program_suffix ;; | |
323 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
324 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
325 | program_suffix="$ac_optarg" ;; | |
326 | ||
327 | -program-transform-name | --program-transform-name \ | |
328 | | --program-transform-nam | --program-transform-na \ | |
329 | | --program-transform-n | --program-transform- \ | |
330 | | --program-transform | --program-transfor \ | |
331 | | --program-transfo | --program-transf \ | |
332 | | --program-trans | --program-tran \ | |
333 | | --progr-tra | --program-tr | --program-t) | |
334 | ac_prev=program_transform_name ;; | |
335 | -program-transform-name=* | --program-transform-name=* \ | |
336 | | --program-transform-nam=* | --program-transform-na=* \ | |
337 | | --program-transform-n=* | --program-transform-=* \ | |
338 | | --program-transform=* | --program-transfor=* \ | |
339 | | --program-transfo=* | --program-transf=* \ | |
340 | | --program-trans=* | --program-tran=* \ | |
341 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
342 | program_transform_name="$ac_optarg" ;; | |
343 | ||
344 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
345 | | -silent | --silent | --silen | --sile | --sil) | |
346 | silent=yes ;; | |
347 | ||
348 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
349 | ac_prev=sbindir ;; | |
350 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
351 | | --sbi=* | --sb=*) | |
352 | sbindir="$ac_optarg" ;; | |
353 | ||
354 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
355 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
356 | | --sharedst | --shareds | --shared | --share | --shar \ | |
357 | | --sha | --sh) | |
358 | ac_prev=sharedstatedir ;; | |
359 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
360 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
361 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
362 | | --sha=* | --sh=*) | |
363 | sharedstatedir="$ac_optarg" ;; | |
364 | ||
365 | -site | --site | --sit) | |
366 | ac_prev=site ;; | |
367 | -site=* | --site=* | --sit=*) | |
368 | site="$ac_optarg" ;; | |
369 | ||
d3e0a5bf MC |
370 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
371 | ac_prev=sitefile ;; | |
372 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
373 | sitefile="$ac_optarg" ;; | |
374 | ||
c906108c SS |
375 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
376 | ac_prev=srcdir ;; | |
377 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
378 | srcdir="$ac_optarg" ;; | |
379 | ||
380 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
381 | | --syscon | --sysco | --sysc | --sys | --sy) | |
382 | ac_prev=sysconfdir ;; | |
383 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
384 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
385 | sysconfdir="$ac_optarg" ;; | |
386 | ||
387 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
388 | ac_prev=target ;; | |
389 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
390 | target="$ac_optarg" ;; | |
391 | ||
392 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
393 | verbose=yes ;; | |
394 | ||
395 | -version | --version | --versio | --versi | --vers) | |
396 | echo "configure generated by autoconf version 2.13" | |
397 | exit 0 ;; | |
398 | ||
399 | -with-* | --with-*) | |
400 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
401 | # Reject names that are not valid shell variable names. | |
402 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
404 | fi | |
405 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
406 | case "$ac_option" in | |
407 | *=*) ;; | |
408 | *) ac_optarg=yes ;; | |
409 | esac | |
410 | eval "with_${ac_package}='$ac_optarg'" ;; | |
411 | ||
412 | -without-* | --without-*) | |
413 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
414 | # Reject names that are not valid shell variable names. | |
415 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
416 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
417 | fi | |
418 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
419 | eval "with_${ac_package}=no" ;; | |
420 | ||
421 | --x) | |
422 | # Obsolete; use --with-x. | |
423 | with_x=yes ;; | |
424 | ||
425 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
426 | | --x-incl | --x-inc | --x-in | --x-i) | |
427 | ac_prev=x_includes ;; | |
428 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
429 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
430 | x_includes="$ac_optarg" ;; | |
431 | ||
432 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
433 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
434 | ac_prev=x_libraries ;; | |
435 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
436 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
437 | x_libraries="$ac_optarg" ;; | |
438 | ||
439 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
440 | ;; | |
441 | ||
442 | *) | |
443 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
444 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
445 | fi | |
446 | if test "x$nonopt" != xNONE; then | |
447 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
448 | fi | |
449 | nonopt="$ac_option" | |
450 | ;; | |
451 | ||
452 | esac | |
453 | done | |
454 | ||
455 | if test -n "$ac_prev"; then | |
456 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
457 | fi | |
458 | ||
459 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
460 | ||
461 | # File descriptor usage: | |
462 | # 0 standard input | |
463 | # 1 file creation | |
464 | # 2 errors and warnings | |
465 | # 3 some systems may open it to /dev/tty | |
466 | # 4 used on the Kubota Titan | |
467 | # 6 checking for... messages and results | |
468 | # 5 compiler messages saved in config.log | |
469 | if test "$silent" = yes; then | |
470 | exec 6>/dev/null | |
471 | else | |
472 | exec 6>&1 | |
473 | fi | |
474 | exec 5>./config.log | |
475 | ||
476 | echo "\ | |
477 | This file contains any messages produced by compilers while | |
478 | running configure, to aid debugging if configure makes a mistake. | |
479 | " 1>&5 | |
480 | ||
481 | # Strip out --no-create and --no-recursion so they do not pile up. | |
482 | # Also quote any args containing shell metacharacters. | |
483 | ac_configure_args= | |
484 | for ac_arg | |
485 | do | |
486 | case "$ac_arg" in | |
487 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
488 | | --no-cr | --no-c) ;; | |
489 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
490 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
491 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
492 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
493 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
494 | esac | |
495 | done | |
496 | ||
497 | # NLS nuisances. | |
498 | # Only set these to C if already set. These must not be set unconditionally | |
499 | # because not all systems understand e.g. LANG=C (notably SCO). | |
500 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
501 | # Non-C LC_CTYPE values break the ctype check. | |
502 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
503 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
504 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
505 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
506 | ||
507 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
508 | rm -rf conftest* confdefs.h | |
509 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
510 | echo > confdefs.h | |
511 | ||
512 | # A filename unique to this package, relative to the directory that | |
513 | # configure is in, which we can look for to find out if srcdir is correct. | |
514 | ac_unique_file=main.c | |
515 | ||
516 | # Find the source files, if location was not specified. | |
517 | if test -z "$srcdir"; then | |
518 | ac_srcdir_defaulted=yes | |
519 | # Try the directory containing this script, then its parent. | |
520 | ac_prog=$0 | |
521 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
522 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
523 | srcdir=$ac_confdir | |
524 | if test ! -r $srcdir/$ac_unique_file; then | |
525 | srcdir=.. | |
526 | fi | |
527 | else | |
528 | ac_srcdir_defaulted=no | |
529 | fi | |
530 | if test ! -r $srcdir/$ac_unique_file; then | |
531 | if test "$ac_srcdir_defaulted" = yes; then | |
532 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
533 | else | |
534 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
535 | fi | |
536 | fi | |
537 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
538 | ||
539 | # Prefer explicitly selected file to automatically selected ones. | |
d3e0a5bf MC |
540 | if test -z "$sitefile"; then |
541 | if test -z "$CONFIG_SITE"; then | |
542 | if test "x$prefix" != xNONE; then | |
543 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
544 | else | |
545 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
546 | fi | |
c906108c | 547 | fi |
d3e0a5bf MC |
548 | else |
549 | CONFIG_SITE="$sitefile" | |
c906108c SS |
550 | fi |
551 | for ac_site_file in $CONFIG_SITE; do | |
552 | if test -r "$ac_site_file"; then | |
553 | echo "loading site script $ac_site_file" | |
554 | . "$ac_site_file" | |
555 | fi | |
556 | done | |
557 | ||
558 | if test -r "$cache_file"; then | |
559 | echo "loading cache $cache_file" | |
560 | . $cache_file | |
561 | else | |
562 | echo "creating cache $cache_file" | |
563 | > $cache_file | |
564 | fi | |
565 | ||
566 | ac_ext=c | |
567 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
568 | ac_cpp='$CPP $CPPFLAGS' | |
569 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
570 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
571 | cross_compiling=$ac_cv_prog_cc_cross | |
572 | ||
573 | ac_exeext= | |
574 | ac_objext=o | |
575 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
576 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
577 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
578 | ac_n= ac_c=' | |
579 | ' ac_t=' ' | |
580 | else | |
581 | ac_n=-n ac_c= ac_t= | |
582 | fi | |
583 | else | |
584 | ac_n= ac_c='\c' ac_t= | |
585 | fi | |
586 | ||
587 | ||
588 | ||
413ccac7 | 589 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
0e5d83e3 | 590 | echo "configure:591: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
591 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
592 | if test "${enable_maintainer_mode+set}" = set; then | |
593 | enableval="$enable_maintainer_mode" | |
594 | USE_MAINTAINER_MODE=$enableval | |
595 | else | |
596 | USE_MAINTAINER_MODE=no | |
597 | fi | |
598 | ||
599 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
600 | ||
601 | ||
602 | if test $USE_MAINTAINER_MODE = yes; then | |
603 | MAINTAINER_MODE_TRUE= | |
604 | MAINTAINER_MODE_FALSE='#' | |
605 | else | |
606 | MAINTAINER_MODE_TRUE='#' | |
607 | MAINTAINER_MODE_FALSE= | |
608 | fi | |
609 | MAINT=$MAINTAINER_MODE_TRUE | |
610 | ||
611 | ||
c906108c SS |
612 | |
613 | # Extract the first word of "gcc", so it can be a program name with args. | |
614 | set dummy gcc; ac_word=$2 | |
615 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 616 | echo "configure:617: checking for $ac_word" >&5 |
c906108c SS |
617 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
618 | echo $ac_n "(cached) $ac_c" 1>&6 | |
619 | else | |
620 | if test -n "$CC"; then | |
621 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
622 | else | |
623 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
624 | ac_dummy="$PATH" | |
625 | for ac_dir in $ac_dummy; do | |
626 | test -z "$ac_dir" && ac_dir=. | |
627 | if test -f $ac_dir/$ac_word; then | |
628 | ac_cv_prog_CC="gcc" | |
629 | break | |
630 | fi | |
631 | done | |
632 | IFS="$ac_save_ifs" | |
633 | fi | |
634 | fi | |
635 | CC="$ac_cv_prog_CC" | |
636 | if test -n "$CC"; then | |
637 | echo "$ac_t""$CC" 1>&6 | |
638 | else | |
639 | echo "$ac_t""no" 1>&6 | |
640 | fi | |
641 | ||
642 | if test -z "$CC"; then | |
643 | # Extract the first word of "cc", so it can be a program name with args. | |
644 | set dummy cc; ac_word=$2 | |
645 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 646 | echo "configure:647: checking for $ac_word" >&5 |
c906108c SS |
647 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
648 | echo $ac_n "(cached) $ac_c" 1>&6 | |
649 | else | |
650 | if test -n "$CC"; then | |
651 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
652 | else | |
653 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
654 | ac_prog_rejected=no | |
655 | ac_dummy="$PATH" | |
656 | for ac_dir in $ac_dummy; do | |
657 | test -z "$ac_dir" && ac_dir=. | |
658 | if test -f $ac_dir/$ac_word; then | |
659 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
660 | ac_prog_rejected=yes | |
661 | continue | |
662 | fi | |
663 | ac_cv_prog_CC="cc" | |
664 | break | |
665 | fi | |
666 | done | |
667 | IFS="$ac_save_ifs" | |
668 | if test $ac_prog_rejected = yes; then | |
669 | # We found a bogon in the path, so make sure we never use it. | |
670 | set dummy $ac_cv_prog_CC | |
671 | shift | |
672 | if test $# -gt 0; then | |
673 | # We chose a different compiler from the bogus one. | |
674 | # However, it has the same basename, so the bogon will be chosen | |
675 | # first if we set CC to just the basename; use the full file name. | |
676 | shift | |
677 | set dummy "$ac_dir/$ac_word" "$@" | |
678 | shift | |
679 | ac_cv_prog_CC="$@" | |
680 | fi | |
681 | fi | |
682 | fi | |
683 | fi | |
684 | CC="$ac_cv_prog_CC" | |
685 | if test -n "$CC"; then | |
686 | echo "$ac_t""$CC" 1>&6 | |
687 | else | |
688 | echo "$ac_t""no" 1>&6 | |
689 | fi | |
690 | ||
691 | if test -z "$CC"; then | |
692 | case "`uname -s`" in | |
693 | *win32* | *WIN32*) | |
694 | # Extract the first word of "cl", so it can be a program name with args. | |
695 | set dummy cl; ac_word=$2 | |
696 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 697 | echo "configure:698: checking for $ac_word" >&5 |
c906108c SS |
698 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
700 | else | |
701 | if test -n "$CC"; then | |
702 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
703 | else | |
704 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
705 | ac_dummy="$PATH" | |
706 | for ac_dir in $ac_dummy; do | |
707 | test -z "$ac_dir" && ac_dir=. | |
708 | if test -f $ac_dir/$ac_word; then | |
709 | ac_cv_prog_CC="cl" | |
710 | break | |
711 | fi | |
712 | done | |
713 | IFS="$ac_save_ifs" | |
714 | fi | |
715 | fi | |
716 | CC="$ac_cv_prog_CC" | |
717 | if test -n "$CC"; then | |
718 | echo "$ac_t""$CC" 1>&6 | |
719 | else | |
720 | echo "$ac_t""no" 1>&6 | |
721 | fi | |
722 | ;; | |
723 | esac | |
724 | fi | |
725 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
726 | fi | |
727 | ||
728 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
0e5d83e3 | 729 | echo "configure:730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
730 | |
731 | ac_ext=c | |
732 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
733 | ac_cpp='$CPP $CPPFLAGS' | |
734 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
735 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
736 | cross_compiling=$ac_cv_prog_cc_cross | |
737 | ||
738 | cat > conftest.$ac_ext << EOF | |
739 | ||
0e5d83e3 | 740 | #line 741 "configure" |
c906108c SS |
741 | #include "confdefs.h" |
742 | ||
743 | main(){return(0);} | |
744 | EOF | |
0e5d83e3 | 745 | if { (eval echo configure:746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
746 | ac_cv_prog_cc_works=yes |
747 | # If we can't run a trivial program, we are probably using a cross compiler. | |
748 | if (./conftest; exit) 2>/dev/null; then | |
749 | ac_cv_prog_cc_cross=no | |
750 | else | |
751 | ac_cv_prog_cc_cross=yes | |
752 | fi | |
753 | else | |
754 | echo "configure: failed program was:" >&5 | |
755 | cat conftest.$ac_ext >&5 | |
756 | ac_cv_prog_cc_works=no | |
757 | fi | |
758 | rm -fr conftest* | |
759 | ac_ext=c | |
760 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
761 | ac_cpp='$CPP $CPPFLAGS' | |
762 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
763 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
764 | cross_compiling=$ac_cv_prog_cc_cross | |
765 | ||
766 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
767 | if test $ac_cv_prog_cc_works = no; then | |
768 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
769 | fi | |
770 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
0e5d83e3 | 771 | echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
772 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
773 | cross_compiling=$ac_cv_prog_cc_cross | |
774 | ||
775 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
0e5d83e3 | 776 | echo "configure:777: checking whether we are using GNU C" >&5 |
c906108c SS |
777 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
778 | echo $ac_n "(cached) $ac_c" 1>&6 | |
779 | else | |
780 | cat > conftest.c <<EOF | |
781 | #ifdef __GNUC__ | |
782 | yes; | |
783 | #endif | |
784 | EOF | |
0e5d83e3 | 785 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
786 | ac_cv_prog_gcc=yes |
787 | else | |
788 | ac_cv_prog_gcc=no | |
789 | fi | |
790 | fi | |
791 | ||
792 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
793 | ||
794 | if test $ac_cv_prog_gcc = yes; then | |
795 | GCC=yes | |
796 | else | |
797 | GCC= | |
798 | fi | |
799 | ||
800 | ac_test_CFLAGS="${CFLAGS+set}" | |
801 | ac_save_CFLAGS="$CFLAGS" | |
802 | CFLAGS= | |
803 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
0e5d83e3 | 804 | echo "configure:805: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
805 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
807 | else | |
808 | echo 'void f(){}' > conftest.c | |
809 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
810 | ac_cv_prog_cc_g=yes | |
811 | else | |
812 | ac_cv_prog_cc_g=no | |
813 | fi | |
814 | rm -f conftest* | |
815 | ||
816 | fi | |
817 | ||
818 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
819 | if test "$ac_test_CFLAGS" = set; then | |
820 | CFLAGS="$ac_save_CFLAGS" | |
821 | elif test $ac_cv_prog_cc_g = yes; then | |
822 | if test "$GCC" = yes; then | |
823 | CFLAGS="-g -O2" | |
824 | else | |
825 | CFLAGS="-g" | |
826 | fi | |
827 | else | |
828 | if test "$GCC" = yes; then | |
829 | CFLAGS="-O2" | |
830 | else | |
831 | CFLAGS= | |
832 | fi | |
833 | fi | |
834 | ||
14abd0fb MK |
835 | cat >> confdefs.h <<\EOF |
836 | #define _GNU_SOURCE 1 | |
837 | EOF | |
838 | ||
839 | ||
c906108c | 840 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
0e5d83e3 | 841 | echo "configure:842: checking how to run the C preprocessor" >&5 |
c906108c SS |
842 | # On Suns, sometimes $CPP names a directory. |
843 | if test -n "$CPP" && test -d "$CPP"; then | |
844 | CPP= | |
845 | fi | |
846 | if test -z "$CPP"; then | |
847 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
848 | echo $ac_n "(cached) $ac_c" 1>&6 | |
849 | else | |
850 | # This must be in double quotes, not single quotes, because CPP may get | |
851 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
852 | CPP="${CC-cc} -E" | |
853 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
854 | # not just through cpp. | |
855 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 856 | #line 857 "configure" |
c906108c SS |
857 | #include "confdefs.h" |
858 | #include <assert.h> | |
859 | Syntax Error | |
860 | EOF | |
861 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 862 | { (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
863 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
864 | if test -z "$ac_err"; then | |
865 | : | |
866 | else | |
867 | echo "$ac_err" >&5 | |
868 | echo "configure: failed program was:" >&5 | |
869 | cat conftest.$ac_ext >&5 | |
870 | rm -rf conftest* | |
871 | CPP="${CC-cc} -E -traditional-cpp" | |
872 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 873 | #line 874 "configure" |
c906108c SS |
874 | #include "confdefs.h" |
875 | #include <assert.h> | |
876 | Syntax Error | |
877 | EOF | |
878 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 879 | { (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
880 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
881 | if test -z "$ac_err"; then | |
882 | : | |
883 | else | |
884 | echo "$ac_err" >&5 | |
885 | echo "configure: failed program was:" >&5 | |
886 | cat conftest.$ac_ext >&5 | |
887 | rm -rf conftest* | |
888 | CPP="${CC-cc} -nologo -E" | |
889 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 890 | #line 891 "configure" |
c906108c SS |
891 | #include "confdefs.h" |
892 | #include <assert.h> | |
893 | Syntax Error | |
894 | EOF | |
895 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 896 | { (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
897 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
898 | if test -z "$ac_err"; then | |
899 | : | |
900 | else | |
901 | echo "$ac_err" >&5 | |
902 | echo "configure: failed program was:" >&5 | |
903 | cat conftest.$ac_ext >&5 | |
904 | rm -rf conftest* | |
905 | CPP=/lib/cpp | |
906 | fi | |
907 | rm -f conftest* | |
908 | fi | |
909 | rm -f conftest* | |
910 | fi | |
911 | rm -f conftest* | |
912 | ac_cv_prog_CPP="$CPP" | |
913 | fi | |
914 | CPP="$ac_cv_prog_CPP" | |
915 | else | |
916 | ac_cv_prog_CPP="$CPP" | |
917 | fi | |
918 | echo "$ac_t""$CPP" 1>&6 | |
919 | ||
920 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
0e5d83e3 | 921 | echo "configure:922: checking for AIX" >&5 |
c906108c | 922 | cat > conftest.$ac_ext <<EOF |
0e5d83e3 | 923 | #line 924 "configure" |
c906108c SS |
924 | #include "confdefs.h" |
925 | #ifdef _AIX | |
926 | yes | |
927 | #endif | |
928 | ||
929 | EOF | |
930 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
931 | egrep "yes" >/dev/null 2>&1; then | |
932 | rm -rf conftest* | |
933 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
934 | #define _ALL_SOURCE 1 | |
935 | EOF | |
936 | ||
937 | else | |
938 | rm -rf conftest* | |
939 | echo "$ac_t""no" 1>&6 | |
940 | fi | |
941 | rm -f conftest* | |
942 | ||
943 | ||
56157b4a | 944 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
0e5d83e3 | 945 | echo "configure:946: checking for POSIXized ISC" >&5 |
56157b4a AC |
946 | if test -d /etc/conf/kconfig.d && |
947 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
948 | then | |
949 | echo "$ac_t""yes" 1>&6 | |
950 | ISC=yes # If later tests want to check for ISC. | |
951 | cat >> confdefs.h <<\EOF | |
952 | #define _POSIX_SOURCE 1 | |
c906108c SS |
953 | EOF |
954 | ||
56157b4a AC |
955 | if test "$GCC" = yes; then |
956 | CC="$CC -posix" | |
957 | else | |
958 | CC="$CC -Xp" | |
959 | fi | |
c906108c SS |
960 | else |
961 | echo "$ac_t""no" 1>&6 | |
56157b4a | 962 | ISC= |
c906108c SS |
963 | fi |
964 | ||
965 | ||
966 | ||
967 | ||
968 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
0e5d83e3 | 969 | echo "configure:970: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
970 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
971 | echo $ac_n "(cached) $ac_c" 1>&6 | |
972 | else | |
973 | am_cv_prog_cc_stdc=no | |
974 | ac_save_CC="$CC" | |
975 | # Don't try gcc -ansi; that turns off useful extensions and | |
976 | # breaks some systems' header files. | |
977 | # AIX -qlanglvl=ansi | |
978 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
979 | # HP-UX 10.20 and later -Ae |
980 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 981 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 982 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
983 | do |
984 | CC="$ac_save_CC $ac_arg" | |
985 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 986 | #line 987 "configure" |
c906108c SS |
987 | #include "confdefs.h" |
988 | #include <stdarg.h> | |
989 | #include <stdio.h> | |
990 | #include <sys/types.h> | |
991 | #include <sys/stat.h> | |
992 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
993 | struct buf { int x; }; | |
994 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
995 | static char *e (p, i) | |
996 | char **p; | |
997 | int i; | |
998 | { | |
999 | return p[i]; | |
1000 | } | |
1001 | static char *f (char * (*g) (char **, int), char **p, ...) | |
1002 | { | |
1003 | char *s; | |
1004 | va_list v; | |
1005 | va_start (v,p); | |
1006 | s = g (p, va_arg (v,int)); | |
1007 | va_end (v); | |
1008 | return s; | |
1009 | } | |
1010 | int test (int i, double x); | |
1011 | struct s1 {int (*f) (int a);}; | |
1012 | struct s2 {int (*f) (double a);}; | |
1013 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1014 | int argc; | |
1015 | char **argv; | |
1016 | ||
1017 | int main() { | |
1018 | ||
1019 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1020 | ||
1021 | ; return 0; } | |
1022 | EOF | |
0e5d83e3 | 1023 | if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1024 | rm -rf conftest* |
1025 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1026 | else | |
1027 | echo "configure: failed program was:" >&5 | |
1028 | cat conftest.$ac_ext >&5 | |
1029 | fi | |
1030 | rm -f conftest* | |
1031 | done | |
1032 | CC="$ac_save_CC" | |
1033 | ||
1034 | fi | |
1035 | ||
1036 | if test -z "$am_cv_prog_cc_stdc"; then | |
1037 | echo "$ac_t""none needed" 1>&6 | |
1038 | else | |
1039 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1040 | fi | |
1041 | case "x$am_cv_prog_cc_stdc" in | |
1042 | x|xno) ;; | |
1043 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1044 | esac | |
1045 | ||
1046 | ||
1047 | ac_aux_dir= | |
1048 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1049 | if test -f $ac_dir/install-sh; then | |
1050 | ac_aux_dir=$ac_dir | |
1051 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1052 | break | |
1053 | elif test -f $ac_dir/install.sh; then | |
1054 | ac_aux_dir=$ac_dir | |
1055 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1056 | break | |
1057 | fi | |
1058 | done | |
1059 | if test -z "$ac_aux_dir"; then | |
1060 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1061 | fi | |
1062 | ac_config_guess=$ac_aux_dir/config.guess | |
1063 | ac_config_sub=$ac_aux_dir/config.sub | |
1064 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1065 | ||
1066 | ||
1067 | # Do some error checking and defaulting for the host and target type. | |
1068 | # The inputs are: | |
1069 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1070 | # | |
1071 | # The rules are: | |
1072 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1073 | # same time. | |
1074 | # 2. Host defaults to nonopt. | |
1075 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1076 | # as determined by config.guess. | |
1077 | # 4. Target and build default to nonopt. | |
1078 | # 5. If nonopt is not specified, then target and build default to host. | |
1079 | ||
1080 | # The aliases save the names the user supplied, while $host etc. | |
1081 | # will get canonicalized. | |
1082 | case $host---$target---$nonopt in | |
1083 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1084 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1085 | esac | |
1086 | ||
1087 | ||
1088 | # Make sure we can run config.sub. | |
1089 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1090 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1091 | fi | |
1092 | ||
1093 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
0e5d83e3 | 1094 | echo "configure:1095: checking host system type" >&5 |
c906108c SS |
1095 | |
1096 | host_alias=$host | |
1097 | case "$host_alias" in | |
1098 | NONE) | |
1099 | case $nonopt in | |
1100 | NONE) | |
1101 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1102 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1103 | fi ;; | |
1104 | *) host_alias=$nonopt ;; | |
1105 | esac ;; | |
1106 | esac | |
1107 | ||
1108 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1109 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1110 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1111 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1112 | echo "$ac_t""$host" 1>&6 | |
1113 | ||
1114 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
0e5d83e3 | 1115 | echo "configure:1116: checking target system type" >&5 |
c906108c SS |
1116 | |
1117 | target_alias=$target | |
1118 | case "$target_alias" in | |
1119 | NONE) | |
1120 | case $nonopt in | |
1121 | NONE) target_alias=$host_alias ;; | |
1122 | *) target_alias=$nonopt ;; | |
1123 | esac ;; | |
1124 | esac | |
1125 | ||
1126 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1127 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1128 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1129 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1130 | echo "$ac_t""$target" 1>&6 | |
1131 | ||
1132 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
0e5d83e3 | 1133 | echo "configure:1134: checking build system type" >&5 |
c906108c SS |
1134 | |
1135 | build_alias=$build | |
1136 | case "$build_alias" in | |
1137 | NONE) | |
1138 | case $nonopt in | |
1139 | NONE) build_alias=$host_alias ;; | |
1140 | *) build_alias=$nonopt ;; | |
1141 | esac ;; | |
1142 | esac | |
1143 | ||
1144 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1145 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1146 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1147 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1148 | echo "$ac_t""$build" 1>&6 | |
1149 | ||
1150 | test "$host_alias" != "$target_alias" && | |
1151 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1152 | NONENONEs,x,x, && | |
1153 | program_prefix=${target_alias}- | |
1154 | ||
1155 | ||
8bb2c122 MK |
1156 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1157 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1158 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1159 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
f6e85fc8 | 1160 | # AC_PROG_RANLIB. This can be removed when we switch to Autoconf |
8bb2c122 MK |
1161 | # 2.5x. |
1162 | if test $host != $build; then | |
1163 | ac_tool_prefix=${host_alias}- | |
1164 | else | |
1165 | ac_tool_prefix= | |
1166 | fi | |
1167 | ||
1168 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1169 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1170 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 1171 | echo "configure:1172: checking for $ac_word" >&5 |
8bb2c122 MK |
1172 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1174 | else | |
1175 | if test -n "$RANLIB"; then | |
1176 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1177 | else | |
1178 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1179 | ac_dummy="$PATH" | |
1180 | for ac_dir in $ac_dummy; do | |
1181 | test -z "$ac_dir" && ac_dir=. | |
1182 | if test -f $ac_dir/$ac_word; then | |
1183 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1184 | break | |
1185 | fi | |
1186 | done | |
1187 | IFS="$ac_save_ifs" | |
1188 | fi | |
1189 | fi | |
1190 | RANLIB="$ac_cv_prog_RANLIB" | |
1191 | if test -n "$RANLIB"; then | |
1192 | echo "$ac_t""$RANLIB" 1>&6 | |
1193 | else | |
1194 | echo "$ac_t""no" 1>&6 | |
1195 | fi | |
1196 | ||
1197 | ||
1198 | if test -z "$ac_cv_prog_RANLIB"; then | |
1199 | if test -n "$ac_tool_prefix"; then | |
1200 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1201 | set dummy ranlib; ac_word=$2 | |
1202 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 1203 | echo "configure:1204: checking for $ac_word" >&5 |
8bb2c122 MK |
1204 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1205 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1206 | else | |
1207 | if test -n "$RANLIB"; then | |
1208 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1209 | else | |
1210 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1211 | ac_dummy="$PATH" | |
1212 | for ac_dir in $ac_dummy; do | |
1213 | test -z "$ac_dir" && ac_dir=. | |
1214 | if test -f $ac_dir/$ac_word; then | |
1215 | ac_cv_prog_RANLIB="ranlib" | |
1216 | break | |
1217 | fi | |
1218 | done | |
1219 | IFS="$ac_save_ifs" | |
1220 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1221 | fi | |
1222 | fi | |
1223 | RANLIB="$ac_cv_prog_RANLIB" | |
1224 | if test -n "$RANLIB"; then | |
1225 | echo "$ac_t""$RANLIB" 1>&6 | |
1226 | else | |
1227 | echo "$ac_t""no" 1>&6 | |
1228 | fi | |
1229 | ||
1230 | else | |
1231 | RANLIB=":" | |
1232 | fi | |
1233 | fi | |
1234 | ||
1235 | ||
c906108c SS |
1236 | ALL_LINGUAS= |
1237 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
0e5d83e3 | 1238 | echo "configure:1239: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1239 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1240 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1241 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1242 | else | |
1243 | cat > conftestmake <<\EOF | |
1244 | all: | |
1245 | @echo 'ac_maketemp="${MAKE}"' | |
1246 | EOF | |
1247 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1248 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1249 | if test -n "$ac_maketemp"; then | |
1250 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1251 | else | |
1252 | eval ac_cv_prog_make_${ac_make}_set=no | |
1253 | fi | |
1254 | rm -f conftestmake | |
1255 | fi | |
1256 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1257 | echo "$ac_t""yes" 1>&6 | |
1258 | SET_MAKE= | |
1259 | else | |
1260 | echo "$ac_t""no" 1>&6 | |
1261 | SET_MAKE="MAKE=${MAKE-make}" | |
1262 | fi | |
1263 | ||
1264 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1265 | set dummy ranlib; ac_word=$2 | |
1266 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 1267 | echo "configure:1268: checking for $ac_word" >&5 |
c906108c SS |
1268 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1270 | else | |
1271 | if test -n "$RANLIB"; then | |
1272 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1273 | else | |
1274 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1275 | ac_dummy="$PATH" | |
1276 | for ac_dir in $ac_dummy; do | |
1277 | test -z "$ac_dir" && ac_dir=. | |
1278 | if test -f $ac_dir/$ac_word; then | |
1279 | ac_cv_prog_RANLIB="ranlib" | |
1280 | break | |
1281 | fi | |
1282 | done | |
1283 | IFS="$ac_save_ifs" | |
1284 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1285 | fi | |
1286 | fi | |
1287 | RANLIB="$ac_cv_prog_RANLIB" | |
1288 | if test -n "$RANLIB"; then | |
1289 | echo "$ac_t""$RANLIB" 1>&6 | |
1290 | else | |
1291 | echo "$ac_t""no" 1>&6 | |
1292 | fi | |
1293 | ||
1294 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
0e5d83e3 | 1295 | echo "configure:1296: checking for ANSI C header files" >&5 |
c906108c SS |
1296 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1298 | else | |
1299 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1300 | #line 1301 "configure" |
c906108c SS |
1301 | #include "confdefs.h" |
1302 | #include <stdlib.h> | |
1303 | #include <stdarg.h> | |
1304 | #include <string.h> | |
1305 | #include <float.h> | |
1306 | EOF | |
1307 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 1308 | { (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1309 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1310 | if test -z "$ac_err"; then | |
1311 | rm -rf conftest* | |
1312 | ac_cv_header_stdc=yes | |
1313 | else | |
1314 | echo "$ac_err" >&5 | |
1315 | echo "configure: failed program was:" >&5 | |
1316 | cat conftest.$ac_ext >&5 | |
1317 | rm -rf conftest* | |
1318 | ac_cv_header_stdc=no | |
1319 | fi | |
1320 | rm -f conftest* | |
1321 | ||
1322 | if test $ac_cv_header_stdc = yes; then | |
1323 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1324 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1325 | #line 1326 "configure" |
c906108c SS |
1326 | #include "confdefs.h" |
1327 | #include <string.h> | |
1328 | EOF | |
1329 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1330 | egrep "memchr" >/dev/null 2>&1; then | |
1331 | : | |
1332 | else | |
1333 | rm -rf conftest* | |
1334 | ac_cv_header_stdc=no | |
1335 | fi | |
1336 | rm -f conftest* | |
1337 | ||
1338 | fi | |
1339 | ||
1340 | if test $ac_cv_header_stdc = yes; then | |
1341 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1342 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1343 | #line 1344 "configure" |
c906108c SS |
1344 | #include "confdefs.h" |
1345 | #include <stdlib.h> | |
1346 | EOF | |
1347 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1348 | egrep "free" >/dev/null 2>&1; then | |
1349 | : | |
1350 | else | |
1351 | rm -rf conftest* | |
1352 | ac_cv_header_stdc=no | |
1353 | fi | |
1354 | rm -f conftest* | |
1355 | ||
1356 | fi | |
1357 | ||
1358 | if test $ac_cv_header_stdc = yes; then | |
1359 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1360 | if test "$cross_compiling" = yes; then | |
1361 | : | |
1362 | else | |
1363 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1364 | #line 1365 "configure" |
c906108c SS |
1365 | #include "confdefs.h" |
1366 | #include <ctype.h> | |
1367 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1368 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1369 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1370 | int main () { int i; for (i = 0; i < 256; i++) | |
1371 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1372 | exit (0); } | |
1373 | ||
1374 | EOF | |
0e5d83e3 | 1375 | if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1376 | then |
1377 | : | |
1378 | else | |
1379 | echo "configure: failed program was:" >&5 | |
1380 | cat conftest.$ac_ext >&5 | |
1381 | rm -fr conftest* | |
1382 | ac_cv_header_stdc=no | |
1383 | fi | |
1384 | rm -fr conftest* | |
1385 | fi | |
1386 | ||
1387 | fi | |
1388 | fi | |
1389 | ||
1390 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1391 | if test $ac_cv_header_stdc = yes; then | |
1392 | cat >> confdefs.h <<\EOF | |
1393 | #define STDC_HEADERS 1 | |
1394 | EOF | |
1395 | ||
1396 | fi | |
1397 | ||
1398 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
0e5d83e3 | 1399 | echo "configure:1400: checking for working const" >&5 |
c906108c SS |
1400 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1401 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1402 | else | |
1403 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1404 | #line 1405 "configure" |
c906108c SS |
1405 | #include "confdefs.h" |
1406 | ||
1407 | int main() { | |
1408 | ||
1409 | /* Ultrix mips cc rejects this. */ | |
1410 | typedef int charset[2]; const charset x; | |
1411 | /* SunOS 4.1.1 cc rejects this. */ | |
1412 | char const *const *ccp; | |
1413 | char **p; | |
1414 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1415 | struct point {int x, y;}; | |
1416 | static struct point const zero = {0,0}; | |
1417 | /* AIX XL C 1.02.0.0 rejects this. | |
1418 | It does not let you subtract one const X* pointer from another in an arm | |
1419 | of an if-expression whose if-part is not a constant expression */ | |
1420 | const char *g = "string"; | |
1421 | ccp = &g + (g ? g-g : 0); | |
1422 | /* HPUX 7.0 cc rejects these. */ | |
1423 | ++ccp; | |
1424 | p = (char**) ccp; | |
1425 | ccp = (char const *const *) p; | |
1426 | { /* SCO 3.2v4 cc rejects this. */ | |
1427 | char *t; | |
1428 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1429 | ||
1430 | *t++ = 0; | |
1431 | } | |
1432 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1433 | int x[] = {25, 17}; | |
1434 | const int *foo = &x[0]; | |
1435 | ++foo; | |
1436 | } | |
1437 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1438 | typedef const int *iptr; | |
1439 | iptr p = 0; | |
1440 | ++p; | |
1441 | } | |
1442 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1443 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1444 | struct s { int j; const int *ap[3]; }; | |
1445 | struct s *b; b->j = 5; | |
1446 | } | |
1447 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1448 | const int foo = 10; | |
1449 | } | |
1450 | ||
1451 | ; return 0; } | |
1452 | EOF | |
0e5d83e3 | 1453 | if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1454 | rm -rf conftest* |
1455 | ac_cv_c_const=yes | |
1456 | else | |
1457 | echo "configure: failed program was:" >&5 | |
1458 | cat conftest.$ac_ext >&5 | |
1459 | rm -rf conftest* | |
1460 | ac_cv_c_const=no | |
1461 | fi | |
1462 | rm -f conftest* | |
1463 | fi | |
1464 | ||
1465 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1466 | if test $ac_cv_c_const = no; then | |
1467 | cat >> confdefs.h <<\EOF | |
1468 | #define const | |
1469 | EOF | |
1470 | ||
1471 | fi | |
1472 | ||
1473 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
0e5d83e3 | 1474 | echo "configure:1475: checking for inline" >&5 |
c906108c SS |
1475 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1476 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1477 | else | |
1478 | ac_cv_c_inline=no | |
1479 | for ac_kw in inline __inline__ __inline; do | |
1480 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1481 | #line 1482 "configure" |
c906108c SS |
1482 | #include "confdefs.h" |
1483 | ||
1484 | int main() { | |
1485 | } $ac_kw foo() { | |
1486 | ; return 0; } | |
1487 | EOF | |
0e5d83e3 | 1488 | if { (eval echo configure:1489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1489 | rm -rf conftest* |
1490 | ac_cv_c_inline=$ac_kw; break | |
1491 | else | |
1492 | echo "configure: failed program was:" >&5 | |
1493 | cat conftest.$ac_ext >&5 | |
1494 | fi | |
1495 | rm -f conftest* | |
1496 | done | |
1497 | ||
1498 | fi | |
1499 | ||
1500 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1501 | case "$ac_cv_c_inline" in | |
1502 | inline | yes) ;; | |
1503 | no) cat >> confdefs.h <<\EOF | |
1504 | #define inline | |
1505 | EOF | |
1506 | ;; | |
1507 | *) cat >> confdefs.h <<EOF | |
1508 | #define inline $ac_cv_c_inline | |
1509 | EOF | |
1510 | ;; | |
1511 | esac | |
1512 | ||
1513 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
0e5d83e3 | 1514 | echo "configure:1515: checking for off_t" >&5 |
c906108c SS |
1515 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1516 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1517 | else | |
1518 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1519 | #line 1520 "configure" |
c906108c SS |
1520 | #include "confdefs.h" |
1521 | #include <sys/types.h> | |
1522 | #if STDC_HEADERS | |
1523 | #include <stdlib.h> | |
1524 | #include <stddef.h> | |
1525 | #endif | |
1526 | EOF | |
1527 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1528 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1529 | rm -rf conftest* | |
1530 | ac_cv_type_off_t=yes | |
1531 | else | |
1532 | rm -rf conftest* | |
1533 | ac_cv_type_off_t=no | |
1534 | fi | |
1535 | rm -f conftest* | |
1536 | ||
1537 | fi | |
1538 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1539 | if test $ac_cv_type_off_t = no; then | |
1540 | cat >> confdefs.h <<\EOF | |
1541 | #define off_t long | |
1542 | EOF | |
1543 | ||
1544 | fi | |
1545 | ||
1546 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
0e5d83e3 | 1547 | echo "configure:1548: checking for size_t" >&5 |
c906108c SS |
1548 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1549 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1550 | else | |
1551 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1552 | #line 1553 "configure" |
c906108c SS |
1553 | #include "confdefs.h" |
1554 | #include <sys/types.h> | |
1555 | #if STDC_HEADERS | |
1556 | #include <stdlib.h> | |
1557 | #include <stddef.h> | |
1558 | #endif | |
1559 | EOF | |
1560 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1561 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1562 | rm -rf conftest* | |
1563 | ac_cv_type_size_t=yes | |
1564 | else | |
1565 | rm -rf conftest* | |
1566 | ac_cv_type_size_t=no | |
1567 | fi | |
1568 | rm -f conftest* | |
1569 | ||
1570 | fi | |
1571 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1572 | if test $ac_cv_type_size_t = no; then | |
1573 | cat >> confdefs.h <<\EOF | |
1574 | #define size_t unsigned | |
1575 | EOF | |
1576 | ||
1577 | fi | |
1578 | ||
1579 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1580 | # for constant arguments. Useless! | |
1581 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
0e5d83e3 | 1582 | echo "configure:1583: checking for working alloca.h" >&5 |
c906108c SS |
1583 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1585 | else | |
1586 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1587 | #line 1588 "configure" |
c906108c SS |
1588 | #include "confdefs.h" |
1589 | #include <alloca.h> | |
1590 | int main() { | |
1591 | char *p = alloca(2 * sizeof(int)); | |
1592 | ; return 0; } | |
1593 | EOF | |
0e5d83e3 | 1594 | if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1595 | rm -rf conftest* |
1596 | ac_cv_header_alloca_h=yes | |
1597 | else | |
1598 | echo "configure: failed program was:" >&5 | |
1599 | cat conftest.$ac_ext >&5 | |
1600 | rm -rf conftest* | |
1601 | ac_cv_header_alloca_h=no | |
1602 | fi | |
1603 | rm -f conftest* | |
1604 | fi | |
1605 | ||
1606 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1607 | if test $ac_cv_header_alloca_h = yes; then | |
1608 | cat >> confdefs.h <<\EOF | |
1609 | #define HAVE_ALLOCA_H 1 | |
1610 | EOF | |
1611 | ||
1612 | fi | |
1613 | ||
1614 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
0e5d83e3 | 1615 | echo "configure:1616: checking for alloca" >&5 |
c906108c SS |
1616 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1618 | else | |
1619 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1620 | #line 1621 "configure" |
c906108c SS |
1621 | #include "confdefs.h" |
1622 | ||
1623 | #ifdef __GNUC__ | |
1624 | # define alloca __builtin_alloca | |
1625 | #else | |
1626 | # ifdef _MSC_VER | |
1627 | # include <malloc.h> | |
1628 | # define alloca _alloca | |
1629 | # else | |
1630 | # if HAVE_ALLOCA_H | |
1631 | # include <alloca.h> | |
1632 | # else | |
1633 | # ifdef _AIX | |
1634 | #pragma alloca | |
1635 | # else | |
1636 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1637 | char *alloca (); | |
1638 | # endif | |
1639 | # endif | |
1640 | # endif | |
1641 | # endif | |
1642 | #endif | |
1643 | ||
1644 | int main() { | |
1645 | char *p = (char *) alloca(1); | |
1646 | ; return 0; } | |
1647 | EOF | |
0e5d83e3 | 1648 | if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1649 | rm -rf conftest* |
1650 | ac_cv_func_alloca_works=yes | |
1651 | else | |
1652 | echo "configure: failed program was:" >&5 | |
1653 | cat conftest.$ac_ext >&5 | |
1654 | rm -rf conftest* | |
1655 | ac_cv_func_alloca_works=no | |
1656 | fi | |
1657 | rm -f conftest* | |
1658 | fi | |
1659 | ||
1660 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1661 | if test $ac_cv_func_alloca_works = yes; then | |
1662 | cat >> confdefs.h <<\EOF | |
1663 | #define HAVE_ALLOCA 1 | |
1664 | EOF | |
1665 | ||
1666 | fi | |
1667 | ||
1668 | if test $ac_cv_func_alloca_works = no; then | |
1669 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1670 | # that cause trouble. Some versions do not even contain alloca or | |
1671 | # contain a buggy version. If you still want to use their alloca, | |
1672 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1673 | ALLOCA=alloca.${ac_objext} | |
1674 | cat >> confdefs.h <<\EOF | |
1675 | #define C_ALLOCA 1 | |
1676 | EOF | |
1677 | ||
1678 | ||
1679 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
0e5d83e3 | 1680 | echo "configure:1681: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1681 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1682 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1683 | else | |
1684 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1685 | #line 1686 "configure" |
c906108c SS |
1686 | #include "confdefs.h" |
1687 | #if defined(CRAY) && ! defined(CRAY2) | |
1688 | webecray | |
1689 | #else | |
1690 | wenotbecray | |
1691 | #endif | |
1692 | ||
1693 | EOF | |
1694 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1695 | egrep "webecray" >/dev/null 2>&1; then | |
1696 | rm -rf conftest* | |
1697 | ac_cv_os_cray=yes | |
1698 | else | |
1699 | rm -rf conftest* | |
1700 | ac_cv_os_cray=no | |
1701 | fi | |
1702 | rm -f conftest* | |
1703 | ||
1704 | fi | |
1705 | ||
1706 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1707 | if test $ac_cv_os_cray = yes; then | |
1708 | for ac_func in _getb67 GETB67 getb67; do | |
1709 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 1710 | echo "configure:1711: checking for $ac_func" >&5 |
c906108c SS |
1711 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1712 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1713 | else | |
1714 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1715 | #line 1716 "configure" |
c906108c SS |
1716 | #include "confdefs.h" |
1717 | /* System header to define __stub macros and hopefully few prototypes, | |
1718 | which can conflict with char $ac_func(); below. */ | |
1719 | #include <assert.h> | |
1720 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1721 | /* We use char because int might match the return type of a gcc2 | |
1722 | builtin and then its argument prototype would still apply. */ | |
1723 | char $ac_func(); | |
1724 | ||
1725 | int main() { | |
1726 | ||
1727 | /* The GNU C library defines this for functions which it implements | |
1728 | to always fail with ENOSYS. Some functions are actually named | |
1729 | something starting with __ and the normal name is an alias. */ | |
1730 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1731 | choke me | |
1732 | #else | |
1733 | $ac_func(); | |
1734 | #endif | |
1735 | ||
1736 | ; return 0; } | |
1737 | EOF | |
0e5d83e3 | 1738 | if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1739 | rm -rf conftest* |
1740 | eval "ac_cv_func_$ac_func=yes" | |
1741 | else | |
1742 | echo "configure: failed program was:" >&5 | |
1743 | cat conftest.$ac_ext >&5 | |
1744 | rm -rf conftest* | |
1745 | eval "ac_cv_func_$ac_func=no" | |
1746 | fi | |
1747 | rm -f conftest* | |
1748 | fi | |
1749 | ||
1750 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1751 | echo "$ac_t""yes" 1>&6 | |
1752 | cat >> confdefs.h <<EOF | |
1753 | #define CRAY_STACKSEG_END $ac_func | |
1754 | EOF | |
1755 | ||
1756 | break | |
1757 | else | |
1758 | echo "$ac_t""no" 1>&6 | |
1759 | fi | |
1760 | ||
1761 | done | |
1762 | fi | |
1763 | ||
1764 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
0e5d83e3 | 1765 | echo "configure:1766: checking stack direction for C alloca" >&5 |
c906108c SS |
1766 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1767 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1768 | else | |
1769 | if test "$cross_compiling" = yes; then | |
1770 | ac_cv_c_stack_direction=0 | |
1771 | else | |
1772 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1773 | #line 1774 "configure" |
c906108c SS |
1774 | #include "confdefs.h" |
1775 | find_stack_direction () | |
1776 | { | |
1777 | static char *addr = 0; | |
1778 | auto char dummy; | |
1779 | if (addr == 0) | |
1780 | { | |
1781 | addr = &dummy; | |
1782 | return find_stack_direction (); | |
1783 | } | |
1784 | else | |
1785 | return (&dummy > addr) ? 1 : -1; | |
1786 | } | |
1787 | main () | |
1788 | { | |
1789 | exit (find_stack_direction() < 0); | |
1790 | } | |
1791 | EOF | |
0e5d83e3 | 1792 | if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1793 | then |
1794 | ac_cv_c_stack_direction=1 | |
1795 | else | |
1796 | echo "configure: failed program was:" >&5 | |
1797 | cat conftest.$ac_ext >&5 | |
1798 | rm -fr conftest* | |
1799 | ac_cv_c_stack_direction=-1 | |
1800 | fi | |
1801 | rm -fr conftest* | |
1802 | fi | |
1803 | ||
1804 | fi | |
1805 | ||
1806 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1807 | cat >> confdefs.h <<EOF | |
1808 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1809 | EOF | |
1810 | ||
1811 | fi | |
1812 | ||
27ca5dad | 1813 | for ac_hdr in unistd.h |
c906108c SS |
1814 | do |
1815 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1816 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 1817 | echo "configure:1818: checking for $ac_hdr" >&5 |
c906108c SS |
1818 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1819 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1820 | else | |
1821 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1822 | #line 1823 "configure" |
c906108c SS |
1823 | #include "confdefs.h" |
1824 | #include <$ac_hdr> | |
1825 | EOF | |
1826 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 1827 | { (eval echo configure:1828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1828 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1829 | if test -z "$ac_err"; then | |
1830 | rm -rf conftest* | |
1831 | eval "ac_cv_header_$ac_safe=yes" | |
1832 | else | |
1833 | echo "$ac_err" >&5 | |
1834 | echo "configure: failed program was:" >&5 | |
1835 | cat conftest.$ac_ext >&5 | |
1836 | rm -rf conftest* | |
1837 | eval "ac_cv_header_$ac_safe=no" | |
1838 | fi | |
1839 | rm -f conftest* | |
1840 | fi | |
1841 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1842 | echo "$ac_t""yes" 1>&6 | |
1843 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1844 | cat >> confdefs.h <<EOF | |
1845 | #define $ac_tr_hdr 1 | |
1846 | EOF | |
1847 | ||
1848 | else | |
1849 | echo "$ac_t""no" 1>&6 | |
1850 | fi | |
1851 | done | |
1852 | ||
1853 | for ac_func in getpagesize | |
1854 | do | |
1855 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 1856 | echo "configure:1857: checking for $ac_func" >&5 |
c906108c SS |
1857 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1858 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1859 | else | |
1860 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1861 | #line 1862 "configure" |
c906108c SS |
1862 | #include "confdefs.h" |
1863 | /* System header to define __stub macros and hopefully few prototypes, | |
1864 | which can conflict with char $ac_func(); below. */ | |
1865 | #include <assert.h> | |
1866 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1867 | /* We use char because int might match the return type of a gcc2 | |
1868 | builtin and then its argument prototype would still apply. */ | |
1869 | char $ac_func(); | |
1870 | ||
1871 | int main() { | |
1872 | ||
1873 | /* The GNU C library defines this for functions which it implements | |
1874 | to always fail with ENOSYS. Some functions are actually named | |
1875 | something starting with __ and the normal name is an alias. */ | |
1876 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1877 | choke me | |
1878 | #else | |
1879 | $ac_func(); | |
1880 | #endif | |
1881 | ||
1882 | ; return 0; } | |
1883 | EOF | |
0e5d83e3 | 1884 | if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1885 | rm -rf conftest* |
1886 | eval "ac_cv_func_$ac_func=yes" | |
1887 | else | |
1888 | echo "configure: failed program was:" >&5 | |
1889 | cat conftest.$ac_ext >&5 | |
1890 | rm -rf conftest* | |
1891 | eval "ac_cv_func_$ac_func=no" | |
1892 | fi | |
1893 | rm -f conftest* | |
1894 | fi | |
1895 | ||
1896 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1897 | echo "$ac_t""yes" 1>&6 | |
1898 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1899 | cat >> confdefs.h <<EOF | |
1900 | #define $ac_tr_func 1 | |
1901 | EOF | |
1902 | ||
1903 | else | |
1904 | echo "$ac_t""no" 1>&6 | |
1905 | fi | |
1906 | done | |
1907 | ||
1908 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
0e5d83e3 | 1909 | echo "configure:1910: checking for working mmap" >&5 |
c906108c SS |
1910 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1911 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1912 | else | |
1913 | if test "$cross_compiling" = yes; then | |
1914 | ac_cv_func_mmap_fixed_mapped=no | |
1915 | else | |
1916 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 1917 | #line 1918 "configure" |
c906108c SS |
1918 | #include "confdefs.h" |
1919 | ||
1920 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1921 | Here is a matrix of mmap possibilities: | |
1922 | mmap private not fixed | |
1923 | mmap private fixed at somewhere currently unmapped | |
1924 | mmap private fixed at somewhere already mapped | |
1925 | mmap shared not fixed | |
1926 | mmap shared fixed at somewhere currently unmapped | |
1927 | mmap shared fixed at somewhere already mapped | |
1928 | For private mappings, we should verify that changes cannot be read() | |
1929 | back from the file, nor mmap's back from the file at a different | |
1930 | address. (There have been systems where private was not correctly | |
1931 | implemented like the infamous i386 svr4.0, and systems where the | |
1932 | VM page cache was not coherent with the filesystem buffer cache | |
1933 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1934 | For shared mappings, we should conversely verify that changes get | |
1935 | propogated back to all the places they're supposed to be. | |
1936 | ||
1937 | Grep wants private fixed already mapped. | |
1938 | The main things grep needs to know about mmap are: | |
1939 | * does it exist and is it safe to write into the mmap'd area | |
1940 | * how to use it (BSD variants) */ | |
1941 | #include <sys/types.h> | |
1942 | #include <fcntl.h> | |
1943 | #include <sys/mman.h> | |
1944 | ||
1945 | /* This mess was copied from the GNU getpagesize.h. */ | |
1946 | #ifndef HAVE_GETPAGESIZE | |
27ca5dad MC |
1947 | # ifdef HAVE_UNISTD_H |
1948 | # include <unistd.h> | |
1949 | # endif | |
c906108c SS |
1950 | |
1951 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1952 | # ifndef HAVE_SYS_PARAM_H | |
1953 | # define HAVE_SYS_PARAM_H 1 | |
1954 | # endif | |
1955 | ||
1956 | # ifdef _SC_PAGESIZE | |
1957 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1958 | # else /* no _SC_PAGESIZE */ | |
1959 | # ifdef HAVE_SYS_PARAM_H | |
1960 | # include <sys/param.h> | |
1961 | # ifdef EXEC_PAGESIZE | |
1962 | # define getpagesize() EXEC_PAGESIZE | |
1963 | # else /* no EXEC_PAGESIZE */ | |
1964 | # ifdef NBPG | |
1965 | # define getpagesize() NBPG * CLSIZE | |
1966 | # ifndef CLSIZE | |
1967 | # define CLSIZE 1 | |
1968 | # endif /* no CLSIZE */ | |
1969 | # else /* no NBPG */ | |
1970 | # ifdef NBPC | |
1971 | # define getpagesize() NBPC | |
1972 | # else /* no NBPC */ | |
1973 | # ifdef PAGESIZE | |
1974 | # define getpagesize() PAGESIZE | |
1975 | # endif /* PAGESIZE */ | |
1976 | # endif /* no NBPC */ | |
1977 | # endif /* no NBPG */ | |
1978 | # endif /* no EXEC_PAGESIZE */ | |
1979 | # else /* no HAVE_SYS_PARAM_H */ | |
1980 | # define getpagesize() 8192 /* punt totally */ | |
1981 | # endif /* no HAVE_SYS_PARAM_H */ | |
1982 | # endif /* no _SC_PAGESIZE */ | |
1983 | ||
1984 | #endif /* no HAVE_GETPAGESIZE */ | |
1985 | ||
1986 | #ifdef __cplusplus | |
1987 | extern "C" { void *malloc(unsigned); } | |
1988 | #else | |
1989 | char *malloc(); | |
1990 | #endif | |
1991 | ||
1992 | int | |
1993 | main() | |
1994 | { | |
1995 | char *data, *data2, *data3; | |
1996 | int i, pagesize; | |
1997 | int fd; | |
1998 | ||
1999 | pagesize = getpagesize(); | |
2000 | ||
2001 | /* | |
2002 | * First, make a file with some known garbage in it. | |
2003 | */ | |
2004 | data = malloc(pagesize); | |
2005 | if (!data) | |
2006 | exit(1); | |
2007 | for (i = 0; i < pagesize; ++i) | |
2008 | *(data + i) = rand(); | |
2009 | umask(0); | |
2010 | fd = creat("conftestmmap", 0600); | |
2011 | if (fd < 0) | |
2012 | exit(1); | |
2013 | if (write(fd, data, pagesize) != pagesize) | |
2014 | exit(1); | |
2015 | close(fd); | |
2016 | ||
2017 | /* | |
2018 | * Next, try to mmap the file at a fixed address which | |
2019 | * already has something else allocated at it. If we can, | |
2020 | * also make sure that we see the same garbage. | |
2021 | */ | |
2022 | fd = open("conftestmmap", O_RDWR); | |
2023 | if (fd < 0) | |
2024 | exit(1); | |
2025 | data2 = malloc(2 * pagesize); | |
2026 | if (!data2) | |
2027 | exit(1); | |
2028 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2029 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2030 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2031 | exit(1); | |
2032 | for (i = 0; i < pagesize; ++i) | |
2033 | if (*(data + i) != *(data2 + i)) | |
2034 | exit(1); | |
2035 | ||
2036 | /* | |
2037 | * Finally, make sure that changes to the mapped area | |
2038 | * do not percolate back to the file as seen by read(). | |
2039 | * (This is a bug on some variants of i386 svr4.0.) | |
2040 | */ | |
2041 | for (i = 0; i < pagesize; ++i) | |
2042 | *(data2 + i) = *(data2 + i) + 1; | |
2043 | data3 = malloc(pagesize); | |
2044 | if (!data3) | |
2045 | exit(1); | |
2046 | if (read(fd, data3, pagesize) != pagesize) | |
2047 | exit(1); | |
2048 | for (i = 0; i < pagesize; ++i) | |
2049 | if (*(data + i) != *(data3 + i)) | |
2050 | exit(1); | |
2051 | close(fd); | |
2052 | unlink("conftestmmap"); | |
2053 | exit(0); | |
2054 | } | |
2055 | ||
2056 | EOF | |
0e5d83e3 | 2057 | if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2058 | then |
2059 | ac_cv_func_mmap_fixed_mapped=yes | |
2060 | else | |
2061 | echo "configure: failed program was:" >&5 | |
2062 | cat conftest.$ac_ext >&5 | |
2063 | rm -fr conftest* | |
2064 | ac_cv_func_mmap_fixed_mapped=no | |
2065 | fi | |
2066 | rm -fr conftest* | |
2067 | fi | |
2068 | ||
2069 | fi | |
2070 | ||
2071 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2072 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2073 | cat >> confdefs.h <<\EOF | |
2074 | #define HAVE_MMAP 1 | |
2075 | EOF | |
2076 | ||
2077 | fi | |
2078 | ||
2079 | ||
2080 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2081 | unistd.h values.h sys/param.h | |
2082 | do | |
2083 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2084 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 2085 | echo "configure:2086: checking for $ac_hdr" >&5 |
c906108c SS |
2086 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2087 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2088 | else | |
2089 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2090 | #line 2091 "configure" |
c906108c SS |
2091 | #include "confdefs.h" |
2092 | #include <$ac_hdr> | |
2093 | EOF | |
2094 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 2095 | { (eval echo configure:2096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2096 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2097 | if test -z "$ac_err"; then | |
2098 | rm -rf conftest* | |
2099 | eval "ac_cv_header_$ac_safe=yes" | |
2100 | else | |
2101 | echo "$ac_err" >&5 | |
2102 | echo "configure: failed program was:" >&5 | |
2103 | cat conftest.$ac_ext >&5 | |
2104 | rm -rf conftest* | |
2105 | eval "ac_cv_header_$ac_safe=no" | |
2106 | fi | |
2107 | rm -f conftest* | |
2108 | fi | |
2109 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2110 | echo "$ac_t""yes" 1>&6 | |
2111 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2112 | cat >> confdefs.h <<EOF | |
2113 | #define $ac_tr_hdr 1 | |
2114 | EOF | |
2115 | ||
2116 | else | |
2117 | echo "$ac_t""no" 1>&6 | |
2118 | fi | |
2119 | done | |
2120 | ||
2121 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2122 | __argz_count __argz_stringify __argz_next | |
2123 | do | |
2124 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 2125 | echo "configure:2126: checking for $ac_func" >&5 |
c906108c SS |
2126 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2127 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2128 | else | |
2129 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2130 | #line 2131 "configure" |
c906108c SS |
2131 | #include "confdefs.h" |
2132 | /* System header to define __stub macros and hopefully few prototypes, | |
2133 | which can conflict with char $ac_func(); below. */ | |
2134 | #include <assert.h> | |
2135 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2136 | /* We use char because int might match the return type of a gcc2 | |
2137 | builtin and then its argument prototype would still apply. */ | |
2138 | char $ac_func(); | |
2139 | ||
2140 | int main() { | |
2141 | ||
2142 | /* The GNU C library defines this for functions which it implements | |
2143 | to always fail with ENOSYS. Some functions are actually named | |
2144 | something starting with __ and the normal name is an alias. */ | |
2145 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2146 | choke me | |
2147 | #else | |
2148 | $ac_func(); | |
2149 | #endif | |
2150 | ||
2151 | ; return 0; } | |
2152 | EOF | |
0e5d83e3 | 2153 | if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2154 | rm -rf conftest* |
2155 | eval "ac_cv_func_$ac_func=yes" | |
2156 | else | |
2157 | echo "configure: failed program was:" >&5 | |
2158 | cat conftest.$ac_ext >&5 | |
2159 | rm -rf conftest* | |
2160 | eval "ac_cv_func_$ac_func=no" | |
2161 | fi | |
2162 | rm -f conftest* | |
2163 | fi | |
2164 | ||
2165 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2166 | echo "$ac_t""yes" 1>&6 | |
2167 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2168 | cat >> confdefs.h <<EOF | |
2169 | #define $ac_tr_func 1 | |
2170 | EOF | |
2171 | ||
2172 | else | |
2173 | echo "$ac_t""no" 1>&6 | |
2174 | fi | |
2175 | done | |
2176 | ||
2177 | ||
2178 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2179 | for ac_func in stpcpy | |
2180 | do | |
2181 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 2182 | echo "configure:2183: checking for $ac_func" >&5 |
c906108c SS |
2183 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2184 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2185 | else | |
2186 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2187 | #line 2188 "configure" |
c906108c SS |
2188 | #include "confdefs.h" |
2189 | /* System header to define __stub macros and hopefully few prototypes, | |
2190 | which can conflict with char $ac_func(); below. */ | |
2191 | #include <assert.h> | |
2192 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2193 | /* We use char because int might match the return type of a gcc2 | |
2194 | builtin and then its argument prototype would still apply. */ | |
2195 | char $ac_func(); | |
2196 | ||
2197 | int main() { | |
2198 | ||
2199 | /* The GNU C library defines this for functions which it implements | |
2200 | to always fail with ENOSYS. Some functions are actually named | |
2201 | something starting with __ and the normal name is an alias. */ | |
2202 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2203 | choke me | |
2204 | #else | |
2205 | $ac_func(); | |
2206 | #endif | |
2207 | ||
2208 | ; return 0; } | |
2209 | EOF | |
0e5d83e3 | 2210 | if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2211 | rm -rf conftest* |
2212 | eval "ac_cv_func_$ac_func=yes" | |
2213 | else | |
2214 | echo "configure: failed program was:" >&5 | |
2215 | cat conftest.$ac_ext >&5 | |
2216 | rm -rf conftest* | |
2217 | eval "ac_cv_func_$ac_func=no" | |
2218 | fi | |
2219 | rm -f conftest* | |
2220 | fi | |
2221 | ||
2222 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2223 | echo "$ac_t""yes" 1>&6 | |
2224 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2225 | cat >> confdefs.h <<EOF | |
2226 | #define $ac_tr_func 1 | |
2227 | EOF | |
2228 | ||
2229 | else | |
2230 | echo "$ac_t""no" 1>&6 | |
2231 | fi | |
2232 | done | |
2233 | ||
2234 | fi | |
2235 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2236 | cat >> confdefs.h <<\EOF | |
2237 | #define HAVE_STPCPY 1 | |
2238 | EOF | |
2239 | ||
2240 | fi | |
2241 | ||
2242 | if test $ac_cv_header_locale_h = yes; then | |
2243 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
0e5d83e3 | 2244 | echo "configure:2245: checking for LC_MESSAGES" >&5 |
c906108c SS |
2245 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2247 | else | |
2248 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2249 | #line 2250 "configure" |
c906108c SS |
2250 | #include "confdefs.h" |
2251 | #include <locale.h> | |
2252 | int main() { | |
2253 | return LC_MESSAGES | |
2254 | ; return 0; } | |
2255 | EOF | |
0e5d83e3 | 2256 | if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2257 | rm -rf conftest* |
2258 | am_cv_val_LC_MESSAGES=yes | |
2259 | else | |
2260 | echo "configure: failed program was:" >&5 | |
2261 | cat conftest.$ac_ext >&5 | |
2262 | rm -rf conftest* | |
2263 | am_cv_val_LC_MESSAGES=no | |
2264 | fi | |
2265 | rm -f conftest* | |
2266 | fi | |
2267 | ||
2268 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2269 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2270 | cat >> confdefs.h <<\EOF | |
2271 | #define HAVE_LC_MESSAGES 1 | |
2272 | EOF | |
2273 | ||
2274 | fi | |
2275 | fi | |
2276 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
0e5d83e3 | 2277 | echo "configure:2278: checking whether NLS is requested" >&5 |
c906108c SS |
2278 | # Check whether --enable-nls or --disable-nls was given. |
2279 | if test "${enable_nls+set}" = set; then | |
2280 | enableval="$enable_nls" | |
2281 | USE_NLS=$enableval | |
2282 | else | |
2283 | USE_NLS=yes | |
2284 | fi | |
2285 | ||
2286 | echo "$ac_t""$USE_NLS" 1>&6 | |
2287 | ||
2288 | ||
2289 | USE_INCLUDED_LIBINTL=no | |
2290 | ||
2291 | if test "$USE_NLS" = "yes"; then | |
2292 | cat >> confdefs.h <<\EOF | |
2293 | #define ENABLE_NLS 1 | |
2294 | EOF | |
2295 | ||
2296 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
0e5d83e3 | 2297 | echo "configure:2298: checking whether included gettext is requested" >&5 |
c906108c SS |
2298 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2299 | if test "${with_included_gettext+set}" = set; then | |
2300 | withval="$with_included_gettext" | |
2301 | nls_cv_force_use_gnu_gettext=$withval | |
2302 | else | |
2303 | nls_cv_force_use_gnu_gettext=no | |
2304 | fi | |
2305 | ||
2306 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2307 | ||
2308 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2309 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2310 | nls_cv_header_intl= | |
2311 | nls_cv_header_libgt= | |
2312 | CATOBJEXT=NONE | |
2313 | ||
2314 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2315 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
0e5d83e3 | 2316 | echo "configure:2317: checking for libintl.h" >&5 |
c906108c SS |
2317 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2318 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2319 | else | |
2320 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2321 | #line 2322 "configure" |
c906108c SS |
2322 | #include "confdefs.h" |
2323 | #include <libintl.h> | |
2324 | EOF | |
2325 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 2326 | { (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2327 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2328 | if test -z "$ac_err"; then | |
2329 | rm -rf conftest* | |
2330 | eval "ac_cv_header_$ac_safe=yes" | |
2331 | else | |
2332 | echo "$ac_err" >&5 | |
2333 | echo "configure: failed program was:" >&5 | |
2334 | cat conftest.$ac_ext >&5 | |
2335 | rm -rf conftest* | |
2336 | eval "ac_cv_header_$ac_safe=no" | |
2337 | fi | |
2338 | rm -f conftest* | |
2339 | fi | |
2340 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2341 | echo "$ac_t""yes" 1>&6 | |
2342 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
0e5d83e3 | 2343 | echo "configure:2344: checking for gettext in libc" >&5 |
c906108c SS |
2344 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2345 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2346 | else | |
2347 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2348 | #line 2349 "configure" |
c906108c SS |
2349 | #include "confdefs.h" |
2350 | #include <libintl.h> | |
2351 | int main() { | |
2352 | return (int) gettext ("") | |
2353 | ; return 0; } | |
2354 | EOF | |
0e5d83e3 | 2355 | if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2356 | rm -rf conftest* |
2357 | gt_cv_func_gettext_libc=yes | |
2358 | else | |
2359 | echo "configure: failed program was:" >&5 | |
2360 | cat conftest.$ac_ext >&5 | |
2361 | rm -rf conftest* | |
2362 | gt_cv_func_gettext_libc=no | |
2363 | fi | |
2364 | rm -f conftest* | |
2365 | fi | |
2366 | ||
2367 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2368 | ||
2369 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2370 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
0e5d83e3 | 2371 | echo "configure:2372: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2372 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2373 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2374 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2375 | else | |
2376 | ac_save_LIBS="$LIBS" | |
2377 | LIBS="-lintl $LIBS" | |
2378 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2379 | #line 2380 "configure" |
c906108c SS |
2380 | #include "confdefs.h" |
2381 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2382 | /* We use char because int might match the return type of a gcc2 | |
2383 | builtin and then its argument prototype would still apply. */ | |
2384 | char bindtextdomain(); | |
2385 | ||
2386 | int main() { | |
2387 | bindtextdomain() | |
2388 | ; return 0; } | |
2389 | EOF | |
0e5d83e3 | 2390 | if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2391 | rm -rf conftest* |
2392 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2393 | else | |
2394 | echo "configure: failed program was:" >&5 | |
2395 | cat conftest.$ac_ext >&5 | |
2396 | rm -rf conftest* | |
2397 | eval "ac_cv_lib_$ac_lib_var=no" | |
2398 | fi | |
2399 | rm -f conftest* | |
2400 | LIBS="$ac_save_LIBS" | |
2401 | ||
2402 | fi | |
2403 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2404 | echo "$ac_t""yes" 1>&6 | |
2405 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
0e5d83e3 | 2406 | echo "configure:2407: checking for gettext in libintl" >&5 |
c906108c SS |
2407 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2408 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2409 | else | |
2410 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2411 | #line 2412 "configure" |
c906108c SS |
2412 | #include "confdefs.h" |
2413 | ||
2414 | int main() { | |
2415 | return (int) gettext ("") | |
2416 | ; return 0; } | |
2417 | EOF | |
0e5d83e3 | 2418 | if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2419 | rm -rf conftest* |
2420 | gt_cv_func_gettext_libintl=yes | |
2421 | else | |
2422 | echo "configure: failed program was:" >&5 | |
2423 | cat conftest.$ac_ext >&5 | |
2424 | rm -rf conftest* | |
2425 | gt_cv_func_gettext_libintl=no | |
2426 | fi | |
2427 | rm -f conftest* | |
2428 | fi | |
2429 | ||
2430 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2431 | else | |
2432 | echo "$ac_t""no" 1>&6 | |
2433 | fi | |
2434 | ||
2435 | fi | |
2436 | ||
2437 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2438 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2439 | cat >> confdefs.h <<\EOF | |
2440 | #define HAVE_GETTEXT 1 | |
2441 | EOF | |
2442 | ||
2443 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2444 | set dummy msgfmt; ac_word=$2 | |
2445 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 2446 | echo "configure:2447: checking for $ac_word" >&5 |
c906108c SS |
2447 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2448 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2449 | else | |
2450 | case "$MSGFMT" in | |
2451 | /*) | |
2452 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2453 | ;; | |
2454 | *) | |
2455 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2456 | for ac_dir in $PATH; do | |
2457 | test -z "$ac_dir" && ac_dir=. | |
2458 | if test -f $ac_dir/$ac_word; then | |
2459 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2460 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2461 | break | |
2462 | fi | |
2463 | fi | |
2464 | done | |
2465 | IFS="$ac_save_ifs" | |
2466 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2467 | ;; | |
2468 | esac | |
2469 | fi | |
2470 | MSGFMT="$ac_cv_path_MSGFMT" | |
2471 | if test -n "$MSGFMT"; then | |
2472 | echo "$ac_t""$MSGFMT" 1>&6 | |
2473 | else | |
2474 | echo "$ac_t""no" 1>&6 | |
2475 | fi | |
2476 | if test "$MSGFMT" != "no"; then | |
2477 | for ac_func in dcgettext | |
2478 | do | |
2479 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 2480 | echo "configure:2481: checking for $ac_func" >&5 |
c906108c SS |
2481 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2482 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2483 | else | |
2484 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2485 | #line 2486 "configure" |
c906108c SS |
2486 | #include "confdefs.h" |
2487 | /* System header to define __stub macros and hopefully few prototypes, | |
2488 | which can conflict with char $ac_func(); below. */ | |
2489 | #include <assert.h> | |
2490 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2491 | /* We use char because int might match the return type of a gcc2 | |
2492 | builtin and then its argument prototype would still apply. */ | |
2493 | char $ac_func(); | |
2494 | ||
2495 | int main() { | |
2496 | ||
2497 | /* The GNU C library defines this for functions which it implements | |
2498 | to always fail with ENOSYS. Some functions are actually named | |
2499 | something starting with __ and the normal name is an alias. */ | |
2500 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2501 | choke me | |
2502 | #else | |
2503 | $ac_func(); | |
2504 | #endif | |
2505 | ||
2506 | ; return 0; } | |
2507 | EOF | |
0e5d83e3 | 2508 | if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2509 | rm -rf conftest* |
2510 | eval "ac_cv_func_$ac_func=yes" | |
2511 | else | |
2512 | echo "configure: failed program was:" >&5 | |
2513 | cat conftest.$ac_ext >&5 | |
2514 | rm -rf conftest* | |
2515 | eval "ac_cv_func_$ac_func=no" | |
2516 | fi | |
2517 | rm -f conftest* | |
2518 | fi | |
2519 | ||
2520 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2521 | echo "$ac_t""yes" 1>&6 | |
2522 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2523 | cat >> confdefs.h <<EOF | |
2524 | #define $ac_tr_func 1 | |
2525 | EOF | |
2526 | ||
2527 | else | |
2528 | echo "$ac_t""no" 1>&6 | |
2529 | fi | |
2530 | done | |
2531 | ||
2532 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2533 | set dummy gmsgfmt; ac_word=$2 | |
2534 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 2535 | echo "configure:2536: checking for $ac_word" >&5 |
c906108c SS |
2536 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2537 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2538 | else | |
2539 | case "$GMSGFMT" in | |
2540 | /*) | |
2541 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2542 | ;; | |
2543 | ?:/*) | |
2544 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2545 | ;; | |
2546 | *) | |
2547 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2548 | ac_dummy="$PATH" | |
2549 | for ac_dir in $ac_dummy; do | |
2550 | test -z "$ac_dir" && ac_dir=. | |
2551 | if test -f $ac_dir/$ac_word; then | |
2552 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2553 | break | |
2554 | fi | |
2555 | done | |
2556 | IFS="$ac_save_ifs" | |
2557 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2558 | ;; | |
2559 | esac | |
2560 | fi | |
2561 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2562 | if test -n "$GMSGFMT"; then | |
2563 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2564 | else | |
2565 | echo "$ac_t""no" 1>&6 | |
2566 | fi | |
2567 | ||
2568 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2569 | set dummy xgettext; ac_word=$2 | |
2570 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 2571 | echo "configure:2572: checking for $ac_word" >&5 |
c906108c SS |
2572 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2574 | else | |
2575 | case "$XGETTEXT" in | |
2576 | /*) | |
2577 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2578 | ;; | |
2579 | *) | |
2580 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2581 | for ac_dir in $PATH; do | |
2582 | test -z "$ac_dir" && ac_dir=. | |
2583 | if test -f $ac_dir/$ac_word; then | |
2584 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2585 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2586 | break | |
2587 | fi | |
2588 | fi | |
2589 | done | |
2590 | IFS="$ac_save_ifs" | |
2591 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2592 | ;; | |
2593 | esac | |
2594 | fi | |
2595 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2596 | if test -n "$XGETTEXT"; then | |
2597 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2598 | else | |
2599 | echo "$ac_t""no" 1>&6 | |
2600 | fi | |
2601 | ||
2602 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2603 | #line 2604 "configure" |
c906108c SS |
2604 | #include "confdefs.h" |
2605 | ||
2606 | int main() { | |
2607 | extern int _nl_msg_cat_cntr; | |
2608 | return _nl_msg_cat_cntr | |
2609 | ; return 0; } | |
2610 | EOF | |
0e5d83e3 | 2611 | if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2612 | rm -rf conftest* |
2613 | CATOBJEXT=.gmo | |
2614 | DATADIRNAME=share | |
2615 | else | |
2616 | echo "configure: failed program was:" >&5 | |
2617 | cat conftest.$ac_ext >&5 | |
2618 | rm -rf conftest* | |
2619 | CATOBJEXT=.mo | |
2620 | DATADIRNAME=lib | |
2621 | fi | |
2622 | rm -f conftest* | |
2623 | INSTOBJEXT=.mo | |
2624 | fi | |
2625 | fi | |
2626 | ||
2627 | else | |
2628 | echo "$ac_t""no" 1>&6 | |
2629 | fi | |
2630 | ||
2631 | ||
2632 | ||
2633 | if test "$CATOBJEXT" = "NONE"; then | |
2634 | nls_cv_use_gnu_gettext=yes | |
2635 | fi | |
2636 | fi | |
2637 | ||
2638 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2639 | INTLOBJS="\$(GETTOBJS)" | |
2640 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2641 | set dummy msgfmt; ac_word=$2 | |
2642 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 2643 | echo "configure:2644: checking for $ac_word" >&5 |
c906108c SS |
2644 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2645 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2646 | else | |
2647 | case "$MSGFMT" in | |
2648 | /*) | |
2649 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2650 | ;; | |
2651 | *) | |
2652 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2653 | for ac_dir in $PATH; do | |
2654 | test -z "$ac_dir" && ac_dir=. | |
2655 | if test -f $ac_dir/$ac_word; then | |
2656 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2657 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2658 | break | |
2659 | fi | |
2660 | fi | |
2661 | done | |
2662 | IFS="$ac_save_ifs" | |
2663 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2664 | ;; | |
2665 | esac | |
2666 | fi | |
2667 | MSGFMT="$ac_cv_path_MSGFMT" | |
2668 | if test -n "$MSGFMT"; then | |
2669 | echo "$ac_t""$MSGFMT" 1>&6 | |
2670 | else | |
2671 | echo "$ac_t""no" 1>&6 | |
2672 | fi | |
2673 | ||
2674 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2675 | set dummy gmsgfmt; ac_word=$2 | |
2676 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 2677 | echo "configure:2678: checking for $ac_word" >&5 |
c906108c SS |
2678 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2679 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2680 | else | |
2681 | case "$GMSGFMT" in | |
2682 | /*) | |
2683 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2684 | ;; | |
2685 | ?:/*) | |
2686 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2687 | ;; | |
2688 | *) | |
2689 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2690 | ac_dummy="$PATH" | |
2691 | for ac_dir in $ac_dummy; do | |
2692 | test -z "$ac_dir" && ac_dir=. | |
2693 | if test -f $ac_dir/$ac_word; then | |
2694 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2695 | break | |
2696 | fi | |
2697 | done | |
2698 | IFS="$ac_save_ifs" | |
2699 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2700 | ;; | |
2701 | esac | |
2702 | fi | |
2703 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2704 | if test -n "$GMSGFMT"; then | |
2705 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2706 | else | |
2707 | echo "$ac_t""no" 1>&6 | |
2708 | fi | |
2709 | ||
2710 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2711 | set dummy xgettext; ac_word=$2 | |
2712 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 2713 | echo "configure:2714: checking for $ac_word" >&5 |
c906108c SS |
2714 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2715 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2716 | else | |
2717 | case "$XGETTEXT" in | |
2718 | /*) | |
2719 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2720 | ;; | |
2721 | *) | |
2722 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2723 | for ac_dir in $PATH; do | |
2724 | test -z "$ac_dir" && ac_dir=. | |
2725 | if test -f $ac_dir/$ac_word; then | |
2726 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2727 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2728 | break | |
2729 | fi | |
2730 | fi | |
2731 | done | |
2732 | IFS="$ac_save_ifs" | |
2733 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2734 | ;; | |
2735 | esac | |
2736 | fi | |
2737 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2738 | if test -n "$XGETTEXT"; then | |
2739 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2740 | else | |
2741 | echo "$ac_t""no" 1>&6 | |
2742 | fi | |
2743 | ||
2744 | ||
2745 | USE_INCLUDED_LIBINTL=yes | |
2746 | CATOBJEXT=.gmo | |
2747 | INSTOBJEXT=.mo | |
2748 | DATADIRNAME=share | |
2749 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2750 | INTLLIBS=$INTLDEPS | |
2751 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2752 | nls_cv_header_intl=libintl.h | |
2753 | nls_cv_header_libgt=libgettext.h | |
2754 | fi | |
2755 | ||
2756 | if test "$XGETTEXT" != ":"; then | |
2757 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2758 | : ; | |
2759 | else | |
2760 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2761 | XGETTEXT=":" | |
2762 | fi | |
2763 | fi | |
2764 | ||
2765 | # We need to process the po/ directory. | |
2766 | POSUB=po | |
2767 | else | |
2768 | DATADIRNAME=share | |
2769 | nls_cv_header_intl=libintl.h | |
2770 | nls_cv_header_libgt=libgettext.h | |
2771 | fi | |
2772 | ||
2773 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2774 | # because some of the sources are only built for this goal. | |
2775 | if test "$PACKAGE" = gettext; then | |
2776 | USE_NLS=yes | |
2777 | USE_INCLUDED_LIBINTL=yes | |
2778 | fi | |
2779 | ||
2780 | for lang in $ALL_LINGUAS; do | |
2781 | GMOFILES="$GMOFILES $lang.gmo" | |
2782 | POFILES="$POFILES $lang.po" | |
2783 | done | |
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | ||
2792 | ||
2793 | ||
2794 | ||
2795 | ||
2796 | ||
2797 | ||
2798 | if test "x$CATOBJEXT" != "x"; then | |
2799 | if test "x$ALL_LINGUAS" = "x"; then | |
2800 | LINGUAS= | |
2801 | else | |
2802 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
0e5d83e3 | 2803 | echo "configure:2804: checking for catalogs to be installed" >&5 |
c906108c SS |
2804 | NEW_LINGUAS= |
2805 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2806 | case "$ALL_LINGUAS" in | |
2807 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2808 | esac | |
2809 | done | |
2810 | LINGUAS=$NEW_LINGUAS | |
2811 | echo "$ac_t""$LINGUAS" 1>&6 | |
2812 | fi | |
2813 | ||
2814 | if test -n "$LINGUAS"; then | |
2815 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2816 | fi | |
2817 | fi | |
2818 | ||
2819 | if test $ac_cv_header_locale_h = yes; then | |
2820 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2821 | else | |
2822 | INCLUDE_LOCALE_H="\ | |
2823 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2824 | fi | |
2825 | ||
2826 | ||
2827 | if test -f $srcdir/po2tbl.sed.in; then | |
2828 | if test "$CATOBJEXT" = ".cat"; then | |
2829 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2830 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
0e5d83e3 | 2831 | echo "configure:2832: checking for linux/version.h" >&5 |
c906108c SS |
2832 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2834 | else | |
2835 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 2836 | #line 2837 "configure" |
c906108c SS |
2837 | #include "confdefs.h" |
2838 | #include <linux/version.h> | |
2839 | EOF | |
2840 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 2841 | { (eval echo configure:2842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2842 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2843 | if test -z "$ac_err"; then | |
2844 | rm -rf conftest* | |
2845 | eval "ac_cv_header_$ac_safe=yes" | |
2846 | else | |
2847 | echo "$ac_err" >&5 | |
2848 | echo "configure: failed program was:" >&5 | |
2849 | cat conftest.$ac_ext >&5 | |
2850 | rm -rf conftest* | |
2851 | eval "ac_cv_header_$ac_safe=no" | |
2852 | fi | |
2853 | rm -f conftest* | |
2854 | fi | |
2855 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2856 | echo "$ac_t""yes" 1>&6 | |
2857 | msgformat=linux | |
2858 | else | |
2859 | echo "$ac_t""no" 1>&6 | |
2860 | msgformat=xopen | |
2861 | fi | |
2862 | ||
2863 | ||
2864 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2865 | fi | |
2866 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2867 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2868 | fi | |
2869 | ||
2870 | if test "$PACKAGE" = "gettext"; then | |
2871 | GT_NO="#NO#" | |
2872 | GT_YES= | |
2873 | else | |
2874 | GT_NO= | |
2875 | GT_YES="#YES#" | |
2876 | fi | |
2877 | ||
2878 | ||
2879 | ||
2880 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2881 | ||
2882 | ||
2883 | l= | |
2884 | ||
2885 | ||
4536bbc6 | 2886 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2887 | test -d po || mkdir po |
2888 | if test "x$srcdir" != "x."; then | |
2889 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2890 | posrcprefix="$srcdir/" | |
2891 | else | |
2892 | posrcprefix="../$srcdir/" | |
2893 | fi | |
2894 | else | |
2895 | posrcprefix="../" | |
2896 | fi | |
2897 | rm -f po/POTFILES | |
2898 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2899 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2900 | fi | |
2901 | ||
0fbb3da7 TT |
2902 | cat >> confdefs.h <<\EOF |
2903 | #define PACKAGE "gdb" | |
2904 | EOF | |
2905 | ||
2906 | ||
5b5d99cf JB |
2907 | debugdir=${libdir}/debug |
2908 | ||
2909 | # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given. | |
2910 | if test "${with_separate_debug_dir+set}" = set; then | |
2911 | withval="$with_separate_debug_dir" | |
2912 | debugdir="${withval}" | |
2913 | fi | |
2914 | ||
2915 | ||
2916 | ||
2917 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
2918 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2919 | ac_define_dir=`eval echo $debugdir` | |
2920 | ac_define_dir=`eval echo $ac_define_dir` | |
2921 | cat >> confdefs.h <<EOF | |
2922 | #define DEBUGDIR "$ac_define_dir" | |
2923 | EOF | |
2924 | ||
2925 | ||
2926 | #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"), | |
c906108c SS |
2927 | |
2928 | ||
2929 | CONFIG_OBS= | |
66b965bb | 2930 | CONFIG_LIB_OBS= |
c906108c SS |
2931 | CONFIG_DEPS= |
2932 | CONFIG_SRCS= | |
fb40c209 AC |
2933 | CONFIG_INITS= |
2934 | ENABLE_CFLAGS= | |
b3a90332 AC |
2935 | CONFIG_ALL= |
2936 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2937 | CONFIG_INSTALL= |
2938 | CONFIG_UNINSTALL= | |
c906108c | 2939 | |
8dcde887 | 2940 | subdirs="doc testsuite" |
96baa820 | 2941 | |
8dcde887 | 2942 | configdirs= |
96baa820 | 2943 | |
27e9bf90 | 2944 | . $srcdir/configure.host |
c906108c | 2945 | |
27e9bf90 | 2946 | . $srcdir/configure.tgt |
c906108c | 2947 | |
27e9bf90 MK |
2948 | # Fetch the default architecture and default target vector from BFD. |
2949 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2950 | |
27e9bf90 MK |
2951 | # We only want the first architecture, so strip off the others if |
2952 | # there is more than one. | |
2953 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2954 | |
27e9bf90 MK |
2955 | if test "x$targ_archs" != x; then |
2956 | cat >> confdefs.h <<EOF | |
2957 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2958 | EOF |
2959 | ||
2960 | fi | |
27e9bf90 MK |
2961 | if test "x$targ_defvec" != x; then |
2962 | cat >> confdefs.h <<EOF | |
2963 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2964 | EOF |
2965 | ||
2966 | fi | |
c906108c | 2967 | |
8bb2c122 MK |
2968 | if test "$program_transform_name" = s,x,x,; then |
2969 | program_transform_name= | |
2970 | else | |
2971 | # Double any \ or $. echo might interpret backslashes. | |
2972 | cat <<\EOF_SED > conftestsed | |
2973 | s,\\,\\\\,g; s,\$,$$,g | |
2974 | EOF_SED | |
2975 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2976 | rm -f conftestsed | |
2977 | fi | |
2978 | test "$program_prefix" != NONE && | |
2979 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2980 | # Use a double $ so make ignores it. | |
2981 | test "$program_suffix" != NONE && | |
2982 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2983 | ||
2984 | # sed with no file args requires a program. | |
2985 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2986 | ||
2987 | ||
627af7ea MK |
2988 | # The CLI cannot be disabled yet, but may be in the future. |
2989 | ||
2990 | # Enable CLI. | |
2991 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2992 | if test "${enable_gdbcli+set}" = set; then | |
2993 | enableval="$enable_gdbcli" | |
2994 | case $enableval in | |
2995 | yes) | |
2996 | ;; | |
2997 | no) | |
2998 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2999 | *) | |
3000 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
3001 | esac | |
3002 | else | |
3003 | enable_gdbcli=yes | |
3004 | fi | |
3005 | ||
3006 | if test x"$enable_gdbcli" = xyes; then | |
3007 | if test -d $srcdir/cli; then | |
3008 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
3009 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
3010 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
3011 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
3012 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
3013 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
3014 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
3015 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
3016 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
3017 | fi | |
3018 | fi | |
3019 | ||
3020 | # Enable MI. | |
3021 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
3022 | if test "${enable_gdbmi+set}" = set; then | |
3023 | enableval="$enable_gdbmi" | |
3024 | case $enableval in | |
3025 | yes | no) | |
3026 | ;; | |
3027 | *) | |
3028 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3029 | esac | |
3030 | else | |
3031 | enable_gdbmi=yes | |
3032 | fi | |
3033 | ||
3034 | if test x"$enable_gdbmi" = xyes; then | |
3035 | if test -d $srcdir/mi; then | |
3036 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3037 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3038 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3039 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3040 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3041 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3042 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3043 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3044 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3045 | fi | |
3046 | fi | |
3047 | ||
06825bd1 MK |
3048 | # Enable TUI. |
3049 | # Check whether --enable-tui or --disable-tui was given. | |
3050 | if test "${enable_tui+set}" = set; then | |
3051 | enableval="$enable_tui" | |
3052 | case $enableval in | |
3053 | yes | no) | |
3054 | ;; | |
3055 | *) | |
3056 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3057 | esac | |
3058 | fi | |
3059 | ||
3060 | if test x"$enable_tui" = xyes; then | |
3061 | if test -d $srcdir/tui; then | |
3062 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3063 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3064 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3065 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3066 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3067 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3068 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3069 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3070 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3071 | need_curses=yes | |
3072 | fi | |
3073 | fi | |
3074 | ||
8ee53726 MK |
3075 | # Enable gdbtk. |
3076 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3077 | if test "${enable_gdbtk+set}" = set; then | |
3078 | enableval="$enable_gdbtk" | |
3079 | case $enableval in | |
3080 | yes | no) | |
3081 | ;; | |
3082 | *) | |
3083 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3084 | esac | |
3085 | else | |
3086 | if test -d $srcdir/gdbtk; then | |
3087 | enable_gdbtk=yes | |
3088 | else | |
3089 | enable_gdbtk=no | |
3090 | fi | |
3091 | fi | |
3092 | ||
3093 | # We unconditionally disable gdbtk tests on selected platforms. | |
3094 | case $host_os in | |
3095 | go32* | windows*) | |
3096 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3097 | enable_gdbtk=no ;; | |
3098 | esac | |
3099 | ||
0e5d83e3 JJ |
3100 | # Libunwind support. |
3101 | # Check whether --with-libunwind or --without-libunwind was given. | |
3102 | if test "${with_libunwind+set}" = set; then | |
3103 | withval="$with_libunwind" | |
3104 | case "${withval}" in | |
3105 | yes) enable_libunwind=yes ;; | |
3106 | no) enable_libunwind=no ;; | |
3107 | *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;; | |
3108 | esac | |
3109 | else | |
3110 | ||
3111 | for ac_hdr in libunwind.h | |
3112 | do | |
3113 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3114 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3115 | echo "configure:3116: checking for $ac_hdr" >&5 | |
3116 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3117 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3118 | else | |
3119 | cat > conftest.$ac_ext <<EOF | |
3120 | #line 3121 "configure" | |
3121 | #include "confdefs.h" | |
3122 | #include <$ac_hdr> | |
3123 | EOF | |
3124 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3125 | { (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3126 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3127 | if test -z "$ac_err"; then | |
3128 | rm -rf conftest* | |
3129 | eval "ac_cv_header_$ac_safe=yes" | |
3130 | else | |
3131 | echo "$ac_err" >&5 | |
3132 | echo "configure: failed program was:" >&5 | |
3133 | cat conftest.$ac_ext >&5 | |
3134 | rm -rf conftest* | |
3135 | eval "ac_cv_header_$ac_safe=no" | |
3136 | fi | |
3137 | rm -f conftest* | |
3138 | fi | |
3139 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3140 | echo "$ac_t""yes" 1>&6 | |
3141 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3142 | cat >> confdefs.h <<EOF | |
3143 | #define $ac_tr_hdr 1 | |
3144 | EOF | |
3145 | ||
3146 | else | |
3147 | echo "$ac_t""no" 1>&6 | |
3148 | fi | |
3149 | done | |
3150 | ||
3151 | for ac_hdr in libunwind-ia64.h | |
3152 | do | |
3153 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3154 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3155 | echo "configure:3156: checking for $ac_hdr" >&5 | |
3156 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3157 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3158 | else | |
3159 | cat > conftest.$ac_ext <<EOF | |
3160 | #line 3161 "configure" | |
3161 | #include "confdefs.h" | |
3162 | #include <$ac_hdr> | |
3163 | EOF | |
3164 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3165 | { (eval echo configure:3166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3166 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3167 | if test -z "$ac_err"; then | |
3168 | rm -rf conftest* | |
3169 | eval "ac_cv_header_$ac_safe=yes" | |
3170 | else | |
3171 | echo "$ac_err" >&5 | |
3172 | echo "configure: failed program was:" >&5 | |
3173 | cat conftest.$ac_ext >&5 | |
3174 | rm -rf conftest* | |
3175 | eval "ac_cv_header_$ac_safe=no" | |
3176 | fi | |
3177 | rm -f conftest* | |
3178 | fi | |
3179 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3180 | echo "$ac_t""yes" 1>&6 | |
3181 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3182 | cat >> confdefs.h <<EOF | |
3183 | #define $ac_tr_hdr 1 | |
3184 | EOF | |
3185 | ||
3186 | else | |
3187 | echo "$ac_t""no" 1>&6 | |
3188 | fi | |
3189 | done | |
3190 | ||
3191 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then | |
3192 | enable_libunwind=yes; | |
3193 | fi | |
3194 | ||
3195 | fi | |
3196 | ||
3197 | ||
3198 | if test x"$enable_libunwind" = xyes; then | |
3199 | for ac_hdr in libunwind.h | |
3200 | do | |
3201 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3202 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3203 | echo "configure:3204: checking for $ac_hdr" >&5 | |
3204 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3205 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3206 | else | |
3207 | cat > conftest.$ac_ext <<EOF | |
3208 | #line 3209 "configure" | |
3209 | #include "confdefs.h" | |
3210 | #include <$ac_hdr> | |
3211 | EOF | |
3212 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3213 | { (eval echo configure:3214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3214 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3215 | if test -z "$ac_err"; then | |
3216 | rm -rf conftest* | |
3217 | eval "ac_cv_header_$ac_safe=yes" | |
3218 | else | |
3219 | echo "$ac_err" >&5 | |
3220 | echo "configure: failed program was:" >&5 | |
3221 | cat conftest.$ac_ext >&5 | |
3222 | rm -rf conftest* | |
3223 | eval "ac_cv_header_$ac_safe=no" | |
3224 | fi | |
3225 | rm -f conftest* | |
3226 | fi | |
3227 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3228 | echo "$ac_t""yes" 1>&6 | |
3229 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3230 | cat >> confdefs.h <<EOF | |
3231 | #define $ac_tr_hdr 1 | |
3232 | EOF | |
3233 | ||
3234 | else | |
3235 | echo "$ac_t""no" 1>&6 | |
3236 | fi | |
3237 | done | |
3238 | ||
3239 | for ac_hdr in libunwind-ia64.h | |
3240 | do | |
3241 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3242 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3243 | echo "configure:3244: checking for $ac_hdr" >&5 | |
3244 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3245 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3246 | else | |
3247 | cat > conftest.$ac_ext <<EOF | |
3248 | #line 3249 "configure" | |
3249 | #include "confdefs.h" | |
3250 | #include <$ac_hdr> | |
3251 | EOF | |
3252 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3253 | { (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3254 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3255 | if test -z "$ac_err"; then | |
3256 | rm -rf conftest* | |
3257 | eval "ac_cv_header_$ac_safe=yes" | |
3258 | else | |
3259 | echo "$ac_err" >&5 | |
3260 | echo "configure: failed program was:" >&5 | |
3261 | cat conftest.$ac_ext >&5 | |
3262 | rm -rf conftest* | |
3263 | eval "ac_cv_header_$ac_safe=no" | |
3264 | fi | |
3265 | rm -f conftest* | |
3266 | fi | |
3267 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3268 | echo "$ac_t""yes" 1>&6 | |
3269 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3270 | cat >> confdefs.h <<EOF | |
3271 | #define $ac_tr_hdr 1 | |
3272 | EOF | |
3273 | ||
3274 | else | |
3275 | echo "$ac_t""no" 1>&6 | |
3276 | fi | |
3277 | done | |
3278 | ||
3279 | cat >> confdefs.h <<\EOF | |
3280 | #define HAVE_LIBUNWIND 1 | |
3281 | EOF | |
3282 | ||
3283 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
3284 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
3285 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
3286 | fi | |
3287 | ||
d28f9cdf DJ |
3288 | # Profiling support. |
3289 | # Check whether --enable-profiling or --disable-profiling was given. | |
3290 | if test "${enable_profiling+set}" = set; then | |
3291 | enableval="$enable_profiling" | |
3292 | case $enableval in | |
3293 | yes | no) | |
3294 | ;; | |
3295 | *) | |
3296 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3297 | esac | |
3298 | else | |
3299 | enable_profiling=no | |
3300 | fi | |
3301 | ||
3302 | ||
d9feb4e7 DJ |
3303 | for ac_func in monstartup _mcleanup |
3304 | do | |
3305 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 3306 | echo "configure:3307: checking for $ac_func" >&5 |
d9feb4e7 | 3307 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
d28f9cdf DJ |
3308 | echo $ac_n "(cached) $ac_c" 1>&6 |
3309 | else | |
3310 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3311 | #line 3312 "configure" |
d28f9cdf DJ |
3312 | #include "confdefs.h" |
3313 | /* System header to define __stub macros and hopefully few prototypes, | |
d9feb4e7 | 3314 | which can conflict with char $ac_func(); below. */ |
d28f9cdf DJ |
3315 | #include <assert.h> |
3316 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3317 | /* We use char because int might match the return type of a gcc2 | |
3318 | builtin and then its argument prototype would still apply. */ | |
d9feb4e7 | 3319 | char $ac_func(); |
d28f9cdf DJ |
3320 | |
3321 | int main() { | |
3322 | ||
3323 | /* The GNU C library defines this for functions which it implements | |
3324 | to always fail with ENOSYS. Some functions are actually named | |
3325 | something starting with __ and the normal name is an alias. */ | |
d9feb4e7 | 3326 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
d28f9cdf DJ |
3327 | choke me |
3328 | #else | |
d9feb4e7 | 3329 | $ac_func(); |
d28f9cdf DJ |
3330 | #endif |
3331 | ||
3332 | ; return 0; } | |
3333 | EOF | |
0e5d83e3 | 3334 | if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf | 3335 | rm -rf conftest* |
d9feb4e7 | 3336 | eval "ac_cv_func_$ac_func=yes" |
d28f9cdf DJ |
3337 | else |
3338 | echo "configure: failed program was:" >&5 | |
3339 | cat conftest.$ac_ext >&5 | |
3340 | rm -rf conftest* | |
d9feb4e7 | 3341 | eval "ac_cv_func_$ac_func=no" |
d28f9cdf DJ |
3342 | fi |
3343 | rm -f conftest* | |
3344 | fi | |
3345 | ||
d9feb4e7 | 3346 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
d28f9cdf | 3347 | echo "$ac_t""yes" 1>&6 |
d9feb4e7 DJ |
3348 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
3349 | cat >> confdefs.h <<EOF | |
3350 | #define $ac_tr_func 1 | |
3351 | EOF | |
3352 | ||
d28f9cdf DJ |
3353 | else |
3354 | echo "$ac_t""no" 1>&6 | |
d28f9cdf | 3355 | fi |
d9feb4e7 | 3356 | done |
d28f9cdf | 3357 | |
b0b1c2c0 | 3358 | echo $ac_n "checking for _etext""... $ac_c" 1>&6 |
0e5d83e3 | 3359 | echo "configure:3360: checking for _etext" >&5 |
b0b1c2c0 MK |
3360 | if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then |
3361 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3362 | else | |
3363 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3364 | #line 3365 "configure" |
b0b1c2c0 MK |
3365 | #include "confdefs.h" |
3366 | #include <stdlib.h> | |
3367 | extern char _etext; | |
3368 | ||
3369 | int main() { | |
3370 | free (&_etext); | |
3371 | ; return 0; } | |
3372 | EOF | |
0e5d83e3 | 3373 | if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b0b1c2c0 MK |
3374 | rm -rf conftest* |
3375 | ac_cv_var__etext=yes | |
3376 | else | |
3377 | echo "configure: failed program was:" >&5 | |
3378 | cat conftest.$ac_ext >&5 | |
3379 | rm -rf conftest* | |
3380 | ac_cv_var__etext=no | |
3381 | fi | |
3382 | rm -f conftest* | |
3383 | fi | |
3384 | ||
3385 | echo "$ac_t""$ac_cv_var__etext" 1>&6 | |
3386 | if test $ac_cv_var__etext = yes; then | |
3387 | cat >> confdefs.h <<\EOF | |
3388 | #define HAVE__ETEXT 1 | |
3389 | EOF | |
3390 | ||
3391 | fi | |
d9feb4e7 DJ |
3392 | if test "$enable_profiling" = yes ; then |
3393 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
3394 | { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; } | |
3395 | fi | |
3396 | PROFILE_CFLAGS=-pg | |
3397 | OLD_CFLAGS="$CFLAGS" | |
3398 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
d28f9cdf | 3399 | |
d9feb4e7 | 3400 | echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6 |
0e5d83e3 | 3401 | echo "configure:3402: checking whether $CC supports -pg" >&5 |
d9feb4e7 | 3402 | if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then |
d28f9cdf DJ |
3403 | echo $ac_n "(cached) $ac_c" 1>&6 |
3404 | else | |
3405 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3406 | #line 3407 "configure" |
d28f9cdf | 3407 | #include "confdefs.h" |
d28f9cdf DJ |
3408 | |
3409 | int main() { | |
d9feb4e7 | 3410 | int x; |
d28f9cdf DJ |
3411 | ; return 0; } |
3412 | EOF | |
0e5d83e3 | 3413 | if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d28f9cdf | 3414 | rm -rf conftest* |
d9feb4e7 | 3415 | ac_cv_cc_supports_pg=yes |
d28f9cdf DJ |
3416 | else |
3417 | echo "configure: failed program was:" >&5 | |
3418 | cat conftest.$ac_ext >&5 | |
3419 | rm -rf conftest* | |
d9feb4e7 | 3420 | ac_cv_cc_supports_pg=no |
d28f9cdf DJ |
3421 | fi |
3422 | rm -f conftest* | |
3423 | fi | |
3424 | ||
d9feb4e7 | 3425 | echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6 |
d28f9cdf | 3426 | |
d9feb4e7 DJ |
3427 | if test $ac_cv_cc_supports_pg = no; then |
3428 | { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; } | |
3429 | fi | |
d28f9cdf DJ |
3430 | |
3431 | CFLAGS="$OLD_CFLAGS" | |
3432 | fi | |
3433 | ||
8bb2c122 MK |
3434 | # --------------------- # |
3435 | # Checks for programs. # | |
3436 | # --------------------- # | |
3437 | ||
27ca5dad | 3438 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3439 | do |
3440 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3441 | set dummy $ac_prog; ac_word=$2 | |
3442 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 3443 | echo "configure:3444: checking for $ac_word" >&5 |
7a292a7a SS |
3444 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3445 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3446 | else | |
3447 | if test -n "$AWK"; then | |
3448 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3449 | else | |
3450 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3451 | ac_dummy="$PATH" | |
3452 | for ac_dir in $ac_dummy; do | |
3453 | test -z "$ac_dir" && ac_dir=. | |
3454 | if test -f $ac_dir/$ac_word; then | |
3455 | ac_cv_prog_AWK="$ac_prog" | |
3456 | break | |
3457 | fi | |
3458 | done | |
3459 | IFS="$ac_save_ifs" | |
3460 | fi | |
3461 | fi | |
3462 | AWK="$ac_cv_prog_AWK" | |
3463 | if test -n "$AWK"; then | |
3464 | echo "$ac_t""$AWK" 1>&6 | |
3465 | else | |
3466 | echo "$ac_t""no" 1>&6 | |
3467 | fi | |
3468 | ||
3469 | test -n "$AWK" && break | |
3470 | done | |
3471 | ||
c906108c SS |
3472 | # Find a good install program. We prefer a C program (faster), |
3473 | # so one script is as good as another. But avoid the broken or | |
3474 | # incompatible versions: | |
3475 | # SysV /etc/install, /usr/sbin/install | |
3476 | # SunOS /usr/etc/install | |
3477 | # IRIX /sbin/install | |
3478 | # AIX /bin/install | |
3479 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3480 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3481 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3482 | # ./install, which can be erroneously created by make from ./install.sh. | |
3483 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
0e5d83e3 | 3484 | echo "configure:3485: checking for a BSD compatible install" >&5 |
c906108c SS |
3485 | if test -z "$INSTALL"; then |
3486 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3487 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3488 | else | |
3489 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3490 | for ac_dir in $PATH; do | |
3491 | # Account for people who put trailing slashes in PATH elements. | |
3492 | case "$ac_dir/" in | |
3493 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3494 | *) | |
3495 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3496 | # Don't use installbsd from OSF since it installs stuff as root | |
3497 | # by default. | |
3498 | for ac_prog in ginstall scoinst install; do | |
3499 | if test -f $ac_dir/$ac_prog; then | |
3500 | if test $ac_prog = install && | |
3501 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3502 | # AIX install. It has an incompatible calling convention. | |
3503 | : | |
3504 | else | |
3505 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3506 | break 2 | |
3507 | fi | |
3508 | fi | |
3509 | done | |
3510 | ;; | |
3511 | esac | |
3512 | done | |
3513 | IFS="$ac_save_IFS" | |
3514 | ||
3515 | fi | |
3516 | if test "${ac_cv_path_install+set}" = set; then | |
3517 | INSTALL="$ac_cv_path_install" | |
3518 | else | |
3519 | # As a last resort, use the slow shell script. We don't cache a | |
3520 | # path for INSTALL within a source directory, because that will | |
3521 | # break other packages using the cache if that directory is | |
3522 | # removed, or if the path is relative. | |
3523 | INSTALL="$ac_install_sh" | |
3524 | fi | |
3525 | fi | |
3526 | echo "$ac_t""$INSTALL" 1>&6 | |
3527 | ||
3528 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3529 | # It thinks the first close brace ends the variable substitution. | |
3530 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3531 | ||
3532 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3533 | ||
3534 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3535 | ||
8bb2c122 | 3536 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
0e5d83e3 | 3537 | echo "configure:3538: checking whether ln -s works" >&5 |
8bb2c122 MK |
3538 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3539 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3540 | else |
8bb2c122 MK |
3541 | rm -f conftestdata |
3542 | if ln -s X conftestdata 2>/dev/null | |
3543 | then | |
3544 | rm -f conftestdata | |
3545 | ac_cv_prog_LN_S="ln -s" | |
3546 | else | |
3547 | ac_cv_prog_LN_S=ln | |
3548 | fi | |
3549 | fi | |
3550 | LN_S="$ac_cv_prog_LN_S" | |
3551 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3552 | echo "$ac_t""yes" 1>&6 | |
3553 | else | |
3554 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3555 | fi |
3556 | ||
8bb2c122 MK |
3557 | # Extract the first word of "ranlib", so it can be a program name with args. |
3558 | set dummy ranlib; ac_word=$2 | |
c906108c | 3559 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
0e5d83e3 | 3560 | echo "configure:3561: checking for $ac_word" >&5 |
8bb2c122 | 3561 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3562 | echo $ac_n "(cached) $ac_c" 1>&6 |
3563 | else | |
8bb2c122 MK |
3564 | if test -n "$RANLIB"; then |
3565 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3566 | else |
3567 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3568 | ac_dummy="$PATH" | |
3569 | for ac_dir in $ac_dummy; do | |
3570 | test -z "$ac_dir" && ac_dir=. | |
3571 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3572 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3573 | break |
3574 | fi | |
3575 | done | |
3576 | IFS="$ac_save_ifs" | |
8bb2c122 | 3577 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3578 | fi |
3579 | fi | |
8bb2c122 MK |
3580 | RANLIB="$ac_cv_prog_RANLIB" |
3581 | if test -n "$RANLIB"; then | |
3582 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3583 | else |
3584 | echo "$ac_t""no" 1>&6 | |
3585 | fi | |
3586 | ||
8bb2c122 MK |
3587 | for ac_prog in 'bison -y' byacc |
3588 | do | |
3589 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3590 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3591 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
0e5d83e3 | 3592 | echo "configure:3593: checking for $ac_word" >&5 |
8bb2c122 | 3593 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3594 | echo $ac_n "(cached) $ac_c" 1>&6 |
3595 | else | |
8bb2c122 MK |
3596 | if test -n "$YACC"; then |
3597 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3598 | else |
3599 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3600 | ac_dummy="$PATH" | |
3601 | for ac_dir in $ac_dummy; do | |
3602 | test -z "$ac_dir" && ac_dir=. | |
3603 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3604 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3605 | break |
3606 | fi | |
3607 | done | |
3608 | IFS="$ac_save_ifs" | |
3609 | fi | |
3610 | fi | |
8bb2c122 MK |
3611 | YACC="$ac_cv_prog_YACC" |
3612 | if test -n "$YACC"; then | |
3613 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3614 | else |
3615 | echo "$ac_t""no" 1>&6 | |
3616 | fi | |
3617 | ||
8bb2c122 MK |
3618 | test -n "$YACC" && break |
3619 | done | |
3620 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3621 | |
8bb2c122 MK |
3622 | |
3623 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3624 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3625 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
0e5d83e3 | 3626 | echo "configure:3627: checking for $ac_word" >&5 |
8bb2c122 | 3627 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3628 | echo $ac_n "(cached) $ac_c" 1>&6 |
3629 | else | |
8bb2c122 MK |
3630 | if test -n "$AR"; then |
3631 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3632 | else |
3633 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3634 | ac_dummy="$PATH" | |
3635 | for ac_dir in $ac_dummy; do | |
3636 | test -z "$ac_dir" && ac_dir=. | |
3637 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3638 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3639 | break |
3640 | fi | |
3641 | done | |
3642 | IFS="$ac_save_ifs" | |
8bb2c122 | 3643 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3644 | fi |
3645 | fi | |
8bb2c122 MK |
3646 | AR="$ac_cv_prog_AR" |
3647 | if test -n "$AR"; then | |
3648 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3649 | else |
3650 | echo "$ac_t""no" 1>&6 | |
3651 | fi | |
3652 | ||
8bb2c122 | 3653 | |
c906108c | 3654 | |
95ca63c4 CF |
3655 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3656 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3657 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 3658 | echo "configure:3659: checking for $ac_word" >&5 |
95ca63c4 CF |
3659 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3660 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3661 | else | |
3662 | if test -n "$DLLTOOL"; then | |
3663 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3664 | else | |
3665 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3666 | ac_dummy="$PATH" | |
3667 | for ac_dir in $ac_dummy; do | |
3668 | test -z "$ac_dir" && ac_dir=. | |
3669 | if test -f $ac_dir/$ac_word; then | |
3670 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3671 | break | |
3672 | fi | |
3673 | done | |
3674 | IFS="$ac_save_ifs" | |
3675 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3676 | fi | |
3677 | fi | |
3678 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3679 | if test -n "$DLLTOOL"; then | |
3680 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3681 | else | |
3682 | echo "$ac_t""no" 1>&6 | |
3683 | fi | |
3684 | ||
3685 | ||
3686 | ||
3687 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3688 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3689 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 3690 | echo "configure:3691: checking for $ac_word" >&5 |
95ca63c4 CF |
3691 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3692 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3693 | else | |
3694 | if test -n "$WINDRES"; then | |
3695 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3696 | else | |
3697 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3698 | ac_dummy="$PATH" | |
3699 | for ac_dir in $ac_dummy; do | |
3700 | test -z "$ac_dir" && ac_dir=. | |
3701 | if test -f $ac_dir/$ac_word; then | |
3702 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3703 | break | |
3704 | fi | |
3705 | done | |
3706 | IFS="$ac_save_ifs" | |
3707 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3708 | fi | |
3709 | fi | |
3710 | WINDRES="$ac_cv_prog_WINDRES" | |
3711 | if test -n "$WINDRES"; then | |
3712 | echo "$ac_t""$WINDRES" 1>&6 | |
3713 | else | |
3714 | echo "$ac_t""no" 1>&6 | |
3715 | fi | |
3716 | ||
3717 | ||
3718 | ||
c906108c | 3719 | |
8bb2c122 | 3720 | # Needed for GNU/Hurd. |
75c6e08a MK |
3721 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3722 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3723 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0e5d83e3 | 3724 | echo "configure:3725: checking for $ac_word" >&5 |
75c6e08a MK |
3725 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3726 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3727 | else | |
3728 | if test -n "$MIG"; then | |
3729 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3730 | else | |
3731 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3732 | ac_dummy="$PATH" | |
3733 | for ac_dir in $ac_dummy; do | |
3734 | test -z "$ac_dir" && ac_dir=. | |
3735 | if test -f $ac_dir/$ac_word; then | |
3736 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3737 | break | |
3738 | fi | |
3739 | done | |
3740 | IFS="$ac_save_ifs" | |
3741 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3742 | fi | |
3743 | fi | |
3744 | MIG="$ac_cv_prog_MIG" | |
3745 | if test -n "$MIG"; then | |
3746 | echo "$ac_t""$MIG" 1>&6 | |
3747 | else | |
3748 | echo "$ac_t""no" 1>&6 | |
3749 | fi | |
3750 | ||
3751 | ||
3752 | ||
3753 | ||
9a156167 MK |
3754 | # ---------------------- # |
3755 | # Checks for libraries. # | |
3756 | # ---------------------- # | |
3757 | ||
3758 | # We might need to link with -lm; most simulators need it. | |
3759 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
0e5d83e3 | 3760 | echo "configure:3761: checking for main in -lm" >&5 |
9a156167 MK |
3761 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3762 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3763 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3764 | else | |
3765 | ac_save_LIBS="$LIBS" | |
3766 | LIBS="-lm $LIBS" | |
3767 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3768 | #line 3769 "configure" |
9a156167 MK |
3769 | #include "confdefs.h" |
3770 | ||
3771 | int main() { | |
3772 | main() | |
3773 | ; return 0; } | |
3774 | EOF | |
0e5d83e3 | 3775 | if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3776 | rm -rf conftest* |
3777 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3778 | else | |
3779 | echo "configure: failed program was:" >&5 | |
3780 | cat conftest.$ac_ext >&5 | |
3781 | rm -rf conftest* | |
3782 | eval "ac_cv_lib_$ac_lib_var=no" | |
3783 | fi | |
3784 | rm -f conftest* | |
3785 | LIBS="$ac_save_LIBS" | |
3786 | ||
3787 | fi | |
3788 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3789 | echo "$ac_t""yes" 1>&6 | |
3790 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3791 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3792 | cat >> confdefs.h <<EOF | |
3793 | #define $ac_tr_lib 1 | |
3794 | EOF | |
3795 | ||
3796 | LIBS="-lm $LIBS" | |
3797 | ||
3798 | else | |
3799 | echo "$ac_t""no" 1>&6 | |
3800 | fi | |
3801 | ||
3802 | ||
3803 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3804 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3805 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3806 | # is known to have this problem). Therefore we avoid libw if we can. | |
3807 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
0e5d83e3 | 3808 | echo "configure:3809: checking for wctype" >&5 |
9a156167 MK |
3809 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3810 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3811 | else | |
3812 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3813 | #line 3814 "configure" |
9a156167 MK |
3814 | #include "confdefs.h" |
3815 | /* System header to define __stub macros and hopefully few prototypes, | |
3816 | which can conflict with char wctype(); below. */ | |
3817 | #include <assert.h> | |
3818 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3819 | /* We use char because int might match the return type of a gcc2 | |
3820 | builtin and then its argument prototype would still apply. */ | |
3821 | char wctype(); | |
3822 | ||
3823 | int main() { | |
3824 | ||
3825 | /* The GNU C library defines this for functions which it implements | |
3826 | to always fail with ENOSYS. Some functions are actually named | |
3827 | something starting with __ and the normal name is an alias. */ | |
3828 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3829 | choke me | |
3830 | #else | |
3831 | wctype(); | |
3832 | #endif | |
3833 | ||
3834 | ; return 0; } | |
3835 | EOF | |
0e5d83e3 | 3836 | if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3837 | rm -rf conftest* |
3838 | eval "ac_cv_func_wctype=yes" | |
3839 | else | |
3840 | echo "configure: failed program was:" >&5 | |
3841 | cat conftest.$ac_ext >&5 | |
3842 | rm -rf conftest* | |
3843 | eval "ac_cv_func_wctype=no" | |
3844 | fi | |
3845 | rm -f conftest* | |
3846 | fi | |
3847 | ||
3848 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3849 | echo "$ac_t""yes" 1>&6 | |
3850 | : | |
3851 | else | |
3852 | echo "$ac_t""no" 1>&6 | |
3853 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
0e5d83e3 | 3854 | echo "configure:3855: checking for wctype in -lw" >&5 |
9a156167 MK |
3855 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3856 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3857 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3858 | else | |
3859 | ac_save_LIBS="$LIBS" | |
3860 | LIBS="-lw $LIBS" | |
3861 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3862 | #line 3863 "configure" |
9a156167 MK |
3863 | #include "confdefs.h" |
3864 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3865 | /* We use char because int might match the return type of a gcc2 | |
3866 | builtin and then its argument prototype would still apply. */ | |
3867 | char wctype(); | |
3868 | ||
3869 | int main() { | |
3870 | wctype() | |
3871 | ; return 0; } | |
3872 | EOF | |
0e5d83e3 | 3873 | if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3874 | rm -rf conftest* |
3875 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3876 | else | |
3877 | echo "configure: failed program was:" >&5 | |
3878 | cat conftest.$ac_ext >&5 | |
3879 | rm -rf conftest* | |
3880 | eval "ac_cv_lib_$ac_lib_var=no" | |
3881 | fi | |
3882 | rm -f conftest* | |
3883 | LIBS="$ac_save_LIBS" | |
3884 | ||
3885 | fi | |
3886 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3887 | echo "$ac_t""yes" 1>&6 | |
3888 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3889 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3890 | cat >> confdefs.h <<EOF | |
3891 | #define $ac_tr_lib 1 | |
3892 | EOF | |
3893 | ||
3894 | LIBS="-lw $LIBS" | |
3895 | ||
3896 | else | |
3897 | echo "$ac_t""no" 1>&6 | |
3898 | fi | |
3899 | ||
3900 | fi | |
3901 | ||
3902 | ||
c890192f MK |
3903 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
3904 | ||
3905 | echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 | |
0e5d83e3 | 3906 | echo "configure:3907: checking for library containing gethostbyname" >&5 |
c890192f MK |
3907 | if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then |
3908 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3909 | else | |
3910 | ac_func_search_save_LIBS="$LIBS" | |
3911 | ac_cv_search_gethostbyname="no" | |
3912 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3913 | #line 3914 "configure" |
c890192f MK |
3914 | #include "confdefs.h" |
3915 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3916 | /* We use char because int might match the return type of a gcc2 | |
3917 | builtin and then its argument prototype would still apply. */ | |
3918 | char gethostbyname(); | |
3919 | ||
3920 | int main() { | |
3921 | gethostbyname() | |
3922 | ; return 0; } | |
3923 | EOF | |
0e5d83e3 | 3924 | if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3925 | rm -rf conftest* |
3926 | ac_cv_search_gethostbyname="none required" | |
3927 | else | |
3928 | echo "configure: failed program was:" >&5 | |
3929 | cat conftest.$ac_ext >&5 | |
3930 | fi | |
3931 | rm -f conftest* | |
3932 | test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do | |
3933 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3934 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3935 | #line 3936 "configure" |
c890192f MK |
3936 | #include "confdefs.h" |
3937 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3938 | /* We use char because int might match the return type of a gcc2 | |
3939 | builtin and then its argument prototype would still apply. */ | |
3940 | char gethostbyname(); | |
3941 | ||
3942 | int main() { | |
3943 | gethostbyname() | |
3944 | ; return 0; } | |
3945 | EOF | |
0e5d83e3 | 3946 | if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3947 | rm -rf conftest* |
3948 | ac_cv_search_gethostbyname="-l$i" | |
3949 | break | |
3950 | else | |
3951 | echo "configure: failed program was:" >&5 | |
3952 | cat conftest.$ac_ext >&5 | |
3953 | fi | |
3954 | rm -f conftest* | |
3955 | done | |
3956 | LIBS="$ac_func_search_save_LIBS" | |
3957 | fi | |
3958 | ||
3959 | echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6 | |
3960 | if test "$ac_cv_search_gethostbyname" != "no"; then | |
3961 | test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" | |
3962 | ||
3963 | else : | |
3964 | ||
3965 | fi | |
3966 | ||
9a156167 MK |
3967 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
3968 | ||
3969 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
0e5d83e3 | 3970 | echo "configure:3971: checking for library containing socketpair" >&5 |
9a156167 MK |
3971 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3972 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3973 | else | |
3974 | ac_func_search_save_LIBS="$LIBS" | |
3975 | ac_cv_search_socketpair="no" | |
3976 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3977 | #line 3978 "configure" |
9a156167 MK |
3978 | #include "confdefs.h" |
3979 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3980 | /* We use char because int might match the return type of a gcc2 | |
3981 | builtin and then its argument prototype would still apply. */ | |
3982 | char socketpair(); | |
3983 | ||
3984 | int main() { | |
3985 | socketpair() | |
3986 | ; return 0; } | |
3987 | EOF | |
0e5d83e3 | 3988 | if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3989 | rm -rf conftest* |
3990 | ac_cv_search_socketpair="none required" | |
3991 | else | |
3992 | echo "configure: failed program was:" >&5 | |
3993 | cat conftest.$ac_ext >&5 | |
3994 | fi | |
3995 | rm -f conftest* | |
3996 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3997 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3998 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 3999 | #line 4000 "configure" |
9a156167 MK |
4000 | #include "confdefs.h" |
4001 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4002 | /* We use char because int might match the return type of a gcc2 | |
4003 | builtin and then its argument prototype would still apply. */ | |
4004 | char socketpair(); | |
4005 | ||
4006 | int main() { | |
4007 | socketpair() | |
4008 | ; return 0; } | |
4009 | EOF | |
0e5d83e3 | 4010 | if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4011 | rm -rf conftest* |
4012 | ac_cv_search_socketpair="-l$i" | |
4013 | break | |
4014 | else | |
4015 | echo "configure: failed program was:" >&5 | |
4016 | cat conftest.$ac_ext >&5 | |
4017 | fi | |
4018 | rm -f conftest* | |
4019 | done | |
4020 | LIBS="$ac_func_search_save_LIBS" | |
4021 | fi | |
4022 | ||
4023 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
4024 | if test "$ac_cv_search_socketpair" != "no"; then | |
4025 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
4026 | ||
4027 | else : | |
4028 | ||
4029 | fi | |
4030 | ||
06825bd1 MK |
4031 | # Since GDB uses Readline, we need termcap functionality, so we need |
4032 | # to find a library that provides that. When GDB is configured with | |
4033 | # --enable-tui, we need full curses functionality. | |
4034 | # | |
4035 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
4036 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
4037 | # Makefile fragments. That's why we need to have `Hcurses' before | |
4038 | # `curses'. I don't see why we should use HP curses if a more | |
4039 | # standard curses is available, except that according to HP's | |
4040 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
4041 | # HP-UX 10.10 and 10.20. | |
4042 | ||
4043 | if test "$need_curses" = yes; then | |
4044 | ||
4045 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
0e5d83e3 | 4046 | echo "configure:4047: checking for library containing initscr" >&5 |
06825bd1 MK |
4047 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
4048 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4049 | else | |
4050 | ac_func_search_save_LIBS="$LIBS" | |
4051 | ac_cv_search_initscr="no" | |
4052 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4053 | #line 4054 "configure" |
06825bd1 MK |
4054 | #include "confdefs.h" |
4055 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4056 | /* We use char because int might match the return type of a gcc2 | |
4057 | builtin and then its argument prototype would still apply. */ | |
4058 | char initscr(); | |
4059 | ||
4060 | int main() { | |
4061 | initscr() | |
4062 | ; return 0; } | |
4063 | EOF | |
0e5d83e3 | 4064 | if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4065 | rm -rf conftest* |
4066 | ac_cv_search_initscr="none required" | |
4067 | else | |
4068 | echo "configure: failed program was:" >&5 | |
4069 | cat conftest.$ac_ext >&5 | |
4070 | fi | |
4071 | rm -f conftest* | |
4072 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
4073 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4074 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4075 | #line 4076 "configure" |
06825bd1 MK |
4076 | #include "confdefs.h" |
4077 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4078 | /* We use char because int might match the return type of a gcc2 | |
4079 | builtin and then its argument prototype would still apply. */ | |
4080 | char initscr(); | |
4081 | ||
4082 | int main() { | |
4083 | initscr() | |
4084 | ; return 0; } | |
4085 | EOF | |
0e5d83e3 | 4086 | if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4087 | rm -rf conftest* |
4088 | ac_cv_search_initscr="-l$i" | |
4089 | break | |
4090 | else | |
4091 | echo "configure: failed program was:" >&5 | |
4092 | cat conftest.$ac_ext >&5 | |
4093 | fi | |
4094 | rm -f conftest* | |
4095 | done | |
4096 | LIBS="$ac_func_search_save_LIBS" | |
4097 | fi | |
4098 | ||
4099 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
4100 | if test "$ac_cv_search_initscr" != "no"; then | |
4101 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
4102 | ||
4103 | else : | |
4104 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
4105 | fi | |
4106 | fi | |
4107 | ||
4108 | case $host_os in | |
4109 | cygwin*) | |
4110 | if test -d $srcdir/libtermcap; then | |
4111 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
4112 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
4113 | fi ;; | |
4114 | go32*) | |
4115 | # ??? Is this really true? | |
4116 | ac_cv_search_tgetent="none required" | |
4117 | ;; | |
4118 | aix*) | |
4119 | # Readline prefers curses over termcap on AIX. | |
4120 | # ??? Why? | |
4121 | ||
4122 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
0e5d83e3 | 4123 | echo "configure:4124: checking for library containing tgetent" >&5 |
06825bd1 MK |
4124 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4126 | else | |
4127 | ac_func_search_save_LIBS="$LIBS" | |
4128 | ac_cv_search_tgetent="no" | |
4129 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4130 | #line 4131 "configure" |
06825bd1 MK |
4131 | #include "confdefs.h" |
4132 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4133 | /* We use char because int might match the return type of a gcc2 | |
4134 | builtin and then its argument prototype would still apply. */ | |
4135 | char tgetent(); | |
4136 | ||
4137 | int main() { | |
4138 | tgetent() | |
4139 | ; return 0; } | |
4140 | EOF | |
0e5d83e3 | 4141 | if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4142 | rm -rf conftest* |
4143 | ac_cv_search_tgetent="none required" | |
4144 | else | |
4145 | echo "configure: failed program was:" >&5 | |
4146 | cat conftest.$ac_ext >&5 | |
4147 | fi | |
4148 | rm -f conftest* | |
4149 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
4150 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4151 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4152 | #line 4153 "configure" |
06825bd1 MK |
4153 | #include "confdefs.h" |
4154 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4155 | /* We use char because int might match the return type of a gcc2 | |
4156 | builtin and then its argument prototype would still apply. */ | |
4157 | char tgetent(); | |
4158 | ||
4159 | int main() { | |
4160 | tgetent() | |
4161 | ; return 0; } | |
4162 | EOF | |
0e5d83e3 | 4163 | if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4164 | rm -rf conftest* |
4165 | ac_cv_search_tgetent="-l$i" | |
4166 | break | |
4167 | else | |
4168 | echo "configure: failed program was:" >&5 | |
4169 | cat conftest.$ac_ext >&5 | |
4170 | fi | |
4171 | rm -f conftest* | |
4172 | done | |
4173 | LIBS="$ac_func_search_save_LIBS" | |
4174 | fi | |
4175 | ||
4176 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4177 | if test "$ac_cv_search_tgetent" != "no"; then | |
4178 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4179 | ||
4180 | else : | |
4181 | ||
4182 | fi | |
4183 | ;; | |
4184 | esac | |
4185 | ||
4186 | # Note: We used to check for libtermlib and libterminfo too, but | |
4187 | # Readline doesn't, so I think we're safe with leaving them out. | |
4188 | ||
4189 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
0e5d83e3 | 4190 | echo "configure:4191: checking for library containing tgetent" >&5 |
06825bd1 MK |
4191 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4193 | else | |
4194 | ac_func_search_save_LIBS="$LIBS" | |
4195 | ac_cv_search_tgetent="no" | |
4196 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4197 | #line 4198 "configure" |
06825bd1 MK |
4198 | #include "confdefs.h" |
4199 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4200 | /* We use char because int might match the return type of a gcc2 | |
4201 | builtin and then its argument prototype would still apply. */ | |
4202 | char tgetent(); | |
4203 | ||
4204 | int main() { | |
4205 | tgetent() | |
4206 | ; return 0; } | |
4207 | EOF | |
0e5d83e3 | 4208 | if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4209 | rm -rf conftest* |
4210 | ac_cv_search_tgetent="none required" | |
4211 | else | |
4212 | echo "configure: failed program was:" >&5 | |
4213 | cat conftest.$ac_ext >&5 | |
4214 | fi | |
4215 | rm -f conftest* | |
4216 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
4217 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4218 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4219 | #line 4220 "configure" |
06825bd1 MK |
4220 | #include "confdefs.h" |
4221 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4222 | /* We use char because int might match the return type of a gcc2 | |
4223 | builtin and then its argument prototype would still apply. */ | |
4224 | char tgetent(); | |
4225 | ||
4226 | int main() { | |
4227 | tgetent() | |
4228 | ; return 0; } | |
4229 | EOF | |
0e5d83e3 | 4230 | if { (eval echo configure:4231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4231 | rm -rf conftest* |
4232 | ac_cv_search_tgetent="-l$i" | |
4233 | break | |
4234 | else | |
4235 | echo "configure: failed program was:" >&5 | |
4236 | cat conftest.$ac_ext >&5 | |
4237 | fi | |
4238 | rm -f conftest* | |
4239 | done | |
4240 | LIBS="$ac_func_search_save_LIBS" | |
4241 | fi | |
4242 | ||
4243 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4244 | if test "$ac_cv_search_tgetent" != "no"; then | |
4245 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4246 | ||
4247 | else : | |
4248 | ||
4249 | fi | |
4250 | ||
4251 | if test "$ac_cv_search_tgetent" = no; then | |
4252 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
4253 | fi | |
4254 | ||
5ee754fc MK |
4255 | # ------------------------- # |
4256 | # Checks for header files. # | |
4257 | # ------------------------- # | |
4258 | ||
4259 | ac_header_dirent=no | |
4260 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4261 | do | |
4262 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4263 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
0e5d83e3 | 4264 | echo "configure:4265: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 4265 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
4266 | echo $ac_n "(cached) $ac_c" 1>&6 |
4267 | else | |
4268 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4269 | #line 4270 "configure" |
c906108c SS |
4270 | #include "confdefs.h" |
4271 | #include <sys/types.h> | |
5ee754fc MK |
4272 | #include <$ac_hdr> |
4273 | int main() { | |
4274 | DIR *dirp = 0; | |
4275 | ; return 0; } | |
4276 | EOF | |
0e5d83e3 | 4277 | if { (eval echo configure:4278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4278 | rm -rf conftest* |
4279 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4280 | else | |
4281 | echo "configure: failed program was:" >&5 | |
4282 | cat conftest.$ac_ext >&5 | |
4283 | rm -rf conftest* | |
4284 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4285 | fi | |
4286 | rm -f conftest* | |
4287 | fi | |
4288 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4289 | echo "$ac_t""yes" 1>&6 | |
4290 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4291 | cat >> confdefs.h <<EOF | |
4292 | #define $ac_tr_hdr 1 | |
4293 | EOF | |
4294 | ac_header_dirent=$ac_hdr; break | |
4295 | else | |
4296 | echo "$ac_t""no" 1>&6 | |
4297 | fi | |
4298 | done | |
4299 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4300 | if test $ac_header_dirent = dirent.h; then | |
4301 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
0e5d83e3 | 4302 | echo "configure:4303: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4303 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4304 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4305 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4306 | else | |
4307 | ac_save_LIBS="$LIBS" | |
4308 | LIBS="-ldir $LIBS" | |
4309 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4310 | #line 4311 "configure" |
5ee754fc MK |
4311 | #include "confdefs.h" |
4312 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4313 | /* We use char because int might match the return type of a gcc2 | |
4314 | builtin and then its argument prototype would still apply. */ | |
4315 | char opendir(); | |
c906108c SS |
4316 | |
4317 | int main() { | |
5ee754fc | 4318 | opendir() |
c906108c SS |
4319 | ; return 0; } |
4320 | EOF | |
0e5d83e3 | 4321 | if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4322 | rm -rf conftest* |
5ee754fc | 4323 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4324 | else |
4325 | echo "configure: failed program was:" >&5 | |
4326 | cat conftest.$ac_ext >&5 | |
4327 | rm -rf conftest* | |
5ee754fc | 4328 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4329 | fi |
4330 | rm -f conftest* | |
5ee754fc MK |
4331 | LIBS="$ac_save_LIBS" |
4332 | ||
4333 | fi | |
4334 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4335 | echo "$ac_t""yes" 1>&6 | |
4336 | LIBS="$LIBS -ldir" | |
4337 | else | |
4338 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4339 | fi |
4340 | ||
5ee754fc MK |
4341 | else |
4342 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
0e5d83e3 | 4343 | echo "configure:4344: checking for opendir in -lx" >&5 |
5ee754fc MK |
4344 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4345 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4346 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4347 | else | |
4348 | ac_save_LIBS="$LIBS" | |
4349 | LIBS="-lx $LIBS" | |
4350 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4351 | #line 4352 "configure" |
5ee754fc MK |
4352 | #include "confdefs.h" |
4353 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4354 | /* We use char because int might match the return type of a gcc2 | |
4355 | builtin and then its argument prototype would still apply. */ | |
4356 | char opendir(); | |
4357 | ||
4358 | int main() { | |
4359 | opendir() | |
4360 | ; return 0; } | |
c906108c | 4361 | EOF |
0e5d83e3 | 4362 | if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4363 | rm -rf conftest* |
4364 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4365 | else | |
4366 | echo "configure: failed program was:" >&5 | |
4367 | cat conftest.$ac_ext >&5 | |
4368 | rm -rf conftest* | |
4369 | eval "ac_cv_lib_$ac_lib_var=no" | |
4370 | fi | |
4371 | rm -f conftest* | |
4372 | LIBS="$ac_save_LIBS" | |
c906108c | 4373 | |
5ee754fc MK |
4374 | fi |
4375 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4376 | echo "$ac_t""yes" 1>&6 | |
4377 | LIBS="$LIBS -lx" | |
4378 | else | |
4379 | echo "$ac_t""no" 1>&6 | |
4380 | fi | |
c906108c | 4381 | |
5ee754fc | 4382 | fi |
c906108c | 4383 | |
5ee754fc | 4384 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
0e5d83e3 | 4385 | echo "configure:4386: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4386 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4387 | echo $ac_n "(cached) $ac_c" 1>&6 |
4388 | else | |
4389 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4390 | #line 4391 "configure" |
9608ab8b MK |
4391 | #include "confdefs.h" |
4392 | #include <sys/types.h> | |
5ee754fc MK |
4393 | #include <sys/stat.h> |
4394 | ||
4395 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4396 | # if S_ISBLK (S_IFDIR) | |
4397 | You lose. | |
4398 | # endif | |
4399 | #endif | |
4400 | ||
4401 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4402 | # if S_ISBLK (S_IFCHR) | |
4403 | You lose. | |
4404 | # endif | |
4405 | #endif | |
4406 | ||
4407 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4408 | # if S_ISLNK (S_IFREG) | |
4409 | You lose. | |
4410 | # endif | |
4411 | #endif | |
4412 | ||
4413 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4414 | # if S_ISSOCK (S_IFREG) | |
4415 | You lose. | |
4416 | # endif | |
4417 | #endif | |
4418 | ||
9608ab8b | 4419 | EOF |
5ee754fc MK |
4420 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4421 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4422 | rm -rf conftest* |
5ee754fc MK |
4423 | ac_cv_header_stat_broken=yes |
4424 | else | |
4425 | rm -rf conftest* | |
4426 | ac_cv_header_stat_broken=no | |
4427 | fi | |
4428 | rm -f conftest* | |
4429 | ||
4430 | fi | |
4431 | ||
4432 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4433 | if test $ac_cv_header_stat_broken = yes; then | |
4434 | cat >> confdefs.h <<\EOF | |
4435 | #define STAT_MACROS_BROKEN 1 | |
4436 | EOF | |
4437 | ||
4438 | fi | |
4439 | ||
4440 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
0e5d83e3 | 4441 | echo "configure:4442: checking for ANSI C header files" >&5 |
5ee754fc MK |
4442 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4443 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4444 | else | |
4445 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4446 | #line 4447 "configure" |
5ee754fc MK |
4447 | #include "confdefs.h" |
4448 | #include <stdlib.h> | |
4449 | #include <stdarg.h> | |
4450 | #include <string.h> | |
4451 | #include <float.h> | |
4452 | EOF | |
4453 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4454 | { (eval echo configure:4455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4455 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4456 | if test -z "$ac_err"; then | |
4457 | rm -rf conftest* | |
4458 | ac_cv_header_stdc=yes | |
4459 | else | |
4460 | echo "$ac_err" >&5 | |
4461 | echo "configure: failed program was:" >&5 | |
4462 | cat conftest.$ac_ext >&5 | |
4463 | rm -rf conftest* | |
4464 | ac_cv_header_stdc=no | |
4465 | fi | |
4466 | rm -f conftest* | |
4467 | ||
4468 | if test $ac_cv_header_stdc = yes; then | |
4469 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4470 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4471 | #line 4472 "configure" |
5ee754fc MK |
4472 | #include "confdefs.h" |
4473 | #include <string.h> | |
4474 | EOF | |
4475 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4476 | egrep "memchr" >/dev/null 2>&1; then | |
4477 | : | |
4478 | else | |
4479 | rm -rf conftest* | |
4480 | ac_cv_header_stdc=no | |
4481 | fi | |
4482 | rm -f conftest* | |
4483 | ||
4484 | fi | |
4485 | ||
4486 | if test $ac_cv_header_stdc = yes; then | |
4487 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4488 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4489 | #line 4490 "configure" |
5ee754fc MK |
4490 | #include "confdefs.h" |
4491 | #include <stdlib.h> | |
4492 | EOF | |
4493 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4494 | egrep "free" >/dev/null 2>&1; then | |
4495 | : | |
4496 | else | |
4497 | rm -rf conftest* | |
4498 | ac_cv_header_stdc=no | |
4499 | fi | |
4500 | rm -f conftest* | |
4501 | ||
4502 | fi | |
4503 | ||
4504 | if test $ac_cv_header_stdc = yes; then | |
4505 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4506 | if test "$cross_compiling" = yes; then | |
4507 | : | |
4508 | else | |
4509 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4510 | #line 4511 "configure" |
5ee754fc MK |
4511 | #include "confdefs.h" |
4512 | #include <ctype.h> | |
4513 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4514 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4515 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4516 | int main () { int i; for (i = 0; i < 256; i++) | |
4517 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4518 | exit (0); } | |
4519 | ||
4520 | EOF | |
0e5d83e3 | 4521 | if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4522 | then |
4523 | : | |
9608ab8b | 4524 | else |
5ee754fc MK |
4525 | echo "configure: failed program was:" >&5 |
4526 | cat conftest.$ac_ext >&5 | |
4527 | rm -fr conftest* | |
4528 | ac_cv_header_stdc=no | |
4529 | fi | |
4530 | rm -fr conftest* | |
4531 | fi | |
4532 | ||
4533 | fi | |
4534 | fi | |
4535 | ||
4536 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4537 | if test $ac_cv_header_stdc = yes; then | |
4538 | cat >> confdefs.h <<\EOF | |
4539 | #define STDC_HEADERS 1 | |
4540 | EOF | |
4541 | ||
4542 | fi | |
4543 | ||
4544 | for ac_hdr in link.h | |
4545 | do | |
4546 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4547 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4548 | echo "configure:4549: checking for $ac_hdr" >&5 |
5ee754fc MK |
4549 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4550 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4551 | else | |
4552 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4553 | #line 4554 "configure" |
5ee754fc MK |
4554 | #include "confdefs.h" |
4555 | #include <$ac_hdr> | |
4556 | EOF | |
4557 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4558 | { (eval echo configure:4559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4559 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4560 | if test -z "$ac_err"; then | |
4561 | rm -rf conftest* | |
4562 | eval "ac_cv_header_$ac_safe=yes" | |
4563 | else | |
4564 | echo "$ac_err" >&5 | |
4565 | echo "configure: failed program was:" >&5 | |
4566 | cat conftest.$ac_ext >&5 | |
4567 | rm -rf conftest* | |
4568 | eval "ac_cv_header_$ac_safe=no" | |
4569 | fi | |
4570 | rm -f conftest* | |
4571 | fi | |
4572 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4573 | echo "$ac_t""yes" 1>&6 | |
4574 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4575 | cat >> confdefs.h <<EOF | |
4576 | #define $ac_tr_hdr 1 | |
4577 | EOF | |
4578 | ||
4579 | else | |
4580 | echo "$ac_t""no" 1>&6 | |
4581 | fi | |
4582 | done | |
4583 | ||
4584 | for ac_hdr in nlist.h | |
4585 | do | |
4586 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4587 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4588 | echo "configure:4589: checking for $ac_hdr" >&5 |
5ee754fc MK |
4589 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4591 | else | |
4592 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4593 | #line 4594 "configure" |
5ee754fc MK |
4594 | #include "confdefs.h" |
4595 | #include <$ac_hdr> | |
4596 | EOF | |
4597 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4598 | { (eval echo configure:4599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4599 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4600 | if test -z "$ac_err"; then | |
4601 | rm -rf conftest* | |
4602 | eval "ac_cv_header_$ac_safe=yes" | |
4603 | else | |
4604 | echo "$ac_err" >&5 | |
4605 | echo "configure: failed program was:" >&5 | |
4606 | cat conftest.$ac_ext >&5 | |
4607 | rm -rf conftest* | |
4608 | eval "ac_cv_header_$ac_safe=no" | |
4609 | fi | |
4610 | rm -f conftest* | |
4611 | fi | |
4612 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4613 | echo "$ac_t""yes" 1>&6 | |
4614 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4615 | cat >> confdefs.h <<EOF | |
4616 | #define $ac_tr_hdr 1 | |
4617 | EOF | |
4618 | ||
4619 | else | |
4620 | echo "$ac_t""no" 1>&6 | |
4621 | fi | |
4622 | done | |
4623 | ||
4624 | for ac_hdr in poll.h sys/poll.h | |
4625 | do | |
4626 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4627 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4628 | echo "configure:4629: checking for $ac_hdr" >&5 |
5ee754fc MK |
4629 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4630 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4631 | else | |
4632 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4633 | #line 4634 "configure" |
5ee754fc MK |
4634 | #include "confdefs.h" |
4635 | #include <$ac_hdr> | |
4636 | EOF | |
4637 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4638 | { (eval echo configure:4639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4639 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4640 | if test -z "$ac_err"; then | |
4641 | rm -rf conftest* | |
4642 | eval "ac_cv_header_$ac_safe=yes" | |
4643 | else | |
4644 | echo "$ac_err" >&5 | |
4645 | echo "configure: failed program was:" >&5 | |
4646 | cat conftest.$ac_ext >&5 | |
4647 | rm -rf conftest* | |
4648 | eval "ac_cv_header_$ac_safe=no" | |
4649 | fi | |
4650 | rm -f conftest* | |
4651 | fi | |
4652 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4653 | echo "$ac_t""yes" 1>&6 | |
4654 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4655 | cat >> confdefs.h <<EOF | |
4656 | #define $ac_tr_hdr 1 | |
4657 | EOF | |
4658 | ||
4659 | else | |
4660 | echo "$ac_t""no" 1>&6 | |
4661 | fi | |
4662 | done | |
4663 | ||
4664 | for ac_hdr in proc_service.h thread_db.h | |
4665 | do | |
4666 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4667 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4668 | echo "configure:4669: checking for $ac_hdr" >&5 |
5ee754fc MK |
4669 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4670 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4671 | else | |
4672 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4673 | #line 4674 "configure" |
5ee754fc MK |
4674 | #include "confdefs.h" |
4675 | #include <$ac_hdr> | |
4676 | EOF | |
4677 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4678 | { (eval echo configure:4679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4679 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4680 | if test -z "$ac_err"; then | |
4681 | rm -rf conftest* | |
4682 | eval "ac_cv_header_$ac_safe=yes" | |
4683 | else | |
4684 | echo "$ac_err" >&5 | |
4685 | echo "configure: failed program was:" >&5 | |
4686 | cat conftest.$ac_ext >&5 | |
4687 | rm -rf conftest* | |
4688 | eval "ac_cv_header_$ac_safe=no" | |
4689 | fi | |
4690 | rm -f conftest* | |
4691 | fi | |
4692 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4693 | echo "$ac_t""yes" 1>&6 | |
4694 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4695 | cat >> confdefs.h <<EOF | |
4696 | #define $ac_tr_hdr 1 | |
4697 | EOF | |
4698 | ||
4699 | else | |
4700 | echo "$ac_t""no" 1>&6 | |
4701 | fi | |
4702 | done | |
4703 | ||
4704 | for ac_hdr in stddef.h | |
4705 | do | |
4706 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4707 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4708 | echo "configure:4709: checking for $ac_hdr" >&5 |
5ee754fc MK |
4709 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4710 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4711 | else | |
4712 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4713 | #line 4714 "configure" |
5ee754fc MK |
4714 | #include "confdefs.h" |
4715 | #include <$ac_hdr> | |
4716 | EOF | |
4717 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4718 | { (eval echo configure:4719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4719 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4720 | if test -z "$ac_err"; then | |
4721 | rm -rf conftest* | |
4722 | eval "ac_cv_header_$ac_safe=yes" | |
4723 | else | |
4724 | echo "$ac_err" >&5 | |
4725 | echo "configure: failed program was:" >&5 | |
4726 | cat conftest.$ac_ext >&5 | |
4727 | rm -rf conftest* | |
4728 | eval "ac_cv_header_$ac_safe=no" | |
4729 | fi | |
4730 | rm -f conftest* | |
4731 | fi | |
4732 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4733 | echo "$ac_t""yes" 1>&6 | |
4734 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4735 | cat >> confdefs.h <<EOF | |
4736 | #define $ac_tr_hdr 1 | |
4737 | EOF | |
4738 | ||
4739 | else | |
4740 | echo "$ac_t""no" 1>&6 | |
4741 | fi | |
4742 | done | |
4743 | ||
4744 | for ac_hdr in stdlib.h | |
4745 | do | |
4746 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4747 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4748 | echo "configure:4749: checking for $ac_hdr" >&5 |
5ee754fc MK |
4749 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4750 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4751 | else | |
4752 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4753 | #line 4754 "configure" |
5ee754fc MK |
4754 | #include "confdefs.h" |
4755 | #include <$ac_hdr> | |
4756 | EOF | |
4757 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4758 | { (eval echo configure:4759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4759 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4760 | if test -z "$ac_err"; then | |
4761 | rm -rf conftest* | |
4762 | eval "ac_cv_header_$ac_safe=yes" | |
4763 | else | |
4764 | echo "$ac_err" >&5 | |
4765 | echo "configure: failed program was:" >&5 | |
4766 | cat conftest.$ac_ext >&5 | |
4767 | rm -rf conftest* | |
4768 | eval "ac_cv_header_$ac_safe=no" | |
4769 | fi | |
4770 | rm -f conftest* | |
4771 | fi | |
4772 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4773 | echo "$ac_t""yes" 1>&6 | |
4774 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4775 | cat >> confdefs.h <<EOF | |
4776 | #define $ac_tr_hdr 1 | |
4777 | EOF | |
4778 | ||
4779 | else | |
4780 | echo "$ac_t""no" 1>&6 | |
4781 | fi | |
4782 | done | |
4783 | ||
4784 | for ac_hdr in stdint.h | |
4785 | do | |
4786 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4787 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4788 | echo "configure:4789: checking for $ac_hdr" >&5 |
5ee754fc MK |
4789 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4790 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4791 | else | |
4792 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4793 | #line 4794 "configure" |
5ee754fc MK |
4794 | #include "confdefs.h" |
4795 | #include <$ac_hdr> | |
4796 | EOF | |
4797 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4798 | { (eval echo configure:4799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4799 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4800 | if test -z "$ac_err"; then | |
4801 | rm -rf conftest* | |
4802 | eval "ac_cv_header_$ac_safe=yes" | |
4803 | else | |
4804 | echo "$ac_err" >&5 | |
4805 | echo "configure: failed program was:" >&5 | |
4806 | cat conftest.$ac_ext >&5 | |
4807 | rm -rf conftest* | |
4808 | eval "ac_cv_header_$ac_safe=no" | |
4809 | fi | |
4810 | rm -f conftest* | |
4811 | fi | |
4812 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4813 | echo "$ac_t""yes" 1>&6 | |
4814 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4815 | cat >> confdefs.h <<EOF | |
4816 | #define $ac_tr_hdr 1 | |
4817 | EOF | |
4818 | ||
4819 | else | |
4820 | echo "$ac_t""no" 1>&6 | |
4821 | fi | |
4822 | done | |
4823 | ||
4824 | for ac_hdr in string.h memory.h strings.h | |
4825 | do | |
4826 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4827 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4828 | echo "configure:4829: checking for $ac_hdr" >&5 |
5ee754fc MK |
4829 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4830 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4831 | else | |
4832 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4833 | #line 4834 "configure" |
5ee754fc MK |
4834 | #include "confdefs.h" |
4835 | #include <$ac_hdr> | |
4836 | EOF | |
4837 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4838 | { (eval echo configure:4839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4839 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4840 | if test -z "$ac_err"; then | |
4841 | rm -rf conftest* | |
4842 | eval "ac_cv_header_$ac_safe=yes" | |
4843 | else | |
4844 | echo "$ac_err" >&5 | |
4845 | echo "configure: failed program was:" >&5 | |
4846 | cat conftest.$ac_ext >&5 | |
4847 | rm -rf conftest* | |
4848 | eval "ac_cv_header_$ac_safe=no" | |
4849 | fi | |
4850 | rm -f conftest* | |
4851 | fi | |
4852 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4853 | echo "$ac_t""yes" 1>&6 | |
4854 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4855 | cat >> confdefs.h <<EOF | |
4856 | #define $ac_tr_hdr 1 | |
4857 | EOF | |
4858 | ||
4859 | else | |
4860 | echo "$ac_t""no" 1>&6 | |
4861 | fi | |
4862 | done | |
4863 | ||
4864 | for ac_hdr in sys/fault.h | |
4865 | do | |
4866 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4867 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4868 | echo "configure:4869: checking for $ac_hdr" >&5 |
5ee754fc MK |
4869 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4870 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4871 | else | |
4872 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4873 | #line 4874 "configure" |
5ee754fc MK |
4874 | #include "confdefs.h" |
4875 | #include <$ac_hdr> | |
4876 | EOF | |
4877 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4878 | { (eval echo configure:4879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4879 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4880 | if test -z "$ac_err"; then | |
4881 | rm -rf conftest* | |
4882 | eval "ac_cv_header_$ac_safe=yes" | |
4883 | else | |
4884 | echo "$ac_err" >&5 | |
4885 | echo "configure: failed program was:" >&5 | |
4886 | cat conftest.$ac_ext >&5 | |
4887 | rm -rf conftest* | |
4888 | eval "ac_cv_header_$ac_safe=no" | |
4889 | fi | |
4890 | rm -f conftest* | |
4891 | fi | |
4892 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4893 | echo "$ac_t""yes" 1>&6 | |
4894 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4895 | cat >> confdefs.h <<EOF | |
4896 | #define $ac_tr_hdr 1 | |
4897 | EOF | |
4898 | ||
4899 | else | |
4900 | echo "$ac_t""no" 1>&6 | |
4901 | fi | |
4902 | done | |
4903 | ||
4904 | for ac_hdr in sys/file.h | |
4905 | do | |
4906 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4907 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4908 | echo "configure:4909: checking for $ac_hdr" >&5 |
5ee754fc MK |
4909 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4910 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4911 | else | |
4912 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4913 | #line 4914 "configure" |
5ee754fc MK |
4914 | #include "confdefs.h" |
4915 | #include <$ac_hdr> | |
4916 | EOF | |
4917 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4918 | { (eval echo configure:4919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4919 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4920 | if test -z "$ac_err"; then | |
4921 | rm -rf conftest* | |
4922 | eval "ac_cv_header_$ac_safe=yes" | |
4923 | else | |
4924 | echo "$ac_err" >&5 | |
4925 | echo "configure: failed program was:" >&5 | |
4926 | cat conftest.$ac_ext >&5 | |
4927 | rm -rf conftest* | |
4928 | eval "ac_cv_header_$ac_safe=no" | |
4929 | fi | |
4930 | rm -f conftest* | |
4931 | fi | |
4932 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4933 | echo "$ac_t""yes" 1>&6 | |
4934 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4935 | cat >> confdefs.h <<EOF | |
4936 | #define $ac_tr_hdr 1 | |
4937 | EOF | |
4938 | ||
4939 | else | |
4940 | echo "$ac_t""no" 1>&6 | |
4941 | fi | |
4942 | done | |
4943 | ||
4944 | for ac_hdr in sys/filio.h | |
4945 | do | |
4946 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4947 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4948 | echo "configure:4949: checking for $ac_hdr" >&5 |
5ee754fc MK |
4949 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4950 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4951 | else | |
4952 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4953 | #line 4954 "configure" |
5ee754fc MK |
4954 | #include "confdefs.h" |
4955 | #include <$ac_hdr> | |
4956 | EOF | |
4957 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4958 | { (eval echo configure:4959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4959 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4960 | if test -z "$ac_err"; then | |
4961 | rm -rf conftest* | |
4962 | eval "ac_cv_header_$ac_safe=yes" | |
4963 | else | |
4964 | echo "$ac_err" >&5 | |
4965 | echo "configure: failed program was:" >&5 | |
4966 | cat conftest.$ac_ext >&5 | |
4967 | rm -rf conftest* | |
4968 | eval "ac_cv_header_$ac_safe=no" | |
4969 | fi | |
4970 | rm -f conftest* | |
4971 | fi | |
4972 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4973 | echo "$ac_t""yes" 1>&6 | |
4974 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4975 | cat >> confdefs.h <<EOF | |
4976 | #define $ac_tr_hdr 1 | |
4977 | EOF | |
4978 | ||
4979 | else | |
4980 | echo "$ac_t""no" 1>&6 | |
4981 | fi | |
4982 | done | |
4983 | ||
4984 | for ac_hdr in sys/ioctl.h | |
4985 | do | |
4986 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4987 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 4988 | echo "configure:4989: checking for $ac_hdr" >&5 |
5ee754fc MK |
4989 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4990 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4991 | else | |
4992 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 4993 | #line 4994 "configure" |
5ee754fc MK |
4994 | #include "confdefs.h" |
4995 | #include <$ac_hdr> | |
4996 | EOF | |
4997 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 4998 | { (eval echo configure:4999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4999 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5000 | if test -z "$ac_err"; then | |
5001 | rm -rf conftest* | |
5002 | eval "ac_cv_header_$ac_safe=yes" | |
5003 | else | |
5004 | echo "$ac_err" >&5 | |
5005 | echo "configure: failed program was:" >&5 | |
5006 | cat conftest.$ac_ext >&5 | |
5007 | rm -rf conftest* | |
5008 | eval "ac_cv_header_$ac_safe=no" | |
5009 | fi | |
5010 | rm -f conftest* | |
5011 | fi | |
5012 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5013 | echo "$ac_t""yes" 1>&6 | |
5014 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5015 | cat >> confdefs.h <<EOF | |
5016 | #define $ac_tr_hdr 1 | |
5017 | EOF | |
5018 | ||
5019 | else | |
5020 | echo "$ac_t""no" 1>&6 | |
5021 | fi | |
5022 | done | |
5023 | ||
5024 | for ac_hdr in sys/param.h | |
5025 | do | |
5026 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5027 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5028 | echo "configure:5029: checking for $ac_hdr" >&5 |
5ee754fc MK |
5029 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5030 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5031 | else | |
5032 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5033 | #line 5034 "configure" |
5ee754fc MK |
5034 | #include "confdefs.h" |
5035 | #include <$ac_hdr> | |
5036 | EOF | |
5037 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5038 | { (eval echo configure:5039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5039 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5040 | if test -z "$ac_err"; then | |
5041 | rm -rf conftest* | |
5042 | eval "ac_cv_header_$ac_safe=yes" | |
5043 | else | |
5044 | echo "$ac_err" >&5 | |
5045 | echo "configure: failed program was:" >&5 | |
5046 | cat conftest.$ac_ext >&5 | |
5047 | rm -rf conftest* | |
5048 | eval "ac_cv_header_$ac_safe=no" | |
5049 | fi | |
5050 | rm -f conftest* | |
5051 | fi | |
5052 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5053 | echo "$ac_t""yes" 1>&6 | |
5054 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5055 | cat >> confdefs.h <<EOF | |
5056 | #define $ac_tr_hdr 1 | |
5057 | EOF | |
5058 | ||
5059 | else | |
5060 | echo "$ac_t""no" 1>&6 | |
5061 | fi | |
5062 | done | |
5063 | ||
5064 | for ac_hdr in sys/proc.h | |
5065 | do | |
5066 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5067 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5068 | echo "configure:5069: checking for $ac_hdr" >&5 |
5ee754fc MK |
5069 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5070 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5071 | else | |
5072 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5073 | #line 5074 "configure" |
5ee754fc MK |
5074 | #include "confdefs.h" |
5075 | #include <$ac_hdr> | |
5076 | EOF | |
5077 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5078 | { (eval echo configure:5079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5079 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5080 | if test -z "$ac_err"; then | |
5081 | rm -rf conftest* | |
5082 | eval "ac_cv_header_$ac_safe=yes" | |
5083 | else | |
5084 | echo "$ac_err" >&5 | |
5085 | echo "configure: failed program was:" >&5 | |
5086 | cat conftest.$ac_ext >&5 | |
5087 | rm -rf conftest* | |
5088 | eval "ac_cv_header_$ac_safe=no" | |
5089 | fi | |
5090 | rm -f conftest* | |
5091 | fi | |
5092 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5093 | echo "$ac_t""yes" 1>&6 | |
5094 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5095 | cat >> confdefs.h <<EOF | |
5096 | #define $ac_tr_hdr 1 | |
5097 | EOF | |
5098 | ||
5099 | else | |
5100 | echo "$ac_t""no" 1>&6 | |
5101 | fi | |
5102 | done | |
5103 | ||
5104 | for ac_hdr in sys/procfs.h | |
5105 | do | |
5106 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5107 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5108 | echo "configure:5109: checking for $ac_hdr" >&5 |
5ee754fc MK |
5109 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5110 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5111 | else | |
5112 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5113 | #line 5114 "configure" |
5ee754fc MK |
5114 | #include "confdefs.h" |
5115 | #include <$ac_hdr> | |
5116 | EOF | |
5117 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5118 | { (eval echo configure:5119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5119 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5120 | if test -z "$ac_err"; then | |
5121 | rm -rf conftest* | |
5122 | eval "ac_cv_header_$ac_safe=yes" | |
5123 | else | |
5124 | echo "$ac_err" >&5 | |
5125 | echo "configure: failed program was:" >&5 | |
5126 | cat conftest.$ac_ext >&5 | |
5127 | rm -rf conftest* | |
5128 | eval "ac_cv_header_$ac_safe=no" | |
5129 | fi | |
5130 | rm -f conftest* | |
5131 | fi | |
5132 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5133 | echo "$ac_t""yes" 1>&6 | |
5134 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5135 | cat >> confdefs.h <<EOF | |
5136 | #define $ac_tr_hdr 1 | |
5137 | EOF | |
5138 | ||
5139 | else | |
5140 | echo "$ac_t""no" 1>&6 | |
5141 | fi | |
5142 | done | |
5143 | ||
5144 | for ac_hdr in sys/ptrace.h ptrace.h | |
5145 | do | |
5146 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5147 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5148 | echo "configure:5149: checking for $ac_hdr" >&5 |
5ee754fc MK |
5149 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5150 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5151 | else | |
5152 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5153 | #line 5154 "configure" |
5ee754fc MK |
5154 | #include "confdefs.h" |
5155 | #include <$ac_hdr> | |
5156 | EOF | |
5157 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5158 | { (eval echo configure:5159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5159 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5160 | if test -z "$ac_err"; then | |
5161 | rm -rf conftest* | |
5162 | eval "ac_cv_header_$ac_safe=yes" | |
5163 | else | |
5164 | echo "$ac_err" >&5 | |
5165 | echo "configure: failed program was:" >&5 | |
5166 | cat conftest.$ac_ext >&5 | |
5167 | rm -rf conftest* | |
5168 | eval "ac_cv_header_$ac_safe=no" | |
5169 | fi | |
5170 | rm -f conftest* | |
5171 | fi | |
5172 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5173 | echo "$ac_t""yes" 1>&6 | |
5174 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5175 | cat >> confdefs.h <<EOF | |
5176 | #define $ac_tr_hdr 1 | |
5177 | EOF | |
5178 | ||
5179 | else | |
5180 | echo "$ac_t""no" 1>&6 | |
5181 | fi | |
5182 | done | |
5183 | ||
5184 | for ac_hdr in sys/reg.h sys/debugreg.h | |
5185 | do | |
5186 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5187 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5188 | echo "configure:5189: checking for $ac_hdr" >&5 |
5ee754fc MK |
5189 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5191 | else | |
5192 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5193 | #line 5194 "configure" |
5ee754fc MK |
5194 | #include "confdefs.h" |
5195 | #include <$ac_hdr> | |
5196 | EOF | |
5197 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5198 | { (eval echo configure:5199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5199 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5200 | if test -z "$ac_err"; then | |
5201 | rm -rf conftest* | |
5202 | eval "ac_cv_header_$ac_safe=yes" | |
5203 | else | |
5204 | echo "$ac_err" >&5 | |
5205 | echo "configure: failed program was:" >&5 | |
5206 | cat conftest.$ac_ext >&5 | |
5207 | rm -rf conftest* | |
5208 | eval "ac_cv_header_$ac_safe=no" | |
5209 | fi | |
5210 | rm -f conftest* | |
5211 | fi | |
5212 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5213 | echo "$ac_t""yes" 1>&6 | |
5214 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5215 | cat >> confdefs.h <<EOF | |
5216 | #define $ac_tr_hdr 1 | |
5217 | EOF | |
5218 | ||
5219 | else | |
5220 | echo "$ac_t""no" 1>&6 | |
5221 | fi | |
5222 | done | |
5223 | ||
5224 | for ac_hdr in sys/select.h | |
5225 | do | |
5226 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5227 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5228 | echo "configure:5229: checking for $ac_hdr" >&5 |
5ee754fc MK |
5229 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5231 | else | |
5232 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5233 | #line 5234 "configure" |
5ee754fc MK |
5234 | #include "confdefs.h" |
5235 | #include <$ac_hdr> | |
5236 | EOF | |
5237 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5238 | { (eval echo configure:5239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5239 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5240 | if test -z "$ac_err"; then | |
5241 | rm -rf conftest* | |
5242 | eval "ac_cv_header_$ac_safe=yes" | |
5243 | else | |
5244 | echo "$ac_err" >&5 | |
5245 | echo "configure: failed program was:" >&5 | |
5246 | cat conftest.$ac_ext >&5 | |
5247 | rm -rf conftest* | |
5248 | eval "ac_cv_header_$ac_safe=no" | |
5249 | fi | |
5250 | rm -f conftest* | |
5251 | fi | |
5252 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5253 | echo "$ac_t""yes" 1>&6 | |
5254 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5255 | cat >> confdefs.h <<EOF | |
5256 | #define $ac_tr_hdr 1 | |
5257 | EOF | |
5258 | ||
5259 | else | |
5260 | echo "$ac_t""no" 1>&6 | |
5261 | fi | |
5262 | done | |
5263 | ||
5264 | for ac_hdr in sys/syscall.h | |
5265 | do | |
5266 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5267 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5268 | echo "configure:5269: checking for $ac_hdr" >&5 |
5ee754fc MK |
5269 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5271 | else | |
5272 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5273 | #line 5274 "configure" |
5ee754fc MK |
5274 | #include "confdefs.h" |
5275 | #include <$ac_hdr> | |
5276 | EOF | |
5277 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5278 | { (eval echo configure:5279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5279 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5280 | if test -z "$ac_err"; then | |
5281 | rm -rf conftest* | |
5282 | eval "ac_cv_header_$ac_safe=yes" | |
5283 | else | |
5284 | echo "$ac_err" >&5 | |
5285 | echo "configure: failed program was:" >&5 | |
5286 | cat conftest.$ac_ext >&5 | |
5287 | rm -rf conftest* | |
5288 | eval "ac_cv_header_$ac_safe=no" | |
5289 | fi | |
5290 | rm -f conftest* | |
5291 | fi | |
5292 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5293 | echo "$ac_t""yes" 1>&6 | |
5294 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5295 | cat >> confdefs.h <<EOF | |
5296 | #define $ac_tr_hdr 1 | |
5297 | EOF | |
5298 | ||
5299 | else | |
5300 | echo "$ac_t""no" 1>&6 | |
5301 | fi | |
5302 | done | |
5303 | ||
5304 | for ac_hdr in sys/user.h | |
5305 | do | |
5306 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5307 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5308 | echo "configure:5309: checking for $ac_hdr" >&5 |
5ee754fc MK |
5309 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5311 | else | |
5312 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5313 | #line 5314 "configure" |
5ee754fc MK |
5314 | #include "confdefs.h" |
5315 | #include <$ac_hdr> | |
5316 | EOF | |
5317 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5318 | { (eval echo configure:5319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5319 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5320 | if test -z "$ac_err"; then | |
5321 | rm -rf conftest* | |
5322 | eval "ac_cv_header_$ac_safe=yes" | |
5323 | else | |
5324 | echo "$ac_err" >&5 | |
5325 | echo "configure: failed program was:" >&5 | |
5326 | cat conftest.$ac_ext >&5 | |
5327 | rm -rf conftest* | |
5328 | eval "ac_cv_header_$ac_safe=no" | |
5329 | fi | |
5330 | rm -f conftest* | |
5331 | fi | |
5332 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5333 | echo "$ac_t""yes" 1>&6 | |
5334 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5335 | cat >> confdefs.h <<EOF | |
5336 | #define $ac_tr_hdr 1 | |
5337 | EOF | |
5338 | ||
5339 | else | |
5340 | echo "$ac_t""no" 1>&6 | |
5341 | fi | |
5342 | done | |
5343 | ||
5344 | for ac_hdr in sys/wait.h wait.h | |
5345 | do | |
5346 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5347 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5348 | echo "configure:5349: checking for $ac_hdr" >&5 |
5ee754fc MK |
5349 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5350 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5351 | else | |
5352 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5353 | #line 5354 "configure" |
5ee754fc MK |
5354 | #include "confdefs.h" |
5355 | #include <$ac_hdr> | |
5356 | EOF | |
5357 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5358 | { (eval echo configure:5359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5359 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5360 | if test -z "$ac_err"; then | |
5361 | rm -rf conftest* | |
5362 | eval "ac_cv_header_$ac_safe=yes" | |
5363 | else | |
5364 | echo "$ac_err" >&5 | |
9608ab8b MK |
5365 | echo "configure: failed program was:" >&5 |
5366 | cat conftest.$ac_ext >&5 | |
5367 | rm -rf conftest* | |
5ee754fc | 5368 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5369 | fi |
5370 | rm -f conftest* | |
5371 | fi | |
5ee754fc | 5372 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5373 | echo "$ac_t""yes" 1>&6 |
5374 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5375 | cat >> confdefs.h <<EOF | |
5376 | #define $ac_tr_hdr 1 | |
5377 | EOF | |
5ee754fc | 5378 | |
9608ab8b MK |
5379 | else |
5380 | echo "$ac_t""no" 1>&6 | |
5381 | fi | |
5382 | done | |
5ee754fc MK |
5383 | |
5384 | for ac_hdr in termios.h termio.h sgtty.h | |
5385 | do | |
5386 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5387 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5388 | echo "configure:5389: checking for $ac_hdr" >&5 |
5ee754fc | 5389 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5390 | echo $ac_n "(cached) $ac_c" 1>&6 |
5391 | else | |
5ee754fc | 5392 | cat > conftest.$ac_ext <<EOF |
0e5d83e3 | 5393 | #line 5394 "configure" |
9608ab8b | 5394 | #include "confdefs.h" |
5ee754fc | 5395 | #include <$ac_hdr> |
9608ab8b | 5396 | EOF |
5ee754fc | 5397 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
0e5d83e3 | 5398 | { (eval echo configure:5399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5399 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5400 | if test -z "$ac_err"; then | |
9608ab8b | 5401 | rm -rf conftest* |
5ee754fc | 5402 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5403 | else |
5ee754fc | 5404 | echo "$ac_err" >&5 |
9608ab8b MK |
5405 | echo "configure: failed program was:" >&5 |
5406 | cat conftest.$ac_ext >&5 | |
5407 | rm -rf conftest* | |
5ee754fc | 5408 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5409 | fi |
5410 | rm -f conftest* | |
9608ab8b | 5411 | fi |
5ee754fc | 5412 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5413 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5414 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5415 | cat >> confdefs.h <<EOF | |
5416 | #define $ac_tr_hdr 1 | |
5417 | EOF | |
5418 | ||
9608ab8b MK |
5419 | else |
5420 | echo "$ac_t""no" 1>&6 | |
5421 | fi | |
5ee754fc | 5422 | done |
9608ab8b | 5423 | |
5ee754fc MK |
5424 | for ac_hdr in unistd.h |
5425 | do | |
5426 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5427 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5428 | echo "configure:5429: checking for $ac_hdr" >&5 |
5ee754fc | 5429 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5430 | echo $ac_n "(cached) $ac_c" 1>&6 |
5431 | else | |
5ee754fc | 5432 | cat > conftest.$ac_ext <<EOF |
0e5d83e3 | 5433 | #line 5434 "configure" |
9608ab8b | 5434 | #include "confdefs.h" |
5ee754fc | 5435 | #include <$ac_hdr> |
9608ab8b | 5436 | EOF |
5ee754fc | 5437 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
0e5d83e3 | 5438 | { (eval echo configure:5439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5439 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5440 | if test -z "$ac_err"; then | |
9608ab8b | 5441 | rm -rf conftest* |
5ee754fc | 5442 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5443 | else |
5ee754fc | 5444 | echo "$ac_err" >&5 |
9608ab8b MK |
5445 | echo "configure: failed program was:" >&5 |
5446 | cat conftest.$ac_ext >&5 | |
5447 | rm -rf conftest* | |
5ee754fc | 5448 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5449 | fi |
5450 | rm -f conftest* | |
9608ab8b | 5451 | fi |
5ee754fc | 5452 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5453 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5454 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5455 | cat >> confdefs.h <<EOF | |
5456 | #define $ac_tr_hdr 1 | |
5457 | EOF | |
5458 | ||
9608ab8b MK |
5459 | else |
5460 | echo "$ac_t""no" 1>&6 | |
5461 | fi | |
5ee754fc | 5462 | done |
9608ab8b | 5463 | |
9608ab8b | 5464 | |
5ee754fc MK |
5465 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5466 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5467 | # think that we don't have <curses.h> if we're using GCC. | |
5468 | case $host_os in | |
5469 | solaris2.[78]) | |
5470 | if test "$GCC" = yes; then | |
5471 | cat >> confdefs.h <<\EOF | |
5472 | #define _MSE_INT_H 1 | |
5473 | EOF | |
5474 | ||
5475 | fi ;; | |
5476 | esac | |
5477 | for ac_hdr in curses.h ncurses.h term.h | |
5478 | do | |
5479 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5480 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5481 | echo "configure:5482: checking for $ac_hdr" >&5 |
5ee754fc | 5482 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5483 | echo $ac_n "(cached) $ac_c" 1>&6 |
5484 | else | |
5485 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5486 | #line 5487 "configure" |
c906108c | 5487 | #include "confdefs.h" |
5ee754fc | 5488 | #include <$ac_hdr> |
c906108c SS |
5489 | EOF |
5490 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5491 | { (eval echo configure:5492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5492 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5493 | if test -z "$ac_err"; then | |
5494 | rm -rf conftest* | |
5ee754fc | 5495 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5496 | else |
5497 | echo "$ac_err" >&5 | |
5498 | echo "configure: failed program was:" >&5 | |
5499 | cat conftest.$ac_ext >&5 | |
5500 | rm -rf conftest* | |
5ee754fc | 5501 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5502 | fi |
5503 | rm -f conftest* | |
c906108c | 5504 | fi |
5ee754fc MK |
5505 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5506 | echo "$ac_t""yes" 1>&6 | |
5507 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5508 | cat >> confdefs.h <<EOF | |
5509 | #define $ac_tr_hdr 1 | |
c906108c | 5510 | EOF |
5ee754fc | 5511 | |
c906108c | 5512 | else |
5ee754fc | 5513 | echo "$ac_t""no" 1>&6 |
c906108c | 5514 | fi |
5ee754fc | 5515 | done |
c906108c SS |
5516 | |
5517 | ||
5ee754fc MK |
5518 | # FIXME: kettenis/20030102: In most cases we include these |
5519 | # unconditionally, so what's the point in checking these? | |
5520 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5521 | do |
5522 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5523 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 5524 | echo "configure:5525: checking for $ac_hdr" >&5 |
c906108c SS |
5525 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5526 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5527 | else | |
5528 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5529 | #line 5530 "configure" |
c906108c SS |
5530 | #include "confdefs.h" |
5531 | #include <$ac_hdr> | |
5532 | EOF | |
5533 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 5534 | { (eval echo configure:5535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5535 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5536 | if test -z "$ac_err"; then | |
5537 | rm -rf conftest* | |
5538 | eval "ac_cv_header_$ac_safe=yes" | |
5539 | else | |
5540 | echo "$ac_err" >&5 | |
5541 | echo "configure: failed program was:" >&5 | |
5542 | cat conftest.$ac_ext >&5 | |
5543 | rm -rf conftest* | |
5544 | eval "ac_cv_header_$ac_safe=no" | |
5545 | fi | |
5546 | rm -f conftest* | |
5547 | fi | |
5548 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5549 | echo "$ac_t""yes" 1>&6 | |
5550 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5551 | cat >> confdefs.h <<EOF | |
5552 | #define $ac_tr_hdr 1 | |
5553 | EOF | |
5554 | ||
5555 | else | |
5556 | echo "$ac_t""no" 1>&6 | |
5557 | fi | |
5558 | done | |
5559 | ||
5ee754fc | 5560 | |
b9362cc7 AC |
5561 | # ------------------------- # |
5562 | # Checks for declarations. # | |
5563 | # ------------------------- # | |
5564 | ||
5565 | for ac_func in getopt | |
5566 | do | |
5567 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5568 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
0e5d83e3 | 5569 | echo "configure:5570: checking whether $ac_func is declared" >&5 |
b9362cc7 AC |
5570 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
5571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5572 | else | |
5573 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5574 | #line 5575 "configure" |
b9362cc7 AC |
5575 | #include "confdefs.h" |
5576 | #undef $ac_tr_decl | |
5577 | #define $ac_tr_decl 1 | |
5578 | ||
5579 | ||
5580 | int main() { | |
5581 | #ifndef $ac_func | |
5582 | char *(*pfn) = (char *(*)) $ac_func ; | |
5583 | #endif | |
5584 | ; return 0; } | |
5585 | EOF | |
0e5d83e3 | 5586 | if { (eval echo configure:5587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9362cc7 AC |
5587 | rm -rf conftest* |
5588 | eval "gcc_cv_have_decl_$ac_func=yes" | |
5589 | else | |
5590 | echo "configure: failed program was:" >&5 | |
5591 | cat conftest.$ac_ext >&5 | |
5592 | rm -rf conftest* | |
5593 | eval "gcc_cv_have_decl_$ac_func=no" | |
5594 | fi | |
5595 | rm -f conftest* | |
5596 | fi | |
5597 | ||
5598 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5599 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
5600 | #define $ac_tr_decl 1 | |
5601 | EOF | |
5602 | ||
5603 | else | |
5604 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
5605 | #define $ac_tr_decl 0 | |
5606 | EOF | |
5607 | ||
5608 | fi | |
5609 | ||
5610 | done | |
5611 | if test x = y ; then | |
5612 | cat >> confdefs.h <<\EOF | |
5613 | #define HAVE_DECL_GETOPT 1 | |
5614 | EOF | |
5615 | fi | |
5616 | ||
5617 | ||
5ee754fc MK |
5618 | # ------------------ # |
5619 | # Checks for types. # | |
5620 | # ------------------ # | |
5621 | ||
5622 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
0e5d83e3 | 5623 | echo "configure:5624: checking return type of signal handlers" >&5 |
5ee754fc | 5624 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5625 | echo $ac_n "(cached) $ac_c" 1>&6 |
5626 | else | |
5627 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5628 | #line 5629 "configure" |
c906108c SS |
5629 | #include "confdefs.h" |
5630 | #include <sys/types.h> | |
5ee754fc MK |
5631 | #include <signal.h> |
5632 | #ifdef signal | |
5633 | #undef signal | |
c906108c | 5634 | #endif |
5ee754fc MK |
5635 | #ifdef __cplusplus |
5636 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5637 | #else | |
5638 | void (*signal ()) (); | |
c906108c SS |
5639 | #endif |
5640 | ||
5ee754fc MK |
5641 | int main() { |
5642 | int i; | |
5643 | ; return 0; } | |
c906108c | 5644 | EOF |
0e5d83e3 | 5645 | if { (eval echo configure:5646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5646 | rm -rf conftest* |
5ee754fc | 5647 | ac_cv_type_signal=void |
c906108c | 5648 | else |
5ee754fc MK |
5649 | echo "configure: failed program was:" >&5 |
5650 | cat conftest.$ac_ext >&5 | |
c906108c | 5651 | rm -rf conftest* |
5ee754fc | 5652 | ac_cv_type_signal=int |
c906108c SS |
5653 | fi |
5654 | rm -f conftest* | |
c906108c SS |
5655 | fi |
5656 | ||
5ee754fc MK |
5657 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5658 | cat >> confdefs.h <<EOF | |
5659 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5660 | EOF |
5661 | ||
c906108c SS |
5662 | |
5663 | ||
5ee754fc MK |
5664 | # ------------------------------------- # |
5665 | # Checks for compiler characteristics. # | |
5666 | # ------------------------------------- # | |
5667 | ||
c906108c | 5668 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
0e5d83e3 | 5669 | echo "configure:5670: checking for working const" >&5 |
c906108c SS |
5670 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5672 | else | |
5673 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5674 | #line 5675 "configure" |
c906108c SS |
5675 | #include "confdefs.h" |
5676 | ||
5677 | int main() { | |
5678 | ||
5679 | /* Ultrix mips cc rejects this. */ | |
5680 | typedef int charset[2]; const charset x; | |
5681 | /* SunOS 4.1.1 cc rejects this. */ | |
5682 | char const *const *ccp; | |
5683 | char **p; | |
5684 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5685 | struct point {int x, y;}; | |
5686 | static struct point const zero = {0,0}; | |
5687 | /* AIX XL C 1.02.0.0 rejects this. | |
5688 | It does not let you subtract one const X* pointer from another in an arm | |
5689 | of an if-expression whose if-part is not a constant expression */ | |
5690 | const char *g = "string"; | |
5691 | ccp = &g + (g ? g-g : 0); | |
5692 | /* HPUX 7.0 cc rejects these. */ | |
5693 | ++ccp; | |
5694 | p = (char**) ccp; | |
5695 | ccp = (char const *const *) p; | |
5696 | { /* SCO 3.2v4 cc rejects this. */ | |
5697 | char *t; | |
5698 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5699 | ||
5700 | *t++ = 0; | |
5701 | } | |
5702 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5703 | int x[] = {25, 17}; | |
5704 | const int *foo = &x[0]; | |
5705 | ++foo; | |
5706 | } | |
5707 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5708 | typedef const int *iptr; | |
5709 | iptr p = 0; | |
5710 | ++p; | |
5711 | } | |
5712 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5713 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5714 | struct s { int j; const int *ap[3]; }; | |
5715 | struct s *b; b->j = 5; | |
5716 | } | |
5717 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5718 | const int foo = 10; | |
5719 | } | |
5720 | ||
5721 | ; return 0; } | |
5722 | EOF | |
0e5d83e3 | 5723 | if { (eval echo configure:5724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5724 | rm -rf conftest* |
5725 | ac_cv_c_const=yes | |
5726 | else | |
5727 | echo "configure: failed program was:" >&5 | |
5728 | cat conftest.$ac_ext >&5 | |
5729 | rm -rf conftest* | |
5730 | ac_cv_c_const=no | |
5731 | fi | |
5732 | rm -f conftest* | |
5733 | fi | |
5734 | ||
5735 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5736 | if test $ac_cv_c_const = no; then | |
5737 | cat >> confdefs.h <<\EOF | |
5738 | #define const | |
5739 | EOF | |
5740 | ||
5741 | fi | |
5742 | ||
bce58c09 | 5743 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
0e5d83e3 | 5744 | echo "configure:5745: checking for inline" >&5 |
bce58c09 JB |
5745 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5746 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5747 | else | |
5748 | ac_cv_c_inline=no | |
5749 | for ac_kw in inline __inline__ __inline; do | |
5750 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5751 | #line 5752 "configure" |
bce58c09 JB |
5752 | #include "confdefs.h" |
5753 | ||
5754 | int main() { | |
5755 | } $ac_kw foo() { | |
5756 | ; return 0; } | |
5757 | EOF | |
0e5d83e3 | 5758 | if { (eval echo configure:5759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5759 | rm -rf conftest* |
5760 | ac_cv_c_inline=$ac_kw; break | |
5761 | else | |
5762 | echo "configure: failed program was:" >&5 | |
5763 | cat conftest.$ac_ext >&5 | |
5764 | fi | |
5765 | rm -f conftest* | |
5766 | done | |
5767 | ||
5768 | fi | |
5769 | ||
5770 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5771 | case "$ac_cv_c_inline" in | |
5772 | inline | yes) ;; | |
5773 | no) cat >> confdefs.h <<\EOF | |
5774 | #define inline | |
5775 | EOF | |
5776 | ;; | |
5777 | *) cat >> confdefs.h <<EOF | |
5778 | #define inline $ac_cv_c_inline | |
5779 | EOF | |
5780 | ;; | |
5781 | esac | |
5782 | ||
c906108c | 5783 | |
5ee754fc MK |
5784 | # ------------------------------ # |
5785 | # Checks for library functions. # | |
5786 | # ------------------------------ # | |
5787 | ||
46711df8 MK |
5788 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5789 | # for constant arguments. Useless! | |
5790 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
0e5d83e3 | 5791 | echo "configure:5792: checking for working alloca.h" >&5 |
46711df8 MK |
5792 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5793 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5794 | else | |
5795 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5796 | #line 5797 "configure" |
46711df8 MK |
5797 | #include "confdefs.h" |
5798 | #include <alloca.h> | |
5799 | int main() { | |
5800 | char *p = alloca(2 * sizeof(int)); | |
5801 | ; return 0; } | |
5802 | EOF | |
0e5d83e3 | 5803 | if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5804 | rm -rf conftest* |
5805 | ac_cv_header_alloca_h=yes | |
5806 | else | |
5807 | echo "configure: failed program was:" >&5 | |
5808 | cat conftest.$ac_ext >&5 | |
5809 | rm -rf conftest* | |
5810 | ac_cv_header_alloca_h=no | |
5811 | fi | |
5812 | rm -f conftest* | |
5813 | fi | |
5814 | ||
5815 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5816 | if test $ac_cv_header_alloca_h = yes; then | |
5817 | cat >> confdefs.h <<\EOF | |
5818 | #define HAVE_ALLOCA_H 1 | |
5819 | EOF | |
5820 | ||
5821 | fi | |
5822 | ||
5823 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
0e5d83e3 | 5824 | echo "configure:5825: checking for alloca" >&5 |
46711df8 MK |
5825 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5826 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5827 | else | |
5828 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5829 | #line 5830 "configure" |
46711df8 MK |
5830 | #include "confdefs.h" |
5831 | ||
5832 | #ifdef __GNUC__ | |
5833 | # define alloca __builtin_alloca | |
5834 | #else | |
5835 | # ifdef _MSC_VER | |
5836 | # include <malloc.h> | |
5837 | # define alloca _alloca | |
5838 | # else | |
5839 | # if HAVE_ALLOCA_H | |
5840 | # include <alloca.h> | |
5841 | # else | |
5842 | # ifdef _AIX | |
5843 | #pragma alloca | |
5844 | # else | |
5845 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5846 | char *alloca (); | |
5847 | # endif | |
5848 | # endif | |
5849 | # endif | |
5850 | # endif | |
5851 | #endif | |
5852 | ||
5853 | int main() { | |
5854 | char *p = (char *) alloca(1); | |
5855 | ; return 0; } | |
5856 | EOF | |
0e5d83e3 | 5857 | if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5858 | rm -rf conftest* |
5859 | ac_cv_func_alloca_works=yes | |
5860 | else | |
5861 | echo "configure: failed program was:" >&5 | |
5862 | cat conftest.$ac_ext >&5 | |
5863 | rm -rf conftest* | |
5864 | ac_cv_func_alloca_works=no | |
5865 | fi | |
5866 | rm -f conftest* | |
5867 | fi | |
5868 | ||
5869 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5870 | if test $ac_cv_func_alloca_works = yes; then | |
5871 | cat >> confdefs.h <<\EOF | |
5872 | #define HAVE_ALLOCA 1 | |
5873 | EOF | |
5874 | ||
5875 | fi | |
5876 | ||
5877 | if test $ac_cv_func_alloca_works = no; then | |
5878 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5879 | # that cause trouble. Some versions do not even contain alloca or | |
5880 | # contain a buggy version. If you still want to use their alloca, | |
5881 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5882 | ALLOCA=alloca.${ac_objext} | |
5883 | cat >> confdefs.h <<\EOF | |
5884 | #define C_ALLOCA 1 | |
5885 | EOF | |
5886 | ||
5887 | ||
5888 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
0e5d83e3 | 5889 | echo "configure:5890: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5890 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5892 | else | |
5893 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5894 | #line 5895 "configure" |
46711df8 MK |
5895 | #include "confdefs.h" |
5896 | #if defined(CRAY) && ! defined(CRAY2) | |
5897 | webecray | |
5898 | #else | |
5899 | wenotbecray | |
5900 | #endif | |
5901 | ||
5902 | EOF | |
5903 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5904 | egrep "webecray" >/dev/null 2>&1; then | |
5905 | rm -rf conftest* | |
5906 | ac_cv_os_cray=yes | |
5907 | else | |
5908 | rm -rf conftest* | |
5909 | ac_cv_os_cray=no | |
5910 | fi | |
5911 | rm -f conftest* | |
5912 | ||
5913 | fi | |
5914 | ||
5915 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5916 | if test $ac_cv_os_cray = yes; then | |
5917 | for ac_func in _getb67 GETB67 getb67; do | |
5918 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 5919 | echo "configure:5920: checking for $ac_func" >&5 |
46711df8 MK |
5920 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5921 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5922 | else | |
5923 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5924 | #line 5925 "configure" |
46711df8 MK |
5925 | #include "confdefs.h" |
5926 | /* System header to define __stub macros and hopefully few prototypes, | |
5927 | which can conflict with char $ac_func(); below. */ | |
5928 | #include <assert.h> | |
5929 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5930 | /* We use char because int might match the return type of a gcc2 | |
5931 | builtin and then its argument prototype would still apply. */ | |
5932 | char $ac_func(); | |
5933 | ||
5934 | int main() { | |
5935 | ||
5936 | /* The GNU C library defines this for functions which it implements | |
5937 | to always fail with ENOSYS. Some functions are actually named | |
5938 | something starting with __ and the normal name is an alias. */ | |
5939 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5940 | choke me | |
5941 | #else | |
5942 | $ac_func(); | |
5943 | #endif | |
5944 | ||
5945 | ; return 0; } | |
5946 | EOF | |
0e5d83e3 | 5947 | if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5948 | rm -rf conftest* |
5949 | eval "ac_cv_func_$ac_func=yes" | |
5950 | else | |
5951 | echo "configure: failed program was:" >&5 | |
5952 | cat conftest.$ac_ext >&5 | |
5953 | rm -rf conftest* | |
5954 | eval "ac_cv_func_$ac_func=no" | |
5955 | fi | |
5956 | rm -f conftest* | |
5957 | fi | |
5958 | ||
5959 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5960 | echo "$ac_t""yes" 1>&6 | |
5961 | cat >> confdefs.h <<EOF | |
5962 | #define CRAY_STACKSEG_END $ac_func | |
5963 | EOF | |
5964 | ||
5965 | break | |
5966 | else | |
5967 | echo "$ac_t""no" 1>&6 | |
5968 | fi | |
5969 | ||
5970 | done | |
5971 | fi | |
5972 | ||
5973 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
0e5d83e3 | 5974 | echo "configure:5975: checking stack direction for C alloca" >&5 |
46711df8 MK |
5975 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5976 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5977 | else | |
5978 | if test "$cross_compiling" = yes; then | |
5979 | ac_cv_c_stack_direction=0 | |
5980 | else | |
5981 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 5982 | #line 5983 "configure" |
46711df8 MK |
5983 | #include "confdefs.h" |
5984 | find_stack_direction () | |
5985 | { | |
5986 | static char *addr = 0; | |
5987 | auto char dummy; | |
5988 | if (addr == 0) | |
5989 | { | |
5990 | addr = &dummy; | |
5991 | return find_stack_direction (); | |
5992 | } | |
5993 | else | |
5994 | return (&dummy > addr) ? 1 : -1; | |
5995 | } | |
5996 | main () | |
5997 | { | |
5998 | exit (find_stack_direction() < 0); | |
5999 | } | |
6000 | EOF | |
0e5d83e3 | 6001 | if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
6002 | then |
6003 | ac_cv_c_stack_direction=1 | |
6004 | else | |
6005 | echo "configure: failed program was:" >&5 | |
6006 | cat conftest.$ac_ext >&5 | |
6007 | rm -fr conftest* | |
6008 | ac_cv_c_stack_direction=-1 | |
6009 | fi | |
6010 | rm -fr conftest* | |
6011 | fi | |
6012 | ||
6013 | fi | |
6014 | ||
6015 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
6016 | cat >> confdefs.h <<EOF | |
6017 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6018 | EOF | |
6019 | ||
6020 | fi | |
6021 | ||
27ca5dad | 6022 | for ac_hdr in unistd.h |
97bf5e38 MK |
6023 | do |
6024 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
6025 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0e5d83e3 | 6026 | echo "configure:6027: checking for $ac_hdr" >&5 |
74c1b268 AC |
6027 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6028 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6029 | else | |
6030 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6031 | #line 6032 "configure" |
74c1b268 | 6032 | #include "confdefs.h" |
97bf5e38 | 6033 | #include <$ac_hdr> |
74c1b268 AC |
6034 | EOF |
6035 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 6036 | { (eval echo configure:6037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
6037 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6038 | if test -z "$ac_err"; then | |
6039 | rm -rf conftest* | |
6040 | eval "ac_cv_header_$ac_safe=yes" | |
6041 | else | |
6042 | echo "$ac_err" >&5 | |
6043 | echo "configure: failed program was:" >&5 | |
6044 | cat conftest.$ac_ext >&5 | |
6045 | rm -rf conftest* | |
6046 | eval "ac_cv_header_$ac_safe=no" | |
6047 | fi | |
6048 | rm -f conftest* | |
6049 | fi | |
6050 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6051 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
6052 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
6053 | cat >> confdefs.h <<EOF | |
6054 | #define $ac_tr_hdr 1 | |
74c1b268 | 6055 | EOF |
97bf5e38 | 6056 | |
74c1b268 AC |
6057 | else |
6058 | echo "$ac_t""no" 1>&6 | |
6059 | fi | |
97bf5e38 | 6060 | done |
74c1b268 | 6061 | |
97bf5e38 MK |
6062 | for ac_func in getpagesize |
6063 | do | |
6064 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6065 | echo "configure:6066: checking for $ac_func" >&5 |
97bf5e38 | 6066 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
6067 | echo $ac_n "(cached) $ac_c" 1>&6 |
6068 | else | |
6069 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6070 | #line 6071 "configure" |
74c1b268 AC |
6071 | #include "confdefs.h" |
6072 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 6073 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
6074 | #include <assert.h> |
6075 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6076 | /* We use char because int might match the return type of a gcc2 | |
6077 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 6078 | char $ac_func(); |
74c1b268 AC |
6079 | |
6080 | int main() { | |
6081 | ||
6082 | /* The GNU C library defines this for functions which it implements | |
6083 | to always fail with ENOSYS. Some functions are actually named | |
6084 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 6085 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
6086 | choke me |
6087 | #else | |
97bf5e38 | 6088 | $ac_func(); |
74c1b268 AC |
6089 | #endif |
6090 | ||
6091 | ; return 0; } | |
6092 | EOF | |
0e5d83e3 | 6093 | if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 6094 | rm -rf conftest* |
97bf5e38 | 6095 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
6096 | else |
6097 | echo "configure: failed program was:" >&5 | |
6098 | cat conftest.$ac_ext >&5 | |
6099 | rm -rf conftest* | |
97bf5e38 | 6100 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
6101 | fi |
6102 | rm -f conftest* | |
6103 | fi | |
6104 | ||
97bf5e38 | 6105 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 6106 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
6107 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6108 | cat >> confdefs.h <<EOF | |
6109 | #define $ac_tr_func 1 | |
6110 | EOF | |
6111 | ||
74c1b268 AC |
6112 | else |
6113 | echo "$ac_t""no" 1>&6 | |
6114 | fi | |
97bf5e38 | 6115 | done |
74c1b268 | 6116 | |
97bf5e38 | 6117 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
0e5d83e3 | 6118 | echo "configure:6119: checking for working mmap" >&5 |
97bf5e38 MK |
6119 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6120 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6121 | else | |
6122 | if test "$cross_compiling" = yes; then | |
6123 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
6124 | else |
6125 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6126 | #line 6127 "configure" |
74c1b268 | 6127 | #include "confdefs.h" |
97bf5e38 MK |
6128 | |
6129 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6130 | Here is a matrix of mmap possibilities: | |
6131 | mmap private not fixed | |
6132 | mmap private fixed at somewhere currently unmapped | |
6133 | mmap private fixed at somewhere already mapped | |
6134 | mmap shared not fixed | |
6135 | mmap shared fixed at somewhere currently unmapped | |
6136 | mmap shared fixed at somewhere already mapped | |
6137 | For private mappings, we should verify that changes cannot be read() | |
6138 | back from the file, nor mmap's back from the file at a different | |
6139 | address. (There have been systems where private was not correctly | |
6140 | implemented like the infamous i386 svr4.0, and systems where the | |
6141 | VM page cache was not coherent with the filesystem buffer cache | |
6142 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6143 | For shared mappings, we should conversely verify that changes get | |
6144 | propogated back to all the places they're supposed to be. | |
6145 | ||
6146 | Grep wants private fixed already mapped. | |
6147 | The main things grep needs to know about mmap are: | |
6148 | * does it exist and is it safe to write into the mmap'd area | |
6149 | * how to use it (BSD variants) */ | |
74c1b268 | 6150 | #include <sys/types.h> |
97bf5e38 MK |
6151 | #include <fcntl.h> |
6152 | #include <sys/mman.h> | |
6153 | ||
6154 | /* This mess was copied from the GNU getpagesize.h. */ | |
6155 | #ifndef HAVE_GETPAGESIZE | |
27ca5dad MC |
6156 | # ifdef HAVE_UNISTD_H |
6157 | # include <unistd.h> | |
6158 | # endif | |
97bf5e38 MK |
6159 | |
6160 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6161 | # ifndef HAVE_SYS_PARAM_H | |
6162 | # define HAVE_SYS_PARAM_H 1 | |
6163 | # endif | |
6164 | ||
6165 | # ifdef _SC_PAGESIZE | |
6166 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6167 | # else /* no _SC_PAGESIZE */ | |
6168 | # ifdef HAVE_SYS_PARAM_H | |
6169 | # include <sys/param.h> | |
6170 | # ifdef EXEC_PAGESIZE | |
6171 | # define getpagesize() EXEC_PAGESIZE | |
6172 | # else /* no EXEC_PAGESIZE */ | |
6173 | # ifdef NBPG | |
6174 | # define getpagesize() NBPG * CLSIZE | |
6175 | # ifndef CLSIZE | |
6176 | # define CLSIZE 1 | |
6177 | # endif /* no CLSIZE */ | |
6178 | # else /* no NBPG */ | |
6179 | # ifdef NBPC | |
6180 | # define getpagesize() NBPC | |
6181 | # else /* no NBPC */ | |
6182 | # ifdef PAGESIZE | |
6183 | # define getpagesize() PAGESIZE | |
6184 | # endif /* PAGESIZE */ | |
6185 | # endif /* no NBPC */ | |
6186 | # endif /* no NBPG */ | |
6187 | # endif /* no EXEC_PAGESIZE */ | |
6188 | # else /* no HAVE_SYS_PARAM_H */ | |
6189 | # define getpagesize() 8192 /* punt totally */ | |
6190 | # endif /* no HAVE_SYS_PARAM_H */ | |
6191 | # endif /* no _SC_PAGESIZE */ | |
6192 | ||
6193 | #endif /* no HAVE_GETPAGESIZE */ | |
6194 | ||
74c1b268 | 6195 | #ifdef __cplusplus |
97bf5e38 | 6196 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 6197 | #else |
97bf5e38 | 6198 | char *malloc(); |
74c1b268 | 6199 | #endif |
74c1b268 | 6200 | |
97bf5e38 MK |
6201 | int |
6202 | main() | |
6203 | { | |
6204 | char *data, *data2, *data3; | |
6205 | int i, pagesize; | |
6206 | int fd; | |
74c1b268 | 6207 | |
97bf5e38 | 6208 | pagesize = getpagesize(); |
74c1b268 | 6209 | |
97bf5e38 MK |
6210 | /* |
6211 | * First, make a file with some known garbage in it. | |
6212 | */ | |
6213 | data = malloc(pagesize); | |
6214 | if (!data) | |
6215 | exit(1); | |
6216 | for (i = 0; i < pagesize; ++i) | |
6217 | *(data + i) = rand(); | |
6218 | umask(0); | |
6219 | fd = creat("conftestmmap", 0600); | |
6220 | if (fd < 0) | |
6221 | exit(1); | |
6222 | if (write(fd, data, pagesize) != pagesize) | |
6223 | exit(1); | |
6224 | close(fd); | |
74c1b268 | 6225 | |
97bf5e38 MK |
6226 | /* |
6227 | * Next, try to mmap the file at a fixed address which | |
6228 | * already has something else allocated at it. If we can, | |
6229 | * also make sure that we see the same garbage. | |
6230 | */ | |
6231 | fd = open("conftestmmap", O_RDWR); | |
6232 | if (fd < 0) | |
6233 | exit(1); | |
6234 | data2 = malloc(2 * pagesize); | |
6235 | if (!data2) | |
6236 | exit(1); | |
6237 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6238 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6239 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6240 | exit(1); | |
6241 | for (i = 0; i < pagesize; ++i) | |
6242 | if (*(data + i) != *(data2 + i)) | |
6243 | exit(1); | |
74c1b268 | 6244 | |
97bf5e38 MK |
6245 | /* |
6246 | * Finally, make sure that changes to the mapped area | |
6247 | * do not percolate back to the file as seen by read(). | |
6248 | * (This is a bug on some variants of i386 svr4.0.) | |
6249 | */ | |
6250 | for (i = 0; i < pagesize; ++i) | |
6251 | *(data2 + i) = *(data2 + i) + 1; | |
6252 | data3 = malloc(pagesize); | |
6253 | if (!data3) | |
6254 | exit(1); | |
6255 | if (read(fd, data3, pagesize) != pagesize) | |
6256 | exit(1); | |
6257 | for (i = 0; i < pagesize; ++i) | |
6258 | if (*(data + i) != *(data3 + i)) | |
6259 | exit(1); | |
6260 | close(fd); | |
6261 | unlink("conftestmmap"); | |
6262 | exit(0); | |
74c1b268 | 6263 | } |
97bf5e38 | 6264 | |
74c1b268 | 6265 | EOF |
0e5d83e3 | 6266 | if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6267 | then |
97bf5e38 | 6268 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6269 | else |
6270 | echo "configure: failed program was:" >&5 | |
6271 | cat conftest.$ac_ext >&5 | |
6272 | rm -fr conftest* | |
97bf5e38 | 6273 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6274 | fi |
6275 | rm -fr conftest* | |
6276 | fi | |
6277 | ||
6278 | fi | |
6279 | ||
97bf5e38 MK |
6280 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6281 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6282 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6283 | #define HAVE_MMAP 1 |
74c1b268 AC |
6284 | EOF |
6285 | ||
6286 | fi | |
6287 | ||
97bf5e38 | 6288 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
0e5d83e3 | 6289 | echo "configure:6290: checking for pid_t" >&5 |
97bf5e38 | 6290 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6291 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6292 | else |
6293 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6294 | #line 6295 "configure" |
0200359f | 6295 | #include "confdefs.h" |
97bf5e38 MK |
6296 | #include <sys/types.h> |
6297 | #if STDC_HEADERS | |
6298 | #include <stdlib.h> | |
6299 | #include <stddef.h> | |
0200359f | 6300 | #endif |
0200359f | 6301 | EOF |
97bf5e38 MK |
6302 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6303 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6304 | rm -rf conftest* | |
6305 | ac_cv_type_pid_t=yes | |
0200359f | 6306 | else |
97bf5e38 MK |
6307 | rm -rf conftest* |
6308 | ac_cv_type_pid_t=no | |
0200359f | 6309 | fi |
97bf5e38 | 6310 | rm -f conftest* |
0200359f MK |
6311 | |
6312 | fi | |
97bf5e38 MK |
6313 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6314 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6315 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6316 | #define pid_t int |
0200359f MK |
6317 | EOF |
6318 | ||
6319 | fi | |
6320 | ||
97bf5e38 MK |
6321 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6322 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
0e5d83e3 | 6323 | echo "configure:6324: checking for vfork.h" >&5 |
97bf5e38 | 6324 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6325 | echo $ac_n "(cached) $ac_c" 1>&6 |
6326 | else | |
6327 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6328 | #line 6329 "configure" |
72473524 | 6329 | #include "confdefs.h" |
97bf5e38 | 6330 | #include <vfork.h> |
72473524 | 6331 | EOF |
97bf5e38 | 6332 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
0e5d83e3 | 6333 | { (eval echo configure:6334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6334 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6335 | if test -z "$ac_err"; then | |
72473524 | 6336 | rm -rf conftest* |
97bf5e38 | 6337 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6338 | else |
97bf5e38 | 6339 | echo "$ac_err" >&5 |
72473524 DJ |
6340 | echo "configure: failed program was:" >&5 |
6341 | cat conftest.$ac_ext >&5 | |
6342 | rm -rf conftest* | |
97bf5e38 | 6343 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6344 | fi |
6345 | rm -f conftest* | |
6346 | fi | |
97bf5e38 MK |
6347 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6348 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6349 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6350 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6351 | EOF |
6352 | ||
97bf5e38 MK |
6353 | else |
6354 | echo "$ac_t""no" 1>&6 | |
72473524 | 6355 | fi |
c906108c | 6356 | |
97bf5e38 | 6357 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
0e5d83e3 | 6358 | echo "configure:6359: checking for working vfork" >&5 |
97bf5e38 MK |
6359 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6360 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6361 | else | |
6362 | if test "$cross_compiling" = yes; then | |
6363 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
0e5d83e3 | 6364 | echo "configure:6365: checking for vfork" >&5 |
97bf5e38 | 6365 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6366 | echo $ac_n "(cached) $ac_c" 1>&6 |
6367 | else | |
6368 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6369 | #line 6370 "configure" |
2b2d558c | 6370 | #include "confdefs.h" |
97bf5e38 MK |
6371 | /* System header to define __stub macros and hopefully few prototypes, |
6372 | which can conflict with char vfork(); below. */ | |
6373 | #include <assert.h> | |
6374 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6375 | /* We use char because int might match the return type of a gcc2 | |
6376 | builtin and then its argument prototype would still apply. */ | |
6377 | char vfork(); | |
2b2d558c MK |
6378 | |
6379 | int main() { | |
97bf5e38 MK |
6380 | |
6381 | /* The GNU C library defines this for functions which it implements | |
6382 | to always fail with ENOSYS. Some functions are actually named | |
6383 | something starting with __ and the normal name is an alias. */ | |
6384 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6385 | choke me | |
6386 | #else | |
6387 | vfork(); | |
6388 | #endif | |
6389 | ||
2b2d558c MK |
6390 | ; return 0; } |
6391 | EOF | |
0e5d83e3 | 6392 | if { (eval echo configure:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6393 | rm -rf conftest* |
97bf5e38 | 6394 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6395 | else |
6396 | echo "configure: failed program was:" >&5 | |
6397 | cat conftest.$ac_ext >&5 | |
6398 | rm -rf conftest* | |
97bf5e38 | 6399 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6400 | fi |
6401 | rm -f conftest* | |
6402 | fi | |
6403 | ||
97bf5e38 MK |
6404 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6405 | echo "$ac_t""yes" 1>&6 | |
6406 | : | |
6407 | else | |
6408 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6409 | fi |
6410 | ||
97bf5e38 | 6411 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6412 | else |
6413 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6414 | #line 6415 "configure" |
7dfa765c | 6415 | #include "confdefs.h" |
97bf5e38 MK |
6416 | /* Thanks to Paul Eggert for this test. */ |
6417 | #include <stdio.h> | |
6418 | #include <sys/types.h> | |
6419 | #include <sys/stat.h> | |
6420 | #ifdef HAVE_UNISTD_H | |
6421 | #include <unistd.h> | |
6422 | #endif | |
6423 | #ifdef HAVE_VFORK_H | |
6424 | #include <vfork.h> | |
6425 | #endif | |
6426 | /* On some sparc systems, changes by the child to local and incoming | |
6427 | argument registers are propagated back to the parent. | |
6428 | The compiler is told about this with #include <vfork.h>, | |
6429 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6430 | Test for this by using a static variable whose address | |
6431 | is put into a register that is clobbered by the vfork. */ | |
6432 | static | |
6433 | #ifdef __cplusplus | |
6434 | sparc_address_test (int arg) | |
6435 | #else | |
6436 | sparc_address_test (arg) int arg; | |
6437 | #endif | |
6438 | { | |
6439 | static pid_t child; | |
6440 | if (!child) { | |
6441 | child = vfork (); | |
6442 | if (child < 0) { | |
6443 | perror ("vfork"); | |
6444 | _exit(2); | |
6445 | } | |
6446 | if (!child) { | |
6447 | arg = getpid(); | |
6448 | write(-1, "", 0); | |
6449 | _exit (arg); | |
6450 | } | |
6451 | } | |
6452 | } | |
6453 | main() { | |
6454 | pid_t parent = getpid (); | |
6455 | pid_t child; | |
7dfa765c | 6456 | |
97bf5e38 | 6457 | sparc_address_test (); |
7dfa765c | 6458 | |
97bf5e38 | 6459 | child = vfork (); |
7dfa765c | 6460 | |
97bf5e38 MK |
6461 | if (child == 0) { |
6462 | /* Here is another test for sparc vfork register problems. | |
6463 | This test uses lots of local variables, at least | |
6464 | as many local variables as main has allocated so far | |
6465 | including compiler temporaries. 4 locals are enough for | |
6466 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6467 | A buggy compiler should reuse the register of parent | |
6468 | for one of the local variables, since it will think that | |
6469 | parent can't possibly be used any more in this routine. | |
6470 | Assigning to the local variable will thus munge parent | |
6471 | in the parent process. */ | |
6472 | pid_t | |
6473 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6474 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6475 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6476 | use the same hardware register for all 8 local variables. */ | |
6477 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6478 | || p != p5 || p != p6 || p != p7) | |
6479 | _exit(1); | |
7dfa765c | 6480 | |
97bf5e38 MK |
6481 | /* On some systems (e.g. IRIX 3.3), |
6482 | vfork doesn't separate parent from child file descriptors. | |
6483 | If the child closes a descriptor before it execs or exits, | |
6484 | this munges the parent's descriptor as well. | |
6485 | Test for this by closing stdout in the child. */ | |
6486 | _exit(close(fileno(stdout)) != 0); | |
6487 | } else { | |
6488 | int status; | |
6489 | struct stat st; | |
64bb1671 | 6490 | |
97bf5e38 MK |
6491 | while (wait(&status) != child) |
6492 | ; | |
6493 | exit( | |
6494 | /* Was there some problem with vforking? */ | |
6495 | child < 0 | |
64bb1671 | 6496 | |
97bf5e38 MK |
6497 | /* Did the child fail? (This shouldn't happen.) */ |
6498 | || status | |
64bb1671 | 6499 | |
97bf5e38 MK |
6500 | /* Did the vfork/compiler bug occur? */ |
6501 | || parent != getpid() | |
6502 | ||
6503 | /* Did the file descriptor bug occur? */ | |
6504 | || fstat(fileno(stdout), &st) != 0 | |
6505 | ); | |
6506 | } | |
6507 | } | |
5c44784c | 6508 | EOF |
0e5d83e3 | 6509 | if { (eval echo configure:6510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6510 | then |
6511 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6512 | else |
6513 | echo "configure: failed program was:" >&5 | |
6514 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6515 | rm -fr conftest* |
6516 | ac_cv_func_vfork_works=no | |
5c44784c | 6517 | fi |
97bf5e38 | 6518 | rm -fr conftest* |
5c44784c JM |
6519 | fi |
6520 | ||
0afdd437 MK |
6521 | fi |
6522 | ||
97bf5e38 MK |
6523 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6524 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6525 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6526 | #define vfork fork |
0afdd437 MK |
6527 | EOF |
6528 | ||
6529 | fi | |
6530 | ||
97bf5e38 MK |
6531 | for ac_func in canonicalize_file_name realpath |
6532 | do | |
6533 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6534 | echo "configure:6535: checking for $ac_func" >&5 |
97bf5e38 | 6535 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6536 | echo $ac_n "(cached) $ac_c" 1>&6 |
6537 | else | |
6538 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6539 | #line 6540 "configure" |
7e89e357 | 6540 | #include "confdefs.h" |
97bf5e38 MK |
6541 | /* System header to define __stub macros and hopefully few prototypes, |
6542 | which can conflict with char $ac_func(); below. */ | |
6543 | #include <assert.h> | |
6544 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6545 | /* We use char because int might match the return type of a gcc2 | |
6546 | builtin and then its argument prototype would still apply. */ | |
6547 | char $ac_func(); | |
6548 | ||
7e89e357 | 6549 | int main() { |
97bf5e38 MK |
6550 | |
6551 | /* The GNU C library defines this for functions which it implements | |
6552 | to always fail with ENOSYS. Some functions are actually named | |
6553 | something starting with __ and the normal name is an alias. */ | |
6554 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6555 | choke me | |
6556 | #else | |
6557 | $ac_func(); | |
6558 | #endif | |
6559 | ||
7e89e357 JT |
6560 | ; return 0; } |
6561 | EOF | |
0e5d83e3 | 6562 | if { (eval echo configure:6563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6563 | rm -rf conftest* |
97bf5e38 | 6564 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6565 | else |
6566 | echo "configure: failed program was:" >&5 | |
6567 | cat conftest.$ac_ext >&5 | |
6568 | rm -rf conftest* | |
97bf5e38 | 6569 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6570 | fi |
6571 | rm -f conftest* | |
6572 | fi | |
6573 | ||
97bf5e38 MK |
6574 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6575 | echo "$ac_t""yes" 1>&6 | |
6576 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6577 | cat >> confdefs.h <<EOF | |
6578 | #define $ac_tr_func 1 | |
7e89e357 | 6579 | EOF |
97bf5e38 MK |
6580 | |
6581 | else | |
6582 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6583 | fi |
97bf5e38 | 6584 | done |
7e89e357 | 6585 | |
97bf5e38 | 6586 | for ac_func in poll |
7be570e7 JM |
6587 | do |
6588 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6589 | echo "configure:6590: checking for $ac_func" >&5 |
7be570e7 JM |
6590 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6592 | else | |
6593 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6594 | #line 6595 "configure" |
7be570e7 JM |
6595 | #include "confdefs.h" |
6596 | /* System header to define __stub macros and hopefully few prototypes, | |
6597 | which can conflict with char $ac_func(); below. */ | |
6598 | #include <assert.h> | |
6599 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6600 | /* We use char because int might match the return type of a gcc2 | |
6601 | builtin and then its argument prototype would still apply. */ | |
6602 | char $ac_func(); | |
6603 | ||
6604 | int main() { | |
6605 | ||
6606 | /* The GNU C library defines this for functions which it implements | |
6607 | to always fail with ENOSYS. Some functions are actually named | |
6608 | something starting with __ and the normal name is an alias. */ | |
6609 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6610 | choke me | |
6611 | #else | |
6612 | $ac_func(); | |
6613 | #endif | |
6614 | ||
6615 | ; return 0; } | |
6616 | EOF | |
0e5d83e3 | 6617 | if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6618 | rm -rf conftest* |
6619 | eval "ac_cv_func_$ac_func=yes" | |
6620 | else | |
6621 | echo "configure: failed program was:" >&5 | |
6622 | cat conftest.$ac_ext >&5 | |
6623 | rm -rf conftest* | |
6624 | eval "ac_cv_func_$ac_func=no" | |
6625 | fi | |
6626 | rm -f conftest* | |
6627 | fi | |
6628 | ||
6629 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6630 | echo "$ac_t""yes" 1>&6 | |
6631 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6632 | cat >> confdefs.h <<EOF | |
6633 | #define $ac_tr_func 1 | |
6634 | EOF | |
6635 | ||
6636 | else | |
6637 | echo "$ac_t""no" 1>&6 | |
6638 | fi | |
6639 | done | |
6640 | ||
6641 | for ac_func in pread64 | |
6642 | do | |
6643 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6644 | echo "configure:6645: checking for $ac_func" >&5 |
14abd0fb MK |
6645 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6647 | else | |
6648 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6649 | #line 6650 "configure" |
14abd0fb MK |
6650 | #include "confdefs.h" |
6651 | /* System header to define __stub macros and hopefully few prototypes, | |
6652 | which can conflict with char $ac_func(); below. */ | |
6653 | #include <assert.h> | |
6654 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6655 | /* We use char because int might match the return type of a gcc2 | |
6656 | builtin and then its argument prototype would still apply. */ | |
6657 | char $ac_func(); | |
6658 | ||
6659 | int main() { | |
6660 | ||
6661 | /* The GNU C library defines this for functions which it implements | |
6662 | to always fail with ENOSYS. Some functions are actually named | |
6663 | something starting with __ and the normal name is an alias. */ | |
6664 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6665 | choke me | |
6666 | #else | |
6667 | $ac_func(); | |
6668 | #endif | |
6669 | ||
6670 | ; return 0; } | |
6671 | EOF | |
0e5d83e3 | 6672 | if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6673 | rm -rf conftest* |
6674 | eval "ac_cv_func_$ac_func=yes" | |
6675 | else | |
6676 | echo "configure: failed program was:" >&5 | |
6677 | cat conftest.$ac_ext >&5 | |
6678 | rm -rf conftest* | |
6679 | eval "ac_cv_func_$ac_func=no" | |
6680 | fi | |
6681 | rm -f conftest* | |
6682 | fi | |
6683 | ||
6684 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6685 | echo "$ac_t""yes" 1>&6 | |
6686 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6687 | cat >> confdefs.h <<EOF | |
6688 | #define $ac_tr_func 1 | |
6689 | EOF | |
6690 | ||
6691 | else | |
6692 | echo "$ac_t""no" 1>&6 | |
6693 | fi | |
6694 | done | |
6695 | ||
97bf5e38 MK |
6696 | for ac_func in sbrk |
6697 | do | |
6698 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6699 | echo "configure:6700: checking for $ac_func" >&5 |
97bf5e38 | 6700 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6701 | echo $ac_n "(cached) $ac_c" 1>&6 |
6702 | else | |
6703 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6704 | #line 6705 "configure" |
c906108c | 6705 | #include "confdefs.h" |
97bf5e38 MK |
6706 | /* System header to define __stub macros and hopefully few prototypes, |
6707 | which can conflict with char $ac_func(); below. */ | |
6708 | #include <assert.h> | |
6709 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6710 | /* We use char because int might match the return type of a gcc2 | |
6711 | builtin and then its argument prototype would still apply. */ | |
6712 | char $ac_func(); | |
c906108c | 6713 | |
97bf5e38 MK |
6714 | int main() { |
6715 | ||
6716 | /* The GNU C library defines this for functions which it implements | |
6717 | to always fail with ENOSYS. Some functions are actually named | |
6718 | something starting with __ and the normal name is an alias. */ | |
6719 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6720 | choke me | |
c906108c | 6721 | #else |
97bf5e38 | 6722 | $ac_func(); |
c906108c | 6723 | #endif |
97bf5e38 | 6724 | |
c906108c SS |
6725 | ; return 0; } |
6726 | EOF | |
0e5d83e3 | 6727 | if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6728 | rm -rf conftest* |
97bf5e38 | 6729 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6730 | else |
6731 | echo "configure: failed program was:" >&5 | |
6732 | cat conftest.$ac_ext >&5 | |
6733 | rm -rf conftest* | |
97bf5e38 | 6734 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6735 | fi |
6736 | rm -f conftest* | |
6737 | fi | |
6738 | ||
97bf5e38 MK |
6739 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6740 | echo "$ac_t""yes" 1>&6 | |
6741 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6742 | cat >> confdefs.h <<EOF | |
6743 | #define $ac_tr_func 1 | |
c906108c | 6744 | EOF |
97bf5e38 MK |
6745 | |
6746 | else | |
6747 | echo "$ac_t""no" 1>&6 | |
c906108c | 6748 | fi |
97bf5e38 | 6749 | done |
c906108c | 6750 | |
97bf5e38 MK |
6751 | for ac_func in setpgid setpgrp |
6752 | do | |
6753 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6754 | echo "configure:6755: checking for $ac_func" >&5 |
97bf5e38 | 6755 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6756 | echo $ac_n "(cached) $ac_c" 1>&6 |
6757 | else | |
6758 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6759 | #line 6760 "configure" |
c906108c | 6760 | #include "confdefs.h" |
97bf5e38 MK |
6761 | /* System header to define __stub macros and hopefully few prototypes, |
6762 | which can conflict with char $ac_func(); below. */ | |
6763 | #include <assert.h> | |
6764 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6765 | /* We use char because int might match the return type of a gcc2 | |
6766 | builtin and then its argument prototype would still apply. */ | |
6767 | char $ac_func(); | |
c906108c | 6768 | |
97bf5e38 MK |
6769 | int main() { |
6770 | ||
6771 | /* The GNU C library defines this for functions which it implements | |
6772 | to always fail with ENOSYS. Some functions are actually named | |
6773 | something starting with __ and the normal name is an alias. */ | |
6774 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6775 | choke me | |
c906108c | 6776 | #else |
97bf5e38 | 6777 | $ac_func(); |
c906108c | 6778 | #endif |
97bf5e38 | 6779 | |
c906108c SS |
6780 | ; return 0; } |
6781 | EOF | |
0e5d83e3 | 6782 | if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6783 | rm -rf conftest* |
97bf5e38 | 6784 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6785 | else |
6786 | echo "configure: failed program was:" >&5 | |
6787 | cat conftest.$ac_ext >&5 | |
6788 | rm -rf conftest* | |
97bf5e38 | 6789 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6790 | fi |
6791 | rm -f conftest* | |
6792 | fi | |
6793 | ||
97bf5e38 MK |
6794 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6795 | echo "$ac_t""yes" 1>&6 | |
6796 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6797 | cat >> confdefs.h <<EOF | |
6798 | #define $ac_tr_func 1 | |
c906108c | 6799 | EOF |
97bf5e38 MK |
6800 | |
6801 | else | |
6802 | echo "$ac_t""no" 1>&6 | |
c906108c | 6803 | fi |
97bf5e38 | 6804 | done |
c906108c | 6805 | |
e1ea1d75 | 6806 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6807 | do |
6808 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6809 | echo "configure:6810: checking for $ac_func" >&5 |
97bf5e38 | 6810 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6811 | echo $ac_n "(cached) $ac_c" 1>&6 |
6812 | else | |
6813 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6814 | #line 6815 "configure" |
c906108c | 6815 | #include "confdefs.h" |
97bf5e38 MK |
6816 | /* System header to define __stub macros and hopefully few prototypes, |
6817 | which can conflict with char $ac_func(); below. */ | |
6818 | #include <assert.h> | |
6819 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6820 | /* We use char because int might match the return type of a gcc2 | |
6821 | builtin and then its argument prototype would still apply. */ | |
6822 | char $ac_func(); | |
c906108c | 6823 | |
97bf5e38 MK |
6824 | int main() { |
6825 | ||
6826 | /* The GNU C library defines this for functions which it implements | |
6827 | to always fail with ENOSYS. Some functions are actually named | |
6828 | something starting with __ and the normal name is an alias. */ | |
6829 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6830 | choke me | |
c906108c | 6831 | #else |
97bf5e38 | 6832 | $ac_func(); |
c906108c | 6833 | #endif |
97bf5e38 | 6834 | |
c906108c SS |
6835 | ; return 0; } |
6836 | EOF | |
0e5d83e3 | 6837 | if { (eval echo configure:6838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6838 | rm -rf conftest* |
97bf5e38 | 6839 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6840 | else |
6841 | echo "configure: failed program was:" >&5 | |
6842 | cat conftest.$ac_ext >&5 | |
6843 | rm -rf conftest* | |
97bf5e38 | 6844 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6845 | fi |
6846 | rm -f conftest* | |
6847 | fi | |
6848 | ||
97bf5e38 MK |
6849 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6850 | echo "$ac_t""yes" 1>&6 | |
6851 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6852 | cat >> confdefs.h <<EOF | |
6853 | #define $ac_tr_func 1 | |
c906108c | 6854 | EOF |
e1ea1d75 | 6855 | |
97bf5e38 MK |
6856 | else |
6857 | echo "$ac_t""no" 1>&6 | |
c906108c | 6858 | fi |
97bf5e38 | 6859 | done |
c906108c | 6860 | |
97bf5e38 MK |
6861 | for ac_func in socketpair |
6862 | do | |
6863 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6864 | echo "configure:6865: checking for $ac_func" >&5 |
97bf5e38 | 6865 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6866 | echo $ac_n "(cached) $ac_c" 1>&6 |
6867 | else | |
6868 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6869 | #line 6870 "configure" |
c906108c | 6870 | #include "confdefs.h" |
97bf5e38 MK |
6871 | /* System header to define __stub macros and hopefully few prototypes, |
6872 | which can conflict with char $ac_func(); below. */ | |
6873 | #include <assert.h> | |
6874 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6875 | /* We use char because int might match the return type of a gcc2 | |
6876 | builtin and then its argument prototype would still apply. */ | |
6877 | char $ac_func(); | |
c906108c | 6878 | |
97bf5e38 MK |
6879 | int main() { |
6880 | ||
6881 | /* The GNU C library defines this for functions which it implements | |
6882 | to always fail with ENOSYS. Some functions are actually named | |
6883 | something starting with __ and the normal name is an alias. */ | |
6884 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6885 | choke me | |
c906108c | 6886 | #else |
97bf5e38 | 6887 | $ac_func(); |
c906108c | 6888 | #endif |
97bf5e38 | 6889 | |
c906108c SS |
6890 | ; return 0; } |
6891 | EOF | |
0e5d83e3 | 6892 | if { (eval echo configure:6893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6893 | rm -rf conftest* |
97bf5e38 | 6894 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6895 | else |
6896 | echo "configure: failed program was:" >&5 | |
6897 | cat conftest.$ac_ext >&5 | |
6898 | rm -rf conftest* | |
97bf5e38 | 6899 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6900 | fi |
6901 | rm -f conftest* | |
6902 | fi | |
6903 | ||
97bf5e38 MK |
6904 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6905 | echo "$ac_t""yes" 1>&6 | |
6906 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6907 | cat >> confdefs.h <<EOF | |
6908 | #define $ac_tr_func 1 | |
c906108c | 6909 | EOF |
97bf5e38 MK |
6910 | |
6911 | else | |
6912 | echo "$ac_t""no" 1>&6 | |
c906108c | 6913 | fi |
97bf5e38 | 6914 | done |
c906108c | 6915 | |
b757528f JJ |
6916 | for ac_func in syscall |
6917 | do | |
6918 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0e5d83e3 | 6919 | echo "configure:6920: checking for $ac_func" >&5 |
b757528f JJ |
6920 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6921 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6922 | else | |
6923 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6924 | #line 6925 "configure" |
b757528f JJ |
6925 | #include "confdefs.h" |
6926 | /* System header to define __stub macros and hopefully few prototypes, | |
6927 | which can conflict with char $ac_func(); below. */ | |
6928 | #include <assert.h> | |
6929 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6930 | /* We use char because int might match the return type of a gcc2 | |
6931 | builtin and then its argument prototype would still apply. */ | |
6932 | char $ac_func(); | |
6933 | ||
6934 | int main() { | |
6935 | ||
6936 | /* The GNU C library defines this for functions which it implements | |
6937 | to always fail with ENOSYS. Some functions are actually named | |
6938 | something starting with __ and the normal name is an alias. */ | |
6939 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6940 | choke me | |
6941 | #else | |
6942 | $ac_func(); | |
6943 | #endif | |
6944 | ||
6945 | ; return 0; } | |
6946 | EOF | |
0e5d83e3 | 6947 | if { (eval echo configure:6948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
6948 | rm -rf conftest* |
6949 | eval "ac_cv_func_$ac_func=yes" | |
6950 | else | |
6951 | echo "configure: failed program was:" >&5 | |
6952 | cat conftest.$ac_ext >&5 | |
6953 | rm -rf conftest* | |
6954 | eval "ac_cv_func_$ac_func=no" | |
6955 | fi | |
6956 | rm -f conftest* | |
6957 | fi | |
6958 | ||
6959 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6960 | echo "$ac_t""yes" 1>&6 | |
6961 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6962 | cat >> confdefs.h <<EOF | |
6963 | #define $ac_tr_func 1 | |
6964 | EOF | |
6965 | ||
6966 | else | |
6967 | echo "$ac_t""no" 1>&6 | |
6968 | fi | |
6969 | done | |
6970 | ||
97bf5e38 MK |
6971 | |
6972 | if test "$cross_compiling" = no; then | |
6973 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
0e5d83e3 | 6974 | echo "configure:6975: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6975 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6976 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6977 | else |
6978 | if test "$cross_compiling" = yes; then | |
6979 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6980 | else |
6981 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 6982 | #line 6983 "configure" |
c906108c SS |
6983 | #include "confdefs.h" |
6984 | ||
c906108c SS |
6985 | #ifdef HAVE_UNISTD_H |
6986 | #include <unistd.h> | |
6987 | #endif | |
97bf5e38 MK |
6988 | |
6989 | /* | |
6990 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6991 | * successfully. | |
6992 | */ | |
6993 | main() | |
6994 | { | |
6995 | if (setpgrp(1,1) == -1) | |
6996 | exit(0); | |
6997 | else | |
6998 | exit(1); | |
6999 | } | |
7000 | ||
c906108c | 7001 | EOF |
0e5d83e3 | 7002 | if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7003 | then |
7004 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
7005 | else |
7006 | echo "configure: failed program was:" >&5 | |
7007 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7008 | rm -fr conftest* |
7009 | ac_cv_func_setpgrp_void=yes | |
c906108c | 7010 | fi |
97bf5e38 | 7011 | rm -fr conftest* |
c906108c SS |
7012 | fi |
7013 | ||
97bf5e38 MK |
7014 | |
7015 | fi | |
7016 | ||
7017 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
7018 | if test $ac_cv_func_setpgrp_void = yes; then | |
7019 | cat >> confdefs.h <<\EOF | |
7020 | #define SETPGRP_VOID 1 | |
c906108c SS |
7021 | EOF |
7022 | ||
7023 | fi | |
7024 | ||
97bf5e38 MK |
7025 | else |
7026 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
0e5d83e3 | 7027 | echo "configure:7028: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7028 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
7029 | echo $ac_n "(cached) $ac_c" 1>&6 |
7030 | else | |
7031 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7032 | #line 7033 "configure" |
b83266a0 SS |
7033 | #include "confdefs.h" |
7034 | ||
b83266a0 | 7035 | #include <unistd.h> |
97bf5e38 | 7036 | |
b83266a0 | 7037 | int main() { |
97bf5e38 MK |
7038 | |
7039 | if (setpgrp(1,1) == -1) | |
7040 | exit (0); | |
7041 | else | |
7042 | exit (1); | |
7043 | ||
b83266a0 SS |
7044 | ; return 0; } |
7045 | EOF | |
0e5d83e3 | 7046 | if { (eval echo configure:7047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 7047 | rm -rf conftest* |
97bf5e38 | 7048 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
7049 | else |
7050 | echo "configure: failed program was:" >&5 | |
7051 | cat conftest.$ac_ext >&5 | |
7052 | rm -rf conftest* | |
97bf5e38 | 7053 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
7054 | fi |
7055 | rm -f conftest* | |
7056 | fi | |
7057 | ||
97bf5e38 MK |
7058 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
7059 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 7060 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7061 | #define SETPGRP_VOID 1 |
b83266a0 SS |
7062 | EOF |
7063 | ||
97bf5e38 | 7064 | fi |
b83266a0 SS |
7065 | fi |
7066 | ||
97bf5e38 MK |
7067 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
7068 | # since sigsetjmp might only be defined as a macro. | |
7069 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
0e5d83e3 | 7070 | echo "configure:7071: checking for sigsetjmp" >&5 |
97bf5e38 | 7071 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
7072 | echo $ac_n "(cached) $ac_c" 1>&6 |
7073 | else | |
7074 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7075 | #line 7076 "configure" |
a4db0f07 RH |
7076 | #include "confdefs.h" |
7077 | ||
97bf5e38 MK |
7078 | #include <setjmp.h> |
7079 | ||
a4db0f07 | 7080 | int main() { |
97bf5e38 | 7081 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
7082 | ; return 0; } |
7083 | EOF | |
0e5d83e3 | 7084 | if { (eval echo configure:7085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 7085 | rm -rf conftest* |
97bf5e38 | 7086 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
7087 | else |
7088 | echo "configure: failed program was:" >&5 | |
7089 | cat conftest.$ac_ext >&5 | |
7090 | rm -rf conftest* | |
97bf5e38 | 7091 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
7092 | fi |
7093 | rm -f conftest* | |
7094 | fi | |
7095 | ||
97bf5e38 MK |
7096 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
7097 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 7098 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7099 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
7100 | EOF |
7101 | ||
7102 | fi | |
c906108c | 7103 | |
06825bd1 MK |
7104 | # Assume we'll default to using the included libiberty regex. |
7105 | gdb_use_included_regex=yes | |
7106 | ||
7107 | # However, if the system regex is GNU regex, then default to *not* | |
7108 | # using the included regex. | |
7109 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
0e5d83e3 | 7110 | echo "configure:7111: checking for GNU regex" >&5 |
06825bd1 MK |
7111 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
7112 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7113 | else | |
7114 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7115 | #line 7116 "configure" |
06825bd1 MK |
7116 | #include "confdefs.h" |
7117 | #include <gnu-versions.h> | |
7118 | int main() { | |
7119 | #define REGEX_INTERFACE_VERSION 1 | |
7120 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
7121 | # error "Version mismatch" | |
7122 | #endif | |
7123 | ; return 0; } | |
7124 | EOF | |
0e5d83e3 | 7125 | if { (eval echo configure:7126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
7126 | rm -rf conftest* |
7127 | gdb_cv_have_gnu_regex=yes | |
7128 | else | |
7129 | echo "configure: failed program was:" >&5 | |
7130 | cat conftest.$ac_ext >&5 | |
7131 | rm -rf conftest* | |
7132 | gdb_cv_have_gnu_regex=no | |
7133 | fi | |
7134 | rm -f conftest* | |
7135 | fi | |
7136 | ||
7137 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
7138 | if test $gdb_cv_have_gnu_regex = yes; then | |
7139 | gdb_use_included_regex=no | |
7140 | fi | |
7141 | ||
7142 | # Check whether --with-included-regex or --without-included-regex was given. | |
7143 | if test "${with_included_regex+set}" = set; then | |
7144 | withval="$with_included_regex" | |
7145 | gdb_with_regex=$withval | |
7146 | else | |
7147 | gdb_with_regex=$gdb_use_included_regex | |
7148 | fi | |
7149 | ||
7150 | if test "$gdb_with_regex" = yes; then | |
7151 | cat >> confdefs.h <<\EOF | |
7152 | #define USE_INCLUDED_REGEX 1 | |
7153 | EOF | |
7154 | ||
7155 | fi | |
7156 | ||
97bf5e38 MK |
7157 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7158 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
7159 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
0e5d83e3 | 7160 | echo "configure:7161: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
7161 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7162 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7163 | else | |
7164 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7165 | #line 7166 "configure" |
c906108c | 7166 | #include "confdefs.h" |
97bf5e38 MK |
7167 | #include <machine/reg.h> |
7168 | int main() { | |
7169 | struct reg r; r.r_fs; | |
7170 | ; return 0; } | |
c906108c | 7171 | EOF |
0e5d83e3 | 7172 | if { (eval echo configure:7173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7173 | rm -rf conftest* |
97bf5e38 | 7174 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 7175 | else |
97bf5e38 MK |
7176 | echo "configure: failed program was:" >&5 |
7177 | cat conftest.$ac_ext >&5 | |
c906108c | 7178 | rm -rf conftest* |
97bf5e38 | 7179 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
7180 | fi |
7181 | rm -f conftest* | |
97bf5e38 | 7182 | fi |
c906108c | 7183 | |
97bf5e38 MK |
7184 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
7185 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7186 | cat >> confdefs.h <<\EOF | |
7187 | #define HAVE_STRUCT_REG_R_FS 1 | |
7188 | EOF | |
7189 | ||
7190 | fi | |
7191 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
0e5d83e3 | 7192 | echo "configure:7193: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
7193 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7194 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7195 | else | |
7196 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7197 | #line 7198 "configure" |
c906108c | 7198 | #include "confdefs.h" |
97bf5e38 MK |
7199 | #include <machine/reg.h> |
7200 | int main() { | |
7201 | struct reg r; r.r_gs; | |
7202 | ; return 0; } | |
c906108c | 7203 | EOF |
0e5d83e3 | 7204 | if { (eval echo configure:7205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7205 | rm -rf conftest* |
97bf5e38 | 7206 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 7207 | else |
97bf5e38 MK |
7208 | echo "configure: failed program was:" >&5 |
7209 | cat conftest.$ac_ext >&5 | |
c906108c | 7210 | rm -rf conftest* |
97bf5e38 | 7211 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
7212 | fi |
7213 | rm -f conftest* | |
c906108c | 7214 | fi |
c906108c | 7215 | |
97bf5e38 MK |
7216 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
7217 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7218 | cat >> confdefs.h <<\EOF | |
7219 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
7220 | EOF |
7221 | ||
c906108c SS |
7222 | fi |
7223 | ||
97bf5e38 MK |
7224 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
7225 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
0e5d83e3 | 7226 | echo "configure:7227: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 7227 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
7228 | echo $ac_n "(cached) $ac_c" 1>&6 |
7229 | else | |
7230 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7231 | #line 7232 "configure" |
c906108c | 7232 | #include "confdefs.h" |
97bf5e38 | 7233 | #include <sys/ptrace.h> |
c906108c | 7234 | int main() { |
97bf5e38 | 7235 | PTRACE_GETREGS; |
c906108c SS |
7236 | ; return 0; } |
7237 | EOF | |
0e5d83e3 | 7238 | if { (eval echo configure:7239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7239 | rm -rf conftest* |
97bf5e38 | 7240 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
7241 | else |
7242 | echo "configure: failed program was:" >&5 | |
7243 | cat conftest.$ac_ext >&5 | |
7244 | rm -rf conftest* | |
97bf5e38 | 7245 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
7246 | fi |
7247 | rm -f conftest* | |
7248 | fi | |
7249 | ||
97bf5e38 MK |
7250 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
7251 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
7252 | cat >> confdefs.h <<\EOF | |
7253 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7254 | EOF |
7255 | ||
97bf5e38 | 7256 | fi |
c906108c | 7257 | |
97bf5e38 MK |
7258 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7259 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
0e5d83e3 | 7260 | echo "configure:7261: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7261 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7262 | echo $ac_n "(cached) $ac_c" 1>&6 |
7263 | else | |
7264 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7265 | #line 7266 "configure" |
c906108c | 7266 | #include "confdefs.h" |
97bf5e38 | 7267 | #include <sys/ptrace.h> |
c906108c | 7268 | int main() { |
97bf5e38 | 7269 | PTRACE_GETFPXREGS; |
c906108c SS |
7270 | ; return 0; } |
7271 | EOF | |
0e5d83e3 | 7272 | if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7273 | rm -rf conftest* |
97bf5e38 | 7274 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7275 | else |
7276 | echo "configure: failed program was:" >&5 | |
7277 | cat conftest.$ac_ext >&5 | |
7278 | rm -rf conftest* | |
97bf5e38 | 7279 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7280 | fi |
7281 | rm -f conftest* | |
7282 | fi | |
7283 | ||
97bf5e38 MK |
7284 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7285 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7286 | cat >> confdefs.h <<\EOF | |
7287 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7288 | EOF |
7289 | ||
97bf5e38 | 7290 | fi |
c906108c | 7291 | |
97bf5e38 MK |
7292 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7293 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
0e5d83e3 | 7294 | echo "configure:7295: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7295 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7296 | echo $ac_n "(cached) $ac_c" 1>&6 |
7297 | else | |
7298 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7299 | #line 7300 "configure" |
c906108c | 7300 | #include "confdefs.h" |
97bf5e38 MK |
7301 | #include <sys/types.h> |
7302 | #include <sys/ptrace.h> | |
c906108c | 7303 | int main() { |
97bf5e38 | 7304 | PT_GETDBREGS; |
c906108c SS |
7305 | ; return 0; } |
7306 | EOF | |
0e5d83e3 | 7307 | if { (eval echo configure:7308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7308 | rm -rf conftest* |
97bf5e38 | 7309 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7310 | else |
7311 | echo "configure: failed program was:" >&5 | |
7312 | cat conftest.$ac_ext >&5 | |
7313 | rm -rf conftest* | |
97bf5e38 | 7314 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7315 | fi |
7316 | rm -f conftest* | |
7317 | fi | |
7318 | ||
97bf5e38 MK |
7319 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7320 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7321 | cat >> confdefs.h <<\EOF | |
7322 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7323 | EOF |
7324 | ||
97bf5e38 | 7325 | fi |
c906108c | 7326 | |
97bf5e38 MK |
7327 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7328 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
0e5d83e3 | 7329 | echo "configure:7330: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7330 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7331 | echo $ac_n "(cached) $ac_c" 1>&6 |
7332 | else | |
7333 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7334 | #line 7335 "configure" |
c906108c | 7335 | #include "confdefs.h" |
97bf5e38 MK |
7336 | #include <sys/types.h> |
7337 | #include <sys/ptrace.h> | |
c906108c | 7338 | int main() { |
97bf5e38 | 7339 | PT_GETXMMREGS; |
c906108c SS |
7340 | ; return 0; } |
7341 | EOF | |
0e5d83e3 | 7342 | if { (eval echo configure:7343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7343 | rm -rf conftest* |
97bf5e38 | 7344 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7345 | else |
7346 | echo "configure: failed program was:" >&5 | |
7347 | cat conftest.$ac_ext >&5 | |
7348 | rm -rf conftest* | |
97bf5e38 | 7349 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7350 | fi |
7351 | rm -f conftest* | |
7352 | fi | |
7353 | ||
97bf5e38 MK |
7354 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7355 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7356 | cat >> confdefs.h <<\EOF | |
7357 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7358 | EOF |
7359 | ||
97bf5e38 | 7360 | fi |
c906108c | 7361 | |
27ca5dad | 7362 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7363 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7364 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
0e5d83e3 | 7365 | echo "configure:7366: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7366 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7367 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7368 | else | |
7369 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7370 | #line 7371 "configure" |
27ca5dad MC |
7371 | #include "confdefs.h" |
7372 | #include <stdint.h> | |
7373 | int main() { | |
7374 | uintptr_t foo = 0; | |
7375 | ; return 0; } | |
7376 | EOF | |
0e5d83e3 | 7377 | if { (eval echo configure:7378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7378 | rm -rf conftest* |
7379 | gdb_cv_have_uintptr_t=yes | |
7380 | else | |
7381 | echo "configure: failed program was:" >&5 | |
7382 | cat conftest.$ac_ext >&5 | |
7383 | rm -rf conftest* | |
7384 | gdb_cv_have_uintptr_t=no | |
7385 | fi | |
7386 | rm -f conftest* | |
7387 | fi | |
7388 | ||
7389 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 | |
7390 | if test $gdb_cv_have_uintptr_t = yes; then | |
7391 | cat >> confdefs.h <<\EOF | |
7392 | #define HAVE_UINTPTR_T 1 | |
7393 | EOF | |
7394 | ||
7395 | fi | |
97bf5e38 MK |
7396 | |
7397 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
0e5d83e3 | 7398 | echo "configure:7399: checking whether malloc must be declared" >&5 |
97bf5e38 | 7399 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7400 | echo $ac_n "(cached) $ac_c" 1>&6 |
7401 | else | |
7402 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7403 | #line 7404 "configure" |
3862412b | 7404 | #include "confdefs.h" |
e17bf198 | 7405 | |
97bf5e38 MK |
7406 | #include <stdio.h> |
7407 | #ifdef HAVE_STRING_H | |
7408 | #include <string.h> | |
7409 | #else | |
7410 | #ifdef HAVE_STRINGS_H | |
7411 | #include <strings.h> | |
7412 | #endif | |
7413 | #endif | |
7414 | #ifdef HAVE_STDLIB_H | |
7415 | #include <stdlib.h> | |
7416 | #endif | |
7417 | #ifdef HAVE_UNISTD_H | |
7418 | #include <unistd.h> | |
7419 | #endif | |
3862412b | 7420 | int main() { |
97bf5e38 | 7421 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7422 | ; return 0; } |
7423 | EOF | |
0e5d83e3 | 7424 | if { (eval echo configure:7425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7425 | rm -rf conftest* |
97bf5e38 | 7426 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7427 | else |
7428 | echo "configure: failed program was:" >&5 | |
7429 | cat conftest.$ac_ext >&5 | |
7430 | rm -rf conftest* | |
97bf5e38 | 7431 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7432 | fi |
7433 | rm -f conftest* | |
7434 | fi | |
7435 | ||
97bf5e38 MK |
7436 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7437 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7438 | cat >> confdefs.h <<\EOF | |
7439 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7440 | EOF |
7441 | ||
97bf5e38 | 7442 | fi |
3862412b | 7443 | |
97bf5e38 | 7444 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
0e5d83e3 | 7445 | echo "configure:7446: checking whether realloc must be declared" >&5 |
97bf5e38 | 7446 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7447 | echo $ac_n "(cached) $ac_c" 1>&6 |
7448 | else | |
7449 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7450 | #line 7451 "configure" |
3862412b | 7451 | #include "confdefs.h" |
e17bf198 | 7452 | |
97bf5e38 MK |
7453 | #include <stdio.h> |
7454 | #ifdef HAVE_STRING_H | |
7455 | #include <string.h> | |
7456 | #else | |
7457 | #ifdef HAVE_STRINGS_H | |
7458 | #include <strings.h> | |
7459 | #endif | |
7460 | #endif | |
7461 | #ifdef HAVE_STDLIB_H | |
7462 | #include <stdlib.h> | |
7463 | #endif | |
7464 | #ifdef HAVE_UNISTD_H | |
7465 | #include <unistd.h> | |
7466 | #endif | |
3862412b | 7467 | int main() { |
97bf5e38 | 7468 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7469 | ; return 0; } |
7470 | EOF | |
0e5d83e3 | 7471 | if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7472 | rm -rf conftest* |
97bf5e38 | 7473 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7474 | else |
7475 | echo "configure: failed program was:" >&5 | |
7476 | cat conftest.$ac_ext >&5 | |
7477 | rm -rf conftest* | |
97bf5e38 | 7478 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7479 | fi |
7480 | rm -f conftest* | |
7481 | fi | |
7482 | ||
97bf5e38 MK |
7483 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7484 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7485 | cat >> confdefs.h <<\EOF | |
7486 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7487 | EOF |
7488 | ||
97bf5e38 | 7489 | fi |
3862412b | 7490 | |
97bf5e38 | 7491 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
0e5d83e3 | 7492 | echo "configure:7493: checking whether free must be declared" >&5 |
97bf5e38 | 7493 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7494 | echo $ac_n "(cached) $ac_c" 1>&6 |
7495 | else | |
7496 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7497 | #line 7498 "configure" |
451928c5 | 7498 | #include "confdefs.h" |
e17bf198 | 7499 | |
97bf5e38 MK |
7500 | #include <stdio.h> |
7501 | #ifdef HAVE_STRING_H | |
7502 | #include <string.h> | |
7503 | #else | |
7504 | #ifdef HAVE_STRINGS_H | |
7505 | #include <strings.h> | |
7506 | #endif | |
7507 | #endif | |
7508 | #ifdef HAVE_STDLIB_H | |
7509 | #include <stdlib.h> | |
7510 | #endif | |
7511 | #ifdef HAVE_UNISTD_H | |
7512 | #include <unistd.h> | |
7513 | #endif | |
451928c5 | 7514 | int main() { |
97bf5e38 | 7515 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7516 | ; return 0; } |
7517 | EOF | |
0e5d83e3 | 7518 | if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7519 | rm -rf conftest* |
97bf5e38 | 7520 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7521 | else |
7522 | echo "configure: failed program was:" >&5 | |
7523 | cat conftest.$ac_ext >&5 | |
7524 | rm -rf conftest* | |
97bf5e38 | 7525 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7526 | fi |
7527 | rm -f conftest* | |
7528 | fi | |
7529 | ||
97bf5e38 MK |
7530 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7531 | if test $bfd_cv_decl_needed_free = yes; then | |
7532 | cat >> confdefs.h <<\EOF | |
7533 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7534 | EOF |
7535 | ||
97bf5e38 | 7536 | fi |
451928c5 | 7537 | |
97bf5e38 | 7538 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
0e5d83e3 | 7539 | echo "configure:7540: checking whether strerror must be declared" >&5 |
97bf5e38 | 7540 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7541 | echo $ac_n "(cached) $ac_c" 1>&6 |
7542 | else | |
7543 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7544 | #line 7545 "configure" |
451928c5 | 7545 | #include "confdefs.h" |
e17bf198 | 7546 | |
97bf5e38 MK |
7547 | #include <stdio.h> |
7548 | #ifdef HAVE_STRING_H | |
7549 | #include <string.h> | |
7550 | #else | |
7551 | #ifdef HAVE_STRINGS_H | |
7552 | #include <strings.h> | |
7553 | #endif | |
7554 | #endif | |
7555 | #ifdef HAVE_STDLIB_H | |
7556 | #include <stdlib.h> | |
7557 | #endif | |
7558 | #ifdef HAVE_UNISTD_H | |
7559 | #include <unistd.h> | |
7560 | #endif | |
451928c5 | 7561 | int main() { |
97bf5e38 | 7562 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7563 | ; return 0; } |
7564 | EOF | |
0e5d83e3 | 7565 | if { (eval echo configure:7566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7566 | rm -rf conftest* |
97bf5e38 | 7567 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7568 | else |
7569 | echo "configure: failed program was:" >&5 | |
7570 | cat conftest.$ac_ext >&5 | |
7571 | rm -rf conftest* | |
97bf5e38 | 7572 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7573 | fi |
7574 | rm -f conftest* | |
7575 | fi | |
7576 | ||
97bf5e38 MK |
7577 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7578 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7579 | cat >> confdefs.h <<\EOF | |
7580 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7581 | EOF |
7582 | ||
97bf5e38 | 7583 | fi |
451928c5 | 7584 | |
97bf5e38 | 7585 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
0e5d83e3 | 7586 | echo "configure:7587: checking whether strdup must be declared" >&5 |
97bf5e38 | 7587 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7588 | echo $ac_n "(cached) $ac_c" 1>&6 |
7589 | else | |
7590 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7591 | #line 7592 "configure" |
3862412b | 7592 | #include "confdefs.h" |
e17bf198 | 7593 | |
97bf5e38 MK |
7594 | #include <stdio.h> |
7595 | #ifdef HAVE_STRING_H | |
7596 | #include <string.h> | |
7597 | #else | |
7598 | #ifdef HAVE_STRINGS_H | |
7599 | #include <strings.h> | |
7600 | #endif | |
7601 | #endif | |
7602 | #ifdef HAVE_STDLIB_H | |
7603 | #include <stdlib.h> | |
7604 | #endif | |
7605 | #ifdef HAVE_UNISTD_H | |
7606 | #include <unistd.h> | |
7607 | #endif | |
3862412b | 7608 | int main() { |
97bf5e38 | 7609 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7610 | ; return 0; } |
7611 | EOF | |
0e5d83e3 | 7612 | if { (eval echo configure:7613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7613 | rm -rf conftest* |
97bf5e38 | 7614 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7615 | else |
7616 | echo "configure: failed program was:" >&5 | |
7617 | cat conftest.$ac_ext >&5 | |
7618 | rm -rf conftest* | |
97bf5e38 | 7619 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7620 | fi |
7621 | rm -f conftest* | |
7622 | fi | |
7623 | ||
97bf5e38 MK |
7624 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7625 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7626 | cat >> confdefs.h <<\EOF | |
7627 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7628 | EOF |
7629 | ||
97bf5e38 | 7630 | fi |
3862412b | 7631 | |
97bf5e38 | 7632 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
0e5d83e3 | 7633 | echo "configure:7634: checking whether strstr must be declared" >&5 |
97bf5e38 | 7634 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7635 | echo $ac_n "(cached) $ac_c" 1>&6 |
7636 | else | |
7637 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7638 | #line 7639 "configure" |
3862412b | 7639 | #include "confdefs.h" |
e17bf198 | 7640 | |
97bf5e38 MK |
7641 | #include <stdio.h> |
7642 | #ifdef HAVE_STRING_H | |
7643 | #include <string.h> | |
7644 | #else | |
7645 | #ifdef HAVE_STRINGS_H | |
7646 | #include <strings.h> | |
7647 | #endif | |
7648 | #endif | |
7649 | #ifdef HAVE_STDLIB_H | |
7650 | #include <stdlib.h> | |
7651 | #endif | |
7652 | #ifdef HAVE_UNISTD_H | |
7653 | #include <unistd.h> | |
7654 | #endif | |
3862412b | 7655 | int main() { |
97bf5e38 | 7656 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7657 | ; return 0; } |
7658 | EOF | |
0e5d83e3 | 7659 | if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7660 | rm -rf conftest* |
97bf5e38 | 7661 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7662 | else |
7663 | echo "configure: failed program was:" >&5 | |
7664 | cat conftest.$ac_ext >&5 | |
7665 | rm -rf conftest* | |
97bf5e38 | 7666 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7667 | fi |
7668 | rm -f conftest* | |
7669 | fi | |
7670 | ||
97bf5e38 MK |
7671 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7672 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7673 | cat >> confdefs.h <<\EOF | |
7674 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7675 | EOF |
7676 | ||
97bf5e38 | 7677 | fi |
3862412b | 7678 | |
97bf5e38 | 7679 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
0e5d83e3 | 7680 | echo "configure:7681: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7681 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7682 | echo $ac_n "(cached) $ac_c" 1>&6 |
7683 | else | |
7684 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7685 | #line 7686 "configure" |
596c9d4b KB |
7686 | #include "confdefs.h" |
7687 | ||
97bf5e38 MK |
7688 | #include <stdio.h> |
7689 | #ifdef HAVE_STRING_H | |
7690 | #include <string.h> | |
7691 | #else | |
7692 | #ifdef HAVE_STRINGS_H | |
7693 | #include <strings.h> | |
7694 | #endif | |
7695 | #endif | |
7696 | #ifdef HAVE_STDLIB_H | |
7697 | #include <stdlib.h> | |
7698 | #endif | |
7699 | #ifdef HAVE_UNISTD_H | |
7700 | #include <unistd.h> | |
7701 | #endif | |
596c9d4b | 7702 | int main() { |
97bf5e38 | 7703 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7704 | ; return 0; } |
7705 | EOF | |
0e5d83e3 | 7706 | if { (eval echo configure:7707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7707 | rm -rf conftest* |
97bf5e38 | 7708 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7709 | else |
7710 | echo "configure: failed program was:" >&5 | |
7711 | cat conftest.$ac_ext >&5 | |
7712 | rm -rf conftest* | |
97bf5e38 | 7713 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7714 | fi |
7715 | rm -f conftest* | |
7716 | fi | |
7717 | ||
97bf5e38 MK |
7718 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7719 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7720 | cat >> confdefs.h <<\EOF | |
7721 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7722 | EOF |
7723 | ||
97bf5e38 | 7724 | fi |
596c9d4b | 7725 | |
97bf5e38 MK |
7726 | |
7727 | # The following save_state_t checkery is only necessary for HPUX | |
7728 | # versions earlier than 10.20. When those fade from memory, this | |
7729 | # could be expunged. --jsm 1999-03-22 | |
7730 | ||
7731 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
0e5d83e3 | 7732 | echo "configure:7733: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7733 | cat > conftest.$ac_ext <<EOF |
0e5d83e3 | 7734 | #line 7735 "configure" |
97bf5e38 MK |
7735 | #include "confdefs.h" |
7736 | #include <machine/save_state.h> | |
7737 | EOF | |
7738 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7739 | egrep "save_state_t" >/dev/null 2>&1; then | |
7740 | rm -rf conftest* | |
7741 | gdb_cv_hpux_savestate=yes | |
7742 | else | |
7743 | rm -rf conftest* | |
7744 | gdb_cv_hpux_savestate=no | |
7745 | fi | |
7746 | rm -f conftest* | |
7747 | ||
7748 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7749 | #line 7750 "configure" |
97bf5e38 MK |
7750 | #include "confdefs.h" |
7751 | #include <machine/save_state.h> | |
7752 | EOF | |
7753 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7754 | egrep "ss_wide" >/dev/null 2>&1; then | |
7755 | rm -rf conftest* | |
7756 | gdb_cv_hpux_sswide=yes | |
7757 | else | |
7758 | rm -rf conftest* | |
7759 | gdb_cv_hpux_sswide=no | |
7760 | fi | |
7761 | rm -f conftest* | |
7762 | ||
7763 | if test $gdb_cv_hpux_savestate = yes | |
7764 | then | |
7765 | cat >> confdefs.h <<\EOF | |
7766 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7767 | EOF | |
7768 | ||
7769 | fi | |
7770 | if test $gdb_cv_hpux_sswide = yes | |
7771 | then | |
7772 | cat >> confdefs.h <<\EOF | |
7773 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7774 | EOF | |
7775 | ||
7776 | fi | |
7777 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7778 | ||
7779 | ||
7780 | # If we are configured native on GNU/Linux, work around problems with | |
7781 | # sys/procfs.h | |
7782 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7783 | ||
7784 | if test "${target}" = "${host}"; then | |
7785 | case "${host}" in | |
7786 | i[3456]86-*-linux*) | |
7787 | cat >> confdefs.h <<\EOF | |
7788 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7789 | EOF | |
7790 | ||
7791 | cat >> confdefs.h <<\EOF | |
7792 | #define sys_quotactl 1 | |
7793 | EOF | |
7794 | ||
7795 | ;; | |
7796 | ia64-*-aix*) | |
7797 | cat >> confdefs.h <<\EOF | |
7798 | #define NEW_PROC_API 1 | |
7799 | EOF | |
7800 | ||
7801 | ;; | |
7802 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7803 | cat >> confdefs.h <<\EOF | |
7804 | #define NEW_PROC_API 1 | |
7805 | EOF | |
7806 | ||
7807 | ;; | |
7808 | *-*-solaris2.[678]) | |
7809 | cat >> confdefs.h <<\EOF | |
7810 | #define NEW_PROC_API 1 | |
7811 | EOF | |
7812 | ||
7813 | ;; | |
7814 | esac | |
7815 | fi | |
7816 | ||
7817 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7818 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
0e5d83e3 | 7819 | echo "configure:7820: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7820 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7821 | echo $ac_n "(cached) $ac_c" 1>&6 |
7822 | else | |
7823 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7824 | #line 7825 "configure" |
596c9d4b KB |
7825 | #include "confdefs.h" |
7826 | ||
7827 | #define _SYSCALL32 | |
7828 | #include <sys/procfs.h> | |
7829 | int main() { | |
97bf5e38 | 7830 | pstatus_t avar |
596c9d4b KB |
7831 | ; return 0; } |
7832 | EOF | |
0e5d83e3 | 7833 | if { (eval echo configure:7834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7834 | rm -rf conftest* |
97bf5e38 | 7835 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7836 | else |
7837 | echo "configure: failed program was:" >&5 | |
7838 | cat conftest.$ac_ext >&5 | |
7839 | rm -rf conftest* | |
97bf5e38 | 7840 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7841 | |
7842 | fi | |
7843 | rm -f conftest* | |
7844 | fi | |
7845 | ||
97bf5e38 | 7846 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7847 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7848 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7849 | EOF |
7850 | ||
7851 | fi | |
97bf5e38 | 7852 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7853 | |
97bf5e38 | 7854 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 7855 | echo "configure:7856: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7856 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7857 | echo $ac_n "(cached) $ac_c" 1>&6 |
7858 | else | |
7859 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7860 | #line 7861 "configure" |
596c9d4b KB |
7861 | #include "confdefs.h" |
7862 | ||
7863 | #define _SYSCALL32 | |
7864 | #include <sys/procfs.h> | |
7865 | int main() { | |
97bf5e38 | 7866 | prrun_t avar |
596c9d4b KB |
7867 | ; return 0; } |
7868 | EOF | |
0e5d83e3 | 7869 | if { (eval echo configure:7870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7870 | rm -rf conftest* |
97bf5e38 | 7871 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7872 | else |
7873 | echo "configure: failed program was:" >&5 | |
7874 | cat conftest.$ac_ext >&5 | |
7875 | rm -rf conftest* | |
97bf5e38 | 7876 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7877 | |
7878 | fi | |
7879 | rm -f conftest* | |
7880 | fi | |
7881 | ||
97bf5e38 | 7882 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7883 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7884 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7885 | EOF |
7886 | ||
7887 | fi | |
97bf5e38 | 7888 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7889 | |
97bf5e38 | 7890 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 7891 | echo "configure:7892: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7892 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7893 | echo $ac_n "(cached) $ac_c" 1>&6 |
7894 | else | |
7895 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7896 | #line 7897 "configure" |
596c9d4b KB |
7897 | #include "confdefs.h" |
7898 | ||
7899 | #define _SYSCALL32 | |
7900 | #include <sys/procfs.h> | |
7901 | int main() { | |
97bf5e38 | 7902 | gregset_t avar |
596c9d4b KB |
7903 | ; return 0; } |
7904 | EOF | |
0e5d83e3 | 7905 | if { (eval echo configure:7906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7906 | rm -rf conftest* |
97bf5e38 | 7907 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7908 | else |
7909 | echo "configure: failed program was:" >&5 | |
7910 | cat conftest.$ac_ext >&5 | |
7911 | rm -rf conftest* | |
97bf5e38 | 7912 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7913 | |
7914 | fi | |
7915 | rm -f conftest* | |
7916 | fi | |
7917 | ||
97bf5e38 | 7918 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7919 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7920 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7921 | EOF |
7922 | ||
7923 | fi | |
97bf5e38 | 7924 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7925 | |
97bf5e38 | 7926 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 7927 | echo "configure:7928: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7928 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7929 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7930 | else |
7931 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7932 | #line 7933 "configure" |
d84dd0c5 | 7933 | #include "confdefs.h" |
97bf5e38 MK |
7934 | |
7935 | #define _SYSCALL32 | |
d84dd0c5 | 7936 | #include <sys/procfs.h> |
97bf5e38 MK |
7937 | int main() { |
7938 | fpregset_t avar | |
7939 | ; return 0; } | |
d84dd0c5 | 7940 | EOF |
0e5d83e3 | 7941 | if { (eval echo configure:7942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7942 | rm -rf conftest* |
7943 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7944 | else |
7945 | echo "configure: failed program was:" >&5 | |
7946 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7947 | rm -rf conftest* |
7948 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7949 | ||
d84dd0c5 | 7950 | fi |
97bf5e38 | 7951 | rm -f conftest* |
d84dd0c5 MK |
7952 | fi |
7953 | ||
97bf5e38 MK |
7954 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7955 | cat >> confdefs.h <<\EOF | |
7956 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7957 | EOF |
7958 | ||
97bf5e38 MK |
7959 | fi |
7960 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7961 | |
97bf5e38 | 7962 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 7963 | echo "configure:7964: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7964 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7965 | echo $ac_n "(cached) $ac_c" 1>&6 |
7966 | else | |
7967 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 7968 | #line 7969 "configure" |
c906108c | 7969 | #include "confdefs.h" |
c906108c | 7970 | |
97bf5e38 MK |
7971 | #define _SYSCALL32 |
7972 | #include <sys/procfs.h> | |
c906108c | 7973 | int main() { |
97bf5e38 | 7974 | prgregset_t avar |
c906108c SS |
7975 | ; return 0; } |
7976 | EOF | |
0e5d83e3 | 7977 | if { (eval echo configure:7978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7978 | rm -rf conftest* |
97bf5e38 | 7979 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7980 | else |
7981 | echo "configure: failed program was:" >&5 | |
7982 | cat conftest.$ac_ext >&5 | |
7983 | rm -rf conftest* | |
97bf5e38 MK |
7984 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7985 | ||
c906108c SS |
7986 | fi |
7987 | rm -f conftest* | |
7988 | fi | |
7989 | ||
97bf5e38 MK |
7990 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7991 | cat >> confdefs.h <<\EOF | |
7992 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7993 | EOF |
7994 | ||
97bf5e38 MK |
7995 | fi |
7996 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7997 | |
97bf5e38 | 7998 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 7999 | echo "configure:8000: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8000 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
8001 | echo $ac_n "(cached) $ac_c" 1>&6 |
8002 | else | |
8003 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8004 | #line 8005 "configure" |
d45fe813 | 8005 | #include "confdefs.h" |
97bf5e38 MK |
8006 | |
8007 | #define _SYSCALL32 | |
8008 | #include <sys/procfs.h> | |
d45fe813 | 8009 | int main() { |
97bf5e38 | 8010 | prfpregset_t avar |
d45fe813 KB |
8011 | ; return 0; } |
8012 | EOF | |
0e5d83e3 | 8013 | if { (eval echo configure:8014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8014 | rm -rf conftest* |
97bf5e38 | 8015 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
8016 | else |
8017 | echo "configure: failed program was:" >&5 | |
8018 | cat conftest.$ac_ext >&5 | |
8019 | rm -rf conftest* | |
97bf5e38 MK |
8020 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
8021 | ||
d45fe813 KB |
8022 | fi |
8023 | rm -f conftest* | |
8024 | fi | |
8025 | ||
97bf5e38 MK |
8026 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
8027 | cat >> confdefs.h <<\EOF | |
8028 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
8029 | EOF |
8030 | ||
97bf5e38 MK |
8031 | fi |
8032 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 8033 | |
97bf5e38 | 8034 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 8035 | echo "configure:8036: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8036 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8037 | echo $ac_n "(cached) $ac_c" 1>&6 |
8038 | else | |
8039 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8040 | #line 8041 "configure" |
d45fe813 | 8041 | #include "confdefs.h" |
97bf5e38 MK |
8042 | |
8043 | #define _SYSCALL32 | |
8044 | #include <sys/procfs.h> | |
d45fe813 | 8045 | int main() { |
97bf5e38 | 8046 | prgregset32_t avar |
d45fe813 KB |
8047 | ; return 0; } |
8048 | EOF | |
0e5d83e3 | 8049 | if { (eval echo configure:8050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8050 | rm -rf conftest* |
97bf5e38 | 8051 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
8052 | else |
8053 | echo "configure: failed program was:" >&5 | |
8054 | cat conftest.$ac_ext >&5 | |
8055 | rm -rf conftest* | |
97bf5e38 MK |
8056 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
8057 | ||
d45fe813 KB |
8058 | fi |
8059 | rm -f conftest* | |
8060 | fi | |
8061 | ||
97bf5e38 MK |
8062 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
8063 | cat >> confdefs.h <<\EOF | |
8064 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
8065 | EOF |
8066 | ||
97bf5e38 MK |
8067 | fi |
8068 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 8069 | |
97bf5e38 | 8070 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 8071 | echo "configure:8072: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8072 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8073 | echo $ac_n "(cached) $ac_c" 1>&6 |
8074 | else | |
8075 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8076 | #line 8077 "configure" |
d45fe813 | 8077 | #include "confdefs.h" |
97bf5e38 MK |
8078 | |
8079 | #define _SYSCALL32 | |
8080 | #include <sys/procfs.h> | |
d45fe813 | 8081 | int main() { |
97bf5e38 | 8082 | prfpregset32_t avar |
d45fe813 KB |
8083 | ; return 0; } |
8084 | EOF | |
0e5d83e3 | 8085 | if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8086 | rm -rf conftest* |
97bf5e38 | 8087 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
8088 | else |
8089 | echo "configure: failed program was:" >&5 | |
8090 | cat conftest.$ac_ext >&5 | |
8091 | rm -rf conftest* | |
97bf5e38 MK |
8092 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
8093 | ||
d45fe813 KB |
8094 | fi |
8095 | rm -f conftest* | |
8096 | fi | |
8097 | ||
97bf5e38 MK |
8098 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
8099 | cat >> confdefs.h <<\EOF | |
8100 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
8101 | EOF |
8102 | ||
97bf5e38 MK |
8103 | fi |
8104 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 8105 | |
97bf5e38 | 8106 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 8107 | echo "configure:8108: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 8108 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
8109 | echo $ac_n "(cached) $ac_c" 1>&6 |
8110 | else | |
8111 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8112 | #line 8113 "configure" |
d45fe813 | 8113 | #include "confdefs.h" |
97bf5e38 | 8114 | |
d45fe813 | 8115 | #define _SYSCALL32 |
97bf5e38 | 8116 | #include <sys/procfs.h> |
d45fe813 | 8117 | int main() { |
97bf5e38 | 8118 | lwpid_t avar |
d45fe813 KB |
8119 | ; return 0; } |
8120 | EOF | |
0e5d83e3 | 8121 | if { (eval echo configure:8122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8122 | rm -rf conftest* |
97bf5e38 | 8123 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
8124 | else |
8125 | echo "configure: failed program was:" >&5 | |
8126 | cat conftest.$ac_ext >&5 | |
8127 | rm -rf conftest* | |
97bf5e38 MK |
8128 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
8129 | ||
d45fe813 KB |
8130 | fi |
8131 | rm -f conftest* | |
8132 | fi | |
8133 | ||
97bf5e38 MK |
8134 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
8135 | cat >> confdefs.h <<\EOF | |
8136 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
8137 | EOF |
8138 | ||
97bf5e38 MK |
8139 | fi |
8140 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 8141 | |
97bf5e38 | 8142 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 8143 | echo "configure:8144: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 8144 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
8145 | echo $ac_n "(cached) $ac_c" 1>&6 |
8146 | else | |
8147 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8148 | #line 8149 "configure" |
c906108c SS |
8149 | #include "confdefs.h" |
8150 | ||
97bf5e38 MK |
8151 | #define _SYSCALL32 |
8152 | #include <sys/procfs.h> | |
c906108c | 8153 | int main() { |
97bf5e38 | 8154 | psaddr_t avar |
c906108c SS |
8155 | ; return 0; } |
8156 | EOF | |
0e5d83e3 | 8157 | if { (eval echo configure:8158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8158 | rm -rf conftest* |
97bf5e38 | 8159 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
8160 | else |
8161 | echo "configure: failed program was:" >&5 | |
8162 | cat conftest.$ac_ext >&5 | |
8163 | rm -rf conftest* | |
97bf5e38 MK |
8164 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
8165 | ||
c906108c SS |
8166 | fi |
8167 | rm -f conftest* | |
8168 | fi | |
8169 | ||
97bf5e38 MK |
8170 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
8171 | cat >> confdefs.h <<\EOF | |
8172 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
8173 | EOF |
8174 | ||
97bf5e38 MK |
8175 | fi |
8176 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 8177 | |
97bf5e38 | 8178 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 8179 | echo "configure:8180: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 8180 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 8181 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8182 | else |
8183 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8184 | #line 8185 "configure" |
c906108c SS |
8185 | #include "confdefs.h" |
8186 | ||
97bf5e38 MK |
8187 | #define _SYSCALL32 |
8188 | #include <sys/procfs.h> | |
8189 | int main() { | |
8190 | prsysent_t avar | |
8191 | ; return 0; } | |
c906108c | 8192 | EOF |
0e5d83e3 | 8193 | if { (eval echo configure:8194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8194 | rm -rf conftest* |
8195 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
8196 | else |
8197 | echo "configure: failed program was:" >&5 | |
8198 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8199 | rm -rf conftest* |
8200 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
8201 | ||
c906108c | 8202 | fi |
97bf5e38 | 8203 | rm -f conftest* |
c906108c SS |
8204 | fi |
8205 | ||
97bf5e38 MK |
8206 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
8207 | cat >> confdefs.h <<\EOF | |
8208 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
8209 | EOF |
8210 | ||
97bf5e38 MK |
8211 | fi |
8212 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 8213 | |
97bf5e38 | 8214 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 8215 | echo "configure:8216: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 8216 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
8217 | echo $ac_n "(cached) $ac_c" 1>&6 |
8218 | else | |
8219 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8220 | #line 8221 "configure" |
c906108c SS |
8221 | #include "confdefs.h" |
8222 | ||
97bf5e38 MK |
8223 | #define _SYSCALL32 |
8224 | #include <sys/procfs.h> | |
c906108c | 8225 | int main() { |
97bf5e38 | 8226 | pr_sigset_t avar |
c906108c SS |
8227 | ; return 0; } |
8228 | EOF | |
0e5d83e3 | 8229 | if { (eval echo configure:8230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8230 | rm -rf conftest* |
97bf5e38 | 8231 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
8232 | else |
8233 | echo "configure: failed program was:" >&5 | |
8234 | cat conftest.$ac_ext >&5 | |
8235 | rm -rf conftest* | |
97bf5e38 MK |
8236 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
8237 | ||
c906108c SS |
8238 | fi |
8239 | rm -f conftest* | |
8240 | fi | |
8241 | ||
97bf5e38 MK |
8242 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
8243 | cat >> confdefs.h <<\EOF | |
8244 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
8245 | EOF |
8246 | ||
97bf5e38 MK |
8247 | fi |
8248 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 8249 | |
97bf5e38 | 8250 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
0e5d83e3 | 8251 | echo "configure:8252: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 8252 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8253 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8254 | else |
8255 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8256 | #line 8257 "configure" |
c906108c SS |
8257 | #include "confdefs.h" |
8258 | ||
97bf5e38 MK |
8259 | #define _SYSCALL32 |
8260 | #include <sys/procfs.h> | |
8261 | int main() { | |
8262 | pr_sigaction64_t avar | |
8263 | ; return 0; } | |
c906108c | 8264 | EOF |
0e5d83e3 | 8265 | if { (eval echo configure:8266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8266 | rm -rf conftest* |
8267 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8268 | else |
8269 | echo "configure: failed program was:" >&5 | |
8270 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8271 | rm -rf conftest* |
8272 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8273 | ||
c906108c | 8274 | fi |
97bf5e38 | 8275 | rm -f conftest* |
c906108c SS |
8276 | fi |
8277 | ||
97bf5e38 MK |
8278 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8279 | cat >> confdefs.h <<\EOF | |
8280 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8281 | EOF |
8282 | ||
97bf5e38 MK |
8283 | fi |
8284 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8285 | ||
8286 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
0e5d83e3 | 8287 | echo "configure:8288: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8288 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8289 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8290 | else | |
8291 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8292 | #line 8293 "configure" |
97bf5e38 MK |
8293 | #include "confdefs.h" |
8294 | ||
8295 | #define _SYSCALL32 | |
8296 | #include <sys/procfs.h> | |
8297 | int main() { | |
8298 | pr_siginfo64_t avar | |
8299 | ; return 0; } | |
8300 | EOF | |
0e5d83e3 | 8301 | if { (eval echo configure:8302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8302 | rm -rf conftest* |
8303 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8304 | else | |
8305 | echo "configure: failed program was:" >&5 | |
8306 | cat conftest.$ac_ext >&5 | |
8307 | rm -rf conftest* | |
8308 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8309 | ||
8310 | fi | |
8311 | rm -f conftest* | |
c906108c | 8312 | fi |
c906108c | 8313 | |
97bf5e38 MK |
8314 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8315 | cat >> confdefs.h <<\EOF | |
8316 | #define HAVE_PR_SIGINFO64_T 1 | |
8317 | EOF | |
c906108c | 8318 | |
97bf5e38 MK |
8319 | fi |
8320 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8321 | ||
8322 | ||
8323 | ||
8324 | ||
8325 | ||
8326 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8327 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
0e5d83e3 | 8328 | echo "configure:8329: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8329 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8330 | echo $ac_n "(cached) $ac_c" 1>&6 |
8331 | else | |
8332 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8333 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8334 | else |
8335 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8336 | #line 8337 "configure" |
c906108c | 8337 | #include "confdefs.h" |
97bf5e38 MK |
8338 | #include <sys/procfs.h> |
8339 | int main () | |
8340 | { | |
8341 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8342 | return 1; | |
8343 | return 0; | |
8344 | } | |
c906108c | 8345 | EOF |
0e5d83e3 | 8346 | if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8347 | then |
97bf5e38 | 8348 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8349 | else |
8350 | echo "configure: failed program was:" >&5 | |
8351 | cat conftest.$ac_ext >&5 | |
8352 | rm -fr conftest* | |
97bf5e38 | 8353 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8354 | fi |
8355 | rm -fr conftest* | |
8356 | fi | |
8357 | ||
8358 | fi | |
8359 | ||
97bf5e38 MK |
8360 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8361 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8362 | cat >> confdefs.h <<\EOF | |
8363 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8364 | EOF |
8365 | ||
97bf5e38 MK |
8366 | fi |
8367 | fi | |
c906108c | 8368 | |
97bf5e38 MK |
8369 | |
8370 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
0e5d83e3 | 8371 | echo "configure:8372: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8372 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8373 | echo $ac_n "(cached) $ac_c" 1>&6 |
8374 | else | |
8375 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8376 | #line 8377 "configure" |
c906108c | 8377 | #include "confdefs.h" |
97bf5e38 MK |
8378 | #include <unistd.h> |
8379 | #include <sys/types.h> | |
8380 | #include <sys/procfs.h> | |
8381 | ||
8382 | int main() { | |
8383 | ||
8384 | int dummy;; | |
8385 | dummy = ioctl(0, PIOCSET, &dummy); | |
8386 | ||
8387 | ; return 0; } | |
c906108c | 8388 | EOF |
0e5d83e3 | 8389 | if { (eval echo configure:8390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8390 | rm -rf conftest* |
97bf5e38 | 8391 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8392 | else |
c906108c SS |
8393 | echo "configure: failed program was:" >&5 |
8394 | cat conftest.$ac_ext >&5 | |
8395 | rm -rf conftest* | |
97bf5e38 | 8396 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8397 | fi |
8398 | rm -f conftest* | |
8399 | fi | |
97bf5e38 MK |
8400 | |
8401 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8402 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8403 | cat >> confdefs.h <<\EOF | |
8404 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8405 | EOF |
97bf5e38 MK |
8406 | |
8407 | fi | |
c906108c | 8408 | fi |
c906108c | 8409 | |
97bf5e38 MK |
8410 | if test ${host} = ${target} ; then |
8411 | ||
8412 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
0e5d83e3 | 8413 | echo "configure:8414: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8414 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8415 | echo $ac_n "(cached) $ac_c" 1>&6 |
8416 | else | |
8417 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8418 | #line 8419 "configure" |
c906108c | 8419 | #include "confdefs.h" |
97bf5e38 | 8420 | #include <link.h> |
c906108c | 8421 | int main() { |
97bf5e38 | 8422 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8423 | ; return 0; } |
8424 | EOF | |
0e5d83e3 | 8425 | if { (eval echo configure:8426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8426 | rm -rf conftest* |
97bf5e38 | 8427 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8428 | else |
8429 | echo "configure: failed program was:" >&5 | |
8430 | cat conftest.$ac_ext >&5 | |
8431 | rm -rf conftest* | |
97bf5e38 | 8432 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8433 | fi |
8434 | rm -f conftest* | |
8435 | fi | |
8436 | ||
97bf5e38 MK |
8437 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8438 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8439 | cat >> confdefs.h <<\EOF | |
8440 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8441 | EOF |
97bf5e38 MK |
8442 | |
8443 | fi | |
8444 | ||
8445 | ||
8446 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
0e5d83e3 | 8447 | echo "configure:8448: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8448 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8449 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8450 | else |
97bf5e38 | 8451 | cat > conftest.$ac_ext <<EOF |
0e5d83e3 | 8452 | #line 8453 "configure" |
97bf5e38 MK |
8453 | #include "confdefs.h" |
8454 | #include <sys/types.h> | |
8455 | #include <link.h> | |
8456 | int main() { | |
8457 | struct link_map lm; (void) lm.lm_addr; | |
8458 | ; return 0; } | |
8459 | EOF | |
0e5d83e3 | 8460 | if { (eval echo configure:8461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8461 | rm -rf conftest* |
8462 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8463 | else | |
8464 | echo "configure: failed program was:" >&5 | |
8465 | cat conftest.$ac_ext >&5 | |
8466 | rm -rf conftest* | |
8467 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8468 | fi | |
8469 | rm -f conftest* | |
c906108c | 8470 | fi |
c906108c | 8471 | |
97bf5e38 MK |
8472 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8473 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8474 | cat >> confdefs.h <<\EOF | |
8475 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8476 | EOF | |
8477 | ||
8478 | fi | |
8479 | ||
8480 | ||
8481 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
0e5d83e3 | 8482 | echo "configure:8483: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8483 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8484 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8485 | else |
8486 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8487 | #line 8488 "configure" |
c906108c | 8488 | #include "confdefs.h" |
97bf5e38 MK |
8489 | #include <sys/types.h> |
8490 | #ifdef HAVE_NLIST_H | |
8491 | #include <nlist.h> | |
8492 | #endif | |
8493 | #include <link.h> | |
8494 | int main() { | |
8495 | struct so_map lm; (void) lm.som_addr; | |
8496 | ; return 0; } | |
8497 | EOF | |
0e5d83e3 | 8498 | if { (eval echo configure:8499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8499 | rm -rf conftest* |
8500 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8501 | else | |
8502 | echo "configure: failed program was:" >&5 | |
8503 | cat conftest.$ac_ext >&5 | |
8504 | rm -rf conftest* | |
8505 | gdb_cv_have_struct_so_map_with_som_members=no | |
8506 | fi | |
8507 | rm -f conftest* | |
8508 | fi | |
c906108c | 8509 | |
97bf5e38 MK |
8510 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8511 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8512 | cat >> confdefs.h <<\EOF | |
8513 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8514 | EOF | |
c906108c | 8515 | |
97bf5e38 | 8516 | fi |
c906108c | 8517 | |
97bf5e38 MK |
8518 | |
8519 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
0e5d83e3 | 8520 | echo "configure:8521: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8521 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8522 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8523 | else | |
8524 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8525 | #line 8526 "configure" |
97bf5e38 MK |
8526 | #include "confdefs.h" |
8527 | #define _SYSCALL32 | |
8528 | #include <sys/link.h> | |
8529 | int main() { | |
8530 | struct link_map32 l; | |
8531 | ; return 0; } | |
8532 | EOF | |
0e5d83e3 | 8533 | if { (eval echo configure:8534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8534 | rm -rf conftest* |
8535 | gdb_cv_have_struct_link_map32=yes | |
8536 | else | |
8537 | echo "configure: failed program was:" >&5 | |
8538 | cat conftest.$ac_ext >&5 | |
8539 | rm -rf conftest* | |
8540 | gdb_cv_have_struct_link_map32=no | |
8541 | fi | |
8542 | rm -f conftest* | |
8543 | fi | |
c906108c | 8544 | |
97bf5e38 MK |
8545 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8546 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8547 | cat >> confdefs.h <<\EOF | |
8548 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8549 | EOF | |
c906108c | 8550 | |
97bf5e38 MK |
8551 | cat >> confdefs.h <<\EOF |
8552 | #define _SYSCALL32 1 | |
8553 | EOF | |
c906108c | 8554 | |
97bf5e38 MK |
8555 | fi |
8556 | fi | |
c906108c | 8557 | |
c906108c | 8558 | |
97bf5e38 | 8559 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
0e5d83e3 | 8560 | echo "configure:8561: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8561 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8562 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8563 | else | |
8564 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8565 | #line 8566 "configure" |
97bf5e38 | 8566 | #include "confdefs.h" |
c906108c | 8567 | |
97bf5e38 | 8568 | int main() { |
c906108c | 8569 | |
97bf5e38 MK |
8570 | extern long long foo; |
8571 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8572 | |
97bf5e38 MK |
8573 | ; return 0; } |
8574 | EOF | |
0e5d83e3 | 8575 | if { (eval echo configure:8576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8576 | rm -rf conftest* |
8577 | gdb_cv_c_long_long=yes | |
8578 | else | |
8579 | echo "configure: failed program was:" >&5 | |
8580 | cat conftest.$ac_ext >&5 | |
8581 | rm -rf conftest* | |
8582 | gdb_cv_c_long_long=no | |
8583 | fi | |
8584 | rm -f conftest* | |
8585 | fi | |
c906108c | 8586 | |
97bf5e38 MK |
8587 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8588 | if test $gdb_cv_c_long_long = yes; then | |
8589 | cat >> confdefs.h <<\EOF | |
8590 | #define CC_HAS_LONG_LONG 1 | |
8591 | EOF | |
8592 | ||
8593 | fi | |
8594 | ||
8595 | ||
8596 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
0e5d83e3 | 8597 | echo "configure:8598: checking for long long support in printf" >&5 |
97bf5e38 MK |
8598 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8599 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8600 | else | |
8601 | if test "$cross_compiling" = yes; then | |
8602 | gdb_cv_printf_has_long_long=no | |
8603 | else | |
8604 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8605 | #line 8606 "configure" |
97bf5e38 MK |
8606 | #include "confdefs.h" |
8607 | ||
8608 | int main () { | |
8609 | char buf[32]; | |
8610 | long long l = 0; | |
8611 | l = (l << 16) + 0x0123; | |
8612 | l = (l << 16) + 0x4567; | |
8613 | l = (l << 16) + 0x89ab; | |
8614 | l = (l << 16) + 0xcdef; | |
8615 | sprintf (buf, "0x%016llx", l); | |
8616 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8617 | } |
97bf5e38 | 8618 | EOF |
0e5d83e3 | 8619 | if { (eval echo configure:8620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8620 | then |
8621 | gdb_cv_printf_has_long_long=yes | |
8622 | else | |
8623 | echo "configure: failed program was:" >&5 | |
8624 | cat conftest.$ac_ext >&5 | |
8625 | rm -fr conftest* | |
8626 | gdb_cv_printf_has_long_long=no | |
8627 | fi | |
8628 | rm -fr conftest* | |
8629 | fi | |
8630 | ||
8631 | fi | |
8632 | ||
8633 | if test $gdb_cv_printf_has_long_long = yes; then | |
8634 | cat >> confdefs.h <<\EOF | |
8635 | #define PRINTF_HAS_LONG_LONG 1 | |
8636 | EOF | |
8637 | ||
8638 | fi | |
8639 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8640 | ||
8641 | ||
8642 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
0e5d83e3 | 8643 | echo "configure:8644: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8644 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8645 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8646 | else | |
8647 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8648 | #line 8649 "configure" |
97bf5e38 MK |
8649 | #include "confdefs.h" |
8650 | ||
8651 | int main() { | |
8652 | long double foo; | |
8653 | ; return 0; } | |
8654 | EOF | |
0e5d83e3 | 8655 | if { (eval echo configure:8656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8656 | rm -rf conftest* |
8657 | ac_cv_c_long_double=yes | |
8658 | else | |
8659 | echo "configure: failed program was:" >&5 | |
8660 | cat conftest.$ac_ext >&5 | |
8661 | rm -rf conftest* | |
8662 | ac_cv_c_long_double=no | |
8663 | fi | |
8664 | rm -f conftest* | |
8665 | fi | |
c906108c | 8666 | |
97bf5e38 MK |
8667 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8668 | if test $ac_cv_c_long_double = yes; then | |
8669 | cat >> confdefs.h <<\EOF | |
8670 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8671 | EOF |
97bf5e38 MK |
8672 | |
8673 | fi | |
8674 | ||
8675 | ||
8676 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
0e5d83e3 | 8677 | echo "configure:8678: checking for long double support in printf" >&5 |
97bf5e38 MK |
8678 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8679 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8680 | else | |
8681 | if test "$cross_compiling" = yes; then | |
8682 | gdb_cv_printf_has_long_double=no | |
8683 | else | |
8684 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8685 | #line 8686 "configure" |
97bf5e38 MK |
8686 | #include "confdefs.h" |
8687 | ||
8688 | int main () { | |
8689 | char buf[16]; | |
8690 | long double f = 3.141592653; | |
8691 | sprintf (buf, "%Lg", f); | |
8692 | return (strncmp ("3.14159", buf, 7)); | |
8693 | } | |
8694 | EOF | |
0e5d83e3 | 8695 | if { (eval echo configure:8696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8696 | then |
97bf5e38 | 8697 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8698 | else |
8699 | echo "configure: failed program was:" >&5 | |
8700 | cat conftest.$ac_ext >&5 | |
8701 | rm -fr conftest* | |
97bf5e38 | 8702 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8703 | fi |
8704 | rm -fr conftest* | |
8705 | fi | |
8706 | ||
8707 | fi | |
8708 | ||
97bf5e38 | 8709 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8710 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8711 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8712 | EOF | |
8713 | ||
8714 | fi | |
8715 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8716 | ||
8717 | ||
8718 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
0e5d83e3 | 8719 | echo "configure:8720: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8720 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8721 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8722 | else | |
8723 | if test "$cross_compiling" = yes; then | |
8724 | gdb_cv_scanf_has_long_double=no | |
8725 | else | |
8726 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8727 | #line 8728 "configure" |
97bf5e38 MK |
8728 | #include "confdefs.h" |
8729 | ||
8730 | int main () { | |
8731 | char *buf = "3.141592653"; | |
8732 | long double f = 0; | |
8733 | sscanf (buf, "%Lg", &f); | |
8734 | return !(f > 3.14159 && f < 3.14160); | |
8735 | } | |
c906108c | 8736 | EOF |
0e5d83e3 | 8737 | if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8738 | then |
8739 | gdb_cv_scanf_has_long_double=yes | |
8740 | else | |
8741 | echo "configure: failed program was:" >&5 | |
8742 | cat conftest.$ac_ext >&5 | |
8743 | rm -fr conftest* | |
8744 | gdb_cv_scanf_has_long_double=no | |
8745 | fi | |
8746 | rm -fr conftest* | |
8747 | fi | |
c906108c SS |
8748 | |
8749 | fi | |
8750 | ||
97bf5e38 MK |
8751 | if test $gdb_cv_scanf_has_long_double = yes; then |
8752 | cat >> confdefs.h <<\EOF | |
8753 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8754 | EOF | |
8755 | ||
8756 | fi | |
8757 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8758 | |
438013df AO |
8759 | case ${host_os} in |
8760 | aix*) | |
8761 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
0e5d83e3 | 8762 | echo "configure:8763: checking for -bbigtoc option" >&5 |
438013df AO |
8763 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8764 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8765 | else | |
8766 | ||
8767 | SAVE_LDFLAGS=$LDFLAGS | |
8768 | ||
8769 | case $GCC in | |
8770 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8771 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8772 | esac | |
8773 | ||
8774 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8775 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8776 | #line 8777 "configure" |
438013df AO |
8777 | #include "confdefs.h" |
8778 | ||
8779 | int main() { | |
8780 | int i; | |
8781 | ; return 0; } | |
8782 | EOF | |
0e5d83e3 | 8783 | if { (eval echo configure:8784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8784 | : |
8785 | else | |
8786 | echo "configure: failed program was:" >&5 | |
8787 | cat conftest.$ac_ext >&5 | |
8788 | rm -rf conftest* | |
8789 | gdb_cv_bigtoc= | |
8790 | fi | |
8791 | rm -f conftest* | |
8792 | ||
8793 | fi | |
8794 | ||
8795 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8796 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8797 | ;; | |
8798 | esac | |
8799 | ||
c906108c SS |
8800 | |
8801 | ||
8802 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8803 | case ${host_os} in | |
8804 | hpux*) | |
8805 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
0e5d83e3 | 8806 | echo "configure:8807: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8807 | if test -f /usr/include/dce/cma_config.h ; then |
8808 | if test "$GCC" = "yes" ; then | |
8809 | echo "$ac_t""yes" 1>&6 | |
8810 | cat >> confdefs.h <<\EOF | |
8811 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8812 | EOF | |
8813 | ||
66b965bb | 8814 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8815 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8816 | else | |
8817 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8818 | fi | |
8819 | else | |
8820 | echo "$ac_t""no" 1>&6 | |
8821 | fi | |
8822 | ;; | |
8823 | solaris*) | |
d92419e5 JB |
8824 | # See if thread_db library is around for Solaris thread debugging. |
8825 | # Note that we must explicitly test for version 1 of the library | |
8826 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8827 | # the same API. | |
c906108c | 8828 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
0e5d83e3 | 8829 | echo "configure:8830: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8830 | if test -f /usr/lib/libthread_db.so.1 ; then |
8831 | echo "$ac_t""yes" 1>&6 | |
8832 | cat >> confdefs.h <<\EOF | |
8833 | #define HAVE_THREAD_DB_LIB 1 | |
8834 | EOF | |
8835 | ||
66b965bb | 8836 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8837 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8838 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
0e5d83e3 | 8839 | echo "configure:8840: checking for dlopen in -ldl" >&5 |
c906108c SS |
8840 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8841 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8842 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8843 | else | |
8844 | ac_save_LIBS="$LIBS" | |
8845 | LIBS="-ldl $LIBS" | |
8846 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8847 | #line 8848 "configure" |
c906108c SS |
8848 | #include "confdefs.h" |
8849 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8850 | /* We use char because int might match the return type of a gcc2 | |
8851 | builtin and then its argument prototype would still apply. */ | |
8852 | char dlopen(); | |
8853 | ||
8854 | int main() { | |
8855 | dlopen() | |
8856 | ; return 0; } | |
8857 | EOF | |
0e5d83e3 | 8858 | if { (eval echo configure:8859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8859 | rm -rf conftest* |
8860 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8861 | else | |
8862 | echo "configure: failed program was:" >&5 | |
8863 | cat conftest.$ac_ext >&5 | |
8864 | rm -rf conftest* | |
8865 | eval "ac_cv_lib_$ac_lib_var=no" | |
8866 | fi | |
8867 | rm -f conftest* | |
8868 | LIBS="$ac_save_LIBS" | |
8869 | ||
8870 | fi | |
8871 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8872 | echo "$ac_t""yes" 1>&6 | |
8873 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8874 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8875 | cat >> confdefs.h <<EOF | |
8876 | #define $ac_tr_lib 1 | |
8877 | EOF | |
8878 | ||
8879 | LIBS="-ldl $LIBS" | |
8880 | ||
8881 | else | |
8882 | echo "$ac_t""no" 1>&6 | |
8883 | fi | |
8884 | ||
8885 | if test "$GCC" = "yes" ; then | |
8886 | # The GNU linker requires the -export-dynamic option to make | |
8887 | # all symbols visible in the dynamic symbol table. | |
8888 | hold_ldflags=$LDFLAGS | |
8889 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
0e5d83e3 | 8890 | echo "configure:8891: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8891 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8892 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8893 | #line 8894 "configure" |
c906108c SS |
8894 | #include "confdefs.h" |
8895 | ||
8896 | int main() { | |
8897 | int i; | |
8898 | ; return 0; } | |
8899 | EOF | |
0e5d83e3 | 8900 | if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8901 | rm -rf conftest* |
8902 | found=yes | |
8903 | else | |
8904 | echo "configure: failed program was:" >&5 | |
8905 | cat conftest.$ac_ext >&5 | |
8906 | rm -rf conftest* | |
8907 | found=no | |
8908 | fi | |
8909 | rm -f conftest* | |
8910 | LDFLAGS=$hold_ldflags | |
8911 | echo "$ac_t""$found" 1>&6 | |
8912 | if test $found = yes; then | |
8913 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8914 | fi | |
8915 | fi | |
8916 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8917 | # at one point. | |
8918 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
0e5d83e3 | 8919 | echo "configure:8920: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8920 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8921 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8922 | else | |
8923 | ||
8924 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8925 | #line 8926 "configure" |
c906108c SS |
8926 | #include "confdefs.h" |
8927 | ||
8928 | #include <proc_service.h> | |
8929 | ps_err_e ps_pdwrite | |
8930 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8931 | ||
8932 | int main() { | |
8933 | ||
8934 | ; return 0; } | |
8935 | EOF | |
0e5d83e3 | 8936 | if { (eval echo configure:8937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8937 | rm -rf conftest* |
8938 | gdb_cv_proc_service_is_old=no | |
8939 | else | |
8940 | echo "configure: failed program was:" >&5 | |
8941 | cat conftest.$ac_ext >&5 | |
8942 | rm -rf conftest* | |
8943 | gdb_cv_proc_service_is_old=yes | |
8944 | fi | |
8945 | rm -f conftest* | |
8946 | ||
8947 | fi | |
8948 | ||
8949 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8950 | if test $gdb_cv_proc_service_is_old = yes; then | |
8951 | cat >> confdefs.h <<\EOF | |
8952 | #define PROC_SERVICE_IS_OLD 1 | |
8953 | EOF | |
8954 | ||
8955 | fi | |
8956 | else | |
8957 | echo "$ac_t""no" 1>&6 | |
8958 | fi | |
8959 | ;; | |
d92419e5 JB |
8960 | aix*) |
8961 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
0e5d83e3 | 8962 | echo "configure:8963: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8963 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8964 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8965 | else | |
8966 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 8967 | #line 8968 "configure" |
d92419e5 JB |
8968 | #include "confdefs.h" |
8969 | #include <sys/pthdebug.h> | |
8970 | int main() { | |
8971 | #ifndef PTHDB_VERSION_3 | |
8972 | #error | |
8973 | #endif | |
8974 | ; return 0; } | |
8975 | EOF | |
0e5d83e3 | 8976 | if { (eval echo configure:8977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8977 | rm -rf conftest* |
8978 | gdb_cv_have_aix_thread_debug=yes | |
8979 | else | |
8980 | echo "configure: failed program was:" >&5 | |
8981 | cat conftest.$ac_ext >&5 | |
8982 | rm -rf conftest* | |
8983 | gdb_cv_have_aix_thread_debug=no | |
8984 | fi | |
8985 | rm -f conftest* | |
8986 | fi | |
8987 | ||
8988 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8989 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8990 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8991 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8992 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8993 | fi | |
8994 | ;; | |
c906108c SS |
8995 | esac |
8996 | ||
8997 | fi | |
8998 | ||
3f47be5c EZ |
8999 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
9000 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
0e5d83e3 | 9001 | echo "configure:9002: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
9002 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
9003 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9004 | else | |
9005 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 9006 | #line 9007 "configure" |
3f47be5c EZ |
9007 | #include "confdefs.h" |
9008 | #include <thread_db.h> | |
9009 | int main() { | |
9010 | int i = TD_NOTALLOC; | |
9011 | ; return 0; } | |
9012 | EOF | |
0e5d83e3 | 9013 | if { (eval echo configure:9014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
9014 | rm -rf conftest* |
9015 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
9016 | else | |
9017 | echo "configure: failed program was:" >&5 | |
9018 | cat conftest.$ac_ext >&5 | |
9019 | rm -rf conftest* | |
9020 | gdb_cv_thread_db_h_has_td_notalloc=no | |
9021 | ||
9022 | fi | |
9023 | rm -f conftest* | |
9024 | ||
9025 | fi | |
9026 | ||
9027 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
9028 | fi | |
9029 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
9030 | cat >> confdefs.h <<\EOF | |
9031 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
9032 | EOF | |
9033 | ||
9034 | fi | |
9035 | ||
b757528f JJ |
9036 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
9037 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
0e5d83e3 | 9038 | echo "configure:9039: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
9039 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
9040 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9041 | else | |
9042 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 9043 | #line 9044 "configure" |
b757528f JJ |
9044 | #include "confdefs.h" |
9045 | #include <sys/syscall.h> | |
9046 | int main() { | |
9047 | int i = __NR_tkill; | |
9048 | ; return 0; } | |
9049 | EOF | |
0e5d83e3 | 9050 | if { (eval echo configure:9051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
9051 | rm -rf conftest* |
9052 | gdb_cv_sys_syscall_h_has_tkill=yes | |
9053 | else | |
9054 | echo "configure: failed program was:" >&5 | |
9055 | cat conftest.$ac_ext >&5 | |
9056 | rm -rf conftest* | |
9057 | gdb_cv_sys_syscall_h_has_tkill=no | |
9058 | ||
9059 | fi | |
9060 | rm -f conftest* | |
9061 | ||
9062 | fi | |
9063 | ||
9064 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
9065 | fi | |
9066 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
9067 | cat >> confdefs.h <<\EOF | |
9068 | #define HAVE_TKILL_SYSCALL 1 | |
9069 | EOF | |
9070 | ||
9071 | fi | |
9072 | ||
fb40c209 | 9073 | |
030292b7 DJ |
9074 | # Check whether --with-sysroot or --without-sysroot was given. |
9075 | if test "${with_sysroot+set}" = set; then | |
9076 | withval="$with_sysroot" | |
9077 | ||
9078 | case ${with_sysroot} in | |
715d1656 | 9079 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
9080 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
9081 | esac | |
9082 | ||
9083 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
9084 | ||
9085 | if test "x$exec_prefix" = xNONE; then | |
9086 | if test "x$prefix" = xNONE; then | |
9087 | test_prefix=/usr/local | |
9088 | else | |
9089 | test_prefix=$prefix | |
9090 | fi | |
9091 | else | |
9092 | test_prefix=$exec_prefix | |
9093 | fi | |
9094 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
9095 | "${test_prefix}"|"${test_prefix}/"*|\ |
9096 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
9097 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
9098 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
9099 | ;; | |
9100 | esac | |
9101 | ||
9102 | else | |
9103 | ||
9104 | TARGET_SYSTEM_ROOT= | |
9105 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
9106 | ||
9107 | fi | |
9108 | ||
9109 | ||
9110 | ||
9111 | ||
3b851bce AC |
9112 | # NOTE: Don't add -Wall or -Wunused, they both include |
9113 | # -Wunused-parameter which reports bogus warnings. | |
9114 | # NOTE: If you add to this list, remember to update | |
9115 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 9116 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
153721e6 | 9117 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral" |
d8038014 AC |
9118 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
9119 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 9120 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
9121 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
9122 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
9123 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
9124 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
9125 | if test "${enable_build_warnings+set}" = set; then | |
9126 | enableval="$enable_build_warnings" | |
1decb323 | 9127 | case "${enableval}" in |
c906108c SS |
9128 | yes) ;; |
9129 | no) build_warnings="-w";; | |
9130 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9131 | build_warnings="${build_warnings} ${t}";; | |
9132 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9133 | build_warnings="${t} ${build_warnings}";; | |
9134 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9135 | esac | |
d4f3574e | 9136 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 9137 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 9138 | fi |
1decb323 | 9139 | fi |
3b851bce AC |
9140 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
9141 | if test "${enable_gdb_build_warnings+set}" = set; then | |
9142 | enableval="$enable_gdb_build_warnings" | |
9143 | case "${enableval}" in | |
9144 | yes) ;; | |
9145 | no) build_warnings="-w";; | |
9146 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9147 | build_warnings="${build_warnings} ${t}";; | |
9148 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9149 | build_warnings="${t} ${build_warnings}";; | |
9150 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9151 | esac | |
9152 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9153 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9154 | fi | |
9155 | fi | |
104c1213 JM |
9156 | WARN_CFLAGS="" |
9157 | WERROR_CFLAGS="" | |
c906108c SS |
9158 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
9159 | then | |
746a987d | 9160 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
0e5d83e3 | 9161 | echo "configure:9162: checking compiler warning flags" >&5 |
746a987d AC |
9162 | # Separate out the -Werror flag as some files just cannot be |
9163 | # compiled with it enabled. | |
9164 | for w in ${build_warnings}; do | |
9165 | case $w in | |
9166 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
9167 | *) # Check that GCC accepts it | |
4536bbc6 AC |
9168 | saved_CFLAGS="$CFLAGS" |
9169 | CFLAGS="$CFLAGS $w" | |
9170 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 9171 | #line 9172 "configure" |
4536bbc6 AC |
9172 | #include "confdefs.h" |
9173 | ||
9174 | int main() { | |
9175 | ||
9176 | ; return 0; } | |
9177 | EOF | |
0e5d83e3 | 9178 | if { (eval echo configure:9179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
9179 | rm -rf conftest* |
9180 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9181 | else | |
9182 | echo "configure: failed program was:" >&5 | |
9183 | cat conftest.$ac_ext >&5 | |
9184 | fi | |
9185 | rm -f conftest* | |
9186 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
9187 | esac |
9188 | done | |
9189 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
9190 | fi |
9191 | ||
9192 | ||
104c1213 | 9193 | |
c906108c SS |
9194 | MMALLOC_CFLAGS= |
9195 | MMALLOC= | |
9196 | ||
9197 | ||
9198 | ||
9199 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
9200 | if test "${with_mmalloc+set}" = set; then | |
9201 | withval="$with_mmalloc" | |
9202 | case "${withval}" in | |
9203 | yes) want_mmalloc=true ;; | |
9204 | no) want_mmalloc=false;; | |
9205 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
9206 | esac | |
9207 | else | |
9208 | want_mmalloc=false | |
9209 | fi | |
9210 | ||
9211 | if test x$want_mmalloc = xtrue; then | |
9212 | cat >> confdefs.h <<\EOF | |
9213 | #define USE_MMALLOC 1 | |
9214 | EOF | |
9215 | ||
9216 | cat >> confdefs.h <<\EOF | |
9217 | #define MMCHECK_FORCE 1 | |
9218 | EOF | |
9219 | ||
9220 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
9221 | MMALLOC='../mmalloc/libmmalloc.a' | |
9222 | fi | |
9223 | ||
7a292a7a SS |
9224 | # In the Cygwin environment, we need some additional flags. |
9225 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
0e5d83e3 | 9226 | echo "configure:9227: checking for cygwin" >&5 |
7a292a7a SS |
9227 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9228 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9229 | else | |
9230 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 9231 | #line 9232 "configure" |
7a292a7a SS |
9232 | #include "confdefs.h" |
9233 | ||
9234 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
9235 | lose | |
9236 | #endif | |
9237 | EOF | |
9238 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9239 | egrep "lose" >/dev/null 2>&1; then | |
9240 | rm -rf conftest* | |
9241 | gdb_cv_os_cygwin=yes | |
9242 | else | |
9243 | rm -rf conftest* | |
9244 | gdb_cv_os_cygwin=no | |
9245 | fi | |
9246 | rm -f conftest* | |
9247 | ||
9248 | fi | |
9249 | ||
9250 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
9251 | ||
aff38e61 AC |
9252 | |
9253 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9254 | case ${host} in | |
95cbc983 AC |
9255 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9256 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9257 | esac |
9258 | ||
9259 | ||
cd0fc7c3 SS |
9260 | # libreadline needs libuser32.a in a cygwin environment |
9261 | WIN32LIBS= | |
9262 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9263 | WIN32LIBS="-luser32" |
9264 | case "${target}" in | |
9265 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9266 | ;; | |
9267 | esac | |
cd0fc7c3 | 9268 | fi |
c906108c | 9269 | |
7a292a7a | 9270 | |
3fc11d3e JM |
9271 | LIBGUI="../libgui/src/libgui.a" |
9272 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9273 | ||
9274 | ||
7a292a7a | 9275 | |
3fc11d3e JM |
9276 | WIN32LDAPP= |
9277 | ||
9278 | ||
9279 | ||
9280 | configdir="unix" | |
9281 | ||
9282 | GDBTKLIBS= | |
9283 | if test "${enable_gdbtk}" = "yes"; then | |
9284 | ||
d1c3b63a KS |
9285 | # Gdbtk must have an absolute path to srcdir in order to run |
9286 | # properly when not installed. | |
9287 | here=`pwd` | |
9288 | cd ${srcdir} | |
9289 | GDBTK_SRC_DIR=`pwd` | |
9290 | cd $here | |
9291 | ||
3fc11d3e JM |
9292 | |
9293 | # | |
9294 | # Ok, lets find the tcl configuration | |
9295 | # First, look for one uninstalled. | |
9296 | # the alternative search directory is invoked by --with-tclconfig | |
9297 | # | |
9298 | ||
9299 | if test x"${no_tcl}" = x ; then | |
9300 | # we reset no_tcl in case something fails here | |
9301 | no_tcl=true | |
9302 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9303 | if test "${with_tclconfig+set}" = set; then | |
9304 | withval="$with_tclconfig" | |
9305 | with_tclconfig=${withval} | |
9306 | fi | |
9307 | ||
9308 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
0e5d83e3 | 9309 | echo "configure:9310: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9310 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9311 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9312 | else | |
9313 | ||
9314 | ||
9315 | # First check to see if --with-tclconfig was specified. | |
9316 | if test x"${with_tclconfig}" != x ; then | |
9317 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9318 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9319 | else | |
9320 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9321 | fi | |
9322 | fi | |
9323 | ||
9324 | # then check for a private Tcl installation | |
9325 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9326 | for i in \ | |
9327 | ../tcl \ | |
9328 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9329 | ../../tcl \ | |
9330 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9331 | ../../../tcl \ | |
9332 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9333 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9334 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9335 | break | |
9336 | fi | |
9337 | done | |
9338 | fi | |
9339 | # check in a few common install locations | |
9340 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9341 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9342 | if test -f "$i/tclConfig.sh" ; then | |
9343 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9344 | break | |
9345 | fi | |
9346 | done | |
9347 | fi | |
9348 | # check in a few other private locations | |
9349 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9350 | for i in \ | |
9351 | ${srcdir}/../tcl \ | |
9352 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9353 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9354 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9355 | break | |
9356 | fi | |
9357 | done | |
9358 | fi | |
9359 | ||
9360 | fi | |
9361 | ||
9362 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9363 | TCLCONFIG="# no Tcl configs found" | |
9364 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9365 | else | |
9366 | no_tcl= | |
9367 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9368 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9369 | fi | |
9370 | fi | |
9371 | ||
9372 | if test -z "${no_tcl}"; then | |
9373 | ||
9374 | . $TCLCONFIG | |
9375 | ||
9376 | ||
9377 | ||
9378 | ||
9379 | ||
9380 | ||
9381 | ||
9382 | ||
9383 | ||
9384 | ||
9385 | ||
9386 | ||
9387 | ||
9388 | ||
9389 | ||
9390 | ||
9391 | ||
9392 | ||
9393 | ||
9394 | ||
033afc63 | 9395 | |
3fc11d3e JM |
9396 | |
9397 | ||
9398 | ||
9399 | ||
9400 | ||
9401 | ||
9402 | # | |
9403 | # Ok, lets find the tk configuration | |
9404 | # First, look for one uninstalled. | |
9405 | # the alternative search directory is invoked by --with-tkconfig | |
9406 | # | |
9407 | ||
9408 | if test x"${no_tk}" = x ; then | |
9409 | # we reset no_tk in case something fails here | |
9410 | no_tk=true | |
9411 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9412 | if test "${with_tkconfig+set}" = set; then | |
9413 | withval="$with_tkconfig" | |
9414 | with_tkconfig=${withval} | |
9415 | fi | |
9416 | ||
9417 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
0e5d83e3 | 9418 | echo "configure:9419: checking for Tk configuration" >&5 |
3fc11d3e JM |
9419 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9420 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9421 | else | |
9422 | ||
9423 | ||
9424 | # First check to see if --with-tkconfig was specified. | |
9425 | if test x"${with_tkconfig}" != x ; then | |
9426 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9427 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9428 | else | |
9429 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9430 | fi | |
9431 | fi | |
9432 | ||
9433 | # then check for a private Tk library | |
9434 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9435 | for i in \ | |
9436 | ../tk \ | |
9437 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9438 | ../../tk \ | |
9439 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9440 | ../../../tk \ | |
9441 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9442 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9443 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9444 | break | |
9445 | fi | |
9446 | done | |
9447 | fi | |
9448 | # check in a few common install locations | |
9449 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9450 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9451 | if test -f "$i/tkConfig.sh" ; then | |
9452 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9453 | break | |
9454 | fi | |
9455 | done | |
9456 | fi | |
9457 | # check in a few other private locations | |
9458 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9459 | for i in \ | |
9460 | ${srcdir}/../tk \ | |
9461 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9462 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9463 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9464 | break | |
9465 | fi | |
9466 | done | |
9467 | fi | |
9468 | ||
9469 | fi | |
9470 | ||
9471 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9472 | TKCONFIG="# no Tk configs found" | |
9473 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9474 | else | |
9475 | no_tk= | |
9476 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9477 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9478 | fi | |
9479 | fi | |
9480 | ||
9481 | ||
9482 | ||
dd2504ab JM |
9483 | # now look for Tcl library stuff |
9484 | ||
9485 | case "${host}" in | |
9486 | *-*-cygwin*) | |
9487 | tcldir=../tcl/win/ | |
9488 | ;; | |
9489 | *) | |
9490 | tcldir=../tcl/unix/ | |
9491 | ;; | |
9492 | esac | |
9493 | ||
9494 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9495 | ||
3fc11d3e JM |
9496 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9497 | # point to doing Tcl. | |
9498 | if test -z "${no_tk}"; then | |
9499 | ||
9500 | if test -f "$TKCONFIG" ; then | |
9501 | . $TKCONFIG | |
9502 | fi | |
9503 | ||
9504 | ||
9505 | ||
9506 | ||
9507 | ||
9508 | ||
9509 | ||
9510 | ||
9511 | ||
9512 | ||
9513 | ||
9514 | ||
9515 | ||
9516 | ||
9517 | # | |
9518 | # Ok, lets find the tcl source trees so we can use the headers | |
9519 | # Warning: transition of version 9 to 10 will break this algorithm | |
9520 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9521 | # be careful that we don't match stuff like tclX by accident. | |
9522 | # the alternative search directory is involked by --with-tclinclude | |
9523 | # | |
9524 | ||
9525 | no_tcl=true | |
9526 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
0e5d83e3 | 9527 | echo "configure:9528: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9528 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9529 | if test "${with_tclinclude+set}" = set; then | |
9530 | withval="$with_tclinclude" | |
9531 | with_tclinclude=${withval} | |
9532 | fi | |
9533 | ||
9534 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9536 | else | |
9537 | ||
9538 | # first check to see if --with-tclinclude was specified | |
9539 | if test x"${with_tclinclude}" != x ; then | |
9540 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9541 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9542 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9543 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9544 | else | |
9545 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9546 | fi | |
9547 | fi | |
9548 | ||
9549 | # next check if it came with Tcl configuration file | |
9550 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9551 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9552 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9553 | fi | |
9554 | fi | |
9555 | ||
9556 | # next check in private source directory | |
9557 | # | |
9558 | # since ls returns lowest version numbers first, reverse its output | |
9559 | if test x"${ac_cv_c_tclh}" = x ; then | |
9560 | for i in \ | |
9561 | ${srcdir}/../tcl \ | |
9562 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9563 | ${srcdir}/../../tcl \ | |
9564 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9565 | ${srcdir}/../../../tcl \ | |
9566 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9567 | if test -f $i/generic/tclInt.h ; then | |
9568 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9569 | break | |
9570 | fi | |
9571 | done | |
9572 | fi | |
9573 | # finally check in a few common install locations | |
9574 | # | |
9575 | # since ls returns lowest version numbers first, reverse its output | |
9576 | if test x"${ac_cv_c_tclh}" = x ; then | |
9577 | for i in \ | |
9578 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9579 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9580 | /usr/local/src/tcl \ | |
9581 | /usr/local/lib/tcl \ | |
9582 | ${prefix}/include ; do | |
9583 | if test -f $i/generic/tclInt.h ; then | |
9584 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9585 | break | |
9586 | fi | |
9587 | done | |
9588 | fi | |
9589 | # see if one is installed | |
9590 | if test x"${ac_cv_c_tclh}" = x ; then | |
9591 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9592 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
0e5d83e3 | 9593 | echo "configure:9594: checking for tclInt.h" >&5 |
3fc11d3e JM |
9594 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9595 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9596 | else | |
9597 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 9598 | #line 9599 "configure" |
3fc11d3e JM |
9599 | #include "confdefs.h" |
9600 | #include <tclInt.h> | |
9601 | EOF | |
9602 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 9603 | { (eval echo configure:9604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9604 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9605 | if test -z "$ac_err"; then | |
9606 | rm -rf conftest* | |
9607 | eval "ac_cv_header_$ac_safe=yes" | |
9608 | else | |
9609 | echo "$ac_err" >&5 | |
9610 | echo "configure: failed program was:" >&5 | |
9611 | cat conftest.$ac_ext >&5 | |
9612 | rm -rf conftest* | |
9613 | eval "ac_cv_header_$ac_safe=no" | |
9614 | fi | |
9615 | rm -f conftest* | |
9616 | fi | |
9617 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9618 | echo "$ac_t""yes" 1>&6 | |
9619 | ac_cv_c_tclh=installed | |
9620 | else | |
9621 | echo "$ac_t""no" 1>&6 | |
9622 | ac_cv_c_tclh="" | |
9623 | fi | |
9624 | ||
9625 | fi | |
9626 | ||
9627 | fi | |
9628 | ||
9629 | if test x"${ac_cv_c_tclh}" = x ; then | |
9630 | TCLHDIR="# no Tcl private headers found" | |
9631 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9632 | fi | |
9633 | if test x"${ac_cv_c_tclh}" != x ; then | |
9634 | no_tcl="" | |
9635 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9636 | echo "$ac_t""is installed" 1>&6 | |
9637 | TCLHDIR="" | |
9638 | else | |
9639 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9640 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9641 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9642 | fi | |
9643 | fi | |
9644 | ||
9645 | ||
9646 | ||
9647 | ||
9648 | # | |
9649 | # Ok, lets find the tk source trees so we can use the headers | |
9650 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9651 | # in preference to any others. Same logic is used when choosing library | |
9652 | # and again with Tcl. The search order is the best place to look first, then in | |
9653 | # decreasing significance. The loop breaks if the trigger file is found. | |
9654 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9655 | # directory. This converts the path from a relative to an absolute, so | |
9656 | # recursive cache variables for the path will work right. We check all | |
9657 | # the possible paths in one loop rather than many seperate loops to speed | |
9658 | # things up. | |
9659 | # the alternative search directory is involked by --with-tkinclude | |
9660 | # | |
9661 | no_tk=true | |
9662 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
0e5d83e3 | 9663 | echo "configure:9664: checking for Tk private headers" >&5 |
3fc11d3e JM |
9664 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9665 | if test "${with_tkinclude+set}" = set; then | |
9666 | withval="$with_tkinclude" | |
9667 | with_tkinclude=${withval} | |
9668 | fi | |
9669 | ||
9670 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9672 | else | |
9673 | ||
9674 | # first check to see if --with-tkinclude was specified | |
9675 | if test x"${with_tkinclude}" != x ; then | |
9676 | if test -f ${with_tkinclude}/tk.h ; then | |
9677 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9678 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9679 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9680 | else | |
9681 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9682 | fi | |
9683 | fi | |
9684 | ||
9685 | # next check if it came with Tk configuration file | |
9686 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9687 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9688 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9689 | fi | |
9690 | fi | |
9691 | ||
9692 | # next check in private source directory | |
9693 | # | |
9694 | # since ls returns lowest version numbers first, reverse its output | |
9695 | if test x"${ac_cv_c_tkh}" = x ; then | |
9696 | for i in \ | |
9697 | ${srcdir}/../tk \ | |
9698 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9699 | ${srcdir}/../../tk \ | |
9700 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9701 | ${srcdir}/../../../tk \ | |
9702 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9703 | if test -f $i/generic/tk.h ; then | |
9704 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9705 | break | |
9706 | fi | |
9707 | done | |
9708 | fi | |
9709 | # finally check in a few common install locations | |
9710 | # | |
9711 | # since ls returns lowest version numbers first, reverse its output | |
9712 | if test x"${ac_cv_c_tkh}" = x ; then | |
9713 | for i in \ | |
9714 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9715 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9716 | /usr/local/src/tk \ | |
9717 | /usr/local/lib/tk \ | |
9718 | ${prefix}/include ; do | |
9719 | if test -f $i/generic/tk.h ; then | |
9720 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9721 | break | |
9722 | fi | |
9723 | done | |
9724 | fi | |
9725 | # see if one is installed | |
9726 | if test x"${ac_cv_c_tkh}" = x ; then | |
9727 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9728 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
0e5d83e3 | 9729 | echo "configure:9730: checking for tk.h" >&5 |
3fc11d3e JM |
9730 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9731 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9732 | else | |
9733 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 9734 | #line 9735 "configure" |
3fc11d3e JM |
9735 | #include "confdefs.h" |
9736 | #include <tk.h> | |
9737 | EOF | |
9738 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 9739 | { (eval echo configure:9740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9740 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9741 | if test -z "$ac_err"; then | |
9742 | rm -rf conftest* | |
9743 | eval "ac_cv_header_$ac_safe=yes" | |
9744 | else | |
9745 | echo "$ac_err" >&5 | |
9746 | echo "configure: failed program was:" >&5 | |
9747 | cat conftest.$ac_ext >&5 | |
9748 | rm -rf conftest* | |
9749 | eval "ac_cv_header_$ac_safe=no" | |
9750 | fi | |
9751 | rm -f conftest* | |
9752 | fi | |
9753 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9754 | echo "$ac_t""yes" 1>&6 | |
9755 | ac_cv_c_tkh=installed | |
9756 | else | |
9757 | echo "$ac_t""no" 1>&6 | |
9758 | ac_cv_c_tkh="" | |
9759 | fi | |
9760 | ||
9761 | fi | |
9762 | ||
9763 | fi | |
9764 | ||
9765 | if test x"${ac_cv_c_tkh}" != x ; then | |
9766 | no_tk="" | |
9767 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9768 | echo "$ac_t""is installed" 1>&6 | |
9769 | TKHDIR="" | |
9770 | else | |
9771 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9772 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9773 | TKHDIR="-I${ac_cv_c_tkh}" | |
9774 | fi | |
9775 | else | |
9776 | TKHDIR="# no Tk directory found" | |
9777 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9778 | no_tk=true | |
9779 | fi | |
9780 | ||
9781 | ||
9782 | ||
9783 | ||
9784 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
0e5d83e3 | 9785 | echo "configure:9786: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9786 | if test x"${ac_cv_c_itclh}" = x ; then |
9787 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9788 | if test -f $i/generic/itcl.h ; then | |
9789 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9790 | break | |
9791 | fi | |
9792 | done | |
9793 | fi | |
9794 | if test x"${ac_cv_c_itclh}" = x ; then | |
9795 | ITCLHDIR="# no Itcl private headers found" | |
9796 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9797 | fi | |
9798 | if test x"${ac_cv_c_itclh}" != x ; then | |
9799 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9800 | fi | |
9801 | # should always be here | |
9802 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9803 | ||
9804 | #AC_SUBST(ITCLLIB) | |
9805 | ||
9806 | ||
9807 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
0e5d83e3 | 9808 | echo "configure:9809: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9809 | if test x"${ac_cv_c_itkh}" = x ; then |
9810 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9811 | if test -f $i/generic/itk.h ; then | |
9812 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9813 | break | |
9814 | fi | |
9815 | done | |
9816 | fi | |
9817 | if test x"${ac_cv_c_itkh}" = x ; then | |
9818 | ITKHDIR="# no Itk private headers found" | |
9819 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9820 | fi | |
9821 | if test x"${ac_cv_c_itkh}" != x ; then | |
9822 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9823 | fi | |
9824 | # should always be here | |
9825 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9826 | ||
9827 | #AC_SUBST(ITKLIB) | |
9828 | ||
3fc11d3e | 9829 | |
dd2504ab JM |
9830 | |
9831 | # now look for Tk library stuff | |
9832 | ||
9833 | case "${host}" in | |
9834 | *-*-cygwin*) | |
9835 | tkdir=../tk/win/ | |
9836 | ;; | |
9837 | *) | |
9838 | tkdir=../tk/unix/ | |
9839 | ;; | |
9840 | esac | |
9841 | ||
9842 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9843 | ||
3fc11d3e JM |
9844 | # now look for Itcl library stuff |
9845 | ||
9846 | ||
9847 | # | |
9848 | # Ok, lets find the itcl configuration | |
9849 | # First, look for one uninstalled. | |
9850 | # the alternative search directory is invoked by --with-itclconfig | |
9851 | # | |
9852 | ||
9853 | if test x"${no_itcl}" = x ; then | |
9854 | # we reset no_itcl in case something fails here | |
9855 | no_itcl=true | |
9856 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9857 | if test "${with_itclconfig+set}" = set; then | |
9858 | withval="$with_itclconfig" | |
9859 | with_itclconfig=${withval} | |
9860 | fi | |
9861 | ||
9862 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
0e5d83e3 | 9863 | echo "configure:9864: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9864 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9866 | else | |
9867 | ||
9868 | ||
9869 | # First check to see if --with-itclconfig was specified. | |
9870 | if test x"${with_itclconfig}" != x ; then | |
9871 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9872 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9873 | else | |
9874 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9875 | fi | |
9876 | fi | |
9877 | ||
9878 | # then check for a private Itcl library | |
9879 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9880 | for i in \ | |
9881 | ../itcl/itcl \ | |
9882 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9883 | ../../itcl \ | |
9884 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9885 | ../../../itcl \ | |
9886 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9887 | if test -f "$i/itclConfig.sh" ; then | |
9888 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9889 | break | |
9890 | fi | |
9891 | done | |
9892 | fi | |
9893 | # check in a few common install locations | |
9894 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9895 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9896 | if test -f "$i/itclConfig.sh" ; then | |
9897 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9898 | break | |
9899 | fi | |
9900 | done | |
9901 | fi | |
9902 | # check in a few other private locations | |
9903 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9904 | for i in \ | |
9905 | ${srcdir}/../itcl/itcl \ | |
9906 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9907 | if test -f "$i/itclConfig.sh" ; then | |
9908 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9909 | break | |
9910 | fi | |
9911 | done | |
9912 | fi | |
9913 | ||
9914 | fi | |
9915 | ||
9916 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9917 | ITCLCONFIG="# no Itcl configs found" | |
9918 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9919 | else | |
9920 | no_itcl= | |
9921 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9922 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9923 | fi | |
9924 | fi | |
9925 | ||
9926 | if test -z "${no_itcl}"; then | |
9927 | ||
9928 | if test -f "$ITCLCONFIG" ; then | |
9929 | . $ITCLCONFIG | |
9930 | fi | |
9931 | ||
9932 | ||
9933 | ||
9934 | ||
9935 | ||
9936 | ||
9937 | ||
9938 | ||
9939 | ||
9940 | ||
3fc11d3e JM |
9941 | |
9942 | ||
9943 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9944 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9945 | fi |
9946 | ||
9947 | ||
9948 | # now look for Itk library stuff | |
9949 | ||
9950 | # | |
9951 | # Ok, lets find the itk configuration | |
9952 | # First, look for one uninstalled. | |
9953 | # the alternative search directory is invoked by --with-itkconfig | |
9954 | # | |
9955 | ||
9956 | if test x"${no_itk}" = x ; then | |
9957 | # we reset no_itk in case something fails here | |
9958 | no_itk=true | |
9959 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9960 | if test "${with_itkconfig+set}" = set; then | |
9961 | withval="$with_itkconfig" | |
9962 | with_itkconfig=${withval} | |
9963 | fi | |
9964 | ||
9965 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
0e5d83e3 | 9966 | echo "configure:9967: checking for Itk configuration" >&5 |
3fc11d3e JM |
9967 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9968 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9969 | else | |
9970 | ||
9971 | ||
9972 | # First check to see if --with-itkconfig was specified. | |
9973 | if test x"${with_itkconfig}" != x ; then | |
9974 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9975 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9976 | else | |
9977 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9978 | fi | |
9979 | fi | |
9980 | ||
9981 | # then check for a private Itk library | |
9982 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9983 | for i in \ | |
9984 | ../itcl/itk \ | |
9985 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9986 | ../../itk \ | |
9987 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9988 | ../../../itk \ | |
9989 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9990 | if test -f "$i/itkConfig.sh" ; then | |
9991 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9992 | break | |
9993 | fi | |
9994 | done | |
9995 | fi | |
9996 | # check in a few common install locations | |
9997 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9998 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9999 | if test -f "$i/itkConfig.sh" ; then | |
10000 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10001 | break | |
10002 | fi | |
10003 | done | |
10004 | fi | |
10005 | # check in a few other private locations | |
10006 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10007 | for i in \ | |
10008 | ${srcdir}/../itcl/itk \ | |
10009 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
10010 | if test -f "$i/itkConfig.sh" ; then | |
10011 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10012 | break | |
10013 | fi | |
10014 | done | |
10015 | fi | |
10016 | ||
10017 | fi | |
10018 | ||
10019 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10020 | ITKCONFIG="# no Itk configs found" | |
10021 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
10022 | else | |
10023 | no_itk= | |
10024 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
10025 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
10026 | fi | |
10027 | fi | |
10028 | ||
10029 | ||
10030 | if test -z "${no_itcl}"; then | |
10031 | ||
10032 | if test -f "$ITKCONFIG" ; then | |
10033 | . $ITKCONFIG | |
10034 | fi | |
10035 | ||
10036 | ||
10037 | ||
10038 | ||
10039 | ||
10040 | ||
10041 | ||
10042 | ||
10043 | ||
10044 | ||
10045 | ||
10046 | ||
3fc11d3e | 10047 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 10048 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
10049 | fi |
10050 | ||
4226a5a5 | 10051 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
10052 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
10053 | # know whether 8.2 will or not, but I bet it will. | |
10054 | # I don't have to worry about 7.x since we don't support it. | |
10055 | GDBTK_CFLAGS="" | |
10056 | if test "$GCC" = "yes"; then | |
10057 | if test "$TCL_VERSION" != "8.0" ; then | |
10058 | GDBTK_CFLAGS="-fwritable-strings" | |
10059 | fi | |
10060 | fi | |
10061 | ||
10062 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 10063 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
10064 | # Yes, the ordering seems wrong here. But it isn't. |
10065 | # TK_LIBS is the list of libraries that need to be linked | |
10066 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
10067 | # were in LIBS then any link tests after this point would | |
10068 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
10069 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
10070 | |
10071 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
10072 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
10073 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
10074 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 10075 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 10076 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
10077 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
10078 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
10079 | |
10080 | if test x$gdb_cv_os_cygwin = xyes; then | |
10081 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
10082 | WIN32LDAPP="-Wl,--subsystem,console" | |
10083 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
10084 | fi | |
10085 | fi | |
10086 | fi | |
ffc6a242 | 10087 | |
ffc6a242 | 10088 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
10089 | fi |
10090 | ||
10091 | ||
10092 | ||
10093 | ||
10094 | ||
10095 | ||
10096 | ||
10097 | ||
10098 | ||
10099 | ||
10100 | ||
10101 | ||
10102 | ||
dd2504ab | 10103 | |
c906108c SS |
10104 | # If we find X, set shell vars x_includes and x_libraries to the |
10105 | # paths, otherwise set no_x=yes. | |
10106 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
10107 | # --without-x overrides everything else, but does not touch the cache. | |
10108 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
0e5d83e3 | 10109 | echo "configure:10110: checking for X" >&5 |
c906108c SS |
10110 | |
10111 | # Check whether --with-x or --without-x was given. | |
10112 | if test "${with_x+set}" = set; then | |
10113 | withval="$with_x" | |
10114 | : | |
10115 | fi | |
10116 | ||
10117 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
10118 | if test "x$with_x" = xno; then | |
10119 | # The user explicitly disabled X. | |
10120 | have_x=disabled | |
10121 | else | |
10122 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
10123 | # Both variables are already set. | |
10124 | have_x=yes | |
10125 | else | |
10126 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
10127 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10128 | else | |
10129 | # One or both of the vars are not set, and there is no cached value. | |
10130 | ac_x_includes=NO ac_x_libraries=NO | |
10131 | rm -fr conftestdir | |
10132 | if mkdir conftestdir; then | |
10133 | cd conftestdir | |
10134 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
10135 | cat > Imakefile <<'EOF' | |
10136 | acfindx: | |
10137 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
10138 | EOF | |
10139 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
10140 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
10141 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
10142 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
10143 | for ac_extension in a so sl; do | |
10144 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
10145 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
10146 | ac_im_usrlibdir=$ac_im_libdir; break | |
10147 | fi | |
10148 | done | |
10149 | # Screen out bogus values from the imake configuration. They are | |
10150 | # bogus both because they are the default anyway, and because | |
10151 | # using them would break gcc on systems where it needs fixed includes. | |
10152 | case "$ac_im_incroot" in | |
10153 | /usr/include) ;; | |
10154 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
10155 | esac | |
10156 | case "$ac_im_usrlibdir" in | |
10157 | /usr/lib | /lib) ;; | |
10158 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
10159 | esac | |
10160 | fi | |
10161 | cd .. | |
10162 | rm -fr conftestdir | |
10163 | fi | |
10164 | ||
10165 | if test "$ac_x_includes" = NO; then | |
10166 | # Guess where to find include files, by looking for this one X11 .h file. | |
10167 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
10168 | ||
10169 | # First, try using that file with no special directory specified. | |
10170 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 10171 | #line 10172 "configure" |
c906108c SS |
10172 | #include "confdefs.h" |
10173 | #include <$x_direct_test_include> | |
10174 | EOF | |
10175 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0e5d83e3 | 10176 | { (eval echo configure:10177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
10177 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10178 | if test -z "$ac_err"; then | |
10179 | rm -rf conftest* | |
10180 | # We can compile using X headers with no special include directory. | |
10181 | ac_x_includes= | |
10182 | else | |
10183 | echo "$ac_err" >&5 | |
10184 | echo "configure: failed program was:" >&5 | |
10185 | cat conftest.$ac_ext >&5 | |
10186 | rm -rf conftest* | |
10187 | # Look for the header file in a standard set of common directories. | |
10188 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10189 | for ac_dir in \ | |
10190 | /usr/X11/include \ | |
10191 | /usr/X11R6/include \ | |
10192 | /usr/X11R5/include \ | |
10193 | /usr/X11R4/include \ | |
10194 | \ | |
10195 | /usr/include/X11 \ | |
10196 | /usr/include/X11R6 \ | |
10197 | /usr/include/X11R5 \ | |
10198 | /usr/include/X11R4 \ | |
10199 | \ | |
10200 | /usr/local/X11/include \ | |
10201 | /usr/local/X11R6/include \ | |
10202 | /usr/local/X11R5/include \ | |
10203 | /usr/local/X11R4/include \ | |
10204 | \ | |
10205 | /usr/local/include/X11 \ | |
10206 | /usr/local/include/X11R6 \ | |
10207 | /usr/local/include/X11R5 \ | |
10208 | /usr/local/include/X11R4 \ | |
10209 | \ | |
10210 | /usr/X386/include \ | |
10211 | /usr/x386/include \ | |
10212 | /usr/XFree86/include/X11 \ | |
10213 | \ | |
10214 | /usr/include \ | |
10215 | /usr/local/include \ | |
10216 | /usr/unsupported/include \ | |
10217 | /usr/athena/include \ | |
10218 | /usr/local/x11r5/include \ | |
10219 | /usr/lpp/Xamples/include \ | |
10220 | \ | |
10221 | /usr/openwin/include \ | |
10222 | /usr/openwin/share/include \ | |
10223 | ; \ | |
10224 | do | |
10225 | if test -r "$ac_dir/$x_direct_test_include"; then | |
10226 | ac_x_includes=$ac_dir | |
10227 | break | |
10228 | fi | |
10229 | done | |
10230 | fi | |
10231 | rm -f conftest* | |
10232 | fi # $ac_x_includes = NO | |
10233 | ||
10234 | if test "$ac_x_libraries" = NO; then | |
10235 | # Check for the libraries. | |
10236 | ||
10237 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
10238 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
10239 | ||
10240 | # See if we find them without any special options. | |
10241 | # Don't add to $LIBS permanently. | |
10242 | ac_save_LIBS="$LIBS" | |
10243 | LIBS="-l$x_direct_test_library $LIBS" | |
10244 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 10245 | #line 10246 "configure" |
c906108c SS |
10246 | #include "confdefs.h" |
10247 | ||
10248 | int main() { | |
10249 | ${x_direct_test_function}() | |
10250 | ; return 0; } | |
10251 | EOF | |
0e5d83e3 | 10252 | if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10253 | rm -rf conftest* |
10254 | LIBS="$ac_save_LIBS" | |
10255 | # We can link X programs with no special library path. | |
10256 | ac_x_libraries= | |
10257 | else | |
10258 | echo "configure: failed program was:" >&5 | |
10259 | cat conftest.$ac_ext >&5 | |
10260 | rm -rf conftest* | |
10261 | LIBS="$ac_save_LIBS" | |
10262 | # First see if replacing the include by lib works. | |
10263 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10264 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10265 | /usr/X11/lib \ | |
10266 | /usr/X11R6/lib \ | |
10267 | /usr/X11R5/lib \ | |
10268 | /usr/X11R4/lib \ | |
10269 | \ | |
10270 | /usr/lib/X11 \ | |
10271 | /usr/lib/X11R6 \ | |
10272 | /usr/lib/X11R5 \ | |
10273 | /usr/lib/X11R4 \ | |
10274 | \ | |
10275 | /usr/local/X11/lib \ | |
10276 | /usr/local/X11R6/lib \ | |
10277 | /usr/local/X11R5/lib \ | |
10278 | /usr/local/X11R4/lib \ | |
10279 | \ | |
10280 | /usr/local/lib/X11 \ | |
10281 | /usr/local/lib/X11R6 \ | |
10282 | /usr/local/lib/X11R5 \ | |
10283 | /usr/local/lib/X11R4 \ | |
10284 | \ | |
10285 | /usr/X386/lib \ | |
10286 | /usr/x386/lib \ | |
10287 | /usr/XFree86/lib/X11 \ | |
10288 | \ | |
10289 | /usr/lib \ | |
10290 | /usr/local/lib \ | |
10291 | /usr/unsupported/lib \ | |
10292 | /usr/athena/lib \ | |
10293 | /usr/local/x11r5/lib \ | |
10294 | /usr/lpp/Xamples/lib \ | |
10295 | /lib/usr/lib/X11 \ | |
10296 | \ | |
10297 | /usr/openwin/lib \ | |
10298 | /usr/openwin/share/lib \ | |
10299 | ; \ | |
10300 | do | |
10301 | for ac_extension in a so sl; do | |
10302 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10303 | ac_x_libraries=$ac_dir | |
10304 | break 2 | |
10305 | fi | |
10306 | done | |
10307 | done | |
10308 | fi | |
10309 | rm -f conftest* | |
10310 | fi # $ac_x_libraries = NO | |
10311 | ||
10312 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10313 | # Didn't find X anywhere. Cache the known absence of X. | |
10314 | ac_cv_have_x="have_x=no" | |
10315 | else | |
10316 | # Record where we found X for the cache. | |
10317 | ac_cv_have_x="have_x=yes \ | |
10318 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10319 | fi | |
10320 | fi | |
10321 | fi | |
10322 | eval "$ac_cv_have_x" | |
10323 | fi # $with_x != no | |
10324 | ||
10325 | if test "$have_x" != yes; then | |
10326 | echo "$ac_t""$have_x" 1>&6 | |
10327 | no_x=yes | |
10328 | else | |
10329 | # If each of the values was on the command line, it overrides each guess. | |
10330 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10331 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10332 | # Update the cache value to reflect the command line values. | |
10333 | ac_cv_have_x="have_x=yes \ | |
10334 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10335 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10336 | fi | |
10337 | ||
10338 | ||
7a292a7a SS |
10339 | |
10340 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
10341 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10342 | # This code just checks for a few cases where we'd like to ignore those | |
10343 | # definitions, even when they're present in the '.mt' file. These cases | |
10344 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10345 | # not part of the source tree. |
7a292a7a SS |
10346 | # |
10347 | # Check whether --enable-sim or --disable-sim was given. | |
10348 | if test "${enable_sim+set}" = set; then | |
10349 | enableval="$enable_sim" | |
10350 | echo "enable_sim = $enable_sim"; | |
10351 | echo "enableval = ${enableval}"; | |
10352 | case "${enableval}" in | |
10353 | yes) ignore_sim=false ;; | |
10354 | no) ignore_sim=true ;; | |
10355 | *) ignore_sim=false ;; | |
10356 | esac | |
10357 | else | |
10358 | ignore_sim=false | |
10359 | fi | |
10360 | ||
10361 | ||
10362 | if test ! -d "${srcdir}/../sim"; then | |
10363 | ignore_sim=true | |
10364 | fi | |
10365 | ||
10366 | if test "${ignore_sim}" = "true"; then | |
10367 | IGNORE_SIM="SIM=" | |
10368 | IGNORE_SIM_OBS="SIM_OBS=" | |
10369 | else | |
10370 | IGNORE_SIM="" | |
10371 | IGNORE_SIM_OBS="" | |
10372 | cat >> confdefs.h <<\EOF | |
10373 | #define WITH_SIM 1 | |
10374 | EOF | |
10375 | ||
10376 | fi | |
10377 | ||
10378 | ||
10379 | ||
c906108c SS |
10380 | |
10381 | ||
10382 | ||
10383 | ||
10384 | ||
10385 | ||
dfcd3bfb | 10386 | |
e56ac5c3 AC |
10387 | |
10388 | ||
b3a90332 AC |
10389 | |
10390 | ||
b46cd165 | 10391 | |
d28f9cdf | 10392 | |
c906108c SS |
10393 | # target_subdir is used by the testsuite to find the target libraries. |
10394 | target_subdir= | |
10395 | if test "${host}" != "${target}"; then | |
10396 | target_subdir="${target_alias}/" | |
10397 | fi | |
10398 | ||
10399 | ||
10400 | frags= | |
10401 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10402 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
10403 | # When building a native debuger the .mh file containing things |
10404 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
10405 | # since it no longer contains anything useful. | |
10406 | if test "${target}" = "${host}"; then | |
10407 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10408 | else | |
10409 | host_makefile_frag=/dev/null | |
10410 | fi | |
c906108c SS |
10411 | fi |
10412 | frags="$frags $host_makefile_frag" | |
10413 | ||
10414 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10415 | if test ! -f ${target_makefile_frag}; then | |
10416 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
10417 | fi | |
10418 | frags="$frags $target_makefile_frag" | |
10419 | ||
10420 | ||
10421 | ||
10422 | ||
10423 | ||
10424 | hostfile=`sed -n ' | |
10425 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10426 | ' ${host_makefile_frag}` | |
10427 | ||
10428 | targetfile=`sed -n ' | |
10429 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10430 | ' ${target_makefile_frag}` | |
10431 | ||
c906108c | 10432 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10433 | # We pick this up from the host configuration file (.mh) because we |
10434 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10435 | nativefile=`sed -n ' |
10436 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10437 | ' ${host_makefile_frag}` | |
c906108c SS |
10438 | fi |
10439 | ||
10440 | ||
b00a8037 DJ |
10441 | if test x"${gdb_osabi}" != x ; then |
10442 | cat >> confdefs.h <<EOF | |
10443 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10444 | EOF | |
10445 | ||
10446 | fi | |
10447 | ||
8dcde887 MK |
10448 | # Enable multi-ice-gdb-server. |
10449 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10450 | if test "${enable_multi_ice+set}" = set; then | |
10451 | enableval="$enable_multi_ice" | |
10452 | case $enableval in | |
10453 | yes | no) | |
10454 | ;; | |
10455 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10456 | esac | |
96baa820 JM |
10457 | fi |
10458 | ||
8dcde887 MK |
10459 | if test "x$enable_multi_ice" = xyes; then |
10460 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10461 | fi |
10462 | ||
8dcde887 MK |
10463 | # We only build gdbserver automatically if host and target are the same. |
10464 | if test "x$target" = "x$host"; then | |
10465 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
0e5d83e3 | 10466 | echo "configure:10467: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10467 | if test "x$build_gdbserver" = xyes; then |
10468 | configdirs="$configdirs gdbserver" | |
10469 | echo "$ac_t""yes" 1>&6 | |
10470 | else | |
10471 | echo "$ac_t""no" 1>&6 | |
10472 | fi | |
10473 | fi | |
10474 | ||
10475 | subdirs="doc testsuite $configdirs" | |
10476 | ||
96baa820 | 10477 | |
c906108c | 10478 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10479 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10480 | # version. | |
c906108c SS |
10481 | |
10482 | files= | |
10483 | links= | |
5a2402b8 | 10484 | |
c906108c | 10485 | rm -f xm.h |
5a2402b8 | 10486 | xm_h="" |
c906108c | 10487 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10488 | xm_h=xm.h |
10489 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10490 | files="${files} ${GDB_XM_FILE}" | |
10491 | links="${links} xm.h" | |
10492 | cat >> confdefs.h <<EOF | |
10493 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10494 | EOF | |
10495 | ||
c906108c | 10496 | fi |
5a2402b8 AC |
10497 | |
10498 | ||
c906108c | 10499 | rm -f tm.h |
5a2402b8 | 10500 | tm_h="" |
c906108c | 10501 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10502 | tm_h=tm.h |
10503 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10504 | files="${files} ${GDB_TM_FILE}" | |
10505 | links="${links} tm.h" | |
10506 | cat >> confdefs.h <<EOF | |
10507 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10508 | EOF | |
10509 | ||
c906108c | 10510 | fi |
5a2402b8 AC |
10511 | |
10512 | ||
c906108c | 10513 | rm -f nm.h |
5a2402b8 | 10514 | nm_h="" |
c906108c | 10515 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10516 | nm_h=nm.h |
10517 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10518 | files="${files} ${GDB_NM_FILE}" | |
10519 | links="${links} nm.h" | |
10520 | cat >> confdefs.h <<EOF | |
10521 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10522 | EOF | |
10523 | ||
c906108c | 10524 | fi |
5a2402b8 AC |
10525 | |
10526 | ||
c906108c SS |
10527 | |
10528 | ||
10529 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
0e5d83e3 | 10530 | echo "configure:10531: checking for Cygwin environment" >&5 |
c906108c SS |
10531 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10532 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10533 | else | |
10534 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 10535 | #line 10536 "configure" |
c906108c SS |
10536 | #include "confdefs.h" |
10537 | ||
10538 | int main() { | |
10539 | ||
10540 | #ifndef __CYGWIN__ | |
10541 | #define __CYGWIN__ __CYGWIN32__ | |
10542 | #endif | |
10543 | return __CYGWIN__; | |
10544 | ; return 0; } | |
10545 | EOF | |
0e5d83e3 | 10546 | if { (eval echo configure:10547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10547 | rm -rf conftest* |
10548 | ac_cv_cygwin=yes | |
10549 | else | |
10550 | echo "configure: failed program was:" >&5 | |
10551 | cat conftest.$ac_ext >&5 | |
10552 | rm -rf conftest* | |
10553 | ac_cv_cygwin=no | |
10554 | fi | |
10555 | rm -f conftest* | |
10556 | rm -f conftest* | |
10557 | fi | |
10558 | ||
10559 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10560 | CYGWIN= | |
10561 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10562 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
0e5d83e3 | 10563 | echo "configure:10564: checking for mingw32 environment" >&5 |
c906108c SS |
10564 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10565 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10566 | else | |
10567 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 10568 | #line 10569 "configure" |
c906108c SS |
10569 | #include "confdefs.h" |
10570 | ||
10571 | int main() { | |
10572 | return __MINGW32__; | |
10573 | ; return 0; } | |
10574 | EOF | |
0e5d83e3 | 10575 | if { (eval echo configure:10576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10576 | rm -rf conftest* |
10577 | ac_cv_mingw32=yes | |
10578 | else | |
10579 | echo "configure: failed program was:" >&5 | |
10580 | cat conftest.$ac_ext >&5 | |
10581 | rm -rf conftest* | |
10582 | ac_cv_mingw32=no | |
10583 | fi | |
10584 | rm -f conftest* | |
10585 | rm -f conftest* | |
10586 | fi | |
10587 | ||
10588 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10589 | MINGW32= | |
10590 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10591 | ||
10592 | ||
10593 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
0e5d83e3 | 10594 | echo "configure:10595: checking for executable suffix" >&5 |
c906108c SS |
10595 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10596 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10597 | else | |
10598 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10599 | ac_cv_exeext=.exe | |
10600 | else | |
10601 | rm -f conftest* | |
10602 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10603 | ac_cv_exeext= | |
0e5d83e3 | 10604 | if { (eval echo configure:10605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10605 | for file in conftest.*; do |
10606 | case $file in | |
57b29be7 | 10607 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10608 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10609 | esac | |
10610 | done | |
10611 | else | |
10612 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10613 | fi | |
10614 | rm -f conftest* | |
10615 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10616 | fi | |
10617 | fi | |
10618 | ||
10619 | EXEEXT="" | |
10620 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10621 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10622 | ac_exeext=$EXEEXT | |
10623 | ||
10624 | ||
234b45d4 KB |
10625 | |
10626 | cat >> confdefs.h <<\EOF | |
10627 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10628 | EOF | |
10629 | ||
10630 | ||
10631 | ||
10632 | ||
10633 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10634 | if test "${with_libiconv_prefix+set}" = set; then | |
10635 | withval="$with_libiconv_prefix" | |
10636 | ||
10637 | for dir in `echo "$withval" | tr : ' '`; do | |
10638 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10639 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10640 | done | |
10641 | ||
10642 | fi | |
10643 | ||
10644 | ||
10645 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
0e5d83e3 | 10646 | echo "configure:10647: checking for iconv" >&5 |
234b45d4 KB |
10647 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10648 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10649 | else | |
10650 | ||
10651 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10652 | am_cv_lib_iconv=no | |
10653 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 10654 | #line 10655 "configure" |
234b45d4 KB |
10655 | #include "confdefs.h" |
10656 | #include <stdlib.h> | |
10657 | #include <iconv.h> | |
10658 | int main() { | |
10659 | iconv_t cd = iconv_open("",""); | |
10660 | iconv(cd,NULL,NULL,NULL,NULL); | |
10661 | iconv_close(cd); | |
10662 | ; return 0; } | |
10663 | EOF | |
0e5d83e3 | 10664 | if { (eval echo configure:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10665 | rm -rf conftest* |
10666 | am_cv_func_iconv=yes | |
10667 | else | |
10668 | echo "configure: failed program was:" >&5 | |
10669 | cat conftest.$ac_ext >&5 | |
10670 | fi | |
10671 | rm -f conftest* | |
10672 | if test "$am_cv_func_iconv" != yes; then | |
10673 | am_save_LIBS="$LIBS" | |
10674 | LIBS="$LIBS -liconv" | |
10675 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 10676 | #line 10677 "configure" |
234b45d4 KB |
10677 | #include "confdefs.h" |
10678 | #include <stdlib.h> | |
10679 | #include <iconv.h> | |
10680 | int main() { | |
10681 | iconv_t cd = iconv_open("",""); | |
10682 | iconv(cd,NULL,NULL,NULL,NULL); | |
10683 | iconv_close(cd); | |
10684 | ; return 0; } | |
10685 | EOF | |
0e5d83e3 | 10686 | if { (eval echo configure:10687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10687 | rm -rf conftest* |
10688 | am_cv_lib_iconv=yes | |
10689 | am_cv_func_iconv=yes | |
10690 | else | |
10691 | echo "configure: failed program was:" >&5 | |
10692 | cat conftest.$ac_ext >&5 | |
10693 | fi | |
10694 | rm -f conftest* | |
10695 | LIBS="$am_save_LIBS" | |
10696 | fi | |
10697 | ||
10698 | fi | |
10699 | ||
10700 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10701 | if test "$am_cv_func_iconv" = yes; then | |
10702 | cat >> confdefs.h <<\EOF | |
10703 | #define HAVE_ICONV 1 | |
10704 | EOF | |
10705 | ||
10706 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
0e5d83e3 | 10707 | echo "configure:10708: checking for iconv declaration" >&5 |
234b45d4 KB |
10708 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10709 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10710 | else | |
10711 | ||
10712 | cat > conftest.$ac_ext <<EOF | |
0e5d83e3 | 10713 | #line 10714 "configure" |
234b45d4 KB |
10714 | #include "confdefs.h" |
10715 | ||
10716 | #include <stdlib.h> | |
10717 | #include <iconv.h> | |
10718 | extern | |
10719 | #ifdef __cplusplus | |
10720 | "C" | |
10721 | #endif | |
10722 | #if defined(__STDC__) || defined(__cplusplus) | |
10723 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10724 | #else | |
10725 | size_t iconv(); | |
10726 | #endif | |
10727 | ||
10728 | int main() { | |
10729 | ||
10730 | ; return 0; } | |
10731 | EOF | |
0e5d83e3 | 10732 | if { (eval echo configure:10733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10733 | rm -rf conftest* |
10734 | am_cv_proto_iconv_arg1="" | |
10735 | else | |
10736 | echo "configure: failed program was:" >&5 | |
10737 | cat conftest.$ac_ext >&5 | |
10738 | rm -rf conftest* | |
10739 | am_cv_proto_iconv_arg1="const" | |
10740 | fi | |
10741 | rm -f conftest* | |
10742 | 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);" | |
10743 | fi | |
10744 | ||
10745 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10746 | echo "$ac_t""${ac_t:- | |
10747 | }$am_cv_proto_iconv" 1>&6 | |
10748 | cat >> confdefs.h <<EOF | |
10749 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10750 | EOF | |
10751 | ||
10752 | fi | |
10753 | LIBICONV= | |
10754 | if test "$am_cv_lib_iconv" = yes; then | |
10755 | LIBICONV="-liconv" | |
10756 | fi | |
10757 | ||
10758 | ||
10759 | ||
c906108c SS |
10760 | trap '' 1 2 15 |
10761 | cat > confcache <<\EOF | |
10762 | # This file is a shell script that caches the results of configure | |
10763 | # tests run on this system so they can be shared between configure | |
10764 | # scripts and configure runs. It is not useful on other systems. | |
10765 | # If it contains results you don't want to keep, you may remove or edit it. | |
10766 | # | |
10767 | # By default, configure uses ./config.cache as the cache file, | |
10768 | # creating it if it does not exist already. You can give configure | |
10769 | # the --cache-file=FILE option to use a different cache file; that is | |
10770 | # what configure does when it calls configure scripts in | |
10771 | # subdirectories, so they share the cache. | |
10772 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10773 | # config.status only pays attention to the cache file if you give it the | |
10774 | # --recheck option to rerun configure. | |
10775 | # | |
10776 | EOF | |
10777 | # The following way of writing the cache mishandles newlines in values, | |
10778 | # but we know of no workaround that is simple, portable, and efficient. | |
10779 | # So, don't put newlines in cache variables' values. | |
10780 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10781 | # and sets the high bit in the cache file unless we assign to the vars. | |
10782 | (set) 2>&1 | | |
10783 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10784 | *ac_space=\ *) | |
10785 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10786 | # turns \\\\ into \\, and sed turns \\ into \). | |
10787 | sed -n \ | |
10788 | -e "s/'/'\\\\''/g" \ | |
10789 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10790 | ;; | |
10791 | *) | |
10792 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10793 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10794 | ;; | |
10795 | esac >> confcache | |
10796 | if cmp -s $cache_file confcache; then | |
10797 | : | |
10798 | else | |
10799 | if test -w $cache_file; then | |
10800 | echo "updating cache $cache_file" | |
10801 | cat confcache > $cache_file | |
10802 | else | |
10803 | echo "not updating unwritable cache $cache_file" | |
10804 | fi | |
10805 | fi | |
10806 | rm -f confcache | |
10807 | ||
10808 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10809 | ||
10810 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10811 | # Let make expand exec_prefix. | |
10812 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10813 | ||
10814 | # Any assignment to VPATH causes Sun make to only execute | |
10815 | # the first set of double-colon rules, so remove it if not needed. | |
10816 | # If there is a colon in the path, we need to keep it. | |
10817 | if test "x$srcdir" = x.; then | |
10818 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10819 | fi | |
10820 | ||
10821 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10822 | ||
10823 | DEFS=-DHAVE_CONFIG_H | |
10824 | ||
10825 | # Without the "./", some shells look in PATH for config.status. | |
10826 | : ${CONFIG_STATUS=./config.status} | |
10827 | ||
10828 | echo creating $CONFIG_STATUS | |
10829 | rm -f $CONFIG_STATUS | |
10830 | cat > $CONFIG_STATUS <<EOF | |
10831 | #! /bin/sh | |
10832 | # Generated automatically by configure. | |
10833 | # Run this file to recreate the current configuration. | |
10834 | # This directory was configured as follows, | |
10835 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10836 | # | |
10837 | # $0 $ac_configure_args | |
10838 | # | |
10839 | # Compiler output produced by configure, useful for debugging | |
10840 | # configure, is in ./config.log if it exists. | |
10841 | ||
10842 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10843 | for ac_option | |
10844 | do | |
10845 | case "\$ac_option" in | |
10846 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10847 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10848 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10849 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10850 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10851 | exit 0 ;; | |
10852 | -help | --help | --hel | --he | --h) | |
10853 | echo "\$ac_cs_usage"; exit 0 ;; | |
10854 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10855 | esac | |
10856 | done | |
10857 | ||
10858 | ac_given_srcdir=$srcdir | |
10859 | ac_given_INSTALL="$INSTALL" | |
10860 | ||
ed952ac5 | 10861 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10862 | EOF |
10863 | cat >> $CONFIG_STATUS <<EOF | |
10864 | ||
10865 | # Protect against being on the right side of a sed subst in config.status. | |
10866 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10867 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10868 | $ac_vpsub | |
10869 | $extrasub | |
10870 | s%@SHELL@%$SHELL%g | |
10871 | s%@CFLAGS@%$CFLAGS%g | |
10872 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10873 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10874 | s%@FFLAGS@%$FFLAGS%g | |
10875 | s%@DEFS@%$DEFS%g | |
10876 | s%@LDFLAGS@%$LDFLAGS%g | |
10877 | s%@LIBS@%$LIBS%g | |
10878 | s%@exec_prefix@%$exec_prefix%g | |
10879 | s%@prefix@%$prefix%g | |
10880 | s%@program_transform_name@%$program_transform_name%g | |
10881 | s%@bindir@%$bindir%g | |
10882 | s%@sbindir@%$sbindir%g | |
10883 | s%@libexecdir@%$libexecdir%g | |
10884 | s%@datadir@%$datadir%g | |
10885 | s%@sysconfdir@%$sysconfdir%g | |
10886 | s%@sharedstatedir@%$sharedstatedir%g | |
10887 | s%@localstatedir@%$localstatedir%g | |
10888 | s%@libdir@%$libdir%g | |
10889 | s%@includedir@%$includedir%g | |
10890 | s%@oldincludedir@%$oldincludedir%g | |
10891 | s%@infodir@%$infodir%g | |
10892 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10893 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10894 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10895 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10896 | s%@CC@%$CC%g |
10897 | s%@CPP@%$CPP%g | |
10898 | s%@host@%$host%g | |
10899 | s%@host_alias@%$host_alias%g | |
10900 | s%@host_cpu@%$host_cpu%g | |
10901 | s%@host_vendor@%$host_vendor%g | |
10902 | s%@host_os@%$host_os%g | |
10903 | s%@target@%$target%g | |
10904 | s%@target_alias@%$target_alias%g | |
10905 | s%@target_cpu@%$target_cpu%g | |
10906 | s%@target_vendor@%$target_vendor%g | |
10907 | s%@target_os@%$target_os%g | |
10908 | s%@build@%$build%g | |
10909 | s%@build_alias@%$build_alias%g | |
10910 | s%@build_cpu@%$build_cpu%g | |
10911 | s%@build_vendor@%$build_vendor%g | |
10912 | s%@build_os@%$build_os%g | |
c906108c | 10913 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10914 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10915 | s%@ALLOCA@%$ALLOCA%g |
10916 | s%@USE_NLS@%$USE_NLS%g | |
10917 | s%@MSGFMT@%$MSGFMT%g | |
10918 | s%@GMSGFMT@%$GMSGFMT%g | |
10919 | s%@XGETTEXT@%$XGETTEXT%g | |
10920 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10921 | s%@CATALOGS@%$CATALOGS%g | |
10922 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10923 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10924 | s%@GMOFILES@%$GMOFILES%g | |
10925 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10926 | s%@INTLDEPS@%$INTLDEPS%g | |
10927 | s%@INTLLIBS@%$INTLLIBS%g | |
10928 | s%@INTLOBJS@%$INTLOBJS%g | |
10929 | s%@POFILES@%$POFILES%g | |
10930 | s%@POSUB@%$POSUB%g | |
10931 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10932 | s%@GT_NO@%$GT_NO%g | |
10933 | s%@GT_YES@%$GT_YES%g | |
10934 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10935 | s%@l@%$l%g | |
8dcde887 | 10936 | s%@subdirs@%$subdirs%g |
7a292a7a | 10937 | s%@AWK@%$AWK%g |
c906108c SS |
10938 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10939 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10940 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10941 | s%@LN_S@%$LN_S%g |
10942 | s%@YACC@%$YACC%g | |
c906108c | 10943 | s%@AR@%$AR%g |
95ca63c4 CF |
10944 | s%@DLLTOOL@%$DLLTOOL%g |
10945 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10946 | s%@MIG@%$MIG%g |
c906108c | 10947 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
10948 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
10949 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 10950 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10951 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10952 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10953 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10954 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10955 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10956 | s%@LIBGUI@%$LIBGUI%g |
10957 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10958 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10959 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10960 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10961 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10962 | s%@TCL_CC@%$TCL_CC%g | |
10963 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10964 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10965 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10966 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10967 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10968 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10969 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10970 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 10971 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
10972 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
10973 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10974 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10975 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10976 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10977 | s%@TK_VERSION@%$TK_VERSION%g | |
10978 | s%@TK_DEFS@%$TK_DEFS%g | |
10979 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10980 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10981 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10982 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10983 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10984 | s%@TCLHDIR@%$TCLHDIR%g | |
10985 | s%@TKHDIR@%$TKHDIR%g | |
10986 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10987 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10988 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10989 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10990 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10991 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10992 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10993 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10994 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10995 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10996 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10997 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10998 | s%@X_CFLAGS@%$X_CFLAGS%g |
10999 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
11000 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
11001 | s%@TCL_DEPS@%$TCL_DEPS%g |
11002 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
11003 | s%@ITCLLIB@%$ITCLLIB%g |
11004 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
11005 | s%@ITKLIB@%$ITKLIB%g | |
11006 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
11007 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
11008 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 11009 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
11010 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
11011 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 11012 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 11013 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c | 11014 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
66b965bb | 11015 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
11016 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
11017 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 11018 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
11019 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
11020 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
11021 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
11022 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
11023 | s%@target_subdir@%$target_subdir%g |
11024 | /@host_makefile_frag@/r $host_makefile_frag | |
11025 | s%@host_makefile_frag@%%g | |
11026 | /@target_makefile_frag@/r $target_makefile_frag | |
11027 | s%@target_makefile_frag@%%g | |
11028 | s%@frags@%$frags%g | |
5a2402b8 AC |
11029 | s%@xm_h@%$xm_h%g |
11030 | s%@tm_h@%$tm_h%g | |
11031 | s%@nm_h@%$nm_h%g | |
c906108c | 11032 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 11033 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
11034 | |
11035 | CEOF | |
11036 | EOF | |
11037 | ||
11038 | cat >> $CONFIG_STATUS <<\EOF | |
11039 | ||
11040 | # Split the substitutions into bite-sized pieces for seds with | |
11041 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 11042 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
11043 | ac_file=1 # Number of current file. |
11044 | ac_beg=1 # First line for current file. | |
11045 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
11046 | ac_more_lines=: | |
11047 | ac_sed_cmds="" | |
11048 | while $ac_more_lines; do | |
11049 | if test $ac_beg -gt 1; then | |
11050 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
11051 | else | |
11052 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
11053 | fi | |
11054 | if test ! -s conftest.s$ac_file; then | |
11055 | ac_more_lines=false | |
11056 | rm -f conftest.s$ac_file | |
11057 | else | |
11058 | if test -z "$ac_sed_cmds"; then | |
11059 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
11060 | else | |
11061 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
11062 | fi | |
11063 | ac_file=`expr $ac_file + 1` | |
11064 | ac_beg=$ac_end | |
11065 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
11066 | fi | |
11067 | done | |
11068 | if test -z "$ac_sed_cmds"; then | |
11069 | ac_sed_cmds=cat | |
11070 | fi | |
11071 | EOF | |
11072 | ||
11073 | cat >> $CONFIG_STATUS <<EOF | |
11074 | ||
ed952ac5 | 11075 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
11076 | EOF |
11077 | cat >> $CONFIG_STATUS <<\EOF | |
11078 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
11079 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11080 | case "$ac_file" in | |
11081 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11082 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11083 | *) ac_file_in="${ac_file}.in" ;; | |
11084 | esac | |
11085 | ||
11086 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
11087 | ||
11088 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11089 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11090 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11091 | # The file is in a subdirectory. | |
11092 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11093 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
11094 | # A "../" for each directory in $ac_dir_suffix. | |
11095 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
11096 | else | |
11097 | ac_dir_suffix= ac_dots= | |
11098 | fi | |
11099 | ||
11100 | case "$ac_given_srcdir" in | |
11101 | .) srcdir=. | |
11102 | if test -z "$ac_dots"; then top_srcdir=. | |
11103 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
11104 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
11105 | *) # Relative path. | |
11106 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
11107 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
11108 | esac | |
11109 | ||
11110 | case "$ac_given_INSTALL" in | |
11111 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11112 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11113 | esac | |
11114 | ||
11115 | echo creating "$ac_file" | |
11116 | rm -f "$ac_file" | |
11117 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
11118 | case "$ac_file" in | |
11119 | *Makefile*) ac_comsub="1i\\ | |
11120 | # $configure_input" ;; | |
11121 | *) ac_comsub= ;; | |
11122 | esac | |
11123 | ||
11124 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11125 | sed -e "$ac_comsub | |
11126 | s%@configure_input@%$configure_input%g | |
11127 | s%@srcdir@%$srcdir%g | |
11128 | s%@top_srcdir@%$top_srcdir%g | |
11129 | s%@INSTALL@%$INSTALL%g | |
11130 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
11131 | fi; done | |
11132 | rm -f conftest.s* | |
11133 | ||
11134 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
11135 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
11136 | # | |
11137 | # ac_d sets the value in "#define NAME VALUE" lines. | |
11138 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
11139 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
11140 | ac_dC='\3' | |
11141 | ac_dD='%g' | |
11142 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
11143 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11144 | ac_uB='\([ ]\)%\1#\2define\3' | |
11145 | ac_uC=' ' | |
11146 | ac_uD='\4%g' | |
11147 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
11148 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11149 | ac_eB='$%\1#\2define\3' | |
11150 | ac_eC=' ' | |
11151 | ac_eD='%g' | |
11152 | ||
11153 | if test "${CONFIG_HEADERS+set}" != set; then | |
11154 | EOF | |
11155 | cat >> $CONFIG_STATUS <<EOF | |
11156 | CONFIG_HEADERS="config.h:config.in" | |
11157 | EOF | |
11158 | cat >> $CONFIG_STATUS <<\EOF | |
11159 | fi | |
11160 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
11161 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11162 | case "$ac_file" in | |
11163 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11164 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11165 | *) ac_file_in="${ac_file}.in" ;; | |
11166 | esac | |
11167 | ||
11168 | echo creating $ac_file | |
11169 | ||
11170 | rm -f conftest.frag conftest.in conftest.out | |
11171 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11172 | cat $ac_file_inputs > conftest.in | |
11173 | ||
11174 | EOF | |
11175 | ||
11176 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
11177 | # the proper values into config.h.in to produce config.h. And first: | |
11178 | # Protect against being on the right side of a sed subst in config.status. | |
11179 | # Protect against being in an unquoted here document in config.status. | |
11180 | rm -f conftest.vals | |
11181 | cat > conftest.hdr <<\EOF | |
11182 | s/[\\&%]/\\&/g | |
11183 | s%[\\$`]%\\&%g | |
11184 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
11185 | s%ac_d%ac_u%gp | |
11186 | s%ac_u%ac_e%gp | |
11187 | EOF | |
11188 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
11189 | rm -f conftest.hdr | |
11190 | ||
11191 | # This sed command replaces #undef with comments. This is necessary, for | |
11192 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
11193 | # on some systems where configure will not decide to define it. | |
11194 | cat >> conftest.vals <<\EOF | |
11195 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
11196 | EOF | |
11197 | ||
11198 | # Break up conftest.vals because some shells have a limit on | |
11199 | # the size of here documents, and old seds have small limits too. | |
11200 | ||
11201 | rm -f conftest.tail | |
11202 | while : | |
11203 | do | |
11204 | ac_lines=`grep -c . conftest.vals` | |
11205 | # grep -c gives empty output for an empty file on some AIX systems. | |
11206 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
11207 | # Write a limited-size here document to conftest.frag. | |
11208 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
11209 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
11210 | echo 'CEOF | |
11211 | sed -f conftest.frag conftest.in > conftest.out | |
11212 | rm -f conftest.in | |
11213 | mv conftest.out conftest.in | |
11214 | ' >> $CONFIG_STATUS | |
11215 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
11216 | rm -f conftest.vals | |
11217 | mv conftest.tail conftest.vals | |
11218 | done | |
11219 | rm -f conftest.vals | |
11220 | ||
11221 | cat >> $CONFIG_STATUS <<\EOF | |
11222 | rm -f conftest.frag conftest.h | |
11223 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11224 | cat conftest.in >> conftest.h | |
11225 | rm -f conftest.in | |
11226 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11227 | echo "$ac_file is unchanged" | |
11228 | rm -f conftest.h | |
11229 | else | |
11230 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11231 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11232 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11233 | # The file is in a subdirectory. | |
11234 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11235 | fi | |
11236 | rm -f $ac_file | |
11237 | mv conftest.h $ac_file | |
11238 | fi | |
11239 | fi; done | |
11240 | ||
11241 | EOF | |
11242 | ||
11243 | cat >> $CONFIG_STATUS <<EOF | |
11244 | ac_sources="$files" | |
11245 | ac_dests="$links" | |
11246 | EOF | |
11247 | ||
11248 | cat >> $CONFIG_STATUS <<\EOF | |
11249 | srcdir=$ac_given_srcdir | |
11250 | while test -n "$ac_sources"; do | |
11251 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11252 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11253 | ||
11254 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11255 | ||
11256 | if test ! -r $srcdir/$ac_source; then | |
11257 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11258 | fi | |
11259 | rm -f $ac_dest | |
11260 | ||
11261 | # Make relative symlinks. | |
11262 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11263 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11264 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11265 | # The dest file is in a subdirectory. | |
11266 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11267 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11268 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11269 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11270 | else | |
11271 | ac_dest_dir_suffix= ac_dots= | |
11272 | fi | |
11273 | ||
11274 | case "$srcdir" in | |
11275 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11276 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11277 | esac | |
11278 | ||
11279 | # Make a symlink if possible; otherwise try a hard link. | |
11280 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11281 | ln $srcdir/$ac_source $ac_dest; then : | |
11282 | else | |
11283 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11284 | fi | |
11285 | done | |
11286 | EOF | |
11287 | cat >> $CONFIG_STATUS <<EOF | |
11288 | ||
11289 | gdb_host_cpu=$gdb_host_cpu | |
11290 | gdb_target_cpu=$gdb_target_cpu | |
11291 | nativefile=$nativefile | |
11292 | ||
11293 | EOF | |
11294 | cat >> $CONFIG_STATUS <<\EOF | |
11295 | ||
7ee6d7eb | 11296 | if test "${nativefile}" = ""; then |
c4620205 | 11297 | < Makefile \ |
e27da16d JT |
11298 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
11299 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
11300 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
11301 | > Makefile.tem | |
c906108c SS |
11302 | mv -f Makefile.tem Makefile |
11303 | fi | |
11304 | ||
11305 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
11306 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
11307 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11308 | mv -f Makefile.tmp Makefile | |
11309 | ||
2acceee2 | 11310 | |
c906108c SS |
11311 | case x$CONFIG_HEADERS in |
11312 | xconfig.h:config.in) | |
11313 | echo > stamp-h ;; | |
11314 | esac | |
11315 | ||
11316 | exit 0 | |
11317 | EOF | |
11318 | chmod +x $CONFIG_STATUS | |
11319 | rm -fr confdefs* $ac_clean_files | |
11320 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11321 | ||
11322 | if test "$no_recursion" != yes; then | |
11323 | ||
11324 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11325 | ac_sub_configure_args= | |
11326 | ac_prev= | |
11327 | for ac_arg in $ac_configure_args; do | |
11328 | if test -n "$ac_prev"; then | |
11329 | ac_prev= | |
11330 | continue | |
11331 | fi | |
11332 | case "$ac_arg" in | |
11333 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11334 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11335 | ac_prev=cache_file ;; | |
11336 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11337 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11338 | ;; | |
11339 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11340 | ac_prev=srcdir ;; | |
11341 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11342 | ;; | |
11343 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11344 | esac | |
11345 | done | |
11346 | ||
8dcde887 | 11347 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11348 | |
11349 | # Do not complain, so a configure script can configure whichever | |
11350 | # parts of a large source tree are present. | |
11351 | if test ! -d $srcdir/$ac_config_dir; then | |
11352 | continue | |
11353 | fi | |
11354 | ||
11355 | echo configuring in $ac_config_dir | |
11356 | ||
11357 | case "$srcdir" in | |
11358 | .) ;; | |
11359 | *) | |
11360 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11361 | else | |
11362 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11363 | fi | |
11364 | ;; | |
11365 | esac | |
11366 | ||
11367 | ac_popdir=`pwd` | |
11368 | cd $ac_config_dir | |
11369 | ||
11370 | # A "../" for each directory in /$ac_config_dir. | |
11371 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11372 | ||
11373 | case "$srcdir" in | |
11374 | .) # No --srcdir option. We are building in place. | |
11375 | ac_sub_srcdir=$srcdir ;; | |
11376 | /*) # Absolute path. | |
11377 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11378 | *) # Relative path. | |
11379 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11380 | esac | |
11381 | ||
11382 | # Check for guested configure; otherwise get Cygnus style configure. | |
11383 | if test -f $ac_sub_srcdir/configure; then | |
11384 | ac_sub_configure=$ac_sub_srcdir/configure | |
11385 | elif test -f $ac_sub_srcdir/configure.in; then | |
11386 | ac_sub_configure=$ac_configure | |
11387 | else | |
11388 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11389 | ac_sub_configure= | |
11390 | fi | |
11391 | ||
11392 | # The recursion is here. | |
11393 | if test -n "$ac_sub_configure"; then | |
11394 | ||
11395 | # Make the cache file name correct relative to the subdirectory. | |
11396 | case "$cache_file" in | |
11397 | /*) ac_sub_cache_file=$cache_file ;; | |
11398 | *) # Relative path. | |
11399 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11400 | esac | |
11401 | case "$ac_given_INSTALL" in | |
11402 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11403 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11404 | esac | |
11405 | ||
11406 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11407 | # The eval makes quoting arguments work. | |
11408 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11409 | then : | |
11410 | else | |
11411 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11412 | fi | |
11413 | fi | |
11414 | ||
11415 | cd $ac_popdir | |
11416 | done | |
11417 | fi | |
11418 | ||
11419 | ||
11420 | exit 0 |