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 ;; | |
40a7debc | 4114 | go32* | *djgpp*) |
06825bd1 MK |
4115 | ac_cv_search_tgetent="none required" |
4116 | ;; | |
4117 | aix*) | |
4118 | # Readline prefers curses over termcap on AIX. | |
4119 | # ??? Why? | |
4120 | ||
4121 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
40a7debc | 4122 | echo "configure:4123: checking for library containing tgetent" >&5 |
06825bd1 MK |
4123 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4124 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4125 | else | |
4126 | ac_func_search_save_LIBS="$LIBS" | |
4127 | ac_cv_search_tgetent="no" | |
4128 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4129 | #line 4130 "configure" |
06825bd1 MK |
4130 | #include "confdefs.h" |
4131 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4132 | /* We use char because int might match the return type of a gcc2 | |
4133 | builtin and then its argument prototype would still apply. */ | |
4134 | char tgetent(); | |
4135 | ||
4136 | int main() { | |
4137 | tgetent() | |
4138 | ; return 0; } | |
4139 | EOF | |
40a7debc | 4140 | if { (eval echo configure:4141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4141 | rm -rf conftest* |
4142 | ac_cv_search_tgetent="none required" | |
4143 | else | |
4144 | echo "configure: failed program was:" >&5 | |
4145 | cat conftest.$ac_ext >&5 | |
4146 | fi | |
4147 | rm -f conftest* | |
4148 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
4149 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4150 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4151 | #line 4152 "configure" |
06825bd1 MK |
4152 | #include "confdefs.h" |
4153 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4154 | /* We use char because int might match the return type of a gcc2 | |
4155 | builtin and then its argument prototype would still apply. */ | |
4156 | char tgetent(); | |
4157 | ||
4158 | int main() { | |
4159 | tgetent() | |
4160 | ; return 0; } | |
4161 | EOF | |
40a7debc | 4162 | if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4163 | rm -rf conftest* |
4164 | ac_cv_search_tgetent="-l$i" | |
4165 | break | |
4166 | else | |
4167 | echo "configure: failed program was:" >&5 | |
4168 | cat conftest.$ac_ext >&5 | |
4169 | fi | |
4170 | rm -f conftest* | |
4171 | done | |
4172 | LIBS="$ac_func_search_save_LIBS" | |
4173 | fi | |
4174 | ||
4175 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4176 | if test "$ac_cv_search_tgetent" != "no"; then | |
4177 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4178 | ||
4179 | else : | |
4180 | ||
4181 | fi | |
4182 | ;; | |
4183 | esac | |
4184 | ||
4185 | # Note: We used to check for libtermlib and libterminfo too, but | |
4186 | # Readline doesn't, so I think we're safe with leaving them out. | |
4187 | ||
4188 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
40a7debc | 4189 | echo "configure:4190: checking for library containing tgetent" >&5 |
06825bd1 MK |
4190 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4191 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4192 | else | |
4193 | ac_func_search_save_LIBS="$LIBS" | |
4194 | ac_cv_search_tgetent="no" | |
4195 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4196 | #line 4197 "configure" |
06825bd1 MK |
4197 | #include "confdefs.h" |
4198 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4199 | /* We use char because int might match the return type of a gcc2 | |
4200 | builtin and then its argument prototype would still apply. */ | |
4201 | char tgetent(); | |
4202 | ||
4203 | int main() { | |
4204 | tgetent() | |
4205 | ; return 0; } | |
4206 | EOF | |
40a7debc | 4207 | if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4208 | rm -rf conftest* |
4209 | ac_cv_search_tgetent="none required" | |
4210 | else | |
4211 | echo "configure: failed program was:" >&5 | |
4212 | cat conftest.$ac_ext >&5 | |
4213 | fi | |
4214 | rm -f conftest* | |
4215 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
4216 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4217 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4218 | #line 4219 "configure" |
06825bd1 MK |
4219 | #include "confdefs.h" |
4220 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4221 | /* We use char because int might match the return type of a gcc2 | |
4222 | builtin and then its argument prototype would still apply. */ | |
4223 | char tgetent(); | |
4224 | ||
4225 | int main() { | |
4226 | tgetent() | |
4227 | ; return 0; } | |
4228 | EOF | |
40a7debc | 4229 | if { (eval echo configure:4230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4230 | rm -rf conftest* |
4231 | ac_cv_search_tgetent="-l$i" | |
4232 | break | |
4233 | else | |
4234 | echo "configure: failed program was:" >&5 | |
4235 | cat conftest.$ac_ext >&5 | |
4236 | fi | |
4237 | rm -f conftest* | |
4238 | done | |
4239 | LIBS="$ac_func_search_save_LIBS" | |
4240 | fi | |
4241 | ||
4242 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4243 | if test "$ac_cv_search_tgetent" != "no"; then | |
4244 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4245 | ||
4246 | else : | |
4247 | ||
4248 | fi | |
4249 | ||
4250 | if test "$ac_cv_search_tgetent" = no; then | |
4251 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
4252 | fi | |
4253 | ||
5ee754fc MK |
4254 | # ------------------------- # |
4255 | # Checks for header files. # | |
4256 | # ------------------------- # | |
4257 | ||
4258 | ac_header_dirent=no | |
4259 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4260 | do | |
4261 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4262 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
40a7debc | 4263 | echo "configure:4264: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 4264 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
4265 | echo $ac_n "(cached) $ac_c" 1>&6 |
4266 | else | |
4267 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4268 | #line 4269 "configure" |
c906108c SS |
4269 | #include "confdefs.h" |
4270 | #include <sys/types.h> | |
5ee754fc MK |
4271 | #include <$ac_hdr> |
4272 | int main() { | |
4273 | DIR *dirp = 0; | |
4274 | ; return 0; } | |
4275 | EOF | |
40a7debc | 4276 | if { (eval echo configure:4277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4277 | rm -rf conftest* |
4278 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4279 | else | |
4280 | echo "configure: failed program was:" >&5 | |
4281 | cat conftest.$ac_ext >&5 | |
4282 | rm -rf conftest* | |
4283 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4284 | fi | |
4285 | rm -f conftest* | |
4286 | fi | |
4287 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4288 | echo "$ac_t""yes" 1>&6 | |
4289 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4290 | cat >> confdefs.h <<EOF | |
4291 | #define $ac_tr_hdr 1 | |
4292 | EOF | |
4293 | ac_header_dirent=$ac_hdr; break | |
4294 | else | |
4295 | echo "$ac_t""no" 1>&6 | |
4296 | fi | |
4297 | done | |
4298 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4299 | if test $ac_header_dirent = dirent.h; then | |
4300 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
40a7debc | 4301 | echo "configure:4302: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4302 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4303 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4304 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4305 | else | |
4306 | ac_save_LIBS="$LIBS" | |
4307 | LIBS="-ldir $LIBS" | |
4308 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4309 | #line 4310 "configure" |
5ee754fc MK |
4310 | #include "confdefs.h" |
4311 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4312 | /* We use char because int might match the return type of a gcc2 | |
4313 | builtin and then its argument prototype would still apply. */ | |
4314 | char opendir(); | |
c906108c SS |
4315 | |
4316 | int main() { | |
5ee754fc | 4317 | opendir() |
c906108c SS |
4318 | ; return 0; } |
4319 | EOF | |
40a7debc | 4320 | if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4321 | rm -rf conftest* |
5ee754fc | 4322 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4323 | else |
4324 | echo "configure: failed program was:" >&5 | |
4325 | cat conftest.$ac_ext >&5 | |
4326 | rm -rf conftest* | |
5ee754fc | 4327 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4328 | fi |
4329 | rm -f conftest* | |
5ee754fc MK |
4330 | LIBS="$ac_save_LIBS" |
4331 | ||
4332 | fi | |
4333 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4334 | echo "$ac_t""yes" 1>&6 | |
4335 | LIBS="$LIBS -ldir" | |
4336 | else | |
4337 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4338 | fi |
4339 | ||
5ee754fc MK |
4340 | else |
4341 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
40a7debc | 4342 | echo "configure:4343: checking for opendir in -lx" >&5 |
5ee754fc MK |
4343 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4344 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4345 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4346 | else | |
4347 | ac_save_LIBS="$LIBS" | |
4348 | LIBS="-lx $LIBS" | |
4349 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4350 | #line 4351 "configure" |
5ee754fc MK |
4351 | #include "confdefs.h" |
4352 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4353 | /* We use char because int might match the return type of a gcc2 | |
4354 | builtin and then its argument prototype would still apply. */ | |
4355 | char opendir(); | |
4356 | ||
4357 | int main() { | |
4358 | opendir() | |
4359 | ; return 0; } | |
c906108c | 4360 | EOF |
40a7debc | 4361 | if { (eval echo configure:4362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4362 | rm -rf conftest* |
4363 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4364 | else | |
4365 | echo "configure: failed program was:" >&5 | |
4366 | cat conftest.$ac_ext >&5 | |
4367 | rm -rf conftest* | |
4368 | eval "ac_cv_lib_$ac_lib_var=no" | |
4369 | fi | |
4370 | rm -f conftest* | |
4371 | LIBS="$ac_save_LIBS" | |
c906108c | 4372 | |
5ee754fc MK |
4373 | fi |
4374 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4375 | echo "$ac_t""yes" 1>&6 | |
4376 | LIBS="$LIBS -lx" | |
4377 | else | |
4378 | echo "$ac_t""no" 1>&6 | |
4379 | fi | |
c906108c | 4380 | |
5ee754fc | 4381 | fi |
c906108c | 4382 | |
5ee754fc | 4383 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
40a7debc | 4384 | echo "configure:4385: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4385 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4386 | echo $ac_n "(cached) $ac_c" 1>&6 |
4387 | else | |
4388 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4389 | #line 4390 "configure" |
9608ab8b MK |
4390 | #include "confdefs.h" |
4391 | #include <sys/types.h> | |
5ee754fc MK |
4392 | #include <sys/stat.h> |
4393 | ||
4394 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4395 | # if S_ISBLK (S_IFDIR) | |
4396 | You lose. | |
4397 | # endif | |
4398 | #endif | |
4399 | ||
4400 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4401 | # if S_ISBLK (S_IFCHR) | |
4402 | You lose. | |
4403 | # endif | |
4404 | #endif | |
4405 | ||
4406 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4407 | # if S_ISLNK (S_IFREG) | |
4408 | You lose. | |
4409 | # endif | |
4410 | #endif | |
4411 | ||
4412 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4413 | # if S_ISSOCK (S_IFREG) | |
4414 | You lose. | |
4415 | # endif | |
4416 | #endif | |
4417 | ||
9608ab8b | 4418 | EOF |
5ee754fc MK |
4419 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4420 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4421 | rm -rf conftest* |
5ee754fc MK |
4422 | ac_cv_header_stat_broken=yes |
4423 | else | |
4424 | rm -rf conftest* | |
4425 | ac_cv_header_stat_broken=no | |
4426 | fi | |
4427 | rm -f conftest* | |
4428 | ||
4429 | fi | |
4430 | ||
4431 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4432 | if test $ac_cv_header_stat_broken = yes; then | |
4433 | cat >> confdefs.h <<\EOF | |
4434 | #define STAT_MACROS_BROKEN 1 | |
4435 | EOF | |
4436 | ||
4437 | fi | |
4438 | ||
4439 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
40a7debc | 4440 | echo "configure:4441: checking for ANSI C header files" >&5 |
5ee754fc MK |
4441 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4442 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4443 | else | |
4444 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4445 | #line 4446 "configure" |
5ee754fc MK |
4446 | #include "confdefs.h" |
4447 | #include <stdlib.h> | |
4448 | #include <stdarg.h> | |
4449 | #include <string.h> | |
4450 | #include <float.h> | |
4451 | EOF | |
4452 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4453 | { (eval echo configure:4454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4454 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4455 | if test -z "$ac_err"; then | |
4456 | rm -rf conftest* | |
4457 | ac_cv_header_stdc=yes | |
4458 | else | |
4459 | echo "$ac_err" >&5 | |
4460 | echo "configure: failed program was:" >&5 | |
4461 | cat conftest.$ac_ext >&5 | |
4462 | rm -rf conftest* | |
4463 | ac_cv_header_stdc=no | |
4464 | fi | |
4465 | rm -f conftest* | |
4466 | ||
4467 | if test $ac_cv_header_stdc = yes; then | |
4468 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4469 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4470 | #line 4471 "configure" |
5ee754fc MK |
4471 | #include "confdefs.h" |
4472 | #include <string.h> | |
4473 | EOF | |
4474 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4475 | egrep "memchr" >/dev/null 2>&1; then | |
4476 | : | |
4477 | else | |
4478 | rm -rf conftest* | |
4479 | ac_cv_header_stdc=no | |
4480 | fi | |
4481 | rm -f conftest* | |
4482 | ||
4483 | fi | |
4484 | ||
4485 | if test $ac_cv_header_stdc = yes; then | |
4486 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4487 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4488 | #line 4489 "configure" |
5ee754fc MK |
4489 | #include "confdefs.h" |
4490 | #include <stdlib.h> | |
4491 | EOF | |
4492 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4493 | egrep "free" >/dev/null 2>&1; then | |
4494 | : | |
4495 | else | |
4496 | rm -rf conftest* | |
4497 | ac_cv_header_stdc=no | |
4498 | fi | |
4499 | rm -f conftest* | |
4500 | ||
4501 | fi | |
4502 | ||
4503 | if test $ac_cv_header_stdc = yes; then | |
4504 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4505 | if test "$cross_compiling" = yes; then | |
4506 | : | |
4507 | else | |
4508 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4509 | #line 4510 "configure" |
5ee754fc MK |
4510 | #include "confdefs.h" |
4511 | #include <ctype.h> | |
4512 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4513 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4514 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4515 | int main () { int i; for (i = 0; i < 256; i++) | |
4516 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4517 | exit (0); } | |
4518 | ||
4519 | EOF | |
40a7debc | 4520 | if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4521 | then |
4522 | : | |
9608ab8b | 4523 | else |
5ee754fc MK |
4524 | echo "configure: failed program was:" >&5 |
4525 | cat conftest.$ac_ext >&5 | |
4526 | rm -fr conftest* | |
4527 | ac_cv_header_stdc=no | |
4528 | fi | |
4529 | rm -fr conftest* | |
4530 | fi | |
4531 | ||
4532 | fi | |
4533 | fi | |
4534 | ||
4535 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4536 | if test $ac_cv_header_stdc = yes; then | |
4537 | cat >> confdefs.h <<\EOF | |
4538 | #define STDC_HEADERS 1 | |
4539 | EOF | |
4540 | ||
4541 | fi | |
4542 | ||
4543 | for ac_hdr in link.h | |
4544 | do | |
4545 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4546 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4547 | echo "configure:4548: checking for $ac_hdr" >&5 |
5ee754fc MK |
4548 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4549 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4550 | else | |
4551 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4552 | #line 4553 "configure" |
5ee754fc MK |
4553 | #include "confdefs.h" |
4554 | #include <$ac_hdr> | |
4555 | EOF | |
4556 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4557 | { (eval echo configure:4558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4558 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4559 | if test -z "$ac_err"; then | |
4560 | rm -rf conftest* | |
4561 | eval "ac_cv_header_$ac_safe=yes" | |
4562 | else | |
4563 | echo "$ac_err" >&5 | |
4564 | echo "configure: failed program was:" >&5 | |
4565 | cat conftest.$ac_ext >&5 | |
4566 | rm -rf conftest* | |
4567 | eval "ac_cv_header_$ac_safe=no" | |
4568 | fi | |
4569 | rm -f conftest* | |
4570 | fi | |
4571 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4572 | echo "$ac_t""yes" 1>&6 | |
4573 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4574 | cat >> confdefs.h <<EOF | |
4575 | #define $ac_tr_hdr 1 | |
4576 | EOF | |
4577 | ||
4578 | else | |
4579 | echo "$ac_t""no" 1>&6 | |
4580 | fi | |
4581 | done | |
4582 | ||
78434e59 | 4583 | for ac_hdr in machine/reg.h |
5ee754fc MK |
4584 | do |
4585 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4586 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4587 | echo "configure:4588: checking for $ac_hdr" >&5 |
5ee754fc MK |
4588 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4589 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4590 | else | |
4591 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4592 | #line 4593 "configure" |
5ee754fc MK |
4593 | #include "confdefs.h" |
4594 | #include <$ac_hdr> | |
4595 | EOF | |
4596 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4597 | { (eval echo configure:4598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4598 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4599 | if test -z "$ac_err"; then | |
4600 | rm -rf conftest* | |
4601 | eval "ac_cv_header_$ac_safe=yes" | |
4602 | else | |
4603 | echo "$ac_err" >&5 | |
4604 | echo "configure: failed program was:" >&5 | |
4605 | cat conftest.$ac_ext >&5 | |
4606 | rm -rf conftest* | |
4607 | eval "ac_cv_header_$ac_safe=no" | |
4608 | fi | |
4609 | rm -f conftest* | |
4610 | fi | |
4611 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4612 | echo "$ac_t""yes" 1>&6 | |
4613 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4614 | cat >> confdefs.h <<EOF | |
4615 | #define $ac_tr_hdr 1 | |
4616 | EOF | |
4617 | ||
4618 | else | |
4619 | echo "$ac_t""no" 1>&6 | |
4620 | fi | |
4621 | done | |
4622 | ||
78434e59 | 4623 | for ac_hdr in nlist.h |
5ee754fc MK |
4624 | do |
4625 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4626 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4627 | echo "configure:4628: checking for $ac_hdr" >&5 |
5ee754fc MK |
4628 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4630 | else | |
4631 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4632 | #line 4633 "configure" |
5ee754fc MK |
4633 | #include "confdefs.h" |
4634 | #include <$ac_hdr> | |
4635 | EOF | |
4636 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4637 | { (eval echo configure:4638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4638 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4639 | if test -z "$ac_err"; then | |
4640 | rm -rf conftest* | |
4641 | eval "ac_cv_header_$ac_safe=yes" | |
4642 | else | |
4643 | echo "$ac_err" >&5 | |
4644 | echo "configure: failed program was:" >&5 | |
4645 | cat conftest.$ac_ext >&5 | |
4646 | rm -rf conftest* | |
4647 | eval "ac_cv_header_$ac_safe=no" | |
4648 | fi | |
4649 | rm -f conftest* | |
4650 | fi | |
4651 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4652 | echo "$ac_t""yes" 1>&6 | |
4653 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4654 | cat >> confdefs.h <<EOF | |
4655 | #define $ac_tr_hdr 1 | |
4656 | EOF | |
4657 | ||
4658 | else | |
4659 | echo "$ac_t""no" 1>&6 | |
4660 | fi | |
4661 | done | |
4662 | ||
78434e59 | 4663 | for ac_hdr in poll.h sys/poll.h |
5ee754fc MK |
4664 | do |
4665 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4666 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4667 | echo "configure:4668: checking for $ac_hdr" >&5 |
5ee754fc MK |
4668 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4670 | else | |
4671 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4672 | #line 4673 "configure" |
5ee754fc MK |
4673 | #include "confdefs.h" |
4674 | #include <$ac_hdr> | |
4675 | EOF | |
4676 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4677 | { (eval echo configure:4678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4678 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4679 | if test -z "$ac_err"; then | |
4680 | rm -rf conftest* | |
4681 | eval "ac_cv_header_$ac_safe=yes" | |
4682 | else | |
4683 | echo "$ac_err" >&5 | |
4684 | echo "configure: failed program was:" >&5 | |
4685 | cat conftest.$ac_ext >&5 | |
4686 | rm -rf conftest* | |
4687 | eval "ac_cv_header_$ac_safe=no" | |
4688 | fi | |
4689 | rm -f conftest* | |
4690 | fi | |
4691 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4692 | echo "$ac_t""yes" 1>&6 | |
4693 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4694 | cat >> confdefs.h <<EOF | |
4695 | #define $ac_tr_hdr 1 | |
4696 | EOF | |
4697 | ||
4698 | else | |
4699 | echo "$ac_t""no" 1>&6 | |
4700 | fi | |
4701 | done | |
4702 | ||
78434e59 | 4703 | for ac_hdr in proc_service.h thread_db.h |
5ee754fc MK |
4704 | do |
4705 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4706 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4707 | echo "configure:4708: checking for $ac_hdr" >&5 |
5ee754fc MK |
4708 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4709 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4710 | else | |
4711 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4712 | #line 4713 "configure" |
5ee754fc MK |
4713 | #include "confdefs.h" |
4714 | #include <$ac_hdr> | |
4715 | EOF | |
4716 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4717 | { (eval echo configure:4718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4718 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4719 | if test -z "$ac_err"; then | |
4720 | rm -rf conftest* | |
4721 | eval "ac_cv_header_$ac_safe=yes" | |
4722 | else | |
4723 | echo "$ac_err" >&5 | |
4724 | echo "configure: failed program was:" >&5 | |
4725 | cat conftest.$ac_ext >&5 | |
4726 | rm -rf conftest* | |
4727 | eval "ac_cv_header_$ac_safe=no" | |
4728 | fi | |
4729 | rm -f conftest* | |
4730 | fi | |
4731 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4732 | echo "$ac_t""yes" 1>&6 | |
4733 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4734 | cat >> confdefs.h <<EOF | |
4735 | #define $ac_tr_hdr 1 | |
4736 | EOF | |
4737 | ||
4738 | else | |
4739 | echo "$ac_t""no" 1>&6 | |
4740 | fi | |
4741 | done | |
4742 | ||
78434e59 | 4743 | for ac_hdr in stddef.h |
5ee754fc MK |
4744 | do |
4745 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4746 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4747 | echo "configure:4748: checking for $ac_hdr" >&5 |
5ee754fc MK |
4748 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4749 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4750 | else | |
4751 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4752 | #line 4753 "configure" |
5ee754fc MK |
4753 | #include "confdefs.h" |
4754 | #include <$ac_hdr> | |
4755 | EOF | |
4756 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4757 | { (eval echo configure:4758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4758 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4759 | if test -z "$ac_err"; then | |
4760 | rm -rf conftest* | |
4761 | eval "ac_cv_header_$ac_safe=yes" | |
4762 | else | |
4763 | echo "$ac_err" >&5 | |
4764 | echo "configure: failed program was:" >&5 | |
4765 | cat conftest.$ac_ext >&5 | |
4766 | rm -rf conftest* | |
4767 | eval "ac_cv_header_$ac_safe=no" | |
4768 | fi | |
4769 | rm -f conftest* | |
4770 | fi | |
4771 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4772 | echo "$ac_t""yes" 1>&6 | |
4773 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4774 | cat >> confdefs.h <<EOF | |
4775 | #define $ac_tr_hdr 1 | |
4776 | EOF | |
4777 | ||
4778 | else | |
4779 | echo "$ac_t""no" 1>&6 | |
4780 | fi | |
4781 | done | |
4782 | ||
78434e59 | 4783 | for ac_hdr in stdlib.h |
5ee754fc MK |
4784 | do |
4785 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4786 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4787 | echo "configure:4788: checking for $ac_hdr" >&5 |
5ee754fc MK |
4788 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4789 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4790 | else | |
4791 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4792 | #line 4793 "configure" |
5ee754fc MK |
4793 | #include "confdefs.h" |
4794 | #include <$ac_hdr> | |
4795 | EOF | |
4796 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4797 | { (eval echo configure:4798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4798 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4799 | if test -z "$ac_err"; then | |
4800 | rm -rf conftest* | |
4801 | eval "ac_cv_header_$ac_safe=yes" | |
4802 | else | |
4803 | echo "$ac_err" >&5 | |
4804 | echo "configure: failed program was:" >&5 | |
4805 | cat conftest.$ac_ext >&5 | |
4806 | rm -rf conftest* | |
4807 | eval "ac_cv_header_$ac_safe=no" | |
4808 | fi | |
4809 | rm -f conftest* | |
4810 | fi | |
4811 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4812 | echo "$ac_t""yes" 1>&6 | |
4813 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4814 | cat >> confdefs.h <<EOF | |
4815 | #define $ac_tr_hdr 1 | |
4816 | EOF | |
4817 | ||
4818 | else | |
4819 | echo "$ac_t""no" 1>&6 | |
4820 | fi | |
4821 | done | |
4822 | ||
78434e59 | 4823 | for ac_hdr in stdint.h |
5ee754fc MK |
4824 | do |
4825 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4826 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4827 | echo "configure:4828: checking for $ac_hdr" >&5 |
5ee754fc MK |
4828 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4829 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4830 | else | |
4831 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4832 | #line 4833 "configure" |
5ee754fc MK |
4833 | #include "confdefs.h" |
4834 | #include <$ac_hdr> | |
4835 | EOF | |
4836 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4837 | { (eval echo configure:4838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4838 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4839 | if test -z "$ac_err"; then | |
4840 | rm -rf conftest* | |
4841 | eval "ac_cv_header_$ac_safe=yes" | |
4842 | else | |
4843 | echo "$ac_err" >&5 | |
4844 | echo "configure: failed program was:" >&5 | |
4845 | cat conftest.$ac_ext >&5 | |
4846 | rm -rf conftest* | |
4847 | eval "ac_cv_header_$ac_safe=no" | |
4848 | fi | |
4849 | rm -f conftest* | |
4850 | fi | |
4851 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4852 | echo "$ac_t""yes" 1>&6 | |
4853 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4854 | cat >> confdefs.h <<EOF | |
4855 | #define $ac_tr_hdr 1 | |
4856 | EOF | |
4857 | ||
4858 | else | |
4859 | echo "$ac_t""no" 1>&6 | |
4860 | fi | |
4861 | done | |
4862 | ||
78434e59 | 4863 | for ac_hdr in string.h memory.h strings.h |
5ee754fc MK |
4864 | do |
4865 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4866 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4867 | echo "configure:4868: checking for $ac_hdr" >&5 |
5ee754fc MK |
4868 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4869 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4870 | else | |
4871 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4872 | #line 4873 "configure" |
5ee754fc MK |
4873 | #include "confdefs.h" |
4874 | #include <$ac_hdr> | |
4875 | EOF | |
4876 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4877 | { (eval echo configure:4878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4878 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4879 | if test -z "$ac_err"; then | |
4880 | rm -rf conftest* | |
4881 | eval "ac_cv_header_$ac_safe=yes" | |
4882 | else | |
4883 | echo "$ac_err" >&5 | |
4884 | echo "configure: failed program was:" >&5 | |
4885 | cat conftest.$ac_ext >&5 | |
4886 | rm -rf conftest* | |
4887 | eval "ac_cv_header_$ac_safe=no" | |
4888 | fi | |
4889 | rm -f conftest* | |
4890 | fi | |
4891 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4892 | echo "$ac_t""yes" 1>&6 | |
4893 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4894 | cat >> confdefs.h <<EOF | |
4895 | #define $ac_tr_hdr 1 | |
4896 | EOF | |
4897 | ||
4898 | else | |
4899 | echo "$ac_t""no" 1>&6 | |
4900 | fi | |
4901 | done | |
4902 | ||
78434e59 | 4903 | for ac_hdr in sys/fault.h |
5ee754fc MK |
4904 | do |
4905 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4906 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4907 | echo "configure:4908: checking for $ac_hdr" >&5 |
5ee754fc MK |
4908 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4909 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4910 | else | |
4911 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4912 | #line 4913 "configure" |
5ee754fc MK |
4913 | #include "confdefs.h" |
4914 | #include <$ac_hdr> | |
4915 | EOF | |
4916 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4917 | { (eval echo configure:4918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4918 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4919 | if test -z "$ac_err"; then | |
4920 | rm -rf conftest* | |
4921 | eval "ac_cv_header_$ac_safe=yes" | |
4922 | else | |
4923 | echo "$ac_err" >&5 | |
4924 | echo "configure: failed program was:" >&5 | |
4925 | cat conftest.$ac_ext >&5 | |
4926 | rm -rf conftest* | |
4927 | eval "ac_cv_header_$ac_safe=no" | |
4928 | fi | |
4929 | rm -f conftest* | |
4930 | fi | |
4931 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4932 | echo "$ac_t""yes" 1>&6 | |
4933 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4934 | cat >> confdefs.h <<EOF | |
4935 | #define $ac_tr_hdr 1 | |
4936 | EOF | |
4937 | ||
4938 | else | |
4939 | echo "$ac_t""no" 1>&6 | |
4940 | fi | |
4941 | done | |
4942 | ||
78434e59 | 4943 | for ac_hdr in sys/file.h |
5ee754fc MK |
4944 | do |
4945 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4946 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4947 | echo "configure:4948: checking for $ac_hdr" >&5 |
5ee754fc MK |
4948 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4949 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4950 | else | |
4951 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4952 | #line 4953 "configure" |
5ee754fc MK |
4953 | #include "confdefs.h" |
4954 | #include <$ac_hdr> | |
4955 | EOF | |
4956 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4957 | { (eval echo configure:4958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4958 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4959 | if test -z "$ac_err"; then | |
4960 | rm -rf conftest* | |
4961 | eval "ac_cv_header_$ac_safe=yes" | |
4962 | else | |
4963 | echo "$ac_err" >&5 | |
4964 | echo "configure: failed program was:" >&5 | |
4965 | cat conftest.$ac_ext >&5 | |
4966 | rm -rf conftest* | |
4967 | eval "ac_cv_header_$ac_safe=no" | |
4968 | fi | |
4969 | rm -f conftest* | |
4970 | fi | |
4971 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4972 | echo "$ac_t""yes" 1>&6 | |
4973 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4974 | cat >> confdefs.h <<EOF | |
4975 | #define $ac_tr_hdr 1 | |
4976 | EOF | |
4977 | ||
4978 | else | |
4979 | echo "$ac_t""no" 1>&6 | |
4980 | fi | |
4981 | done | |
4982 | ||
78434e59 | 4983 | for ac_hdr in sys/filio.h |
5ee754fc MK |
4984 | do |
4985 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4986 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 4987 | echo "configure:4988: checking for $ac_hdr" >&5 |
5ee754fc MK |
4988 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4990 | else | |
4991 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 4992 | #line 4993 "configure" |
5ee754fc MK |
4993 | #include "confdefs.h" |
4994 | #include <$ac_hdr> | |
4995 | EOF | |
4996 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 4997 | { (eval echo configure:4998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4998 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4999 | if test -z "$ac_err"; then | |
5000 | rm -rf conftest* | |
5001 | eval "ac_cv_header_$ac_safe=yes" | |
5002 | else | |
5003 | echo "$ac_err" >&5 | |
5004 | echo "configure: failed program was:" >&5 | |
5005 | cat conftest.$ac_ext >&5 | |
5006 | rm -rf conftest* | |
5007 | eval "ac_cv_header_$ac_safe=no" | |
5008 | fi | |
5009 | rm -f conftest* | |
5010 | fi | |
5011 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5012 | echo "$ac_t""yes" 1>&6 | |
5013 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5014 | cat >> confdefs.h <<EOF | |
5015 | #define $ac_tr_hdr 1 | |
5016 | EOF | |
5017 | ||
5018 | else | |
5019 | echo "$ac_t""no" 1>&6 | |
5020 | fi | |
5021 | done | |
5022 | ||
78434e59 | 5023 | for ac_hdr in sys/ioctl.h |
5ee754fc MK |
5024 | do |
5025 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5026 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5027 | echo "configure:5028: checking for $ac_hdr" >&5 |
5ee754fc MK |
5028 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5029 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5030 | else | |
5031 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5032 | #line 5033 "configure" |
5ee754fc MK |
5033 | #include "confdefs.h" |
5034 | #include <$ac_hdr> | |
5035 | EOF | |
5036 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5037 | { (eval echo configure:5038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5038 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5039 | if test -z "$ac_err"; then | |
5040 | rm -rf conftest* | |
5041 | eval "ac_cv_header_$ac_safe=yes" | |
5042 | else | |
5043 | echo "$ac_err" >&5 | |
5044 | echo "configure: failed program was:" >&5 | |
5045 | cat conftest.$ac_ext >&5 | |
5046 | rm -rf conftest* | |
5047 | eval "ac_cv_header_$ac_safe=no" | |
5048 | fi | |
5049 | rm -f conftest* | |
5050 | fi | |
5051 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5052 | echo "$ac_t""yes" 1>&6 | |
5053 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5054 | cat >> confdefs.h <<EOF | |
5055 | #define $ac_tr_hdr 1 | |
5056 | EOF | |
5057 | ||
5058 | else | |
5059 | echo "$ac_t""no" 1>&6 | |
5060 | fi | |
5061 | done | |
5062 | ||
78434e59 | 5063 | for ac_hdr in sys/param.h |
5ee754fc MK |
5064 | do |
5065 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5066 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5067 | echo "configure:5068: checking for $ac_hdr" >&5 |
5ee754fc MK |
5068 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5069 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5070 | else | |
5071 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5072 | #line 5073 "configure" |
5ee754fc MK |
5073 | #include "confdefs.h" |
5074 | #include <$ac_hdr> | |
5075 | EOF | |
5076 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5077 | { (eval echo configure:5078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5078 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5079 | if test -z "$ac_err"; then | |
5080 | rm -rf conftest* | |
5081 | eval "ac_cv_header_$ac_safe=yes" | |
5082 | else | |
5083 | echo "$ac_err" >&5 | |
5084 | echo "configure: failed program was:" >&5 | |
5085 | cat conftest.$ac_ext >&5 | |
5086 | rm -rf conftest* | |
5087 | eval "ac_cv_header_$ac_safe=no" | |
5088 | fi | |
5089 | rm -f conftest* | |
5090 | fi | |
5091 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5092 | echo "$ac_t""yes" 1>&6 | |
5093 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5094 | cat >> confdefs.h <<EOF | |
5095 | #define $ac_tr_hdr 1 | |
5096 | EOF | |
5097 | ||
5098 | else | |
5099 | echo "$ac_t""no" 1>&6 | |
5100 | fi | |
5101 | done | |
5102 | ||
78434e59 | 5103 | for ac_hdr in sys/proc.h |
5ee754fc MK |
5104 | do |
5105 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5106 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5107 | echo "configure:5108: checking for $ac_hdr" >&5 |
5ee754fc MK |
5108 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5109 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5110 | else | |
5111 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5112 | #line 5113 "configure" |
5ee754fc MK |
5113 | #include "confdefs.h" |
5114 | #include <$ac_hdr> | |
5115 | EOF | |
5116 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5117 | { (eval echo configure:5118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5118 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5119 | if test -z "$ac_err"; then | |
5120 | rm -rf conftest* | |
5121 | eval "ac_cv_header_$ac_safe=yes" | |
5122 | else | |
5123 | echo "$ac_err" >&5 | |
5124 | echo "configure: failed program was:" >&5 | |
5125 | cat conftest.$ac_ext >&5 | |
5126 | rm -rf conftest* | |
5127 | eval "ac_cv_header_$ac_safe=no" | |
5128 | fi | |
5129 | rm -f conftest* | |
5130 | fi | |
5131 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5132 | echo "$ac_t""yes" 1>&6 | |
5133 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5134 | cat >> confdefs.h <<EOF | |
5135 | #define $ac_tr_hdr 1 | |
5136 | EOF | |
5137 | ||
5138 | else | |
5139 | echo "$ac_t""no" 1>&6 | |
5140 | fi | |
5141 | done | |
5142 | ||
78434e59 | 5143 | for ac_hdr in sys/procfs.h |
5ee754fc MK |
5144 | do |
5145 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5146 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5147 | echo "configure:5148: checking for $ac_hdr" >&5 |
5ee754fc MK |
5148 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5149 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5150 | else | |
5151 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5152 | #line 5153 "configure" |
5ee754fc MK |
5153 | #include "confdefs.h" |
5154 | #include <$ac_hdr> | |
5155 | EOF | |
5156 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5157 | { (eval echo configure:5158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5158 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5159 | if test -z "$ac_err"; then | |
5160 | rm -rf conftest* | |
5161 | eval "ac_cv_header_$ac_safe=yes" | |
5162 | else | |
5163 | echo "$ac_err" >&5 | |
5164 | echo "configure: failed program was:" >&5 | |
5165 | cat conftest.$ac_ext >&5 | |
5166 | rm -rf conftest* | |
5167 | eval "ac_cv_header_$ac_safe=no" | |
5168 | fi | |
5169 | rm -f conftest* | |
5170 | fi | |
5171 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5172 | echo "$ac_t""yes" 1>&6 | |
5173 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5174 | cat >> confdefs.h <<EOF | |
5175 | #define $ac_tr_hdr 1 | |
5176 | EOF | |
5177 | ||
5178 | else | |
5179 | echo "$ac_t""no" 1>&6 | |
5180 | fi | |
5181 | done | |
5182 | ||
78434e59 | 5183 | for ac_hdr in sys/ptrace.h ptrace.h |
5ee754fc MK |
5184 | do |
5185 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5186 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5187 | echo "configure:5188: checking for $ac_hdr" >&5 |
5ee754fc MK |
5188 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5189 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5190 | else | |
5191 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5192 | #line 5193 "configure" |
5ee754fc MK |
5193 | #include "confdefs.h" |
5194 | #include <$ac_hdr> | |
5195 | EOF | |
5196 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5197 | { (eval echo configure:5198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5198 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5199 | if test -z "$ac_err"; then | |
5200 | rm -rf conftest* | |
5201 | eval "ac_cv_header_$ac_safe=yes" | |
5202 | else | |
5203 | echo "$ac_err" >&5 | |
5204 | echo "configure: failed program was:" >&5 | |
5205 | cat conftest.$ac_ext >&5 | |
5206 | rm -rf conftest* | |
5207 | eval "ac_cv_header_$ac_safe=no" | |
5208 | fi | |
5209 | rm -f conftest* | |
5210 | fi | |
5211 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5212 | echo "$ac_t""yes" 1>&6 | |
5213 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5214 | cat >> confdefs.h <<EOF | |
5215 | #define $ac_tr_hdr 1 | |
5216 | EOF | |
5217 | ||
5218 | else | |
5219 | echo "$ac_t""no" 1>&6 | |
5220 | fi | |
5221 | done | |
5222 | ||
78434e59 | 5223 | for ac_hdr in sys/reg.h sys/debugreg.h |
5ee754fc MK |
5224 | do |
5225 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5226 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5227 | echo "configure:5228: checking for $ac_hdr" >&5 |
5ee754fc MK |
5228 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5229 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5230 | else | |
5231 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5232 | #line 5233 "configure" |
5ee754fc MK |
5233 | #include "confdefs.h" |
5234 | #include <$ac_hdr> | |
5235 | EOF | |
5236 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5237 | { (eval echo configure:5238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5238 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5239 | if test -z "$ac_err"; then | |
5240 | rm -rf conftest* | |
5241 | eval "ac_cv_header_$ac_safe=yes" | |
5242 | else | |
5243 | echo "$ac_err" >&5 | |
5244 | echo "configure: failed program was:" >&5 | |
5245 | cat conftest.$ac_ext >&5 | |
5246 | rm -rf conftest* | |
5247 | eval "ac_cv_header_$ac_safe=no" | |
5248 | fi | |
5249 | rm -f conftest* | |
5250 | fi | |
5251 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5252 | echo "$ac_t""yes" 1>&6 | |
5253 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5254 | cat >> confdefs.h <<EOF | |
5255 | #define $ac_tr_hdr 1 | |
5256 | EOF | |
5257 | ||
5258 | else | |
5259 | echo "$ac_t""no" 1>&6 | |
5260 | fi | |
5261 | done | |
5262 | ||
78434e59 | 5263 | for ac_hdr in sys/select.h |
5ee754fc MK |
5264 | do |
5265 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5266 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5267 | echo "configure:5268: checking for $ac_hdr" >&5 |
5ee754fc MK |
5268 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5270 | else | |
5271 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5272 | #line 5273 "configure" |
5ee754fc MK |
5273 | #include "confdefs.h" |
5274 | #include <$ac_hdr> | |
5275 | EOF | |
5276 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5277 | { (eval echo configure:5278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5278 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5279 | if test -z "$ac_err"; then | |
5280 | rm -rf conftest* | |
5281 | eval "ac_cv_header_$ac_safe=yes" | |
5282 | else | |
5283 | echo "$ac_err" >&5 | |
5284 | echo "configure: failed program was:" >&5 | |
5285 | cat conftest.$ac_ext >&5 | |
5286 | rm -rf conftest* | |
5287 | eval "ac_cv_header_$ac_safe=no" | |
5288 | fi | |
5289 | rm -f conftest* | |
5290 | fi | |
5291 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5292 | echo "$ac_t""yes" 1>&6 | |
5293 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5294 | cat >> confdefs.h <<EOF | |
5295 | #define $ac_tr_hdr 1 | |
5296 | EOF | |
5297 | ||
5298 | else | |
5299 | echo "$ac_t""no" 1>&6 | |
5300 | fi | |
5301 | done | |
5302 | ||
78434e59 | 5303 | for ac_hdr in sys/syscall.h |
5ee754fc MK |
5304 | do |
5305 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5306 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5307 | echo "configure:5308: checking for $ac_hdr" >&5 |
5ee754fc MK |
5308 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5309 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5310 | else | |
5311 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5312 | #line 5313 "configure" |
5ee754fc MK |
5313 | #include "confdefs.h" |
5314 | #include <$ac_hdr> | |
5315 | EOF | |
5316 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5317 | { (eval echo configure:5318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5318 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5319 | if test -z "$ac_err"; then | |
5320 | rm -rf conftest* | |
5321 | eval "ac_cv_header_$ac_safe=yes" | |
5322 | else | |
5323 | echo "$ac_err" >&5 | |
5324 | echo "configure: failed program was:" >&5 | |
5325 | cat conftest.$ac_ext >&5 | |
5326 | rm -rf conftest* | |
5327 | eval "ac_cv_header_$ac_safe=no" | |
5328 | fi | |
5329 | rm -f conftest* | |
5330 | fi | |
5331 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5332 | echo "$ac_t""yes" 1>&6 | |
5333 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5334 | cat >> confdefs.h <<EOF | |
5335 | #define $ac_tr_hdr 1 | |
5336 | EOF | |
5337 | ||
5338 | else | |
5339 | echo "$ac_t""no" 1>&6 | |
5340 | fi | |
5341 | done | |
5342 | ||
78434e59 | 5343 | for ac_hdr in sys/user.h |
5ee754fc MK |
5344 | do |
5345 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5346 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5347 | echo "configure:5348: checking for $ac_hdr" >&5 |
5ee754fc MK |
5348 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5349 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5350 | else | |
5351 | cat > conftest.$ac_ext <<EOF | |
40a7debc | 5352 | #line 5353 "configure" |
5ee754fc MK |
5353 | #include "confdefs.h" |
5354 | #include <$ac_hdr> | |
5355 | EOF | |
5356 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
40a7debc | 5357 | { (eval echo configure:5358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5358 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5359 | if test -z "$ac_err"; then | |
5360 | rm -rf conftest* | |
5361 | eval "ac_cv_header_$ac_safe=yes" | |
5362 | else | |
5363 | echo "$ac_err" >&5 | |
9608ab8b MK |
5364 | echo "configure: failed program was:" >&5 |
5365 | cat conftest.$ac_ext >&5 | |
5366 | rm -rf conftest* | |
5ee754fc | 5367 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5368 | fi |
5369 | rm -f conftest* | |
5370 | fi | |
5ee754fc | 5371 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5372 | echo "$ac_t""yes" 1>&6 |
5373 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5374 | cat >> confdefs.h <<EOF | |
5375 | #define $ac_tr_hdr 1 | |
5376 | EOF | |
5ee754fc | 5377 | |
9608ab8b MK |
5378 | else |
5379 | echo "$ac_t""no" 1>&6 | |
5380 | fi | |
5381 | done | |
5ee754fc | 5382 | |
78434e59 | 5383 | for ac_hdr in sys/wait.h wait.h |
5ee754fc MK |
5384 | do |
5385 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5386 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5387 | echo "configure:5388: checking for $ac_hdr" >&5 |
5ee754fc | 5388 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5389 | echo $ac_n "(cached) $ac_c" 1>&6 |
5390 | else | |
5ee754fc | 5391 | cat > conftest.$ac_ext <<EOF |
40a7debc | 5392 | #line 5393 "configure" |
9608ab8b | 5393 | #include "confdefs.h" |
5ee754fc | 5394 | #include <$ac_hdr> |
9608ab8b | 5395 | EOF |
5ee754fc | 5396 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
40a7debc | 5397 | { (eval echo configure:5398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5398 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5399 | if test -z "$ac_err"; then | |
9608ab8b | 5400 | rm -rf conftest* |
5ee754fc | 5401 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5402 | else |
5ee754fc | 5403 | echo "$ac_err" >&5 |
9608ab8b MK |
5404 | echo "configure: failed program was:" >&5 |
5405 | cat conftest.$ac_ext >&5 | |
5406 | rm -rf conftest* | |
5ee754fc | 5407 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5408 | fi |
5409 | rm -f conftest* | |
9608ab8b | 5410 | fi |
5ee754fc | 5411 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5412 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5413 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5414 | cat >> confdefs.h <<EOF | |
5415 | #define $ac_tr_hdr 1 | |
5416 | EOF | |
5417 | ||
9608ab8b MK |
5418 | else |
5419 | echo "$ac_t""no" 1>&6 | |
5420 | fi | |
5ee754fc | 5421 | done |
9608ab8b | 5422 | |
78434e59 | 5423 | for ac_hdr in termios.h termio.h sgtty.h |
5ee754fc MK |
5424 | do |
5425 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5426 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
40a7debc | 5427 | echo "configure:5428: checking for $ac_hdr" >&5 |
5ee754fc | 5428 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5429 | echo $ac_n "(cached) $ac_c" 1>&6 |
5430 | else | |
5ee754fc | 5431 | cat > conftest.$ac_ext <<EOF |
40a7debc | 5432 | #line 5433 "configure" |
9608ab8b | 5433 | #include "confdefs.h" |
5ee754fc | 5434 | #include <$ac_hdr> |
9608ab8b | 5435 | EOF |
5ee754fc | 5436 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
40a7debc | 5437 | { (eval echo configure:5438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5438 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5439 | if test -z "$ac_err"; then | |
9608ab8b | 5440 | rm -rf conftest* |
5ee754fc | 5441 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5442 | else |
5ee754fc | 5443 | echo "$ac_err" >&5 |
9608ab8b MK |
5444 | echo "configure: failed program was:" >&5 |
5445 | cat conftest.$ac_ext >&5 | |
5446 | rm -rf conftest* | |
5ee754fc | 5447 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5448 | fi |
5449 | rm -f conftest* | |
9608ab8b | 5450 | fi |
5ee754fc | 5451 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5452 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5453 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5454 | cat >> confdefs.h <<EOF | |
5455 | #define $ac_tr_hdr 1 | |
5456 | EOF | |
5457 | ||
9608ab8b MK |
5458 | else |
5459 | echo "$ac_t""no" 1>&6 | |
5460 | fi | |
5ee754fc | 5461 | done |
9608ab8b | 5462 | |
78434e59 MK |
5463 | for ac_hdr in unistd.h |
5464 | do | |
5465 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5466 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5467 | echo "configure:5468: checking for $ac_hdr" >&5 | |
5468 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
5469 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5470 | else | |
5471 | cat > conftest.$ac_ext <<EOF | |
5472 | #line 5473 "configure" | |
5473 | #include "confdefs.h" | |
5474 | #include <$ac_hdr> | |
5475 | EOF | |
5476 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5477 | { (eval echo configure:5478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
5478 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
5479 | if test -z "$ac_err"; then | |
5480 | rm -rf conftest* | |
5481 | eval "ac_cv_header_$ac_safe=yes" | |
5482 | else | |
5483 | echo "$ac_err" >&5 | |
5484 | echo "configure: failed program was:" >&5 | |
5485 | cat conftest.$ac_ext >&5 | |
5486 | rm -rf conftest* | |
5487 | eval "ac_cv_header_$ac_safe=no" | |
5488 | fi | |
5489 | rm -f conftest* | |
5490 | fi | |
5491 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5492 | echo "$ac_t""yes" 1>&6 | |
5493 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5494 | cat >> confdefs.h <<EOF | |
5495 | #define $ac_tr_hdr 1 | |
5496 | EOF | |
5497 | ||
5498 | else | |
5499 | echo "$ac_t""no" 1>&6 | |
5500 | fi | |
5501 | done | |
5502 | ||
9608ab8b | 5503 | |
5ee754fc MK |
5504 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5505 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5506 | # think that we don't have <curses.h> if we're using GCC. | |
5507 | case $host_os in | |
5508 | solaris2.[78]) | |
5509 | if test "$GCC" = yes; then | |
5510 | cat >> confdefs.h <<\EOF | |
5511 | #define _MSE_INT_H 1 | |
5512 | EOF | |
5513 | ||
5514 | fi ;; | |
5515 | esac | |
5516 | for ac_hdr in curses.h ncurses.h term.h | |
5517 | do | |
5518 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5519 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
78434e59 | 5520 | echo "configure:5521: checking for $ac_hdr" >&5 |
5ee754fc | 5521 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5522 | echo $ac_n "(cached) $ac_c" 1>&6 |
5523 | else | |
5524 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5525 | #line 5526 "configure" |
c906108c | 5526 | #include "confdefs.h" |
5ee754fc | 5527 | #include <$ac_hdr> |
c906108c SS |
5528 | EOF |
5529 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
78434e59 | 5530 | { (eval echo configure:5531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5531 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5532 | if test -z "$ac_err"; then | |
5533 | rm -rf conftest* | |
5ee754fc | 5534 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5535 | else |
5536 | echo "$ac_err" >&5 | |
5537 | echo "configure: failed program was:" >&5 | |
5538 | cat conftest.$ac_ext >&5 | |
5539 | rm -rf conftest* | |
5ee754fc | 5540 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5541 | fi |
5542 | rm -f conftest* | |
c906108c | 5543 | fi |
5ee754fc MK |
5544 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5545 | echo "$ac_t""yes" 1>&6 | |
5546 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5547 | cat >> confdefs.h <<EOF | |
5548 | #define $ac_tr_hdr 1 | |
c906108c | 5549 | EOF |
5ee754fc | 5550 | |
c906108c | 5551 | else |
5ee754fc | 5552 | echo "$ac_t""no" 1>&6 |
c906108c | 5553 | fi |
5ee754fc | 5554 | done |
c906108c SS |
5555 | |
5556 | ||
5ee754fc MK |
5557 | # FIXME: kettenis/20030102: In most cases we include these |
5558 | # unconditionally, so what's the point in checking these? | |
5559 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5560 | do |
5561 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5562 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
78434e59 | 5563 | echo "configure:5564: checking for $ac_hdr" >&5 |
c906108c SS |
5564 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5565 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5566 | else | |
5567 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5568 | #line 5569 "configure" |
c906108c SS |
5569 | #include "confdefs.h" |
5570 | #include <$ac_hdr> | |
5571 | EOF | |
5572 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
78434e59 | 5573 | { (eval echo configure:5574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5574 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5575 | if test -z "$ac_err"; then | |
5576 | rm -rf conftest* | |
5577 | eval "ac_cv_header_$ac_safe=yes" | |
5578 | else | |
5579 | echo "$ac_err" >&5 | |
5580 | echo "configure: failed program was:" >&5 | |
5581 | cat conftest.$ac_ext >&5 | |
5582 | rm -rf conftest* | |
5583 | eval "ac_cv_header_$ac_safe=no" | |
5584 | fi | |
5585 | rm -f conftest* | |
5586 | fi | |
5587 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5588 | echo "$ac_t""yes" 1>&6 | |
5589 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5590 | cat >> confdefs.h <<EOF | |
5591 | #define $ac_tr_hdr 1 | |
5592 | EOF | |
5593 | ||
5594 | else | |
5595 | echo "$ac_t""no" 1>&6 | |
5596 | fi | |
5597 | done | |
5598 | ||
5ee754fc | 5599 | |
40a7debc | 5600 | echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6 |
78434e59 | 5601 | echo "configure:5602: checking for member st_blocks in struct stat" >&5 |
40a7debc EZ |
5602 | if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then |
5603 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5604 | else | |
5605 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5606 | #line 5607 "configure" |
40a7debc EZ |
5607 | #include "confdefs.h" |
5608 | #include <sys/types.h> | |
5609 | #include <sys/stat.h> | |
5610 | int main() { | |
5611 | struct stat st; (void) st.st_blocks; | |
5612 | ; return 0; } | |
5613 | EOF | |
78434e59 | 5614 | if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
40a7debc EZ |
5615 | rm -rf conftest* |
5616 | gdb_cv_have_struct_stat_with_st_blocks_member=yes | |
5617 | else | |
5618 | echo "configure: failed program was:" >&5 | |
5619 | cat conftest.$ac_ext >&5 | |
5620 | rm -rf conftest* | |
5621 | gdb_cv_have_struct_stat_with_st_blocks_member=no | |
5622 | fi | |
5623 | rm -f conftest* | |
5624 | fi | |
5625 | ||
5626 | echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6 | |
5627 | if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then | |
5628 | cat >> confdefs.h <<\EOF | |
5629 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
5630 | EOF | |
5631 | ||
5632 | fi | |
b9362cc7 AC |
5633 | # ------------------------- # |
5634 | # Checks for declarations. # | |
5635 | # ------------------------- # | |
5636 | ||
5637 | for ac_func in getopt | |
5638 | do | |
5639 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5640 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
78434e59 | 5641 | echo "configure:5642: checking whether $ac_func is declared" >&5 |
b9362cc7 AC |
5642 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
5643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5644 | else | |
5645 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5646 | #line 5647 "configure" |
b9362cc7 AC |
5647 | #include "confdefs.h" |
5648 | #undef $ac_tr_decl | |
5649 | #define $ac_tr_decl 1 | |
5650 | ||
5651 | ||
5652 | int main() { | |
5653 | #ifndef $ac_func | |
5654 | char *(*pfn) = (char *(*)) $ac_func ; | |
5655 | #endif | |
5656 | ; return 0; } | |
5657 | EOF | |
78434e59 | 5658 | if { (eval echo configure:5659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9362cc7 AC |
5659 | rm -rf conftest* |
5660 | eval "gcc_cv_have_decl_$ac_func=yes" | |
5661 | else | |
5662 | echo "configure: failed program was:" >&5 | |
5663 | cat conftest.$ac_ext >&5 | |
5664 | rm -rf conftest* | |
5665 | eval "gcc_cv_have_decl_$ac_func=no" | |
5666 | fi | |
5667 | rm -f conftest* | |
5668 | fi | |
5669 | ||
5670 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5671 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
5672 | #define $ac_tr_decl 1 | |
5673 | EOF | |
5674 | ||
5675 | else | |
5676 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
5677 | #define $ac_tr_decl 0 | |
5678 | EOF | |
5679 | ||
5680 | fi | |
5681 | ||
5682 | done | |
5683 | if test x = y ; then | |
5684 | cat >> confdefs.h <<\EOF | |
5685 | #define HAVE_DECL_GETOPT 1 | |
5686 | EOF | |
5687 | fi | |
5688 | ||
5689 | ||
5ee754fc MK |
5690 | # ------------------ # |
5691 | # Checks for types. # | |
5692 | # ------------------ # | |
5693 | ||
5694 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
78434e59 | 5695 | echo "configure:5696: checking return type of signal handlers" >&5 |
5ee754fc | 5696 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5697 | echo $ac_n "(cached) $ac_c" 1>&6 |
5698 | else | |
5699 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5700 | #line 5701 "configure" |
c906108c SS |
5701 | #include "confdefs.h" |
5702 | #include <sys/types.h> | |
5ee754fc MK |
5703 | #include <signal.h> |
5704 | #ifdef signal | |
5705 | #undef signal | |
c906108c | 5706 | #endif |
5ee754fc MK |
5707 | #ifdef __cplusplus |
5708 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5709 | #else | |
5710 | void (*signal ()) (); | |
c906108c SS |
5711 | #endif |
5712 | ||
5ee754fc MK |
5713 | int main() { |
5714 | int i; | |
5715 | ; return 0; } | |
c906108c | 5716 | EOF |
78434e59 | 5717 | if { (eval echo configure:5718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5718 | rm -rf conftest* |
5ee754fc | 5719 | ac_cv_type_signal=void |
c906108c | 5720 | else |
5ee754fc MK |
5721 | echo "configure: failed program was:" >&5 |
5722 | cat conftest.$ac_ext >&5 | |
c906108c | 5723 | rm -rf conftest* |
5ee754fc | 5724 | ac_cv_type_signal=int |
c906108c SS |
5725 | fi |
5726 | rm -f conftest* | |
c906108c SS |
5727 | fi |
5728 | ||
5ee754fc MK |
5729 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5730 | cat >> confdefs.h <<EOF | |
5731 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5732 | EOF |
5733 | ||
c906108c SS |
5734 | |
5735 | ||
5ee754fc MK |
5736 | # ------------------------------------- # |
5737 | # Checks for compiler characteristics. # | |
5738 | # ------------------------------------- # | |
5739 | ||
c906108c | 5740 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
78434e59 | 5741 | echo "configure:5742: checking for working const" >&5 |
c906108c SS |
5742 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5743 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5744 | else | |
5745 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5746 | #line 5747 "configure" |
c906108c SS |
5747 | #include "confdefs.h" |
5748 | ||
5749 | int main() { | |
5750 | ||
5751 | /* Ultrix mips cc rejects this. */ | |
5752 | typedef int charset[2]; const charset x; | |
5753 | /* SunOS 4.1.1 cc rejects this. */ | |
5754 | char const *const *ccp; | |
5755 | char **p; | |
5756 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5757 | struct point {int x, y;}; | |
5758 | static struct point const zero = {0,0}; | |
5759 | /* AIX XL C 1.02.0.0 rejects this. | |
5760 | It does not let you subtract one const X* pointer from another in an arm | |
5761 | of an if-expression whose if-part is not a constant expression */ | |
5762 | const char *g = "string"; | |
5763 | ccp = &g + (g ? g-g : 0); | |
5764 | /* HPUX 7.0 cc rejects these. */ | |
5765 | ++ccp; | |
5766 | p = (char**) ccp; | |
5767 | ccp = (char const *const *) p; | |
5768 | { /* SCO 3.2v4 cc rejects this. */ | |
5769 | char *t; | |
5770 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5771 | ||
5772 | *t++ = 0; | |
5773 | } | |
5774 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5775 | int x[] = {25, 17}; | |
5776 | const int *foo = &x[0]; | |
5777 | ++foo; | |
5778 | } | |
5779 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5780 | typedef const int *iptr; | |
5781 | iptr p = 0; | |
5782 | ++p; | |
5783 | } | |
5784 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5785 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5786 | struct s { int j; const int *ap[3]; }; | |
5787 | struct s *b; b->j = 5; | |
5788 | } | |
5789 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5790 | const int foo = 10; | |
5791 | } | |
5792 | ||
5793 | ; return 0; } | |
5794 | EOF | |
78434e59 | 5795 | if { (eval echo configure:5796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5796 | rm -rf conftest* |
5797 | ac_cv_c_const=yes | |
5798 | else | |
5799 | echo "configure: failed program was:" >&5 | |
5800 | cat conftest.$ac_ext >&5 | |
5801 | rm -rf conftest* | |
5802 | ac_cv_c_const=no | |
5803 | fi | |
5804 | rm -f conftest* | |
5805 | fi | |
5806 | ||
5807 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5808 | if test $ac_cv_c_const = no; then | |
5809 | cat >> confdefs.h <<\EOF | |
5810 | #define const | |
5811 | EOF | |
5812 | ||
5813 | fi | |
5814 | ||
bce58c09 | 5815 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
78434e59 | 5816 | echo "configure:5817: checking for inline" >&5 |
bce58c09 JB |
5817 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5818 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5819 | else | |
5820 | ac_cv_c_inline=no | |
5821 | for ac_kw in inline __inline__ __inline; do | |
5822 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5823 | #line 5824 "configure" |
bce58c09 JB |
5824 | #include "confdefs.h" |
5825 | ||
5826 | int main() { | |
5827 | } $ac_kw foo() { | |
5828 | ; return 0; } | |
5829 | EOF | |
78434e59 | 5830 | if { (eval echo configure:5831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5831 | rm -rf conftest* |
5832 | ac_cv_c_inline=$ac_kw; break | |
5833 | else | |
5834 | echo "configure: failed program was:" >&5 | |
5835 | cat conftest.$ac_ext >&5 | |
5836 | fi | |
5837 | rm -f conftest* | |
5838 | done | |
5839 | ||
5840 | fi | |
5841 | ||
5842 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5843 | case "$ac_cv_c_inline" in | |
5844 | inline | yes) ;; | |
5845 | no) cat >> confdefs.h <<\EOF | |
5846 | #define inline | |
5847 | EOF | |
5848 | ;; | |
5849 | *) cat >> confdefs.h <<EOF | |
5850 | #define inline $ac_cv_c_inline | |
5851 | EOF | |
5852 | ;; | |
5853 | esac | |
5854 | ||
c906108c | 5855 | |
5ee754fc MK |
5856 | # ------------------------------ # |
5857 | # Checks for library functions. # | |
5858 | # ------------------------------ # | |
5859 | ||
46711df8 MK |
5860 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5861 | # for constant arguments. Useless! | |
5862 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
78434e59 | 5863 | echo "configure:5864: checking for working alloca.h" >&5 |
46711df8 MK |
5864 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5866 | else | |
5867 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5868 | #line 5869 "configure" |
46711df8 MK |
5869 | #include "confdefs.h" |
5870 | #include <alloca.h> | |
5871 | int main() { | |
5872 | char *p = alloca(2 * sizeof(int)); | |
5873 | ; return 0; } | |
5874 | EOF | |
78434e59 | 5875 | if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5876 | rm -rf conftest* |
5877 | ac_cv_header_alloca_h=yes | |
5878 | else | |
5879 | echo "configure: failed program was:" >&5 | |
5880 | cat conftest.$ac_ext >&5 | |
5881 | rm -rf conftest* | |
5882 | ac_cv_header_alloca_h=no | |
5883 | fi | |
5884 | rm -f conftest* | |
5885 | fi | |
5886 | ||
5887 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5888 | if test $ac_cv_header_alloca_h = yes; then | |
5889 | cat >> confdefs.h <<\EOF | |
5890 | #define HAVE_ALLOCA_H 1 | |
5891 | EOF | |
5892 | ||
5893 | fi | |
5894 | ||
5895 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
78434e59 | 5896 | echo "configure:5897: checking for alloca" >&5 |
46711df8 MK |
5897 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5898 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5899 | else | |
5900 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5901 | #line 5902 "configure" |
46711df8 MK |
5902 | #include "confdefs.h" |
5903 | ||
5904 | #ifdef __GNUC__ | |
5905 | # define alloca __builtin_alloca | |
5906 | #else | |
5907 | # ifdef _MSC_VER | |
5908 | # include <malloc.h> | |
5909 | # define alloca _alloca | |
5910 | # else | |
5911 | # if HAVE_ALLOCA_H | |
5912 | # include <alloca.h> | |
5913 | # else | |
5914 | # ifdef _AIX | |
5915 | #pragma alloca | |
5916 | # else | |
5917 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5918 | char *alloca (); | |
5919 | # endif | |
5920 | # endif | |
5921 | # endif | |
5922 | # endif | |
5923 | #endif | |
5924 | ||
5925 | int main() { | |
5926 | char *p = (char *) alloca(1); | |
5927 | ; return 0; } | |
5928 | EOF | |
78434e59 | 5929 | if { (eval echo configure:5930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5930 | rm -rf conftest* |
5931 | ac_cv_func_alloca_works=yes | |
5932 | else | |
5933 | echo "configure: failed program was:" >&5 | |
5934 | cat conftest.$ac_ext >&5 | |
5935 | rm -rf conftest* | |
5936 | ac_cv_func_alloca_works=no | |
5937 | fi | |
5938 | rm -f conftest* | |
5939 | fi | |
5940 | ||
5941 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5942 | if test $ac_cv_func_alloca_works = yes; then | |
5943 | cat >> confdefs.h <<\EOF | |
5944 | #define HAVE_ALLOCA 1 | |
5945 | EOF | |
5946 | ||
5947 | fi | |
5948 | ||
5949 | if test $ac_cv_func_alloca_works = no; then | |
5950 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5951 | # that cause trouble. Some versions do not even contain alloca or | |
5952 | # contain a buggy version. If you still want to use their alloca, | |
5953 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5954 | ALLOCA=alloca.${ac_objext} | |
5955 | cat >> confdefs.h <<\EOF | |
5956 | #define C_ALLOCA 1 | |
5957 | EOF | |
5958 | ||
5959 | ||
5960 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
78434e59 | 5961 | echo "configure:5962: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5962 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5963 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5964 | else | |
5965 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5966 | #line 5967 "configure" |
46711df8 MK |
5967 | #include "confdefs.h" |
5968 | #if defined(CRAY) && ! defined(CRAY2) | |
5969 | webecray | |
5970 | #else | |
5971 | wenotbecray | |
5972 | #endif | |
5973 | ||
5974 | EOF | |
5975 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5976 | egrep "webecray" >/dev/null 2>&1; then | |
5977 | rm -rf conftest* | |
5978 | ac_cv_os_cray=yes | |
5979 | else | |
5980 | rm -rf conftest* | |
5981 | ac_cv_os_cray=no | |
5982 | fi | |
5983 | rm -f conftest* | |
5984 | ||
5985 | fi | |
5986 | ||
5987 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5988 | if test $ac_cv_os_cray = yes; then | |
5989 | for ac_func in _getb67 GETB67 getb67; do | |
5990 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 5991 | echo "configure:5992: checking for $ac_func" >&5 |
46711df8 MK |
5992 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5993 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5994 | else | |
5995 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 5996 | #line 5997 "configure" |
46711df8 MK |
5997 | #include "confdefs.h" |
5998 | /* System header to define __stub macros and hopefully few prototypes, | |
5999 | which can conflict with char $ac_func(); below. */ | |
6000 | #include <assert.h> | |
6001 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6002 | /* We use char because int might match the return type of a gcc2 | |
6003 | builtin and then its argument prototype would still apply. */ | |
6004 | char $ac_func(); | |
6005 | ||
6006 | int main() { | |
6007 | ||
6008 | /* The GNU C library defines this for functions which it implements | |
6009 | to always fail with ENOSYS. Some functions are actually named | |
6010 | something starting with __ and the normal name is an alias. */ | |
6011 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6012 | choke me | |
6013 | #else | |
6014 | $ac_func(); | |
6015 | #endif | |
6016 | ||
6017 | ; return 0; } | |
6018 | EOF | |
78434e59 | 6019 | if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6020 | rm -rf conftest* |
6021 | eval "ac_cv_func_$ac_func=yes" | |
6022 | else | |
6023 | echo "configure: failed program was:" >&5 | |
6024 | cat conftest.$ac_ext >&5 | |
6025 | rm -rf conftest* | |
6026 | eval "ac_cv_func_$ac_func=no" | |
6027 | fi | |
6028 | rm -f conftest* | |
6029 | fi | |
6030 | ||
6031 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6032 | echo "$ac_t""yes" 1>&6 | |
6033 | cat >> confdefs.h <<EOF | |
6034 | #define CRAY_STACKSEG_END $ac_func | |
6035 | EOF | |
6036 | ||
6037 | break | |
6038 | else | |
6039 | echo "$ac_t""no" 1>&6 | |
6040 | fi | |
6041 | ||
6042 | done | |
6043 | fi | |
6044 | ||
6045 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
78434e59 | 6046 | echo "configure:6047: checking stack direction for C alloca" >&5 |
46711df8 MK |
6047 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
6048 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6049 | else | |
6050 | if test "$cross_compiling" = yes; then | |
6051 | ac_cv_c_stack_direction=0 | |
6052 | else | |
6053 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6054 | #line 6055 "configure" |
46711df8 MK |
6055 | #include "confdefs.h" |
6056 | find_stack_direction () | |
6057 | { | |
6058 | static char *addr = 0; | |
6059 | auto char dummy; | |
6060 | if (addr == 0) | |
6061 | { | |
6062 | addr = &dummy; | |
6063 | return find_stack_direction (); | |
6064 | } | |
6065 | else | |
6066 | return (&dummy > addr) ? 1 : -1; | |
6067 | } | |
6068 | main () | |
6069 | { | |
6070 | exit (find_stack_direction() < 0); | |
6071 | } | |
6072 | EOF | |
78434e59 | 6073 | if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
6074 | then |
6075 | ac_cv_c_stack_direction=1 | |
6076 | else | |
6077 | echo "configure: failed program was:" >&5 | |
6078 | cat conftest.$ac_ext >&5 | |
6079 | rm -fr conftest* | |
6080 | ac_cv_c_stack_direction=-1 | |
6081 | fi | |
6082 | rm -fr conftest* | |
6083 | fi | |
6084 | ||
6085 | fi | |
6086 | ||
6087 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
6088 | cat >> confdefs.h <<EOF | |
6089 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6090 | EOF | |
6091 | ||
6092 | fi | |
6093 | ||
27ca5dad | 6094 | for ac_hdr in unistd.h |
97bf5e38 MK |
6095 | do |
6096 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
6097 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
78434e59 | 6098 | echo "configure:6099: checking for $ac_hdr" >&5 |
74c1b268 AC |
6099 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6100 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6101 | else | |
6102 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6103 | #line 6104 "configure" |
74c1b268 | 6104 | #include "confdefs.h" |
97bf5e38 | 6105 | #include <$ac_hdr> |
74c1b268 AC |
6106 | EOF |
6107 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
78434e59 | 6108 | { (eval echo configure:6109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
6109 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6110 | if test -z "$ac_err"; then | |
6111 | rm -rf conftest* | |
6112 | eval "ac_cv_header_$ac_safe=yes" | |
6113 | else | |
6114 | echo "$ac_err" >&5 | |
6115 | echo "configure: failed program was:" >&5 | |
6116 | cat conftest.$ac_ext >&5 | |
6117 | rm -rf conftest* | |
6118 | eval "ac_cv_header_$ac_safe=no" | |
6119 | fi | |
6120 | rm -f conftest* | |
6121 | fi | |
6122 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6123 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
6124 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
6125 | cat >> confdefs.h <<EOF | |
6126 | #define $ac_tr_hdr 1 | |
74c1b268 | 6127 | EOF |
97bf5e38 | 6128 | |
74c1b268 AC |
6129 | else |
6130 | echo "$ac_t""no" 1>&6 | |
6131 | fi | |
97bf5e38 | 6132 | done |
74c1b268 | 6133 | |
97bf5e38 MK |
6134 | for ac_func in getpagesize |
6135 | do | |
6136 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6137 | echo "configure:6138: checking for $ac_func" >&5 |
97bf5e38 | 6138 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
6139 | echo $ac_n "(cached) $ac_c" 1>&6 |
6140 | else | |
6141 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6142 | #line 6143 "configure" |
74c1b268 AC |
6143 | #include "confdefs.h" |
6144 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 6145 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
6146 | #include <assert.h> |
6147 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6148 | /* We use char because int might match the return type of a gcc2 | |
6149 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 6150 | char $ac_func(); |
74c1b268 AC |
6151 | |
6152 | int main() { | |
6153 | ||
6154 | /* The GNU C library defines this for functions which it implements | |
6155 | to always fail with ENOSYS. Some functions are actually named | |
6156 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 6157 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
6158 | choke me |
6159 | #else | |
97bf5e38 | 6160 | $ac_func(); |
74c1b268 AC |
6161 | #endif |
6162 | ||
6163 | ; return 0; } | |
6164 | EOF | |
78434e59 | 6165 | if { (eval echo configure:6166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 6166 | rm -rf conftest* |
97bf5e38 | 6167 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
6168 | else |
6169 | echo "configure: failed program was:" >&5 | |
6170 | cat conftest.$ac_ext >&5 | |
6171 | rm -rf conftest* | |
97bf5e38 | 6172 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
6173 | fi |
6174 | rm -f conftest* | |
6175 | fi | |
6176 | ||
97bf5e38 | 6177 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 6178 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
6179 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6180 | cat >> confdefs.h <<EOF | |
6181 | #define $ac_tr_func 1 | |
6182 | EOF | |
6183 | ||
74c1b268 AC |
6184 | else |
6185 | echo "$ac_t""no" 1>&6 | |
6186 | fi | |
97bf5e38 | 6187 | done |
74c1b268 | 6188 | |
97bf5e38 | 6189 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
78434e59 | 6190 | echo "configure:6191: checking for working mmap" >&5 |
97bf5e38 MK |
6191 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6193 | else | |
6194 | if test "$cross_compiling" = yes; then | |
6195 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
6196 | else |
6197 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6198 | #line 6199 "configure" |
74c1b268 | 6199 | #include "confdefs.h" |
97bf5e38 MK |
6200 | |
6201 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6202 | Here is a matrix of mmap possibilities: | |
6203 | mmap private not fixed | |
6204 | mmap private fixed at somewhere currently unmapped | |
6205 | mmap private fixed at somewhere already mapped | |
6206 | mmap shared not fixed | |
6207 | mmap shared fixed at somewhere currently unmapped | |
6208 | mmap shared fixed at somewhere already mapped | |
6209 | For private mappings, we should verify that changes cannot be read() | |
6210 | back from the file, nor mmap's back from the file at a different | |
6211 | address. (There have been systems where private was not correctly | |
6212 | implemented like the infamous i386 svr4.0, and systems where the | |
6213 | VM page cache was not coherent with the filesystem buffer cache | |
6214 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6215 | For shared mappings, we should conversely verify that changes get | |
6216 | propogated back to all the places they're supposed to be. | |
6217 | ||
6218 | Grep wants private fixed already mapped. | |
6219 | The main things grep needs to know about mmap are: | |
6220 | * does it exist and is it safe to write into the mmap'd area | |
6221 | * how to use it (BSD variants) */ | |
74c1b268 | 6222 | #include <sys/types.h> |
97bf5e38 MK |
6223 | #include <fcntl.h> |
6224 | #include <sys/mman.h> | |
6225 | ||
6226 | /* This mess was copied from the GNU getpagesize.h. */ | |
6227 | #ifndef HAVE_GETPAGESIZE | |
27ca5dad MC |
6228 | # ifdef HAVE_UNISTD_H |
6229 | # include <unistd.h> | |
6230 | # endif | |
97bf5e38 MK |
6231 | |
6232 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6233 | # ifndef HAVE_SYS_PARAM_H | |
6234 | # define HAVE_SYS_PARAM_H 1 | |
6235 | # endif | |
6236 | ||
6237 | # ifdef _SC_PAGESIZE | |
6238 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6239 | # else /* no _SC_PAGESIZE */ | |
6240 | # ifdef HAVE_SYS_PARAM_H | |
6241 | # include <sys/param.h> | |
6242 | # ifdef EXEC_PAGESIZE | |
6243 | # define getpagesize() EXEC_PAGESIZE | |
6244 | # else /* no EXEC_PAGESIZE */ | |
6245 | # ifdef NBPG | |
6246 | # define getpagesize() NBPG * CLSIZE | |
6247 | # ifndef CLSIZE | |
6248 | # define CLSIZE 1 | |
6249 | # endif /* no CLSIZE */ | |
6250 | # else /* no NBPG */ | |
6251 | # ifdef NBPC | |
6252 | # define getpagesize() NBPC | |
6253 | # else /* no NBPC */ | |
6254 | # ifdef PAGESIZE | |
6255 | # define getpagesize() PAGESIZE | |
6256 | # endif /* PAGESIZE */ | |
6257 | # endif /* no NBPC */ | |
6258 | # endif /* no NBPG */ | |
6259 | # endif /* no EXEC_PAGESIZE */ | |
6260 | # else /* no HAVE_SYS_PARAM_H */ | |
6261 | # define getpagesize() 8192 /* punt totally */ | |
6262 | # endif /* no HAVE_SYS_PARAM_H */ | |
6263 | # endif /* no _SC_PAGESIZE */ | |
6264 | ||
6265 | #endif /* no HAVE_GETPAGESIZE */ | |
6266 | ||
74c1b268 | 6267 | #ifdef __cplusplus |
97bf5e38 | 6268 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 6269 | #else |
97bf5e38 | 6270 | char *malloc(); |
74c1b268 | 6271 | #endif |
74c1b268 | 6272 | |
97bf5e38 MK |
6273 | int |
6274 | main() | |
6275 | { | |
6276 | char *data, *data2, *data3; | |
6277 | int i, pagesize; | |
6278 | int fd; | |
74c1b268 | 6279 | |
97bf5e38 | 6280 | pagesize = getpagesize(); |
74c1b268 | 6281 | |
97bf5e38 MK |
6282 | /* |
6283 | * First, make a file with some known garbage in it. | |
6284 | */ | |
6285 | data = malloc(pagesize); | |
6286 | if (!data) | |
6287 | exit(1); | |
6288 | for (i = 0; i < pagesize; ++i) | |
6289 | *(data + i) = rand(); | |
6290 | umask(0); | |
6291 | fd = creat("conftestmmap", 0600); | |
6292 | if (fd < 0) | |
6293 | exit(1); | |
6294 | if (write(fd, data, pagesize) != pagesize) | |
6295 | exit(1); | |
6296 | close(fd); | |
74c1b268 | 6297 | |
97bf5e38 MK |
6298 | /* |
6299 | * Next, try to mmap the file at a fixed address which | |
6300 | * already has something else allocated at it. If we can, | |
6301 | * also make sure that we see the same garbage. | |
6302 | */ | |
6303 | fd = open("conftestmmap", O_RDWR); | |
6304 | if (fd < 0) | |
6305 | exit(1); | |
6306 | data2 = malloc(2 * pagesize); | |
6307 | if (!data2) | |
6308 | exit(1); | |
6309 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6310 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6311 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6312 | exit(1); | |
6313 | for (i = 0; i < pagesize; ++i) | |
6314 | if (*(data + i) != *(data2 + i)) | |
6315 | exit(1); | |
74c1b268 | 6316 | |
97bf5e38 MK |
6317 | /* |
6318 | * Finally, make sure that changes to the mapped area | |
6319 | * do not percolate back to the file as seen by read(). | |
6320 | * (This is a bug on some variants of i386 svr4.0.) | |
6321 | */ | |
6322 | for (i = 0; i < pagesize; ++i) | |
6323 | *(data2 + i) = *(data2 + i) + 1; | |
6324 | data3 = malloc(pagesize); | |
6325 | if (!data3) | |
6326 | exit(1); | |
6327 | if (read(fd, data3, pagesize) != pagesize) | |
6328 | exit(1); | |
6329 | for (i = 0; i < pagesize; ++i) | |
6330 | if (*(data + i) != *(data3 + i)) | |
6331 | exit(1); | |
6332 | close(fd); | |
6333 | unlink("conftestmmap"); | |
6334 | exit(0); | |
74c1b268 | 6335 | } |
97bf5e38 | 6336 | |
74c1b268 | 6337 | EOF |
78434e59 | 6338 | if { (eval echo configure:6339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6339 | then |
97bf5e38 | 6340 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6341 | else |
6342 | echo "configure: failed program was:" >&5 | |
6343 | cat conftest.$ac_ext >&5 | |
6344 | rm -fr conftest* | |
97bf5e38 | 6345 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6346 | fi |
6347 | rm -fr conftest* | |
6348 | fi | |
6349 | ||
6350 | fi | |
6351 | ||
97bf5e38 MK |
6352 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6353 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6354 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6355 | #define HAVE_MMAP 1 |
74c1b268 AC |
6356 | EOF |
6357 | ||
6358 | fi | |
6359 | ||
97bf5e38 | 6360 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
78434e59 | 6361 | echo "configure:6362: checking for pid_t" >&5 |
97bf5e38 | 6362 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6363 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6364 | else |
6365 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6366 | #line 6367 "configure" |
0200359f | 6367 | #include "confdefs.h" |
97bf5e38 MK |
6368 | #include <sys/types.h> |
6369 | #if STDC_HEADERS | |
6370 | #include <stdlib.h> | |
6371 | #include <stddef.h> | |
0200359f | 6372 | #endif |
0200359f | 6373 | EOF |
97bf5e38 MK |
6374 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6375 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6376 | rm -rf conftest* | |
6377 | ac_cv_type_pid_t=yes | |
0200359f | 6378 | else |
97bf5e38 MK |
6379 | rm -rf conftest* |
6380 | ac_cv_type_pid_t=no | |
0200359f | 6381 | fi |
97bf5e38 | 6382 | rm -f conftest* |
0200359f MK |
6383 | |
6384 | fi | |
97bf5e38 MK |
6385 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6386 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6387 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6388 | #define pid_t int |
0200359f MK |
6389 | EOF |
6390 | ||
6391 | fi | |
6392 | ||
97bf5e38 MK |
6393 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6394 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
78434e59 | 6395 | echo "configure:6396: checking for vfork.h" >&5 |
97bf5e38 | 6396 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6397 | echo $ac_n "(cached) $ac_c" 1>&6 |
6398 | else | |
6399 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6400 | #line 6401 "configure" |
72473524 | 6401 | #include "confdefs.h" |
97bf5e38 | 6402 | #include <vfork.h> |
72473524 | 6403 | EOF |
97bf5e38 | 6404 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
78434e59 | 6405 | { (eval echo configure:6406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6406 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6407 | if test -z "$ac_err"; then | |
72473524 | 6408 | rm -rf conftest* |
97bf5e38 | 6409 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6410 | else |
97bf5e38 | 6411 | echo "$ac_err" >&5 |
72473524 DJ |
6412 | echo "configure: failed program was:" >&5 |
6413 | cat conftest.$ac_ext >&5 | |
6414 | rm -rf conftest* | |
97bf5e38 | 6415 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6416 | fi |
6417 | rm -f conftest* | |
6418 | fi | |
97bf5e38 MK |
6419 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6420 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6421 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6422 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6423 | EOF |
6424 | ||
97bf5e38 MK |
6425 | else |
6426 | echo "$ac_t""no" 1>&6 | |
72473524 | 6427 | fi |
c906108c | 6428 | |
97bf5e38 | 6429 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
78434e59 | 6430 | echo "configure:6431: checking for working vfork" >&5 |
97bf5e38 MK |
6431 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6432 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6433 | else | |
6434 | if test "$cross_compiling" = yes; then | |
6435 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
78434e59 | 6436 | echo "configure:6437: checking for vfork" >&5 |
97bf5e38 | 6437 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6438 | echo $ac_n "(cached) $ac_c" 1>&6 |
6439 | else | |
6440 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6441 | #line 6442 "configure" |
2b2d558c | 6442 | #include "confdefs.h" |
97bf5e38 MK |
6443 | /* System header to define __stub macros and hopefully few prototypes, |
6444 | which can conflict with char vfork(); below. */ | |
6445 | #include <assert.h> | |
6446 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6447 | /* We use char because int might match the return type of a gcc2 | |
6448 | builtin and then its argument prototype would still apply. */ | |
6449 | char vfork(); | |
2b2d558c MK |
6450 | |
6451 | int main() { | |
97bf5e38 MK |
6452 | |
6453 | /* The GNU C library defines this for functions which it implements | |
6454 | to always fail with ENOSYS. Some functions are actually named | |
6455 | something starting with __ and the normal name is an alias. */ | |
6456 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6457 | choke me | |
6458 | #else | |
6459 | vfork(); | |
6460 | #endif | |
6461 | ||
2b2d558c MK |
6462 | ; return 0; } |
6463 | EOF | |
78434e59 | 6464 | if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6465 | rm -rf conftest* |
97bf5e38 | 6466 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6467 | else |
6468 | echo "configure: failed program was:" >&5 | |
6469 | cat conftest.$ac_ext >&5 | |
6470 | rm -rf conftest* | |
97bf5e38 | 6471 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6472 | fi |
6473 | rm -f conftest* | |
6474 | fi | |
6475 | ||
97bf5e38 MK |
6476 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6477 | echo "$ac_t""yes" 1>&6 | |
6478 | : | |
6479 | else | |
6480 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6481 | fi |
6482 | ||
97bf5e38 | 6483 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6484 | else |
6485 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6486 | #line 6487 "configure" |
7dfa765c | 6487 | #include "confdefs.h" |
97bf5e38 MK |
6488 | /* Thanks to Paul Eggert for this test. */ |
6489 | #include <stdio.h> | |
6490 | #include <sys/types.h> | |
6491 | #include <sys/stat.h> | |
6492 | #ifdef HAVE_UNISTD_H | |
6493 | #include <unistd.h> | |
6494 | #endif | |
6495 | #ifdef HAVE_VFORK_H | |
6496 | #include <vfork.h> | |
6497 | #endif | |
6498 | /* On some sparc systems, changes by the child to local and incoming | |
6499 | argument registers are propagated back to the parent. | |
6500 | The compiler is told about this with #include <vfork.h>, | |
6501 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6502 | Test for this by using a static variable whose address | |
6503 | is put into a register that is clobbered by the vfork. */ | |
6504 | static | |
6505 | #ifdef __cplusplus | |
6506 | sparc_address_test (int arg) | |
6507 | #else | |
6508 | sparc_address_test (arg) int arg; | |
6509 | #endif | |
6510 | { | |
6511 | static pid_t child; | |
6512 | if (!child) { | |
6513 | child = vfork (); | |
6514 | if (child < 0) { | |
6515 | perror ("vfork"); | |
6516 | _exit(2); | |
6517 | } | |
6518 | if (!child) { | |
6519 | arg = getpid(); | |
6520 | write(-1, "", 0); | |
6521 | _exit (arg); | |
6522 | } | |
6523 | } | |
6524 | } | |
6525 | main() { | |
6526 | pid_t parent = getpid (); | |
6527 | pid_t child; | |
7dfa765c | 6528 | |
97bf5e38 | 6529 | sparc_address_test (); |
7dfa765c | 6530 | |
97bf5e38 | 6531 | child = vfork (); |
7dfa765c | 6532 | |
97bf5e38 MK |
6533 | if (child == 0) { |
6534 | /* Here is another test for sparc vfork register problems. | |
6535 | This test uses lots of local variables, at least | |
6536 | as many local variables as main has allocated so far | |
6537 | including compiler temporaries. 4 locals are enough for | |
6538 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6539 | A buggy compiler should reuse the register of parent | |
6540 | for one of the local variables, since it will think that | |
6541 | parent can't possibly be used any more in this routine. | |
6542 | Assigning to the local variable will thus munge parent | |
6543 | in the parent process. */ | |
6544 | pid_t | |
6545 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6546 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6547 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6548 | use the same hardware register for all 8 local variables. */ | |
6549 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6550 | || p != p5 || p != p6 || p != p7) | |
6551 | _exit(1); | |
7dfa765c | 6552 | |
97bf5e38 MK |
6553 | /* On some systems (e.g. IRIX 3.3), |
6554 | vfork doesn't separate parent from child file descriptors. | |
6555 | If the child closes a descriptor before it execs or exits, | |
6556 | this munges the parent's descriptor as well. | |
6557 | Test for this by closing stdout in the child. */ | |
6558 | _exit(close(fileno(stdout)) != 0); | |
6559 | } else { | |
6560 | int status; | |
6561 | struct stat st; | |
64bb1671 | 6562 | |
97bf5e38 MK |
6563 | while (wait(&status) != child) |
6564 | ; | |
6565 | exit( | |
6566 | /* Was there some problem with vforking? */ | |
6567 | child < 0 | |
64bb1671 | 6568 | |
97bf5e38 MK |
6569 | /* Did the child fail? (This shouldn't happen.) */ |
6570 | || status | |
64bb1671 | 6571 | |
97bf5e38 MK |
6572 | /* Did the vfork/compiler bug occur? */ |
6573 | || parent != getpid() | |
6574 | ||
6575 | /* Did the file descriptor bug occur? */ | |
6576 | || fstat(fileno(stdout), &st) != 0 | |
6577 | ); | |
6578 | } | |
6579 | } | |
5c44784c | 6580 | EOF |
78434e59 | 6581 | if { (eval echo configure:6582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6582 | then |
6583 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6584 | else |
6585 | echo "configure: failed program was:" >&5 | |
6586 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6587 | rm -fr conftest* |
6588 | ac_cv_func_vfork_works=no | |
5c44784c | 6589 | fi |
97bf5e38 | 6590 | rm -fr conftest* |
5c44784c JM |
6591 | fi |
6592 | ||
0afdd437 MK |
6593 | fi |
6594 | ||
97bf5e38 MK |
6595 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6596 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6597 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6598 | #define vfork fork |
0afdd437 MK |
6599 | EOF |
6600 | ||
6601 | fi | |
6602 | ||
97bf5e38 MK |
6603 | for ac_func in canonicalize_file_name realpath |
6604 | do | |
6605 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6606 | echo "configure:6607: checking for $ac_func" >&5 |
97bf5e38 | 6607 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6608 | echo $ac_n "(cached) $ac_c" 1>&6 |
6609 | else | |
6610 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6611 | #line 6612 "configure" |
7e89e357 | 6612 | #include "confdefs.h" |
97bf5e38 MK |
6613 | /* System header to define __stub macros and hopefully few prototypes, |
6614 | which can conflict with char $ac_func(); below. */ | |
6615 | #include <assert.h> | |
6616 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6617 | /* We use char because int might match the return type of a gcc2 | |
6618 | builtin and then its argument prototype would still apply. */ | |
6619 | char $ac_func(); | |
6620 | ||
7e89e357 | 6621 | int main() { |
97bf5e38 MK |
6622 | |
6623 | /* The GNU C library defines this for functions which it implements | |
6624 | to always fail with ENOSYS. Some functions are actually named | |
6625 | something starting with __ and the normal name is an alias. */ | |
6626 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6627 | choke me | |
6628 | #else | |
6629 | $ac_func(); | |
6630 | #endif | |
6631 | ||
7e89e357 JT |
6632 | ; return 0; } |
6633 | EOF | |
78434e59 | 6634 | if { (eval echo configure:6635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6635 | rm -rf conftest* |
97bf5e38 | 6636 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6637 | else |
6638 | echo "configure: failed program was:" >&5 | |
6639 | cat conftest.$ac_ext >&5 | |
6640 | rm -rf conftest* | |
97bf5e38 | 6641 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6642 | fi |
6643 | rm -f conftest* | |
6644 | fi | |
6645 | ||
97bf5e38 MK |
6646 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6647 | echo "$ac_t""yes" 1>&6 | |
6648 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6649 | cat >> confdefs.h <<EOF | |
6650 | #define $ac_tr_func 1 | |
7e89e357 | 6651 | EOF |
97bf5e38 MK |
6652 | |
6653 | else | |
6654 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6655 | fi |
97bf5e38 | 6656 | done |
7e89e357 | 6657 | |
97bf5e38 | 6658 | for ac_func in poll |
7be570e7 JM |
6659 | do |
6660 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6661 | echo "configure:6662: checking for $ac_func" >&5 |
7be570e7 JM |
6662 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6663 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6664 | else | |
6665 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6666 | #line 6667 "configure" |
7be570e7 JM |
6667 | #include "confdefs.h" |
6668 | /* System header to define __stub macros and hopefully few prototypes, | |
6669 | which can conflict with char $ac_func(); below. */ | |
6670 | #include <assert.h> | |
6671 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6672 | /* We use char because int might match the return type of a gcc2 | |
6673 | builtin and then its argument prototype would still apply. */ | |
6674 | char $ac_func(); | |
6675 | ||
6676 | int main() { | |
6677 | ||
6678 | /* The GNU C library defines this for functions which it implements | |
6679 | to always fail with ENOSYS. Some functions are actually named | |
6680 | something starting with __ and the normal name is an alias. */ | |
6681 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6682 | choke me | |
6683 | #else | |
6684 | $ac_func(); | |
6685 | #endif | |
6686 | ||
6687 | ; return 0; } | |
6688 | EOF | |
78434e59 | 6689 | if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6690 | rm -rf conftest* |
6691 | eval "ac_cv_func_$ac_func=yes" | |
6692 | else | |
6693 | echo "configure: failed program was:" >&5 | |
6694 | cat conftest.$ac_ext >&5 | |
6695 | rm -rf conftest* | |
6696 | eval "ac_cv_func_$ac_func=no" | |
6697 | fi | |
6698 | rm -f conftest* | |
6699 | fi | |
6700 | ||
6701 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6702 | echo "$ac_t""yes" 1>&6 | |
6703 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6704 | cat >> confdefs.h <<EOF | |
6705 | #define $ac_tr_func 1 | |
6706 | EOF | |
6707 | ||
6708 | else | |
6709 | echo "$ac_t""no" 1>&6 | |
6710 | fi | |
6711 | done | |
6712 | ||
6713 | for ac_func in pread64 | |
6714 | do | |
6715 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6716 | echo "configure:6717: checking for $ac_func" >&5 |
14abd0fb MK |
6717 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6718 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6719 | else | |
6720 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6721 | #line 6722 "configure" |
14abd0fb MK |
6722 | #include "confdefs.h" |
6723 | /* System header to define __stub macros and hopefully few prototypes, | |
6724 | which can conflict with char $ac_func(); below. */ | |
6725 | #include <assert.h> | |
6726 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6727 | /* We use char because int might match the return type of a gcc2 | |
6728 | builtin and then its argument prototype would still apply. */ | |
6729 | char $ac_func(); | |
6730 | ||
6731 | int main() { | |
6732 | ||
6733 | /* The GNU C library defines this for functions which it implements | |
6734 | to always fail with ENOSYS. Some functions are actually named | |
6735 | something starting with __ and the normal name is an alias. */ | |
6736 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6737 | choke me | |
6738 | #else | |
6739 | $ac_func(); | |
6740 | #endif | |
6741 | ||
6742 | ; return 0; } | |
6743 | EOF | |
78434e59 | 6744 | if { (eval echo configure:6745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6745 | rm -rf conftest* |
6746 | eval "ac_cv_func_$ac_func=yes" | |
6747 | else | |
6748 | echo "configure: failed program was:" >&5 | |
6749 | cat conftest.$ac_ext >&5 | |
6750 | rm -rf conftest* | |
6751 | eval "ac_cv_func_$ac_func=no" | |
6752 | fi | |
6753 | rm -f conftest* | |
6754 | fi | |
6755 | ||
6756 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6757 | echo "$ac_t""yes" 1>&6 | |
6758 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6759 | cat >> confdefs.h <<EOF | |
6760 | #define $ac_tr_func 1 | |
6761 | EOF | |
6762 | ||
6763 | else | |
6764 | echo "$ac_t""no" 1>&6 | |
6765 | fi | |
6766 | done | |
6767 | ||
97bf5e38 MK |
6768 | for ac_func in sbrk |
6769 | do | |
6770 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6771 | echo "configure:6772: checking for $ac_func" >&5 |
97bf5e38 | 6772 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6773 | echo $ac_n "(cached) $ac_c" 1>&6 |
6774 | else | |
6775 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6776 | #line 6777 "configure" |
c906108c | 6777 | #include "confdefs.h" |
97bf5e38 MK |
6778 | /* System header to define __stub macros and hopefully few prototypes, |
6779 | which can conflict with char $ac_func(); below. */ | |
6780 | #include <assert.h> | |
6781 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6782 | /* We use char because int might match the return type of a gcc2 | |
6783 | builtin and then its argument prototype would still apply. */ | |
6784 | char $ac_func(); | |
c906108c | 6785 | |
97bf5e38 MK |
6786 | int main() { |
6787 | ||
6788 | /* The GNU C library defines this for functions which it implements | |
6789 | to always fail with ENOSYS. Some functions are actually named | |
6790 | something starting with __ and the normal name is an alias. */ | |
6791 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6792 | choke me | |
c906108c | 6793 | #else |
97bf5e38 | 6794 | $ac_func(); |
c906108c | 6795 | #endif |
97bf5e38 | 6796 | |
c906108c SS |
6797 | ; return 0; } |
6798 | EOF | |
78434e59 | 6799 | if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6800 | rm -rf conftest* |
97bf5e38 | 6801 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6802 | else |
6803 | echo "configure: failed program was:" >&5 | |
6804 | cat conftest.$ac_ext >&5 | |
6805 | rm -rf conftest* | |
97bf5e38 | 6806 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6807 | fi |
6808 | rm -f conftest* | |
6809 | fi | |
6810 | ||
97bf5e38 MK |
6811 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6812 | echo "$ac_t""yes" 1>&6 | |
6813 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6814 | cat >> confdefs.h <<EOF | |
6815 | #define $ac_tr_func 1 | |
c906108c | 6816 | EOF |
97bf5e38 MK |
6817 | |
6818 | else | |
6819 | echo "$ac_t""no" 1>&6 | |
c906108c | 6820 | fi |
97bf5e38 | 6821 | done |
c906108c | 6822 | |
97bf5e38 MK |
6823 | for ac_func in setpgid setpgrp |
6824 | do | |
6825 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6826 | echo "configure:6827: checking for $ac_func" >&5 |
97bf5e38 | 6827 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6828 | echo $ac_n "(cached) $ac_c" 1>&6 |
6829 | else | |
6830 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6831 | #line 6832 "configure" |
c906108c | 6832 | #include "confdefs.h" |
97bf5e38 MK |
6833 | /* System header to define __stub macros and hopefully few prototypes, |
6834 | which can conflict with char $ac_func(); below. */ | |
6835 | #include <assert.h> | |
6836 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6837 | /* We use char because int might match the return type of a gcc2 | |
6838 | builtin and then its argument prototype would still apply. */ | |
6839 | char $ac_func(); | |
c906108c | 6840 | |
97bf5e38 MK |
6841 | int main() { |
6842 | ||
6843 | /* The GNU C library defines this for functions which it implements | |
6844 | to always fail with ENOSYS. Some functions are actually named | |
6845 | something starting with __ and the normal name is an alias. */ | |
6846 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6847 | choke me | |
c906108c | 6848 | #else |
97bf5e38 | 6849 | $ac_func(); |
c906108c | 6850 | #endif |
97bf5e38 | 6851 | |
c906108c SS |
6852 | ; return 0; } |
6853 | EOF | |
78434e59 | 6854 | if { (eval echo configure:6855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6855 | rm -rf conftest* |
97bf5e38 | 6856 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6857 | else |
6858 | echo "configure: failed program was:" >&5 | |
6859 | cat conftest.$ac_ext >&5 | |
6860 | rm -rf conftest* | |
97bf5e38 | 6861 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6862 | fi |
6863 | rm -f conftest* | |
6864 | fi | |
6865 | ||
97bf5e38 MK |
6866 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6867 | echo "$ac_t""yes" 1>&6 | |
6868 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6869 | cat >> confdefs.h <<EOF | |
6870 | #define $ac_tr_func 1 | |
c906108c | 6871 | EOF |
97bf5e38 MK |
6872 | |
6873 | else | |
6874 | echo "$ac_t""no" 1>&6 | |
c906108c | 6875 | fi |
97bf5e38 | 6876 | done |
c906108c | 6877 | |
e1ea1d75 | 6878 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6879 | do |
6880 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6881 | echo "configure:6882: checking for $ac_func" >&5 |
97bf5e38 | 6882 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6883 | echo $ac_n "(cached) $ac_c" 1>&6 |
6884 | else | |
6885 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6886 | #line 6887 "configure" |
c906108c | 6887 | #include "confdefs.h" |
97bf5e38 MK |
6888 | /* System header to define __stub macros and hopefully few prototypes, |
6889 | which can conflict with char $ac_func(); below. */ | |
6890 | #include <assert.h> | |
6891 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6892 | /* We use char because int might match the return type of a gcc2 | |
6893 | builtin and then its argument prototype would still apply. */ | |
6894 | char $ac_func(); | |
c906108c | 6895 | |
97bf5e38 MK |
6896 | int main() { |
6897 | ||
6898 | /* The GNU C library defines this for functions which it implements | |
6899 | to always fail with ENOSYS. Some functions are actually named | |
6900 | something starting with __ and the normal name is an alias. */ | |
6901 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6902 | choke me | |
c906108c | 6903 | #else |
97bf5e38 | 6904 | $ac_func(); |
c906108c | 6905 | #endif |
97bf5e38 | 6906 | |
c906108c SS |
6907 | ; return 0; } |
6908 | EOF | |
78434e59 | 6909 | if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6910 | rm -rf conftest* |
97bf5e38 | 6911 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6912 | else |
6913 | echo "configure: failed program was:" >&5 | |
6914 | cat conftest.$ac_ext >&5 | |
6915 | rm -rf conftest* | |
97bf5e38 | 6916 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6917 | fi |
6918 | rm -f conftest* | |
6919 | fi | |
6920 | ||
97bf5e38 MK |
6921 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6922 | echo "$ac_t""yes" 1>&6 | |
6923 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6924 | cat >> confdefs.h <<EOF | |
6925 | #define $ac_tr_func 1 | |
c906108c | 6926 | EOF |
e1ea1d75 | 6927 | |
97bf5e38 MK |
6928 | else |
6929 | echo "$ac_t""no" 1>&6 | |
c906108c | 6930 | fi |
97bf5e38 | 6931 | done |
c906108c | 6932 | |
97bf5e38 MK |
6933 | for ac_func in socketpair |
6934 | do | |
6935 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6936 | echo "configure:6937: checking for $ac_func" >&5 |
97bf5e38 | 6937 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6938 | echo $ac_n "(cached) $ac_c" 1>&6 |
6939 | else | |
6940 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6941 | #line 6942 "configure" |
c906108c | 6942 | #include "confdefs.h" |
97bf5e38 MK |
6943 | /* System header to define __stub macros and hopefully few prototypes, |
6944 | which can conflict with char $ac_func(); below. */ | |
6945 | #include <assert.h> | |
6946 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6947 | /* We use char because int might match the return type of a gcc2 | |
6948 | builtin and then its argument prototype would still apply. */ | |
6949 | char $ac_func(); | |
c906108c | 6950 | |
97bf5e38 MK |
6951 | int main() { |
6952 | ||
6953 | /* The GNU C library defines this for functions which it implements | |
6954 | to always fail with ENOSYS. Some functions are actually named | |
6955 | something starting with __ and the normal name is an alias. */ | |
6956 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6957 | choke me | |
c906108c | 6958 | #else |
97bf5e38 | 6959 | $ac_func(); |
c906108c | 6960 | #endif |
97bf5e38 | 6961 | |
c906108c SS |
6962 | ; return 0; } |
6963 | EOF | |
78434e59 | 6964 | if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6965 | rm -rf conftest* |
97bf5e38 | 6966 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6967 | else |
6968 | echo "configure: failed program was:" >&5 | |
6969 | cat conftest.$ac_ext >&5 | |
6970 | rm -rf conftest* | |
97bf5e38 | 6971 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6972 | fi |
6973 | rm -f conftest* | |
6974 | fi | |
6975 | ||
97bf5e38 MK |
6976 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6977 | echo "$ac_t""yes" 1>&6 | |
6978 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6979 | cat >> confdefs.h <<EOF | |
6980 | #define $ac_tr_func 1 | |
c906108c | 6981 | EOF |
97bf5e38 MK |
6982 | |
6983 | else | |
6984 | echo "$ac_t""no" 1>&6 | |
c906108c | 6985 | fi |
97bf5e38 | 6986 | done |
c906108c | 6987 | |
b757528f JJ |
6988 | for ac_func in syscall |
6989 | do | |
6990 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
78434e59 | 6991 | echo "configure:6992: checking for $ac_func" >&5 |
b757528f JJ |
6992 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6993 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6994 | else | |
6995 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 6996 | #line 6997 "configure" |
b757528f JJ |
6997 | #include "confdefs.h" |
6998 | /* System header to define __stub macros and hopefully few prototypes, | |
6999 | which can conflict with char $ac_func(); below. */ | |
7000 | #include <assert.h> | |
7001 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7002 | /* We use char because int might match the return type of a gcc2 | |
7003 | builtin and then its argument prototype would still apply. */ | |
7004 | char $ac_func(); | |
7005 | ||
7006 | int main() { | |
7007 | ||
7008 | /* The GNU C library defines this for functions which it implements | |
7009 | to always fail with ENOSYS. Some functions are actually named | |
7010 | something starting with __ and the normal name is an alias. */ | |
7011 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7012 | choke me | |
7013 | #else | |
7014 | $ac_func(); | |
7015 | #endif | |
7016 | ||
7017 | ; return 0; } | |
7018 | EOF | |
78434e59 | 7019 | if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
7020 | rm -rf conftest* |
7021 | eval "ac_cv_func_$ac_func=yes" | |
7022 | else | |
7023 | echo "configure: failed program was:" >&5 | |
7024 | cat conftest.$ac_ext >&5 | |
7025 | rm -rf conftest* | |
7026 | eval "ac_cv_func_$ac_func=no" | |
7027 | fi | |
7028 | rm -f conftest* | |
7029 | fi | |
7030 | ||
7031 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7032 | echo "$ac_t""yes" 1>&6 | |
7033 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7034 | cat >> confdefs.h <<EOF | |
7035 | #define $ac_tr_func 1 | |
7036 | EOF | |
7037 | ||
7038 | else | |
7039 | echo "$ac_t""no" 1>&6 | |
7040 | fi | |
7041 | done | |
7042 | ||
97bf5e38 MK |
7043 | |
7044 | if test "$cross_compiling" = no; then | |
7045 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
78434e59 | 7046 | echo "configure:7047: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7047 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 7048 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
7049 | else |
7050 | if test "$cross_compiling" = yes; then | |
7051 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
7052 | else |
7053 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7054 | #line 7055 "configure" |
c906108c SS |
7055 | #include "confdefs.h" |
7056 | ||
c906108c SS |
7057 | #ifdef HAVE_UNISTD_H |
7058 | #include <unistd.h> | |
7059 | #endif | |
97bf5e38 MK |
7060 | |
7061 | /* | |
7062 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
7063 | * successfully. | |
7064 | */ | |
7065 | main() | |
7066 | { | |
7067 | if (setpgrp(1,1) == -1) | |
7068 | exit(0); | |
7069 | else | |
7070 | exit(1); | |
7071 | } | |
7072 | ||
c906108c | 7073 | EOF |
78434e59 | 7074 | if { (eval echo configure:7075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7075 | then |
7076 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
7077 | else |
7078 | echo "configure: failed program was:" >&5 | |
7079 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7080 | rm -fr conftest* |
7081 | ac_cv_func_setpgrp_void=yes | |
c906108c | 7082 | fi |
97bf5e38 | 7083 | rm -fr conftest* |
c906108c SS |
7084 | fi |
7085 | ||
97bf5e38 MK |
7086 | |
7087 | fi | |
7088 | ||
7089 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
7090 | if test $ac_cv_func_setpgrp_void = yes; then | |
7091 | cat >> confdefs.h <<\EOF | |
7092 | #define SETPGRP_VOID 1 | |
c906108c SS |
7093 | EOF |
7094 | ||
7095 | fi | |
7096 | ||
97bf5e38 MK |
7097 | else |
7098 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
78434e59 | 7099 | echo "configure:7100: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7100 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
7101 | echo $ac_n "(cached) $ac_c" 1>&6 |
7102 | else | |
7103 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7104 | #line 7105 "configure" |
b83266a0 SS |
7105 | #include "confdefs.h" |
7106 | ||
b83266a0 | 7107 | #include <unistd.h> |
97bf5e38 | 7108 | |
b83266a0 | 7109 | int main() { |
97bf5e38 MK |
7110 | |
7111 | if (setpgrp(1,1) == -1) | |
7112 | exit (0); | |
7113 | else | |
7114 | exit (1); | |
7115 | ||
b83266a0 SS |
7116 | ; return 0; } |
7117 | EOF | |
78434e59 | 7118 | if { (eval echo configure:7119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 7119 | rm -rf conftest* |
97bf5e38 | 7120 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
7121 | else |
7122 | echo "configure: failed program was:" >&5 | |
7123 | cat conftest.$ac_ext >&5 | |
7124 | rm -rf conftest* | |
97bf5e38 | 7125 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
7126 | fi |
7127 | rm -f conftest* | |
7128 | fi | |
7129 | ||
97bf5e38 MK |
7130 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
7131 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 7132 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7133 | #define SETPGRP_VOID 1 |
b83266a0 SS |
7134 | EOF |
7135 | ||
97bf5e38 | 7136 | fi |
b83266a0 SS |
7137 | fi |
7138 | ||
97bf5e38 MK |
7139 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
7140 | # since sigsetjmp might only be defined as a macro. | |
7141 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
78434e59 | 7142 | echo "configure:7143: checking for sigsetjmp" >&5 |
97bf5e38 | 7143 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
7144 | echo $ac_n "(cached) $ac_c" 1>&6 |
7145 | else | |
7146 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7147 | #line 7148 "configure" |
a4db0f07 RH |
7148 | #include "confdefs.h" |
7149 | ||
97bf5e38 MK |
7150 | #include <setjmp.h> |
7151 | ||
a4db0f07 | 7152 | int main() { |
97bf5e38 | 7153 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
7154 | ; return 0; } |
7155 | EOF | |
78434e59 | 7156 | if { (eval echo configure:7157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 7157 | rm -rf conftest* |
97bf5e38 | 7158 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
7159 | else |
7160 | echo "configure: failed program was:" >&5 | |
7161 | cat conftest.$ac_ext >&5 | |
7162 | rm -rf conftest* | |
97bf5e38 | 7163 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
7164 | fi |
7165 | rm -f conftest* | |
7166 | fi | |
7167 | ||
97bf5e38 MK |
7168 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
7169 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 7170 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7171 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
7172 | EOF |
7173 | ||
7174 | fi | |
c906108c | 7175 | |
06825bd1 MK |
7176 | # Assume we'll default to using the included libiberty regex. |
7177 | gdb_use_included_regex=yes | |
7178 | ||
7179 | # However, if the system regex is GNU regex, then default to *not* | |
7180 | # using the included regex. | |
7181 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
78434e59 | 7182 | echo "configure:7183: checking for GNU regex" >&5 |
06825bd1 MK |
7183 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
7184 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7185 | else | |
7186 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7187 | #line 7188 "configure" |
06825bd1 MK |
7188 | #include "confdefs.h" |
7189 | #include <gnu-versions.h> | |
7190 | int main() { | |
7191 | #define REGEX_INTERFACE_VERSION 1 | |
7192 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
7193 | # error "Version mismatch" | |
7194 | #endif | |
7195 | ; return 0; } | |
7196 | EOF | |
78434e59 | 7197 | if { (eval echo configure:7198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
7198 | rm -rf conftest* |
7199 | gdb_cv_have_gnu_regex=yes | |
7200 | else | |
7201 | echo "configure: failed program was:" >&5 | |
7202 | cat conftest.$ac_ext >&5 | |
7203 | rm -rf conftest* | |
7204 | gdb_cv_have_gnu_regex=no | |
7205 | fi | |
7206 | rm -f conftest* | |
7207 | fi | |
7208 | ||
7209 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
7210 | if test $gdb_cv_have_gnu_regex = yes; then | |
7211 | gdb_use_included_regex=no | |
7212 | fi | |
7213 | ||
7214 | # Check whether --with-included-regex or --without-included-regex was given. | |
7215 | if test "${with_included_regex+set}" = set; then | |
7216 | withval="$with_included_regex" | |
7217 | gdb_with_regex=$withval | |
7218 | else | |
7219 | gdb_with_regex=$gdb_use_included_regex | |
7220 | fi | |
7221 | ||
7222 | if test "$gdb_with_regex" = yes; then | |
7223 | cat >> confdefs.h <<\EOF | |
7224 | #define USE_INCLUDED_REGEX 1 | |
7225 | EOF | |
7226 | ||
7227 | fi | |
7228 | ||
78434e59 MK |
7229 | # See if <machine/reg.h> degines `struct reg'. |
7230 | echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6 | |
7231 | echo "configure:7232: checking for struct reg in machine/reg.h" >&5 | |
7232 | if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then | |
7233 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7234 | else | |
7235 | cat > conftest.$ac_ext <<EOF | |
7236 | #line 7237 "configure" | |
7237 | #include "confdefs.h" | |
7238 | #include <sys/types.h> | |
7239 | #include <machine/reg.h> | |
7240 | int main() { | |
7241 | struct reg r; | |
7242 | ; return 0; } | |
7243 | EOF | |
7244 | if { (eval echo configure:7245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7245 | rm -rf conftest* | |
7246 | gdb_cv_struct_reg=yes | |
7247 | else | |
7248 | echo "configure: failed program was:" >&5 | |
7249 | cat conftest.$ac_ext >&5 | |
7250 | rm -rf conftest* | |
7251 | gdb_cv_struct_reg=no | |
7252 | fi | |
7253 | rm -f conftest* | |
7254 | fi | |
7255 | ||
7256 | echo "$ac_t""$gdb_cv_struct_reg" 1>&6 | |
7257 | if test $gdb_cv_struct_reg = yes; then | |
7258 | cat >> confdefs.h <<\EOF | |
7259 | #define HAVE_STRUCT_REG 1 | |
7260 | EOF | |
7261 | ||
7262 | fi | |
7263 | ||
97bf5e38 MK |
7264 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7265 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
7266 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
78434e59 | 7267 | echo "configure:7268: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
7268 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7270 | else | |
7271 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7272 | #line 7273 "configure" |
c906108c | 7273 | #include "confdefs.h" |
97bf5e38 MK |
7274 | #include <machine/reg.h> |
7275 | int main() { | |
7276 | struct reg r; r.r_fs; | |
7277 | ; return 0; } | |
c906108c | 7278 | EOF |
78434e59 | 7279 | if { (eval echo configure:7280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7280 | rm -rf conftest* |
97bf5e38 | 7281 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 7282 | else |
97bf5e38 MK |
7283 | echo "configure: failed program was:" >&5 |
7284 | cat conftest.$ac_ext >&5 | |
c906108c | 7285 | rm -rf conftest* |
97bf5e38 | 7286 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
7287 | fi |
7288 | rm -f conftest* | |
97bf5e38 | 7289 | fi |
c906108c | 7290 | |
97bf5e38 MK |
7291 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
7292 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7293 | cat >> confdefs.h <<\EOF | |
7294 | #define HAVE_STRUCT_REG_R_FS 1 | |
7295 | EOF | |
7296 | ||
7297 | fi | |
7298 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
78434e59 | 7299 | echo "configure:7300: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
7300 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7301 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7302 | else | |
7303 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7304 | #line 7305 "configure" |
c906108c | 7305 | #include "confdefs.h" |
97bf5e38 MK |
7306 | #include <machine/reg.h> |
7307 | int main() { | |
7308 | struct reg r; r.r_gs; | |
7309 | ; return 0; } | |
c906108c | 7310 | EOF |
78434e59 | 7311 | if { (eval echo configure:7312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7312 | rm -rf conftest* |
97bf5e38 | 7313 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 7314 | else |
97bf5e38 MK |
7315 | echo "configure: failed program was:" >&5 |
7316 | cat conftest.$ac_ext >&5 | |
c906108c | 7317 | rm -rf conftest* |
97bf5e38 | 7318 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
7319 | fi |
7320 | rm -f conftest* | |
c906108c | 7321 | fi |
c906108c | 7322 | |
97bf5e38 MK |
7323 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
7324 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7325 | cat >> confdefs.h <<\EOF | |
7326 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
7327 | EOF |
7328 | ||
c906108c SS |
7329 | fi |
7330 | ||
97bf5e38 MK |
7331 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
7332 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
78434e59 | 7333 | echo "configure:7334: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 7334 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
7335 | echo $ac_n "(cached) $ac_c" 1>&6 |
7336 | else | |
7337 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7338 | #line 7339 "configure" |
c906108c | 7339 | #include "confdefs.h" |
97bf5e38 | 7340 | #include <sys/ptrace.h> |
c906108c | 7341 | int main() { |
97bf5e38 | 7342 | PTRACE_GETREGS; |
c906108c SS |
7343 | ; return 0; } |
7344 | EOF | |
78434e59 | 7345 | if { (eval echo configure:7346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7346 | rm -rf conftest* |
97bf5e38 | 7347 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
7348 | else |
7349 | echo "configure: failed program was:" >&5 | |
7350 | cat conftest.$ac_ext >&5 | |
7351 | rm -rf conftest* | |
97bf5e38 | 7352 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
7353 | fi |
7354 | rm -f conftest* | |
7355 | fi | |
7356 | ||
97bf5e38 MK |
7357 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
7358 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
7359 | cat >> confdefs.h <<\EOF | |
7360 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7361 | EOF |
7362 | ||
97bf5e38 | 7363 | fi |
c906108c | 7364 | |
97bf5e38 MK |
7365 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7366 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
78434e59 | 7367 | echo "configure:7368: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7368 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7369 | echo $ac_n "(cached) $ac_c" 1>&6 |
7370 | else | |
7371 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7372 | #line 7373 "configure" |
c906108c | 7373 | #include "confdefs.h" |
97bf5e38 | 7374 | #include <sys/ptrace.h> |
c906108c | 7375 | int main() { |
97bf5e38 | 7376 | PTRACE_GETFPXREGS; |
c906108c SS |
7377 | ; return 0; } |
7378 | EOF | |
78434e59 | 7379 | if { (eval echo configure:7380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7380 | rm -rf conftest* |
97bf5e38 | 7381 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7382 | else |
7383 | echo "configure: failed program was:" >&5 | |
7384 | cat conftest.$ac_ext >&5 | |
7385 | rm -rf conftest* | |
97bf5e38 | 7386 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7387 | fi |
7388 | rm -f conftest* | |
7389 | fi | |
7390 | ||
97bf5e38 MK |
7391 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7392 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7393 | cat >> confdefs.h <<\EOF | |
7394 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7395 | EOF |
7396 | ||
97bf5e38 | 7397 | fi |
c906108c | 7398 | |
97bf5e38 MK |
7399 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7400 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
78434e59 | 7401 | echo "configure:7402: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7402 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7403 | echo $ac_n "(cached) $ac_c" 1>&6 |
7404 | else | |
7405 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7406 | #line 7407 "configure" |
c906108c | 7407 | #include "confdefs.h" |
97bf5e38 MK |
7408 | #include <sys/types.h> |
7409 | #include <sys/ptrace.h> | |
c906108c | 7410 | int main() { |
97bf5e38 | 7411 | PT_GETDBREGS; |
c906108c SS |
7412 | ; return 0; } |
7413 | EOF | |
78434e59 | 7414 | if { (eval echo configure:7415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7415 | rm -rf conftest* |
97bf5e38 | 7416 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7417 | else |
7418 | echo "configure: failed program was:" >&5 | |
7419 | cat conftest.$ac_ext >&5 | |
7420 | rm -rf conftest* | |
97bf5e38 | 7421 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7422 | fi |
7423 | rm -f conftest* | |
7424 | fi | |
7425 | ||
97bf5e38 MK |
7426 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7427 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7428 | cat >> confdefs.h <<\EOF | |
7429 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7430 | EOF |
7431 | ||
97bf5e38 | 7432 | fi |
c906108c | 7433 | |
97bf5e38 MK |
7434 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7435 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
78434e59 | 7436 | echo "configure:7437: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7437 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7438 | echo $ac_n "(cached) $ac_c" 1>&6 |
7439 | else | |
7440 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7441 | #line 7442 "configure" |
c906108c | 7442 | #include "confdefs.h" |
97bf5e38 MK |
7443 | #include <sys/types.h> |
7444 | #include <sys/ptrace.h> | |
c906108c | 7445 | int main() { |
97bf5e38 | 7446 | PT_GETXMMREGS; |
c906108c SS |
7447 | ; return 0; } |
7448 | EOF | |
78434e59 | 7449 | if { (eval echo configure:7450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7450 | rm -rf conftest* |
97bf5e38 | 7451 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7452 | else |
7453 | echo "configure: failed program was:" >&5 | |
7454 | cat conftest.$ac_ext >&5 | |
7455 | rm -rf conftest* | |
97bf5e38 | 7456 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7457 | fi |
7458 | rm -f conftest* | |
7459 | fi | |
7460 | ||
97bf5e38 MK |
7461 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7462 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7463 | cat >> confdefs.h <<\EOF | |
7464 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7465 | EOF |
7466 | ||
97bf5e38 | 7467 | fi |
c906108c | 7468 | |
27ca5dad | 7469 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7470 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7471 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
78434e59 | 7472 | echo "configure:7473: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7473 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7475 | else | |
7476 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7477 | #line 7478 "configure" |
27ca5dad MC |
7478 | #include "confdefs.h" |
7479 | #include <stdint.h> | |
7480 | int main() { | |
7481 | uintptr_t foo = 0; | |
7482 | ; return 0; } | |
7483 | EOF | |
78434e59 | 7484 | if { (eval echo configure:7485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7485 | rm -rf conftest* |
7486 | gdb_cv_have_uintptr_t=yes | |
7487 | else | |
7488 | echo "configure: failed program was:" >&5 | |
7489 | cat conftest.$ac_ext >&5 | |
7490 | rm -rf conftest* | |
7491 | gdb_cv_have_uintptr_t=no | |
7492 | fi | |
7493 | rm -f conftest* | |
7494 | fi | |
7495 | ||
7496 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 | |
7497 | if test $gdb_cv_have_uintptr_t = yes; then | |
7498 | cat >> confdefs.h <<\EOF | |
7499 | #define HAVE_UINTPTR_T 1 | |
7500 | EOF | |
7501 | ||
7502 | fi | |
97bf5e38 MK |
7503 | |
7504 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
78434e59 | 7505 | echo "configure:7506: checking whether malloc must be declared" >&5 |
97bf5e38 | 7506 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7507 | echo $ac_n "(cached) $ac_c" 1>&6 |
7508 | else | |
7509 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7510 | #line 7511 "configure" |
3862412b | 7511 | #include "confdefs.h" |
e17bf198 | 7512 | |
97bf5e38 MK |
7513 | #include <stdio.h> |
7514 | #ifdef HAVE_STRING_H | |
7515 | #include <string.h> | |
7516 | #else | |
7517 | #ifdef HAVE_STRINGS_H | |
7518 | #include <strings.h> | |
7519 | #endif | |
7520 | #endif | |
7521 | #ifdef HAVE_STDLIB_H | |
7522 | #include <stdlib.h> | |
7523 | #endif | |
7524 | #ifdef HAVE_UNISTD_H | |
7525 | #include <unistd.h> | |
7526 | #endif | |
3862412b | 7527 | int main() { |
97bf5e38 | 7528 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7529 | ; return 0; } |
7530 | EOF | |
78434e59 | 7531 | if { (eval echo configure:7532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7532 | rm -rf conftest* |
97bf5e38 | 7533 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7534 | else |
7535 | echo "configure: failed program was:" >&5 | |
7536 | cat conftest.$ac_ext >&5 | |
7537 | rm -rf conftest* | |
97bf5e38 | 7538 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7539 | fi |
7540 | rm -f conftest* | |
7541 | fi | |
7542 | ||
97bf5e38 MK |
7543 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7544 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7545 | cat >> confdefs.h <<\EOF | |
7546 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7547 | EOF |
7548 | ||
97bf5e38 | 7549 | fi |
3862412b | 7550 | |
97bf5e38 | 7551 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
78434e59 | 7552 | echo "configure:7553: checking whether realloc must be declared" >&5 |
97bf5e38 | 7553 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7554 | echo $ac_n "(cached) $ac_c" 1>&6 |
7555 | else | |
7556 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7557 | #line 7558 "configure" |
3862412b | 7558 | #include "confdefs.h" |
e17bf198 | 7559 | |
97bf5e38 MK |
7560 | #include <stdio.h> |
7561 | #ifdef HAVE_STRING_H | |
7562 | #include <string.h> | |
7563 | #else | |
7564 | #ifdef HAVE_STRINGS_H | |
7565 | #include <strings.h> | |
7566 | #endif | |
7567 | #endif | |
7568 | #ifdef HAVE_STDLIB_H | |
7569 | #include <stdlib.h> | |
7570 | #endif | |
7571 | #ifdef HAVE_UNISTD_H | |
7572 | #include <unistd.h> | |
7573 | #endif | |
3862412b | 7574 | int main() { |
97bf5e38 | 7575 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7576 | ; return 0; } |
7577 | EOF | |
78434e59 | 7578 | if { (eval echo configure:7579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7579 | rm -rf conftest* |
97bf5e38 | 7580 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7581 | else |
7582 | echo "configure: failed program was:" >&5 | |
7583 | cat conftest.$ac_ext >&5 | |
7584 | rm -rf conftest* | |
97bf5e38 | 7585 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7586 | fi |
7587 | rm -f conftest* | |
7588 | fi | |
7589 | ||
97bf5e38 MK |
7590 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7591 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7592 | cat >> confdefs.h <<\EOF | |
7593 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7594 | EOF |
7595 | ||
97bf5e38 | 7596 | fi |
3862412b | 7597 | |
97bf5e38 | 7598 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
78434e59 | 7599 | echo "configure:7600: checking whether free must be declared" >&5 |
97bf5e38 | 7600 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7601 | echo $ac_n "(cached) $ac_c" 1>&6 |
7602 | else | |
7603 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7604 | #line 7605 "configure" |
451928c5 | 7605 | #include "confdefs.h" |
e17bf198 | 7606 | |
97bf5e38 MK |
7607 | #include <stdio.h> |
7608 | #ifdef HAVE_STRING_H | |
7609 | #include <string.h> | |
7610 | #else | |
7611 | #ifdef HAVE_STRINGS_H | |
7612 | #include <strings.h> | |
7613 | #endif | |
7614 | #endif | |
7615 | #ifdef HAVE_STDLIB_H | |
7616 | #include <stdlib.h> | |
7617 | #endif | |
7618 | #ifdef HAVE_UNISTD_H | |
7619 | #include <unistd.h> | |
7620 | #endif | |
451928c5 | 7621 | int main() { |
97bf5e38 | 7622 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7623 | ; return 0; } |
7624 | EOF | |
78434e59 | 7625 | if { (eval echo configure:7626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7626 | rm -rf conftest* |
97bf5e38 | 7627 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7628 | else |
7629 | echo "configure: failed program was:" >&5 | |
7630 | cat conftest.$ac_ext >&5 | |
7631 | rm -rf conftest* | |
97bf5e38 | 7632 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7633 | fi |
7634 | rm -f conftest* | |
7635 | fi | |
7636 | ||
97bf5e38 MK |
7637 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7638 | if test $bfd_cv_decl_needed_free = yes; then | |
7639 | cat >> confdefs.h <<\EOF | |
7640 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7641 | EOF |
7642 | ||
97bf5e38 | 7643 | fi |
451928c5 | 7644 | |
97bf5e38 | 7645 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
78434e59 | 7646 | echo "configure:7647: checking whether strerror must be declared" >&5 |
97bf5e38 | 7647 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7648 | echo $ac_n "(cached) $ac_c" 1>&6 |
7649 | else | |
7650 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7651 | #line 7652 "configure" |
451928c5 | 7652 | #include "confdefs.h" |
e17bf198 | 7653 | |
97bf5e38 MK |
7654 | #include <stdio.h> |
7655 | #ifdef HAVE_STRING_H | |
7656 | #include <string.h> | |
7657 | #else | |
7658 | #ifdef HAVE_STRINGS_H | |
7659 | #include <strings.h> | |
7660 | #endif | |
7661 | #endif | |
7662 | #ifdef HAVE_STDLIB_H | |
7663 | #include <stdlib.h> | |
7664 | #endif | |
7665 | #ifdef HAVE_UNISTD_H | |
7666 | #include <unistd.h> | |
7667 | #endif | |
451928c5 | 7668 | int main() { |
97bf5e38 | 7669 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7670 | ; return 0; } |
7671 | EOF | |
78434e59 | 7672 | if { (eval echo configure:7673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7673 | rm -rf conftest* |
97bf5e38 | 7674 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7675 | else |
7676 | echo "configure: failed program was:" >&5 | |
7677 | cat conftest.$ac_ext >&5 | |
7678 | rm -rf conftest* | |
97bf5e38 | 7679 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7680 | fi |
7681 | rm -f conftest* | |
7682 | fi | |
7683 | ||
97bf5e38 MK |
7684 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7685 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7686 | cat >> confdefs.h <<\EOF | |
7687 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7688 | EOF |
7689 | ||
97bf5e38 | 7690 | fi |
451928c5 | 7691 | |
97bf5e38 | 7692 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
78434e59 | 7693 | echo "configure:7694: checking whether strdup must be declared" >&5 |
97bf5e38 | 7694 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7695 | echo $ac_n "(cached) $ac_c" 1>&6 |
7696 | else | |
7697 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7698 | #line 7699 "configure" |
3862412b | 7699 | #include "confdefs.h" |
e17bf198 | 7700 | |
97bf5e38 MK |
7701 | #include <stdio.h> |
7702 | #ifdef HAVE_STRING_H | |
7703 | #include <string.h> | |
7704 | #else | |
7705 | #ifdef HAVE_STRINGS_H | |
7706 | #include <strings.h> | |
7707 | #endif | |
7708 | #endif | |
7709 | #ifdef HAVE_STDLIB_H | |
7710 | #include <stdlib.h> | |
7711 | #endif | |
7712 | #ifdef HAVE_UNISTD_H | |
7713 | #include <unistd.h> | |
7714 | #endif | |
3862412b | 7715 | int main() { |
97bf5e38 | 7716 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7717 | ; return 0; } |
7718 | EOF | |
78434e59 | 7719 | if { (eval echo configure:7720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7720 | rm -rf conftest* |
97bf5e38 | 7721 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7722 | else |
7723 | echo "configure: failed program was:" >&5 | |
7724 | cat conftest.$ac_ext >&5 | |
7725 | rm -rf conftest* | |
97bf5e38 | 7726 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7727 | fi |
7728 | rm -f conftest* | |
7729 | fi | |
7730 | ||
97bf5e38 MK |
7731 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7732 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7733 | cat >> confdefs.h <<\EOF | |
7734 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7735 | EOF |
7736 | ||
97bf5e38 | 7737 | fi |
3862412b | 7738 | |
97bf5e38 | 7739 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
78434e59 | 7740 | echo "configure:7741: checking whether strstr must be declared" >&5 |
97bf5e38 | 7741 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7742 | echo $ac_n "(cached) $ac_c" 1>&6 |
7743 | else | |
7744 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7745 | #line 7746 "configure" |
3862412b | 7746 | #include "confdefs.h" |
e17bf198 | 7747 | |
97bf5e38 MK |
7748 | #include <stdio.h> |
7749 | #ifdef HAVE_STRING_H | |
7750 | #include <string.h> | |
7751 | #else | |
7752 | #ifdef HAVE_STRINGS_H | |
7753 | #include <strings.h> | |
7754 | #endif | |
7755 | #endif | |
7756 | #ifdef HAVE_STDLIB_H | |
7757 | #include <stdlib.h> | |
7758 | #endif | |
7759 | #ifdef HAVE_UNISTD_H | |
7760 | #include <unistd.h> | |
7761 | #endif | |
3862412b | 7762 | int main() { |
97bf5e38 | 7763 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7764 | ; return 0; } |
7765 | EOF | |
78434e59 | 7766 | if { (eval echo configure:7767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7767 | rm -rf conftest* |
97bf5e38 | 7768 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7769 | else |
7770 | echo "configure: failed program was:" >&5 | |
7771 | cat conftest.$ac_ext >&5 | |
7772 | rm -rf conftest* | |
97bf5e38 | 7773 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7774 | fi |
7775 | rm -f conftest* | |
7776 | fi | |
7777 | ||
97bf5e38 MK |
7778 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7779 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7780 | cat >> confdefs.h <<\EOF | |
7781 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7782 | EOF |
7783 | ||
97bf5e38 | 7784 | fi |
3862412b | 7785 | |
97bf5e38 | 7786 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
78434e59 | 7787 | echo "configure:7788: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7788 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7789 | echo $ac_n "(cached) $ac_c" 1>&6 |
7790 | else | |
7791 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7792 | #line 7793 "configure" |
596c9d4b KB |
7793 | #include "confdefs.h" |
7794 | ||
97bf5e38 MK |
7795 | #include <stdio.h> |
7796 | #ifdef HAVE_STRING_H | |
7797 | #include <string.h> | |
7798 | #else | |
7799 | #ifdef HAVE_STRINGS_H | |
7800 | #include <strings.h> | |
7801 | #endif | |
7802 | #endif | |
7803 | #ifdef HAVE_STDLIB_H | |
7804 | #include <stdlib.h> | |
7805 | #endif | |
7806 | #ifdef HAVE_UNISTD_H | |
7807 | #include <unistd.h> | |
7808 | #endif | |
596c9d4b | 7809 | int main() { |
97bf5e38 | 7810 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7811 | ; return 0; } |
7812 | EOF | |
78434e59 | 7813 | if { (eval echo configure:7814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7814 | rm -rf conftest* |
97bf5e38 | 7815 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7816 | else |
7817 | echo "configure: failed program was:" >&5 | |
7818 | cat conftest.$ac_ext >&5 | |
7819 | rm -rf conftest* | |
97bf5e38 | 7820 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7821 | fi |
7822 | rm -f conftest* | |
7823 | fi | |
7824 | ||
97bf5e38 MK |
7825 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7826 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7827 | cat >> confdefs.h <<\EOF | |
7828 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7829 | EOF |
7830 | ||
97bf5e38 | 7831 | fi |
596c9d4b | 7832 | |
97bf5e38 MK |
7833 | |
7834 | # The following save_state_t checkery is only necessary for HPUX | |
7835 | # versions earlier than 10.20. When those fade from memory, this | |
7836 | # could be expunged. --jsm 1999-03-22 | |
7837 | ||
7838 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
78434e59 | 7839 | echo "configure:7840: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7840 | cat > conftest.$ac_ext <<EOF |
78434e59 | 7841 | #line 7842 "configure" |
97bf5e38 MK |
7842 | #include "confdefs.h" |
7843 | #include <machine/save_state.h> | |
7844 | EOF | |
7845 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7846 | egrep "save_state_t" >/dev/null 2>&1; then | |
7847 | rm -rf conftest* | |
7848 | gdb_cv_hpux_savestate=yes | |
7849 | else | |
7850 | rm -rf conftest* | |
7851 | gdb_cv_hpux_savestate=no | |
7852 | fi | |
7853 | rm -f conftest* | |
7854 | ||
7855 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7856 | #line 7857 "configure" |
97bf5e38 MK |
7857 | #include "confdefs.h" |
7858 | #include <machine/save_state.h> | |
7859 | EOF | |
7860 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7861 | egrep "ss_wide" >/dev/null 2>&1; then | |
7862 | rm -rf conftest* | |
7863 | gdb_cv_hpux_sswide=yes | |
7864 | else | |
7865 | rm -rf conftest* | |
7866 | gdb_cv_hpux_sswide=no | |
7867 | fi | |
7868 | rm -f conftest* | |
7869 | ||
7870 | if test $gdb_cv_hpux_savestate = yes | |
7871 | then | |
7872 | cat >> confdefs.h <<\EOF | |
7873 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7874 | EOF | |
7875 | ||
7876 | fi | |
7877 | if test $gdb_cv_hpux_sswide = yes | |
7878 | then | |
7879 | cat >> confdefs.h <<\EOF | |
7880 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7881 | EOF | |
7882 | ||
7883 | fi | |
7884 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7885 | ||
7886 | ||
7887 | # If we are configured native on GNU/Linux, work around problems with | |
7888 | # sys/procfs.h | |
7889 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7890 | ||
7891 | if test "${target}" = "${host}"; then | |
7892 | case "${host}" in | |
7893 | i[3456]86-*-linux*) | |
7894 | cat >> confdefs.h <<\EOF | |
7895 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7896 | EOF | |
7897 | ||
7898 | cat >> confdefs.h <<\EOF | |
7899 | #define sys_quotactl 1 | |
7900 | EOF | |
7901 | ||
7902 | ;; | |
7903 | ia64-*-aix*) | |
7904 | cat >> confdefs.h <<\EOF | |
7905 | #define NEW_PROC_API 1 | |
7906 | EOF | |
7907 | ||
7908 | ;; | |
7909 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7910 | cat >> confdefs.h <<\EOF | |
7911 | #define NEW_PROC_API 1 | |
7912 | EOF | |
7913 | ||
7914 | ;; | |
7915 | *-*-solaris2.[678]) | |
7916 | cat >> confdefs.h <<\EOF | |
7917 | #define NEW_PROC_API 1 | |
7918 | EOF | |
7919 | ||
7920 | ;; | |
7921 | esac | |
7922 | fi | |
7923 | ||
7924 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7925 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
78434e59 | 7926 | echo "configure:7927: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7927 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7928 | echo $ac_n "(cached) $ac_c" 1>&6 |
7929 | else | |
7930 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7931 | #line 7932 "configure" |
596c9d4b KB |
7932 | #include "confdefs.h" |
7933 | ||
7934 | #define _SYSCALL32 | |
7935 | #include <sys/procfs.h> | |
7936 | int main() { | |
97bf5e38 | 7937 | pstatus_t avar |
596c9d4b KB |
7938 | ; return 0; } |
7939 | EOF | |
78434e59 | 7940 | if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7941 | rm -rf conftest* |
97bf5e38 | 7942 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7943 | else |
7944 | echo "configure: failed program was:" >&5 | |
7945 | cat conftest.$ac_ext >&5 | |
7946 | rm -rf conftest* | |
97bf5e38 | 7947 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7948 | |
7949 | fi | |
7950 | rm -f conftest* | |
7951 | fi | |
7952 | ||
97bf5e38 | 7953 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7954 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7955 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7956 | EOF |
7957 | ||
7958 | fi | |
97bf5e38 | 7959 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7960 | |
97bf5e38 | 7961 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 7962 | echo "configure:7963: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7963 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7964 | echo $ac_n "(cached) $ac_c" 1>&6 |
7965 | else | |
7966 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 7967 | #line 7968 "configure" |
596c9d4b KB |
7968 | #include "confdefs.h" |
7969 | ||
7970 | #define _SYSCALL32 | |
7971 | #include <sys/procfs.h> | |
7972 | int main() { | |
97bf5e38 | 7973 | prrun_t avar |
596c9d4b KB |
7974 | ; return 0; } |
7975 | EOF | |
78434e59 | 7976 | if { (eval echo configure:7977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7977 | rm -rf conftest* |
97bf5e38 | 7978 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7979 | else |
7980 | echo "configure: failed program was:" >&5 | |
7981 | cat conftest.$ac_ext >&5 | |
7982 | rm -rf conftest* | |
97bf5e38 | 7983 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7984 | |
7985 | fi | |
7986 | rm -f conftest* | |
7987 | fi | |
7988 | ||
97bf5e38 | 7989 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7990 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7991 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7992 | EOF |
7993 | ||
7994 | fi | |
97bf5e38 | 7995 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7996 | |
97bf5e38 | 7997 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 7998 | echo "configure:7999: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7999 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
8000 | echo $ac_n "(cached) $ac_c" 1>&6 |
8001 | else | |
8002 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8003 | #line 8004 "configure" |
596c9d4b KB |
8004 | #include "confdefs.h" |
8005 | ||
8006 | #define _SYSCALL32 | |
8007 | #include <sys/procfs.h> | |
8008 | int main() { | |
97bf5e38 | 8009 | gregset_t avar |
596c9d4b KB |
8010 | ; return 0; } |
8011 | EOF | |
78434e59 | 8012 | if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8013 | rm -rf conftest* |
97bf5e38 | 8014 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
8015 | else |
8016 | echo "configure: failed program was:" >&5 | |
8017 | cat conftest.$ac_ext >&5 | |
8018 | rm -rf conftest* | |
97bf5e38 | 8019 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
8020 | |
8021 | fi | |
8022 | rm -f conftest* | |
8023 | fi | |
8024 | ||
97bf5e38 | 8025 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 8026 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8027 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
8028 | EOF |
8029 | ||
8030 | fi | |
97bf5e38 | 8031 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 8032 | |
97bf5e38 | 8033 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8034 | echo "configure:8035: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8035 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 8036 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
8037 | else |
8038 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8039 | #line 8040 "configure" |
d84dd0c5 | 8040 | #include "confdefs.h" |
97bf5e38 MK |
8041 | |
8042 | #define _SYSCALL32 | |
d84dd0c5 | 8043 | #include <sys/procfs.h> |
97bf5e38 MK |
8044 | int main() { |
8045 | fpregset_t avar | |
8046 | ; return 0; } | |
d84dd0c5 | 8047 | EOF |
78434e59 | 8048 | if { (eval echo configure:8049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8049 | rm -rf conftest* |
8050 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
8051 | else |
8052 | echo "configure: failed program was:" >&5 | |
8053 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8054 | rm -rf conftest* |
8055 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8056 | ||
d84dd0c5 | 8057 | fi |
97bf5e38 | 8058 | rm -f conftest* |
d84dd0c5 MK |
8059 | fi |
8060 | ||
97bf5e38 MK |
8061 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
8062 | cat >> confdefs.h <<\EOF | |
8063 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
8064 | EOF |
8065 | ||
97bf5e38 MK |
8066 | fi |
8067 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 8068 | |
97bf5e38 | 8069 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8070 | echo "configure:8071: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8071 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
8072 | echo $ac_n "(cached) $ac_c" 1>&6 |
8073 | else | |
8074 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8075 | #line 8076 "configure" |
c906108c | 8076 | #include "confdefs.h" |
c906108c | 8077 | |
97bf5e38 MK |
8078 | #define _SYSCALL32 |
8079 | #include <sys/procfs.h> | |
c906108c | 8080 | int main() { |
97bf5e38 | 8081 | prgregset_t avar |
c906108c SS |
8082 | ; return 0; } |
8083 | EOF | |
78434e59 | 8084 | if { (eval echo configure:8085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8085 | rm -rf conftest* |
97bf5e38 | 8086 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
8087 | else |
8088 | echo "configure: failed program was:" >&5 | |
8089 | cat conftest.$ac_ext >&5 | |
8090 | rm -rf conftest* | |
97bf5e38 MK |
8091 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
8092 | ||
c906108c SS |
8093 | fi |
8094 | rm -f conftest* | |
8095 | fi | |
8096 | ||
97bf5e38 MK |
8097 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
8098 | cat >> confdefs.h <<\EOF | |
8099 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
8100 | EOF |
8101 | ||
97bf5e38 MK |
8102 | fi |
8103 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 8104 | |
97bf5e38 | 8105 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8106 | echo "configure:8107: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8107 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
8108 | echo $ac_n "(cached) $ac_c" 1>&6 |
8109 | else | |
8110 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8111 | #line 8112 "configure" |
d45fe813 | 8112 | #include "confdefs.h" |
97bf5e38 MK |
8113 | |
8114 | #define _SYSCALL32 | |
8115 | #include <sys/procfs.h> | |
d45fe813 | 8116 | int main() { |
97bf5e38 | 8117 | prfpregset_t avar |
d45fe813 KB |
8118 | ; return 0; } |
8119 | EOF | |
78434e59 | 8120 | if { (eval echo configure:8121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8121 | rm -rf conftest* |
97bf5e38 | 8122 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
8123 | else |
8124 | echo "configure: failed program was:" >&5 | |
8125 | cat conftest.$ac_ext >&5 | |
8126 | rm -rf conftest* | |
97bf5e38 MK |
8127 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
8128 | ||
d45fe813 KB |
8129 | fi |
8130 | rm -f conftest* | |
8131 | fi | |
8132 | ||
97bf5e38 MK |
8133 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
8134 | cat >> confdefs.h <<\EOF | |
8135 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
8136 | EOF |
8137 | ||
97bf5e38 MK |
8138 | fi |
8139 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 8140 | |
97bf5e38 | 8141 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8142 | echo "configure:8143: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8143 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8144 | echo $ac_n "(cached) $ac_c" 1>&6 |
8145 | else | |
8146 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8147 | #line 8148 "configure" |
d45fe813 | 8148 | #include "confdefs.h" |
97bf5e38 MK |
8149 | |
8150 | #define _SYSCALL32 | |
8151 | #include <sys/procfs.h> | |
d45fe813 | 8152 | int main() { |
97bf5e38 | 8153 | prgregset32_t avar |
d45fe813 KB |
8154 | ; return 0; } |
8155 | EOF | |
78434e59 | 8156 | if { (eval echo configure:8157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8157 | rm -rf conftest* |
97bf5e38 | 8158 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
8159 | else |
8160 | echo "configure: failed program was:" >&5 | |
8161 | cat conftest.$ac_ext >&5 | |
8162 | rm -rf conftest* | |
97bf5e38 MK |
8163 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
8164 | ||
d45fe813 KB |
8165 | fi |
8166 | rm -f conftest* | |
8167 | fi | |
8168 | ||
97bf5e38 MK |
8169 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
8170 | cat >> confdefs.h <<\EOF | |
8171 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
8172 | EOF |
8173 | ||
97bf5e38 MK |
8174 | fi |
8175 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 8176 | |
97bf5e38 | 8177 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8178 | echo "configure:8179: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8179 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8180 | echo $ac_n "(cached) $ac_c" 1>&6 |
8181 | else | |
8182 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8183 | #line 8184 "configure" |
d45fe813 | 8184 | #include "confdefs.h" |
97bf5e38 MK |
8185 | |
8186 | #define _SYSCALL32 | |
8187 | #include <sys/procfs.h> | |
d45fe813 | 8188 | int main() { |
97bf5e38 | 8189 | prfpregset32_t avar |
d45fe813 KB |
8190 | ; return 0; } |
8191 | EOF | |
78434e59 | 8192 | if { (eval echo configure:8193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8193 | rm -rf conftest* |
97bf5e38 | 8194 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
8195 | else |
8196 | echo "configure: failed program was:" >&5 | |
8197 | cat conftest.$ac_ext >&5 | |
8198 | rm -rf conftest* | |
97bf5e38 MK |
8199 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
8200 | ||
d45fe813 KB |
8201 | fi |
8202 | rm -f conftest* | |
8203 | fi | |
8204 | ||
97bf5e38 MK |
8205 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
8206 | cat >> confdefs.h <<\EOF | |
8207 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
8208 | EOF |
8209 | ||
97bf5e38 MK |
8210 | fi |
8211 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 8212 | |
97bf5e38 | 8213 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8214 | echo "configure:8215: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 8215 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
8216 | echo $ac_n "(cached) $ac_c" 1>&6 |
8217 | else | |
8218 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8219 | #line 8220 "configure" |
d45fe813 | 8220 | #include "confdefs.h" |
97bf5e38 | 8221 | |
d45fe813 | 8222 | #define _SYSCALL32 |
97bf5e38 | 8223 | #include <sys/procfs.h> |
d45fe813 | 8224 | int main() { |
97bf5e38 | 8225 | lwpid_t avar |
d45fe813 KB |
8226 | ; return 0; } |
8227 | EOF | |
78434e59 | 8228 | if { (eval echo configure:8229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8229 | rm -rf conftest* |
97bf5e38 | 8230 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
8231 | else |
8232 | echo "configure: failed program was:" >&5 | |
8233 | cat conftest.$ac_ext >&5 | |
8234 | rm -rf conftest* | |
97bf5e38 MK |
8235 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
8236 | ||
d45fe813 KB |
8237 | fi |
8238 | rm -f conftest* | |
8239 | fi | |
8240 | ||
97bf5e38 MK |
8241 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
8242 | cat >> confdefs.h <<\EOF | |
8243 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
8244 | EOF |
8245 | ||
97bf5e38 MK |
8246 | fi |
8247 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 8248 | |
97bf5e38 | 8249 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8250 | echo "configure:8251: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 8251 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
8252 | echo $ac_n "(cached) $ac_c" 1>&6 |
8253 | else | |
8254 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8255 | #line 8256 "configure" |
c906108c SS |
8256 | #include "confdefs.h" |
8257 | ||
97bf5e38 MK |
8258 | #define _SYSCALL32 |
8259 | #include <sys/procfs.h> | |
c906108c | 8260 | int main() { |
97bf5e38 | 8261 | psaddr_t avar |
c906108c SS |
8262 | ; return 0; } |
8263 | EOF | |
78434e59 | 8264 | if { (eval echo configure:8265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8265 | rm -rf conftest* |
97bf5e38 | 8266 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
8267 | else |
8268 | echo "configure: failed program was:" >&5 | |
8269 | cat conftest.$ac_ext >&5 | |
8270 | rm -rf conftest* | |
97bf5e38 MK |
8271 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
8272 | ||
c906108c SS |
8273 | fi |
8274 | rm -f conftest* | |
8275 | fi | |
8276 | ||
97bf5e38 MK |
8277 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
8278 | cat >> confdefs.h <<\EOF | |
8279 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
8280 | EOF |
8281 | ||
97bf5e38 MK |
8282 | fi |
8283 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 8284 | |
97bf5e38 | 8285 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8286 | echo "configure:8287: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 8287 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 8288 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8289 | else |
8290 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8291 | #line 8292 "configure" |
c906108c SS |
8292 | #include "confdefs.h" |
8293 | ||
97bf5e38 MK |
8294 | #define _SYSCALL32 |
8295 | #include <sys/procfs.h> | |
8296 | int main() { | |
8297 | prsysent_t avar | |
8298 | ; return 0; } | |
c906108c | 8299 | EOF |
78434e59 | 8300 | if { (eval echo configure:8301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8301 | rm -rf conftest* |
8302 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
8303 | else |
8304 | echo "configure: failed program was:" >&5 | |
8305 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8306 | rm -rf conftest* |
8307 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
8308 | ||
c906108c | 8309 | fi |
97bf5e38 | 8310 | rm -f conftest* |
c906108c SS |
8311 | fi |
8312 | ||
97bf5e38 MK |
8313 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
8314 | cat >> confdefs.h <<\EOF | |
8315 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
8316 | EOF |
8317 | ||
97bf5e38 MK |
8318 | fi |
8319 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 8320 | |
97bf5e38 | 8321 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8322 | echo "configure:8323: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 8323 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
8324 | echo $ac_n "(cached) $ac_c" 1>&6 |
8325 | else | |
8326 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8327 | #line 8328 "configure" |
c906108c SS |
8328 | #include "confdefs.h" |
8329 | ||
97bf5e38 MK |
8330 | #define _SYSCALL32 |
8331 | #include <sys/procfs.h> | |
c906108c | 8332 | int main() { |
97bf5e38 | 8333 | pr_sigset_t avar |
c906108c SS |
8334 | ; return 0; } |
8335 | EOF | |
78434e59 | 8336 | if { (eval echo configure:8337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8337 | rm -rf conftest* |
97bf5e38 | 8338 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
8339 | else |
8340 | echo "configure: failed program was:" >&5 | |
8341 | cat conftest.$ac_ext >&5 | |
8342 | rm -rf conftest* | |
97bf5e38 MK |
8343 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
8344 | ||
c906108c SS |
8345 | fi |
8346 | rm -f conftest* | |
8347 | fi | |
8348 | ||
97bf5e38 MK |
8349 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
8350 | cat >> confdefs.h <<\EOF | |
8351 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
8352 | EOF |
8353 | ||
97bf5e38 MK |
8354 | fi |
8355 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 8356 | |
97bf5e38 | 8357 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
78434e59 | 8358 | echo "configure:8359: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 8359 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8360 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8361 | else |
8362 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8363 | #line 8364 "configure" |
c906108c SS |
8364 | #include "confdefs.h" |
8365 | ||
97bf5e38 MK |
8366 | #define _SYSCALL32 |
8367 | #include <sys/procfs.h> | |
8368 | int main() { | |
8369 | pr_sigaction64_t avar | |
8370 | ; return 0; } | |
c906108c | 8371 | EOF |
78434e59 | 8372 | if { (eval echo configure:8373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8373 | rm -rf conftest* |
8374 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8375 | else |
8376 | echo "configure: failed program was:" >&5 | |
8377 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8378 | rm -rf conftest* |
8379 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8380 | ||
c906108c | 8381 | fi |
97bf5e38 | 8382 | rm -f conftest* |
c906108c SS |
8383 | fi |
8384 | ||
97bf5e38 MK |
8385 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8386 | cat >> confdefs.h <<\EOF | |
8387 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8388 | EOF |
8389 | ||
97bf5e38 MK |
8390 | fi |
8391 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8392 | ||
8393 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
78434e59 | 8394 | echo "configure:8395: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8395 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8396 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8397 | else | |
8398 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8399 | #line 8400 "configure" |
97bf5e38 MK |
8400 | #include "confdefs.h" |
8401 | ||
8402 | #define _SYSCALL32 | |
8403 | #include <sys/procfs.h> | |
8404 | int main() { | |
8405 | pr_siginfo64_t avar | |
8406 | ; return 0; } | |
8407 | EOF | |
78434e59 | 8408 | if { (eval echo configure:8409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8409 | rm -rf conftest* |
8410 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8411 | else | |
8412 | echo "configure: failed program was:" >&5 | |
8413 | cat conftest.$ac_ext >&5 | |
8414 | rm -rf conftest* | |
8415 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8416 | ||
8417 | fi | |
8418 | rm -f conftest* | |
c906108c | 8419 | fi |
c906108c | 8420 | |
97bf5e38 MK |
8421 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8422 | cat >> confdefs.h <<\EOF | |
8423 | #define HAVE_PR_SIGINFO64_T 1 | |
8424 | EOF | |
c906108c | 8425 | |
97bf5e38 MK |
8426 | fi |
8427 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8428 | ||
8429 | ||
8430 | ||
8431 | ||
8432 | ||
8433 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8434 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
78434e59 | 8435 | echo "configure:8436: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8436 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8437 | echo $ac_n "(cached) $ac_c" 1>&6 |
8438 | else | |
8439 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8440 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8441 | else |
8442 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8443 | #line 8444 "configure" |
c906108c | 8444 | #include "confdefs.h" |
97bf5e38 MK |
8445 | #include <sys/procfs.h> |
8446 | int main () | |
8447 | { | |
8448 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8449 | return 1; | |
8450 | return 0; | |
8451 | } | |
c906108c | 8452 | EOF |
78434e59 | 8453 | if { (eval echo configure:8454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8454 | then |
97bf5e38 | 8455 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8456 | else |
8457 | echo "configure: failed program was:" >&5 | |
8458 | cat conftest.$ac_ext >&5 | |
8459 | rm -fr conftest* | |
97bf5e38 | 8460 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8461 | fi |
8462 | rm -fr conftest* | |
8463 | fi | |
8464 | ||
8465 | fi | |
8466 | ||
97bf5e38 MK |
8467 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8468 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8469 | cat >> confdefs.h <<\EOF | |
8470 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8471 | EOF |
8472 | ||
97bf5e38 MK |
8473 | fi |
8474 | fi | |
c906108c | 8475 | |
97bf5e38 MK |
8476 | |
8477 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
78434e59 | 8478 | echo "configure:8479: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8479 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8480 | echo $ac_n "(cached) $ac_c" 1>&6 |
8481 | else | |
8482 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8483 | #line 8484 "configure" |
c906108c | 8484 | #include "confdefs.h" |
97bf5e38 MK |
8485 | #include <unistd.h> |
8486 | #include <sys/types.h> | |
8487 | #include <sys/procfs.h> | |
8488 | ||
8489 | int main() { | |
8490 | ||
8491 | int dummy;; | |
8492 | dummy = ioctl(0, PIOCSET, &dummy); | |
8493 | ||
8494 | ; return 0; } | |
c906108c | 8495 | EOF |
78434e59 | 8496 | if { (eval echo configure:8497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8497 | rm -rf conftest* |
97bf5e38 | 8498 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8499 | else |
c906108c SS |
8500 | echo "configure: failed program was:" >&5 |
8501 | cat conftest.$ac_ext >&5 | |
8502 | rm -rf conftest* | |
97bf5e38 | 8503 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8504 | fi |
8505 | rm -f conftest* | |
8506 | fi | |
97bf5e38 MK |
8507 | |
8508 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8509 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8510 | cat >> confdefs.h <<\EOF | |
8511 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8512 | EOF |
97bf5e38 MK |
8513 | |
8514 | fi | |
c906108c | 8515 | fi |
c906108c | 8516 | |
97bf5e38 MK |
8517 | if test ${host} = ${target} ; then |
8518 | ||
8519 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
78434e59 | 8520 | echo "configure:8521: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8521 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8522 | echo $ac_n "(cached) $ac_c" 1>&6 |
8523 | else | |
8524 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8525 | #line 8526 "configure" |
c906108c | 8526 | #include "confdefs.h" |
97bf5e38 | 8527 | #include <link.h> |
c906108c | 8528 | int main() { |
97bf5e38 | 8529 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8530 | ; return 0; } |
8531 | EOF | |
78434e59 | 8532 | if { (eval echo configure:8533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8533 | rm -rf conftest* |
97bf5e38 | 8534 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8535 | else |
8536 | echo "configure: failed program was:" >&5 | |
8537 | cat conftest.$ac_ext >&5 | |
8538 | rm -rf conftest* | |
97bf5e38 | 8539 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8540 | fi |
8541 | rm -f conftest* | |
8542 | fi | |
8543 | ||
97bf5e38 MK |
8544 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8545 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8546 | cat >> confdefs.h <<\EOF | |
8547 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8548 | EOF |
97bf5e38 MK |
8549 | |
8550 | fi | |
8551 | ||
8552 | ||
8553 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
78434e59 | 8554 | echo "configure:8555: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8555 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8556 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8557 | else |
97bf5e38 | 8558 | cat > conftest.$ac_ext <<EOF |
78434e59 | 8559 | #line 8560 "configure" |
97bf5e38 MK |
8560 | #include "confdefs.h" |
8561 | #include <sys/types.h> | |
8562 | #include <link.h> | |
8563 | int main() { | |
8564 | struct link_map lm; (void) lm.lm_addr; | |
8565 | ; return 0; } | |
8566 | EOF | |
78434e59 | 8567 | if { (eval echo configure:8568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8568 | rm -rf conftest* |
8569 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8570 | else | |
8571 | echo "configure: failed program was:" >&5 | |
8572 | cat conftest.$ac_ext >&5 | |
8573 | rm -rf conftest* | |
8574 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8575 | fi | |
8576 | rm -f conftest* | |
c906108c | 8577 | fi |
c906108c | 8578 | |
97bf5e38 MK |
8579 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8580 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8581 | cat >> confdefs.h <<\EOF | |
8582 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8583 | EOF | |
8584 | ||
8585 | fi | |
8586 | ||
8587 | ||
8588 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
78434e59 | 8589 | echo "configure:8590: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8590 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8591 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8592 | else |
8593 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8594 | #line 8595 "configure" |
c906108c | 8595 | #include "confdefs.h" |
97bf5e38 MK |
8596 | #include <sys/types.h> |
8597 | #ifdef HAVE_NLIST_H | |
8598 | #include <nlist.h> | |
8599 | #endif | |
8600 | #include <link.h> | |
8601 | int main() { | |
8602 | struct so_map lm; (void) lm.som_addr; | |
8603 | ; return 0; } | |
8604 | EOF | |
78434e59 | 8605 | if { (eval echo configure:8606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8606 | rm -rf conftest* |
8607 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8608 | else | |
8609 | echo "configure: failed program was:" >&5 | |
8610 | cat conftest.$ac_ext >&5 | |
8611 | rm -rf conftest* | |
8612 | gdb_cv_have_struct_so_map_with_som_members=no | |
8613 | fi | |
8614 | rm -f conftest* | |
8615 | fi | |
c906108c | 8616 | |
97bf5e38 MK |
8617 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8618 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8619 | cat >> confdefs.h <<\EOF | |
8620 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8621 | EOF | |
c906108c | 8622 | |
97bf5e38 | 8623 | fi |
c906108c | 8624 | |
97bf5e38 MK |
8625 | |
8626 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
78434e59 | 8627 | echo "configure:8628: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8628 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8630 | else | |
8631 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8632 | #line 8633 "configure" |
97bf5e38 MK |
8633 | #include "confdefs.h" |
8634 | #define _SYSCALL32 | |
8635 | #include <sys/link.h> | |
8636 | int main() { | |
8637 | struct link_map32 l; | |
8638 | ; return 0; } | |
8639 | EOF | |
78434e59 | 8640 | if { (eval echo configure:8641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8641 | rm -rf conftest* |
8642 | gdb_cv_have_struct_link_map32=yes | |
8643 | else | |
8644 | echo "configure: failed program was:" >&5 | |
8645 | cat conftest.$ac_ext >&5 | |
8646 | rm -rf conftest* | |
8647 | gdb_cv_have_struct_link_map32=no | |
8648 | fi | |
8649 | rm -f conftest* | |
8650 | fi | |
c906108c | 8651 | |
97bf5e38 MK |
8652 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8653 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8654 | cat >> confdefs.h <<\EOF | |
8655 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8656 | EOF | |
c906108c | 8657 | |
97bf5e38 MK |
8658 | cat >> confdefs.h <<\EOF |
8659 | #define _SYSCALL32 1 | |
8660 | EOF | |
c906108c | 8661 | |
97bf5e38 MK |
8662 | fi |
8663 | fi | |
c906108c | 8664 | |
c906108c | 8665 | |
97bf5e38 | 8666 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
78434e59 | 8667 | echo "configure:8668: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8668 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8670 | else | |
8671 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8672 | #line 8673 "configure" |
97bf5e38 | 8673 | #include "confdefs.h" |
c906108c | 8674 | |
97bf5e38 | 8675 | int main() { |
c906108c | 8676 | |
97bf5e38 MK |
8677 | extern long long foo; |
8678 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8679 | |
97bf5e38 MK |
8680 | ; return 0; } |
8681 | EOF | |
78434e59 | 8682 | if { (eval echo configure:8683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8683 | rm -rf conftest* |
8684 | gdb_cv_c_long_long=yes | |
8685 | else | |
8686 | echo "configure: failed program was:" >&5 | |
8687 | cat conftest.$ac_ext >&5 | |
8688 | rm -rf conftest* | |
8689 | gdb_cv_c_long_long=no | |
8690 | fi | |
8691 | rm -f conftest* | |
8692 | fi | |
c906108c | 8693 | |
97bf5e38 MK |
8694 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8695 | if test $gdb_cv_c_long_long = yes; then | |
8696 | cat >> confdefs.h <<\EOF | |
8697 | #define CC_HAS_LONG_LONG 1 | |
8698 | EOF | |
8699 | ||
8700 | fi | |
8701 | ||
8702 | ||
8703 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
78434e59 | 8704 | echo "configure:8705: checking for long long support in printf" >&5 |
97bf5e38 MK |
8705 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8706 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8707 | else | |
8708 | if test "$cross_compiling" = yes; then | |
8709 | gdb_cv_printf_has_long_long=no | |
8710 | else | |
8711 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8712 | #line 8713 "configure" |
97bf5e38 MK |
8713 | #include "confdefs.h" |
8714 | ||
8715 | int main () { | |
8716 | char buf[32]; | |
8717 | long long l = 0; | |
8718 | l = (l << 16) + 0x0123; | |
8719 | l = (l << 16) + 0x4567; | |
8720 | l = (l << 16) + 0x89ab; | |
8721 | l = (l << 16) + 0xcdef; | |
8722 | sprintf (buf, "0x%016llx", l); | |
8723 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8724 | } |
97bf5e38 | 8725 | EOF |
78434e59 | 8726 | if { (eval echo configure:8727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8727 | then |
8728 | gdb_cv_printf_has_long_long=yes | |
8729 | else | |
8730 | echo "configure: failed program was:" >&5 | |
8731 | cat conftest.$ac_ext >&5 | |
8732 | rm -fr conftest* | |
8733 | gdb_cv_printf_has_long_long=no | |
8734 | fi | |
8735 | rm -fr conftest* | |
8736 | fi | |
8737 | ||
8738 | fi | |
8739 | ||
8740 | if test $gdb_cv_printf_has_long_long = yes; then | |
8741 | cat >> confdefs.h <<\EOF | |
8742 | #define PRINTF_HAS_LONG_LONG 1 | |
8743 | EOF | |
8744 | ||
8745 | fi | |
8746 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8747 | ||
8748 | ||
8749 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
78434e59 | 8750 | echo "configure:8751: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8751 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8752 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8753 | else | |
8754 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8755 | #line 8756 "configure" |
97bf5e38 MK |
8756 | #include "confdefs.h" |
8757 | ||
8758 | int main() { | |
8759 | long double foo; | |
8760 | ; return 0; } | |
8761 | EOF | |
78434e59 | 8762 | if { (eval echo configure:8763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8763 | rm -rf conftest* |
8764 | ac_cv_c_long_double=yes | |
8765 | else | |
8766 | echo "configure: failed program was:" >&5 | |
8767 | cat conftest.$ac_ext >&5 | |
8768 | rm -rf conftest* | |
8769 | ac_cv_c_long_double=no | |
8770 | fi | |
8771 | rm -f conftest* | |
8772 | fi | |
c906108c | 8773 | |
97bf5e38 MK |
8774 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8775 | if test $ac_cv_c_long_double = yes; then | |
8776 | cat >> confdefs.h <<\EOF | |
8777 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8778 | EOF |
97bf5e38 MK |
8779 | |
8780 | fi | |
8781 | ||
8782 | ||
8783 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
78434e59 | 8784 | echo "configure:8785: checking for long double support in printf" >&5 |
97bf5e38 MK |
8785 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8786 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8787 | else | |
8788 | if test "$cross_compiling" = yes; then | |
8789 | gdb_cv_printf_has_long_double=no | |
8790 | else | |
8791 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8792 | #line 8793 "configure" |
97bf5e38 MK |
8793 | #include "confdefs.h" |
8794 | ||
8795 | int main () { | |
8796 | char buf[16]; | |
8797 | long double f = 3.141592653; | |
8798 | sprintf (buf, "%Lg", f); | |
8799 | return (strncmp ("3.14159", buf, 7)); | |
8800 | } | |
8801 | EOF | |
78434e59 | 8802 | if { (eval echo configure:8803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8803 | then |
97bf5e38 | 8804 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8805 | else |
8806 | echo "configure: failed program was:" >&5 | |
8807 | cat conftest.$ac_ext >&5 | |
8808 | rm -fr conftest* | |
97bf5e38 | 8809 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8810 | fi |
8811 | rm -fr conftest* | |
8812 | fi | |
8813 | ||
8814 | fi | |
8815 | ||
97bf5e38 | 8816 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8817 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8818 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8819 | EOF | |
8820 | ||
8821 | fi | |
8822 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8823 | ||
8824 | ||
8825 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
78434e59 | 8826 | echo "configure:8827: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8827 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8828 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8829 | else | |
8830 | if test "$cross_compiling" = yes; then | |
8831 | gdb_cv_scanf_has_long_double=no | |
8832 | else | |
8833 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8834 | #line 8835 "configure" |
97bf5e38 MK |
8835 | #include "confdefs.h" |
8836 | ||
8837 | int main () { | |
8838 | char *buf = "3.141592653"; | |
8839 | long double f = 0; | |
8840 | sscanf (buf, "%Lg", &f); | |
8841 | return !(f > 3.14159 && f < 3.14160); | |
8842 | } | |
c906108c | 8843 | EOF |
78434e59 | 8844 | if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8845 | then |
8846 | gdb_cv_scanf_has_long_double=yes | |
8847 | else | |
8848 | echo "configure: failed program was:" >&5 | |
8849 | cat conftest.$ac_ext >&5 | |
8850 | rm -fr conftest* | |
8851 | gdb_cv_scanf_has_long_double=no | |
8852 | fi | |
8853 | rm -fr conftest* | |
8854 | fi | |
c906108c SS |
8855 | |
8856 | fi | |
8857 | ||
97bf5e38 MK |
8858 | if test $gdb_cv_scanf_has_long_double = yes; then |
8859 | cat >> confdefs.h <<\EOF | |
8860 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8861 | EOF | |
8862 | ||
8863 | fi | |
8864 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8865 | |
438013df AO |
8866 | case ${host_os} in |
8867 | aix*) | |
8868 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
78434e59 | 8869 | echo "configure:8870: checking for -bbigtoc option" >&5 |
438013df AO |
8870 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8871 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8872 | else | |
8873 | ||
8874 | SAVE_LDFLAGS=$LDFLAGS | |
8875 | ||
8876 | case $GCC in | |
8877 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8878 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8879 | esac | |
8880 | ||
8881 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8882 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8883 | #line 8884 "configure" |
438013df AO |
8884 | #include "confdefs.h" |
8885 | ||
8886 | int main() { | |
8887 | int i; | |
8888 | ; return 0; } | |
8889 | EOF | |
78434e59 | 8890 | if { (eval echo configure:8891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8891 | : |
8892 | else | |
8893 | echo "configure: failed program was:" >&5 | |
8894 | cat conftest.$ac_ext >&5 | |
8895 | rm -rf conftest* | |
8896 | gdb_cv_bigtoc= | |
8897 | fi | |
8898 | rm -f conftest* | |
8899 | ||
8900 | fi | |
8901 | ||
8902 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8903 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8904 | ;; | |
8905 | esac | |
8906 | ||
c906108c SS |
8907 | |
8908 | ||
8909 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8910 | case ${host_os} in | |
8911 | hpux*) | |
8912 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
78434e59 | 8913 | echo "configure:8914: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8914 | if test -f /usr/include/dce/cma_config.h ; then |
8915 | if test "$GCC" = "yes" ; then | |
8916 | echo "$ac_t""yes" 1>&6 | |
8917 | cat >> confdefs.h <<\EOF | |
8918 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8919 | EOF | |
8920 | ||
66b965bb | 8921 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8922 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8923 | else | |
8924 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8925 | fi | |
8926 | else | |
8927 | echo "$ac_t""no" 1>&6 | |
8928 | fi | |
8929 | ;; | |
8930 | solaris*) | |
d92419e5 JB |
8931 | # See if thread_db library is around for Solaris thread debugging. |
8932 | # Note that we must explicitly test for version 1 of the library | |
8933 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8934 | # the same API. | |
c906108c | 8935 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
78434e59 | 8936 | echo "configure:8937: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8937 | if test -f /usr/lib/libthread_db.so.1 ; then |
8938 | echo "$ac_t""yes" 1>&6 | |
8939 | cat >> confdefs.h <<\EOF | |
8940 | #define HAVE_THREAD_DB_LIB 1 | |
8941 | EOF | |
8942 | ||
66b965bb | 8943 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8944 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8945 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
78434e59 | 8946 | echo "configure:8947: checking for dlopen in -ldl" >&5 |
c906108c SS |
8947 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8948 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8949 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8950 | else | |
8951 | ac_save_LIBS="$LIBS" | |
8952 | LIBS="-ldl $LIBS" | |
8953 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 8954 | #line 8955 "configure" |
c906108c SS |
8955 | #include "confdefs.h" |
8956 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8957 | /* We use char because int might match the return type of a gcc2 | |
8958 | builtin and then its argument prototype would still apply. */ | |
8959 | char dlopen(); | |
8960 | ||
8961 | int main() { | |
8962 | dlopen() | |
8963 | ; return 0; } | |
8964 | EOF | |
78434e59 | 8965 | if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8966 | rm -rf conftest* |
8967 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8968 | else | |
8969 | echo "configure: failed program was:" >&5 | |
8970 | cat conftest.$ac_ext >&5 | |
8971 | rm -rf conftest* | |
8972 | eval "ac_cv_lib_$ac_lib_var=no" | |
8973 | fi | |
8974 | rm -f conftest* | |
8975 | LIBS="$ac_save_LIBS" | |
8976 | ||
8977 | fi | |
8978 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8979 | echo "$ac_t""yes" 1>&6 | |
8980 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8981 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8982 | cat >> confdefs.h <<EOF | |
8983 | #define $ac_tr_lib 1 | |
8984 | EOF | |
8985 | ||
8986 | LIBS="-ldl $LIBS" | |
8987 | ||
8988 | else | |
8989 | echo "$ac_t""no" 1>&6 | |
8990 | fi | |
8991 | ||
8992 | if test "$GCC" = "yes" ; then | |
8993 | # The GNU linker requires the -export-dynamic option to make | |
8994 | # all symbols visible in the dynamic symbol table. | |
8995 | hold_ldflags=$LDFLAGS | |
8996 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
78434e59 | 8997 | echo "configure:8998: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8998 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8999 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9000 | #line 9001 "configure" |
c906108c SS |
9001 | #include "confdefs.h" |
9002 | ||
9003 | int main() { | |
9004 | int i; | |
9005 | ; return 0; } | |
9006 | EOF | |
78434e59 | 9007 | if { (eval echo configure:9008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9008 | rm -rf conftest* |
9009 | found=yes | |
9010 | else | |
9011 | echo "configure: failed program was:" >&5 | |
9012 | cat conftest.$ac_ext >&5 | |
9013 | rm -rf conftest* | |
9014 | found=no | |
9015 | fi | |
9016 | rm -f conftest* | |
9017 | LDFLAGS=$hold_ldflags | |
9018 | echo "$ac_t""$found" 1>&6 | |
9019 | if test $found = yes; then | |
9020 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
9021 | fi | |
9022 | fi | |
9023 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
9024 | # at one point. | |
9025 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
78434e59 | 9026 | echo "configure:9027: checking if <proc_service.h> is old" >&5 |
c906108c SS |
9027 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
9028 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9029 | else | |
9030 | ||
9031 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9032 | #line 9033 "configure" |
c906108c SS |
9033 | #include "confdefs.h" |
9034 | ||
9035 | #include <proc_service.h> | |
9036 | ps_err_e ps_pdwrite | |
9037 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
9038 | ||
9039 | int main() { | |
9040 | ||
9041 | ; return 0; } | |
9042 | EOF | |
78434e59 | 9043 | if { (eval echo configure:9044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9044 | rm -rf conftest* |
9045 | gdb_cv_proc_service_is_old=no | |
9046 | else | |
9047 | echo "configure: failed program was:" >&5 | |
9048 | cat conftest.$ac_ext >&5 | |
9049 | rm -rf conftest* | |
9050 | gdb_cv_proc_service_is_old=yes | |
9051 | fi | |
9052 | rm -f conftest* | |
9053 | ||
9054 | fi | |
9055 | ||
9056 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
9057 | if test $gdb_cv_proc_service_is_old = yes; then | |
9058 | cat >> confdefs.h <<\EOF | |
9059 | #define PROC_SERVICE_IS_OLD 1 | |
9060 | EOF | |
9061 | ||
9062 | fi | |
9063 | else | |
9064 | echo "$ac_t""no" 1>&6 | |
9065 | fi | |
9066 | ;; | |
d92419e5 JB |
9067 | aix*) |
9068 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
78434e59 | 9069 | echo "configure:9070: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
9070 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
9071 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9072 | else | |
9073 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9074 | #line 9075 "configure" |
d92419e5 JB |
9075 | #include "confdefs.h" |
9076 | #include <sys/pthdebug.h> | |
9077 | int main() { | |
9078 | #ifndef PTHDB_VERSION_3 | |
9079 | #error | |
9080 | #endif | |
9081 | ; return 0; } | |
9082 | EOF | |
78434e59 | 9083 | if { (eval echo configure:9084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
9084 | rm -rf conftest* |
9085 | gdb_cv_have_aix_thread_debug=yes | |
9086 | else | |
9087 | echo "configure: failed program was:" >&5 | |
9088 | cat conftest.$ac_ext >&5 | |
9089 | rm -rf conftest* | |
9090 | gdb_cv_have_aix_thread_debug=no | |
9091 | fi | |
9092 | rm -f conftest* | |
9093 | fi | |
9094 | ||
9095 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
9096 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
9097 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
9098 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
9099 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
9100 | fi | |
9101 | ;; | |
c906108c SS |
9102 | esac |
9103 | ||
9104 | fi | |
9105 | ||
3f47be5c EZ |
9106 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
9107 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
78434e59 | 9108 | echo "configure:9109: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
9109 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
9110 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9111 | else | |
9112 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9113 | #line 9114 "configure" |
3f47be5c EZ |
9114 | #include "confdefs.h" |
9115 | #include <thread_db.h> | |
9116 | int main() { | |
9117 | int i = TD_NOTALLOC; | |
9118 | ; return 0; } | |
9119 | EOF | |
78434e59 | 9120 | if { (eval echo configure:9121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
9121 | rm -rf conftest* |
9122 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
9123 | else | |
9124 | echo "configure: failed program was:" >&5 | |
9125 | cat conftest.$ac_ext >&5 | |
9126 | rm -rf conftest* | |
9127 | gdb_cv_thread_db_h_has_td_notalloc=no | |
9128 | ||
9129 | fi | |
9130 | rm -f conftest* | |
9131 | ||
9132 | fi | |
9133 | ||
9134 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
9135 | fi | |
9136 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
9137 | cat >> confdefs.h <<\EOF | |
9138 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
9139 | EOF | |
9140 | ||
9141 | fi | |
9142 | ||
b757528f JJ |
9143 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
9144 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
78434e59 | 9145 | echo "configure:9146: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
9146 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
9147 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9148 | else | |
9149 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9150 | #line 9151 "configure" |
b757528f JJ |
9151 | #include "confdefs.h" |
9152 | #include <sys/syscall.h> | |
9153 | int main() { | |
9154 | int i = __NR_tkill; | |
9155 | ; return 0; } | |
9156 | EOF | |
78434e59 | 9157 | if { (eval echo configure:9158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
9158 | rm -rf conftest* |
9159 | gdb_cv_sys_syscall_h_has_tkill=yes | |
9160 | else | |
9161 | echo "configure: failed program was:" >&5 | |
9162 | cat conftest.$ac_ext >&5 | |
9163 | rm -rf conftest* | |
9164 | gdb_cv_sys_syscall_h_has_tkill=no | |
9165 | ||
9166 | fi | |
9167 | rm -f conftest* | |
9168 | ||
9169 | fi | |
9170 | ||
9171 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
9172 | fi | |
9173 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
9174 | cat >> confdefs.h <<\EOF | |
9175 | #define HAVE_TKILL_SYSCALL 1 | |
9176 | EOF | |
9177 | ||
9178 | fi | |
9179 | ||
fb40c209 | 9180 | |
030292b7 DJ |
9181 | # Check whether --with-sysroot or --without-sysroot was given. |
9182 | if test "${with_sysroot+set}" = set; then | |
9183 | withval="$with_sysroot" | |
9184 | ||
9185 | case ${with_sysroot} in | |
715d1656 | 9186 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
9187 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
9188 | esac | |
9189 | ||
9190 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
9191 | ||
9192 | if test "x$exec_prefix" = xNONE; then | |
9193 | if test "x$prefix" = xNONE; then | |
9194 | test_prefix=/usr/local | |
9195 | else | |
9196 | test_prefix=$prefix | |
9197 | fi | |
9198 | else | |
9199 | test_prefix=$exec_prefix | |
9200 | fi | |
9201 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
9202 | "${test_prefix}"|"${test_prefix}/"*|\ |
9203 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
9204 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
9205 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
9206 | ;; | |
9207 | esac | |
9208 | ||
9209 | else | |
9210 | ||
9211 | TARGET_SYSTEM_ROOT= | |
9212 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
9213 | ||
9214 | fi | |
9215 | ||
9216 | ||
9217 | ||
9218 | ||
3b851bce AC |
9219 | # NOTE: Don't add -Wall or -Wunused, they both include |
9220 | # -Wunused-parameter which reports bogus warnings. | |
9221 | # NOTE: If you add to this list, remember to update | |
9222 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 9223 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
153721e6 | 9224 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral" |
d8038014 AC |
9225 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
9226 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 9227 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
9228 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
9229 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
9230 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
9231 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
9232 | if test "${enable_build_warnings+set}" = set; then | |
9233 | enableval="$enable_build_warnings" | |
1decb323 | 9234 | case "${enableval}" in |
c906108c SS |
9235 | yes) ;; |
9236 | no) build_warnings="-w";; | |
9237 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9238 | build_warnings="${build_warnings} ${t}";; | |
9239 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9240 | build_warnings="${t} ${build_warnings}";; | |
9241 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9242 | esac | |
d4f3574e | 9243 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 9244 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 9245 | fi |
1decb323 | 9246 | fi |
3b851bce AC |
9247 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
9248 | if test "${enable_gdb_build_warnings+set}" = set; then | |
9249 | enableval="$enable_gdb_build_warnings" | |
9250 | case "${enableval}" in | |
9251 | yes) ;; | |
9252 | no) build_warnings="-w";; | |
9253 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9254 | build_warnings="${build_warnings} ${t}";; | |
9255 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9256 | build_warnings="${t} ${build_warnings}";; | |
9257 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9258 | esac | |
9259 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9260 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9261 | fi | |
9262 | fi | |
104c1213 JM |
9263 | WARN_CFLAGS="" |
9264 | WERROR_CFLAGS="" | |
c906108c SS |
9265 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
9266 | then | |
746a987d | 9267 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
78434e59 | 9268 | echo "configure:9269: checking compiler warning flags" >&5 |
746a987d AC |
9269 | # Separate out the -Werror flag as some files just cannot be |
9270 | # compiled with it enabled. | |
9271 | for w in ${build_warnings}; do | |
9272 | case $w in | |
9273 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
9274 | *) # Check that GCC accepts it | |
4536bbc6 AC |
9275 | saved_CFLAGS="$CFLAGS" |
9276 | CFLAGS="$CFLAGS $w" | |
9277 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9278 | #line 9279 "configure" |
4536bbc6 AC |
9279 | #include "confdefs.h" |
9280 | ||
9281 | int main() { | |
9282 | ||
9283 | ; return 0; } | |
9284 | EOF | |
78434e59 | 9285 | if { (eval echo configure:9286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
9286 | rm -rf conftest* |
9287 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9288 | else | |
9289 | echo "configure: failed program was:" >&5 | |
9290 | cat conftest.$ac_ext >&5 | |
9291 | fi | |
9292 | rm -f conftest* | |
9293 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
9294 | esac |
9295 | done | |
9296 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
9297 | fi |
9298 | ||
9299 | ||
104c1213 | 9300 | |
c906108c SS |
9301 | MMALLOC_CFLAGS= |
9302 | MMALLOC= | |
9303 | ||
9304 | ||
9305 | ||
9306 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
9307 | if test "${with_mmalloc+set}" = set; then | |
9308 | withval="$with_mmalloc" | |
9309 | case "${withval}" in | |
9310 | yes) want_mmalloc=true ;; | |
9311 | no) want_mmalloc=false;; | |
9312 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
9313 | esac | |
9314 | else | |
9315 | want_mmalloc=false | |
9316 | fi | |
9317 | ||
9318 | if test x$want_mmalloc = xtrue; then | |
9319 | cat >> confdefs.h <<\EOF | |
9320 | #define USE_MMALLOC 1 | |
9321 | EOF | |
9322 | ||
9323 | cat >> confdefs.h <<\EOF | |
9324 | #define MMCHECK_FORCE 1 | |
9325 | EOF | |
9326 | ||
9327 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
9328 | MMALLOC='../mmalloc/libmmalloc.a' | |
9329 | fi | |
9330 | ||
7a292a7a SS |
9331 | # In the Cygwin environment, we need some additional flags. |
9332 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
78434e59 | 9333 | echo "configure:9334: checking for cygwin" >&5 |
7a292a7a SS |
9334 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9335 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9336 | else | |
9337 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9338 | #line 9339 "configure" |
7a292a7a SS |
9339 | #include "confdefs.h" |
9340 | ||
9341 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
9342 | lose | |
9343 | #endif | |
9344 | EOF | |
9345 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9346 | egrep "lose" >/dev/null 2>&1; then | |
9347 | rm -rf conftest* | |
9348 | gdb_cv_os_cygwin=yes | |
9349 | else | |
9350 | rm -rf conftest* | |
9351 | gdb_cv_os_cygwin=no | |
9352 | fi | |
9353 | rm -f conftest* | |
9354 | ||
9355 | fi | |
9356 | ||
9357 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
9358 | ||
aff38e61 AC |
9359 | |
9360 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9361 | case ${host} in | |
95cbc983 AC |
9362 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9363 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9364 | esac |
9365 | ||
9366 | ||
cd0fc7c3 SS |
9367 | # libreadline needs libuser32.a in a cygwin environment |
9368 | WIN32LIBS= | |
9369 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9370 | WIN32LIBS="-luser32" |
9371 | case "${target}" in | |
9372 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9373 | ;; | |
9374 | esac | |
cd0fc7c3 | 9375 | fi |
c906108c | 9376 | |
7a292a7a | 9377 | |
3fc11d3e JM |
9378 | LIBGUI="../libgui/src/libgui.a" |
9379 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9380 | ||
9381 | ||
7a292a7a | 9382 | |
3fc11d3e JM |
9383 | WIN32LDAPP= |
9384 | ||
9385 | ||
9386 | ||
9387 | configdir="unix" | |
9388 | ||
9389 | GDBTKLIBS= | |
9390 | if test "${enable_gdbtk}" = "yes"; then | |
9391 | ||
d1c3b63a KS |
9392 | # Gdbtk must have an absolute path to srcdir in order to run |
9393 | # properly when not installed. | |
9394 | here=`pwd` | |
9395 | cd ${srcdir} | |
9396 | GDBTK_SRC_DIR=`pwd` | |
9397 | cd $here | |
9398 | ||
3fc11d3e JM |
9399 | |
9400 | # | |
9401 | # Ok, lets find the tcl configuration | |
9402 | # First, look for one uninstalled. | |
9403 | # the alternative search directory is invoked by --with-tclconfig | |
9404 | # | |
9405 | ||
9406 | if test x"${no_tcl}" = x ; then | |
9407 | # we reset no_tcl in case something fails here | |
9408 | no_tcl=true | |
9409 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9410 | if test "${with_tclconfig+set}" = set; then | |
9411 | withval="$with_tclconfig" | |
9412 | with_tclconfig=${withval} | |
9413 | fi | |
9414 | ||
9415 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
78434e59 | 9416 | echo "configure:9417: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9417 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9418 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9419 | else | |
9420 | ||
9421 | ||
9422 | # First check to see if --with-tclconfig was specified. | |
9423 | if test x"${with_tclconfig}" != x ; then | |
9424 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9425 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9426 | else | |
9427 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9428 | fi | |
9429 | fi | |
9430 | ||
9431 | # then check for a private Tcl installation | |
9432 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9433 | for i in \ | |
9434 | ../tcl \ | |
9435 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9436 | ../../tcl \ | |
9437 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9438 | ../../../tcl \ | |
9439 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9440 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9441 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9442 | break | |
9443 | fi | |
9444 | done | |
9445 | fi | |
9446 | # check in a few common install locations | |
9447 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9448 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9449 | if test -f "$i/tclConfig.sh" ; then | |
9450 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9451 | break | |
9452 | fi | |
9453 | done | |
9454 | fi | |
9455 | # check in a few other private locations | |
9456 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9457 | for i in \ | |
9458 | ${srcdir}/../tcl \ | |
9459 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9460 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9461 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9462 | break | |
9463 | fi | |
9464 | done | |
9465 | fi | |
9466 | ||
9467 | fi | |
9468 | ||
9469 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9470 | TCLCONFIG="# no Tcl configs found" | |
9471 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9472 | else | |
9473 | no_tcl= | |
9474 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9475 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9476 | fi | |
9477 | fi | |
9478 | ||
9479 | if test -z "${no_tcl}"; then | |
9480 | ||
9481 | . $TCLCONFIG | |
9482 | ||
9483 | ||
9484 | ||
9485 | ||
9486 | ||
9487 | ||
9488 | ||
9489 | ||
9490 | ||
9491 | ||
9492 | ||
9493 | ||
9494 | ||
9495 | ||
9496 | ||
9497 | ||
9498 | ||
9499 | ||
9500 | ||
9501 | ||
033afc63 | 9502 | |
3fc11d3e JM |
9503 | |
9504 | ||
9505 | ||
9506 | ||
9507 | ||
9508 | ||
9509 | # | |
9510 | # Ok, lets find the tk configuration | |
9511 | # First, look for one uninstalled. | |
9512 | # the alternative search directory is invoked by --with-tkconfig | |
9513 | # | |
9514 | ||
9515 | if test x"${no_tk}" = x ; then | |
9516 | # we reset no_tk in case something fails here | |
9517 | no_tk=true | |
9518 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9519 | if test "${with_tkconfig+set}" = set; then | |
9520 | withval="$with_tkconfig" | |
9521 | with_tkconfig=${withval} | |
9522 | fi | |
9523 | ||
9524 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
78434e59 | 9525 | echo "configure:9526: checking for Tk configuration" >&5 |
3fc11d3e JM |
9526 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9527 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9528 | else | |
9529 | ||
9530 | ||
9531 | # First check to see if --with-tkconfig was specified. | |
9532 | if test x"${with_tkconfig}" != x ; then | |
9533 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9534 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9535 | else | |
9536 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9537 | fi | |
9538 | fi | |
9539 | ||
9540 | # then check for a private Tk library | |
9541 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9542 | for i in \ | |
9543 | ../tk \ | |
9544 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9545 | ../../tk \ | |
9546 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9547 | ../../../tk \ | |
9548 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9549 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9550 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9551 | break | |
9552 | fi | |
9553 | done | |
9554 | fi | |
9555 | # check in a few common install locations | |
9556 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9557 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9558 | if test -f "$i/tkConfig.sh" ; then | |
9559 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9560 | break | |
9561 | fi | |
9562 | done | |
9563 | fi | |
9564 | # check in a few other private locations | |
9565 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9566 | for i in \ | |
9567 | ${srcdir}/../tk \ | |
9568 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9569 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9570 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9571 | break | |
9572 | fi | |
9573 | done | |
9574 | fi | |
9575 | ||
9576 | fi | |
9577 | ||
9578 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9579 | TKCONFIG="# no Tk configs found" | |
9580 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9581 | else | |
9582 | no_tk= | |
9583 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9584 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9585 | fi | |
9586 | fi | |
9587 | ||
9588 | ||
9589 | ||
dd2504ab JM |
9590 | # now look for Tcl library stuff |
9591 | ||
9592 | case "${host}" in | |
9593 | *-*-cygwin*) | |
9594 | tcldir=../tcl/win/ | |
9595 | ;; | |
9596 | *) | |
9597 | tcldir=../tcl/unix/ | |
9598 | ;; | |
9599 | esac | |
9600 | ||
9601 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9602 | ||
3fc11d3e JM |
9603 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9604 | # point to doing Tcl. | |
9605 | if test -z "${no_tk}"; then | |
9606 | ||
9607 | if test -f "$TKCONFIG" ; then | |
9608 | . $TKCONFIG | |
9609 | fi | |
9610 | ||
9611 | ||
9612 | ||
9613 | ||
9614 | ||
9615 | ||
9616 | ||
9617 | ||
9618 | ||
9619 | ||
9620 | ||
9621 | ||
9622 | ||
9623 | ||
9624 | # | |
9625 | # Ok, lets find the tcl source trees so we can use the headers | |
9626 | # Warning: transition of version 9 to 10 will break this algorithm | |
9627 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9628 | # be careful that we don't match stuff like tclX by accident. | |
9629 | # the alternative search directory is involked by --with-tclinclude | |
9630 | # | |
9631 | ||
9632 | no_tcl=true | |
9633 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
78434e59 | 9634 | echo "configure:9635: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9635 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9636 | if test "${with_tclinclude+set}" = set; then | |
9637 | withval="$with_tclinclude" | |
9638 | with_tclinclude=${withval} | |
9639 | fi | |
9640 | ||
9641 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9643 | else | |
9644 | ||
9645 | # first check to see if --with-tclinclude was specified | |
9646 | if test x"${with_tclinclude}" != x ; then | |
9647 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9648 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9649 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9650 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9651 | else | |
9652 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9653 | fi | |
9654 | fi | |
9655 | ||
9656 | # next check if it came with Tcl configuration file | |
9657 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9658 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9659 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9660 | fi | |
9661 | fi | |
9662 | ||
9663 | # next check in private source directory | |
9664 | # | |
9665 | # since ls returns lowest version numbers first, reverse its output | |
9666 | if test x"${ac_cv_c_tclh}" = x ; then | |
9667 | for i in \ | |
9668 | ${srcdir}/../tcl \ | |
9669 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9670 | ${srcdir}/../../tcl \ | |
9671 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9672 | ${srcdir}/../../../tcl \ | |
9673 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9674 | if test -f $i/generic/tclInt.h ; then | |
9675 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9676 | break | |
9677 | fi | |
9678 | done | |
9679 | fi | |
9680 | # finally check in a few common install locations | |
9681 | # | |
9682 | # since ls returns lowest version numbers first, reverse its output | |
9683 | if test x"${ac_cv_c_tclh}" = x ; then | |
9684 | for i in \ | |
9685 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9686 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9687 | /usr/local/src/tcl \ | |
9688 | /usr/local/lib/tcl \ | |
9689 | ${prefix}/include ; do | |
9690 | if test -f $i/generic/tclInt.h ; then | |
9691 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9692 | break | |
9693 | fi | |
9694 | done | |
9695 | fi | |
9696 | # see if one is installed | |
9697 | if test x"${ac_cv_c_tclh}" = x ; then | |
9698 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9699 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
78434e59 | 9700 | echo "configure:9701: checking for tclInt.h" >&5 |
3fc11d3e JM |
9701 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9702 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9703 | else | |
9704 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9705 | #line 9706 "configure" |
3fc11d3e JM |
9706 | #include "confdefs.h" |
9707 | #include <tclInt.h> | |
9708 | EOF | |
9709 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
78434e59 | 9710 | { (eval echo configure:9711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9711 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9712 | if test -z "$ac_err"; then | |
9713 | rm -rf conftest* | |
9714 | eval "ac_cv_header_$ac_safe=yes" | |
9715 | else | |
9716 | echo "$ac_err" >&5 | |
9717 | echo "configure: failed program was:" >&5 | |
9718 | cat conftest.$ac_ext >&5 | |
9719 | rm -rf conftest* | |
9720 | eval "ac_cv_header_$ac_safe=no" | |
9721 | fi | |
9722 | rm -f conftest* | |
9723 | fi | |
9724 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9725 | echo "$ac_t""yes" 1>&6 | |
9726 | ac_cv_c_tclh=installed | |
9727 | else | |
9728 | echo "$ac_t""no" 1>&6 | |
9729 | ac_cv_c_tclh="" | |
9730 | fi | |
9731 | ||
9732 | fi | |
9733 | ||
9734 | fi | |
9735 | ||
9736 | if test x"${ac_cv_c_tclh}" = x ; then | |
9737 | TCLHDIR="# no Tcl private headers found" | |
9738 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9739 | fi | |
9740 | if test x"${ac_cv_c_tclh}" != x ; then | |
9741 | no_tcl="" | |
9742 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9743 | echo "$ac_t""is installed" 1>&6 | |
9744 | TCLHDIR="" | |
9745 | else | |
9746 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9747 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9748 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9749 | fi | |
9750 | fi | |
9751 | ||
9752 | ||
9753 | ||
9754 | ||
9755 | # | |
9756 | # Ok, lets find the tk source trees so we can use the headers | |
9757 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9758 | # in preference to any others. Same logic is used when choosing library | |
9759 | # and again with Tcl. The search order is the best place to look first, then in | |
9760 | # decreasing significance. The loop breaks if the trigger file is found. | |
9761 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9762 | # directory. This converts the path from a relative to an absolute, so | |
9763 | # recursive cache variables for the path will work right. We check all | |
9764 | # the possible paths in one loop rather than many seperate loops to speed | |
9765 | # things up. | |
9766 | # the alternative search directory is involked by --with-tkinclude | |
9767 | # | |
9768 | no_tk=true | |
9769 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
78434e59 | 9770 | echo "configure:9771: checking for Tk private headers" >&5 |
3fc11d3e JM |
9771 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9772 | if test "${with_tkinclude+set}" = set; then | |
9773 | withval="$with_tkinclude" | |
9774 | with_tkinclude=${withval} | |
9775 | fi | |
9776 | ||
9777 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9778 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9779 | else | |
9780 | ||
9781 | # first check to see if --with-tkinclude was specified | |
9782 | if test x"${with_tkinclude}" != x ; then | |
9783 | if test -f ${with_tkinclude}/tk.h ; then | |
9784 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9785 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9786 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9787 | else | |
9788 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9789 | fi | |
9790 | fi | |
9791 | ||
9792 | # next check if it came with Tk configuration file | |
9793 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9794 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9795 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9796 | fi | |
9797 | fi | |
9798 | ||
9799 | # next check in private source directory | |
9800 | # | |
9801 | # since ls returns lowest version numbers first, reverse its output | |
9802 | if test x"${ac_cv_c_tkh}" = x ; then | |
9803 | for i in \ | |
9804 | ${srcdir}/../tk \ | |
9805 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9806 | ${srcdir}/../../tk \ | |
9807 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9808 | ${srcdir}/../../../tk \ | |
9809 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9810 | if test -f $i/generic/tk.h ; then | |
9811 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9812 | break | |
9813 | fi | |
9814 | done | |
9815 | fi | |
9816 | # finally check in a few common install locations | |
9817 | # | |
9818 | # since ls returns lowest version numbers first, reverse its output | |
9819 | if test x"${ac_cv_c_tkh}" = x ; then | |
9820 | for i in \ | |
9821 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9822 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9823 | /usr/local/src/tk \ | |
9824 | /usr/local/lib/tk \ | |
9825 | ${prefix}/include ; do | |
9826 | if test -f $i/generic/tk.h ; then | |
9827 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9828 | break | |
9829 | fi | |
9830 | done | |
9831 | fi | |
9832 | # see if one is installed | |
9833 | if test x"${ac_cv_c_tkh}" = x ; then | |
9834 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9835 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
78434e59 | 9836 | echo "configure:9837: checking for tk.h" >&5 |
3fc11d3e JM |
9837 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9838 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9839 | else | |
9840 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 9841 | #line 9842 "configure" |
3fc11d3e JM |
9842 | #include "confdefs.h" |
9843 | #include <tk.h> | |
9844 | EOF | |
9845 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
78434e59 | 9846 | { (eval echo configure:9847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9847 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9848 | if test -z "$ac_err"; then | |
9849 | rm -rf conftest* | |
9850 | eval "ac_cv_header_$ac_safe=yes" | |
9851 | else | |
9852 | echo "$ac_err" >&5 | |
9853 | echo "configure: failed program was:" >&5 | |
9854 | cat conftest.$ac_ext >&5 | |
9855 | rm -rf conftest* | |
9856 | eval "ac_cv_header_$ac_safe=no" | |
9857 | fi | |
9858 | rm -f conftest* | |
9859 | fi | |
9860 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9861 | echo "$ac_t""yes" 1>&6 | |
9862 | ac_cv_c_tkh=installed | |
9863 | else | |
9864 | echo "$ac_t""no" 1>&6 | |
9865 | ac_cv_c_tkh="" | |
9866 | fi | |
9867 | ||
9868 | fi | |
9869 | ||
9870 | fi | |
9871 | ||
9872 | if test x"${ac_cv_c_tkh}" != x ; then | |
9873 | no_tk="" | |
9874 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9875 | echo "$ac_t""is installed" 1>&6 | |
9876 | TKHDIR="" | |
9877 | else | |
9878 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9879 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9880 | TKHDIR="-I${ac_cv_c_tkh}" | |
9881 | fi | |
9882 | else | |
9883 | TKHDIR="# no Tk directory found" | |
9884 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9885 | no_tk=true | |
9886 | fi | |
9887 | ||
9888 | ||
9889 | ||
9890 | ||
9891 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
78434e59 | 9892 | echo "configure:9893: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9893 | if test x"${ac_cv_c_itclh}" = x ; then |
9894 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9895 | if test -f $i/generic/itcl.h ; then | |
9896 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9897 | break | |
9898 | fi | |
9899 | done | |
9900 | fi | |
9901 | if test x"${ac_cv_c_itclh}" = x ; then | |
9902 | ITCLHDIR="# no Itcl private headers found" | |
9903 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9904 | fi | |
9905 | if test x"${ac_cv_c_itclh}" != x ; then | |
9906 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9907 | fi | |
9908 | # should always be here | |
9909 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9910 | ||
9911 | #AC_SUBST(ITCLLIB) | |
9912 | ||
9913 | ||
9914 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
78434e59 | 9915 | echo "configure:9916: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9916 | if test x"${ac_cv_c_itkh}" = x ; then |
9917 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9918 | if test -f $i/generic/itk.h ; then | |
9919 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9920 | break | |
9921 | fi | |
9922 | done | |
9923 | fi | |
9924 | if test x"${ac_cv_c_itkh}" = x ; then | |
9925 | ITKHDIR="# no Itk private headers found" | |
9926 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9927 | fi | |
9928 | if test x"${ac_cv_c_itkh}" != x ; then | |
9929 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9930 | fi | |
9931 | # should always be here | |
9932 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9933 | ||
9934 | #AC_SUBST(ITKLIB) | |
9935 | ||
3fc11d3e | 9936 | |
dd2504ab JM |
9937 | |
9938 | # now look for Tk library stuff | |
9939 | ||
9940 | case "${host}" in | |
9941 | *-*-cygwin*) | |
9942 | tkdir=../tk/win/ | |
9943 | ;; | |
9944 | *) | |
9945 | tkdir=../tk/unix/ | |
9946 | ;; | |
9947 | esac | |
9948 | ||
9949 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9950 | ||
3fc11d3e JM |
9951 | # now look for Itcl library stuff |
9952 | ||
9953 | ||
9954 | # | |
9955 | # Ok, lets find the itcl configuration | |
9956 | # First, look for one uninstalled. | |
9957 | # the alternative search directory is invoked by --with-itclconfig | |
9958 | # | |
9959 | ||
9960 | if test x"${no_itcl}" = x ; then | |
9961 | # we reset no_itcl in case something fails here | |
9962 | no_itcl=true | |
9963 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9964 | if test "${with_itclconfig+set}" = set; then | |
9965 | withval="$with_itclconfig" | |
9966 | with_itclconfig=${withval} | |
9967 | fi | |
9968 | ||
9969 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
78434e59 | 9970 | echo "configure:9971: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9971 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9972 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9973 | else | |
9974 | ||
9975 | ||
9976 | # First check to see if --with-itclconfig was specified. | |
9977 | if test x"${with_itclconfig}" != x ; then | |
9978 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9979 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9980 | else | |
9981 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9982 | fi | |
9983 | fi | |
9984 | ||
9985 | # then check for a private Itcl library | |
9986 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9987 | for i in \ | |
9988 | ../itcl/itcl \ | |
9989 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9990 | ../../itcl \ | |
9991 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9992 | ../../../itcl \ | |
9993 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9994 | if test -f "$i/itclConfig.sh" ; then | |
9995 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9996 | break | |
9997 | fi | |
9998 | done | |
9999 | fi | |
10000 | # check in a few common install locations | |
10001 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10002 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10003 | if test -f "$i/itclConfig.sh" ; then | |
10004 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10005 | break | |
10006 | fi | |
10007 | done | |
10008 | fi | |
10009 | # check in a few other private locations | |
10010 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10011 | for i in \ | |
10012 | ${srcdir}/../itcl/itcl \ | |
10013 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
10014 | if test -f "$i/itclConfig.sh" ; then | |
10015 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10016 | break | |
10017 | fi | |
10018 | done | |
10019 | fi | |
10020 | ||
10021 | fi | |
10022 | ||
10023 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10024 | ITCLCONFIG="# no Itcl configs found" | |
10025 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
10026 | else | |
10027 | no_itcl= | |
10028 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
10029 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
10030 | fi | |
10031 | fi | |
10032 | ||
10033 | if test -z "${no_itcl}"; then | |
10034 | ||
10035 | if test -f "$ITCLCONFIG" ; then | |
10036 | . $ITCLCONFIG | |
10037 | fi | |
10038 | ||
10039 | ||
10040 | ||
10041 | ||
10042 | ||
10043 | ||
10044 | ||
10045 | ||
10046 | ||
10047 | ||
3fc11d3e JM |
10048 | |
10049 | ||
10050 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 10051 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
10052 | fi |
10053 | ||
10054 | ||
10055 | # now look for Itk library stuff | |
10056 | ||
10057 | # | |
10058 | # Ok, lets find the itk configuration | |
10059 | # First, look for one uninstalled. | |
10060 | # the alternative search directory is invoked by --with-itkconfig | |
10061 | # | |
10062 | ||
10063 | if test x"${no_itk}" = x ; then | |
10064 | # we reset no_itk in case something fails here | |
10065 | no_itk=true | |
10066 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
10067 | if test "${with_itkconfig+set}" = set; then | |
10068 | withval="$with_itkconfig" | |
10069 | with_itkconfig=${withval} | |
10070 | fi | |
10071 | ||
10072 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
78434e59 | 10073 | echo "configure:10074: checking for Itk configuration" >&5 |
3fc11d3e JM |
10074 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
10075 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10076 | else | |
10077 | ||
10078 | ||
10079 | # First check to see if --with-itkconfig was specified. | |
10080 | if test x"${with_itkconfig}" != x ; then | |
10081 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
10082 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
10083 | else | |
10084 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
10085 | fi | |
10086 | fi | |
10087 | ||
10088 | # then check for a private Itk library | |
10089 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10090 | for i in \ | |
10091 | ../itcl/itk \ | |
10092 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
10093 | ../../itk \ | |
10094 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
10095 | ../../../itk \ | |
10096 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
10097 | if test -f "$i/itkConfig.sh" ; then | |
10098 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10099 | break | |
10100 | fi | |
10101 | done | |
10102 | fi | |
10103 | # check in a few common install locations | |
10104 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10105 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10106 | if test -f "$i/itkConfig.sh" ; then | |
10107 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10108 | break | |
10109 | fi | |
10110 | done | |
10111 | fi | |
10112 | # check in a few other private locations | |
10113 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10114 | for i in \ | |
10115 | ${srcdir}/../itcl/itk \ | |
10116 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
10117 | if test -f "$i/itkConfig.sh" ; then | |
10118 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10119 | break | |
10120 | fi | |
10121 | done | |
10122 | fi | |
10123 | ||
10124 | fi | |
10125 | ||
10126 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10127 | ITKCONFIG="# no Itk configs found" | |
10128 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
10129 | else | |
10130 | no_itk= | |
10131 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
10132 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
10133 | fi | |
10134 | fi | |
10135 | ||
10136 | ||
10137 | if test -z "${no_itcl}"; then | |
10138 | ||
10139 | if test -f "$ITKCONFIG" ; then | |
10140 | . $ITKCONFIG | |
10141 | fi | |
10142 | ||
10143 | ||
10144 | ||
10145 | ||
10146 | ||
10147 | ||
10148 | ||
10149 | ||
10150 | ||
10151 | ||
10152 | ||
10153 | ||
3fc11d3e | 10154 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 10155 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
10156 | fi |
10157 | ||
4226a5a5 | 10158 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
10159 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
10160 | # know whether 8.2 will or not, but I bet it will. | |
10161 | # I don't have to worry about 7.x since we don't support it. | |
10162 | GDBTK_CFLAGS="" | |
10163 | if test "$GCC" = "yes"; then | |
10164 | if test "$TCL_VERSION" != "8.0" ; then | |
10165 | GDBTK_CFLAGS="-fwritable-strings" | |
10166 | fi | |
10167 | fi | |
10168 | ||
10169 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 10170 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
10171 | # Yes, the ordering seems wrong here. But it isn't. |
10172 | # TK_LIBS is the list of libraries that need to be linked | |
10173 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
10174 | # were in LIBS then any link tests after this point would | |
10175 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
10176 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
10177 | |
10178 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
10179 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
10180 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
10181 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 10182 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 10183 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
10184 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
10185 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
10186 | |
10187 | if test x$gdb_cv_os_cygwin = xyes; then | |
10188 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
10189 | WIN32LDAPP="-Wl,--subsystem,console" | |
10190 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
10191 | fi | |
10192 | fi | |
10193 | fi | |
ffc6a242 | 10194 | |
ffc6a242 | 10195 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
10196 | fi |
10197 | ||
10198 | ||
10199 | ||
10200 | ||
10201 | ||
10202 | ||
10203 | ||
10204 | ||
10205 | ||
10206 | ||
10207 | ||
10208 | ||
10209 | ||
dd2504ab | 10210 | |
c906108c SS |
10211 | # If we find X, set shell vars x_includes and x_libraries to the |
10212 | # paths, otherwise set no_x=yes. | |
10213 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
10214 | # --without-x overrides everything else, but does not touch the cache. | |
10215 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
78434e59 | 10216 | echo "configure:10217: checking for X" >&5 |
c906108c SS |
10217 | |
10218 | # Check whether --with-x or --without-x was given. | |
10219 | if test "${with_x+set}" = set; then | |
10220 | withval="$with_x" | |
10221 | : | |
10222 | fi | |
10223 | ||
10224 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
10225 | if test "x$with_x" = xno; then | |
10226 | # The user explicitly disabled X. | |
10227 | have_x=disabled | |
10228 | else | |
10229 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
10230 | # Both variables are already set. | |
10231 | have_x=yes | |
10232 | else | |
10233 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
10234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10235 | else | |
10236 | # One or both of the vars are not set, and there is no cached value. | |
10237 | ac_x_includes=NO ac_x_libraries=NO | |
10238 | rm -fr conftestdir | |
10239 | if mkdir conftestdir; then | |
10240 | cd conftestdir | |
10241 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
10242 | cat > Imakefile <<'EOF' | |
10243 | acfindx: | |
10244 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
10245 | EOF | |
10246 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
10247 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
10248 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
10249 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
10250 | for ac_extension in a so sl; do | |
10251 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
10252 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
10253 | ac_im_usrlibdir=$ac_im_libdir; break | |
10254 | fi | |
10255 | done | |
10256 | # Screen out bogus values from the imake configuration. They are | |
10257 | # bogus both because they are the default anyway, and because | |
10258 | # using them would break gcc on systems where it needs fixed includes. | |
10259 | case "$ac_im_incroot" in | |
10260 | /usr/include) ;; | |
10261 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
10262 | esac | |
10263 | case "$ac_im_usrlibdir" in | |
10264 | /usr/lib | /lib) ;; | |
10265 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
10266 | esac | |
10267 | fi | |
10268 | cd .. | |
10269 | rm -fr conftestdir | |
10270 | fi | |
10271 | ||
10272 | if test "$ac_x_includes" = NO; then | |
10273 | # Guess where to find include files, by looking for this one X11 .h file. | |
10274 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
10275 | ||
10276 | # First, try using that file with no special directory specified. | |
10277 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 10278 | #line 10279 "configure" |
c906108c SS |
10279 | #include "confdefs.h" |
10280 | #include <$x_direct_test_include> | |
10281 | EOF | |
10282 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
78434e59 | 10283 | { (eval echo configure:10284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
10284 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10285 | if test -z "$ac_err"; then | |
10286 | rm -rf conftest* | |
10287 | # We can compile using X headers with no special include directory. | |
10288 | ac_x_includes= | |
10289 | else | |
10290 | echo "$ac_err" >&5 | |
10291 | echo "configure: failed program was:" >&5 | |
10292 | cat conftest.$ac_ext >&5 | |
10293 | rm -rf conftest* | |
10294 | # Look for the header file in a standard set of common directories. | |
10295 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10296 | for ac_dir in \ | |
10297 | /usr/X11/include \ | |
10298 | /usr/X11R6/include \ | |
10299 | /usr/X11R5/include \ | |
10300 | /usr/X11R4/include \ | |
10301 | \ | |
10302 | /usr/include/X11 \ | |
10303 | /usr/include/X11R6 \ | |
10304 | /usr/include/X11R5 \ | |
10305 | /usr/include/X11R4 \ | |
10306 | \ | |
10307 | /usr/local/X11/include \ | |
10308 | /usr/local/X11R6/include \ | |
10309 | /usr/local/X11R5/include \ | |
10310 | /usr/local/X11R4/include \ | |
10311 | \ | |
10312 | /usr/local/include/X11 \ | |
10313 | /usr/local/include/X11R6 \ | |
10314 | /usr/local/include/X11R5 \ | |
10315 | /usr/local/include/X11R4 \ | |
10316 | \ | |
10317 | /usr/X386/include \ | |
10318 | /usr/x386/include \ | |
10319 | /usr/XFree86/include/X11 \ | |
10320 | \ | |
10321 | /usr/include \ | |
10322 | /usr/local/include \ | |
10323 | /usr/unsupported/include \ | |
10324 | /usr/athena/include \ | |
10325 | /usr/local/x11r5/include \ | |
10326 | /usr/lpp/Xamples/include \ | |
10327 | \ | |
10328 | /usr/openwin/include \ | |
10329 | /usr/openwin/share/include \ | |
10330 | ; \ | |
10331 | do | |
10332 | if test -r "$ac_dir/$x_direct_test_include"; then | |
10333 | ac_x_includes=$ac_dir | |
10334 | break | |
10335 | fi | |
10336 | done | |
10337 | fi | |
10338 | rm -f conftest* | |
10339 | fi # $ac_x_includes = NO | |
10340 | ||
10341 | if test "$ac_x_libraries" = NO; then | |
10342 | # Check for the libraries. | |
10343 | ||
10344 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
10345 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
10346 | ||
10347 | # See if we find them without any special options. | |
10348 | # Don't add to $LIBS permanently. | |
10349 | ac_save_LIBS="$LIBS" | |
10350 | LIBS="-l$x_direct_test_library $LIBS" | |
10351 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 10352 | #line 10353 "configure" |
c906108c SS |
10353 | #include "confdefs.h" |
10354 | ||
10355 | int main() { | |
10356 | ${x_direct_test_function}() | |
10357 | ; return 0; } | |
10358 | EOF | |
78434e59 | 10359 | if { (eval echo configure:10360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10360 | rm -rf conftest* |
10361 | LIBS="$ac_save_LIBS" | |
10362 | # We can link X programs with no special library path. | |
10363 | ac_x_libraries= | |
10364 | else | |
10365 | echo "configure: failed program was:" >&5 | |
10366 | cat conftest.$ac_ext >&5 | |
10367 | rm -rf conftest* | |
10368 | LIBS="$ac_save_LIBS" | |
10369 | # First see if replacing the include by lib works. | |
10370 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10371 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10372 | /usr/X11/lib \ | |
10373 | /usr/X11R6/lib \ | |
10374 | /usr/X11R5/lib \ | |
10375 | /usr/X11R4/lib \ | |
10376 | \ | |
10377 | /usr/lib/X11 \ | |
10378 | /usr/lib/X11R6 \ | |
10379 | /usr/lib/X11R5 \ | |
10380 | /usr/lib/X11R4 \ | |
10381 | \ | |
10382 | /usr/local/X11/lib \ | |
10383 | /usr/local/X11R6/lib \ | |
10384 | /usr/local/X11R5/lib \ | |
10385 | /usr/local/X11R4/lib \ | |
10386 | \ | |
10387 | /usr/local/lib/X11 \ | |
10388 | /usr/local/lib/X11R6 \ | |
10389 | /usr/local/lib/X11R5 \ | |
10390 | /usr/local/lib/X11R4 \ | |
10391 | \ | |
10392 | /usr/X386/lib \ | |
10393 | /usr/x386/lib \ | |
10394 | /usr/XFree86/lib/X11 \ | |
10395 | \ | |
10396 | /usr/lib \ | |
10397 | /usr/local/lib \ | |
10398 | /usr/unsupported/lib \ | |
10399 | /usr/athena/lib \ | |
10400 | /usr/local/x11r5/lib \ | |
10401 | /usr/lpp/Xamples/lib \ | |
10402 | /lib/usr/lib/X11 \ | |
10403 | \ | |
10404 | /usr/openwin/lib \ | |
10405 | /usr/openwin/share/lib \ | |
10406 | ; \ | |
10407 | do | |
10408 | for ac_extension in a so sl; do | |
10409 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10410 | ac_x_libraries=$ac_dir | |
10411 | break 2 | |
10412 | fi | |
10413 | done | |
10414 | done | |
10415 | fi | |
10416 | rm -f conftest* | |
10417 | fi # $ac_x_libraries = NO | |
10418 | ||
10419 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10420 | # Didn't find X anywhere. Cache the known absence of X. | |
10421 | ac_cv_have_x="have_x=no" | |
10422 | else | |
10423 | # Record where we found X for the cache. | |
10424 | ac_cv_have_x="have_x=yes \ | |
10425 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10426 | fi | |
10427 | fi | |
10428 | fi | |
10429 | eval "$ac_cv_have_x" | |
10430 | fi # $with_x != no | |
10431 | ||
10432 | if test "$have_x" != yes; then | |
10433 | echo "$ac_t""$have_x" 1>&6 | |
10434 | no_x=yes | |
10435 | else | |
10436 | # If each of the values was on the command line, it overrides each guess. | |
10437 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10438 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10439 | # Update the cache value to reflect the command line values. | |
10440 | ac_cv_have_x="have_x=yes \ | |
10441 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10442 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10443 | fi | |
10444 | ||
10445 | ||
7a292a7a SS |
10446 | |
10447 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
10448 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10449 | # This code just checks for a few cases where we'd like to ignore those | |
10450 | # definitions, even when they're present in the '.mt' file. These cases | |
10451 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10452 | # not part of the source tree. |
7a292a7a SS |
10453 | # |
10454 | # Check whether --enable-sim or --disable-sim was given. | |
10455 | if test "${enable_sim+set}" = set; then | |
10456 | enableval="$enable_sim" | |
10457 | echo "enable_sim = $enable_sim"; | |
10458 | echo "enableval = ${enableval}"; | |
10459 | case "${enableval}" in | |
10460 | yes) ignore_sim=false ;; | |
10461 | no) ignore_sim=true ;; | |
10462 | *) ignore_sim=false ;; | |
10463 | esac | |
10464 | else | |
10465 | ignore_sim=false | |
10466 | fi | |
10467 | ||
10468 | ||
10469 | if test ! -d "${srcdir}/../sim"; then | |
10470 | ignore_sim=true | |
10471 | fi | |
10472 | ||
10473 | if test "${ignore_sim}" = "true"; then | |
10474 | IGNORE_SIM="SIM=" | |
10475 | IGNORE_SIM_OBS="SIM_OBS=" | |
10476 | else | |
10477 | IGNORE_SIM="" | |
10478 | IGNORE_SIM_OBS="" | |
10479 | cat >> confdefs.h <<\EOF | |
10480 | #define WITH_SIM 1 | |
10481 | EOF | |
10482 | ||
10483 | fi | |
10484 | ||
10485 | ||
10486 | ||
c906108c SS |
10487 | |
10488 | ||
10489 | ||
10490 | ||
10491 | ||
10492 | ||
dfcd3bfb | 10493 | |
e56ac5c3 AC |
10494 | |
10495 | ||
b3a90332 AC |
10496 | |
10497 | ||
b46cd165 | 10498 | |
d28f9cdf | 10499 | |
c906108c SS |
10500 | # target_subdir is used by the testsuite to find the target libraries. |
10501 | target_subdir= | |
10502 | if test "${host}" != "${target}"; then | |
10503 | target_subdir="${target_alias}/" | |
10504 | fi | |
10505 | ||
10506 | ||
10507 | frags= | |
10508 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10509 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
10510 | # When building a native debuger the .mh file containing things |
10511 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
10512 | # since it no longer contains anything useful. | |
10513 | if test "${target}" = "${host}"; then | |
10514 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10515 | else | |
10516 | host_makefile_frag=/dev/null | |
10517 | fi | |
c906108c SS |
10518 | fi |
10519 | frags="$frags $host_makefile_frag" | |
10520 | ||
10521 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10522 | if test ! -f ${target_makefile_frag}; then | |
10523 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
10524 | fi | |
10525 | frags="$frags $target_makefile_frag" | |
10526 | ||
10527 | ||
10528 | ||
10529 | ||
10530 | ||
10531 | hostfile=`sed -n ' | |
10532 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10533 | ' ${host_makefile_frag}` | |
10534 | ||
10535 | targetfile=`sed -n ' | |
10536 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10537 | ' ${target_makefile_frag}` | |
10538 | ||
c906108c | 10539 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10540 | # We pick this up from the host configuration file (.mh) because we |
10541 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10542 | nativefile=`sed -n ' |
10543 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10544 | ' ${host_makefile_frag}` | |
c906108c SS |
10545 | fi |
10546 | ||
10547 | ||
b00a8037 DJ |
10548 | if test x"${gdb_osabi}" != x ; then |
10549 | cat >> confdefs.h <<EOF | |
10550 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10551 | EOF | |
10552 | ||
10553 | fi | |
10554 | ||
8dcde887 MK |
10555 | # Enable multi-ice-gdb-server. |
10556 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10557 | if test "${enable_multi_ice+set}" = set; then | |
10558 | enableval="$enable_multi_ice" | |
10559 | case $enableval in | |
10560 | yes | no) | |
10561 | ;; | |
10562 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10563 | esac | |
96baa820 JM |
10564 | fi |
10565 | ||
8dcde887 MK |
10566 | if test "x$enable_multi_ice" = xyes; then |
10567 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10568 | fi |
10569 | ||
8dcde887 MK |
10570 | # We only build gdbserver automatically if host and target are the same. |
10571 | if test "x$target" = "x$host"; then | |
10572 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
78434e59 | 10573 | echo "configure:10574: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10574 | if test "x$build_gdbserver" = xyes; then |
10575 | configdirs="$configdirs gdbserver" | |
10576 | echo "$ac_t""yes" 1>&6 | |
10577 | else | |
10578 | echo "$ac_t""no" 1>&6 | |
10579 | fi | |
10580 | fi | |
10581 | ||
10582 | subdirs="doc testsuite $configdirs" | |
10583 | ||
96baa820 | 10584 | |
c906108c | 10585 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10586 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10587 | # version. | |
c906108c SS |
10588 | |
10589 | files= | |
10590 | links= | |
5a2402b8 | 10591 | |
c906108c | 10592 | rm -f xm.h |
5a2402b8 | 10593 | xm_h="" |
c906108c | 10594 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10595 | xm_h=xm.h |
10596 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10597 | files="${files} ${GDB_XM_FILE}" | |
10598 | links="${links} xm.h" | |
10599 | cat >> confdefs.h <<EOF | |
10600 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10601 | EOF | |
10602 | ||
c906108c | 10603 | fi |
5a2402b8 AC |
10604 | |
10605 | ||
c906108c | 10606 | rm -f tm.h |
5a2402b8 | 10607 | tm_h="" |
c906108c | 10608 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10609 | tm_h=tm.h |
10610 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10611 | files="${files} ${GDB_TM_FILE}" | |
10612 | links="${links} tm.h" | |
10613 | cat >> confdefs.h <<EOF | |
10614 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10615 | EOF | |
10616 | ||
c906108c | 10617 | fi |
5a2402b8 AC |
10618 | |
10619 | ||
c906108c | 10620 | rm -f nm.h |
5a2402b8 | 10621 | nm_h="" |
c906108c | 10622 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10623 | nm_h=nm.h |
10624 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10625 | files="${files} ${GDB_NM_FILE}" | |
10626 | links="${links} nm.h" | |
10627 | cat >> confdefs.h <<EOF | |
10628 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10629 | EOF | |
10630 | ||
c906108c | 10631 | fi |
5a2402b8 AC |
10632 | |
10633 | ||
c906108c SS |
10634 | |
10635 | ||
10636 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
78434e59 | 10637 | echo "configure:10638: checking for Cygwin environment" >&5 |
c906108c SS |
10638 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10639 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10640 | else | |
10641 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 10642 | #line 10643 "configure" |
c906108c SS |
10643 | #include "confdefs.h" |
10644 | ||
10645 | int main() { | |
10646 | ||
10647 | #ifndef __CYGWIN__ | |
10648 | #define __CYGWIN__ __CYGWIN32__ | |
10649 | #endif | |
10650 | return __CYGWIN__; | |
10651 | ; return 0; } | |
10652 | EOF | |
78434e59 | 10653 | if { (eval echo configure:10654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10654 | rm -rf conftest* |
10655 | ac_cv_cygwin=yes | |
10656 | else | |
10657 | echo "configure: failed program was:" >&5 | |
10658 | cat conftest.$ac_ext >&5 | |
10659 | rm -rf conftest* | |
10660 | ac_cv_cygwin=no | |
10661 | fi | |
10662 | rm -f conftest* | |
10663 | rm -f conftest* | |
10664 | fi | |
10665 | ||
10666 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10667 | CYGWIN= | |
10668 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10669 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
78434e59 | 10670 | echo "configure:10671: checking for mingw32 environment" >&5 |
c906108c SS |
10671 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10672 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10673 | else | |
10674 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 10675 | #line 10676 "configure" |
c906108c SS |
10676 | #include "confdefs.h" |
10677 | ||
10678 | int main() { | |
10679 | return __MINGW32__; | |
10680 | ; return 0; } | |
10681 | EOF | |
78434e59 | 10682 | if { (eval echo configure:10683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10683 | rm -rf conftest* |
10684 | ac_cv_mingw32=yes | |
10685 | else | |
10686 | echo "configure: failed program was:" >&5 | |
10687 | cat conftest.$ac_ext >&5 | |
10688 | rm -rf conftest* | |
10689 | ac_cv_mingw32=no | |
10690 | fi | |
10691 | rm -f conftest* | |
10692 | rm -f conftest* | |
10693 | fi | |
10694 | ||
10695 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10696 | MINGW32= | |
10697 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10698 | ||
10699 | ||
10700 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
78434e59 | 10701 | echo "configure:10702: checking for executable suffix" >&5 |
c906108c SS |
10702 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10703 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10704 | else | |
10705 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10706 | ac_cv_exeext=.exe | |
10707 | else | |
10708 | rm -f conftest* | |
10709 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10710 | ac_cv_exeext= | |
78434e59 | 10711 | if { (eval echo configure:10712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10712 | for file in conftest.*; do |
10713 | case $file in | |
78434e59 | 10714 | *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10715 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10716 | esac | |
10717 | done | |
10718 | else | |
10719 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10720 | fi | |
10721 | rm -f conftest* | |
10722 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10723 | fi | |
10724 | fi | |
10725 | ||
10726 | EXEEXT="" | |
10727 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10728 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10729 | ac_exeext=$EXEEXT | |
10730 | ||
10731 | ||
234b45d4 KB |
10732 | |
10733 | cat >> confdefs.h <<\EOF | |
10734 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10735 | EOF | |
10736 | ||
10737 | ||
10738 | ||
10739 | ||
10740 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10741 | if test "${with_libiconv_prefix+set}" = set; then | |
10742 | withval="$with_libiconv_prefix" | |
10743 | ||
10744 | for dir in `echo "$withval" | tr : ' '`; do | |
10745 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10746 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10747 | done | |
10748 | ||
10749 | fi | |
10750 | ||
10751 | ||
10752 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
78434e59 | 10753 | echo "configure:10754: checking for iconv" >&5 |
234b45d4 KB |
10754 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10755 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10756 | else | |
10757 | ||
10758 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10759 | am_cv_lib_iconv=no | |
10760 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 10761 | #line 10762 "configure" |
234b45d4 KB |
10762 | #include "confdefs.h" |
10763 | #include <stdlib.h> | |
10764 | #include <iconv.h> | |
10765 | int main() { | |
10766 | iconv_t cd = iconv_open("",""); | |
10767 | iconv(cd,NULL,NULL,NULL,NULL); | |
10768 | iconv_close(cd); | |
10769 | ; return 0; } | |
10770 | EOF | |
78434e59 | 10771 | if { (eval echo configure:10772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10772 | rm -rf conftest* |
10773 | am_cv_func_iconv=yes | |
10774 | else | |
10775 | echo "configure: failed program was:" >&5 | |
10776 | cat conftest.$ac_ext >&5 | |
10777 | fi | |
10778 | rm -f conftest* | |
10779 | if test "$am_cv_func_iconv" != yes; then | |
10780 | am_save_LIBS="$LIBS" | |
10781 | LIBS="$LIBS -liconv" | |
10782 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 10783 | #line 10784 "configure" |
234b45d4 KB |
10784 | #include "confdefs.h" |
10785 | #include <stdlib.h> | |
10786 | #include <iconv.h> | |
10787 | int main() { | |
10788 | iconv_t cd = iconv_open("",""); | |
10789 | iconv(cd,NULL,NULL,NULL,NULL); | |
10790 | iconv_close(cd); | |
10791 | ; return 0; } | |
10792 | EOF | |
78434e59 | 10793 | if { (eval echo configure:10794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10794 | rm -rf conftest* |
10795 | am_cv_lib_iconv=yes | |
10796 | am_cv_func_iconv=yes | |
10797 | else | |
10798 | echo "configure: failed program was:" >&5 | |
10799 | cat conftest.$ac_ext >&5 | |
10800 | fi | |
10801 | rm -f conftest* | |
10802 | LIBS="$am_save_LIBS" | |
10803 | fi | |
10804 | ||
10805 | fi | |
10806 | ||
10807 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10808 | if test "$am_cv_func_iconv" = yes; then | |
10809 | cat >> confdefs.h <<\EOF | |
10810 | #define HAVE_ICONV 1 | |
10811 | EOF | |
10812 | ||
10813 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
78434e59 | 10814 | echo "configure:10815: checking for iconv declaration" >&5 |
234b45d4 KB |
10815 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10816 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10817 | else | |
10818 | ||
10819 | cat > conftest.$ac_ext <<EOF | |
78434e59 | 10820 | #line 10821 "configure" |
234b45d4 KB |
10821 | #include "confdefs.h" |
10822 | ||
10823 | #include <stdlib.h> | |
10824 | #include <iconv.h> | |
10825 | extern | |
10826 | #ifdef __cplusplus | |
10827 | "C" | |
10828 | #endif | |
10829 | #if defined(__STDC__) || defined(__cplusplus) | |
10830 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10831 | #else | |
10832 | size_t iconv(); | |
10833 | #endif | |
10834 | ||
10835 | int main() { | |
10836 | ||
10837 | ; return 0; } | |
10838 | EOF | |
78434e59 | 10839 | if { (eval echo configure:10840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10840 | rm -rf conftest* |
10841 | am_cv_proto_iconv_arg1="" | |
10842 | else | |
10843 | echo "configure: failed program was:" >&5 | |
10844 | cat conftest.$ac_ext >&5 | |
10845 | rm -rf conftest* | |
10846 | am_cv_proto_iconv_arg1="const" | |
10847 | fi | |
10848 | rm -f conftest* | |
10849 | 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);" | |
10850 | fi | |
10851 | ||
10852 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10853 | echo "$ac_t""${ac_t:- | |
10854 | }$am_cv_proto_iconv" 1>&6 | |
10855 | cat >> confdefs.h <<EOF | |
10856 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10857 | EOF | |
10858 | ||
10859 | fi | |
10860 | LIBICONV= | |
10861 | if test "$am_cv_lib_iconv" = yes; then | |
10862 | LIBICONV="-liconv" | |
10863 | fi | |
10864 | ||
10865 | ||
10866 | ||
c906108c SS |
10867 | trap '' 1 2 15 |
10868 | cat > confcache <<\EOF | |
10869 | # This file is a shell script that caches the results of configure | |
10870 | # tests run on this system so they can be shared between configure | |
10871 | # scripts and configure runs. It is not useful on other systems. | |
10872 | # If it contains results you don't want to keep, you may remove or edit it. | |
10873 | # | |
10874 | # By default, configure uses ./config.cache as the cache file, | |
10875 | # creating it if it does not exist already. You can give configure | |
10876 | # the --cache-file=FILE option to use a different cache file; that is | |
10877 | # what configure does when it calls configure scripts in | |
10878 | # subdirectories, so they share the cache. | |
10879 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10880 | # config.status only pays attention to the cache file if you give it the | |
10881 | # --recheck option to rerun configure. | |
10882 | # | |
10883 | EOF | |
10884 | # The following way of writing the cache mishandles newlines in values, | |
10885 | # but we know of no workaround that is simple, portable, and efficient. | |
10886 | # So, don't put newlines in cache variables' values. | |
10887 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10888 | # and sets the high bit in the cache file unless we assign to the vars. | |
10889 | (set) 2>&1 | | |
10890 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10891 | *ac_space=\ *) | |
10892 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10893 | # turns \\\\ into \\, and sed turns \\ into \). | |
10894 | sed -n \ | |
10895 | -e "s/'/'\\\\''/g" \ | |
10896 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10897 | ;; | |
10898 | *) | |
10899 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10900 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10901 | ;; | |
10902 | esac >> confcache | |
10903 | if cmp -s $cache_file confcache; then | |
10904 | : | |
10905 | else | |
10906 | if test -w $cache_file; then | |
10907 | echo "updating cache $cache_file" | |
10908 | cat confcache > $cache_file | |
10909 | else | |
10910 | echo "not updating unwritable cache $cache_file" | |
10911 | fi | |
10912 | fi | |
10913 | rm -f confcache | |
10914 | ||
10915 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10916 | ||
10917 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10918 | # Let make expand exec_prefix. | |
10919 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10920 | ||
10921 | # Any assignment to VPATH causes Sun make to only execute | |
10922 | # the first set of double-colon rules, so remove it if not needed. | |
10923 | # If there is a colon in the path, we need to keep it. | |
10924 | if test "x$srcdir" = x.; then | |
10925 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10926 | fi | |
10927 | ||
10928 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10929 | ||
10930 | DEFS=-DHAVE_CONFIG_H | |
10931 | ||
10932 | # Without the "./", some shells look in PATH for config.status. | |
10933 | : ${CONFIG_STATUS=./config.status} | |
10934 | ||
10935 | echo creating $CONFIG_STATUS | |
10936 | rm -f $CONFIG_STATUS | |
10937 | cat > $CONFIG_STATUS <<EOF | |
10938 | #! /bin/sh | |
10939 | # Generated automatically by configure. | |
10940 | # Run this file to recreate the current configuration. | |
10941 | # This directory was configured as follows, | |
10942 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10943 | # | |
10944 | # $0 $ac_configure_args | |
10945 | # | |
10946 | # Compiler output produced by configure, useful for debugging | |
10947 | # configure, is in ./config.log if it exists. | |
10948 | ||
10949 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10950 | for ac_option | |
10951 | do | |
10952 | case "\$ac_option" in | |
10953 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10954 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10955 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10956 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10957 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10958 | exit 0 ;; | |
10959 | -help | --help | --hel | --he | --h) | |
10960 | echo "\$ac_cs_usage"; exit 0 ;; | |
10961 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10962 | esac | |
10963 | done | |
10964 | ||
10965 | ac_given_srcdir=$srcdir | |
10966 | ac_given_INSTALL="$INSTALL" | |
10967 | ||
ed952ac5 | 10968 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10969 | EOF |
10970 | cat >> $CONFIG_STATUS <<EOF | |
10971 | ||
10972 | # Protect against being on the right side of a sed subst in config.status. | |
10973 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10974 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10975 | $ac_vpsub | |
10976 | $extrasub | |
10977 | s%@SHELL@%$SHELL%g | |
10978 | s%@CFLAGS@%$CFLAGS%g | |
10979 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10980 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10981 | s%@FFLAGS@%$FFLAGS%g | |
10982 | s%@DEFS@%$DEFS%g | |
10983 | s%@LDFLAGS@%$LDFLAGS%g | |
10984 | s%@LIBS@%$LIBS%g | |
10985 | s%@exec_prefix@%$exec_prefix%g | |
10986 | s%@prefix@%$prefix%g | |
10987 | s%@program_transform_name@%$program_transform_name%g | |
10988 | s%@bindir@%$bindir%g | |
10989 | s%@sbindir@%$sbindir%g | |
10990 | s%@libexecdir@%$libexecdir%g | |
10991 | s%@datadir@%$datadir%g | |
10992 | s%@sysconfdir@%$sysconfdir%g | |
10993 | s%@sharedstatedir@%$sharedstatedir%g | |
10994 | s%@localstatedir@%$localstatedir%g | |
10995 | s%@libdir@%$libdir%g | |
10996 | s%@includedir@%$includedir%g | |
10997 | s%@oldincludedir@%$oldincludedir%g | |
10998 | s%@infodir@%$infodir%g | |
10999 | s%@mandir@%$mandir%g | |
413ccac7 AC |
11000 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
11001 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
11002 | s%@MAINT@%$MAINT%g | |
c906108c SS |
11003 | s%@CC@%$CC%g |
11004 | s%@CPP@%$CPP%g | |
11005 | s%@host@%$host%g | |
11006 | s%@host_alias@%$host_alias%g | |
11007 | s%@host_cpu@%$host_cpu%g | |
11008 | s%@host_vendor@%$host_vendor%g | |
11009 | s%@host_os@%$host_os%g | |
11010 | s%@target@%$target%g | |
11011 | s%@target_alias@%$target_alias%g | |
11012 | s%@target_cpu@%$target_cpu%g | |
11013 | s%@target_vendor@%$target_vendor%g | |
11014 | s%@target_os@%$target_os%g | |
11015 | s%@build@%$build%g | |
11016 | s%@build_alias@%$build_alias%g | |
11017 | s%@build_cpu@%$build_cpu%g | |
11018 | s%@build_vendor@%$build_vendor%g | |
11019 | s%@build_os@%$build_os%g | |
c906108c | 11020 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 11021 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
11022 | s%@ALLOCA@%$ALLOCA%g |
11023 | s%@USE_NLS@%$USE_NLS%g | |
11024 | s%@MSGFMT@%$MSGFMT%g | |
11025 | s%@GMSGFMT@%$GMSGFMT%g | |
11026 | s%@XGETTEXT@%$XGETTEXT%g | |
11027 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
11028 | s%@CATALOGS@%$CATALOGS%g | |
11029 | s%@CATOBJEXT@%$CATOBJEXT%g | |
11030 | s%@DATADIRNAME@%$DATADIRNAME%g | |
11031 | s%@GMOFILES@%$GMOFILES%g | |
11032 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
11033 | s%@INTLDEPS@%$INTLDEPS%g | |
11034 | s%@INTLLIBS@%$INTLLIBS%g | |
11035 | s%@INTLOBJS@%$INTLOBJS%g | |
11036 | s%@POFILES@%$POFILES%g | |
11037 | s%@POSUB@%$POSUB%g | |
11038 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
11039 | s%@GT_NO@%$GT_NO%g | |
11040 | s%@GT_YES@%$GT_YES%g | |
11041 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
11042 | s%@l@%$l%g | |
8dcde887 | 11043 | s%@subdirs@%$subdirs%g |
7a292a7a | 11044 | s%@AWK@%$AWK%g |
c906108c SS |
11045 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
11046 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
11047 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
11048 | s%@LN_S@%$LN_S%g |
11049 | s%@YACC@%$YACC%g | |
c906108c | 11050 | s%@AR@%$AR%g |
95ca63c4 CF |
11051 | s%@DLLTOOL@%$DLLTOOL%g |
11052 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 11053 | s%@MIG@%$MIG%g |
c906108c | 11054 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
11055 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
11056 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 11057 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 11058 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
11059 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
11060 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 11061 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 11062 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
11063 | s%@LIBGUI@%$LIBGUI%g |
11064 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
11065 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
11066 | s%@TCL_VERSION@%$TCL_VERSION%g | |
11067 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
11068 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
11069 | s%@TCL_CC@%$TCL_CC%g | |
11070 | s%@TCL_DEFS@%$TCL_DEFS%g | |
11071 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
11072 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
11073 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
11074 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
11075 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
11076 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
11077 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 11078 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
11079 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
11080 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
11081 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
11082 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
11083 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
11084 | s%@TK_VERSION@%$TK_VERSION%g | |
11085 | s%@TK_DEFS@%$TK_DEFS%g | |
11086 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
11087 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
11088 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
11089 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
11090 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
11091 | s%@TCLHDIR@%$TCLHDIR%g | |
11092 | s%@TKHDIR@%$TKHDIR%g | |
11093 | s%@ITCLHDIR@%$ITCLHDIR%g | |
11094 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
11095 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
11096 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
11097 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
11098 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
11099 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
11100 | s%@ITK_VERSION@%$ITK_VERSION%g | |
11101 | s%@ITK_DEFS@%$ITK_DEFS%g | |
11102 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
11103 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
11104 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
11105 | s%@X_CFLAGS@%$X_CFLAGS%g |
11106 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
11107 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
11108 | s%@TCL_DEPS@%$TCL_DEPS%g |
11109 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
11110 | s%@ITCLLIB@%$ITCLLIB%g |
11111 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
11112 | s%@ITKLIB@%$ITKLIB%g | |
11113 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
11114 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
11115 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 11116 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
11117 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
11118 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 11119 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 11120 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c | 11121 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
66b965bb | 11122 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
11123 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
11124 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 11125 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
11126 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
11127 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
11128 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
11129 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
11130 | s%@target_subdir@%$target_subdir%g |
11131 | /@host_makefile_frag@/r $host_makefile_frag | |
11132 | s%@host_makefile_frag@%%g | |
11133 | /@target_makefile_frag@/r $target_makefile_frag | |
11134 | s%@target_makefile_frag@%%g | |
11135 | s%@frags@%$frags%g | |
5a2402b8 AC |
11136 | s%@xm_h@%$xm_h%g |
11137 | s%@tm_h@%$tm_h%g | |
11138 | s%@nm_h@%$nm_h%g | |
c906108c | 11139 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 11140 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
11141 | |
11142 | CEOF | |
11143 | EOF | |
11144 | ||
11145 | cat >> $CONFIG_STATUS <<\EOF | |
11146 | ||
11147 | # Split the substitutions into bite-sized pieces for seds with | |
11148 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 11149 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
11150 | ac_file=1 # Number of current file. |
11151 | ac_beg=1 # First line for current file. | |
11152 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
11153 | ac_more_lines=: | |
11154 | ac_sed_cmds="" | |
11155 | while $ac_more_lines; do | |
11156 | if test $ac_beg -gt 1; then | |
11157 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
11158 | else | |
11159 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
11160 | fi | |
11161 | if test ! -s conftest.s$ac_file; then | |
11162 | ac_more_lines=false | |
11163 | rm -f conftest.s$ac_file | |
11164 | else | |
11165 | if test -z "$ac_sed_cmds"; then | |
11166 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
11167 | else | |
11168 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
11169 | fi | |
11170 | ac_file=`expr $ac_file + 1` | |
11171 | ac_beg=$ac_end | |
11172 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
11173 | fi | |
11174 | done | |
11175 | if test -z "$ac_sed_cmds"; then | |
11176 | ac_sed_cmds=cat | |
11177 | fi | |
11178 | EOF | |
11179 | ||
11180 | cat >> $CONFIG_STATUS <<EOF | |
11181 | ||
ed952ac5 | 11182 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
11183 | EOF |
11184 | cat >> $CONFIG_STATUS <<\EOF | |
11185 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
11186 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11187 | case "$ac_file" in | |
11188 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11189 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11190 | *) ac_file_in="${ac_file}.in" ;; | |
11191 | esac | |
11192 | ||
11193 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
11194 | ||
11195 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11196 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11197 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11198 | # The file is in a subdirectory. | |
11199 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11200 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
11201 | # A "../" for each directory in $ac_dir_suffix. | |
11202 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
11203 | else | |
11204 | ac_dir_suffix= ac_dots= | |
11205 | fi | |
11206 | ||
11207 | case "$ac_given_srcdir" in | |
11208 | .) srcdir=. | |
11209 | if test -z "$ac_dots"; then top_srcdir=. | |
11210 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
11211 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
11212 | *) # Relative path. | |
11213 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
11214 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
11215 | esac | |
11216 | ||
11217 | case "$ac_given_INSTALL" in | |
11218 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11219 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11220 | esac | |
11221 | ||
11222 | echo creating "$ac_file" | |
11223 | rm -f "$ac_file" | |
11224 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
11225 | case "$ac_file" in | |
11226 | *Makefile*) ac_comsub="1i\\ | |
11227 | # $configure_input" ;; | |
11228 | *) ac_comsub= ;; | |
11229 | esac | |
11230 | ||
11231 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11232 | sed -e "$ac_comsub | |
11233 | s%@configure_input@%$configure_input%g | |
11234 | s%@srcdir@%$srcdir%g | |
11235 | s%@top_srcdir@%$top_srcdir%g | |
11236 | s%@INSTALL@%$INSTALL%g | |
11237 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
11238 | fi; done | |
11239 | rm -f conftest.s* | |
11240 | ||
11241 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
11242 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
11243 | # | |
11244 | # ac_d sets the value in "#define NAME VALUE" lines. | |
11245 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
11246 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
11247 | ac_dC='\3' | |
11248 | ac_dD='%g' | |
11249 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
11250 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11251 | ac_uB='\([ ]\)%\1#\2define\3' | |
11252 | ac_uC=' ' | |
11253 | ac_uD='\4%g' | |
11254 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
11255 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11256 | ac_eB='$%\1#\2define\3' | |
11257 | ac_eC=' ' | |
11258 | ac_eD='%g' | |
11259 | ||
11260 | if test "${CONFIG_HEADERS+set}" != set; then | |
11261 | EOF | |
11262 | cat >> $CONFIG_STATUS <<EOF | |
11263 | CONFIG_HEADERS="config.h:config.in" | |
11264 | EOF | |
11265 | cat >> $CONFIG_STATUS <<\EOF | |
11266 | fi | |
11267 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
11268 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11269 | case "$ac_file" in | |
11270 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11271 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11272 | *) ac_file_in="${ac_file}.in" ;; | |
11273 | esac | |
11274 | ||
11275 | echo creating $ac_file | |
11276 | ||
11277 | rm -f conftest.frag conftest.in conftest.out | |
11278 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11279 | cat $ac_file_inputs > conftest.in | |
11280 | ||
11281 | EOF | |
11282 | ||
11283 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
11284 | # the proper values into config.h.in to produce config.h. And first: | |
11285 | # Protect against being on the right side of a sed subst in config.status. | |
11286 | # Protect against being in an unquoted here document in config.status. | |
11287 | rm -f conftest.vals | |
11288 | cat > conftest.hdr <<\EOF | |
11289 | s/[\\&%]/\\&/g | |
11290 | s%[\\$`]%\\&%g | |
11291 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
11292 | s%ac_d%ac_u%gp | |
11293 | s%ac_u%ac_e%gp | |
11294 | EOF | |
11295 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
11296 | rm -f conftest.hdr | |
11297 | ||
11298 | # This sed command replaces #undef with comments. This is necessary, for | |
11299 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
11300 | # on some systems where configure will not decide to define it. | |
11301 | cat >> conftest.vals <<\EOF | |
11302 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
11303 | EOF | |
11304 | ||
11305 | # Break up conftest.vals because some shells have a limit on | |
11306 | # the size of here documents, and old seds have small limits too. | |
11307 | ||
11308 | rm -f conftest.tail | |
11309 | while : | |
11310 | do | |
11311 | ac_lines=`grep -c . conftest.vals` | |
11312 | # grep -c gives empty output for an empty file on some AIX systems. | |
11313 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
11314 | # Write a limited-size here document to conftest.frag. | |
11315 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
11316 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
11317 | echo 'CEOF | |
11318 | sed -f conftest.frag conftest.in > conftest.out | |
11319 | rm -f conftest.in | |
11320 | mv conftest.out conftest.in | |
11321 | ' >> $CONFIG_STATUS | |
11322 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
11323 | rm -f conftest.vals | |
11324 | mv conftest.tail conftest.vals | |
11325 | done | |
11326 | rm -f conftest.vals | |
11327 | ||
11328 | cat >> $CONFIG_STATUS <<\EOF | |
11329 | rm -f conftest.frag conftest.h | |
11330 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11331 | cat conftest.in >> conftest.h | |
11332 | rm -f conftest.in | |
11333 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11334 | echo "$ac_file is unchanged" | |
11335 | rm -f conftest.h | |
11336 | else | |
11337 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11338 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11339 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11340 | # The file is in a subdirectory. | |
11341 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11342 | fi | |
11343 | rm -f $ac_file | |
11344 | mv conftest.h $ac_file | |
11345 | fi | |
11346 | fi; done | |
11347 | ||
11348 | EOF | |
11349 | ||
11350 | cat >> $CONFIG_STATUS <<EOF | |
11351 | ac_sources="$files" | |
11352 | ac_dests="$links" | |
11353 | EOF | |
11354 | ||
11355 | cat >> $CONFIG_STATUS <<\EOF | |
11356 | srcdir=$ac_given_srcdir | |
11357 | while test -n "$ac_sources"; do | |
11358 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11359 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11360 | ||
11361 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11362 | ||
11363 | if test ! -r $srcdir/$ac_source; then | |
11364 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11365 | fi | |
11366 | rm -f $ac_dest | |
11367 | ||
11368 | # Make relative symlinks. | |
11369 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11370 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11371 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11372 | # The dest file is in a subdirectory. | |
11373 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11374 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11375 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11376 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11377 | else | |
11378 | ac_dest_dir_suffix= ac_dots= | |
11379 | fi | |
11380 | ||
11381 | case "$srcdir" in | |
11382 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11383 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11384 | esac | |
11385 | ||
11386 | # Make a symlink if possible; otherwise try a hard link. | |
11387 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11388 | ln $srcdir/$ac_source $ac_dest; then : | |
11389 | else | |
11390 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11391 | fi | |
11392 | done | |
11393 | EOF | |
11394 | cat >> $CONFIG_STATUS <<EOF | |
11395 | ||
11396 | gdb_host_cpu=$gdb_host_cpu | |
11397 | gdb_target_cpu=$gdb_target_cpu | |
11398 | nativefile=$nativefile | |
11399 | ||
11400 | EOF | |
11401 | cat >> $CONFIG_STATUS <<\EOF | |
11402 | ||
7ee6d7eb | 11403 | if test "${nativefile}" = ""; then |
c4620205 | 11404 | < Makefile \ |
e27da16d JT |
11405 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
11406 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
11407 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
11408 | > Makefile.tem | |
c906108c SS |
11409 | mv -f Makefile.tem Makefile |
11410 | fi | |
11411 | ||
11412 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
11413 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
11414 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11415 | mv -f Makefile.tmp Makefile | |
11416 | ||
2acceee2 | 11417 | |
c906108c SS |
11418 | case x$CONFIG_HEADERS in |
11419 | xconfig.h:config.in) | |
11420 | echo > stamp-h ;; | |
11421 | esac | |
11422 | ||
11423 | exit 0 | |
11424 | EOF | |
11425 | chmod +x $CONFIG_STATUS | |
11426 | rm -fr confdefs* $ac_clean_files | |
11427 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11428 | ||
11429 | if test "$no_recursion" != yes; then | |
11430 | ||
11431 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11432 | ac_sub_configure_args= | |
11433 | ac_prev= | |
11434 | for ac_arg in $ac_configure_args; do | |
11435 | if test -n "$ac_prev"; then | |
11436 | ac_prev= | |
11437 | continue | |
11438 | fi | |
11439 | case "$ac_arg" in | |
11440 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11441 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11442 | ac_prev=cache_file ;; | |
11443 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11444 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11445 | ;; | |
11446 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11447 | ac_prev=srcdir ;; | |
11448 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11449 | ;; | |
11450 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11451 | esac | |
11452 | done | |
11453 | ||
8dcde887 | 11454 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11455 | |
11456 | # Do not complain, so a configure script can configure whichever | |
11457 | # parts of a large source tree are present. | |
11458 | if test ! -d $srcdir/$ac_config_dir; then | |
11459 | continue | |
11460 | fi | |
11461 | ||
11462 | echo configuring in $ac_config_dir | |
11463 | ||
11464 | case "$srcdir" in | |
11465 | .) ;; | |
11466 | *) | |
11467 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11468 | else | |
11469 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11470 | fi | |
11471 | ;; | |
11472 | esac | |
11473 | ||
11474 | ac_popdir=`pwd` | |
11475 | cd $ac_config_dir | |
11476 | ||
11477 | # A "../" for each directory in /$ac_config_dir. | |
11478 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11479 | ||
11480 | case "$srcdir" in | |
11481 | .) # No --srcdir option. We are building in place. | |
11482 | ac_sub_srcdir=$srcdir ;; | |
11483 | /*) # Absolute path. | |
11484 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11485 | *) # Relative path. | |
11486 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11487 | esac | |
11488 | ||
11489 | # Check for guested configure; otherwise get Cygnus style configure. | |
11490 | if test -f $ac_sub_srcdir/configure; then | |
11491 | ac_sub_configure=$ac_sub_srcdir/configure | |
11492 | elif test -f $ac_sub_srcdir/configure.in; then | |
11493 | ac_sub_configure=$ac_configure | |
11494 | else | |
11495 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11496 | ac_sub_configure= | |
11497 | fi | |
11498 | ||
11499 | # The recursion is here. | |
11500 | if test -n "$ac_sub_configure"; then | |
11501 | ||
11502 | # Make the cache file name correct relative to the subdirectory. | |
11503 | case "$cache_file" in | |
11504 | /*) ac_sub_cache_file=$cache_file ;; | |
11505 | *) # Relative path. | |
11506 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11507 | esac | |
11508 | case "$ac_given_INSTALL" in | |
11509 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11510 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11511 | esac | |
11512 | ||
11513 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11514 | # The eval makes quoting arguments work. | |
11515 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11516 | then : | |
11517 | else | |
11518 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11519 | fi | |
11520 | fi | |
11521 | ||
11522 | cd $ac_popdir | |
11523 | done | |
11524 | fi | |
11525 | ||
11526 | ||
11527 | exit 0 |