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. | |
0bbc026e JM |
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 |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | ||
0bbc026e | 727 | #line 728 "configure" |
c906108c SS |
728 | #include "confdefs.h" |
729 | ||
730 | main(){return(0);} | |
731 | EOF | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 |
0bbc026e | 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 | |
0bbc026e | 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" | |
0bbc026e | 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 | |
0bbc026e | 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" | |
0bbc026e | 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 | |
0bbc026e | 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" | |
0bbc026e | 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 | |
0bbc026e | 908 | echo "configure:909: checking for AIX" >&5 |
c906108c | 909 | cat > conftest.$ac_ext <<EOF |
0bbc026e | 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 |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | |
0bbc026e | 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 | ||
ddc9cd0f AC |
1223 | |
1224 | CONFIG_OBS= | |
1225 | CONFIG_DEPS= | |
1226 | CONFIG_SRCS= | |
1227 | ENABLE_CFLAGS= | |
1228 | ||
1229 | CONFIG_ALL= | |
1230 | CONFIG_CLEAN= | |
1231 | CONFIG_INSTALL= | |
1232 | CONFIG_UNINSTALL= | |
1233 | ||
1234 | ||
c906108c | 1235 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
0bbc026e | 1236 | echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1237 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1238 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1239 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1240 | else | |
1241 | cat > conftestmake <<\EOF | |
1242 | all: | |
1243 | @echo 'ac_maketemp="${MAKE}"' | |
1244 | EOF | |
1245 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1246 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1247 | if test -n "$ac_maketemp"; then | |
1248 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1249 | else | |
1250 | eval ac_cv_prog_make_${ac_make}_set=no | |
1251 | fi | |
1252 | rm -f conftestmake | |
1253 | fi | |
1254 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1255 | echo "$ac_t""yes" 1>&6 | |
1256 | SET_MAKE= | |
1257 | else | |
1258 | echo "$ac_t""no" 1>&6 | |
1259 | SET_MAKE="MAKE=${MAKE-make}" | |
1260 | fi | |
1261 | ||
1262 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1263 | set dummy ranlib; ac_word=$2 | |
1264 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 1265 | echo "configure:1266: checking for $ac_word" >&5 |
c906108c SS |
1266 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1267 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1268 | else | |
1269 | if test -n "$RANLIB"; then | |
1270 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1271 | else | |
1272 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1273 | ac_dummy="$PATH" | |
1274 | for ac_dir in $ac_dummy; do | |
1275 | test -z "$ac_dir" && ac_dir=. | |
1276 | if test -f $ac_dir/$ac_word; then | |
1277 | ac_cv_prog_RANLIB="ranlib" | |
1278 | break | |
1279 | fi | |
1280 | done | |
1281 | IFS="$ac_save_ifs" | |
1282 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1283 | fi | |
1284 | fi | |
1285 | RANLIB="$ac_cv_prog_RANLIB" | |
1286 | if test -n "$RANLIB"; then | |
1287 | echo "$ac_t""$RANLIB" 1>&6 | |
1288 | else | |
1289 | echo "$ac_t""no" 1>&6 | |
1290 | fi | |
1291 | ||
1292 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
0bbc026e | 1293 | echo "configure:1294: checking for ANSI C header files" >&5 |
c906108c SS |
1294 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1295 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1296 | else | |
1297 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1298 | #line 1299 "configure" |
c906108c SS |
1299 | #include "confdefs.h" |
1300 | #include <stdlib.h> | |
1301 | #include <stdarg.h> | |
1302 | #include <string.h> | |
1303 | #include <float.h> | |
1304 | EOF | |
1305 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 1306 | { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1307 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1308 | if test -z "$ac_err"; then | |
1309 | rm -rf conftest* | |
1310 | ac_cv_header_stdc=yes | |
1311 | else | |
1312 | echo "$ac_err" >&5 | |
1313 | echo "configure: failed program was:" >&5 | |
1314 | cat conftest.$ac_ext >&5 | |
1315 | rm -rf conftest* | |
1316 | ac_cv_header_stdc=no | |
1317 | fi | |
1318 | rm -f conftest* | |
1319 | ||
1320 | if test $ac_cv_header_stdc = yes; then | |
1321 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1322 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1323 | #line 1324 "configure" |
c906108c SS |
1324 | #include "confdefs.h" |
1325 | #include <string.h> | |
1326 | EOF | |
1327 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1328 | egrep "memchr" >/dev/null 2>&1; then | |
1329 | : | |
1330 | else | |
1331 | rm -rf conftest* | |
1332 | ac_cv_header_stdc=no | |
1333 | fi | |
1334 | rm -f conftest* | |
1335 | ||
1336 | fi | |
1337 | ||
1338 | if test $ac_cv_header_stdc = yes; then | |
1339 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1340 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1341 | #line 1342 "configure" |
c906108c SS |
1342 | #include "confdefs.h" |
1343 | #include <stdlib.h> | |
1344 | EOF | |
1345 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1346 | egrep "free" >/dev/null 2>&1; then | |
1347 | : | |
1348 | else | |
1349 | rm -rf conftest* | |
1350 | ac_cv_header_stdc=no | |
1351 | fi | |
1352 | rm -f conftest* | |
1353 | ||
1354 | fi | |
1355 | ||
1356 | if test $ac_cv_header_stdc = yes; then | |
1357 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1358 | if test "$cross_compiling" = yes; then | |
1359 | : | |
1360 | else | |
1361 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1362 | #line 1363 "configure" |
c906108c SS |
1363 | #include "confdefs.h" |
1364 | #include <ctype.h> | |
1365 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1366 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1367 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1368 | int main () { int i; for (i = 0; i < 256; i++) | |
1369 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1370 | exit (0); } | |
1371 | ||
1372 | EOF | |
0bbc026e | 1373 | if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1374 | then |
1375 | : | |
1376 | else | |
1377 | echo "configure: failed program was:" >&5 | |
1378 | cat conftest.$ac_ext >&5 | |
1379 | rm -fr conftest* | |
1380 | ac_cv_header_stdc=no | |
1381 | fi | |
1382 | rm -fr conftest* | |
1383 | fi | |
1384 | ||
1385 | fi | |
1386 | fi | |
1387 | ||
1388 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1389 | if test $ac_cv_header_stdc = yes; then | |
1390 | cat >> confdefs.h <<\EOF | |
1391 | #define STDC_HEADERS 1 | |
1392 | EOF | |
1393 | ||
1394 | fi | |
1395 | ||
1396 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
0bbc026e | 1397 | echo "configure:1398: checking for working const" >&5 |
c906108c SS |
1398 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1399 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1400 | else | |
1401 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1402 | #line 1403 "configure" |
c906108c SS |
1403 | #include "confdefs.h" |
1404 | ||
1405 | int main() { | |
1406 | ||
1407 | /* Ultrix mips cc rejects this. */ | |
1408 | typedef int charset[2]; const charset x; | |
1409 | /* SunOS 4.1.1 cc rejects this. */ | |
1410 | char const *const *ccp; | |
1411 | char **p; | |
1412 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1413 | struct point {int x, y;}; | |
1414 | static struct point const zero = {0,0}; | |
1415 | /* AIX XL C 1.02.0.0 rejects this. | |
1416 | It does not let you subtract one const X* pointer from another in an arm | |
1417 | of an if-expression whose if-part is not a constant expression */ | |
1418 | const char *g = "string"; | |
1419 | ccp = &g + (g ? g-g : 0); | |
1420 | /* HPUX 7.0 cc rejects these. */ | |
1421 | ++ccp; | |
1422 | p = (char**) ccp; | |
1423 | ccp = (char const *const *) p; | |
1424 | { /* SCO 3.2v4 cc rejects this. */ | |
1425 | char *t; | |
1426 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1427 | ||
1428 | *t++ = 0; | |
1429 | } | |
1430 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1431 | int x[] = {25, 17}; | |
1432 | const int *foo = &x[0]; | |
1433 | ++foo; | |
1434 | } | |
1435 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1436 | typedef const int *iptr; | |
1437 | iptr p = 0; | |
1438 | ++p; | |
1439 | } | |
1440 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1441 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1442 | struct s { int j; const int *ap[3]; }; | |
1443 | struct s *b; b->j = 5; | |
1444 | } | |
1445 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1446 | const int foo = 10; | |
1447 | } | |
1448 | ||
1449 | ; return 0; } | |
1450 | EOF | |
0bbc026e | 1451 | if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1452 | rm -rf conftest* |
1453 | ac_cv_c_const=yes | |
1454 | else | |
1455 | echo "configure: failed program was:" >&5 | |
1456 | cat conftest.$ac_ext >&5 | |
1457 | rm -rf conftest* | |
1458 | ac_cv_c_const=no | |
1459 | fi | |
1460 | rm -f conftest* | |
1461 | fi | |
1462 | ||
1463 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1464 | if test $ac_cv_c_const = no; then | |
1465 | cat >> confdefs.h <<\EOF | |
1466 | #define const | |
1467 | EOF | |
1468 | ||
1469 | fi | |
1470 | ||
1471 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
0bbc026e | 1472 | echo "configure:1473: checking for inline" >&5 |
c906108c SS |
1473 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1475 | else | |
1476 | ac_cv_c_inline=no | |
1477 | for ac_kw in inline __inline__ __inline; do | |
1478 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1479 | #line 1480 "configure" |
c906108c SS |
1480 | #include "confdefs.h" |
1481 | ||
1482 | int main() { | |
1483 | } $ac_kw foo() { | |
1484 | ; return 0; } | |
1485 | EOF | |
0bbc026e | 1486 | if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1487 | rm -rf conftest* |
1488 | ac_cv_c_inline=$ac_kw; break | |
1489 | else | |
1490 | echo "configure: failed program was:" >&5 | |
1491 | cat conftest.$ac_ext >&5 | |
1492 | fi | |
1493 | rm -f conftest* | |
1494 | done | |
1495 | ||
1496 | fi | |
1497 | ||
1498 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1499 | case "$ac_cv_c_inline" in | |
1500 | inline | yes) ;; | |
1501 | no) cat >> confdefs.h <<\EOF | |
1502 | #define inline | |
1503 | EOF | |
1504 | ;; | |
1505 | *) cat >> confdefs.h <<EOF | |
1506 | #define inline $ac_cv_c_inline | |
1507 | EOF | |
1508 | ;; | |
1509 | esac | |
1510 | ||
1511 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
0bbc026e | 1512 | echo "configure:1513: checking for off_t" >&5 |
c906108c SS |
1513 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1515 | else | |
1516 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1517 | #line 1518 "configure" |
c906108c SS |
1518 | #include "confdefs.h" |
1519 | #include <sys/types.h> | |
1520 | #if STDC_HEADERS | |
1521 | #include <stdlib.h> | |
1522 | #include <stddef.h> | |
1523 | #endif | |
1524 | EOF | |
1525 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1526 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1527 | rm -rf conftest* | |
1528 | ac_cv_type_off_t=yes | |
1529 | else | |
1530 | rm -rf conftest* | |
1531 | ac_cv_type_off_t=no | |
1532 | fi | |
1533 | rm -f conftest* | |
1534 | ||
1535 | fi | |
1536 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1537 | if test $ac_cv_type_off_t = no; then | |
1538 | cat >> confdefs.h <<\EOF | |
1539 | #define off_t long | |
1540 | EOF | |
1541 | ||
1542 | fi | |
1543 | ||
1544 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
0bbc026e | 1545 | echo "configure:1546: checking for size_t" >&5 |
c906108c SS |
1546 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1547 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1548 | else | |
1549 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1550 | #line 1551 "configure" |
c906108c SS |
1551 | #include "confdefs.h" |
1552 | #include <sys/types.h> | |
1553 | #if STDC_HEADERS | |
1554 | #include <stdlib.h> | |
1555 | #include <stddef.h> | |
1556 | #endif | |
1557 | EOF | |
1558 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1559 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1560 | rm -rf conftest* | |
1561 | ac_cv_type_size_t=yes | |
1562 | else | |
1563 | rm -rf conftest* | |
1564 | ac_cv_type_size_t=no | |
1565 | fi | |
1566 | rm -f conftest* | |
1567 | ||
1568 | fi | |
1569 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1570 | if test $ac_cv_type_size_t = no; then | |
1571 | cat >> confdefs.h <<\EOF | |
1572 | #define size_t unsigned | |
1573 | EOF | |
1574 | ||
1575 | fi | |
1576 | ||
1577 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1578 | # for constant arguments. Useless! | |
1579 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
0bbc026e | 1580 | echo "configure:1581: checking for working alloca.h" >&5 |
c906108c SS |
1581 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1583 | else | |
1584 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1585 | #line 1586 "configure" |
c906108c SS |
1586 | #include "confdefs.h" |
1587 | #include <alloca.h> | |
1588 | int main() { | |
1589 | char *p = alloca(2 * sizeof(int)); | |
1590 | ; return 0; } | |
1591 | EOF | |
0bbc026e | 1592 | if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1593 | rm -rf conftest* |
1594 | ac_cv_header_alloca_h=yes | |
1595 | else | |
1596 | echo "configure: failed program was:" >&5 | |
1597 | cat conftest.$ac_ext >&5 | |
1598 | rm -rf conftest* | |
1599 | ac_cv_header_alloca_h=no | |
1600 | fi | |
1601 | rm -f conftest* | |
1602 | fi | |
1603 | ||
1604 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1605 | if test $ac_cv_header_alloca_h = yes; then | |
1606 | cat >> confdefs.h <<\EOF | |
1607 | #define HAVE_ALLOCA_H 1 | |
1608 | EOF | |
1609 | ||
1610 | fi | |
1611 | ||
1612 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
0bbc026e | 1613 | echo "configure:1614: checking for alloca" >&5 |
c906108c SS |
1614 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1616 | else | |
1617 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1618 | #line 1619 "configure" |
c906108c SS |
1619 | #include "confdefs.h" |
1620 | ||
1621 | #ifdef __GNUC__ | |
1622 | # define alloca __builtin_alloca | |
1623 | #else | |
1624 | # ifdef _MSC_VER | |
1625 | # include <malloc.h> | |
1626 | # define alloca _alloca | |
1627 | # else | |
1628 | # if HAVE_ALLOCA_H | |
1629 | # include <alloca.h> | |
1630 | # else | |
1631 | # ifdef _AIX | |
1632 | #pragma alloca | |
1633 | # else | |
1634 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1635 | char *alloca (); | |
1636 | # endif | |
1637 | # endif | |
1638 | # endif | |
1639 | # endif | |
1640 | #endif | |
1641 | ||
1642 | int main() { | |
1643 | char *p = (char *) alloca(1); | |
1644 | ; return 0; } | |
1645 | EOF | |
0bbc026e | 1646 | if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1647 | rm -rf conftest* |
1648 | ac_cv_func_alloca_works=yes | |
1649 | else | |
1650 | echo "configure: failed program was:" >&5 | |
1651 | cat conftest.$ac_ext >&5 | |
1652 | rm -rf conftest* | |
1653 | ac_cv_func_alloca_works=no | |
1654 | fi | |
1655 | rm -f conftest* | |
1656 | fi | |
1657 | ||
1658 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1659 | if test $ac_cv_func_alloca_works = yes; then | |
1660 | cat >> confdefs.h <<\EOF | |
1661 | #define HAVE_ALLOCA 1 | |
1662 | EOF | |
1663 | ||
1664 | fi | |
1665 | ||
1666 | if test $ac_cv_func_alloca_works = no; then | |
1667 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1668 | # that cause trouble. Some versions do not even contain alloca or | |
1669 | # contain a buggy version. If you still want to use their alloca, | |
1670 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1671 | ALLOCA=alloca.${ac_objext} | |
1672 | cat >> confdefs.h <<\EOF | |
1673 | #define C_ALLOCA 1 | |
1674 | EOF | |
1675 | ||
1676 | ||
1677 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
0bbc026e | 1678 | echo "configure:1679: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1679 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1681 | else | |
1682 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1683 | #line 1684 "configure" |
c906108c SS |
1684 | #include "confdefs.h" |
1685 | #if defined(CRAY) && ! defined(CRAY2) | |
1686 | webecray | |
1687 | #else | |
1688 | wenotbecray | |
1689 | #endif | |
1690 | ||
1691 | EOF | |
1692 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1693 | egrep "webecray" >/dev/null 2>&1; then | |
1694 | rm -rf conftest* | |
1695 | ac_cv_os_cray=yes | |
1696 | else | |
1697 | rm -rf conftest* | |
1698 | ac_cv_os_cray=no | |
1699 | fi | |
1700 | rm -f conftest* | |
1701 | ||
1702 | fi | |
1703 | ||
1704 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1705 | if test $ac_cv_os_cray = yes; then | |
1706 | for ac_func in _getb67 GETB67 getb67; do | |
1707 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 1708 | echo "configure:1709: checking for $ac_func" >&5 |
c906108c SS |
1709 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1710 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1711 | else | |
1712 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1713 | #line 1714 "configure" |
c906108c SS |
1714 | #include "confdefs.h" |
1715 | /* System header to define __stub macros and hopefully few prototypes, | |
1716 | which can conflict with char $ac_func(); below. */ | |
1717 | #include <assert.h> | |
1718 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1719 | /* We use char because int might match the return type of a gcc2 | |
1720 | builtin and then its argument prototype would still apply. */ | |
1721 | char $ac_func(); | |
1722 | ||
1723 | int main() { | |
1724 | ||
1725 | /* The GNU C library defines this for functions which it implements | |
1726 | to always fail with ENOSYS. Some functions are actually named | |
1727 | something starting with __ and the normal name is an alias. */ | |
1728 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1729 | choke me | |
1730 | #else | |
1731 | $ac_func(); | |
1732 | #endif | |
1733 | ||
1734 | ; return 0; } | |
1735 | EOF | |
0bbc026e | 1736 | if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1737 | rm -rf conftest* |
1738 | eval "ac_cv_func_$ac_func=yes" | |
1739 | else | |
1740 | echo "configure: failed program was:" >&5 | |
1741 | cat conftest.$ac_ext >&5 | |
1742 | rm -rf conftest* | |
1743 | eval "ac_cv_func_$ac_func=no" | |
1744 | fi | |
1745 | rm -f conftest* | |
1746 | fi | |
1747 | ||
1748 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1749 | echo "$ac_t""yes" 1>&6 | |
1750 | cat >> confdefs.h <<EOF | |
1751 | #define CRAY_STACKSEG_END $ac_func | |
1752 | EOF | |
1753 | ||
1754 | break | |
1755 | else | |
1756 | echo "$ac_t""no" 1>&6 | |
1757 | fi | |
1758 | ||
1759 | done | |
1760 | fi | |
1761 | ||
1762 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
0bbc026e | 1763 | echo "configure:1764: checking stack direction for C alloca" >&5 |
c906108c SS |
1764 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1766 | else | |
1767 | if test "$cross_compiling" = yes; then | |
1768 | ac_cv_c_stack_direction=0 | |
1769 | else | |
1770 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1771 | #line 1772 "configure" |
c906108c SS |
1772 | #include "confdefs.h" |
1773 | find_stack_direction () | |
1774 | { | |
1775 | static char *addr = 0; | |
1776 | auto char dummy; | |
1777 | if (addr == 0) | |
1778 | { | |
1779 | addr = &dummy; | |
1780 | return find_stack_direction (); | |
1781 | } | |
1782 | else | |
1783 | return (&dummy > addr) ? 1 : -1; | |
1784 | } | |
1785 | main () | |
1786 | { | |
1787 | exit (find_stack_direction() < 0); | |
1788 | } | |
1789 | EOF | |
0bbc026e | 1790 | if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1791 | then |
1792 | ac_cv_c_stack_direction=1 | |
1793 | else | |
1794 | echo "configure: failed program was:" >&5 | |
1795 | cat conftest.$ac_ext >&5 | |
1796 | rm -fr conftest* | |
1797 | ac_cv_c_stack_direction=-1 | |
1798 | fi | |
1799 | rm -fr conftest* | |
1800 | fi | |
1801 | ||
1802 | fi | |
1803 | ||
1804 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1805 | cat >> confdefs.h <<EOF | |
1806 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1807 | EOF | |
1808 | ||
1809 | fi | |
1810 | ||
d836ee13 | 1811 | for ac_hdr in unistd.h |
c906108c SS |
1812 | do |
1813 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1814 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 1815 | echo "configure:1816: checking for $ac_hdr" >&5 |
c906108c SS |
1816 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1818 | else | |
1819 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1820 | #line 1821 "configure" |
c906108c SS |
1821 | #include "confdefs.h" |
1822 | #include <$ac_hdr> | |
1823 | EOF | |
1824 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 1825 | { (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1826 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1827 | if test -z "$ac_err"; then | |
1828 | rm -rf conftest* | |
1829 | eval "ac_cv_header_$ac_safe=yes" | |
1830 | else | |
1831 | echo "$ac_err" >&5 | |
1832 | echo "configure: failed program was:" >&5 | |
1833 | cat conftest.$ac_ext >&5 | |
1834 | rm -rf conftest* | |
1835 | eval "ac_cv_header_$ac_safe=no" | |
1836 | fi | |
1837 | rm -f conftest* | |
1838 | fi | |
1839 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1840 | echo "$ac_t""yes" 1>&6 | |
1841 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1842 | cat >> confdefs.h <<EOF | |
1843 | #define $ac_tr_hdr 1 | |
1844 | EOF | |
1845 | ||
1846 | else | |
1847 | echo "$ac_t""no" 1>&6 | |
1848 | fi | |
1849 | done | |
1850 | ||
1851 | for ac_func in getpagesize | |
1852 | do | |
1853 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 1854 | echo "configure:1855: checking for $ac_func" >&5 |
c906108c SS |
1855 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1857 | else | |
1858 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1859 | #line 1860 "configure" |
c906108c SS |
1860 | #include "confdefs.h" |
1861 | /* System header to define __stub macros and hopefully few prototypes, | |
1862 | which can conflict with char $ac_func(); below. */ | |
1863 | #include <assert.h> | |
1864 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1865 | /* We use char because int might match the return type of a gcc2 | |
1866 | builtin and then its argument prototype would still apply. */ | |
1867 | char $ac_func(); | |
1868 | ||
1869 | int main() { | |
1870 | ||
1871 | /* The GNU C library defines this for functions which it implements | |
1872 | to always fail with ENOSYS. Some functions are actually named | |
1873 | something starting with __ and the normal name is an alias. */ | |
1874 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1875 | choke me | |
1876 | #else | |
1877 | $ac_func(); | |
1878 | #endif | |
1879 | ||
1880 | ; return 0; } | |
1881 | EOF | |
0bbc026e | 1882 | if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1883 | rm -rf conftest* |
1884 | eval "ac_cv_func_$ac_func=yes" | |
1885 | else | |
1886 | echo "configure: failed program was:" >&5 | |
1887 | cat conftest.$ac_ext >&5 | |
1888 | rm -rf conftest* | |
1889 | eval "ac_cv_func_$ac_func=no" | |
1890 | fi | |
1891 | rm -f conftest* | |
1892 | fi | |
1893 | ||
1894 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1895 | echo "$ac_t""yes" 1>&6 | |
1896 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1897 | cat >> confdefs.h <<EOF | |
1898 | #define $ac_tr_func 1 | |
1899 | EOF | |
1900 | ||
1901 | else | |
1902 | echo "$ac_t""no" 1>&6 | |
1903 | fi | |
1904 | done | |
1905 | ||
1906 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
0bbc026e | 1907 | echo "configure:1908: checking for working mmap" >&5 |
c906108c SS |
1908 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1909 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1910 | else | |
1911 | if test "$cross_compiling" = yes; then | |
1912 | ac_cv_func_mmap_fixed_mapped=no | |
1913 | else | |
1914 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 1915 | #line 1916 "configure" |
c906108c SS |
1916 | #include "confdefs.h" |
1917 | ||
1918 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1919 | Here is a matrix of mmap possibilities: | |
1920 | mmap private not fixed | |
1921 | mmap private fixed at somewhere currently unmapped | |
1922 | mmap private fixed at somewhere already mapped | |
1923 | mmap shared not fixed | |
1924 | mmap shared fixed at somewhere currently unmapped | |
1925 | mmap shared fixed at somewhere already mapped | |
1926 | For private mappings, we should verify that changes cannot be read() | |
1927 | back from the file, nor mmap's back from the file at a different | |
1928 | address. (There have been systems where private was not correctly | |
1929 | implemented like the infamous i386 svr4.0, and systems where the | |
1930 | VM page cache was not coherent with the filesystem buffer cache | |
1931 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1932 | For shared mappings, we should conversely verify that changes get | |
1933 | propogated back to all the places they're supposed to be. | |
1934 | ||
1935 | Grep wants private fixed already mapped. | |
1936 | The main things grep needs to know about mmap are: | |
1937 | * does it exist and is it safe to write into the mmap'd area | |
1938 | * how to use it (BSD variants) */ | |
1939 | #include <sys/types.h> | |
1940 | #include <fcntl.h> | |
1941 | #include <sys/mman.h> | |
1942 | ||
1943 | /* This mess was copied from the GNU getpagesize.h. */ | |
1944 | #ifndef HAVE_GETPAGESIZE | |
d836ee13 AC |
1945 | # ifdef HAVE_UNISTD_H |
1946 | # include <unistd.h> | |
1947 | # endif | |
c906108c SS |
1948 | |
1949 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1950 | # ifndef HAVE_SYS_PARAM_H | |
1951 | # define HAVE_SYS_PARAM_H 1 | |
1952 | # endif | |
1953 | ||
1954 | # ifdef _SC_PAGESIZE | |
1955 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1956 | # else /* no _SC_PAGESIZE */ | |
1957 | # ifdef HAVE_SYS_PARAM_H | |
1958 | # include <sys/param.h> | |
1959 | # ifdef EXEC_PAGESIZE | |
1960 | # define getpagesize() EXEC_PAGESIZE | |
1961 | # else /* no EXEC_PAGESIZE */ | |
1962 | # ifdef NBPG | |
1963 | # define getpagesize() NBPG * CLSIZE | |
1964 | # ifndef CLSIZE | |
1965 | # define CLSIZE 1 | |
1966 | # endif /* no CLSIZE */ | |
1967 | # else /* no NBPG */ | |
1968 | # ifdef NBPC | |
1969 | # define getpagesize() NBPC | |
1970 | # else /* no NBPC */ | |
1971 | # ifdef PAGESIZE | |
1972 | # define getpagesize() PAGESIZE | |
1973 | # endif /* PAGESIZE */ | |
1974 | # endif /* no NBPC */ | |
1975 | # endif /* no NBPG */ | |
1976 | # endif /* no EXEC_PAGESIZE */ | |
1977 | # else /* no HAVE_SYS_PARAM_H */ | |
1978 | # define getpagesize() 8192 /* punt totally */ | |
1979 | # endif /* no HAVE_SYS_PARAM_H */ | |
1980 | # endif /* no _SC_PAGESIZE */ | |
1981 | ||
1982 | #endif /* no HAVE_GETPAGESIZE */ | |
1983 | ||
1984 | #ifdef __cplusplus | |
1985 | extern "C" { void *malloc(unsigned); } | |
1986 | #else | |
1987 | char *malloc(); | |
1988 | #endif | |
1989 | ||
1990 | int | |
1991 | main() | |
1992 | { | |
1993 | char *data, *data2, *data3; | |
1994 | int i, pagesize; | |
1995 | int fd; | |
1996 | ||
1997 | pagesize = getpagesize(); | |
1998 | ||
1999 | /* | |
2000 | * First, make a file with some known garbage in it. | |
2001 | */ | |
2002 | data = malloc(pagesize); | |
2003 | if (!data) | |
2004 | exit(1); | |
2005 | for (i = 0; i < pagesize; ++i) | |
2006 | *(data + i) = rand(); | |
2007 | umask(0); | |
2008 | fd = creat("conftestmmap", 0600); | |
2009 | if (fd < 0) | |
2010 | exit(1); | |
2011 | if (write(fd, data, pagesize) != pagesize) | |
2012 | exit(1); | |
2013 | close(fd); | |
2014 | ||
2015 | /* | |
2016 | * Next, try to mmap the file at a fixed address which | |
2017 | * already has something else allocated at it. If we can, | |
2018 | * also make sure that we see the same garbage. | |
2019 | */ | |
2020 | fd = open("conftestmmap", O_RDWR); | |
2021 | if (fd < 0) | |
2022 | exit(1); | |
2023 | data2 = malloc(2 * pagesize); | |
2024 | if (!data2) | |
2025 | exit(1); | |
2026 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2027 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2028 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2029 | exit(1); | |
2030 | for (i = 0; i < pagesize; ++i) | |
2031 | if (*(data + i) != *(data2 + i)) | |
2032 | exit(1); | |
2033 | ||
2034 | /* | |
2035 | * Finally, make sure that changes to the mapped area | |
2036 | * do not percolate back to the file as seen by read(). | |
2037 | * (This is a bug on some variants of i386 svr4.0.) | |
2038 | */ | |
2039 | for (i = 0; i < pagesize; ++i) | |
2040 | *(data2 + i) = *(data2 + i) + 1; | |
2041 | data3 = malloc(pagesize); | |
2042 | if (!data3) | |
2043 | exit(1); | |
2044 | if (read(fd, data3, pagesize) != pagesize) | |
2045 | exit(1); | |
2046 | for (i = 0; i < pagesize; ++i) | |
2047 | if (*(data + i) != *(data3 + i)) | |
2048 | exit(1); | |
2049 | close(fd); | |
2050 | unlink("conftestmmap"); | |
2051 | exit(0); | |
2052 | } | |
2053 | ||
2054 | EOF | |
0bbc026e | 2055 | if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2056 | then |
2057 | ac_cv_func_mmap_fixed_mapped=yes | |
2058 | else | |
2059 | echo "configure: failed program was:" >&5 | |
2060 | cat conftest.$ac_ext >&5 | |
2061 | rm -fr conftest* | |
2062 | ac_cv_func_mmap_fixed_mapped=no | |
2063 | fi | |
2064 | rm -fr conftest* | |
2065 | fi | |
2066 | ||
2067 | fi | |
2068 | ||
2069 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2070 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2071 | cat >> confdefs.h <<\EOF | |
2072 | #define HAVE_MMAP 1 | |
2073 | EOF | |
2074 | ||
2075 | fi | |
2076 | ||
2077 | ||
2078 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2079 | unistd.h values.h sys/param.h | |
2080 | do | |
2081 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2082 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 2083 | echo "configure:2084: checking for $ac_hdr" >&5 |
c906108c SS |
2084 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2086 | else | |
2087 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2088 | #line 2089 "configure" |
c906108c SS |
2089 | #include "confdefs.h" |
2090 | #include <$ac_hdr> | |
2091 | EOF | |
2092 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 2093 | { (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2094 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2095 | if test -z "$ac_err"; then | |
2096 | rm -rf conftest* | |
2097 | eval "ac_cv_header_$ac_safe=yes" | |
2098 | else | |
2099 | echo "$ac_err" >&5 | |
2100 | echo "configure: failed program was:" >&5 | |
2101 | cat conftest.$ac_ext >&5 | |
2102 | rm -rf conftest* | |
2103 | eval "ac_cv_header_$ac_safe=no" | |
2104 | fi | |
2105 | rm -f conftest* | |
2106 | fi | |
2107 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2108 | echo "$ac_t""yes" 1>&6 | |
2109 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2110 | cat >> confdefs.h <<EOF | |
2111 | #define $ac_tr_hdr 1 | |
2112 | EOF | |
2113 | ||
2114 | else | |
2115 | echo "$ac_t""no" 1>&6 | |
2116 | fi | |
2117 | done | |
2118 | ||
2119 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2120 | __argz_count __argz_stringify __argz_next | |
2121 | do | |
2122 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 2123 | echo "configure:2124: checking for $ac_func" >&5 |
c906108c SS |
2124 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2126 | else | |
2127 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2128 | #line 2129 "configure" |
c906108c SS |
2129 | #include "confdefs.h" |
2130 | /* System header to define __stub macros and hopefully few prototypes, | |
2131 | which can conflict with char $ac_func(); below. */ | |
2132 | #include <assert.h> | |
2133 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2134 | /* We use char because int might match the return type of a gcc2 | |
2135 | builtin and then its argument prototype would still apply. */ | |
2136 | char $ac_func(); | |
2137 | ||
2138 | int main() { | |
2139 | ||
2140 | /* The GNU C library defines this for functions which it implements | |
2141 | to always fail with ENOSYS. Some functions are actually named | |
2142 | something starting with __ and the normal name is an alias. */ | |
2143 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2144 | choke me | |
2145 | #else | |
2146 | $ac_func(); | |
2147 | #endif | |
2148 | ||
2149 | ; return 0; } | |
2150 | EOF | |
0bbc026e | 2151 | if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2152 | rm -rf conftest* |
2153 | eval "ac_cv_func_$ac_func=yes" | |
2154 | else | |
2155 | echo "configure: failed program was:" >&5 | |
2156 | cat conftest.$ac_ext >&5 | |
2157 | rm -rf conftest* | |
2158 | eval "ac_cv_func_$ac_func=no" | |
2159 | fi | |
2160 | rm -f conftest* | |
2161 | fi | |
2162 | ||
2163 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2164 | echo "$ac_t""yes" 1>&6 | |
2165 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2166 | cat >> confdefs.h <<EOF | |
2167 | #define $ac_tr_func 1 | |
2168 | EOF | |
2169 | ||
2170 | else | |
2171 | echo "$ac_t""no" 1>&6 | |
2172 | fi | |
2173 | done | |
2174 | ||
2175 | ||
2176 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2177 | for ac_func in stpcpy | |
2178 | do | |
2179 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 2180 | echo "configure:2181: checking for $ac_func" >&5 |
c906108c SS |
2181 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2182 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2183 | else | |
2184 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2185 | #line 2186 "configure" |
c906108c SS |
2186 | #include "confdefs.h" |
2187 | /* System header to define __stub macros and hopefully few prototypes, | |
2188 | which can conflict with char $ac_func(); below. */ | |
2189 | #include <assert.h> | |
2190 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2191 | /* We use char because int might match the return type of a gcc2 | |
2192 | builtin and then its argument prototype would still apply. */ | |
2193 | char $ac_func(); | |
2194 | ||
2195 | int main() { | |
2196 | ||
2197 | /* The GNU C library defines this for functions which it implements | |
2198 | to always fail with ENOSYS. Some functions are actually named | |
2199 | something starting with __ and the normal name is an alias. */ | |
2200 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2201 | choke me | |
2202 | #else | |
2203 | $ac_func(); | |
2204 | #endif | |
2205 | ||
2206 | ; return 0; } | |
2207 | EOF | |
0bbc026e | 2208 | if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2209 | rm -rf conftest* |
2210 | eval "ac_cv_func_$ac_func=yes" | |
2211 | else | |
2212 | echo "configure: failed program was:" >&5 | |
2213 | cat conftest.$ac_ext >&5 | |
2214 | rm -rf conftest* | |
2215 | eval "ac_cv_func_$ac_func=no" | |
2216 | fi | |
2217 | rm -f conftest* | |
2218 | fi | |
2219 | ||
2220 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2221 | echo "$ac_t""yes" 1>&6 | |
2222 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2223 | cat >> confdefs.h <<EOF | |
2224 | #define $ac_tr_func 1 | |
2225 | EOF | |
2226 | ||
2227 | else | |
2228 | echo "$ac_t""no" 1>&6 | |
2229 | fi | |
2230 | done | |
2231 | ||
2232 | fi | |
2233 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2234 | cat >> confdefs.h <<\EOF | |
2235 | #define HAVE_STPCPY 1 | |
2236 | EOF | |
2237 | ||
2238 | fi | |
2239 | ||
2240 | if test $ac_cv_header_locale_h = yes; then | |
2241 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
0bbc026e | 2242 | echo "configure:2243: checking for LC_MESSAGES" >&5 |
c906108c SS |
2243 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2244 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2245 | else | |
2246 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2247 | #line 2248 "configure" |
c906108c SS |
2248 | #include "confdefs.h" |
2249 | #include <locale.h> | |
2250 | int main() { | |
2251 | return LC_MESSAGES | |
2252 | ; return 0; } | |
2253 | EOF | |
0bbc026e | 2254 | if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2255 | rm -rf conftest* |
2256 | am_cv_val_LC_MESSAGES=yes | |
2257 | else | |
2258 | echo "configure: failed program was:" >&5 | |
2259 | cat conftest.$ac_ext >&5 | |
2260 | rm -rf conftest* | |
2261 | am_cv_val_LC_MESSAGES=no | |
2262 | fi | |
2263 | rm -f conftest* | |
2264 | fi | |
2265 | ||
2266 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2267 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2268 | cat >> confdefs.h <<\EOF | |
2269 | #define HAVE_LC_MESSAGES 1 | |
2270 | EOF | |
2271 | ||
2272 | fi | |
2273 | fi | |
2274 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
0bbc026e | 2275 | echo "configure:2276: checking whether NLS is requested" >&5 |
c906108c SS |
2276 | # Check whether --enable-nls or --disable-nls was given. |
2277 | if test "${enable_nls+set}" = set; then | |
2278 | enableval="$enable_nls" | |
2279 | USE_NLS=$enableval | |
2280 | else | |
2281 | USE_NLS=yes | |
2282 | fi | |
2283 | ||
2284 | echo "$ac_t""$USE_NLS" 1>&6 | |
2285 | ||
2286 | ||
2287 | USE_INCLUDED_LIBINTL=no | |
2288 | ||
2289 | if test "$USE_NLS" = "yes"; then | |
2290 | cat >> confdefs.h <<\EOF | |
2291 | #define ENABLE_NLS 1 | |
2292 | EOF | |
2293 | ||
2294 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
0bbc026e | 2295 | echo "configure:2296: checking whether included gettext is requested" >&5 |
c906108c SS |
2296 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2297 | if test "${with_included_gettext+set}" = set; then | |
2298 | withval="$with_included_gettext" | |
2299 | nls_cv_force_use_gnu_gettext=$withval | |
2300 | else | |
2301 | nls_cv_force_use_gnu_gettext=no | |
2302 | fi | |
2303 | ||
2304 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2305 | ||
2306 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2307 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2308 | nls_cv_header_intl= | |
2309 | nls_cv_header_libgt= | |
2310 | CATOBJEXT=NONE | |
2311 | ||
2312 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2313 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
0bbc026e | 2314 | echo "configure:2315: checking for libintl.h" >&5 |
c906108c SS |
2315 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2316 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2317 | else | |
2318 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2319 | #line 2320 "configure" |
c906108c SS |
2320 | #include "confdefs.h" |
2321 | #include <libintl.h> | |
2322 | EOF | |
2323 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 2324 | { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2325 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2326 | if test -z "$ac_err"; then | |
2327 | rm -rf conftest* | |
2328 | eval "ac_cv_header_$ac_safe=yes" | |
2329 | else | |
2330 | echo "$ac_err" >&5 | |
2331 | echo "configure: failed program was:" >&5 | |
2332 | cat conftest.$ac_ext >&5 | |
2333 | rm -rf conftest* | |
2334 | eval "ac_cv_header_$ac_safe=no" | |
2335 | fi | |
2336 | rm -f conftest* | |
2337 | fi | |
2338 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2339 | echo "$ac_t""yes" 1>&6 | |
2340 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
0bbc026e | 2341 | echo "configure:2342: checking for gettext in libc" >&5 |
c906108c SS |
2342 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2344 | else | |
2345 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2346 | #line 2347 "configure" |
c906108c SS |
2347 | #include "confdefs.h" |
2348 | #include <libintl.h> | |
2349 | int main() { | |
2350 | return (int) gettext ("") | |
2351 | ; return 0; } | |
2352 | EOF | |
0bbc026e | 2353 | if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2354 | rm -rf conftest* |
2355 | gt_cv_func_gettext_libc=yes | |
2356 | else | |
2357 | echo "configure: failed program was:" >&5 | |
2358 | cat conftest.$ac_ext >&5 | |
2359 | rm -rf conftest* | |
2360 | gt_cv_func_gettext_libc=no | |
2361 | fi | |
2362 | rm -f conftest* | |
2363 | fi | |
2364 | ||
2365 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2366 | ||
2367 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2368 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
0bbc026e | 2369 | echo "configure:2370: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2370 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2371 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2373 | else | |
2374 | ac_save_LIBS="$LIBS" | |
2375 | LIBS="-lintl $LIBS" | |
2376 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2377 | #line 2378 "configure" |
c906108c SS |
2378 | #include "confdefs.h" |
2379 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2380 | /* We use char because int might match the return type of a gcc2 | |
2381 | builtin and then its argument prototype would still apply. */ | |
2382 | char bindtextdomain(); | |
2383 | ||
2384 | int main() { | |
2385 | bindtextdomain() | |
2386 | ; return 0; } | |
2387 | EOF | |
0bbc026e | 2388 | if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2389 | rm -rf conftest* |
2390 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2391 | else | |
2392 | echo "configure: failed program was:" >&5 | |
2393 | cat conftest.$ac_ext >&5 | |
2394 | rm -rf conftest* | |
2395 | eval "ac_cv_lib_$ac_lib_var=no" | |
2396 | fi | |
2397 | rm -f conftest* | |
2398 | LIBS="$ac_save_LIBS" | |
2399 | ||
2400 | fi | |
2401 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2402 | echo "$ac_t""yes" 1>&6 | |
2403 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
0bbc026e | 2404 | echo "configure:2405: checking for gettext in libintl" >&5 |
c906108c SS |
2405 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2407 | else | |
2408 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2409 | #line 2410 "configure" |
c906108c SS |
2410 | #include "confdefs.h" |
2411 | ||
2412 | int main() { | |
2413 | return (int) gettext ("") | |
2414 | ; return 0; } | |
2415 | EOF | |
0bbc026e | 2416 | if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2417 | rm -rf conftest* |
2418 | gt_cv_func_gettext_libintl=yes | |
2419 | else | |
2420 | echo "configure: failed program was:" >&5 | |
2421 | cat conftest.$ac_ext >&5 | |
2422 | rm -rf conftest* | |
2423 | gt_cv_func_gettext_libintl=no | |
2424 | fi | |
2425 | rm -f conftest* | |
2426 | fi | |
2427 | ||
2428 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2429 | else | |
2430 | echo "$ac_t""no" 1>&6 | |
2431 | fi | |
2432 | ||
2433 | fi | |
2434 | ||
2435 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2436 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2437 | cat >> confdefs.h <<\EOF | |
2438 | #define HAVE_GETTEXT 1 | |
2439 | EOF | |
2440 | ||
2441 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2442 | set dummy msgfmt; ac_word=$2 | |
2443 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 2444 | echo "configure:2445: checking for $ac_word" >&5 |
c906108c SS |
2445 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2447 | else | |
2448 | case "$MSGFMT" in | |
2449 | /*) | |
2450 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2451 | ;; | |
2452 | *) | |
2453 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2454 | for ac_dir in $PATH; do | |
2455 | test -z "$ac_dir" && ac_dir=. | |
2456 | if test -f $ac_dir/$ac_word; then | |
2457 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2458 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2459 | break | |
2460 | fi | |
2461 | fi | |
2462 | done | |
2463 | IFS="$ac_save_ifs" | |
2464 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2465 | ;; | |
2466 | esac | |
2467 | fi | |
2468 | MSGFMT="$ac_cv_path_MSGFMT" | |
2469 | if test -n "$MSGFMT"; then | |
2470 | echo "$ac_t""$MSGFMT" 1>&6 | |
2471 | else | |
2472 | echo "$ac_t""no" 1>&6 | |
2473 | fi | |
2474 | if test "$MSGFMT" != "no"; then | |
2475 | for ac_func in dcgettext | |
2476 | do | |
2477 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 2478 | echo "configure:2479: checking for $ac_func" >&5 |
c906108c SS |
2479 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2481 | else | |
2482 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2483 | #line 2484 "configure" |
c906108c SS |
2484 | #include "confdefs.h" |
2485 | /* System header to define __stub macros and hopefully few prototypes, | |
2486 | which can conflict with char $ac_func(); below. */ | |
2487 | #include <assert.h> | |
2488 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2489 | /* We use char because int might match the return type of a gcc2 | |
2490 | builtin and then its argument prototype would still apply. */ | |
2491 | char $ac_func(); | |
2492 | ||
2493 | int main() { | |
2494 | ||
2495 | /* The GNU C library defines this for functions which it implements | |
2496 | to always fail with ENOSYS. Some functions are actually named | |
2497 | something starting with __ and the normal name is an alias. */ | |
2498 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2499 | choke me | |
2500 | #else | |
2501 | $ac_func(); | |
2502 | #endif | |
2503 | ||
2504 | ; return 0; } | |
2505 | EOF | |
0bbc026e | 2506 | if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2507 | rm -rf conftest* |
2508 | eval "ac_cv_func_$ac_func=yes" | |
2509 | else | |
2510 | echo "configure: failed program was:" >&5 | |
2511 | cat conftest.$ac_ext >&5 | |
2512 | rm -rf conftest* | |
2513 | eval "ac_cv_func_$ac_func=no" | |
2514 | fi | |
2515 | rm -f conftest* | |
2516 | fi | |
2517 | ||
2518 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2519 | echo "$ac_t""yes" 1>&6 | |
2520 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2521 | cat >> confdefs.h <<EOF | |
2522 | #define $ac_tr_func 1 | |
2523 | EOF | |
2524 | ||
2525 | else | |
2526 | echo "$ac_t""no" 1>&6 | |
2527 | fi | |
2528 | done | |
2529 | ||
2530 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2531 | set dummy gmsgfmt; ac_word=$2 | |
2532 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 2533 | echo "configure:2534: checking for $ac_word" >&5 |
c906108c SS |
2534 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2536 | else | |
2537 | case "$GMSGFMT" in | |
2538 | /*) | |
2539 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2540 | ;; | |
2541 | ?:/*) | |
2542 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2543 | ;; | |
2544 | *) | |
2545 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2546 | ac_dummy="$PATH" | |
2547 | for ac_dir in $ac_dummy; do | |
2548 | test -z "$ac_dir" && ac_dir=. | |
2549 | if test -f $ac_dir/$ac_word; then | |
2550 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2551 | break | |
2552 | fi | |
2553 | done | |
2554 | IFS="$ac_save_ifs" | |
2555 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2556 | ;; | |
2557 | esac | |
2558 | fi | |
2559 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2560 | if test -n "$GMSGFMT"; then | |
2561 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2562 | else | |
2563 | echo "$ac_t""no" 1>&6 | |
2564 | fi | |
2565 | ||
2566 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2567 | set dummy xgettext; ac_word=$2 | |
2568 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 2569 | echo "configure:2570: checking for $ac_word" >&5 |
c906108c SS |
2570 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2572 | else | |
2573 | case "$XGETTEXT" in | |
2574 | /*) | |
2575 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2576 | ;; | |
2577 | *) | |
2578 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2579 | for ac_dir in $PATH; do | |
2580 | test -z "$ac_dir" && ac_dir=. | |
2581 | if test -f $ac_dir/$ac_word; then | |
2582 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2583 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2584 | break | |
2585 | fi | |
2586 | fi | |
2587 | done | |
2588 | IFS="$ac_save_ifs" | |
2589 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2590 | ;; | |
2591 | esac | |
2592 | fi | |
2593 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2594 | if test -n "$XGETTEXT"; then | |
2595 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2596 | else | |
2597 | echo "$ac_t""no" 1>&6 | |
2598 | fi | |
2599 | ||
2600 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2601 | #line 2602 "configure" |
c906108c SS |
2602 | #include "confdefs.h" |
2603 | ||
2604 | int main() { | |
2605 | extern int _nl_msg_cat_cntr; | |
2606 | return _nl_msg_cat_cntr | |
2607 | ; return 0; } | |
2608 | EOF | |
0bbc026e | 2609 | if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2610 | rm -rf conftest* |
2611 | CATOBJEXT=.gmo | |
2612 | DATADIRNAME=share | |
2613 | else | |
2614 | echo "configure: failed program was:" >&5 | |
2615 | cat conftest.$ac_ext >&5 | |
2616 | rm -rf conftest* | |
2617 | CATOBJEXT=.mo | |
2618 | DATADIRNAME=lib | |
2619 | fi | |
2620 | rm -f conftest* | |
2621 | INSTOBJEXT=.mo | |
2622 | fi | |
2623 | fi | |
2624 | ||
2625 | else | |
2626 | echo "$ac_t""no" 1>&6 | |
2627 | fi | |
2628 | ||
2629 | ||
2630 | ||
2631 | if test "$CATOBJEXT" = "NONE"; then | |
2632 | nls_cv_use_gnu_gettext=yes | |
2633 | fi | |
2634 | fi | |
2635 | ||
2636 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2637 | INTLOBJS="\$(GETTOBJS)" | |
2638 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2639 | set dummy msgfmt; ac_word=$2 | |
2640 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 2641 | echo "configure:2642: checking for $ac_word" >&5 |
c906108c SS |
2642 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2644 | else | |
2645 | case "$MSGFMT" in | |
2646 | /*) | |
2647 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2648 | ;; | |
2649 | *) | |
2650 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2651 | for ac_dir in $PATH; do | |
2652 | test -z "$ac_dir" && ac_dir=. | |
2653 | if test -f $ac_dir/$ac_word; then | |
2654 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2655 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2656 | break | |
2657 | fi | |
2658 | fi | |
2659 | done | |
2660 | IFS="$ac_save_ifs" | |
2661 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2662 | ;; | |
2663 | esac | |
2664 | fi | |
2665 | MSGFMT="$ac_cv_path_MSGFMT" | |
2666 | if test -n "$MSGFMT"; then | |
2667 | echo "$ac_t""$MSGFMT" 1>&6 | |
2668 | else | |
2669 | echo "$ac_t""no" 1>&6 | |
2670 | fi | |
2671 | ||
2672 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2673 | set dummy gmsgfmt; ac_word=$2 | |
2674 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 2675 | echo "configure:2676: checking for $ac_word" >&5 |
c906108c SS |
2676 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2678 | else | |
2679 | case "$GMSGFMT" in | |
2680 | /*) | |
2681 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2682 | ;; | |
2683 | ?:/*) | |
2684 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2685 | ;; | |
2686 | *) | |
2687 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2688 | ac_dummy="$PATH" | |
2689 | for ac_dir in $ac_dummy; do | |
2690 | test -z "$ac_dir" && ac_dir=. | |
2691 | if test -f $ac_dir/$ac_word; then | |
2692 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2693 | break | |
2694 | fi | |
2695 | done | |
2696 | IFS="$ac_save_ifs" | |
2697 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2698 | ;; | |
2699 | esac | |
2700 | fi | |
2701 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2702 | if test -n "$GMSGFMT"; then | |
2703 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2704 | else | |
2705 | echo "$ac_t""no" 1>&6 | |
2706 | fi | |
2707 | ||
2708 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2709 | set dummy xgettext; ac_word=$2 | |
2710 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 2711 | echo "configure:2712: checking for $ac_word" >&5 |
c906108c SS |
2712 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2713 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2714 | else | |
2715 | case "$XGETTEXT" in | |
2716 | /*) | |
2717 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2718 | ;; | |
2719 | *) | |
2720 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2721 | for ac_dir in $PATH; do | |
2722 | test -z "$ac_dir" && ac_dir=. | |
2723 | if test -f $ac_dir/$ac_word; then | |
2724 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2725 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2726 | break | |
2727 | fi | |
2728 | fi | |
2729 | done | |
2730 | IFS="$ac_save_ifs" | |
2731 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2732 | ;; | |
2733 | esac | |
2734 | fi | |
2735 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2736 | if test -n "$XGETTEXT"; then | |
2737 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2738 | else | |
2739 | echo "$ac_t""no" 1>&6 | |
2740 | fi | |
2741 | ||
2742 | ||
2743 | USE_INCLUDED_LIBINTL=yes | |
2744 | CATOBJEXT=.gmo | |
2745 | INSTOBJEXT=.mo | |
2746 | DATADIRNAME=share | |
2747 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2748 | INTLLIBS=$INTLDEPS | |
2749 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2750 | nls_cv_header_intl=libintl.h | |
2751 | nls_cv_header_libgt=libgettext.h | |
2752 | fi | |
2753 | ||
2754 | if test "$XGETTEXT" != ":"; then | |
2755 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2756 | : ; | |
2757 | else | |
2758 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2759 | XGETTEXT=":" | |
2760 | fi | |
2761 | fi | |
2762 | ||
2763 | # We need to process the po/ directory. | |
2764 | POSUB=po | |
2765 | else | |
2766 | DATADIRNAME=share | |
2767 | nls_cv_header_intl=libintl.h | |
2768 | nls_cv_header_libgt=libgettext.h | |
2769 | fi | |
2770 | ||
2771 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2772 | # because some of the sources are only built for this goal. | |
2773 | if test "$PACKAGE" = gettext; then | |
2774 | USE_NLS=yes | |
2775 | USE_INCLUDED_LIBINTL=yes | |
2776 | fi | |
2777 | ||
2778 | for lang in $ALL_LINGUAS; do | |
2779 | GMOFILES="$GMOFILES $lang.gmo" | |
2780 | POFILES="$POFILES $lang.po" | |
2781 | done | |
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | ||
2792 | ||
2793 | ||
2794 | ||
2795 | ||
2796 | if test "x$CATOBJEXT" != "x"; then | |
2797 | if test "x$ALL_LINGUAS" = "x"; then | |
2798 | LINGUAS= | |
2799 | else | |
2800 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
0bbc026e | 2801 | echo "configure:2802: checking for catalogs to be installed" >&5 |
c906108c SS |
2802 | NEW_LINGUAS= |
2803 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2804 | case "$ALL_LINGUAS" in | |
2805 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2806 | esac | |
2807 | done | |
2808 | LINGUAS=$NEW_LINGUAS | |
2809 | echo "$ac_t""$LINGUAS" 1>&6 | |
2810 | fi | |
2811 | ||
2812 | if test -n "$LINGUAS"; then | |
2813 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2814 | fi | |
2815 | fi | |
2816 | ||
2817 | if test $ac_cv_header_locale_h = yes; then | |
2818 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2819 | else | |
2820 | INCLUDE_LOCALE_H="\ | |
2821 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2822 | fi | |
2823 | ||
2824 | ||
2825 | if test -f $srcdir/po2tbl.sed.in; then | |
2826 | if test "$CATOBJEXT" = ".cat"; then | |
2827 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2828 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
0bbc026e | 2829 | echo "configure:2830: checking for linux/version.h" >&5 |
c906108c SS |
2830 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2831 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2832 | else | |
2833 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 2834 | #line 2835 "configure" |
c906108c SS |
2835 | #include "confdefs.h" |
2836 | #include <linux/version.h> | |
2837 | EOF | |
2838 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 2839 | { (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2840 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2841 | if test -z "$ac_err"; then | |
2842 | rm -rf conftest* | |
2843 | eval "ac_cv_header_$ac_safe=yes" | |
2844 | else | |
2845 | echo "$ac_err" >&5 | |
2846 | echo "configure: failed program was:" >&5 | |
2847 | cat conftest.$ac_ext >&5 | |
2848 | rm -rf conftest* | |
2849 | eval "ac_cv_header_$ac_safe=no" | |
2850 | fi | |
2851 | rm -f conftest* | |
2852 | fi | |
2853 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2854 | echo "$ac_t""yes" 1>&6 | |
2855 | msgformat=linux | |
2856 | else | |
2857 | echo "$ac_t""no" 1>&6 | |
2858 | msgformat=xopen | |
2859 | fi | |
2860 | ||
2861 | ||
2862 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2863 | fi | |
2864 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2865 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2866 | fi | |
2867 | ||
2868 | if test "$PACKAGE" = "gettext"; then | |
2869 | GT_NO="#NO#" | |
2870 | GT_YES= | |
2871 | else | |
2872 | GT_NO= | |
2873 | GT_YES="#YES#" | |
2874 | fi | |
2875 | ||
2876 | ||
2877 | ||
2878 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2879 | ||
2880 | ||
2881 | l= | |
2882 | ||
2883 | ||
4536bbc6 | 2884 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2885 | test -d po || mkdir po |
2886 | if test "x$srcdir" != "x."; then | |
2887 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2888 | posrcprefix="$srcdir/" | |
2889 | else | |
2890 | posrcprefix="../$srcdir/" | |
2891 | fi | |
2892 | else | |
2893 | posrcprefix="../" | |
2894 | fi | |
2895 | rm -f po/POTFILES | |
2896 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2897 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2898 | fi | |
2899 | ||
ddc9cd0f AC |
2900 | |
2901 | localedir='${datadir}/locale' | |
2902 | ||
2903 | ||
2904 | if test "x$POSUB" != x; then | |
2905 | ||
2906 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
0bbc026e | 2907 | echo "configure:2908: checking for catalogs to be installed" >&5 |
ddc9cd0f AC |
2908 | # Look for .po and .gmo files in the source directory. |
2909 | CATALOGS= | |
2910 | XLINGUAS= | |
2911 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
2912 | # If there aren't any .gmo files the shell will give us the | |
2913 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
2914 | # weeded out. | |
2915 | case "$cat" in *\**) | |
2916 | continue;; | |
2917 | esac | |
2918 | # The quadruple backslash is collapsed to a double backslash | |
2919 | # by the backticks, then collapsed again by the double quotes, | |
2920 | # leaving us with one backslash in the sed expression (right | |
2921 | # before the dot that mustn't act as a wildcard). | |
2922 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
2923 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
2924 | # The user is allowed to set LINGUAS to a list of languages to | |
2925 | # install catalogs for. If it's empty that means "all of them." | |
2926 | if test "x$LINGUAS" = x; then | |
2927 | CATALOGS="$CATALOGS $cat" | |
2928 | XLINGUAS="$XLINGUAS $lang" | |
2929 | else | |
2930 | case "$LINGUAS" in *$lang*) | |
2931 | CATALOGS="$CATALOGS $cat" | |
2932 | XLINGUAS="$XLINGUAS $lang" | |
2933 | ;; | |
2934 | esac | |
2935 | fi | |
2936 | done | |
2937 | LINGUAS="$XLINGUAS" | |
2938 | echo "$ac_t""$LINGUAS" 1>&6 | |
2939 | ||
2940 | CONFIG_ALL="$CONFIG_ALL all-po" | |
2941 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
2942 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
2943 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
2944 | fi | |
2945 | ||
2946 | PACKAGE=gdb | |
2947 | cat >> confdefs.h <<EOF | |
2948 | #define PACKAGE "$PACKAGE" | |
0fbb3da7 TT |
2949 | EOF |
2950 | ||
2951 | ||
ddc9cd0f | 2952 | |
5b5d99cf JB |
2953 | debugdir=${libdir}/debug |
2954 | ||
2955 | # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given. | |
2956 | if test "${with_separate_debug_dir+set}" = set; then | |
2957 | withval="$with_separate_debug_dir" | |
2958 | debugdir="${withval}" | |
2959 | fi | |
2960 | ||
2961 | ||
2962 | ||
2963 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
2964 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2965 | ac_define_dir=`eval echo $debugdir` | |
2966 | ac_define_dir=`eval echo $ac_define_dir` | |
2967 | cat >> confdefs.h <<EOF | |
2968 | #define DEBUGDIR "$ac_define_dir" | |
2969 | EOF | |
2970 | ||
2971 | ||
2972 | #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"), | |
c906108c | 2973 | |
8dcde887 | 2974 | subdirs="doc testsuite" |
96baa820 | 2975 | |
8dcde887 | 2976 | configdirs= |
96baa820 | 2977 | |
27e9bf90 | 2978 | . $srcdir/configure.host |
c906108c | 2979 | |
27e9bf90 | 2980 | . $srcdir/configure.tgt |
c906108c | 2981 | |
27e9bf90 MK |
2982 | # Fetch the default architecture and default target vector from BFD. |
2983 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2984 | |
27e9bf90 MK |
2985 | # We only want the first architecture, so strip off the others if |
2986 | # there is more than one. | |
2987 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2988 | |
27e9bf90 MK |
2989 | if test "x$targ_archs" != x; then |
2990 | cat >> confdefs.h <<EOF | |
2991 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2992 | EOF |
2993 | ||
2994 | fi | |
27e9bf90 MK |
2995 | if test "x$targ_defvec" != x; then |
2996 | cat >> confdefs.h <<EOF | |
2997 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2998 | EOF |
2999 | ||
3000 | fi | |
c906108c | 3001 | |
8bb2c122 MK |
3002 | if test "$program_transform_name" = s,x,x,; then |
3003 | program_transform_name= | |
3004 | else | |
3005 | # Double any \ or $. echo might interpret backslashes. | |
3006 | cat <<\EOF_SED > conftestsed | |
3007 | s,\\,\\\\,g; s,\$,$$,g | |
3008 | EOF_SED | |
3009 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3010 | rm -f conftestsed | |
3011 | fi | |
3012 | test "$program_prefix" != NONE && | |
3013 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3014 | # Use a double $ so make ignores it. | |
3015 | test "$program_suffix" != NONE && | |
3016 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3017 | ||
3018 | # sed with no file args requires a program. | |
3019 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3020 | ||
3021 | ||
627af7ea MK |
3022 | # The CLI cannot be disabled yet, but may be in the future. |
3023 | ||
3024 | # Enable CLI. | |
3025 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
3026 | if test "${enable_gdbcli+set}" = set; then | |
3027 | enableval="$enable_gdbcli" | |
3028 | case $enableval in | |
3029 | yes) | |
3030 | ;; | |
3031 | no) | |
3032 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
3033 | *) | |
3034 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
3035 | esac | |
3036 | else | |
3037 | enable_gdbcli=yes | |
3038 | fi | |
3039 | ||
3040 | if test x"$enable_gdbcli" = xyes; then | |
3041 | if test -d $srcdir/cli; then | |
3042 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
3043 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
3044 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
627af7ea | 3045 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" |
627af7ea MK |
3046 | fi |
3047 | fi | |
3048 | ||
3049 | # Enable MI. | |
3050 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
3051 | if test "${enable_gdbmi+set}" = set; then | |
3052 | enableval="$enable_gdbmi" | |
3053 | case $enableval in | |
3054 | yes | no) | |
3055 | ;; | |
3056 | *) | |
3057 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3058 | esac | |
3059 | else | |
3060 | enable_gdbmi=yes | |
3061 | fi | |
3062 | ||
3063 | if test x"$enable_gdbmi" = xyes; then | |
3064 | if test -d $srcdir/mi; then | |
3065 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3066 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3067 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
627af7ea | 3068 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" |
627af7ea MK |
3069 | fi |
3070 | fi | |
3071 | ||
06825bd1 MK |
3072 | # Enable TUI. |
3073 | # Check whether --enable-tui or --disable-tui was given. | |
3074 | if test "${enable_tui+set}" = set; then | |
3075 | enableval="$enable_tui" | |
3076 | case $enableval in | |
3077 | yes | no) | |
3078 | ;; | |
3079 | *) | |
3080 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3081 | esac | |
c324d747 AC |
3082 | else |
3083 | enable_tui=yes | |
06825bd1 MK |
3084 | fi |
3085 | ||
06825bd1 | 3086 | |
8ee53726 MK |
3087 | # Enable gdbtk. |
3088 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3089 | if test "${enable_gdbtk+set}" = set; then | |
3090 | enableval="$enable_gdbtk" | |
3091 | case $enableval in | |
3092 | yes | no) | |
3093 | ;; | |
3094 | *) | |
3095 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3096 | esac | |
3097 | else | |
3098 | if test -d $srcdir/gdbtk; then | |
3099 | enable_gdbtk=yes | |
3100 | else | |
3101 | enable_gdbtk=no | |
3102 | fi | |
3103 | fi | |
3104 | ||
3105 | # We unconditionally disable gdbtk tests on selected platforms. | |
3106 | case $host_os in | |
3107 | go32* | windows*) | |
3108 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3109 | enable_gdbtk=no ;; | |
3110 | esac | |
3111 | ||
0e5d83e3 JJ |
3112 | # Libunwind support. |
3113 | # Check whether --with-libunwind or --without-libunwind was given. | |
3114 | if test "${with_libunwind+set}" = set; then | |
3115 | withval="$with_libunwind" | |
3116 | case "${withval}" in | |
3117 | yes) enable_libunwind=yes ;; | |
3118 | no) enable_libunwind=no ;; | |
3119 | *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;; | |
3120 | esac | |
3121 | else | |
3122 | ||
3123 | for ac_hdr in libunwind.h | |
3124 | do | |
3125 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3126 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 3127 | echo "configure:3128: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3128 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3129 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3130 | else | |
3131 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3132 | #line 3133 "configure" |
0e5d83e3 JJ |
3133 | #include "confdefs.h" |
3134 | #include <$ac_hdr> | |
3135 | EOF | |
3136 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 3137 | { (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3138 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3139 | if test -z "$ac_err"; then | |
3140 | rm -rf conftest* | |
3141 | eval "ac_cv_header_$ac_safe=yes" | |
3142 | else | |
3143 | echo "$ac_err" >&5 | |
3144 | echo "configure: failed program was:" >&5 | |
3145 | cat conftest.$ac_ext >&5 | |
3146 | rm -rf conftest* | |
3147 | eval "ac_cv_header_$ac_safe=no" | |
3148 | fi | |
3149 | rm -f conftest* | |
3150 | fi | |
3151 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3152 | echo "$ac_t""yes" 1>&6 | |
3153 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3154 | cat >> confdefs.h <<EOF | |
3155 | #define $ac_tr_hdr 1 | |
3156 | EOF | |
3157 | ||
3158 | else | |
3159 | echo "$ac_t""no" 1>&6 | |
3160 | fi | |
3161 | done | |
3162 | ||
3163 | for ac_hdr in libunwind-ia64.h | |
3164 | do | |
3165 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3166 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 3167 | echo "configure:3168: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3168 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3170 | else | |
3171 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3172 | #line 3173 "configure" |
0e5d83e3 JJ |
3173 | #include "confdefs.h" |
3174 | #include <$ac_hdr> | |
3175 | EOF | |
3176 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 3177 | { (eval echo configure:3178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3178 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3179 | if test -z "$ac_err"; then | |
3180 | rm -rf conftest* | |
3181 | eval "ac_cv_header_$ac_safe=yes" | |
3182 | else | |
3183 | echo "$ac_err" >&5 | |
3184 | echo "configure: failed program was:" >&5 | |
3185 | cat conftest.$ac_ext >&5 | |
3186 | rm -rf conftest* | |
3187 | eval "ac_cv_header_$ac_safe=no" | |
3188 | fi | |
3189 | rm -f conftest* | |
3190 | fi | |
3191 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3192 | echo "$ac_t""yes" 1>&6 | |
3193 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3194 | cat >> confdefs.h <<EOF | |
3195 | #define $ac_tr_hdr 1 | |
3196 | EOF | |
3197 | ||
3198 | else | |
3199 | echo "$ac_t""no" 1>&6 | |
3200 | fi | |
3201 | done | |
3202 | ||
3203 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then | |
3204 | enable_libunwind=yes; | |
3205 | fi | |
3206 | ||
3207 | fi | |
3208 | ||
3209 | ||
3210 | if test x"$enable_libunwind" = xyes; then | |
3211 | for ac_hdr in libunwind.h | |
3212 | do | |
3213 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3214 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 3215 | echo "configure:3216: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3216 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3217 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3218 | else | |
3219 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3220 | #line 3221 "configure" |
0e5d83e3 JJ |
3221 | #include "confdefs.h" |
3222 | #include <$ac_hdr> | |
3223 | EOF | |
3224 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 3225 | { (eval echo configure:3226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3226 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3227 | if test -z "$ac_err"; then | |
3228 | rm -rf conftest* | |
3229 | eval "ac_cv_header_$ac_safe=yes" | |
3230 | else | |
3231 | echo "$ac_err" >&5 | |
3232 | echo "configure: failed program was:" >&5 | |
3233 | cat conftest.$ac_ext >&5 | |
3234 | rm -rf conftest* | |
3235 | eval "ac_cv_header_$ac_safe=no" | |
3236 | fi | |
3237 | rm -f conftest* | |
3238 | fi | |
3239 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3240 | echo "$ac_t""yes" 1>&6 | |
3241 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3242 | cat >> confdefs.h <<EOF | |
3243 | #define $ac_tr_hdr 1 | |
3244 | EOF | |
3245 | ||
3246 | else | |
3247 | echo "$ac_t""no" 1>&6 | |
3248 | fi | |
3249 | done | |
3250 | ||
3251 | for ac_hdr in libunwind-ia64.h | |
3252 | do | |
3253 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3254 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 3255 | echo "configure:3256: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3256 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3257 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3258 | else | |
3259 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3260 | #line 3261 "configure" |
0e5d83e3 JJ |
3261 | #include "confdefs.h" |
3262 | #include <$ac_hdr> | |
3263 | EOF | |
3264 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 3265 | { (eval echo configure:3266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3266 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3267 | if test -z "$ac_err"; then | |
3268 | rm -rf conftest* | |
3269 | eval "ac_cv_header_$ac_safe=yes" | |
3270 | else | |
3271 | echo "$ac_err" >&5 | |
3272 | echo "configure: failed program was:" >&5 | |
3273 | cat conftest.$ac_ext >&5 | |
3274 | rm -rf conftest* | |
3275 | eval "ac_cv_header_$ac_safe=no" | |
3276 | fi | |
3277 | rm -f conftest* | |
3278 | fi | |
3279 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3280 | echo "$ac_t""yes" 1>&6 | |
3281 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3282 | cat >> confdefs.h <<EOF | |
3283 | #define $ac_tr_hdr 1 | |
3284 | EOF | |
3285 | ||
3286 | else | |
3287 | echo "$ac_t""no" 1>&6 | |
3288 | fi | |
3289 | done | |
3290 | ||
3291 | cat >> confdefs.h <<\EOF | |
3292 | #define HAVE_LIBUNWIND 1 | |
3293 | EOF | |
3294 | ||
3295 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
3296 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
3297 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
3298 | fi | |
3299 | ||
d28f9cdf DJ |
3300 | # Profiling support. |
3301 | # Check whether --enable-profiling or --disable-profiling was given. | |
3302 | if test "${enable_profiling+set}" = set; then | |
3303 | enableval="$enable_profiling" | |
3304 | case $enableval in | |
3305 | yes | no) | |
3306 | ;; | |
3307 | *) | |
3308 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3309 | esac | |
3310 | else | |
3311 | enable_profiling=no | |
3312 | fi | |
3313 | ||
3314 | ||
d9feb4e7 DJ |
3315 | for ac_func in monstartup _mcleanup |
3316 | do | |
3317 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 3318 | echo "configure:3319: checking for $ac_func" >&5 |
d9feb4e7 | 3319 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
d28f9cdf DJ |
3320 | echo $ac_n "(cached) $ac_c" 1>&6 |
3321 | else | |
3322 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3323 | #line 3324 "configure" |
d28f9cdf DJ |
3324 | #include "confdefs.h" |
3325 | /* System header to define __stub macros and hopefully few prototypes, | |
d9feb4e7 | 3326 | which can conflict with char $ac_func(); below. */ |
d28f9cdf DJ |
3327 | #include <assert.h> |
3328 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3329 | /* We use char because int might match the return type of a gcc2 | |
3330 | builtin and then its argument prototype would still apply. */ | |
d9feb4e7 | 3331 | char $ac_func(); |
d28f9cdf DJ |
3332 | |
3333 | int main() { | |
3334 | ||
3335 | /* The GNU C library defines this for functions which it implements | |
3336 | to always fail with ENOSYS. Some functions are actually named | |
3337 | something starting with __ and the normal name is an alias. */ | |
d9feb4e7 | 3338 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
d28f9cdf DJ |
3339 | choke me |
3340 | #else | |
d9feb4e7 | 3341 | $ac_func(); |
d28f9cdf DJ |
3342 | #endif |
3343 | ||
3344 | ; return 0; } | |
3345 | EOF | |
0bbc026e | 3346 | if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf | 3347 | rm -rf conftest* |
d9feb4e7 | 3348 | eval "ac_cv_func_$ac_func=yes" |
d28f9cdf DJ |
3349 | else |
3350 | echo "configure: failed program was:" >&5 | |
3351 | cat conftest.$ac_ext >&5 | |
3352 | rm -rf conftest* | |
d9feb4e7 | 3353 | eval "ac_cv_func_$ac_func=no" |
d28f9cdf DJ |
3354 | fi |
3355 | rm -f conftest* | |
3356 | fi | |
3357 | ||
d9feb4e7 | 3358 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
d28f9cdf | 3359 | echo "$ac_t""yes" 1>&6 |
d9feb4e7 DJ |
3360 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
3361 | cat >> confdefs.h <<EOF | |
3362 | #define $ac_tr_func 1 | |
3363 | EOF | |
3364 | ||
d28f9cdf DJ |
3365 | else |
3366 | echo "$ac_t""no" 1>&6 | |
d28f9cdf | 3367 | fi |
d9feb4e7 | 3368 | done |
d28f9cdf | 3369 | |
b0b1c2c0 | 3370 | echo $ac_n "checking for _etext""... $ac_c" 1>&6 |
0bbc026e | 3371 | echo "configure:3372: checking for _etext" >&5 |
b0b1c2c0 MK |
3372 | if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then |
3373 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3374 | else | |
3375 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3376 | #line 3377 "configure" |
b0b1c2c0 MK |
3377 | #include "confdefs.h" |
3378 | #include <stdlib.h> | |
3379 | extern char _etext; | |
3380 | ||
3381 | int main() { | |
3382 | free (&_etext); | |
3383 | ; return 0; } | |
3384 | EOF | |
0bbc026e | 3385 | if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b0b1c2c0 MK |
3386 | rm -rf conftest* |
3387 | ac_cv_var__etext=yes | |
3388 | else | |
3389 | echo "configure: failed program was:" >&5 | |
3390 | cat conftest.$ac_ext >&5 | |
3391 | rm -rf conftest* | |
3392 | ac_cv_var__etext=no | |
3393 | fi | |
3394 | rm -f conftest* | |
3395 | fi | |
3396 | ||
3397 | echo "$ac_t""$ac_cv_var__etext" 1>&6 | |
3398 | if test $ac_cv_var__etext = yes; then | |
3399 | cat >> confdefs.h <<\EOF | |
3400 | #define HAVE__ETEXT 1 | |
3401 | EOF | |
3402 | ||
3403 | fi | |
d9feb4e7 DJ |
3404 | if test "$enable_profiling" = yes ; then |
3405 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
3406 | { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; } | |
3407 | fi | |
3408 | PROFILE_CFLAGS=-pg | |
3409 | OLD_CFLAGS="$CFLAGS" | |
3410 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
d28f9cdf | 3411 | |
d9feb4e7 | 3412 | echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6 |
0bbc026e | 3413 | echo "configure:3414: checking whether $CC supports -pg" >&5 |
d9feb4e7 | 3414 | if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then |
d28f9cdf DJ |
3415 | echo $ac_n "(cached) $ac_c" 1>&6 |
3416 | else | |
3417 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3418 | #line 3419 "configure" |
d28f9cdf | 3419 | #include "confdefs.h" |
d28f9cdf DJ |
3420 | |
3421 | int main() { | |
d9feb4e7 | 3422 | int x; |
d28f9cdf DJ |
3423 | ; return 0; } |
3424 | EOF | |
0bbc026e | 3425 | if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d28f9cdf | 3426 | rm -rf conftest* |
d9feb4e7 | 3427 | ac_cv_cc_supports_pg=yes |
d28f9cdf DJ |
3428 | else |
3429 | echo "configure: failed program was:" >&5 | |
3430 | cat conftest.$ac_ext >&5 | |
3431 | rm -rf conftest* | |
d9feb4e7 | 3432 | ac_cv_cc_supports_pg=no |
d28f9cdf DJ |
3433 | fi |
3434 | rm -f conftest* | |
3435 | fi | |
3436 | ||
d9feb4e7 | 3437 | echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6 |
d28f9cdf | 3438 | |
d9feb4e7 DJ |
3439 | if test $ac_cv_cc_supports_pg = no; then |
3440 | { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; } | |
3441 | fi | |
d28f9cdf DJ |
3442 | |
3443 | CFLAGS="$OLD_CFLAGS" | |
3444 | fi | |
3445 | ||
8bb2c122 MK |
3446 | # --------------------- # |
3447 | # Checks for programs. # | |
3448 | # --------------------- # | |
3449 | ||
d836ee13 | 3450 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3451 | do |
3452 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3453 | set dummy $ac_prog; ac_word=$2 | |
3454 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 3455 | echo "configure:3456: checking for $ac_word" >&5 |
7a292a7a SS |
3456 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3457 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3458 | else | |
3459 | if test -n "$AWK"; then | |
3460 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3461 | else | |
3462 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3463 | ac_dummy="$PATH" | |
3464 | for ac_dir in $ac_dummy; do | |
3465 | test -z "$ac_dir" && ac_dir=. | |
3466 | if test -f $ac_dir/$ac_word; then | |
3467 | ac_cv_prog_AWK="$ac_prog" | |
3468 | break | |
3469 | fi | |
3470 | done | |
3471 | IFS="$ac_save_ifs" | |
3472 | fi | |
3473 | fi | |
3474 | AWK="$ac_cv_prog_AWK" | |
3475 | if test -n "$AWK"; then | |
3476 | echo "$ac_t""$AWK" 1>&6 | |
3477 | else | |
3478 | echo "$ac_t""no" 1>&6 | |
3479 | fi | |
3480 | ||
3481 | test -n "$AWK" && break | |
3482 | done | |
3483 | ||
c906108c SS |
3484 | # Find a good install program. We prefer a C program (faster), |
3485 | # so one script is as good as another. But avoid the broken or | |
3486 | # incompatible versions: | |
3487 | # SysV /etc/install, /usr/sbin/install | |
3488 | # SunOS /usr/etc/install | |
3489 | # IRIX /sbin/install | |
3490 | # AIX /bin/install | |
3491 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3492 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3493 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3494 | # ./install, which can be erroneously created by make from ./install.sh. | |
3495 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
0bbc026e | 3496 | echo "configure:3497: checking for a BSD compatible install" >&5 |
c906108c SS |
3497 | if test -z "$INSTALL"; then |
3498 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3499 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3500 | else | |
3501 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3502 | for ac_dir in $PATH; do | |
3503 | # Account for people who put trailing slashes in PATH elements. | |
3504 | case "$ac_dir/" in | |
3505 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3506 | *) | |
3507 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3508 | # Don't use installbsd from OSF since it installs stuff as root | |
3509 | # by default. | |
3510 | for ac_prog in ginstall scoinst install; do | |
3511 | if test -f $ac_dir/$ac_prog; then | |
3512 | if test $ac_prog = install && | |
3513 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3514 | # AIX install. It has an incompatible calling convention. | |
3515 | : | |
3516 | else | |
3517 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3518 | break 2 | |
3519 | fi | |
3520 | fi | |
3521 | done | |
3522 | ;; | |
3523 | esac | |
3524 | done | |
3525 | IFS="$ac_save_IFS" | |
3526 | ||
3527 | fi | |
3528 | if test "${ac_cv_path_install+set}" = set; then | |
3529 | INSTALL="$ac_cv_path_install" | |
3530 | else | |
3531 | # As a last resort, use the slow shell script. We don't cache a | |
3532 | # path for INSTALL within a source directory, because that will | |
3533 | # break other packages using the cache if that directory is | |
3534 | # removed, or if the path is relative. | |
3535 | INSTALL="$ac_install_sh" | |
3536 | fi | |
3537 | fi | |
3538 | echo "$ac_t""$INSTALL" 1>&6 | |
3539 | ||
3540 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3541 | # It thinks the first close brace ends the variable substitution. | |
3542 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3543 | ||
3544 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3545 | ||
3546 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3547 | ||
8bb2c122 | 3548 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
0bbc026e | 3549 | echo "configure:3550: checking whether ln -s works" >&5 |
8bb2c122 MK |
3550 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3551 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3552 | else |
8bb2c122 MK |
3553 | rm -f conftestdata |
3554 | if ln -s X conftestdata 2>/dev/null | |
3555 | then | |
3556 | rm -f conftestdata | |
3557 | ac_cv_prog_LN_S="ln -s" | |
3558 | else | |
3559 | ac_cv_prog_LN_S=ln | |
3560 | fi | |
3561 | fi | |
3562 | LN_S="$ac_cv_prog_LN_S" | |
3563 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3564 | echo "$ac_t""yes" 1>&6 | |
3565 | else | |
3566 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3567 | fi |
3568 | ||
8bb2c122 MK |
3569 | # Extract the first word of "ranlib", so it can be a program name with args. |
3570 | set dummy ranlib; ac_word=$2 | |
c906108c | 3571 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
0bbc026e | 3572 | echo "configure:3573: checking for $ac_word" >&5 |
8bb2c122 | 3573 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3574 | echo $ac_n "(cached) $ac_c" 1>&6 |
3575 | else | |
8bb2c122 MK |
3576 | if test -n "$RANLIB"; then |
3577 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3578 | else |
3579 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3580 | ac_dummy="$PATH" | |
3581 | for ac_dir in $ac_dummy; do | |
3582 | test -z "$ac_dir" && ac_dir=. | |
3583 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3584 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3585 | break |
3586 | fi | |
3587 | done | |
3588 | IFS="$ac_save_ifs" | |
8bb2c122 | 3589 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3590 | fi |
3591 | fi | |
8bb2c122 MK |
3592 | RANLIB="$ac_cv_prog_RANLIB" |
3593 | if test -n "$RANLIB"; then | |
3594 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3595 | else |
3596 | echo "$ac_t""no" 1>&6 | |
3597 | fi | |
3598 | ||
8bb2c122 MK |
3599 | for ac_prog in 'bison -y' byacc |
3600 | do | |
3601 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3602 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3603 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
0bbc026e | 3604 | echo "configure:3605: checking for $ac_word" >&5 |
8bb2c122 | 3605 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3606 | echo $ac_n "(cached) $ac_c" 1>&6 |
3607 | else | |
8bb2c122 MK |
3608 | if test -n "$YACC"; then |
3609 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3610 | else |
3611 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3612 | ac_dummy="$PATH" | |
3613 | for ac_dir in $ac_dummy; do | |
3614 | test -z "$ac_dir" && ac_dir=. | |
3615 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3616 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3617 | break |
3618 | fi | |
3619 | done | |
3620 | IFS="$ac_save_ifs" | |
3621 | fi | |
3622 | fi | |
8bb2c122 MK |
3623 | YACC="$ac_cv_prog_YACC" |
3624 | if test -n "$YACC"; then | |
3625 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3626 | else |
3627 | echo "$ac_t""no" 1>&6 | |
3628 | fi | |
3629 | ||
8bb2c122 MK |
3630 | test -n "$YACC" && break |
3631 | done | |
3632 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3633 | |
8bb2c122 MK |
3634 | |
3635 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3636 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3637 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
0bbc026e | 3638 | echo "configure:3639: checking for $ac_word" >&5 |
8bb2c122 | 3639 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3640 | echo $ac_n "(cached) $ac_c" 1>&6 |
3641 | else | |
8bb2c122 MK |
3642 | if test -n "$AR"; then |
3643 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3644 | else |
3645 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3646 | ac_dummy="$PATH" | |
3647 | for ac_dir in $ac_dummy; do | |
3648 | test -z "$ac_dir" && ac_dir=. | |
3649 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3650 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3651 | break |
3652 | fi | |
3653 | done | |
3654 | IFS="$ac_save_ifs" | |
8bb2c122 | 3655 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3656 | fi |
3657 | fi | |
8bb2c122 MK |
3658 | AR="$ac_cv_prog_AR" |
3659 | if test -n "$AR"; then | |
3660 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3661 | else |
3662 | echo "$ac_t""no" 1>&6 | |
3663 | fi | |
3664 | ||
8bb2c122 | 3665 | |
c906108c | 3666 | |
95ca63c4 CF |
3667 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3668 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3669 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 3670 | echo "configure:3671: checking for $ac_word" >&5 |
95ca63c4 CF |
3671 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3672 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3673 | else | |
3674 | if test -n "$DLLTOOL"; then | |
3675 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3676 | else | |
3677 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3678 | ac_dummy="$PATH" | |
3679 | for ac_dir in $ac_dummy; do | |
3680 | test -z "$ac_dir" && ac_dir=. | |
3681 | if test -f $ac_dir/$ac_word; then | |
3682 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3683 | break | |
3684 | fi | |
3685 | done | |
3686 | IFS="$ac_save_ifs" | |
3687 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3688 | fi | |
3689 | fi | |
3690 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3691 | if test -n "$DLLTOOL"; then | |
3692 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3693 | else | |
3694 | echo "$ac_t""no" 1>&6 | |
3695 | fi | |
3696 | ||
3697 | ||
3698 | ||
3699 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3700 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3701 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 3702 | echo "configure:3703: checking for $ac_word" >&5 |
95ca63c4 CF |
3703 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3705 | else | |
3706 | if test -n "$WINDRES"; then | |
3707 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3708 | else | |
3709 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3710 | ac_dummy="$PATH" | |
3711 | for ac_dir in $ac_dummy; do | |
3712 | test -z "$ac_dir" && ac_dir=. | |
3713 | if test -f $ac_dir/$ac_word; then | |
3714 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3715 | break | |
3716 | fi | |
3717 | done | |
3718 | IFS="$ac_save_ifs" | |
3719 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3720 | fi | |
3721 | fi | |
3722 | WINDRES="$ac_cv_prog_WINDRES" | |
3723 | if test -n "$WINDRES"; then | |
3724 | echo "$ac_t""$WINDRES" 1>&6 | |
3725 | else | |
3726 | echo "$ac_t""no" 1>&6 | |
3727 | fi | |
3728 | ||
3729 | ||
3730 | ||
c906108c | 3731 | |
8bb2c122 | 3732 | # Needed for GNU/Hurd. |
75c6e08a MK |
3733 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3734 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3735 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
0bbc026e | 3736 | echo "configure:3737: checking for $ac_word" >&5 |
75c6e08a MK |
3737 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3738 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3739 | else | |
3740 | if test -n "$MIG"; then | |
3741 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3742 | else | |
3743 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3744 | ac_dummy="$PATH" | |
3745 | for ac_dir in $ac_dummy; do | |
3746 | test -z "$ac_dir" && ac_dir=. | |
3747 | if test -f $ac_dir/$ac_word; then | |
3748 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3749 | break | |
3750 | fi | |
3751 | done | |
3752 | IFS="$ac_save_ifs" | |
3753 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3754 | fi | |
3755 | fi | |
3756 | MIG="$ac_cv_prog_MIG" | |
3757 | if test -n "$MIG"; then | |
3758 | echo "$ac_t""$MIG" 1>&6 | |
3759 | else | |
3760 | echo "$ac_t""no" 1>&6 | |
3761 | fi | |
3762 | ||
3763 | ||
3764 | ||
3765 | ||
9a156167 MK |
3766 | # ---------------------- # |
3767 | # Checks for libraries. # | |
3768 | # ---------------------- # | |
3769 | ||
3770 | # We might need to link with -lm; most simulators need it. | |
3771 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
0bbc026e | 3772 | echo "configure:3773: checking for main in -lm" >&5 |
9a156167 MK |
3773 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3774 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3776 | else | |
3777 | ac_save_LIBS="$LIBS" | |
3778 | LIBS="-lm $LIBS" | |
3779 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3780 | #line 3781 "configure" |
9a156167 MK |
3781 | #include "confdefs.h" |
3782 | ||
3783 | int main() { | |
3784 | main() | |
3785 | ; return 0; } | |
3786 | EOF | |
0bbc026e | 3787 | if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3788 | rm -rf conftest* |
3789 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3790 | else | |
3791 | echo "configure: failed program was:" >&5 | |
3792 | cat conftest.$ac_ext >&5 | |
3793 | rm -rf conftest* | |
3794 | eval "ac_cv_lib_$ac_lib_var=no" | |
3795 | fi | |
3796 | rm -f conftest* | |
3797 | LIBS="$ac_save_LIBS" | |
3798 | ||
3799 | fi | |
3800 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3801 | echo "$ac_t""yes" 1>&6 | |
3802 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3803 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3804 | cat >> confdefs.h <<EOF | |
3805 | #define $ac_tr_lib 1 | |
3806 | EOF | |
3807 | ||
3808 | LIBS="-lm $LIBS" | |
3809 | ||
3810 | else | |
3811 | echo "$ac_t""no" 1>&6 | |
3812 | fi | |
3813 | ||
3814 | ||
3815 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3816 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3817 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3818 | # is known to have this problem). Therefore we avoid libw if we can. | |
3819 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
0bbc026e | 3820 | echo "configure:3821: checking for wctype" >&5 |
9a156167 MK |
3821 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3822 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3823 | else | |
3824 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3825 | #line 3826 "configure" |
9a156167 MK |
3826 | #include "confdefs.h" |
3827 | /* System header to define __stub macros and hopefully few prototypes, | |
3828 | which can conflict with char wctype(); below. */ | |
3829 | #include <assert.h> | |
3830 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3831 | /* We use char because int might match the return type of a gcc2 | |
3832 | builtin and then its argument prototype would still apply. */ | |
3833 | char wctype(); | |
3834 | ||
3835 | int main() { | |
3836 | ||
3837 | /* The GNU C library defines this for functions which it implements | |
3838 | to always fail with ENOSYS. Some functions are actually named | |
3839 | something starting with __ and the normal name is an alias. */ | |
3840 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3841 | choke me | |
3842 | #else | |
3843 | wctype(); | |
3844 | #endif | |
3845 | ||
3846 | ; return 0; } | |
3847 | EOF | |
0bbc026e | 3848 | if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3849 | rm -rf conftest* |
3850 | eval "ac_cv_func_wctype=yes" | |
3851 | else | |
3852 | echo "configure: failed program was:" >&5 | |
3853 | cat conftest.$ac_ext >&5 | |
3854 | rm -rf conftest* | |
3855 | eval "ac_cv_func_wctype=no" | |
3856 | fi | |
3857 | rm -f conftest* | |
3858 | fi | |
3859 | ||
3860 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3861 | echo "$ac_t""yes" 1>&6 | |
3862 | : | |
3863 | else | |
3864 | echo "$ac_t""no" 1>&6 | |
3865 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
0bbc026e | 3866 | echo "configure:3867: checking for wctype in -lw" >&5 |
9a156167 MK |
3867 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3868 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3869 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3870 | else | |
3871 | ac_save_LIBS="$LIBS" | |
3872 | LIBS="-lw $LIBS" | |
3873 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3874 | #line 3875 "configure" |
9a156167 MK |
3875 | #include "confdefs.h" |
3876 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3877 | /* We use char because int might match the return type of a gcc2 | |
3878 | builtin and then its argument prototype would still apply. */ | |
3879 | char wctype(); | |
3880 | ||
3881 | int main() { | |
3882 | wctype() | |
3883 | ; return 0; } | |
3884 | EOF | |
0bbc026e | 3885 | if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3886 | rm -rf conftest* |
3887 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3888 | else | |
3889 | echo "configure: failed program was:" >&5 | |
3890 | cat conftest.$ac_ext >&5 | |
3891 | rm -rf conftest* | |
3892 | eval "ac_cv_lib_$ac_lib_var=no" | |
3893 | fi | |
3894 | rm -f conftest* | |
3895 | LIBS="$ac_save_LIBS" | |
3896 | ||
3897 | fi | |
3898 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3899 | echo "$ac_t""yes" 1>&6 | |
3900 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3901 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3902 | cat >> confdefs.h <<EOF | |
3903 | #define $ac_tr_lib 1 | |
3904 | EOF | |
3905 | ||
3906 | LIBS="-lw $LIBS" | |
3907 | ||
3908 | else | |
3909 | echo "$ac_t""no" 1>&6 | |
3910 | fi | |
3911 | ||
3912 | fi | |
3913 | ||
3914 | ||
c890192f MK |
3915 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
3916 | ||
3917 | echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 | |
0bbc026e | 3918 | echo "configure:3919: checking for library containing gethostbyname" >&5 |
c890192f MK |
3919 | if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then |
3920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3921 | else | |
3922 | ac_func_search_save_LIBS="$LIBS" | |
3923 | ac_cv_search_gethostbyname="no" | |
3924 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3925 | #line 3926 "configure" |
c890192f MK |
3926 | #include "confdefs.h" |
3927 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3928 | /* We use char because int might match the return type of a gcc2 | |
3929 | builtin and then its argument prototype would still apply. */ | |
3930 | char gethostbyname(); | |
3931 | ||
3932 | int main() { | |
3933 | gethostbyname() | |
3934 | ; return 0; } | |
3935 | EOF | |
0bbc026e | 3936 | if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3937 | rm -rf conftest* |
3938 | ac_cv_search_gethostbyname="none required" | |
3939 | else | |
3940 | echo "configure: failed program was:" >&5 | |
3941 | cat conftest.$ac_ext >&5 | |
3942 | fi | |
3943 | rm -f conftest* | |
3944 | test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do | |
3945 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3946 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3947 | #line 3948 "configure" |
c890192f MK |
3948 | #include "confdefs.h" |
3949 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3950 | /* We use char because int might match the return type of a gcc2 | |
3951 | builtin and then its argument prototype would still apply. */ | |
3952 | char gethostbyname(); | |
3953 | ||
3954 | int main() { | |
3955 | gethostbyname() | |
3956 | ; return 0; } | |
3957 | EOF | |
0bbc026e | 3958 | if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3959 | rm -rf conftest* |
3960 | ac_cv_search_gethostbyname="-l$i" | |
3961 | break | |
3962 | else | |
3963 | echo "configure: failed program was:" >&5 | |
3964 | cat conftest.$ac_ext >&5 | |
3965 | fi | |
3966 | rm -f conftest* | |
3967 | done | |
3968 | LIBS="$ac_func_search_save_LIBS" | |
3969 | fi | |
3970 | ||
3971 | echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6 | |
3972 | if test "$ac_cv_search_gethostbyname" != "no"; then | |
3973 | test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" | |
3974 | ||
3975 | else : | |
3976 | ||
3977 | fi | |
3978 | ||
9a156167 MK |
3979 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
3980 | ||
3981 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
0bbc026e | 3982 | echo "configure:3983: checking for library containing socketpair" >&5 |
9a156167 MK |
3983 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3984 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3985 | else | |
3986 | ac_func_search_save_LIBS="$LIBS" | |
3987 | ac_cv_search_socketpair="no" | |
3988 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 3989 | #line 3990 "configure" |
9a156167 MK |
3990 | #include "confdefs.h" |
3991 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3992 | /* We use char because int might match the return type of a gcc2 | |
3993 | builtin and then its argument prototype would still apply. */ | |
3994 | char socketpair(); | |
3995 | ||
3996 | int main() { | |
3997 | socketpair() | |
3998 | ; return 0; } | |
3999 | EOF | |
0bbc026e | 4000 | if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4001 | rm -rf conftest* |
4002 | ac_cv_search_socketpair="none required" | |
4003 | else | |
4004 | echo "configure: failed program was:" >&5 | |
4005 | cat conftest.$ac_ext >&5 | |
4006 | fi | |
4007 | rm -f conftest* | |
4008 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
4009 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4010 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4011 | #line 4012 "configure" |
9a156167 MK |
4012 | #include "confdefs.h" |
4013 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4014 | /* We use char because int might match the return type of a gcc2 | |
4015 | builtin and then its argument prototype would still apply. */ | |
4016 | char socketpair(); | |
4017 | ||
4018 | int main() { | |
4019 | socketpair() | |
4020 | ; return 0; } | |
4021 | EOF | |
0bbc026e | 4022 | if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
4023 | rm -rf conftest* |
4024 | ac_cv_search_socketpair="-l$i" | |
4025 | break | |
4026 | else | |
4027 | echo "configure: failed program was:" >&5 | |
4028 | cat conftest.$ac_ext >&5 | |
4029 | fi | |
4030 | rm -f conftest* | |
4031 | done | |
4032 | LIBS="$ac_func_search_save_LIBS" | |
4033 | fi | |
4034 | ||
4035 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
4036 | if test "$ac_cv_search_socketpair" != "no"; then | |
4037 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
4038 | ||
4039 | else : | |
4040 | ||
4041 | fi | |
4042 | ||
4f0be353 MK |
4043 | # For the TUI, we need enhanced curses functionality. |
4044 | # | |
4045 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
4046 | # curses library because the latter might not provide all the | |
4047 | # functionality we need. However, this leads to problems on systems | |
4048 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
8b9cf735 | 4049 | # search /usr/local/include, if ncurses is installed in /usr/local. A |
4f0be353 MK |
4050 | # default installation of ncurses on alpha*-dec-osf* will lead to such |
4051 | # a situation. | |
06825bd1 | 4052 | |
8b9cf735 | 4053 | echo $ac_n "checking for library containing waddstr""... $ac_c" 1>&6 |
0bbc026e | 4054 | echo "configure:4055: checking for library containing waddstr" >&5 |
8b9cf735 | 4055 | if eval "test \"`echo '$''{'ac_cv_search_waddstr'+set}'`\" = set"; then |
06825bd1 MK |
4056 | echo $ac_n "(cached) $ac_c" 1>&6 |
4057 | else | |
4058 | ac_func_search_save_LIBS="$LIBS" | |
8b9cf735 | 4059 | ac_cv_search_waddstr="no" |
06825bd1 | 4060 | cat > conftest.$ac_ext <<EOF |
0bbc026e | 4061 | #line 4062 "configure" |
06825bd1 MK |
4062 | #include "confdefs.h" |
4063 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4064 | /* We use char because int might match the return type of a gcc2 | |
4065 | builtin and then its argument prototype would still apply. */ | |
8b9cf735 | 4066 | char waddstr(); |
06825bd1 MK |
4067 | |
4068 | int main() { | |
8b9cf735 | 4069 | waddstr() |
06825bd1 MK |
4070 | ; return 0; } |
4071 | EOF | |
0bbc026e | 4072 | if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 | 4073 | rm -rf conftest* |
8b9cf735 | 4074 | ac_cv_search_waddstr="none required" |
06825bd1 MK |
4075 | else |
4076 | echo "configure: failed program was:" >&5 | |
4077 | cat conftest.$ac_ext >&5 | |
4078 | fi | |
4079 | rm -f conftest* | |
8b9cf735 | 4080 | test "$ac_cv_search_waddstr" = "no" && for i in ncurses cursesX curses; do |
06825bd1 MK |
4081 | LIBS="-l$i $ac_func_search_save_LIBS" |
4082 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4083 | #line 4084 "configure" |
06825bd1 MK |
4084 | #include "confdefs.h" |
4085 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4086 | /* We use char because int might match the return type of a gcc2 | |
4087 | builtin and then its argument prototype would still apply. */ | |
8b9cf735 | 4088 | char waddstr(); |
06825bd1 MK |
4089 | |
4090 | int main() { | |
8b9cf735 | 4091 | waddstr() |
06825bd1 MK |
4092 | ; return 0; } |
4093 | EOF | |
0bbc026e | 4094 | if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 | 4095 | rm -rf conftest* |
8b9cf735 | 4096 | ac_cv_search_waddstr="-l$i" |
06825bd1 MK |
4097 | break |
4098 | else | |
4099 | echo "configure: failed program was:" >&5 | |
4100 | cat conftest.$ac_ext >&5 | |
4101 | fi | |
4102 | rm -f conftest* | |
4103 | done | |
4104 | LIBS="$ac_func_search_save_LIBS" | |
4105 | fi | |
4106 | ||
8b9cf735 MK |
4107 | echo "$ac_t""$ac_cv_search_waddstr" 1>&6 |
4108 | if test "$ac_cv_search_waddstr" != "no"; then | |
4109 | test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS" | |
06825bd1 MK |
4110 | |
4111 | else : | |
4112 | ||
4113 | fi | |
4f0be353 | 4114 | |
4f0be353 MK |
4115 | # Since GDB uses Readline, we need termcap functionality. In many |
4116 | # cases this will be provided by the curses library, but some systems | |
4117 | # have a seperate termcap library, or no curses library at all. | |
4118 | ||
4119 | case $host_os in | |
4120 | cygwin*) | |
4121 | if test -d $srcdir/libtermcap; then | |
4122 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
4123 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
4124 | fi ;; | |
4125 | go32* | *djgpp*) | |
4126 | ac_cv_search_tgetent="none required" | |
06825bd1 MK |
4127 | ;; |
4128 | esac | |
4129 | ||
4f0be353 | 4130 | # These are the libraries checked by Readline. |
06825bd1 MK |
4131 | |
4132 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
0bbc026e | 4133 | echo "configure:4134: checking for library containing tgetent" >&5 |
06825bd1 MK |
4134 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4135 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4136 | else | |
4137 | ac_func_search_save_LIBS="$LIBS" | |
4138 | ac_cv_search_tgetent="no" | |
4139 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4140 | #line 4141 "configure" |
06825bd1 MK |
4141 | #include "confdefs.h" |
4142 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4143 | /* We use char because int might match the return type of a gcc2 | |
4144 | builtin and then its argument prototype would still apply. */ | |
4145 | char tgetent(); | |
4146 | ||
4147 | int main() { | |
4148 | tgetent() | |
4149 | ; return 0; } | |
4150 | EOF | |
0bbc026e | 4151 | if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4152 | rm -rf conftest* |
4153 | ac_cv_search_tgetent="none required" | |
4154 | else | |
4155 | echo "configure: failed program was:" >&5 | |
4156 | cat conftest.$ac_ext >&5 | |
4157 | fi | |
4158 | rm -f conftest* | |
4f0be353 | 4159 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo curses ncurses; do |
06825bd1 MK |
4160 | LIBS="-l$i $ac_func_search_save_LIBS" |
4161 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4162 | #line 4163 "configure" |
06825bd1 MK |
4163 | #include "confdefs.h" |
4164 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4165 | /* We use char because int might match the return type of a gcc2 | |
4166 | builtin and then its argument prototype would still apply. */ | |
4167 | char tgetent(); | |
4168 | ||
4169 | int main() { | |
4170 | tgetent() | |
4171 | ; return 0; } | |
4172 | EOF | |
0bbc026e | 4173 | if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4174 | rm -rf conftest* |
4175 | ac_cv_search_tgetent="-l$i" | |
4176 | break | |
4177 | else | |
4178 | echo "configure: failed program was:" >&5 | |
4179 | cat conftest.$ac_ext >&5 | |
4180 | fi | |
4181 | rm -f conftest* | |
4182 | done | |
4183 | LIBS="$ac_func_search_save_LIBS" | |
4184 | fi | |
4185 | ||
4186 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4187 | if test "$ac_cv_search_tgetent" != "no"; then | |
4188 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4189 | ||
4190 | else : | |
4191 | ||
4192 | fi | |
4193 | ||
4194 | if test "$ac_cv_search_tgetent" = no; then | |
4195 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
4196 | fi | |
4197 | ||
5ee754fc MK |
4198 | # ------------------------- # |
4199 | # Checks for header files. # | |
4200 | # ------------------------- # | |
4201 | ||
4202 | ac_header_dirent=no | |
4203 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4204 | do | |
4205 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4206 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
0bbc026e | 4207 | echo "configure:4208: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 4208 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
4209 | echo $ac_n "(cached) $ac_c" 1>&6 |
4210 | else | |
4211 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4212 | #line 4213 "configure" |
c906108c SS |
4213 | #include "confdefs.h" |
4214 | #include <sys/types.h> | |
5ee754fc MK |
4215 | #include <$ac_hdr> |
4216 | int main() { | |
4217 | DIR *dirp = 0; | |
4218 | ; return 0; } | |
4219 | EOF | |
0bbc026e | 4220 | if { (eval echo configure:4221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4221 | rm -rf conftest* |
4222 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4223 | else | |
4224 | echo "configure: failed program was:" >&5 | |
4225 | cat conftest.$ac_ext >&5 | |
4226 | rm -rf conftest* | |
4227 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4228 | fi | |
4229 | rm -f conftest* | |
4230 | fi | |
4231 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4232 | echo "$ac_t""yes" 1>&6 | |
4233 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4234 | cat >> confdefs.h <<EOF | |
4235 | #define $ac_tr_hdr 1 | |
4236 | EOF | |
4237 | ac_header_dirent=$ac_hdr; break | |
4238 | else | |
4239 | echo "$ac_t""no" 1>&6 | |
4240 | fi | |
4241 | done | |
4242 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4243 | if test $ac_header_dirent = dirent.h; then | |
4244 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
0bbc026e | 4245 | echo "configure:4246: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4246 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4247 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4248 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4249 | else | |
4250 | ac_save_LIBS="$LIBS" | |
4251 | LIBS="-ldir $LIBS" | |
4252 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4253 | #line 4254 "configure" |
5ee754fc MK |
4254 | #include "confdefs.h" |
4255 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4256 | /* We use char because int might match the return type of a gcc2 | |
4257 | builtin and then its argument prototype would still apply. */ | |
4258 | char opendir(); | |
c906108c SS |
4259 | |
4260 | int main() { | |
5ee754fc | 4261 | opendir() |
c906108c SS |
4262 | ; return 0; } |
4263 | EOF | |
0bbc026e | 4264 | if { (eval echo configure:4265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4265 | rm -rf conftest* |
5ee754fc | 4266 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4267 | else |
4268 | echo "configure: failed program was:" >&5 | |
4269 | cat conftest.$ac_ext >&5 | |
4270 | rm -rf conftest* | |
5ee754fc | 4271 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4272 | fi |
4273 | rm -f conftest* | |
5ee754fc MK |
4274 | LIBS="$ac_save_LIBS" |
4275 | ||
4276 | fi | |
4277 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4278 | echo "$ac_t""yes" 1>&6 | |
4279 | LIBS="$LIBS -ldir" | |
4280 | else | |
4281 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4282 | fi |
4283 | ||
5ee754fc MK |
4284 | else |
4285 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
0bbc026e | 4286 | echo "configure:4287: checking for opendir in -lx" >&5 |
5ee754fc MK |
4287 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4288 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4289 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4290 | else | |
4291 | ac_save_LIBS="$LIBS" | |
4292 | LIBS="-lx $LIBS" | |
4293 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4294 | #line 4295 "configure" |
5ee754fc MK |
4295 | #include "confdefs.h" |
4296 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4297 | /* We use char because int might match the return type of a gcc2 | |
4298 | builtin and then its argument prototype would still apply. */ | |
4299 | char opendir(); | |
4300 | ||
4301 | int main() { | |
4302 | opendir() | |
4303 | ; return 0; } | |
c906108c | 4304 | EOF |
0bbc026e | 4305 | if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4306 | rm -rf conftest* |
4307 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4308 | else | |
4309 | echo "configure: failed program was:" >&5 | |
4310 | cat conftest.$ac_ext >&5 | |
4311 | rm -rf conftest* | |
4312 | eval "ac_cv_lib_$ac_lib_var=no" | |
4313 | fi | |
4314 | rm -f conftest* | |
4315 | LIBS="$ac_save_LIBS" | |
c906108c | 4316 | |
5ee754fc MK |
4317 | fi |
4318 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4319 | echo "$ac_t""yes" 1>&6 | |
4320 | LIBS="$LIBS -lx" | |
4321 | else | |
4322 | echo "$ac_t""no" 1>&6 | |
4323 | fi | |
c906108c | 4324 | |
5ee754fc | 4325 | fi |
c906108c | 4326 | |
5ee754fc | 4327 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
0bbc026e | 4328 | echo "configure:4329: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4329 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4330 | echo $ac_n "(cached) $ac_c" 1>&6 |
4331 | else | |
4332 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4333 | #line 4334 "configure" |
9608ab8b MK |
4334 | #include "confdefs.h" |
4335 | #include <sys/types.h> | |
5ee754fc MK |
4336 | #include <sys/stat.h> |
4337 | ||
4338 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4339 | # if S_ISBLK (S_IFDIR) | |
4340 | You lose. | |
4341 | # endif | |
4342 | #endif | |
4343 | ||
4344 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4345 | # if S_ISBLK (S_IFCHR) | |
4346 | You lose. | |
4347 | # endif | |
4348 | #endif | |
4349 | ||
4350 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4351 | # if S_ISLNK (S_IFREG) | |
4352 | You lose. | |
4353 | # endif | |
4354 | #endif | |
4355 | ||
4356 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4357 | # if S_ISSOCK (S_IFREG) | |
4358 | You lose. | |
4359 | # endif | |
4360 | #endif | |
4361 | ||
9608ab8b | 4362 | EOF |
5ee754fc MK |
4363 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4364 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4365 | rm -rf conftest* |
5ee754fc MK |
4366 | ac_cv_header_stat_broken=yes |
4367 | else | |
4368 | rm -rf conftest* | |
4369 | ac_cv_header_stat_broken=no | |
4370 | fi | |
4371 | rm -f conftest* | |
4372 | ||
4373 | fi | |
4374 | ||
4375 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4376 | if test $ac_cv_header_stat_broken = yes; then | |
4377 | cat >> confdefs.h <<\EOF | |
4378 | #define STAT_MACROS_BROKEN 1 | |
4379 | EOF | |
4380 | ||
4381 | fi | |
4382 | ||
4383 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
0bbc026e | 4384 | echo "configure:4385: checking for ANSI C header files" >&5 |
5ee754fc MK |
4385 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4386 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4387 | else | |
4388 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4389 | #line 4390 "configure" |
5ee754fc MK |
4390 | #include "confdefs.h" |
4391 | #include <stdlib.h> | |
4392 | #include <stdarg.h> | |
4393 | #include <string.h> | |
4394 | #include <float.h> | |
4395 | EOF | |
4396 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4397 | { (eval echo configure:4398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4398 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4399 | if test -z "$ac_err"; then | |
4400 | rm -rf conftest* | |
4401 | ac_cv_header_stdc=yes | |
4402 | else | |
4403 | echo "$ac_err" >&5 | |
4404 | echo "configure: failed program was:" >&5 | |
4405 | cat conftest.$ac_ext >&5 | |
4406 | rm -rf conftest* | |
4407 | ac_cv_header_stdc=no | |
4408 | fi | |
4409 | rm -f conftest* | |
4410 | ||
4411 | if test $ac_cv_header_stdc = yes; then | |
4412 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4413 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4414 | #line 4415 "configure" |
5ee754fc MK |
4415 | #include "confdefs.h" |
4416 | #include <string.h> | |
4417 | EOF | |
4418 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4419 | egrep "memchr" >/dev/null 2>&1; then | |
4420 | : | |
4421 | else | |
4422 | rm -rf conftest* | |
4423 | ac_cv_header_stdc=no | |
4424 | fi | |
4425 | rm -f conftest* | |
4426 | ||
4427 | fi | |
4428 | ||
4429 | if test $ac_cv_header_stdc = yes; then | |
4430 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4431 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4432 | #line 4433 "configure" |
5ee754fc MK |
4433 | #include "confdefs.h" |
4434 | #include <stdlib.h> | |
4435 | EOF | |
4436 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4437 | egrep "free" >/dev/null 2>&1; then | |
4438 | : | |
4439 | else | |
4440 | rm -rf conftest* | |
4441 | ac_cv_header_stdc=no | |
4442 | fi | |
4443 | rm -f conftest* | |
4444 | ||
4445 | fi | |
4446 | ||
4447 | if test $ac_cv_header_stdc = yes; then | |
4448 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4449 | if test "$cross_compiling" = yes; then | |
4450 | : | |
4451 | else | |
4452 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4453 | #line 4454 "configure" |
5ee754fc MK |
4454 | #include "confdefs.h" |
4455 | #include <ctype.h> | |
4456 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4457 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4458 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4459 | int main () { int i; for (i = 0; i < 256; i++) | |
4460 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4461 | exit (0); } | |
4462 | ||
4463 | EOF | |
0bbc026e | 4464 | if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4465 | then |
4466 | : | |
9608ab8b | 4467 | else |
5ee754fc MK |
4468 | echo "configure: failed program was:" >&5 |
4469 | cat conftest.$ac_ext >&5 | |
4470 | rm -fr conftest* | |
4471 | ac_cv_header_stdc=no | |
4472 | fi | |
4473 | rm -fr conftest* | |
4474 | fi | |
4475 | ||
4476 | fi | |
4477 | fi | |
4478 | ||
4479 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4480 | if test $ac_cv_header_stdc = yes; then | |
4481 | cat >> confdefs.h <<\EOF | |
4482 | #define STDC_HEADERS 1 | |
4483 | EOF | |
4484 | ||
4485 | fi | |
4486 | ||
4487 | for ac_hdr in link.h | |
4488 | do | |
4489 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4490 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4491 | echo "configure:4492: checking for $ac_hdr" >&5 |
5ee754fc MK |
4492 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4494 | else | |
4495 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4496 | #line 4497 "configure" |
5ee754fc MK |
4497 | #include "confdefs.h" |
4498 | #include <$ac_hdr> | |
4499 | EOF | |
4500 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4501 | { (eval echo configure:4502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4502 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4503 | if test -z "$ac_err"; then | |
4504 | rm -rf conftest* | |
4505 | eval "ac_cv_header_$ac_safe=yes" | |
4506 | else | |
4507 | echo "$ac_err" >&5 | |
4508 | echo "configure: failed program was:" >&5 | |
4509 | cat conftest.$ac_ext >&5 | |
4510 | rm -rf conftest* | |
4511 | eval "ac_cv_header_$ac_safe=no" | |
4512 | fi | |
4513 | rm -f conftest* | |
4514 | fi | |
4515 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4516 | echo "$ac_t""yes" 1>&6 | |
4517 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4518 | cat >> confdefs.h <<EOF | |
4519 | #define $ac_tr_hdr 1 | |
4520 | EOF | |
4521 | ||
4522 | else | |
4523 | echo "$ac_t""no" 1>&6 | |
4524 | fi | |
4525 | done | |
4526 | ||
78434e59 | 4527 | for ac_hdr in machine/reg.h |
5ee754fc MK |
4528 | do |
4529 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4530 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4531 | echo "configure:4532: checking for $ac_hdr" >&5 |
5ee754fc MK |
4532 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4533 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4534 | else | |
4535 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4536 | #line 4537 "configure" |
5ee754fc MK |
4537 | #include "confdefs.h" |
4538 | #include <$ac_hdr> | |
4539 | EOF | |
4540 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4541 | { (eval echo configure:4542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4542 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4543 | if test -z "$ac_err"; then | |
4544 | rm -rf conftest* | |
4545 | eval "ac_cv_header_$ac_safe=yes" | |
4546 | else | |
4547 | echo "$ac_err" >&5 | |
4548 | echo "configure: failed program was:" >&5 | |
4549 | cat conftest.$ac_ext >&5 | |
4550 | rm -rf conftest* | |
4551 | eval "ac_cv_header_$ac_safe=no" | |
4552 | fi | |
4553 | rm -f conftest* | |
4554 | fi | |
4555 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4556 | echo "$ac_t""yes" 1>&6 | |
4557 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4558 | cat >> confdefs.h <<EOF | |
4559 | #define $ac_tr_hdr 1 | |
4560 | EOF | |
4561 | ||
4562 | else | |
4563 | echo "$ac_t""no" 1>&6 | |
4564 | fi | |
4565 | done | |
4566 | ||
78434e59 | 4567 | for ac_hdr in nlist.h |
5ee754fc MK |
4568 | do |
4569 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4570 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4571 | echo "configure:4572: checking for $ac_hdr" >&5 |
5ee754fc MK |
4572 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4574 | else | |
4575 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4576 | #line 4577 "configure" |
5ee754fc MK |
4577 | #include "confdefs.h" |
4578 | #include <$ac_hdr> | |
4579 | EOF | |
4580 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4581 | { (eval echo configure:4582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4582 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4583 | if test -z "$ac_err"; then | |
4584 | rm -rf conftest* | |
4585 | eval "ac_cv_header_$ac_safe=yes" | |
4586 | else | |
4587 | echo "$ac_err" >&5 | |
4588 | echo "configure: failed program was:" >&5 | |
4589 | cat conftest.$ac_ext >&5 | |
4590 | rm -rf conftest* | |
4591 | eval "ac_cv_header_$ac_safe=no" | |
4592 | fi | |
4593 | rm -f conftest* | |
4594 | fi | |
4595 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4596 | echo "$ac_t""yes" 1>&6 | |
4597 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4598 | cat >> confdefs.h <<EOF | |
4599 | #define $ac_tr_hdr 1 | |
4600 | EOF | |
4601 | ||
4602 | else | |
4603 | echo "$ac_t""no" 1>&6 | |
4604 | fi | |
4605 | done | |
4606 | ||
78434e59 | 4607 | for ac_hdr in poll.h sys/poll.h |
5ee754fc MK |
4608 | do |
4609 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4610 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4611 | echo "configure:4612: checking for $ac_hdr" >&5 |
5ee754fc MK |
4612 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4613 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4614 | else | |
4615 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4616 | #line 4617 "configure" |
5ee754fc MK |
4617 | #include "confdefs.h" |
4618 | #include <$ac_hdr> | |
4619 | EOF | |
4620 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4621 | { (eval echo configure:4622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4622 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4623 | if test -z "$ac_err"; then | |
4624 | rm -rf conftest* | |
4625 | eval "ac_cv_header_$ac_safe=yes" | |
4626 | else | |
4627 | echo "$ac_err" >&5 | |
4628 | echo "configure: failed program was:" >&5 | |
4629 | cat conftest.$ac_ext >&5 | |
4630 | rm -rf conftest* | |
4631 | eval "ac_cv_header_$ac_safe=no" | |
4632 | fi | |
4633 | rm -f conftest* | |
4634 | fi | |
4635 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4636 | echo "$ac_t""yes" 1>&6 | |
4637 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4638 | cat >> confdefs.h <<EOF | |
4639 | #define $ac_tr_hdr 1 | |
4640 | EOF | |
4641 | ||
4642 | else | |
4643 | echo "$ac_t""no" 1>&6 | |
4644 | fi | |
4645 | done | |
4646 | ||
a2f23071 | 4647 | for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h |
5ee754fc MK |
4648 | do |
4649 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4650 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4651 | echo "configure:4652: checking for $ac_hdr" >&5 |
5ee754fc MK |
4652 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4653 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4654 | else | |
4655 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4656 | #line 4657 "configure" |
5ee754fc MK |
4657 | #include "confdefs.h" |
4658 | #include <$ac_hdr> | |
4659 | EOF | |
4660 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4661 | { (eval echo configure:4662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4662 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4663 | if test -z "$ac_err"; then | |
4664 | rm -rf conftest* | |
4665 | eval "ac_cv_header_$ac_safe=yes" | |
4666 | else | |
4667 | echo "$ac_err" >&5 | |
4668 | echo "configure: failed program was:" >&5 | |
4669 | cat conftest.$ac_ext >&5 | |
4670 | rm -rf conftest* | |
4671 | eval "ac_cv_header_$ac_safe=no" | |
4672 | fi | |
4673 | rm -f conftest* | |
4674 | fi | |
4675 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4676 | echo "$ac_t""yes" 1>&6 | |
4677 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4678 | cat >> confdefs.h <<EOF | |
4679 | #define $ac_tr_hdr 1 | |
4680 | EOF | |
4681 | ||
4682 | else | |
4683 | echo "$ac_t""no" 1>&6 | |
4684 | fi | |
4685 | done | |
4686 | ||
78434e59 | 4687 | for ac_hdr in stddef.h |
5ee754fc MK |
4688 | do |
4689 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4690 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4691 | echo "configure:4692: checking for $ac_hdr" >&5 |
5ee754fc MK |
4692 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4694 | else | |
4695 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4696 | #line 4697 "configure" |
5ee754fc MK |
4697 | #include "confdefs.h" |
4698 | #include <$ac_hdr> | |
4699 | EOF | |
4700 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4701 | { (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4702 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4703 | if test -z "$ac_err"; then | |
4704 | rm -rf conftest* | |
4705 | eval "ac_cv_header_$ac_safe=yes" | |
4706 | else | |
4707 | echo "$ac_err" >&5 | |
4708 | echo "configure: failed program was:" >&5 | |
4709 | cat conftest.$ac_ext >&5 | |
4710 | rm -rf conftest* | |
4711 | eval "ac_cv_header_$ac_safe=no" | |
4712 | fi | |
4713 | rm -f conftest* | |
4714 | fi | |
4715 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4716 | echo "$ac_t""yes" 1>&6 | |
4717 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4718 | cat >> confdefs.h <<EOF | |
4719 | #define $ac_tr_hdr 1 | |
4720 | EOF | |
4721 | ||
4722 | else | |
4723 | echo "$ac_t""no" 1>&6 | |
4724 | fi | |
4725 | done | |
4726 | ||
78434e59 | 4727 | for ac_hdr in stdlib.h |
5ee754fc MK |
4728 | do |
4729 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4730 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4731 | echo "configure:4732: checking for $ac_hdr" >&5 |
5ee754fc MK |
4732 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4734 | else | |
4735 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4736 | #line 4737 "configure" |
5ee754fc MK |
4737 | #include "confdefs.h" |
4738 | #include <$ac_hdr> | |
4739 | EOF | |
4740 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4741 | { (eval echo configure:4742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4742 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4743 | if test -z "$ac_err"; then | |
4744 | rm -rf conftest* | |
4745 | eval "ac_cv_header_$ac_safe=yes" | |
4746 | else | |
4747 | echo "$ac_err" >&5 | |
4748 | echo "configure: failed program was:" >&5 | |
4749 | cat conftest.$ac_ext >&5 | |
4750 | rm -rf conftest* | |
4751 | eval "ac_cv_header_$ac_safe=no" | |
4752 | fi | |
4753 | rm -f conftest* | |
4754 | fi | |
4755 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4756 | echo "$ac_t""yes" 1>&6 | |
4757 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4758 | cat >> confdefs.h <<EOF | |
4759 | #define $ac_tr_hdr 1 | |
4760 | EOF | |
4761 | ||
4762 | else | |
4763 | echo "$ac_t""no" 1>&6 | |
4764 | fi | |
4765 | done | |
4766 | ||
78434e59 | 4767 | for ac_hdr in stdint.h |
5ee754fc MK |
4768 | do |
4769 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4770 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4771 | echo "configure:4772: checking for $ac_hdr" >&5 |
5ee754fc MK |
4772 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4774 | else | |
4775 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4776 | #line 4777 "configure" |
5ee754fc MK |
4777 | #include "confdefs.h" |
4778 | #include <$ac_hdr> | |
4779 | EOF | |
4780 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4781 | { (eval echo configure:4782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4782 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4783 | if test -z "$ac_err"; then | |
4784 | rm -rf conftest* | |
4785 | eval "ac_cv_header_$ac_safe=yes" | |
4786 | else | |
4787 | echo "$ac_err" >&5 | |
4788 | echo "configure: failed program was:" >&5 | |
4789 | cat conftest.$ac_ext >&5 | |
4790 | rm -rf conftest* | |
4791 | eval "ac_cv_header_$ac_safe=no" | |
4792 | fi | |
4793 | rm -f conftest* | |
4794 | fi | |
4795 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4796 | echo "$ac_t""yes" 1>&6 | |
4797 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4798 | cat >> confdefs.h <<EOF | |
4799 | #define $ac_tr_hdr 1 | |
4800 | EOF | |
4801 | ||
4802 | else | |
4803 | echo "$ac_t""no" 1>&6 | |
4804 | fi | |
4805 | done | |
4806 | ||
78434e59 | 4807 | for ac_hdr in string.h memory.h strings.h |
5ee754fc MK |
4808 | do |
4809 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4810 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4811 | echo "configure:4812: checking for $ac_hdr" >&5 |
5ee754fc MK |
4812 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4813 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4814 | else | |
4815 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4816 | #line 4817 "configure" |
5ee754fc MK |
4817 | #include "confdefs.h" |
4818 | #include <$ac_hdr> | |
4819 | EOF | |
4820 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4821 | { (eval echo configure:4822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4822 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4823 | if test -z "$ac_err"; then | |
4824 | rm -rf conftest* | |
4825 | eval "ac_cv_header_$ac_safe=yes" | |
4826 | else | |
4827 | echo "$ac_err" >&5 | |
4828 | echo "configure: failed program was:" >&5 | |
4829 | cat conftest.$ac_ext >&5 | |
4830 | rm -rf conftest* | |
4831 | eval "ac_cv_header_$ac_safe=no" | |
4832 | fi | |
4833 | rm -f conftest* | |
4834 | fi | |
4835 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4836 | echo "$ac_t""yes" 1>&6 | |
4837 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4838 | cat >> confdefs.h <<EOF | |
4839 | #define $ac_tr_hdr 1 | |
4840 | EOF | |
4841 | ||
4842 | else | |
4843 | echo "$ac_t""no" 1>&6 | |
4844 | fi | |
4845 | done | |
4846 | ||
78434e59 | 4847 | for ac_hdr in sys/fault.h |
5ee754fc MK |
4848 | do |
4849 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4850 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4851 | echo "configure:4852: checking for $ac_hdr" >&5 |
5ee754fc MK |
4852 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4853 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4854 | else | |
4855 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4856 | #line 4857 "configure" |
5ee754fc MK |
4857 | #include "confdefs.h" |
4858 | #include <$ac_hdr> | |
4859 | EOF | |
4860 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4861 | { (eval echo configure:4862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4862 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4863 | if test -z "$ac_err"; then | |
4864 | rm -rf conftest* | |
4865 | eval "ac_cv_header_$ac_safe=yes" | |
4866 | else | |
4867 | echo "$ac_err" >&5 | |
4868 | echo "configure: failed program was:" >&5 | |
4869 | cat conftest.$ac_ext >&5 | |
4870 | rm -rf conftest* | |
4871 | eval "ac_cv_header_$ac_safe=no" | |
4872 | fi | |
4873 | rm -f conftest* | |
4874 | fi | |
4875 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4876 | echo "$ac_t""yes" 1>&6 | |
4877 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4878 | cat >> confdefs.h <<EOF | |
4879 | #define $ac_tr_hdr 1 | |
4880 | EOF | |
4881 | ||
4882 | else | |
4883 | echo "$ac_t""no" 1>&6 | |
4884 | fi | |
4885 | done | |
4886 | ||
78434e59 | 4887 | for ac_hdr in sys/file.h |
5ee754fc MK |
4888 | do |
4889 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4890 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4891 | echo "configure:4892: checking for $ac_hdr" >&5 |
5ee754fc MK |
4892 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4893 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4894 | else | |
4895 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4896 | #line 4897 "configure" |
5ee754fc MK |
4897 | #include "confdefs.h" |
4898 | #include <$ac_hdr> | |
4899 | EOF | |
4900 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4901 | { (eval echo configure:4902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4902 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4903 | if test -z "$ac_err"; then | |
4904 | rm -rf conftest* | |
4905 | eval "ac_cv_header_$ac_safe=yes" | |
4906 | else | |
4907 | echo "$ac_err" >&5 | |
4908 | echo "configure: failed program was:" >&5 | |
4909 | cat conftest.$ac_ext >&5 | |
4910 | rm -rf conftest* | |
4911 | eval "ac_cv_header_$ac_safe=no" | |
4912 | fi | |
4913 | rm -f conftest* | |
4914 | fi | |
4915 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4916 | echo "$ac_t""yes" 1>&6 | |
4917 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4918 | cat >> confdefs.h <<EOF | |
4919 | #define $ac_tr_hdr 1 | |
4920 | EOF | |
4921 | ||
4922 | else | |
4923 | echo "$ac_t""no" 1>&6 | |
4924 | fi | |
4925 | done | |
4926 | ||
78434e59 | 4927 | for ac_hdr in sys/filio.h |
5ee754fc MK |
4928 | do |
4929 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4930 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4931 | echo "configure:4932: checking for $ac_hdr" >&5 |
5ee754fc MK |
4932 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4933 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4934 | else | |
4935 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4936 | #line 4937 "configure" |
5ee754fc MK |
4937 | #include "confdefs.h" |
4938 | #include <$ac_hdr> | |
4939 | EOF | |
4940 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4941 | { (eval echo configure:4942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4942 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4943 | if test -z "$ac_err"; then | |
4944 | rm -rf conftest* | |
4945 | eval "ac_cv_header_$ac_safe=yes" | |
4946 | else | |
4947 | echo "$ac_err" >&5 | |
4948 | echo "configure: failed program was:" >&5 | |
4949 | cat conftest.$ac_ext >&5 | |
4950 | rm -rf conftest* | |
4951 | eval "ac_cv_header_$ac_safe=no" | |
4952 | fi | |
4953 | rm -f conftest* | |
4954 | fi | |
4955 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4956 | echo "$ac_t""yes" 1>&6 | |
4957 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4958 | cat >> confdefs.h <<EOF | |
4959 | #define $ac_tr_hdr 1 | |
4960 | EOF | |
4961 | ||
4962 | else | |
4963 | echo "$ac_t""no" 1>&6 | |
4964 | fi | |
4965 | done | |
4966 | ||
78434e59 | 4967 | for ac_hdr in sys/ioctl.h |
5ee754fc MK |
4968 | do |
4969 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4970 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 4971 | echo "configure:4972: checking for $ac_hdr" >&5 |
5ee754fc MK |
4972 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4973 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4974 | else | |
4975 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 4976 | #line 4977 "configure" |
5ee754fc MK |
4977 | #include "confdefs.h" |
4978 | #include <$ac_hdr> | |
4979 | EOF | |
4980 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 4981 | { (eval echo configure:4982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4982 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4983 | if test -z "$ac_err"; then | |
4984 | rm -rf conftest* | |
4985 | eval "ac_cv_header_$ac_safe=yes" | |
4986 | else | |
4987 | echo "$ac_err" >&5 | |
4988 | echo "configure: failed program was:" >&5 | |
4989 | cat conftest.$ac_ext >&5 | |
4990 | rm -rf conftest* | |
4991 | eval "ac_cv_header_$ac_safe=no" | |
4992 | fi | |
4993 | rm -f conftest* | |
4994 | fi | |
4995 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4996 | echo "$ac_t""yes" 1>&6 | |
4997 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4998 | cat >> confdefs.h <<EOF | |
4999 | #define $ac_tr_hdr 1 | |
5000 | EOF | |
5001 | ||
5002 | else | |
5003 | echo "$ac_t""no" 1>&6 | |
5004 | fi | |
5005 | done | |
5006 | ||
78434e59 | 5007 | for ac_hdr in sys/param.h |
5ee754fc MK |
5008 | do |
5009 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5010 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5011 | echo "configure:5012: checking for $ac_hdr" >&5 |
5ee754fc MK |
5012 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5013 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5014 | else | |
5015 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5016 | #line 5017 "configure" |
5ee754fc MK |
5017 | #include "confdefs.h" |
5018 | #include <$ac_hdr> | |
5019 | EOF | |
5020 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5021 | { (eval echo configure:5022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5022 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5023 | if test -z "$ac_err"; then | |
5024 | rm -rf conftest* | |
5025 | eval "ac_cv_header_$ac_safe=yes" | |
5026 | else | |
5027 | echo "$ac_err" >&5 | |
5028 | echo "configure: failed program was:" >&5 | |
5029 | cat conftest.$ac_ext >&5 | |
5030 | rm -rf conftest* | |
5031 | eval "ac_cv_header_$ac_safe=no" | |
5032 | fi | |
5033 | rm -f conftest* | |
5034 | fi | |
5035 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5036 | echo "$ac_t""yes" 1>&6 | |
5037 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5038 | cat >> confdefs.h <<EOF | |
5039 | #define $ac_tr_hdr 1 | |
5040 | EOF | |
5041 | ||
5042 | else | |
5043 | echo "$ac_t""no" 1>&6 | |
5044 | fi | |
5045 | done | |
5046 | ||
78434e59 | 5047 | for ac_hdr in sys/proc.h |
5ee754fc MK |
5048 | do |
5049 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5050 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5051 | echo "configure:5052: checking for $ac_hdr" >&5 |
5ee754fc MK |
5052 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5053 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5054 | else | |
5055 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5056 | #line 5057 "configure" |
5ee754fc MK |
5057 | #include "confdefs.h" |
5058 | #include <$ac_hdr> | |
5059 | EOF | |
5060 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5061 | { (eval echo configure:5062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5062 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5063 | if test -z "$ac_err"; then | |
5064 | rm -rf conftest* | |
5065 | eval "ac_cv_header_$ac_safe=yes" | |
5066 | else | |
5067 | echo "$ac_err" >&5 | |
5068 | echo "configure: failed program was:" >&5 | |
5069 | cat conftest.$ac_ext >&5 | |
5070 | rm -rf conftest* | |
5071 | eval "ac_cv_header_$ac_safe=no" | |
5072 | fi | |
5073 | rm -f conftest* | |
5074 | fi | |
5075 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5076 | echo "$ac_t""yes" 1>&6 | |
5077 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5078 | cat >> confdefs.h <<EOF | |
5079 | #define $ac_tr_hdr 1 | |
5080 | EOF | |
5081 | ||
5082 | else | |
5083 | echo "$ac_t""no" 1>&6 | |
5084 | fi | |
5085 | done | |
5086 | ||
78434e59 | 5087 | for ac_hdr in sys/procfs.h |
5ee754fc MK |
5088 | do |
5089 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5090 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5091 | echo "configure:5092: checking for $ac_hdr" >&5 |
5ee754fc MK |
5092 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5093 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5094 | else | |
5095 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5096 | #line 5097 "configure" |
5ee754fc MK |
5097 | #include "confdefs.h" |
5098 | #include <$ac_hdr> | |
5099 | EOF | |
5100 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5101 | { (eval echo configure:5102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5102 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5103 | if test -z "$ac_err"; then | |
5104 | rm -rf conftest* | |
5105 | eval "ac_cv_header_$ac_safe=yes" | |
5106 | else | |
5107 | echo "$ac_err" >&5 | |
5108 | echo "configure: failed program was:" >&5 | |
5109 | cat conftest.$ac_ext >&5 | |
5110 | rm -rf conftest* | |
5111 | eval "ac_cv_header_$ac_safe=no" | |
5112 | fi | |
5113 | rm -f conftest* | |
5114 | fi | |
5115 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5116 | echo "$ac_t""yes" 1>&6 | |
5117 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5118 | cat >> confdefs.h <<EOF | |
5119 | #define $ac_tr_hdr 1 | |
5120 | EOF | |
5121 | ||
5122 | else | |
5123 | echo "$ac_t""no" 1>&6 | |
5124 | fi | |
5125 | done | |
5126 | ||
78434e59 | 5127 | for ac_hdr in sys/ptrace.h ptrace.h |
5ee754fc MK |
5128 | do |
5129 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5130 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5131 | echo "configure:5132: checking for $ac_hdr" >&5 |
5ee754fc MK |
5132 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5134 | else | |
5135 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5136 | #line 5137 "configure" |
5ee754fc MK |
5137 | #include "confdefs.h" |
5138 | #include <$ac_hdr> | |
5139 | EOF | |
5140 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5141 | { (eval echo configure:5142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5142 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5143 | if test -z "$ac_err"; then | |
5144 | rm -rf conftest* | |
5145 | eval "ac_cv_header_$ac_safe=yes" | |
5146 | else | |
5147 | echo "$ac_err" >&5 | |
5148 | echo "configure: failed program was:" >&5 | |
5149 | cat conftest.$ac_ext >&5 | |
5150 | rm -rf conftest* | |
5151 | eval "ac_cv_header_$ac_safe=no" | |
5152 | fi | |
5153 | rm -f conftest* | |
5154 | fi | |
5155 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5156 | echo "$ac_t""yes" 1>&6 | |
5157 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5158 | cat >> confdefs.h <<EOF | |
5159 | #define $ac_tr_hdr 1 | |
5160 | EOF | |
5161 | ||
5162 | else | |
5163 | echo "$ac_t""no" 1>&6 | |
5164 | fi | |
5165 | done | |
5166 | ||
78434e59 | 5167 | for ac_hdr in sys/reg.h sys/debugreg.h |
5ee754fc MK |
5168 | do |
5169 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5170 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5171 | echo "configure:5172: checking for $ac_hdr" >&5 |
5ee754fc MK |
5172 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5174 | else | |
5175 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5176 | #line 5177 "configure" |
5ee754fc MK |
5177 | #include "confdefs.h" |
5178 | #include <$ac_hdr> | |
5179 | EOF | |
5180 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5181 | { (eval echo configure:5182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5182 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5183 | if test -z "$ac_err"; then | |
5184 | rm -rf conftest* | |
5185 | eval "ac_cv_header_$ac_safe=yes" | |
5186 | else | |
5187 | echo "$ac_err" >&5 | |
5188 | echo "configure: failed program was:" >&5 | |
5189 | cat conftest.$ac_ext >&5 | |
5190 | rm -rf conftest* | |
5191 | eval "ac_cv_header_$ac_safe=no" | |
5192 | fi | |
5193 | rm -f conftest* | |
5194 | fi | |
5195 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5196 | echo "$ac_t""yes" 1>&6 | |
5197 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5198 | cat >> confdefs.h <<EOF | |
5199 | #define $ac_tr_hdr 1 | |
5200 | EOF | |
5201 | ||
5202 | else | |
5203 | echo "$ac_t""no" 1>&6 | |
5204 | fi | |
5205 | done | |
5206 | ||
78434e59 | 5207 | for ac_hdr in sys/select.h |
5ee754fc MK |
5208 | do |
5209 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5210 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5211 | echo "configure:5212: checking for $ac_hdr" >&5 |
5ee754fc MK |
5212 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5214 | else | |
5215 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5216 | #line 5217 "configure" |
5ee754fc MK |
5217 | #include "confdefs.h" |
5218 | #include <$ac_hdr> | |
5219 | EOF | |
5220 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5221 | { (eval echo configure:5222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5222 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5223 | if test -z "$ac_err"; then | |
5224 | rm -rf conftest* | |
5225 | eval "ac_cv_header_$ac_safe=yes" | |
5226 | else | |
5227 | echo "$ac_err" >&5 | |
5228 | echo "configure: failed program was:" >&5 | |
5229 | cat conftest.$ac_ext >&5 | |
5230 | rm -rf conftest* | |
5231 | eval "ac_cv_header_$ac_safe=no" | |
5232 | fi | |
5233 | rm -f conftest* | |
5234 | fi | |
5235 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5236 | echo "$ac_t""yes" 1>&6 | |
5237 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5238 | cat >> confdefs.h <<EOF | |
5239 | #define $ac_tr_hdr 1 | |
5240 | EOF | |
5241 | ||
5242 | else | |
5243 | echo "$ac_t""no" 1>&6 | |
5244 | fi | |
5245 | done | |
5246 | ||
78434e59 | 5247 | for ac_hdr in sys/syscall.h |
5ee754fc MK |
5248 | do |
5249 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5250 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5251 | echo "configure:5252: checking for $ac_hdr" >&5 |
5ee754fc MK |
5252 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5253 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5254 | else | |
5255 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5256 | #line 5257 "configure" |
5ee754fc MK |
5257 | #include "confdefs.h" |
5258 | #include <$ac_hdr> | |
5259 | EOF | |
5260 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5261 | { (eval echo configure:5262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5262 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5263 | if test -z "$ac_err"; then | |
5264 | rm -rf conftest* | |
5265 | eval "ac_cv_header_$ac_safe=yes" | |
5266 | else | |
5267 | echo "$ac_err" >&5 | |
5268 | echo "configure: failed program was:" >&5 | |
5269 | cat conftest.$ac_ext >&5 | |
5270 | rm -rf conftest* | |
5271 | eval "ac_cv_header_$ac_safe=no" | |
5272 | fi | |
5273 | rm -f conftest* | |
5274 | fi | |
5275 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5276 | echo "$ac_t""yes" 1>&6 | |
5277 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5278 | cat >> confdefs.h <<EOF | |
5279 | #define $ac_tr_hdr 1 | |
5280 | EOF | |
5281 | ||
5282 | else | |
5283 | echo "$ac_t""no" 1>&6 | |
5284 | fi | |
5285 | done | |
5286 | ||
086ec9eb | 5287 | for ac_hdr in sys/types.h |
5ee754fc MK |
5288 | do |
5289 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5290 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5291 | echo "configure:5292: checking for $ac_hdr" >&5 |
5ee754fc MK |
5292 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5293 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5294 | else | |
5295 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5296 | #line 5297 "configure" |
5ee754fc MK |
5297 | #include "confdefs.h" |
5298 | #include <$ac_hdr> | |
5299 | EOF | |
5300 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5301 | { (eval echo configure:5302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5302 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5303 | if test -z "$ac_err"; then | |
5304 | rm -rf conftest* | |
5305 | eval "ac_cv_header_$ac_safe=yes" | |
5306 | else | |
5307 | echo "$ac_err" >&5 | |
9608ab8b MK |
5308 | echo "configure: failed program was:" >&5 |
5309 | cat conftest.$ac_ext >&5 | |
5310 | rm -rf conftest* | |
5ee754fc | 5311 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5312 | fi |
5313 | rm -f conftest* | |
5314 | fi | |
5ee754fc | 5315 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5316 | echo "$ac_t""yes" 1>&6 |
5317 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5318 | cat >> confdefs.h <<EOF | |
5319 | #define $ac_tr_hdr 1 | |
5320 | EOF | |
5ee754fc | 5321 | |
9608ab8b MK |
5322 | else |
5323 | echo "$ac_t""no" 1>&6 | |
5324 | fi | |
5325 | done | |
5ee754fc | 5326 | |
086ec9eb | 5327 | for ac_hdr in sys/user.h |
5ee754fc MK |
5328 | do |
5329 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5330 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5331 | echo "configure:5332: checking for $ac_hdr" >&5 |
5ee754fc | 5332 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5333 | echo $ac_n "(cached) $ac_c" 1>&6 |
5334 | else | |
5ee754fc | 5335 | cat > conftest.$ac_ext <<EOF |
0bbc026e | 5336 | #line 5337 "configure" |
9608ab8b | 5337 | #include "confdefs.h" |
5ee754fc | 5338 | #include <$ac_hdr> |
9608ab8b | 5339 | EOF |
5ee754fc | 5340 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
0bbc026e | 5341 | { (eval echo configure:5342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5342 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5343 | if test -z "$ac_err"; then | |
9608ab8b | 5344 | rm -rf conftest* |
5ee754fc | 5345 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5346 | else |
5ee754fc | 5347 | echo "$ac_err" >&5 |
9608ab8b MK |
5348 | echo "configure: failed program was:" >&5 |
5349 | cat conftest.$ac_ext >&5 | |
5350 | rm -rf conftest* | |
5ee754fc | 5351 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5352 | fi |
5353 | rm -f conftest* | |
9608ab8b | 5354 | fi |
5ee754fc | 5355 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5356 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5357 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5358 | cat >> confdefs.h <<EOF | |
5359 | #define $ac_tr_hdr 1 | |
5360 | EOF | |
5361 | ||
9608ab8b MK |
5362 | else |
5363 | echo "$ac_t""no" 1>&6 | |
5364 | fi | |
5ee754fc | 5365 | done |
9608ab8b | 5366 | |
086ec9eb | 5367 | for ac_hdr in sys/wait.h wait.h |
5ee754fc MK |
5368 | do |
5369 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5370 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5371 | echo "configure:5372: checking for $ac_hdr" >&5 |
5ee754fc | 5372 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5373 | echo $ac_n "(cached) $ac_c" 1>&6 |
5374 | else | |
5ee754fc | 5375 | cat > conftest.$ac_ext <<EOF |
0bbc026e | 5376 | #line 5377 "configure" |
9608ab8b | 5377 | #include "confdefs.h" |
5ee754fc | 5378 | #include <$ac_hdr> |
9608ab8b | 5379 | EOF |
5ee754fc | 5380 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
0bbc026e | 5381 | { (eval echo configure:5382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5382 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5383 | if test -z "$ac_err"; then | |
9608ab8b | 5384 | rm -rf conftest* |
5ee754fc | 5385 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5386 | else |
5ee754fc | 5387 | echo "$ac_err" >&5 |
9608ab8b MK |
5388 | echo "configure: failed program was:" >&5 |
5389 | cat conftest.$ac_ext >&5 | |
5390 | rm -rf conftest* | |
5ee754fc | 5391 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5392 | fi |
5393 | rm -f conftest* | |
9608ab8b | 5394 | fi |
5ee754fc | 5395 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5396 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5397 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5398 | cat >> confdefs.h <<EOF | |
5399 | #define $ac_tr_hdr 1 | |
5400 | EOF | |
5401 | ||
9608ab8b MK |
5402 | else |
5403 | echo "$ac_t""no" 1>&6 | |
5404 | fi | |
5ee754fc | 5405 | done |
9608ab8b | 5406 | |
086ec9eb | 5407 | for ac_hdr in termios.h termio.h sgtty.h |
78434e59 MK |
5408 | do |
5409 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5410 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5411 | echo "configure:5412: checking for $ac_hdr" >&5 |
78434e59 MK |
5412 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5413 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5414 | else | |
5415 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5416 | #line 5417 "configure" |
78434e59 MK |
5417 | #include "confdefs.h" |
5418 | #include <$ac_hdr> | |
5419 | EOF | |
5420 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5421 | { (eval echo configure:5422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
78434e59 MK |
5422 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5423 | if test -z "$ac_err"; then | |
5424 | rm -rf conftest* | |
5425 | eval "ac_cv_header_$ac_safe=yes" | |
5426 | else | |
5427 | echo "$ac_err" >&5 | |
5428 | echo "configure: failed program was:" >&5 | |
5429 | cat conftest.$ac_ext >&5 | |
5430 | rm -rf conftest* | |
5431 | eval "ac_cv_header_$ac_safe=no" | |
5432 | fi | |
5433 | rm -f conftest* | |
5434 | fi | |
5435 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5436 | echo "$ac_t""yes" 1>&6 | |
5437 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5438 | cat >> confdefs.h <<EOF | |
5439 | #define $ac_tr_hdr 1 | |
5440 | EOF | |
5441 | ||
5442 | else | |
5443 | echo "$ac_t""no" 1>&6 | |
5444 | fi | |
5445 | done | |
5446 | ||
086ec9eb MK |
5447 | for ac_hdr in unistd.h |
5448 | do | |
5449 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5450 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5451 | echo "configure:5452: checking for $ac_hdr" >&5 |
086ec9eb MK |
5452 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5453 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5454 | else | |
5455 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5456 | #line 5457 "configure" |
086ec9eb MK |
5457 | #include "confdefs.h" |
5458 | #include <$ac_hdr> | |
5459 | EOF | |
5460 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5461 | { (eval echo configure:5462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
086ec9eb MK |
5462 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5463 | if test -z "$ac_err"; then | |
5464 | rm -rf conftest* | |
5465 | eval "ac_cv_header_$ac_safe=yes" | |
5466 | else | |
5467 | echo "$ac_err" >&5 | |
5468 | echo "configure: failed program was:" >&5 | |
5469 | cat conftest.$ac_ext >&5 | |
5470 | rm -rf conftest* | |
5471 | eval "ac_cv_header_$ac_safe=no" | |
5472 | fi | |
5473 | rm -f conftest* | |
5474 | fi | |
5475 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5476 | echo "$ac_t""yes" 1>&6 | |
5477 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5478 | cat >> confdefs.h <<EOF | |
5479 | #define $ac_tr_hdr 1 | |
5480 | EOF | |
5481 | ||
5482 | else | |
5483 | echo "$ac_t""no" 1>&6 | |
5484 | fi | |
5485 | done | |
5486 | ||
9608ab8b | 5487 | |
b1d19a62 | 5488 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
5ee754fc MK |
5489 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to |
5490 | # think that we don't have <curses.h> if we're using GCC. | |
5491 | case $host_os in | |
b1d19a62 | 5492 | solaris2.[789]) |
5ee754fc MK |
5493 | if test "$GCC" = yes; then |
5494 | cat >> confdefs.h <<\EOF | |
5495 | #define _MSE_INT_H 1 | |
5496 | EOF | |
5497 | ||
5498 | fi ;; | |
5499 | esac | |
a6ed5501 | 5500 | for ac_hdr in curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h |
5ee754fc MK |
5501 | do |
5502 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5503 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5504 | echo "configure:5505: checking for $ac_hdr" >&5 |
5ee754fc | 5505 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5506 | echo $ac_n "(cached) $ac_c" 1>&6 |
5507 | else | |
5508 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5509 | #line 5510 "configure" |
c906108c | 5510 | #include "confdefs.h" |
5ee754fc | 5511 | #include <$ac_hdr> |
c906108c SS |
5512 | EOF |
5513 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5514 | { (eval echo configure:5515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5515 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5516 | if test -z "$ac_err"; then | |
5517 | rm -rf conftest* | |
5ee754fc | 5518 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5519 | else |
5520 | echo "$ac_err" >&5 | |
5521 | echo "configure: failed program was:" >&5 | |
5522 | cat conftest.$ac_ext >&5 | |
5523 | rm -rf conftest* | |
5ee754fc | 5524 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5525 | fi |
5526 | rm -f conftest* | |
c906108c | 5527 | fi |
5ee754fc MK |
5528 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5529 | echo "$ac_t""yes" 1>&6 | |
5530 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5531 | cat >> confdefs.h <<EOF | |
5532 | #define $ac_tr_hdr 1 | |
c906108c | 5533 | EOF |
5ee754fc | 5534 | |
c906108c | 5535 | else |
5ee754fc | 5536 | echo "$ac_t""no" 1>&6 |
c906108c | 5537 | fi |
5ee754fc | 5538 | done |
c906108c SS |
5539 | |
5540 | ||
5ee754fc MK |
5541 | # FIXME: kettenis/20030102: In most cases we include these |
5542 | # unconditionally, so what's the point in checking these? | |
5543 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5544 | do |
5545 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5546 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 5547 | echo "configure:5548: checking for $ac_hdr" >&5 |
c906108c SS |
5548 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5549 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5550 | else | |
5551 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5552 | #line 5553 "configure" |
c906108c SS |
5553 | #include "confdefs.h" |
5554 | #include <$ac_hdr> | |
5555 | EOF | |
5556 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 5557 | { (eval echo configure:5558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5558 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5559 | if test -z "$ac_err"; then | |
5560 | rm -rf conftest* | |
5561 | eval "ac_cv_header_$ac_safe=yes" | |
5562 | else | |
5563 | echo "$ac_err" >&5 | |
5564 | echo "configure: failed program was:" >&5 | |
5565 | cat conftest.$ac_ext >&5 | |
5566 | rm -rf conftest* | |
5567 | eval "ac_cv_header_$ac_safe=no" | |
5568 | fi | |
5569 | rm -f conftest* | |
5570 | fi | |
5571 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5572 | echo "$ac_t""yes" 1>&6 | |
5573 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5574 | cat >> confdefs.h <<EOF | |
5575 | #define $ac_tr_hdr 1 | |
5576 | EOF | |
5577 | ||
5578 | else | |
5579 | echo "$ac_t""no" 1>&6 | |
5580 | fi | |
5581 | done | |
5582 | ||
5ee754fc | 5583 | |
40a7debc | 5584 | echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6 |
0bbc026e | 5585 | echo "configure:5586: checking for member st_blocks in struct stat" >&5 |
40a7debc EZ |
5586 | if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then |
5587 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5588 | else | |
5589 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5590 | #line 5591 "configure" |
40a7debc EZ |
5591 | #include "confdefs.h" |
5592 | #include <sys/types.h> | |
5593 | #include <sys/stat.h> | |
5594 | int main() { | |
5595 | struct stat st; (void) st.st_blocks; | |
5596 | ; return 0; } | |
5597 | EOF | |
0bbc026e | 5598 | if { (eval echo configure:5599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
40a7debc EZ |
5599 | rm -rf conftest* |
5600 | gdb_cv_have_struct_stat_with_st_blocks_member=yes | |
5601 | else | |
5602 | echo "configure: failed program was:" >&5 | |
5603 | cat conftest.$ac_ext >&5 | |
5604 | rm -rf conftest* | |
5605 | gdb_cv_have_struct_stat_with_st_blocks_member=no | |
5606 | fi | |
5607 | rm -f conftest* | |
5608 | fi | |
5609 | ||
5610 | echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6 | |
5611 | if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then | |
5612 | cat >> confdefs.h <<\EOF | |
5613 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
5614 | EOF | |
5615 | ||
5616 | fi | |
086ec9eb | 5617 | |
b9362cc7 AC |
5618 | # ------------------------- # |
5619 | # Checks for declarations. # | |
5620 | # ------------------------- # | |
5621 | ||
5622 | for ac_func in getopt | |
5623 | do | |
5624 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5625 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
0bbc026e | 5626 | echo "configure:5627: checking whether $ac_func is declared" >&5 |
b9362cc7 AC |
5627 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
5628 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5629 | else | |
5630 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5631 | #line 5632 "configure" |
b9362cc7 AC |
5632 | #include "confdefs.h" |
5633 | #undef $ac_tr_decl | |
5634 | #define $ac_tr_decl 1 | |
5635 | ||
5636 | ||
5637 | int main() { | |
5638 | #ifndef $ac_func | |
5639 | char *(*pfn) = (char *(*)) $ac_func ; | |
5640 | #endif | |
5641 | ; return 0; } | |
5642 | EOF | |
0bbc026e | 5643 | if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9362cc7 AC |
5644 | rm -rf conftest* |
5645 | eval "gcc_cv_have_decl_$ac_func=yes" | |
5646 | else | |
5647 | echo "configure: failed program was:" >&5 | |
5648 | cat conftest.$ac_ext >&5 | |
5649 | rm -rf conftest* | |
5650 | eval "gcc_cv_have_decl_$ac_func=no" | |
5651 | fi | |
5652 | rm -f conftest* | |
5653 | fi | |
5654 | ||
5655 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5656 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
5657 | #define $ac_tr_decl 1 | |
5658 | EOF | |
5659 | ||
5660 | else | |
5661 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
5662 | #define $ac_tr_decl 0 | |
5663 | EOF | |
5664 | ||
5665 | fi | |
5666 | ||
5667 | done | |
5668 | if test x = y ; then | |
5669 | cat >> confdefs.h <<\EOF | |
5670 | #define HAVE_DECL_GETOPT 1 | |
5671 | EOF | |
5672 | fi | |
5673 | ||
5674 | ||
5ee754fc MK |
5675 | # ------------------ # |
5676 | # Checks for types. # | |
5677 | # ------------------ # | |
5678 | ||
5679 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
0bbc026e | 5680 | echo "configure:5681: checking return type of signal handlers" >&5 |
5ee754fc | 5681 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5682 | echo $ac_n "(cached) $ac_c" 1>&6 |
5683 | else | |
5684 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5685 | #line 5686 "configure" |
c906108c SS |
5686 | #include "confdefs.h" |
5687 | #include <sys/types.h> | |
5ee754fc MK |
5688 | #include <signal.h> |
5689 | #ifdef signal | |
5690 | #undef signal | |
c906108c | 5691 | #endif |
5ee754fc MK |
5692 | #ifdef __cplusplus |
5693 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5694 | #else | |
5695 | void (*signal ()) (); | |
c906108c SS |
5696 | #endif |
5697 | ||
5ee754fc MK |
5698 | int main() { |
5699 | int i; | |
5700 | ; return 0; } | |
c906108c | 5701 | EOF |
0bbc026e | 5702 | if { (eval echo configure:5703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5703 | rm -rf conftest* |
5ee754fc | 5704 | ac_cv_type_signal=void |
c906108c | 5705 | else |
5ee754fc MK |
5706 | echo "configure: failed program was:" >&5 |
5707 | cat conftest.$ac_ext >&5 | |
c906108c | 5708 | rm -rf conftest* |
5ee754fc | 5709 | ac_cv_type_signal=int |
c906108c SS |
5710 | fi |
5711 | rm -f conftest* | |
c906108c SS |
5712 | fi |
5713 | ||
5ee754fc MK |
5714 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5715 | cat >> confdefs.h <<EOF | |
5716 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5717 | EOF |
5718 | ||
c906108c SS |
5719 | |
5720 | ||
5ee754fc MK |
5721 | # ------------------------------------- # |
5722 | # Checks for compiler characteristics. # | |
5723 | # ------------------------------------- # | |
5724 | ||
c906108c | 5725 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
0bbc026e | 5726 | echo "configure:5727: checking for working const" >&5 |
c906108c SS |
5727 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5728 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5729 | else | |
5730 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5731 | #line 5732 "configure" |
c906108c SS |
5732 | #include "confdefs.h" |
5733 | ||
5734 | int main() { | |
5735 | ||
5736 | /* Ultrix mips cc rejects this. */ | |
5737 | typedef int charset[2]; const charset x; | |
5738 | /* SunOS 4.1.1 cc rejects this. */ | |
5739 | char const *const *ccp; | |
5740 | char **p; | |
5741 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5742 | struct point {int x, y;}; | |
5743 | static struct point const zero = {0,0}; | |
5744 | /* AIX XL C 1.02.0.0 rejects this. | |
5745 | It does not let you subtract one const X* pointer from another in an arm | |
5746 | of an if-expression whose if-part is not a constant expression */ | |
5747 | const char *g = "string"; | |
5748 | ccp = &g + (g ? g-g : 0); | |
5749 | /* HPUX 7.0 cc rejects these. */ | |
5750 | ++ccp; | |
5751 | p = (char**) ccp; | |
5752 | ccp = (char const *const *) p; | |
5753 | { /* SCO 3.2v4 cc rejects this. */ | |
5754 | char *t; | |
5755 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5756 | ||
5757 | *t++ = 0; | |
5758 | } | |
5759 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5760 | int x[] = {25, 17}; | |
5761 | const int *foo = &x[0]; | |
5762 | ++foo; | |
5763 | } | |
5764 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5765 | typedef const int *iptr; | |
5766 | iptr p = 0; | |
5767 | ++p; | |
5768 | } | |
5769 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5770 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5771 | struct s { int j; const int *ap[3]; }; | |
5772 | struct s *b; b->j = 5; | |
5773 | } | |
5774 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5775 | const int foo = 10; | |
5776 | } | |
5777 | ||
5778 | ; return 0; } | |
5779 | EOF | |
0bbc026e | 5780 | if { (eval echo configure:5781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5781 | rm -rf conftest* |
5782 | ac_cv_c_const=yes | |
5783 | else | |
5784 | echo "configure: failed program was:" >&5 | |
5785 | cat conftest.$ac_ext >&5 | |
5786 | rm -rf conftest* | |
5787 | ac_cv_c_const=no | |
5788 | fi | |
5789 | rm -f conftest* | |
5790 | fi | |
5791 | ||
5792 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5793 | if test $ac_cv_c_const = no; then | |
5794 | cat >> confdefs.h <<\EOF | |
5795 | #define const | |
5796 | EOF | |
5797 | ||
5798 | fi | |
5799 | ||
bce58c09 | 5800 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
0bbc026e | 5801 | echo "configure:5802: checking for inline" >&5 |
bce58c09 JB |
5802 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5803 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5804 | else | |
5805 | ac_cv_c_inline=no | |
5806 | for ac_kw in inline __inline__ __inline; do | |
5807 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5808 | #line 5809 "configure" |
bce58c09 JB |
5809 | #include "confdefs.h" |
5810 | ||
5811 | int main() { | |
5812 | } $ac_kw foo() { | |
5813 | ; return 0; } | |
5814 | EOF | |
0bbc026e | 5815 | if { (eval echo configure:5816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5816 | rm -rf conftest* |
5817 | ac_cv_c_inline=$ac_kw; break | |
5818 | else | |
5819 | echo "configure: failed program was:" >&5 | |
5820 | cat conftest.$ac_ext >&5 | |
5821 | fi | |
5822 | rm -f conftest* | |
5823 | done | |
5824 | ||
5825 | fi | |
5826 | ||
5827 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5828 | case "$ac_cv_c_inline" in | |
5829 | inline | yes) ;; | |
5830 | no) cat >> confdefs.h <<\EOF | |
5831 | #define inline | |
5832 | EOF | |
5833 | ;; | |
5834 | *) cat >> confdefs.h <<EOF | |
5835 | #define inline $ac_cv_c_inline | |
5836 | EOF | |
5837 | ;; | |
5838 | esac | |
5839 | ||
c906108c | 5840 | |
5ee754fc MK |
5841 | # ------------------------------ # |
5842 | # Checks for library functions. # | |
5843 | # ------------------------------ # | |
5844 | ||
46711df8 MK |
5845 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5846 | # for constant arguments. Useless! | |
5847 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
0bbc026e | 5848 | echo "configure:5849: checking for working alloca.h" >&5 |
46711df8 MK |
5849 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5851 | else | |
5852 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5853 | #line 5854 "configure" |
46711df8 MK |
5854 | #include "confdefs.h" |
5855 | #include <alloca.h> | |
5856 | int main() { | |
5857 | char *p = alloca(2 * sizeof(int)); | |
5858 | ; return 0; } | |
5859 | EOF | |
0bbc026e | 5860 | if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5861 | rm -rf conftest* |
5862 | ac_cv_header_alloca_h=yes | |
5863 | else | |
5864 | echo "configure: failed program was:" >&5 | |
5865 | cat conftest.$ac_ext >&5 | |
5866 | rm -rf conftest* | |
5867 | ac_cv_header_alloca_h=no | |
5868 | fi | |
5869 | rm -f conftest* | |
5870 | fi | |
5871 | ||
5872 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5873 | if test $ac_cv_header_alloca_h = yes; then | |
5874 | cat >> confdefs.h <<\EOF | |
5875 | #define HAVE_ALLOCA_H 1 | |
5876 | EOF | |
5877 | ||
5878 | fi | |
5879 | ||
5880 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
0bbc026e | 5881 | echo "configure:5882: checking for alloca" >&5 |
46711df8 MK |
5882 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5883 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5884 | else | |
5885 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5886 | #line 5887 "configure" |
46711df8 MK |
5887 | #include "confdefs.h" |
5888 | ||
5889 | #ifdef __GNUC__ | |
5890 | # define alloca __builtin_alloca | |
5891 | #else | |
5892 | # ifdef _MSC_VER | |
5893 | # include <malloc.h> | |
5894 | # define alloca _alloca | |
5895 | # else | |
5896 | # if HAVE_ALLOCA_H | |
5897 | # include <alloca.h> | |
5898 | # else | |
5899 | # ifdef _AIX | |
5900 | #pragma alloca | |
5901 | # else | |
5902 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5903 | char *alloca (); | |
5904 | # endif | |
5905 | # endif | |
5906 | # endif | |
5907 | # endif | |
5908 | #endif | |
5909 | ||
5910 | int main() { | |
5911 | char *p = (char *) alloca(1); | |
5912 | ; return 0; } | |
5913 | EOF | |
0bbc026e | 5914 | if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5915 | rm -rf conftest* |
5916 | ac_cv_func_alloca_works=yes | |
5917 | else | |
5918 | echo "configure: failed program was:" >&5 | |
5919 | cat conftest.$ac_ext >&5 | |
5920 | rm -rf conftest* | |
5921 | ac_cv_func_alloca_works=no | |
5922 | fi | |
5923 | rm -f conftest* | |
5924 | fi | |
5925 | ||
5926 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5927 | if test $ac_cv_func_alloca_works = yes; then | |
5928 | cat >> confdefs.h <<\EOF | |
5929 | #define HAVE_ALLOCA 1 | |
5930 | EOF | |
5931 | ||
5932 | fi | |
5933 | ||
5934 | if test $ac_cv_func_alloca_works = no; then | |
5935 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5936 | # that cause trouble. Some versions do not even contain alloca or | |
5937 | # contain a buggy version. If you still want to use their alloca, | |
5938 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5939 | ALLOCA=alloca.${ac_objext} | |
5940 | cat >> confdefs.h <<\EOF | |
5941 | #define C_ALLOCA 1 | |
5942 | EOF | |
5943 | ||
5944 | ||
5945 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
0bbc026e | 5946 | echo "configure:5947: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5947 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5948 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5949 | else | |
5950 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5951 | #line 5952 "configure" |
46711df8 MK |
5952 | #include "confdefs.h" |
5953 | #if defined(CRAY) && ! defined(CRAY2) | |
5954 | webecray | |
5955 | #else | |
5956 | wenotbecray | |
5957 | #endif | |
5958 | ||
5959 | EOF | |
5960 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5961 | egrep "webecray" >/dev/null 2>&1; then | |
5962 | rm -rf conftest* | |
5963 | ac_cv_os_cray=yes | |
5964 | else | |
5965 | rm -rf conftest* | |
5966 | ac_cv_os_cray=no | |
5967 | fi | |
5968 | rm -f conftest* | |
5969 | ||
5970 | fi | |
5971 | ||
5972 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5973 | if test $ac_cv_os_cray = yes; then | |
5974 | for ac_func in _getb67 GETB67 getb67; do | |
5975 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 5976 | echo "configure:5977: checking for $ac_func" >&5 |
46711df8 MK |
5977 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5978 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5979 | else | |
5980 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 5981 | #line 5982 "configure" |
46711df8 MK |
5982 | #include "confdefs.h" |
5983 | /* System header to define __stub macros and hopefully few prototypes, | |
5984 | which can conflict with char $ac_func(); below. */ | |
5985 | #include <assert.h> | |
5986 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5987 | /* We use char because int might match the return type of a gcc2 | |
5988 | builtin and then its argument prototype would still apply. */ | |
5989 | char $ac_func(); | |
5990 | ||
5991 | int main() { | |
5992 | ||
5993 | /* The GNU C library defines this for functions which it implements | |
5994 | to always fail with ENOSYS. Some functions are actually named | |
5995 | something starting with __ and the normal name is an alias. */ | |
5996 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5997 | choke me | |
5998 | #else | |
5999 | $ac_func(); | |
6000 | #endif | |
6001 | ||
6002 | ; return 0; } | |
6003 | EOF | |
0bbc026e | 6004 | if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6005 | rm -rf conftest* |
6006 | eval "ac_cv_func_$ac_func=yes" | |
6007 | else | |
6008 | echo "configure: failed program was:" >&5 | |
6009 | cat conftest.$ac_ext >&5 | |
6010 | rm -rf conftest* | |
6011 | eval "ac_cv_func_$ac_func=no" | |
6012 | fi | |
6013 | rm -f conftest* | |
6014 | fi | |
6015 | ||
6016 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6017 | echo "$ac_t""yes" 1>&6 | |
6018 | cat >> confdefs.h <<EOF | |
6019 | #define CRAY_STACKSEG_END $ac_func | |
6020 | EOF | |
6021 | ||
6022 | break | |
6023 | else | |
6024 | echo "$ac_t""no" 1>&6 | |
6025 | fi | |
6026 | ||
6027 | done | |
6028 | fi | |
6029 | ||
6030 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
0bbc026e | 6031 | echo "configure:6032: checking stack direction for C alloca" >&5 |
46711df8 MK |
6032 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
6033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6034 | else | |
6035 | if test "$cross_compiling" = yes; then | |
6036 | ac_cv_c_stack_direction=0 | |
6037 | else | |
6038 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6039 | #line 6040 "configure" |
46711df8 MK |
6040 | #include "confdefs.h" |
6041 | find_stack_direction () | |
6042 | { | |
6043 | static char *addr = 0; | |
6044 | auto char dummy; | |
6045 | if (addr == 0) | |
6046 | { | |
6047 | addr = &dummy; | |
6048 | return find_stack_direction (); | |
6049 | } | |
6050 | else | |
6051 | return (&dummy > addr) ? 1 : -1; | |
6052 | } | |
6053 | main () | |
6054 | { | |
6055 | exit (find_stack_direction() < 0); | |
6056 | } | |
6057 | EOF | |
0bbc026e | 6058 | if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
6059 | then |
6060 | ac_cv_c_stack_direction=1 | |
6061 | else | |
6062 | echo "configure: failed program was:" >&5 | |
6063 | cat conftest.$ac_ext >&5 | |
6064 | rm -fr conftest* | |
6065 | ac_cv_c_stack_direction=-1 | |
6066 | fi | |
6067 | rm -fr conftest* | |
6068 | fi | |
6069 | ||
6070 | fi | |
6071 | ||
6072 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
6073 | cat >> confdefs.h <<EOF | |
6074 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6075 | EOF | |
6076 | ||
6077 | fi | |
6078 | ||
d836ee13 | 6079 | for ac_hdr in unistd.h |
97bf5e38 MK |
6080 | do |
6081 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
6082 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bbc026e | 6083 | echo "configure:6084: checking for $ac_hdr" >&5 |
74c1b268 AC |
6084 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6086 | else | |
6087 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6088 | #line 6089 "configure" |
74c1b268 | 6089 | #include "confdefs.h" |
97bf5e38 | 6090 | #include <$ac_hdr> |
74c1b268 AC |
6091 | EOF |
6092 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 6093 | { (eval echo configure:6094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
6094 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6095 | if test -z "$ac_err"; then | |
6096 | rm -rf conftest* | |
6097 | eval "ac_cv_header_$ac_safe=yes" | |
6098 | else | |
6099 | echo "$ac_err" >&5 | |
6100 | echo "configure: failed program was:" >&5 | |
6101 | cat conftest.$ac_ext >&5 | |
6102 | rm -rf conftest* | |
6103 | eval "ac_cv_header_$ac_safe=no" | |
6104 | fi | |
6105 | rm -f conftest* | |
6106 | fi | |
6107 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6108 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
6109 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
6110 | cat >> confdefs.h <<EOF | |
6111 | #define $ac_tr_hdr 1 | |
74c1b268 | 6112 | EOF |
97bf5e38 | 6113 | |
74c1b268 AC |
6114 | else |
6115 | echo "$ac_t""no" 1>&6 | |
6116 | fi | |
97bf5e38 | 6117 | done |
74c1b268 | 6118 | |
97bf5e38 MK |
6119 | for ac_func in getpagesize |
6120 | do | |
6121 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6122 | echo "configure:6123: checking for $ac_func" >&5 |
97bf5e38 | 6123 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
6124 | echo $ac_n "(cached) $ac_c" 1>&6 |
6125 | else | |
6126 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6127 | #line 6128 "configure" |
74c1b268 AC |
6128 | #include "confdefs.h" |
6129 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 6130 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
6131 | #include <assert.h> |
6132 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6133 | /* We use char because int might match the return type of a gcc2 | |
6134 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 6135 | char $ac_func(); |
74c1b268 AC |
6136 | |
6137 | int main() { | |
6138 | ||
6139 | /* The GNU C library defines this for functions which it implements | |
6140 | to always fail with ENOSYS. Some functions are actually named | |
6141 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 6142 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
6143 | choke me |
6144 | #else | |
97bf5e38 | 6145 | $ac_func(); |
74c1b268 AC |
6146 | #endif |
6147 | ||
6148 | ; return 0; } | |
6149 | EOF | |
0bbc026e | 6150 | if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 6151 | rm -rf conftest* |
97bf5e38 | 6152 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
6153 | else |
6154 | echo "configure: failed program was:" >&5 | |
6155 | cat conftest.$ac_ext >&5 | |
6156 | rm -rf conftest* | |
97bf5e38 | 6157 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
6158 | fi |
6159 | rm -f conftest* | |
6160 | fi | |
6161 | ||
97bf5e38 | 6162 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 6163 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
6164 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6165 | cat >> confdefs.h <<EOF | |
6166 | #define $ac_tr_func 1 | |
6167 | EOF | |
6168 | ||
74c1b268 AC |
6169 | else |
6170 | echo "$ac_t""no" 1>&6 | |
6171 | fi | |
97bf5e38 | 6172 | done |
74c1b268 | 6173 | |
97bf5e38 | 6174 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
0bbc026e | 6175 | echo "configure:6176: checking for working mmap" >&5 |
97bf5e38 MK |
6176 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6177 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6178 | else | |
6179 | if test "$cross_compiling" = yes; then | |
6180 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
6181 | else |
6182 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6183 | #line 6184 "configure" |
74c1b268 | 6184 | #include "confdefs.h" |
97bf5e38 MK |
6185 | |
6186 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6187 | Here is a matrix of mmap possibilities: | |
6188 | mmap private not fixed | |
6189 | mmap private fixed at somewhere currently unmapped | |
6190 | mmap private fixed at somewhere already mapped | |
6191 | mmap shared not fixed | |
6192 | mmap shared fixed at somewhere currently unmapped | |
6193 | mmap shared fixed at somewhere already mapped | |
6194 | For private mappings, we should verify that changes cannot be read() | |
6195 | back from the file, nor mmap's back from the file at a different | |
6196 | address. (There have been systems where private was not correctly | |
6197 | implemented like the infamous i386 svr4.0, and systems where the | |
6198 | VM page cache was not coherent with the filesystem buffer cache | |
6199 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6200 | For shared mappings, we should conversely verify that changes get | |
6201 | propogated back to all the places they're supposed to be. | |
6202 | ||
6203 | Grep wants private fixed already mapped. | |
6204 | The main things grep needs to know about mmap are: | |
6205 | * does it exist and is it safe to write into the mmap'd area | |
6206 | * how to use it (BSD variants) */ | |
74c1b268 | 6207 | #include <sys/types.h> |
97bf5e38 MK |
6208 | #include <fcntl.h> |
6209 | #include <sys/mman.h> | |
6210 | ||
6211 | /* This mess was copied from the GNU getpagesize.h. */ | |
6212 | #ifndef HAVE_GETPAGESIZE | |
d836ee13 AC |
6213 | # ifdef HAVE_UNISTD_H |
6214 | # include <unistd.h> | |
6215 | # endif | |
97bf5e38 MK |
6216 | |
6217 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6218 | # ifndef HAVE_SYS_PARAM_H | |
6219 | # define HAVE_SYS_PARAM_H 1 | |
6220 | # endif | |
6221 | ||
6222 | # ifdef _SC_PAGESIZE | |
6223 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6224 | # else /* no _SC_PAGESIZE */ | |
6225 | # ifdef HAVE_SYS_PARAM_H | |
6226 | # include <sys/param.h> | |
6227 | # ifdef EXEC_PAGESIZE | |
6228 | # define getpagesize() EXEC_PAGESIZE | |
6229 | # else /* no EXEC_PAGESIZE */ | |
6230 | # ifdef NBPG | |
6231 | # define getpagesize() NBPG * CLSIZE | |
6232 | # ifndef CLSIZE | |
6233 | # define CLSIZE 1 | |
6234 | # endif /* no CLSIZE */ | |
6235 | # else /* no NBPG */ | |
6236 | # ifdef NBPC | |
6237 | # define getpagesize() NBPC | |
6238 | # else /* no NBPC */ | |
6239 | # ifdef PAGESIZE | |
6240 | # define getpagesize() PAGESIZE | |
6241 | # endif /* PAGESIZE */ | |
6242 | # endif /* no NBPC */ | |
6243 | # endif /* no NBPG */ | |
6244 | # endif /* no EXEC_PAGESIZE */ | |
6245 | # else /* no HAVE_SYS_PARAM_H */ | |
6246 | # define getpagesize() 8192 /* punt totally */ | |
6247 | # endif /* no HAVE_SYS_PARAM_H */ | |
6248 | # endif /* no _SC_PAGESIZE */ | |
6249 | ||
6250 | #endif /* no HAVE_GETPAGESIZE */ | |
6251 | ||
74c1b268 | 6252 | #ifdef __cplusplus |
97bf5e38 | 6253 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 6254 | #else |
97bf5e38 | 6255 | char *malloc(); |
74c1b268 | 6256 | #endif |
74c1b268 | 6257 | |
97bf5e38 MK |
6258 | int |
6259 | main() | |
6260 | { | |
6261 | char *data, *data2, *data3; | |
6262 | int i, pagesize; | |
6263 | int fd; | |
74c1b268 | 6264 | |
97bf5e38 | 6265 | pagesize = getpagesize(); |
74c1b268 | 6266 | |
97bf5e38 MK |
6267 | /* |
6268 | * First, make a file with some known garbage in it. | |
6269 | */ | |
6270 | data = malloc(pagesize); | |
6271 | if (!data) | |
6272 | exit(1); | |
6273 | for (i = 0; i < pagesize; ++i) | |
6274 | *(data + i) = rand(); | |
6275 | umask(0); | |
6276 | fd = creat("conftestmmap", 0600); | |
6277 | if (fd < 0) | |
6278 | exit(1); | |
6279 | if (write(fd, data, pagesize) != pagesize) | |
6280 | exit(1); | |
6281 | close(fd); | |
74c1b268 | 6282 | |
97bf5e38 MK |
6283 | /* |
6284 | * Next, try to mmap the file at a fixed address which | |
6285 | * already has something else allocated at it. If we can, | |
6286 | * also make sure that we see the same garbage. | |
6287 | */ | |
6288 | fd = open("conftestmmap", O_RDWR); | |
6289 | if (fd < 0) | |
6290 | exit(1); | |
6291 | data2 = malloc(2 * pagesize); | |
6292 | if (!data2) | |
6293 | exit(1); | |
6294 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6295 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6296 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6297 | exit(1); | |
6298 | for (i = 0; i < pagesize; ++i) | |
6299 | if (*(data + i) != *(data2 + i)) | |
6300 | exit(1); | |
74c1b268 | 6301 | |
97bf5e38 MK |
6302 | /* |
6303 | * Finally, make sure that changes to the mapped area | |
6304 | * do not percolate back to the file as seen by read(). | |
6305 | * (This is a bug on some variants of i386 svr4.0.) | |
6306 | */ | |
6307 | for (i = 0; i < pagesize; ++i) | |
6308 | *(data2 + i) = *(data2 + i) + 1; | |
6309 | data3 = malloc(pagesize); | |
6310 | if (!data3) | |
6311 | exit(1); | |
6312 | if (read(fd, data3, pagesize) != pagesize) | |
6313 | exit(1); | |
6314 | for (i = 0; i < pagesize; ++i) | |
6315 | if (*(data + i) != *(data3 + i)) | |
6316 | exit(1); | |
6317 | close(fd); | |
6318 | unlink("conftestmmap"); | |
6319 | exit(0); | |
74c1b268 | 6320 | } |
97bf5e38 | 6321 | |
74c1b268 | 6322 | EOF |
0bbc026e | 6323 | if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6324 | then |
97bf5e38 | 6325 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6326 | else |
6327 | echo "configure: failed program was:" >&5 | |
6328 | cat conftest.$ac_ext >&5 | |
6329 | rm -fr conftest* | |
97bf5e38 | 6330 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6331 | fi |
6332 | rm -fr conftest* | |
6333 | fi | |
6334 | ||
6335 | fi | |
6336 | ||
97bf5e38 MK |
6337 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6338 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6339 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6340 | #define HAVE_MMAP 1 |
74c1b268 AC |
6341 | EOF |
6342 | ||
6343 | fi | |
6344 | ||
97bf5e38 | 6345 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
0bbc026e | 6346 | echo "configure:6347: checking for pid_t" >&5 |
97bf5e38 | 6347 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6348 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6349 | else |
6350 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6351 | #line 6352 "configure" |
0200359f | 6352 | #include "confdefs.h" |
97bf5e38 MK |
6353 | #include <sys/types.h> |
6354 | #if STDC_HEADERS | |
6355 | #include <stdlib.h> | |
6356 | #include <stddef.h> | |
0200359f | 6357 | #endif |
0200359f | 6358 | EOF |
97bf5e38 MK |
6359 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6360 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6361 | rm -rf conftest* | |
6362 | ac_cv_type_pid_t=yes | |
0200359f | 6363 | else |
97bf5e38 MK |
6364 | rm -rf conftest* |
6365 | ac_cv_type_pid_t=no | |
0200359f | 6366 | fi |
97bf5e38 | 6367 | rm -f conftest* |
0200359f MK |
6368 | |
6369 | fi | |
97bf5e38 MK |
6370 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6371 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6372 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6373 | #define pid_t int |
0200359f MK |
6374 | EOF |
6375 | ||
6376 | fi | |
6377 | ||
97bf5e38 MK |
6378 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6379 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
0bbc026e | 6380 | echo "configure:6381: checking for vfork.h" >&5 |
97bf5e38 | 6381 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6382 | echo $ac_n "(cached) $ac_c" 1>&6 |
6383 | else | |
6384 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6385 | #line 6386 "configure" |
72473524 | 6386 | #include "confdefs.h" |
97bf5e38 | 6387 | #include <vfork.h> |
72473524 | 6388 | EOF |
97bf5e38 | 6389 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
0bbc026e | 6390 | { (eval echo configure:6391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6391 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6392 | if test -z "$ac_err"; then | |
72473524 | 6393 | rm -rf conftest* |
97bf5e38 | 6394 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6395 | else |
97bf5e38 | 6396 | echo "$ac_err" >&5 |
72473524 DJ |
6397 | echo "configure: failed program was:" >&5 |
6398 | cat conftest.$ac_ext >&5 | |
6399 | rm -rf conftest* | |
97bf5e38 | 6400 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6401 | fi |
6402 | rm -f conftest* | |
6403 | fi | |
97bf5e38 MK |
6404 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6405 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6406 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6407 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6408 | EOF |
6409 | ||
97bf5e38 MK |
6410 | else |
6411 | echo "$ac_t""no" 1>&6 | |
72473524 | 6412 | fi |
c906108c | 6413 | |
97bf5e38 | 6414 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
0bbc026e | 6415 | echo "configure:6416: checking for working vfork" >&5 |
97bf5e38 MK |
6416 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6417 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6418 | else | |
6419 | if test "$cross_compiling" = yes; then | |
6420 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
0bbc026e | 6421 | echo "configure:6422: checking for vfork" >&5 |
97bf5e38 | 6422 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6423 | echo $ac_n "(cached) $ac_c" 1>&6 |
6424 | else | |
6425 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6426 | #line 6427 "configure" |
2b2d558c | 6427 | #include "confdefs.h" |
97bf5e38 MK |
6428 | /* System header to define __stub macros and hopefully few prototypes, |
6429 | which can conflict with char vfork(); below. */ | |
6430 | #include <assert.h> | |
6431 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6432 | /* We use char because int might match the return type of a gcc2 | |
6433 | builtin and then its argument prototype would still apply. */ | |
6434 | char vfork(); | |
2b2d558c MK |
6435 | |
6436 | int main() { | |
97bf5e38 MK |
6437 | |
6438 | /* The GNU C library defines this for functions which it implements | |
6439 | to always fail with ENOSYS. Some functions are actually named | |
6440 | something starting with __ and the normal name is an alias. */ | |
6441 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6442 | choke me | |
6443 | #else | |
6444 | vfork(); | |
6445 | #endif | |
6446 | ||
2b2d558c MK |
6447 | ; return 0; } |
6448 | EOF | |
0bbc026e | 6449 | if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6450 | rm -rf conftest* |
97bf5e38 | 6451 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6452 | else |
6453 | echo "configure: failed program was:" >&5 | |
6454 | cat conftest.$ac_ext >&5 | |
6455 | rm -rf conftest* | |
97bf5e38 | 6456 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6457 | fi |
6458 | rm -f conftest* | |
6459 | fi | |
6460 | ||
97bf5e38 MK |
6461 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6462 | echo "$ac_t""yes" 1>&6 | |
6463 | : | |
6464 | else | |
6465 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6466 | fi |
6467 | ||
97bf5e38 | 6468 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6469 | else |
6470 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6471 | #line 6472 "configure" |
7dfa765c | 6472 | #include "confdefs.h" |
97bf5e38 MK |
6473 | /* Thanks to Paul Eggert for this test. */ |
6474 | #include <stdio.h> | |
6475 | #include <sys/types.h> | |
6476 | #include <sys/stat.h> | |
6477 | #ifdef HAVE_UNISTD_H | |
6478 | #include <unistd.h> | |
6479 | #endif | |
6480 | #ifdef HAVE_VFORK_H | |
6481 | #include <vfork.h> | |
6482 | #endif | |
6483 | /* On some sparc systems, changes by the child to local and incoming | |
6484 | argument registers are propagated back to the parent. | |
6485 | The compiler is told about this with #include <vfork.h>, | |
6486 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6487 | Test for this by using a static variable whose address | |
6488 | is put into a register that is clobbered by the vfork. */ | |
6489 | static | |
6490 | #ifdef __cplusplus | |
6491 | sparc_address_test (int arg) | |
6492 | #else | |
6493 | sparc_address_test (arg) int arg; | |
6494 | #endif | |
6495 | { | |
6496 | static pid_t child; | |
6497 | if (!child) { | |
6498 | child = vfork (); | |
6499 | if (child < 0) { | |
6500 | perror ("vfork"); | |
6501 | _exit(2); | |
6502 | } | |
6503 | if (!child) { | |
6504 | arg = getpid(); | |
6505 | write(-1, "", 0); | |
6506 | _exit (arg); | |
6507 | } | |
6508 | } | |
6509 | } | |
6510 | main() { | |
6511 | pid_t parent = getpid (); | |
6512 | pid_t child; | |
7dfa765c | 6513 | |
97bf5e38 | 6514 | sparc_address_test (); |
7dfa765c | 6515 | |
97bf5e38 | 6516 | child = vfork (); |
7dfa765c | 6517 | |
97bf5e38 MK |
6518 | if (child == 0) { |
6519 | /* Here is another test for sparc vfork register problems. | |
6520 | This test uses lots of local variables, at least | |
6521 | as many local variables as main has allocated so far | |
6522 | including compiler temporaries. 4 locals are enough for | |
6523 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6524 | A buggy compiler should reuse the register of parent | |
6525 | for one of the local variables, since it will think that | |
6526 | parent can't possibly be used any more in this routine. | |
6527 | Assigning to the local variable will thus munge parent | |
6528 | in the parent process. */ | |
6529 | pid_t | |
6530 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6531 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6532 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6533 | use the same hardware register for all 8 local variables. */ | |
6534 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6535 | || p != p5 || p != p6 || p != p7) | |
6536 | _exit(1); | |
7dfa765c | 6537 | |
97bf5e38 MK |
6538 | /* On some systems (e.g. IRIX 3.3), |
6539 | vfork doesn't separate parent from child file descriptors. | |
6540 | If the child closes a descriptor before it execs or exits, | |
6541 | this munges the parent's descriptor as well. | |
6542 | Test for this by closing stdout in the child. */ | |
6543 | _exit(close(fileno(stdout)) != 0); | |
6544 | } else { | |
6545 | int status; | |
6546 | struct stat st; | |
64bb1671 | 6547 | |
97bf5e38 MK |
6548 | while (wait(&status) != child) |
6549 | ; | |
6550 | exit( | |
6551 | /* Was there some problem with vforking? */ | |
6552 | child < 0 | |
64bb1671 | 6553 | |
97bf5e38 MK |
6554 | /* Did the child fail? (This shouldn't happen.) */ |
6555 | || status | |
64bb1671 | 6556 | |
97bf5e38 MK |
6557 | /* Did the vfork/compiler bug occur? */ |
6558 | || parent != getpid() | |
6559 | ||
6560 | /* Did the file descriptor bug occur? */ | |
6561 | || fstat(fileno(stdout), &st) != 0 | |
6562 | ); | |
6563 | } | |
6564 | } | |
5c44784c | 6565 | EOF |
0bbc026e | 6566 | if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6567 | then |
6568 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6569 | else |
6570 | echo "configure: failed program was:" >&5 | |
6571 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6572 | rm -fr conftest* |
6573 | ac_cv_func_vfork_works=no | |
5c44784c | 6574 | fi |
97bf5e38 | 6575 | rm -fr conftest* |
5c44784c JM |
6576 | fi |
6577 | ||
0afdd437 MK |
6578 | fi |
6579 | ||
97bf5e38 MK |
6580 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6581 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6582 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6583 | #define vfork fork |
0afdd437 MK |
6584 | EOF |
6585 | ||
6586 | fi | |
6587 | ||
97bf5e38 MK |
6588 | for ac_func in canonicalize_file_name realpath |
6589 | do | |
6590 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6591 | echo "configure:6592: checking for $ac_func" >&5 |
97bf5e38 | 6592 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6593 | echo $ac_n "(cached) $ac_c" 1>&6 |
6594 | else | |
6595 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6596 | #line 6597 "configure" |
7e89e357 | 6597 | #include "confdefs.h" |
97bf5e38 MK |
6598 | /* System header to define __stub macros and hopefully few prototypes, |
6599 | which can conflict with char $ac_func(); below. */ | |
6600 | #include <assert.h> | |
6601 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6602 | /* We use char because int might match the return type of a gcc2 | |
6603 | builtin and then its argument prototype would still apply. */ | |
6604 | char $ac_func(); | |
6605 | ||
7e89e357 | 6606 | int main() { |
97bf5e38 MK |
6607 | |
6608 | /* The GNU C library defines this for functions which it implements | |
6609 | to always fail with ENOSYS. Some functions are actually named | |
6610 | something starting with __ and the normal name is an alias. */ | |
6611 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6612 | choke me | |
6613 | #else | |
6614 | $ac_func(); | |
6615 | #endif | |
6616 | ||
7e89e357 JT |
6617 | ; return 0; } |
6618 | EOF | |
0bbc026e | 6619 | if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6620 | rm -rf conftest* |
97bf5e38 | 6621 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6622 | else |
6623 | echo "configure: failed program was:" >&5 | |
6624 | cat conftest.$ac_ext >&5 | |
6625 | rm -rf conftest* | |
97bf5e38 | 6626 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6627 | fi |
6628 | rm -f conftest* | |
6629 | fi | |
6630 | ||
97bf5e38 MK |
6631 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6632 | echo "$ac_t""yes" 1>&6 | |
6633 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6634 | cat >> confdefs.h <<EOF | |
6635 | #define $ac_tr_func 1 | |
7e89e357 | 6636 | EOF |
97bf5e38 MK |
6637 | |
6638 | else | |
6639 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6640 | fi |
97bf5e38 | 6641 | done |
7e89e357 | 6642 | |
97bf5e38 | 6643 | for ac_func in poll |
7be570e7 JM |
6644 | do |
6645 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6646 | echo "configure:6647: checking for $ac_func" >&5 |
7be570e7 JM |
6647 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6648 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6649 | else | |
6650 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6651 | #line 6652 "configure" |
7be570e7 JM |
6652 | #include "confdefs.h" |
6653 | /* System header to define __stub macros and hopefully few prototypes, | |
6654 | which can conflict with char $ac_func(); below. */ | |
6655 | #include <assert.h> | |
6656 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6657 | /* We use char because int might match the return type of a gcc2 | |
6658 | builtin and then its argument prototype would still apply. */ | |
6659 | char $ac_func(); | |
6660 | ||
6661 | int main() { | |
6662 | ||
6663 | /* The GNU C library defines this for functions which it implements | |
6664 | to always fail with ENOSYS. Some functions are actually named | |
6665 | something starting with __ and the normal name is an alias. */ | |
6666 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6667 | choke me | |
6668 | #else | |
6669 | $ac_func(); | |
6670 | #endif | |
6671 | ||
6672 | ; return 0; } | |
6673 | EOF | |
0bbc026e | 6674 | if { (eval echo configure:6675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6675 | rm -rf conftest* |
6676 | eval "ac_cv_func_$ac_func=yes" | |
6677 | else | |
6678 | echo "configure: failed program was:" >&5 | |
6679 | cat conftest.$ac_ext >&5 | |
6680 | rm -rf conftest* | |
6681 | eval "ac_cv_func_$ac_func=no" | |
6682 | fi | |
6683 | rm -f conftest* | |
6684 | fi | |
6685 | ||
6686 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6687 | echo "$ac_t""yes" 1>&6 | |
6688 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6689 | cat >> confdefs.h <<EOF | |
6690 | #define $ac_tr_func 1 | |
6691 | EOF | |
6692 | ||
6693 | else | |
6694 | echo "$ac_t""no" 1>&6 | |
6695 | fi | |
6696 | done | |
6697 | ||
6698 | for ac_func in pread64 | |
6699 | do | |
6700 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6701 | echo "configure:6702: checking for $ac_func" >&5 |
14abd0fb MK |
6702 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6703 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6704 | else | |
6705 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6706 | #line 6707 "configure" |
14abd0fb MK |
6707 | #include "confdefs.h" |
6708 | /* System header to define __stub macros and hopefully few prototypes, | |
6709 | which can conflict with char $ac_func(); below. */ | |
6710 | #include <assert.h> | |
6711 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6712 | /* We use char because int might match the return type of a gcc2 | |
6713 | builtin and then its argument prototype would still apply. */ | |
6714 | char $ac_func(); | |
6715 | ||
6716 | int main() { | |
6717 | ||
6718 | /* The GNU C library defines this for functions which it implements | |
6719 | to always fail with ENOSYS. Some functions are actually named | |
6720 | something starting with __ and the normal name is an alias. */ | |
6721 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6722 | choke me | |
6723 | #else | |
6724 | $ac_func(); | |
6725 | #endif | |
6726 | ||
6727 | ; return 0; } | |
6728 | EOF | |
0bbc026e | 6729 | if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6730 | rm -rf conftest* |
6731 | eval "ac_cv_func_$ac_func=yes" | |
6732 | else | |
6733 | echo "configure: failed program was:" >&5 | |
6734 | cat conftest.$ac_ext >&5 | |
6735 | rm -rf conftest* | |
6736 | eval "ac_cv_func_$ac_func=no" | |
6737 | fi | |
6738 | rm -f conftest* | |
6739 | fi | |
6740 | ||
6741 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6742 | echo "$ac_t""yes" 1>&6 | |
6743 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6744 | cat >> confdefs.h <<EOF | |
6745 | #define $ac_tr_func 1 | |
6746 | EOF | |
6747 | ||
6748 | else | |
6749 | echo "$ac_t""no" 1>&6 | |
6750 | fi | |
6751 | done | |
6752 | ||
97bf5e38 MK |
6753 | for ac_func in sbrk |
6754 | do | |
6755 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6756 | echo "configure:6757: checking for $ac_func" >&5 |
97bf5e38 | 6757 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6758 | echo $ac_n "(cached) $ac_c" 1>&6 |
6759 | else | |
6760 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6761 | #line 6762 "configure" |
c906108c | 6762 | #include "confdefs.h" |
97bf5e38 MK |
6763 | /* System header to define __stub macros and hopefully few prototypes, |
6764 | which can conflict with char $ac_func(); below. */ | |
6765 | #include <assert.h> | |
6766 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6767 | /* We use char because int might match the return type of a gcc2 | |
6768 | builtin and then its argument prototype would still apply. */ | |
6769 | char $ac_func(); | |
c906108c | 6770 | |
97bf5e38 MK |
6771 | int main() { |
6772 | ||
6773 | /* The GNU C library defines this for functions which it implements | |
6774 | to always fail with ENOSYS. Some functions are actually named | |
6775 | something starting with __ and the normal name is an alias. */ | |
6776 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6777 | choke me | |
c906108c | 6778 | #else |
97bf5e38 | 6779 | $ac_func(); |
c906108c | 6780 | #endif |
97bf5e38 | 6781 | |
c906108c SS |
6782 | ; return 0; } |
6783 | EOF | |
0bbc026e | 6784 | if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6785 | rm -rf conftest* |
97bf5e38 | 6786 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6787 | else |
6788 | echo "configure: failed program was:" >&5 | |
6789 | cat conftest.$ac_ext >&5 | |
6790 | rm -rf conftest* | |
97bf5e38 | 6791 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6792 | fi |
6793 | rm -f conftest* | |
6794 | fi | |
6795 | ||
97bf5e38 MK |
6796 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6797 | echo "$ac_t""yes" 1>&6 | |
6798 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6799 | cat >> confdefs.h <<EOF | |
6800 | #define $ac_tr_func 1 | |
c906108c | 6801 | EOF |
97bf5e38 MK |
6802 | |
6803 | else | |
6804 | echo "$ac_t""no" 1>&6 | |
c906108c | 6805 | fi |
97bf5e38 | 6806 | done |
c906108c | 6807 | |
97bf5e38 MK |
6808 | for ac_func in setpgid setpgrp |
6809 | do | |
6810 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6811 | echo "configure:6812: checking for $ac_func" >&5 |
97bf5e38 | 6812 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6813 | echo $ac_n "(cached) $ac_c" 1>&6 |
6814 | else | |
6815 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6816 | #line 6817 "configure" |
c906108c | 6817 | #include "confdefs.h" |
97bf5e38 MK |
6818 | /* System header to define __stub macros and hopefully few prototypes, |
6819 | which can conflict with char $ac_func(); below. */ | |
6820 | #include <assert.h> | |
6821 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6822 | /* We use char because int might match the return type of a gcc2 | |
6823 | builtin and then its argument prototype would still apply. */ | |
6824 | char $ac_func(); | |
c906108c | 6825 | |
97bf5e38 MK |
6826 | int main() { |
6827 | ||
6828 | /* The GNU C library defines this for functions which it implements | |
6829 | to always fail with ENOSYS. Some functions are actually named | |
6830 | something starting with __ and the normal name is an alias. */ | |
6831 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6832 | choke me | |
c906108c | 6833 | #else |
97bf5e38 | 6834 | $ac_func(); |
c906108c | 6835 | #endif |
97bf5e38 | 6836 | |
c906108c SS |
6837 | ; return 0; } |
6838 | EOF | |
0bbc026e | 6839 | if { (eval echo configure:6840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6840 | rm -rf conftest* |
97bf5e38 | 6841 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6842 | else |
6843 | echo "configure: failed program was:" >&5 | |
6844 | cat conftest.$ac_ext >&5 | |
6845 | rm -rf conftest* | |
97bf5e38 | 6846 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6847 | fi |
6848 | rm -f conftest* | |
6849 | fi | |
6850 | ||
97bf5e38 MK |
6851 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6852 | echo "$ac_t""yes" 1>&6 | |
6853 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6854 | cat >> confdefs.h <<EOF | |
6855 | #define $ac_tr_func 1 | |
c906108c | 6856 | EOF |
97bf5e38 MK |
6857 | |
6858 | else | |
6859 | echo "$ac_t""no" 1>&6 | |
c906108c | 6860 | fi |
97bf5e38 | 6861 | done |
c906108c | 6862 | |
e1ea1d75 | 6863 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6864 | do |
6865 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6866 | echo "configure:6867: checking for $ac_func" >&5 |
97bf5e38 | 6867 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6868 | echo $ac_n "(cached) $ac_c" 1>&6 |
6869 | else | |
6870 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6871 | #line 6872 "configure" |
c906108c | 6872 | #include "confdefs.h" |
97bf5e38 MK |
6873 | /* System header to define __stub macros and hopefully few prototypes, |
6874 | which can conflict with char $ac_func(); below. */ | |
6875 | #include <assert.h> | |
6876 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6877 | /* We use char because int might match the return type of a gcc2 | |
6878 | builtin and then its argument prototype would still apply. */ | |
6879 | char $ac_func(); | |
c906108c | 6880 | |
97bf5e38 MK |
6881 | int main() { |
6882 | ||
6883 | /* The GNU C library defines this for functions which it implements | |
6884 | to always fail with ENOSYS. Some functions are actually named | |
6885 | something starting with __ and the normal name is an alias. */ | |
6886 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6887 | choke me | |
c906108c | 6888 | #else |
97bf5e38 | 6889 | $ac_func(); |
c906108c | 6890 | #endif |
97bf5e38 | 6891 | |
c906108c SS |
6892 | ; return 0; } |
6893 | EOF | |
0bbc026e | 6894 | if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6895 | rm -rf conftest* |
97bf5e38 | 6896 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6897 | else |
6898 | echo "configure: failed program was:" >&5 | |
6899 | cat conftest.$ac_ext >&5 | |
6900 | rm -rf conftest* | |
97bf5e38 | 6901 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6902 | fi |
6903 | rm -f conftest* | |
6904 | fi | |
6905 | ||
97bf5e38 MK |
6906 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6907 | echo "$ac_t""yes" 1>&6 | |
6908 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6909 | cat >> confdefs.h <<EOF | |
6910 | #define $ac_tr_func 1 | |
c906108c | 6911 | EOF |
e1ea1d75 | 6912 | |
97bf5e38 MK |
6913 | else |
6914 | echo "$ac_t""no" 1>&6 | |
c906108c | 6915 | fi |
97bf5e38 | 6916 | done |
c906108c | 6917 | |
97bf5e38 MK |
6918 | for ac_func in socketpair |
6919 | do | |
6920 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6921 | echo "configure:6922: checking for $ac_func" >&5 |
97bf5e38 | 6922 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6923 | echo $ac_n "(cached) $ac_c" 1>&6 |
6924 | else | |
6925 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6926 | #line 6927 "configure" |
c906108c | 6927 | #include "confdefs.h" |
97bf5e38 MK |
6928 | /* System header to define __stub macros and hopefully few prototypes, |
6929 | which can conflict with char $ac_func(); below. */ | |
6930 | #include <assert.h> | |
6931 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6932 | /* We use char because int might match the return type of a gcc2 | |
6933 | builtin and then its argument prototype would still apply. */ | |
6934 | char $ac_func(); | |
c906108c | 6935 | |
97bf5e38 MK |
6936 | int main() { |
6937 | ||
6938 | /* The GNU C library defines this for functions which it implements | |
6939 | to always fail with ENOSYS. Some functions are actually named | |
6940 | something starting with __ and the normal name is an alias. */ | |
6941 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6942 | choke me | |
c906108c | 6943 | #else |
97bf5e38 | 6944 | $ac_func(); |
c906108c | 6945 | #endif |
97bf5e38 | 6946 | |
c906108c SS |
6947 | ; return 0; } |
6948 | EOF | |
0bbc026e | 6949 | if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6950 | rm -rf conftest* |
97bf5e38 | 6951 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6952 | else |
6953 | echo "configure: failed program was:" >&5 | |
6954 | cat conftest.$ac_ext >&5 | |
6955 | rm -rf conftest* | |
97bf5e38 | 6956 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6957 | fi |
6958 | rm -f conftest* | |
6959 | fi | |
6960 | ||
97bf5e38 MK |
6961 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6962 | echo "$ac_t""yes" 1>&6 | |
6963 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6964 | cat >> confdefs.h <<EOF | |
6965 | #define $ac_tr_func 1 | |
c906108c | 6966 | EOF |
97bf5e38 MK |
6967 | |
6968 | else | |
6969 | echo "$ac_t""no" 1>&6 | |
c906108c | 6970 | fi |
97bf5e38 | 6971 | done |
c906108c | 6972 | |
b757528f JJ |
6973 | for ac_func in syscall |
6974 | do | |
6975 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 6976 | echo "configure:6977: checking for $ac_func" >&5 |
b757528f JJ |
6977 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6978 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6979 | else | |
6980 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 6981 | #line 6982 "configure" |
b757528f JJ |
6982 | #include "confdefs.h" |
6983 | /* System header to define __stub macros and hopefully few prototypes, | |
6984 | which can conflict with char $ac_func(); below. */ | |
6985 | #include <assert.h> | |
6986 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6987 | /* We use char because int might match the return type of a gcc2 | |
6988 | builtin and then its argument prototype would still apply. */ | |
6989 | char $ac_func(); | |
6990 | ||
6991 | int main() { | |
6992 | ||
6993 | /* The GNU C library defines this for functions which it implements | |
6994 | to always fail with ENOSYS. Some functions are actually named | |
6995 | something starting with __ and the normal name is an alias. */ | |
6996 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6997 | choke me | |
6998 | #else | |
6999 | $ac_func(); | |
7000 | #endif | |
7001 | ||
7002 | ; return 0; } | |
7003 | EOF | |
0bbc026e | 7004 | if { (eval echo configure:7005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
7005 | rm -rf conftest* |
7006 | eval "ac_cv_func_$ac_func=yes" | |
7007 | else | |
7008 | echo "configure: failed program was:" >&5 | |
7009 | cat conftest.$ac_ext >&5 | |
7010 | rm -rf conftest* | |
7011 | eval "ac_cv_func_$ac_func=no" | |
7012 | fi | |
7013 | rm -f conftest* | |
7014 | fi | |
7015 | ||
7016 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7017 | echo "$ac_t""yes" 1>&6 | |
7018 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7019 | cat >> confdefs.h <<EOF | |
7020 | #define $ac_tr_func 1 | |
7021 | EOF | |
7022 | ||
7023 | else | |
7024 | echo "$ac_t""no" 1>&6 | |
7025 | fi | |
7026 | done | |
7027 | ||
bcb3dc3d MK |
7028 | for ac_func in ttrace |
7029 | do | |
7030 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 7031 | echo "configure:7032: checking for $ac_func" >&5 |
bcb3dc3d MK |
7032 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7034 | else | |
7035 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7036 | #line 7037 "configure" |
bcb3dc3d MK |
7037 | #include "confdefs.h" |
7038 | /* System header to define __stub macros and hopefully few prototypes, | |
7039 | which can conflict with char $ac_func(); below. */ | |
7040 | #include <assert.h> | |
7041 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7042 | /* We use char because int might match the return type of a gcc2 | |
7043 | builtin and then its argument prototype would still apply. */ | |
7044 | char $ac_func(); | |
7045 | ||
7046 | int main() { | |
7047 | ||
7048 | /* The GNU C library defines this for functions which it implements | |
7049 | to always fail with ENOSYS. Some functions are actually named | |
7050 | something starting with __ and the normal name is an alias. */ | |
7051 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7052 | choke me | |
7053 | #else | |
7054 | $ac_func(); | |
7055 | #endif | |
7056 | ||
7057 | ; return 0; } | |
7058 | EOF | |
0bbc026e | 7059 | if { (eval echo configure:7060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
bcb3dc3d MK |
7060 | rm -rf conftest* |
7061 | eval "ac_cv_func_$ac_func=yes" | |
7062 | else | |
7063 | echo "configure: failed program was:" >&5 | |
7064 | cat conftest.$ac_ext >&5 | |
7065 | rm -rf conftest* | |
7066 | eval "ac_cv_func_$ac_func=no" | |
7067 | fi | |
7068 | rm -f conftest* | |
7069 | fi | |
7070 | ||
7071 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7072 | echo "$ac_t""yes" 1>&6 | |
7073 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7074 | cat >> confdefs.h <<EOF | |
7075 | #define $ac_tr_func 1 | |
7076 | EOF | |
7077 | ||
7078 | else | |
7079 | echo "$ac_t""no" 1>&6 | |
7080 | fi | |
7081 | done | |
7082 | ||
8b9cf735 MK |
7083 | for ac_func in wborder |
7084 | do | |
7085 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bbc026e | 7086 | echo "configure:7087: checking for $ac_func" >&5 |
8b9cf735 MK |
7087 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7088 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7089 | else | |
7090 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7091 | #line 7092 "configure" |
8b9cf735 MK |
7092 | #include "confdefs.h" |
7093 | /* System header to define __stub macros and hopefully few prototypes, | |
7094 | which can conflict with char $ac_func(); below. */ | |
7095 | #include <assert.h> | |
7096 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7097 | /* We use char because int might match the return type of a gcc2 | |
7098 | builtin and then its argument prototype would still apply. */ | |
7099 | char $ac_func(); | |
7100 | ||
7101 | int main() { | |
7102 | ||
7103 | /* The GNU C library defines this for functions which it implements | |
7104 | to always fail with ENOSYS. Some functions are actually named | |
7105 | something starting with __ and the normal name is an alias. */ | |
7106 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7107 | choke me | |
7108 | #else | |
7109 | $ac_func(); | |
7110 | #endif | |
7111 | ||
7112 | ; return 0; } | |
7113 | EOF | |
0bbc026e | 7114 | if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
8b9cf735 MK |
7115 | rm -rf conftest* |
7116 | eval "ac_cv_func_$ac_func=yes" | |
7117 | else | |
7118 | echo "configure: failed program was:" >&5 | |
7119 | cat conftest.$ac_ext >&5 | |
7120 | rm -rf conftest* | |
7121 | eval "ac_cv_func_$ac_func=no" | |
7122 | fi | |
7123 | rm -f conftest* | |
7124 | fi | |
7125 | ||
7126 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7127 | echo "$ac_t""yes" 1>&6 | |
7128 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7129 | cat >> confdefs.h <<EOF | |
7130 | #define $ac_tr_func 1 | |
7131 | EOF | |
7132 | ||
7133 | else | |
7134 | echo "$ac_t""no" 1>&6 | |
7135 | fi | |
7136 | done | |
7137 | ||
97bf5e38 | 7138 | |
086ec9eb MK |
7139 | # Check the return and argument types of ptrace. No canned test for |
7140 | # this, so roll our own. | |
7141 | gdb_ptrace_headers=' | |
7142 | #if HAVE_SYS_TYPES_H | |
7143 | # include <sys/types.h> | |
7144 | #endif | |
7145 | #if HAVE_SYS_PTRACE_H | |
7146 | # include <sys/ptrace.h> | |
7147 | #endif | |
7148 | #if HAVE_UNISTD_H | |
7149 | # include <unistd.h> | |
7150 | #endif | |
7151 | ' | |
7152 | # There is no point in checking if we don't have a prototype. | |
7153 | for ac_func in ptrace | |
7154 | do | |
7155 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7156 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
0bbc026e | 7157 | echo "configure:7158: checking whether $ac_func is declared" >&5 |
086ec9eb MK |
7158 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
7159 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7160 | else | |
7161 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7162 | #line 7163 "configure" |
086ec9eb MK |
7163 | #include "confdefs.h" |
7164 | #undef $ac_tr_decl | |
7165 | #define $ac_tr_decl 1 | |
7166 | $gdb_ptrace_headers | |
7167 | ||
7168 | int main() { | |
7169 | #ifndef $ac_func | |
7170 | char *(*pfn) = (char *(*)) $ac_func ; | |
7171 | #endif | |
7172 | ; return 0; } | |
7173 | EOF | |
0bbc026e | 7174 | if { (eval echo configure:7175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
086ec9eb MK |
7175 | rm -rf conftest* |
7176 | eval "gcc_cv_have_decl_$ac_func=yes" | |
7177 | else | |
7178 | echo "configure: failed program was:" >&5 | |
7179 | cat conftest.$ac_ext >&5 | |
7180 | rm -rf conftest* | |
7181 | eval "gcc_cv_have_decl_$ac_func=no" | |
7182 | fi | |
7183 | rm -f conftest* | |
7184 | fi | |
7185 | ||
7186 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
7187 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
7188 | #define $ac_tr_decl 1 | |
7189 | EOF | |
7190 | ||
7191 | else | |
7192 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
7193 | #define $ac_tr_decl 0 | |
7194 | EOF | |
7195 | ||
7196 | : ${gdb_cv_func_ptrace_ret='int'} | |
7197 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
7198 | ||
7199 | fi | |
7200 | ||
7201 | done | |
7202 | if test x = y ; then | |
7203 | cat >> confdefs.h <<\EOF | |
7204 | #define HAVE_DECL_PTRACE 1 | |
7205 | EOF | |
7206 | fi | |
7207 | ||
7208 | # Check return type. | |
7209 | echo $ac_n "checking return type of ptrace""... $ac_c" 1>&6 | |
0bbc026e | 7210 | echo "configure:7211: checking return type of ptrace" >&5 |
086ec9eb MK |
7211 | if eval "test \"`echo '$''{'gdb_cv_func_ptrace_ret'+set}'`\" = set"; then |
7212 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7213 | else | |
7214 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7215 | #line 7216 "configure" |
086ec9eb MK |
7216 | #include "confdefs.h" |
7217 | $gdb_ptrace_headers | |
7218 | int main() { | |
5885ab49 | 7219 | extern int ptrace (); |
086ec9eb MK |
7220 | ; return 0; } |
7221 | EOF | |
0bbc026e | 7222 | if { (eval echo configure:7223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
086ec9eb | 7223 | rm -rf conftest* |
5885ab49 | 7224 | gdb_cv_func_ptrace_ret='int' |
086ec9eb MK |
7225 | else |
7226 | echo "configure: failed program was:" >&5 | |
7227 | cat conftest.$ac_ext >&5 | |
7228 | rm -rf conftest* | |
5885ab49 | 7229 | gdb_cv_func_ptrace_ret='long' |
086ec9eb MK |
7230 | fi |
7231 | rm -f conftest* | |
7232 | fi | |
7233 | ||
7234 | echo "$ac_t""$gdb_cv_func_ptrace_ret" 1>&6 | |
7235 | cat >> confdefs.h <<EOF | |
7236 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
7237 | EOF | |
7238 | ||
7239 | # Check argument types. | |
7240 | echo $ac_n "checking types of arguments for ptrace""... $ac_c" 1>&6 | |
0bbc026e | 7241 | echo "configure:7242: checking types of arguments for ptrace" >&5 |
086ec9eb MK |
7242 | if eval "test \"`echo '$''{'gdb_cv_func_ptrace_args'+set}'`\" = set"; then |
7243 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7244 | else | |
7245 | ||
7246 | for gdb_arg1 in 'int' 'long'; do | |
7247 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
7248 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do | |
7249 | for gdb_arg4 in 'int' 'long'; do | |
7250 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7251 | #line 7252 "configure" |
086ec9eb MK |
7252 | #include "confdefs.h" |
7253 | $gdb_ptrace_headers | |
7254 | int main() { | |
7255 | ||
7256 | extern $gdb_cv_func_ptrace_ret | |
7257 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
7258 | ||
7259 | ; return 0; } | |
7260 | EOF | |
0bbc026e | 7261 | if { (eval echo configure:7262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
086ec9eb MK |
7262 | rm -rf conftest* |
7263 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
7264 | break 4; | |
7265 | else | |
7266 | echo "configure: failed program was:" >&5 | |
7267 | cat conftest.$ac_ext >&5 | |
7268 | fi | |
7269 | rm -f conftest* | |
7270 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
7271 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7272 | #line 7273 "configure" |
086ec9eb MK |
7273 | #include "confdefs.h" |
7274 | $gdb_ptrace_headers | |
7275 | int main() { | |
7276 | ||
7277 | extern $gdb_cv_func_ptrace_ret | |
7278 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
7279 | ||
7280 | ; return 0; } | |
7281 | EOF | |
0bbc026e | 7282 | if { (eval echo configure:7283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
086ec9eb MK |
7283 | rm -rf conftest* |
7284 | ||
7285 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
7286 | break 5; | |
7287 | else | |
7288 | echo "configure: failed program was:" >&5 | |
7289 | cat conftest.$ac_ext >&5 | |
7290 | fi | |
7291 | rm -f conftest* | |
7292 | done | |
7293 | done | |
7294 | done | |
7295 | done | |
7296 | done | |
7297 | # Provide a safe default value. | |
7298 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
7299 | ||
7300 | fi | |
7301 | ||
7302 | echo "$ac_t""$gdb_cv_func_ptrace_args" 1>&6 | |
7303 | ac_save_IFS=$IFS; IFS=',' | |
7304 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
7305 | IFS=$ac_save_IFS | |
7306 | shift | |
7307 | cat >> confdefs.h <<EOF | |
64218d3e | 7308 | #define PTRACE_TYPE_ARG3 $3 |
086ec9eb MK |
7309 | EOF |
7310 | ||
7311 | if test -n "$5"; then | |
7312 | cat >> confdefs.h <<EOF | |
64218d3e | 7313 | #define PTRACE_TYPE_ARG5 $5 |
086ec9eb MK |
7314 | EOF |
7315 | ||
7316 | fi | |
7317 | ||
97bf5e38 MK |
7318 | if test "$cross_compiling" = no; then |
7319 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
0bbc026e | 7320 | echo "configure:7321: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7321 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 7322 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
7323 | else |
7324 | if test "$cross_compiling" = yes; then | |
7325 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
7326 | else |
7327 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7328 | #line 7329 "configure" |
c906108c SS |
7329 | #include "confdefs.h" |
7330 | ||
c906108c SS |
7331 | #ifdef HAVE_UNISTD_H |
7332 | #include <unistd.h> | |
7333 | #endif | |
97bf5e38 MK |
7334 | |
7335 | /* | |
7336 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
7337 | * successfully. | |
7338 | */ | |
7339 | main() | |
7340 | { | |
7341 | if (setpgrp(1,1) == -1) | |
7342 | exit(0); | |
7343 | else | |
7344 | exit(1); | |
7345 | } | |
7346 | ||
c906108c | 7347 | EOF |
0bbc026e | 7348 | if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7349 | then |
7350 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
7351 | else |
7352 | echo "configure: failed program was:" >&5 | |
7353 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7354 | rm -fr conftest* |
7355 | ac_cv_func_setpgrp_void=yes | |
c906108c | 7356 | fi |
97bf5e38 | 7357 | rm -fr conftest* |
c906108c SS |
7358 | fi |
7359 | ||
97bf5e38 MK |
7360 | |
7361 | fi | |
7362 | ||
7363 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
7364 | if test $ac_cv_func_setpgrp_void = yes; then | |
7365 | cat >> confdefs.h <<\EOF | |
7366 | #define SETPGRP_VOID 1 | |
c906108c SS |
7367 | EOF |
7368 | ||
7369 | fi | |
7370 | ||
97bf5e38 MK |
7371 | else |
7372 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
0bbc026e | 7373 | echo "configure:7374: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7374 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
7375 | echo $ac_n "(cached) $ac_c" 1>&6 |
7376 | else | |
7377 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7378 | #line 7379 "configure" |
b83266a0 SS |
7379 | #include "confdefs.h" |
7380 | ||
b83266a0 | 7381 | #include <unistd.h> |
97bf5e38 | 7382 | |
b83266a0 | 7383 | int main() { |
97bf5e38 MK |
7384 | |
7385 | if (setpgrp(1,1) == -1) | |
7386 | exit (0); | |
7387 | else | |
7388 | exit (1); | |
7389 | ||
b83266a0 SS |
7390 | ; return 0; } |
7391 | EOF | |
0bbc026e | 7392 | if { (eval echo configure:7393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 7393 | rm -rf conftest* |
97bf5e38 | 7394 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
7395 | else |
7396 | echo "configure: failed program was:" >&5 | |
7397 | cat conftest.$ac_ext >&5 | |
7398 | rm -rf conftest* | |
97bf5e38 | 7399 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
7400 | fi |
7401 | rm -f conftest* | |
7402 | fi | |
7403 | ||
97bf5e38 MK |
7404 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
7405 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 7406 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7407 | #define SETPGRP_VOID 1 |
b83266a0 SS |
7408 | EOF |
7409 | ||
97bf5e38 | 7410 | fi |
b83266a0 SS |
7411 | fi |
7412 | ||
97bf5e38 MK |
7413 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
7414 | # since sigsetjmp might only be defined as a macro. | |
7415 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
0bbc026e | 7416 | echo "configure:7417: checking for sigsetjmp" >&5 |
97bf5e38 | 7417 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
7418 | echo $ac_n "(cached) $ac_c" 1>&6 |
7419 | else | |
7420 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7421 | #line 7422 "configure" |
a4db0f07 RH |
7422 | #include "confdefs.h" |
7423 | ||
97bf5e38 MK |
7424 | #include <setjmp.h> |
7425 | ||
a4db0f07 | 7426 | int main() { |
97bf5e38 | 7427 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
7428 | ; return 0; } |
7429 | EOF | |
0bbc026e | 7430 | if { (eval echo configure:7431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 7431 | rm -rf conftest* |
97bf5e38 | 7432 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
7433 | else |
7434 | echo "configure: failed program was:" >&5 | |
7435 | cat conftest.$ac_ext >&5 | |
7436 | rm -rf conftest* | |
97bf5e38 | 7437 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
7438 | fi |
7439 | rm -f conftest* | |
7440 | fi | |
7441 | ||
97bf5e38 MK |
7442 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
7443 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 7444 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7445 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
7446 | EOF |
7447 | ||
7448 | fi | |
c906108c | 7449 | |
06825bd1 MK |
7450 | # Assume we'll default to using the included libiberty regex. |
7451 | gdb_use_included_regex=yes | |
7452 | ||
7453 | # However, if the system regex is GNU regex, then default to *not* | |
7454 | # using the included regex. | |
7455 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
0bbc026e | 7456 | echo "configure:7457: checking for GNU regex" >&5 |
06825bd1 MK |
7457 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
7458 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7459 | else | |
7460 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7461 | #line 7462 "configure" |
06825bd1 MK |
7462 | #include "confdefs.h" |
7463 | #include <gnu-versions.h> | |
7464 | int main() { | |
7465 | #define REGEX_INTERFACE_VERSION 1 | |
7466 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
7467 | # error "Version mismatch" | |
7468 | #endif | |
7469 | ; return 0; } | |
7470 | EOF | |
0bbc026e | 7471 | if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
7472 | rm -rf conftest* |
7473 | gdb_cv_have_gnu_regex=yes | |
7474 | else | |
7475 | echo "configure: failed program was:" >&5 | |
7476 | cat conftest.$ac_ext >&5 | |
7477 | rm -rf conftest* | |
7478 | gdb_cv_have_gnu_regex=no | |
7479 | fi | |
7480 | rm -f conftest* | |
7481 | fi | |
7482 | ||
7483 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
7484 | if test $gdb_cv_have_gnu_regex = yes; then | |
7485 | gdb_use_included_regex=no | |
7486 | fi | |
7487 | ||
7488 | # Check whether --with-included-regex or --without-included-regex was given. | |
7489 | if test "${with_included_regex+set}" = set; then | |
7490 | withval="$with_included_regex" | |
7491 | gdb_with_regex=$withval | |
7492 | else | |
7493 | gdb_with_regex=$gdb_use_included_regex | |
7494 | fi | |
7495 | ||
7496 | if test "$gdb_with_regex" = yes; then | |
7497 | cat >> confdefs.h <<\EOF | |
7498 | #define USE_INCLUDED_REGEX 1 | |
7499 | EOF | |
7500 | ||
7501 | fi | |
7502 | ||
70f9f479 MK |
7503 | # See if <sys/proc.h> defines `struct thread' with a td_pcb member. |
7504 | echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6 | |
0bbc026e | 7505 | echo "configure:7506: checking for td_pcb in struct thread" >&5 |
70f9f479 MK |
7506 | if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then |
7507 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7508 | else | |
7509 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7510 | #line 7511 "configure" |
70f9f479 | 7511 | #include "confdefs.h" |
d15be926 | 7512 | #include <sys/param.h> |
70f9f479 MK |
7513 | #include <sys/proc.h> |
7514 | int main() { | |
7515 | struct thread td; td.td_pcb; | |
7516 | ; return 0; } | |
7517 | EOF | |
0bbc026e | 7518 | if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
70f9f479 MK |
7519 | rm -rf conftest* |
7520 | gdb_cv_struct_thread_td_pcb=yes | |
7521 | else | |
7522 | echo "configure: failed program was:" >&5 | |
7523 | cat conftest.$ac_ext >&5 | |
7524 | rm -rf conftest* | |
7525 | gdb_cv_struct_thread_td_pcb=no | |
7526 | fi | |
7527 | rm -f conftest* | |
7528 | fi | |
7529 | ||
7530 | echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6 | |
7531 | if test $gdb_cv_struct_thread_td_pcb = yes; then | |
7532 | cat >> confdefs.h <<\EOF | |
7533 | #define HAVE_STRUCT_THREAD_TD_PCB 1 | |
7534 | EOF | |
7535 | ||
7536 | fi | |
7537 | ||
5c7f2947 MK |
7538 | # See if <sys/lwp.h> defines `struct lwp`. |
7539 | echo $ac_n "checking for struct lwp""... $ac_c" 1>&6 | |
0bbc026e | 7540 | echo "configure:7541: checking for struct lwp" >&5 |
5c7f2947 MK |
7541 | if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then |
7542 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7543 | else | |
7544 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7545 | #line 7546 "configure" |
5c7f2947 MK |
7546 | #include "confdefs.h" |
7547 | #include <sys/param.h> | |
7548 | #include <sys/lwp.h> | |
7549 | int main() { | |
7550 | struct lwp l; | |
7551 | ; return 0; } | |
7552 | EOF | |
0bbc026e | 7553 | if { (eval echo configure:7554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c7f2947 MK |
7554 | rm -rf conftest* |
7555 | gdb_cv_struct_lwp=yes | |
7556 | else | |
7557 | echo "configure: failed program was:" >&5 | |
7558 | cat conftest.$ac_ext >&5 | |
7559 | rm -rf conftest* | |
7560 | gdb_cv_struct_lwp=no | |
7561 | fi | |
7562 | rm -f conftest* | |
7563 | fi | |
7564 | ||
7565 | echo "$ac_t""$gdb_cv_struct_lwp" 1>&6 | |
7566 | if test $gdb_cv_struct_lwp = yes; then | |
7567 | cat >> confdefs.h <<\EOF | |
7568 | #define HAVE_STRUCT_LWP 1 | |
7569 | EOF | |
7570 | ||
7571 | fi | |
7572 | ||
78434e59 MK |
7573 | # See if <machine/reg.h> degines `struct reg'. |
7574 | echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6 | |
0bbc026e | 7575 | echo "configure:7576: checking for struct reg in machine/reg.h" >&5 |
78434e59 MK |
7576 | if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then |
7577 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7578 | else | |
7579 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7580 | #line 7581 "configure" |
78434e59 MK |
7581 | #include "confdefs.h" |
7582 | #include <sys/types.h> | |
7583 | #include <machine/reg.h> | |
7584 | int main() { | |
7585 | struct reg r; | |
7586 | ; return 0; } | |
7587 | EOF | |
0bbc026e | 7588 | if { (eval echo configure:7589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
78434e59 MK |
7589 | rm -rf conftest* |
7590 | gdb_cv_struct_reg=yes | |
7591 | else | |
7592 | echo "configure: failed program was:" >&5 | |
7593 | cat conftest.$ac_ext >&5 | |
7594 | rm -rf conftest* | |
7595 | gdb_cv_struct_reg=no | |
7596 | fi | |
7597 | rm -f conftest* | |
7598 | fi | |
7599 | ||
7600 | echo "$ac_t""$gdb_cv_struct_reg" 1>&6 | |
7601 | if test $gdb_cv_struct_reg = yes; then | |
7602 | cat >> confdefs.h <<\EOF | |
7603 | #define HAVE_STRUCT_REG 1 | |
7604 | EOF | |
7605 | ||
7606 | fi | |
7607 | ||
97bf5e38 MK |
7608 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7609 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
7610 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
0bbc026e | 7611 | echo "configure:7612: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
7612 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7613 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7614 | else | |
7615 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7616 | #line 7617 "configure" |
c906108c | 7617 | #include "confdefs.h" |
97bf5e38 MK |
7618 | #include <machine/reg.h> |
7619 | int main() { | |
7620 | struct reg r; r.r_fs; | |
7621 | ; return 0; } | |
c906108c | 7622 | EOF |
0bbc026e | 7623 | if { (eval echo configure:7624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7624 | rm -rf conftest* |
97bf5e38 | 7625 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 7626 | else |
97bf5e38 MK |
7627 | echo "configure: failed program was:" >&5 |
7628 | cat conftest.$ac_ext >&5 | |
c906108c | 7629 | rm -rf conftest* |
97bf5e38 | 7630 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
7631 | fi |
7632 | rm -f conftest* | |
97bf5e38 | 7633 | fi |
c906108c | 7634 | |
97bf5e38 MK |
7635 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
7636 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7637 | cat >> confdefs.h <<\EOF | |
7638 | #define HAVE_STRUCT_REG_R_FS 1 | |
7639 | EOF | |
7640 | ||
7641 | fi | |
7642 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
0bbc026e | 7643 | echo "configure:7644: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
7644 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7645 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7646 | else | |
7647 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7648 | #line 7649 "configure" |
c906108c | 7649 | #include "confdefs.h" |
97bf5e38 MK |
7650 | #include <machine/reg.h> |
7651 | int main() { | |
7652 | struct reg r; r.r_gs; | |
7653 | ; return 0; } | |
c906108c | 7654 | EOF |
0bbc026e | 7655 | if { (eval echo configure:7656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7656 | rm -rf conftest* |
97bf5e38 | 7657 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 7658 | else |
97bf5e38 MK |
7659 | echo "configure: failed program was:" >&5 |
7660 | cat conftest.$ac_ext >&5 | |
c906108c | 7661 | rm -rf conftest* |
97bf5e38 | 7662 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
7663 | fi |
7664 | rm -f conftest* | |
c906108c | 7665 | fi |
c906108c | 7666 | |
97bf5e38 MK |
7667 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
7668 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7669 | cat >> confdefs.h <<\EOF | |
7670 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
7671 | EOF |
7672 | ||
c906108c SS |
7673 | fi |
7674 | ||
97bf5e38 MK |
7675 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
7676 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
0bbc026e | 7677 | echo "configure:7678: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 7678 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
7679 | echo $ac_n "(cached) $ac_c" 1>&6 |
7680 | else | |
7681 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7682 | #line 7683 "configure" |
c906108c | 7683 | #include "confdefs.h" |
97bf5e38 | 7684 | #include <sys/ptrace.h> |
c906108c | 7685 | int main() { |
97bf5e38 | 7686 | PTRACE_GETREGS; |
c906108c SS |
7687 | ; return 0; } |
7688 | EOF | |
0bbc026e | 7689 | if { (eval echo configure:7690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7690 | rm -rf conftest* |
97bf5e38 | 7691 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
7692 | else |
7693 | echo "configure: failed program was:" >&5 | |
7694 | cat conftest.$ac_ext >&5 | |
7695 | rm -rf conftest* | |
97bf5e38 | 7696 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
7697 | fi |
7698 | rm -f conftest* | |
7699 | fi | |
7700 | ||
97bf5e38 MK |
7701 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
7702 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
7703 | cat >> confdefs.h <<\EOF | |
7704 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7705 | EOF |
7706 | ||
97bf5e38 | 7707 | fi |
c906108c | 7708 | |
97bf5e38 MK |
7709 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7710 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
0bbc026e | 7711 | echo "configure:7712: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7712 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7713 | echo $ac_n "(cached) $ac_c" 1>&6 |
7714 | else | |
7715 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7716 | #line 7717 "configure" |
c906108c | 7717 | #include "confdefs.h" |
97bf5e38 | 7718 | #include <sys/ptrace.h> |
c906108c | 7719 | int main() { |
97bf5e38 | 7720 | PTRACE_GETFPXREGS; |
c906108c SS |
7721 | ; return 0; } |
7722 | EOF | |
0bbc026e | 7723 | if { (eval echo configure:7724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7724 | rm -rf conftest* |
97bf5e38 | 7725 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7726 | else |
7727 | echo "configure: failed program was:" >&5 | |
7728 | cat conftest.$ac_ext >&5 | |
7729 | rm -rf conftest* | |
97bf5e38 | 7730 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7731 | fi |
7732 | rm -f conftest* | |
7733 | fi | |
7734 | ||
97bf5e38 MK |
7735 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7736 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7737 | cat >> confdefs.h <<\EOF | |
7738 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7739 | EOF |
7740 | ||
97bf5e38 | 7741 | fi |
c906108c | 7742 | |
97bf5e38 MK |
7743 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7744 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
0bbc026e | 7745 | echo "configure:7746: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7746 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7747 | echo $ac_n "(cached) $ac_c" 1>&6 |
7748 | else | |
7749 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7750 | #line 7751 "configure" |
c906108c | 7751 | #include "confdefs.h" |
97bf5e38 MK |
7752 | #include <sys/types.h> |
7753 | #include <sys/ptrace.h> | |
c906108c | 7754 | int main() { |
97bf5e38 | 7755 | PT_GETDBREGS; |
c906108c SS |
7756 | ; return 0; } |
7757 | EOF | |
0bbc026e | 7758 | if { (eval echo configure:7759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7759 | rm -rf conftest* |
97bf5e38 | 7760 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7761 | else |
7762 | echo "configure: failed program was:" >&5 | |
7763 | cat conftest.$ac_ext >&5 | |
7764 | rm -rf conftest* | |
97bf5e38 | 7765 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7766 | fi |
7767 | rm -f conftest* | |
7768 | fi | |
7769 | ||
97bf5e38 MK |
7770 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7771 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7772 | cat >> confdefs.h <<\EOF | |
7773 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7774 | EOF |
7775 | ||
97bf5e38 | 7776 | fi |
c906108c | 7777 | |
97bf5e38 MK |
7778 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7779 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
0bbc026e | 7780 | echo "configure:7781: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7781 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7782 | echo $ac_n "(cached) $ac_c" 1>&6 |
7783 | else | |
7784 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7785 | #line 7786 "configure" |
c906108c | 7786 | #include "confdefs.h" |
97bf5e38 MK |
7787 | #include <sys/types.h> |
7788 | #include <sys/ptrace.h> | |
c906108c | 7789 | int main() { |
97bf5e38 | 7790 | PT_GETXMMREGS; |
c906108c SS |
7791 | ; return 0; } |
7792 | EOF | |
0bbc026e | 7793 | if { (eval echo configure:7794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7794 | rm -rf conftest* |
97bf5e38 | 7795 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7796 | else |
7797 | echo "configure: failed program was:" >&5 | |
7798 | cat conftest.$ac_ext >&5 | |
7799 | rm -rf conftest* | |
97bf5e38 | 7800 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7801 | fi |
7802 | rm -f conftest* | |
7803 | fi | |
7804 | ||
97bf5e38 MK |
7805 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7806 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7807 | cat >> confdefs.h <<\EOF | |
7808 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7809 | EOF |
7810 | ||
97bf5e38 | 7811 | fi |
c906108c | 7812 | |
27ca5dad | 7813 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7814 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7815 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
0bbc026e | 7816 | echo "configure:7817: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7817 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7818 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7819 | else | |
7820 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7821 | #line 7822 "configure" |
27ca5dad MC |
7822 | #include "confdefs.h" |
7823 | #include <stdint.h> | |
7824 | int main() { | |
7825 | uintptr_t foo = 0; | |
7826 | ; return 0; } | |
7827 | EOF | |
0bbc026e | 7828 | if { (eval echo configure:7829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7829 | rm -rf conftest* |
7830 | gdb_cv_have_uintptr_t=yes | |
7831 | else | |
7832 | echo "configure: failed program was:" >&5 | |
7833 | cat conftest.$ac_ext >&5 | |
7834 | rm -rf conftest* | |
7835 | gdb_cv_have_uintptr_t=no | |
7836 | fi | |
7837 | rm -f conftest* | |
7838 | fi | |
7839 | ||
7840 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 | |
7841 | if test $gdb_cv_have_uintptr_t = yes; then | |
7842 | cat >> confdefs.h <<\EOF | |
7843 | #define HAVE_UINTPTR_T 1 | |
7844 | EOF | |
7845 | ||
7846 | fi | |
97bf5e38 MK |
7847 | |
7848 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
0bbc026e | 7849 | echo "configure:7850: checking whether malloc must be declared" >&5 |
97bf5e38 | 7850 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7851 | echo $ac_n "(cached) $ac_c" 1>&6 |
7852 | else | |
7853 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7854 | #line 7855 "configure" |
3862412b | 7855 | #include "confdefs.h" |
e17bf198 | 7856 | |
97bf5e38 MK |
7857 | #include <stdio.h> |
7858 | #ifdef HAVE_STRING_H | |
7859 | #include <string.h> | |
7860 | #else | |
7861 | #ifdef HAVE_STRINGS_H | |
7862 | #include <strings.h> | |
7863 | #endif | |
7864 | #endif | |
7865 | #ifdef HAVE_STDLIB_H | |
7866 | #include <stdlib.h> | |
7867 | #endif | |
7868 | #ifdef HAVE_UNISTD_H | |
7869 | #include <unistd.h> | |
7870 | #endif | |
3862412b | 7871 | int main() { |
97bf5e38 | 7872 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7873 | ; return 0; } |
7874 | EOF | |
0bbc026e | 7875 | if { (eval echo configure:7876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7876 | rm -rf conftest* |
97bf5e38 | 7877 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7878 | else |
7879 | echo "configure: failed program was:" >&5 | |
7880 | cat conftest.$ac_ext >&5 | |
7881 | rm -rf conftest* | |
97bf5e38 | 7882 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7883 | fi |
7884 | rm -f conftest* | |
7885 | fi | |
7886 | ||
97bf5e38 MK |
7887 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7888 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7889 | cat >> confdefs.h <<\EOF | |
7890 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7891 | EOF |
7892 | ||
97bf5e38 | 7893 | fi |
3862412b | 7894 | |
97bf5e38 | 7895 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
0bbc026e | 7896 | echo "configure:7897: checking whether realloc must be declared" >&5 |
97bf5e38 | 7897 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7898 | echo $ac_n "(cached) $ac_c" 1>&6 |
7899 | else | |
7900 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7901 | #line 7902 "configure" |
3862412b | 7902 | #include "confdefs.h" |
e17bf198 | 7903 | |
97bf5e38 MK |
7904 | #include <stdio.h> |
7905 | #ifdef HAVE_STRING_H | |
7906 | #include <string.h> | |
7907 | #else | |
7908 | #ifdef HAVE_STRINGS_H | |
7909 | #include <strings.h> | |
7910 | #endif | |
7911 | #endif | |
7912 | #ifdef HAVE_STDLIB_H | |
7913 | #include <stdlib.h> | |
7914 | #endif | |
7915 | #ifdef HAVE_UNISTD_H | |
7916 | #include <unistd.h> | |
7917 | #endif | |
3862412b | 7918 | int main() { |
97bf5e38 | 7919 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7920 | ; return 0; } |
7921 | EOF | |
0bbc026e | 7922 | if { (eval echo configure:7923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7923 | rm -rf conftest* |
97bf5e38 | 7924 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7925 | else |
7926 | echo "configure: failed program was:" >&5 | |
7927 | cat conftest.$ac_ext >&5 | |
7928 | rm -rf conftest* | |
97bf5e38 | 7929 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7930 | fi |
7931 | rm -f conftest* | |
7932 | fi | |
7933 | ||
97bf5e38 MK |
7934 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7935 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7936 | cat >> confdefs.h <<\EOF | |
7937 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7938 | EOF |
7939 | ||
97bf5e38 | 7940 | fi |
3862412b | 7941 | |
97bf5e38 | 7942 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
0bbc026e | 7943 | echo "configure:7944: checking whether free must be declared" >&5 |
97bf5e38 | 7944 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7945 | echo $ac_n "(cached) $ac_c" 1>&6 |
7946 | else | |
7947 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7948 | #line 7949 "configure" |
451928c5 | 7949 | #include "confdefs.h" |
e17bf198 | 7950 | |
97bf5e38 MK |
7951 | #include <stdio.h> |
7952 | #ifdef HAVE_STRING_H | |
7953 | #include <string.h> | |
7954 | #else | |
7955 | #ifdef HAVE_STRINGS_H | |
7956 | #include <strings.h> | |
7957 | #endif | |
7958 | #endif | |
7959 | #ifdef HAVE_STDLIB_H | |
7960 | #include <stdlib.h> | |
7961 | #endif | |
7962 | #ifdef HAVE_UNISTD_H | |
7963 | #include <unistd.h> | |
7964 | #endif | |
451928c5 | 7965 | int main() { |
97bf5e38 | 7966 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7967 | ; return 0; } |
7968 | EOF | |
0bbc026e | 7969 | if { (eval echo configure:7970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7970 | rm -rf conftest* |
97bf5e38 | 7971 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7972 | else |
7973 | echo "configure: failed program was:" >&5 | |
7974 | cat conftest.$ac_ext >&5 | |
7975 | rm -rf conftest* | |
97bf5e38 | 7976 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7977 | fi |
7978 | rm -f conftest* | |
7979 | fi | |
7980 | ||
97bf5e38 MK |
7981 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7982 | if test $bfd_cv_decl_needed_free = yes; then | |
7983 | cat >> confdefs.h <<\EOF | |
7984 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7985 | EOF |
7986 | ||
97bf5e38 | 7987 | fi |
451928c5 | 7988 | |
97bf5e38 | 7989 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
0bbc026e | 7990 | echo "configure:7991: checking whether strerror must be declared" >&5 |
97bf5e38 | 7991 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7992 | echo $ac_n "(cached) $ac_c" 1>&6 |
7993 | else | |
7994 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 7995 | #line 7996 "configure" |
451928c5 | 7996 | #include "confdefs.h" |
e17bf198 | 7997 | |
97bf5e38 MK |
7998 | #include <stdio.h> |
7999 | #ifdef HAVE_STRING_H | |
8000 | #include <string.h> | |
8001 | #else | |
8002 | #ifdef HAVE_STRINGS_H | |
8003 | #include <strings.h> | |
8004 | #endif | |
8005 | #endif | |
8006 | #ifdef HAVE_STDLIB_H | |
8007 | #include <stdlib.h> | |
8008 | #endif | |
8009 | #ifdef HAVE_UNISTD_H | |
8010 | #include <unistd.h> | |
8011 | #endif | |
451928c5 | 8012 | int main() { |
97bf5e38 | 8013 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
8014 | ; return 0; } |
8015 | EOF | |
0bbc026e | 8016 | if { (eval echo configure:8017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 8017 | rm -rf conftest* |
97bf5e38 | 8018 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
8019 | else |
8020 | echo "configure: failed program was:" >&5 | |
8021 | cat conftest.$ac_ext >&5 | |
8022 | rm -rf conftest* | |
97bf5e38 | 8023 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
8024 | fi |
8025 | rm -f conftest* | |
8026 | fi | |
8027 | ||
97bf5e38 MK |
8028 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
8029 | if test $bfd_cv_decl_needed_strerror = yes; then | |
8030 | cat >> confdefs.h <<\EOF | |
8031 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
8032 | EOF |
8033 | ||
97bf5e38 | 8034 | fi |
451928c5 | 8035 | |
97bf5e38 | 8036 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
0bbc026e | 8037 | echo "configure:8038: checking whether strdup must be declared" >&5 |
97bf5e38 | 8038 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
8039 | echo $ac_n "(cached) $ac_c" 1>&6 |
8040 | else | |
8041 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8042 | #line 8043 "configure" |
3862412b | 8043 | #include "confdefs.h" |
e17bf198 | 8044 | |
97bf5e38 MK |
8045 | #include <stdio.h> |
8046 | #ifdef HAVE_STRING_H | |
8047 | #include <string.h> | |
8048 | #else | |
8049 | #ifdef HAVE_STRINGS_H | |
8050 | #include <strings.h> | |
8051 | #endif | |
8052 | #endif | |
8053 | #ifdef HAVE_STDLIB_H | |
8054 | #include <stdlib.h> | |
8055 | #endif | |
8056 | #ifdef HAVE_UNISTD_H | |
8057 | #include <unistd.h> | |
8058 | #endif | |
3862412b | 8059 | int main() { |
97bf5e38 | 8060 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
8061 | ; return 0; } |
8062 | EOF | |
0bbc026e | 8063 | if { (eval echo configure:8064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 8064 | rm -rf conftest* |
97bf5e38 | 8065 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
8066 | else |
8067 | echo "configure: failed program was:" >&5 | |
8068 | cat conftest.$ac_ext >&5 | |
8069 | rm -rf conftest* | |
97bf5e38 | 8070 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
8071 | fi |
8072 | rm -f conftest* | |
8073 | fi | |
8074 | ||
97bf5e38 MK |
8075 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
8076 | if test $bfd_cv_decl_needed_strdup = yes; then | |
8077 | cat >> confdefs.h <<\EOF | |
8078 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
8079 | EOF |
8080 | ||
97bf5e38 | 8081 | fi |
3862412b | 8082 | |
97bf5e38 | 8083 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
0bbc026e | 8084 | echo "configure:8085: checking whether strstr must be declared" >&5 |
97bf5e38 | 8085 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
8086 | echo $ac_n "(cached) $ac_c" 1>&6 |
8087 | else | |
8088 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8089 | #line 8090 "configure" |
3862412b | 8090 | #include "confdefs.h" |
e17bf198 | 8091 | |
97bf5e38 MK |
8092 | #include <stdio.h> |
8093 | #ifdef HAVE_STRING_H | |
8094 | #include <string.h> | |
8095 | #else | |
8096 | #ifdef HAVE_STRINGS_H | |
8097 | #include <strings.h> | |
8098 | #endif | |
8099 | #endif | |
8100 | #ifdef HAVE_STDLIB_H | |
8101 | #include <stdlib.h> | |
8102 | #endif | |
8103 | #ifdef HAVE_UNISTD_H | |
8104 | #include <unistd.h> | |
8105 | #endif | |
3862412b | 8106 | int main() { |
97bf5e38 | 8107 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
8108 | ; return 0; } |
8109 | EOF | |
0bbc026e | 8110 | if { (eval echo configure:8111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 8111 | rm -rf conftest* |
97bf5e38 | 8112 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
8113 | else |
8114 | echo "configure: failed program was:" >&5 | |
8115 | cat conftest.$ac_ext >&5 | |
8116 | rm -rf conftest* | |
97bf5e38 | 8117 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
8118 | fi |
8119 | rm -f conftest* | |
8120 | fi | |
8121 | ||
97bf5e38 MK |
8122 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
8123 | if test $bfd_cv_decl_needed_strstr = yes; then | |
8124 | cat >> confdefs.h <<\EOF | |
8125 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
8126 | EOF |
8127 | ||
97bf5e38 | 8128 | fi |
3862412b | 8129 | |
97bf5e38 | 8130 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
0bbc026e | 8131 | echo "configure:8132: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 8132 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
8133 | echo $ac_n "(cached) $ac_c" 1>&6 |
8134 | else | |
8135 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8136 | #line 8137 "configure" |
596c9d4b KB |
8137 | #include "confdefs.h" |
8138 | ||
97bf5e38 MK |
8139 | #include <stdio.h> |
8140 | #ifdef HAVE_STRING_H | |
8141 | #include <string.h> | |
8142 | #else | |
8143 | #ifdef HAVE_STRINGS_H | |
8144 | #include <strings.h> | |
8145 | #endif | |
8146 | #endif | |
8147 | #ifdef HAVE_STDLIB_H | |
8148 | #include <stdlib.h> | |
8149 | #endif | |
8150 | #ifdef HAVE_UNISTD_H | |
8151 | #include <unistd.h> | |
8152 | #endif | |
596c9d4b | 8153 | int main() { |
97bf5e38 | 8154 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
8155 | ; return 0; } |
8156 | EOF | |
0bbc026e | 8157 | if { (eval echo configure:8158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8158 | rm -rf conftest* |
97bf5e38 | 8159 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
8160 | else |
8161 | echo "configure: failed program was:" >&5 | |
8162 | cat conftest.$ac_ext >&5 | |
8163 | rm -rf conftest* | |
97bf5e38 | 8164 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
8165 | fi |
8166 | rm -f conftest* | |
8167 | fi | |
8168 | ||
97bf5e38 MK |
8169 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
8170 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
8171 | cat >> confdefs.h <<\EOF | |
8172 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
8173 | EOF |
8174 | ||
97bf5e38 | 8175 | fi |
596c9d4b | 8176 | |
97bf5e38 MK |
8177 | |
8178 | # The following save_state_t checkery is only necessary for HPUX | |
8179 | # versions earlier than 10.20. When those fade from memory, this | |
8180 | # could be expunged. --jsm 1999-03-22 | |
8181 | ||
8182 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
0bbc026e | 8183 | echo "configure:8184: checking for HPUX save_state structure" >&5 |
97bf5e38 | 8184 | cat > conftest.$ac_ext <<EOF |
0bbc026e | 8185 | #line 8186 "configure" |
97bf5e38 MK |
8186 | #include "confdefs.h" |
8187 | #include <machine/save_state.h> | |
8188 | EOF | |
8189 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8190 | egrep "save_state_t" >/dev/null 2>&1; then | |
8191 | rm -rf conftest* | |
8192 | gdb_cv_hpux_savestate=yes | |
8193 | else | |
8194 | rm -rf conftest* | |
8195 | gdb_cv_hpux_savestate=no | |
8196 | fi | |
8197 | rm -f conftest* | |
8198 | ||
8199 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8200 | #line 8201 "configure" |
97bf5e38 MK |
8201 | #include "confdefs.h" |
8202 | #include <machine/save_state.h> | |
8203 | EOF | |
8204 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8205 | egrep "ss_wide" >/dev/null 2>&1; then | |
8206 | rm -rf conftest* | |
8207 | gdb_cv_hpux_sswide=yes | |
8208 | else | |
8209 | rm -rf conftest* | |
8210 | gdb_cv_hpux_sswide=no | |
8211 | fi | |
8212 | rm -f conftest* | |
8213 | ||
8214 | if test $gdb_cv_hpux_savestate = yes | |
8215 | then | |
8216 | cat >> confdefs.h <<\EOF | |
8217 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
8218 | EOF | |
8219 | ||
8220 | fi | |
8221 | if test $gdb_cv_hpux_sswide = yes | |
8222 | then | |
8223 | cat >> confdefs.h <<\EOF | |
8224 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
8225 | EOF | |
8226 | ||
8227 | fi | |
8228 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
8229 | ||
8230 | ||
8231 | # If we are configured native on GNU/Linux, work around problems with | |
8232 | # sys/procfs.h | |
8233 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
8234 | ||
8235 | if test "${target}" = "${host}"; then | |
8236 | case "${host}" in | |
8237 | i[3456]86-*-linux*) | |
8238 | cat >> confdefs.h <<\EOF | |
8239 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
8240 | EOF | |
8241 | ||
8242 | cat >> confdefs.h <<\EOF | |
8243 | #define sys_quotactl 1 | |
8244 | EOF | |
8245 | ||
8246 | ;; | |
8247 | ia64-*-aix*) | |
8248 | cat >> confdefs.h <<\EOF | |
8249 | #define NEW_PROC_API 1 | |
8250 | EOF | |
8251 | ||
8252 | ;; | |
8253 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
8254 | cat >> confdefs.h <<\EOF | |
8255 | #define NEW_PROC_API 1 | |
8256 | EOF | |
8257 | ||
8258 | ;; | |
0bbc026e | 8259 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]) |
97bf5e38 MK |
8260 | cat >> confdefs.h <<\EOF |
8261 | #define NEW_PROC_API 1 | |
c960c18f AC |
8262 | EOF |
8263 | ||
8264 | ;; | |
8265 | mips-sgi-irix5*) | |
8266 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
8267 | cat >> confdefs.h <<\EOF | |
8268 | #define _KMEMUSER 1 | |
97bf5e38 MK |
8269 | EOF |
8270 | ||
8271 | ;; | |
8272 | esac | |
8273 | fi | |
8274 | ||
8275 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
8276 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
0bbc026e | 8277 | echo "configure:8278: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 8278 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
8279 | echo $ac_n "(cached) $ac_c" 1>&6 |
8280 | else | |
8281 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8282 | #line 8283 "configure" |
596c9d4b KB |
8283 | #include "confdefs.h" |
8284 | ||
8285 | #define _SYSCALL32 | |
8286 | #include <sys/procfs.h> | |
8287 | int main() { | |
97bf5e38 | 8288 | pstatus_t avar |
596c9d4b KB |
8289 | ; return 0; } |
8290 | EOF | |
0bbc026e | 8291 | if { (eval echo configure:8292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8292 | rm -rf conftest* |
97bf5e38 | 8293 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
8294 | else |
8295 | echo "configure: failed program was:" >&5 | |
8296 | cat conftest.$ac_ext >&5 | |
8297 | rm -rf conftest* | |
97bf5e38 | 8298 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
8299 | |
8300 | fi | |
8301 | rm -f conftest* | |
8302 | fi | |
8303 | ||
97bf5e38 | 8304 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 8305 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8306 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
8307 | EOF |
8308 | ||
8309 | fi | |
97bf5e38 | 8310 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 8311 | |
97bf5e38 | 8312 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8313 | echo "configure:8314: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 8314 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
8315 | echo $ac_n "(cached) $ac_c" 1>&6 |
8316 | else | |
8317 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8318 | #line 8319 "configure" |
596c9d4b KB |
8319 | #include "confdefs.h" |
8320 | ||
8321 | #define _SYSCALL32 | |
8322 | #include <sys/procfs.h> | |
8323 | int main() { | |
97bf5e38 | 8324 | prrun_t avar |
596c9d4b KB |
8325 | ; return 0; } |
8326 | EOF | |
0bbc026e | 8327 | if { (eval echo configure:8328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8328 | rm -rf conftest* |
97bf5e38 | 8329 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
8330 | else |
8331 | echo "configure: failed program was:" >&5 | |
8332 | cat conftest.$ac_ext >&5 | |
8333 | rm -rf conftest* | |
97bf5e38 | 8334 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
8335 | |
8336 | fi | |
8337 | rm -f conftest* | |
8338 | fi | |
8339 | ||
97bf5e38 | 8340 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 8341 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8342 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
8343 | EOF |
8344 | ||
8345 | fi | |
97bf5e38 | 8346 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 8347 | |
97bf5e38 | 8348 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8349 | echo "configure:8350: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8350 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
8351 | echo $ac_n "(cached) $ac_c" 1>&6 |
8352 | else | |
8353 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8354 | #line 8355 "configure" |
596c9d4b KB |
8355 | #include "confdefs.h" |
8356 | ||
8357 | #define _SYSCALL32 | |
8358 | #include <sys/procfs.h> | |
8359 | int main() { | |
97bf5e38 | 8360 | gregset_t avar |
596c9d4b KB |
8361 | ; return 0; } |
8362 | EOF | |
0bbc026e | 8363 | if { (eval echo configure:8364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 8364 | rm -rf conftest* |
97bf5e38 | 8365 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
8366 | else |
8367 | echo "configure: failed program was:" >&5 | |
8368 | cat conftest.$ac_ext >&5 | |
8369 | rm -rf conftest* | |
97bf5e38 | 8370 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
8371 | |
8372 | fi | |
8373 | rm -f conftest* | |
8374 | fi | |
8375 | ||
97bf5e38 | 8376 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 8377 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8378 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
8379 | EOF |
8380 | ||
8381 | fi | |
97bf5e38 | 8382 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 8383 | |
97bf5e38 | 8384 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8385 | echo "configure:8386: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8386 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 8387 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
8388 | else |
8389 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8390 | #line 8391 "configure" |
d84dd0c5 | 8391 | #include "confdefs.h" |
97bf5e38 MK |
8392 | |
8393 | #define _SYSCALL32 | |
d84dd0c5 | 8394 | #include <sys/procfs.h> |
97bf5e38 MK |
8395 | int main() { |
8396 | fpregset_t avar | |
8397 | ; return 0; } | |
d84dd0c5 | 8398 | EOF |
0bbc026e | 8399 | if { (eval echo configure:8400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8400 | rm -rf conftest* |
8401 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
8402 | else |
8403 | echo "configure: failed program was:" >&5 | |
8404 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8405 | rm -rf conftest* |
8406 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8407 | ||
d84dd0c5 | 8408 | fi |
97bf5e38 | 8409 | rm -f conftest* |
d84dd0c5 MK |
8410 | fi |
8411 | ||
97bf5e38 MK |
8412 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
8413 | cat >> confdefs.h <<\EOF | |
8414 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
8415 | EOF |
8416 | ||
97bf5e38 MK |
8417 | fi |
8418 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 8419 | |
97bf5e38 | 8420 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8421 | echo "configure:8422: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8422 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
8423 | echo $ac_n "(cached) $ac_c" 1>&6 |
8424 | else | |
8425 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8426 | #line 8427 "configure" |
c906108c | 8427 | #include "confdefs.h" |
c906108c | 8428 | |
97bf5e38 MK |
8429 | #define _SYSCALL32 |
8430 | #include <sys/procfs.h> | |
c906108c | 8431 | int main() { |
97bf5e38 | 8432 | prgregset_t avar |
c906108c SS |
8433 | ; return 0; } |
8434 | EOF | |
0bbc026e | 8435 | if { (eval echo configure:8436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8436 | rm -rf conftest* |
97bf5e38 | 8437 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
8438 | else |
8439 | echo "configure: failed program was:" >&5 | |
8440 | cat conftest.$ac_ext >&5 | |
8441 | rm -rf conftest* | |
97bf5e38 MK |
8442 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
8443 | ||
c906108c SS |
8444 | fi |
8445 | rm -f conftest* | |
8446 | fi | |
8447 | ||
97bf5e38 MK |
8448 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
8449 | cat >> confdefs.h <<\EOF | |
8450 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
8451 | EOF |
8452 | ||
97bf5e38 MK |
8453 | fi |
8454 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 8455 | |
97bf5e38 | 8456 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8457 | echo "configure:8458: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8458 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
8459 | echo $ac_n "(cached) $ac_c" 1>&6 |
8460 | else | |
8461 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8462 | #line 8463 "configure" |
d45fe813 | 8463 | #include "confdefs.h" |
97bf5e38 MK |
8464 | |
8465 | #define _SYSCALL32 | |
8466 | #include <sys/procfs.h> | |
d45fe813 | 8467 | int main() { |
97bf5e38 | 8468 | prfpregset_t avar |
d45fe813 KB |
8469 | ; return 0; } |
8470 | EOF | |
0bbc026e | 8471 | if { (eval echo configure:8472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8472 | rm -rf conftest* |
97bf5e38 | 8473 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
8474 | else |
8475 | echo "configure: failed program was:" >&5 | |
8476 | cat conftest.$ac_ext >&5 | |
8477 | rm -rf conftest* | |
97bf5e38 MK |
8478 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
8479 | ||
d45fe813 KB |
8480 | fi |
8481 | rm -f conftest* | |
8482 | fi | |
8483 | ||
97bf5e38 MK |
8484 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
8485 | cat >> confdefs.h <<\EOF | |
8486 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
8487 | EOF |
8488 | ||
97bf5e38 MK |
8489 | fi |
8490 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 8491 | |
97bf5e38 | 8492 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8493 | echo "configure:8494: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8494 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8495 | echo $ac_n "(cached) $ac_c" 1>&6 |
8496 | else | |
8497 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8498 | #line 8499 "configure" |
d45fe813 | 8499 | #include "confdefs.h" |
97bf5e38 MK |
8500 | |
8501 | #define _SYSCALL32 | |
8502 | #include <sys/procfs.h> | |
d45fe813 | 8503 | int main() { |
97bf5e38 | 8504 | prgregset32_t avar |
d45fe813 KB |
8505 | ; return 0; } |
8506 | EOF | |
0bbc026e | 8507 | if { (eval echo configure:8508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8508 | rm -rf conftest* |
97bf5e38 | 8509 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
8510 | else |
8511 | echo "configure: failed program was:" >&5 | |
8512 | cat conftest.$ac_ext >&5 | |
8513 | rm -rf conftest* | |
97bf5e38 MK |
8514 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
8515 | ||
d45fe813 KB |
8516 | fi |
8517 | rm -f conftest* | |
8518 | fi | |
8519 | ||
97bf5e38 MK |
8520 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
8521 | cat >> confdefs.h <<\EOF | |
8522 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
8523 | EOF |
8524 | ||
97bf5e38 MK |
8525 | fi |
8526 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 8527 | |
97bf5e38 | 8528 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8529 | echo "configure:8530: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8530 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8531 | echo $ac_n "(cached) $ac_c" 1>&6 |
8532 | else | |
8533 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8534 | #line 8535 "configure" |
d45fe813 | 8535 | #include "confdefs.h" |
97bf5e38 MK |
8536 | |
8537 | #define _SYSCALL32 | |
8538 | #include <sys/procfs.h> | |
d45fe813 | 8539 | int main() { |
97bf5e38 | 8540 | prfpregset32_t avar |
d45fe813 KB |
8541 | ; return 0; } |
8542 | EOF | |
0bbc026e | 8543 | if { (eval echo configure:8544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8544 | rm -rf conftest* |
97bf5e38 | 8545 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
8546 | else |
8547 | echo "configure: failed program was:" >&5 | |
8548 | cat conftest.$ac_ext >&5 | |
8549 | rm -rf conftest* | |
97bf5e38 MK |
8550 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
8551 | ||
d45fe813 KB |
8552 | fi |
8553 | rm -f conftest* | |
8554 | fi | |
8555 | ||
97bf5e38 MK |
8556 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
8557 | cat >> confdefs.h <<\EOF | |
8558 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
8559 | EOF |
8560 | ||
97bf5e38 MK |
8561 | fi |
8562 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 8563 | |
97bf5e38 | 8564 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8565 | echo "configure:8566: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 8566 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
8567 | echo $ac_n "(cached) $ac_c" 1>&6 |
8568 | else | |
8569 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8570 | #line 8571 "configure" |
d45fe813 | 8571 | #include "confdefs.h" |
97bf5e38 | 8572 | |
d45fe813 | 8573 | #define _SYSCALL32 |
97bf5e38 | 8574 | #include <sys/procfs.h> |
d45fe813 | 8575 | int main() { |
97bf5e38 | 8576 | lwpid_t avar |
d45fe813 KB |
8577 | ; return 0; } |
8578 | EOF | |
0bbc026e | 8579 | if { (eval echo configure:8580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8580 | rm -rf conftest* |
97bf5e38 | 8581 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
8582 | else |
8583 | echo "configure: failed program was:" >&5 | |
8584 | cat conftest.$ac_ext >&5 | |
8585 | rm -rf conftest* | |
97bf5e38 MK |
8586 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
8587 | ||
d45fe813 KB |
8588 | fi |
8589 | rm -f conftest* | |
8590 | fi | |
8591 | ||
97bf5e38 MK |
8592 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
8593 | cat >> confdefs.h <<\EOF | |
8594 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
8595 | EOF |
8596 | ||
97bf5e38 MK |
8597 | fi |
8598 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 8599 | |
97bf5e38 | 8600 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8601 | echo "configure:8602: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 8602 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
8603 | echo $ac_n "(cached) $ac_c" 1>&6 |
8604 | else | |
8605 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8606 | #line 8607 "configure" |
c906108c SS |
8607 | #include "confdefs.h" |
8608 | ||
97bf5e38 MK |
8609 | #define _SYSCALL32 |
8610 | #include <sys/procfs.h> | |
c906108c | 8611 | int main() { |
97bf5e38 | 8612 | psaddr_t avar |
c906108c SS |
8613 | ; return 0; } |
8614 | EOF | |
0bbc026e | 8615 | if { (eval echo configure:8616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8616 | rm -rf conftest* |
97bf5e38 | 8617 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
8618 | else |
8619 | echo "configure: failed program was:" >&5 | |
8620 | cat conftest.$ac_ext >&5 | |
8621 | rm -rf conftest* | |
97bf5e38 MK |
8622 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
8623 | ||
c906108c SS |
8624 | fi |
8625 | rm -f conftest* | |
8626 | fi | |
8627 | ||
97bf5e38 MK |
8628 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
8629 | cat >> confdefs.h <<\EOF | |
8630 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
8631 | EOF |
8632 | ||
97bf5e38 MK |
8633 | fi |
8634 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 8635 | |
97bf5e38 | 8636 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8637 | echo "configure:8638: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 8638 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 8639 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8640 | else |
8641 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8642 | #line 8643 "configure" |
c906108c SS |
8643 | #include "confdefs.h" |
8644 | ||
97bf5e38 MK |
8645 | #define _SYSCALL32 |
8646 | #include <sys/procfs.h> | |
8647 | int main() { | |
8648 | prsysent_t avar | |
8649 | ; return 0; } | |
c906108c | 8650 | EOF |
0bbc026e | 8651 | if { (eval echo configure:8652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8652 | rm -rf conftest* |
8653 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
8654 | else |
8655 | echo "configure: failed program was:" >&5 | |
8656 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8657 | rm -rf conftest* |
8658 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
8659 | ||
c906108c | 8660 | fi |
97bf5e38 | 8661 | rm -f conftest* |
c906108c SS |
8662 | fi |
8663 | ||
97bf5e38 MK |
8664 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
8665 | cat >> confdefs.h <<\EOF | |
8666 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
8667 | EOF |
8668 | ||
97bf5e38 MK |
8669 | fi |
8670 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 8671 | |
97bf5e38 | 8672 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8673 | echo "configure:8674: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 8674 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
8675 | echo $ac_n "(cached) $ac_c" 1>&6 |
8676 | else | |
8677 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8678 | #line 8679 "configure" |
c906108c SS |
8679 | #include "confdefs.h" |
8680 | ||
97bf5e38 MK |
8681 | #define _SYSCALL32 |
8682 | #include <sys/procfs.h> | |
c906108c | 8683 | int main() { |
97bf5e38 | 8684 | pr_sigset_t avar |
c906108c SS |
8685 | ; return 0; } |
8686 | EOF | |
0bbc026e | 8687 | if { (eval echo configure:8688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8688 | rm -rf conftest* |
97bf5e38 | 8689 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
8690 | else |
8691 | echo "configure: failed program was:" >&5 | |
8692 | cat conftest.$ac_ext >&5 | |
8693 | rm -rf conftest* | |
97bf5e38 MK |
8694 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
8695 | ||
c906108c SS |
8696 | fi |
8697 | rm -f conftest* | |
8698 | fi | |
8699 | ||
97bf5e38 MK |
8700 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
8701 | cat >> confdefs.h <<\EOF | |
8702 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
8703 | EOF |
8704 | ||
97bf5e38 MK |
8705 | fi |
8706 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 8707 | |
97bf5e38 | 8708 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
0bbc026e | 8709 | echo "configure:8710: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 8710 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8711 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8712 | else |
8713 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8714 | #line 8715 "configure" |
c906108c SS |
8715 | #include "confdefs.h" |
8716 | ||
97bf5e38 MK |
8717 | #define _SYSCALL32 |
8718 | #include <sys/procfs.h> | |
8719 | int main() { | |
8720 | pr_sigaction64_t avar | |
8721 | ; return 0; } | |
c906108c | 8722 | EOF |
0bbc026e | 8723 | if { (eval echo configure:8724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8724 | rm -rf conftest* |
8725 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8726 | else |
8727 | echo "configure: failed program was:" >&5 | |
8728 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8729 | rm -rf conftest* |
8730 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8731 | ||
c906108c | 8732 | fi |
97bf5e38 | 8733 | rm -f conftest* |
c906108c SS |
8734 | fi |
8735 | ||
97bf5e38 MK |
8736 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8737 | cat >> confdefs.h <<\EOF | |
8738 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8739 | EOF |
8740 | ||
97bf5e38 MK |
8741 | fi |
8742 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8743 | ||
8744 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
0bbc026e | 8745 | echo "configure:8746: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8746 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8747 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8748 | else | |
8749 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8750 | #line 8751 "configure" |
97bf5e38 MK |
8751 | #include "confdefs.h" |
8752 | ||
8753 | #define _SYSCALL32 | |
8754 | #include <sys/procfs.h> | |
8755 | int main() { | |
8756 | pr_siginfo64_t avar | |
8757 | ; return 0; } | |
8758 | EOF | |
0bbc026e | 8759 | if { (eval echo configure:8760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8760 | rm -rf conftest* |
8761 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8762 | else | |
8763 | echo "configure: failed program was:" >&5 | |
8764 | cat conftest.$ac_ext >&5 | |
8765 | rm -rf conftest* | |
8766 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8767 | ||
8768 | fi | |
8769 | rm -f conftest* | |
c906108c | 8770 | fi |
c906108c | 8771 | |
97bf5e38 MK |
8772 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8773 | cat >> confdefs.h <<\EOF | |
8774 | #define HAVE_PR_SIGINFO64_T 1 | |
8775 | EOF | |
c906108c | 8776 | |
97bf5e38 MK |
8777 | fi |
8778 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8779 | ||
8780 | ||
8781 | ||
8782 | ||
8783 | ||
8784 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8785 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
0bbc026e | 8786 | echo "configure:8787: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8787 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8788 | echo $ac_n "(cached) $ac_c" 1>&6 |
8789 | else | |
8790 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8791 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8792 | else |
8793 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8794 | #line 8795 "configure" |
c906108c | 8795 | #include "confdefs.h" |
97bf5e38 MK |
8796 | #include <sys/procfs.h> |
8797 | int main () | |
8798 | { | |
8799 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8800 | return 1; | |
8801 | return 0; | |
8802 | } | |
c906108c | 8803 | EOF |
0bbc026e | 8804 | if { (eval echo configure:8805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8805 | then |
97bf5e38 | 8806 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8807 | else |
8808 | echo "configure: failed program was:" >&5 | |
8809 | cat conftest.$ac_ext >&5 | |
8810 | rm -fr conftest* | |
97bf5e38 | 8811 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8812 | fi |
8813 | rm -fr conftest* | |
8814 | fi | |
8815 | ||
8816 | fi | |
8817 | ||
97bf5e38 MK |
8818 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8819 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8820 | cat >> confdefs.h <<\EOF | |
8821 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8822 | EOF |
8823 | ||
97bf5e38 MK |
8824 | fi |
8825 | fi | |
c906108c | 8826 | |
97bf5e38 MK |
8827 | |
8828 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
0bbc026e | 8829 | echo "configure:8830: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8830 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8831 | echo $ac_n "(cached) $ac_c" 1>&6 |
8832 | else | |
8833 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8834 | #line 8835 "configure" |
c906108c | 8835 | #include "confdefs.h" |
97bf5e38 MK |
8836 | #include <unistd.h> |
8837 | #include <sys/types.h> | |
8838 | #include <sys/procfs.h> | |
8839 | ||
8840 | int main() { | |
8841 | ||
8842 | int dummy;; | |
8843 | dummy = ioctl(0, PIOCSET, &dummy); | |
8844 | ||
8845 | ; return 0; } | |
c906108c | 8846 | EOF |
0bbc026e | 8847 | if { (eval echo configure:8848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8848 | rm -rf conftest* |
97bf5e38 | 8849 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8850 | else |
c906108c SS |
8851 | echo "configure: failed program was:" >&5 |
8852 | cat conftest.$ac_ext >&5 | |
8853 | rm -rf conftest* | |
97bf5e38 | 8854 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8855 | fi |
8856 | rm -f conftest* | |
8857 | fi | |
97bf5e38 MK |
8858 | |
8859 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8860 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8861 | cat >> confdefs.h <<\EOF | |
8862 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8863 | EOF |
97bf5e38 MK |
8864 | |
8865 | fi | |
c906108c | 8866 | fi |
c906108c | 8867 | |
97bf5e38 MK |
8868 | if test ${host} = ${target} ; then |
8869 | ||
8870 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
0bbc026e | 8871 | echo "configure:8872: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8872 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8873 | echo $ac_n "(cached) $ac_c" 1>&6 |
8874 | else | |
8875 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8876 | #line 8877 "configure" |
c906108c | 8877 | #include "confdefs.h" |
97bf5e38 | 8878 | #include <link.h> |
c906108c | 8879 | int main() { |
97bf5e38 | 8880 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8881 | ; return 0; } |
8882 | EOF | |
0bbc026e | 8883 | if { (eval echo configure:8884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8884 | rm -rf conftest* |
97bf5e38 | 8885 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8886 | else |
8887 | echo "configure: failed program was:" >&5 | |
8888 | cat conftest.$ac_ext >&5 | |
8889 | rm -rf conftest* | |
97bf5e38 | 8890 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8891 | fi |
8892 | rm -f conftest* | |
8893 | fi | |
8894 | ||
97bf5e38 MK |
8895 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8896 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8897 | cat >> confdefs.h <<\EOF | |
8898 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8899 | EOF |
97bf5e38 MK |
8900 | |
8901 | fi | |
8902 | ||
8903 | ||
8904 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
0bbc026e | 8905 | echo "configure:8906: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8906 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8907 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8908 | else |
97bf5e38 | 8909 | cat > conftest.$ac_ext <<EOF |
0bbc026e | 8910 | #line 8911 "configure" |
97bf5e38 MK |
8911 | #include "confdefs.h" |
8912 | #include <sys/types.h> | |
8913 | #include <link.h> | |
8914 | int main() { | |
8915 | struct link_map lm; (void) lm.lm_addr; | |
8916 | ; return 0; } | |
8917 | EOF | |
0bbc026e | 8918 | if { (eval echo configure:8919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8919 | rm -rf conftest* |
8920 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8921 | else | |
8922 | echo "configure: failed program was:" >&5 | |
8923 | cat conftest.$ac_ext >&5 | |
8924 | rm -rf conftest* | |
8925 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8926 | fi | |
8927 | rm -f conftest* | |
c906108c | 8928 | fi |
c906108c | 8929 | |
97bf5e38 MK |
8930 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8931 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8932 | cat >> confdefs.h <<\EOF | |
8933 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8934 | EOF | |
8935 | ||
8936 | fi | |
8937 | ||
8938 | ||
8939 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
0bbc026e | 8940 | echo "configure:8941: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8941 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8942 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8943 | else |
8944 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8945 | #line 8946 "configure" |
c906108c | 8946 | #include "confdefs.h" |
97bf5e38 MK |
8947 | #include <sys/types.h> |
8948 | #ifdef HAVE_NLIST_H | |
8949 | #include <nlist.h> | |
8950 | #endif | |
8951 | #include <link.h> | |
8952 | int main() { | |
8953 | struct so_map lm; (void) lm.som_addr; | |
8954 | ; return 0; } | |
8955 | EOF | |
0bbc026e | 8956 | if { (eval echo configure:8957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8957 | rm -rf conftest* |
8958 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8959 | else | |
8960 | echo "configure: failed program was:" >&5 | |
8961 | cat conftest.$ac_ext >&5 | |
8962 | rm -rf conftest* | |
8963 | gdb_cv_have_struct_so_map_with_som_members=no | |
8964 | fi | |
8965 | rm -f conftest* | |
8966 | fi | |
c906108c | 8967 | |
97bf5e38 MK |
8968 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8969 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8970 | cat >> confdefs.h <<\EOF | |
8971 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8972 | EOF | |
c906108c | 8973 | |
97bf5e38 | 8974 | fi |
c906108c | 8975 | |
97bf5e38 MK |
8976 | |
8977 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
0bbc026e | 8978 | echo "configure:8979: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8979 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8980 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8981 | else | |
8982 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 8983 | #line 8984 "configure" |
97bf5e38 MK |
8984 | #include "confdefs.h" |
8985 | #define _SYSCALL32 | |
8986 | #include <sys/link.h> | |
8987 | int main() { | |
8988 | struct link_map32 l; | |
8989 | ; return 0; } | |
8990 | EOF | |
0bbc026e | 8991 | if { (eval echo configure:8992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8992 | rm -rf conftest* |
8993 | gdb_cv_have_struct_link_map32=yes | |
8994 | else | |
8995 | echo "configure: failed program was:" >&5 | |
8996 | cat conftest.$ac_ext >&5 | |
8997 | rm -rf conftest* | |
8998 | gdb_cv_have_struct_link_map32=no | |
8999 | fi | |
9000 | rm -f conftest* | |
9001 | fi | |
c906108c | 9002 | |
97bf5e38 MK |
9003 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
9004 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
9005 | cat >> confdefs.h <<\EOF | |
9006 | #define HAVE_STRUCT_LINK_MAP32 1 | |
9007 | EOF | |
c906108c | 9008 | |
97bf5e38 MK |
9009 | cat >> confdefs.h <<\EOF |
9010 | #define _SYSCALL32 1 | |
9011 | EOF | |
c906108c | 9012 | |
97bf5e38 MK |
9013 | fi |
9014 | fi | |
c906108c | 9015 | |
c906108c | 9016 | |
97bf5e38 | 9017 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
0bbc026e | 9018 | echo "configure:9019: checking for long long support in compiler" >&5 |
97bf5e38 MK |
9019 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
9020 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9021 | else | |
9022 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9023 | #line 9024 "configure" |
97bf5e38 | 9024 | #include "confdefs.h" |
c906108c | 9025 | |
97bf5e38 | 9026 | int main() { |
c906108c | 9027 | |
97bf5e38 MK |
9028 | extern long long foo; |
9029 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 9030 | |
97bf5e38 MK |
9031 | ; return 0; } |
9032 | EOF | |
0bbc026e | 9033 | if { (eval echo configure:9034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
9034 | rm -rf conftest* |
9035 | gdb_cv_c_long_long=yes | |
9036 | else | |
9037 | echo "configure: failed program was:" >&5 | |
9038 | cat conftest.$ac_ext >&5 | |
9039 | rm -rf conftest* | |
9040 | gdb_cv_c_long_long=no | |
9041 | fi | |
9042 | rm -f conftest* | |
9043 | fi | |
c906108c | 9044 | |
97bf5e38 MK |
9045 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
9046 | if test $gdb_cv_c_long_long = yes; then | |
9047 | cat >> confdefs.h <<\EOF | |
9048 | #define CC_HAS_LONG_LONG 1 | |
9049 | EOF | |
9050 | ||
9051 | fi | |
9052 | ||
9053 | ||
9054 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
0bbc026e | 9055 | echo "configure:9056: checking for long long support in printf" >&5 |
97bf5e38 MK |
9056 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
9057 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9058 | else | |
9059 | if test "$cross_compiling" = yes; then | |
9060 | gdb_cv_printf_has_long_long=no | |
9061 | else | |
9062 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9063 | #line 9064 "configure" |
97bf5e38 MK |
9064 | #include "confdefs.h" |
9065 | ||
9066 | int main () { | |
9067 | char buf[32]; | |
9068 | long long l = 0; | |
9069 | l = (l << 16) + 0x0123; | |
9070 | l = (l << 16) + 0x4567; | |
9071 | l = (l << 16) + 0x89ab; | |
9072 | l = (l << 16) + 0xcdef; | |
9073 | sprintf (buf, "0x%016llx", l); | |
9074 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 9075 | } |
97bf5e38 | 9076 | EOF |
0bbc026e | 9077 | if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
9078 | then |
9079 | gdb_cv_printf_has_long_long=yes | |
9080 | else | |
9081 | echo "configure: failed program was:" >&5 | |
9082 | cat conftest.$ac_ext >&5 | |
9083 | rm -fr conftest* | |
9084 | gdb_cv_printf_has_long_long=no | |
9085 | fi | |
9086 | rm -fr conftest* | |
9087 | fi | |
9088 | ||
9089 | fi | |
9090 | ||
9091 | if test $gdb_cv_printf_has_long_long = yes; then | |
9092 | cat >> confdefs.h <<\EOF | |
9093 | #define PRINTF_HAS_LONG_LONG 1 | |
9094 | EOF | |
9095 | ||
9096 | fi | |
9097 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
9098 | ||
9099 | ||
9100 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
0bbc026e | 9101 | echo "configure:9102: checking for long double support in compiler" >&5 |
97bf5e38 MK |
9102 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
9103 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9104 | else | |
9105 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9106 | #line 9107 "configure" |
97bf5e38 MK |
9107 | #include "confdefs.h" |
9108 | ||
9109 | int main() { | |
9110 | long double foo; | |
9111 | ; return 0; } | |
9112 | EOF | |
0bbc026e | 9113 | if { (eval echo configure:9114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
9114 | rm -rf conftest* |
9115 | ac_cv_c_long_double=yes | |
9116 | else | |
9117 | echo "configure: failed program was:" >&5 | |
9118 | cat conftest.$ac_ext >&5 | |
9119 | rm -rf conftest* | |
9120 | ac_cv_c_long_double=no | |
9121 | fi | |
9122 | rm -f conftest* | |
9123 | fi | |
c906108c | 9124 | |
97bf5e38 MK |
9125 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
9126 | if test $ac_cv_c_long_double = yes; then | |
9127 | cat >> confdefs.h <<\EOF | |
9128 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 9129 | EOF |
97bf5e38 MK |
9130 | |
9131 | fi | |
9132 | ||
9133 | ||
9134 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
0bbc026e | 9135 | echo "configure:9136: checking for long double support in printf" >&5 |
97bf5e38 MK |
9136 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
9137 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9138 | else | |
9139 | if test "$cross_compiling" = yes; then | |
9140 | gdb_cv_printf_has_long_double=no | |
9141 | else | |
9142 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9143 | #line 9144 "configure" |
97bf5e38 MK |
9144 | #include "confdefs.h" |
9145 | ||
9146 | int main () { | |
9147 | char buf[16]; | |
9148 | long double f = 3.141592653; | |
9149 | sprintf (buf, "%Lg", f); | |
9150 | return (strncmp ("3.14159", buf, 7)); | |
9151 | } | |
9152 | EOF | |
0bbc026e | 9153 | if { (eval echo configure:9154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 9154 | then |
97bf5e38 | 9155 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
9156 | else |
9157 | echo "configure: failed program was:" >&5 | |
9158 | cat conftest.$ac_ext >&5 | |
9159 | rm -fr conftest* | |
97bf5e38 | 9160 | gdb_cv_printf_has_long_double=no |
c906108c SS |
9161 | fi |
9162 | rm -fr conftest* | |
9163 | fi | |
9164 | ||
9165 | fi | |
9166 | ||
97bf5e38 | 9167 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 9168 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
9169 | #define PRINTF_HAS_LONG_DOUBLE 1 |
9170 | EOF | |
9171 | ||
9172 | fi | |
9173 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
9174 | ||
9175 | ||
9176 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
0bbc026e | 9177 | echo "configure:9178: checking for long double support in scanf" >&5 |
97bf5e38 MK |
9178 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
9179 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9180 | else | |
9181 | if test "$cross_compiling" = yes; then | |
9182 | gdb_cv_scanf_has_long_double=no | |
9183 | else | |
9184 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9185 | #line 9186 "configure" |
97bf5e38 MK |
9186 | #include "confdefs.h" |
9187 | ||
9188 | int main () { | |
9189 | char *buf = "3.141592653"; | |
9190 | long double f = 0; | |
9191 | sscanf (buf, "%Lg", &f); | |
9192 | return !(f > 3.14159 && f < 3.14160); | |
9193 | } | |
c906108c | 9194 | EOF |
0bbc026e | 9195 | if { (eval echo configure:9196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
9196 | then |
9197 | gdb_cv_scanf_has_long_double=yes | |
9198 | else | |
9199 | echo "configure: failed program was:" >&5 | |
9200 | cat conftest.$ac_ext >&5 | |
9201 | rm -fr conftest* | |
9202 | gdb_cv_scanf_has_long_double=no | |
9203 | fi | |
9204 | rm -fr conftest* | |
9205 | fi | |
c906108c SS |
9206 | |
9207 | fi | |
9208 | ||
97bf5e38 MK |
9209 | if test $gdb_cv_scanf_has_long_double = yes; then |
9210 | cat >> confdefs.h <<\EOF | |
9211 | #define SCANF_HAS_LONG_DOUBLE 1 | |
9212 | EOF | |
9213 | ||
9214 | fi | |
9215 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 9216 | |
438013df AO |
9217 | case ${host_os} in |
9218 | aix*) | |
9219 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
0bbc026e | 9220 | echo "configure:9221: checking for -bbigtoc option" >&5 |
438013df AO |
9221 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
9222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9223 | else | |
9224 | ||
9225 | SAVE_LDFLAGS=$LDFLAGS | |
9226 | ||
9227 | case $GCC in | |
9228 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
9229 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
9230 | esac | |
9231 | ||
9232 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
9233 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9234 | #line 9235 "configure" |
438013df AO |
9235 | #include "confdefs.h" |
9236 | ||
9237 | int main() { | |
9238 | int i; | |
9239 | ; return 0; } | |
9240 | EOF | |
0bbc026e | 9241 | if { (eval echo configure:9242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
9242 | : |
9243 | else | |
9244 | echo "configure: failed program was:" >&5 | |
9245 | cat conftest.$ac_ext >&5 | |
9246 | rm -rf conftest* | |
9247 | gdb_cv_bigtoc= | |
9248 | fi | |
9249 | rm -f conftest* | |
ec76baa5 | 9250 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df AO |
9251 | |
9252 | fi | |
9253 | ||
9254 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
9255 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
9256 | ;; | |
9257 | esac | |
9258 | ||
c906108c SS |
9259 | |
9260 | ||
9261 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
9262 | case ${host_os} in | |
9263 | hpux*) | |
9264 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
0bbc026e | 9265 | echo "configure:9266: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
9266 | if test -f /usr/include/dce/cma_config.h ; then |
9267 | if test "$GCC" = "yes" ; then | |
9268 | echo "$ac_t""yes" 1>&6 | |
9269 | cat >> confdefs.h <<\EOF | |
9270 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
9271 | EOF | |
9272 | ||
3483b318 | 9273 | CONFIG_OBS="${CONFIG_OBS} hpux-thread.o" |
c906108c SS |
9274 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
9275 | else | |
9276 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
9277 | fi | |
9278 | else | |
9279 | echo "$ac_t""no" 1>&6 | |
9280 | fi | |
9281 | ;; | |
9282 | solaris*) | |
d92419e5 JB |
9283 | # See if thread_db library is around for Solaris thread debugging. |
9284 | # Note that we must explicitly test for version 1 of the library | |
9285 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
9286 | # the same API. | |
c906108c | 9287 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
0bbc026e | 9288 | echo "configure:9289: checking for Solaris thread debugging library" >&5 |
c906108c SS |
9289 | if test -f /usr/lib/libthread_db.so.1 ; then |
9290 | echo "$ac_t""yes" 1>&6 | |
9291 | cat >> confdefs.h <<\EOF | |
9292 | #define HAVE_THREAD_DB_LIB 1 | |
9293 | EOF | |
9294 | ||
3483b318 | 9295 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c SS |
9296 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
9297 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
0bbc026e | 9298 | echo "configure:9299: checking for dlopen in -ldl" >&5 |
c906108c SS |
9299 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
9300 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
9301 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9302 | else | |
9303 | ac_save_LIBS="$LIBS" | |
9304 | LIBS="-ldl $LIBS" | |
9305 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9306 | #line 9307 "configure" |
c906108c SS |
9307 | #include "confdefs.h" |
9308 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9309 | /* We use char because int might match the return type of a gcc2 | |
9310 | builtin and then its argument prototype would still apply. */ | |
9311 | char dlopen(); | |
9312 | ||
9313 | int main() { | |
9314 | dlopen() | |
9315 | ; return 0; } | |
9316 | EOF | |
0bbc026e | 9317 | if { (eval echo configure:9318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9318 | rm -rf conftest* |
9319 | eval "ac_cv_lib_$ac_lib_var=yes" | |
9320 | else | |
9321 | echo "configure: failed program was:" >&5 | |
9322 | cat conftest.$ac_ext >&5 | |
9323 | rm -rf conftest* | |
9324 | eval "ac_cv_lib_$ac_lib_var=no" | |
9325 | fi | |
9326 | rm -f conftest* | |
9327 | LIBS="$ac_save_LIBS" | |
9328 | ||
9329 | fi | |
9330 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
9331 | echo "$ac_t""yes" 1>&6 | |
9332 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
9333 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
9334 | cat >> confdefs.h <<EOF | |
9335 | #define $ac_tr_lib 1 | |
9336 | EOF | |
9337 | ||
9338 | LIBS="-ldl $LIBS" | |
9339 | ||
9340 | else | |
9341 | echo "$ac_t""no" 1>&6 | |
9342 | fi | |
9343 | ||
9344 | if test "$GCC" = "yes" ; then | |
9345 | # The GNU linker requires the -export-dynamic option to make | |
9346 | # all symbols visible in the dynamic symbol table. | |
9347 | hold_ldflags=$LDFLAGS | |
9348 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
0bbc026e | 9349 | echo "configure:9350: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
9350 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
9351 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9352 | #line 9353 "configure" |
c906108c SS |
9353 | #include "confdefs.h" |
9354 | ||
9355 | int main() { | |
9356 | int i; | |
9357 | ; return 0; } | |
9358 | EOF | |
0bbc026e | 9359 | if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9360 | rm -rf conftest* |
9361 | found=yes | |
9362 | else | |
9363 | echo "configure: failed program was:" >&5 | |
9364 | cat conftest.$ac_ext >&5 | |
9365 | rm -rf conftest* | |
9366 | found=no | |
9367 | fi | |
9368 | rm -f conftest* | |
9369 | LDFLAGS=$hold_ldflags | |
9370 | echo "$ac_t""$found" 1>&6 | |
9371 | if test $found = yes; then | |
9372 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
9373 | fi | |
9374 | fi | |
9375 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
9376 | # at one point. | |
9377 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
0bbc026e | 9378 | echo "configure:9379: checking if <proc_service.h> is old" >&5 |
c906108c SS |
9379 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
9380 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9381 | else | |
9382 | ||
9383 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9384 | #line 9385 "configure" |
c906108c SS |
9385 | #include "confdefs.h" |
9386 | ||
9387 | #include <proc_service.h> | |
9388 | ps_err_e ps_pdwrite | |
9389 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
9390 | ||
9391 | int main() { | |
9392 | ||
9393 | ; return 0; } | |
9394 | EOF | |
0bbc026e | 9395 | if { (eval echo configure:9396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9396 | rm -rf conftest* |
9397 | gdb_cv_proc_service_is_old=no | |
9398 | else | |
9399 | echo "configure: failed program was:" >&5 | |
9400 | cat conftest.$ac_ext >&5 | |
9401 | rm -rf conftest* | |
9402 | gdb_cv_proc_service_is_old=yes | |
9403 | fi | |
9404 | rm -f conftest* | |
9405 | ||
9406 | fi | |
9407 | ||
9408 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
9409 | if test $gdb_cv_proc_service_is_old = yes; then | |
9410 | cat >> confdefs.h <<\EOF | |
9411 | #define PROC_SERVICE_IS_OLD 1 | |
9412 | EOF | |
9413 | ||
9414 | fi | |
9415 | else | |
9416 | echo "$ac_t""no" 1>&6 | |
9417 | fi | |
9418 | ;; | |
d92419e5 JB |
9419 | aix*) |
9420 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
0bbc026e | 9421 | echo "configure:9422: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
9422 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
9423 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9424 | else | |
9425 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9426 | #line 9427 "configure" |
d92419e5 JB |
9427 | #include "confdefs.h" |
9428 | #include <sys/pthdebug.h> | |
9429 | int main() { | |
9430 | #ifndef PTHDB_VERSION_3 | |
9431 | #error | |
9432 | #endif | |
9433 | ; return 0; } | |
9434 | EOF | |
0bbc026e | 9435 | if { (eval echo configure:9436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
9436 | rm -rf conftest* |
9437 | gdb_cv_have_aix_thread_debug=yes | |
9438 | else | |
9439 | echo "configure: failed program was:" >&5 | |
9440 | cat conftest.$ac_ext >&5 | |
9441 | rm -rf conftest* | |
9442 | gdb_cv_have_aix_thread_debug=no | |
9443 | fi | |
9444 | rm -f conftest* | |
9445 | fi | |
9446 | ||
9447 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
9448 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
9449 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 9450 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
9451 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
9452 | fi | |
9453 | ;; | |
c906108c SS |
9454 | esac |
9455 | ||
9456 | fi | |
9457 | ||
3f47be5c EZ |
9458 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
9459 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
0bbc026e | 9460 | echo "configure:9461: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
9461 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
9462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9463 | else | |
9464 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9465 | #line 9466 "configure" |
3f47be5c EZ |
9466 | #include "confdefs.h" |
9467 | #include <thread_db.h> | |
9468 | int main() { | |
9469 | int i = TD_NOTALLOC; | |
9470 | ; return 0; } | |
9471 | EOF | |
0bbc026e | 9472 | if { (eval echo configure:9473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
9473 | rm -rf conftest* |
9474 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
9475 | else | |
9476 | echo "configure: failed program was:" >&5 | |
9477 | cat conftest.$ac_ext >&5 | |
9478 | rm -rf conftest* | |
9479 | gdb_cv_thread_db_h_has_td_notalloc=no | |
9480 | ||
9481 | fi | |
9482 | rm -f conftest* | |
9483 | ||
9484 | fi | |
9485 | ||
9486 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
9487 | fi | |
9488 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
9489 | cat >> confdefs.h <<\EOF | |
9490 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
9491 | EOF | |
9492 | ||
9493 | fi | |
9494 | ||
b757528f JJ |
9495 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
9496 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
0bbc026e | 9497 | echo "configure:9498: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
9498 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
9499 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9500 | else | |
9501 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9502 | #line 9503 "configure" |
b757528f JJ |
9503 | #include "confdefs.h" |
9504 | #include <sys/syscall.h> | |
9505 | int main() { | |
9506 | int i = __NR_tkill; | |
9507 | ; return 0; } | |
9508 | EOF | |
0bbc026e | 9509 | if { (eval echo configure:9510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
9510 | rm -rf conftest* |
9511 | gdb_cv_sys_syscall_h_has_tkill=yes | |
9512 | else | |
9513 | echo "configure: failed program was:" >&5 | |
9514 | cat conftest.$ac_ext >&5 | |
9515 | rm -rf conftest* | |
9516 | gdb_cv_sys_syscall_h_has_tkill=no | |
9517 | ||
9518 | fi | |
9519 | rm -f conftest* | |
9520 | ||
9521 | fi | |
9522 | ||
9523 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
9524 | fi | |
9525 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
9526 | cat >> confdefs.h <<\EOF | |
9527 | #define HAVE_TKILL_SYSCALL 1 | |
9528 | EOF | |
9529 | ||
9530 | fi | |
9531 | ||
fb40c209 | 9532 | |
030292b7 DJ |
9533 | # Check whether --with-sysroot or --without-sysroot was given. |
9534 | if test "${with_sysroot+set}" = set; then | |
9535 | withval="$with_sysroot" | |
9536 | ||
9537 | case ${with_sysroot} in | |
715d1656 | 9538 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
9539 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
9540 | esac | |
9541 | ||
9542 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
9543 | ||
9544 | if test "x$exec_prefix" = xNONE; then | |
9545 | if test "x$prefix" = xNONE; then | |
9546 | test_prefix=/usr/local | |
9547 | else | |
9548 | test_prefix=$prefix | |
9549 | fi | |
9550 | else | |
9551 | test_prefix=$exec_prefix | |
9552 | fi | |
9553 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
9554 | "${test_prefix}"|"${test_prefix}/"*|\ |
9555 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
9556 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
9557 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
9558 | ;; | |
9559 | esac | |
9560 | ||
9561 | else | |
9562 | ||
9563 | TARGET_SYSTEM_ROOT= | |
9564 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
9565 | ||
9566 | fi | |
9567 | ||
9568 | ||
9569 | ||
9570 | ||
3b851bce AC |
9571 | # NOTE: Don't add -Wall or -Wunused, they both include |
9572 | # -Wunused-parameter which reports bogus warnings. | |
9573 | # NOTE: If you add to this list, remember to update | |
9574 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 9575 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
0f0cffd2 | 9576 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \ |
4566dfcf | 9577 | -Wunused-label -Wunused-function" |
d8038014 | 9578 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
0f0cffd2 | 9579 | # -Wunused-function -Wunused-variable -Wunused-value |
93d56215 | 9580 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
9581 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
9582 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
9583 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
9584 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
9585 | if test "${enable_build_warnings+set}" = set; then | |
9586 | enableval="$enable_build_warnings" | |
1decb323 | 9587 | case "${enableval}" in |
c906108c SS |
9588 | yes) ;; |
9589 | no) build_warnings="-w";; | |
9590 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9591 | build_warnings="${build_warnings} ${t}";; | |
9592 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9593 | build_warnings="${t} ${build_warnings}";; | |
9594 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9595 | esac | |
d4f3574e | 9596 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 9597 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 9598 | fi |
1decb323 | 9599 | fi |
3b851bce AC |
9600 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
9601 | if test "${enable_gdb_build_warnings+set}" = set; then | |
9602 | enableval="$enable_gdb_build_warnings" | |
9603 | case "${enableval}" in | |
9604 | yes) ;; | |
9605 | no) build_warnings="-w";; | |
9606 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9607 | build_warnings="${build_warnings} ${t}";; | |
9608 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9609 | build_warnings="${t} ${build_warnings}";; | |
9610 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9611 | esac | |
9612 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9613 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9614 | fi | |
9615 | fi | |
104c1213 JM |
9616 | WARN_CFLAGS="" |
9617 | WERROR_CFLAGS="" | |
c906108c SS |
9618 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
9619 | then | |
746a987d | 9620 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
0bbc026e | 9621 | echo "configure:9622: checking compiler warning flags" >&5 |
746a987d AC |
9622 | # Separate out the -Werror flag as some files just cannot be |
9623 | # compiled with it enabled. | |
9624 | for w in ${build_warnings}; do | |
9625 | case $w in | |
9626 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
9627 | *) # Check that GCC accepts it | |
4536bbc6 AC |
9628 | saved_CFLAGS="$CFLAGS" |
9629 | CFLAGS="$CFLAGS $w" | |
9630 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9631 | #line 9632 "configure" |
4536bbc6 AC |
9632 | #include "confdefs.h" |
9633 | ||
9634 | int main() { | |
9635 | ||
9636 | ; return 0; } | |
9637 | EOF | |
0bbc026e | 9638 | if { (eval echo configure:9639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
9639 | rm -rf conftest* |
9640 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9641 | else | |
9642 | echo "configure: failed program was:" >&5 | |
9643 | cat conftest.$ac_ext >&5 | |
9644 | fi | |
9645 | rm -f conftest* | |
9646 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
9647 | esac |
9648 | done | |
9649 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
9650 | fi |
9651 | ||
9652 | ||
104c1213 | 9653 | |
7a292a7a SS |
9654 | # In the Cygwin environment, we need some additional flags. |
9655 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
0bbc026e | 9656 | echo "configure:9657: checking for cygwin" >&5 |
7a292a7a SS |
9657 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9658 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9659 | else | |
9660 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 9661 | #line 9662 "configure" |
7a292a7a SS |
9662 | #include "confdefs.h" |
9663 | ||
9664 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
9665 | lose | |
9666 | #endif | |
9667 | EOF | |
9668 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9669 | egrep "lose" >/dev/null 2>&1; then | |
9670 | rm -rf conftest* | |
9671 | gdb_cv_os_cygwin=yes | |
9672 | else | |
9673 | rm -rf conftest* | |
9674 | gdb_cv_os_cygwin=no | |
9675 | fi | |
9676 | rm -f conftest* | |
9677 | ||
9678 | fi | |
9679 | ||
9680 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
9681 | ||
aff38e61 AC |
9682 | |
9683 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9684 | case ${host} in | |
95cbc983 AC |
9685 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9686 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9687 | esac |
9688 | ||
9689 | ||
cd0fc7c3 SS |
9690 | # libreadline needs libuser32.a in a cygwin environment |
9691 | WIN32LIBS= | |
9692 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9693 | WIN32LIBS="-luser32" |
9694 | case "${target}" in | |
9695 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9696 | ;; | |
9697 | esac | |
cd0fc7c3 | 9698 | fi |
c906108c | 9699 | |
7a292a7a | 9700 | |
3fc11d3e JM |
9701 | LIBGUI="../libgui/src/libgui.a" |
9702 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9703 | ||
9704 | ||
7a292a7a | 9705 | |
3fc11d3e JM |
9706 | WIN32LDAPP= |
9707 | ||
9708 | ||
9709 | ||
d91670b9 CV |
9710 | case "${host}" in |
9711 | *-*-cygwin*) | |
9712 | configdir="win" | |
9713 | ;; | |
9714 | *) | |
9715 | configdir="unix" | |
9716 | ;; | |
9717 | esac | |
3fc11d3e JM |
9718 | |
9719 | GDBTKLIBS= | |
9720 | if test "${enable_gdbtk}" = "yes"; then | |
9721 | ||
d1c3b63a KS |
9722 | # Gdbtk must have an absolute path to srcdir in order to run |
9723 | # properly when not installed. | |
9724 | here=`pwd` | |
9725 | cd ${srcdir} | |
9726 | GDBTK_SRC_DIR=`pwd` | |
9727 | cd $here | |
9728 | ||
3fc11d3e JM |
9729 | |
9730 | # | |
9731 | # Ok, lets find the tcl configuration | |
9732 | # First, look for one uninstalled. | |
9733 | # the alternative search directory is invoked by --with-tclconfig | |
9734 | # | |
9735 | ||
9736 | if test x"${no_tcl}" = x ; then | |
9737 | # we reset no_tcl in case something fails here | |
9738 | no_tcl=true | |
9739 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9740 | if test "${with_tclconfig+set}" = set; then | |
9741 | withval="$with_tclconfig" | |
9742 | with_tclconfig=${withval} | |
9743 | fi | |
9744 | ||
9745 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
0bbc026e | 9746 | echo "configure:9747: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9747 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9748 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9749 | else | |
9750 | ||
9751 | ||
9752 | # First check to see if --with-tclconfig was specified. | |
9753 | if test x"${with_tclconfig}" != x ; then | |
9754 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9755 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9756 | else | |
9757 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9758 | fi | |
9759 | fi | |
9760 | ||
9761 | # then check for a private Tcl installation | |
9762 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9763 | for i in \ | |
9764 | ../tcl \ | |
9765 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9766 | ../../tcl \ | |
9767 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9768 | ../../../tcl \ | |
9769 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9770 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9771 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9772 | break | |
9773 | fi | |
9774 | done | |
9775 | fi | |
9776 | # check in a few common install locations | |
9777 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9778 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9779 | if test -f "$i/tclConfig.sh" ; then | |
9780 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9781 | break | |
9782 | fi | |
9783 | done | |
9784 | fi | |
9785 | # check in a few other private locations | |
9786 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9787 | for i in \ | |
9788 | ${srcdir}/../tcl \ | |
9789 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9790 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9791 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9792 | break | |
9793 | fi | |
9794 | done | |
9795 | fi | |
9796 | ||
9797 | fi | |
9798 | ||
9799 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9800 | TCLCONFIG="# no Tcl configs found" | |
9801 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9802 | else | |
9803 | no_tcl= | |
9804 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9805 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9806 | fi | |
9807 | fi | |
9808 | ||
9809 | if test -z "${no_tcl}"; then | |
9810 | ||
9811 | . $TCLCONFIG | |
9812 | ||
9813 | ||
9814 | ||
9815 | ||
9816 | ||
9817 | ||
9818 | ||
9819 | ||
9820 | ||
9821 | ||
9822 | ||
9823 | ||
9824 | ||
9825 | ||
9826 | ||
9827 | ||
9828 | ||
9829 | ||
9830 | ||
9831 | ||
033afc63 | 9832 | |
3fc11d3e JM |
9833 | |
9834 | ||
9835 | ||
9836 | ||
9837 | ||
9838 | ||
9839 | # | |
9840 | # Ok, lets find the tk configuration | |
9841 | # First, look for one uninstalled. | |
9842 | # the alternative search directory is invoked by --with-tkconfig | |
9843 | # | |
9844 | ||
9845 | if test x"${no_tk}" = x ; then | |
9846 | # we reset no_tk in case something fails here | |
9847 | no_tk=true | |
9848 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9849 | if test "${with_tkconfig+set}" = set; then | |
9850 | withval="$with_tkconfig" | |
9851 | with_tkconfig=${withval} | |
9852 | fi | |
9853 | ||
9854 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
0bbc026e | 9855 | echo "configure:9856: checking for Tk configuration" >&5 |
3fc11d3e JM |
9856 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9857 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9858 | else | |
9859 | ||
9860 | ||
9861 | # First check to see if --with-tkconfig was specified. | |
9862 | if test x"${with_tkconfig}" != x ; then | |
9863 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9864 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9865 | else | |
9866 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9867 | fi | |
9868 | fi | |
9869 | ||
9870 | # then check for a private Tk library | |
9871 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9872 | for i in \ | |
9873 | ../tk \ | |
9874 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9875 | ../../tk \ | |
9876 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9877 | ../../../tk \ | |
9878 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9879 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9880 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9881 | break | |
9882 | fi | |
9883 | done | |
9884 | fi | |
9885 | # check in a few common install locations | |
9886 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9887 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9888 | if test -f "$i/tkConfig.sh" ; then | |
9889 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9890 | break | |
9891 | fi | |
9892 | done | |
9893 | fi | |
9894 | # check in a few other private locations | |
9895 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9896 | for i in \ | |
9897 | ${srcdir}/../tk \ | |
9898 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9899 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9900 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9901 | break | |
9902 | fi | |
9903 | done | |
9904 | fi | |
9905 | ||
9906 | fi | |
9907 | ||
9908 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9909 | TKCONFIG="# no Tk configs found" | |
9910 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9911 | else | |
9912 | no_tk= | |
9913 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9914 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9915 | fi | |
9916 | fi | |
9917 | ||
9918 | ||
9919 | ||
dd2504ab JM |
9920 | # now look for Tcl library stuff |
9921 | ||
d91670b9 | 9922 | tcldir="../tcl/${configdir}/" |
dd2504ab JM |
9923 | |
9924 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9925 | ||
3fc11d3e JM |
9926 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9927 | # point to doing Tcl. | |
9928 | if test -z "${no_tk}"; then | |
9929 | ||
9930 | if test -f "$TKCONFIG" ; then | |
9931 | . $TKCONFIG | |
9932 | fi | |
9933 | ||
9934 | ||
9935 | ||
9936 | ||
9937 | ||
9938 | ||
9939 | ||
9940 | ||
9941 | ||
9942 | ||
9943 | ||
9944 | ||
9945 | ||
9946 | ||
9947 | # | |
9948 | # Ok, lets find the tcl source trees so we can use the headers | |
9949 | # Warning: transition of version 9 to 10 will break this algorithm | |
9950 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9951 | # be careful that we don't match stuff like tclX by accident. | |
9952 | # the alternative search directory is involked by --with-tclinclude | |
9953 | # | |
9954 | ||
9955 | no_tcl=true | |
9956 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
0bbc026e | 9957 | echo "configure:9958: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9958 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9959 | if test "${with_tclinclude+set}" = set; then | |
9960 | withval="$with_tclinclude" | |
9961 | with_tclinclude=${withval} | |
9962 | fi | |
9963 | ||
9964 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9965 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9966 | else | |
9967 | ||
9968 | # first check to see if --with-tclinclude was specified | |
9969 | if test x"${with_tclinclude}" != x ; then | |
9970 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9971 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9972 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9973 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9974 | else | |
9975 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9976 | fi | |
9977 | fi | |
9978 | ||
9979 | # next check if it came with Tcl configuration file | |
9980 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9981 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9982 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9983 | fi | |
9984 | fi | |
9985 | ||
9986 | # next check in private source directory | |
9987 | # | |
9988 | # since ls returns lowest version numbers first, reverse its output | |
9989 | if test x"${ac_cv_c_tclh}" = x ; then | |
9990 | for i in \ | |
9991 | ${srcdir}/../tcl \ | |
9992 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9993 | ${srcdir}/../../tcl \ | |
9994 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9995 | ${srcdir}/../../../tcl \ | |
9996 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9997 | if test -f $i/generic/tclInt.h ; then | |
9998 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9999 | break | |
10000 | fi | |
10001 | done | |
10002 | fi | |
10003 | # finally check in a few common install locations | |
10004 | # | |
10005 | # since ls returns lowest version numbers first, reverse its output | |
10006 | if test x"${ac_cv_c_tclh}" = x ; then | |
10007 | for i in \ | |
10008 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
10009 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
10010 | /usr/local/src/tcl \ | |
10011 | /usr/local/lib/tcl \ | |
10012 | ${prefix}/include ; do | |
10013 | if test -f $i/generic/tclInt.h ; then | |
10014 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
10015 | break | |
10016 | fi | |
10017 | done | |
10018 | fi | |
10019 | # see if one is installed | |
10020 | if test x"${ac_cv_c_tclh}" = x ; then | |
10021 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
10022 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
0bbc026e | 10023 | echo "configure:10024: checking for tclInt.h" >&5 |
3fc11d3e JM |
10024 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
10025 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10026 | else | |
10027 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 10028 | #line 10029 "configure" |
3fc11d3e JM |
10029 | #include "confdefs.h" |
10030 | #include <tclInt.h> | |
10031 | EOF | |
10032 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 10033 | { (eval echo configure:10034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
10034 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10035 | if test -z "$ac_err"; then | |
10036 | rm -rf conftest* | |
10037 | eval "ac_cv_header_$ac_safe=yes" | |
10038 | else | |
10039 | echo "$ac_err" >&5 | |
10040 | echo "configure: failed program was:" >&5 | |
10041 | cat conftest.$ac_ext >&5 | |
10042 | rm -rf conftest* | |
10043 | eval "ac_cv_header_$ac_safe=no" | |
10044 | fi | |
10045 | rm -f conftest* | |
10046 | fi | |
10047 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
10048 | echo "$ac_t""yes" 1>&6 | |
10049 | ac_cv_c_tclh=installed | |
10050 | else | |
10051 | echo "$ac_t""no" 1>&6 | |
10052 | ac_cv_c_tclh="" | |
10053 | fi | |
10054 | ||
10055 | fi | |
10056 | ||
10057 | fi | |
10058 | ||
10059 | if test x"${ac_cv_c_tclh}" = x ; then | |
10060 | TCLHDIR="# no Tcl private headers found" | |
10061 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
10062 | fi | |
10063 | if test x"${ac_cv_c_tclh}" != x ; then | |
10064 | no_tcl="" | |
10065 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
10066 | echo "$ac_t""is installed" 1>&6 | |
10067 | TCLHDIR="" | |
10068 | else | |
10069 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
10070 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
10071 | TCLHDIR="-I${ac_cv_c_tclh}" | |
10072 | fi | |
10073 | fi | |
10074 | ||
10075 | ||
10076 | ||
10077 | ||
10078 | # | |
10079 | # Ok, lets find the tk source trees so we can use the headers | |
10080 | # If the directory (presumably symlink) named "tk" exists, use that one | |
10081 | # in preference to any others. Same logic is used when choosing library | |
10082 | # and again with Tcl. The search order is the best place to look first, then in | |
10083 | # decreasing significance. The loop breaks if the trigger file is found. | |
10084 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
10085 | # directory. This converts the path from a relative to an absolute, so | |
10086 | # recursive cache variables for the path will work right. We check all | |
10087 | # the possible paths in one loop rather than many seperate loops to speed | |
10088 | # things up. | |
10089 | # the alternative search directory is involked by --with-tkinclude | |
10090 | # | |
10091 | no_tk=true | |
10092 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
0bbc026e | 10093 | echo "configure:10094: checking for Tk private headers" >&5 |
3fc11d3e JM |
10094 | # Check whether --with-tkinclude or --without-tkinclude was given. |
10095 | if test "${with_tkinclude+set}" = set; then | |
10096 | withval="$with_tkinclude" | |
10097 | with_tkinclude=${withval} | |
10098 | fi | |
10099 | ||
10100 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
10101 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10102 | else | |
10103 | ||
10104 | # first check to see if --with-tkinclude was specified | |
10105 | if test x"${with_tkinclude}" != x ; then | |
10106 | if test -f ${with_tkinclude}/tk.h ; then | |
10107 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
10108 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
10109 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
10110 | else | |
10111 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
10112 | fi | |
10113 | fi | |
10114 | ||
10115 | # next check if it came with Tk configuration file | |
10116 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
10117 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
10118 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
10119 | fi | |
10120 | fi | |
10121 | ||
10122 | # next check in private source directory | |
10123 | # | |
10124 | # since ls returns lowest version numbers first, reverse its output | |
10125 | if test x"${ac_cv_c_tkh}" = x ; then | |
10126 | for i in \ | |
10127 | ${srcdir}/../tk \ | |
10128 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
10129 | ${srcdir}/../../tk \ | |
10130 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
10131 | ${srcdir}/../../../tk \ | |
10132 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
10133 | if test -f $i/generic/tk.h ; then | |
10134 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
10135 | break | |
10136 | fi | |
10137 | done | |
10138 | fi | |
10139 | # finally check in a few common install locations | |
10140 | # | |
10141 | # since ls returns lowest version numbers first, reverse its output | |
10142 | if test x"${ac_cv_c_tkh}" = x ; then | |
10143 | for i in \ | |
10144 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
10145 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
10146 | /usr/local/src/tk \ | |
10147 | /usr/local/lib/tk \ | |
10148 | ${prefix}/include ; do | |
10149 | if test -f $i/generic/tk.h ; then | |
10150 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
10151 | break | |
10152 | fi | |
10153 | done | |
10154 | fi | |
10155 | # see if one is installed | |
10156 | if test x"${ac_cv_c_tkh}" = x ; then | |
10157 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
10158 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
0bbc026e | 10159 | echo "configure:10160: checking for tk.h" >&5 |
3fc11d3e JM |
10160 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
10161 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10162 | else | |
10163 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 10164 | #line 10165 "configure" |
3fc11d3e JM |
10165 | #include "confdefs.h" |
10166 | #include <tk.h> | |
10167 | EOF | |
10168 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 10169 | { (eval echo configure:10170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
10170 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10171 | if test -z "$ac_err"; then | |
10172 | rm -rf conftest* | |
10173 | eval "ac_cv_header_$ac_safe=yes" | |
10174 | else | |
10175 | echo "$ac_err" >&5 | |
10176 | echo "configure: failed program was:" >&5 | |
10177 | cat conftest.$ac_ext >&5 | |
10178 | rm -rf conftest* | |
10179 | eval "ac_cv_header_$ac_safe=no" | |
10180 | fi | |
10181 | rm -f conftest* | |
10182 | fi | |
10183 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
10184 | echo "$ac_t""yes" 1>&6 | |
10185 | ac_cv_c_tkh=installed | |
10186 | else | |
10187 | echo "$ac_t""no" 1>&6 | |
10188 | ac_cv_c_tkh="" | |
10189 | fi | |
10190 | ||
10191 | fi | |
10192 | ||
10193 | fi | |
10194 | ||
10195 | if test x"${ac_cv_c_tkh}" != x ; then | |
10196 | no_tk="" | |
10197 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
10198 | echo "$ac_t""is installed" 1>&6 | |
10199 | TKHDIR="" | |
10200 | else | |
10201 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
10202 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
10203 | TKHDIR="-I${ac_cv_c_tkh}" | |
10204 | fi | |
10205 | else | |
10206 | TKHDIR="# no Tk directory found" | |
10207 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
10208 | no_tk=true | |
10209 | fi | |
10210 | ||
10211 | ||
10212 | ||
10213 | ||
10214 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
0bbc026e | 10215 | echo "configure:10216: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
10216 | if test x"${ac_cv_c_itclh}" = x ; then |
10217 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
10218 | if test -f $i/generic/itcl.h ; then | |
10219 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
10220 | break | |
10221 | fi | |
10222 | done | |
10223 | fi | |
10224 | if test x"${ac_cv_c_itclh}" = x ; then | |
10225 | ITCLHDIR="# no Itcl private headers found" | |
10226 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
10227 | fi | |
10228 | if test x"${ac_cv_c_itclh}" != x ; then | |
10229 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
10230 | fi | |
10231 | # should always be here | |
10232 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
10233 | ||
10234 | #AC_SUBST(ITCLLIB) | |
10235 | ||
10236 | ||
10237 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
0bbc026e | 10238 | echo "configure:10239: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
10239 | if test x"${ac_cv_c_itkh}" = x ; then |
10240 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
10241 | if test -f $i/generic/itk.h ; then | |
10242 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
10243 | break | |
10244 | fi | |
10245 | done | |
10246 | fi | |
10247 | if test x"${ac_cv_c_itkh}" = x ; then | |
10248 | ITKHDIR="# no Itk private headers found" | |
10249 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
10250 | fi | |
10251 | if test x"${ac_cv_c_itkh}" != x ; then | |
10252 | ITKHDIR="-I${ac_cv_c_itkh}" | |
10253 | fi | |
10254 | # should always be here | |
10255 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
10256 | ||
10257 | #AC_SUBST(ITKLIB) | |
10258 | ||
3fc11d3e | 10259 | |
dd2504ab JM |
10260 | |
10261 | # now look for Tk library stuff | |
10262 | ||
d91670b9 | 10263 | tkdir="../tk/${configdir}/" |
dd2504ab JM |
10264 | |
10265 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
10266 | ||
3fc11d3e JM |
10267 | # now look for Itcl library stuff |
10268 | ||
10269 | ||
10270 | # | |
10271 | # Ok, lets find the itcl configuration | |
10272 | # First, look for one uninstalled. | |
10273 | # the alternative search directory is invoked by --with-itclconfig | |
10274 | # | |
10275 | ||
10276 | if test x"${no_itcl}" = x ; then | |
10277 | # we reset no_itcl in case something fails here | |
10278 | no_itcl=true | |
10279 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
10280 | if test "${with_itclconfig+set}" = set; then | |
10281 | withval="$with_itclconfig" | |
10282 | with_itclconfig=${withval} | |
10283 | fi | |
10284 | ||
10285 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
0bbc026e | 10286 | echo "configure:10287: checking for Itcl configuration" >&5 |
3fc11d3e JM |
10287 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
10288 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10289 | else | |
10290 | ||
10291 | ||
10292 | # First check to see if --with-itclconfig was specified. | |
10293 | if test x"${with_itclconfig}" != x ; then | |
10294 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
10295 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
10296 | else | |
10297 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
10298 | fi | |
10299 | fi | |
10300 | ||
10301 | # then check for a private Itcl library | |
10302 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10303 | for i in \ | |
10304 | ../itcl/itcl \ | |
10305 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
10306 | ../../itcl \ | |
10307 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
10308 | ../../../itcl \ | |
10309 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
10310 | if test -f "$i/itclConfig.sh" ; then | |
10311 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10312 | break | |
10313 | fi | |
10314 | done | |
10315 | fi | |
10316 | # check in a few common install locations | |
10317 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10318 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10319 | if test -f "$i/itclConfig.sh" ; then | |
10320 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10321 | break | |
10322 | fi | |
10323 | done | |
10324 | fi | |
10325 | # check in a few other private locations | |
10326 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10327 | for i in \ | |
10328 | ${srcdir}/../itcl/itcl \ | |
10329 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
10330 | if test -f "$i/itclConfig.sh" ; then | |
10331 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
10332 | break | |
10333 | fi | |
10334 | done | |
10335 | fi | |
10336 | ||
10337 | fi | |
10338 | ||
10339 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
10340 | ITCLCONFIG="# no Itcl configs found" | |
10341 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
10342 | else | |
10343 | no_itcl= | |
10344 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
10345 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
10346 | fi | |
10347 | fi | |
10348 | ||
10349 | if test -z "${no_itcl}"; then | |
10350 | ||
10351 | if test -f "$ITCLCONFIG" ; then | |
10352 | . $ITCLCONFIG | |
10353 | fi | |
10354 | ||
10355 | ||
10356 | ||
10357 | ||
10358 | ||
10359 | ||
10360 | ||
10361 | ||
10362 | ||
10363 | ||
3fc11d3e JM |
10364 | |
10365 | ||
10366 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 10367 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
10368 | fi |
10369 | ||
10370 | ||
10371 | # now look for Itk library stuff | |
10372 | ||
10373 | # | |
10374 | # Ok, lets find the itk configuration | |
10375 | # First, look for one uninstalled. | |
10376 | # the alternative search directory is invoked by --with-itkconfig | |
10377 | # | |
10378 | ||
10379 | if test x"${no_itk}" = x ; then | |
10380 | # we reset no_itk in case something fails here | |
10381 | no_itk=true | |
10382 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
10383 | if test "${with_itkconfig+set}" = set; then | |
10384 | withval="$with_itkconfig" | |
10385 | with_itkconfig=${withval} | |
10386 | fi | |
10387 | ||
10388 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
0bbc026e | 10389 | echo "configure:10390: checking for Itk configuration" >&5 |
3fc11d3e JM |
10390 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
10391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10392 | else | |
10393 | ||
10394 | ||
10395 | # First check to see if --with-itkconfig was specified. | |
10396 | if test x"${with_itkconfig}" != x ; then | |
10397 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
10398 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
10399 | else | |
10400 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
10401 | fi | |
10402 | fi | |
10403 | ||
10404 | # then check for a private Itk library | |
10405 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10406 | for i in \ | |
10407 | ../itcl/itk \ | |
10408 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
10409 | ../../itk \ | |
10410 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
10411 | ../../../itk \ | |
10412 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
10413 | if test -f "$i/itkConfig.sh" ; then | |
10414 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10415 | break | |
10416 | fi | |
10417 | done | |
10418 | fi | |
10419 | # check in a few common install locations | |
10420 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10421 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10422 | if test -f "$i/itkConfig.sh" ; then | |
10423 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10424 | break | |
10425 | fi | |
10426 | done | |
10427 | fi | |
10428 | # check in a few other private locations | |
10429 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10430 | for i in \ | |
10431 | ${srcdir}/../itcl/itk \ | |
10432 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
10433 | if test -f "$i/itkConfig.sh" ; then | |
10434 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10435 | break | |
10436 | fi | |
10437 | done | |
10438 | fi | |
10439 | ||
10440 | fi | |
10441 | ||
10442 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10443 | ITKCONFIG="# no Itk configs found" | |
10444 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
10445 | else | |
10446 | no_itk= | |
10447 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
10448 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
10449 | fi | |
10450 | fi | |
10451 | ||
10452 | ||
10453 | if test -z "${no_itcl}"; then | |
10454 | ||
10455 | if test -f "$ITKCONFIG" ; then | |
10456 | . $ITKCONFIG | |
10457 | fi | |
10458 | ||
10459 | ||
10460 | ||
10461 | ||
10462 | ||
10463 | ||
10464 | ||
10465 | ||
10466 | ||
10467 | ||
10468 | ||
10469 | ||
3fc11d3e | 10470 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 10471 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
10472 | fi |
10473 | ||
4226a5a5 | 10474 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
10475 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
10476 | # know whether 8.2 will or not, but I bet it will. | |
10477 | # I don't have to worry about 7.x since we don't support it. | |
10478 | GDBTK_CFLAGS="" | |
10479 | if test "$GCC" = "yes"; then | |
10480 | if test "$TCL_VERSION" != "8.0" ; then | |
10481 | GDBTK_CFLAGS="-fwritable-strings" | |
10482 | fi | |
10483 | fi | |
10484 | ||
10485 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 10486 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
10487 | # Yes, the ordering seems wrong here. But it isn't. |
10488 | # TK_LIBS is the list of libraries that need to be linked | |
10489 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
10490 | # were in LIBS then any link tests after this point would | |
10491 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
10492 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
10493 | |
10494 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
10495 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
10496 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
33f8ca73 AC |
10497 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" |
10498 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
10499 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
10500 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e JM |
10501 | |
10502 | if test x$gdb_cv_os_cygwin = xyes; then | |
10503 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
10504 | WIN32LDAPP="-Wl,--subsystem,console" | |
10505 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
10506 | fi | |
10507 | fi | |
10508 | fi | |
ffc6a242 | 10509 | |
ffc6a242 | 10510 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
10511 | fi |
10512 | ||
10513 | ||
10514 | ||
10515 | ||
10516 | ||
10517 | ||
10518 | ||
10519 | ||
10520 | ||
10521 | ||
10522 | ||
10523 | ||
10524 | ||
dd2504ab | 10525 | |
c906108c SS |
10526 | # If we find X, set shell vars x_includes and x_libraries to the |
10527 | # paths, otherwise set no_x=yes. | |
10528 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
10529 | # --without-x overrides everything else, but does not touch the cache. | |
10530 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
0bbc026e | 10531 | echo "configure:10532: checking for X" >&5 |
c906108c SS |
10532 | |
10533 | # Check whether --with-x or --without-x was given. | |
10534 | if test "${with_x+set}" = set; then | |
10535 | withval="$with_x" | |
10536 | : | |
10537 | fi | |
10538 | ||
10539 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
10540 | if test "x$with_x" = xno; then | |
10541 | # The user explicitly disabled X. | |
10542 | have_x=disabled | |
10543 | else | |
10544 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
10545 | # Both variables are already set. | |
10546 | have_x=yes | |
10547 | else | |
10548 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
10549 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10550 | else | |
10551 | # One or both of the vars are not set, and there is no cached value. | |
10552 | ac_x_includes=NO ac_x_libraries=NO | |
10553 | rm -fr conftestdir | |
10554 | if mkdir conftestdir; then | |
10555 | cd conftestdir | |
10556 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
10557 | cat > Imakefile <<'EOF' | |
10558 | acfindx: | |
10559 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
10560 | EOF | |
10561 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
10562 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
10563 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
10564 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
10565 | for ac_extension in a so sl; do | |
10566 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
10567 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
10568 | ac_im_usrlibdir=$ac_im_libdir; break | |
10569 | fi | |
10570 | done | |
10571 | # Screen out bogus values from the imake configuration. They are | |
10572 | # bogus both because they are the default anyway, and because | |
10573 | # using them would break gcc on systems where it needs fixed includes. | |
10574 | case "$ac_im_incroot" in | |
10575 | /usr/include) ;; | |
10576 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
10577 | esac | |
10578 | case "$ac_im_usrlibdir" in | |
10579 | /usr/lib | /lib) ;; | |
10580 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
10581 | esac | |
10582 | fi | |
10583 | cd .. | |
10584 | rm -fr conftestdir | |
10585 | fi | |
10586 | ||
10587 | if test "$ac_x_includes" = NO; then | |
10588 | # Guess where to find include files, by looking for this one X11 .h file. | |
10589 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
10590 | ||
10591 | # First, try using that file with no special directory specified. | |
10592 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 10593 | #line 10594 "configure" |
c906108c SS |
10594 | #include "confdefs.h" |
10595 | #include <$x_direct_test_include> | |
10596 | EOF | |
10597 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bbc026e | 10598 | { (eval echo configure:10599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
10599 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10600 | if test -z "$ac_err"; then | |
10601 | rm -rf conftest* | |
10602 | # We can compile using X headers with no special include directory. | |
10603 | ac_x_includes= | |
10604 | else | |
10605 | echo "$ac_err" >&5 | |
10606 | echo "configure: failed program was:" >&5 | |
10607 | cat conftest.$ac_ext >&5 | |
10608 | rm -rf conftest* | |
10609 | # Look for the header file in a standard set of common directories. | |
10610 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10611 | for ac_dir in \ | |
10612 | /usr/X11/include \ | |
10613 | /usr/X11R6/include \ | |
10614 | /usr/X11R5/include \ | |
10615 | /usr/X11R4/include \ | |
10616 | \ | |
10617 | /usr/include/X11 \ | |
10618 | /usr/include/X11R6 \ | |
10619 | /usr/include/X11R5 \ | |
10620 | /usr/include/X11R4 \ | |
10621 | \ | |
10622 | /usr/local/X11/include \ | |
10623 | /usr/local/X11R6/include \ | |
10624 | /usr/local/X11R5/include \ | |
10625 | /usr/local/X11R4/include \ | |
10626 | \ | |
10627 | /usr/local/include/X11 \ | |
10628 | /usr/local/include/X11R6 \ | |
10629 | /usr/local/include/X11R5 \ | |
10630 | /usr/local/include/X11R4 \ | |
10631 | \ | |
10632 | /usr/X386/include \ | |
10633 | /usr/x386/include \ | |
10634 | /usr/XFree86/include/X11 \ | |
10635 | \ | |
10636 | /usr/include \ | |
10637 | /usr/local/include \ | |
10638 | /usr/unsupported/include \ | |
10639 | /usr/athena/include \ | |
10640 | /usr/local/x11r5/include \ | |
10641 | /usr/lpp/Xamples/include \ | |
10642 | \ | |
10643 | /usr/openwin/include \ | |
10644 | /usr/openwin/share/include \ | |
10645 | ; \ | |
10646 | do | |
10647 | if test -r "$ac_dir/$x_direct_test_include"; then | |
10648 | ac_x_includes=$ac_dir | |
10649 | break | |
10650 | fi | |
10651 | done | |
10652 | fi | |
10653 | rm -f conftest* | |
10654 | fi # $ac_x_includes = NO | |
10655 | ||
10656 | if test "$ac_x_libraries" = NO; then | |
10657 | # Check for the libraries. | |
10658 | ||
10659 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
10660 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
10661 | ||
10662 | # See if we find them without any special options. | |
10663 | # Don't add to $LIBS permanently. | |
10664 | ac_save_LIBS="$LIBS" | |
10665 | LIBS="-l$x_direct_test_library $LIBS" | |
10666 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 10667 | #line 10668 "configure" |
c906108c SS |
10668 | #include "confdefs.h" |
10669 | ||
10670 | int main() { | |
10671 | ${x_direct_test_function}() | |
10672 | ; return 0; } | |
10673 | EOF | |
0bbc026e | 10674 | if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10675 | rm -rf conftest* |
10676 | LIBS="$ac_save_LIBS" | |
10677 | # We can link X programs with no special library path. | |
10678 | ac_x_libraries= | |
10679 | else | |
10680 | echo "configure: failed program was:" >&5 | |
10681 | cat conftest.$ac_ext >&5 | |
10682 | rm -rf conftest* | |
10683 | LIBS="$ac_save_LIBS" | |
10684 | # First see if replacing the include by lib works. | |
10685 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10686 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10687 | /usr/X11/lib \ | |
10688 | /usr/X11R6/lib \ | |
10689 | /usr/X11R5/lib \ | |
10690 | /usr/X11R4/lib \ | |
10691 | \ | |
10692 | /usr/lib/X11 \ | |
10693 | /usr/lib/X11R6 \ | |
10694 | /usr/lib/X11R5 \ | |
10695 | /usr/lib/X11R4 \ | |
10696 | \ | |
10697 | /usr/local/X11/lib \ | |
10698 | /usr/local/X11R6/lib \ | |
10699 | /usr/local/X11R5/lib \ | |
10700 | /usr/local/X11R4/lib \ | |
10701 | \ | |
10702 | /usr/local/lib/X11 \ | |
10703 | /usr/local/lib/X11R6 \ | |
10704 | /usr/local/lib/X11R5 \ | |
10705 | /usr/local/lib/X11R4 \ | |
10706 | \ | |
10707 | /usr/X386/lib \ | |
10708 | /usr/x386/lib \ | |
10709 | /usr/XFree86/lib/X11 \ | |
10710 | \ | |
10711 | /usr/lib \ | |
10712 | /usr/local/lib \ | |
10713 | /usr/unsupported/lib \ | |
10714 | /usr/athena/lib \ | |
10715 | /usr/local/x11r5/lib \ | |
10716 | /usr/lpp/Xamples/lib \ | |
10717 | /lib/usr/lib/X11 \ | |
10718 | \ | |
10719 | /usr/openwin/lib \ | |
10720 | /usr/openwin/share/lib \ | |
10721 | ; \ | |
10722 | do | |
10723 | for ac_extension in a so sl; do | |
10724 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10725 | ac_x_libraries=$ac_dir | |
10726 | break 2 | |
10727 | fi | |
10728 | done | |
10729 | done | |
10730 | fi | |
10731 | rm -f conftest* | |
10732 | fi # $ac_x_libraries = NO | |
10733 | ||
10734 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10735 | # Didn't find X anywhere. Cache the known absence of X. | |
10736 | ac_cv_have_x="have_x=no" | |
10737 | else | |
10738 | # Record where we found X for the cache. | |
10739 | ac_cv_have_x="have_x=yes \ | |
10740 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10741 | fi | |
10742 | fi | |
10743 | fi | |
10744 | eval "$ac_cv_have_x" | |
10745 | fi # $with_x != no | |
10746 | ||
10747 | if test "$have_x" != yes; then | |
10748 | echo "$ac_t""$have_x" 1>&6 | |
10749 | no_x=yes | |
10750 | else | |
10751 | # If each of the values was on the command line, it overrides each guess. | |
10752 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10753 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10754 | # Update the cache value to reflect the command line values. | |
10755 | ac_cv_have_x="have_x=yes \ | |
10756 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10757 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10758 | fi | |
10759 | ||
10760 | ||
9cc52bde MK |
10761 | # Check whether we should enable the TUI, but only do so if we really |
10762 | # can. | |
10763 | if test x"$enable_tui" = xyes; then | |
10764 | if test -d $srcdir/tui; then | |
10765 | if test "$ac_cv_search_waddstr" != no; then | |
10766 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
10767 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
10768 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
10769 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
10770 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
10771 | CONFIG_ALL="${CONFIG_ALL} all-tui" | |
10772 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
10773 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
10774 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
10775 | else | |
10776 | echo "configure: warning: no enhanced curses library found; disabling TUI" 1>&2 | |
10777 | fi | |
10778 | fi | |
10779 | fi | |
10780 | ||
7a292a7a SS |
10781 | # Unlike the sim directory, whether a simulator is linked is controlled by |
10782 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10783 | # This code just checks for a few cases where we'd like to ignore those | |
10784 | # definitions, even when they're present in the '.mt' file. These cases | |
10785 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10786 | # not part of the source tree. |
7a292a7a SS |
10787 | # |
10788 | # Check whether --enable-sim or --disable-sim was given. | |
10789 | if test "${enable_sim+set}" = set; then | |
10790 | enableval="$enable_sim" | |
10791 | echo "enable_sim = $enable_sim"; | |
10792 | echo "enableval = ${enableval}"; | |
10793 | case "${enableval}" in | |
10794 | yes) ignore_sim=false ;; | |
10795 | no) ignore_sim=true ;; | |
10796 | *) ignore_sim=false ;; | |
10797 | esac | |
10798 | else | |
10799 | ignore_sim=false | |
10800 | fi | |
10801 | ||
10802 | ||
10803 | if test ! -d "${srcdir}/../sim"; then | |
10804 | ignore_sim=true | |
10805 | fi | |
10806 | ||
10807 | if test "${ignore_sim}" = "true"; then | |
10808 | IGNORE_SIM="SIM=" | |
10809 | IGNORE_SIM_OBS="SIM_OBS=" | |
10810 | else | |
10811 | IGNORE_SIM="" | |
10812 | IGNORE_SIM_OBS="" | |
10813 | cat >> confdefs.h <<\EOF | |
10814 | #define WITH_SIM 1 | |
10815 | EOF | |
10816 | ||
10817 | fi | |
10818 | ||
10819 | ||
10820 | ||
c906108c SS |
10821 | |
10822 | ||
10823 | ||
10824 | ||
10825 | ||
10826 | ||
dfcd3bfb | 10827 | |
e56ac5c3 AC |
10828 | |
10829 | ||
b3a90332 AC |
10830 | |
10831 | ||
c35f4ffc AC |
10832 | # List of host floatformats. |
10833 | cat >> confdefs.h <<EOF | |
10834 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format | |
10835 | EOF | |
10836 | ||
10837 | cat >> confdefs.h <<EOF | |
10838 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format | |
10839 | EOF | |
10840 | ||
10841 | cat >> confdefs.h <<EOF | |
10842 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format | |
10843 | EOF | |
10844 | ||
10845 | ||
c906108c SS |
10846 | # target_subdir is used by the testsuite to find the target libraries. |
10847 | target_subdir= | |
10848 | if test "${host}" != "${target}"; then | |
10849 | target_subdir="${target_alias}/" | |
10850 | fi | |
10851 | ||
10852 | ||
10853 | frags= | |
0dad8a66 MK |
10854 | if test "${target}" = "${host}"; then |
10855 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10856 | if test ! -f ${host_makefile_frag}; then | |
10857 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10858 | fi | |
10859 | frags="$frags $host_makefile_frag" | |
10860 | else | |
10861 | host_makefile_frag=/dev/null | |
c906108c | 10862 | fi |
c906108c SS |
10863 | |
10864 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10865 | if test ! -f ${target_makefile_frag}; then | |
0dad8a66 | 10866 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } |
c906108c SS |
10867 | fi |
10868 | frags="$frags $target_makefile_frag" | |
10869 | ||
10870 | ||
10871 | ||
10872 | ||
10873 | ||
10874 | hostfile=`sed -n ' | |
10875 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10876 | ' ${host_makefile_frag}` | |
10877 | ||
10878 | targetfile=`sed -n ' | |
2c0fc042 | 10879 | s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p |
c906108c SS |
10880 | ' ${target_makefile_frag}` |
10881 | ||
c906108c | 10882 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10883 | # We pick this up from the host configuration file (.mh) because we |
10884 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10885 | nativefile=`sed -n ' |
10886 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10887 | ' ${host_makefile_frag}` | |
c906108c SS |
10888 | fi |
10889 | ||
10890 | ||
b00a8037 DJ |
10891 | if test x"${gdb_osabi}" != x ; then |
10892 | cat >> confdefs.h <<EOF | |
10893 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10894 | EOF | |
10895 | ||
10896 | fi | |
10897 | ||
8dcde887 MK |
10898 | # Enable multi-ice-gdb-server. |
10899 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10900 | if test "${enable_multi_ice+set}" = set; then | |
10901 | enableval="$enable_multi_ice" | |
10902 | case $enableval in | |
10903 | yes | no) | |
10904 | ;; | |
10905 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10906 | esac | |
96baa820 JM |
10907 | fi |
10908 | ||
8dcde887 MK |
10909 | if test "x$enable_multi_ice" = xyes; then |
10910 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10911 | fi |
10912 | ||
8dcde887 MK |
10913 | # We only build gdbserver automatically if host and target are the same. |
10914 | if test "x$target" = "x$host"; then | |
10915 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
0bbc026e | 10916 | echo "configure:10917: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10917 | if test "x$build_gdbserver" = xyes; then |
10918 | configdirs="$configdirs gdbserver" | |
10919 | echo "$ac_t""yes" 1>&6 | |
10920 | else | |
10921 | echo "$ac_t""no" 1>&6 | |
10922 | fi | |
10923 | fi | |
10924 | ||
10925 | subdirs="doc testsuite $configdirs" | |
10926 | ||
96baa820 | 10927 | |
2c0fc042 AC |
10928 | # If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or |
10929 | # nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link | |
10930 | # to an empty version. | |
c906108c SS |
10931 | |
10932 | files= | |
10933 | links= | |
5a2402b8 | 10934 | |
c906108c | 10935 | rm -f xm.h |
5a2402b8 | 10936 | xm_h="" |
c906108c | 10937 | if test "${hostfile}" != ""; then |
5a2402b8 | 10938 | xm_h=xm.h |
0f475e27 AC |
10939 | case "${hostfile}" in |
10940 | xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;; | |
10941 | * ) GDB_XM_FILE="${hostfile}" | |
10942 | esac | |
5a2402b8 AC |
10943 | files="${files} ${GDB_XM_FILE}" |
10944 | links="${links} xm.h" | |
10945 | cat >> confdefs.h <<EOF | |
b78960be | 10946 | #define GDB_XM_FILE "${GDB_XM_FILE}" |
5a2402b8 AC |
10947 | EOF |
10948 | ||
c906108c | 10949 | fi |
5a2402b8 AC |
10950 | |
10951 | ||
c906108c | 10952 | rm -f tm.h |
5a2402b8 | 10953 | tm_h="" |
c906108c | 10954 | if test "${targetfile}" != ""; then |
5a2402b8 | 10955 | tm_h=tm.h |
0f475e27 | 10956 | case "${targetfile}" in |
b8c4aece | 10957 | tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;; |
0f475e27 AC |
10958 | * ) GDB_TM_FILE="${targetfile}" |
10959 | esac | |
5a2402b8 AC |
10960 | files="${files} ${GDB_TM_FILE}" |
10961 | links="${links} tm.h" | |
10962 | cat >> confdefs.h <<EOF | |
b78960be | 10963 | #define GDB_TM_FILE "${GDB_TM_FILE}" |
5a2402b8 AC |
10964 | EOF |
10965 | ||
c906108c | 10966 | fi |
5a2402b8 AC |
10967 | |
10968 | ||
c906108c | 10969 | rm -f nm.h |
5a2402b8 | 10970 | nm_h="" |
c906108c | 10971 | if test "${nativefile}" != ""; then |
5a2402b8 | 10972 | nm_h=nm.h |
0f475e27 AC |
10973 | case "${nativefile}" in |
10974 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
10975 | * ) GDB_NM_FILE="${nativefile}" | |
10976 | esac | |
5a2402b8 AC |
10977 | files="${files} ${GDB_NM_FILE}" |
10978 | links="${links} nm.h" | |
10979 | cat >> confdefs.h <<EOF | |
b78960be | 10980 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
5a2402b8 AC |
10981 | EOF |
10982 | ||
c906108c | 10983 | fi |
5a2402b8 AC |
10984 | |
10985 | ||
c906108c SS |
10986 | |
10987 | ||
10988 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
0bbc026e | 10989 | echo "configure:10990: checking for Cygwin environment" >&5 |
c906108c SS |
10990 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10991 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10992 | else | |
10993 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 10994 | #line 10995 "configure" |
c906108c SS |
10995 | #include "confdefs.h" |
10996 | ||
10997 | int main() { | |
10998 | ||
10999 | #ifndef __CYGWIN__ | |
11000 | #define __CYGWIN__ __CYGWIN32__ | |
11001 | #endif | |
11002 | return __CYGWIN__; | |
11003 | ; return 0; } | |
11004 | EOF | |
0bbc026e | 11005 | if { (eval echo configure:11006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
11006 | rm -rf conftest* |
11007 | ac_cv_cygwin=yes | |
11008 | else | |
11009 | echo "configure: failed program was:" >&5 | |
11010 | cat conftest.$ac_ext >&5 | |
11011 | rm -rf conftest* | |
11012 | ac_cv_cygwin=no | |
11013 | fi | |
11014 | rm -f conftest* | |
11015 | rm -f conftest* | |
11016 | fi | |
11017 | ||
11018 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
11019 | CYGWIN= | |
11020 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
11021 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
0bbc026e | 11022 | echo "configure:11023: checking for mingw32 environment" >&5 |
c906108c SS |
11023 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
11024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
11025 | else | |
11026 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 11027 | #line 11028 "configure" |
c906108c SS |
11028 | #include "confdefs.h" |
11029 | ||
11030 | int main() { | |
11031 | return __MINGW32__; | |
11032 | ; return 0; } | |
11033 | EOF | |
0bbc026e | 11034 | if { (eval echo configure:11035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
11035 | rm -rf conftest* |
11036 | ac_cv_mingw32=yes | |
11037 | else | |
11038 | echo "configure: failed program was:" >&5 | |
11039 | cat conftest.$ac_ext >&5 | |
11040 | rm -rf conftest* | |
11041 | ac_cv_mingw32=no | |
11042 | fi | |
11043 | rm -f conftest* | |
11044 | rm -f conftest* | |
11045 | fi | |
11046 | ||
11047 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
11048 | MINGW32= | |
11049 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
11050 | ||
11051 | ||
11052 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
0bbc026e | 11053 | echo "configure:11054: checking for executable suffix" >&5 |
c906108c SS |
11054 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
11055 | echo $ac_n "(cached) $ac_c" 1>&6 | |
11056 | else | |
11057 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
11058 | ac_cv_exeext=.exe | |
11059 | else | |
11060 | rm -f conftest* | |
11061 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
11062 | ac_cv_exeext= | |
0bbc026e | 11063 | if { (eval echo configure:11064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
11064 | for file in conftest.*; do |
11065 | case $file in | |
0bbc026e | 11066 | *.c | *.o | *.obj) ;; |
c906108c SS |
11067 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
11068 | esac | |
11069 | done | |
11070 | else | |
11071 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
11072 | fi | |
11073 | rm -f conftest* | |
11074 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
11075 | fi | |
11076 | fi | |
11077 | ||
11078 | EXEEXT="" | |
11079 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
11080 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
11081 | ac_exeext=$EXEEXT | |
11082 | ||
11083 | ||
234b45d4 KB |
11084 | |
11085 | cat >> confdefs.h <<\EOF | |
11086 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
11087 | EOF | |
11088 | ||
11089 | ||
11090 | ||
11091 | ||
11092 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
11093 | if test "${with_libiconv_prefix+set}" = set; then | |
11094 | withval="$with_libiconv_prefix" | |
11095 | ||
11096 | for dir in `echo "$withval" | tr : ' '`; do | |
11097 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
11098 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
11099 | done | |
11100 | ||
11101 | fi | |
11102 | ||
11103 | ||
11104 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
0bbc026e | 11105 | echo "configure:11106: checking for iconv" >&5 |
234b45d4 KB |
11106 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
11107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
11108 | else | |
11109 | ||
11110 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
11111 | am_cv_lib_iconv=no | |
11112 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 11113 | #line 11114 "configure" |
234b45d4 KB |
11114 | #include "confdefs.h" |
11115 | #include <stdlib.h> | |
11116 | #include <iconv.h> | |
11117 | int main() { | |
11118 | iconv_t cd = iconv_open("",""); | |
11119 | iconv(cd,NULL,NULL,NULL,NULL); | |
11120 | iconv_close(cd); | |
11121 | ; return 0; } | |
11122 | EOF | |
0bbc026e | 11123 | if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
11124 | rm -rf conftest* |
11125 | am_cv_func_iconv=yes | |
11126 | else | |
11127 | echo "configure: failed program was:" >&5 | |
11128 | cat conftest.$ac_ext >&5 | |
11129 | fi | |
11130 | rm -f conftest* | |
11131 | if test "$am_cv_func_iconv" != yes; then | |
11132 | am_save_LIBS="$LIBS" | |
11133 | LIBS="$LIBS -liconv" | |
11134 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 11135 | #line 11136 "configure" |
234b45d4 KB |
11136 | #include "confdefs.h" |
11137 | #include <stdlib.h> | |
11138 | #include <iconv.h> | |
11139 | int main() { | |
11140 | iconv_t cd = iconv_open("",""); | |
11141 | iconv(cd,NULL,NULL,NULL,NULL); | |
11142 | iconv_close(cd); | |
11143 | ; return 0; } | |
11144 | EOF | |
0bbc026e | 11145 | if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
11146 | rm -rf conftest* |
11147 | am_cv_lib_iconv=yes | |
11148 | am_cv_func_iconv=yes | |
11149 | else | |
11150 | echo "configure: failed program was:" >&5 | |
11151 | cat conftest.$ac_ext >&5 | |
11152 | fi | |
11153 | rm -f conftest* | |
11154 | LIBS="$am_save_LIBS" | |
11155 | fi | |
11156 | ||
11157 | fi | |
11158 | ||
11159 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
11160 | if test "$am_cv_func_iconv" = yes; then | |
11161 | cat >> confdefs.h <<\EOF | |
11162 | #define HAVE_ICONV 1 | |
11163 | EOF | |
11164 | ||
11165 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
0bbc026e | 11166 | echo "configure:11167: checking for iconv declaration" >&5 |
234b45d4 KB |
11167 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
11168 | echo $ac_n "(cached) $ac_c" 1>&6 | |
11169 | else | |
11170 | ||
11171 | cat > conftest.$ac_ext <<EOF | |
0bbc026e | 11172 | #line 11173 "configure" |
234b45d4 KB |
11173 | #include "confdefs.h" |
11174 | ||
11175 | #include <stdlib.h> | |
11176 | #include <iconv.h> | |
11177 | extern | |
11178 | #ifdef __cplusplus | |
11179 | "C" | |
11180 | #endif | |
11181 | #if defined(__STDC__) || defined(__cplusplus) | |
11182 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11183 | #else | |
11184 | size_t iconv(); | |
11185 | #endif | |
11186 | ||
11187 | int main() { | |
11188 | ||
11189 | ; return 0; } | |
11190 | EOF | |
0bbc026e | 11191 | if { (eval echo configure:11192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
11192 | rm -rf conftest* |
11193 | am_cv_proto_iconv_arg1="" | |
11194 | else | |
11195 | echo "configure: failed program was:" >&5 | |
11196 | cat conftest.$ac_ext >&5 | |
11197 | rm -rf conftest* | |
11198 | am_cv_proto_iconv_arg1="const" | |
11199 | fi | |
11200 | rm -f conftest* | |
11201 | 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);" | |
11202 | fi | |
11203 | ||
11204 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
11205 | echo "$ac_t""${ac_t:- | |
11206 | }$am_cv_proto_iconv" 1>&6 | |
11207 | cat >> confdefs.h <<EOF | |
11208 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
11209 | EOF | |
11210 | ||
11211 | fi | |
11212 | LIBICONV= | |
11213 | if test "$am_cv_lib_iconv" = yes; then | |
11214 | LIBICONV="-liconv" | |
11215 | fi | |
11216 | ||
11217 | ||
11218 | ||
c906108c SS |
11219 | trap '' 1 2 15 |
11220 | cat > confcache <<\EOF | |
11221 | # This file is a shell script that caches the results of configure | |
11222 | # tests run on this system so they can be shared between configure | |
11223 | # scripts and configure runs. It is not useful on other systems. | |
11224 | # If it contains results you don't want to keep, you may remove or edit it. | |
11225 | # | |
11226 | # By default, configure uses ./config.cache as the cache file, | |
11227 | # creating it if it does not exist already. You can give configure | |
11228 | # the --cache-file=FILE option to use a different cache file; that is | |
11229 | # what configure does when it calls configure scripts in | |
11230 | # subdirectories, so they share the cache. | |
11231 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
11232 | # config.status only pays attention to the cache file if you give it the | |
11233 | # --recheck option to rerun configure. | |
11234 | # | |
11235 | EOF | |
11236 | # The following way of writing the cache mishandles newlines in values, | |
11237 | # but we know of no workaround that is simple, portable, and efficient. | |
11238 | # So, don't put newlines in cache variables' values. | |
11239 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
11240 | # and sets the high bit in the cache file unless we assign to the vars. | |
11241 | (set) 2>&1 | | |
11242 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
11243 | *ac_space=\ *) | |
11244 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
11245 | # turns \\\\ into \\, and sed turns \\ into \). | |
11246 | sed -n \ | |
11247 | -e "s/'/'\\\\''/g" \ | |
11248 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
11249 | ;; | |
11250 | *) | |
11251 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
11252 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
11253 | ;; | |
11254 | esac >> confcache | |
11255 | if cmp -s $cache_file confcache; then | |
11256 | : | |
11257 | else | |
11258 | if test -w $cache_file; then | |
11259 | echo "updating cache $cache_file" | |
11260 | cat confcache > $cache_file | |
11261 | else | |
11262 | echo "not updating unwritable cache $cache_file" | |
11263 | fi | |
11264 | fi | |
11265 | rm -f confcache | |
11266 | ||
11267 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
11268 | ||
11269 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
11270 | # Let make expand exec_prefix. | |
11271 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
11272 | ||
11273 | # Any assignment to VPATH causes Sun make to only execute | |
11274 | # the first set of double-colon rules, so remove it if not needed. | |
11275 | # If there is a colon in the path, we need to keep it. | |
11276 | if test "x$srcdir" = x.; then | |
11277 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
11278 | fi | |
11279 | ||
11280 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
11281 | ||
11282 | DEFS=-DHAVE_CONFIG_H | |
11283 | ||
11284 | # Without the "./", some shells look in PATH for config.status. | |
11285 | : ${CONFIG_STATUS=./config.status} | |
11286 | ||
11287 | echo creating $CONFIG_STATUS | |
11288 | rm -f $CONFIG_STATUS | |
11289 | cat > $CONFIG_STATUS <<EOF | |
11290 | #! /bin/sh | |
11291 | # Generated automatically by configure. | |
11292 | # Run this file to recreate the current configuration. | |
11293 | # This directory was configured as follows, | |
11294 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
11295 | # | |
11296 | # $0 $ac_configure_args | |
11297 | # | |
11298 | # Compiler output produced by configure, useful for debugging | |
11299 | # configure, is in ./config.log if it exists. | |
11300 | ||
11301 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
11302 | for ac_option | |
11303 | do | |
11304 | case "\$ac_option" in | |
11305 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
11306 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
11307 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
11308 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
11309 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
11310 | exit 0 ;; | |
11311 | -help | --help | --hel | --he | --h) | |
11312 | echo "\$ac_cs_usage"; exit 0 ;; | |
11313 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
11314 | esac | |
11315 | done | |
11316 | ||
11317 | ac_given_srcdir=$srcdir | |
11318 | ac_given_INSTALL="$INSTALL" | |
11319 | ||
ed952ac5 | 11320 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
11321 | EOF |
11322 | cat >> $CONFIG_STATUS <<EOF | |
11323 | ||
11324 | # Protect against being on the right side of a sed subst in config.status. | |
11325 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
11326 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
11327 | $ac_vpsub | |
11328 | $extrasub | |
11329 | s%@SHELL@%$SHELL%g | |
11330 | s%@CFLAGS@%$CFLAGS%g | |
11331 | s%@CPPFLAGS@%$CPPFLAGS%g | |
11332 | s%@CXXFLAGS@%$CXXFLAGS%g | |
11333 | s%@FFLAGS@%$FFLAGS%g | |
11334 | s%@DEFS@%$DEFS%g | |
11335 | s%@LDFLAGS@%$LDFLAGS%g | |
11336 | s%@LIBS@%$LIBS%g | |
11337 | s%@exec_prefix@%$exec_prefix%g | |
11338 | s%@prefix@%$prefix%g | |
11339 | s%@program_transform_name@%$program_transform_name%g | |
11340 | s%@bindir@%$bindir%g | |
11341 | s%@sbindir@%$sbindir%g | |
11342 | s%@libexecdir@%$libexecdir%g | |
11343 | s%@datadir@%$datadir%g | |
11344 | s%@sysconfdir@%$sysconfdir%g | |
11345 | s%@sharedstatedir@%$sharedstatedir%g | |
11346 | s%@localstatedir@%$localstatedir%g | |
11347 | s%@libdir@%$libdir%g | |
11348 | s%@includedir@%$includedir%g | |
11349 | s%@oldincludedir@%$oldincludedir%g | |
11350 | s%@infodir@%$infodir%g | |
11351 | s%@mandir@%$mandir%g | |
413ccac7 AC |
11352 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
11353 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
11354 | s%@MAINT@%$MAINT%g | |
c906108c SS |
11355 | s%@CC@%$CC%g |
11356 | s%@CPP@%$CPP%g | |
11357 | s%@host@%$host%g | |
11358 | s%@host_alias@%$host_alias%g | |
11359 | s%@host_cpu@%$host_cpu%g | |
11360 | s%@host_vendor@%$host_vendor%g | |
11361 | s%@host_os@%$host_os%g | |
11362 | s%@target@%$target%g | |
11363 | s%@target_alias@%$target_alias%g | |
11364 | s%@target_cpu@%$target_cpu%g | |
11365 | s%@target_vendor@%$target_vendor%g | |
11366 | s%@target_os@%$target_os%g | |
11367 | s%@build@%$build%g | |
11368 | s%@build_alias@%$build_alias%g | |
11369 | s%@build_cpu@%$build_cpu%g | |
11370 | s%@build_vendor@%$build_vendor%g | |
11371 | s%@build_os@%$build_os%g | |
c906108c | 11372 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 11373 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
11374 | s%@ALLOCA@%$ALLOCA%g |
11375 | s%@USE_NLS@%$USE_NLS%g | |
11376 | s%@MSGFMT@%$MSGFMT%g | |
11377 | s%@GMSGFMT@%$GMSGFMT%g | |
11378 | s%@XGETTEXT@%$XGETTEXT%g | |
11379 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
11380 | s%@CATALOGS@%$CATALOGS%g | |
11381 | s%@CATOBJEXT@%$CATOBJEXT%g | |
11382 | s%@DATADIRNAME@%$DATADIRNAME%g | |
11383 | s%@GMOFILES@%$GMOFILES%g | |
11384 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
11385 | s%@INTLDEPS@%$INTLDEPS%g | |
11386 | s%@INTLLIBS@%$INTLLIBS%g | |
11387 | s%@INTLOBJS@%$INTLOBJS%g | |
11388 | s%@POFILES@%$POFILES%g | |
11389 | s%@POSUB@%$POSUB%g | |
11390 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
11391 | s%@GT_NO@%$GT_NO%g | |
11392 | s%@GT_YES@%$GT_YES%g | |
11393 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
11394 | s%@l@%$l%g | |
ddc9cd0f AC |
11395 | s%@localedir@%$localedir%g |
11396 | s%@PACKAGE@%$PACKAGE%g | |
8dcde887 | 11397 | s%@subdirs@%$subdirs%g |
7a292a7a | 11398 | s%@AWK@%$AWK%g |
c906108c SS |
11399 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
11400 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
11401 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
11402 | s%@LN_S@%$LN_S%g |
11403 | s%@YACC@%$YACC%g | |
c906108c | 11404 | s%@AR@%$AR%g |
95ca63c4 CF |
11405 | s%@DLLTOOL@%$DLLTOOL%g |
11406 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 11407 | s%@MIG@%$MIG%g |
c906108c | 11408 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
11409 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
11410 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 11411 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 11412 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
aff38e61 | 11413 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 11414 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
11415 | s%@LIBGUI@%$LIBGUI%g |
11416 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
11417 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
11418 | s%@TCL_VERSION@%$TCL_VERSION%g | |
11419 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
11420 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
11421 | s%@TCL_CC@%$TCL_CC%g | |
11422 | s%@TCL_DEFS@%$TCL_DEFS%g | |
11423 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
11424 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
11425 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
11426 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
11427 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
11428 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
11429 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 11430 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
11431 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
11432 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
11433 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
11434 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
11435 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
11436 | s%@TK_VERSION@%$TK_VERSION%g | |
11437 | s%@TK_DEFS@%$TK_DEFS%g | |
11438 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
11439 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
11440 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
11441 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
11442 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
11443 | s%@TCLHDIR@%$TCLHDIR%g | |
11444 | s%@TKHDIR@%$TKHDIR%g | |
11445 | s%@ITCLHDIR@%$ITCLHDIR%g | |
11446 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
11447 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
11448 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
11449 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
11450 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
11451 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
11452 | s%@ITK_VERSION@%$ITK_VERSION%g | |
11453 | s%@ITK_DEFS@%$ITK_DEFS%g | |
11454 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
11455 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
11456 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
11457 | s%@X_CFLAGS@%$X_CFLAGS%g |
11458 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
11459 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
11460 | s%@TCL_DEPS@%$TCL_DEPS%g |
11461 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
11462 | s%@ITCLLIB@%$ITCLLIB%g |
11463 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
11464 | s%@ITKLIB@%$ITKLIB%g | |
11465 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
11466 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
11467 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 11468 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
11469 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
11470 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 11471 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 11472 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c SS |
11473 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
11474 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
11475 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
b3a90332 AC |
11476 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
11477 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
11478 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
11479 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
11480 | s%@target_subdir@%$target_subdir%g |
11481 | /@host_makefile_frag@/r $host_makefile_frag | |
11482 | s%@host_makefile_frag@%%g | |
11483 | /@target_makefile_frag@/r $target_makefile_frag | |
11484 | s%@target_makefile_frag@%%g | |
11485 | s%@frags@%$frags%g | |
5a2402b8 AC |
11486 | s%@xm_h@%$xm_h%g |
11487 | s%@tm_h@%$tm_h%g | |
11488 | s%@nm_h@%$nm_h%g | |
c906108c | 11489 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 11490 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
11491 | |
11492 | CEOF | |
11493 | EOF | |
11494 | ||
11495 | cat >> $CONFIG_STATUS <<\EOF | |
11496 | ||
11497 | # Split the substitutions into bite-sized pieces for seds with | |
11498 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 11499 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
11500 | ac_file=1 # Number of current file. |
11501 | ac_beg=1 # First line for current file. | |
11502 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
11503 | ac_more_lines=: | |
11504 | ac_sed_cmds="" | |
11505 | while $ac_more_lines; do | |
11506 | if test $ac_beg -gt 1; then | |
11507 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
11508 | else | |
11509 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
11510 | fi | |
11511 | if test ! -s conftest.s$ac_file; then | |
11512 | ac_more_lines=false | |
11513 | rm -f conftest.s$ac_file | |
11514 | else | |
11515 | if test -z "$ac_sed_cmds"; then | |
11516 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
11517 | else | |
11518 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
11519 | fi | |
11520 | ac_file=`expr $ac_file + 1` | |
11521 | ac_beg=$ac_end | |
11522 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
11523 | fi | |
11524 | done | |
11525 | if test -z "$ac_sed_cmds"; then | |
11526 | ac_sed_cmds=cat | |
11527 | fi | |
11528 | EOF | |
11529 | ||
11530 | cat >> $CONFIG_STATUS <<EOF | |
11531 | ||
ed952ac5 | 11532 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
11533 | EOF |
11534 | cat >> $CONFIG_STATUS <<\EOF | |
11535 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
11536 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11537 | case "$ac_file" in | |
11538 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11539 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11540 | *) ac_file_in="${ac_file}.in" ;; | |
11541 | esac | |
11542 | ||
11543 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
11544 | ||
11545 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11546 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11547 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11548 | # The file is in a subdirectory. | |
11549 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11550 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
11551 | # A "../" for each directory in $ac_dir_suffix. | |
11552 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
11553 | else | |
11554 | ac_dir_suffix= ac_dots= | |
11555 | fi | |
11556 | ||
11557 | case "$ac_given_srcdir" in | |
11558 | .) srcdir=. | |
11559 | if test -z "$ac_dots"; then top_srcdir=. | |
11560 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
11561 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
11562 | *) # Relative path. | |
11563 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
11564 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
11565 | esac | |
11566 | ||
11567 | case "$ac_given_INSTALL" in | |
11568 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11569 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11570 | esac | |
11571 | ||
11572 | echo creating "$ac_file" | |
11573 | rm -f "$ac_file" | |
11574 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
11575 | case "$ac_file" in | |
11576 | *Makefile*) ac_comsub="1i\\ | |
11577 | # $configure_input" ;; | |
11578 | *) ac_comsub= ;; | |
11579 | esac | |
11580 | ||
11581 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11582 | sed -e "$ac_comsub | |
11583 | s%@configure_input@%$configure_input%g | |
11584 | s%@srcdir@%$srcdir%g | |
11585 | s%@top_srcdir@%$top_srcdir%g | |
11586 | s%@INSTALL@%$INSTALL%g | |
11587 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
11588 | fi; done | |
11589 | rm -f conftest.s* | |
11590 | ||
11591 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
11592 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
11593 | # | |
11594 | # ac_d sets the value in "#define NAME VALUE" lines. | |
11595 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
11596 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
11597 | ac_dC='\3' | |
11598 | ac_dD='%g' | |
11599 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
11600 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11601 | ac_uB='\([ ]\)%\1#\2define\3' | |
11602 | ac_uC=' ' | |
11603 | ac_uD='\4%g' | |
11604 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
11605 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11606 | ac_eB='$%\1#\2define\3' | |
11607 | ac_eC=' ' | |
11608 | ac_eD='%g' | |
11609 | ||
11610 | if test "${CONFIG_HEADERS+set}" != set; then | |
11611 | EOF | |
11612 | cat >> $CONFIG_STATUS <<EOF | |
11613 | CONFIG_HEADERS="config.h:config.in" | |
11614 | EOF | |
11615 | cat >> $CONFIG_STATUS <<\EOF | |
11616 | fi | |
11617 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
11618 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11619 | case "$ac_file" in | |
11620 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11621 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11622 | *) ac_file_in="${ac_file}.in" ;; | |
11623 | esac | |
11624 | ||
11625 | echo creating $ac_file | |
11626 | ||
11627 | rm -f conftest.frag conftest.in conftest.out | |
11628 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11629 | cat $ac_file_inputs > conftest.in | |
11630 | ||
11631 | EOF | |
11632 | ||
11633 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
11634 | # the proper values into config.h.in to produce config.h. And first: | |
11635 | # Protect against being on the right side of a sed subst in config.status. | |
11636 | # Protect against being in an unquoted here document in config.status. | |
11637 | rm -f conftest.vals | |
11638 | cat > conftest.hdr <<\EOF | |
11639 | s/[\\&%]/\\&/g | |
11640 | s%[\\$`]%\\&%g | |
11641 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
11642 | s%ac_d%ac_u%gp | |
11643 | s%ac_u%ac_e%gp | |
11644 | EOF | |
11645 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
11646 | rm -f conftest.hdr | |
11647 | ||
11648 | # This sed command replaces #undef with comments. This is necessary, for | |
11649 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
11650 | # on some systems where configure will not decide to define it. | |
11651 | cat >> conftest.vals <<\EOF | |
11652 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
11653 | EOF | |
11654 | ||
11655 | # Break up conftest.vals because some shells have a limit on | |
11656 | # the size of here documents, and old seds have small limits too. | |
11657 | ||
11658 | rm -f conftest.tail | |
11659 | while : | |
11660 | do | |
11661 | ac_lines=`grep -c . conftest.vals` | |
11662 | # grep -c gives empty output for an empty file on some AIX systems. | |
11663 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
11664 | # Write a limited-size here document to conftest.frag. | |
11665 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
11666 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
11667 | echo 'CEOF | |
11668 | sed -f conftest.frag conftest.in > conftest.out | |
11669 | rm -f conftest.in | |
11670 | mv conftest.out conftest.in | |
11671 | ' >> $CONFIG_STATUS | |
11672 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
11673 | rm -f conftest.vals | |
11674 | mv conftest.tail conftest.vals | |
11675 | done | |
11676 | rm -f conftest.vals | |
11677 | ||
11678 | cat >> $CONFIG_STATUS <<\EOF | |
11679 | rm -f conftest.frag conftest.h | |
11680 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11681 | cat conftest.in >> conftest.h | |
11682 | rm -f conftest.in | |
11683 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11684 | echo "$ac_file is unchanged" | |
11685 | rm -f conftest.h | |
11686 | else | |
11687 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11688 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11689 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11690 | # The file is in a subdirectory. | |
11691 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11692 | fi | |
11693 | rm -f $ac_file | |
11694 | mv conftest.h $ac_file | |
11695 | fi | |
11696 | fi; done | |
11697 | ||
11698 | EOF | |
11699 | ||
11700 | cat >> $CONFIG_STATUS <<EOF | |
11701 | ac_sources="$files" | |
11702 | ac_dests="$links" | |
11703 | EOF | |
11704 | ||
11705 | cat >> $CONFIG_STATUS <<\EOF | |
11706 | srcdir=$ac_given_srcdir | |
11707 | while test -n "$ac_sources"; do | |
11708 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11709 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11710 | ||
11711 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11712 | ||
11713 | if test ! -r $srcdir/$ac_source; then | |
11714 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11715 | fi | |
11716 | rm -f $ac_dest | |
11717 | ||
11718 | # Make relative symlinks. | |
11719 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11720 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11721 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11722 | # The dest file is in a subdirectory. | |
11723 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11724 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11725 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11726 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11727 | else | |
11728 | ac_dest_dir_suffix= ac_dots= | |
11729 | fi | |
11730 | ||
11731 | case "$srcdir" in | |
11732 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11733 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11734 | esac | |
11735 | ||
11736 | # Make a symlink if possible; otherwise try a hard link. | |
11737 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11738 | ln $srcdir/$ac_source $ac_dest; then : | |
11739 | else | |
11740 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11741 | fi | |
11742 | done | |
11743 | EOF | |
11744 | cat >> $CONFIG_STATUS <<EOF | |
11745 | ||
11746 | gdb_host_cpu=$gdb_host_cpu | |
11747 | gdb_target_cpu=$gdb_target_cpu | |
11748 | nativefile=$nativefile | |
11749 | ||
11750 | EOF | |
11751 | cat >> $CONFIG_STATUS <<\EOF | |
11752 | ||
c906108c | 11753 | |
2c0fc042 | 11754 | sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, |
c906108c SS |
11755 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, |
11756 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11757 | mv -f Makefile.tmp Makefile | |
11758 | ||
2acceee2 | 11759 | |
c906108c SS |
11760 | case x$CONFIG_HEADERS in |
11761 | xconfig.h:config.in) | |
11762 | echo > stamp-h ;; | |
11763 | esac | |
11764 | ||
11765 | exit 0 | |
11766 | EOF | |
11767 | chmod +x $CONFIG_STATUS | |
11768 | rm -fr confdefs* $ac_clean_files | |
11769 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11770 | ||
11771 | if test "$no_recursion" != yes; then | |
11772 | ||
11773 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11774 | ac_sub_configure_args= | |
11775 | ac_prev= | |
11776 | for ac_arg in $ac_configure_args; do | |
11777 | if test -n "$ac_prev"; then | |
11778 | ac_prev= | |
11779 | continue | |
11780 | fi | |
11781 | case "$ac_arg" in | |
11782 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11783 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11784 | ac_prev=cache_file ;; | |
11785 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11786 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11787 | ;; | |
11788 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11789 | ac_prev=srcdir ;; | |
11790 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11791 | ;; | |
11792 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11793 | esac | |
11794 | done | |
11795 | ||
8dcde887 | 11796 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11797 | |
11798 | # Do not complain, so a configure script can configure whichever | |
11799 | # parts of a large source tree are present. | |
11800 | if test ! -d $srcdir/$ac_config_dir; then | |
11801 | continue | |
11802 | fi | |
11803 | ||
11804 | echo configuring in $ac_config_dir | |
11805 | ||
11806 | case "$srcdir" in | |
11807 | .) ;; | |
11808 | *) | |
11809 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11810 | else | |
11811 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11812 | fi | |
11813 | ;; | |
11814 | esac | |
11815 | ||
11816 | ac_popdir=`pwd` | |
11817 | cd $ac_config_dir | |
11818 | ||
11819 | # A "../" for each directory in /$ac_config_dir. | |
11820 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11821 | ||
11822 | case "$srcdir" in | |
11823 | .) # No --srcdir option. We are building in place. | |
11824 | ac_sub_srcdir=$srcdir ;; | |
11825 | /*) # Absolute path. | |
11826 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11827 | *) # Relative path. | |
11828 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11829 | esac | |
11830 | ||
11831 | # Check for guested configure; otherwise get Cygnus style configure. | |
11832 | if test -f $ac_sub_srcdir/configure; then | |
11833 | ac_sub_configure=$ac_sub_srcdir/configure | |
11834 | elif test -f $ac_sub_srcdir/configure.in; then | |
11835 | ac_sub_configure=$ac_configure | |
11836 | else | |
11837 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11838 | ac_sub_configure= | |
11839 | fi | |
11840 | ||
11841 | # The recursion is here. | |
11842 | if test -n "$ac_sub_configure"; then | |
11843 | ||
11844 | # Make the cache file name correct relative to the subdirectory. | |
11845 | case "$cache_file" in | |
11846 | /*) ac_sub_cache_file=$cache_file ;; | |
11847 | *) # Relative path. | |
11848 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11849 | esac | |
11850 | case "$ac_given_INSTALL" in | |
11851 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11852 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11853 | esac | |
11854 | ||
11855 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11856 | # The eval makes quoting arguments work. | |
11857 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11858 | then : | |
11859 | else | |
11860 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11861 | fi | |
11862 | fi | |
11863 | ||
11864 | cd $ac_popdir | |
11865 | done | |
11866 | fi | |
11867 | ||
11868 | ||
11869 | exit 0 |