Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
5b5d99cf JB |
21 | ac_help="$ac_help |
22 | --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]" | |
627af7ea MK |
23 | ac_help="$ac_help |
24 | --disable-gdbcli disable command-line interface (CLI)" | |
25 | ac_help="$ac_help | |
26 | --disable-gdbmi disable machine-interface (MI)" | |
06825bd1 MK |
27 | ac_help="$ac_help |
28 | --enable-tui enable full-screen terminal user interface (TUI)" | |
8ee53726 | 29 | ac_help="$ac_help |
d28f9cdf | 30 | --enable-gdbtk enable gdbtk graphical user interface (GUI)" |
0e5d83e3 JJ |
31 | ac_help="$ac_help |
32 | --with-libunwind Use libunwind frame unwinding support" | |
d28f9cdf DJ |
33 | ac_help="$ac_help |
34 | --enable-profiling enable profiling of GDB" | |
06825bd1 MK |
35 | ac_help="$ac_help |
36 | --without-included-regex don't use included regex; this is the default | |
37 | on systems with version 2 of the GNU C library | |
38 | (use with caution on other system)" | |
030292b7 DJ |
39 | ac_help="$ac_help |
40 | --with-sysroot[=DIR] Search for usr/lib et al within DIR." | |
c906108c SS |
41 | ac_help="$ac_help |
42 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
43 | ac_help="$ac_help |
44 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
7a292a7a SS |
45 | ac_help="$ac_help |
46 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
47 | ac_help="$ac_help | |
48 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-tclinclude=DIR Directory where tcl private headers are" | |
51 | ac_help="$ac_help | |
52 | --with-tkinclude=DIR Directory where tk private headers are" | |
53 | ac_help="$ac_help | |
54 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
55 | ac_help="$ac_help | |
56 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --with-x use the X Window System" | |
7a292a7a SS |
59 | ac_help="$ac_help |
60 | --enable-sim Link gdb with simulator" | |
8dcde887 MK |
61 | ac_help="$ac_help |
62 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
63 | ac_help="$ac_help |
64 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
65 | |
66 | # Initialize some variables set by options. | |
67 | # The variables have the same names as the options, with | |
68 | # dashes changed to underlines. | |
69 | build=NONE | |
70 | cache_file=./config.cache | |
71 | exec_prefix=NONE | |
72 | host=NONE | |
73 | no_create= | |
74 | nonopt=NONE | |
75 | no_recursion= | |
76 | prefix=NONE | |
77 | program_prefix=NONE | |
78 | program_suffix=NONE | |
79 | program_transform_name=s,x,x, | |
80 | silent= | |
81 | site= | |
82 | srcdir= | |
83 | target=NONE | |
84 | verbose= | |
85 | x_includes=NONE | |
86 | x_libraries=NONE | |
87 | bindir='${exec_prefix}/bin' | |
88 | sbindir='${exec_prefix}/sbin' | |
89 | libexecdir='${exec_prefix}/libexec' | |
90 | datadir='${prefix}/share' | |
91 | sysconfdir='${prefix}/etc' | |
92 | sharedstatedir='${prefix}/com' | |
93 | localstatedir='${prefix}/var' | |
94 | libdir='${exec_prefix}/lib' | |
95 | includedir='${prefix}/include' | |
96 | oldincludedir='/usr/include' | |
97 | infodir='${prefix}/info' | |
98 | mandir='${prefix}/man' | |
99 | ||
100 | # Initialize some other variables. | |
101 | subdirs= | |
102 | MFLAGS= MAKEFLAGS= | |
103 | SHELL=${CONFIG_SHELL-/bin/sh} | |
104 | # Maximum number of lines to put in a shell here document. | |
105 | ac_max_here_lines=12 | |
106 | ||
107 | ac_prev= | |
108 | for ac_option | |
109 | do | |
110 | ||
111 | # If the previous option needs an argument, assign it. | |
112 | if test -n "$ac_prev"; then | |
113 | eval "$ac_prev=\$ac_option" | |
114 | ac_prev= | |
115 | continue | |
116 | fi | |
117 | ||
118 | case "$ac_option" in | |
119 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
120 | *) ac_optarg= ;; | |
121 | esac | |
122 | ||
123 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
124 | ||
125 | case "$ac_option" in | |
126 | ||
127 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
128 | ac_prev=bindir ;; | |
129 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
130 | bindir="$ac_optarg" ;; | |
131 | ||
132 | -build | --build | --buil | --bui | --bu) | |
133 | ac_prev=build ;; | |
134 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
135 | build="$ac_optarg" ;; | |
136 | ||
137 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
138 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
139 | ac_prev=cache_file ;; | |
140 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
141 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
142 | cache_file="$ac_optarg" ;; | |
143 | ||
144 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
145 | ac_prev=datadir ;; | |
146 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
147 | | --da=*) | |
148 | datadir="$ac_optarg" ;; | |
149 | ||
150 | -disable-* | --disable-*) | |
151 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
152 | # Reject names that are not valid shell variable names. | |
153 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
154 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
155 | fi | |
156 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
157 | eval "enable_${ac_feature}=no" ;; | |
158 | ||
159 | -enable-* | --enable-*) | |
160 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
161 | # Reject names that are not valid shell variable names. | |
162 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
163 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
164 | fi | |
165 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
166 | case "$ac_option" in | |
167 | *=*) ;; | |
168 | *) ac_optarg=yes ;; | |
169 | esac | |
170 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
171 | ||
172 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
173 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
174 | | --exec | --exe | --ex) | |
175 | ac_prev=exec_prefix ;; | |
176 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
177 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
178 | | --exec=* | --exe=* | --ex=*) | |
179 | exec_prefix="$ac_optarg" ;; | |
180 | ||
181 | -gas | --gas | --ga | --g) | |
182 | # Obsolete; use --with-gas. | |
183 | with_gas=yes ;; | |
184 | ||
185 | -help | --help | --hel | --he) | |
186 | # Omit some internal or obsolete options to make the list less imposing. | |
187 | # This message is too long to be a string in the A/UX 3.1 sh. | |
188 | cat << EOF | |
189 | Usage: configure [options] [host] | |
190 | Options: [defaults in brackets after descriptions] | |
191 | Configuration: | |
192 | --cache-file=FILE cache test results in FILE | |
193 | --help print this message | |
194 | --no-create do not create output files | |
195 | --quiet, --silent do not print \`checking...' messages | |
196 | --version print the version of autoconf that created configure | |
197 | Directory and file names: | |
198 | --prefix=PREFIX install architecture-independent files in PREFIX | |
199 | [$ac_default_prefix] | |
200 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
201 | [same as prefix] | |
202 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
203 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
204 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
205 | --datadir=DIR read-only architecture-independent data in DIR | |
206 | [PREFIX/share] | |
207 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
208 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
209 | [PREFIX/com] | |
210 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
211 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
212 | --includedir=DIR C header files in DIR [PREFIX/include] | |
213 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
214 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
215 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
216 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
217 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
218 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
219 | --program-transform-name=PROGRAM | |
220 | run sed PROGRAM on installed program names | |
221 | EOF | |
222 | cat << EOF | |
223 | Host type: | |
224 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
225 | --host=HOST configure for HOST [guessed] | |
226 | --target=TARGET configure for TARGET [TARGET=HOST] | |
227 | Features and packages: | |
228 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
229 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
230 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
231 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
232 | --x-includes=DIR X include files are in DIR | |
233 | --x-libraries=DIR X library files are in DIR | |
234 | EOF | |
235 | if test -n "$ac_help"; then | |
236 | echo "--enable and --with options recognized:$ac_help" | |
237 | fi | |
238 | exit 0 ;; | |
239 | ||
240 | -host | --host | --hos | --ho) | |
241 | ac_prev=host ;; | |
242 | -host=* | --host=* | --hos=* | --ho=*) | |
243 | host="$ac_optarg" ;; | |
244 | ||
245 | -includedir | --includedir | --includedi | --included | --include \ | |
246 | | --includ | --inclu | --incl | --inc) | |
247 | ac_prev=includedir ;; | |
248 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
249 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
250 | includedir="$ac_optarg" ;; | |
251 | ||
252 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
253 | ac_prev=infodir ;; | |
254 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
255 | infodir="$ac_optarg" ;; | |
256 | ||
257 | -libdir | --libdir | --libdi | --libd) | |
258 | ac_prev=libdir ;; | |
259 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
260 | libdir="$ac_optarg" ;; | |
261 | ||
262 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
263 | | --libexe | --libex | --libe) | |
264 | ac_prev=libexecdir ;; | |
265 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
266 | | --libexe=* | --libex=* | --libe=*) | |
267 | libexecdir="$ac_optarg" ;; | |
268 | ||
269 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
270 | | --localstate | --localstat | --localsta | --localst \ | |
271 | | --locals | --local | --loca | --loc | --lo) | |
272 | ac_prev=localstatedir ;; | |
273 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
274 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
275 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
276 | localstatedir="$ac_optarg" ;; | |
277 | ||
278 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
279 | ac_prev=mandir ;; | |
280 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
281 | mandir="$ac_optarg" ;; | |
282 | ||
283 | -nfp | --nfp | --nf) | |
284 | # Obsolete; use --without-fp. | |
285 | with_fp=no ;; | |
286 | ||
287 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
288 | | --no-cr | --no-c) | |
289 | no_create=yes ;; | |
290 | ||
291 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
292 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
293 | no_recursion=yes ;; | |
294 | ||
295 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
296 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
297 | | --oldin | --oldi | --old | --ol | --o) | |
298 | ac_prev=oldincludedir ;; | |
299 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
300 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
301 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
302 | oldincludedir="$ac_optarg" ;; | |
303 | ||
304 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
305 | ac_prev=prefix ;; | |
306 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
307 | prefix="$ac_optarg" ;; | |
308 | ||
309 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
310 | | --program-pre | --program-pr | --program-p) | |
311 | ac_prev=program_prefix ;; | |
312 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
313 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
314 | program_prefix="$ac_optarg" ;; | |
315 | ||
316 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
317 | | --program-suf | --program-su | --program-s) | |
318 | ac_prev=program_suffix ;; | |
319 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
320 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
321 | program_suffix="$ac_optarg" ;; | |
322 | ||
323 | -program-transform-name | --program-transform-name \ | |
324 | | --program-transform-nam | --program-transform-na \ | |
325 | | --program-transform-n | --program-transform- \ | |
326 | | --program-transform | --program-transfor \ | |
327 | | --program-transfo | --program-transf \ | |
328 | | --program-trans | --program-tran \ | |
329 | | --progr-tra | --program-tr | --program-t) | |
330 | ac_prev=program_transform_name ;; | |
331 | -program-transform-name=* | --program-transform-name=* \ | |
332 | | --program-transform-nam=* | --program-transform-na=* \ | |
333 | | --program-transform-n=* | --program-transform-=* \ | |
334 | | --program-transform=* | --program-transfor=* \ | |
335 | | --program-transfo=* | --program-transf=* \ | |
336 | | --program-trans=* | --program-tran=* \ | |
337 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
338 | program_transform_name="$ac_optarg" ;; | |
339 | ||
340 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
341 | | -silent | --silent | --silen | --sile | --sil) | |
342 | silent=yes ;; | |
343 | ||
344 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
345 | ac_prev=sbindir ;; | |
346 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
347 | | --sbi=* | --sb=*) | |
348 | sbindir="$ac_optarg" ;; | |
349 | ||
350 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
351 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
352 | | --sharedst | --shareds | --shared | --share | --shar \ | |
353 | | --sha | --sh) | |
354 | ac_prev=sharedstatedir ;; | |
355 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
356 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
357 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
358 | | --sha=* | --sh=*) | |
359 | sharedstatedir="$ac_optarg" ;; | |
360 | ||
361 | -site | --site | --sit) | |
362 | ac_prev=site ;; | |
363 | -site=* | --site=* | --sit=*) | |
364 | site="$ac_optarg" ;; | |
365 | ||
366 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
367 | ac_prev=srcdir ;; | |
368 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
369 | srcdir="$ac_optarg" ;; | |
370 | ||
371 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
372 | | --syscon | --sysco | --sysc | --sys | --sy) | |
373 | ac_prev=sysconfdir ;; | |
374 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
375 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
376 | sysconfdir="$ac_optarg" ;; | |
377 | ||
378 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
379 | ac_prev=target ;; | |
380 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
381 | target="$ac_optarg" ;; | |
382 | ||
383 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
384 | verbose=yes ;; | |
385 | ||
386 | -version | --version | --versio | --versi | --vers) | |
387 | echo "configure generated by autoconf version 2.13" | |
388 | exit 0 ;; | |
389 | ||
390 | -with-* | --with-*) | |
391 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
392 | # Reject names that are not valid shell variable names. | |
393 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
394 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
395 | fi | |
396 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
397 | case "$ac_option" in | |
398 | *=*) ;; | |
399 | *) ac_optarg=yes ;; | |
400 | esac | |
401 | eval "with_${ac_package}='$ac_optarg'" ;; | |
402 | ||
403 | -without-* | --without-*) | |
404 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
405 | # Reject names that are not valid shell variable names. | |
406 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
407 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
408 | fi | |
409 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
410 | eval "with_${ac_package}=no" ;; | |
411 | ||
412 | --x) | |
413 | # Obsolete; use --with-x. | |
414 | with_x=yes ;; | |
415 | ||
416 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
417 | | --x-incl | --x-inc | --x-in | --x-i) | |
418 | ac_prev=x_includes ;; | |
419 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
420 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
421 | x_includes="$ac_optarg" ;; | |
422 | ||
423 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
424 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
425 | ac_prev=x_libraries ;; | |
426 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
427 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
428 | x_libraries="$ac_optarg" ;; | |
429 | ||
430 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
431 | ;; | |
432 | ||
433 | *) | |
434 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
435 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
436 | fi | |
437 | if test "x$nonopt" != xNONE; then | |
438 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
439 | fi | |
440 | nonopt="$ac_option" | |
441 | ;; | |
442 | ||
443 | esac | |
444 | done | |
445 | ||
446 | if test -n "$ac_prev"; then | |
447 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
448 | fi | |
449 | ||
450 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
451 | ||
452 | # File descriptor usage: | |
453 | # 0 standard input | |
454 | # 1 file creation | |
455 | # 2 errors and warnings | |
456 | # 3 some systems may open it to /dev/tty | |
457 | # 4 used on the Kubota Titan | |
458 | # 6 checking for... messages and results | |
459 | # 5 compiler messages saved in config.log | |
460 | if test "$silent" = yes; then | |
461 | exec 6>/dev/null | |
462 | else | |
463 | exec 6>&1 | |
464 | fi | |
465 | exec 5>./config.log | |
466 | ||
467 | echo "\ | |
468 | This file contains any messages produced by compilers while | |
469 | running configure, to aid debugging if configure makes a mistake. | |
470 | " 1>&5 | |
471 | ||
472 | # Strip out --no-create and --no-recursion so they do not pile up. | |
473 | # Also quote any args containing shell metacharacters. | |
474 | ac_configure_args= | |
475 | for ac_arg | |
476 | do | |
477 | case "$ac_arg" in | |
478 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
479 | | --no-cr | --no-c) ;; | |
480 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
481 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
482 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
483 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
484 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
485 | esac | |
486 | done | |
487 | ||
488 | # NLS nuisances. | |
489 | # Only set these to C if already set. These must not be set unconditionally | |
490 | # because not all systems understand e.g. LANG=C (notably SCO). | |
491 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
492 | # Non-C LC_CTYPE values break the ctype check. | |
493 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
494 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
495 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
496 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
497 | ||
498 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
499 | rm -rf conftest* confdefs.h | |
500 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
501 | echo > confdefs.h | |
502 | ||
503 | # A filename unique to this package, relative to the directory that | |
504 | # configure is in, which we can look for to find out if srcdir is correct. | |
505 | ac_unique_file=main.c | |
506 | ||
507 | # Find the source files, if location was not specified. | |
508 | if test -z "$srcdir"; then | |
509 | ac_srcdir_defaulted=yes | |
510 | # Try the directory containing this script, then its parent. | |
511 | ac_prog=$0 | |
512 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
513 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
514 | srcdir=$ac_confdir | |
515 | if test ! -r $srcdir/$ac_unique_file; then | |
516 | srcdir=.. | |
517 | fi | |
518 | else | |
519 | ac_srcdir_defaulted=no | |
520 | fi | |
521 | if test ! -r $srcdir/$ac_unique_file; then | |
522 | if test "$ac_srcdir_defaulted" = yes; then | |
523 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
524 | else | |
525 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
526 | fi | |
527 | fi | |
528 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
529 | ||
530 | # Prefer explicitly selected file to automatically selected ones. | |
e7c61be3 RM |
531 | if test -z "$CONFIG_SITE"; then |
532 | if test "x$prefix" != xNONE; then | |
533 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
534 | else | |
535 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
c906108c SS |
536 | fi |
537 | fi | |
538 | for ac_site_file in $CONFIG_SITE; do | |
539 | if test -r "$ac_site_file"; then | |
540 | echo "loading site script $ac_site_file" | |
541 | . "$ac_site_file" | |
542 | fi | |
543 | done | |
544 | ||
545 | if test -r "$cache_file"; then | |
546 | echo "loading cache $cache_file" | |
547 | . $cache_file | |
548 | else | |
549 | echo "creating cache $cache_file" | |
550 | > $cache_file | |
551 | fi | |
552 | ||
553 | ac_ext=c | |
554 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
555 | ac_cpp='$CPP $CPPFLAGS' | |
556 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
557 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
558 | cross_compiling=$ac_cv_prog_cc_cross | |
559 | ||
560 | ac_exeext= | |
561 | ac_objext=o | |
562 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
563 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
564 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
565 | ac_n= ac_c=' | |
566 | ' ac_t=' ' | |
567 | else | |
568 | ac_n=-n ac_c= ac_t= | |
569 | fi | |
570 | else | |
571 | ac_n= ac_c='\c' ac_t= | |
572 | fi | |
573 | ||
574 | ||
575 | ||
413ccac7 | 576 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
e7c61be3 | 577 | echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
578 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
579 | if test "${enable_maintainer_mode+set}" = set; then | |
580 | enableval="$enable_maintainer_mode" | |
581 | USE_MAINTAINER_MODE=$enableval | |
582 | else | |
583 | USE_MAINTAINER_MODE=no | |
584 | fi | |
585 | ||
586 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
587 | ||
588 | ||
589 | if test $USE_MAINTAINER_MODE = yes; then | |
590 | MAINTAINER_MODE_TRUE= | |
591 | MAINTAINER_MODE_FALSE='#' | |
592 | else | |
593 | MAINTAINER_MODE_TRUE='#' | |
594 | MAINTAINER_MODE_FALSE= | |
595 | fi | |
596 | MAINT=$MAINTAINER_MODE_TRUE | |
597 | ||
598 | ||
c906108c SS |
599 | |
600 | # Extract the first word of "gcc", so it can be a program name with args. | |
601 | set dummy gcc; ac_word=$2 | |
602 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7c61be3 | 603 | echo "configure:604: checking for $ac_word" >&5 |
c906108c SS |
604 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
606 | else | |
607 | if test -n "$CC"; then | |
608 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
609 | else | |
610 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
611 | ac_dummy="$PATH" | |
612 | for ac_dir in $ac_dummy; do | |
613 | test -z "$ac_dir" && ac_dir=. | |
614 | if test -f $ac_dir/$ac_word; then | |
615 | ac_cv_prog_CC="gcc" | |
616 | break | |
617 | fi | |
618 | done | |
619 | IFS="$ac_save_ifs" | |
620 | fi | |
621 | fi | |
622 | CC="$ac_cv_prog_CC" | |
623 | if test -n "$CC"; then | |
624 | echo "$ac_t""$CC" 1>&6 | |
625 | else | |
626 | echo "$ac_t""no" 1>&6 | |
627 | fi | |
628 | ||
629 | if test -z "$CC"; then | |
630 | # Extract the first word of "cc", so it can be a program name with args. | |
631 | set dummy cc; ac_word=$2 | |
632 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7c61be3 | 633 | echo "configure:634: checking for $ac_word" >&5 |
c906108c SS |
634 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
636 | else | |
637 | if test -n "$CC"; then | |
638 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
639 | else | |
640 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
641 | ac_prog_rejected=no | |
642 | ac_dummy="$PATH" | |
643 | for ac_dir in $ac_dummy; do | |
644 | test -z "$ac_dir" && ac_dir=. | |
645 | if test -f $ac_dir/$ac_word; then | |
646 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
647 | ac_prog_rejected=yes | |
648 | continue | |
649 | fi | |
650 | ac_cv_prog_CC="cc" | |
651 | break | |
652 | fi | |
653 | done | |
654 | IFS="$ac_save_ifs" | |
655 | if test $ac_prog_rejected = yes; then | |
656 | # We found a bogon in the path, so make sure we never use it. | |
657 | set dummy $ac_cv_prog_CC | |
658 | shift | |
659 | if test $# -gt 0; then | |
660 | # We chose a different compiler from the bogus one. | |
661 | # However, it has the same basename, so the bogon will be chosen | |
662 | # first if we set CC to just the basename; use the full file name. | |
663 | shift | |
664 | set dummy "$ac_dir/$ac_word" "$@" | |
665 | shift | |
666 | ac_cv_prog_CC="$@" | |
667 | fi | |
668 | fi | |
669 | fi | |
670 | fi | |
671 | CC="$ac_cv_prog_CC" | |
672 | if test -n "$CC"; then | |
673 | echo "$ac_t""$CC" 1>&6 | |
674 | else | |
675 | echo "$ac_t""no" 1>&6 | |
676 | fi | |
677 | ||
678 | if test -z "$CC"; then | |
679 | case "`uname -s`" in | |
680 | *win32* | *WIN32*) | |
681 | # Extract the first word of "cl", so it can be a program name with args. | |
682 | set dummy cl; ac_word=$2 | |
683 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7c61be3 | 684 | echo "configure:685: checking for $ac_word" >&5 |
c906108c SS |
685 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
687 | else | |
688 | if test -n "$CC"; then | |
689 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
690 | else | |
691 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
692 | ac_dummy="$PATH" | |
693 | for ac_dir in $ac_dummy; do | |
694 | test -z "$ac_dir" && ac_dir=. | |
695 | if test -f $ac_dir/$ac_word; then | |
696 | ac_cv_prog_CC="cl" | |
697 | break | |
698 | fi | |
699 | done | |
700 | IFS="$ac_save_ifs" | |
701 | fi | |
702 | fi | |
703 | CC="$ac_cv_prog_CC" | |
704 | if test -n "$CC"; then | |
705 | echo "$ac_t""$CC" 1>&6 | |
706 | else | |
707 | echo "$ac_t""no" 1>&6 | |
708 | fi | |
709 | ;; | |
710 | esac | |
711 | fi | |
712 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
713 | fi | |
714 | ||
715 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
e7c61be3 | 716 | echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
717 | |
718 | ac_ext=c | |
719 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
720 | ac_cpp='$CPP $CPPFLAGS' | |
721 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
722 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
723 | cross_compiling=$ac_cv_prog_cc_cross | |
724 | ||
725 | cat > conftest.$ac_ext << EOF | |
726 | ||
e7c61be3 | 727 | #line 728 "configure" |
c906108c SS |
728 | #include "confdefs.h" |
729 | ||
730 | main(){return(0);} | |
731 | EOF | |
e7c61be3 | 732 | if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
733 | ac_cv_prog_cc_works=yes |
734 | # If we can't run a trivial program, we are probably using a cross compiler. | |
735 | if (./conftest; exit) 2>/dev/null; then | |
736 | ac_cv_prog_cc_cross=no | |
737 | else | |
738 | ac_cv_prog_cc_cross=yes | |
739 | fi | |
740 | else | |
741 | echo "configure: failed program was:" >&5 | |
742 | cat conftest.$ac_ext >&5 | |
743 | ac_cv_prog_cc_works=no | |
744 | fi | |
745 | rm -fr conftest* | |
746 | ac_ext=c | |
747 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
748 | ac_cpp='$CPP $CPPFLAGS' | |
749 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
750 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
751 | cross_compiling=$ac_cv_prog_cc_cross | |
752 | ||
753 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
754 | if test $ac_cv_prog_cc_works = no; then | |
755 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
756 | fi | |
757 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
e7c61be3 | 758 | echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
759 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
760 | cross_compiling=$ac_cv_prog_cc_cross | |
761 | ||
762 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
e7c61be3 | 763 | echo "configure:764: checking whether we are using GNU C" >&5 |
c906108c SS |
764 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
766 | else | |
767 | cat > conftest.c <<EOF | |
768 | #ifdef __GNUC__ | |
769 | yes; | |
770 | #endif | |
771 | EOF | |
e7c61be3 | 772 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
773 | ac_cv_prog_gcc=yes |
774 | else | |
775 | ac_cv_prog_gcc=no | |
776 | fi | |
777 | fi | |
778 | ||
779 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
780 | ||
781 | if test $ac_cv_prog_gcc = yes; then | |
782 | GCC=yes | |
783 | else | |
784 | GCC= | |
785 | fi | |
786 | ||
787 | ac_test_CFLAGS="${CFLAGS+set}" | |
788 | ac_save_CFLAGS="$CFLAGS" | |
789 | CFLAGS= | |
790 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
e7c61be3 | 791 | echo "configure:792: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
792 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
793 | echo $ac_n "(cached) $ac_c" 1>&6 | |
794 | else | |
795 | echo 'void f(){}' > conftest.c | |
796 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
797 | ac_cv_prog_cc_g=yes | |
798 | else | |
799 | ac_cv_prog_cc_g=no | |
800 | fi | |
801 | rm -f conftest* | |
802 | ||
803 | fi | |
804 | ||
805 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
806 | if test "$ac_test_CFLAGS" = set; then | |
807 | CFLAGS="$ac_save_CFLAGS" | |
808 | elif test $ac_cv_prog_cc_g = yes; then | |
809 | if test "$GCC" = yes; then | |
810 | CFLAGS="-g -O2" | |
811 | else | |
812 | CFLAGS="-g" | |
813 | fi | |
814 | else | |
815 | if test "$GCC" = yes; then | |
816 | CFLAGS="-O2" | |
817 | else | |
818 | CFLAGS= | |
819 | fi | |
820 | fi | |
821 | ||
14abd0fb MK |
822 | cat >> confdefs.h <<\EOF |
823 | #define _GNU_SOURCE 1 | |
824 | EOF | |
825 | ||
826 | ||
c906108c | 827 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
e7c61be3 | 828 | echo "configure:829: checking how to run the C preprocessor" >&5 |
c906108c SS |
829 | # On Suns, sometimes $CPP names a directory. |
830 | if test -n "$CPP" && test -d "$CPP"; then | |
831 | CPP= | |
832 | fi | |
833 | if test -z "$CPP"; then | |
834 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
835 | echo $ac_n "(cached) $ac_c" 1>&6 | |
836 | else | |
837 | # This must be in double quotes, not single quotes, because CPP may get | |
838 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
839 | CPP="${CC-cc} -E" | |
840 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
841 | # not just through cpp. | |
842 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 843 | #line 844 "configure" |
c906108c SS |
844 | #include "confdefs.h" |
845 | #include <assert.h> | |
846 | Syntax Error | |
847 | EOF | |
848 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 849 | { (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
850 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
851 | if test -z "$ac_err"; then | |
852 | : | |
853 | else | |
854 | echo "$ac_err" >&5 | |
855 | echo "configure: failed program was:" >&5 | |
856 | cat conftest.$ac_ext >&5 | |
857 | rm -rf conftest* | |
858 | CPP="${CC-cc} -E -traditional-cpp" | |
859 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 860 | #line 861 "configure" |
c906108c SS |
861 | #include "confdefs.h" |
862 | #include <assert.h> | |
863 | Syntax Error | |
864 | EOF | |
865 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 866 | { (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
867 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
868 | if test -z "$ac_err"; then | |
869 | : | |
870 | else | |
871 | echo "$ac_err" >&5 | |
872 | echo "configure: failed program was:" >&5 | |
873 | cat conftest.$ac_ext >&5 | |
874 | rm -rf conftest* | |
875 | CPP="${CC-cc} -nologo -E" | |
876 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 877 | #line 878 "configure" |
c906108c SS |
878 | #include "confdefs.h" |
879 | #include <assert.h> | |
880 | Syntax Error | |
881 | EOF | |
882 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 883 | { (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
884 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
885 | if test -z "$ac_err"; then | |
886 | : | |
887 | else | |
888 | echo "$ac_err" >&5 | |
889 | echo "configure: failed program was:" >&5 | |
890 | cat conftest.$ac_ext >&5 | |
891 | rm -rf conftest* | |
892 | CPP=/lib/cpp | |
893 | fi | |
894 | rm -f conftest* | |
895 | fi | |
896 | rm -f conftest* | |
897 | fi | |
898 | rm -f conftest* | |
899 | ac_cv_prog_CPP="$CPP" | |
900 | fi | |
901 | CPP="$ac_cv_prog_CPP" | |
902 | else | |
903 | ac_cv_prog_CPP="$CPP" | |
904 | fi | |
905 | echo "$ac_t""$CPP" 1>&6 | |
906 | ||
907 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
e7c61be3 | 908 | echo "configure:909: checking for AIX" >&5 |
c906108c | 909 | cat > conftest.$ac_ext <<EOF |
e7c61be3 | 910 | #line 911 "configure" |
c906108c SS |
911 | #include "confdefs.h" |
912 | #ifdef _AIX | |
913 | yes | |
914 | #endif | |
915 | ||
916 | EOF | |
917 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
918 | egrep "yes" >/dev/null 2>&1; then | |
919 | rm -rf conftest* | |
920 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
921 | #define _ALL_SOURCE 1 | |
922 | EOF | |
923 | ||
924 | else | |
925 | rm -rf conftest* | |
926 | echo "$ac_t""no" 1>&6 | |
927 | fi | |
928 | rm -f conftest* | |
929 | ||
930 | ||
56157b4a | 931 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
e7c61be3 | 932 | echo "configure:933: checking for POSIXized ISC" >&5 |
56157b4a AC |
933 | if test -d /etc/conf/kconfig.d && |
934 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
935 | then | |
936 | echo "$ac_t""yes" 1>&6 | |
937 | ISC=yes # If later tests want to check for ISC. | |
938 | cat >> confdefs.h <<\EOF | |
939 | #define _POSIX_SOURCE 1 | |
c906108c SS |
940 | EOF |
941 | ||
56157b4a AC |
942 | if test "$GCC" = yes; then |
943 | CC="$CC -posix" | |
944 | else | |
945 | CC="$CC -Xp" | |
946 | fi | |
c906108c SS |
947 | else |
948 | echo "$ac_t""no" 1>&6 | |
56157b4a | 949 | ISC= |
c906108c SS |
950 | fi |
951 | ||
952 | ||
953 | ||
954 | ||
955 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
e7c61be3 | 956 | echo "configure:957: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
957 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
958 | echo $ac_n "(cached) $ac_c" 1>&6 | |
959 | else | |
960 | am_cv_prog_cc_stdc=no | |
961 | ac_save_CC="$CC" | |
962 | # Don't try gcc -ansi; that turns off useful extensions and | |
963 | # breaks some systems' header files. | |
964 | # AIX -qlanglvl=ansi | |
965 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
966 | # HP-UX 10.20 and later -Ae |
967 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 968 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 969 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
970 | do |
971 | CC="$ac_save_CC $ac_arg" | |
972 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 973 | #line 974 "configure" |
c906108c SS |
974 | #include "confdefs.h" |
975 | #include <stdarg.h> | |
976 | #include <stdio.h> | |
977 | #include <sys/types.h> | |
978 | #include <sys/stat.h> | |
979 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
980 | struct buf { int x; }; | |
981 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
982 | static char *e (p, i) | |
983 | char **p; | |
984 | int i; | |
985 | { | |
986 | return p[i]; | |
987 | } | |
988 | static char *f (char * (*g) (char **, int), char **p, ...) | |
989 | { | |
990 | char *s; | |
991 | va_list v; | |
992 | va_start (v,p); | |
993 | s = g (p, va_arg (v,int)); | |
994 | va_end (v); | |
995 | return s; | |
996 | } | |
997 | int test (int i, double x); | |
998 | struct s1 {int (*f) (int a);}; | |
999 | struct s2 {int (*f) (double a);}; | |
1000 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1001 | int argc; | |
1002 | char **argv; | |
1003 | ||
1004 | int main() { | |
1005 | ||
1006 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1007 | ||
1008 | ; return 0; } | |
1009 | EOF | |
e7c61be3 | 1010 | if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1011 | rm -rf conftest* |
1012 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1013 | else | |
1014 | echo "configure: failed program was:" >&5 | |
1015 | cat conftest.$ac_ext >&5 | |
1016 | fi | |
1017 | rm -f conftest* | |
1018 | done | |
1019 | CC="$ac_save_CC" | |
1020 | ||
1021 | fi | |
1022 | ||
1023 | if test -z "$am_cv_prog_cc_stdc"; then | |
1024 | echo "$ac_t""none needed" 1>&6 | |
1025 | else | |
1026 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1027 | fi | |
1028 | case "x$am_cv_prog_cc_stdc" in | |
1029 | x|xno) ;; | |
1030 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1031 | esac | |
1032 | ||
1033 | ||
1034 | ac_aux_dir= | |
1035 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1036 | if test -f $ac_dir/install-sh; then | |
1037 | ac_aux_dir=$ac_dir | |
1038 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1039 | break | |
1040 | elif test -f $ac_dir/install.sh; then | |
1041 | ac_aux_dir=$ac_dir | |
1042 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1043 | break | |
1044 | fi | |
1045 | done | |
1046 | if test -z "$ac_aux_dir"; then | |
1047 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1048 | fi | |
1049 | ac_config_guess=$ac_aux_dir/config.guess | |
1050 | ac_config_sub=$ac_aux_dir/config.sub | |
1051 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1052 | ||
1053 | ||
1054 | # Do some error checking and defaulting for the host and target type. | |
1055 | # The inputs are: | |
1056 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1057 | # | |
1058 | # The rules are: | |
1059 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1060 | # same time. | |
1061 | # 2. Host defaults to nonopt. | |
1062 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1063 | # as determined by config.guess. | |
1064 | # 4. Target and build default to nonopt. | |
1065 | # 5. If nonopt is not specified, then target and build default to host. | |
1066 | ||
1067 | # The aliases save the names the user supplied, while $host etc. | |
1068 | # will get canonicalized. | |
1069 | case $host---$target---$nonopt in | |
1070 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1071 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1072 | esac | |
1073 | ||
1074 | ||
1075 | # Make sure we can run config.sub. | |
1076 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1077 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1078 | fi | |
1079 | ||
1080 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
e7c61be3 | 1081 | echo "configure:1082: checking host system type" >&5 |
c906108c SS |
1082 | |
1083 | host_alias=$host | |
1084 | case "$host_alias" in | |
1085 | NONE) | |
1086 | case $nonopt in | |
1087 | NONE) | |
1088 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1089 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1090 | fi ;; | |
1091 | *) host_alias=$nonopt ;; | |
1092 | esac ;; | |
1093 | esac | |
1094 | ||
1095 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1096 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1097 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1098 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1099 | echo "$ac_t""$host" 1>&6 | |
1100 | ||
1101 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
e7c61be3 | 1102 | echo "configure:1103: checking target system type" >&5 |
c906108c SS |
1103 | |
1104 | target_alias=$target | |
1105 | case "$target_alias" in | |
1106 | NONE) | |
1107 | case $nonopt in | |
1108 | NONE) target_alias=$host_alias ;; | |
1109 | *) target_alias=$nonopt ;; | |
1110 | esac ;; | |
1111 | esac | |
1112 | ||
1113 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1114 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1115 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1116 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1117 | echo "$ac_t""$target" 1>&6 | |
1118 | ||
1119 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
e7c61be3 | 1120 | echo "configure:1121: checking build system type" >&5 |
c906108c SS |
1121 | |
1122 | build_alias=$build | |
1123 | case "$build_alias" in | |
1124 | NONE) | |
1125 | case $nonopt in | |
1126 | NONE) build_alias=$host_alias ;; | |
1127 | *) build_alias=$nonopt ;; | |
1128 | esac ;; | |
1129 | esac | |
1130 | ||
1131 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1132 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1133 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1134 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1135 | echo "$ac_t""$build" 1>&6 | |
1136 | ||
1137 | test "$host_alias" != "$target_alias" && | |
1138 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1139 | NONENONEs,x,x, && | |
1140 | program_prefix=${target_alias}- | |
1141 | ||
1142 | ||
8bb2c122 MK |
1143 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1144 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1145 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1146 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
f6e85fc8 | 1147 | # AC_PROG_RANLIB. This can be removed when we switch to Autoconf |
8bb2c122 MK |
1148 | # 2.5x. |
1149 | if test $host != $build; then | |
1150 | ac_tool_prefix=${host_alias}- | |
1151 | else | |
1152 | ac_tool_prefix= | |
1153 | fi | |
1154 | ||
1155 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1156 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1157 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7c61be3 | 1158 | echo "configure:1159: checking for $ac_word" >&5 |
8bb2c122 MK |
1159 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1161 | else | |
1162 | if test -n "$RANLIB"; then | |
1163 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1164 | else | |
1165 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1166 | ac_dummy="$PATH" | |
1167 | for ac_dir in $ac_dummy; do | |
1168 | test -z "$ac_dir" && ac_dir=. | |
1169 | if test -f $ac_dir/$ac_word; then | |
1170 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1171 | break | |
1172 | fi | |
1173 | done | |
1174 | IFS="$ac_save_ifs" | |
1175 | fi | |
1176 | fi | |
1177 | RANLIB="$ac_cv_prog_RANLIB" | |
1178 | if test -n "$RANLIB"; then | |
1179 | echo "$ac_t""$RANLIB" 1>&6 | |
1180 | else | |
1181 | echo "$ac_t""no" 1>&6 | |
1182 | fi | |
1183 | ||
1184 | ||
1185 | if test -z "$ac_cv_prog_RANLIB"; then | |
1186 | if test -n "$ac_tool_prefix"; then | |
1187 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1188 | set dummy ranlib; ac_word=$2 | |
1189 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7c61be3 | 1190 | echo "configure:1191: checking for $ac_word" >&5 |
8bb2c122 MK |
1191 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1193 | else | |
1194 | if test -n "$RANLIB"; then | |
1195 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1196 | else | |
1197 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1198 | ac_dummy="$PATH" | |
1199 | for ac_dir in $ac_dummy; do | |
1200 | test -z "$ac_dir" && ac_dir=. | |
1201 | if test -f $ac_dir/$ac_word; then | |
1202 | ac_cv_prog_RANLIB="ranlib" | |
1203 | break | |
1204 | fi | |
1205 | done | |
1206 | IFS="$ac_save_ifs" | |
1207 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1208 | fi | |
1209 | fi | |
1210 | RANLIB="$ac_cv_prog_RANLIB" | |
1211 | if test -n "$RANLIB"; then | |
1212 | echo "$ac_t""$RANLIB" 1>&6 | |
1213 | else | |
1214 | echo "$ac_t""no" 1>&6 | |
1215 | fi | |
1216 | ||
1217 | else | |
1218 | RANLIB=":" | |
1219 | fi | |
1220 | fi | |
1221 | ||
1222 | ||
c906108c SS |
1223 | ALL_LINGUAS= |
1224 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
e7c61be3 | 1225 | echo "configure:1226: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1226 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1227 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1228 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1229 | else | |
1230 | cat > conftestmake <<\EOF | |
1231 | all: | |
1232 | @echo 'ac_maketemp="${MAKE}"' | |
1233 | EOF | |
1234 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1235 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1236 | if test -n "$ac_maketemp"; then | |
1237 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1238 | else | |
1239 | eval ac_cv_prog_make_${ac_make}_set=no | |
1240 | fi | |
1241 | rm -f conftestmake | |
1242 | fi | |
1243 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1244 | echo "$ac_t""yes" 1>&6 | |
1245 | SET_MAKE= | |
1246 | else | |
1247 | echo "$ac_t""no" 1>&6 | |
1248 | SET_MAKE="MAKE=${MAKE-make}" | |
1249 | fi | |
1250 | ||
1251 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1252 | set dummy ranlib; ac_word=$2 | |
1253 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7c61be3 | 1254 | echo "configure:1255: checking for $ac_word" >&5 |
c906108c SS |
1255 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1256 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1257 | else | |
1258 | if test -n "$RANLIB"; then | |
1259 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1260 | else | |
1261 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1262 | ac_dummy="$PATH" | |
1263 | for ac_dir in $ac_dummy; do | |
1264 | test -z "$ac_dir" && ac_dir=. | |
1265 | if test -f $ac_dir/$ac_word; then | |
1266 | ac_cv_prog_RANLIB="ranlib" | |
1267 | break | |
1268 | fi | |
1269 | done | |
1270 | IFS="$ac_save_ifs" | |
1271 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1272 | fi | |
1273 | fi | |
1274 | RANLIB="$ac_cv_prog_RANLIB" | |
1275 | if test -n "$RANLIB"; then | |
1276 | echo "$ac_t""$RANLIB" 1>&6 | |
1277 | else | |
1278 | echo "$ac_t""no" 1>&6 | |
1279 | fi | |
1280 | ||
1281 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
e7c61be3 | 1282 | echo "configure:1283: checking for ANSI C header files" >&5 |
c906108c SS |
1283 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1284 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1285 | else | |
1286 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1287 | #line 1288 "configure" |
c906108c SS |
1288 | #include "confdefs.h" |
1289 | #include <stdlib.h> | |
1290 | #include <stdarg.h> | |
1291 | #include <string.h> | |
1292 | #include <float.h> | |
1293 | EOF | |
1294 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 1295 | { (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1296 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1297 | if test -z "$ac_err"; then | |
1298 | rm -rf conftest* | |
1299 | ac_cv_header_stdc=yes | |
1300 | else | |
1301 | echo "$ac_err" >&5 | |
1302 | echo "configure: failed program was:" >&5 | |
1303 | cat conftest.$ac_ext >&5 | |
1304 | rm -rf conftest* | |
1305 | ac_cv_header_stdc=no | |
1306 | fi | |
1307 | rm -f conftest* | |
1308 | ||
1309 | if test $ac_cv_header_stdc = yes; then | |
1310 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1311 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1312 | #line 1313 "configure" |
c906108c SS |
1313 | #include "confdefs.h" |
1314 | #include <string.h> | |
1315 | EOF | |
1316 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1317 | egrep "memchr" >/dev/null 2>&1; then | |
1318 | : | |
1319 | else | |
1320 | rm -rf conftest* | |
1321 | ac_cv_header_stdc=no | |
1322 | fi | |
1323 | rm -f conftest* | |
1324 | ||
1325 | fi | |
1326 | ||
1327 | if test $ac_cv_header_stdc = yes; then | |
1328 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1329 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1330 | #line 1331 "configure" |
c906108c SS |
1331 | #include "confdefs.h" |
1332 | #include <stdlib.h> | |
1333 | EOF | |
1334 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1335 | egrep "free" >/dev/null 2>&1; then | |
1336 | : | |
1337 | else | |
1338 | rm -rf conftest* | |
1339 | ac_cv_header_stdc=no | |
1340 | fi | |
1341 | rm -f conftest* | |
1342 | ||
1343 | fi | |
1344 | ||
1345 | if test $ac_cv_header_stdc = yes; then | |
1346 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1347 | if test "$cross_compiling" = yes; then | |
1348 | : | |
1349 | else | |
1350 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1351 | #line 1352 "configure" |
c906108c SS |
1352 | #include "confdefs.h" |
1353 | #include <ctype.h> | |
1354 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1355 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1356 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1357 | int main () { int i; for (i = 0; i < 256; i++) | |
1358 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1359 | exit (0); } | |
1360 | ||
1361 | EOF | |
e7c61be3 | 1362 | if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1363 | then |
1364 | : | |
1365 | else | |
1366 | echo "configure: failed program was:" >&5 | |
1367 | cat conftest.$ac_ext >&5 | |
1368 | rm -fr conftest* | |
1369 | ac_cv_header_stdc=no | |
1370 | fi | |
1371 | rm -fr conftest* | |
1372 | fi | |
1373 | ||
1374 | fi | |
1375 | fi | |
1376 | ||
1377 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1378 | if test $ac_cv_header_stdc = yes; then | |
1379 | cat >> confdefs.h <<\EOF | |
1380 | #define STDC_HEADERS 1 | |
1381 | EOF | |
1382 | ||
1383 | fi | |
1384 | ||
1385 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
e7c61be3 | 1386 | echo "configure:1387: checking for working const" >&5 |
c906108c SS |
1387 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1388 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1389 | else | |
1390 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1391 | #line 1392 "configure" |
c906108c SS |
1392 | #include "confdefs.h" |
1393 | ||
1394 | int main() { | |
1395 | ||
1396 | /* Ultrix mips cc rejects this. */ | |
1397 | typedef int charset[2]; const charset x; | |
1398 | /* SunOS 4.1.1 cc rejects this. */ | |
1399 | char const *const *ccp; | |
1400 | char **p; | |
1401 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1402 | struct point {int x, y;}; | |
1403 | static struct point const zero = {0,0}; | |
1404 | /* AIX XL C 1.02.0.0 rejects this. | |
1405 | It does not let you subtract one const X* pointer from another in an arm | |
1406 | of an if-expression whose if-part is not a constant expression */ | |
1407 | const char *g = "string"; | |
1408 | ccp = &g + (g ? g-g : 0); | |
1409 | /* HPUX 7.0 cc rejects these. */ | |
1410 | ++ccp; | |
1411 | p = (char**) ccp; | |
1412 | ccp = (char const *const *) p; | |
1413 | { /* SCO 3.2v4 cc rejects this. */ | |
1414 | char *t; | |
1415 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1416 | ||
1417 | *t++ = 0; | |
1418 | } | |
1419 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1420 | int x[] = {25, 17}; | |
1421 | const int *foo = &x[0]; | |
1422 | ++foo; | |
1423 | } | |
1424 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1425 | typedef const int *iptr; | |
1426 | iptr p = 0; | |
1427 | ++p; | |
1428 | } | |
1429 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1430 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1431 | struct s { int j; const int *ap[3]; }; | |
1432 | struct s *b; b->j = 5; | |
1433 | } | |
1434 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1435 | const int foo = 10; | |
1436 | } | |
1437 | ||
1438 | ; return 0; } | |
1439 | EOF | |
e7c61be3 | 1440 | if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1441 | rm -rf conftest* |
1442 | ac_cv_c_const=yes | |
1443 | else | |
1444 | echo "configure: failed program was:" >&5 | |
1445 | cat conftest.$ac_ext >&5 | |
1446 | rm -rf conftest* | |
1447 | ac_cv_c_const=no | |
1448 | fi | |
1449 | rm -f conftest* | |
1450 | fi | |
1451 | ||
1452 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1453 | if test $ac_cv_c_const = no; then | |
1454 | cat >> confdefs.h <<\EOF | |
1455 | #define const | |
1456 | EOF | |
1457 | ||
1458 | fi | |
1459 | ||
1460 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
e7c61be3 | 1461 | echo "configure:1462: checking for inline" >&5 |
c906108c SS |
1462 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1463 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1464 | else | |
1465 | ac_cv_c_inline=no | |
1466 | for ac_kw in inline __inline__ __inline; do | |
1467 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1468 | #line 1469 "configure" |
c906108c SS |
1469 | #include "confdefs.h" |
1470 | ||
1471 | int main() { | |
1472 | } $ac_kw foo() { | |
1473 | ; return 0; } | |
1474 | EOF | |
e7c61be3 | 1475 | if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1476 | rm -rf conftest* |
1477 | ac_cv_c_inline=$ac_kw; break | |
1478 | else | |
1479 | echo "configure: failed program was:" >&5 | |
1480 | cat conftest.$ac_ext >&5 | |
1481 | fi | |
1482 | rm -f conftest* | |
1483 | done | |
1484 | ||
1485 | fi | |
1486 | ||
1487 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1488 | case "$ac_cv_c_inline" in | |
1489 | inline | yes) ;; | |
1490 | no) cat >> confdefs.h <<\EOF | |
1491 | #define inline | |
1492 | EOF | |
1493 | ;; | |
1494 | *) cat >> confdefs.h <<EOF | |
1495 | #define inline $ac_cv_c_inline | |
1496 | EOF | |
1497 | ;; | |
1498 | esac | |
1499 | ||
1500 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
e7c61be3 | 1501 | echo "configure:1502: checking for off_t" >&5 |
c906108c SS |
1502 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1503 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1504 | else | |
1505 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1506 | #line 1507 "configure" |
c906108c SS |
1507 | #include "confdefs.h" |
1508 | #include <sys/types.h> | |
1509 | #if STDC_HEADERS | |
1510 | #include <stdlib.h> | |
1511 | #include <stddef.h> | |
1512 | #endif | |
1513 | EOF | |
1514 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1515 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1516 | rm -rf conftest* | |
1517 | ac_cv_type_off_t=yes | |
1518 | else | |
1519 | rm -rf conftest* | |
1520 | ac_cv_type_off_t=no | |
1521 | fi | |
1522 | rm -f conftest* | |
1523 | ||
1524 | fi | |
1525 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1526 | if test $ac_cv_type_off_t = no; then | |
1527 | cat >> confdefs.h <<\EOF | |
1528 | #define off_t long | |
1529 | EOF | |
1530 | ||
1531 | fi | |
1532 | ||
1533 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
e7c61be3 | 1534 | echo "configure:1535: checking for size_t" >&5 |
c906108c SS |
1535 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1537 | else | |
1538 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1539 | #line 1540 "configure" |
c906108c SS |
1540 | #include "confdefs.h" |
1541 | #include <sys/types.h> | |
1542 | #if STDC_HEADERS | |
1543 | #include <stdlib.h> | |
1544 | #include <stddef.h> | |
1545 | #endif | |
1546 | EOF | |
1547 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1548 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1549 | rm -rf conftest* | |
1550 | ac_cv_type_size_t=yes | |
1551 | else | |
1552 | rm -rf conftest* | |
1553 | ac_cv_type_size_t=no | |
1554 | fi | |
1555 | rm -f conftest* | |
1556 | ||
1557 | fi | |
1558 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1559 | if test $ac_cv_type_size_t = no; then | |
1560 | cat >> confdefs.h <<\EOF | |
1561 | #define size_t unsigned | |
1562 | EOF | |
1563 | ||
1564 | fi | |
1565 | ||
1566 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1567 | # for constant arguments. Useless! | |
1568 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
e7c61be3 | 1569 | echo "configure:1570: checking for working alloca.h" >&5 |
c906108c SS |
1570 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1572 | else | |
1573 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1574 | #line 1575 "configure" |
c906108c SS |
1575 | #include "confdefs.h" |
1576 | #include <alloca.h> | |
1577 | int main() { | |
1578 | char *p = alloca(2 * sizeof(int)); | |
1579 | ; return 0; } | |
1580 | EOF | |
e7c61be3 | 1581 | if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1582 | rm -rf conftest* |
1583 | ac_cv_header_alloca_h=yes | |
1584 | else | |
1585 | echo "configure: failed program was:" >&5 | |
1586 | cat conftest.$ac_ext >&5 | |
1587 | rm -rf conftest* | |
1588 | ac_cv_header_alloca_h=no | |
1589 | fi | |
1590 | rm -f conftest* | |
1591 | fi | |
1592 | ||
1593 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1594 | if test $ac_cv_header_alloca_h = yes; then | |
1595 | cat >> confdefs.h <<\EOF | |
1596 | #define HAVE_ALLOCA_H 1 | |
1597 | EOF | |
1598 | ||
1599 | fi | |
1600 | ||
1601 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
e7c61be3 | 1602 | echo "configure:1603: checking for alloca" >&5 |
c906108c SS |
1603 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1604 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1605 | else | |
1606 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1607 | #line 1608 "configure" |
c906108c SS |
1608 | #include "confdefs.h" |
1609 | ||
1610 | #ifdef __GNUC__ | |
1611 | # define alloca __builtin_alloca | |
1612 | #else | |
1613 | # ifdef _MSC_VER | |
1614 | # include <malloc.h> | |
1615 | # define alloca _alloca | |
1616 | # else | |
1617 | # if HAVE_ALLOCA_H | |
1618 | # include <alloca.h> | |
1619 | # else | |
1620 | # ifdef _AIX | |
1621 | #pragma alloca | |
1622 | # else | |
1623 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1624 | char *alloca (); | |
1625 | # endif | |
1626 | # endif | |
1627 | # endif | |
1628 | # endif | |
1629 | #endif | |
1630 | ||
1631 | int main() { | |
1632 | char *p = (char *) alloca(1); | |
1633 | ; return 0; } | |
1634 | EOF | |
e7c61be3 | 1635 | if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1636 | rm -rf conftest* |
1637 | ac_cv_func_alloca_works=yes | |
1638 | else | |
1639 | echo "configure: failed program was:" >&5 | |
1640 | cat conftest.$ac_ext >&5 | |
1641 | rm -rf conftest* | |
1642 | ac_cv_func_alloca_works=no | |
1643 | fi | |
1644 | rm -f conftest* | |
1645 | fi | |
1646 | ||
1647 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1648 | if test $ac_cv_func_alloca_works = yes; then | |
1649 | cat >> confdefs.h <<\EOF | |
1650 | #define HAVE_ALLOCA 1 | |
1651 | EOF | |
1652 | ||
1653 | fi | |
1654 | ||
1655 | if test $ac_cv_func_alloca_works = no; then | |
1656 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1657 | # that cause trouble. Some versions do not even contain alloca or | |
1658 | # contain a buggy version. If you still want to use their alloca, | |
1659 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1660 | ALLOCA=alloca.${ac_objext} | |
1661 | cat >> confdefs.h <<\EOF | |
1662 | #define C_ALLOCA 1 | |
1663 | EOF | |
1664 | ||
1665 | ||
1666 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
e7c61be3 | 1667 | echo "configure:1668: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1668 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1670 | else | |
1671 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1672 | #line 1673 "configure" |
c906108c SS |
1673 | #include "confdefs.h" |
1674 | #if defined(CRAY) && ! defined(CRAY2) | |
1675 | webecray | |
1676 | #else | |
1677 | wenotbecray | |
1678 | #endif | |
1679 | ||
1680 | EOF | |
1681 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1682 | egrep "webecray" >/dev/null 2>&1; then | |
1683 | rm -rf conftest* | |
1684 | ac_cv_os_cray=yes | |
1685 | else | |
1686 | rm -rf conftest* | |
1687 | ac_cv_os_cray=no | |
1688 | fi | |
1689 | rm -f conftest* | |
1690 | ||
1691 | fi | |
1692 | ||
1693 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1694 | if test $ac_cv_os_cray = yes; then | |
1695 | for ac_func in _getb67 GETB67 getb67; do | |
1696 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 1697 | echo "configure:1698: checking for $ac_func" >&5 |
c906108c SS |
1698 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1700 | else | |
1701 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1702 | #line 1703 "configure" |
c906108c SS |
1703 | #include "confdefs.h" |
1704 | /* System header to define __stub macros and hopefully few prototypes, | |
1705 | which can conflict with char $ac_func(); below. */ | |
1706 | #include <assert.h> | |
1707 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1708 | /* We use char because int might match the return type of a gcc2 | |
1709 | builtin and then its argument prototype would still apply. */ | |
1710 | char $ac_func(); | |
1711 | ||
1712 | int main() { | |
1713 | ||
1714 | /* The GNU C library defines this for functions which it implements | |
1715 | to always fail with ENOSYS. Some functions are actually named | |
1716 | something starting with __ and the normal name is an alias. */ | |
1717 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1718 | choke me | |
1719 | #else | |
1720 | $ac_func(); | |
1721 | #endif | |
1722 | ||
1723 | ; return 0; } | |
1724 | EOF | |
e7c61be3 | 1725 | if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1726 | rm -rf conftest* |
1727 | eval "ac_cv_func_$ac_func=yes" | |
1728 | else | |
1729 | echo "configure: failed program was:" >&5 | |
1730 | cat conftest.$ac_ext >&5 | |
1731 | rm -rf conftest* | |
1732 | eval "ac_cv_func_$ac_func=no" | |
1733 | fi | |
1734 | rm -f conftest* | |
1735 | fi | |
1736 | ||
1737 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1738 | echo "$ac_t""yes" 1>&6 | |
1739 | cat >> confdefs.h <<EOF | |
1740 | #define CRAY_STACKSEG_END $ac_func | |
1741 | EOF | |
1742 | ||
1743 | break | |
1744 | else | |
1745 | echo "$ac_t""no" 1>&6 | |
1746 | fi | |
1747 | ||
1748 | done | |
1749 | fi | |
1750 | ||
1751 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
e7c61be3 | 1752 | echo "configure:1753: checking stack direction for C alloca" >&5 |
c906108c SS |
1753 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1754 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1755 | else | |
1756 | if test "$cross_compiling" = yes; then | |
1757 | ac_cv_c_stack_direction=0 | |
1758 | else | |
1759 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1760 | #line 1761 "configure" |
c906108c SS |
1761 | #include "confdefs.h" |
1762 | find_stack_direction () | |
1763 | { | |
1764 | static char *addr = 0; | |
1765 | auto char dummy; | |
1766 | if (addr == 0) | |
1767 | { | |
1768 | addr = &dummy; | |
1769 | return find_stack_direction (); | |
1770 | } | |
1771 | else | |
1772 | return (&dummy > addr) ? 1 : -1; | |
1773 | } | |
1774 | main () | |
1775 | { | |
1776 | exit (find_stack_direction() < 0); | |
1777 | } | |
1778 | EOF | |
e7c61be3 | 1779 | if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1780 | then |
1781 | ac_cv_c_stack_direction=1 | |
1782 | else | |
1783 | echo "configure: failed program was:" >&5 | |
1784 | cat conftest.$ac_ext >&5 | |
1785 | rm -fr conftest* | |
1786 | ac_cv_c_stack_direction=-1 | |
1787 | fi | |
1788 | rm -fr conftest* | |
1789 | fi | |
1790 | ||
1791 | fi | |
1792 | ||
1793 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1794 | cat >> confdefs.h <<EOF | |
1795 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1796 | EOF | |
1797 | ||
1798 | fi | |
1799 | ||
e7c61be3 | 1800 | for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h |
c906108c SS |
1801 | do |
1802 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1803 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e7c61be3 | 1804 | echo "configure:1805: checking for $ac_hdr" >&5 |
c906108c SS |
1805 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1807 | else | |
1808 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1809 | #line 1810 "configure" |
c906108c SS |
1810 | #include "confdefs.h" |
1811 | #include <$ac_hdr> | |
1812 | EOF | |
1813 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 1814 | { (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1815 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1816 | if test -z "$ac_err"; then | |
1817 | rm -rf conftest* | |
1818 | eval "ac_cv_header_$ac_safe=yes" | |
1819 | else | |
1820 | echo "$ac_err" >&5 | |
1821 | echo "configure: failed program was:" >&5 | |
1822 | cat conftest.$ac_ext >&5 | |
1823 | rm -rf conftest* | |
1824 | eval "ac_cv_header_$ac_safe=no" | |
1825 | fi | |
1826 | rm -f conftest* | |
1827 | fi | |
1828 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1829 | echo "$ac_t""yes" 1>&6 | |
1830 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1831 | cat >> confdefs.h <<EOF | |
1832 | #define $ac_tr_hdr 1 | |
1833 | EOF | |
1834 | ||
1835 | else | |
1836 | echo "$ac_t""no" 1>&6 | |
1837 | fi | |
1838 | done | |
1839 | ||
1840 | for ac_func in getpagesize | |
1841 | do | |
1842 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 1843 | echo "configure:1844: checking for $ac_func" >&5 |
c906108c SS |
1844 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1845 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1846 | else | |
1847 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1848 | #line 1849 "configure" |
c906108c SS |
1849 | #include "confdefs.h" |
1850 | /* System header to define __stub macros and hopefully few prototypes, | |
1851 | which can conflict with char $ac_func(); below. */ | |
1852 | #include <assert.h> | |
1853 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1854 | /* We use char because int might match the return type of a gcc2 | |
1855 | builtin and then its argument prototype would still apply. */ | |
1856 | char $ac_func(); | |
1857 | ||
1858 | int main() { | |
1859 | ||
1860 | /* The GNU C library defines this for functions which it implements | |
1861 | to always fail with ENOSYS. Some functions are actually named | |
1862 | something starting with __ and the normal name is an alias. */ | |
1863 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1864 | choke me | |
1865 | #else | |
1866 | $ac_func(); | |
1867 | #endif | |
1868 | ||
1869 | ; return 0; } | |
1870 | EOF | |
e7c61be3 | 1871 | if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1872 | rm -rf conftest* |
1873 | eval "ac_cv_func_$ac_func=yes" | |
1874 | else | |
1875 | echo "configure: failed program was:" >&5 | |
1876 | cat conftest.$ac_ext >&5 | |
1877 | rm -rf conftest* | |
1878 | eval "ac_cv_func_$ac_func=no" | |
1879 | fi | |
1880 | rm -f conftest* | |
1881 | fi | |
1882 | ||
1883 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1884 | echo "$ac_t""yes" 1>&6 | |
1885 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1886 | cat >> confdefs.h <<EOF | |
1887 | #define $ac_tr_func 1 | |
1888 | EOF | |
1889 | ||
1890 | else | |
1891 | echo "$ac_t""no" 1>&6 | |
1892 | fi | |
1893 | done | |
1894 | ||
1895 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
e7c61be3 | 1896 | echo "configure:1897: checking for working mmap" >&5 |
c906108c SS |
1897 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1898 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1899 | else | |
1900 | if test "$cross_compiling" = yes; then | |
1901 | ac_cv_func_mmap_fixed_mapped=no | |
1902 | else | |
1903 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 1904 | #line 1905 "configure" |
c906108c SS |
1905 | #include "confdefs.h" |
1906 | ||
1907 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1908 | Here is a matrix of mmap possibilities: | |
1909 | mmap private not fixed | |
1910 | mmap private fixed at somewhere currently unmapped | |
1911 | mmap private fixed at somewhere already mapped | |
1912 | mmap shared not fixed | |
1913 | mmap shared fixed at somewhere currently unmapped | |
1914 | mmap shared fixed at somewhere already mapped | |
1915 | For private mappings, we should verify that changes cannot be read() | |
1916 | back from the file, nor mmap's back from the file at a different | |
1917 | address. (There have been systems where private was not correctly | |
1918 | implemented like the infamous i386 svr4.0, and systems where the | |
1919 | VM page cache was not coherent with the filesystem buffer cache | |
1920 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1921 | For shared mappings, we should conversely verify that changes get | |
1922 | propogated back to all the places they're supposed to be. | |
1923 | ||
1924 | Grep wants private fixed already mapped. | |
1925 | The main things grep needs to know about mmap are: | |
1926 | * does it exist and is it safe to write into the mmap'd area | |
1927 | * how to use it (BSD variants) */ | |
1928 | #include <sys/types.h> | |
1929 | #include <fcntl.h> | |
1930 | #include <sys/mman.h> | |
1931 | ||
e7c61be3 RM |
1932 | #if HAVE_SYS_TYPES_H |
1933 | # include <sys/types.h> | |
1934 | #endif | |
1935 | ||
1936 | #if HAVE_STDLIB_H | |
1937 | # include <stdlib.h> | |
1938 | #endif | |
1939 | ||
1940 | #if HAVE_SYS_STAT_H | |
1941 | # include <sys/stat.h> | |
1942 | #endif | |
1943 | ||
1944 | #if HAVE_UNISTD_H | |
1945 | # include <unistd.h> | |
1946 | #endif | |
1947 | ||
c906108c SS |
1948 | /* This mess was copied from the GNU getpagesize.h. */ |
1949 | #ifndef HAVE_GETPAGESIZE | |
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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 2411 | #line 2412 "configure" |
c906108c SS |
2412 | #include "confdefs.h" |
2413 | ||
2414 | int main() { | |
2415 | return (int) gettext ("") | |
2416 | ; return 0; } | |
2417 | EOF | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 3115 | echo "configure:3116: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
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 | |
e7c61be3 | 3120 | #line 3121 "configure" |
0e5d83e3 JJ |
3121 | #include "confdefs.h" |
3122 | #include <$ac_hdr> | |
3123 | EOF | |
3124 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 3125 | { (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
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 | |
e7c61be3 | 3155 | echo "configure:3156: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
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 | |
e7c61be3 | 3160 | #line 3161 "configure" |
0e5d83e3 JJ |
3161 | #include "confdefs.h" |
3162 | #include <$ac_hdr> | |
3163 | EOF | |
3164 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 3165 | { (eval echo configure:3166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
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 | |
e7c61be3 | 3203 | echo "configure:3204: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
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 | |
e7c61be3 | 3208 | #line 3209 "configure" |
0e5d83e3 JJ |
3209 | #include "confdefs.h" |
3210 | #include <$ac_hdr> | |
3211 | EOF | |
3212 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 3213 | { (eval echo configure:3214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
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 | |
e7c61be3 | 3243 | echo "configure:3244: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
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 | |
e7c61be3 | 3248 | #line 3249 "configure" |
0e5d83e3 JJ |
3249 | #include "confdefs.h" |
3250 | #include <$ac_hdr> | |
3251 | EOF | |
3252 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 3253 | { (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | ||
e7c61be3 | 3438 | for ac_prog in gawk mawk 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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 |
e7c61be3 | 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 |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 3768 | #line 3769 "configure" |
9a156167 MK |
3769 | #include "confdefs.h" |
3770 | ||
3771 | int main() { | |
3772 | main() | |
3773 | ; return 0; } | |
3774 | EOF | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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" |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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" |
e7c61be3 | 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 | |
e7c61be3 | 5467 | echo "configure:5468: checking for $ac_hdr" >&5 |
78434e59 MK |
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 | |
e7c61be3 | 5472 | #line 5473 "configure" |
78434e59 MK |
5473 | #include "confdefs.h" |
5474 | #include <$ac_hdr> | |
5475 | EOF | |
5476 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 5477 | { (eval echo configure:5478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
78434e59 MK |
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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 5823 | #line 5824 "configure" |
bce58c09 JB |
5824 | #include "confdefs.h" |
5825 | ||
5826 | int main() { | |
5827 | } $ac_kw foo() { | |
5828 | ; return 0; } | |
5829 | EOF | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | ||
e7c61be3 | 6094 | for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.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 | |
e7c61be3 | 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 | |
e7c61be3 | 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" | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 | |
e7c61be3 | 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 |
e7c61be3 | 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 | |
e7c61be3 | 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 | ||
e7c61be3 RM |
6226 | #if HAVE_SYS_TYPES_H |
6227 | # include <sys/types.h> | |
6228 | #endif | |
6229 | ||
6230 | #if HAVE_STDLIB_H | |
6231 | # include <stdlib.h> | |
6232 | #endif | |
6233 | ||
6234 | #if HAVE_SYS_STAT_H | |
6235 | # include <sys/stat.h> | |
6236 | #endif | |
6237 | ||
6238 | #if HAVE_UNISTD_H | |
6239 | # include <unistd.h> | |
6240 | #endif | |
6241 | ||
97bf5e38 MK |
6242 | /* This mess was copied from the GNU getpagesize.h. */ |
6243 | #ifndef HAVE_GETPAGESIZE | |
97bf5e38 MK |
6244 | |
6245 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6246 | # ifndef HAVE_SYS_PARAM_H | |
6247 | # define HAVE_SYS_PARAM_H 1 | |
6248 | # endif | |
6249 | ||
6250 | # ifdef _SC_PAGESIZE | |
6251 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6252 | # else /* no _SC_PAGESIZE */ | |
6253 | # ifdef HAVE_SYS_PARAM_H | |
6254 | # include <sys/param.h> | |
6255 | # ifdef EXEC_PAGESIZE | |
6256 | # define getpagesize() EXEC_PAGESIZE | |
6257 | # else /* no EXEC_PAGESIZE */ | |
6258 | # ifdef NBPG | |
6259 | # define getpagesize() NBPG * CLSIZE | |
6260 | # ifndef CLSIZE | |
6261 | # define CLSIZE 1 | |
6262 | # endif /* no CLSIZE */ | |
6263 | # else /* no NBPG */ | |
6264 | # ifdef NBPC | |
6265 | # define getpagesize() NBPC | |
6266 | # else /* no NBPC */ | |
6267 | # ifdef PAGESIZE | |
6268 | # define getpagesize() PAGESIZE | |
6269 | # endif /* PAGESIZE */ | |
6270 | # endif /* no NBPC */ | |
6271 | # endif /* no NBPG */ | |
6272 | # endif /* no EXEC_PAGESIZE */ | |
6273 | # else /* no HAVE_SYS_PARAM_H */ | |
6274 | # define getpagesize() 8192 /* punt totally */ | |
6275 | # endif /* no HAVE_SYS_PARAM_H */ | |
6276 | # endif /* no _SC_PAGESIZE */ | |
6277 | ||
6278 | #endif /* no HAVE_GETPAGESIZE */ | |
6279 | ||
74c1b268 | 6280 | #ifdef __cplusplus |
97bf5e38 | 6281 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 6282 | #else |
97bf5e38 | 6283 | char *malloc(); |
74c1b268 | 6284 | #endif |
74c1b268 | 6285 | |
97bf5e38 MK |
6286 | int |
6287 | main() | |
6288 | { | |
6289 | char *data, *data2, *data3; | |
6290 | int i, pagesize; | |
6291 | int fd; | |
74c1b268 | 6292 | |
97bf5e38 | 6293 | pagesize = getpagesize(); |
74c1b268 | 6294 | |
97bf5e38 MK |
6295 | /* |
6296 | * First, make a file with some known garbage in it. | |
6297 | */ | |
6298 | data = malloc(pagesize); | |
6299 | if (!data) | |
6300 | exit(1); | |
6301 | for (i = 0; i < pagesize; ++i) | |
6302 | *(data + i) = rand(); | |
6303 | umask(0); | |
6304 | fd = creat("conftestmmap", 0600); | |
6305 | if (fd < 0) | |
6306 | exit(1); | |
6307 | if (write(fd, data, pagesize) != pagesize) | |
6308 | exit(1); | |
6309 | close(fd); | |
74c1b268 | 6310 | |
97bf5e38 MK |
6311 | /* |
6312 | * Next, try to mmap the file at a fixed address which | |
6313 | * already has something else allocated at it. If we can, | |
6314 | * also make sure that we see the same garbage. | |
6315 | */ | |
6316 | fd = open("conftestmmap", O_RDWR); | |
6317 | if (fd < 0) | |
6318 | exit(1); | |
6319 | data2 = malloc(2 * pagesize); | |
6320 | if (!data2) | |
6321 | exit(1); | |
6322 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6323 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6324 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6325 | exit(1); | |
6326 | for (i = 0; i < pagesize; ++i) | |
6327 | if (*(data + i) != *(data2 + i)) | |
6328 | exit(1); | |
74c1b268 | 6329 | |
97bf5e38 MK |
6330 | /* |
6331 | * Finally, make sure that changes to the mapped area | |
6332 | * do not percolate back to the file as seen by read(). | |
6333 | * (This is a bug on some variants of i386 svr4.0.) | |
6334 | */ | |
6335 | for (i = 0; i < pagesize; ++i) | |
6336 | *(data2 + i) = *(data2 + i) + 1; | |
6337 | data3 = malloc(pagesize); | |
6338 | if (!data3) | |
6339 | exit(1); | |
6340 | if (read(fd, data3, pagesize) != pagesize) | |
6341 | exit(1); | |
6342 | for (i = 0; i < pagesize; ++i) | |
6343 | if (*(data + i) != *(data3 + i)) | |
6344 | exit(1); | |
6345 | close(fd); | |
6346 | unlink("conftestmmap"); | |
6347 | exit(0); | |
74c1b268 | 6348 | } |
97bf5e38 | 6349 | |
74c1b268 | 6350 | EOF |
e7c61be3 | 6351 | if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6352 | then |
97bf5e38 | 6353 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6354 | else |
6355 | echo "configure: failed program was:" >&5 | |
6356 | cat conftest.$ac_ext >&5 | |
6357 | rm -fr conftest* | |
97bf5e38 | 6358 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6359 | fi |
6360 | rm -fr conftest* | |
6361 | fi | |
6362 | ||
6363 | fi | |
6364 | ||
97bf5e38 MK |
6365 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6366 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6367 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6368 | #define HAVE_MMAP 1 |
74c1b268 AC |
6369 | EOF |
6370 | ||
6371 | fi | |
6372 | ||
97bf5e38 | 6373 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
e7c61be3 | 6374 | echo "configure:6375: checking for pid_t" >&5 |
97bf5e38 | 6375 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6376 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6377 | else |
6378 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6379 | #line 6380 "configure" |
0200359f | 6380 | #include "confdefs.h" |
97bf5e38 MK |
6381 | #include <sys/types.h> |
6382 | #if STDC_HEADERS | |
6383 | #include <stdlib.h> | |
6384 | #include <stddef.h> | |
0200359f | 6385 | #endif |
0200359f | 6386 | EOF |
97bf5e38 MK |
6387 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6388 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6389 | rm -rf conftest* | |
6390 | ac_cv_type_pid_t=yes | |
0200359f | 6391 | else |
97bf5e38 MK |
6392 | rm -rf conftest* |
6393 | ac_cv_type_pid_t=no | |
0200359f | 6394 | fi |
97bf5e38 | 6395 | rm -f conftest* |
0200359f MK |
6396 | |
6397 | fi | |
97bf5e38 MK |
6398 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6399 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6400 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6401 | #define pid_t int |
0200359f MK |
6402 | EOF |
6403 | ||
6404 | fi | |
6405 | ||
97bf5e38 MK |
6406 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6407 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
e7c61be3 | 6408 | echo "configure:6409: checking for vfork.h" >&5 |
97bf5e38 | 6409 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6410 | echo $ac_n "(cached) $ac_c" 1>&6 |
6411 | else | |
6412 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6413 | #line 6414 "configure" |
72473524 | 6414 | #include "confdefs.h" |
97bf5e38 | 6415 | #include <vfork.h> |
72473524 | 6416 | EOF |
97bf5e38 | 6417 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
e7c61be3 | 6418 | { (eval echo configure:6419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6419 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6420 | if test -z "$ac_err"; then | |
72473524 | 6421 | rm -rf conftest* |
97bf5e38 | 6422 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6423 | else |
97bf5e38 | 6424 | echo "$ac_err" >&5 |
72473524 DJ |
6425 | echo "configure: failed program was:" >&5 |
6426 | cat conftest.$ac_ext >&5 | |
6427 | rm -rf conftest* | |
97bf5e38 | 6428 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6429 | fi |
6430 | rm -f conftest* | |
6431 | fi | |
97bf5e38 MK |
6432 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6433 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6434 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6435 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6436 | EOF |
6437 | ||
97bf5e38 MK |
6438 | else |
6439 | echo "$ac_t""no" 1>&6 | |
72473524 | 6440 | fi |
c906108c | 6441 | |
97bf5e38 | 6442 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
e7c61be3 | 6443 | echo "configure:6444: checking for working vfork" >&5 |
97bf5e38 MK |
6444 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6445 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6446 | else | |
6447 | if test "$cross_compiling" = yes; then | |
6448 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
e7c61be3 | 6449 | echo "configure:6450: checking for vfork" >&5 |
97bf5e38 | 6450 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6451 | echo $ac_n "(cached) $ac_c" 1>&6 |
6452 | else | |
6453 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6454 | #line 6455 "configure" |
2b2d558c | 6455 | #include "confdefs.h" |
97bf5e38 MK |
6456 | /* System header to define __stub macros and hopefully few prototypes, |
6457 | which can conflict with char vfork(); below. */ | |
6458 | #include <assert.h> | |
6459 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6460 | /* We use char because int might match the return type of a gcc2 | |
6461 | builtin and then its argument prototype would still apply. */ | |
6462 | char vfork(); | |
2b2d558c MK |
6463 | |
6464 | int main() { | |
97bf5e38 MK |
6465 | |
6466 | /* The GNU C library defines this for functions which it implements | |
6467 | to always fail with ENOSYS. Some functions are actually named | |
6468 | something starting with __ and the normal name is an alias. */ | |
6469 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6470 | choke me | |
6471 | #else | |
6472 | vfork(); | |
6473 | #endif | |
6474 | ||
2b2d558c MK |
6475 | ; return 0; } |
6476 | EOF | |
e7c61be3 | 6477 | if { (eval echo configure:6478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6478 | rm -rf conftest* |
97bf5e38 | 6479 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6480 | else |
6481 | echo "configure: failed program was:" >&5 | |
6482 | cat conftest.$ac_ext >&5 | |
6483 | rm -rf conftest* | |
97bf5e38 | 6484 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6485 | fi |
6486 | rm -f conftest* | |
6487 | fi | |
6488 | ||
97bf5e38 MK |
6489 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6490 | echo "$ac_t""yes" 1>&6 | |
6491 | : | |
6492 | else | |
6493 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6494 | fi |
6495 | ||
97bf5e38 | 6496 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6497 | else |
6498 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6499 | #line 6500 "configure" |
7dfa765c | 6500 | #include "confdefs.h" |
97bf5e38 MK |
6501 | /* Thanks to Paul Eggert for this test. */ |
6502 | #include <stdio.h> | |
6503 | #include <sys/types.h> | |
6504 | #include <sys/stat.h> | |
6505 | #ifdef HAVE_UNISTD_H | |
6506 | #include <unistd.h> | |
6507 | #endif | |
6508 | #ifdef HAVE_VFORK_H | |
6509 | #include <vfork.h> | |
6510 | #endif | |
6511 | /* On some sparc systems, changes by the child to local and incoming | |
6512 | argument registers are propagated back to the parent. | |
6513 | The compiler is told about this with #include <vfork.h>, | |
6514 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6515 | Test for this by using a static variable whose address | |
6516 | is put into a register that is clobbered by the vfork. */ | |
6517 | static | |
6518 | #ifdef __cplusplus | |
6519 | sparc_address_test (int arg) | |
6520 | #else | |
6521 | sparc_address_test (arg) int arg; | |
6522 | #endif | |
6523 | { | |
6524 | static pid_t child; | |
6525 | if (!child) { | |
6526 | child = vfork (); | |
6527 | if (child < 0) { | |
6528 | perror ("vfork"); | |
6529 | _exit(2); | |
6530 | } | |
6531 | if (!child) { | |
6532 | arg = getpid(); | |
6533 | write(-1, "", 0); | |
6534 | _exit (arg); | |
6535 | } | |
6536 | } | |
6537 | } | |
6538 | main() { | |
6539 | pid_t parent = getpid (); | |
6540 | pid_t child; | |
7dfa765c | 6541 | |
97bf5e38 | 6542 | sparc_address_test (); |
7dfa765c | 6543 | |
97bf5e38 | 6544 | child = vfork (); |
7dfa765c | 6545 | |
97bf5e38 MK |
6546 | if (child == 0) { |
6547 | /* Here is another test for sparc vfork register problems. | |
6548 | This test uses lots of local variables, at least | |
6549 | as many local variables as main has allocated so far | |
6550 | including compiler temporaries. 4 locals are enough for | |
6551 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6552 | A buggy compiler should reuse the register of parent | |
6553 | for one of the local variables, since it will think that | |
6554 | parent can't possibly be used any more in this routine. | |
6555 | Assigning to the local variable will thus munge parent | |
6556 | in the parent process. */ | |
6557 | pid_t | |
6558 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6559 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6560 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6561 | use the same hardware register for all 8 local variables. */ | |
6562 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6563 | || p != p5 || p != p6 || p != p7) | |
6564 | _exit(1); | |
7dfa765c | 6565 | |
97bf5e38 MK |
6566 | /* On some systems (e.g. IRIX 3.3), |
6567 | vfork doesn't separate parent from child file descriptors. | |
6568 | If the child closes a descriptor before it execs or exits, | |
6569 | this munges the parent's descriptor as well. | |
6570 | Test for this by closing stdout in the child. */ | |
6571 | _exit(close(fileno(stdout)) != 0); | |
6572 | } else { | |
6573 | int status; | |
6574 | struct stat st; | |
64bb1671 | 6575 | |
97bf5e38 MK |
6576 | while (wait(&status) != child) |
6577 | ; | |
6578 | exit( | |
6579 | /* Was there some problem with vforking? */ | |
6580 | child < 0 | |
64bb1671 | 6581 | |
97bf5e38 MK |
6582 | /* Did the child fail? (This shouldn't happen.) */ |
6583 | || status | |
64bb1671 | 6584 | |
97bf5e38 MK |
6585 | /* Did the vfork/compiler bug occur? */ |
6586 | || parent != getpid() | |
6587 | ||
6588 | /* Did the file descriptor bug occur? */ | |
6589 | || fstat(fileno(stdout), &st) != 0 | |
6590 | ); | |
6591 | } | |
6592 | } | |
5c44784c | 6593 | EOF |
e7c61be3 | 6594 | if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6595 | then |
6596 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6597 | else |
6598 | echo "configure: failed program was:" >&5 | |
6599 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6600 | rm -fr conftest* |
6601 | ac_cv_func_vfork_works=no | |
5c44784c | 6602 | fi |
97bf5e38 | 6603 | rm -fr conftest* |
5c44784c JM |
6604 | fi |
6605 | ||
0afdd437 MK |
6606 | fi |
6607 | ||
97bf5e38 MK |
6608 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6609 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6610 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6611 | #define vfork fork |
0afdd437 MK |
6612 | EOF |
6613 | ||
6614 | fi | |
6615 | ||
97bf5e38 MK |
6616 | for ac_func in canonicalize_file_name realpath |
6617 | do | |
6618 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 6619 | echo "configure:6620: checking for $ac_func" >&5 |
97bf5e38 | 6620 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6621 | echo $ac_n "(cached) $ac_c" 1>&6 |
6622 | else | |
6623 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6624 | #line 6625 "configure" |
7e89e357 | 6625 | #include "confdefs.h" |
97bf5e38 MK |
6626 | /* System header to define __stub macros and hopefully few prototypes, |
6627 | which can conflict with char $ac_func(); below. */ | |
6628 | #include <assert.h> | |
6629 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6630 | /* We use char because int might match the return type of a gcc2 | |
6631 | builtin and then its argument prototype would still apply. */ | |
6632 | char $ac_func(); | |
6633 | ||
7e89e357 | 6634 | int main() { |
97bf5e38 MK |
6635 | |
6636 | /* The GNU C library defines this for functions which it implements | |
6637 | to always fail with ENOSYS. Some functions are actually named | |
6638 | something starting with __ and the normal name is an alias. */ | |
6639 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6640 | choke me | |
6641 | #else | |
6642 | $ac_func(); | |
6643 | #endif | |
6644 | ||
7e89e357 JT |
6645 | ; return 0; } |
6646 | EOF | |
e7c61be3 | 6647 | if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6648 | rm -rf conftest* |
97bf5e38 | 6649 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6650 | else |
6651 | echo "configure: failed program was:" >&5 | |
6652 | cat conftest.$ac_ext >&5 | |
6653 | rm -rf conftest* | |
97bf5e38 | 6654 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6655 | fi |
6656 | rm -f conftest* | |
6657 | fi | |
6658 | ||
97bf5e38 MK |
6659 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6660 | echo "$ac_t""yes" 1>&6 | |
6661 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6662 | cat >> confdefs.h <<EOF | |
6663 | #define $ac_tr_func 1 | |
7e89e357 | 6664 | EOF |
97bf5e38 MK |
6665 | |
6666 | else | |
6667 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6668 | fi |
97bf5e38 | 6669 | done |
7e89e357 | 6670 | |
97bf5e38 | 6671 | for ac_func in poll |
7be570e7 JM |
6672 | do |
6673 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 6674 | echo "configure:6675: checking for $ac_func" >&5 |
7be570e7 JM |
6675 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6676 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6677 | else | |
6678 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6679 | #line 6680 "configure" |
7be570e7 JM |
6680 | #include "confdefs.h" |
6681 | /* System header to define __stub macros and hopefully few prototypes, | |
6682 | which can conflict with char $ac_func(); below. */ | |
6683 | #include <assert.h> | |
6684 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6685 | /* We use char because int might match the return type of a gcc2 | |
6686 | builtin and then its argument prototype would still apply. */ | |
6687 | char $ac_func(); | |
6688 | ||
6689 | int main() { | |
6690 | ||
6691 | /* The GNU C library defines this for functions which it implements | |
6692 | to always fail with ENOSYS. Some functions are actually named | |
6693 | something starting with __ and the normal name is an alias. */ | |
6694 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6695 | choke me | |
6696 | #else | |
6697 | $ac_func(); | |
6698 | #endif | |
6699 | ||
6700 | ; return 0; } | |
6701 | EOF | |
e7c61be3 | 6702 | if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6703 | rm -rf conftest* |
6704 | eval "ac_cv_func_$ac_func=yes" | |
6705 | else | |
6706 | echo "configure: failed program was:" >&5 | |
6707 | cat conftest.$ac_ext >&5 | |
6708 | rm -rf conftest* | |
6709 | eval "ac_cv_func_$ac_func=no" | |
6710 | fi | |
6711 | rm -f conftest* | |
6712 | fi | |
6713 | ||
6714 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6715 | echo "$ac_t""yes" 1>&6 | |
6716 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6717 | cat >> confdefs.h <<EOF | |
6718 | #define $ac_tr_func 1 | |
6719 | EOF | |
6720 | ||
6721 | else | |
6722 | echo "$ac_t""no" 1>&6 | |
6723 | fi | |
6724 | done | |
6725 | ||
6726 | for ac_func in pread64 | |
6727 | do | |
6728 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 6729 | echo "configure:6730: checking for $ac_func" >&5 |
14abd0fb MK |
6730 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6731 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6732 | else | |
6733 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6734 | #line 6735 "configure" |
14abd0fb MK |
6735 | #include "confdefs.h" |
6736 | /* System header to define __stub macros and hopefully few prototypes, | |
6737 | which can conflict with char $ac_func(); below. */ | |
6738 | #include <assert.h> | |
6739 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6740 | /* We use char because int might match the return type of a gcc2 | |
6741 | builtin and then its argument prototype would still apply. */ | |
6742 | char $ac_func(); | |
6743 | ||
6744 | int main() { | |
6745 | ||
6746 | /* The GNU C library defines this for functions which it implements | |
6747 | to always fail with ENOSYS. Some functions are actually named | |
6748 | something starting with __ and the normal name is an alias. */ | |
6749 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6750 | choke me | |
6751 | #else | |
6752 | $ac_func(); | |
6753 | #endif | |
6754 | ||
6755 | ; return 0; } | |
6756 | EOF | |
e7c61be3 | 6757 | if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6758 | rm -rf conftest* |
6759 | eval "ac_cv_func_$ac_func=yes" | |
6760 | else | |
6761 | echo "configure: failed program was:" >&5 | |
6762 | cat conftest.$ac_ext >&5 | |
6763 | rm -rf conftest* | |
6764 | eval "ac_cv_func_$ac_func=no" | |
6765 | fi | |
6766 | rm -f conftest* | |
6767 | fi | |
6768 | ||
6769 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6770 | echo "$ac_t""yes" 1>&6 | |
6771 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6772 | cat >> confdefs.h <<EOF | |
6773 | #define $ac_tr_func 1 | |
6774 | EOF | |
6775 | ||
6776 | else | |
6777 | echo "$ac_t""no" 1>&6 | |
6778 | fi | |
6779 | done | |
6780 | ||
97bf5e38 MK |
6781 | for ac_func in sbrk |
6782 | do | |
6783 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 6784 | echo "configure:6785: checking for $ac_func" >&5 |
97bf5e38 | 6785 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6786 | echo $ac_n "(cached) $ac_c" 1>&6 |
6787 | else | |
6788 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6789 | #line 6790 "configure" |
c906108c | 6790 | #include "confdefs.h" |
97bf5e38 MK |
6791 | /* System header to define __stub macros and hopefully few prototypes, |
6792 | which can conflict with char $ac_func(); below. */ | |
6793 | #include <assert.h> | |
6794 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6795 | /* We use char because int might match the return type of a gcc2 | |
6796 | builtin and then its argument prototype would still apply. */ | |
6797 | char $ac_func(); | |
c906108c | 6798 | |
97bf5e38 MK |
6799 | int main() { |
6800 | ||
6801 | /* The GNU C library defines this for functions which it implements | |
6802 | to always fail with ENOSYS. Some functions are actually named | |
6803 | something starting with __ and the normal name is an alias. */ | |
6804 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6805 | choke me | |
c906108c | 6806 | #else |
97bf5e38 | 6807 | $ac_func(); |
c906108c | 6808 | #endif |
97bf5e38 | 6809 | |
c906108c SS |
6810 | ; return 0; } |
6811 | EOF | |
e7c61be3 | 6812 | if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6813 | rm -rf conftest* |
97bf5e38 | 6814 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6815 | else |
6816 | echo "configure: failed program was:" >&5 | |
6817 | cat conftest.$ac_ext >&5 | |
6818 | rm -rf conftest* | |
97bf5e38 | 6819 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6820 | fi |
6821 | rm -f conftest* | |
6822 | fi | |
6823 | ||
97bf5e38 MK |
6824 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6825 | echo "$ac_t""yes" 1>&6 | |
6826 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6827 | cat >> confdefs.h <<EOF | |
6828 | #define $ac_tr_func 1 | |
c906108c | 6829 | EOF |
97bf5e38 MK |
6830 | |
6831 | else | |
6832 | echo "$ac_t""no" 1>&6 | |
c906108c | 6833 | fi |
97bf5e38 | 6834 | done |
c906108c | 6835 | |
97bf5e38 MK |
6836 | for ac_func in setpgid setpgrp |
6837 | do | |
6838 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 6839 | echo "configure:6840: checking for $ac_func" >&5 |
97bf5e38 | 6840 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6841 | echo $ac_n "(cached) $ac_c" 1>&6 |
6842 | else | |
6843 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6844 | #line 6845 "configure" |
c906108c | 6845 | #include "confdefs.h" |
97bf5e38 MK |
6846 | /* System header to define __stub macros and hopefully few prototypes, |
6847 | which can conflict with char $ac_func(); below. */ | |
6848 | #include <assert.h> | |
6849 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6850 | /* We use char because int might match the return type of a gcc2 | |
6851 | builtin and then its argument prototype would still apply. */ | |
6852 | char $ac_func(); | |
c906108c | 6853 | |
97bf5e38 MK |
6854 | int main() { |
6855 | ||
6856 | /* The GNU C library defines this for functions which it implements | |
6857 | to always fail with ENOSYS. Some functions are actually named | |
6858 | something starting with __ and the normal name is an alias. */ | |
6859 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6860 | choke me | |
c906108c | 6861 | #else |
97bf5e38 | 6862 | $ac_func(); |
c906108c | 6863 | #endif |
97bf5e38 | 6864 | |
c906108c SS |
6865 | ; return 0; } |
6866 | EOF | |
e7c61be3 | 6867 | if { (eval echo configure:6868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6868 | rm -rf conftest* |
97bf5e38 | 6869 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6870 | else |
6871 | echo "configure: failed program was:" >&5 | |
6872 | cat conftest.$ac_ext >&5 | |
6873 | rm -rf conftest* | |
97bf5e38 | 6874 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6875 | fi |
6876 | rm -f conftest* | |
6877 | fi | |
6878 | ||
97bf5e38 MK |
6879 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6880 | echo "$ac_t""yes" 1>&6 | |
6881 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6882 | cat >> confdefs.h <<EOF | |
6883 | #define $ac_tr_func 1 | |
c906108c | 6884 | EOF |
97bf5e38 MK |
6885 | |
6886 | else | |
6887 | echo "$ac_t""no" 1>&6 | |
c906108c | 6888 | fi |
97bf5e38 | 6889 | done |
c906108c | 6890 | |
e1ea1d75 | 6891 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6892 | do |
6893 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 6894 | echo "configure:6895: checking for $ac_func" >&5 |
97bf5e38 | 6895 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6896 | echo $ac_n "(cached) $ac_c" 1>&6 |
6897 | else | |
6898 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6899 | #line 6900 "configure" |
c906108c | 6900 | #include "confdefs.h" |
97bf5e38 MK |
6901 | /* System header to define __stub macros and hopefully few prototypes, |
6902 | which can conflict with char $ac_func(); below. */ | |
6903 | #include <assert.h> | |
6904 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6905 | /* We use char because int might match the return type of a gcc2 | |
6906 | builtin and then its argument prototype would still apply. */ | |
6907 | char $ac_func(); | |
c906108c | 6908 | |
97bf5e38 MK |
6909 | int main() { |
6910 | ||
6911 | /* The GNU C library defines this for functions which it implements | |
6912 | to always fail with ENOSYS. Some functions are actually named | |
6913 | something starting with __ and the normal name is an alias. */ | |
6914 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6915 | choke me | |
c906108c | 6916 | #else |
97bf5e38 | 6917 | $ac_func(); |
c906108c | 6918 | #endif |
97bf5e38 | 6919 | |
c906108c SS |
6920 | ; return 0; } |
6921 | EOF | |
e7c61be3 | 6922 | if { (eval echo configure:6923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6923 | rm -rf conftest* |
97bf5e38 | 6924 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6925 | else |
6926 | echo "configure: failed program was:" >&5 | |
6927 | cat conftest.$ac_ext >&5 | |
6928 | rm -rf conftest* | |
97bf5e38 | 6929 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6930 | fi |
6931 | rm -f conftest* | |
6932 | fi | |
6933 | ||
97bf5e38 MK |
6934 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6935 | echo "$ac_t""yes" 1>&6 | |
6936 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6937 | cat >> confdefs.h <<EOF | |
6938 | #define $ac_tr_func 1 | |
c906108c | 6939 | EOF |
e1ea1d75 | 6940 | |
97bf5e38 MK |
6941 | else |
6942 | echo "$ac_t""no" 1>&6 | |
c906108c | 6943 | fi |
97bf5e38 | 6944 | done |
c906108c | 6945 | |
97bf5e38 MK |
6946 | for ac_func in socketpair |
6947 | do | |
6948 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 6949 | echo "configure:6950: checking for $ac_func" >&5 |
97bf5e38 | 6950 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6951 | echo $ac_n "(cached) $ac_c" 1>&6 |
6952 | else | |
6953 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 6954 | #line 6955 "configure" |
c906108c | 6955 | #include "confdefs.h" |
97bf5e38 MK |
6956 | /* System header to define __stub macros and hopefully few prototypes, |
6957 | which can conflict with char $ac_func(); below. */ | |
6958 | #include <assert.h> | |
6959 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6960 | /* We use char because int might match the return type of a gcc2 | |
6961 | builtin and then its argument prototype would still apply. */ | |
6962 | char $ac_func(); | |
c906108c | 6963 | |
97bf5e38 MK |
6964 | int main() { |
6965 | ||
6966 | /* The GNU C library defines this for functions which it implements | |
6967 | to always fail with ENOSYS. Some functions are actually named | |
6968 | something starting with __ and the normal name is an alias. */ | |
6969 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6970 | choke me | |
c906108c | 6971 | #else |
97bf5e38 | 6972 | $ac_func(); |
c906108c | 6973 | #endif |
97bf5e38 | 6974 | |
c906108c SS |
6975 | ; return 0; } |
6976 | EOF | |
e7c61be3 | 6977 | if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6978 | rm -rf conftest* |
97bf5e38 | 6979 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6980 | else |
6981 | echo "configure: failed program was:" >&5 | |
6982 | cat conftest.$ac_ext >&5 | |
6983 | rm -rf conftest* | |
97bf5e38 | 6984 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6985 | fi |
6986 | rm -f conftest* | |
6987 | fi | |
6988 | ||
97bf5e38 MK |
6989 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6990 | echo "$ac_t""yes" 1>&6 | |
6991 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6992 | cat >> confdefs.h <<EOF | |
6993 | #define $ac_tr_func 1 | |
c906108c | 6994 | EOF |
97bf5e38 MK |
6995 | |
6996 | else | |
6997 | echo "$ac_t""no" 1>&6 | |
c906108c | 6998 | fi |
97bf5e38 | 6999 | done |
c906108c | 7000 | |
b757528f JJ |
7001 | for ac_func in syscall |
7002 | do | |
7003 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e7c61be3 | 7004 | echo "configure:7005: checking for $ac_func" >&5 |
b757528f JJ |
7005 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7007 | else | |
7008 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7009 | #line 7010 "configure" |
b757528f JJ |
7010 | #include "confdefs.h" |
7011 | /* System header to define __stub macros and hopefully few prototypes, | |
7012 | which can conflict with char $ac_func(); below. */ | |
7013 | #include <assert.h> | |
7014 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7015 | /* We use char because int might match the return type of a gcc2 | |
7016 | builtin and then its argument prototype would still apply. */ | |
7017 | char $ac_func(); | |
7018 | ||
7019 | int main() { | |
7020 | ||
7021 | /* The GNU C library defines this for functions which it implements | |
7022 | to always fail with ENOSYS. Some functions are actually named | |
7023 | something starting with __ and the normal name is an alias. */ | |
7024 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7025 | choke me | |
7026 | #else | |
7027 | $ac_func(); | |
7028 | #endif | |
7029 | ||
7030 | ; return 0; } | |
7031 | EOF | |
e7c61be3 | 7032 | if { (eval echo configure:7033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
7033 | rm -rf conftest* |
7034 | eval "ac_cv_func_$ac_func=yes" | |
7035 | else | |
7036 | echo "configure: failed program was:" >&5 | |
7037 | cat conftest.$ac_ext >&5 | |
7038 | rm -rf conftest* | |
7039 | eval "ac_cv_func_$ac_func=no" | |
7040 | fi | |
7041 | rm -f conftest* | |
7042 | fi | |
7043 | ||
7044 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7045 | echo "$ac_t""yes" 1>&6 | |
7046 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7047 | cat >> confdefs.h <<EOF | |
7048 | #define $ac_tr_func 1 | |
7049 | EOF | |
7050 | ||
7051 | else | |
7052 | echo "$ac_t""no" 1>&6 | |
7053 | fi | |
7054 | done | |
7055 | ||
97bf5e38 MK |
7056 | |
7057 | if test "$cross_compiling" = no; then | |
7058 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
e7c61be3 | 7059 | echo "configure:7060: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7060 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 7061 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
7062 | else |
7063 | if test "$cross_compiling" = yes; then | |
7064 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
7065 | else |
7066 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7067 | #line 7068 "configure" |
c906108c SS |
7068 | #include "confdefs.h" |
7069 | ||
c906108c SS |
7070 | #ifdef HAVE_UNISTD_H |
7071 | #include <unistd.h> | |
7072 | #endif | |
97bf5e38 MK |
7073 | |
7074 | /* | |
7075 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
7076 | * successfully. | |
7077 | */ | |
7078 | main() | |
7079 | { | |
7080 | if (setpgrp(1,1) == -1) | |
7081 | exit(0); | |
7082 | else | |
7083 | exit(1); | |
7084 | } | |
7085 | ||
c906108c | 7086 | EOF |
e7c61be3 | 7087 | if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7088 | then |
7089 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
7090 | else |
7091 | echo "configure: failed program was:" >&5 | |
7092 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7093 | rm -fr conftest* |
7094 | ac_cv_func_setpgrp_void=yes | |
c906108c | 7095 | fi |
97bf5e38 | 7096 | rm -fr conftest* |
c906108c SS |
7097 | fi |
7098 | ||
97bf5e38 MK |
7099 | |
7100 | fi | |
7101 | ||
7102 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
7103 | if test $ac_cv_func_setpgrp_void = yes; then | |
7104 | cat >> confdefs.h <<\EOF | |
7105 | #define SETPGRP_VOID 1 | |
c906108c SS |
7106 | EOF |
7107 | ||
7108 | fi | |
7109 | ||
97bf5e38 MK |
7110 | else |
7111 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
e7c61be3 | 7112 | echo "configure:7113: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7113 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
7114 | echo $ac_n "(cached) $ac_c" 1>&6 |
7115 | else | |
7116 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7117 | #line 7118 "configure" |
b83266a0 SS |
7118 | #include "confdefs.h" |
7119 | ||
b83266a0 | 7120 | #include <unistd.h> |
97bf5e38 | 7121 | |
b83266a0 | 7122 | int main() { |
97bf5e38 MK |
7123 | |
7124 | if (setpgrp(1,1) == -1) | |
7125 | exit (0); | |
7126 | else | |
7127 | exit (1); | |
7128 | ||
b83266a0 SS |
7129 | ; return 0; } |
7130 | EOF | |
e7c61be3 | 7131 | if { (eval echo configure:7132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 7132 | rm -rf conftest* |
97bf5e38 | 7133 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
7134 | else |
7135 | echo "configure: failed program was:" >&5 | |
7136 | cat conftest.$ac_ext >&5 | |
7137 | rm -rf conftest* | |
97bf5e38 | 7138 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
7139 | fi |
7140 | rm -f conftest* | |
7141 | fi | |
7142 | ||
97bf5e38 MK |
7143 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
7144 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 7145 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7146 | #define SETPGRP_VOID 1 |
b83266a0 SS |
7147 | EOF |
7148 | ||
97bf5e38 | 7149 | fi |
b83266a0 SS |
7150 | fi |
7151 | ||
97bf5e38 MK |
7152 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
7153 | # since sigsetjmp might only be defined as a macro. | |
7154 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
e7c61be3 | 7155 | echo "configure:7156: checking for sigsetjmp" >&5 |
97bf5e38 | 7156 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
7157 | echo $ac_n "(cached) $ac_c" 1>&6 |
7158 | else | |
7159 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7160 | #line 7161 "configure" |
a4db0f07 RH |
7161 | #include "confdefs.h" |
7162 | ||
97bf5e38 MK |
7163 | #include <setjmp.h> |
7164 | ||
a4db0f07 | 7165 | int main() { |
97bf5e38 | 7166 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
7167 | ; return 0; } |
7168 | EOF | |
e7c61be3 | 7169 | if { (eval echo configure:7170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 7170 | rm -rf conftest* |
97bf5e38 | 7171 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
7172 | else |
7173 | echo "configure: failed program was:" >&5 | |
7174 | cat conftest.$ac_ext >&5 | |
7175 | rm -rf conftest* | |
97bf5e38 | 7176 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
7177 | fi |
7178 | rm -f conftest* | |
7179 | fi | |
7180 | ||
97bf5e38 MK |
7181 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
7182 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 7183 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7184 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
7185 | EOF |
7186 | ||
7187 | fi | |
c906108c | 7188 | |
06825bd1 MK |
7189 | # Assume we'll default to using the included libiberty regex. |
7190 | gdb_use_included_regex=yes | |
7191 | ||
7192 | # However, if the system regex is GNU regex, then default to *not* | |
7193 | # using the included regex. | |
7194 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
e7c61be3 | 7195 | echo "configure:7196: checking for GNU regex" >&5 |
06825bd1 MK |
7196 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
7197 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7198 | else | |
7199 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7200 | #line 7201 "configure" |
06825bd1 MK |
7201 | #include "confdefs.h" |
7202 | #include <gnu-versions.h> | |
7203 | int main() { | |
7204 | #define REGEX_INTERFACE_VERSION 1 | |
7205 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
7206 | # error "Version mismatch" | |
7207 | #endif | |
7208 | ; return 0; } | |
7209 | EOF | |
e7c61be3 | 7210 | if { (eval echo configure:7211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
7211 | rm -rf conftest* |
7212 | gdb_cv_have_gnu_regex=yes | |
7213 | else | |
7214 | echo "configure: failed program was:" >&5 | |
7215 | cat conftest.$ac_ext >&5 | |
7216 | rm -rf conftest* | |
7217 | gdb_cv_have_gnu_regex=no | |
7218 | fi | |
7219 | rm -f conftest* | |
7220 | fi | |
7221 | ||
7222 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
7223 | if test $gdb_cv_have_gnu_regex = yes; then | |
7224 | gdb_use_included_regex=no | |
7225 | fi | |
7226 | ||
7227 | # Check whether --with-included-regex or --without-included-regex was given. | |
7228 | if test "${with_included_regex+set}" = set; then | |
7229 | withval="$with_included_regex" | |
7230 | gdb_with_regex=$withval | |
7231 | else | |
7232 | gdb_with_regex=$gdb_use_included_regex | |
7233 | fi | |
7234 | ||
7235 | if test "$gdb_with_regex" = yes; then | |
7236 | cat >> confdefs.h <<\EOF | |
7237 | #define USE_INCLUDED_REGEX 1 | |
7238 | EOF | |
7239 | ||
7240 | fi | |
7241 | ||
78434e59 MK |
7242 | # See if <machine/reg.h> degines `struct reg'. |
7243 | echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6 | |
e7c61be3 | 7244 | echo "configure:7245: checking for struct reg in machine/reg.h" >&5 |
78434e59 MK |
7245 | if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then |
7246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7247 | else | |
7248 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7249 | #line 7250 "configure" |
78434e59 MK |
7250 | #include "confdefs.h" |
7251 | #include <sys/types.h> | |
7252 | #include <machine/reg.h> | |
7253 | int main() { | |
7254 | struct reg r; | |
7255 | ; return 0; } | |
7256 | EOF | |
e7c61be3 | 7257 | if { (eval echo configure:7258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
78434e59 MK |
7258 | rm -rf conftest* |
7259 | gdb_cv_struct_reg=yes | |
7260 | else | |
7261 | echo "configure: failed program was:" >&5 | |
7262 | cat conftest.$ac_ext >&5 | |
7263 | rm -rf conftest* | |
7264 | gdb_cv_struct_reg=no | |
7265 | fi | |
7266 | rm -f conftest* | |
7267 | fi | |
7268 | ||
7269 | echo "$ac_t""$gdb_cv_struct_reg" 1>&6 | |
7270 | if test $gdb_cv_struct_reg = yes; then | |
7271 | cat >> confdefs.h <<\EOF | |
7272 | #define HAVE_STRUCT_REG 1 | |
7273 | EOF | |
7274 | ||
7275 | fi | |
7276 | ||
97bf5e38 MK |
7277 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7278 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
7279 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
e7c61be3 | 7280 | echo "configure:7281: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
7281 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7283 | else | |
7284 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7285 | #line 7286 "configure" |
c906108c | 7286 | #include "confdefs.h" |
97bf5e38 MK |
7287 | #include <machine/reg.h> |
7288 | int main() { | |
7289 | struct reg r; r.r_fs; | |
7290 | ; return 0; } | |
c906108c | 7291 | EOF |
e7c61be3 | 7292 | if { (eval echo configure:7293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7293 | rm -rf conftest* |
97bf5e38 | 7294 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 7295 | else |
97bf5e38 MK |
7296 | echo "configure: failed program was:" >&5 |
7297 | cat conftest.$ac_ext >&5 | |
c906108c | 7298 | rm -rf conftest* |
97bf5e38 | 7299 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
7300 | fi |
7301 | rm -f conftest* | |
97bf5e38 | 7302 | fi |
c906108c | 7303 | |
97bf5e38 MK |
7304 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
7305 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7306 | cat >> confdefs.h <<\EOF | |
7307 | #define HAVE_STRUCT_REG_R_FS 1 | |
7308 | EOF | |
7309 | ||
7310 | fi | |
7311 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
e7c61be3 | 7312 | echo "configure:7313: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
7313 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7314 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7315 | else | |
7316 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7317 | #line 7318 "configure" |
c906108c | 7318 | #include "confdefs.h" |
97bf5e38 MK |
7319 | #include <machine/reg.h> |
7320 | int main() { | |
7321 | struct reg r; r.r_gs; | |
7322 | ; return 0; } | |
c906108c | 7323 | EOF |
e7c61be3 | 7324 | if { (eval echo configure:7325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7325 | rm -rf conftest* |
97bf5e38 | 7326 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 7327 | else |
97bf5e38 MK |
7328 | echo "configure: failed program was:" >&5 |
7329 | cat conftest.$ac_ext >&5 | |
c906108c | 7330 | rm -rf conftest* |
97bf5e38 | 7331 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
7332 | fi |
7333 | rm -f conftest* | |
c906108c | 7334 | fi |
c906108c | 7335 | |
97bf5e38 MK |
7336 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
7337 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7338 | cat >> confdefs.h <<\EOF | |
7339 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
7340 | EOF |
7341 | ||
c906108c SS |
7342 | fi |
7343 | ||
97bf5e38 MK |
7344 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
7345 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
e7c61be3 | 7346 | echo "configure:7347: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 7347 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
7348 | echo $ac_n "(cached) $ac_c" 1>&6 |
7349 | else | |
7350 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7351 | #line 7352 "configure" |
c906108c | 7352 | #include "confdefs.h" |
97bf5e38 | 7353 | #include <sys/ptrace.h> |
c906108c | 7354 | int main() { |
97bf5e38 | 7355 | PTRACE_GETREGS; |
c906108c SS |
7356 | ; return 0; } |
7357 | EOF | |
e7c61be3 | 7358 | if { (eval echo configure:7359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7359 | rm -rf conftest* |
97bf5e38 | 7360 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
7361 | else |
7362 | echo "configure: failed program was:" >&5 | |
7363 | cat conftest.$ac_ext >&5 | |
7364 | rm -rf conftest* | |
97bf5e38 | 7365 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
7366 | fi |
7367 | rm -f conftest* | |
7368 | fi | |
7369 | ||
97bf5e38 MK |
7370 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
7371 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
7372 | cat >> confdefs.h <<\EOF | |
7373 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7374 | EOF |
7375 | ||
97bf5e38 | 7376 | fi |
c906108c | 7377 | |
97bf5e38 MK |
7378 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7379 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
e7c61be3 | 7380 | echo "configure:7381: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7381 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7382 | echo $ac_n "(cached) $ac_c" 1>&6 |
7383 | else | |
7384 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7385 | #line 7386 "configure" |
c906108c | 7386 | #include "confdefs.h" |
97bf5e38 | 7387 | #include <sys/ptrace.h> |
c906108c | 7388 | int main() { |
97bf5e38 | 7389 | PTRACE_GETFPXREGS; |
c906108c SS |
7390 | ; return 0; } |
7391 | EOF | |
e7c61be3 | 7392 | if { (eval echo configure:7393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7393 | rm -rf conftest* |
97bf5e38 | 7394 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7395 | else |
7396 | echo "configure: failed program was:" >&5 | |
7397 | cat conftest.$ac_ext >&5 | |
7398 | rm -rf conftest* | |
97bf5e38 | 7399 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7400 | fi |
7401 | rm -f conftest* | |
7402 | fi | |
7403 | ||
97bf5e38 MK |
7404 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7405 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7406 | cat >> confdefs.h <<\EOF | |
7407 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7408 | EOF |
7409 | ||
97bf5e38 | 7410 | fi |
c906108c | 7411 | |
97bf5e38 MK |
7412 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7413 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
e7c61be3 | 7414 | echo "configure:7415: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7415 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7416 | echo $ac_n "(cached) $ac_c" 1>&6 |
7417 | else | |
7418 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7419 | #line 7420 "configure" |
c906108c | 7420 | #include "confdefs.h" |
97bf5e38 MK |
7421 | #include <sys/types.h> |
7422 | #include <sys/ptrace.h> | |
c906108c | 7423 | int main() { |
97bf5e38 | 7424 | PT_GETDBREGS; |
c906108c SS |
7425 | ; return 0; } |
7426 | EOF | |
e7c61be3 | 7427 | if { (eval echo configure:7428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7428 | rm -rf conftest* |
97bf5e38 | 7429 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7430 | else |
7431 | echo "configure: failed program was:" >&5 | |
7432 | cat conftest.$ac_ext >&5 | |
7433 | rm -rf conftest* | |
97bf5e38 | 7434 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7435 | fi |
7436 | rm -f conftest* | |
7437 | fi | |
7438 | ||
97bf5e38 MK |
7439 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7440 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7441 | cat >> confdefs.h <<\EOF | |
7442 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7443 | EOF |
7444 | ||
97bf5e38 | 7445 | fi |
c906108c | 7446 | |
97bf5e38 MK |
7447 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7448 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
e7c61be3 | 7449 | echo "configure:7450: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7450 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7451 | echo $ac_n "(cached) $ac_c" 1>&6 |
7452 | else | |
7453 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7454 | #line 7455 "configure" |
c906108c | 7455 | #include "confdefs.h" |
97bf5e38 MK |
7456 | #include <sys/types.h> |
7457 | #include <sys/ptrace.h> | |
c906108c | 7458 | int main() { |
97bf5e38 | 7459 | PT_GETXMMREGS; |
c906108c SS |
7460 | ; return 0; } |
7461 | EOF | |
e7c61be3 | 7462 | if { (eval echo configure:7463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7463 | rm -rf conftest* |
97bf5e38 | 7464 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7465 | else |
7466 | echo "configure: failed program was:" >&5 | |
7467 | cat conftest.$ac_ext >&5 | |
7468 | rm -rf conftest* | |
97bf5e38 | 7469 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7470 | fi |
7471 | rm -f conftest* | |
7472 | fi | |
7473 | ||
97bf5e38 MK |
7474 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7475 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7476 | cat >> confdefs.h <<\EOF | |
7477 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7478 | EOF |
7479 | ||
97bf5e38 | 7480 | fi |
c906108c | 7481 | |
27ca5dad | 7482 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7483 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7484 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
e7c61be3 | 7485 | echo "configure:7486: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7486 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7487 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7488 | else | |
7489 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7490 | #line 7491 "configure" |
27ca5dad MC |
7491 | #include "confdefs.h" |
7492 | #include <stdint.h> | |
7493 | int main() { | |
7494 | uintptr_t foo = 0; | |
7495 | ; return 0; } | |
7496 | EOF | |
e7c61be3 | 7497 | if { (eval echo configure:7498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7498 | rm -rf conftest* |
7499 | gdb_cv_have_uintptr_t=yes | |
7500 | else | |
7501 | echo "configure: failed program was:" >&5 | |
7502 | cat conftest.$ac_ext >&5 | |
7503 | rm -rf conftest* | |
7504 | gdb_cv_have_uintptr_t=no | |
7505 | fi | |
7506 | rm -f conftest* | |
7507 | fi | |
7508 | ||
7509 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 | |
7510 | if test $gdb_cv_have_uintptr_t = yes; then | |
7511 | cat >> confdefs.h <<\EOF | |
7512 | #define HAVE_UINTPTR_T 1 | |
7513 | EOF | |
7514 | ||
7515 | fi | |
97bf5e38 MK |
7516 | |
7517 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
e7c61be3 | 7518 | echo "configure:7519: checking whether malloc must be declared" >&5 |
97bf5e38 | 7519 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7520 | echo $ac_n "(cached) $ac_c" 1>&6 |
7521 | else | |
7522 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7523 | #line 7524 "configure" |
3862412b | 7524 | #include "confdefs.h" |
e17bf198 | 7525 | |
97bf5e38 MK |
7526 | #include <stdio.h> |
7527 | #ifdef HAVE_STRING_H | |
7528 | #include <string.h> | |
7529 | #else | |
7530 | #ifdef HAVE_STRINGS_H | |
7531 | #include <strings.h> | |
7532 | #endif | |
7533 | #endif | |
7534 | #ifdef HAVE_STDLIB_H | |
7535 | #include <stdlib.h> | |
7536 | #endif | |
7537 | #ifdef HAVE_UNISTD_H | |
7538 | #include <unistd.h> | |
7539 | #endif | |
3862412b | 7540 | int main() { |
97bf5e38 | 7541 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7542 | ; return 0; } |
7543 | EOF | |
e7c61be3 | 7544 | if { (eval echo configure:7545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7545 | rm -rf conftest* |
97bf5e38 | 7546 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7547 | else |
7548 | echo "configure: failed program was:" >&5 | |
7549 | cat conftest.$ac_ext >&5 | |
7550 | rm -rf conftest* | |
97bf5e38 | 7551 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7552 | fi |
7553 | rm -f conftest* | |
7554 | fi | |
7555 | ||
97bf5e38 MK |
7556 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7557 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7558 | cat >> confdefs.h <<\EOF | |
7559 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7560 | EOF |
7561 | ||
97bf5e38 | 7562 | fi |
3862412b | 7563 | |
97bf5e38 | 7564 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
e7c61be3 | 7565 | echo "configure:7566: checking whether realloc must be declared" >&5 |
97bf5e38 | 7566 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7567 | echo $ac_n "(cached) $ac_c" 1>&6 |
7568 | else | |
7569 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7570 | #line 7571 "configure" |
3862412b | 7571 | #include "confdefs.h" |
e17bf198 | 7572 | |
97bf5e38 MK |
7573 | #include <stdio.h> |
7574 | #ifdef HAVE_STRING_H | |
7575 | #include <string.h> | |
7576 | #else | |
7577 | #ifdef HAVE_STRINGS_H | |
7578 | #include <strings.h> | |
7579 | #endif | |
7580 | #endif | |
7581 | #ifdef HAVE_STDLIB_H | |
7582 | #include <stdlib.h> | |
7583 | #endif | |
7584 | #ifdef HAVE_UNISTD_H | |
7585 | #include <unistd.h> | |
7586 | #endif | |
3862412b | 7587 | int main() { |
97bf5e38 | 7588 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7589 | ; return 0; } |
7590 | EOF | |
e7c61be3 | 7591 | if { (eval echo configure:7592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7592 | rm -rf conftest* |
97bf5e38 | 7593 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7594 | else |
7595 | echo "configure: failed program was:" >&5 | |
7596 | cat conftest.$ac_ext >&5 | |
7597 | rm -rf conftest* | |
97bf5e38 | 7598 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7599 | fi |
7600 | rm -f conftest* | |
7601 | fi | |
7602 | ||
97bf5e38 MK |
7603 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7604 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7605 | cat >> confdefs.h <<\EOF | |
7606 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7607 | EOF |
7608 | ||
97bf5e38 | 7609 | fi |
3862412b | 7610 | |
97bf5e38 | 7611 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
e7c61be3 | 7612 | echo "configure:7613: checking whether free must be declared" >&5 |
97bf5e38 | 7613 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7614 | echo $ac_n "(cached) $ac_c" 1>&6 |
7615 | else | |
7616 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7617 | #line 7618 "configure" |
451928c5 | 7618 | #include "confdefs.h" |
e17bf198 | 7619 | |
97bf5e38 MK |
7620 | #include <stdio.h> |
7621 | #ifdef HAVE_STRING_H | |
7622 | #include <string.h> | |
7623 | #else | |
7624 | #ifdef HAVE_STRINGS_H | |
7625 | #include <strings.h> | |
7626 | #endif | |
7627 | #endif | |
7628 | #ifdef HAVE_STDLIB_H | |
7629 | #include <stdlib.h> | |
7630 | #endif | |
7631 | #ifdef HAVE_UNISTD_H | |
7632 | #include <unistd.h> | |
7633 | #endif | |
451928c5 | 7634 | int main() { |
97bf5e38 | 7635 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7636 | ; return 0; } |
7637 | EOF | |
e7c61be3 | 7638 | if { (eval echo configure:7639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7639 | rm -rf conftest* |
97bf5e38 | 7640 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7641 | else |
7642 | echo "configure: failed program was:" >&5 | |
7643 | cat conftest.$ac_ext >&5 | |
7644 | rm -rf conftest* | |
97bf5e38 | 7645 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7646 | fi |
7647 | rm -f conftest* | |
7648 | fi | |
7649 | ||
97bf5e38 MK |
7650 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7651 | if test $bfd_cv_decl_needed_free = yes; then | |
7652 | cat >> confdefs.h <<\EOF | |
7653 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7654 | EOF |
7655 | ||
97bf5e38 | 7656 | fi |
451928c5 | 7657 | |
97bf5e38 | 7658 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
e7c61be3 | 7659 | echo "configure:7660: checking whether strerror must be declared" >&5 |
97bf5e38 | 7660 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7661 | echo $ac_n "(cached) $ac_c" 1>&6 |
7662 | else | |
7663 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7664 | #line 7665 "configure" |
451928c5 | 7665 | #include "confdefs.h" |
e17bf198 | 7666 | |
97bf5e38 MK |
7667 | #include <stdio.h> |
7668 | #ifdef HAVE_STRING_H | |
7669 | #include <string.h> | |
7670 | #else | |
7671 | #ifdef HAVE_STRINGS_H | |
7672 | #include <strings.h> | |
7673 | #endif | |
7674 | #endif | |
7675 | #ifdef HAVE_STDLIB_H | |
7676 | #include <stdlib.h> | |
7677 | #endif | |
7678 | #ifdef HAVE_UNISTD_H | |
7679 | #include <unistd.h> | |
7680 | #endif | |
451928c5 | 7681 | int main() { |
97bf5e38 | 7682 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7683 | ; return 0; } |
7684 | EOF | |
e7c61be3 | 7685 | if { (eval echo configure:7686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7686 | rm -rf conftest* |
97bf5e38 | 7687 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7688 | else |
7689 | echo "configure: failed program was:" >&5 | |
7690 | cat conftest.$ac_ext >&5 | |
7691 | rm -rf conftest* | |
97bf5e38 | 7692 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7693 | fi |
7694 | rm -f conftest* | |
7695 | fi | |
7696 | ||
97bf5e38 MK |
7697 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7698 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7699 | cat >> confdefs.h <<\EOF | |
7700 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7701 | EOF |
7702 | ||
97bf5e38 | 7703 | fi |
451928c5 | 7704 | |
97bf5e38 | 7705 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
e7c61be3 | 7706 | echo "configure:7707: checking whether strdup must be declared" >&5 |
97bf5e38 | 7707 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7708 | echo $ac_n "(cached) $ac_c" 1>&6 |
7709 | else | |
7710 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7711 | #line 7712 "configure" |
3862412b | 7712 | #include "confdefs.h" |
e17bf198 | 7713 | |
97bf5e38 MK |
7714 | #include <stdio.h> |
7715 | #ifdef HAVE_STRING_H | |
7716 | #include <string.h> | |
7717 | #else | |
7718 | #ifdef HAVE_STRINGS_H | |
7719 | #include <strings.h> | |
7720 | #endif | |
7721 | #endif | |
7722 | #ifdef HAVE_STDLIB_H | |
7723 | #include <stdlib.h> | |
7724 | #endif | |
7725 | #ifdef HAVE_UNISTD_H | |
7726 | #include <unistd.h> | |
7727 | #endif | |
3862412b | 7728 | int main() { |
97bf5e38 | 7729 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7730 | ; return 0; } |
7731 | EOF | |
e7c61be3 | 7732 | if { (eval echo configure:7733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7733 | rm -rf conftest* |
97bf5e38 | 7734 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7735 | else |
7736 | echo "configure: failed program was:" >&5 | |
7737 | cat conftest.$ac_ext >&5 | |
7738 | rm -rf conftest* | |
97bf5e38 | 7739 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7740 | fi |
7741 | rm -f conftest* | |
7742 | fi | |
7743 | ||
97bf5e38 MK |
7744 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7745 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7746 | cat >> confdefs.h <<\EOF | |
7747 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7748 | EOF |
7749 | ||
97bf5e38 | 7750 | fi |
3862412b | 7751 | |
97bf5e38 | 7752 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
e7c61be3 | 7753 | echo "configure:7754: checking whether strstr must be declared" >&5 |
97bf5e38 | 7754 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7755 | echo $ac_n "(cached) $ac_c" 1>&6 |
7756 | else | |
7757 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7758 | #line 7759 "configure" |
3862412b | 7759 | #include "confdefs.h" |
e17bf198 | 7760 | |
97bf5e38 MK |
7761 | #include <stdio.h> |
7762 | #ifdef HAVE_STRING_H | |
7763 | #include <string.h> | |
7764 | #else | |
7765 | #ifdef HAVE_STRINGS_H | |
7766 | #include <strings.h> | |
7767 | #endif | |
7768 | #endif | |
7769 | #ifdef HAVE_STDLIB_H | |
7770 | #include <stdlib.h> | |
7771 | #endif | |
7772 | #ifdef HAVE_UNISTD_H | |
7773 | #include <unistd.h> | |
7774 | #endif | |
3862412b | 7775 | int main() { |
97bf5e38 | 7776 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7777 | ; return 0; } |
7778 | EOF | |
e7c61be3 | 7779 | if { (eval echo configure:7780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7780 | rm -rf conftest* |
97bf5e38 | 7781 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7782 | else |
7783 | echo "configure: failed program was:" >&5 | |
7784 | cat conftest.$ac_ext >&5 | |
7785 | rm -rf conftest* | |
97bf5e38 | 7786 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7787 | fi |
7788 | rm -f conftest* | |
7789 | fi | |
7790 | ||
97bf5e38 MK |
7791 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7792 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7793 | cat >> confdefs.h <<\EOF | |
7794 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7795 | EOF |
7796 | ||
97bf5e38 | 7797 | fi |
3862412b | 7798 | |
97bf5e38 | 7799 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
e7c61be3 | 7800 | echo "configure:7801: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7801 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7802 | echo $ac_n "(cached) $ac_c" 1>&6 |
7803 | else | |
7804 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7805 | #line 7806 "configure" |
596c9d4b KB |
7806 | #include "confdefs.h" |
7807 | ||
97bf5e38 MK |
7808 | #include <stdio.h> |
7809 | #ifdef HAVE_STRING_H | |
7810 | #include <string.h> | |
7811 | #else | |
7812 | #ifdef HAVE_STRINGS_H | |
7813 | #include <strings.h> | |
7814 | #endif | |
7815 | #endif | |
7816 | #ifdef HAVE_STDLIB_H | |
7817 | #include <stdlib.h> | |
7818 | #endif | |
7819 | #ifdef HAVE_UNISTD_H | |
7820 | #include <unistd.h> | |
7821 | #endif | |
596c9d4b | 7822 | int main() { |
97bf5e38 | 7823 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7824 | ; return 0; } |
7825 | EOF | |
e7c61be3 | 7826 | if { (eval echo configure:7827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7827 | rm -rf conftest* |
97bf5e38 | 7828 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7829 | else |
7830 | echo "configure: failed program was:" >&5 | |
7831 | cat conftest.$ac_ext >&5 | |
7832 | rm -rf conftest* | |
97bf5e38 | 7833 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7834 | fi |
7835 | rm -f conftest* | |
7836 | fi | |
7837 | ||
97bf5e38 MK |
7838 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7839 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7840 | cat >> confdefs.h <<\EOF | |
7841 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7842 | EOF |
7843 | ||
97bf5e38 | 7844 | fi |
596c9d4b | 7845 | |
97bf5e38 MK |
7846 | |
7847 | # The following save_state_t checkery is only necessary for HPUX | |
7848 | # versions earlier than 10.20. When those fade from memory, this | |
7849 | # could be expunged. --jsm 1999-03-22 | |
7850 | ||
7851 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
e7c61be3 | 7852 | echo "configure:7853: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7853 | cat > conftest.$ac_ext <<EOF |
e7c61be3 | 7854 | #line 7855 "configure" |
97bf5e38 MK |
7855 | #include "confdefs.h" |
7856 | #include <machine/save_state.h> | |
7857 | EOF | |
7858 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7859 | egrep "save_state_t" >/dev/null 2>&1; then | |
7860 | rm -rf conftest* | |
7861 | gdb_cv_hpux_savestate=yes | |
7862 | else | |
7863 | rm -rf conftest* | |
7864 | gdb_cv_hpux_savestate=no | |
7865 | fi | |
7866 | rm -f conftest* | |
7867 | ||
7868 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7869 | #line 7870 "configure" |
97bf5e38 MK |
7870 | #include "confdefs.h" |
7871 | #include <machine/save_state.h> | |
7872 | EOF | |
7873 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7874 | egrep "ss_wide" >/dev/null 2>&1; then | |
7875 | rm -rf conftest* | |
7876 | gdb_cv_hpux_sswide=yes | |
7877 | else | |
7878 | rm -rf conftest* | |
7879 | gdb_cv_hpux_sswide=no | |
7880 | fi | |
7881 | rm -f conftest* | |
7882 | ||
7883 | if test $gdb_cv_hpux_savestate = yes | |
7884 | then | |
7885 | cat >> confdefs.h <<\EOF | |
7886 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7887 | EOF | |
7888 | ||
7889 | fi | |
7890 | if test $gdb_cv_hpux_sswide = yes | |
7891 | then | |
7892 | cat >> confdefs.h <<\EOF | |
7893 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7894 | EOF | |
7895 | ||
7896 | fi | |
7897 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7898 | ||
7899 | ||
7900 | # If we are configured native on GNU/Linux, work around problems with | |
7901 | # sys/procfs.h | |
7902 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7903 | ||
7904 | if test "${target}" = "${host}"; then | |
7905 | case "${host}" in | |
7906 | i[3456]86-*-linux*) | |
7907 | cat >> confdefs.h <<\EOF | |
7908 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7909 | EOF | |
7910 | ||
7911 | cat >> confdefs.h <<\EOF | |
7912 | #define sys_quotactl 1 | |
7913 | EOF | |
7914 | ||
7915 | ;; | |
7916 | ia64-*-aix*) | |
7917 | cat >> confdefs.h <<\EOF | |
7918 | #define NEW_PROC_API 1 | |
7919 | EOF | |
7920 | ||
7921 | ;; | |
7922 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7923 | cat >> confdefs.h <<\EOF | |
7924 | #define NEW_PROC_API 1 | |
7925 | EOF | |
7926 | ||
7927 | ;; | |
e7c61be3 | 7928 | *-*-solaris2.[6789]) |
97bf5e38 MK |
7929 | cat >> confdefs.h <<\EOF |
7930 | #define NEW_PROC_API 1 | |
7931 | EOF | |
7932 | ||
7933 | ;; | |
7934 | esac | |
7935 | fi | |
7936 | ||
7937 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7938 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
e7c61be3 | 7939 | echo "configure:7940: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7940 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7941 | echo $ac_n "(cached) $ac_c" 1>&6 |
7942 | else | |
7943 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7944 | #line 7945 "configure" |
596c9d4b KB |
7945 | #include "confdefs.h" |
7946 | ||
7947 | #define _SYSCALL32 | |
7948 | #include <sys/procfs.h> | |
7949 | int main() { | |
97bf5e38 | 7950 | pstatus_t avar |
596c9d4b KB |
7951 | ; return 0; } |
7952 | EOF | |
e7c61be3 | 7953 | if { (eval echo configure:7954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7954 | rm -rf conftest* |
97bf5e38 | 7955 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7956 | else |
7957 | echo "configure: failed program was:" >&5 | |
7958 | cat conftest.$ac_ext >&5 | |
7959 | rm -rf conftest* | |
97bf5e38 | 7960 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7961 | |
7962 | fi | |
7963 | rm -f conftest* | |
7964 | fi | |
7965 | ||
97bf5e38 | 7966 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7967 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7968 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7969 | EOF |
7970 | ||
7971 | fi | |
97bf5e38 | 7972 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7973 | |
97bf5e38 | 7974 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 7975 | echo "configure:7976: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7976 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7977 | echo $ac_n "(cached) $ac_c" 1>&6 |
7978 | else | |
7979 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 7980 | #line 7981 "configure" |
596c9d4b KB |
7981 | #include "confdefs.h" |
7982 | ||
7983 | #define _SYSCALL32 | |
7984 | #include <sys/procfs.h> | |
7985 | int main() { | |
97bf5e38 | 7986 | prrun_t avar |
596c9d4b KB |
7987 | ; return 0; } |
7988 | EOF | |
e7c61be3 | 7989 | if { (eval echo configure:7990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7990 | rm -rf conftest* |
97bf5e38 | 7991 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7992 | else |
7993 | echo "configure: failed program was:" >&5 | |
7994 | cat conftest.$ac_ext >&5 | |
7995 | rm -rf conftest* | |
97bf5e38 | 7996 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7997 | |
7998 | fi | |
7999 | rm -f conftest* | |
8000 | fi | |
8001 | ||
97bf5e38 | 8002 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 8003 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8004 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
8005 | EOF |
8006 | ||
8007 | fi | |
97bf5e38 | 8008 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 8009 | |
97bf5e38 | 8010 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8011 | echo "configure:8012: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8012 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
8013 | echo $ac_n "(cached) $ac_c" 1>&6 |
8014 | else | |
8015 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8016 | #line 8017 "configure" |
596c9d4b KB |
8017 | #include "confdefs.h" |
8018 | ||
8019 | #define _SYSCALL32 | |
8020 | #include <sys/procfs.h> | |
8021 | int main() { | |
97bf5e38 | 8022 | gregset_t avar |
596c9d4b KB |
8023 | ; return 0; } |
8024 | EOF | |
e7c61be3 | 8025 | if { (eval echo configure:8026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8026 | rm -rf conftest* |
97bf5e38 | 8027 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
8028 | else |
8029 | echo "configure: failed program was:" >&5 | |
8030 | cat conftest.$ac_ext >&5 | |
8031 | rm -rf conftest* | |
97bf5e38 | 8032 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
8033 | |
8034 | fi | |
8035 | rm -f conftest* | |
8036 | fi | |
8037 | ||
97bf5e38 | 8038 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 8039 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8040 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
8041 | EOF |
8042 | ||
8043 | fi | |
97bf5e38 | 8044 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 8045 | |
97bf5e38 | 8046 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8047 | echo "configure:8048: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8048 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 8049 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
8050 | else |
8051 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8052 | #line 8053 "configure" |
d84dd0c5 | 8053 | #include "confdefs.h" |
97bf5e38 MK |
8054 | |
8055 | #define _SYSCALL32 | |
d84dd0c5 | 8056 | #include <sys/procfs.h> |
97bf5e38 MK |
8057 | int main() { |
8058 | fpregset_t avar | |
8059 | ; return 0; } | |
d84dd0c5 | 8060 | EOF |
e7c61be3 | 8061 | if { (eval echo configure:8062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8062 | rm -rf conftest* |
8063 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
8064 | else |
8065 | echo "configure: failed program was:" >&5 | |
8066 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8067 | rm -rf conftest* |
8068 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8069 | ||
d84dd0c5 | 8070 | fi |
97bf5e38 | 8071 | rm -f conftest* |
d84dd0c5 MK |
8072 | fi |
8073 | ||
97bf5e38 MK |
8074 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
8075 | cat >> confdefs.h <<\EOF | |
8076 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
8077 | EOF |
8078 | ||
97bf5e38 MK |
8079 | fi |
8080 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 8081 | |
97bf5e38 | 8082 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8083 | echo "configure:8084: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8084 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
8085 | echo $ac_n "(cached) $ac_c" 1>&6 |
8086 | else | |
8087 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8088 | #line 8089 "configure" |
c906108c | 8089 | #include "confdefs.h" |
c906108c | 8090 | |
97bf5e38 MK |
8091 | #define _SYSCALL32 |
8092 | #include <sys/procfs.h> | |
c906108c | 8093 | int main() { |
97bf5e38 | 8094 | prgregset_t avar |
c906108c SS |
8095 | ; return 0; } |
8096 | EOF | |
e7c61be3 | 8097 | if { (eval echo configure:8098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8098 | rm -rf conftest* |
97bf5e38 | 8099 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
8100 | else |
8101 | echo "configure: failed program was:" >&5 | |
8102 | cat conftest.$ac_ext >&5 | |
8103 | rm -rf conftest* | |
97bf5e38 MK |
8104 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
8105 | ||
c906108c SS |
8106 | fi |
8107 | rm -f conftest* | |
8108 | fi | |
8109 | ||
97bf5e38 MK |
8110 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
8111 | cat >> confdefs.h <<\EOF | |
8112 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
8113 | EOF |
8114 | ||
97bf5e38 MK |
8115 | fi |
8116 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 8117 | |
97bf5e38 | 8118 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8119 | echo "configure:8120: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8120 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
8121 | echo $ac_n "(cached) $ac_c" 1>&6 |
8122 | else | |
8123 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8124 | #line 8125 "configure" |
d45fe813 | 8125 | #include "confdefs.h" |
97bf5e38 MK |
8126 | |
8127 | #define _SYSCALL32 | |
8128 | #include <sys/procfs.h> | |
d45fe813 | 8129 | int main() { |
97bf5e38 | 8130 | prfpregset_t avar |
d45fe813 KB |
8131 | ; return 0; } |
8132 | EOF | |
e7c61be3 | 8133 | if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8134 | rm -rf conftest* |
97bf5e38 | 8135 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
8136 | else |
8137 | echo "configure: failed program was:" >&5 | |
8138 | cat conftest.$ac_ext >&5 | |
8139 | rm -rf conftest* | |
97bf5e38 MK |
8140 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
8141 | ||
d45fe813 KB |
8142 | fi |
8143 | rm -f conftest* | |
8144 | fi | |
8145 | ||
97bf5e38 MK |
8146 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
8147 | cat >> confdefs.h <<\EOF | |
8148 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
8149 | EOF |
8150 | ||
97bf5e38 MK |
8151 | fi |
8152 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 8153 | |
97bf5e38 | 8154 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8155 | echo "configure:8156: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8156 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8157 | echo $ac_n "(cached) $ac_c" 1>&6 |
8158 | else | |
8159 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8160 | #line 8161 "configure" |
d45fe813 | 8161 | #include "confdefs.h" |
97bf5e38 MK |
8162 | |
8163 | #define _SYSCALL32 | |
8164 | #include <sys/procfs.h> | |
d45fe813 | 8165 | int main() { |
97bf5e38 | 8166 | prgregset32_t avar |
d45fe813 KB |
8167 | ; return 0; } |
8168 | EOF | |
e7c61be3 | 8169 | if { (eval echo configure:8170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8170 | rm -rf conftest* |
97bf5e38 | 8171 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
8172 | else |
8173 | echo "configure: failed program was:" >&5 | |
8174 | cat conftest.$ac_ext >&5 | |
8175 | rm -rf conftest* | |
97bf5e38 MK |
8176 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
8177 | ||
d45fe813 KB |
8178 | fi |
8179 | rm -f conftest* | |
8180 | fi | |
8181 | ||
97bf5e38 MK |
8182 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
8183 | cat >> confdefs.h <<\EOF | |
8184 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
8185 | EOF |
8186 | ||
97bf5e38 MK |
8187 | fi |
8188 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 8189 | |
97bf5e38 | 8190 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8191 | echo "configure:8192: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8192 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8193 | echo $ac_n "(cached) $ac_c" 1>&6 |
8194 | else | |
8195 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8196 | #line 8197 "configure" |
d45fe813 | 8197 | #include "confdefs.h" |
97bf5e38 MK |
8198 | |
8199 | #define _SYSCALL32 | |
8200 | #include <sys/procfs.h> | |
d45fe813 | 8201 | int main() { |
97bf5e38 | 8202 | prfpregset32_t avar |
d45fe813 KB |
8203 | ; return 0; } |
8204 | EOF | |
e7c61be3 | 8205 | if { (eval echo configure:8206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8206 | rm -rf conftest* |
97bf5e38 | 8207 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
8208 | else |
8209 | echo "configure: failed program was:" >&5 | |
8210 | cat conftest.$ac_ext >&5 | |
8211 | rm -rf conftest* | |
97bf5e38 MK |
8212 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
8213 | ||
d45fe813 KB |
8214 | fi |
8215 | rm -f conftest* | |
8216 | fi | |
8217 | ||
97bf5e38 MK |
8218 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
8219 | cat >> confdefs.h <<\EOF | |
8220 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
8221 | EOF |
8222 | ||
97bf5e38 MK |
8223 | fi |
8224 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 8225 | |
97bf5e38 | 8226 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8227 | echo "configure:8228: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 8228 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
8229 | echo $ac_n "(cached) $ac_c" 1>&6 |
8230 | else | |
8231 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8232 | #line 8233 "configure" |
d45fe813 | 8233 | #include "confdefs.h" |
97bf5e38 | 8234 | |
d45fe813 | 8235 | #define _SYSCALL32 |
97bf5e38 | 8236 | #include <sys/procfs.h> |
d45fe813 | 8237 | int main() { |
97bf5e38 | 8238 | lwpid_t avar |
d45fe813 KB |
8239 | ; return 0; } |
8240 | EOF | |
e7c61be3 | 8241 | if { (eval echo configure:8242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8242 | rm -rf conftest* |
97bf5e38 | 8243 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
8244 | else |
8245 | echo "configure: failed program was:" >&5 | |
8246 | cat conftest.$ac_ext >&5 | |
8247 | rm -rf conftest* | |
97bf5e38 MK |
8248 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
8249 | ||
d45fe813 KB |
8250 | fi |
8251 | rm -f conftest* | |
8252 | fi | |
8253 | ||
97bf5e38 MK |
8254 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
8255 | cat >> confdefs.h <<\EOF | |
8256 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
8257 | EOF |
8258 | ||
97bf5e38 MK |
8259 | fi |
8260 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 8261 | |
97bf5e38 | 8262 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8263 | echo "configure:8264: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 8264 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
8265 | echo $ac_n "(cached) $ac_c" 1>&6 |
8266 | else | |
8267 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8268 | #line 8269 "configure" |
c906108c SS |
8269 | #include "confdefs.h" |
8270 | ||
97bf5e38 MK |
8271 | #define _SYSCALL32 |
8272 | #include <sys/procfs.h> | |
c906108c | 8273 | int main() { |
97bf5e38 | 8274 | psaddr_t avar |
c906108c SS |
8275 | ; return 0; } |
8276 | EOF | |
e7c61be3 | 8277 | if { (eval echo configure:8278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8278 | rm -rf conftest* |
97bf5e38 | 8279 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
8280 | else |
8281 | echo "configure: failed program was:" >&5 | |
8282 | cat conftest.$ac_ext >&5 | |
8283 | rm -rf conftest* | |
97bf5e38 MK |
8284 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
8285 | ||
c906108c SS |
8286 | fi |
8287 | rm -f conftest* | |
8288 | fi | |
8289 | ||
97bf5e38 MK |
8290 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
8291 | cat >> confdefs.h <<\EOF | |
8292 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
8293 | EOF |
8294 | ||
97bf5e38 MK |
8295 | fi |
8296 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 8297 | |
97bf5e38 | 8298 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8299 | echo "configure:8300: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 8300 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 8301 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8302 | else |
8303 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8304 | #line 8305 "configure" |
c906108c SS |
8305 | #include "confdefs.h" |
8306 | ||
97bf5e38 MK |
8307 | #define _SYSCALL32 |
8308 | #include <sys/procfs.h> | |
8309 | int main() { | |
8310 | prsysent_t avar | |
8311 | ; return 0; } | |
c906108c | 8312 | EOF |
e7c61be3 | 8313 | if { (eval echo configure:8314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8314 | rm -rf conftest* |
8315 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
8316 | else |
8317 | echo "configure: failed program was:" >&5 | |
8318 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8319 | rm -rf conftest* |
8320 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
8321 | ||
c906108c | 8322 | fi |
97bf5e38 | 8323 | rm -f conftest* |
c906108c SS |
8324 | fi |
8325 | ||
97bf5e38 MK |
8326 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
8327 | cat >> confdefs.h <<\EOF | |
8328 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
8329 | EOF |
8330 | ||
97bf5e38 MK |
8331 | fi |
8332 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 8333 | |
97bf5e38 | 8334 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8335 | echo "configure:8336: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 8336 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
8337 | echo $ac_n "(cached) $ac_c" 1>&6 |
8338 | else | |
8339 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8340 | #line 8341 "configure" |
c906108c SS |
8341 | #include "confdefs.h" |
8342 | ||
97bf5e38 MK |
8343 | #define _SYSCALL32 |
8344 | #include <sys/procfs.h> | |
c906108c | 8345 | int main() { |
97bf5e38 | 8346 | pr_sigset_t avar |
c906108c SS |
8347 | ; return 0; } |
8348 | EOF | |
e7c61be3 | 8349 | if { (eval echo configure:8350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8350 | rm -rf conftest* |
97bf5e38 | 8351 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
8352 | else |
8353 | echo "configure: failed program was:" >&5 | |
8354 | cat conftest.$ac_ext >&5 | |
8355 | rm -rf conftest* | |
97bf5e38 MK |
8356 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
8357 | ||
c906108c SS |
8358 | fi |
8359 | rm -f conftest* | |
8360 | fi | |
8361 | ||
97bf5e38 MK |
8362 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
8363 | cat >> confdefs.h <<\EOF | |
8364 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
8365 | EOF |
8366 | ||
97bf5e38 MK |
8367 | fi |
8368 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 8369 | |
97bf5e38 | 8370 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
e7c61be3 | 8371 | echo "configure:8372: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 8372 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8373 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8374 | else |
8375 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8376 | #line 8377 "configure" |
c906108c SS |
8377 | #include "confdefs.h" |
8378 | ||
97bf5e38 MK |
8379 | #define _SYSCALL32 |
8380 | #include <sys/procfs.h> | |
8381 | int main() { | |
8382 | pr_sigaction64_t avar | |
8383 | ; return 0; } | |
c906108c | 8384 | EOF |
e7c61be3 | 8385 | if { (eval echo configure:8386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8386 | rm -rf conftest* |
8387 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8388 | else |
8389 | echo "configure: failed program was:" >&5 | |
8390 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8391 | rm -rf conftest* |
8392 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8393 | ||
c906108c | 8394 | fi |
97bf5e38 | 8395 | rm -f conftest* |
c906108c SS |
8396 | fi |
8397 | ||
97bf5e38 MK |
8398 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8399 | cat >> confdefs.h <<\EOF | |
8400 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8401 | EOF |
8402 | ||
97bf5e38 MK |
8403 | fi |
8404 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8405 | ||
8406 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
e7c61be3 | 8407 | echo "configure:8408: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8408 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8409 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8410 | else | |
8411 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8412 | #line 8413 "configure" |
97bf5e38 MK |
8413 | #include "confdefs.h" |
8414 | ||
8415 | #define _SYSCALL32 | |
8416 | #include <sys/procfs.h> | |
8417 | int main() { | |
8418 | pr_siginfo64_t avar | |
8419 | ; return 0; } | |
8420 | EOF | |
e7c61be3 | 8421 | if { (eval echo configure:8422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8422 | rm -rf conftest* |
8423 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8424 | else | |
8425 | echo "configure: failed program was:" >&5 | |
8426 | cat conftest.$ac_ext >&5 | |
8427 | rm -rf conftest* | |
8428 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8429 | ||
8430 | fi | |
8431 | rm -f conftest* | |
c906108c | 8432 | fi |
c906108c | 8433 | |
97bf5e38 MK |
8434 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8435 | cat >> confdefs.h <<\EOF | |
8436 | #define HAVE_PR_SIGINFO64_T 1 | |
8437 | EOF | |
c906108c | 8438 | |
97bf5e38 MK |
8439 | fi |
8440 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8441 | ||
8442 | ||
8443 | ||
8444 | ||
8445 | ||
8446 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8447 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
e7c61be3 | 8448 | echo "configure:8449: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8449 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8450 | echo $ac_n "(cached) $ac_c" 1>&6 |
8451 | else | |
8452 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8453 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8454 | else |
8455 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8456 | #line 8457 "configure" |
c906108c | 8457 | #include "confdefs.h" |
97bf5e38 MK |
8458 | #include <sys/procfs.h> |
8459 | int main () | |
8460 | { | |
8461 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8462 | return 1; | |
8463 | return 0; | |
8464 | } | |
c906108c | 8465 | EOF |
e7c61be3 | 8466 | if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8467 | then |
97bf5e38 | 8468 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8469 | else |
8470 | echo "configure: failed program was:" >&5 | |
8471 | cat conftest.$ac_ext >&5 | |
8472 | rm -fr conftest* | |
97bf5e38 | 8473 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8474 | fi |
8475 | rm -fr conftest* | |
8476 | fi | |
8477 | ||
8478 | fi | |
8479 | ||
97bf5e38 MK |
8480 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8481 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8482 | cat >> confdefs.h <<\EOF | |
8483 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8484 | EOF |
8485 | ||
97bf5e38 MK |
8486 | fi |
8487 | fi | |
c906108c | 8488 | |
97bf5e38 MK |
8489 | |
8490 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
e7c61be3 | 8491 | echo "configure:8492: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8492 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8493 | echo $ac_n "(cached) $ac_c" 1>&6 |
8494 | else | |
8495 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8496 | #line 8497 "configure" |
c906108c | 8497 | #include "confdefs.h" |
97bf5e38 MK |
8498 | #include <unistd.h> |
8499 | #include <sys/types.h> | |
8500 | #include <sys/procfs.h> | |
8501 | ||
8502 | int main() { | |
8503 | ||
8504 | int dummy;; | |
8505 | dummy = ioctl(0, PIOCSET, &dummy); | |
8506 | ||
8507 | ; return 0; } | |
c906108c | 8508 | EOF |
e7c61be3 | 8509 | if { (eval echo configure:8510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8510 | rm -rf conftest* |
97bf5e38 | 8511 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8512 | else |
c906108c SS |
8513 | echo "configure: failed program was:" >&5 |
8514 | cat conftest.$ac_ext >&5 | |
8515 | rm -rf conftest* | |
97bf5e38 | 8516 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8517 | fi |
8518 | rm -f conftest* | |
8519 | fi | |
97bf5e38 MK |
8520 | |
8521 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8522 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8523 | cat >> confdefs.h <<\EOF | |
8524 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8525 | EOF |
97bf5e38 MK |
8526 | |
8527 | fi | |
c906108c | 8528 | fi |
c906108c | 8529 | |
97bf5e38 MK |
8530 | if test ${host} = ${target} ; then |
8531 | ||
8532 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
e7c61be3 | 8533 | echo "configure:8534: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8534 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8535 | echo $ac_n "(cached) $ac_c" 1>&6 |
8536 | else | |
8537 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8538 | #line 8539 "configure" |
c906108c | 8539 | #include "confdefs.h" |
97bf5e38 | 8540 | #include <link.h> |
c906108c | 8541 | int main() { |
97bf5e38 | 8542 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8543 | ; return 0; } |
8544 | EOF | |
e7c61be3 | 8545 | if { (eval echo configure:8546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8546 | rm -rf conftest* |
97bf5e38 | 8547 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8548 | else |
8549 | echo "configure: failed program was:" >&5 | |
8550 | cat conftest.$ac_ext >&5 | |
8551 | rm -rf conftest* | |
97bf5e38 | 8552 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8553 | fi |
8554 | rm -f conftest* | |
8555 | fi | |
8556 | ||
97bf5e38 MK |
8557 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8558 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8559 | cat >> confdefs.h <<\EOF | |
8560 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8561 | EOF |
97bf5e38 MK |
8562 | |
8563 | fi | |
8564 | ||
8565 | ||
8566 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
e7c61be3 | 8567 | echo "configure:8568: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8568 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8569 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8570 | else |
97bf5e38 | 8571 | cat > conftest.$ac_ext <<EOF |
e7c61be3 | 8572 | #line 8573 "configure" |
97bf5e38 MK |
8573 | #include "confdefs.h" |
8574 | #include <sys/types.h> | |
8575 | #include <link.h> | |
8576 | int main() { | |
8577 | struct link_map lm; (void) lm.lm_addr; | |
8578 | ; return 0; } | |
8579 | EOF | |
e7c61be3 | 8580 | if { (eval echo configure:8581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8581 | rm -rf conftest* |
8582 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8583 | else | |
8584 | echo "configure: failed program was:" >&5 | |
8585 | cat conftest.$ac_ext >&5 | |
8586 | rm -rf conftest* | |
8587 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8588 | fi | |
8589 | rm -f conftest* | |
c906108c | 8590 | fi |
c906108c | 8591 | |
97bf5e38 MK |
8592 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8593 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8594 | cat >> confdefs.h <<\EOF | |
8595 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8596 | EOF | |
8597 | ||
8598 | fi | |
8599 | ||
8600 | ||
8601 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
e7c61be3 | 8602 | echo "configure:8603: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8603 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8604 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8605 | else |
8606 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8607 | #line 8608 "configure" |
c906108c | 8608 | #include "confdefs.h" |
97bf5e38 MK |
8609 | #include <sys/types.h> |
8610 | #ifdef HAVE_NLIST_H | |
8611 | #include <nlist.h> | |
8612 | #endif | |
8613 | #include <link.h> | |
8614 | int main() { | |
8615 | struct so_map lm; (void) lm.som_addr; | |
8616 | ; return 0; } | |
8617 | EOF | |
e7c61be3 | 8618 | if { (eval echo configure:8619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8619 | rm -rf conftest* |
8620 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8621 | else | |
8622 | echo "configure: failed program was:" >&5 | |
8623 | cat conftest.$ac_ext >&5 | |
8624 | rm -rf conftest* | |
8625 | gdb_cv_have_struct_so_map_with_som_members=no | |
8626 | fi | |
8627 | rm -f conftest* | |
8628 | fi | |
c906108c | 8629 | |
97bf5e38 MK |
8630 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8631 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8632 | cat >> confdefs.h <<\EOF | |
8633 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8634 | EOF | |
c906108c | 8635 | |
97bf5e38 | 8636 | fi |
c906108c | 8637 | |
97bf5e38 MK |
8638 | |
8639 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
e7c61be3 | 8640 | echo "configure:8641: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8641 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8643 | else | |
8644 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8645 | #line 8646 "configure" |
97bf5e38 MK |
8646 | #include "confdefs.h" |
8647 | #define _SYSCALL32 | |
8648 | #include <sys/link.h> | |
8649 | int main() { | |
8650 | struct link_map32 l; | |
8651 | ; return 0; } | |
8652 | EOF | |
e7c61be3 | 8653 | if { (eval echo configure:8654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8654 | rm -rf conftest* |
8655 | gdb_cv_have_struct_link_map32=yes | |
8656 | else | |
8657 | echo "configure: failed program was:" >&5 | |
8658 | cat conftest.$ac_ext >&5 | |
8659 | rm -rf conftest* | |
8660 | gdb_cv_have_struct_link_map32=no | |
8661 | fi | |
8662 | rm -f conftest* | |
8663 | fi | |
c906108c | 8664 | |
97bf5e38 MK |
8665 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8666 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8667 | cat >> confdefs.h <<\EOF | |
8668 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8669 | EOF | |
c906108c | 8670 | |
97bf5e38 MK |
8671 | cat >> confdefs.h <<\EOF |
8672 | #define _SYSCALL32 1 | |
8673 | EOF | |
c906108c | 8674 | |
97bf5e38 MK |
8675 | fi |
8676 | fi | |
c906108c | 8677 | |
c906108c | 8678 | |
97bf5e38 | 8679 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
e7c61be3 | 8680 | echo "configure:8681: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8681 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8682 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8683 | else | |
8684 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8685 | #line 8686 "configure" |
97bf5e38 | 8686 | #include "confdefs.h" |
c906108c | 8687 | |
97bf5e38 | 8688 | int main() { |
c906108c | 8689 | |
97bf5e38 MK |
8690 | extern long long foo; |
8691 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8692 | |
97bf5e38 MK |
8693 | ; return 0; } |
8694 | EOF | |
e7c61be3 | 8695 | if { (eval echo configure:8696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8696 | rm -rf conftest* |
8697 | gdb_cv_c_long_long=yes | |
8698 | else | |
8699 | echo "configure: failed program was:" >&5 | |
8700 | cat conftest.$ac_ext >&5 | |
8701 | rm -rf conftest* | |
8702 | gdb_cv_c_long_long=no | |
8703 | fi | |
8704 | rm -f conftest* | |
8705 | fi | |
c906108c | 8706 | |
97bf5e38 MK |
8707 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8708 | if test $gdb_cv_c_long_long = yes; then | |
8709 | cat >> confdefs.h <<\EOF | |
8710 | #define CC_HAS_LONG_LONG 1 | |
8711 | EOF | |
8712 | ||
8713 | fi | |
8714 | ||
8715 | ||
8716 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
e7c61be3 | 8717 | echo "configure:8718: checking for long long support in printf" >&5 |
97bf5e38 MK |
8718 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8719 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8720 | else | |
8721 | if test "$cross_compiling" = yes; then | |
8722 | gdb_cv_printf_has_long_long=no | |
8723 | else | |
8724 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8725 | #line 8726 "configure" |
97bf5e38 MK |
8726 | #include "confdefs.h" |
8727 | ||
8728 | int main () { | |
8729 | char buf[32]; | |
8730 | long long l = 0; | |
8731 | l = (l << 16) + 0x0123; | |
8732 | l = (l << 16) + 0x4567; | |
8733 | l = (l << 16) + 0x89ab; | |
8734 | l = (l << 16) + 0xcdef; | |
8735 | sprintf (buf, "0x%016llx", l); | |
8736 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8737 | } |
97bf5e38 | 8738 | EOF |
e7c61be3 | 8739 | if { (eval echo configure:8740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8740 | then |
8741 | gdb_cv_printf_has_long_long=yes | |
8742 | else | |
8743 | echo "configure: failed program was:" >&5 | |
8744 | cat conftest.$ac_ext >&5 | |
8745 | rm -fr conftest* | |
8746 | gdb_cv_printf_has_long_long=no | |
8747 | fi | |
8748 | rm -fr conftest* | |
8749 | fi | |
8750 | ||
8751 | fi | |
8752 | ||
8753 | if test $gdb_cv_printf_has_long_long = yes; then | |
8754 | cat >> confdefs.h <<\EOF | |
8755 | #define PRINTF_HAS_LONG_LONG 1 | |
8756 | EOF | |
8757 | ||
8758 | fi | |
8759 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8760 | ||
8761 | ||
8762 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
e7c61be3 | 8763 | echo "configure:8764: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8764 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8766 | else | |
8767 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8768 | #line 8769 "configure" |
97bf5e38 MK |
8769 | #include "confdefs.h" |
8770 | ||
8771 | int main() { | |
8772 | long double foo; | |
8773 | ; return 0; } | |
8774 | EOF | |
e7c61be3 | 8775 | if { (eval echo configure:8776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8776 | rm -rf conftest* |
8777 | ac_cv_c_long_double=yes | |
8778 | else | |
8779 | echo "configure: failed program was:" >&5 | |
8780 | cat conftest.$ac_ext >&5 | |
8781 | rm -rf conftest* | |
8782 | ac_cv_c_long_double=no | |
8783 | fi | |
8784 | rm -f conftest* | |
8785 | fi | |
c906108c | 8786 | |
97bf5e38 MK |
8787 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8788 | if test $ac_cv_c_long_double = yes; then | |
8789 | cat >> confdefs.h <<\EOF | |
8790 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8791 | EOF |
97bf5e38 MK |
8792 | |
8793 | fi | |
8794 | ||
8795 | ||
8796 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
e7c61be3 | 8797 | echo "configure:8798: checking for long double support in printf" >&5 |
97bf5e38 MK |
8798 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8799 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8800 | else | |
8801 | if test "$cross_compiling" = yes; then | |
8802 | gdb_cv_printf_has_long_double=no | |
8803 | else | |
8804 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8805 | #line 8806 "configure" |
97bf5e38 MK |
8806 | #include "confdefs.h" |
8807 | ||
8808 | int main () { | |
8809 | char buf[16]; | |
8810 | long double f = 3.141592653; | |
8811 | sprintf (buf, "%Lg", f); | |
8812 | return (strncmp ("3.14159", buf, 7)); | |
8813 | } | |
8814 | EOF | |
e7c61be3 | 8815 | if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8816 | then |
97bf5e38 | 8817 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8818 | else |
8819 | echo "configure: failed program was:" >&5 | |
8820 | cat conftest.$ac_ext >&5 | |
8821 | rm -fr conftest* | |
97bf5e38 | 8822 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8823 | fi |
8824 | rm -fr conftest* | |
8825 | fi | |
8826 | ||
8827 | fi | |
8828 | ||
97bf5e38 | 8829 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8830 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8831 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8832 | EOF | |
8833 | ||
8834 | fi | |
8835 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8836 | ||
8837 | ||
8838 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
e7c61be3 | 8839 | echo "configure:8840: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8840 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8841 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8842 | else | |
8843 | if test "$cross_compiling" = yes; then | |
8844 | gdb_cv_scanf_has_long_double=no | |
8845 | else | |
8846 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8847 | #line 8848 "configure" |
97bf5e38 MK |
8848 | #include "confdefs.h" |
8849 | ||
8850 | int main () { | |
8851 | char *buf = "3.141592653"; | |
8852 | long double f = 0; | |
8853 | sscanf (buf, "%Lg", &f); | |
8854 | return !(f > 3.14159 && f < 3.14160); | |
8855 | } | |
c906108c | 8856 | EOF |
e7c61be3 | 8857 | if { (eval echo configure:8858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8858 | then |
8859 | gdb_cv_scanf_has_long_double=yes | |
8860 | else | |
8861 | echo "configure: failed program was:" >&5 | |
8862 | cat conftest.$ac_ext >&5 | |
8863 | rm -fr conftest* | |
8864 | gdb_cv_scanf_has_long_double=no | |
8865 | fi | |
8866 | rm -fr conftest* | |
8867 | fi | |
c906108c SS |
8868 | |
8869 | fi | |
8870 | ||
97bf5e38 MK |
8871 | if test $gdb_cv_scanf_has_long_double = yes; then |
8872 | cat >> confdefs.h <<\EOF | |
8873 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8874 | EOF | |
8875 | ||
8876 | fi | |
8877 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8878 | |
438013df AO |
8879 | case ${host_os} in |
8880 | aix*) | |
8881 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
e7c61be3 | 8882 | echo "configure:8883: checking for -bbigtoc option" >&5 |
438013df AO |
8883 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8884 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8885 | else | |
8886 | ||
8887 | SAVE_LDFLAGS=$LDFLAGS | |
8888 | ||
8889 | case $GCC in | |
8890 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8891 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8892 | esac | |
8893 | ||
8894 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8895 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8896 | #line 8897 "configure" |
438013df AO |
8897 | #include "confdefs.h" |
8898 | ||
8899 | int main() { | |
8900 | int i; | |
8901 | ; return 0; } | |
8902 | EOF | |
e7c61be3 | 8903 | if { (eval echo configure:8904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8904 | : |
8905 | else | |
8906 | echo "configure: failed program was:" >&5 | |
8907 | cat conftest.$ac_ext >&5 | |
8908 | rm -rf conftest* | |
8909 | gdb_cv_bigtoc= | |
8910 | fi | |
8911 | rm -f conftest* | |
8912 | ||
8913 | fi | |
8914 | ||
8915 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8916 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8917 | ;; | |
8918 | esac | |
8919 | ||
c906108c SS |
8920 | |
8921 | ||
8922 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8923 | case ${host_os} in | |
8924 | hpux*) | |
8925 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
e7c61be3 | 8926 | echo "configure:8927: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8927 | if test -f /usr/include/dce/cma_config.h ; then |
8928 | if test "$GCC" = "yes" ; then | |
8929 | echo "$ac_t""yes" 1>&6 | |
8930 | cat >> confdefs.h <<\EOF | |
8931 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8932 | EOF | |
8933 | ||
66b965bb | 8934 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8935 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8936 | else | |
8937 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8938 | fi | |
8939 | else | |
8940 | echo "$ac_t""no" 1>&6 | |
8941 | fi | |
8942 | ;; | |
8943 | solaris*) | |
d92419e5 JB |
8944 | # See if thread_db library is around for Solaris thread debugging. |
8945 | # Note that we must explicitly test for version 1 of the library | |
8946 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8947 | # the same API. | |
c906108c | 8948 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
e7c61be3 | 8949 | echo "configure:8950: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8950 | if test -f /usr/lib/libthread_db.so.1 ; then |
8951 | echo "$ac_t""yes" 1>&6 | |
8952 | cat >> confdefs.h <<\EOF | |
8953 | #define HAVE_THREAD_DB_LIB 1 | |
8954 | EOF | |
8955 | ||
66b965bb | 8956 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8957 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8958 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
e7c61be3 | 8959 | echo "configure:8960: checking for dlopen in -ldl" >&5 |
c906108c SS |
8960 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8961 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8962 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8963 | else | |
8964 | ac_save_LIBS="$LIBS" | |
8965 | LIBS="-ldl $LIBS" | |
8966 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 8967 | #line 8968 "configure" |
c906108c SS |
8968 | #include "confdefs.h" |
8969 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8970 | /* We use char because int might match the return type of a gcc2 | |
8971 | builtin and then its argument prototype would still apply. */ | |
8972 | char dlopen(); | |
8973 | ||
8974 | int main() { | |
8975 | dlopen() | |
8976 | ; return 0; } | |
8977 | EOF | |
e7c61be3 | 8978 | if { (eval echo configure:8979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8979 | rm -rf conftest* |
8980 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8981 | else | |
8982 | echo "configure: failed program was:" >&5 | |
8983 | cat conftest.$ac_ext >&5 | |
8984 | rm -rf conftest* | |
8985 | eval "ac_cv_lib_$ac_lib_var=no" | |
8986 | fi | |
8987 | rm -f conftest* | |
8988 | LIBS="$ac_save_LIBS" | |
8989 | ||
8990 | fi | |
8991 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8992 | echo "$ac_t""yes" 1>&6 | |
8993 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8994 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8995 | cat >> confdefs.h <<EOF | |
8996 | #define $ac_tr_lib 1 | |
8997 | EOF | |
8998 | ||
8999 | LIBS="-ldl $LIBS" | |
9000 | ||
9001 | else | |
9002 | echo "$ac_t""no" 1>&6 | |
9003 | fi | |
9004 | ||
9005 | if test "$GCC" = "yes" ; then | |
9006 | # The GNU linker requires the -export-dynamic option to make | |
9007 | # all symbols visible in the dynamic symbol table. | |
9008 | hold_ldflags=$LDFLAGS | |
9009 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
e7c61be3 | 9010 | echo "configure:9011: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
9011 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
9012 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9013 | #line 9014 "configure" |
c906108c SS |
9014 | #include "confdefs.h" |
9015 | ||
9016 | int main() { | |
9017 | int i; | |
9018 | ; return 0; } | |
9019 | EOF | |
e7c61be3 | 9020 | if { (eval echo configure:9021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9021 | rm -rf conftest* |
9022 | found=yes | |
9023 | else | |
9024 | echo "configure: failed program was:" >&5 | |
9025 | cat conftest.$ac_ext >&5 | |
9026 | rm -rf conftest* | |
9027 | found=no | |
9028 | fi | |
9029 | rm -f conftest* | |
9030 | LDFLAGS=$hold_ldflags | |
9031 | echo "$ac_t""$found" 1>&6 | |
9032 | if test $found = yes; then | |
9033 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
9034 | fi | |
9035 | fi | |
9036 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
9037 | # at one point. | |
9038 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
e7c61be3 | 9039 | echo "configure:9040: checking if <proc_service.h> is old" >&5 |
c906108c SS |
9040 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
9041 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9042 | else | |
9043 | ||
9044 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9045 | #line 9046 "configure" |
c906108c SS |
9046 | #include "confdefs.h" |
9047 | ||
9048 | #include <proc_service.h> | |
9049 | ps_err_e ps_pdwrite | |
9050 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
9051 | ||
9052 | int main() { | |
9053 | ||
9054 | ; return 0; } | |
9055 | EOF | |
e7c61be3 | 9056 | if { (eval echo configure:9057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9057 | rm -rf conftest* |
9058 | gdb_cv_proc_service_is_old=no | |
9059 | else | |
9060 | echo "configure: failed program was:" >&5 | |
9061 | cat conftest.$ac_ext >&5 | |
9062 | rm -rf conftest* | |
9063 | gdb_cv_proc_service_is_old=yes | |
9064 | fi | |
9065 | rm -f conftest* | |
9066 | ||
9067 | fi | |
9068 | ||
9069 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
9070 | if test $gdb_cv_proc_service_is_old = yes; then | |
9071 | cat >> confdefs.h <<\EOF | |
9072 | #define PROC_SERVICE_IS_OLD 1 | |
9073 | EOF | |
9074 | ||
9075 | fi | |
9076 | else | |
9077 | echo "$ac_t""no" 1>&6 | |
9078 | fi | |
9079 | ;; | |
d92419e5 JB |
9080 | aix*) |
9081 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
e7c61be3 | 9082 | echo "configure:9083: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
9083 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
9084 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9085 | else | |
9086 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9087 | #line 9088 "configure" |
d92419e5 JB |
9088 | #include "confdefs.h" |
9089 | #include <sys/pthdebug.h> | |
9090 | int main() { | |
9091 | #ifndef PTHDB_VERSION_3 | |
9092 | #error | |
9093 | #endif | |
9094 | ; return 0; } | |
9095 | EOF | |
e7c61be3 | 9096 | if { (eval echo configure:9097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
9097 | rm -rf conftest* |
9098 | gdb_cv_have_aix_thread_debug=yes | |
9099 | else | |
9100 | echo "configure: failed program was:" >&5 | |
9101 | cat conftest.$ac_ext >&5 | |
9102 | rm -rf conftest* | |
9103 | gdb_cv_have_aix_thread_debug=no | |
9104 | fi | |
9105 | rm -f conftest* | |
9106 | fi | |
9107 | ||
9108 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
9109 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
9110 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
9111 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
9112 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
9113 | fi | |
9114 | ;; | |
c906108c SS |
9115 | esac |
9116 | ||
9117 | fi | |
9118 | ||
3f47be5c EZ |
9119 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
9120 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
e7c61be3 | 9121 | echo "configure:9122: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
9122 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
9123 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9124 | else | |
9125 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9126 | #line 9127 "configure" |
3f47be5c EZ |
9127 | #include "confdefs.h" |
9128 | #include <thread_db.h> | |
9129 | int main() { | |
9130 | int i = TD_NOTALLOC; | |
9131 | ; return 0; } | |
9132 | EOF | |
e7c61be3 | 9133 | if { (eval echo configure:9134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
9134 | rm -rf conftest* |
9135 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
9136 | else | |
9137 | echo "configure: failed program was:" >&5 | |
9138 | cat conftest.$ac_ext >&5 | |
9139 | rm -rf conftest* | |
9140 | gdb_cv_thread_db_h_has_td_notalloc=no | |
9141 | ||
9142 | fi | |
9143 | rm -f conftest* | |
9144 | ||
9145 | fi | |
9146 | ||
9147 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
9148 | fi | |
9149 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
9150 | cat >> confdefs.h <<\EOF | |
9151 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
9152 | EOF | |
9153 | ||
9154 | fi | |
9155 | ||
b757528f JJ |
9156 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
9157 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
e7c61be3 | 9158 | echo "configure:9159: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
9159 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
9160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9161 | else | |
9162 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9163 | #line 9164 "configure" |
b757528f JJ |
9164 | #include "confdefs.h" |
9165 | #include <sys/syscall.h> | |
9166 | int main() { | |
9167 | int i = __NR_tkill; | |
9168 | ; return 0; } | |
9169 | EOF | |
e7c61be3 | 9170 | if { (eval echo configure:9171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
9171 | rm -rf conftest* |
9172 | gdb_cv_sys_syscall_h_has_tkill=yes | |
9173 | else | |
9174 | echo "configure: failed program was:" >&5 | |
9175 | cat conftest.$ac_ext >&5 | |
9176 | rm -rf conftest* | |
9177 | gdb_cv_sys_syscall_h_has_tkill=no | |
9178 | ||
9179 | fi | |
9180 | rm -f conftest* | |
9181 | ||
9182 | fi | |
9183 | ||
9184 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
9185 | fi | |
9186 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
9187 | cat >> confdefs.h <<\EOF | |
9188 | #define HAVE_TKILL_SYSCALL 1 | |
9189 | EOF | |
9190 | ||
9191 | fi | |
9192 | ||
fb40c209 | 9193 | |
030292b7 DJ |
9194 | # Check whether --with-sysroot or --without-sysroot was given. |
9195 | if test "${with_sysroot+set}" = set; then | |
9196 | withval="$with_sysroot" | |
9197 | ||
9198 | case ${with_sysroot} in | |
715d1656 | 9199 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
9200 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
9201 | esac | |
9202 | ||
9203 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
9204 | ||
9205 | if test "x$exec_prefix" = xNONE; then | |
9206 | if test "x$prefix" = xNONE; then | |
9207 | test_prefix=/usr/local | |
9208 | else | |
9209 | test_prefix=$prefix | |
9210 | fi | |
9211 | else | |
9212 | test_prefix=$exec_prefix | |
9213 | fi | |
9214 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
9215 | "${test_prefix}"|"${test_prefix}/"*|\ |
9216 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
9217 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
9218 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
9219 | ;; | |
9220 | esac | |
9221 | ||
9222 | else | |
9223 | ||
9224 | TARGET_SYSTEM_ROOT= | |
9225 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
9226 | ||
9227 | fi | |
9228 | ||
9229 | ||
9230 | ||
9231 | ||
3b851bce AC |
9232 | # NOTE: Don't add -Wall or -Wunused, they both include |
9233 | # -Wunused-parameter which reports bogus warnings. | |
9234 | # NOTE: If you add to this list, remember to update | |
9235 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 9236 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
0f0cffd2 AC |
9237 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \ |
9238 | -Wunused-label" | |
d8038014 | 9239 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
0f0cffd2 | 9240 | # -Wunused-function -Wunused-variable -Wunused-value |
93d56215 | 9241 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
9242 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
9243 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
9244 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
9245 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
9246 | if test "${enable_build_warnings+set}" = set; then | |
9247 | enableval="$enable_build_warnings" | |
1decb323 | 9248 | case "${enableval}" in |
c906108c SS |
9249 | yes) ;; |
9250 | no) build_warnings="-w";; | |
9251 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9252 | build_warnings="${build_warnings} ${t}";; | |
9253 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9254 | build_warnings="${t} ${build_warnings}";; | |
9255 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9256 | esac | |
d4f3574e | 9257 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 9258 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 9259 | fi |
1decb323 | 9260 | fi |
3b851bce AC |
9261 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
9262 | if test "${enable_gdb_build_warnings+set}" = set; then | |
9263 | enableval="$enable_gdb_build_warnings" | |
9264 | case "${enableval}" in | |
9265 | yes) ;; | |
9266 | no) build_warnings="-w";; | |
9267 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9268 | build_warnings="${build_warnings} ${t}";; | |
9269 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9270 | build_warnings="${t} ${build_warnings}";; | |
9271 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9272 | esac | |
9273 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9274 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9275 | fi | |
9276 | fi | |
104c1213 JM |
9277 | WARN_CFLAGS="" |
9278 | WERROR_CFLAGS="" | |
c906108c SS |
9279 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
9280 | then | |
746a987d | 9281 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
e7c61be3 | 9282 | echo "configure:9283: checking compiler warning flags" >&5 |
746a987d AC |
9283 | # Separate out the -Werror flag as some files just cannot be |
9284 | # compiled with it enabled. | |
9285 | for w in ${build_warnings}; do | |
9286 | case $w in | |
9287 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
9288 | *) # Check that GCC accepts it | |
4536bbc6 AC |
9289 | saved_CFLAGS="$CFLAGS" |
9290 | CFLAGS="$CFLAGS $w" | |
9291 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9292 | #line 9293 "configure" |
4536bbc6 AC |
9293 | #include "confdefs.h" |
9294 | ||
9295 | int main() { | |
9296 | ||
9297 | ; return 0; } | |
9298 | EOF | |
e7c61be3 | 9299 | if { (eval echo configure:9300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
9300 | rm -rf conftest* |
9301 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9302 | else | |
9303 | echo "configure: failed program was:" >&5 | |
9304 | cat conftest.$ac_ext >&5 | |
9305 | fi | |
9306 | rm -f conftest* | |
9307 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
9308 | esac |
9309 | done | |
9310 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
9311 | fi |
9312 | ||
9313 | ||
104c1213 | 9314 | |
7a292a7a SS |
9315 | # In the Cygwin environment, we need some additional flags. |
9316 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
e7c61be3 | 9317 | echo "configure:9318: checking for cygwin" >&5 |
7a292a7a SS |
9318 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9319 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9320 | else | |
9321 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9322 | #line 9323 "configure" |
7a292a7a SS |
9323 | #include "confdefs.h" |
9324 | ||
9325 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
9326 | lose | |
9327 | #endif | |
9328 | EOF | |
9329 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9330 | egrep "lose" >/dev/null 2>&1; then | |
9331 | rm -rf conftest* | |
9332 | gdb_cv_os_cygwin=yes | |
9333 | else | |
9334 | rm -rf conftest* | |
9335 | gdb_cv_os_cygwin=no | |
9336 | fi | |
9337 | rm -f conftest* | |
9338 | ||
9339 | fi | |
9340 | ||
9341 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
9342 | ||
aff38e61 AC |
9343 | |
9344 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9345 | case ${host} in | |
95cbc983 AC |
9346 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9347 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9348 | esac |
9349 | ||
9350 | ||
cd0fc7c3 SS |
9351 | # libreadline needs libuser32.a in a cygwin environment |
9352 | WIN32LIBS= | |
9353 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9354 | WIN32LIBS="-luser32" |
9355 | case "${target}" in | |
9356 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9357 | ;; | |
9358 | esac | |
cd0fc7c3 | 9359 | fi |
c906108c | 9360 | |
7a292a7a | 9361 | |
3fc11d3e JM |
9362 | LIBGUI="../libgui/src/libgui.a" |
9363 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9364 | ||
9365 | ||
7a292a7a | 9366 | |
3fc11d3e JM |
9367 | WIN32LDAPP= |
9368 | ||
9369 | ||
9370 | ||
9371 | configdir="unix" | |
9372 | ||
9373 | GDBTKLIBS= | |
9374 | if test "${enable_gdbtk}" = "yes"; then | |
9375 | ||
d1c3b63a KS |
9376 | # Gdbtk must have an absolute path to srcdir in order to run |
9377 | # properly when not installed. | |
9378 | here=`pwd` | |
9379 | cd ${srcdir} | |
9380 | GDBTK_SRC_DIR=`pwd` | |
9381 | cd $here | |
9382 | ||
3fc11d3e JM |
9383 | |
9384 | # | |
9385 | # Ok, lets find the tcl configuration | |
9386 | # First, look for one uninstalled. | |
9387 | # the alternative search directory is invoked by --with-tclconfig | |
9388 | # | |
9389 | ||
9390 | if test x"${no_tcl}" = x ; then | |
9391 | # we reset no_tcl in case something fails here | |
9392 | no_tcl=true | |
9393 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9394 | if test "${with_tclconfig+set}" = set; then | |
9395 | withval="$with_tclconfig" | |
9396 | with_tclconfig=${withval} | |
9397 | fi | |
9398 | ||
9399 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
e7c61be3 | 9400 | echo "configure:9401: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9401 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9402 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9403 | else | |
9404 | ||
9405 | ||
9406 | # First check to see if --with-tclconfig was specified. | |
9407 | if test x"${with_tclconfig}" != x ; then | |
9408 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9409 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9410 | else | |
9411 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9412 | fi | |
9413 | fi | |
9414 | ||
9415 | # then check for a private Tcl installation | |
9416 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9417 | for i in \ | |
9418 | ../tcl \ | |
9419 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9420 | ../../tcl \ | |
9421 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9422 | ../../../tcl \ | |
9423 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9424 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9425 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9426 | break | |
9427 | fi | |
9428 | done | |
9429 | fi | |
9430 | # check in a few common install locations | |
9431 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9432 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9433 | if test -f "$i/tclConfig.sh" ; then | |
9434 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9435 | break | |
9436 | fi | |
9437 | done | |
9438 | fi | |
9439 | # check in a few other private locations | |
9440 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9441 | for i in \ | |
9442 | ${srcdir}/../tcl \ | |
9443 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9444 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9445 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9446 | break | |
9447 | fi | |
9448 | done | |
9449 | fi | |
9450 | ||
9451 | fi | |
9452 | ||
9453 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9454 | TCLCONFIG="# no Tcl configs found" | |
9455 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9456 | else | |
9457 | no_tcl= | |
9458 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9459 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9460 | fi | |
9461 | fi | |
9462 | ||
9463 | if test -z "${no_tcl}"; then | |
9464 | ||
9465 | . $TCLCONFIG | |
9466 | ||
9467 | ||
9468 | ||
9469 | ||
9470 | ||
9471 | ||
9472 | ||
9473 | ||
9474 | ||
9475 | ||
9476 | ||
9477 | ||
9478 | ||
9479 | ||
9480 | ||
9481 | ||
9482 | ||
9483 | ||
9484 | ||
9485 | ||
033afc63 | 9486 | |
3fc11d3e JM |
9487 | |
9488 | ||
9489 | ||
9490 | ||
9491 | ||
9492 | ||
9493 | # | |
9494 | # Ok, lets find the tk configuration | |
9495 | # First, look for one uninstalled. | |
9496 | # the alternative search directory is invoked by --with-tkconfig | |
9497 | # | |
9498 | ||
9499 | if test x"${no_tk}" = x ; then | |
9500 | # we reset no_tk in case something fails here | |
9501 | no_tk=true | |
9502 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9503 | if test "${with_tkconfig+set}" = set; then | |
9504 | withval="$with_tkconfig" | |
9505 | with_tkconfig=${withval} | |
9506 | fi | |
9507 | ||
9508 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
e7c61be3 | 9509 | echo "configure:9510: checking for Tk configuration" >&5 |
3fc11d3e JM |
9510 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9512 | else | |
9513 | ||
9514 | ||
9515 | # First check to see if --with-tkconfig was specified. | |
9516 | if test x"${with_tkconfig}" != x ; then | |
9517 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9518 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9519 | else | |
9520 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9521 | fi | |
9522 | fi | |
9523 | ||
9524 | # then check for a private Tk library | |
9525 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9526 | for i in \ | |
9527 | ../tk \ | |
9528 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9529 | ../../tk \ | |
9530 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9531 | ../../../tk \ | |
9532 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9533 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9534 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9535 | break | |
9536 | fi | |
9537 | done | |
9538 | fi | |
9539 | # check in a few common install locations | |
9540 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9541 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9542 | if test -f "$i/tkConfig.sh" ; then | |
9543 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9544 | break | |
9545 | fi | |
9546 | done | |
9547 | fi | |
9548 | # check in a few other private locations | |
9549 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9550 | for i in \ | |
9551 | ${srcdir}/../tk \ | |
9552 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9553 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9554 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9555 | break | |
9556 | fi | |
9557 | done | |
9558 | fi | |
9559 | ||
9560 | fi | |
9561 | ||
9562 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9563 | TKCONFIG="# no Tk configs found" | |
9564 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9565 | else | |
9566 | no_tk= | |
9567 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9568 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9569 | fi | |
9570 | fi | |
9571 | ||
9572 | ||
9573 | ||
dd2504ab JM |
9574 | # now look for Tcl library stuff |
9575 | ||
9576 | case "${host}" in | |
9577 | *-*-cygwin*) | |
9578 | tcldir=../tcl/win/ | |
9579 | ;; | |
9580 | *) | |
9581 | tcldir=../tcl/unix/ | |
9582 | ;; | |
9583 | esac | |
9584 | ||
9585 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9586 | ||
3fc11d3e JM |
9587 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9588 | # point to doing Tcl. | |
9589 | if test -z "${no_tk}"; then | |
9590 | ||
9591 | if test -f "$TKCONFIG" ; then | |
9592 | . $TKCONFIG | |
9593 | fi | |
9594 | ||
9595 | ||
9596 | ||
9597 | ||
9598 | ||
9599 | ||
9600 | ||
9601 | ||
9602 | ||
9603 | ||
9604 | ||
9605 | ||
9606 | ||
9607 | ||
9608 | # | |
9609 | # Ok, lets find the tcl source trees so we can use the headers | |
9610 | # Warning: transition of version 9 to 10 will break this algorithm | |
9611 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9612 | # be careful that we don't match stuff like tclX by accident. | |
9613 | # the alternative search directory is involked by --with-tclinclude | |
9614 | # | |
9615 | ||
9616 | no_tcl=true | |
9617 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
e7c61be3 | 9618 | echo "configure:9619: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9619 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9620 | if test "${with_tclinclude+set}" = set; then | |
9621 | withval="$with_tclinclude" | |
9622 | with_tclinclude=${withval} | |
9623 | fi | |
9624 | ||
9625 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9626 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9627 | else | |
9628 | ||
9629 | # first check to see if --with-tclinclude was specified | |
9630 | if test x"${with_tclinclude}" != x ; then | |
9631 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9632 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9633 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9634 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9635 | else | |
9636 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9637 | fi | |
9638 | fi | |
9639 | ||
9640 | # next check if it came with Tcl configuration file | |
9641 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9642 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9643 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9644 | fi | |
9645 | fi | |
9646 | ||
9647 | # next check in private source directory | |
9648 | # | |
9649 | # since ls returns lowest version numbers first, reverse its output | |
9650 | if test x"${ac_cv_c_tclh}" = x ; then | |
9651 | for i in \ | |
9652 | ${srcdir}/../tcl \ | |
9653 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9654 | ${srcdir}/../../tcl \ | |
9655 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9656 | ${srcdir}/../../../tcl \ | |
9657 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9658 | if test -f $i/generic/tclInt.h ; then | |
9659 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9660 | break | |
9661 | fi | |
9662 | done | |
9663 | fi | |
9664 | # finally check in a few common install locations | |
9665 | # | |
9666 | # since ls returns lowest version numbers first, reverse its output | |
9667 | if test x"${ac_cv_c_tclh}" = x ; then | |
9668 | for i in \ | |
9669 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9670 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9671 | /usr/local/src/tcl \ | |
9672 | /usr/local/lib/tcl \ | |
9673 | ${prefix}/include ; 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 | # see if one is installed | |
9681 | if test x"${ac_cv_c_tclh}" = x ; then | |
9682 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9683 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
e7c61be3 | 9684 | echo "configure:9685: checking for tclInt.h" >&5 |
3fc11d3e JM |
9685 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9687 | else | |
9688 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9689 | #line 9690 "configure" |
3fc11d3e JM |
9690 | #include "confdefs.h" |
9691 | #include <tclInt.h> | |
9692 | EOF | |
9693 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 9694 | { (eval echo configure:9695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9695 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9696 | if test -z "$ac_err"; then | |
9697 | rm -rf conftest* | |
9698 | eval "ac_cv_header_$ac_safe=yes" | |
9699 | else | |
9700 | echo "$ac_err" >&5 | |
9701 | echo "configure: failed program was:" >&5 | |
9702 | cat conftest.$ac_ext >&5 | |
9703 | rm -rf conftest* | |
9704 | eval "ac_cv_header_$ac_safe=no" | |
9705 | fi | |
9706 | rm -f conftest* | |
9707 | fi | |
9708 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9709 | echo "$ac_t""yes" 1>&6 | |
9710 | ac_cv_c_tclh=installed | |
9711 | else | |
9712 | echo "$ac_t""no" 1>&6 | |
9713 | ac_cv_c_tclh="" | |
9714 | fi | |
9715 | ||
9716 | fi | |
9717 | ||
9718 | fi | |
9719 | ||
9720 | if test x"${ac_cv_c_tclh}" = x ; then | |
9721 | TCLHDIR="# no Tcl private headers found" | |
9722 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9723 | fi | |
9724 | if test x"${ac_cv_c_tclh}" != x ; then | |
9725 | no_tcl="" | |
9726 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9727 | echo "$ac_t""is installed" 1>&6 | |
9728 | TCLHDIR="" | |
9729 | else | |
9730 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9731 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9732 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9733 | fi | |
9734 | fi | |
9735 | ||
9736 | ||
9737 | ||
9738 | ||
9739 | # | |
9740 | # Ok, lets find the tk source trees so we can use the headers | |
9741 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9742 | # in preference to any others. Same logic is used when choosing library | |
9743 | # and again with Tcl. The search order is the best place to look first, then in | |
9744 | # decreasing significance. The loop breaks if the trigger file is found. | |
9745 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9746 | # directory. This converts the path from a relative to an absolute, so | |
9747 | # recursive cache variables for the path will work right. We check all | |
9748 | # the possible paths in one loop rather than many seperate loops to speed | |
9749 | # things up. | |
9750 | # the alternative search directory is involked by --with-tkinclude | |
9751 | # | |
9752 | no_tk=true | |
9753 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
e7c61be3 | 9754 | echo "configure:9755: checking for Tk private headers" >&5 |
3fc11d3e JM |
9755 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9756 | if test "${with_tkinclude+set}" = set; then | |
9757 | withval="$with_tkinclude" | |
9758 | with_tkinclude=${withval} | |
9759 | fi | |
9760 | ||
9761 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9762 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9763 | else | |
9764 | ||
9765 | # first check to see if --with-tkinclude was specified | |
9766 | if test x"${with_tkinclude}" != x ; then | |
9767 | if test -f ${with_tkinclude}/tk.h ; then | |
9768 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9769 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9770 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9771 | else | |
9772 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9773 | fi | |
9774 | fi | |
9775 | ||
9776 | # next check if it came with Tk configuration file | |
9777 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9778 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9779 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9780 | fi | |
9781 | fi | |
9782 | ||
9783 | # next check in private source directory | |
9784 | # | |
9785 | # since ls returns lowest version numbers first, reverse its output | |
9786 | if test x"${ac_cv_c_tkh}" = x ; then | |
9787 | for i in \ | |
9788 | ${srcdir}/../tk \ | |
9789 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9790 | ${srcdir}/../../tk \ | |
9791 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9792 | ${srcdir}/../../../tk \ | |
9793 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9794 | if test -f $i/generic/tk.h ; then | |
9795 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9796 | break | |
9797 | fi | |
9798 | done | |
9799 | fi | |
9800 | # finally check in a few common install locations | |
9801 | # | |
9802 | # since ls returns lowest version numbers first, reverse its output | |
9803 | if test x"${ac_cv_c_tkh}" = x ; then | |
9804 | for i in \ | |
9805 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9806 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9807 | /usr/local/src/tk \ | |
9808 | /usr/local/lib/tk \ | |
9809 | ${prefix}/include ; 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 | # see if one is installed | |
9817 | if test x"${ac_cv_c_tkh}" = x ; then | |
9818 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9819 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
e7c61be3 | 9820 | echo "configure:9821: checking for tk.h" >&5 |
3fc11d3e JM |
9821 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9822 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9823 | else | |
9824 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 9825 | #line 9826 "configure" |
3fc11d3e JM |
9826 | #include "confdefs.h" |
9827 | #include <tk.h> | |
9828 | EOF | |
9829 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 9830 | { (eval echo configure:9831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9831 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9832 | if test -z "$ac_err"; then | |
9833 | rm -rf conftest* | |
9834 | eval "ac_cv_header_$ac_safe=yes" | |
9835 | else | |
9836 | echo "$ac_err" >&5 | |
9837 | echo "configure: failed program was:" >&5 | |
9838 | cat conftest.$ac_ext >&5 | |
9839 | rm -rf conftest* | |
9840 | eval "ac_cv_header_$ac_safe=no" | |
9841 | fi | |
9842 | rm -f conftest* | |
9843 | fi | |
9844 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9845 | echo "$ac_t""yes" 1>&6 | |
9846 | ac_cv_c_tkh=installed | |
9847 | else | |
9848 | echo "$ac_t""no" 1>&6 | |
9849 | ac_cv_c_tkh="" | |
9850 | fi | |
9851 | ||
9852 | fi | |
9853 | ||
9854 | fi | |
9855 | ||
9856 | if test x"${ac_cv_c_tkh}" != x ; then | |
9857 | no_tk="" | |
9858 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9859 | echo "$ac_t""is installed" 1>&6 | |
9860 | TKHDIR="" | |
9861 | else | |
9862 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9863 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9864 | TKHDIR="-I${ac_cv_c_tkh}" | |
9865 | fi | |
9866 | else | |
9867 | TKHDIR="# no Tk directory found" | |
9868 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9869 | no_tk=true | |
9870 | fi | |
9871 | ||
9872 | ||
9873 | ||
9874 | ||
9875 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
e7c61be3 | 9876 | echo "configure:9877: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9877 | if test x"${ac_cv_c_itclh}" = x ; then |
9878 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9879 | if test -f $i/generic/itcl.h ; then | |
9880 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9881 | break | |
9882 | fi | |
9883 | done | |
9884 | fi | |
9885 | if test x"${ac_cv_c_itclh}" = x ; then | |
9886 | ITCLHDIR="# no Itcl private headers found" | |
9887 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9888 | fi | |
9889 | if test x"${ac_cv_c_itclh}" != x ; then | |
9890 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9891 | fi | |
9892 | # should always be here | |
9893 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9894 | ||
9895 | #AC_SUBST(ITCLLIB) | |
9896 | ||
9897 | ||
9898 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
e7c61be3 | 9899 | echo "configure:9900: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9900 | if test x"${ac_cv_c_itkh}" = x ; then |
9901 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9902 | if test -f $i/generic/itk.h ; then | |
9903 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9904 | break | |
9905 | fi | |
9906 | done | |
9907 | fi | |
9908 | if test x"${ac_cv_c_itkh}" = x ; then | |
9909 | ITKHDIR="# no Itk private headers found" | |
9910 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9911 | fi | |
9912 | if test x"${ac_cv_c_itkh}" != x ; then | |
9913 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9914 | fi | |
9915 | # should always be here | |
9916 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9917 | ||
9918 | #AC_SUBST(ITKLIB) | |
9919 | ||
3fc11d3e | 9920 | |
dd2504ab JM |
9921 | |
9922 | # now look for Tk library stuff | |
9923 | ||
9924 | case "${host}" in | |
9925 | *-*-cygwin*) | |
9926 | tkdir=../tk/win/ | |
9927 | ;; | |
9928 | *) | |
9929 | tkdir=../tk/unix/ | |
9930 | ;; | |
9931 | esac | |
9932 | ||
9933 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9934 | ||
3fc11d3e JM |
9935 | # now look for Itcl library stuff |
9936 | ||
9937 | ||
9938 | # | |
9939 | # Ok, lets find the itcl configuration | |
9940 | # First, look for one uninstalled. | |
9941 | # the alternative search directory is invoked by --with-itclconfig | |
9942 | # | |
9943 | ||
9944 | if test x"${no_itcl}" = x ; then | |
9945 | # we reset no_itcl in case something fails here | |
9946 | no_itcl=true | |
9947 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9948 | if test "${with_itclconfig+set}" = set; then | |
9949 | withval="$with_itclconfig" | |
9950 | with_itclconfig=${withval} | |
9951 | fi | |
9952 | ||
9953 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
e7c61be3 | 9954 | echo "configure:9955: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9955 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9956 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9957 | else | |
9958 | ||
9959 | ||
9960 | # First check to see if --with-itclconfig was specified. | |
9961 | if test x"${with_itclconfig}" != x ; then | |
9962 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9963 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9964 | else | |
9965 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9966 | fi | |
9967 | fi | |
9968 | ||
9969 | # then check for a private Itcl library | |
9970 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9971 | for i in \ | |
9972 | ../itcl/itcl \ | |
9973 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9974 | ../../itcl \ | |
9975 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9976 | ../../../itcl \ | |
9977 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9978 | if test -f "$i/itclConfig.sh" ; then | |
9979 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9980 | break | |
9981 | fi | |
9982 | done | |
9983 | fi | |
9984 | # check in a few common install locations | |
9985 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9986 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9987 | if test -f "$i/itclConfig.sh" ; then | |
9988 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9989 | break | |
9990 | fi | |
9991 | done | |
9992 | fi | |
9993 | # check in a few other private locations | |
9994 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9995 | for i in \ | |
9996 | ${srcdir}/../itcl/itcl \ | |
9997 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9998 | if test -f "$i/itclConfig.sh" ; then | |
9999 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10000 | break | |
10001 | fi | |
10002 | done | |
10003 | fi | |
10004 | ||
10005 | fi | |
10006 | ||
10007 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10008 | ITCLCONFIG="# no Itcl configs found" | |
10009 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
10010 | else | |
10011 | no_itcl= | |
10012 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
10013 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
10014 | fi | |
10015 | fi | |
10016 | ||
10017 | if test -z "${no_itcl}"; then | |
10018 | ||
10019 | if test -f "$ITCLCONFIG" ; then | |
10020 | . $ITCLCONFIG | |
10021 | fi | |
10022 | ||
10023 | ||
10024 | ||
10025 | ||
10026 | ||
10027 | ||
10028 | ||
10029 | ||
10030 | ||
10031 | ||
3fc11d3e JM |
10032 | |
10033 | ||
10034 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 10035 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
10036 | fi |
10037 | ||
10038 | ||
10039 | # now look for Itk library stuff | |
10040 | ||
10041 | # | |
10042 | # Ok, lets find the itk configuration | |
10043 | # First, look for one uninstalled. | |
10044 | # the alternative search directory is invoked by --with-itkconfig | |
10045 | # | |
10046 | ||
10047 | if test x"${no_itk}" = x ; then | |
10048 | # we reset no_itk in case something fails here | |
10049 | no_itk=true | |
10050 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
10051 | if test "${with_itkconfig+set}" = set; then | |
10052 | withval="$with_itkconfig" | |
10053 | with_itkconfig=${withval} | |
10054 | fi | |
10055 | ||
10056 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
e7c61be3 | 10057 | echo "configure:10058: checking for Itk configuration" >&5 |
3fc11d3e JM |
10058 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
10059 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10060 | else | |
10061 | ||
10062 | ||
10063 | # First check to see if --with-itkconfig was specified. | |
10064 | if test x"${with_itkconfig}" != x ; then | |
10065 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
10066 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
10067 | else | |
10068 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
10069 | fi | |
10070 | fi | |
10071 | ||
10072 | # then check for a private Itk library | |
10073 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10074 | for i in \ | |
10075 | ../itcl/itk \ | |
10076 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
10077 | ../../itk \ | |
10078 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
10079 | ../../../itk \ | |
10080 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
10081 | if test -f "$i/itkConfig.sh" ; then | |
10082 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10083 | break | |
10084 | fi | |
10085 | done | |
10086 | fi | |
10087 | # check in a few common install locations | |
10088 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10089 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10090 | if test -f "$i/itkConfig.sh" ; then | |
10091 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10092 | break | |
10093 | fi | |
10094 | done | |
10095 | fi | |
10096 | # check in a few other private locations | |
10097 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10098 | for i in \ | |
10099 | ${srcdir}/../itcl/itk \ | |
10100 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
10101 | if test -f "$i/itkConfig.sh" ; then | |
10102 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10103 | break | |
10104 | fi | |
10105 | done | |
10106 | fi | |
10107 | ||
10108 | fi | |
10109 | ||
10110 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10111 | ITKCONFIG="# no Itk configs found" | |
10112 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
10113 | else | |
10114 | no_itk= | |
10115 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
10116 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
10117 | fi | |
10118 | fi | |
10119 | ||
10120 | ||
10121 | if test -z "${no_itcl}"; then | |
10122 | ||
10123 | if test -f "$ITKCONFIG" ; then | |
10124 | . $ITKCONFIG | |
10125 | fi | |
10126 | ||
10127 | ||
10128 | ||
10129 | ||
10130 | ||
10131 | ||
10132 | ||
10133 | ||
10134 | ||
10135 | ||
10136 | ||
10137 | ||
3fc11d3e | 10138 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 10139 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
10140 | fi |
10141 | ||
4226a5a5 | 10142 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
10143 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
10144 | # know whether 8.2 will or not, but I bet it will. | |
10145 | # I don't have to worry about 7.x since we don't support it. | |
10146 | GDBTK_CFLAGS="" | |
10147 | if test "$GCC" = "yes"; then | |
10148 | if test "$TCL_VERSION" != "8.0" ; then | |
10149 | GDBTK_CFLAGS="-fwritable-strings" | |
10150 | fi | |
10151 | fi | |
10152 | ||
10153 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 10154 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
10155 | # Yes, the ordering seems wrong here. But it isn't. |
10156 | # TK_LIBS is the list of libraries that need to be linked | |
10157 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
10158 | # were in LIBS then any link tests after this point would | |
10159 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
10160 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
10161 | |
10162 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
10163 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
10164 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
10165 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 10166 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 10167 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
10168 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
10169 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
10170 | |
10171 | if test x$gdb_cv_os_cygwin = xyes; then | |
10172 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
10173 | WIN32LDAPP="-Wl,--subsystem,console" | |
10174 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
10175 | fi | |
10176 | fi | |
10177 | fi | |
ffc6a242 | 10178 | |
ffc6a242 | 10179 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
10180 | fi |
10181 | ||
10182 | ||
10183 | ||
10184 | ||
10185 | ||
10186 | ||
10187 | ||
10188 | ||
10189 | ||
10190 | ||
10191 | ||
10192 | ||
10193 | ||
dd2504ab | 10194 | |
c906108c SS |
10195 | # If we find X, set shell vars x_includes and x_libraries to the |
10196 | # paths, otherwise set no_x=yes. | |
10197 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
10198 | # --without-x overrides everything else, but does not touch the cache. | |
10199 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
e7c61be3 | 10200 | echo "configure:10201: checking for X" >&5 |
c906108c SS |
10201 | |
10202 | # Check whether --with-x or --without-x was given. | |
10203 | if test "${with_x+set}" = set; then | |
10204 | withval="$with_x" | |
10205 | : | |
10206 | fi | |
10207 | ||
10208 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
10209 | if test "x$with_x" = xno; then | |
10210 | # The user explicitly disabled X. | |
10211 | have_x=disabled | |
10212 | else | |
10213 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
10214 | # Both variables are already set. | |
10215 | have_x=yes | |
10216 | else | |
10217 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
10218 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10219 | else | |
10220 | # One or both of the vars are not set, and there is no cached value. | |
10221 | ac_x_includes=NO ac_x_libraries=NO | |
10222 | rm -fr conftestdir | |
10223 | if mkdir conftestdir; then | |
10224 | cd conftestdir | |
10225 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
10226 | cat > Imakefile <<'EOF' | |
10227 | acfindx: | |
10228 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
10229 | EOF | |
10230 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
10231 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
10232 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
10233 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
10234 | for ac_extension in a so sl; do | |
10235 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
10236 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
10237 | ac_im_usrlibdir=$ac_im_libdir; break | |
10238 | fi | |
10239 | done | |
10240 | # Screen out bogus values from the imake configuration. They are | |
10241 | # bogus both because they are the default anyway, and because | |
10242 | # using them would break gcc on systems where it needs fixed includes. | |
10243 | case "$ac_im_incroot" in | |
10244 | /usr/include) ;; | |
10245 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
10246 | esac | |
10247 | case "$ac_im_usrlibdir" in | |
10248 | /usr/lib | /lib) ;; | |
10249 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
10250 | esac | |
10251 | fi | |
10252 | cd .. | |
10253 | rm -fr conftestdir | |
10254 | fi | |
10255 | ||
10256 | if test "$ac_x_includes" = NO; then | |
10257 | # Guess where to find include files, by looking for this one X11 .h file. | |
10258 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
10259 | ||
10260 | # First, try using that file with no special directory specified. | |
10261 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 10262 | #line 10263 "configure" |
c906108c SS |
10263 | #include "confdefs.h" |
10264 | #include <$x_direct_test_include> | |
10265 | EOF | |
10266 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7c61be3 | 10267 | { (eval echo configure:10268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
10268 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10269 | if test -z "$ac_err"; then | |
10270 | rm -rf conftest* | |
10271 | # We can compile using X headers with no special include directory. | |
10272 | ac_x_includes= | |
10273 | else | |
10274 | echo "$ac_err" >&5 | |
10275 | echo "configure: failed program was:" >&5 | |
10276 | cat conftest.$ac_ext >&5 | |
10277 | rm -rf conftest* | |
10278 | # Look for the header file in a standard set of common directories. | |
10279 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10280 | for ac_dir in \ | |
10281 | /usr/X11/include \ | |
10282 | /usr/X11R6/include \ | |
10283 | /usr/X11R5/include \ | |
10284 | /usr/X11R4/include \ | |
10285 | \ | |
10286 | /usr/include/X11 \ | |
10287 | /usr/include/X11R6 \ | |
10288 | /usr/include/X11R5 \ | |
10289 | /usr/include/X11R4 \ | |
10290 | \ | |
10291 | /usr/local/X11/include \ | |
10292 | /usr/local/X11R6/include \ | |
10293 | /usr/local/X11R5/include \ | |
10294 | /usr/local/X11R4/include \ | |
10295 | \ | |
10296 | /usr/local/include/X11 \ | |
10297 | /usr/local/include/X11R6 \ | |
10298 | /usr/local/include/X11R5 \ | |
10299 | /usr/local/include/X11R4 \ | |
10300 | \ | |
10301 | /usr/X386/include \ | |
10302 | /usr/x386/include \ | |
10303 | /usr/XFree86/include/X11 \ | |
10304 | \ | |
10305 | /usr/include \ | |
10306 | /usr/local/include \ | |
10307 | /usr/unsupported/include \ | |
10308 | /usr/athena/include \ | |
10309 | /usr/local/x11r5/include \ | |
10310 | /usr/lpp/Xamples/include \ | |
10311 | \ | |
10312 | /usr/openwin/include \ | |
10313 | /usr/openwin/share/include \ | |
10314 | ; \ | |
10315 | do | |
10316 | if test -r "$ac_dir/$x_direct_test_include"; then | |
10317 | ac_x_includes=$ac_dir | |
10318 | break | |
10319 | fi | |
10320 | done | |
10321 | fi | |
10322 | rm -f conftest* | |
10323 | fi # $ac_x_includes = NO | |
10324 | ||
10325 | if test "$ac_x_libraries" = NO; then | |
10326 | # Check for the libraries. | |
10327 | ||
10328 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
10329 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
10330 | ||
10331 | # See if we find them without any special options. | |
10332 | # Don't add to $LIBS permanently. | |
10333 | ac_save_LIBS="$LIBS" | |
10334 | LIBS="-l$x_direct_test_library $LIBS" | |
10335 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 10336 | #line 10337 "configure" |
c906108c SS |
10337 | #include "confdefs.h" |
10338 | ||
10339 | int main() { | |
10340 | ${x_direct_test_function}() | |
10341 | ; return 0; } | |
10342 | EOF | |
e7c61be3 | 10343 | if { (eval echo configure:10344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10344 | rm -rf conftest* |
10345 | LIBS="$ac_save_LIBS" | |
10346 | # We can link X programs with no special library path. | |
10347 | ac_x_libraries= | |
10348 | else | |
10349 | echo "configure: failed program was:" >&5 | |
10350 | cat conftest.$ac_ext >&5 | |
10351 | rm -rf conftest* | |
10352 | LIBS="$ac_save_LIBS" | |
10353 | # First see if replacing the include by lib works. | |
10354 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10355 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10356 | /usr/X11/lib \ | |
10357 | /usr/X11R6/lib \ | |
10358 | /usr/X11R5/lib \ | |
10359 | /usr/X11R4/lib \ | |
10360 | \ | |
10361 | /usr/lib/X11 \ | |
10362 | /usr/lib/X11R6 \ | |
10363 | /usr/lib/X11R5 \ | |
10364 | /usr/lib/X11R4 \ | |
10365 | \ | |
10366 | /usr/local/X11/lib \ | |
10367 | /usr/local/X11R6/lib \ | |
10368 | /usr/local/X11R5/lib \ | |
10369 | /usr/local/X11R4/lib \ | |
10370 | \ | |
10371 | /usr/local/lib/X11 \ | |
10372 | /usr/local/lib/X11R6 \ | |
10373 | /usr/local/lib/X11R5 \ | |
10374 | /usr/local/lib/X11R4 \ | |
10375 | \ | |
10376 | /usr/X386/lib \ | |
10377 | /usr/x386/lib \ | |
10378 | /usr/XFree86/lib/X11 \ | |
10379 | \ | |
10380 | /usr/lib \ | |
10381 | /usr/local/lib \ | |
10382 | /usr/unsupported/lib \ | |
10383 | /usr/athena/lib \ | |
10384 | /usr/local/x11r5/lib \ | |
10385 | /usr/lpp/Xamples/lib \ | |
10386 | /lib/usr/lib/X11 \ | |
10387 | \ | |
10388 | /usr/openwin/lib \ | |
10389 | /usr/openwin/share/lib \ | |
10390 | ; \ | |
10391 | do | |
10392 | for ac_extension in a so sl; do | |
10393 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10394 | ac_x_libraries=$ac_dir | |
10395 | break 2 | |
10396 | fi | |
10397 | done | |
10398 | done | |
10399 | fi | |
10400 | rm -f conftest* | |
10401 | fi # $ac_x_libraries = NO | |
10402 | ||
10403 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10404 | # Didn't find X anywhere. Cache the known absence of X. | |
10405 | ac_cv_have_x="have_x=no" | |
10406 | else | |
10407 | # Record where we found X for the cache. | |
10408 | ac_cv_have_x="have_x=yes \ | |
10409 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10410 | fi | |
10411 | fi | |
10412 | fi | |
10413 | eval "$ac_cv_have_x" | |
10414 | fi # $with_x != no | |
10415 | ||
10416 | if test "$have_x" != yes; then | |
10417 | echo "$ac_t""$have_x" 1>&6 | |
10418 | no_x=yes | |
10419 | else | |
10420 | # If each of the values was on the command line, it overrides each guess. | |
10421 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10422 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10423 | # Update the cache value to reflect the command line values. | |
10424 | ac_cv_have_x="have_x=yes \ | |
10425 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10426 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10427 | fi | |
10428 | ||
10429 | ||
7a292a7a SS |
10430 | |
10431 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
10432 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10433 | # This code just checks for a few cases where we'd like to ignore those | |
10434 | # definitions, even when they're present in the '.mt' file. These cases | |
10435 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10436 | # not part of the source tree. |
7a292a7a SS |
10437 | # |
10438 | # Check whether --enable-sim or --disable-sim was given. | |
10439 | if test "${enable_sim+set}" = set; then | |
10440 | enableval="$enable_sim" | |
10441 | echo "enable_sim = $enable_sim"; | |
10442 | echo "enableval = ${enableval}"; | |
10443 | case "${enableval}" in | |
10444 | yes) ignore_sim=false ;; | |
10445 | no) ignore_sim=true ;; | |
10446 | *) ignore_sim=false ;; | |
10447 | esac | |
10448 | else | |
10449 | ignore_sim=false | |
10450 | fi | |
10451 | ||
10452 | ||
10453 | if test ! -d "${srcdir}/../sim"; then | |
10454 | ignore_sim=true | |
10455 | fi | |
10456 | ||
10457 | if test "${ignore_sim}" = "true"; then | |
10458 | IGNORE_SIM="SIM=" | |
10459 | IGNORE_SIM_OBS="SIM_OBS=" | |
10460 | else | |
10461 | IGNORE_SIM="" | |
10462 | IGNORE_SIM_OBS="" | |
10463 | cat >> confdefs.h <<\EOF | |
10464 | #define WITH_SIM 1 | |
10465 | EOF | |
10466 | ||
10467 | fi | |
10468 | ||
10469 | ||
10470 | ||
c906108c SS |
10471 | |
10472 | ||
10473 | ||
10474 | ||
10475 | ||
10476 | ||
dfcd3bfb | 10477 | |
e56ac5c3 AC |
10478 | |
10479 | ||
b3a90332 AC |
10480 | |
10481 | ||
b46cd165 | 10482 | |
d28f9cdf | 10483 | |
c906108c SS |
10484 | # target_subdir is used by the testsuite to find the target libraries. |
10485 | target_subdir= | |
10486 | if test "${host}" != "${target}"; then | |
10487 | target_subdir="${target_alias}/" | |
10488 | fi | |
10489 | ||
10490 | ||
10491 | frags= | |
10492 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10493 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
10494 | # When building a native debuger the .mh file containing things |
10495 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
10496 | # since it no longer contains anything useful. | |
10497 | if test "${target}" = "${host}"; then | |
10498 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10499 | else | |
10500 | host_makefile_frag=/dev/null | |
10501 | fi | |
c906108c SS |
10502 | fi |
10503 | frags="$frags $host_makefile_frag" | |
10504 | ||
10505 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10506 | if test ! -f ${target_makefile_frag}; then | |
10507 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
10508 | fi | |
10509 | frags="$frags $target_makefile_frag" | |
10510 | ||
10511 | ||
10512 | ||
10513 | ||
10514 | ||
10515 | hostfile=`sed -n ' | |
10516 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10517 | ' ${host_makefile_frag}` | |
10518 | ||
10519 | targetfile=`sed -n ' | |
10520 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10521 | ' ${target_makefile_frag}` | |
10522 | ||
c906108c | 10523 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10524 | # We pick this up from the host configuration file (.mh) because we |
10525 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10526 | nativefile=`sed -n ' |
10527 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10528 | ' ${host_makefile_frag}` | |
c906108c SS |
10529 | fi |
10530 | ||
10531 | ||
b00a8037 DJ |
10532 | if test x"${gdb_osabi}" != x ; then |
10533 | cat >> confdefs.h <<EOF | |
10534 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10535 | EOF | |
10536 | ||
10537 | fi | |
10538 | ||
8dcde887 MK |
10539 | # Enable multi-ice-gdb-server. |
10540 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10541 | if test "${enable_multi_ice+set}" = set; then | |
10542 | enableval="$enable_multi_ice" | |
10543 | case $enableval in | |
10544 | yes | no) | |
10545 | ;; | |
10546 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10547 | esac | |
96baa820 JM |
10548 | fi |
10549 | ||
8dcde887 MK |
10550 | if test "x$enable_multi_ice" = xyes; then |
10551 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10552 | fi |
10553 | ||
8dcde887 MK |
10554 | # We only build gdbserver automatically if host and target are the same. |
10555 | if test "x$target" = "x$host"; then | |
10556 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
e7c61be3 | 10557 | echo "configure:10558: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10558 | if test "x$build_gdbserver" = xyes; then |
10559 | configdirs="$configdirs gdbserver" | |
10560 | echo "$ac_t""yes" 1>&6 | |
10561 | else | |
10562 | echo "$ac_t""no" 1>&6 | |
10563 | fi | |
10564 | fi | |
10565 | ||
10566 | subdirs="doc testsuite $configdirs" | |
10567 | ||
96baa820 | 10568 | |
c906108c | 10569 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10570 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10571 | # version. | |
c906108c SS |
10572 | |
10573 | files= | |
10574 | links= | |
5a2402b8 | 10575 | |
c906108c | 10576 | rm -f xm.h |
5a2402b8 | 10577 | xm_h="" |
c906108c | 10578 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10579 | xm_h=xm.h |
10580 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10581 | files="${files} ${GDB_XM_FILE}" | |
10582 | links="${links} xm.h" | |
10583 | cat >> confdefs.h <<EOF | |
10584 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10585 | EOF | |
10586 | ||
c906108c | 10587 | fi |
5a2402b8 AC |
10588 | |
10589 | ||
c906108c | 10590 | rm -f tm.h |
5a2402b8 | 10591 | tm_h="" |
c906108c | 10592 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10593 | tm_h=tm.h |
10594 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10595 | files="${files} ${GDB_TM_FILE}" | |
10596 | links="${links} tm.h" | |
10597 | cat >> confdefs.h <<EOF | |
10598 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10599 | EOF | |
10600 | ||
c906108c | 10601 | fi |
5a2402b8 AC |
10602 | |
10603 | ||
c906108c | 10604 | rm -f nm.h |
5a2402b8 | 10605 | nm_h="" |
c906108c | 10606 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10607 | nm_h=nm.h |
10608 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10609 | files="${files} ${GDB_NM_FILE}" | |
10610 | links="${links} nm.h" | |
10611 | cat >> confdefs.h <<EOF | |
10612 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10613 | EOF | |
10614 | ||
c906108c | 10615 | fi |
5a2402b8 AC |
10616 | |
10617 | ||
c906108c SS |
10618 | |
10619 | ||
10620 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
e7c61be3 | 10621 | echo "configure:10622: checking for Cygwin environment" >&5 |
c906108c SS |
10622 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10623 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10624 | else | |
10625 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 10626 | #line 10627 "configure" |
c906108c SS |
10627 | #include "confdefs.h" |
10628 | ||
10629 | int main() { | |
10630 | ||
10631 | #ifndef __CYGWIN__ | |
10632 | #define __CYGWIN__ __CYGWIN32__ | |
10633 | #endif | |
10634 | return __CYGWIN__; | |
10635 | ; return 0; } | |
10636 | EOF | |
e7c61be3 | 10637 | if { (eval echo configure:10638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10638 | rm -rf conftest* |
10639 | ac_cv_cygwin=yes | |
10640 | else | |
10641 | echo "configure: failed program was:" >&5 | |
10642 | cat conftest.$ac_ext >&5 | |
10643 | rm -rf conftest* | |
10644 | ac_cv_cygwin=no | |
10645 | fi | |
10646 | rm -f conftest* | |
10647 | rm -f conftest* | |
10648 | fi | |
10649 | ||
10650 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10651 | CYGWIN= | |
10652 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10653 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
e7c61be3 | 10654 | echo "configure:10655: checking for mingw32 environment" >&5 |
c906108c SS |
10655 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10656 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10657 | else | |
10658 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 10659 | #line 10660 "configure" |
c906108c SS |
10660 | #include "confdefs.h" |
10661 | ||
10662 | int main() { | |
10663 | return __MINGW32__; | |
10664 | ; return 0; } | |
10665 | EOF | |
e7c61be3 | 10666 | if { (eval echo configure:10667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10667 | rm -rf conftest* |
10668 | ac_cv_mingw32=yes | |
10669 | else | |
10670 | echo "configure: failed program was:" >&5 | |
10671 | cat conftest.$ac_ext >&5 | |
10672 | rm -rf conftest* | |
10673 | ac_cv_mingw32=no | |
10674 | fi | |
10675 | rm -f conftest* | |
10676 | rm -f conftest* | |
10677 | fi | |
10678 | ||
10679 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10680 | MINGW32= | |
10681 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10682 | ||
10683 | ||
10684 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
e7c61be3 | 10685 | echo "configure:10686: checking for executable suffix" >&5 |
c906108c SS |
10686 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10688 | else | |
10689 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10690 | ac_cv_exeext=.exe | |
10691 | else | |
10692 | rm -f conftest* | |
10693 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10694 | ac_cv_exeext= | |
e7c61be3 | 10695 | if { (eval echo configure:10696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10696 | for file in conftest.*; do |
10697 | case $file in | |
e7c61be3 | 10698 | *.c | *.o | *.obj) ;; |
c906108c SS |
10699 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10700 | esac | |
10701 | done | |
10702 | else | |
10703 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10704 | fi | |
10705 | rm -f conftest* | |
10706 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10707 | fi | |
10708 | fi | |
10709 | ||
10710 | EXEEXT="" | |
10711 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10712 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10713 | ac_exeext=$EXEEXT | |
10714 | ||
10715 | ||
234b45d4 KB |
10716 | |
10717 | cat >> confdefs.h <<\EOF | |
10718 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10719 | EOF | |
10720 | ||
10721 | ||
10722 | ||
10723 | ||
10724 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10725 | if test "${with_libiconv_prefix+set}" = set; then | |
10726 | withval="$with_libiconv_prefix" | |
10727 | ||
10728 | for dir in `echo "$withval" | tr : ' '`; do | |
10729 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10730 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10731 | done | |
10732 | ||
10733 | fi | |
10734 | ||
10735 | ||
10736 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
e7c61be3 | 10737 | echo "configure:10738: checking for iconv" >&5 |
234b45d4 KB |
10738 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10739 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10740 | else | |
10741 | ||
10742 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10743 | am_cv_lib_iconv=no | |
10744 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 10745 | #line 10746 "configure" |
234b45d4 KB |
10746 | #include "confdefs.h" |
10747 | #include <stdlib.h> | |
10748 | #include <iconv.h> | |
10749 | int main() { | |
10750 | iconv_t cd = iconv_open("",""); | |
10751 | iconv(cd,NULL,NULL,NULL,NULL); | |
10752 | iconv_close(cd); | |
10753 | ; return 0; } | |
10754 | EOF | |
e7c61be3 | 10755 | if { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10756 | rm -rf conftest* |
10757 | am_cv_func_iconv=yes | |
10758 | else | |
10759 | echo "configure: failed program was:" >&5 | |
10760 | cat conftest.$ac_ext >&5 | |
10761 | fi | |
10762 | rm -f conftest* | |
10763 | if test "$am_cv_func_iconv" != yes; then | |
10764 | am_save_LIBS="$LIBS" | |
10765 | LIBS="$LIBS -liconv" | |
10766 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 10767 | #line 10768 "configure" |
234b45d4 KB |
10768 | #include "confdefs.h" |
10769 | #include <stdlib.h> | |
10770 | #include <iconv.h> | |
10771 | int main() { | |
10772 | iconv_t cd = iconv_open("",""); | |
10773 | iconv(cd,NULL,NULL,NULL,NULL); | |
10774 | iconv_close(cd); | |
10775 | ; return 0; } | |
10776 | EOF | |
e7c61be3 | 10777 | if { (eval echo configure:10778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10778 | rm -rf conftest* |
10779 | am_cv_lib_iconv=yes | |
10780 | am_cv_func_iconv=yes | |
10781 | else | |
10782 | echo "configure: failed program was:" >&5 | |
10783 | cat conftest.$ac_ext >&5 | |
10784 | fi | |
10785 | rm -f conftest* | |
10786 | LIBS="$am_save_LIBS" | |
10787 | fi | |
10788 | ||
10789 | fi | |
10790 | ||
10791 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10792 | if test "$am_cv_func_iconv" = yes; then | |
10793 | cat >> confdefs.h <<\EOF | |
10794 | #define HAVE_ICONV 1 | |
10795 | EOF | |
10796 | ||
10797 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
e7c61be3 | 10798 | echo "configure:10799: checking for iconv declaration" >&5 |
234b45d4 KB |
10799 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10800 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10801 | else | |
10802 | ||
10803 | cat > conftest.$ac_ext <<EOF | |
e7c61be3 | 10804 | #line 10805 "configure" |
234b45d4 KB |
10805 | #include "confdefs.h" |
10806 | ||
10807 | #include <stdlib.h> | |
10808 | #include <iconv.h> | |
10809 | extern | |
10810 | #ifdef __cplusplus | |
10811 | "C" | |
10812 | #endif | |
10813 | #if defined(__STDC__) || defined(__cplusplus) | |
10814 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10815 | #else | |
10816 | size_t iconv(); | |
10817 | #endif | |
10818 | ||
10819 | int main() { | |
10820 | ||
10821 | ; return 0; } | |
10822 | EOF | |
e7c61be3 | 10823 | if { (eval echo configure:10824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10824 | rm -rf conftest* |
10825 | am_cv_proto_iconv_arg1="" | |
10826 | else | |
10827 | echo "configure: failed program was:" >&5 | |
10828 | cat conftest.$ac_ext >&5 | |
10829 | rm -rf conftest* | |
10830 | am_cv_proto_iconv_arg1="const" | |
10831 | fi | |
10832 | rm -f conftest* | |
10833 | 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);" | |
10834 | fi | |
10835 | ||
10836 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10837 | echo "$ac_t""${ac_t:- | |
10838 | }$am_cv_proto_iconv" 1>&6 | |
10839 | cat >> confdefs.h <<EOF | |
10840 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10841 | EOF | |
10842 | ||
10843 | fi | |
10844 | LIBICONV= | |
10845 | if test "$am_cv_lib_iconv" = yes; then | |
10846 | LIBICONV="-liconv" | |
10847 | fi | |
10848 | ||
10849 | ||
10850 | ||
c906108c SS |
10851 | trap '' 1 2 15 |
10852 | cat > confcache <<\EOF | |
10853 | # This file is a shell script that caches the results of configure | |
10854 | # tests run on this system so they can be shared between configure | |
10855 | # scripts and configure runs. It is not useful on other systems. | |
10856 | # If it contains results you don't want to keep, you may remove or edit it. | |
10857 | # | |
10858 | # By default, configure uses ./config.cache as the cache file, | |
10859 | # creating it if it does not exist already. You can give configure | |
10860 | # the --cache-file=FILE option to use a different cache file; that is | |
10861 | # what configure does when it calls configure scripts in | |
10862 | # subdirectories, so they share the cache. | |
10863 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10864 | # config.status only pays attention to the cache file if you give it the | |
10865 | # --recheck option to rerun configure. | |
10866 | # | |
10867 | EOF | |
10868 | # The following way of writing the cache mishandles newlines in values, | |
10869 | # but we know of no workaround that is simple, portable, and efficient. | |
10870 | # So, don't put newlines in cache variables' values. | |
10871 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10872 | # and sets the high bit in the cache file unless we assign to the vars. | |
10873 | (set) 2>&1 | | |
10874 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10875 | *ac_space=\ *) | |
10876 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10877 | # turns \\\\ into \\, and sed turns \\ into \). | |
10878 | sed -n \ | |
10879 | -e "s/'/'\\\\''/g" \ | |
10880 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10881 | ;; | |
10882 | *) | |
10883 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10884 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10885 | ;; | |
10886 | esac >> confcache | |
10887 | if cmp -s $cache_file confcache; then | |
10888 | : | |
10889 | else | |
10890 | if test -w $cache_file; then | |
10891 | echo "updating cache $cache_file" | |
10892 | cat confcache > $cache_file | |
10893 | else | |
10894 | echo "not updating unwritable cache $cache_file" | |
10895 | fi | |
10896 | fi | |
10897 | rm -f confcache | |
10898 | ||
10899 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10900 | ||
10901 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10902 | # Let make expand exec_prefix. | |
10903 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10904 | ||
10905 | # Any assignment to VPATH causes Sun make to only execute | |
10906 | # the first set of double-colon rules, so remove it if not needed. | |
10907 | # If there is a colon in the path, we need to keep it. | |
10908 | if test "x$srcdir" = x.; then | |
10909 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10910 | fi | |
10911 | ||
10912 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10913 | ||
10914 | DEFS=-DHAVE_CONFIG_H | |
10915 | ||
10916 | # Without the "./", some shells look in PATH for config.status. | |
10917 | : ${CONFIG_STATUS=./config.status} | |
10918 | ||
10919 | echo creating $CONFIG_STATUS | |
10920 | rm -f $CONFIG_STATUS | |
10921 | cat > $CONFIG_STATUS <<EOF | |
10922 | #! /bin/sh | |
10923 | # Generated automatically by configure. | |
10924 | # Run this file to recreate the current configuration. | |
10925 | # This directory was configured as follows, | |
10926 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10927 | # | |
10928 | # $0 $ac_configure_args | |
10929 | # | |
10930 | # Compiler output produced by configure, useful for debugging | |
10931 | # configure, is in ./config.log if it exists. | |
10932 | ||
10933 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10934 | for ac_option | |
10935 | do | |
10936 | case "\$ac_option" in | |
10937 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10938 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10939 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10940 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10941 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10942 | exit 0 ;; | |
10943 | -help | --help | --hel | --he | --h) | |
10944 | echo "\$ac_cs_usage"; exit 0 ;; | |
10945 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10946 | esac | |
10947 | done | |
10948 | ||
10949 | ac_given_srcdir=$srcdir | |
10950 | ac_given_INSTALL="$INSTALL" | |
10951 | ||
ed952ac5 | 10952 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10953 | EOF |
10954 | cat >> $CONFIG_STATUS <<EOF | |
10955 | ||
10956 | # Protect against being on the right side of a sed subst in config.status. | |
10957 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10958 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10959 | $ac_vpsub | |
10960 | $extrasub | |
10961 | s%@SHELL@%$SHELL%g | |
10962 | s%@CFLAGS@%$CFLAGS%g | |
10963 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10964 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10965 | s%@FFLAGS@%$FFLAGS%g | |
10966 | s%@DEFS@%$DEFS%g | |
10967 | s%@LDFLAGS@%$LDFLAGS%g | |
10968 | s%@LIBS@%$LIBS%g | |
10969 | s%@exec_prefix@%$exec_prefix%g | |
10970 | s%@prefix@%$prefix%g | |
10971 | s%@program_transform_name@%$program_transform_name%g | |
10972 | s%@bindir@%$bindir%g | |
10973 | s%@sbindir@%$sbindir%g | |
10974 | s%@libexecdir@%$libexecdir%g | |
10975 | s%@datadir@%$datadir%g | |
10976 | s%@sysconfdir@%$sysconfdir%g | |
10977 | s%@sharedstatedir@%$sharedstatedir%g | |
10978 | s%@localstatedir@%$localstatedir%g | |
10979 | s%@libdir@%$libdir%g | |
10980 | s%@includedir@%$includedir%g | |
10981 | s%@oldincludedir@%$oldincludedir%g | |
10982 | s%@infodir@%$infodir%g | |
10983 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10984 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10985 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10986 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10987 | s%@CC@%$CC%g |
10988 | s%@CPP@%$CPP%g | |
10989 | s%@host@%$host%g | |
10990 | s%@host_alias@%$host_alias%g | |
10991 | s%@host_cpu@%$host_cpu%g | |
10992 | s%@host_vendor@%$host_vendor%g | |
10993 | s%@host_os@%$host_os%g | |
10994 | s%@target@%$target%g | |
10995 | s%@target_alias@%$target_alias%g | |
10996 | s%@target_cpu@%$target_cpu%g | |
10997 | s%@target_vendor@%$target_vendor%g | |
10998 | s%@target_os@%$target_os%g | |
10999 | s%@build@%$build%g | |
11000 | s%@build_alias@%$build_alias%g | |
11001 | s%@build_cpu@%$build_cpu%g | |
11002 | s%@build_vendor@%$build_vendor%g | |
11003 | s%@build_os@%$build_os%g | |
c906108c | 11004 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 11005 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
11006 | s%@ALLOCA@%$ALLOCA%g |
11007 | s%@USE_NLS@%$USE_NLS%g | |
11008 | s%@MSGFMT@%$MSGFMT%g | |
11009 | s%@GMSGFMT@%$GMSGFMT%g | |
11010 | s%@XGETTEXT@%$XGETTEXT%g | |
11011 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
11012 | s%@CATALOGS@%$CATALOGS%g | |
11013 | s%@CATOBJEXT@%$CATOBJEXT%g | |
11014 | s%@DATADIRNAME@%$DATADIRNAME%g | |
11015 | s%@GMOFILES@%$GMOFILES%g | |
11016 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
11017 | s%@INTLDEPS@%$INTLDEPS%g | |
11018 | s%@INTLLIBS@%$INTLLIBS%g | |
11019 | s%@INTLOBJS@%$INTLOBJS%g | |
11020 | s%@POFILES@%$POFILES%g | |
11021 | s%@POSUB@%$POSUB%g | |
11022 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
11023 | s%@GT_NO@%$GT_NO%g | |
11024 | s%@GT_YES@%$GT_YES%g | |
11025 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
11026 | s%@l@%$l%g | |
8dcde887 | 11027 | s%@subdirs@%$subdirs%g |
7a292a7a | 11028 | s%@AWK@%$AWK%g |
c906108c SS |
11029 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
11030 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
11031 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
11032 | s%@LN_S@%$LN_S%g |
11033 | s%@YACC@%$YACC%g | |
c906108c | 11034 | s%@AR@%$AR%g |
95ca63c4 CF |
11035 | s%@DLLTOOL@%$DLLTOOL%g |
11036 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 11037 | s%@MIG@%$MIG%g |
c906108c | 11038 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
11039 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
11040 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 11041 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 11042 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
aff38e61 | 11043 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 11044 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
11045 | s%@LIBGUI@%$LIBGUI%g |
11046 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
11047 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
11048 | s%@TCL_VERSION@%$TCL_VERSION%g | |
11049 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
11050 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
11051 | s%@TCL_CC@%$TCL_CC%g | |
11052 | s%@TCL_DEFS@%$TCL_DEFS%g | |
11053 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
11054 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
11055 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
11056 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
11057 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
11058 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
11059 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 11060 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
11061 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
11062 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
11063 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
11064 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
11065 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
11066 | s%@TK_VERSION@%$TK_VERSION%g | |
11067 | s%@TK_DEFS@%$TK_DEFS%g | |
11068 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
11069 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
11070 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
11071 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
11072 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
11073 | s%@TCLHDIR@%$TCLHDIR%g | |
11074 | s%@TKHDIR@%$TKHDIR%g | |
11075 | s%@ITCLHDIR@%$ITCLHDIR%g | |
11076 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
11077 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
11078 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
11079 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
11080 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
11081 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
11082 | s%@ITK_VERSION@%$ITK_VERSION%g | |
11083 | s%@ITK_DEFS@%$ITK_DEFS%g | |
11084 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
11085 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
11086 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
11087 | s%@X_CFLAGS@%$X_CFLAGS%g |
11088 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
11089 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
11090 | s%@TCL_DEPS@%$TCL_DEPS%g |
11091 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
11092 | s%@ITCLLIB@%$ITCLLIB%g |
11093 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
11094 | s%@ITKLIB@%$ITKLIB%g | |
11095 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
11096 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
11097 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 11098 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
11099 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
11100 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 11101 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 11102 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c | 11103 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
66b965bb | 11104 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
11105 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
11106 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 11107 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
11108 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
11109 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
11110 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
11111 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
11112 | s%@target_subdir@%$target_subdir%g |
11113 | /@host_makefile_frag@/r $host_makefile_frag | |
11114 | s%@host_makefile_frag@%%g | |
11115 | /@target_makefile_frag@/r $target_makefile_frag | |
11116 | s%@target_makefile_frag@%%g | |
11117 | s%@frags@%$frags%g | |
5a2402b8 AC |
11118 | s%@xm_h@%$xm_h%g |
11119 | s%@tm_h@%$tm_h%g | |
11120 | s%@nm_h@%$nm_h%g | |
c906108c | 11121 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 11122 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
11123 | |
11124 | CEOF | |
11125 | EOF | |
11126 | ||
11127 | cat >> $CONFIG_STATUS <<\EOF | |
11128 | ||
11129 | # Split the substitutions into bite-sized pieces for seds with | |
11130 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 11131 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
11132 | ac_file=1 # Number of current file. |
11133 | ac_beg=1 # First line for current file. | |
11134 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
11135 | ac_more_lines=: | |
11136 | ac_sed_cmds="" | |
11137 | while $ac_more_lines; do | |
11138 | if test $ac_beg -gt 1; then | |
11139 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
11140 | else | |
11141 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
11142 | fi | |
11143 | if test ! -s conftest.s$ac_file; then | |
11144 | ac_more_lines=false | |
11145 | rm -f conftest.s$ac_file | |
11146 | else | |
11147 | if test -z "$ac_sed_cmds"; then | |
11148 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
11149 | else | |
11150 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
11151 | fi | |
11152 | ac_file=`expr $ac_file + 1` | |
11153 | ac_beg=$ac_end | |
11154 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
11155 | fi | |
11156 | done | |
11157 | if test -z "$ac_sed_cmds"; then | |
11158 | ac_sed_cmds=cat | |
11159 | fi | |
11160 | EOF | |
11161 | ||
11162 | cat >> $CONFIG_STATUS <<EOF | |
11163 | ||
ed952ac5 | 11164 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
11165 | EOF |
11166 | cat >> $CONFIG_STATUS <<\EOF | |
11167 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
11168 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11169 | case "$ac_file" in | |
11170 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11171 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11172 | *) ac_file_in="${ac_file}.in" ;; | |
11173 | esac | |
11174 | ||
11175 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
11176 | ||
11177 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11178 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11179 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11180 | # The file is in a subdirectory. | |
11181 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11182 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
11183 | # A "../" for each directory in $ac_dir_suffix. | |
11184 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
11185 | else | |
11186 | ac_dir_suffix= ac_dots= | |
11187 | fi | |
11188 | ||
11189 | case "$ac_given_srcdir" in | |
11190 | .) srcdir=. | |
11191 | if test -z "$ac_dots"; then top_srcdir=. | |
11192 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
11193 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
11194 | *) # Relative path. | |
11195 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
11196 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
11197 | esac | |
11198 | ||
11199 | case "$ac_given_INSTALL" in | |
11200 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11201 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11202 | esac | |
11203 | ||
11204 | echo creating "$ac_file" | |
11205 | rm -f "$ac_file" | |
11206 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
11207 | case "$ac_file" in | |
11208 | *Makefile*) ac_comsub="1i\\ | |
11209 | # $configure_input" ;; | |
11210 | *) ac_comsub= ;; | |
11211 | esac | |
11212 | ||
11213 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11214 | sed -e "$ac_comsub | |
11215 | s%@configure_input@%$configure_input%g | |
11216 | s%@srcdir@%$srcdir%g | |
11217 | s%@top_srcdir@%$top_srcdir%g | |
11218 | s%@INSTALL@%$INSTALL%g | |
11219 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
11220 | fi; done | |
11221 | rm -f conftest.s* | |
11222 | ||
11223 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
11224 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
11225 | # | |
11226 | # ac_d sets the value in "#define NAME VALUE" lines. | |
11227 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
11228 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
11229 | ac_dC='\3' | |
11230 | ac_dD='%g' | |
11231 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
11232 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11233 | ac_uB='\([ ]\)%\1#\2define\3' | |
11234 | ac_uC=' ' | |
11235 | ac_uD='\4%g' | |
11236 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
11237 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11238 | ac_eB='$%\1#\2define\3' | |
11239 | ac_eC=' ' | |
11240 | ac_eD='%g' | |
11241 | ||
11242 | if test "${CONFIG_HEADERS+set}" != set; then | |
11243 | EOF | |
11244 | cat >> $CONFIG_STATUS <<EOF | |
11245 | CONFIG_HEADERS="config.h:config.in" | |
11246 | EOF | |
11247 | cat >> $CONFIG_STATUS <<\EOF | |
11248 | fi | |
11249 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
11250 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11251 | case "$ac_file" in | |
11252 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11253 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11254 | *) ac_file_in="${ac_file}.in" ;; | |
11255 | esac | |
11256 | ||
11257 | echo creating $ac_file | |
11258 | ||
11259 | rm -f conftest.frag conftest.in conftest.out | |
11260 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11261 | cat $ac_file_inputs > conftest.in | |
11262 | ||
11263 | EOF | |
11264 | ||
11265 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
11266 | # the proper values into config.h.in to produce config.h. And first: | |
11267 | # Protect against being on the right side of a sed subst in config.status. | |
11268 | # Protect against being in an unquoted here document in config.status. | |
11269 | rm -f conftest.vals | |
11270 | cat > conftest.hdr <<\EOF | |
11271 | s/[\\&%]/\\&/g | |
11272 | s%[\\$`]%\\&%g | |
11273 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
11274 | s%ac_d%ac_u%gp | |
11275 | s%ac_u%ac_e%gp | |
11276 | EOF | |
11277 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
11278 | rm -f conftest.hdr | |
11279 | ||
11280 | # This sed command replaces #undef with comments. This is necessary, for | |
11281 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
11282 | # on some systems where configure will not decide to define it. | |
11283 | cat >> conftest.vals <<\EOF | |
11284 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
11285 | EOF | |
11286 | ||
11287 | # Break up conftest.vals because some shells have a limit on | |
11288 | # the size of here documents, and old seds have small limits too. | |
11289 | ||
11290 | rm -f conftest.tail | |
11291 | while : | |
11292 | do | |
11293 | ac_lines=`grep -c . conftest.vals` | |
11294 | # grep -c gives empty output for an empty file on some AIX systems. | |
11295 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
11296 | # Write a limited-size here document to conftest.frag. | |
11297 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
11298 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
11299 | echo 'CEOF | |
11300 | sed -f conftest.frag conftest.in > conftest.out | |
11301 | rm -f conftest.in | |
11302 | mv conftest.out conftest.in | |
11303 | ' >> $CONFIG_STATUS | |
11304 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
11305 | rm -f conftest.vals | |
11306 | mv conftest.tail conftest.vals | |
11307 | done | |
11308 | rm -f conftest.vals | |
11309 | ||
11310 | cat >> $CONFIG_STATUS <<\EOF | |
11311 | rm -f conftest.frag conftest.h | |
11312 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11313 | cat conftest.in >> conftest.h | |
11314 | rm -f conftest.in | |
11315 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11316 | echo "$ac_file is unchanged" | |
11317 | rm -f conftest.h | |
11318 | else | |
11319 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11320 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11321 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11322 | # The file is in a subdirectory. | |
11323 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11324 | fi | |
11325 | rm -f $ac_file | |
11326 | mv conftest.h $ac_file | |
11327 | fi | |
11328 | fi; done | |
11329 | ||
11330 | EOF | |
11331 | ||
11332 | cat >> $CONFIG_STATUS <<EOF | |
11333 | ac_sources="$files" | |
11334 | ac_dests="$links" | |
11335 | EOF | |
11336 | ||
11337 | cat >> $CONFIG_STATUS <<\EOF | |
11338 | srcdir=$ac_given_srcdir | |
11339 | while test -n "$ac_sources"; do | |
11340 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11341 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11342 | ||
11343 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11344 | ||
11345 | if test ! -r $srcdir/$ac_source; then | |
11346 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11347 | fi | |
11348 | rm -f $ac_dest | |
11349 | ||
11350 | # Make relative symlinks. | |
11351 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11352 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11353 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11354 | # The dest file is in a subdirectory. | |
11355 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11356 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11357 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11358 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11359 | else | |
11360 | ac_dest_dir_suffix= ac_dots= | |
11361 | fi | |
11362 | ||
11363 | case "$srcdir" in | |
11364 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11365 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11366 | esac | |
11367 | ||
11368 | # Make a symlink if possible; otherwise try a hard link. | |
11369 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11370 | ln $srcdir/$ac_source $ac_dest; then : | |
11371 | else | |
11372 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11373 | fi | |
11374 | done | |
11375 | EOF | |
11376 | cat >> $CONFIG_STATUS <<EOF | |
11377 | ||
11378 | gdb_host_cpu=$gdb_host_cpu | |
11379 | gdb_target_cpu=$gdb_target_cpu | |
11380 | nativefile=$nativefile | |
11381 | ||
11382 | EOF | |
11383 | cat >> $CONFIG_STATUS <<\EOF | |
11384 | ||
7ee6d7eb | 11385 | if test "${nativefile}" = ""; then |
c4620205 | 11386 | < Makefile \ |
e27da16d JT |
11387 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
11388 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
11389 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
11390 | > Makefile.tem | |
c906108c SS |
11391 | mv -f Makefile.tem Makefile |
11392 | fi | |
11393 | ||
11394 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
11395 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
11396 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11397 | mv -f Makefile.tmp Makefile | |
11398 | ||
2acceee2 | 11399 | |
c906108c SS |
11400 | case x$CONFIG_HEADERS in |
11401 | xconfig.h:config.in) | |
11402 | echo > stamp-h ;; | |
11403 | esac | |
11404 | ||
11405 | exit 0 | |
11406 | EOF | |
11407 | chmod +x $CONFIG_STATUS | |
11408 | rm -fr confdefs* $ac_clean_files | |
11409 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11410 | ||
11411 | if test "$no_recursion" != yes; then | |
11412 | ||
11413 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11414 | ac_sub_configure_args= | |
11415 | ac_prev= | |
11416 | for ac_arg in $ac_configure_args; do | |
11417 | if test -n "$ac_prev"; then | |
11418 | ac_prev= | |
11419 | continue | |
11420 | fi | |
11421 | case "$ac_arg" in | |
11422 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11423 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11424 | ac_prev=cache_file ;; | |
11425 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11426 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11427 | ;; | |
11428 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11429 | ac_prev=srcdir ;; | |
11430 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11431 | ;; | |
11432 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11433 | esac | |
11434 | done | |
11435 | ||
8dcde887 | 11436 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11437 | |
11438 | # Do not complain, so a configure script can configure whichever | |
11439 | # parts of a large source tree are present. | |
11440 | if test ! -d $srcdir/$ac_config_dir; then | |
11441 | continue | |
11442 | fi | |
11443 | ||
11444 | echo configuring in $ac_config_dir | |
11445 | ||
11446 | case "$srcdir" in | |
11447 | .) ;; | |
11448 | *) | |
11449 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11450 | else | |
11451 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11452 | fi | |
11453 | ;; | |
11454 | esac | |
11455 | ||
11456 | ac_popdir=`pwd` | |
11457 | cd $ac_config_dir | |
11458 | ||
11459 | # A "../" for each directory in /$ac_config_dir. | |
11460 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11461 | ||
11462 | case "$srcdir" in | |
11463 | .) # No --srcdir option. We are building in place. | |
11464 | ac_sub_srcdir=$srcdir ;; | |
11465 | /*) # Absolute path. | |
11466 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11467 | *) # Relative path. | |
11468 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11469 | esac | |
11470 | ||
11471 | # Check for guested configure; otherwise get Cygnus style configure. | |
11472 | if test -f $ac_sub_srcdir/configure; then | |
11473 | ac_sub_configure=$ac_sub_srcdir/configure | |
11474 | elif test -f $ac_sub_srcdir/configure.in; then | |
11475 | ac_sub_configure=$ac_configure | |
11476 | else | |
11477 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11478 | ac_sub_configure= | |
11479 | fi | |
11480 | ||
11481 | # The recursion is here. | |
11482 | if test -n "$ac_sub_configure"; then | |
11483 | ||
11484 | # Make the cache file name correct relative to the subdirectory. | |
11485 | case "$cache_file" in | |
11486 | /*) ac_sub_cache_file=$cache_file ;; | |
11487 | *) # Relative path. | |
11488 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11489 | esac | |
11490 | case "$ac_given_INSTALL" in | |
11491 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11492 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11493 | esac | |
11494 | ||
11495 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11496 | # The eval makes quoting arguments work. | |
11497 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11498 | then : | |
11499 | else | |
11500 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11501 | fi | |
11502 | fi | |
11503 | ||
11504 | cd $ac_popdir | |
11505 | done | |
11506 | fi | |
11507 | ||
11508 | ||
11509 | exit 0 |