Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
5b5d99cf JB |
21 | ac_help="$ac_help |
22 | --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]" | |
627af7ea MK |
23 | ac_help="$ac_help |
24 | --disable-gdbcli disable command-line interface (CLI)" | |
25 | ac_help="$ac_help | |
26 | --disable-gdbmi disable machine-interface (MI)" | |
06825bd1 MK |
27 | ac_help="$ac_help |
28 | --enable-tui enable full-screen terminal user interface (TUI)" | |
8ee53726 | 29 | ac_help="$ac_help |
d28f9cdf | 30 | --enable-gdbtk enable gdbtk graphical user interface (GUI)" |
0e5d83e3 JJ |
31 | ac_help="$ac_help |
32 | --with-libunwind Use libunwind frame unwinding support" | |
d28f9cdf DJ |
33 | ac_help="$ac_help |
34 | --enable-profiling enable profiling of GDB" | |
06825bd1 MK |
35 | ac_help="$ac_help |
36 | --without-included-regex don't use included regex; this is the default | |
37 | on systems with version 2 of the GNU C library | |
38 | (use with caution on other system)" | |
030292b7 DJ |
39 | ac_help="$ac_help |
40 | --with-sysroot[=DIR] Search for usr/lib et al within DIR." | |
c906108c SS |
41 | ac_help="$ac_help |
42 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
43 | ac_help="$ac_help |
44 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
7a292a7a SS |
45 | ac_help="$ac_help |
46 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
47 | ac_help="$ac_help | |
48 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-tclinclude=DIR Directory where tcl private headers are" | |
51 | ac_help="$ac_help | |
52 | --with-tkinclude=DIR Directory where tk private headers are" | |
53 | ac_help="$ac_help | |
54 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
55 | ac_help="$ac_help | |
56 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --with-x use the X Window System" | |
7a292a7a SS |
59 | ac_help="$ac_help |
60 | --enable-sim Link gdb with simulator" | |
8dcde887 MK |
61 | ac_help="$ac_help |
62 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
63 | ac_help="$ac_help |
64 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
65 | |
66 | # Initialize some variables set by options. | |
67 | # The variables have the same names as the options, with | |
68 | # dashes changed to underlines. | |
69 | build=NONE | |
70 | cache_file=./config.cache | |
71 | exec_prefix=NONE | |
72 | host=NONE | |
73 | no_create= | |
74 | nonopt=NONE | |
75 | no_recursion= | |
76 | prefix=NONE | |
77 | program_prefix=NONE | |
78 | program_suffix=NONE | |
79 | program_transform_name=s,x,x, | |
80 | silent= | |
81 | site= | |
d836ee13 | 82 | sitefile= |
c906108c SS |
83 | srcdir= |
84 | target=NONE | |
85 | verbose= | |
86 | x_includes=NONE | |
87 | x_libraries=NONE | |
88 | bindir='${exec_prefix}/bin' | |
89 | sbindir='${exec_prefix}/sbin' | |
90 | libexecdir='${exec_prefix}/libexec' | |
91 | datadir='${prefix}/share' | |
92 | sysconfdir='${prefix}/etc' | |
93 | sharedstatedir='${prefix}/com' | |
94 | localstatedir='${prefix}/var' | |
95 | libdir='${exec_prefix}/lib' | |
96 | includedir='${prefix}/include' | |
97 | oldincludedir='/usr/include' | |
98 | infodir='${prefix}/info' | |
99 | mandir='${prefix}/man' | |
100 | ||
101 | # Initialize some other variables. | |
102 | subdirs= | |
103 | MFLAGS= MAKEFLAGS= | |
104 | SHELL=${CONFIG_SHELL-/bin/sh} | |
105 | # Maximum number of lines to put in a shell here document. | |
106 | ac_max_here_lines=12 | |
107 | ||
108 | ac_prev= | |
109 | for ac_option | |
110 | do | |
111 | ||
112 | # If the previous option needs an argument, assign it. | |
113 | if test -n "$ac_prev"; then | |
114 | eval "$ac_prev=\$ac_option" | |
115 | ac_prev= | |
116 | continue | |
117 | fi | |
118 | ||
119 | case "$ac_option" in | |
120 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
121 | *) ac_optarg= ;; | |
122 | esac | |
123 | ||
124 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
125 | ||
126 | case "$ac_option" in | |
127 | ||
128 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
129 | ac_prev=bindir ;; | |
130 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
131 | bindir="$ac_optarg" ;; | |
132 | ||
133 | -build | --build | --buil | --bui | --bu) | |
134 | ac_prev=build ;; | |
135 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
136 | build="$ac_optarg" ;; | |
137 | ||
138 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
139 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
140 | ac_prev=cache_file ;; | |
141 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
142 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
143 | cache_file="$ac_optarg" ;; | |
144 | ||
145 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
146 | ac_prev=datadir ;; | |
147 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
148 | | --da=*) | |
149 | datadir="$ac_optarg" ;; | |
150 | ||
151 | -disable-* | --disable-*) | |
152 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
153 | # Reject names that are not valid shell variable names. | |
154 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
155 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
156 | fi | |
157 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
158 | eval "enable_${ac_feature}=no" ;; | |
159 | ||
160 | -enable-* | --enable-*) | |
161 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
162 | # Reject names that are not valid shell variable names. | |
163 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
164 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
165 | fi | |
166 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
167 | case "$ac_option" in | |
168 | *=*) ;; | |
169 | *) ac_optarg=yes ;; | |
170 | esac | |
171 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
172 | ||
173 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
174 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
175 | | --exec | --exe | --ex) | |
176 | ac_prev=exec_prefix ;; | |
177 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
178 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
179 | | --exec=* | --exe=* | --ex=*) | |
180 | exec_prefix="$ac_optarg" ;; | |
181 | ||
182 | -gas | --gas | --ga | --g) | |
183 | # Obsolete; use --with-gas. | |
184 | with_gas=yes ;; | |
185 | ||
186 | -help | --help | --hel | --he) | |
187 | # Omit some internal or obsolete options to make the list less imposing. | |
188 | # This message is too long to be a string in the A/UX 3.1 sh. | |
189 | cat << EOF | |
190 | Usage: configure [options] [host] | |
191 | Options: [defaults in brackets after descriptions] | |
192 | Configuration: | |
193 | --cache-file=FILE cache test results in FILE | |
194 | --help print this message | |
195 | --no-create do not create output files | |
196 | --quiet, --silent do not print \`checking...' messages | |
d836ee13 | 197 | --site-file=FILE use FILE as the site file |
c906108c SS |
198 | --version print the version of autoconf that created configure |
199 | Directory and file names: | |
200 | --prefix=PREFIX install architecture-independent files in PREFIX | |
201 | [$ac_default_prefix] | |
202 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
203 | [same as prefix] | |
204 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
205 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
206 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
207 | --datadir=DIR read-only architecture-independent data in DIR | |
208 | [PREFIX/share] | |
209 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
210 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
211 | [PREFIX/com] | |
212 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
213 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
214 | --includedir=DIR C header files in DIR [PREFIX/include] | |
215 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
216 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
217 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
218 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
219 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
220 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
221 | --program-transform-name=PROGRAM | |
222 | run sed PROGRAM on installed program names | |
223 | EOF | |
224 | cat << EOF | |
225 | Host type: | |
226 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
227 | --host=HOST configure for HOST [guessed] | |
228 | --target=TARGET configure for TARGET [TARGET=HOST] | |
229 | Features and packages: | |
230 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
231 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
232 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
233 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
234 | --x-includes=DIR X include files are in DIR | |
235 | --x-libraries=DIR X library files are in DIR | |
236 | EOF | |
237 | if test -n "$ac_help"; then | |
238 | echo "--enable and --with options recognized:$ac_help" | |
239 | fi | |
240 | exit 0 ;; | |
241 | ||
242 | -host | --host | --hos | --ho) | |
243 | ac_prev=host ;; | |
244 | -host=* | --host=* | --hos=* | --ho=*) | |
245 | host="$ac_optarg" ;; | |
246 | ||
247 | -includedir | --includedir | --includedi | --included | --include \ | |
248 | | --includ | --inclu | --incl | --inc) | |
249 | ac_prev=includedir ;; | |
250 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
251 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
252 | includedir="$ac_optarg" ;; | |
253 | ||
254 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
255 | ac_prev=infodir ;; | |
256 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
257 | infodir="$ac_optarg" ;; | |
258 | ||
259 | -libdir | --libdir | --libdi | --libd) | |
260 | ac_prev=libdir ;; | |
261 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
262 | libdir="$ac_optarg" ;; | |
263 | ||
264 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
265 | | --libexe | --libex | --libe) | |
266 | ac_prev=libexecdir ;; | |
267 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
268 | | --libexe=* | --libex=* | --libe=*) | |
269 | libexecdir="$ac_optarg" ;; | |
270 | ||
271 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
272 | | --localstate | --localstat | --localsta | --localst \ | |
273 | | --locals | --local | --loca | --loc | --lo) | |
274 | ac_prev=localstatedir ;; | |
275 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
276 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
277 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
278 | localstatedir="$ac_optarg" ;; | |
279 | ||
280 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
281 | ac_prev=mandir ;; | |
282 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
283 | mandir="$ac_optarg" ;; | |
284 | ||
285 | -nfp | --nfp | --nf) | |
286 | # Obsolete; use --without-fp. | |
287 | with_fp=no ;; | |
288 | ||
289 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
290 | | --no-cr | --no-c) | |
291 | no_create=yes ;; | |
292 | ||
293 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
294 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
295 | no_recursion=yes ;; | |
296 | ||
297 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
298 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
299 | | --oldin | --oldi | --old | --ol | --o) | |
300 | ac_prev=oldincludedir ;; | |
301 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
302 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
303 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
304 | oldincludedir="$ac_optarg" ;; | |
305 | ||
306 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
307 | ac_prev=prefix ;; | |
308 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
309 | prefix="$ac_optarg" ;; | |
310 | ||
311 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
312 | | --program-pre | --program-pr | --program-p) | |
313 | ac_prev=program_prefix ;; | |
314 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
315 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
316 | program_prefix="$ac_optarg" ;; | |
317 | ||
318 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
319 | | --program-suf | --program-su | --program-s) | |
320 | ac_prev=program_suffix ;; | |
321 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
322 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
323 | program_suffix="$ac_optarg" ;; | |
324 | ||
325 | -program-transform-name | --program-transform-name \ | |
326 | | --program-transform-nam | --program-transform-na \ | |
327 | | --program-transform-n | --program-transform- \ | |
328 | | --program-transform | --program-transfor \ | |
329 | | --program-transfo | --program-transf \ | |
330 | | --program-trans | --program-tran \ | |
331 | | --progr-tra | --program-tr | --program-t) | |
332 | ac_prev=program_transform_name ;; | |
333 | -program-transform-name=* | --program-transform-name=* \ | |
334 | | --program-transform-nam=* | --program-transform-na=* \ | |
335 | | --program-transform-n=* | --program-transform-=* \ | |
336 | | --program-transform=* | --program-transfor=* \ | |
337 | | --program-transfo=* | --program-transf=* \ | |
338 | | --program-trans=* | --program-tran=* \ | |
339 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
340 | program_transform_name="$ac_optarg" ;; | |
341 | ||
342 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
343 | | -silent | --silent | --silen | --sile | --sil) | |
344 | silent=yes ;; | |
345 | ||
346 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
347 | ac_prev=sbindir ;; | |
348 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
349 | | --sbi=* | --sb=*) | |
350 | sbindir="$ac_optarg" ;; | |
351 | ||
352 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
353 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
354 | | --sharedst | --shareds | --shared | --share | --shar \ | |
355 | | --sha | --sh) | |
356 | ac_prev=sharedstatedir ;; | |
357 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
358 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
359 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
360 | | --sha=* | --sh=*) | |
361 | sharedstatedir="$ac_optarg" ;; | |
362 | ||
363 | -site | --site | --sit) | |
364 | ac_prev=site ;; | |
365 | -site=* | --site=* | --sit=*) | |
366 | site="$ac_optarg" ;; | |
367 | ||
d836ee13 AC |
368 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
369 | ac_prev=sitefile ;; | |
370 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
371 | sitefile="$ac_optarg" ;; | |
372 | ||
c906108c SS |
373 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
374 | ac_prev=srcdir ;; | |
375 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
376 | srcdir="$ac_optarg" ;; | |
377 | ||
378 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
379 | | --syscon | --sysco | --sysc | --sys | --sy) | |
380 | ac_prev=sysconfdir ;; | |
381 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
382 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
383 | sysconfdir="$ac_optarg" ;; | |
384 | ||
385 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
386 | ac_prev=target ;; | |
387 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
388 | target="$ac_optarg" ;; | |
389 | ||
390 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
391 | verbose=yes ;; | |
392 | ||
393 | -version | --version | --versio | --versi | --vers) | |
394 | echo "configure generated by autoconf version 2.13" | |
395 | exit 0 ;; | |
396 | ||
397 | -with-* | --with-*) | |
398 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
399 | # Reject names that are not valid shell variable names. | |
400 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
401 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
402 | fi | |
403 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
404 | case "$ac_option" in | |
405 | *=*) ;; | |
406 | *) ac_optarg=yes ;; | |
407 | esac | |
408 | eval "with_${ac_package}='$ac_optarg'" ;; | |
409 | ||
410 | -without-* | --without-*) | |
411 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
412 | # Reject names that are not valid shell variable names. | |
413 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
414 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
415 | fi | |
416 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
417 | eval "with_${ac_package}=no" ;; | |
418 | ||
419 | --x) | |
420 | # Obsolete; use --with-x. | |
421 | with_x=yes ;; | |
422 | ||
423 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
424 | | --x-incl | --x-inc | --x-in | --x-i) | |
425 | ac_prev=x_includes ;; | |
426 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
427 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
428 | x_includes="$ac_optarg" ;; | |
429 | ||
430 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
431 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
432 | ac_prev=x_libraries ;; | |
433 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
434 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
435 | x_libraries="$ac_optarg" ;; | |
436 | ||
437 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
438 | ;; | |
439 | ||
440 | *) | |
441 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
442 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
443 | fi | |
444 | if test "x$nonopt" != xNONE; then | |
445 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
446 | fi | |
447 | nonopt="$ac_option" | |
448 | ;; | |
449 | ||
450 | esac | |
451 | done | |
452 | ||
453 | if test -n "$ac_prev"; then | |
454 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
455 | fi | |
456 | ||
457 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
458 | ||
459 | # File descriptor usage: | |
460 | # 0 standard input | |
461 | # 1 file creation | |
462 | # 2 errors and warnings | |
463 | # 3 some systems may open it to /dev/tty | |
464 | # 4 used on the Kubota Titan | |
465 | # 6 checking for... messages and results | |
466 | # 5 compiler messages saved in config.log | |
467 | if test "$silent" = yes; then | |
468 | exec 6>/dev/null | |
469 | else | |
470 | exec 6>&1 | |
471 | fi | |
472 | exec 5>./config.log | |
473 | ||
474 | echo "\ | |
475 | This file contains any messages produced by compilers while | |
476 | running configure, to aid debugging if configure makes a mistake. | |
477 | " 1>&5 | |
478 | ||
479 | # Strip out --no-create and --no-recursion so they do not pile up. | |
480 | # Also quote any args containing shell metacharacters. | |
481 | ac_configure_args= | |
482 | for ac_arg | |
483 | do | |
484 | case "$ac_arg" in | |
485 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
486 | | --no-cr | --no-c) ;; | |
487 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
488 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
489 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
490 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
491 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
492 | esac | |
493 | done | |
494 | ||
495 | # NLS nuisances. | |
496 | # Only set these to C if already set. These must not be set unconditionally | |
497 | # because not all systems understand e.g. LANG=C (notably SCO). | |
498 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
499 | # Non-C LC_CTYPE values break the ctype check. | |
500 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
501 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
502 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
503 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
504 | ||
505 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
506 | rm -rf conftest* confdefs.h | |
507 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
508 | echo > confdefs.h | |
509 | ||
510 | # A filename unique to this package, relative to the directory that | |
511 | # configure is in, which we can look for to find out if srcdir is correct. | |
512 | ac_unique_file=main.c | |
513 | ||
514 | # Find the source files, if location was not specified. | |
515 | if test -z "$srcdir"; then | |
516 | ac_srcdir_defaulted=yes | |
517 | # Try the directory containing this script, then its parent. | |
518 | ac_prog=$0 | |
519 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
520 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
521 | srcdir=$ac_confdir | |
522 | if test ! -r $srcdir/$ac_unique_file; then | |
523 | srcdir=.. | |
524 | fi | |
525 | else | |
526 | ac_srcdir_defaulted=no | |
527 | fi | |
528 | if test ! -r $srcdir/$ac_unique_file; then | |
529 | if test "$ac_srcdir_defaulted" = yes; then | |
530 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
531 | else | |
532 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
533 | fi | |
534 | fi | |
535 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
536 | ||
537 | # Prefer explicitly selected file to automatically selected ones. | |
d836ee13 AC |
538 | if test -z "$sitefile"; then |
539 | if test -z "$CONFIG_SITE"; then | |
540 | if test "x$prefix" != xNONE; then | |
541 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
542 | else | |
543 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
544 | fi | |
c906108c | 545 | fi |
d836ee13 AC |
546 | else |
547 | CONFIG_SITE="$sitefile" | |
c906108c SS |
548 | fi |
549 | for ac_site_file in $CONFIG_SITE; do | |
550 | if test -r "$ac_site_file"; then | |
551 | echo "loading site script $ac_site_file" | |
552 | . "$ac_site_file" | |
553 | fi | |
554 | done | |
555 | ||
556 | if test -r "$cache_file"; then | |
557 | echo "loading cache $cache_file" | |
558 | . $cache_file | |
559 | else | |
560 | echo "creating cache $cache_file" | |
561 | > $cache_file | |
562 | fi | |
563 | ||
564 | ac_ext=c | |
565 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
566 | ac_cpp='$CPP $CPPFLAGS' | |
567 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
568 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
569 | cross_compiling=$ac_cv_prog_cc_cross | |
570 | ||
571 | ac_exeext= | |
572 | ac_objext=o | |
573 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
574 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
575 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
576 | ac_n= ac_c=' | |
577 | ' ac_t=' ' | |
578 | else | |
579 | ac_n=-n ac_c= ac_t= | |
580 | fi | |
581 | else | |
582 | ac_n= ac_c='\c' ac_t= | |
583 | fi | |
584 | ||
585 | ||
586 | ||
413ccac7 | 587 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
d836ee13 | 588 | echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
589 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
590 | if test "${enable_maintainer_mode+set}" = set; then | |
591 | enableval="$enable_maintainer_mode" | |
592 | USE_MAINTAINER_MODE=$enableval | |
593 | else | |
594 | USE_MAINTAINER_MODE=no | |
595 | fi | |
596 | ||
597 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
598 | ||
599 | ||
600 | if test $USE_MAINTAINER_MODE = yes; then | |
601 | MAINTAINER_MODE_TRUE= | |
602 | MAINTAINER_MODE_FALSE='#' | |
603 | else | |
604 | MAINTAINER_MODE_TRUE='#' | |
605 | MAINTAINER_MODE_FALSE= | |
606 | fi | |
607 | MAINT=$MAINTAINER_MODE_TRUE | |
608 | ||
609 | ||
c906108c SS |
610 | |
611 | # Extract the first word of "gcc", so it can be a program name with args. | |
612 | set dummy gcc; ac_word=$2 | |
613 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 614 | echo "configure:615: checking for $ac_word" >&5 |
c906108c SS |
615 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
616 | echo $ac_n "(cached) $ac_c" 1>&6 | |
617 | else | |
618 | if test -n "$CC"; then | |
619 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
620 | else | |
621 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
622 | ac_dummy="$PATH" | |
623 | for ac_dir in $ac_dummy; do | |
624 | test -z "$ac_dir" && ac_dir=. | |
625 | if test -f $ac_dir/$ac_word; then | |
626 | ac_cv_prog_CC="gcc" | |
627 | break | |
628 | fi | |
629 | done | |
630 | IFS="$ac_save_ifs" | |
631 | fi | |
632 | fi | |
633 | CC="$ac_cv_prog_CC" | |
634 | if test -n "$CC"; then | |
635 | echo "$ac_t""$CC" 1>&6 | |
636 | else | |
637 | echo "$ac_t""no" 1>&6 | |
638 | fi | |
639 | ||
640 | if test -z "$CC"; then | |
641 | # Extract the first word of "cc", so it can be a program name with args. | |
642 | set dummy cc; ac_word=$2 | |
643 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 644 | echo "configure:645: checking for $ac_word" >&5 |
c906108c SS |
645 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
647 | else | |
648 | if test -n "$CC"; then | |
649 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
650 | else | |
651 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
652 | ac_prog_rejected=no | |
653 | ac_dummy="$PATH" | |
654 | for ac_dir in $ac_dummy; do | |
655 | test -z "$ac_dir" && ac_dir=. | |
656 | if test -f $ac_dir/$ac_word; then | |
657 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
658 | ac_prog_rejected=yes | |
659 | continue | |
660 | fi | |
661 | ac_cv_prog_CC="cc" | |
662 | break | |
663 | fi | |
664 | done | |
665 | IFS="$ac_save_ifs" | |
666 | if test $ac_prog_rejected = yes; then | |
667 | # We found a bogon in the path, so make sure we never use it. | |
668 | set dummy $ac_cv_prog_CC | |
669 | shift | |
670 | if test $# -gt 0; then | |
671 | # We chose a different compiler from the bogus one. | |
672 | # However, it has the same basename, so the bogon will be chosen | |
673 | # first if we set CC to just the basename; use the full file name. | |
674 | shift | |
675 | set dummy "$ac_dir/$ac_word" "$@" | |
676 | shift | |
677 | ac_cv_prog_CC="$@" | |
678 | fi | |
679 | fi | |
680 | fi | |
681 | fi | |
682 | CC="$ac_cv_prog_CC" | |
683 | if test -n "$CC"; then | |
684 | echo "$ac_t""$CC" 1>&6 | |
685 | else | |
686 | echo "$ac_t""no" 1>&6 | |
687 | fi | |
688 | ||
689 | if test -z "$CC"; then | |
690 | case "`uname -s`" in | |
691 | *win32* | *WIN32*) | |
692 | # Extract the first word of "cl", so it can be a program name with args. | |
693 | set dummy cl; ac_word=$2 | |
694 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 695 | echo "configure:696: checking for $ac_word" >&5 |
c906108c SS |
696 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
698 | else | |
699 | if test -n "$CC"; then | |
700 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
701 | else | |
702 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
703 | ac_dummy="$PATH" | |
704 | for ac_dir in $ac_dummy; do | |
705 | test -z "$ac_dir" && ac_dir=. | |
706 | if test -f $ac_dir/$ac_word; then | |
707 | ac_cv_prog_CC="cl" | |
708 | break | |
709 | fi | |
710 | done | |
711 | IFS="$ac_save_ifs" | |
712 | fi | |
713 | fi | |
714 | CC="$ac_cv_prog_CC" | |
715 | if test -n "$CC"; then | |
716 | echo "$ac_t""$CC" 1>&6 | |
717 | else | |
718 | echo "$ac_t""no" 1>&6 | |
719 | fi | |
720 | ;; | |
721 | esac | |
722 | fi | |
723 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
724 | fi | |
725 | ||
726 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
d836ee13 | 727 | echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
728 | |
729 | ac_ext=c | |
730 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
731 | ac_cpp='$CPP $CPPFLAGS' | |
732 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
733 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
734 | cross_compiling=$ac_cv_prog_cc_cross | |
735 | ||
736 | cat > conftest.$ac_ext << EOF | |
737 | ||
d836ee13 | 738 | #line 739 "configure" |
c906108c SS |
739 | #include "confdefs.h" |
740 | ||
741 | main(){return(0);} | |
742 | EOF | |
d836ee13 | 743 | if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
744 | ac_cv_prog_cc_works=yes |
745 | # If we can't run a trivial program, we are probably using a cross compiler. | |
746 | if (./conftest; exit) 2>/dev/null; then | |
747 | ac_cv_prog_cc_cross=no | |
748 | else | |
749 | ac_cv_prog_cc_cross=yes | |
750 | fi | |
751 | else | |
752 | echo "configure: failed program was:" >&5 | |
753 | cat conftest.$ac_ext >&5 | |
754 | ac_cv_prog_cc_works=no | |
755 | fi | |
756 | rm -fr conftest* | |
757 | ac_ext=c | |
758 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
759 | ac_cpp='$CPP $CPPFLAGS' | |
760 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
761 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
762 | cross_compiling=$ac_cv_prog_cc_cross | |
763 | ||
764 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
765 | if test $ac_cv_prog_cc_works = no; then | |
766 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
767 | fi | |
768 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
d836ee13 | 769 | echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
770 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
771 | cross_compiling=$ac_cv_prog_cc_cross | |
772 | ||
773 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
d836ee13 | 774 | echo "configure:775: checking whether we are using GNU C" >&5 |
c906108c SS |
775 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
777 | else | |
778 | cat > conftest.c <<EOF | |
779 | #ifdef __GNUC__ | |
780 | yes; | |
781 | #endif | |
782 | EOF | |
d836ee13 | 783 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
784 | ac_cv_prog_gcc=yes |
785 | else | |
786 | ac_cv_prog_gcc=no | |
787 | fi | |
788 | fi | |
789 | ||
790 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
791 | ||
792 | if test $ac_cv_prog_gcc = yes; then | |
793 | GCC=yes | |
794 | else | |
795 | GCC= | |
796 | fi | |
797 | ||
798 | ac_test_CFLAGS="${CFLAGS+set}" | |
799 | ac_save_CFLAGS="$CFLAGS" | |
800 | CFLAGS= | |
801 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
d836ee13 | 802 | echo "configure:803: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
803 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
805 | else | |
806 | echo 'void f(){}' > conftest.c | |
807 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
808 | ac_cv_prog_cc_g=yes | |
809 | else | |
810 | ac_cv_prog_cc_g=no | |
811 | fi | |
812 | rm -f conftest* | |
813 | ||
814 | fi | |
815 | ||
816 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
817 | if test "$ac_test_CFLAGS" = set; then | |
818 | CFLAGS="$ac_save_CFLAGS" | |
819 | elif test $ac_cv_prog_cc_g = yes; then | |
820 | if test "$GCC" = yes; then | |
821 | CFLAGS="-g -O2" | |
822 | else | |
823 | CFLAGS="-g" | |
824 | fi | |
825 | else | |
826 | if test "$GCC" = yes; then | |
827 | CFLAGS="-O2" | |
828 | else | |
829 | CFLAGS= | |
830 | fi | |
831 | fi | |
832 | ||
14abd0fb MK |
833 | cat >> confdefs.h <<\EOF |
834 | #define _GNU_SOURCE 1 | |
835 | EOF | |
836 | ||
837 | ||
c906108c | 838 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
d836ee13 | 839 | echo "configure:840: checking how to run the C preprocessor" >&5 |
c906108c SS |
840 | # On Suns, sometimes $CPP names a directory. |
841 | if test -n "$CPP" && test -d "$CPP"; then | |
842 | CPP= | |
843 | fi | |
844 | if test -z "$CPP"; then | |
845 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
847 | else | |
848 | # This must be in double quotes, not single quotes, because CPP may get | |
849 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
850 | CPP="${CC-cc} -E" | |
851 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
852 | # not just through cpp. | |
853 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 854 | #line 855 "configure" |
c906108c SS |
855 | #include "confdefs.h" |
856 | #include <assert.h> | |
857 | Syntax Error | |
858 | EOF | |
859 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 860 | { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
861 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
862 | if test -z "$ac_err"; then | |
863 | : | |
864 | else | |
865 | echo "$ac_err" >&5 | |
866 | echo "configure: failed program was:" >&5 | |
867 | cat conftest.$ac_ext >&5 | |
868 | rm -rf conftest* | |
869 | CPP="${CC-cc} -E -traditional-cpp" | |
870 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 871 | #line 872 "configure" |
c906108c SS |
872 | #include "confdefs.h" |
873 | #include <assert.h> | |
874 | Syntax Error | |
875 | EOF | |
876 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 877 | { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
878 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
879 | if test -z "$ac_err"; then | |
880 | : | |
881 | else | |
882 | echo "$ac_err" >&5 | |
883 | echo "configure: failed program was:" >&5 | |
884 | cat conftest.$ac_ext >&5 | |
885 | rm -rf conftest* | |
886 | CPP="${CC-cc} -nologo -E" | |
887 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 888 | #line 889 "configure" |
c906108c SS |
889 | #include "confdefs.h" |
890 | #include <assert.h> | |
891 | Syntax Error | |
892 | EOF | |
893 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 894 | { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
895 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
896 | if test -z "$ac_err"; then | |
897 | : | |
898 | else | |
899 | echo "$ac_err" >&5 | |
900 | echo "configure: failed program was:" >&5 | |
901 | cat conftest.$ac_ext >&5 | |
902 | rm -rf conftest* | |
903 | CPP=/lib/cpp | |
904 | fi | |
905 | rm -f conftest* | |
906 | fi | |
907 | rm -f conftest* | |
908 | fi | |
909 | rm -f conftest* | |
910 | ac_cv_prog_CPP="$CPP" | |
911 | fi | |
912 | CPP="$ac_cv_prog_CPP" | |
913 | else | |
914 | ac_cv_prog_CPP="$CPP" | |
915 | fi | |
916 | echo "$ac_t""$CPP" 1>&6 | |
917 | ||
918 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
d836ee13 | 919 | echo "configure:920: checking for AIX" >&5 |
c906108c | 920 | cat > conftest.$ac_ext <<EOF |
d836ee13 | 921 | #line 922 "configure" |
c906108c SS |
922 | #include "confdefs.h" |
923 | #ifdef _AIX | |
924 | yes | |
925 | #endif | |
926 | ||
927 | EOF | |
928 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
929 | egrep "yes" >/dev/null 2>&1; then | |
930 | rm -rf conftest* | |
931 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
932 | #define _ALL_SOURCE 1 | |
933 | EOF | |
934 | ||
935 | else | |
936 | rm -rf conftest* | |
937 | echo "$ac_t""no" 1>&6 | |
938 | fi | |
939 | rm -f conftest* | |
940 | ||
941 | ||
56157b4a | 942 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
d836ee13 | 943 | echo "configure:944: checking for POSIXized ISC" >&5 |
56157b4a AC |
944 | if test -d /etc/conf/kconfig.d && |
945 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
946 | then | |
947 | echo "$ac_t""yes" 1>&6 | |
948 | ISC=yes # If later tests want to check for ISC. | |
949 | cat >> confdefs.h <<\EOF | |
950 | #define _POSIX_SOURCE 1 | |
c906108c SS |
951 | EOF |
952 | ||
56157b4a AC |
953 | if test "$GCC" = yes; then |
954 | CC="$CC -posix" | |
955 | else | |
956 | CC="$CC -Xp" | |
957 | fi | |
c906108c SS |
958 | else |
959 | echo "$ac_t""no" 1>&6 | |
56157b4a | 960 | ISC= |
c906108c SS |
961 | fi |
962 | ||
963 | ||
964 | ||
965 | ||
966 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
d836ee13 | 967 | echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
968 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
969 | echo $ac_n "(cached) $ac_c" 1>&6 | |
970 | else | |
971 | am_cv_prog_cc_stdc=no | |
972 | ac_save_CC="$CC" | |
973 | # Don't try gcc -ansi; that turns off useful extensions and | |
974 | # breaks some systems' header files. | |
975 | # AIX -qlanglvl=ansi | |
976 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
977 | # HP-UX 10.20 and later -Ae |
978 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 979 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 980 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
981 | do |
982 | CC="$ac_save_CC $ac_arg" | |
983 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 984 | #line 985 "configure" |
c906108c SS |
985 | #include "confdefs.h" |
986 | #include <stdarg.h> | |
987 | #include <stdio.h> | |
988 | #include <sys/types.h> | |
989 | #include <sys/stat.h> | |
990 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
991 | struct buf { int x; }; | |
992 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
993 | static char *e (p, i) | |
994 | char **p; | |
995 | int i; | |
996 | { | |
997 | return p[i]; | |
998 | } | |
999 | static char *f (char * (*g) (char **, int), char **p, ...) | |
1000 | { | |
1001 | char *s; | |
1002 | va_list v; | |
1003 | va_start (v,p); | |
1004 | s = g (p, va_arg (v,int)); | |
1005 | va_end (v); | |
1006 | return s; | |
1007 | } | |
1008 | int test (int i, double x); | |
1009 | struct s1 {int (*f) (int a);}; | |
1010 | struct s2 {int (*f) (double a);}; | |
1011 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1012 | int argc; | |
1013 | char **argv; | |
1014 | ||
1015 | int main() { | |
1016 | ||
1017 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1018 | ||
1019 | ; return 0; } | |
1020 | EOF | |
d836ee13 | 1021 | if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1022 | rm -rf conftest* |
1023 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1024 | else | |
1025 | echo "configure: failed program was:" >&5 | |
1026 | cat conftest.$ac_ext >&5 | |
1027 | fi | |
1028 | rm -f conftest* | |
1029 | done | |
1030 | CC="$ac_save_CC" | |
1031 | ||
1032 | fi | |
1033 | ||
1034 | if test -z "$am_cv_prog_cc_stdc"; then | |
1035 | echo "$ac_t""none needed" 1>&6 | |
1036 | else | |
1037 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1038 | fi | |
1039 | case "x$am_cv_prog_cc_stdc" in | |
1040 | x|xno) ;; | |
1041 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1042 | esac | |
1043 | ||
1044 | ||
1045 | ac_aux_dir= | |
1046 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1047 | if test -f $ac_dir/install-sh; then | |
1048 | ac_aux_dir=$ac_dir | |
1049 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1050 | break | |
1051 | elif test -f $ac_dir/install.sh; then | |
1052 | ac_aux_dir=$ac_dir | |
1053 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1054 | break | |
1055 | fi | |
1056 | done | |
1057 | if test -z "$ac_aux_dir"; then | |
1058 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1059 | fi | |
1060 | ac_config_guess=$ac_aux_dir/config.guess | |
1061 | ac_config_sub=$ac_aux_dir/config.sub | |
1062 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1063 | ||
1064 | ||
1065 | # Do some error checking and defaulting for the host and target type. | |
1066 | # The inputs are: | |
1067 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1068 | # | |
1069 | # The rules are: | |
1070 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1071 | # same time. | |
1072 | # 2. Host defaults to nonopt. | |
1073 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1074 | # as determined by config.guess. | |
1075 | # 4. Target and build default to nonopt. | |
1076 | # 5. If nonopt is not specified, then target and build default to host. | |
1077 | ||
1078 | # The aliases save the names the user supplied, while $host etc. | |
1079 | # will get canonicalized. | |
1080 | case $host---$target---$nonopt in | |
1081 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1082 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1083 | esac | |
1084 | ||
1085 | ||
1086 | # Make sure we can run config.sub. | |
1087 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1088 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1089 | fi | |
1090 | ||
1091 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
d836ee13 | 1092 | echo "configure:1093: checking host system type" >&5 |
c906108c SS |
1093 | |
1094 | host_alias=$host | |
1095 | case "$host_alias" in | |
1096 | NONE) | |
1097 | case $nonopt in | |
1098 | NONE) | |
1099 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1100 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1101 | fi ;; | |
1102 | *) host_alias=$nonopt ;; | |
1103 | esac ;; | |
1104 | esac | |
1105 | ||
1106 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1107 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1108 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1109 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1110 | echo "$ac_t""$host" 1>&6 | |
1111 | ||
1112 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
d836ee13 | 1113 | echo "configure:1114: checking target system type" >&5 |
c906108c SS |
1114 | |
1115 | target_alias=$target | |
1116 | case "$target_alias" in | |
1117 | NONE) | |
1118 | case $nonopt in | |
1119 | NONE) target_alias=$host_alias ;; | |
1120 | *) target_alias=$nonopt ;; | |
1121 | esac ;; | |
1122 | esac | |
1123 | ||
1124 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1125 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1126 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1127 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1128 | echo "$ac_t""$target" 1>&6 | |
1129 | ||
1130 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
d836ee13 | 1131 | echo "configure:1132: checking build system type" >&5 |
c906108c SS |
1132 | |
1133 | build_alias=$build | |
1134 | case "$build_alias" in | |
1135 | NONE) | |
1136 | case $nonopt in | |
1137 | NONE) build_alias=$host_alias ;; | |
1138 | *) build_alias=$nonopt ;; | |
1139 | esac ;; | |
1140 | esac | |
1141 | ||
1142 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1143 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1144 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1145 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1146 | echo "$ac_t""$build" 1>&6 | |
1147 | ||
1148 | test "$host_alias" != "$target_alias" && | |
1149 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1150 | NONENONEs,x,x, && | |
1151 | program_prefix=${target_alias}- | |
1152 | ||
1153 | ||
8bb2c122 MK |
1154 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1155 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1156 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1157 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
f6e85fc8 | 1158 | # AC_PROG_RANLIB. This can be removed when we switch to Autoconf |
8bb2c122 MK |
1159 | # 2.5x. |
1160 | if test $host != $build; then | |
1161 | ac_tool_prefix=${host_alias}- | |
1162 | else | |
1163 | ac_tool_prefix= | |
1164 | fi | |
1165 | ||
1166 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1167 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1168 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 1169 | echo "configure:1170: checking for $ac_word" >&5 |
8bb2c122 MK |
1170 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1172 | else | |
1173 | if test -n "$RANLIB"; then | |
1174 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1175 | else | |
1176 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1177 | ac_dummy="$PATH" | |
1178 | for ac_dir in $ac_dummy; do | |
1179 | test -z "$ac_dir" && ac_dir=. | |
1180 | if test -f $ac_dir/$ac_word; then | |
1181 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1182 | break | |
1183 | fi | |
1184 | done | |
1185 | IFS="$ac_save_ifs" | |
1186 | fi | |
1187 | fi | |
1188 | RANLIB="$ac_cv_prog_RANLIB" | |
1189 | if test -n "$RANLIB"; then | |
1190 | echo "$ac_t""$RANLIB" 1>&6 | |
1191 | else | |
1192 | echo "$ac_t""no" 1>&6 | |
1193 | fi | |
1194 | ||
1195 | ||
1196 | if test -z "$ac_cv_prog_RANLIB"; then | |
1197 | if test -n "$ac_tool_prefix"; then | |
1198 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1199 | set dummy ranlib; ac_word=$2 | |
1200 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 1201 | echo "configure:1202: checking for $ac_word" >&5 |
8bb2c122 MK |
1202 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1204 | else | |
1205 | if test -n "$RANLIB"; then | |
1206 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1207 | else | |
1208 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1209 | ac_dummy="$PATH" | |
1210 | for ac_dir in $ac_dummy; do | |
1211 | test -z "$ac_dir" && ac_dir=. | |
1212 | if test -f $ac_dir/$ac_word; then | |
1213 | ac_cv_prog_RANLIB="ranlib" | |
1214 | break | |
1215 | fi | |
1216 | done | |
1217 | IFS="$ac_save_ifs" | |
1218 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1219 | fi | |
1220 | fi | |
1221 | RANLIB="$ac_cv_prog_RANLIB" | |
1222 | if test -n "$RANLIB"; then | |
1223 | echo "$ac_t""$RANLIB" 1>&6 | |
1224 | else | |
1225 | echo "$ac_t""no" 1>&6 | |
1226 | fi | |
1227 | ||
1228 | else | |
1229 | RANLIB=":" | |
1230 | fi | |
1231 | fi | |
1232 | ||
1233 | ||
c906108c SS |
1234 | ALL_LINGUAS= |
1235 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
d836ee13 | 1236 | echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1237 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1238 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1239 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1240 | else | |
1241 | cat > conftestmake <<\EOF | |
1242 | all: | |
1243 | @echo 'ac_maketemp="${MAKE}"' | |
1244 | EOF | |
1245 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1246 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1247 | if test -n "$ac_maketemp"; then | |
1248 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1249 | else | |
1250 | eval ac_cv_prog_make_${ac_make}_set=no | |
1251 | fi | |
1252 | rm -f conftestmake | |
1253 | fi | |
1254 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1255 | echo "$ac_t""yes" 1>&6 | |
1256 | SET_MAKE= | |
1257 | else | |
1258 | echo "$ac_t""no" 1>&6 | |
1259 | SET_MAKE="MAKE=${MAKE-make}" | |
1260 | fi | |
1261 | ||
1262 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1263 | set dummy ranlib; ac_word=$2 | |
1264 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 1265 | echo "configure:1266: checking for $ac_word" >&5 |
c906108c SS |
1266 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1267 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1268 | else | |
1269 | if test -n "$RANLIB"; then | |
1270 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1271 | else | |
1272 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1273 | ac_dummy="$PATH" | |
1274 | for ac_dir in $ac_dummy; do | |
1275 | test -z "$ac_dir" && ac_dir=. | |
1276 | if test -f $ac_dir/$ac_word; then | |
1277 | ac_cv_prog_RANLIB="ranlib" | |
1278 | break | |
1279 | fi | |
1280 | done | |
1281 | IFS="$ac_save_ifs" | |
1282 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1283 | fi | |
1284 | fi | |
1285 | RANLIB="$ac_cv_prog_RANLIB" | |
1286 | if test -n "$RANLIB"; then | |
1287 | echo "$ac_t""$RANLIB" 1>&6 | |
1288 | else | |
1289 | echo "$ac_t""no" 1>&6 | |
1290 | fi | |
1291 | ||
1292 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
d836ee13 | 1293 | echo "configure:1294: checking for ANSI C header files" >&5 |
c906108c SS |
1294 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1295 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1296 | else | |
1297 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1298 | #line 1299 "configure" |
c906108c SS |
1299 | #include "confdefs.h" |
1300 | #include <stdlib.h> | |
1301 | #include <stdarg.h> | |
1302 | #include <string.h> | |
1303 | #include <float.h> | |
1304 | EOF | |
1305 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 1306 | { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1307 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1308 | if test -z "$ac_err"; then | |
1309 | rm -rf conftest* | |
1310 | ac_cv_header_stdc=yes | |
1311 | else | |
1312 | echo "$ac_err" >&5 | |
1313 | echo "configure: failed program was:" >&5 | |
1314 | cat conftest.$ac_ext >&5 | |
1315 | rm -rf conftest* | |
1316 | ac_cv_header_stdc=no | |
1317 | fi | |
1318 | rm -f conftest* | |
1319 | ||
1320 | if test $ac_cv_header_stdc = yes; then | |
1321 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1322 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1323 | #line 1324 "configure" |
c906108c SS |
1324 | #include "confdefs.h" |
1325 | #include <string.h> | |
1326 | EOF | |
1327 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1328 | egrep "memchr" >/dev/null 2>&1; then | |
1329 | : | |
1330 | else | |
1331 | rm -rf conftest* | |
1332 | ac_cv_header_stdc=no | |
1333 | fi | |
1334 | rm -f conftest* | |
1335 | ||
1336 | fi | |
1337 | ||
1338 | if test $ac_cv_header_stdc = yes; then | |
1339 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1340 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1341 | #line 1342 "configure" |
c906108c SS |
1342 | #include "confdefs.h" |
1343 | #include <stdlib.h> | |
1344 | EOF | |
1345 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1346 | egrep "free" >/dev/null 2>&1; then | |
1347 | : | |
1348 | else | |
1349 | rm -rf conftest* | |
1350 | ac_cv_header_stdc=no | |
1351 | fi | |
1352 | rm -f conftest* | |
1353 | ||
1354 | fi | |
1355 | ||
1356 | if test $ac_cv_header_stdc = yes; then | |
1357 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1358 | if test "$cross_compiling" = yes; then | |
1359 | : | |
1360 | else | |
1361 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1362 | #line 1363 "configure" |
c906108c SS |
1363 | #include "confdefs.h" |
1364 | #include <ctype.h> | |
1365 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1366 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1367 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1368 | int main () { int i; for (i = 0; i < 256; i++) | |
1369 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1370 | exit (0); } | |
1371 | ||
1372 | EOF | |
d836ee13 | 1373 | if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1374 | then |
1375 | : | |
1376 | else | |
1377 | echo "configure: failed program was:" >&5 | |
1378 | cat conftest.$ac_ext >&5 | |
1379 | rm -fr conftest* | |
1380 | ac_cv_header_stdc=no | |
1381 | fi | |
1382 | rm -fr conftest* | |
1383 | fi | |
1384 | ||
1385 | fi | |
1386 | fi | |
1387 | ||
1388 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1389 | if test $ac_cv_header_stdc = yes; then | |
1390 | cat >> confdefs.h <<\EOF | |
1391 | #define STDC_HEADERS 1 | |
1392 | EOF | |
1393 | ||
1394 | fi | |
1395 | ||
1396 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
d836ee13 | 1397 | echo "configure:1398: checking for working const" >&5 |
c906108c SS |
1398 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1399 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1400 | else | |
1401 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1402 | #line 1403 "configure" |
c906108c SS |
1403 | #include "confdefs.h" |
1404 | ||
1405 | int main() { | |
1406 | ||
1407 | /* Ultrix mips cc rejects this. */ | |
1408 | typedef int charset[2]; const charset x; | |
1409 | /* SunOS 4.1.1 cc rejects this. */ | |
1410 | char const *const *ccp; | |
1411 | char **p; | |
1412 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1413 | struct point {int x, y;}; | |
1414 | static struct point const zero = {0,0}; | |
1415 | /* AIX XL C 1.02.0.0 rejects this. | |
1416 | It does not let you subtract one const X* pointer from another in an arm | |
1417 | of an if-expression whose if-part is not a constant expression */ | |
1418 | const char *g = "string"; | |
1419 | ccp = &g + (g ? g-g : 0); | |
1420 | /* HPUX 7.0 cc rejects these. */ | |
1421 | ++ccp; | |
1422 | p = (char**) ccp; | |
1423 | ccp = (char const *const *) p; | |
1424 | { /* SCO 3.2v4 cc rejects this. */ | |
1425 | char *t; | |
1426 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1427 | ||
1428 | *t++ = 0; | |
1429 | } | |
1430 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1431 | int x[] = {25, 17}; | |
1432 | const int *foo = &x[0]; | |
1433 | ++foo; | |
1434 | } | |
1435 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1436 | typedef const int *iptr; | |
1437 | iptr p = 0; | |
1438 | ++p; | |
1439 | } | |
1440 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1441 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1442 | struct s { int j; const int *ap[3]; }; | |
1443 | struct s *b; b->j = 5; | |
1444 | } | |
1445 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1446 | const int foo = 10; | |
1447 | } | |
1448 | ||
1449 | ; return 0; } | |
1450 | EOF | |
d836ee13 | 1451 | if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1452 | rm -rf conftest* |
1453 | ac_cv_c_const=yes | |
1454 | else | |
1455 | echo "configure: failed program was:" >&5 | |
1456 | cat conftest.$ac_ext >&5 | |
1457 | rm -rf conftest* | |
1458 | ac_cv_c_const=no | |
1459 | fi | |
1460 | rm -f conftest* | |
1461 | fi | |
1462 | ||
1463 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1464 | if test $ac_cv_c_const = no; then | |
1465 | cat >> confdefs.h <<\EOF | |
1466 | #define const | |
1467 | EOF | |
1468 | ||
1469 | fi | |
1470 | ||
1471 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
d836ee13 | 1472 | echo "configure:1473: checking for inline" >&5 |
c906108c SS |
1473 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1475 | else | |
1476 | ac_cv_c_inline=no | |
1477 | for ac_kw in inline __inline__ __inline; do | |
1478 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1479 | #line 1480 "configure" |
c906108c SS |
1480 | #include "confdefs.h" |
1481 | ||
1482 | int main() { | |
1483 | } $ac_kw foo() { | |
1484 | ; return 0; } | |
1485 | EOF | |
d836ee13 | 1486 | if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1487 | rm -rf conftest* |
1488 | ac_cv_c_inline=$ac_kw; break | |
1489 | else | |
1490 | echo "configure: failed program was:" >&5 | |
1491 | cat conftest.$ac_ext >&5 | |
1492 | fi | |
1493 | rm -f conftest* | |
1494 | done | |
1495 | ||
1496 | fi | |
1497 | ||
1498 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1499 | case "$ac_cv_c_inline" in | |
1500 | inline | yes) ;; | |
1501 | no) cat >> confdefs.h <<\EOF | |
1502 | #define inline | |
1503 | EOF | |
1504 | ;; | |
1505 | *) cat >> confdefs.h <<EOF | |
1506 | #define inline $ac_cv_c_inline | |
1507 | EOF | |
1508 | ;; | |
1509 | esac | |
1510 | ||
1511 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
d836ee13 | 1512 | echo "configure:1513: checking for off_t" >&5 |
c906108c SS |
1513 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1515 | else | |
1516 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1517 | #line 1518 "configure" |
c906108c SS |
1518 | #include "confdefs.h" |
1519 | #include <sys/types.h> | |
1520 | #if STDC_HEADERS | |
1521 | #include <stdlib.h> | |
1522 | #include <stddef.h> | |
1523 | #endif | |
1524 | EOF | |
1525 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1526 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1527 | rm -rf conftest* | |
1528 | ac_cv_type_off_t=yes | |
1529 | else | |
1530 | rm -rf conftest* | |
1531 | ac_cv_type_off_t=no | |
1532 | fi | |
1533 | rm -f conftest* | |
1534 | ||
1535 | fi | |
1536 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1537 | if test $ac_cv_type_off_t = no; then | |
1538 | cat >> confdefs.h <<\EOF | |
1539 | #define off_t long | |
1540 | EOF | |
1541 | ||
1542 | fi | |
1543 | ||
1544 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
d836ee13 | 1545 | echo "configure:1546: checking for size_t" >&5 |
c906108c SS |
1546 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1547 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1548 | else | |
1549 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1550 | #line 1551 "configure" |
c906108c SS |
1551 | #include "confdefs.h" |
1552 | #include <sys/types.h> | |
1553 | #if STDC_HEADERS | |
1554 | #include <stdlib.h> | |
1555 | #include <stddef.h> | |
1556 | #endif | |
1557 | EOF | |
1558 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1559 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1560 | rm -rf conftest* | |
1561 | ac_cv_type_size_t=yes | |
1562 | else | |
1563 | rm -rf conftest* | |
1564 | ac_cv_type_size_t=no | |
1565 | fi | |
1566 | rm -f conftest* | |
1567 | ||
1568 | fi | |
1569 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1570 | if test $ac_cv_type_size_t = no; then | |
1571 | cat >> confdefs.h <<\EOF | |
1572 | #define size_t unsigned | |
1573 | EOF | |
1574 | ||
1575 | fi | |
1576 | ||
1577 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1578 | # for constant arguments. Useless! | |
1579 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
d836ee13 | 1580 | echo "configure:1581: checking for working alloca.h" >&5 |
c906108c SS |
1581 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1583 | else | |
1584 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1585 | #line 1586 "configure" |
c906108c SS |
1586 | #include "confdefs.h" |
1587 | #include <alloca.h> | |
1588 | int main() { | |
1589 | char *p = alloca(2 * sizeof(int)); | |
1590 | ; return 0; } | |
1591 | EOF | |
d836ee13 | 1592 | if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1593 | rm -rf conftest* |
1594 | ac_cv_header_alloca_h=yes | |
1595 | else | |
1596 | echo "configure: failed program was:" >&5 | |
1597 | cat conftest.$ac_ext >&5 | |
1598 | rm -rf conftest* | |
1599 | ac_cv_header_alloca_h=no | |
1600 | fi | |
1601 | rm -f conftest* | |
1602 | fi | |
1603 | ||
1604 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1605 | if test $ac_cv_header_alloca_h = yes; then | |
1606 | cat >> confdefs.h <<\EOF | |
1607 | #define HAVE_ALLOCA_H 1 | |
1608 | EOF | |
1609 | ||
1610 | fi | |
1611 | ||
1612 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
d836ee13 | 1613 | echo "configure:1614: checking for alloca" >&5 |
c906108c SS |
1614 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1616 | else | |
1617 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1618 | #line 1619 "configure" |
c906108c SS |
1619 | #include "confdefs.h" |
1620 | ||
1621 | #ifdef __GNUC__ | |
1622 | # define alloca __builtin_alloca | |
1623 | #else | |
1624 | # ifdef _MSC_VER | |
1625 | # include <malloc.h> | |
1626 | # define alloca _alloca | |
1627 | # else | |
1628 | # if HAVE_ALLOCA_H | |
1629 | # include <alloca.h> | |
1630 | # else | |
1631 | # ifdef _AIX | |
1632 | #pragma alloca | |
1633 | # else | |
1634 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1635 | char *alloca (); | |
1636 | # endif | |
1637 | # endif | |
1638 | # endif | |
1639 | # endif | |
1640 | #endif | |
1641 | ||
1642 | int main() { | |
1643 | char *p = (char *) alloca(1); | |
1644 | ; return 0; } | |
1645 | EOF | |
d836ee13 | 1646 | if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1647 | rm -rf conftest* |
1648 | ac_cv_func_alloca_works=yes | |
1649 | else | |
1650 | echo "configure: failed program was:" >&5 | |
1651 | cat conftest.$ac_ext >&5 | |
1652 | rm -rf conftest* | |
1653 | ac_cv_func_alloca_works=no | |
1654 | fi | |
1655 | rm -f conftest* | |
1656 | fi | |
1657 | ||
1658 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1659 | if test $ac_cv_func_alloca_works = yes; then | |
1660 | cat >> confdefs.h <<\EOF | |
1661 | #define HAVE_ALLOCA 1 | |
1662 | EOF | |
1663 | ||
1664 | fi | |
1665 | ||
1666 | if test $ac_cv_func_alloca_works = no; then | |
1667 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1668 | # that cause trouble. Some versions do not even contain alloca or | |
1669 | # contain a buggy version. If you still want to use their alloca, | |
1670 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1671 | ALLOCA=alloca.${ac_objext} | |
1672 | cat >> confdefs.h <<\EOF | |
1673 | #define C_ALLOCA 1 | |
1674 | EOF | |
1675 | ||
1676 | ||
1677 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
d836ee13 | 1678 | echo "configure:1679: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1679 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1681 | else | |
1682 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1683 | #line 1684 "configure" |
c906108c SS |
1684 | #include "confdefs.h" |
1685 | #if defined(CRAY) && ! defined(CRAY2) | |
1686 | webecray | |
1687 | #else | |
1688 | wenotbecray | |
1689 | #endif | |
1690 | ||
1691 | EOF | |
1692 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1693 | egrep "webecray" >/dev/null 2>&1; then | |
1694 | rm -rf conftest* | |
1695 | ac_cv_os_cray=yes | |
1696 | else | |
1697 | rm -rf conftest* | |
1698 | ac_cv_os_cray=no | |
1699 | fi | |
1700 | rm -f conftest* | |
1701 | ||
1702 | fi | |
1703 | ||
1704 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1705 | if test $ac_cv_os_cray = yes; then | |
1706 | for ac_func in _getb67 GETB67 getb67; do | |
1707 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d836ee13 | 1708 | echo "configure:1709: checking for $ac_func" >&5 |
c906108c SS |
1709 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1710 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1711 | else | |
1712 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1713 | #line 1714 "configure" |
c906108c SS |
1714 | #include "confdefs.h" |
1715 | /* System header to define __stub macros and hopefully few prototypes, | |
1716 | which can conflict with char $ac_func(); below. */ | |
1717 | #include <assert.h> | |
1718 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1719 | /* We use char because int might match the return type of a gcc2 | |
1720 | builtin and then its argument prototype would still apply. */ | |
1721 | char $ac_func(); | |
1722 | ||
1723 | int main() { | |
1724 | ||
1725 | /* The GNU C library defines this for functions which it implements | |
1726 | to always fail with ENOSYS. Some functions are actually named | |
1727 | something starting with __ and the normal name is an alias. */ | |
1728 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1729 | choke me | |
1730 | #else | |
1731 | $ac_func(); | |
1732 | #endif | |
1733 | ||
1734 | ; return 0; } | |
1735 | EOF | |
d836ee13 | 1736 | if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1737 | rm -rf conftest* |
1738 | eval "ac_cv_func_$ac_func=yes" | |
1739 | else | |
1740 | echo "configure: failed program was:" >&5 | |
1741 | cat conftest.$ac_ext >&5 | |
1742 | rm -rf conftest* | |
1743 | eval "ac_cv_func_$ac_func=no" | |
1744 | fi | |
1745 | rm -f conftest* | |
1746 | fi | |
1747 | ||
1748 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1749 | echo "$ac_t""yes" 1>&6 | |
1750 | cat >> confdefs.h <<EOF | |
1751 | #define CRAY_STACKSEG_END $ac_func | |
1752 | EOF | |
1753 | ||
1754 | break | |
1755 | else | |
1756 | echo "$ac_t""no" 1>&6 | |
1757 | fi | |
1758 | ||
1759 | done | |
1760 | fi | |
1761 | ||
1762 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
d836ee13 | 1763 | echo "configure:1764: checking stack direction for C alloca" >&5 |
c906108c SS |
1764 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1766 | else | |
1767 | if test "$cross_compiling" = yes; then | |
1768 | ac_cv_c_stack_direction=0 | |
1769 | else | |
1770 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1771 | #line 1772 "configure" |
c906108c SS |
1772 | #include "confdefs.h" |
1773 | find_stack_direction () | |
1774 | { | |
1775 | static char *addr = 0; | |
1776 | auto char dummy; | |
1777 | if (addr == 0) | |
1778 | { | |
1779 | addr = &dummy; | |
1780 | return find_stack_direction (); | |
1781 | } | |
1782 | else | |
1783 | return (&dummy > addr) ? 1 : -1; | |
1784 | } | |
1785 | main () | |
1786 | { | |
1787 | exit (find_stack_direction() < 0); | |
1788 | } | |
1789 | EOF | |
d836ee13 | 1790 | if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1791 | then |
1792 | ac_cv_c_stack_direction=1 | |
1793 | else | |
1794 | echo "configure: failed program was:" >&5 | |
1795 | cat conftest.$ac_ext >&5 | |
1796 | rm -fr conftest* | |
1797 | ac_cv_c_stack_direction=-1 | |
1798 | fi | |
1799 | rm -fr conftest* | |
1800 | fi | |
1801 | ||
1802 | fi | |
1803 | ||
1804 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1805 | cat >> confdefs.h <<EOF | |
1806 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1807 | EOF | |
1808 | ||
1809 | fi | |
1810 | ||
d836ee13 | 1811 | for ac_hdr in unistd.h |
c906108c SS |
1812 | do |
1813 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1814 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d836ee13 | 1815 | echo "configure:1816: checking for $ac_hdr" >&5 |
c906108c SS |
1816 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1818 | else | |
1819 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1820 | #line 1821 "configure" |
c906108c SS |
1821 | #include "confdefs.h" |
1822 | #include <$ac_hdr> | |
1823 | EOF | |
1824 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 1825 | { (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1826 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1827 | if test -z "$ac_err"; then | |
1828 | rm -rf conftest* | |
1829 | eval "ac_cv_header_$ac_safe=yes" | |
1830 | else | |
1831 | echo "$ac_err" >&5 | |
1832 | echo "configure: failed program was:" >&5 | |
1833 | cat conftest.$ac_ext >&5 | |
1834 | rm -rf conftest* | |
1835 | eval "ac_cv_header_$ac_safe=no" | |
1836 | fi | |
1837 | rm -f conftest* | |
1838 | fi | |
1839 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1840 | echo "$ac_t""yes" 1>&6 | |
1841 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1842 | cat >> confdefs.h <<EOF | |
1843 | #define $ac_tr_hdr 1 | |
1844 | EOF | |
1845 | ||
1846 | else | |
1847 | echo "$ac_t""no" 1>&6 | |
1848 | fi | |
1849 | done | |
1850 | ||
1851 | for ac_func in getpagesize | |
1852 | do | |
1853 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d836ee13 | 1854 | echo "configure:1855: checking for $ac_func" >&5 |
c906108c SS |
1855 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1857 | else | |
1858 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1859 | #line 1860 "configure" |
c906108c SS |
1860 | #include "confdefs.h" |
1861 | /* System header to define __stub macros and hopefully few prototypes, | |
1862 | which can conflict with char $ac_func(); below. */ | |
1863 | #include <assert.h> | |
1864 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1865 | /* We use char because int might match the return type of a gcc2 | |
1866 | builtin and then its argument prototype would still apply. */ | |
1867 | char $ac_func(); | |
1868 | ||
1869 | int main() { | |
1870 | ||
1871 | /* The GNU C library defines this for functions which it implements | |
1872 | to always fail with ENOSYS. Some functions are actually named | |
1873 | something starting with __ and the normal name is an alias. */ | |
1874 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1875 | choke me | |
1876 | #else | |
1877 | $ac_func(); | |
1878 | #endif | |
1879 | ||
1880 | ; return 0; } | |
1881 | EOF | |
d836ee13 | 1882 | if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1883 | rm -rf conftest* |
1884 | eval "ac_cv_func_$ac_func=yes" | |
1885 | else | |
1886 | echo "configure: failed program was:" >&5 | |
1887 | cat conftest.$ac_ext >&5 | |
1888 | rm -rf conftest* | |
1889 | eval "ac_cv_func_$ac_func=no" | |
1890 | fi | |
1891 | rm -f conftest* | |
1892 | fi | |
1893 | ||
1894 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1895 | echo "$ac_t""yes" 1>&6 | |
1896 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1897 | cat >> confdefs.h <<EOF | |
1898 | #define $ac_tr_func 1 | |
1899 | EOF | |
1900 | ||
1901 | else | |
1902 | echo "$ac_t""no" 1>&6 | |
1903 | fi | |
1904 | done | |
1905 | ||
1906 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
d836ee13 | 1907 | echo "configure:1908: checking for working mmap" >&5 |
c906108c SS |
1908 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1909 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1910 | else | |
1911 | if test "$cross_compiling" = yes; then | |
1912 | ac_cv_func_mmap_fixed_mapped=no | |
1913 | else | |
1914 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 1915 | #line 1916 "configure" |
c906108c SS |
1916 | #include "confdefs.h" |
1917 | ||
1918 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1919 | Here is a matrix of mmap possibilities: | |
1920 | mmap private not fixed | |
1921 | mmap private fixed at somewhere currently unmapped | |
1922 | mmap private fixed at somewhere already mapped | |
1923 | mmap shared not fixed | |
1924 | mmap shared fixed at somewhere currently unmapped | |
1925 | mmap shared fixed at somewhere already mapped | |
1926 | For private mappings, we should verify that changes cannot be read() | |
1927 | back from the file, nor mmap's back from the file at a different | |
1928 | address. (There have been systems where private was not correctly | |
1929 | implemented like the infamous i386 svr4.0, and systems where the | |
1930 | VM page cache was not coherent with the filesystem buffer cache | |
1931 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1932 | For shared mappings, we should conversely verify that changes get | |
1933 | propogated back to all the places they're supposed to be. | |
1934 | ||
1935 | Grep wants private fixed already mapped. | |
1936 | The main things grep needs to know about mmap are: | |
1937 | * does it exist and is it safe to write into the mmap'd area | |
1938 | * how to use it (BSD variants) */ | |
1939 | #include <sys/types.h> | |
1940 | #include <fcntl.h> | |
1941 | #include <sys/mman.h> | |
1942 | ||
1943 | /* This mess was copied from the GNU getpagesize.h. */ | |
1944 | #ifndef HAVE_GETPAGESIZE | |
d836ee13 AC |
1945 | # ifdef HAVE_UNISTD_H |
1946 | # include <unistd.h> | |
1947 | # endif | |
c906108c SS |
1948 | |
1949 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1950 | # ifndef HAVE_SYS_PARAM_H | |
1951 | # define HAVE_SYS_PARAM_H 1 | |
1952 | # endif | |
1953 | ||
1954 | # ifdef _SC_PAGESIZE | |
1955 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1956 | # else /* no _SC_PAGESIZE */ | |
1957 | # ifdef HAVE_SYS_PARAM_H | |
1958 | # include <sys/param.h> | |
1959 | # ifdef EXEC_PAGESIZE | |
1960 | # define getpagesize() EXEC_PAGESIZE | |
1961 | # else /* no EXEC_PAGESIZE */ | |
1962 | # ifdef NBPG | |
1963 | # define getpagesize() NBPG * CLSIZE | |
1964 | # ifndef CLSIZE | |
1965 | # define CLSIZE 1 | |
1966 | # endif /* no CLSIZE */ | |
1967 | # else /* no NBPG */ | |
1968 | # ifdef NBPC | |
1969 | # define getpagesize() NBPC | |
1970 | # else /* no NBPC */ | |
1971 | # ifdef PAGESIZE | |
1972 | # define getpagesize() PAGESIZE | |
1973 | # endif /* PAGESIZE */ | |
1974 | # endif /* no NBPC */ | |
1975 | # endif /* no NBPG */ | |
1976 | # endif /* no EXEC_PAGESIZE */ | |
1977 | # else /* no HAVE_SYS_PARAM_H */ | |
1978 | # define getpagesize() 8192 /* punt totally */ | |
1979 | # endif /* no HAVE_SYS_PARAM_H */ | |
1980 | # endif /* no _SC_PAGESIZE */ | |
1981 | ||
1982 | #endif /* no HAVE_GETPAGESIZE */ | |
1983 | ||
1984 | #ifdef __cplusplus | |
1985 | extern "C" { void *malloc(unsigned); } | |
1986 | #else | |
1987 | char *malloc(); | |
1988 | #endif | |
1989 | ||
1990 | int | |
1991 | main() | |
1992 | { | |
1993 | char *data, *data2, *data3; | |
1994 | int i, pagesize; | |
1995 | int fd; | |
1996 | ||
1997 | pagesize = getpagesize(); | |
1998 | ||
1999 | /* | |
2000 | * First, make a file with some known garbage in it. | |
2001 | */ | |
2002 | data = malloc(pagesize); | |
2003 | if (!data) | |
2004 | exit(1); | |
2005 | for (i = 0; i < pagesize; ++i) | |
2006 | *(data + i) = rand(); | |
2007 | umask(0); | |
2008 | fd = creat("conftestmmap", 0600); | |
2009 | if (fd < 0) | |
2010 | exit(1); | |
2011 | if (write(fd, data, pagesize) != pagesize) | |
2012 | exit(1); | |
2013 | close(fd); | |
2014 | ||
2015 | /* | |
2016 | * Next, try to mmap the file at a fixed address which | |
2017 | * already has something else allocated at it. If we can, | |
2018 | * also make sure that we see the same garbage. | |
2019 | */ | |
2020 | fd = open("conftestmmap", O_RDWR); | |
2021 | if (fd < 0) | |
2022 | exit(1); | |
2023 | data2 = malloc(2 * pagesize); | |
2024 | if (!data2) | |
2025 | exit(1); | |
2026 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2027 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2028 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2029 | exit(1); | |
2030 | for (i = 0; i < pagesize; ++i) | |
2031 | if (*(data + i) != *(data2 + i)) | |
2032 | exit(1); | |
2033 | ||
2034 | /* | |
2035 | * Finally, make sure that changes to the mapped area | |
2036 | * do not percolate back to the file as seen by read(). | |
2037 | * (This is a bug on some variants of i386 svr4.0.) | |
2038 | */ | |
2039 | for (i = 0; i < pagesize; ++i) | |
2040 | *(data2 + i) = *(data2 + i) + 1; | |
2041 | data3 = malloc(pagesize); | |
2042 | if (!data3) | |
2043 | exit(1); | |
2044 | if (read(fd, data3, pagesize) != pagesize) | |
2045 | exit(1); | |
2046 | for (i = 0; i < pagesize; ++i) | |
2047 | if (*(data + i) != *(data3 + i)) | |
2048 | exit(1); | |
2049 | close(fd); | |
2050 | unlink("conftestmmap"); | |
2051 | exit(0); | |
2052 | } | |
2053 | ||
2054 | EOF | |
d836ee13 | 2055 | if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2056 | then |
2057 | ac_cv_func_mmap_fixed_mapped=yes | |
2058 | else | |
2059 | echo "configure: failed program was:" >&5 | |
2060 | cat conftest.$ac_ext >&5 | |
2061 | rm -fr conftest* | |
2062 | ac_cv_func_mmap_fixed_mapped=no | |
2063 | fi | |
2064 | rm -fr conftest* | |
2065 | fi | |
2066 | ||
2067 | fi | |
2068 | ||
2069 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2070 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2071 | cat >> confdefs.h <<\EOF | |
2072 | #define HAVE_MMAP 1 | |
2073 | EOF | |
2074 | ||
2075 | fi | |
2076 | ||
2077 | ||
2078 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2079 | unistd.h values.h sys/param.h | |
2080 | do | |
2081 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2082 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d836ee13 | 2083 | echo "configure:2084: checking for $ac_hdr" >&5 |
c906108c SS |
2084 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2086 | else | |
2087 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2088 | #line 2089 "configure" |
c906108c SS |
2089 | #include "confdefs.h" |
2090 | #include <$ac_hdr> | |
2091 | EOF | |
2092 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 2093 | { (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2094 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2095 | if test -z "$ac_err"; then | |
2096 | rm -rf conftest* | |
2097 | eval "ac_cv_header_$ac_safe=yes" | |
2098 | else | |
2099 | echo "$ac_err" >&5 | |
2100 | echo "configure: failed program was:" >&5 | |
2101 | cat conftest.$ac_ext >&5 | |
2102 | rm -rf conftest* | |
2103 | eval "ac_cv_header_$ac_safe=no" | |
2104 | fi | |
2105 | rm -f conftest* | |
2106 | fi | |
2107 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2108 | echo "$ac_t""yes" 1>&6 | |
2109 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2110 | cat >> confdefs.h <<EOF | |
2111 | #define $ac_tr_hdr 1 | |
2112 | EOF | |
2113 | ||
2114 | else | |
2115 | echo "$ac_t""no" 1>&6 | |
2116 | fi | |
2117 | done | |
2118 | ||
2119 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2120 | __argz_count __argz_stringify __argz_next | |
2121 | do | |
2122 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d836ee13 | 2123 | echo "configure:2124: checking for $ac_func" >&5 |
c906108c SS |
2124 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2126 | else | |
2127 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2128 | #line 2129 "configure" |
c906108c SS |
2129 | #include "confdefs.h" |
2130 | /* System header to define __stub macros and hopefully few prototypes, | |
2131 | which can conflict with char $ac_func(); below. */ | |
2132 | #include <assert.h> | |
2133 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2134 | /* We use char because int might match the return type of a gcc2 | |
2135 | builtin and then its argument prototype would still apply. */ | |
2136 | char $ac_func(); | |
2137 | ||
2138 | int main() { | |
2139 | ||
2140 | /* The GNU C library defines this for functions which it implements | |
2141 | to always fail with ENOSYS. Some functions are actually named | |
2142 | something starting with __ and the normal name is an alias. */ | |
2143 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2144 | choke me | |
2145 | #else | |
2146 | $ac_func(); | |
2147 | #endif | |
2148 | ||
2149 | ; return 0; } | |
2150 | EOF | |
d836ee13 | 2151 | if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2152 | rm -rf conftest* |
2153 | eval "ac_cv_func_$ac_func=yes" | |
2154 | else | |
2155 | echo "configure: failed program was:" >&5 | |
2156 | cat conftest.$ac_ext >&5 | |
2157 | rm -rf conftest* | |
2158 | eval "ac_cv_func_$ac_func=no" | |
2159 | fi | |
2160 | rm -f conftest* | |
2161 | fi | |
2162 | ||
2163 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2164 | echo "$ac_t""yes" 1>&6 | |
2165 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2166 | cat >> confdefs.h <<EOF | |
2167 | #define $ac_tr_func 1 | |
2168 | EOF | |
2169 | ||
2170 | else | |
2171 | echo "$ac_t""no" 1>&6 | |
2172 | fi | |
2173 | done | |
2174 | ||
2175 | ||
2176 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2177 | for ac_func in stpcpy | |
2178 | do | |
2179 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d836ee13 | 2180 | echo "configure:2181: checking for $ac_func" >&5 |
c906108c SS |
2181 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2182 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2183 | else | |
2184 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2185 | #line 2186 "configure" |
c906108c SS |
2186 | #include "confdefs.h" |
2187 | /* System header to define __stub macros and hopefully few prototypes, | |
2188 | which can conflict with char $ac_func(); below. */ | |
2189 | #include <assert.h> | |
2190 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2191 | /* We use char because int might match the return type of a gcc2 | |
2192 | builtin and then its argument prototype would still apply. */ | |
2193 | char $ac_func(); | |
2194 | ||
2195 | int main() { | |
2196 | ||
2197 | /* The GNU C library defines this for functions which it implements | |
2198 | to always fail with ENOSYS. Some functions are actually named | |
2199 | something starting with __ and the normal name is an alias. */ | |
2200 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2201 | choke me | |
2202 | #else | |
2203 | $ac_func(); | |
2204 | #endif | |
2205 | ||
2206 | ; return 0; } | |
2207 | EOF | |
d836ee13 | 2208 | if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2209 | rm -rf conftest* |
2210 | eval "ac_cv_func_$ac_func=yes" | |
2211 | else | |
2212 | echo "configure: failed program was:" >&5 | |
2213 | cat conftest.$ac_ext >&5 | |
2214 | rm -rf conftest* | |
2215 | eval "ac_cv_func_$ac_func=no" | |
2216 | fi | |
2217 | rm -f conftest* | |
2218 | fi | |
2219 | ||
2220 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2221 | echo "$ac_t""yes" 1>&6 | |
2222 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2223 | cat >> confdefs.h <<EOF | |
2224 | #define $ac_tr_func 1 | |
2225 | EOF | |
2226 | ||
2227 | else | |
2228 | echo "$ac_t""no" 1>&6 | |
2229 | fi | |
2230 | done | |
2231 | ||
2232 | fi | |
2233 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2234 | cat >> confdefs.h <<\EOF | |
2235 | #define HAVE_STPCPY 1 | |
2236 | EOF | |
2237 | ||
2238 | fi | |
2239 | ||
2240 | if test $ac_cv_header_locale_h = yes; then | |
2241 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
d836ee13 | 2242 | echo "configure:2243: checking for LC_MESSAGES" >&5 |
c906108c SS |
2243 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2244 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2245 | else | |
2246 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2247 | #line 2248 "configure" |
c906108c SS |
2248 | #include "confdefs.h" |
2249 | #include <locale.h> | |
2250 | int main() { | |
2251 | return LC_MESSAGES | |
2252 | ; return 0; } | |
2253 | EOF | |
d836ee13 | 2254 | if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2255 | rm -rf conftest* |
2256 | am_cv_val_LC_MESSAGES=yes | |
2257 | else | |
2258 | echo "configure: failed program was:" >&5 | |
2259 | cat conftest.$ac_ext >&5 | |
2260 | rm -rf conftest* | |
2261 | am_cv_val_LC_MESSAGES=no | |
2262 | fi | |
2263 | rm -f conftest* | |
2264 | fi | |
2265 | ||
2266 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2267 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2268 | cat >> confdefs.h <<\EOF | |
2269 | #define HAVE_LC_MESSAGES 1 | |
2270 | EOF | |
2271 | ||
2272 | fi | |
2273 | fi | |
2274 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
d836ee13 | 2275 | echo "configure:2276: checking whether NLS is requested" >&5 |
c906108c SS |
2276 | # Check whether --enable-nls or --disable-nls was given. |
2277 | if test "${enable_nls+set}" = set; then | |
2278 | enableval="$enable_nls" | |
2279 | USE_NLS=$enableval | |
2280 | else | |
2281 | USE_NLS=yes | |
2282 | fi | |
2283 | ||
2284 | echo "$ac_t""$USE_NLS" 1>&6 | |
2285 | ||
2286 | ||
2287 | USE_INCLUDED_LIBINTL=no | |
2288 | ||
2289 | if test "$USE_NLS" = "yes"; then | |
2290 | cat >> confdefs.h <<\EOF | |
2291 | #define ENABLE_NLS 1 | |
2292 | EOF | |
2293 | ||
2294 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
d836ee13 | 2295 | echo "configure:2296: checking whether included gettext is requested" >&5 |
c906108c SS |
2296 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2297 | if test "${with_included_gettext+set}" = set; then | |
2298 | withval="$with_included_gettext" | |
2299 | nls_cv_force_use_gnu_gettext=$withval | |
2300 | else | |
2301 | nls_cv_force_use_gnu_gettext=no | |
2302 | fi | |
2303 | ||
2304 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2305 | ||
2306 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2307 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2308 | nls_cv_header_intl= | |
2309 | nls_cv_header_libgt= | |
2310 | CATOBJEXT=NONE | |
2311 | ||
2312 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2313 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
d836ee13 | 2314 | echo "configure:2315: checking for libintl.h" >&5 |
c906108c SS |
2315 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2316 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2317 | else | |
2318 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2319 | #line 2320 "configure" |
c906108c SS |
2320 | #include "confdefs.h" |
2321 | #include <libintl.h> | |
2322 | EOF | |
2323 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 2324 | { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2325 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2326 | if test -z "$ac_err"; then | |
2327 | rm -rf conftest* | |
2328 | eval "ac_cv_header_$ac_safe=yes" | |
2329 | else | |
2330 | echo "$ac_err" >&5 | |
2331 | echo "configure: failed program was:" >&5 | |
2332 | cat conftest.$ac_ext >&5 | |
2333 | rm -rf conftest* | |
2334 | eval "ac_cv_header_$ac_safe=no" | |
2335 | fi | |
2336 | rm -f conftest* | |
2337 | fi | |
2338 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2339 | echo "$ac_t""yes" 1>&6 | |
2340 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
d836ee13 | 2341 | echo "configure:2342: checking for gettext in libc" >&5 |
c906108c SS |
2342 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2344 | else | |
2345 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2346 | #line 2347 "configure" |
c906108c SS |
2347 | #include "confdefs.h" |
2348 | #include <libintl.h> | |
2349 | int main() { | |
2350 | return (int) gettext ("") | |
2351 | ; return 0; } | |
2352 | EOF | |
d836ee13 | 2353 | if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2354 | rm -rf conftest* |
2355 | gt_cv_func_gettext_libc=yes | |
2356 | else | |
2357 | echo "configure: failed program was:" >&5 | |
2358 | cat conftest.$ac_ext >&5 | |
2359 | rm -rf conftest* | |
2360 | gt_cv_func_gettext_libc=no | |
2361 | fi | |
2362 | rm -f conftest* | |
2363 | fi | |
2364 | ||
2365 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2366 | ||
2367 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2368 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
d836ee13 | 2369 | echo "configure:2370: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2370 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2371 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2373 | else | |
2374 | ac_save_LIBS="$LIBS" | |
2375 | LIBS="-lintl $LIBS" | |
2376 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2377 | #line 2378 "configure" |
c906108c SS |
2378 | #include "confdefs.h" |
2379 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2380 | /* We use char because int might match the return type of a gcc2 | |
2381 | builtin and then its argument prototype would still apply. */ | |
2382 | char bindtextdomain(); | |
2383 | ||
2384 | int main() { | |
2385 | bindtextdomain() | |
2386 | ; return 0; } | |
2387 | EOF | |
d836ee13 | 2388 | if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2389 | rm -rf conftest* |
2390 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2391 | else | |
2392 | echo "configure: failed program was:" >&5 | |
2393 | cat conftest.$ac_ext >&5 | |
2394 | rm -rf conftest* | |
2395 | eval "ac_cv_lib_$ac_lib_var=no" | |
2396 | fi | |
2397 | rm -f conftest* | |
2398 | LIBS="$ac_save_LIBS" | |
2399 | ||
2400 | fi | |
2401 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2402 | echo "$ac_t""yes" 1>&6 | |
2403 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
d836ee13 | 2404 | echo "configure:2405: checking for gettext in libintl" >&5 |
c906108c SS |
2405 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2407 | else | |
2408 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2409 | #line 2410 "configure" |
c906108c SS |
2410 | #include "confdefs.h" |
2411 | ||
2412 | int main() { | |
2413 | return (int) gettext ("") | |
2414 | ; return 0; } | |
2415 | EOF | |
d836ee13 | 2416 | if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2417 | rm -rf conftest* |
2418 | gt_cv_func_gettext_libintl=yes | |
2419 | else | |
2420 | echo "configure: failed program was:" >&5 | |
2421 | cat conftest.$ac_ext >&5 | |
2422 | rm -rf conftest* | |
2423 | gt_cv_func_gettext_libintl=no | |
2424 | fi | |
2425 | rm -f conftest* | |
2426 | fi | |
2427 | ||
2428 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2429 | else | |
2430 | echo "$ac_t""no" 1>&6 | |
2431 | fi | |
2432 | ||
2433 | fi | |
2434 | ||
2435 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2436 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2437 | cat >> confdefs.h <<\EOF | |
2438 | #define HAVE_GETTEXT 1 | |
2439 | EOF | |
2440 | ||
2441 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2442 | set dummy msgfmt; ac_word=$2 | |
2443 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 2444 | echo "configure:2445: checking for $ac_word" >&5 |
c906108c SS |
2445 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2447 | else | |
2448 | case "$MSGFMT" in | |
2449 | /*) | |
2450 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2451 | ;; | |
2452 | *) | |
2453 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2454 | for ac_dir in $PATH; do | |
2455 | test -z "$ac_dir" && ac_dir=. | |
2456 | if test -f $ac_dir/$ac_word; then | |
2457 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2458 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2459 | break | |
2460 | fi | |
2461 | fi | |
2462 | done | |
2463 | IFS="$ac_save_ifs" | |
2464 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2465 | ;; | |
2466 | esac | |
2467 | fi | |
2468 | MSGFMT="$ac_cv_path_MSGFMT" | |
2469 | if test -n "$MSGFMT"; then | |
2470 | echo "$ac_t""$MSGFMT" 1>&6 | |
2471 | else | |
2472 | echo "$ac_t""no" 1>&6 | |
2473 | fi | |
2474 | if test "$MSGFMT" != "no"; then | |
2475 | for ac_func in dcgettext | |
2476 | do | |
2477 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d836ee13 | 2478 | echo "configure:2479: checking for $ac_func" >&5 |
c906108c SS |
2479 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2481 | else | |
2482 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2483 | #line 2484 "configure" |
c906108c SS |
2484 | #include "confdefs.h" |
2485 | /* System header to define __stub macros and hopefully few prototypes, | |
2486 | which can conflict with char $ac_func(); below. */ | |
2487 | #include <assert.h> | |
2488 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2489 | /* We use char because int might match the return type of a gcc2 | |
2490 | builtin and then its argument prototype would still apply. */ | |
2491 | char $ac_func(); | |
2492 | ||
2493 | int main() { | |
2494 | ||
2495 | /* The GNU C library defines this for functions which it implements | |
2496 | to always fail with ENOSYS. Some functions are actually named | |
2497 | something starting with __ and the normal name is an alias. */ | |
2498 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2499 | choke me | |
2500 | #else | |
2501 | $ac_func(); | |
2502 | #endif | |
2503 | ||
2504 | ; return 0; } | |
2505 | EOF | |
d836ee13 | 2506 | if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2507 | rm -rf conftest* |
2508 | eval "ac_cv_func_$ac_func=yes" | |
2509 | else | |
2510 | echo "configure: failed program was:" >&5 | |
2511 | cat conftest.$ac_ext >&5 | |
2512 | rm -rf conftest* | |
2513 | eval "ac_cv_func_$ac_func=no" | |
2514 | fi | |
2515 | rm -f conftest* | |
2516 | fi | |
2517 | ||
2518 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2519 | echo "$ac_t""yes" 1>&6 | |
2520 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2521 | cat >> confdefs.h <<EOF | |
2522 | #define $ac_tr_func 1 | |
2523 | EOF | |
2524 | ||
2525 | else | |
2526 | echo "$ac_t""no" 1>&6 | |
2527 | fi | |
2528 | done | |
2529 | ||
2530 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2531 | set dummy gmsgfmt; ac_word=$2 | |
2532 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 2533 | echo "configure:2534: checking for $ac_word" >&5 |
c906108c SS |
2534 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2536 | else | |
2537 | case "$GMSGFMT" in | |
2538 | /*) | |
2539 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2540 | ;; | |
2541 | ?:/*) | |
2542 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2543 | ;; | |
2544 | *) | |
2545 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2546 | ac_dummy="$PATH" | |
2547 | for ac_dir in $ac_dummy; do | |
2548 | test -z "$ac_dir" && ac_dir=. | |
2549 | if test -f $ac_dir/$ac_word; then | |
2550 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2551 | break | |
2552 | fi | |
2553 | done | |
2554 | IFS="$ac_save_ifs" | |
2555 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2556 | ;; | |
2557 | esac | |
2558 | fi | |
2559 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2560 | if test -n "$GMSGFMT"; then | |
2561 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2562 | else | |
2563 | echo "$ac_t""no" 1>&6 | |
2564 | fi | |
2565 | ||
2566 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2567 | set dummy xgettext; ac_word=$2 | |
2568 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 2569 | echo "configure:2570: checking for $ac_word" >&5 |
c906108c SS |
2570 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2572 | else | |
2573 | case "$XGETTEXT" in | |
2574 | /*) | |
2575 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2576 | ;; | |
2577 | *) | |
2578 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2579 | for ac_dir in $PATH; do | |
2580 | test -z "$ac_dir" && ac_dir=. | |
2581 | if test -f $ac_dir/$ac_word; then | |
2582 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2583 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2584 | break | |
2585 | fi | |
2586 | fi | |
2587 | done | |
2588 | IFS="$ac_save_ifs" | |
2589 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2590 | ;; | |
2591 | esac | |
2592 | fi | |
2593 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2594 | if test -n "$XGETTEXT"; then | |
2595 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2596 | else | |
2597 | echo "$ac_t""no" 1>&6 | |
2598 | fi | |
2599 | ||
2600 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2601 | #line 2602 "configure" |
c906108c SS |
2602 | #include "confdefs.h" |
2603 | ||
2604 | int main() { | |
2605 | extern int _nl_msg_cat_cntr; | |
2606 | return _nl_msg_cat_cntr | |
2607 | ; return 0; } | |
2608 | EOF | |
d836ee13 | 2609 | if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2610 | rm -rf conftest* |
2611 | CATOBJEXT=.gmo | |
2612 | DATADIRNAME=share | |
2613 | else | |
2614 | echo "configure: failed program was:" >&5 | |
2615 | cat conftest.$ac_ext >&5 | |
2616 | rm -rf conftest* | |
2617 | CATOBJEXT=.mo | |
2618 | DATADIRNAME=lib | |
2619 | fi | |
2620 | rm -f conftest* | |
2621 | INSTOBJEXT=.mo | |
2622 | fi | |
2623 | fi | |
2624 | ||
2625 | else | |
2626 | echo "$ac_t""no" 1>&6 | |
2627 | fi | |
2628 | ||
2629 | ||
2630 | ||
2631 | if test "$CATOBJEXT" = "NONE"; then | |
2632 | nls_cv_use_gnu_gettext=yes | |
2633 | fi | |
2634 | fi | |
2635 | ||
2636 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2637 | INTLOBJS="\$(GETTOBJS)" | |
2638 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2639 | set dummy msgfmt; ac_word=$2 | |
2640 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 2641 | echo "configure:2642: checking for $ac_word" >&5 |
c906108c SS |
2642 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2644 | else | |
2645 | case "$MSGFMT" in | |
2646 | /*) | |
2647 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2648 | ;; | |
2649 | *) | |
2650 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2651 | for ac_dir in $PATH; do | |
2652 | test -z "$ac_dir" && ac_dir=. | |
2653 | if test -f $ac_dir/$ac_word; then | |
2654 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2655 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2656 | break | |
2657 | fi | |
2658 | fi | |
2659 | done | |
2660 | IFS="$ac_save_ifs" | |
2661 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2662 | ;; | |
2663 | esac | |
2664 | fi | |
2665 | MSGFMT="$ac_cv_path_MSGFMT" | |
2666 | if test -n "$MSGFMT"; then | |
2667 | echo "$ac_t""$MSGFMT" 1>&6 | |
2668 | else | |
2669 | echo "$ac_t""no" 1>&6 | |
2670 | fi | |
2671 | ||
2672 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2673 | set dummy gmsgfmt; ac_word=$2 | |
2674 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 2675 | echo "configure:2676: checking for $ac_word" >&5 |
c906108c SS |
2676 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2678 | else | |
2679 | case "$GMSGFMT" in | |
2680 | /*) | |
2681 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2682 | ;; | |
2683 | ?:/*) | |
2684 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2685 | ;; | |
2686 | *) | |
2687 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2688 | ac_dummy="$PATH" | |
2689 | for ac_dir in $ac_dummy; do | |
2690 | test -z "$ac_dir" && ac_dir=. | |
2691 | if test -f $ac_dir/$ac_word; then | |
2692 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2693 | break | |
2694 | fi | |
2695 | done | |
2696 | IFS="$ac_save_ifs" | |
2697 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2698 | ;; | |
2699 | esac | |
2700 | fi | |
2701 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2702 | if test -n "$GMSGFMT"; then | |
2703 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2704 | else | |
2705 | echo "$ac_t""no" 1>&6 | |
2706 | fi | |
2707 | ||
2708 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2709 | set dummy xgettext; ac_word=$2 | |
2710 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d836ee13 | 2711 | echo "configure:2712: checking for $ac_word" >&5 |
c906108c SS |
2712 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2713 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2714 | else | |
2715 | case "$XGETTEXT" in | |
2716 | /*) | |
2717 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2718 | ;; | |
2719 | *) | |
2720 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2721 | for ac_dir in $PATH; do | |
2722 | test -z "$ac_dir" && ac_dir=. | |
2723 | if test -f $ac_dir/$ac_word; then | |
2724 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2725 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2726 | break | |
2727 | fi | |
2728 | fi | |
2729 | done | |
2730 | IFS="$ac_save_ifs" | |
2731 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2732 | ;; | |
2733 | esac | |
2734 | fi | |
2735 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2736 | if test -n "$XGETTEXT"; then | |
2737 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2738 | else | |
2739 | echo "$ac_t""no" 1>&6 | |
2740 | fi | |
2741 | ||
2742 | ||
2743 | USE_INCLUDED_LIBINTL=yes | |
2744 | CATOBJEXT=.gmo | |
2745 | INSTOBJEXT=.mo | |
2746 | DATADIRNAME=share | |
2747 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2748 | INTLLIBS=$INTLDEPS | |
2749 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2750 | nls_cv_header_intl=libintl.h | |
2751 | nls_cv_header_libgt=libgettext.h | |
2752 | fi | |
2753 | ||
2754 | if test "$XGETTEXT" != ":"; then | |
2755 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2756 | : ; | |
2757 | else | |
2758 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2759 | XGETTEXT=":" | |
2760 | fi | |
2761 | fi | |
2762 | ||
2763 | # We need to process the po/ directory. | |
2764 | POSUB=po | |
2765 | else | |
2766 | DATADIRNAME=share | |
2767 | nls_cv_header_intl=libintl.h | |
2768 | nls_cv_header_libgt=libgettext.h | |
2769 | fi | |
2770 | ||
2771 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2772 | # because some of the sources are only built for this goal. | |
2773 | if test "$PACKAGE" = gettext; then | |
2774 | USE_NLS=yes | |
2775 | USE_INCLUDED_LIBINTL=yes | |
2776 | fi | |
2777 | ||
2778 | for lang in $ALL_LINGUAS; do | |
2779 | GMOFILES="$GMOFILES $lang.gmo" | |
2780 | POFILES="$POFILES $lang.po" | |
2781 | done | |
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | ||
2792 | ||
2793 | ||
2794 | ||
2795 | ||
2796 | if test "x$CATOBJEXT" != "x"; then | |
2797 | if test "x$ALL_LINGUAS" = "x"; then | |
2798 | LINGUAS= | |
2799 | else | |
2800 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
d836ee13 | 2801 | echo "configure:2802: checking for catalogs to be installed" >&5 |
c906108c SS |
2802 | NEW_LINGUAS= |
2803 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2804 | case "$ALL_LINGUAS" in | |
2805 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2806 | esac | |
2807 | done | |
2808 | LINGUAS=$NEW_LINGUAS | |
2809 | echo "$ac_t""$LINGUAS" 1>&6 | |
2810 | fi | |
2811 | ||
2812 | if test -n "$LINGUAS"; then | |
2813 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2814 | fi | |
2815 | fi | |
2816 | ||
2817 | if test $ac_cv_header_locale_h = yes; then | |
2818 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2819 | else | |
2820 | INCLUDE_LOCALE_H="\ | |
2821 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2822 | fi | |
2823 | ||
2824 | ||
2825 | if test -f $srcdir/po2tbl.sed.in; then | |
2826 | if test "$CATOBJEXT" = ".cat"; then | |
2827 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2828 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
d836ee13 | 2829 | echo "configure:2830: checking for linux/version.h" >&5 |
c906108c SS |
2830 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2831 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2832 | else | |
2833 | cat > conftest.$ac_ext <<EOF | |
d836ee13 | 2834 | #line 2835 "configure" |
c906108c SS |
2835 | #include "confdefs.h" |
2836 | #include <linux/version.h> | |
2837 | EOF | |
2838 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d836ee13 | 2839 | { (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2840 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2841 | if test -z "$ac_err"; then | |
2842 | rm -rf conftest* | |
2843 | eval "ac_cv_header_$ac_safe=yes" | |
2844 | else | |
2845 | echo "$ac_err" >&5 | |
2846 | echo "configure: failed program was:" >&5 | |
2847 | cat conftest.$ac_ext >&5 | |
2848 | rm -rf conftest* | |
2849 | eval "ac_cv_header_$ac_safe=no" | |
2850 | fi | |
2851 | rm -f conftest* | |
2852 | fi | |
2853 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2854 | echo "$ac_t""yes" 1>&6 | |
2855 | msgformat=linux | |
2856 | else | |
2857 | echo "$ac_t""no" 1>&6 | |
2858 | msgformat=xopen | |
2859 | fi | |
2860 | ||
2861 | ||
2862 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2863 | fi | |
2864 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2865 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2866 | fi | |
2867 | ||
2868 | if test "$PACKAGE" = "gettext"; then | |
2869 | GT_NO="#NO#" | |
2870 | GT_YES= | |
2871 | else | |
2872 | GT_NO= | |
2873 | GT_YES="#YES#" | |
2874 | fi | |
2875 | ||
2876 | ||
2877 | ||
2878 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2879 | ||
2880 | ||
2881 | l= | |
2882 | ||
2883 | ||
4536bbc6 | 2884 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2885 | test -d po || mkdir po |
2886 | if test "x$srcdir" != "x."; then | |
2887 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2888 | posrcprefix="$srcdir/" | |
2889 | else | |
2890 | posrcprefix="../$srcdir/" | |
2891 | fi | |
2892 | else | |
2893 | posrcprefix="../" | |
2894 | fi | |
2895 | rm -f po/POTFILES | |
2896 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2897 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2898 | fi | |
2899 | ||
0fbb3da7 TT |
2900 | cat >> confdefs.h <<\EOF |
2901 | #define PACKAGE "gdb" | |
2902 | EOF | |
2903 | ||
2904 | ||
5b5d99cf JB |
2905 | debugdir=${libdir}/debug |
2906 | ||
2907 | # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given. | |
2908 | if test "${with_separate_debug_dir+set}" = set; then | |
2909 | withval="$with_separate_debug_dir" | |
2910 | debugdir="${withval}" | |
2911 | fi | |
2912 | ||
2913 | ||
2914 | ||
2915 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
2916 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2917 | ac_define_dir=`eval echo $debugdir` | |
2918 | ac_define_dir=`eval echo $ac_define_dir` | |
2919 | cat >> confdefs.h <<EOF | |
2920 | #define DEBUGDIR "$ac_define_dir" | |
2921 | EOF | |
2922 | ||
2923 | ||
2924 | #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"), | |
c906108c SS |
2925 | |
2926 | ||
2927 | CONFIG_OBS= | |
2928 | CONFIG_DEPS= | |
2929 | CONFIG_SRCS= | |
fb40c209 | 2930 | ENABLE_CFLAGS= |
b3a90332 AC |
2931 | CONFIG_ALL= |
2932 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2933 | CONFIG_INSTALL= |
2934 | CONFIG_UNINSTALL= | |
c906108c | 2935 | |
8dcde887 | 2936 | subdirs="doc testsuite" |
96baa820 | 2937 | |
8dcde887 | 2938 | configdirs= |
96baa820 | 2939 | |
27e9bf90 | 2940 | . $srcdir/configure.host |
c906108c | 2941 | |
27e9bf90 | 2942 | . $srcdir/configure.tgt |
c906108c | 2943 | |
27e9bf90 MK |
2944 | # Fetch the default architecture and default target vector from BFD. |
2945 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2946 | |
27e9bf90 MK |
2947 | # We only want the first architecture, so strip off the others if |
2948 | # there is more than one. | |
2949 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2950 | |
27e9bf90 MK |
2951 | if test "x$targ_archs" != x; then |
2952 | cat >> confdefs.h <<EOF | |
2953 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2954 | EOF |
2955 | ||
2956 | fi | |
27e9bf90 MK |
2957 | if test "x$targ_defvec" != x; then |
2958 | cat >> confdefs.h <<EOF | |
2959 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2960 | EOF |
2961 | ||
2962 | fi | |
c906108c | 2963 | |
8bb2c122 MK |
2964 | if test "$program_transform_name" = s,x,x,; then |
2965 | program_transform_name= | |
2966 | else | |
2967 | # Double any \ or $. echo might interpret backslashes. | |
2968 | cat <<\EOF_SED > conftestsed | |
2969 | s,\\,\\\\,g; s,\$,$$,g | |
2970 | EOF_SED | |
2971 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2972 | rm -f conftestsed | |
2973 | fi | |
2974 | test "$program_prefix" != NONE && | |
2975 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2976 | # Use a double $ so make ignores it. | |
2977 | test "$program_suffix" != NONE && | |
2978 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2979 | ||
2980 | # sed with no file args requires a program. | |
2981 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2982 | ||
2983 | ||
627af7ea MK |
2984 | # The CLI cannot be disabled yet, but may be in the future. |
2985 | ||
2986 | # Enable CLI. | |
2987 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2988 | if test "${enable_gdbcli+set}" = set; then | |
2989 | enableval="$enable_gdbcli" | |
2990 | case $enableval in | |
2991 | yes) | |
2992 | ;; | |
2993 | no) | |
2994 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2995 | *) | |
2996 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2997 | esac | |
2998 | else | |
2999 | enable_gdbcli=yes | |
3000 | fi | |
3001 | ||
3002 | if test x"$enable_gdbcli" = xyes; then | |
3003 | if test -d $srcdir/cli; then | |
3004 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
3005 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
3006 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
627af7ea | 3007 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" |
627af7ea MK |
3008 | fi |
3009 | fi | |
3010 | ||
3011 | # Enable MI. | |
3012 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
3013 | if test "${enable_gdbmi+set}" = set; then | |
3014 | enableval="$enable_gdbmi" | |
3015 | case $enableval in | |
3016 | yes | no) | |
3017 | ;; | |
3018 | *) | |
3019 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3020 | esac | |
3021 | else | |
3022 | enable_gdbmi=yes | |
3023 | fi | |
3024 | ||
3025 | if test x"$enable_gdbmi" = xyes; then | |
3026 | if test -d $srcdir/mi; then | |
3027 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3028 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3029 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
627af7ea | 3030 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" |
627af7ea MK |
3031 | fi |
3032 | fi | |
3033 | ||
06825bd1 MK |
3034 | # Enable TUI. |
3035 | # Check whether --enable-tui or --disable-tui was given. | |
3036 | if test "${enable_tui+set}" = set; then | |
3037 | enableval="$enable_tui" | |
3038 | case $enableval in | |
3039 | yes | no) | |
3040 | ;; | |
3041 | *) | |
3042 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3043 | esac | |
3044 | fi | |
3045 | ||
3046 | if test x"$enable_tui" = xyes; then | |
3047 | if test -d $srcdir/tui; then | |
3048 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3049 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3050 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
06825bd1 | 3051 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" |
06825bd1 MK |
3052 | need_curses=yes |
3053 | fi | |
3054 | fi | |
3055 | ||
8ee53726 MK |
3056 | # Enable gdbtk. |
3057 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3058 | if test "${enable_gdbtk+set}" = set; then | |
3059 | enableval="$enable_gdbtk" | |
3060 | case $enableval in | |
3061 | yes | no) | |
3062 | ;; | |
3063 | *) | |
3064 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3065 | esac | |
3066 | else | |
3067 | if test -d $srcdir/gdbtk; then | |
3068 | enable_gdbtk=yes | |
3069 | else | |
3070 | enable_gdbtk=no | |
3071 | fi | |
3072 | fi | |
3073 | ||
3074 | # We unconditionally disable gdbtk tests on selected platforms. | |
3075 | case $host_os in | |
3076 | go32* | windows*) | |
3077 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3078 | enable_gdbtk=no ;; | |
3079 | esac | |
3080 | ||
0e5d83e3 JJ |
3081 | # Libunwind support. |
3082 | # Check whether --with-libunwind or --without-libunwind was given. | |
3083 | if test "${with_libunwind+set}" = set; then | |
3084 | withval="$with_libunwind" | |
3085 | case "${withval}" in | |
3086 | yes) enable_libunwind=yes ;; | |
3087 | no) enable_libunwind=no ;; | |
3088 | *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;; | |
3089 | esac | |
3090 | else | |
3091 | ||
3092 | for ac_hdr in libunwind.h | |
3093 | do | |
3094 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3095 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 3096 | echo "configure:3097: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3097 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3098 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3099 | else | |
3100 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3101 | #line 3102 "configure" |
0e5d83e3 JJ |
3102 | #include "confdefs.h" |
3103 | #include <$ac_hdr> | |
3104 | EOF | |
3105 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 3106 | { (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3107 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3108 | if test -z "$ac_err"; then | |
3109 | rm -rf conftest* | |
3110 | eval "ac_cv_header_$ac_safe=yes" | |
3111 | else | |
3112 | echo "$ac_err" >&5 | |
3113 | echo "configure: failed program was:" >&5 | |
3114 | cat conftest.$ac_ext >&5 | |
3115 | rm -rf conftest* | |
3116 | eval "ac_cv_header_$ac_safe=no" | |
3117 | fi | |
3118 | rm -f conftest* | |
3119 | fi | |
3120 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3121 | echo "$ac_t""yes" 1>&6 | |
3122 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3123 | cat >> confdefs.h <<EOF | |
3124 | #define $ac_tr_hdr 1 | |
3125 | EOF | |
3126 | ||
3127 | else | |
3128 | echo "$ac_t""no" 1>&6 | |
3129 | fi | |
3130 | done | |
3131 | ||
3132 | for ac_hdr in libunwind-ia64.h | |
3133 | do | |
3134 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3135 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 3136 | echo "configure:3137: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3137 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3138 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3139 | else | |
3140 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3141 | #line 3142 "configure" |
0e5d83e3 JJ |
3142 | #include "confdefs.h" |
3143 | #include <$ac_hdr> | |
3144 | EOF | |
3145 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 3146 | { (eval echo configure:3147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3147 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3148 | if test -z "$ac_err"; then | |
3149 | rm -rf conftest* | |
3150 | eval "ac_cv_header_$ac_safe=yes" | |
3151 | else | |
3152 | echo "$ac_err" >&5 | |
3153 | echo "configure: failed program was:" >&5 | |
3154 | cat conftest.$ac_ext >&5 | |
3155 | rm -rf conftest* | |
3156 | eval "ac_cv_header_$ac_safe=no" | |
3157 | fi | |
3158 | rm -f conftest* | |
3159 | fi | |
3160 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3161 | echo "$ac_t""yes" 1>&6 | |
3162 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3163 | cat >> confdefs.h <<EOF | |
3164 | #define $ac_tr_hdr 1 | |
3165 | EOF | |
3166 | ||
3167 | else | |
3168 | echo "$ac_t""no" 1>&6 | |
3169 | fi | |
3170 | done | |
3171 | ||
3172 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then | |
3173 | enable_libunwind=yes; | |
3174 | fi | |
3175 | ||
3176 | fi | |
3177 | ||
3178 | ||
3179 | if test x"$enable_libunwind" = xyes; then | |
3180 | for ac_hdr in libunwind.h | |
3181 | do | |
3182 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3183 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 3184 | echo "configure:3185: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3185 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3186 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3187 | else | |
3188 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3189 | #line 3190 "configure" |
0e5d83e3 JJ |
3190 | #include "confdefs.h" |
3191 | #include <$ac_hdr> | |
3192 | EOF | |
3193 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 3194 | { (eval echo configure:3195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3195 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3196 | if test -z "$ac_err"; then | |
3197 | rm -rf conftest* | |
3198 | eval "ac_cv_header_$ac_safe=yes" | |
3199 | else | |
3200 | echo "$ac_err" >&5 | |
3201 | echo "configure: failed program was:" >&5 | |
3202 | cat conftest.$ac_ext >&5 | |
3203 | rm -rf conftest* | |
3204 | eval "ac_cv_header_$ac_safe=no" | |
3205 | fi | |
3206 | rm -f conftest* | |
3207 | fi | |
3208 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3209 | echo "$ac_t""yes" 1>&6 | |
3210 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3211 | cat >> confdefs.h <<EOF | |
3212 | #define $ac_tr_hdr 1 | |
3213 | EOF | |
3214 | ||
3215 | else | |
3216 | echo "$ac_t""no" 1>&6 | |
3217 | fi | |
3218 | done | |
3219 | ||
3220 | for ac_hdr in libunwind-ia64.h | |
3221 | do | |
3222 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3223 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 3224 | echo "configure:3225: checking for $ac_hdr" >&5 |
0e5d83e3 JJ |
3225 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3226 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3227 | else | |
3228 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3229 | #line 3230 "configure" |
0e5d83e3 JJ |
3230 | #include "confdefs.h" |
3231 | #include <$ac_hdr> | |
3232 | EOF | |
3233 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 3234 | { (eval echo configure:3235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0e5d83e3 JJ |
3235 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3236 | if test -z "$ac_err"; then | |
3237 | rm -rf conftest* | |
3238 | eval "ac_cv_header_$ac_safe=yes" | |
3239 | else | |
3240 | echo "$ac_err" >&5 | |
3241 | echo "configure: failed program was:" >&5 | |
3242 | cat conftest.$ac_ext >&5 | |
3243 | rm -rf conftest* | |
3244 | eval "ac_cv_header_$ac_safe=no" | |
3245 | fi | |
3246 | rm -f conftest* | |
3247 | fi | |
3248 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3249 | echo "$ac_t""yes" 1>&6 | |
3250 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3251 | cat >> confdefs.h <<EOF | |
3252 | #define $ac_tr_hdr 1 | |
3253 | EOF | |
3254 | ||
3255 | else | |
3256 | echo "$ac_t""no" 1>&6 | |
3257 | fi | |
3258 | done | |
3259 | ||
3260 | cat >> confdefs.h <<\EOF | |
3261 | #define HAVE_LIBUNWIND 1 | |
3262 | EOF | |
3263 | ||
3264 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
3265 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
3266 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
3267 | fi | |
3268 | ||
d28f9cdf DJ |
3269 | # Profiling support. |
3270 | # Check whether --enable-profiling or --disable-profiling was given. | |
3271 | if test "${enable_profiling+set}" = set; then | |
3272 | enableval="$enable_profiling" | |
3273 | case $enableval in | |
3274 | yes | no) | |
3275 | ;; | |
3276 | *) | |
3277 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3278 | esac | |
3279 | else | |
3280 | enable_profiling=no | |
3281 | fi | |
3282 | ||
3283 | ||
d9feb4e7 DJ |
3284 | for ac_func in monstartup _mcleanup |
3285 | do | |
3286 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 3287 | echo "configure:3288: checking for $ac_func" >&5 |
d9feb4e7 | 3288 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
d28f9cdf DJ |
3289 | echo $ac_n "(cached) $ac_c" 1>&6 |
3290 | else | |
3291 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3292 | #line 3293 "configure" |
d28f9cdf DJ |
3293 | #include "confdefs.h" |
3294 | /* System header to define __stub macros and hopefully few prototypes, | |
d9feb4e7 | 3295 | which can conflict with char $ac_func(); below. */ |
d28f9cdf DJ |
3296 | #include <assert.h> |
3297 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3298 | /* We use char because int might match the return type of a gcc2 | |
3299 | builtin and then its argument prototype would still apply. */ | |
d9feb4e7 | 3300 | char $ac_func(); |
d28f9cdf DJ |
3301 | |
3302 | int main() { | |
3303 | ||
3304 | /* The GNU C library defines this for functions which it implements | |
3305 | to always fail with ENOSYS. Some functions are actually named | |
3306 | something starting with __ and the normal name is an alias. */ | |
d9feb4e7 | 3307 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
d28f9cdf DJ |
3308 | choke me |
3309 | #else | |
d9feb4e7 | 3310 | $ac_func(); |
d28f9cdf DJ |
3311 | #endif |
3312 | ||
3313 | ; return 0; } | |
3314 | EOF | |
33f8ca73 | 3315 | if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf | 3316 | rm -rf conftest* |
d9feb4e7 | 3317 | eval "ac_cv_func_$ac_func=yes" |
d28f9cdf DJ |
3318 | else |
3319 | echo "configure: failed program was:" >&5 | |
3320 | cat conftest.$ac_ext >&5 | |
3321 | rm -rf conftest* | |
d9feb4e7 | 3322 | eval "ac_cv_func_$ac_func=no" |
d28f9cdf DJ |
3323 | fi |
3324 | rm -f conftest* | |
3325 | fi | |
3326 | ||
d9feb4e7 | 3327 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
d28f9cdf | 3328 | echo "$ac_t""yes" 1>&6 |
d9feb4e7 DJ |
3329 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
3330 | cat >> confdefs.h <<EOF | |
3331 | #define $ac_tr_func 1 | |
3332 | EOF | |
3333 | ||
d28f9cdf DJ |
3334 | else |
3335 | echo "$ac_t""no" 1>&6 | |
d28f9cdf | 3336 | fi |
d9feb4e7 | 3337 | done |
d28f9cdf | 3338 | |
b0b1c2c0 | 3339 | echo $ac_n "checking for _etext""... $ac_c" 1>&6 |
33f8ca73 | 3340 | echo "configure:3341: checking for _etext" >&5 |
b0b1c2c0 MK |
3341 | if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then |
3342 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3343 | else | |
3344 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3345 | #line 3346 "configure" |
b0b1c2c0 MK |
3346 | #include "confdefs.h" |
3347 | #include <stdlib.h> | |
3348 | extern char _etext; | |
3349 | ||
3350 | int main() { | |
3351 | free (&_etext); | |
3352 | ; return 0; } | |
3353 | EOF | |
33f8ca73 | 3354 | if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b0b1c2c0 MK |
3355 | rm -rf conftest* |
3356 | ac_cv_var__etext=yes | |
3357 | else | |
3358 | echo "configure: failed program was:" >&5 | |
3359 | cat conftest.$ac_ext >&5 | |
3360 | rm -rf conftest* | |
3361 | ac_cv_var__etext=no | |
3362 | fi | |
3363 | rm -f conftest* | |
3364 | fi | |
3365 | ||
3366 | echo "$ac_t""$ac_cv_var__etext" 1>&6 | |
3367 | if test $ac_cv_var__etext = yes; then | |
3368 | cat >> confdefs.h <<\EOF | |
3369 | #define HAVE__ETEXT 1 | |
3370 | EOF | |
3371 | ||
3372 | fi | |
d9feb4e7 DJ |
3373 | if test "$enable_profiling" = yes ; then |
3374 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
3375 | { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; } | |
3376 | fi | |
3377 | PROFILE_CFLAGS=-pg | |
3378 | OLD_CFLAGS="$CFLAGS" | |
3379 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
d28f9cdf | 3380 | |
d9feb4e7 | 3381 | echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6 |
33f8ca73 | 3382 | echo "configure:3383: checking whether $CC supports -pg" >&5 |
d9feb4e7 | 3383 | if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then |
d28f9cdf DJ |
3384 | echo $ac_n "(cached) $ac_c" 1>&6 |
3385 | else | |
3386 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3387 | #line 3388 "configure" |
d28f9cdf | 3388 | #include "confdefs.h" |
d28f9cdf DJ |
3389 | |
3390 | int main() { | |
d9feb4e7 | 3391 | int x; |
d28f9cdf DJ |
3392 | ; return 0; } |
3393 | EOF | |
33f8ca73 | 3394 | if { (eval echo configure:3395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d28f9cdf | 3395 | rm -rf conftest* |
d9feb4e7 | 3396 | ac_cv_cc_supports_pg=yes |
d28f9cdf DJ |
3397 | else |
3398 | echo "configure: failed program was:" >&5 | |
3399 | cat conftest.$ac_ext >&5 | |
3400 | rm -rf conftest* | |
d9feb4e7 | 3401 | ac_cv_cc_supports_pg=no |
d28f9cdf DJ |
3402 | fi |
3403 | rm -f conftest* | |
3404 | fi | |
3405 | ||
d9feb4e7 | 3406 | echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6 |
d28f9cdf | 3407 | |
d9feb4e7 DJ |
3408 | if test $ac_cv_cc_supports_pg = no; then |
3409 | { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; } | |
3410 | fi | |
d28f9cdf DJ |
3411 | |
3412 | CFLAGS="$OLD_CFLAGS" | |
3413 | fi | |
3414 | ||
8bb2c122 MK |
3415 | # --------------------- # |
3416 | # Checks for programs. # | |
3417 | # --------------------- # | |
3418 | ||
d836ee13 | 3419 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3420 | do |
3421 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3422 | set dummy $ac_prog; ac_word=$2 | |
3423 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
33f8ca73 | 3424 | echo "configure:3425: checking for $ac_word" >&5 |
7a292a7a SS |
3425 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3426 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3427 | else | |
3428 | if test -n "$AWK"; then | |
3429 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3430 | else | |
3431 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3432 | ac_dummy="$PATH" | |
3433 | for ac_dir in $ac_dummy; do | |
3434 | test -z "$ac_dir" && ac_dir=. | |
3435 | if test -f $ac_dir/$ac_word; then | |
3436 | ac_cv_prog_AWK="$ac_prog" | |
3437 | break | |
3438 | fi | |
3439 | done | |
3440 | IFS="$ac_save_ifs" | |
3441 | fi | |
3442 | fi | |
3443 | AWK="$ac_cv_prog_AWK" | |
3444 | if test -n "$AWK"; then | |
3445 | echo "$ac_t""$AWK" 1>&6 | |
3446 | else | |
3447 | echo "$ac_t""no" 1>&6 | |
3448 | fi | |
3449 | ||
3450 | test -n "$AWK" && break | |
3451 | done | |
3452 | ||
c906108c SS |
3453 | # Find a good install program. We prefer a C program (faster), |
3454 | # so one script is as good as another. But avoid the broken or | |
3455 | # incompatible versions: | |
3456 | # SysV /etc/install, /usr/sbin/install | |
3457 | # SunOS /usr/etc/install | |
3458 | # IRIX /sbin/install | |
3459 | # AIX /bin/install | |
3460 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3461 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3462 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3463 | # ./install, which can be erroneously created by make from ./install.sh. | |
3464 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
33f8ca73 | 3465 | echo "configure:3466: checking for a BSD compatible install" >&5 |
c906108c SS |
3466 | if test -z "$INSTALL"; then |
3467 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3469 | else | |
3470 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3471 | for ac_dir in $PATH; do | |
3472 | # Account for people who put trailing slashes in PATH elements. | |
3473 | case "$ac_dir/" in | |
3474 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3475 | *) | |
3476 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3477 | # Don't use installbsd from OSF since it installs stuff as root | |
3478 | # by default. | |
3479 | for ac_prog in ginstall scoinst install; do | |
3480 | if test -f $ac_dir/$ac_prog; then | |
3481 | if test $ac_prog = install && | |
3482 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3483 | # AIX install. It has an incompatible calling convention. | |
3484 | : | |
3485 | else | |
3486 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3487 | break 2 | |
3488 | fi | |
3489 | fi | |
3490 | done | |
3491 | ;; | |
3492 | esac | |
3493 | done | |
3494 | IFS="$ac_save_IFS" | |
3495 | ||
3496 | fi | |
3497 | if test "${ac_cv_path_install+set}" = set; then | |
3498 | INSTALL="$ac_cv_path_install" | |
3499 | else | |
3500 | # As a last resort, use the slow shell script. We don't cache a | |
3501 | # path for INSTALL within a source directory, because that will | |
3502 | # break other packages using the cache if that directory is | |
3503 | # removed, or if the path is relative. | |
3504 | INSTALL="$ac_install_sh" | |
3505 | fi | |
3506 | fi | |
3507 | echo "$ac_t""$INSTALL" 1>&6 | |
3508 | ||
3509 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3510 | # It thinks the first close brace ends the variable substitution. | |
3511 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3512 | ||
3513 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3514 | ||
3515 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3516 | ||
8bb2c122 | 3517 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
33f8ca73 | 3518 | echo "configure:3519: checking whether ln -s works" >&5 |
8bb2c122 MK |
3519 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3520 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3521 | else |
8bb2c122 MK |
3522 | rm -f conftestdata |
3523 | if ln -s X conftestdata 2>/dev/null | |
3524 | then | |
3525 | rm -f conftestdata | |
3526 | ac_cv_prog_LN_S="ln -s" | |
3527 | else | |
3528 | ac_cv_prog_LN_S=ln | |
3529 | fi | |
3530 | fi | |
3531 | LN_S="$ac_cv_prog_LN_S" | |
3532 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3533 | echo "$ac_t""yes" 1>&6 | |
3534 | else | |
3535 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3536 | fi |
3537 | ||
8bb2c122 MK |
3538 | # Extract the first word of "ranlib", so it can be a program name with args. |
3539 | set dummy ranlib; ac_word=$2 | |
c906108c | 3540 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
33f8ca73 | 3541 | echo "configure:3542: checking for $ac_word" >&5 |
8bb2c122 | 3542 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3543 | echo $ac_n "(cached) $ac_c" 1>&6 |
3544 | else | |
8bb2c122 MK |
3545 | if test -n "$RANLIB"; then |
3546 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3547 | else |
3548 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3549 | ac_dummy="$PATH" | |
3550 | for ac_dir in $ac_dummy; do | |
3551 | test -z "$ac_dir" && ac_dir=. | |
3552 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3553 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3554 | break |
3555 | fi | |
3556 | done | |
3557 | IFS="$ac_save_ifs" | |
8bb2c122 | 3558 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3559 | fi |
3560 | fi | |
8bb2c122 MK |
3561 | RANLIB="$ac_cv_prog_RANLIB" |
3562 | if test -n "$RANLIB"; then | |
3563 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3564 | else |
3565 | echo "$ac_t""no" 1>&6 | |
3566 | fi | |
3567 | ||
8bb2c122 MK |
3568 | for ac_prog in 'bison -y' byacc |
3569 | do | |
3570 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3571 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3572 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
33f8ca73 | 3573 | echo "configure:3574: checking for $ac_word" >&5 |
8bb2c122 | 3574 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3575 | echo $ac_n "(cached) $ac_c" 1>&6 |
3576 | else | |
8bb2c122 MK |
3577 | if test -n "$YACC"; then |
3578 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3579 | else |
3580 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3581 | ac_dummy="$PATH" | |
3582 | for ac_dir in $ac_dummy; do | |
3583 | test -z "$ac_dir" && ac_dir=. | |
3584 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3585 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3586 | break |
3587 | fi | |
3588 | done | |
3589 | IFS="$ac_save_ifs" | |
3590 | fi | |
3591 | fi | |
8bb2c122 MK |
3592 | YACC="$ac_cv_prog_YACC" |
3593 | if test -n "$YACC"; then | |
3594 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3595 | else |
3596 | echo "$ac_t""no" 1>&6 | |
3597 | fi | |
3598 | ||
8bb2c122 MK |
3599 | test -n "$YACC" && break |
3600 | done | |
3601 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3602 | |
8bb2c122 MK |
3603 | |
3604 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3605 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3606 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
33f8ca73 | 3607 | echo "configure:3608: checking for $ac_word" >&5 |
8bb2c122 | 3608 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3609 | echo $ac_n "(cached) $ac_c" 1>&6 |
3610 | else | |
8bb2c122 MK |
3611 | if test -n "$AR"; then |
3612 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3613 | else |
3614 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3615 | ac_dummy="$PATH" | |
3616 | for ac_dir in $ac_dummy; do | |
3617 | test -z "$ac_dir" && ac_dir=. | |
3618 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3619 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3620 | break |
3621 | fi | |
3622 | done | |
3623 | IFS="$ac_save_ifs" | |
8bb2c122 | 3624 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3625 | fi |
3626 | fi | |
8bb2c122 MK |
3627 | AR="$ac_cv_prog_AR" |
3628 | if test -n "$AR"; then | |
3629 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3630 | else |
3631 | echo "$ac_t""no" 1>&6 | |
3632 | fi | |
3633 | ||
8bb2c122 | 3634 | |
c906108c | 3635 | |
95ca63c4 CF |
3636 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3637 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3638 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
33f8ca73 | 3639 | echo "configure:3640: checking for $ac_word" >&5 |
95ca63c4 CF |
3640 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3641 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3642 | else | |
3643 | if test -n "$DLLTOOL"; then | |
3644 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3645 | else | |
3646 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3647 | ac_dummy="$PATH" | |
3648 | for ac_dir in $ac_dummy; do | |
3649 | test -z "$ac_dir" && ac_dir=. | |
3650 | if test -f $ac_dir/$ac_word; then | |
3651 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3652 | break | |
3653 | fi | |
3654 | done | |
3655 | IFS="$ac_save_ifs" | |
3656 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3657 | fi | |
3658 | fi | |
3659 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3660 | if test -n "$DLLTOOL"; then | |
3661 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3662 | else | |
3663 | echo "$ac_t""no" 1>&6 | |
3664 | fi | |
3665 | ||
3666 | ||
3667 | ||
3668 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3669 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3670 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
33f8ca73 | 3671 | echo "configure:3672: checking for $ac_word" >&5 |
95ca63c4 CF |
3672 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3674 | else | |
3675 | if test -n "$WINDRES"; then | |
3676 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3677 | else | |
3678 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3679 | ac_dummy="$PATH" | |
3680 | for ac_dir in $ac_dummy; do | |
3681 | test -z "$ac_dir" && ac_dir=. | |
3682 | if test -f $ac_dir/$ac_word; then | |
3683 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3684 | break | |
3685 | fi | |
3686 | done | |
3687 | IFS="$ac_save_ifs" | |
3688 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3689 | fi | |
3690 | fi | |
3691 | WINDRES="$ac_cv_prog_WINDRES" | |
3692 | if test -n "$WINDRES"; then | |
3693 | echo "$ac_t""$WINDRES" 1>&6 | |
3694 | else | |
3695 | echo "$ac_t""no" 1>&6 | |
3696 | fi | |
3697 | ||
3698 | ||
3699 | ||
c906108c | 3700 | |
8bb2c122 | 3701 | # Needed for GNU/Hurd. |
75c6e08a MK |
3702 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3703 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3704 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
33f8ca73 | 3705 | echo "configure:3706: checking for $ac_word" >&5 |
75c6e08a MK |
3706 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3707 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3708 | else | |
3709 | if test -n "$MIG"; then | |
3710 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3711 | else | |
3712 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3713 | ac_dummy="$PATH" | |
3714 | for ac_dir in $ac_dummy; do | |
3715 | test -z "$ac_dir" && ac_dir=. | |
3716 | if test -f $ac_dir/$ac_word; then | |
3717 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3718 | break | |
3719 | fi | |
3720 | done | |
3721 | IFS="$ac_save_ifs" | |
3722 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3723 | fi | |
3724 | fi | |
3725 | MIG="$ac_cv_prog_MIG" | |
3726 | if test -n "$MIG"; then | |
3727 | echo "$ac_t""$MIG" 1>&6 | |
3728 | else | |
3729 | echo "$ac_t""no" 1>&6 | |
3730 | fi | |
3731 | ||
3732 | ||
3733 | ||
3734 | ||
9a156167 MK |
3735 | # ---------------------- # |
3736 | # Checks for libraries. # | |
3737 | # ---------------------- # | |
3738 | ||
3739 | # We might need to link with -lm; most simulators need it. | |
3740 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
33f8ca73 | 3741 | echo "configure:3742: checking for main in -lm" >&5 |
9a156167 MK |
3742 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3743 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3744 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3745 | else | |
3746 | ac_save_LIBS="$LIBS" | |
3747 | LIBS="-lm $LIBS" | |
3748 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3749 | #line 3750 "configure" |
9a156167 MK |
3750 | #include "confdefs.h" |
3751 | ||
3752 | int main() { | |
3753 | main() | |
3754 | ; return 0; } | |
3755 | EOF | |
33f8ca73 | 3756 | if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3757 | rm -rf conftest* |
3758 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3759 | else | |
3760 | echo "configure: failed program was:" >&5 | |
3761 | cat conftest.$ac_ext >&5 | |
3762 | rm -rf conftest* | |
3763 | eval "ac_cv_lib_$ac_lib_var=no" | |
3764 | fi | |
3765 | rm -f conftest* | |
3766 | LIBS="$ac_save_LIBS" | |
3767 | ||
3768 | fi | |
3769 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3770 | echo "$ac_t""yes" 1>&6 | |
3771 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3772 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3773 | cat >> confdefs.h <<EOF | |
3774 | #define $ac_tr_lib 1 | |
3775 | EOF | |
3776 | ||
3777 | LIBS="-lm $LIBS" | |
3778 | ||
3779 | else | |
3780 | echo "$ac_t""no" 1>&6 | |
3781 | fi | |
3782 | ||
3783 | ||
3784 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3785 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3786 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3787 | # is known to have this problem). Therefore we avoid libw if we can. | |
3788 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
33f8ca73 | 3789 | echo "configure:3790: checking for wctype" >&5 |
9a156167 MK |
3790 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3791 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3792 | else | |
3793 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3794 | #line 3795 "configure" |
9a156167 MK |
3795 | #include "confdefs.h" |
3796 | /* System header to define __stub macros and hopefully few prototypes, | |
3797 | which can conflict with char wctype(); below. */ | |
3798 | #include <assert.h> | |
3799 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3800 | /* We use char because int might match the return type of a gcc2 | |
3801 | builtin and then its argument prototype would still apply. */ | |
3802 | char wctype(); | |
3803 | ||
3804 | int main() { | |
3805 | ||
3806 | /* The GNU C library defines this for functions which it implements | |
3807 | to always fail with ENOSYS. Some functions are actually named | |
3808 | something starting with __ and the normal name is an alias. */ | |
3809 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3810 | choke me | |
3811 | #else | |
3812 | wctype(); | |
3813 | #endif | |
3814 | ||
3815 | ; return 0; } | |
3816 | EOF | |
33f8ca73 | 3817 | if { (eval echo configure:3818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3818 | rm -rf conftest* |
3819 | eval "ac_cv_func_wctype=yes" | |
3820 | else | |
3821 | echo "configure: failed program was:" >&5 | |
3822 | cat conftest.$ac_ext >&5 | |
3823 | rm -rf conftest* | |
3824 | eval "ac_cv_func_wctype=no" | |
3825 | fi | |
3826 | rm -f conftest* | |
3827 | fi | |
3828 | ||
3829 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3830 | echo "$ac_t""yes" 1>&6 | |
3831 | : | |
3832 | else | |
3833 | echo "$ac_t""no" 1>&6 | |
3834 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
33f8ca73 | 3835 | echo "configure:3836: checking for wctype in -lw" >&5 |
9a156167 MK |
3836 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3837 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3838 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3839 | else | |
3840 | ac_save_LIBS="$LIBS" | |
3841 | LIBS="-lw $LIBS" | |
3842 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3843 | #line 3844 "configure" |
9a156167 MK |
3844 | #include "confdefs.h" |
3845 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3846 | /* We use char because int might match the return type of a gcc2 | |
3847 | builtin and then its argument prototype would still apply. */ | |
3848 | char wctype(); | |
3849 | ||
3850 | int main() { | |
3851 | wctype() | |
3852 | ; return 0; } | |
3853 | EOF | |
33f8ca73 | 3854 | if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3855 | rm -rf conftest* |
3856 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3857 | else | |
3858 | echo "configure: failed program was:" >&5 | |
3859 | cat conftest.$ac_ext >&5 | |
3860 | rm -rf conftest* | |
3861 | eval "ac_cv_lib_$ac_lib_var=no" | |
3862 | fi | |
3863 | rm -f conftest* | |
3864 | LIBS="$ac_save_LIBS" | |
3865 | ||
3866 | fi | |
3867 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3868 | echo "$ac_t""yes" 1>&6 | |
3869 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3870 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3871 | cat >> confdefs.h <<EOF | |
3872 | #define $ac_tr_lib 1 | |
3873 | EOF | |
3874 | ||
3875 | LIBS="-lw $LIBS" | |
3876 | ||
3877 | else | |
3878 | echo "$ac_t""no" 1>&6 | |
3879 | fi | |
3880 | ||
3881 | fi | |
3882 | ||
3883 | ||
c890192f MK |
3884 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
3885 | ||
3886 | echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 | |
33f8ca73 | 3887 | echo "configure:3888: checking for library containing gethostbyname" >&5 |
c890192f MK |
3888 | if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then |
3889 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3890 | else | |
3891 | ac_func_search_save_LIBS="$LIBS" | |
3892 | ac_cv_search_gethostbyname="no" | |
3893 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3894 | #line 3895 "configure" |
c890192f MK |
3895 | #include "confdefs.h" |
3896 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3897 | /* We use char because int might match the return type of a gcc2 | |
3898 | builtin and then its argument prototype would still apply. */ | |
3899 | char gethostbyname(); | |
3900 | ||
3901 | int main() { | |
3902 | gethostbyname() | |
3903 | ; return 0; } | |
3904 | EOF | |
33f8ca73 | 3905 | if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3906 | rm -rf conftest* |
3907 | ac_cv_search_gethostbyname="none required" | |
3908 | else | |
3909 | echo "configure: failed program was:" >&5 | |
3910 | cat conftest.$ac_ext >&5 | |
3911 | fi | |
3912 | rm -f conftest* | |
3913 | test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do | |
3914 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3915 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3916 | #line 3917 "configure" |
c890192f MK |
3917 | #include "confdefs.h" |
3918 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3919 | /* We use char because int might match the return type of a gcc2 | |
3920 | builtin and then its argument prototype would still apply. */ | |
3921 | char gethostbyname(); | |
3922 | ||
3923 | int main() { | |
3924 | gethostbyname() | |
3925 | ; return 0; } | |
3926 | EOF | |
33f8ca73 | 3927 | if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c890192f MK |
3928 | rm -rf conftest* |
3929 | ac_cv_search_gethostbyname="-l$i" | |
3930 | break | |
3931 | else | |
3932 | echo "configure: failed program was:" >&5 | |
3933 | cat conftest.$ac_ext >&5 | |
3934 | fi | |
3935 | rm -f conftest* | |
3936 | done | |
3937 | LIBS="$ac_func_search_save_LIBS" | |
3938 | fi | |
3939 | ||
3940 | echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6 | |
3941 | if test "$ac_cv_search_gethostbyname" != "no"; then | |
3942 | test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" | |
3943 | ||
3944 | else : | |
3945 | ||
3946 | fi | |
3947 | ||
9a156167 MK |
3948 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
3949 | ||
3950 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
33f8ca73 | 3951 | echo "configure:3952: checking for library containing socketpair" >&5 |
9a156167 MK |
3952 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3953 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3954 | else | |
3955 | ac_func_search_save_LIBS="$LIBS" | |
3956 | ac_cv_search_socketpair="no" | |
3957 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3958 | #line 3959 "configure" |
9a156167 MK |
3959 | #include "confdefs.h" |
3960 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3961 | /* We use char because int might match the return type of a gcc2 | |
3962 | builtin and then its argument prototype would still apply. */ | |
3963 | char socketpair(); | |
3964 | ||
3965 | int main() { | |
3966 | socketpair() | |
3967 | ; return 0; } | |
3968 | EOF | |
33f8ca73 | 3969 | if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3970 | rm -rf conftest* |
3971 | ac_cv_search_socketpair="none required" | |
3972 | else | |
3973 | echo "configure: failed program was:" >&5 | |
3974 | cat conftest.$ac_ext >&5 | |
3975 | fi | |
3976 | rm -f conftest* | |
3977 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3978 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3979 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 3980 | #line 3981 "configure" |
9a156167 MK |
3981 | #include "confdefs.h" |
3982 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3983 | /* We use char because int might match the return type of a gcc2 | |
3984 | builtin and then its argument prototype would still apply. */ | |
3985 | char socketpair(); | |
3986 | ||
3987 | int main() { | |
3988 | socketpair() | |
3989 | ; return 0; } | |
3990 | EOF | |
33f8ca73 | 3991 | if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3992 | rm -rf conftest* |
3993 | ac_cv_search_socketpair="-l$i" | |
3994 | break | |
3995 | else | |
3996 | echo "configure: failed program was:" >&5 | |
3997 | cat conftest.$ac_ext >&5 | |
3998 | fi | |
3999 | rm -f conftest* | |
4000 | done | |
4001 | LIBS="$ac_func_search_save_LIBS" | |
4002 | fi | |
4003 | ||
4004 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
4005 | if test "$ac_cv_search_socketpair" != "no"; then | |
4006 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
4007 | ||
4008 | else : | |
4009 | ||
4010 | fi | |
4011 | ||
06825bd1 MK |
4012 | # Since GDB uses Readline, we need termcap functionality, so we need |
4013 | # to find a library that provides that. When GDB is configured with | |
4014 | # --enable-tui, we need full curses functionality. | |
4015 | # | |
4016 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
4017 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
4018 | # Makefile fragments. That's why we need to have `Hcurses' before | |
4019 | # `curses'. I don't see why we should use HP curses if a more | |
4020 | # standard curses is available, except that according to HP's | |
4021 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
4022 | # HP-UX 10.10 and 10.20. | |
4023 | ||
4024 | if test "$need_curses" = yes; then | |
4025 | ||
4026 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
33f8ca73 | 4027 | echo "configure:4028: checking for library containing initscr" >&5 |
06825bd1 MK |
4028 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
4029 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4030 | else | |
4031 | ac_func_search_save_LIBS="$LIBS" | |
4032 | ac_cv_search_initscr="no" | |
4033 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4034 | #line 4035 "configure" |
06825bd1 MK |
4035 | #include "confdefs.h" |
4036 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4037 | /* We use char because int might match the return type of a gcc2 | |
4038 | builtin and then its argument prototype would still apply. */ | |
4039 | char initscr(); | |
4040 | ||
4041 | int main() { | |
4042 | initscr() | |
4043 | ; return 0; } | |
4044 | EOF | |
33f8ca73 | 4045 | if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4046 | rm -rf conftest* |
4047 | ac_cv_search_initscr="none required" | |
4048 | else | |
4049 | echo "configure: failed program was:" >&5 | |
4050 | cat conftest.$ac_ext >&5 | |
4051 | fi | |
4052 | rm -f conftest* | |
4053 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
4054 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4055 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4056 | #line 4057 "configure" |
06825bd1 MK |
4057 | #include "confdefs.h" |
4058 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4059 | /* We use char because int might match the return type of a gcc2 | |
4060 | builtin and then its argument prototype would still apply. */ | |
4061 | char initscr(); | |
4062 | ||
4063 | int main() { | |
4064 | initscr() | |
4065 | ; return 0; } | |
4066 | EOF | |
33f8ca73 | 4067 | if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4068 | rm -rf conftest* |
4069 | ac_cv_search_initscr="-l$i" | |
4070 | break | |
4071 | else | |
4072 | echo "configure: failed program was:" >&5 | |
4073 | cat conftest.$ac_ext >&5 | |
4074 | fi | |
4075 | rm -f conftest* | |
4076 | done | |
4077 | LIBS="$ac_func_search_save_LIBS" | |
4078 | fi | |
4079 | ||
4080 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
4081 | if test "$ac_cv_search_initscr" != "no"; then | |
4082 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
4083 | ||
4084 | else : | |
4085 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
4086 | fi | |
4087 | fi | |
4088 | ||
4089 | case $host_os in | |
4090 | cygwin*) | |
4091 | if test -d $srcdir/libtermcap; then | |
4092 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
4093 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
4094 | fi ;; | |
40a7debc | 4095 | go32* | *djgpp*) |
06825bd1 MK |
4096 | ac_cv_search_tgetent="none required" |
4097 | ;; | |
4098 | aix*) | |
4099 | # Readline prefers curses over termcap on AIX. | |
4100 | # ??? Why? | |
4101 | ||
4102 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
33f8ca73 | 4103 | echo "configure:4104: checking for library containing tgetent" >&5 |
06825bd1 MK |
4104 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4105 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4106 | else | |
4107 | ac_func_search_save_LIBS="$LIBS" | |
4108 | ac_cv_search_tgetent="no" | |
4109 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4110 | #line 4111 "configure" |
06825bd1 MK |
4111 | #include "confdefs.h" |
4112 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4113 | /* We use char because int might match the return type of a gcc2 | |
4114 | builtin and then its argument prototype would still apply. */ | |
4115 | char tgetent(); | |
4116 | ||
4117 | int main() { | |
4118 | tgetent() | |
4119 | ; return 0; } | |
4120 | EOF | |
33f8ca73 | 4121 | if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4122 | rm -rf conftest* |
4123 | ac_cv_search_tgetent="none required" | |
4124 | else | |
4125 | echo "configure: failed program was:" >&5 | |
4126 | cat conftest.$ac_ext >&5 | |
4127 | fi | |
4128 | rm -f conftest* | |
4129 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
4130 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4131 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4132 | #line 4133 "configure" |
06825bd1 MK |
4133 | #include "confdefs.h" |
4134 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4135 | /* We use char because int might match the return type of a gcc2 | |
4136 | builtin and then its argument prototype would still apply. */ | |
4137 | char tgetent(); | |
4138 | ||
4139 | int main() { | |
4140 | tgetent() | |
4141 | ; return 0; } | |
4142 | EOF | |
33f8ca73 | 4143 | if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4144 | rm -rf conftest* |
4145 | ac_cv_search_tgetent="-l$i" | |
4146 | break | |
4147 | else | |
4148 | echo "configure: failed program was:" >&5 | |
4149 | cat conftest.$ac_ext >&5 | |
4150 | fi | |
4151 | rm -f conftest* | |
4152 | done | |
4153 | LIBS="$ac_func_search_save_LIBS" | |
4154 | fi | |
4155 | ||
4156 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4157 | if test "$ac_cv_search_tgetent" != "no"; then | |
4158 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4159 | ||
4160 | else : | |
4161 | ||
4162 | fi | |
4163 | ;; | |
4164 | esac | |
4165 | ||
4166 | # Note: We used to check for libtermlib and libterminfo too, but | |
4167 | # Readline doesn't, so I think we're safe with leaving them out. | |
4168 | ||
4169 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
33f8ca73 | 4170 | echo "configure:4171: checking for library containing tgetent" >&5 |
06825bd1 MK |
4171 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
4172 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4173 | else | |
4174 | ac_func_search_save_LIBS="$LIBS" | |
4175 | ac_cv_search_tgetent="no" | |
4176 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4177 | #line 4178 "configure" |
06825bd1 MK |
4178 | #include "confdefs.h" |
4179 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4180 | /* We use char because int might match the return type of a gcc2 | |
4181 | builtin and then its argument prototype would still apply. */ | |
4182 | char tgetent(); | |
4183 | ||
4184 | int main() { | |
4185 | tgetent() | |
4186 | ; return 0; } | |
4187 | EOF | |
33f8ca73 | 4188 | if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4189 | rm -rf conftest* |
4190 | ac_cv_search_tgetent="none required" | |
4191 | else | |
4192 | echo "configure: failed program was:" >&5 | |
4193 | cat conftest.$ac_ext >&5 | |
4194 | fi | |
4195 | rm -f conftest* | |
4196 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
4197 | LIBS="-l$i $ac_func_search_save_LIBS" | |
4198 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4199 | #line 4200 "configure" |
06825bd1 MK |
4200 | #include "confdefs.h" |
4201 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4202 | /* We use char because int might match the return type of a gcc2 | |
4203 | builtin and then its argument prototype would still apply. */ | |
4204 | char tgetent(); | |
4205 | ||
4206 | int main() { | |
4207 | tgetent() | |
4208 | ; return 0; } | |
4209 | EOF | |
33f8ca73 | 4210 | if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
4211 | rm -rf conftest* |
4212 | ac_cv_search_tgetent="-l$i" | |
4213 | break | |
4214 | else | |
4215 | echo "configure: failed program was:" >&5 | |
4216 | cat conftest.$ac_ext >&5 | |
4217 | fi | |
4218 | rm -f conftest* | |
4219 | done | |
4220 | LIBS="$ac_func_search_save_LIBS" | |
4221 | fi | |
4222 | ||
4223 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
4224 | if test "$ac_cv_search_tgetent" != "no"; then | |
4225 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
4226 | ||
4227 | else : | |
4228 | ||
4229 | fi | |
4230 | ||
4231 | if test "$ac_cv_search_tgetent" = no; then | |
4232 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
4233 | fi | |
4234 | ||
5ee754fc MK |
4235 | # ------------------------- # |
4236 | # Checks for header files. # | |
4237 | # ------------------------- # | |
4238 | ||
4239 | ac_header_dirent=no | |
4240 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4241 | do | |
4242 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4243 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
33f8ca73 | 4244 | echo "configure:4245: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 4245 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
4246 | echo $ac_n "(cached) $ac_c" 1>&6 |
4247 | else | |
4248 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4249 | #line 4250 "configure" |
c906108c SS |
4250 | #include "confdefs.h" |
4251 | #include <sys/types.h> | |
5ee754fc MK |
4252 | #include <$ac_hdr> |
4253 | int main() { | |
4254 | DIR *dirp = 0; | |
4255 | ; return 0; } | |
4256 | EOF | |
33f8ca73 | 4257 | if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4258 | rm -rf conftest* |
4259 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4260 | else | |
4261 | echo "configure: failed program was:" >&5 | |
4262 | cat conftest.$ac_ext >&5 | |
4263 | rm -rf conftest* | |
4264 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4265 | fi | |
4266 | rm -f conftest* | |
4267 | fi | |
4268 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4269 | echo "$ac_t""yes" 1>&6 | |
4270 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4271 | cat >> confdefs.h <<EOF | |
4272 | #define $ac_tr_hdr 1 | |
4273 | EOF | |
4274 | ac_header_dirent=$ac_hdr; break | |
4275 | else | |
4276 | echo "$ac_t""no" 1>&6 | |
4277 | fi | |
4278 | done | |
4279 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4280 | if test $ac_header_dirent = dirent.h; then | |
4281 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
33f8ca73 | 4282 | echo "configure:4283: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4283 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4284 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4285 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4286 | else | |
4287 | ac_save_LIBS="$LIBS" | |
4288 | LIBS="-ldir $LIBS" | |
4289 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4290 | #line 4291 "configure" |
5ee754fc MK |
4291 | #include "confdefs.h" |
4292 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4293 | /* We use char because int might match the return type of a gcc2 | |
4294 | builtin and then its argument prototype would still apply. */ | |
4295 | char opendir(); | |
c906108c SS |
4296 | |
4297 | int main() { | |
5ee754fc | 4298 | opendir() |
c906108c SS |
4299 | ; return 0; } |
4300 | EOF | |
33f8ca73 | 4301 | if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4302 | rm -rf conftest* |
5ee754fc | 4303 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4304 | else |
4305 | echo "configure: failed program was:" >&5 | |
4306 | cat conftest.$ac_ext >&5 | |
4307 | rm -rf conftest* | |
5ee754fc | 4308 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4309 | fi |
4310 | rm -f conftest* | |
5ee754fc MK |
4311 | LIBS="$ac_save_LIBS" |
4312 | ||
4313 | fi | |
4314 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4315 | echo "$ac_t""yes" 1>&6 | |
4316 | LIBS="$LIBS -ldir" | |
4317 | else | |
4318 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4319 | fi |
4320 | ||
5ee754fc MK |
4321 | else |
4322 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
33f8ca73 | 4323 | echo "configure:4324: checking for opendir in -lx" >&5 |
5ee754fc MK |
4324 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4325 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4326 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4327 | else | |
4328 | ac_save_LIBS="$LIBS" | |
4329 | LIBS="-lx $LIBS" | |
4330 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4331 | #line 4332 "configure" |
5ee754fc MK |
4332 | #include "confdefs.h" |
4333 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4334 | /* We use char because int might match the return type of a gcc2 | |
4335 | builtin and then its argument prototype would still apply. */ | |
4336 | char opendir(); | |
4337 | ||
4338 | int main() { | |
4339 | opendir() | |
4340 | ; return 0; } | |
c906108c | 4341 | EOF |
33f8ca73 | 4342 | if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4343 | rm -rf conftest* |
4344 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4345 | else | |
4346 | echo "configure: failed program was:" >&5 | |
4347 | cat conftest.$ac_ext >&5 | |
4348 | rm -rf conftest* | |
4349 | eval "ac_cv_lib_$ac_lib_var=no" | |
4350 | fi | |
4351 | rm -f conftest* | |
4352 | LIBS="$ac_save_LIBS" | |
c906108c | 4353 | |
5ee754fc MK |
4354 | fi |
4355 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4356 | echo "$ac_t""yes" 1>&6 | |
4357 | LIBS="$LIBS -lx" | |
4358 | else | |
4359 | echo "$ac_t""no" 1>&6 | |
4360 | fi | |
c906108c | 4361 | |
5ee754fc | 4362 | fi |
c906108c | 4363 | |
5ee754fc | 4364 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
33f8ca73 | 4365 | echo "configure:4366: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4366 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4367 | echo $ac_n "(cached) $ac_c" 1>&6 |
4368 | else | |
4369 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4370 | #line 4371 "configure" |
9608ab8b MK |
4371 | #include "confdefs.h" |
4372 | #include <sys/types.h> | |
5ee754fc MK |
4373 | #include <sys/stat.h> |
4374 | ||
4375 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4376 | # if S_ISBLK (S_IFDIR) | |
4377 | You lose. | |
4378 | # endif | |
4379 | #endif | |
4380 | ||
4381 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4382 | # if S_ISBLK (S_IFCHR) | |
4383 | You lose. | |
4384 | # endif | |
4385 | #endif | |
4386 | ||
4387 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4388 | # if S_ISLNK (S_IFREG) | |
4389 | You lose. | |
4390 | # endif | |
4391 | #endif | |
4392 | ||
4393 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4394 | # if S_ISSOCK (S_IFREG) | |
4395 | You lose. | |
4396 | # endif | |
4397 | #endif | |
4398 | ||
9608ab8b | 4399 | EOF |
5ee754fc MK |
4400 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4401 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4402 | rm -rf conftest* |
5ee754fc MK |
4403 | ac_cv_header_stat_broken=yes |
4404 | else | |
4405 | rm -rf conftest* | |
4406 | ac_cv_header_stat_broken=no | |
4407 | fi | |
4408 | rm -f conftest* | |
4409 | ||
4410 | fi | |
4411 | ||
4412 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4413 | if test $ac_cv_header_stat_broken = yes; then | |
4414 | cat >> confdefs.h <<\EOF | |
4415 | #define STAT_MACROS_BROKEN 1 | |
4416 | EOF | |
4417 | ||
4418 | fi | |
4419 | ||
4420 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
33f8ca73 | 4421 | echo "configure:4422: checking for ANSI C header files" >&5 |
5ee754fc MK |
4422 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4423 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4424 | else | |
4425 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4426 | #line 4427 "configure" |
5ee754fc MK |
4427 | #include "confdefs.h" |
4428 | #include <stdlib.h> | |
4429 | #include <stdarg.h> | |
4430 | #include <string.h> | |
4431 | #include <float.h> | |
4432 | EOF | |
4433 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4434 | { (eval echo configure:4435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4435 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4436 | if test -z "$ac_err"; then | |
4437 | rm -rf conftest* | |
4438 | ac_cv_header_stdc=yes | |
4439 | else | |
4440 | echo "$ac_err" >&5 | |
4441 | echo "configure: failed program was:" >&5 | |
4442 | cat conftest.$ac_ext >&5 | |
4443 | rm -rf conftest* | |
4444 | ac_cv_header_stdc=no | |
4445 | fi | |
4446 | rm -f conftest* | |
4447 | ||
4448 | if test $ac_cv_header_stdc = yes; then | |
4449 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4450 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4451 | #line 4452 "configure" |
5ee754fc MK |
4452 | #include "confdefs.h" |
4453 | #include <string.h> | |
4454 | EOF | |
4455 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4456 | egrep "memchr" >/dev/null 2>&1; then | |
4457 | : | |
4458 | else | |
4459 | rm -rf conftest* | |
4460 | ac_cv_header_stdc=no | |
4461 | fi | |
4462 | rm -f conftest* | |
4463 | ||
4464 | fi | |
4465 | ||
4466 | if test $ac_cv_header_stdc = yes; then | |
4467 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4468 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4469 | #line 4470 "configure" |
5ee754fc MK |
4470 | #include "confdefs.h" |
4471 | #include <stdlib.h> | |
4472 | EOF | |
4473 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4474 | egrep "free" >/dev/null 2>&1; then | |
4475 | : | |
4476 | else | |
4477 | rm -rf conftest* | |
4478 | ac_cv_header_stdc=no | |
4479 | fi | |
4480 | rm -f conftest* | |
4481 | ||
4482 | fi | |
4483 | ||
4484 | if test $ac_cv_header_stdc = yes; then | |
4485 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4486 | if test "$cross_compiling" = yes; then | |
4487 | : | |
4488 | else | |
4489 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4490 | #line 4491 "configure" |
5ee754fc MK |
4491 | #include "confdefs.h" |
4492 | #include <ctype.h> | |
4493 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4494 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4495 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4496 | int main () { int i; for (i = 0; i < 256; i++) | |
4497 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4498 | exit (0); } | |
4499 | ||
4500 | EOF | |
33f8ca73 | 4501 | if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4502 | then |
4503 | : | |
9608ab8b | 4504 | else |
5ee754fc MK |
4505 | echo "configure: failed program was:" >&5 |
4506 | cat conftest.$ac_ext >&5 | |
4507 | rm -fr conftest* | |
4508 | ac_cv_header_stdc=no | |
4509 | fi | |
4510 | rm -fr conftest* | |
4511 | fi | |
4512 | ||
4513 | fi | |
4514 | fi | |
4515 | ||
4516 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4517 | if test $ac_cv_header_stdc = yes; then | |
4518 | cat >> confdefs.h <<\EOF | |
4519 | #define STDC_HEADERS 1 | |
4520 | EOF | |
4521 | ||
4522 | fi | |
4523 | ||
4524 | for ac_hdr in link.h | |
4525 | do | |
4526 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4527 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4528 | echo "configure:4529: checking for $ac_hdr" >&5 |
5ee754fc MK |
4529 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4530 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4531 | else | |
4532 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4533 | #line 4534 "configure" |
5ee754fc MK |
4534 | #include "confdefs.h" |
4535 | #include <$ac_hdr> | |
4536 | EOF | |
4537 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4538 | { (eval echo configure:4539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4539 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4540 | if test -z "$ac_err"; then | |
4541 | rm -rf conftest* | |
4542 | eval "ac_cv_header_$ac_safe=yes" | |
4543 | else | |
4544 | echo "$ac_err" >&5 | |
4545 | echo "configure: failed program was:" >&5 | |
4546 | cat conftest.$ac_ext >&5 | |
4547 | rm -rf conftest* | |
4548 | eval "ac_cv_header_$ac_safe=no" | |
4549 | fi | |
4550 | rm -f conftest* | |
4551 | fi | |
4552 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4553 | echo "$ac_t""yes" 1>&6 | |
4554 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4555 | cat >> confdefs.h <<EOF | |
4556 | #define $ac_tr_hdr 1 | |
4557 | EOF | |
4558 | ||
4559 | else | |
4560 | echo "$ac_t""no" 1>&6 | |
4561 | fi | |
4562 | done | |
4563 | ||
78434e59 | 4564 | for ac_hdr in machine/reg.h |
5ee754fc MK |
4565 | do |
4566 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4567 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4568 | echo "configure:4569: checking for $ac_hdr" >&5 |
5ee754fc MK |
4569 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4570 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4571 | else | |
4572 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4573 | #line 4574 "configure" |
5ee754fc MK |
4574 | #include "confdefs.h" |
4575 | #include <$ac_hdr> | |
4576 | EOF | |
4577 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4578 | { (eval echo configure:4579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4579 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4580 | if test -z "$ac_err"; then | |
4581 | rm -rf conftest* | |
4582 | eval "ac_cv_header_$ac_safe=yes" | |
4583 | else | |
4584 | echo "$ac_err" >&5 | |
4585 | echo "configure: failed program was:" >&5 | |
4586 | cat conftest.$ac_ext >&5 | |
4587 | rm -rf conftest* | |
4588 | eval "ac_cv_header_$ac_safe=no" | |
4589 | fi | |
4590 | rm -f conftest* | |
4591 | fi | |
4592 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4593 | echo "$ac_t""yes" 1>&6 | |
4594 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4595 | cat >> confdefs.h <<EOF | |
4596 | #define $ac_tr_hdr 1 | |
4597 | EOF | |
4598 | ||
4599 | else | |
4600 | echo "$ac_t""no" 1>&6 | |
4601 | fi | |
4602 | done | |
4603 | ||
78434e59 | 4604 | for ac_hdr in nlist.h |
5ee754fc MK |
4605 | do |
4606 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4607 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4608 | echo "configure:4609: checking for $ac_hdr" >&5 |
5ee754fc MK |
4609 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4611 | else | |
4612 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4613 | #line 4614 "configure" |
5ee754fc MK |
4614 | #include "confdefs.h" |
4615 | #include <$ac_hdr> | |
4616 | EOF | |
4617 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4618 | { (eval echo configure:4619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4619 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4620 | if test -z "$ac_err"; then | |
4621 | rm -rf conftest* | |
4622 | eval "ac_cv_header_$ac_safe=yes" | |
4623 | else | |
4624 | echo "$ac_err" >&5 | |
4625 | echo "configure: failed program was:" >&5 | |
4626 | cat conftest.$ac_ext >&5 | |
4627 | rm -rf conftest* | |
4628 | eval "ac_cv_header_$ac_safe=no" | |
4629 | fi | |
4630 | rm -f conftest* | |
4631 | fi | |
4632 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4633 | echo "$ac_t""yes" 1>&6 | |
4634 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4635 | cat >> confdefs.h <<EOF | |
4636 | #define $ac_tr_hdr 1 | |
4637 | EOF | |
4638 | ||
4639 | else | |
4640 | echo "$ac_t""no" 1>&6 | |
4641 | fi | |
4642 | done | |
4643 | ||
78434e59 | 4644 | for ac_hdr in poll.h sys/poll.h |
5ee754fc MK |
4645 | do |
4646 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4647 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4648 | echo "configure:4649: checking for $ac_hdr" >&5 |
5ee754fc MK |
4649 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4650 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4651 | else | |
4652 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4653 | #line 4654 "configure" |
5ee754fc MK |
4654 | #include "confdefs.h" |
4655 | #include <$ac_hdr> | |
4656 | EOF | |
4657 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4658 | { (eval echo configure:4659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4659 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4660 | if test -z "$ac_err"; then | |
4661 | rm -rf conftest* | |
4662 | eval "ac_cv_header_$ac_safe=yes" | |
4663 | else | |
4664 | echo "$ac_err" >&5 | |
4665 | echo "configure: failed program was:" >&5 | |
4666 | cat conftest.$ac_ext >&5 | |
4667 | rm -rf conftest* | |
4668 | eval "ac_cv_header_$ac_safe=no" | |
4669 | fi | |
4670 | rm -f conftest* | |
4671 | fi | |
4672 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4673 | echo "$ac_t""yes" 1>&6 | |
4674 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4675 | cat >> confdefs.h <<EOF | |
4676 | #define $ac_tr_hdr 1 | |
4677 | EOF | |
4678 | ||
4679 | else | |
4680 | echo "$ac_t""no" 1>&6 | |
4681 | fi | |
4682 | done | |
4683 | ||
78434e59 | 4684 | for ac_hdr in proc_service.h thread_db.h |
5ee754fc MK |
4685 | do |
4686 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4687 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4688 | echo "configure:4689: checking for $ac_hdr" >&5 |
5ee754fc MK |
4689 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4690 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4691 | else | |
4692 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4693 | #line 4694 "configure" |
5ee754fc MK |
4694 | #include "confdefs.h" |
4695 | #include <$ac_hdr> | |
4696 | EOF | |
4697 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4698 | { (eval echo configure:4699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4699 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4700 | if test -z "$ac_err"; then | |
4701 | rm -rf conftest* | |
4702 | eval "ac_cv_header_$ac_safe=yes" | |
4703 | else | |
4704 | echo "$ac_err" >&5 | |
4705 | echo "configure: failed program was:" >&5 | |
4706 | cat conftest.$ac_ext >&5 | |
4707 | rm -rf conftest* | |
4708 | eval "ac_cv_header_$ac_safe=no" | |
4709 | fi | |
4710 | rm -f conftest* | |
4711 | fi | |
4712 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4713 | echo "$ac_t""yes" 1>&6 | |
4714 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4715 | cat >> confdefs.h <<EOF | |
4716 | #define $ac_tr_hdr 1 | |
4717 | EOF | |
4718 | ||
4719 | else | |
4720 | echo "$ac_t""no" 1>&6 | |
4721 | fi | |
4722 | done | |
4723 | ||
78434e59 | 4724 | for ac_hdr in stddef.h |
5ee754fc MK |
4725 | do |
4726 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4727 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4728 | echo "configure:4729: checking for $ac_hdr" >&5 |
5ee754fc MK |
4729 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4730 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4731 | else | |
4732 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4733 | #line 4734 "configure" |
5ee754fc MK |
4734 | #include "confdefs.h" |
4735 | #include <$ac_hdr> | |
4736 | EOF | |
4737 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4738 | { (eval echo configure:4739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4739 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4740 | if test -z "$ac_err"; then | |
4741 | rm -rf conftest* | |
4742 | eval "ac_cv_header_$ac_safe=yes" | |
4743 | else | |
4744 | echo "$ac_err" >&5 | |
4745 | echo "configure: failed program was:" >&5 | |
4746 | cat conftest.$ac_ext >&5 | |
4747 | rm -rf conftest* | |
4748 | eval "ac_cv_header_$ac_safe=no" | |
4749 | fi | |
4750 | rm -f conftest* | |
4751 | fi | |
4752 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4753 | echo "$ac_t""yes" 1>&6 | |
4754 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4755 | cat >> confdefs.h <<EOF | |
4756 | #define $ac_tr_hdr 1 | |
4757 | EOF | |
4758 | ||
4759 | else | |
4760 | echo "$ac_t""no" 1>&6 | |
4761 | fi | |
4762 | done | |
4763 | ||
78434e59 | 4764 | for ac_hdr in stdlib.h |
5ee754fc MK |
4765 | do |
4766 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4767 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4768 | echo "configure:4769: checking for $ac_hdr" >&5 |
5ee754fc MK |
4769 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4771 | else | |
4772 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4773 | #line 4774 "configure" |
5ee754fc MK |
4774 | #include "confdefs.h" |
4775 | #include <$ac_hdr> | |
4776 | EOF | |
4777 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4778 | { (eval echo configure:4779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4779 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4780 | if test -z "$ac_err"; then | |
4781 | rm -rf conftest* | |
4782 | eval "ac_cv_header_$ac_safe=yes" | |
4783 | else | |
4784 | echo "$ac_err" >&5 | |
4785 | echo "configure: failed program was:" >&5 | |
4786 | cat conftest.$ac_ext >&5 | |
4787 | rm -rf conftest* | |
4788 | eval "ac_cv_header_$ac_safe=no" | |
4789 | fi | |
4790 | rm -f conftest* | |
4791 | fi | |
4792 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4793 | echo "$ac_t""yes" 1>&6 | |
4794 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4795 | cat >> confdefs.h <<EOF | |
4796 | #define $ac_tr_hdr 1 | |
4797 | EOF | |
4798 | ||
4799 | else | |
4800 | echo "$ac_t""no" 1>&6 | |
4801 | fi | |
4802 | done | |
4803 | ||
78434e59 | 4804 | for ac_hdr in stdint.h |
5ee754fc MK |
4805 | do |
4806 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4807 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4808 | echo "configure:4809: checking for $ac_hdr" >&5 |
5ee754fc MK |
4809 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4810 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4811 | else | |
4812 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4813 | #line 4814 "configure" |
5ee754fc MK |
4814 | #include "confdefs.h" |
4815 | #include <$ac_hdr> | |
4816 | EOF | |
4817 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4818 | { (eval echo configure:4819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4819 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4820 | if test -z "$ac_err"; then | |
4821 | rm -rf conftest* | |
4822 | eval "ac_cv_header_$ac_safe=yes" | |
4823 | else | |
4824 | echo "$ac_err" >&5 | |
4825 | echo "configure: failed program was:" >&5 | |
4826 | cat conftest.$ac_ext >&5 | |
4827 | rm -rf conftest* | |
4828 | eval "ac_cv_header_$ac_safe=no" | |
4829 | fi | |
4830 | rm -f conftest* | |
4831 | fi | |
4832 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4833 | echo "$ac_t""yes" 1>&6 | |
4834 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4835 | cat >> confdefs.h <<EOF | |
4836 | #define $ac_tr_hdr 1 | |
4837 | EOF | |
4838 | ||
4839 | else | |
4840 | echo "$ac_t""no" 1>&6 | |
4841 | fi | |
4842 | done | |
4843 | ||
78434e59 | 4844 | for ac_hdr in string.h memory.h strings.h |
5ee754fc MK |
4845 | do |
4846 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4847 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4848 | echo "configure:4849: checking for $ac_hdr" >&5 |
5ee754fc MK |
4849 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4851 | else | |
4852 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4853 | #line 4854 "configure" |
5ee754fc MK |
4854 | #include "confdefs.h" |
4855 | #include <$ac_hdr> | |
4856 | EOF | |
4857 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4858 | { (eval echo configure:4859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4859 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4860 | if test -z "$ac_err"; then | |
4861 | rm -rf conftest* | |
4862 | eval "ac_cv_header_$ac_safe=yes" | |
4863 | else | |
4864 | echo "$ac_err" >&5 | |
4865 | echo "configure: failed program was:" >&5 | |
4866 | cat conftest.$ac_ext >&5 | |
4867 | rm -rf conftest* | |
4868 | eval "ac_cv_header_$ac_safe=no" | |
4869 | fi | |
4870 | rm -f conftest* | |
4871 | fi | |
4872 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4873 | echo "$ac_t""yes" 1>&6 | |
4874 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4875 | cat >> confdefs.h <<EOF | |
4876 | #define $ac_tr_hdr 1 | |
4877 | EOF | |
4878 | ||
4879 | else | |
4880 | echo "$ac_t""no" 1>&6 | |
4881 | fi | |
4882 | done | |
4883 | ||
78434e59 | 4884 | for ac_hdr in sys/fault.h |
5ee754fc MK |
4885 | do |
4886 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4887 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4888 | echo "configure:4889: checking for $ac_hdr" >&5 |
5ee754fc MK |
4889 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4890 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4891 | else | |
4892 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4893 | #line 4894 "configure" |
5ee754fc MK |
4894 | #include "confdefs.h" |
4895 | #include <$ac_hdr> | |
4896 | EOF | |
4897 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4898 | { (eval echo configure:4899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4899 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4900 | if test -z "$ac_err"; then | |
4901 | rm -rf conftest* | |
4902 | eval "ac_cv_header_$ac_safe=yes" | |
4903 | else | |
4904 | echo "$ac_err" >&5 | |
4905 | echo "configure: failed program was:" >&5 | |
4906 | cat conftest.$ac_ext >&5 | |
4907 | rm -rf conftest* | |
4908 | eval "ac_cv_header_$ac_safe=no" | |
4909 | fi | |
4910 | rm -f conftest* | |
4911 | fi | |
4912 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4913 | echo "$ac_t""yes" 1>&6 | |
4914 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4915 | cat >> confdefs.h <<EOF | |
4916 | #define $ac_tr_hdr 1 | |
4917 | EOF | |
4918 | ||
4919 | else | |
4920 | echo "$ac_t""no" 1>&6 | |
4921 | fi | |
4922 | done | |
4923 | ||
78434e59 | 4924 | for ac_hdr in sys/file.h |
5ee754fc MK |
4925 | do |
4926 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4927 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4928 | echo "configure:4929: checking for $ac_hdr" >&5 |
5ee754fc MK |
4929 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4931 | else | |
4932 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4933 | #line 4934 "configure" |
5ee754fc MK |
4934 | #include "confdefs.h" |
4935 | #include <$ac_hdr> | |
4936 | EOF | |
4937 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4938 | { (eval echo configure:4939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4939 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4940 | if test -z "$ac_err"; then | |
4941 | rm -rf conftest* | |
4942 | eval "ac_cv_header_$ac_safe=yes" | |
4943 | else | |
4944 | echo "$ac_err" >&5 | |
4945 | echo "configure: failed program was:" >&5 | |
4946 | cat conftest.$ac_ext >&5 | |
4947 | rm -rf conftest* | |
4948 | eval "ac_cv_header_$ac_safe=no" | |
4949 | fi | |
4950 | rm -f conftest* | |
4951 | fi | |
4952 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4953 | echo "$ac_t""yes" 1>&6 | |
4954 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4955 | cat >> confdefs.h <<EOF | |
4956 | #define $ac_tr_hdr 1 | |
4957 | EOF | |
4958 | ||
4959 | else | |
4960 | echo "$ac_t""no" 1>&6 | |
4961 | fi | |
4962 | done | |
4963 | ||
78434e59 | 4964 | for ac_hdr in sys/filio.h |
5ee754fc MK |
4965 | do |
4966 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4967 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 4968 | echo "configure:4969: checking for $ac_hdr" >&5 |
5ee754fc MK |
4969 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4970 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4971 | else | |
4972 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 4973 | #line 4974 "configure" |
5ee754fc MK |
4974 | #include "confdefs.h" |
4975 | #include <$ac_hdr> | |
4976 | EOF | |
4977 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 4978 | { (eval echo configure:4979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4979 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4980 | if test -z "$ac_err"; then | |
4981 | rm -rf conftest* | |
4982 | eval "ac_cv_header_$ac_safe=yes" | |
4983 | else | |
4984 | echo "$ac_err" >&5 | |
4985 | echo "configure: failed program was:" >&5 | |
4986 | cat conftest.$ac_ext >&5 | |
4987 | rm -rf conftest* | |
4988 | eval "ac_cv_header_$ac_safe=no" | |
4989 | fi | |
4990 | rm -f conftest* | |
4991 | fi | |
4992 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4993 | echo "$ac_t""yes" 1>&6 | |
4994 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4995 | cat >> confdefs.h <<EOF | |
4996 | #define $ac_tr_hdr 1 | |
4997 | EOF | |
4998 | ||
4999 | else | |
5000 | echo "$ac_t""no" 1>&6 | |
5001 | fi | |
5002 | done | |
5003 | ||
78434e59 | 5004 | for ac_hdr in sys/ioctl.h |
5ee754fc MK |
5005 | do |
5006 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5007 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5008 | echo "configure:5009: checking for $ac_hdr" >&5 |
5ee754fc MK |
5009 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5010 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5011 | else | |
5012 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5013 | #line 5014 "configure" |
5ee754fc MK |
5014 | #include "confdefs.h" |
5015 | #include <$ac_hdr> | |
5016 | EOF | |
5017 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5018 | { (eval echo configure:5019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5019 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5020 | if test -z "$ac_err"; then | |
5021 | rm -rf conftest* | |
5022 | eval "ac_cv_header_$ac_safe=yes" | |
5023 | else | |
5024 | echo "$ac_err" >&5 | |
5025 | echo "configure: failed program was:" >&5 | |
5026 | cat conftest.$ac_ext >&5 | |
5027 | rm -rf conftest* | |
5028 | eval "ac_cv_header_$ac_safe=no" | |
5029 | fi | |
5030 | rm -f conftest* | |
5031 | fi | |
5032 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5033 | echo "$ac_t""yes" 1>&6 | |
5034 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5035 | cat >> confdefs.h <<EOF | |
5036 | #define $ac_tr_hdr 1 | |
5037 | EOF | |
5038 | ||
5039 | else | |
5040 | echo "$ac_t""no" 1>&6 | |
5041 | fi | |
5042 | done | |
5043 | ||
78434e59 | 5044 | for ac_hdr in sys/param.h |
5ee754fc MK |
5045 | do |
5046 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5047 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5048 | echo "configure:5049: checking for $ac_hdr" >&5 |
5ee754fc MK |
5049 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5050 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5051 | else | |
5052 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5053 | #line 5054 "configure" |
5ee754fc MK |
5054 | #include "confdefs.h" |
5055 | #include <$ac_hdr> | |
5056 | EOF | |
5057 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5058 | { (eval echo configure:5059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5059 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5060 | if test -z "$ac_err"; then | |
5061 | rm -rf conftest* | |
5062 | eval "ac_cv_header_$ac_safe=yes" | |
5063 | else | |
5064 | echo "$ac_err" >&5 | |
5065 | echo "configure: failed program was:" >&5 | |
5066 | cat conftest.$ac_ext >&5 | |
5067 | rm -rf conftest* | |
5068 | eval "ac_cv_header_$ac_safe=no" | |
5069 | fi | |
5070 | rm -f conftest* | |
5071 | fi | |
5072 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5073 | echo "$ac_t""yes" 1>&6 | |
5074 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5075 | cat >> confdefs.h <<EOF | |
5076 | #define $ac_tr_hdr 1 | |
5077 | EOF | |
5078 | ||
5079 | else | |
5080 | echo "$ac_t""no" 1>&6 | |
5081 | fi | |
5082 | done | |
5083 | ||
78434e59 | 5084 | for ac_hdr in sys/proc.h |
5ee754fc MK |
5085 | do |
5086 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5087 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5088 | echo "configure:5089: checking for $ac_hdr" >&5 |
5ee754fc MK |
5089 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5091 | else | |
5092 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5093 | #line 5094 "configure" |
5ee754fc MK |
5094 | #include "confdefs.h" |
5095 | #include <$ac_hdr> | |
5096 | EOF | |
5097 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5098 | { (eval echo configure:5099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5099 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5100 | if test -z "$ac_err"; then | |
5101 | rm -rf conftest* | |
5102 | eval "ac_cv_header_$ac_safe=yes" | |
5103 | else | |
5104 | echo "$ac_err" >&5 | |
5105 | echo "configure: failed program was:" >&5 | |
5106 | cat conftest.$ac_ext >&5 | |
5107 | rm -rf conftest* | |
5108 | eval "ac_cv_header_$ac_safe=no" | |
5109 | fi | |
5110 | rm -f conftest* | |
5111 | fi | |
5112 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5113 | echo "$ac_t""yes" 1>&6 | |
5114 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5115 | cat >> confdefs.h <<EOF | |
5116 | #define $ac_tr_hdr 1 | |
5117 | EOF | |
5118 | ||
5119 | else | |
5120 | echo "$ac_t""no" 1>&6 | |
5121 | fi | |
5122 | done | |
5123 | ||
78434e59 | 5124 | for ac_hdr in sys/procfs.h |
5ee754fc MK |
5125 | do |
5126 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5127 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5128 | echo "configure:5129: checking for $ac_hdr" >&5 |
5ee754fc MK |
5129 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5130 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5131 | else | |
5132 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5133 | #line 5134 "configure" |
5ee754fc MK |
5134 | #include "confdefs.h" |
5135 | #include <$ac_hdr> | |
5136 | EOF | |
5137 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5138 | { (eval echo configure:5139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5139 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5140 | if test -z "$ac_err"; then | |
5141 | rm -rf conftest* | |
5142 | eval "ac_cv_header_$ac_safe=yes" | |
5143 | else | |
5144 | echo "$ac_err" >&5 | |
5145 | echo "configure: failed program was:" >&5 | |
5146 | cat conftest.$ac_ext >&5 | |
5147 | rm -rf conftest* | |
5148 | eval "ac_cv_header_$ac_safe=no" | |
5149 | fi | |
5150 | rm -f conftest* | |
5151 | fi | |
5152 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5153 | echo "$ac_t""yes" 1>&6 | |
5154 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5155 | cat >> confdefs.h <<EOF | |
5156 | #define $ac_tr_hdr 1 | |
5157 | EOF | |
5158 | ||
5159 | else | |
5160 | echo "$ac_t""no" 1>&6 | |
5161 | fi | |
5162 | done | |
5163 | ||
78434e59 | 5164 | for ac_hdr in sys/ptrace.h ptrace.h |
5ee754fc MK |
5165 | do |
5166 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5167 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5168 | echo "configure:5169: checking for $ac_hdr" >&5 |
5ee754fc MK |
5169 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5170 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5171 | else | |
5172 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5173 | #line 5174 "configure" |
5ee754fc MK |
5174 | #include "confdefs.h" |
5175 | #include <$ac_hdr> | |
5176 | EOF | |
5177 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5178 | { (eval echo configure:5179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5179 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5180 | if test -z "$ac_err"; then | |
5181 | rm -rf conftest* | |
5182 | eval "ac_cv_header_$ac_safe=yes" | |
5183 | else | |
5184 | echo "$ac_err" >&5 | |
5185 | echo "configure: failed program was:" >&5 | |
5186 | cat conftest.$ac_ext >&5 | |
5187 | rm -rf conftest* | |
5188 | eval "ac_cv_header_$ac_safe=no" | |
5189 | fi | |
5190 | rm -f conftest* | |
5191 | fi | |
5192 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5193 | echo "$ac_t""yes" 1>&6 | |
5194 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5195 | cat >> confdefs.h <<EOF | |
5196 | #define $ac_tr_hdr 1 | |
5197 | EOF | |
5198 | ||
5199 | else | |
5200 | echo "$ac_t""no" 1>&6 | |
5201 | fi | |
5202 | done | |
5203 | ||
78434e59 | 5204 | for ac_hdr in sys/reg.h sys/debugreg.h |
5ee754fc MK |
5205 | do |
5206 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5207 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5208 | echo "configure:5209: checking for $ac_hdr" >&5 |
5ee754fc MK |
5209 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5211 | else | |
5212 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5213 | #line 5214 "configure" |
5ee754fc MK |
5214 | #include "confdefs.h" |
5215 | #include <$ac_hdr> | |
5216 | EOF | |
5217 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5218 | { (eval echo configure:5219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5219 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5220 | if test -z "$ac_err"; then | |
5221 | rm -rf conftest* | |
5222 | eval "ac_cv_header_$ac_safe=yes" | |
5223 | else | |
5224 | echo "$ac_err" >&5 | |
5225 | echo "configure: failed program was:" >&5 | |
5226 | cat conftest.$ac_ext >&5 | |
5227 | rm -rf conftest* | |
5228 | eval "ac_cv_header_$ac_safe=no" | |
5229 | fi | |
5230 | rm -f conftest* | |
5231 | fi | |
5232 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5233 | echo "$ac_t""yes" 1>&6 | |
5234 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5235 | cat >> confdefs.h <<EOF | |
5236 | #define $ac_tr_hdr 1 | |
5237 | EOF | |
5238 | ||
5239 | else | |
5240 | echo "$ac_t""no" 1>&6 | |
5241 | fi | |
5242 | done | |
5243 | ||
78434e59 | 5244 | for ac_hdr in sys/select.h |
5ee754fc MK |
5245 | do |
5246 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5247 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5248 | echo "configure:5249: checking for $ac_hdr" >&5 |
5ee754fc MK |
5249 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5250 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5251 | else | |
5252 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5253 | #line 5254 "configure" |
5ee754fc MK |
5254 | #include "confdefs.h" |
5255 | #include <$ac_hdr> | |
5256 | EOF | |
5257 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5258 | { (eval echo configure:5259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5259 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5260 | if test -z "$ac_err"; then | |
5261 | rm -rf conftest* | |
5262 | eval "ac_cv_header_$ac_safe=yes" | |
5263 | else | |
5264 | echo "$ac_err" >&5 | |
5265 | echo "configure: failed program was:" >&5 | |
5266 | cat conftest.$ac_ext >&5 | |
5267 | rm -rf conftest* | |
5268 | eval "ac_cv_header_$ac_safe=no" | |
5269 | fi | |
5270 | rm -f conftest* | |
5271 | fi | |
5272 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5273 | echo "$ac_t""yes" 1>&6 | |
5274 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5275 | cat >> confdefs.h <<EOF | |
5276 | #define $ac_tr_hdr 1 | |
5277 | EOF | |
5278 | ||
5279 | else | |
5280 | echo "$ac_t""no" 1>&6 | |
5281 | fi | |
5282 | done | |
5283 | ||
78434e59 | 5284 | for ac_hdr in sys/syscall.h |
5ee754fc MK |
5285 | do |
5286 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5287 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5288 | echo "configure:5289: checking for $ac_hdr" >&5 |
5ee754fc MK |
5289 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5290 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5291 | else | |
5292 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5293 | #line 5294 "configure" |
5ee754fc MK |
5294 | #include "confdefs.h" |
5295 | #include <$ac_hdr> | |
5296 | EOF | |
5297 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5298 | { (eval echo configure:5299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5299 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5300 | if test -z "$ac_err"; then | |
5301 | rm -rf conftest* | |
5302 | eval "ac_cv_header_$ac_safe=yes" | |
5303 | else | |
5304 | echo "$ac_err" >&5 | |
5305 | echo "configure: failed program was:" >&5 | |
5306 | cat conftest.$ac_ext >&5 | |
5307 | rm -rf conftest* | |
5308 | eval "ac_cv_header_$ac_safe=no" | |
5309 | fi | |
5310 | rm -f conftest* | |
5311 | fi | |
5312 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5313 | echo "$ac_t""yes" 1>&6 | |
5314 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5315 | cat >> confdefs.h <<EOF | |
5316 | #define $ac_tr_hdr 1 | |
5317 | EOF | |
5318 | ||
5319 | else | |
5320 | echo "$ac_t""no" 1>&6 | |
5321 | fi | |
5322 | done | |
5323 | ||
78434e59 | 5324 | for ac_hdr in sys/user.h |
5ee754fc MK |
5325 | do |
5326 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5327 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5328 | echo "configure:5329: checking for $ac_hdr" >&5 |
5ee754fc MK |
5329 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5330 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5331 | else | |
5332 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5333 | #line 5334 "configure" |
5ee754fc MK |
5334 | #include "confdefs.h" |
5335 | #include <$ac_hdr> | |
5336 | EOF | |
5337 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5338 | { (eval echo configure:5339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5339 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5340 | if test -z "$ac_err"; then | |
5341 | rm -rf conftest* | |
5342 | eval "ac_cv_header_$ac_safe=yes" | |
5343 | else | |
5344 | echo "$ac_err" >&5 | |
9608ab8b MK |
5345 | echo "configure: failed program was:" >&5 |
5346 | cat conftest.$ac_ext >&5 | |
5347 | rm -rf conftest* | |
5ee754fc | 5348 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5349 | fi |
5350 | rm -f conftest* | |
5351 | fi | |
5ee754fc | 5352 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5353 | echo "$ac_t""yes" 1>&6 |
5354 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5355 | cat >> confdefs.h <<EOF | |
5356 | #define $ac_tr_hdr 1 | |
5357 | EOF | |
5ee754fc | 5358 | |
9608ab8b MK |
5359 | else |
5360 | echo "$ac_t""no" 1>&6 | |
5361 | fi | |
5362 | done | |
5ee754fc | 5363 | |
78434e59 | 5364 | for ac_hdr in sys/wait.h wait.h |
5ee754fc MK |
5365 | do |
5366 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5367 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5368 | echo "configure:5369: checking for $ac_hdr" >&5 |
5ee754fc | 5369 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5370 | echo $ac_n "(cached) $ac_c" 1>&6 |
5371 | else | |
5ee754fc | 5372 | cat > conftest.$ac_ext <<EOF |
33f8ca73 | 5373 | #line 5374 "configure" |
9608ab8b | 5374 | #include "confdefs.h" |
5ee754fc | 5375 | #include <$ac_hdr> |
9608ab8b | 5376 | EOF |
5ee754fc | 5377 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
33f8ca73 | 5378 | { (eval echo configure:5379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5379 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5380 | if test -z "$ac_err"; then | |
9608ab8b | 5381 | rm -rf conftest* |
5ee754fc | 5382 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5383 | else |
5ee754fc | 5384 | echo "$ac_err" >&5 |
9608ab8b MK |
5385 | echo "configure: failed program was:" >&5 |
5386 | cat conftest.$ac_ext >&5 | |
5387 | rm -rf conftest* | |
5ee754fc | 5388 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5389 | fi |
5390 | rm -f conftest* | |
9608ab8b | 5391 | fi |
5ee754fc | 5392 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5393 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5394 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5395 | cat >> confdefs.h <<EOF | |
5396 | #define $ac_tr_hdr 1 | |
5397 | EOF | |
5398 | ||
9608ab8b MK |
5399 | else |
5400 | echo "$ac_t""no" 1>&6 | |
5401 | fi | |
5ee754fc | 5402 | done |
9608ab8b | 5403 | |
78434e59 | 5404 | for ac_hdr in termios.h termio.h sgtty.h |
5ee754fc MK |
5405 | do |
5406 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5407 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5408 | echo "configure:5409: checking for $ac_hdr" >&5 |
5ee754fc | 5409 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5410 | echo $ac_n "(cached) $ac_c" 1>&6 |
5411 | else | |
5ee754fc | 5412 | cat > conftest.$ac_ext <<EOF |
33f8ca73 | 5413 | #line 5414 "configure" |
9608ab8b | 5414 | #include "confdefs.h" |
5ee754fc | 5415 | #include <$ac_hdr> |
9608ab8b | 5416 | EOF |
5ee754fc | 5417 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
33f8ca73 | 5418 | { (eval echo configure:5419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5419 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5420 | if test -z "$ac_err"; then | |
9608ab8b | 5421 | rm -rf conftest* |
5ee754fc | 5422 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5423 | else |
5ee754fc | 5424 | echo "$ac_err" >&5 |
9608ab8b MK |
5425 | echo "configure: failed program was:" >&5 |
5426 | cat conftest.$ac_ext >&5 | |
5427 | rm -rf conftest* | |
5ee754fc | 5428 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5429 | fi |
5430 | rm -f conftest* | |
9608ab8b | 5431 | fi |
5ee754fc | 5432 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5433 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5434 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5435 | cat >> confdefs.h <<EOF | |
5436 | #define $ac_tr_hdr 1 | |
5437 | EOF | |
5438 | ||
9608ab8b MK |
5439 | else |
5440 | echo "$ac_t""no" 1>&6 | |
5441 | fi | |
5ee754fc | 5442 | done |
9608ab8b | 5443 | |
78434e59 MK |
5444 | for ac_hdr in unistd.h |
5445 | do | |
5446 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5447 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5448 | echo "configure:5449: checking for $ac_hdr" >&5 |
78434e59 MK |
5449 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5450 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5451 | else | |
5452 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5453 | #line 5454 "configure" |
78434e59 MK |
5454 | #include "confdefs.h" |
5455 | #include <$ac_hdr> | |
5456 | EOF | |
5457 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5458 | { (eval echo configure:5459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
78434e59 MK |
5459 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5460 | if test -z "$ac_err"; then | |
5461 | rm -rf conftest* | |
5462 | eval "ac_cv_header_$ac_safe=yes" | |
5463 | else | |
5464 | echo "$ac_err" >&5 | |
5465 | echo "configure: failed program was:" >&5 | |
5466 | cat conftest.$ac_ext >&5 | |
5467 | rm -rf conftest* | |
5468 | eval "ac_cv_header_$ac_safe=no" | |
5469 | fi | |
5470 | rm -f conftest* | |
5471 | fi | |
5472 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5473 | echo "$ac_t""yes" 1>&6 | |
5474 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5475 | cat >> confdefs.h <<EOF | |
5476 | #define $ac_tr_hdr 1 | |
5477 | EOF | |
5478 | ||
5479 | else | |
5480 | echo "$ac_t""no" 1>&6 | |
5481 | fi | |
5482 | done | |
5483 | ||
9608ab8b | 5484 | |
5ee754fc MK |
5485 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5486 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5487 | # think that we don't have <curses.h> if we're using GCC. | |
5488 | case $host_os in | |
5489 | solaris2.[78]) | |
5490 | if test "$GCC" = yes; then | |
5491 | cat >> confdefs.h <<\EOF | |
5492 | #define _MSE_INT_H 1 | |
5493 | EOF | |
5494 | ||
5495 | fi ;; | |
5496 | esac | |
5497 | for ac_hdr in curses.h ncurses.h term.h | |
5498 | do | |
5499 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5500 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5501 | echo "configure:5502: checking for $ac_hdr" >&5 |
5ee754fc | 5502 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5503 | echo $ac_n "(cached) $ac_c" 1>&6 |
5504 | else | |
5505 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5506 | #line 5507 "configure" |
c906108c | 5507 | #include "confdefs.h" |
5ee754fc | 5508 | #include <$ac_hdr> |
c906108c SS |
5509 | EOF |
5510 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5511 | { (eval echo configure:5512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5512 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5513 | if test -z "$ac_err"; then | |
5514 | rm -rf conftest* | |
5ee754fc | 5515 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5516 | else |
5517 | echo "$ac_err" >&5 | |
5518 | echo "configure: failed program was:" >&5 | |
5519 | cat conftest.$ac_ext >&5 | |
5520 | rm -rf conftest* | |
5ee754fc | 5521 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5522 | fi |
5523 | rm -f conftest* | |
c906108c | 5524 | fi |
5ee754fc MK |
5525 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5526 | echo "$ac_t""yes" 1>&6 | |
5527 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5528 | cat >> confdefs.h <<EOF | |
5529 | #define $ac_tr_hdr 1 | |
c906108c | 5530 | EOF |
5ee754fc | 5531 | |
c906108c | 5532 | else |
5ee754fc | 5533 | echo "$ac_t""no" 1>&6 |
c906108c | 5534 | fi |
5ee754fc | 5535 | done |
c906108c SS |
5536 | |
5537 | ||
5ee754fc MK |
5538 | # FIXME: kettenis/20030102: In most cases we include these |
5539 | # unconditionally, so what's the point in checking these? | |
5540 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5541 | do |
5542 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5543 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 5544 | echo "configure:5545: checking for $ac_hdr" >&5 |
c906108c SS |
5545 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5547 | else | |
5548 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5549 | #line 5550 "configure" |
c906108c SS |
5550 | #include "confdefs.h" |
5551 | #include <$ac_hdr> | |
5552 | EOF | |
5553 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 5554 | { (eval echo configure:5555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5555 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5556 | if test -z "$ac_err"; then | |
5557 | rm -rf conftest* | |
5558 | eval "ac_cv_header_$ac_safe=yes" | |
5559 | else | |
5560 | echo "$ac_err" >&5 | |
5561 | echo "configure: failed program was:" >&5 | |
5562 | cat conftest.$ac_ext >&5 | |
5563 | rm -rf conftest* | |
5564 | eval "ac_cv_header_$ac_safe=no" | |
5565 | fi | |
5566 | rm -f conftest* | |
5567 | fi | |
5568 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5569 | echo "$ac_t""yes" 1>&6 | |
5570 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5571 | cat >> confdefs.h <<EOF | |
5572 | #define $ac_tr_hdr 1 | |
5573 | EOF | |
5574 | ||
5575 | else | |
5576 | echo "$ac_t""no" 1>&6 | |
5577 | fi | |
5578 | done | |
5579 | ||
5ee754fc | 5580 | |
40a7debc | 5581 | echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6 |
33f8ca73 | 5582 | echo "configure:5583: checking for member st_blocks in struct stat" >&5 |
40a7debc EZ |
5583 | if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then |
5584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5585 | else | |
5586 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5587 | #line 5588 "configure" |
40a7debc EZ |
5588 | #include "confdefs.h" |
5589 | #include <sys/types.h> | |
5590 | #include <sys/stat.h> | |
5591 | int main() { | |
5592 | struct stat st; (void) st.st_blocks; | |
5593 | ; return 0; } | |
5594 | EOF | |
33f8ca73 | 5595 | if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
40a7debc EZ |
5596 | rm -rf conftest* |
5597 | gdb_cv_have_struct_stat_with_st_blocks_member=yes | |
5598 | else | |
5599 | echo "configure: failed program was:" >&5 | |
5600 | cat conftest.$ac_ext >&5 | |
5601 | rm -rf conftest* | |
5602 | gdb_cv_have_struct_stat_with_st_blocks_member=no | |
5603 | fi | |
5604 | rm -f conftest* | |
5605 | fi | |
5606 | ||
5607 | echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6 | |
5608 | if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then | |
5609 | cat >> confdefs.h <<\EOF | |
5610 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
5611 | EOF | |
5612 | ||
5613 | fi | |
b9362cc7 AC |
5614 | # ------------------------- # |
5615 | # Checks for declarations. # | |
5616 | # ------------------------- # | |
5617 | ||
5618 | for ac_func in getopt | |
5619 | do | |
5620 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5621 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
33f8ca73 | 5622 | echo "configure:5623: checking whether $ac_func is declared" >&5 |
b9362cc7 AC |
5623 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
5624 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5625 | else | |
5626 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5627 | #line 5628 "configure" |
b9362cc7 AC |
5628 | #include "confdefs.h" |
5629 | #undef $ac_tr_decl | |
5630 | #define $ac_tr_decl 1 | |
5631 | ||
5632 | ||
5633 | int main() { | |
5634 | #ifndef $ac_func | |
5635 | char *(*pfn) = (char *(*)) $ac_func ; | |
5636 | #endif | |
5637 | ; return 0; } | |
5638 | EOF | |
33f8ca73 | 5639 | if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9362cc7 AC |
5640 | rm -rf conftest* |
5641 | eval "gcc_cv_have_decl_$ac_func=yes" | |
5642 | else | |
5643 | echo "configure: failed program was:" >&5 | |
5644 | cat conftest.$ac_ext >&5 | |
5645 | rm -rf conftest* | |
5646 | eval "gcc_cv_have_decl_$ac_func=no" | |
5647 | fi | |
5648 | rm -f conftest* | |
5649 | fi | |
5650 | ||
5651 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5652 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
5653 | #define $ac_tr_decl 1 | |
5654 | EOF | |
5655 | ||
5656 | else | |
5657 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
5658 | #define $ac_tr_decl 0 | |
5659 | EOF | |
5660 | ||
5661 | fi | |
5662 | ||
5663 | done | |
5664 | if test x = y ; then | |
5665 | cat >> confdefs.h <<\EOF | |
5666 | #define HAVE_DECL_GETOPT 1 | |
5667 | EOF | |
5668 | fi | |
5669 | ||
5670 | ||
5ee754fc MK |
5671 | # ------------------ # |
5672 | # Checks for types. # | |
5673 | # ------------------ # | |
5674 | ||
5675 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
33f8ca73 | 5676 | echo "configure:5677: checking return type of signal handlers" >&5 |
5ee754fc | 5677 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5678 | echo $ac_n "(cached) $ac_c" 1>&6 |
5679 | else | |
5680 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5681 | #line 5682 "configure" |
c906108c SS |
5682 | #include "confdefs.h" |
5683 | #include <sys/types.h> | |
5ee754fc MK |
5684 | #include <signal.h> |
5685 | #ifdef signal | |
5686 | #undef signal | |
c906108c | 5687 | #endif |
5ee754fc MK |
5688 | #ifdef __cplusplus |
5689 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5690 | #else | |
5691 | void (*signal ()) (); | |
c906108c SS |
5692 | #endif |
5693 | ||
5ee754fc MK |
5694 | int main() { |
5695 | int i; | |
5696 | ; return 0; } | |
c906108c | 5697 | EOF |
33f8ca73 | 5698 | if { (eval echo configure:5699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5699 | rm -rf conftest* |
5ee754fc | 5700 | ac_cv_type_signal=void |
c906108c | 5701 | else |
5ee754fc MK |
5702 | echo "configure: failed program was:" >&5 |
5703 | cat conftest.$ac_ext >&5 | |
c906108c | 5704 | rm -rf conftest* |
5ee754fc | 5705 | ac_cv_type_signal=int |
c906108c SS |
5706 | fi |
5707 | rm -f conftest* | |
c906108c SS |
5708 | fi |
5709 | ||
5ee754fc MK |
5710 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5711 | cat >> confdefs.h <<EOF | |
5712 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5713 | EOF |
5714 | ||
c906108c SS |
5715 | |
5716 | ||
5ee754fc MK |
5717 | # ------------------------------------- # |
5718 | # Checks for compiler characteristics. # | |
5719 | # ------------------------------------- # | |
5720 | ||
c906108c | 5721 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
33f8ca73 | 5722 | echo "configure:5723: checking for working const" >&5 |
c906108c SS |
5723 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5724 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5725 | else | |
5726 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5727 | #line 5728 "configure" |
c906108c SS |
5728 | #include "confdefs.h" |
5729 | ||
5730 | int main() { | |
5731 | ||
5732 | /* Ultrix mips cc rejects this. */ | |
5733 | typedef int charset[2]; const charset x; | |
5734 | /* SunOS 4.1.1 cc rejects this. */ | |
5735 | char const *const *ccp; | |
5736 | char **p; | |
5737 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5738 | struct point {int x, y;}; | |
5739 | static struct point const zero = {0,0}; | |
5740 | /* AIX XL C 1.02.0.0 rejects this. | |
5741 | It does not let you subtract one const X* pointer from another in an arm | |
5742 | of an if-expression whose if-part is not a constant expression */ | |
5743 | const char *g = "string"; | |
5744 | ccp = &g + (g ? g-g : 0); | |
5745 | /* HPUX 7.0 cc rejects these. */ | |
5746 | ++ccp; | |
5747 | p = (char**) ccp; | |
5748 | ccp = (char const *const *) p; | |
5749 | { /* SCO 3.2v4 cc rejects this. */ | |
5750 | char *t; | |
5751 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5752 | ||
5753 | *t++ = 0; | |
5754 | } | |
5755 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5756 | int x[] = {25, 17}; | |
5757 | const int *foo = &x[0]; | |
5758 | ++foo; | |
5759 | } | |
5760 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5761 | typedef const int *iptr; | |
5762 | iptr p = 0; | |
5763 | ++p; | |
5764 | } | |
5765 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5766 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5767 | struct s { int j; const int *ap[3]; }; | |
5768 | struct s *b; b->j = 5; | |
5769 | } | |
5770 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5771 | const int foo = 10; | |
5772 | } | |
5773 | ||
5774 | ; return 0; } | |
5775 | EOF | |
33f8ca73 | 5776 | if { (eval echo configure:5777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5777 | rm -rf conftest* |
5778 | ac_cv_c_const=yes | |
5779 | else | |
5780 | echo "configure: failed program was:" >&5 | |
5781 | cat conftest.$ac_ext >&5 | |
5782 | rm -rf conftest* | |
5783 | ac_cv_c_const=no | |
5784 | fi | |
5785 | rm -f conftest* | |
5786 | fi | |
5787 | ||
5788 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5789 | if test $ac_cv_c_const = no; then | |
5790 | cat >> confdefs.h <<\EOF | |
5791 | #define const | |
5792 | EOF | |
5793 | ||
5794 | fi | |
5795 | ||
bce58c09 | 5796 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
33f8ca73 | 5797 | echo "configure:5798: checking for inline" >&5 |
bce58c09 JB |
5798 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5799 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5800 | else | |
5801 | ac_cv_c_inline=no | |
5802 | for ac_kw in inline __inline__ __inline; do | |
5803 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5804 | #line 5805 "configure" |
bce58c09 JB |
5805 | #include "confdefs.h" |
5806 | ||
5807 | int main() { | |
5808 | } $ac_kw foo() { | |
5809 | ; return 0; } | |
5810 | EOF | |
33f8ca73 | 5811 | if { (eval echo configure:5812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5812 | rm -rf conftest* |
5813 | ac_cv_c_inline=$ac_kw; break | |
5814 | else | |
5815 | echo "configure: failed program was:" >&5 | |
5816 | cat conftest.$ac_ext >&5 | |
5817 | fi | |
5818 | rm -f conftest* | |
5819 | done | |
5820 | ||
5821 | fi | |
5822 | ||
5823 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5824 | case "$ac_cv_c_inline" in | |
5825 | inline | yes) ;; | |
5826 | no) cat >> confdefs.h <<\EOF | |
5827 | #define inline | |
5828 | EOF | |
5829 | ;; | |
5830 | *) cat >> confdefs.h <<EOF | |
5831 | #define inline $ac_cv_c_inline | |
5832 | EOF | |
5833 | ;; | |
5834 | esac | |
5835 | ||
c906108c | 5836 | |
5ee754fc MK |
5837 | # ------------------------------ # |
5838 | # Checks for library functions. # | |
5839 | # ------------------------------ # | |
5840 | ||
46711df8 MK |
5841 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5842 | # for constant arguments. Useless! | |
5843 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
33f8ca73 | 5844 | echo "configure:5845: checking for working alloca.h" >&5 |
46711df8 MK |
5845 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5847 | else | |
5848 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5849 | #line 5850 "configure" |
46711df8 MK |
5850 | #include "confdefs.h" |
5851 | #include <alloca.h> | |
5852 | int main() { | |
5853 | char *p = alloca(2 * sizeof(int)); | |
5854 | ; return 0; } | |
5855 | EOF | |
33f8ca73 | 5856 | if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5857 | rm -rf conftest* |
5858 | ac_cv_header_alloca_h=yes | |
5859 | else | |
5860 | echo "configure: failed program was:" >&5 | |
5861 | cat conftest.$ac_ext >&5 | |
5862 | rm -rf conftest* | |
5863 | ac_cv_header_alloca_h=no | |
5864 | fi | |
5865 | rm -f conftest* | |
5866 | fi | |
5867 | ||
5868 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5869 | if test $ac_cv_header_alloca_h = yes; then | |
5870 | cat >> confdefs.h <<\EOF | |
5871 | #define HAVE_ALLOCA_H 1 | |
5872 | EOF | |
5873 | ||
5874 | fi | |
5875 | ||
5876 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
33f8ca73 | 5877 | echo "configure:5878: checking for alloca" >&5 |
46711df8 MK |
5878 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5880 | else | |
5881 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5882 | #line 5883 "configure" |
46711df8 MK |
5883 | #include "confdefs.h" |
5884 | ||
5885 | #ifdef __GNUC__ | |
5886 | # define alloca __builtin_alloca | |
5887 | #else | |
5888 | # ifdef _MSC_VER | |
5889 | # include <malloc.h> | |
5890 | # define alloca _alloca | |
5891 | # else | |
5892 | # if HAVE_ALLOCA_H | |
5893 | # include <alloca.h> | |
5894 | # else | |
5895 | # ifdef _AIX | |
5896 | #pragma alloca | |
5897 | # else | |
5898 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5899 | char *alloca (); | |
5900 | # endif | |
5901 | # endif | |
5902 | # endif | |
5903 | # endif | |
5904 | #endif | |
5905 | ||
5906 | int main() { | |
5907 | char *p = (char *) alloca(1); | |
5908 | ; return 0; } | |
5909 | EOF | |
33f8ca73 | 5910 | if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5911 | rm -rf conftest* |
5912 | ac_cv_func_alloca_works=yes | |
5913 | else | |
5914 | echo "configure: failed program was:" >&5 | |
5915 | cat conftest.$ac_ext >&5 | |
5916 | rm -rf conftest* | |
5917 | ac_cv_func_alloca_works=no | |
5918 | fi | |
5919 | rm -f conftest* | |
5920 | fi | |
5921 | ||
5922 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5923 | if test $ac_cv_func_alloca_works = yes; then | |
5924 | cat >> confdefs.h <<\EOF | |
5925 | #define HAVE_ALLOCA 1 | |
5926 | EOF | |
5927 | ||
5928 | fi | |
5929 | ||
5930 | if test $ac_cv_func_alloca_works = no; then | |
5931 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5932 | # that cause trouble. Some versions do not even contain alloca or | |
5933 | # contain a buggy version. If you still want to use their alloca, | |
5934 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5935 | ALLOCA=alloca.${ac_objext} | |
5936 | cat >> confdefs.h <<\EOF | |
5937 | #define C_ALLOCA 1 | |
5938 | EOF | |
5939 | ||
5940 | ||
5941 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
33f8ca73 | 5942 | echo "configure:5943: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5943 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5944 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5945 | else | |
5946 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5947 | #line 5948 "configure" |
46711df8 MK |
5948 | #include "confdefs.h" |
5949 | #if defined(CRAY) && ! defined(CRAY2) | |
5950 | webecray | |
5951 | #else | |
5952 | wenotbecray | |
5953 | #endif | |
5954 | ||
5955 | EOF | |
5956 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5957 | egrep "webecray" >/dev/null 2>&1; then | |
5958 | rm -rf conftest* | |
5959 | ac_cv_os_cray=yes | |
5960 | else | |
5961 | rm -rf conftest* | |
5962 | ac_cv_os_cray=no | |
5963 | fi | |
5964 | rm -f conftest* | |
5965 | ||
5966 | fi | |
5967 | ||
5968 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5969 | if test $ac_cv_os_cray = yes; then | |
5970 | for ac_func in _getb67 GETB67 getb67; do | |
5971 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 5972 | echo "configure:5973: checking for $ac_func" >&5 |
46711df8 MK |
5973 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5974 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5975 | else | |
5976 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 5977 | #line 5978 "configure" |
46711df8 MK |
5978 | #include "confdefs.h" |
5979 | /* System header to define __stub macros and hopefully few prototypes, | |
5980 | which can conflict with char $ac_func(); below. */ | |
5981 | #include <assert.h> | |
5982 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5983 | /* We use char because int might match the return type of a gcc2 | |
5984 | builtin and then its argument prototype would still apply. */ | |
5985 | char $ac_func(); | |
5986 | ||
5987 | int main() { | |
5988 | ||
5989 | /* The GNU C library defines this for functions which it implements | |
5990 | to always fail with ENOSYS. Some functions are actually named | |
5991 | something starting with __ and the normal name is an alias. */ | |
5992 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5993 | choke me | |
5994 | #else | |
5995 | $ac_func(); | |
5996 | #endif | |
5997 | ||
5998 | ; return 0; } | |
5999 | EOF | |
33f8ca73 | 6000 | if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
6001 | rm -rf conftest* |
6002 | eval "ac_cv_func_$ac_func=yes" | |
6003 | else | |
6004 | echo "configure: failed program was:" >&5 | |
6005 | cat conftest.$ac_ext >&5 | |
6006 | rm -rf conftest* | |
6007 | eval "ac_cv_func_$ac_func=no" | |
6008 | fi | |
6009 | rm -f conftest* | |
6010 | fi | |
6011 | ||
6012 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6013 | echo "$ac_t""yes" 1>&6 | |
6014 | cat >> confdefs.h <<EOF | |
6015 | #define CRAY_STACKSEG_END $ac_func | |
6016 | EOF | |
6017 | ||
6018 | break | |
6019 | else | |
6020 | echo "$ac_t""no" 1>&6 | |
6021 | fi | |
6022 | ||
6023 | done | |
6024 | fi | |
6025 | ||
6026 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
33f8ca73 | 6027 | echo "configure:6028: checking stack direction for C alloca" >&5 |
46711df8 MK |
6028 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
6029 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6030 | else | |
6031 | if test "$cross_compiling" = yes; then | |
6032 | ac_cv_c_stack_direction=0 | |
6033 | else | |
6034 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6035 | #line 6036 "configure" |
46711df8 MK |
6036 | #include "confdefs.h" |
6037 | find_stack_direction () | |
6038 | { | |
6039 | static char *addr = 0; | |
6040 | auto char dummy; | |
6041 | if (addr == 0) | |
6042 | { | |
6043 | addr = &dummy; | |
6044 | return find_stack_direction (); | |
6045 | } | |
6046 | else | |
6047 | return (&dummy > addr) ? 1 : -1; | |
6048 | } | |
6049 | main () | |
6050 | { | |
6051 | exit (find_stack_direction() < 0); | |
6052 | } | |
6053 | EOF | |
33f8ca73 | 6054 | if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
6055 | then |
6056 | ac_cv_c_stack_direction=1 | |
6057 | else | |
6058 | echo "configure: failed program was:" >&5 | |
6059 | cat conftest.$ac_ext >&5 | |
6060 | rm -fr conftest* | |
6061 | ac_cv_c_stack_direction=-1 | |
6062 | fi | |
6063 | rm -fr conftest* | |
6064 | fi | |
6065 | ||
6066 | fi | |
6067 | ||
6068 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
6069 | cat >> confdefs.h <<EOF | |
6070 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6071 | EOF | |
6072 | ||
6073 | fi | |
6074 | ||
d836ee13 | 6075 | for ac_hdr in unistd.h |
97bf5e38 MK |
6076 | do |
6077 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
6078 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
33f8ca73 | 6079 | echo "configure:6080: checking for $ac_hdr" >&5 |
74c1b268 AC |
6080 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6081 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6082 | else | |
6083 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6084 | #line 6085 "configure" |
74c1b268 | 6085 | #include "confdefs.h" |
97bf5e38 | 6086 | #include <$ac_hdr> |
74c1b268 AC |
6087 | EOF |
6088 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 6089 | { (eval echo configure:6090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
6090 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6091 | if test -z "$ac_err"; then | |
6092 | rm -rf conftest* | |
6093 | eval "ac_cv_header_$ac_safe=yes" | |
6094 | else | |
6095 | echo "$ac_err" >&5 | |
6096 | echo "configure: failed program was:" >&5 | |
6097 | cat conftest.$ac_ext >&5 | |
6098 | rm -rf conftest* | |
6099 | eval "ac_cv_header_$ac_safe=no" | |
6100 | fi | |
6101 | rm -f conftest* | |
6102 | fi | |
6103 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6104 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
6105 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
6106 | cat >> confdefs.h <<EOF | |
6107 | #define $ac_tr_hdr 1 | |
74c1b268 | 6108 | EOF |
97bf5e38 | 6109 | |
74c1b268 AC |
6110 | else |
6111 | echo "$ac_t""no" 1>&6 | |
6112 | fi | |
97bf5e38 | 6113 | done |
74c1b268 | 6114 | |
97bf5e38 MK |
6115 | for ac_func in getpagesize |
6116 | do | |
6117 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6118 | echo "configure:6119: checking for $ac_func" >&5 |
97bf5e38 | 6119 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
6120 | echo $ac_n "(cached) $ac_c" 1>&6 |
6121 | else | |
6122 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6123 | #line 6124 "configure" |
74c1b268 AC |
6124 | #include "confdefs.h" |
6125 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 6126 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
6127 | #include <assert.h> |
6128 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6129 | /* We use char because int might match the return type of a gcc2 | |
6130 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 6131 | char $ac_func(); |
74c1b268 AC |
6132 | |
6133 | int main() { | |
6134 | ||
6135 | /* The GNU C library defines this for functions which it implements | |
6136 | to always fail with ENOSYS. Some functions are actually named | |
6137 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 6138 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
6139 | choke me |
6140 | #else | |
97bf5e38 | 6141 | $ac_func(); |
74c1b268 AC |
6142 | #endif |
6143 | ||
6144 | ; return 0; } | |
6145 | EOF | |
33f8ca73 | 6146 | if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 6147 | rm -rf conftest* |
97bf5e38 | 6148 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
6149 | else |
6150 | echo "configure: failed program was:" >&5 | |
6151 | cat conftest.$ac_ext >&5 | |
6152 | rm -rf conftest* | |
97bf5e38 | 6153 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
6154 | fi |
6155 | rm -f conftest* | |
6156 | fi | |
6157 | ||
97bf5e38 | 6158 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 6159 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
6160 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6161 | cat >> confdefs.h <<EOF | |
6162 | #define $ac_tr_func 1 | |
6163 | EOF | |
6164 | ||
74c1b268 AC |
6165 | else |
6166 | echo "$ac_t""no" 1>&6 | |
6167 | fi | |
97bf5e38 | 6168 | done |
74c1b268 | 6169 | |
97bf5e38 | 6170 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
33f8ca73 | 6171 | echo "configure:6172: checking for working mmap" >&5 |
97bf5e38 MK |
6172 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6174 | else | |
6175 | if test "$cross_compiling" = yes; then | |
6176 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
6177 | else |
6178 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6179 | #line 6180 "configure" |
74c1b268 | 6180 | #include "confdefs.h" |
97bf5e38 MK |
6181 | |
6182 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6183 | Here is a matrix of mmap possibilities: | |
6184 | mmap private not fixed | |
6185 | mmap private fixed at somewhere currently unmapped | |
6186 | mmap private fixed at somewhere already mapped | |
6187 | mmap shared not fixed | |
6188 | mmap shared fixed at somewhere currently unmapped | |
6189 | mmap shared fixed at somewhere already mapped | |
6190 | For private mappings, we should verify that changes cannot be read() | |
6191 | back from the file, nor mmap's back from the file at a different | |
6192 | address. (There have been systems where private was not correctly | |
6193 | implemented like the infamous i386 svr4.0, and systems where the | |
6194 | VM page cache was not coherent with the filesystem buffer cache | |
6195 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6196 | For shared mappings, we should conversely verify that changes get | |
6197 | propogated back to all the places they're supposed to be. | |
6198 | ||
6199 | Grep wants private fixed already mapped. | |
6200 | The main things grep needs to know about mmap are: | |
6201 | * does it exist and is it safe to write into the mmap'd area | |
6202 | * how to use it (BSD variants) */ | |
74c1b268 | 6203 | #include <sys/types.h> |
97bf5e38 MK |
6204 | #include <fcntl.h> |
6205 | #include <sys/mman.h> | |
6206 | ||
6207 | /* This mess was copied from the GNU getpagesize.h. */ | |
6208 | #ifndef HAVE_GETPAGESIZE | |
d836ee13 AC |
6209 | # ifdef HAVE_UNISTD_H |
6210 | # include <unistd.h> | |
6211 | # endif | |
97bf5e38 MK |
6212 | |
6213 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6214 | # ifndef HAVE_SYS_PARAM_H | |
6215 | # define HAVE_SYS_PARAM_H 1 | |
6216 | # endif | |
6217 | ||
6218 | # ifdef _SC_PAGESIZE | |
6219 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6220 | # else /* no _SC_PAGESIZE */ | |
6221 | # ifdef HAVE_SYS_PARAM_H | |
6222 | # include <sys/param.h> | |
6223 | # ifdef EXEC_PAGESIZE | |
6224 | # define getpagesize() EXEC_PAGESIZE | |
6225 | # else /* no EXEC_PAGESIZE */ | |
6226 | # ifdef NBPG | |
6227 | # define getpagesize() NBPG * CLSIZE | |
6228 | # ifndef CLSIZE | |
6229 | # define CLSIZE 1 | |
6230 | # endif /* no CLSIZE */ | |
6231 | # else /* no NBPG */ | |
6232 | # ifdef NBPC | |
6233 | # define getpagesize() NBPC | |
6234 | # else /* no NBPC */ | |
6235 | # ifdef PAGESIZE | |
6236 | # define getpagesize() PAGESIZE | |
6237 | # endif /* PAGESIZE */ | |
6238 | # endif /* no NBPC */ | |
6239 | # endif /* no NBPG */ | |
6240 | # endif /* no EXEC_PAGESIZE */ | |
6241 | # else /* no HAVE_SYS_PARAM_H */ | |
6242 | # define getpagesize() 8192 /* punt totally */ | |
6243 | # endif /* no HAVE_SYS_PARAM_H */ | |
6244 | # endif /* no _SC_PAGESIZE */ | |
6245 | ||
6246 | #endif /* no HAVE_GETPAGESIZE */ | |
6247 | ||
74c1b268 | 6248 | #ifdef __cplusplus |
97bf5e38 | 6249 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 6250 | #else |
97bf5e38 | 6251 | char *malloc(); |
74c1b268 | 6252 | #endif |
74c1b268 | 6253 | |
97bf5e38 MK |
6254 | int |
6255 | main() | |
6256 | { | |
6257 | char *data, *data2, *data3; | |
6258 | int i, pagesize; | |
6259 | int fd; | |
74c1b268 | 6260 | |
97bf5e38 | 6261 | pagesize = getpagesize(); |
74c1b268 | 6262 | |
97bf5e38 MK |
6263 | /* |
6264 | * First, make a file with some known garbage in it. | |
6265 | */ | |
6266 | data = malloc(pagesize); | |
6267 | if (!data) | |
6268 | exit(1); | |
6269 | for (i = 0; i < pagesize; ++i) | |
6270 | *(data + i) = rand(); | |
6271 | umask(0); | |
6272 | fd = creat("conftestmmap", 0600); | |
6273 | if (fd < 0) | |
6274 | exit(1); | |
6275 | if (write(fd, data, pagesize) != pagesize) | |
6276 | exit(1); | |
6277 | close(fd); | |
74c1b268 | 6278 | |
97bf5e38 MK |
6279 | /* |
6280 | * Next, try to mmap the file at a fixed address which | |
6281 | * already has something else allocated at it. If we can, | |
6282 | * also make sure that we see the same garbage. | |
6283 | */ | |
6284 | fd = open("conftestmmap", O_RDWR); | |
6285 | if (fd < 0) | |
6286 | exit(1); | |
6287 | data2 = malloc(2 * pagesize); | |
6288 | if (!data2) | |
6289 | exit(1); | |
6290 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6291 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6292 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6293 | exit(1); | |
6294 | for (i = 0; i < pagesize; ++i) | |
6295 | if (*(data + i) != *(data2 + i)) | |
6296 | exit(1); | |
74c1b268 | 6297 | |
97bf5e38 MK |
6298 | /* |
6299 | * Finally, make sure that changes to the mapped area | |
6300 | * do not percolate back to the file as seen by read(). | |
6301 | * (This is a bug on some variants of i386 svr4.0.) | |
6302 | */ | |
6303 | for (i = 0; i < pagesize; ++i) | |
6304 | *(data2 + i) = *(data2 + i) + 1; | |
6305 | data3 = malloc(pagesize); | |
6306 | if (!data3) | |
6307 | exit(1); | |
6308 | if (read(fd, data3, pagesize) != pagesize) | |
6309 | exit(1); | |
6310 | for (i = 0; i < pagesize; ++i) | |
6311 | if (*(data + i) != *(data3 + i)) | |
6312 | exit(1); | |
6313 | close(fd); | |
6314 | unlink("conftestmmap"); | |
6315 | exit(0); | |
74c1b268 | 6316 | } |
97bf5e38 | 6317 | |
74c1b268 | 6318 | EOF |
33f8ca73 | 6319 | if { (eval echo configure:6320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6320 | then |
97bf5e38 | 6321 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6322 | else |
6323 | echo "configure: failed program was:" >&5 | |
6324 | cat conftest.$ac_ext >&5 | |
6325 | rm -fr conftest* | |
97bf5e38 | 6326 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6327 | fi |
6328 | rm -fr conftest* | |
6329 | fi | |
6330 | ||
6331 | fi | |
6332 | ||
97bf5e38 MK |
6333 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6334 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6335 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6336 | #define HAVE_MMAP 1 |
74c1b268 AC |
6337 | EOF |
6338 | ||
6339 | fi | |
6340 | ||
97bf5e38 | 6341 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
33f8ca73 | 6342 | echo "configure:6343: checking for pid_t" >&5 |
97bf5e38 | 6343 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6344 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6345 | else |
6346 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6347 | #line 6348 "configure" |
0200359f | 6348 | #include "confdefs.h" |
97bf5e38 MK |
6349 | #include <sys/types.h> |
6350 | #if STDC_HEADERS | |
6351 | #include <stdlib.h> | |
6352 | #include <stddef.h> | |
0200359f | 6353 | #endif |
0200359f | 6354 | EOF |
97bf5e38 MK |
6355 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6356 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6357 | rm -rf conftest* | |
6358 | ac_cv_type_pid_t=yes | |
0200359f | 6359 | else |
97bf5e38 MK |
6360 | rm -rf conftest* |
6361 | ac_cv_type_pid_t=no | |
0200359f | 6362 | fi |
97bf5e38 | 6363 | rm -f conftest* |
0200359f MK |
6364 | |
6365 | fi | |
97bf5e38 MK |
6366 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6367 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6368 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6369 | #define pid_t int |
0200359f MK |
6370 | EOF |
6371 | ||
6372 | fi | |
6373 | ||
97bf5e38 MK |
6374 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6375 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
33f8ca73 | 6376 | echo "configure:6377: checking for vfork.h" >&5 |
97bf5e38 | 6377 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6378 | echo $ac_n "(cached) $ac_c" 1>&6 |
6379 | else | |
6380 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6381 | #line 6382 "configure" |
72473524 | 6382 | #include "confdefs.h" |
97bf5e38 | 6383 | #include <vfork.h> |
72473524 | 6384 | EOF |
97bf5e38 | 6385 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
33f8ca73 | 6386 | { (eval echo configure:6387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6387 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6388 | if test -z "$ac_err"; then | |
72473524 | 6389 | rm -rf conftest* |
97bf5e38 | 6390 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6391 | else |
97bf5e38 | 6392 | echo "$ac_err" >&5 |
72473524 DJ |
6393 | echo "configure: failed program was:" >&5 |
6394 | cat conftest.$ac_ext >&5 | |
6395 | rm -rf conftest* | |
97bf5e38 | 6396 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6397 | fi |
6398 | rm -f conftest* | |
6399 | fi | |
97bf5e38 MK |
6400 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6401 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6402 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6403 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6404 | EOF |
6405 | ||
97bf5e38 MK |
6406 | else |
6407 | echo "$ac_t""no" 1>&6 | |
72473524 | 6408 | fi |
c906108c | 6409 | |
97bf5e38 | 6410 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
33f8ca73 | 6411 | echo "configure:6412: checking for working vfork" >&5 |
97bf5e38 MK |
6412 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6413 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6414 | else | |
6415 | if test "$cross_compiling" = yes; then | |
6416 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
33f8ca73 | 6417 | echo "configure:6418: checking for vfork" >&5 |
97bf5e38 | 6418 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6419 | echo $ac_n "(cached) $ac_c" 1>&6 |
6420 | else | |
6421 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6422 | #line 6423 "configure" |
2b2d558c | 6423 | #include "confdefs.h" |
97bf5e38 MK |
6424 | /* System header to define __stub macros and hopefully few prototypes, |
6425 | which can conflict with char vfork(); below. */ | |
6426 | #include <assert.h> | |
6427 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6428 | /* We use char because int might match the return type of a gcc2 | |
6429 | builtin and then its argument prototype would still apply. */ | |
6430 | char vfork(); | |
2b2d558c MK |
6431 | |
6432 | int main() { | |
97bf5e38 MK |
6433 | |
6434 | /* The GNU C library defines this for functions which it implements | |
6435 | to always fail with ENOSYS. Some functions are actually named | |
6436 | something starting with __ and the normal name is an alias. */ | |
6437 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6438 | choke me | |
6439 | #else | |
6440 | vfork(); | |
6441 | #endif | |
6442 | ||
2b2d558c MK |
6443 | ; return 0; } |
6444 | EOF | |
33f8ca73 | 6445 | if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6446 | rm -rf conftest* |
97bf5e38 | 6447 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6448 | else |
6449 | echo "configure: failed program was:" >&5 | |
6450 | cat conftest.$ac_ext >&5 | |
6451 | rm -rf conftest* | |
97bf5e38 | 6452 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6453 | fi |
6454 | rm -f conftest* | |
6455 | fi | |
6456 | ||
97bf5e38 MK |
6457 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6458 | echo "$ac_t""yes" 1>&6 | |
6459 | : | |
6460 | else | |
6461 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6462 | fi |
6463 | ||
97bf5e38 | 6464 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6465 | else |
6466 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6467 | #line 6468 "configure" |
7dfa765c | 6468 | #include "confdefs.h" |
97bf5e38 MK |
6469 | /* Thanks to Paul Eggert for this test. */ |
6470 | #include <stdio.h> | |
6471 | #include <sys/types.h> | |
6472 | #include <sys/stat.h> | |
6473 | #ifdef HAVE_UNISTD_H | |
6474 | #include <unistd.h> | |
6475 | #endif | |
6476 | #ifdef HAVE_VFORK_H | |
6477 | #include <vfork.h> | |
6478 | #endif | |
6479 | /* On some sparc systems, changes by the child to local and incoming | |
6480 | argument registers are propagated back to the parent. | |
6481 | The compiler is told about this with #include <vfork.h>, | |
6482 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6483 | Test for this by using a static variable whose address | |
6484 | is put into a register that is clobbered by the vfork. */ | |
6485 | static | |
6486 | #ifdef __cplusplus | |
6487 | sparc_address_test (int arg) | |
6488 | #else | |
6489 | sparc_address_test (arg) int arg; | |
6490 | #endif | |
6491 | { | |
6492 | static pid_t child; | |
6493 | if (!child) { | |
6494 | child = vfork (); | |
6495 | if (child < 0) { | |
6496 | perror ("vfork"); | |
6497 | _exit(2); | |
6498 | } | |
6499 | if (!child) { | |
6500 | arg = getpid(); | |
6501 | write(-1, "", 0); | |
6502 | _exit (arg); | |
6503 | } | |
6504 | } | |
6505 | } | |
6506 | main() { | |
6507 | pid_t parent = getpid (); | |
6508 | pid_t child; | |
7dfa765c | 6509 | |
97bf5e38 | 6510 | sparc_address_test (); |
7dfa765c | 6511 | |
97bf5e38 | 6512 | child = vfork (); |
7dfa765c | 6513 | |
97bf5e38 MK |
6514 | if (child == 0) { |
6515 | /* Here is another test for sparc vfork register problems. | |
6516 | This test uses lots of local variables, at least | |
6517 | as many local variables as main has allocated so far | |
6518 | including compiler temporaries. 4 locals are enough for | |
6519 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6520 | A buggy compiler should reuse the register of parent | |
6521 | for one of the local variables, since it will think that | |
6522 | parent can't possibly be used any more in this routine. | |
6523 | Assigning to the local variable will thus munge parent | |
6524 | in the parent process. */ | |
6525 | pid_t | |
6526 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6527 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6528 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6529 | use the same hardware register for all 8 local variables. */ | |
6530 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6531 | || p != p5 || p != p6 || p != p7) | |
6532 | _exit(1); | |
7dfa765c | 6533 | |
97bf5e38 MK |
6534 | /* On some systems (e.g. IRIX 3.3), |
6535 | vfork doesn't separate parent from child file descriptors. | |
6536 | If the child closes a descriptor before it execs or exits, | |
6537 | this munges the parent's descriptor as well. | |
6538 | Test for this by closing stdout in the child. */ | |
6539 | _exit(close(fileno(stdout)) != 0); | |
6540 | } else { | |
6541 | int status; | |
6542 | struct stat st; | |
64bb1671 | 6543 | |
97bf5e38 MK |
6544 | while (wait(&status) != child) |
6545 | ; | |
6546 | exit( | |
6547 | /* Was there some problem with vforking? */ | |
6548 | child < 0 | |
64bb1671 | 6549 | |
97bf5e38 MK |
6550 | /* Did the child fail? (This shouldn't happen.) */ |
6551 | || status | |
64bb1671 | 6552 | |
97bf5e38 MK |
6553 | /* Did the vfork/compiler bug occur? */ |
6554 | || parent != getpid() | |
6555 | ||
6556 | /* Did the file descriptor bug occur? */ | |
6557 | || fstat(fileno(stdout), &st) != 0 | |
6558 | ); | |
6559 | } | |
6560 | } | |
5c44784c | 6561 | EOF |
33f8ca73 | 6562 | if { (eval echo configure:6563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6563 | then |
6564 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6565 | else |
6566 | echo "configure: failed program was:" >&5 | |
6567 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6568 | rm -fr conftest* |
6569 | ac_cv_func_vfork_works=no | |
5c44784c | 6570 | fi |
97bf5e38 | 6571 | rm -fr conftest* |
5c44784c JM |
6572 | fi |
6573 | ||
0afdd437 MK |
6574 | fi |
6575 | ||
97bf5e38 MK |
6576 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6577 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6578 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6579 | #define vfork fork |
0afdd437 MK |
6580 | EOF |
6581 | ||
6582 | fi | |
6583 | ||
97bf5e38 MK |
6584 | for ac_func in canonicalize_file_name realpath |
6585 | do | |
6586 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6587 | echo "configure:6588: checking for $ac_func" >&5 |
97bf5e38 | 6588 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6589 | echo $ac_n "(cached) $ac_c" 1>&6 |
6590 | else | |
6591 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6592 | #line 6593 "configure" |
7e89e357 | 6593 | #include "confdefs.h" |
97bf5e38 MK |
6594 | /* System header to define __stub macros and hopefully few prototypes, |
6595 | which can conflict with char $ac_func(); below. */ | |
6596 | #include <assert.h> | |
6597 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6598 | /* We use char because int might match the return type of a gcc2 | |
6599 | builtin and then its argument prototype would still apply. */ | |
6600 | char $ac_func(); | |
6601 | ||
7e89e357 | 6602 | int main() { |
97bf5e38 MK |
6603 | |
6604 | /* The GNU C library defines this for functions which it implements | |
6605 | to always fail with ENOSYS. Some functions are actually named | |
6606 | something starting with __ and the normal name is an alias. */ | |
6607 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6608 | choke me | |
6609 | #else | |
6610 | $ac_func(); | |
6611 | #endif | |
6612 | ||
7e89e357 JT |
6613 | ; return 0; } |
6614 | EOF | |
33f8ca73 | 6615 | if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6616 | rm -rf conftest* |
97bf5e38 | 6617 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6618 | else |
6619 | echo "configure: failed program was:" >&5 | |
6620 | cat conftest.$ac_ext >&5 | |
6621 | rm -rf conftest* | |
97bf5e38 | 6622 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6623 | fi |
6624 | rm -f conftest* | |
6625 | fi | |
6626 | ||
97bf5e38 MK |
6627 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6628 | echo "$ac_t""yes" 1>&6 | |
6629 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6630 | cat >> confdefs.h <<EOF | |
6631 | #define $ac_tr_func 1 | |
7e89e357 | 6632 | EOF |
97bf5e38 MK |
6633 | |
6634 | else | |
6635 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6636 | fi |
97bf5e38 | 6637 | done |
7e89e357 | 6638 | |
97bf5e38 | 6639 | for ac_func in poll |
7be570e7 JM |
6640 | do |
6641 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6642 | echo "configure:6643: checking for $ac_func" >&5 |
7be570e7 JM |
6643 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6644 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6645 | else | |
6646 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6647 | #line 6648 "configure" |
7be570e7 JM |
6648 | #include "confdefs.h" |
6649 | /* System header to define __stub macros and hopefully few prototypes, | |
6650 | which can conflict with char $ac_func(); below. */ | |
6651 | #include <assert.h> | |
6652 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6653 | /* We use char because int might match the return type of a gcc2 | |
6654 | builtin and then its argument prototype would still apply. */ | |
6655 | char $ac_func(); | |
6656 | ||
6657 | int main() { | |
6658 | ||
6659 | /* The GNU C library defines this for functions which it implements | |
6660 | to always fail with ENOSYS. Some functions are actually named | |
6661 | something starting with __ and the normal name is an alias. */ | |
6662 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6663 | choke me | |
6664 | #else | |
6665 | $ac_func(); | |
6666 | #endif | |
6667 | ||
6668 | ; return 0; } | |
6669 | EOF | |
33f8ca73 | 6670 | if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6671 | rm -rf conftest* |
6672 | eval "ac_cv_func_$ac_func=yes" | |
6673 | else | |
6674 | echo "configure: failed program was:" >&5 | |
6675 | cat conftest.$ac_ext >&5 | |
6676 | rm -rf conftest* | |
6677 | eval "ac_cv_func_$ac_func=no" | |
6678 | fi | |
6679 | rm -f conftest* | |
6680 | fi | |
6681 | ||
6682 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6683 | echo "$ac_t""yes" 1>&6 | |
6684 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6685 | cat >> confdefs.h <<EOF | |
6686 | #define $ac_tr_func 1 | |
6687 | EOF | |
6688 | ||
6689 | else | |
6690 | echo "$ac_t""no" 1>&6 | |
6691 | fi | |
6692 | done | |
6693 | ||
6694 | for ac_func in pread64 | |
6695 | do | |
6696 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6697 | echo "configure:6698: checking for $ac_func" >&5 |
14abd0fb MK |
6698 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6700 | else | |
6701 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6702 | #line 6703 "configure" |
14abd0fb MK |
6703 | #include "confdefs.h" |
6704 | /* System header to define __stub macros and hopefully few prototypes, | |
6705 | which can conflict with char $ac_func(); below. */ | |
6706 | #include <assert.h> | |
6707 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6708 | /* We use char because int might match the return type of a gcc2 | |
6709 | builtin and then its argument prototype would still apply. */ | |
6710 | char $ac_func(); | |
6711 | ||
6712 | int main() { | |
6713 | ||
6714 | /* The GNU C library defines this for functions which it implements | |
6715 | to always fail with ENOSYS. Some functions are actually named | |
6716 | something starting with __ and the normal name is an alias. */ | |
6717 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6718 | choke me | |
6719 | #else | |
6720 | $ac_func(); | |
6721 | #endif | |
6722 | ||
6723 | ; return 0; } | |
6724 | EOF | |
33f8ca73 | 6725 | if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6726 | rm -rf conftest* |
6727 | eval "ac_cv_func_$ac_func=yes" | |
6728 | else | |
6729 | echo "configure: failed program was:" >&5 | |
6730 | cat conftest.$ac_ext >&5 | |
6731 | rm -rf conftest* | |
6732 | eval "ac_cv_func_$ac_func=no" | |
6733 | fi | |
6734 | rm -f conftest* | |
6735 | fi | |
6736 | ||
6737 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6738 | echo "$ac_t""yes" 1>&6 | |
6739 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6740 | cat >> confdefs.h <<EOF | |
6741 | #define $ac_tr_func 1 | |
6742 | EOF | |
6743 | ||
6744 | else | |
6745 | echo "$ac_t""no" 1>&6 | |
6746 | fi | |
6747 | done | |
6748 | ||
97bf5e38 MK |
6749 | for ac_func in sbrk |
6750 | do | |
6751 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6752 | echo "configure:6753: checking for $ac_func" >&5 |
97bf5e38 | 6753 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6754 | echo $ac_n "(cached) $ac_c" 1>&6 |
6755 | else | |
6756 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6757 | #line 6758 "configure" |
c906108c | 6758 | #include "confdefs.h" |
97bf5e38 MK |
6759 | /* System header to define __stub macros and hopefully few prototypes, |
6760 | which can conflict with char $ac_func(); below. */ | |
6761 | #include <assert.h> | |
6762 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6763 | /* We use char because int might match the return type of a gcc2 | |
6764 | builtin and then its argument prototype would still apply. */ | |
6765 | char $ac_func(); | |
c906108c | 6766 | |
97bf5e38 MK |
6767 | int main() { |
6768 | ||
6769 | /* The GNU C library defines this for functions which it implements | |
6770 | to always fail with ENOSYS. Some functions are actually named | |
6771 | something starting with __ and the normal name is an alias. */ | |
6772 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6773 | choke me | |
c906108c | 6774 | #else |
97bf5e38 | 6775 | $ac_func(); |
c906108c | 6776 | #endif |
97bf5e38 | 6777 | |
c906108c SS |
6778 | ; return 0; } |
6779 | EOF | |
33f8ca73 | 6780 | if { (eval echo configure:6781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6781 | rm -rf conftest* |
97bf5e38 | 6782 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6783 | else |
6784 | echo "configure: failed program was:" >&5 | |
6785 | cat conftest.$ac_ext >&5 | |
6786 | rm -rf conftest* | |
97bf5e38 | 6787 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6788 | fi |
6789 | rm -f conftest* | |
6790 | fi | |
6791 | ||
97bf5e38 MK |
6792 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6793 | echo "$ac_t""yes" 1>&6 | |
6794 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6795 | cat >> confdefs.h <<EOF | |
6796 | #define $ac_tr_func 1 | |
c906108c | 6797 | EOF |
97bf5e38 MK |
6798 | |
6799 | else | |
6800 | echo "$ac_t""no" 1>&6 | |
c906108c | 6801 | fi |
97bf5e38 | 6802 | done |
c906108c | 6803 | |
97bf5e38 MK |
6804 | for ac_func in setpgid setpgrp |
6805 | do | |
6806 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6807 | echo "configure:6808: checking for $ac_func" >&5 |
97bf5e38 | 6808 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6809 | echo $ac_n "(cached) $ac_c" 1>&6 |
6810 | else | |
6811 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6812 | #line 6813 "configure" |
c906108c | 6813 | #include "confdefs.h" |
97bf5e38 MK |
6814 | /* System header to define __stub macros and hopefully few prototypes, |
6815 | which can conflict with char $ac_func(); below. */ | |
6816 | #include <assert.h> | |
6817 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6818 | /* We use char because int might match the return type of a gcc2 | |
6819 | builtin and then its argument prototype would still apply. */ | |
6820 | char $ac_func(); | |
c906108c | 6821 | |
97bf5e38 MK |
6822 | int main() { |
6823 | ||
6824 | /* The GNU C library defines this for functions which it implements | |
6825 | to always fail with ENOSYS. Some functions are actually named | |
6826 | something starting with __ and the normal name is an alias. */ | |
6827 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6828 | choke me | |
c906108c | 6829 | #else |
97bf5e38 | 6830 | $ac_func(); |
c906108c | 6831 | #endif |
97bf5e38 | 6832 | |
c906108c SS |
6833 | ; return 0; } |
6834 | EOF | |
33f8ca73 | 6835 | if { (eval echo configure:6836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6836 | rm -rf conftest* |
97bf5e38 | 6837 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6838 | else |
6839 | echo "configure: failed program was:" >&5 | |
6840 | cat conftest.$ac_ext >&5 | |
6841 | rm -rf conftest* | |
97bf5e38 | 6842 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6843 | fi |
6844 | rm -f conftest* | |
6845 | fi | |
6846 | ||
97bf5e38 MK |
6847 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6848 | echo "$ac_t""yes" 1>&6 | |
6849 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6850 | cat >> confdefs.h <<EOF | |
6851 | #define $ac_tr_func 1 | |
c906108c | 6852 | EOF |
97bf5e38 MK |
6853 | |
6854 | else | |
6855 | echo "$ac_t""no" 1>&6 | |
c906108c | 6856 | fi |
97bf5e38 | 6857 | done |
c906108c | 6858 | |
e1ea1d75 | 6859 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6860 | do |
6861 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6862 | echo "configure:6863: checking for $ac_func" >&5 |
97bf5e38 | 6863 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6864 | echo $ac_n "(cached) $ac_c" 1>&6 |
6865 | else | |
6866 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6867 | #line 6868 "configure" |
c906108c | 6868 | #include "confdefs.h" |
97bf5e38 MK |
6869 | /* System header to define __stub macros and hopefully few prototypes, |
6870 | which can conflict with char $ac_func(); below. */ | |
6871 | #include <assert.h> | |
6872 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6873 | /* We use char because int might match the return type of a gcc2 | |
6874 | builtin and then its argument prototype would still apply. */ | |
6875 | char $ac_func(); | |
c906108c | 6876 | |
97bf5e38 MK |
6877 | int main() { |
6878 | ||
6879 | /* The GNU C library defines this for functions which it implements | |
6880 | to always fail with ENOSYS. Some functions are actually named | |
6881 | something starting with __ and the normal name is an alias. */ | |
6882 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6883 | choke me | |
c906108c | 6884 | #else |
97bf5e38 | 6885 | $ac_func(); |
c906108c | 6886 | #endif |
97bf5e38 | 6887 | |
c906108c SS |
6888 | ; return 0; } |
6889 | EOF | |
33f8ca73 | 6890 | if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6891 | rm -rf conftest* |
97bf5e38 | 6892 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6893 | else |
6894 | echo "configure: failed program was:" >&5 | |
6895 | cat conftest.$ac_ext >&5 | |
6896 | rm -rf conftest* | |
97bf5e38 | 6897 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6898 | fi |
6899 | rm -f conftest* | |
6900 | fi | |
6901 | ||
97bf5e38 MK |
6902 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6903 | echo "$ac_t""yes" 1>&6 | |
6904 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6905 | cat >> confdefs.h <<EOF | |
6906 | #define $ac_tr_func 1 | |
c906108c | 6907 | EOF |
e1ea1d75 | 6908 | |
97bf5e38 MK |
6909 | else |
6910 | echo "$ac_t""no" 1>&6 | |
c906108c | 6911 | fi |
97bf5e38 | 6912 | done |
c906108c | 6913 | |
97bf5e38 MK |
6914 | for ac_func in socketpair |
6915 | do | |
6916 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6917 | echo "configure:6918: checking for $ac_func" >&5 |
97bf5e38 | 6918 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6919 | echo $ac_n "(cached) $ac_c" 1>&6 |
6920 | else | |
6921 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6922 | #line 6923 "configure" |
c906108c | 6923 | #include "confdefs.h" |
97bf5e38 MK |
6924 | /* System header to define __stub macros and hopefully few prototypes, |
6925 | which can conflict with char $ac_func(); below. */ | |
6926 | #include <assert.h> | |
6927 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6928 | /* We use char because int might match the return type of a gcc2 | |
6929 | builtin and then its argument prototype would still apply. */ | |
6930 | char $ac_func(); | |
c906108c | 6931 | |
97bf5e38 MK |
6932 | int main() { |
6933 | ||
6934 | /* The GNU C library defines this for functions which it implements | |
6935 | to always fail with ENOSYS. Some functions are actually named | |
6936 | something starting with __ and the normal name is an alias. */ | |
6937 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6938 | choke me | |
c906108c | 6939 | #else |
97bf5e38 | 6940 | $ac_func(); |
c906108c | 6941 | #endif |
97bf5e38 | 6942 | |
c906108c SS |
6943 | ; return 0; } |
6944 | EOF | |
33f8ca73 | 6945 | if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6946 | rm -rf conftest* |
97bf5e38 | 6947 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6948 | else |
6949 | echo "configure: failed program was:" >&5 | |
6950 | cat conftest.$ac_ext >&5 | |
6951 | rm -rf conftest* | |
97bf5e38 | 6952 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6953 | fi |
6954 | rm -f conftest* | |
6955 | fi | |
6956 | ||
97bf5e38 MK |
6957 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6958 | echo "$ac_t""yes" 1>&6 | |
6959 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6960 | cat >> confdefs.h <<EOF | |
6961 | #define $ac_tr_func 1 | |
c906108c | 6962 | EOF |
97bf5e38 MK |
6963 | |
6964 | else | |
6965 | echo "$ac_t""no" 1>&6 | |
c906108c | 6966 | fi |
97bf5e38 | 6967 | done |
c906108c | 6968 | |
b757528f JJ |
6969 | for ac_func in syscall |
6970 | do | |
6971 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
33f8ca73 | 6972 | echo "configure:6973: checking for $ac_func" >&5 |
b757528f JJ |
6973 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6974 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6975 | else | |
6976 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 6977 | #line 6978 "configure" |
b757528f JJ |
6978 | #include "confdefs.h" |
6979 | /* System header to define __stub macros and hopefully few prototypes, | |
6980 | which can conflict with char $ac_func(); below. */ | |
6981 | #include <assert.h> | |
6982 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6983 | /* We use char because int might match the return type of a gcc2 | |
6984 | builtin and then its argument prototype would still apply. */ | |
6985 | char $ac_func(); | |
6986 | ||
6987 | int main() { | |
6988 | ||
6989 | /* The GNU C library defines this for functions which it implements | |
6990 | to always fail with ENOSYS. Some functions are actually named | |
6991 | something starting with __ and the normal name is an alias. */ | |
6992 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6993 | choke me | |
6994 | #else | |
6995 | $ac_func(); | |
6996 | #endif | |
6997 | ||
6998 | ; return 0; } | |
6999 | EOF | |
33f8ca73 | 7000 | if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
7001 | rm -rf conftest* |
7002 | eval "ac_cv_func_$ac_func=yes" | |
7003 | else | |
7004 | echo "configure: failed program was:" >&5 | |
7005 | cat conftest.$ac_ext >&5 | |
7006 | rm -rf conftest* | |
7007 | eval "ac_cv_func_$ac_func=no" | |
7008 | fi | |
7009 | rm -f conftest* | |
7010 | fi | |
7011 | ||
7012 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
7013 | echo "$ac_t""yes" 1>&6 | |
7014 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7015 | cat >> confdefs.h <<EOF | |
7016 | #define $ac_tr_func 1 | |
7017 | EOF | |
7018 | ||
7019 | else | |
7020 | echo "$ac_t""no" 1>&6 | |
7021 | fi | |
7022 | done | |
7023 | ||
97bf5e38 MK |
7024 | |
7025 | if test "$cross_compiling" = no; then | |
7026 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
33f8ca73 | 7027 | echo "configure:7028: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7028 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 7029 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
7030 | else |
7031 | if test "$cross_compiling" = yes; then | |
7032 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
7033 | else |
7034 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7035 | #line 7036 "configure" |
c906108c SS |
7036 | #include "confdefs.h" |
7037 | ||
c906108c SS |
7038 | #ifdef HAVE_UNISTD_H |
7039 | #include <unistd.h> | |
7040 | #endif | |
97bf5e38 MK |
7041 | |
7042 | /* | |
7043 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
7044 | * successfully. | |
7045 | */ | |
7046 | main() | |
7047 | { | |
7048 | if (setpgrp(1,1) == -1) | |
7049 | exit(0); | |
7050 | else | |
7051 | exit(1); | |
7052 | } | |
7053 | ||
c906108c | 7054 | EOF |
33f8ca73 | 7055 | if { (eval echo configure:7056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7056 | then |
7057 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
7058 | else |
7059 | echo "configure: failed program was:" >&5 | |
7060 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7061 | rm -fr conftest* |
7062 | ac_cv_func_setpgrp_void=yes | |
c906108c | 7063 | fi |
97bf5e38 | 7064 | rm -fr conftest* |
c906108c SS |
7065 | fi |
7066 | ||
97bf5e38 MK |
7067 | |
7068 | fi | |
7069 | ||
7070 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
7071 | if test $ac_cv_func_setpgrp_void = yes; then | |
7072 | cat >> confdefs.h <<\EOF | |
7073 | #define SETPGRP_VOID 1 | |
c906108c SS |
7074 | EOF |
7075 | ||
7076 | fi | |
7077 | ||
97bf5e38 MK |
7078 | else |
7079 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
33f8ca73 | 7080 | echo "configure:7081: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 7081 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
7082 | echo $ac_n "(cached) $ac_c" 1>&6 |
7083 | else | |
7084 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7085 | #line 7086 "configure" |
b83266a0 SS |
7086 | #include "confdefs.h" |
7087 | ||
b83266a0 | 7088 | #include <unistd.h> |
97bf5e38 | 7089 | |
b83266a0 | 7090 | int main() { |
97bf5e38 MK |
7091 | |
7092 | if (setpgrp(1,1) == -1) | |
7093 | exit (0); | |
7094 | else | |
7095 | exit (1); | |
7096 | ||
b83266a0 SS |
7097 | ; return 0; } |
7098 | EOF | |
33f8ca73 | 7099 | if { (eval echo configure:7100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 7100 | rm -rf conftest* |
97bf5e38 | 7101 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
7102 | else |
7103 | echo "configure: failed program was:" >&5 | |
7104 | cat conftest.$ac_ext >&5 | |
7105 | rm -rf conftest* | |
97bf5e38 | 7106 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
7107 | fi |
7108 | rm -f conftest* | |
7109 | fi | |
7110 | ||
97bf5e38 MK |
7111 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
7112 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 7113 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7114 | #define SETPGRP_VOID 1 |
b83266a0 SS |
7115 | EOF |
7116 | ||
97bf5e38 | 7117 | fi |
b83266a0 SS |
7118 | fi |
7119 | ||
97bf5e38 MK |
7120 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
7121 | # since sigsetjmp might only be defined as a macro. | |
7122 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
33f8ca73 | 7123 | echo "configure:7124: checking for sigsetjmp" >&5 |
97bf5e38 | 7124 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
7125 | echo $ac_n "(cached) $ac_c" 1>&6 |
7126 | else | |
7127 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7128 | #line 7129 "configure" |
a4db0f07 RH |
7129 | #include "confdefs.h" |
7130 | ||
97bf5e38 MK |
7131 | #include <setjmp.h> |
7132 | ||
a4db0f07 | 7133 | int main() { |
97bf5e38 | 7134 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
7135 | ; return 0; } |
7136 | EOF | |
33f8ca73 | 7137 | if { (eval echo configure:7138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 7138 | rm -rf conftest* |
97bf5e38 | 7139 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
7140 | else |
7141 | echo "configure: failed program was:" >&5 | |
7142 | cat conftest.$ac_ext >&5 | |
7143 | rm -rf conftest* | |
97bf5e38 | 7144 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
7145 | fi |
7146 | rm -f conftest* | |
7147 | fi | |
7148 | ||
97bf5e38 MK |
7149 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
7150 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 7151 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7152 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
7153 | EOF |
7154 | ||
7155 | fi | |
c906108c | 7156 | |
06825bd1 MK |
7157 | # Assume we'll default to using the included libiberty regex. |
7158 | gdb_use_included_regex=yes | |
7159 | ||
7160 | # However, if the system regex is GNU regex, then default to *not* | |
7161 | # using the included regex. | |
7162 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
33f8ca73 | 7163 | echo "configure:7164: checking for GNU regex" >&5 |
06825bd1 MK |
7164 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
7165 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7166 | else | |
7167 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7168 | #line 7169 "configure" |
06825bd1 MK |
7169 | #include "confdefs.h" |
7170 | #include <gnu-versions.h> | |
7171 | int main() { | |
7172 | #define REGEX_INTERFACE_VERSION 1 | |
7173 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
7174 | # error "Version mismatch" | |
7175 | #endif | |
7176 | ; return 0; } | |
7177 | EOF | |
33f8ca73 | 7178 | if { (eval echo configure:7179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
7179 | rm -rf conftest* |
7180 | gdb_cv_have_gnu_regex=yes | |
7181 | else | |
7182 | echo "configure: failed program was:" >&5 | |
7183 | cat conftest.$ac_ext >&5 | |
7184 | rm -rf conftest* | |
7185 | gdb_cv_have_gnu_regex=no | |
7186 | fi | |
7187 | rm -f conftest* | |
7188 | fi | |
7189 | ||
7190 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
7191 | if test $gdb_cv_have_gnu_regex = yes; then | |
7192 | gdb_use_included_regex=no | |
7193 | fi | |
7194 | ||
7195 | # Check whether --with-included-regex or --without-included-regex was given. | |
7196 | if test "${with_included_regex+set}" = set; then | |
7197 | withval="$with_included_regex" | |
7198 | gdb_with_regex=$withval | |
7199 | else | |
7200 | gdb_with_regex=$gdb_use_included_regex | |
7201 | fi | |
7202 | ||
7203 | if test "$gdb_with_regex" = yes; then | |
7204 | cat >> confdefs.h <<\EOF | |
7205 | #define USE_INCLUDED_REGEX 1 | |
7206 | EOF | |
7207 | ||
7208 | fi | |
7209 | ||
78434e59 MK |
7210 | # See if <machine/reg.h> degines `struct reg'. |
7211 | echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6 | |
33f8ca73 | 7212 | echo "configure:7213: checking for struct reg in machine/reg.h" >&5 |
78434e59 MK |
7213 | if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then |
7214 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7215 | else | |
7216 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7217 | #line 7218 "configure" |
78434e59 MK |
7218 | #include "confdefs.h" |
7219 | #include <sys/types.h> | |
7220 | #include <machine/reg.h> | |
7221 | int main() { | |
7222 | struct reg r; | |
7223 | ; return 0; } | |
7224 | EOF | |
33f8ca73 | 7225 | if { (eval echo configure:7226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
78434e59 MK |
7226 | rm -rf conftest* |
7227 | gdb_cv_struct_reg=yes | |
7228 | else | |
7229 | echo "configure: failed program was:" >&5 | |
7230 | cat conftest.$ac_ext >&5 | |
7231 | rm -rf conftest* | |
7232 | gdb_cv_struct_reg=no | |
7233 | fi | |
7234 | rm -f conftest* | |
7235 | fi | |
7236 | ||
7237 | echo "$ac_t""$gdb_cv_struct_reg" 1>&6 | |
7238 | if test $gdb_cv_struct_reg = yes; then | |
7239 | cat >> confdefs.h <<\EOF | |
7240 | #define HAVE_STRUCT_REG 1 | |
7241 | EOF | |
7242 | ||
7243 | fi | |
7244 | ||
97bf5e38 MK |
7245 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7246 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
7247 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
33f8ca73 | 7248 | echo "configure:7249: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
7249 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7250 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7251 | else | |
7252 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7253 | #line 7254 "configure" |
c906108c | 7254 | #include "confdefs.h" |
97bf5e38 MK |
7255 | #include <machine/reg.h> |
7256 | int main() { | |
7257 | struct reg r; r.r_fs; | |
7258 | ; return 0; } | |
c906108c | 7259 | EOF |
33f8ca73 | 7260 | if { (eval echo configure:7261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7261 | rm -rf conftest* |
97bf5e38 | 7262 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 7263 | else |
97bf5e38 MK |
7264 | echo "configure: failed program was:" >&5 |
7265 | cat conftest.$ac_ext >&5 | |
c906108c | 7266 | rm -rf conftest* |
97bf5e38 | 7267 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
7268 | fi |
7269 | rm -f conftest* | |
97bf5e38 | 7270 | fi |
c906108c | 7271 | |
97bf5e38 MK |
7272 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
7273 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7274 | cat >> confdefs.h <<\EOF | |
7275 | #define HAVE_STRUCT_REG_R_FS 1 | |
7276 | EOF | |
7277 | ||
7278 | fi | |
7279 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
33f8ca73 | 7280 | echo "configure:7281: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
7281 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7283 | else | |
7284 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7285 | #line 7286 "configure" |
c906108c | 7286 | #include "confdefs.h" |
97bf5e38 MK |
7287 | #include <machine/reg.h> |
7288 | int main() { | |
7289 | struct reg r; r.r_gs; | |
7290 | ; return 0; } | |
c906108c | 7291 | EOF |
33f8ca73 | 7292 | if { (eval echo configure:7293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7293 | rm -rf conftest* |
97bf5e38 | 7294 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 7295 | else |
97bf5e38 MK |
7296 | echo "configure: failed program was:" >&5 |
7297 | cat conftest.$ac_ext >&5 | |
c906108c | 7298 | rm -rf conftest* |
97bf5e38 | 7299 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
7300 | fi |
7301 | rm -f conftest* | |
c906108c | 7302 | fi |
c906108c | 7303 | |
97bf5e38 MK |
7304 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
7305 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7306 | cat >> confdefs.h <<\EOF | |
7307 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
7308 | EOF |
7309 | ||
c906108c SS |
7310 | fi |
7311 | ||
97bf5e38 MK |
7312 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
7313 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
33f8ca73 | 7314 | echo "configure:7315: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 7315 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
7316 | echo $ac_n "(cached) $ac_c" 1>&6 |
7317 | else | |
7318 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7319 | #line 7320 "configure" |
c906108c | 7320 | #include "confdefs.h" |
97bf5e38 | 7321 | #include <sys/ptrace.h> |
c906108c | 7322 | int main() { |
97bf5e38 | 7323 | PTRACE_GETREGS; |
c906108c SS |
7324 | ; return 0; } |
7325 | EOF | |
33f8ca73 | 7326 | if { (eval echo configure:7327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7327 | rm -rf conftest* |
97bf5e38 | 7328 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
7329 | else |
7330 | echo "configure: failed program was:" >&5 | |
7331 | cat conftest.$ac_ext >&5 | |
7332 | rm -rf conftest* | |
97bf5e38 | 7333 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
7334 | fi |
7335 | rm -f conftest* | |
7336 | fi | |
7337 | ||
97bf5e38 MK |
7338 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
7339 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
7340 | cat >> confdefs.h <<\EOF | |
7341 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7342 | EOF |
7343 | ||
97bf5e38 | 7344 | fi |
c906108c | 7345 | |
97bf5e38 MK |
7346 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7347 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
33f8ca73 | 7348 | echo "configure:7349: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7349 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7350 | echo $ac_n "(cached) $ac_c" 1>&6 |
7351 | else | |
7352 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7353 | #line 7354 "configure" |
c906108c | 7354 | #include "confdefs.h" |
97bf5e38 | 7355 | #include <sys/ptrace.h> |
c906108c | 7356 | int main() { |
97bf5e38 | 7357 | PTRACE_GETFPXREGS; |
c906108c SS |
7358 | ; return 0; } |
7359 | EOF | |
33f8ca73 | 7360 | if { (eval echo configure:7361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7361 | rm -rf conftest* |
97bf5e38 | 7362 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7363 | else |
7364 | echo "configure: failed program was:" >&5 | |
7365 | cat conftest.$ac_ext >&5 | |
7366 | rm -rf conftest* | |
97bf5e38 | 7367 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7368 | fi |
7369 | rm -f conftest* | |
7370 | fi | |
7371 | ||
97bf5e38 MK |
7372 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7373 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7374 | cat >> confdefs.h <<\EOF | |
7375 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7376 | EOF |
7377 | ||
97bf5e38 | 7378 | fi |
c906108c | 7379 | |
97bf5e38 MK |
7380 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7381 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
33f8ca73 | 7382 | echo "configure:7383: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7383 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7384 | echo $ac_n "(cached) $ac_c" 1>&6 |
7385 | else | |
7386 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7387 | #line 7388 "configure" |
c906108c | 7388 | #include "confdefs.h" |
97bf5e38 MK |
7389 | #include <sys/types.h> |
7390 | #include <sys/ptrace.h> | |
c906108c | 7391 | int main() { |
97bf5e38 | 7392 | PT_GETDBREGS; |
c906108c SS |
7393 | ; return 0; } |
7394 | EOF | |
33f8ca73 | 7395 | if { (eval echo configure:7396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7396 | rm -rf conftest* |
97bf5e38 | 7397 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7398 | else |
7399 | echo "configure: failed program was:" >&5 | |
7400 | cat conftest.$ac_ext >&5 | |
7401 | rm -rf conftest* | |
97bf5e38 | 7402 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7403 | fi |
7404 | rm -f conftest* | |
7405 | fi | |
7406 | ||
97bf5e38 MK |
7407 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7408 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7409 | cat >> confdefs.h <<\EOF | |
7410 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7411 | EOF |
7412 | ||
97bf5e38 | 7413 | fi |
c906108c | 7414 | |
97bf5e38 MK |
7415 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7416 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
33f8ca73 | 7417 | echo "configure:7418: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7418 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7419 | echo $ac_n "(cached) $ac_c" 1>&6 |
7420 | else | |
7421 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7422 | #line 7423 "configure" |
c906108c | 7423 | #include "confdefs.h" |
97bf5e38 MK |
7424 | #include <sys/types.h> |
7425 | #include <sys/ptrace.h> | |
c906108c | 7426 | int main() { |
97bf5e38 | 7427 | PT_GETXMMREGS; |
c906108c SS |
7428 | ; return 0; } |
7429 | EOF | |
33f8ca73 | 7430 | if { (eval echo configure:7431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7431 | rm -rf conftest* |
97bf5e38 | 7432 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7433 | else |
7434 | echo "configure: failed program was:" >&5 | |
7435 | cat conftest.$ac_ext >&5 | |
7436 | rm -rf conftest* | |
97bf5e38 | 7437 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7438 | fi |
7439 | rm -f conftest* | |
7440 | fi | |
7441 | ||
97bf5e38 MK |
7442 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7443 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7444 | cat >> confdefs.h <<\EOF | |
7445 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7446 | EOF |
7447 | ||
97bf5e38 | 7448 | fi |
c906108c | 7449 | |
27ca5dad | 7450 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7451 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7452 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
33f8ca73 | 7453 | echo "configure:7454: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7454 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7455 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7456 | else | |
7457 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7458 | #line 7459 "configure" |
27ca5dad MC |
7459 | #include "confdefs.h" |
7460 | #include <stdint.h> | |
7461 | int main() { | |
7462 | uintptr_t foo = 0; | |
7463 | ; return 0; } | |
7464 | EOF | |
33f8ca73 | 7465 | if { (eval echo configure:7466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7466 | rm -rf conftest* |
7467 | gdb_cv_have_uintptr_t=yes | |
7468 | else | |
7469 | echo "configure: failed program was:" >&5 | |
7470 | cat conftest.$ac_ext >&5 | |
7471 | rm -rf conftest* | |
7472 | gdb_cv_have_uintptr_t=no | |
7473 | fi | |
7474 | rm -f conftest* | |
7475 | fi | |
7476 | ||
7477 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 | |
7478 | if test $gdb_cv_have_uintptr_t = yes; then | |
7479 | cat >> confdefs.h <<\EOF | |
7480 | #define HAVE_UINTPTR_T 1 | |
7481 | EOF | |
7482 | ||
7483 | fi | |
97bf5e38 MK |
7484 | |
7485 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
33f8ca73 | 7486 | echo "configure:7487: checking whether malloc must be declared" >&5 |
97bf5e38 | 7487 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7488 | echo $ac_n "(cached) $ac_c" 1>&6 |
7489 | else | |
7490 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7491 | #line 7492 "configure" |
3862412b | 7492 | #include "confdefs.h" |
e17bf198 | 7493 | |
97bf5e38 MK |
7494 | #include <stdio.h> |
7495 | #ifdef HAVE_STRING_H | |
7496 | #include <string.h> | |
7497 | #else | |
7498 | #ifdef HAVE_STRINGS_H | |
7499 | #include <strings.h> | |
7500 | #endif | |
7501 | #endif | |
7502 | #ifdef HAVE_STDLIB_H | |
7503 | #include <stdlib.h> | |
7504 | #endif | |
7505 | #ifdef HAVE_UNISTD_H | |
7506 | #include <unistd.h> | |
7507 | #endif | |
3862412b | 7508 | int main() { |
97bf5e38 | 7509 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7510 | ; return 0; } |
7511 | EOF | |
33f8ca73 | 7512 | if { (eval echo configure:7513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7513 | rm -rf conftest* |
97bf5e38 | 7514 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7515 | else |
7516 | echo "configure: failed program was:" >&5 | |
7517 | cat conftest.$ac_ext >&5 | |
7518 | rm -rf conftest* | |
97bf5e38 | 7519 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7520 | fi |
7521 | rm -f conftest* | |
7522 | fi | |
7523 | ||
97bf5e38 MK |
7524 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7525 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7526 | cat >> confdefs.h <<\EOF | |
7527 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7528 | EOF |
7529 | ||
97bf5e38 | 7530 | fi |
3862412b | 7531 | |
97bf5e38 | 7532 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
33f8ca73 | 7533 | echo "configure:7534: checking whether realloc must be declared" >&5 |
97bf5e38 | 7534 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7535 | echo $ac_n "(cached) $ac_c" 1>&6 |
7536 | else | |
7537 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7538 | #line 7539 "configure" |
3862412b | 7539 | #include "confdefs.h" |
e17bf198 | 7540 | |
97bf5e38 MK |
7541 | #include <stdio.h> |
7542 | #ifdef HAVE_STRING_H | |
7543 | #include <string.h> | |
7544 | #else | |
7545 | #ifdef HAVE_STRINGS_H | |
7546 | #include <strings.h> | |
7547 | #endif | |
7548 | #endif | |
7549 | #ifdef HAVE_STDLIB_H | |
7550 | #include <stdlib.h> | |
7551 | #endif | |
7552 | #ifdef HAVE_UNISTD_H | |
7553 | #include <unistd.h> | |
7554 | #endif | |
3862412b | 7555 | int main() { |
97bf5e38 | 7556 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7557 | ; return 0; } |
7558 | EOF | |
33f8ca73 | 7559 | if { (eval echo configure:7560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7560 | rm -rf conftest* |
97bf5e38 | 7561 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7562 | else |
7563 | echo "configure: failed program was:" >&5 | |
7564 | cat conftest.$ac_ext >&5 | |
7565 | rm -rf conftest* | |
97bf5e38 | 7566 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7567 | fi |
7568 | rm -f conftest* | |
7569 | fi | |
7570 | ||
97bf5e38 MK |
7571 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7572 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7573 | cat >> confdefs.h <<\EOF | |
7574 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7575 | EOF |
7576 | ||
97bf5e38 | 7577 | fi |
3862412b | 7578 | |
97bf5e38 | 7579 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
33f8ca73 | 7580 | echo "configure:7581: checking whether free must be declared" >&5 |
97bf5e38 | 7581 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7582 | echo $ac_n "(cached) $ac_c" 1>&6 |
7583 | else | |
7584 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7585 | #line 7586 "configure" |
451928c5 | 7586 | #include "confdefs.h" |
e17bf198 | 7587 | |
97bf5e38 MK |
7588 | #include <stdio.h> |
7589 | #ifdef HAVE_STRING_H | |
7590 | #include <string.h> | |
7591 | #else | |
7592 | #ifdef HAVE_STRINGS_H | |
7593 | #include <strings.h> | |
7594 | #endif | |
7595 | #endif | |
7596 | #ifdef HAVE_STDLIB_H | |
7597 | #include <stdlib.h> | |
7598 | #endif | |
7599 | #ifdef HAVE_UNISTD_H | |
7600 | #include <unistd.h> | |
7601 | #endif | |
451928c5 | 7602 | int main() { |
97bf5e38 | 7603 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7604 | ; return 0; } |
7605 | EOF | |
33f8ca73 | 7606 | if { (eval echo configure:7607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7607 | rm -rf conftest* |
97bf5e38 | 7608 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7609 | else |
7610 | echo "configure: failed program was:" >&5 | |
7611 | cat conftest.$ac_ext >&5 | |
7612 | rm -rf conftest* | |
97bf5e38 | 7613 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7614 | fi |
7615 | rm -f conftest* | |
7616 | fi | |
7617 | ||
97bf5e38 MK |
7618 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7619 | if test $bfd_cv_decl_needed_free = yes; then | |
7620 | cat >> confdefs.h <<\EOF | |
7621 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7622 | EOF |
7623 | ||
97bf5e38 | 7624 | fi |
451928c5 | 7625 | |
97bf5e38 | 7626 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
33f8ca73 | 7627 | echo "configure:7628: checking whether strerror must be declared" >&5 |
97bf5e38 | 7628 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7629 | echo $ac_n "(cached) $ac_c" 1>&6 |
7630 | else | |
7631 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7632 | #line 7633 "configure" |
451928c5 | 7633 | #include "confdefs.h" |
e17bf198 | 7634 | |
97bf5e38 MK |
7635 | #include <stdio.h> |
7636 | #ifdef HAVE_STRING_H | |
7637 | #include <string.h> | |
7638 | #else | |
7639 | #ifdef HAVE_STRINGS_H | |
7640 | #include <strings.h> | |
7641 | #endif | |
7642 | #endif | |
7643 | #ifdef HAVE_STDLIB_H | |
7644 | #include <stdlib.h> | |
7645 | #endif | |
7646 | #ifdef HAVE_UNISTD_H | |
7647 | #include <unistd.h> | |
7648 | #endif | |
451928c5 | 7649 | int main() { |
97bf5e38 | 7650 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7651 | ; return 0; } |
7652 | EOF | |
33f8ca73 | 7653 | if { (eval echo configure:7654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7654 | rm -rf conftest* |
97bf5e38 | 7655 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7656 | else |
7657 | echo "configure: failed program was:" >&5 | |
7658 | cat conftest.$ac_ext >&5 | |
7659 | rm -rf conftest* | |
97bf5e38 | 7660 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7661 | fi |
7662 | rm -f conftest* | |
7663 | fi | |
7664 | ||
97bf5e38 MK |
7665 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7666 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7667 | cat >> confdefs.h <<\EOF | |
7668 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7669 | EOF |
7670 | ||
97bf5e38 | 7671 | fi |
451928c5 | 7672 | |
97bf5e38 | 7673 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
33f8ca73 | 7674 | echo "configure:7675: checking whether strdup must be declared" >&5 |
97bf5e38 | 7675 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7676 | echo $ac_n "(cached) $ac_c" 1>&6 |
7677 | else | |
7678 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7679 | #line 7680 "configure" |
3862412b | 7680 | #include "confdefs.h" |
e17bf198 | 7681 | |
97bf5e38 MK |
7682 | #include <stdio.h> |
7683 | #ifdef HAVE_STRING_H | |
7684 | #include <string.h> | |
7685 | #else | |
7686 | #ifdef HAVE_STRINGS_H | |
7687 | #include <strings.h> | |
7688 | #endif | |
7689 | #endif | |
7690 | #ifdef HAVE_STDLIB_H | |
7691 | #include <stdlib.h> | |
7692 | #endif | |
7693 | #ifdef HAVE_UNISTD_H | |
7694 | #include <unistd.h> | |
7695 | #endif | |
3862412b | 7696 | int main() { |
97bf5e38 | 7697 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7698 | ; return 0; } |
7699 | EOF | |
33f8ca73 | 7700 | if { (eval echo configure:7701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7701 | rm -rf conftest* |
97bf5e38 | 7702 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7703 | else |
7704 | echo "configure: failed program was:" >&5 | |
7705 | cat conftest.$ac_ext >&5 | |
7706 | rm -rf conftest* | |
97bf5e38 | 7707 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7708 | fi |
7709 | rm -f conftest* | |
7710 | fi | |
7711 | ||
97bf5e38 MK |
7712 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7713 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7714 | cat >> confdefs.h <<\EOF | |
7715 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7716 | EOF |
7717 | ||
97bf5e38 | 7718 | fi |
3862412b | 7719 | |
97bf5e38 | 7720 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
33f8ca73 | 7721 | echo "configure:7722: checking whether strstr must be declared" >&5 |
97bf5e38 | 7722 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7723 | echo $ac_n "(cached) $ac_c" 1>&6 |
7724 | else | |
7725 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7726 | #line 7727 "configure" |
3862412b | 7727 | #include "confdefs.h" |
e17bf198 | 7728 | |
97bf5e38 MK |
7729 | #include <stdio.h> |
7730 | #ifdef HAVE_STRING_H | |
7731 | #include <string.h> | |
7732 | #else | |
7733 | #ifdef HAVE_STRINGS_H | |
7734 | #include <strings.h> | |
7735 | #endif | |
7736 | #endif | |
7737 | #ifdef HAVE_STDLIB_H | |
7738 | #include <stdlib.h> | |
7739 | #endif | |
7740 | #ifdef HAVE_UNISTD_H | |
7741 | #include <unistd.h> | |
7742 | #endif | |
3862412b | 7743 | int main() { |
97bf5e38 | 7744 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7745 | ; return 0; } |
7746 | EOF | |
33f8ca73 | 7747 | if { (eval echo configure:7748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7748 | rm -rf conftest* |
97bf5e38 | 7749 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7750 | else |
7751 | echo "configure: failed program was:" >&5 | |
7752 | cat conftest.$ac_ext >&5 | |
7753 | rm -rf conftest* | |
97bf5e38 | 7754 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7755 | fi |
7756 | rm -f conftest* | |
7757 | fi | |
7758 | ||
97bf5e38 MK |
7759 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7760 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7761 | cat >> confdefs.h <<\EOF | |
7762 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7763 | EOF |
7764 | ||
97bf5e38 | 7765 | fi |
3862412b | 7766 | |
97bf5e38 | 7767 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
33f8ca73 | 7768 | echo "configure:7769: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7769 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7770 | echo $ac_n "(cached) $ac_c" 1>&6 |
7771 | else | |
7772 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7773 | #line 7774 "configure" |
596c9d4b KB |
7774 | #include "confdefs.h" |
7775 | ||
97bf5e38 MK |
7776 | #include <stdio.h> |
7777 | #ifdef HAVE_STRING_H | |
7778 | #include <string.h> | |
7779 | #else | |
7780 | #ifdef HAVE_STRINGS_H | |
7781 | #include <strings.h> | |
7782 | #endif | |
7783 | #endif | |
7784 | #ifdef HAVE_STDLIB_H | |
7785 | #include <stdlib.h> | |
7786 | #endif | |
7787 | #ifdef HAVE_UNISTD_H | |
7788 | #include <unistd.h> | |
7789 | #endif | |
596c9d4b | 7790 | int main() { |
97bf5e38 | 7791 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7792 | ; return 0; } |
7793 | EOF | |
33f8ca73 | 7794 | if { (eval echo configure:7795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7795 | rm -rf conftest* |
97bf5e38 | 7796 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7797 | else |
7798 | echo "configure: failed program was:" >&5 | |
7799 | cat conftest.$ac_ext >&5 | |
7800 | rm -rf conftest* | |
97bf5e38 | 7801 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7802 | fi |
7803 | rm -f conftest* | |
7804 | fi | |
7805 | ||
97bf5e38 MK |
7806 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7807 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7808 | cat >> confdefs.h <<\EOF | |
7809 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7810 | EOF |
7811 | ||
97bf5e38 | 7812 | fi |
596c9d4b | 7813 | |
97bf5e38 MK |
7814 | |
7815 | # The following save_state_t checkery is only necessary for HPUX | |
7816 | # versions earlier than 10.20. When those fade from memory, this | |
7817 | # could be expunged. --jsm 1999-03-22 | |
7818 | ||
7819 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
33f8ca73 | 7820 | echo "configure:7821: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7821 | cat > conftest.$ac_ext <<EOF |
33f8ca73 | 7822 | #line 7823 "configure" |
97bf5e38 MK |
7823 | #include "confdefs.h" |
7824 | #include <machine/save_state.h> | |
7825 | EOF | |
7826 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7827 | egrep "save_state_t" >/dev/null 2>&1; then | |
7828 | rm -rf conftest* | |
7829 | gdb_cv_hpux_savestate=yes | |
7830 | else | |
7831 | rm -rf conftest* | |
7832 | gdb_cv_hpux_savestate=no | |
7833 | fi | |
7834 | rm -f conftest* | |
7835 | ||
7836 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7837 | #line 7838 "configure" |
97bf5e38 MK |
7838 | #include "confdefs.h" |
7839 | #include <machine/save_state.h> | |
7840 | EOF | |
7841 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7842 | egrep "ss_wide" >/dev/null 2>&1; then | |
7843 | rm -rf conftest* | |
7844 | gdb_cv_hpux_sswide=yes | |
7845 | else | |
7846 | rm -rf conftest* | |
7847 | gdb_cv_hpux_sswide=no | |
7848 | fi | |
7849 | rm -f conftest* | |
7850 | ||
7851 | if test $gdb_cv_hpux_savestate = yes | |
7852 | then | |
7853 | cat >> confdefs.h <<\EOF | |
7854 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7855 | EOF | |
7856 | ||
7857 | fi | |
7858 | if test $gdb_cv_hpux_sswide = yes | |
7859 | then | |
7860 | cat >> confdefs.h <<\EOF | |
7861 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7862 | EOF | |
7863 | ||
7864 | fi | |
7865 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7866 | ||
7867 | ||
7868 | # If we are configured native on GNU/Linux, work around problems with | |
7869 | # sys/procfs.h | |
7870 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7871 | ||
7872 | if test "${target}" = "${host}"; then | |
7873 | case "${host}" in | |
7874 | i[3456]86-*-linux*) | |
7875 | cat >> confdefs.h <<\EOF | |
7876 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7877 | EOF | |
7878 | ||
7879 | cat >> confdefs.h <<\EOF | |
7880 | #define sys_quotactl 1 | |
7881 | EOF | |
7882 | ||
7883 | ;; | |
7884 | ia64-*-aix*) | |
7885 | cat >> confdefs.h <<\EOF | |
7886 | #define NEW_PROC_API 1 | |
7887 | EOF | |
7888 | ||
7889 | ;; | |
7890 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7891 | cat >> confdefs.h <<\EOF | |
7892 | #define NEW_PROC_API 1 | |
7893 | EOF | |
7894 | ||
7895 | ;; | |
e7c61be3 | 7896 | *-*-solaris2.[6789]) |
97bf5e38 MK |
7897 | cat >> confdefs.h <<\EOF |
7898 | #define NEW_PROC_API 1 | |
7899 | EOF | |
7900 | ||
7901 | ;; | |
7902 | esac | |
7903 | fi | |
7904 | ||
7905 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7906 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
33f8ca73 | 7907 | echo "configure:7908: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7908 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7909 | echo $ac_n "(cached) $ac_c" 1>&6 |
7910 | else | |
7911 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7912 | #line 7913 "configure" |
596c9d4b KB |
7913 | #include "confdefs.h" |
7914 | ||
7915 | #define _SYSCALL32 | |
7916 | #include <sys/procfs.h> | |
7917 | int main() { | |
97bf5e38 | 7918 | pstatus_t avar |
596c9d4b KB |
7919 | ; return 0; } |
7920 | EOF | |
33f8ca73 | 7921 | if { (eval echo configure:7922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7922 | rm -rf conftest* |
97bf5e38 | 7923 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7924 | else |
7925 | echo "configure: failed program was:" >&5 | |
7926 | cat conftest.$ac_ext >&5 | |
7927 | rm -rf conftest* | |
97bf5e38 | 7928 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7929 | |
7930 | fi | |
7931 | rm -f conftest* | |
7932 | fi | |
7933 | ||
97bf5e38 | 7934 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7935 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7936 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7937 | EOF |
7938 | ||
7939 | fi | |
97bf5e38 | 7940 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7941 | |
97bf5e38 | 7942 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 7943 | echo "configure:7944: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7944 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7945 | echo $ac_n "(cached) $ac_c" 1>&6 |
7946 | else | |
7947 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7948 | #line 7949 "configure" |
596c9d4b KB |
7949 | #include "confdefs.h" |
7950 | ||
7951 | #define _SYSCALL32 | |
7952 | #include <sys/procfs.h> | |
7953 | int main() { | |
97bf5e38 | 7954 | prrun_t avar |
596c9d4b KB |
7955 | ; return 0; } |
7956 | EOF | |
33f8ca73 | 7957 | if { (eval echo configure:7958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7958 | rm -rf conftest* |
97bf5e38 | 7959 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7960 | else |
7961 | echo "configure: failed program was:" >&5 | |
7962 | cat conftest.$ac_ext >&5 | |
7963 | rm -rf conftest* | |
97bf5e38 | 7964 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7965 | |
7966 | fi | |
7967 | rm -f conftest* | |
7968 | fi | |
7969 | ||
97bf5e38 | 7970 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7971 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7972 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7973 | EOF |
7974 | ||
7975 | fi | |
97bf5e38 | 7976 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7977 | |
97bf5e38 | 7978 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 7979 | echo "configure:7980: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7980 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7981 | echo $ac_n "(cached) $ac_c" 1>&6 |
7982 | else | |
7983 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 7984 | #line 7985 "configure" |
596c9d4b KB |
7985 | #include "confdefs.h" |
7986 | ||
7987 | #define _SYSCALL32 | |
7988 | #include <sys/procfs.h> | |
7989 | int main() { | |
97bf5e38 | 7990 | gregset_t avar |
596c9d4b KB |
7991 | ; return 0; } |
7992 | EOF | |
33f8ca73 | 7993 | if { (eval echo configure:7994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7994 | rm -rf conftest* |
97bf5e38 | 7995 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7996 | else |
7997 | echo "configure: failed program was:" >&5 | |
7998 | cat conftest.$ac_ext >&5 | |
7999 | rm -rf conftest* | |
97bf5e38 | 8000 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
8001 | |
8002 | fi | |
8003 | rm -f conftest* | |
8004 | fi | |
8005 | ||
97bf5e38 | 8006 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 8007 | cat >> confdefs.h <<\EOF |
97bf5e38 | 8008 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
8009 | EOF |
8010 | ||
8011 | fi | |
97bf5e38 | 8012 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 8013 | |
97bf5e38 | 8014 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8015 | echo "configure:8016: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8016 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 8017 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
8018 | else |
8019 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8020 | #line 8021 "configure" |
d84dd0c5 | 8021 | #include "confdefs.h" |
97bf5e38 MK |
8022 | |
8023 | #define _SYSCALL32 | |
d84dd0c5 | 8024 | #include <sys/procfs.h> |
97bf5e38 MK |
8025 | int main() { |
8026 | fpregset_t avar | |
8027 | ; return 0; } | |
d84dd0c5 | 8028 | EOF |
33f8ca73 | 8029 | if { (eval echo configure:8030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8030 | rm -rf conftest* |
8031 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
8032 | else |
8033 | echo "configure: failed program was:" >&5 | |
8034 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8035 | rm -rf conftest* |
8036 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8037 | ||
d84dd0c5 | 8038 | fi |
97bf5e38 | 8039 | rm -f conftest* |
d84dd0c5 MK |
8040 | fi |
8041 | ||
97bf5e38 MK |
8042 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
8043 | cat >> confdefs.h <<\EOF | |
8044 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
8045 | EOF |
8046 | ||
97bf5e38 MK |
8047 | fi |
8048 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 8049 | |
97bf5e38 | 8050 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8051 | echo "configure:8052: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8052 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
8053 | echo $ac_n "(cached) $ac_c" 1>&6 |
8054 | else | |
8055 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8056 | #line 8057 "configure" |
c906108c | 8057 | #include "confdefs.h" |
c906108c | 8058 | |
97bf5e38 MK |
8059 | #define _SYSCALL32 |
8060 | #include <sys/procfs.h> | |
c906108c | 8061 | int main() { |
97bf5e38 | 8062 | prgregset_t avar |
c906108c SS |
8063 | ; return 0; } |
8064 | EOF | |
33f8ca73 | 8065 | if { (eval echo configure:8066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8066 | rm -rf conftest* |
97bf5e38 | 8067 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
8068 | else |
8069 | echo "configure: failed program was:" >&5 | |
8070 | cat conftest.$ac_ext >&5 | |
8071 | rm -rf conftest* | |
97bf5e38 MK |
8072 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
8073 | ||
c906108c SS |
8074 | fi |
8075 | rm -f conftest* | |
8076 | fi | |
8077 | ||
97bf5e38 MK |
8078 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
8079 | cat >> confdefs.h <<\EOF | |
8080 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
8081 | EOF |
8082 | ||
97bf5e38 MK |
8083 | fi |
8084 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 8085 | |
97bf5e38 | 8086 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8087 | echo "configure:8088: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 8088 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
8089 | echo $ac_n "(cached) $ac_c" 1>&6 |
8090 | else | |
8091 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8092 | #line 8093 "configure" |
d45fe813 | 8093 | #include "confdefs.h" |
97bf5e38 MK |
8094 | |
8095 | #define _SYSCALL32 | |
8096 | #include <sys/procfs.h> | |
d45fe813 | 8097 | int main() { |
97bf5e38 | 8098 | prfpregset_t avar |
d45fe813 KB |
8099 | ; return 0; } |
8100 | EOF | |
33f8ca73 | 8101 | if { (eval echo configure:8102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8102 | rm -rf conftest* |
97bf5e38 | 8103 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
8104 | else |
8105 | echo "configure: failed program was:" >&5 | |
8106 | cat conftest.$ac_ext >&5 | |
8107 | rm -rf conftest* | |
97bf5e38 MK |
8108 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
8109 | ||
d45fe813 KB |
8110 | fi |
8111 | rm -f conftest* | |
8112 | fi | |
8113 | ||
97bf5e38 MK |
8114 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
8115 | cat >> confdefs.h <<\EOF | |
8116 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
8117 | EOF |
8118 | ||
97bf5e38 MK |
8119 | fi |
8120 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 8121 | |
97bf5e38 | 8122 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8123 | echo "configure:8124: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8124 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8125 | echo $ac_n "(cached) $ac_c" 1>&6 |
8126 | else | |
8127 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8128 | #line 8129 "configure" |
d45fe813 | 8129 | #include "confdefs.h" |
97bf5e38 MK |
8130 | |
8131 | #define _SYSCALL32 | |
8132 | #include <sys/procfs.h> | |
d45fe813 | 8133 | int main() { |
97bf5e38 | 8134 | prgregset32_t avar |
d45fe813 KB |
8135 | ; return 0; } |
8136 | EOF | |
33f8ca73 | 8137 | if { (eval echo configure:8138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8138 | rm -rf conftest* |
97bf5e38 | 8139 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
8140 | else |
8141 | echo "configure: failed program was:" >&5 | |
8142 | cat conftest.$ac_ext >&5 | |
8143 | rm -rf conftest* | |
97bf5e38 MK |
8144 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
8145 | ||
d45fe813 KB |
8146 | fi |
8147 | rm -f conftest* | |
8148 | fi | |
8149 | ||
97bf5e38 MK |
8150 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
8151 | cat >> confdefs.h <<\EOF | |
8152 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
8153 | EOF |
8154 | ||
97bf5e38 MK |
8155 | fi |
8156 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 8157 | |
97bf5e38 | 8158 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8159 | echo "configure:8160: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 8160 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
8161 | echo $ac_n "(cached) $ac_c" 1>&6 |
8162 | else | |
8163 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8164 | #line 8165 "configure" |
d45fe813 | 8165 | #include "confdefs.h" |
97bf5e38 MK |
8166 | |
8167 | #define _SYSCALL32 | |
8168 | #include <sys/procfs.h> | |
d45fe813 | 8169 | int main() { |
97bf5e38 | 8170 | prfpregset32_t avar |
d45fe813 KB |
8171 | ; return 0; } |
8172 | EOF | |
33f8ca73 | 8173 | if { (eval echo configure:8174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8174 | rm -rf conftest* |
97bf5e38 | 8175 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
8176 | else |
8177 | echo "configure: failed program was:" >&5 | |
8178 | cat conftest.$ac_ext >&5 | |
8179 | rm -rf conftest* | |
97bf5e38 MK |
8180 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
8181 | ||
d45fe813 KB |
8182 | fi |
8183 | rm -f conftest* | |
8184 | fi | |
8185 | ||
97bf5e38 MK |
8186 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
8187 | cat >> confdefs.h <<\EOF | |
8188 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
8189 | EOF |
8190 | ||
97bf5e38 MK |
8191 | fi |
8192 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 8193 | |
97bf5e38 | 8194 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8195 | echo "configure:8196: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 8196 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
8197 | echo $ac_n "(cached) $ac_c" 1>&6 |
8198 | else | |
8199 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8200 | #line 8201 "configure" |
d45fe813 | 8201 | #include "confdefs.h" |
97bf5e38 | 8202 | |
d45fe813 | 8203 | #define _SYSCALL32 |
97bf5e38 | 8204 | #include <sys/procfs.h> |
d45fe813 | 8205 | int main() { |
97bf5e38 | 8206 | lwpid_t avar |
d45fe813 KB |
8207 | ; return 0; } |
8208 | EOF | |
33f8ca73 | 8209 | if { (eval echo configure:8210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 8210 | rm -rf conftest* |
97bf5e38 | 8211 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
8212 | else |
8213 | echo "configure: failed program was:" >&5 | |
8214 | cat conftest.$ac_ext >&5 | |
8215 | rm -rf conftest* | |
97bf5e38 MK |
8216 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
8217 | ||
d45fe813 KB |
8218 | fi |
8219 | rm -f conftest* | |
8220 | fi | |
8221 | ||
97bf5e38 MK |
8222 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
8223 | cat >> confdefs.h <<\EOF | |
8224 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
8225 | EOF |
8226 | ||
97bf5e38 MK |
8227 | fi |
8228 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 8229 | |
97bf5e38 | 8230 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8231 | echo "configure:8232: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 8232 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
8233 | echo $ac_n "(cached) $ac_c" 1>&6 |
8234 | else | |
8235 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8236 | #line 8237 "configure" |
c906108c SS |
8237 | #include "confdefs.h" |
8238 | ||
97bf5e38 MK |
8239 | #define _SYSCALL32 |
8240 | #include <sys/procfs.h> | |
c906108c | 8241 | int main() { |
97bf5e38 | 8242 | psaddr_t avar |
c906108c SS |
8243 | ; return 0; } |
8244 | EOF | |
33f8ca73 | 8245 | if { (eval echo configure:8246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8246 | rm -rf conftest* |
97bf5e38 | 8247 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
8248 | else |
8249 | echo "configure: failed program was:" >&5 | |
8250 | cat conftest.$ac_ext >&5 | |
8251 | rm -rf conftest* | |
97bf5e38 MK |
8252 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
8253 | ||
c906108c SS |
8254 | fi |
8255 | rm -f conftest* | |
8256 | fi | |
8257 | ||
97bf5e38 MK |
8258 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
8259 | cat >> confdefs.h <<\EOF | |
8260 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
8261 | EOF |
8262 | ||
97bf5e38 MK |
8263 | fi |
8264 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 8265 | |
97bf5e38 | 8266 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8267 | echo "configure:8268: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 8268 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 8269 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8270 | else |
8271 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8272 | #line 8273 "configure" |
c906108c SS |
8273 | #include "confdefs.h" |
8274 | ||
97bf5e38 MK |
8275 | #define _SYSCALL32 |
8276 | #include <sys/procfs.h> | |
8277 | int main() { | |
8278 | prsysent_t avar | |
8279 | ; return 0; } | |
c906108c | 8280 | EOF |
33f8ca73 | 8281 | if { (eval echo configure:8282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8282 | rm -rf conftest* |
8283 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
8284 | else |
8285 | echo "configure: failed program was:" >&5 | |
8286 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8287 | rm -rf conftest* |
8288 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
8289 | ||
c906108c | 8290 | fi |
97bf5e38 | 8291 | rm -f conftest* |
c906108c SS |
8292 | fi |
8293 | ||
97bf5e38 MK |
8294 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
8295 | cat >> confdefs.h <<\EOF | |
8296 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
8297 | EOF |
8298 | ||
97bf5e38 MK |
8299 | fi |
8300 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 8301 | |
97bf5e38 | 8302 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8303 | echo "configure:8304: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 8304 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
8305 | echo $ac_n "(cached) $ac_c" 1>&6 |
8306 | else | |
8307 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8308 | #line 8309 "configure" |
c906108c SS |
8309 | #include "confdefs.h" |
8310 | ||
97bf5e38 MK |
8311 | #define _SYSCALL32 |
8312 | #include <sys/procfs.h> | |
c906108c | 8313 | int main() { |
97bf5e38 | 8314 | pr_sigset_t avar |
c906108c SS |
8315 | ; return 0; } |
8316 | EOF | |
33f8ca73 | 8317 | if { (eval echo configure:8318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8318 | rm -rf conftest* |
97bf5e38 | 8319 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
8320 | else |
8321 | echo "configure: failed program was:" >&5 | |
8322 | cat conftest.$ac_ext >&5 | |
8323 | rm -rf conftest* | |
97bf5e38 MK |
8324 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
8325 | ||
c906108c SS |
8326 | fi |
8327 | rm -f conftest* | |
8328 | fi | |
8329 | ||
97bf5e38 MK |
8330 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
8331 | cat >> confdefs.h <<\EOF | |
8332 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
8333 | EOF |
8334 | ||
97bf5e38 MK |
8335 | fi |
8336 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 8337 | |
97bf5e38 | 8338 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
33f8ca73 | 8339 | echo "configure:8340: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 8340 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8341 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8342 | else |
8343 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8344 | #line 8345 "configure" |
c906108c SS |
8345 | #include "confdefs.h" |
8346 | ||
97bf5e38 MK |
8347 | #define _SYSCALL32 |
8348 | #include <sys/procfs.h> | |
8349 | int main() { | |
8350 | pr_sigaction64_t avar | |
8351 | ; return 0; } | |
c906108c | 8352 | EOF |
33f8ca73 | 8353 | if { (eval echo configure:8354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8354 | rm -rf conftest* |
8355 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8356 | else |
8357 | echo "configure: failed program was:" >&5 | |
8358 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8359 | rm -rf conftest* |
8360 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8361 | ||
c906108c | 8362 | fi |
97bf5e38 | 8363 | rm -f conftest* |
c906108c SS |
8364 | fi |
8365 | ||
97bf5e38 MK |
8366 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8367 | cat >> confdefs.h <<\EOF | |
8368 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8369 | EOF |
8370 | ||
97bf5e38 MK |
8371 | fi |
8372 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8373 | ||
8374 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
33f8ca73 | 8375 | echo "configure:8376: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8376 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8377 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8378 | else | |
8379 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8380 | #line 8381 "configure" |
97bf5e38 MK |
8381 | #include "confdefs.h" |
8382 | ||
8383 | #define _SYSCALL32 | |
8384 | #include <sys/procfs.h> | |
8385 | int main() { | |
8386 | pr_siginfo64_t avar | |
8387 | ; return 0; } | |
8388 | EOF | |
33f8ca73 | 8389 | if { (eval echo configure:8390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8390 | rm -rf conftest* |
8391 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8392 | else | |
8393 | echo "configure: failed program was:" >&5 | |
8394 | cat conftest.$ac_ext >&5 | |
8395 | rm -rf conftest* | |
8396 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8397 | ||
8398 | fi | |
8399 | rm -f conftest* | |
c906108c | 8400 | fi |
c906108c | 8401 | |
97bf5e38 MK |
8402 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8403 | cat >> confdefs.h <<\EOF | |
8404 | #define HAVE_PR_SIGINFO64_T 1 | |
8405 | EOF | |
c906108c | 8406 | |
97bf5e38 MK |
8407 | fi |
8408 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8409 | ||
8410 | ||
8411 | ||
8412 | ||
8413 | ||
8414 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8415 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
33f8ca73 | 8416 | echo "configure:8417: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8417 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8418 | echo $ac_n "(cached) $ac_c" 1>&6 |
8419 | else | |
8420 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8421 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8422 | else |
8423 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8424 | #line 8425 "configure" |
c906108c | 8425 | #include "confdefs.h" |
97bf5e38 MK |
8426 | #include <sys/procfs.h> |
8427 | int main () | |
8428 | { | |
8429 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8430 | return 1; | |
8431 | return 0; | |
8432 | } | |
c906108c | 8433 | EOF |
33f8ca73 | 8434 | if { (eval echo configure:8435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8435 | then |
97bf5e38 | 8436 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8437 | else |
8438 | echo "configure: failed program was:" >&5 | |
8439 | cat conftest.$ac_ext >&5 | |
8440 | rm -fr conftest* | |
97bf5e38 | 8441 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8442 | fi |
8443 | rm -fr conftest* | |
8444 | fi | |
8445 | ||
8446 | fi | |
8447 | ||
97bf5e38 MK |
8448 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8449 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8450 | cat >> confdefs.h <<\EOF | |
8451 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8452 | EOF |
8453 | ||
97bf5e38 MK |
8454 | fi |
8455 | fi | |
c906108c | 8456 | |
97bf5e38 MK |
8457 | |
8458 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
33f8ca73 | 8459 | echo "configure:8460: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8460 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8461 | echo $ac_n "(cached) $ac_c" 1>&6 |
8462 | else | |
8463 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8464 | #line 8465 "configure" |
c906108c | 8465 | #include "confdefs.h" |
97bf5e38 MK |
8466 | #include <unistd.h> |
8467 | #include <sys/types.h> | |
8468 | #include <sys/procfs.h> | |
8469 | ||
8470 | int main() { | |
8471 | ||
8472 | int dummy;; | |
8473 | dummy = ioctl(0, PIOCSET, &dummy); | |
8474 | ||
8475 | ; return 0; } | |
c906108c | 8476 | EOF |
33f8ca73 | 8477 | if { (eval echo configure:8478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8478 | rm -rf conftest* |
97bf5e38 | 8479 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8480 | else |
c906108c SS |
8481 | echo "configure: failed program was:" >&5 |
8482 | cat conftest.$ac_ext >&5 | |
8483 | rm -rf conftest* | |
97bf5e38 | 8484 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8485 | fi |
8486 | rm -f conftest* | |
8487 | fi | |
97bf5e38 MK |
8488 | |
8489 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8490 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8491 | cat >> confdefs.h <<\EOF | |
8492 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8493 | EOF |
97bf5e38 MK |
8494 | |
8495 | fi | |
c906108c | 8496 | fi |
c906108c | 8497 | |
97bf5e38 MK |
8498 | if test ${host} = ${target} ; then |
8499 | ||
8500 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
33f8ca73 | 8501 | echo "configure:8502: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8502 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8503 | echo $ac_n "(cached) $ac_c" 1>&6 |
8504 | else | |
8505 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8506 | #line 8507 "configure" |
c906108c | 8507 | #include "confdefs.h" |
97bf5e38 | 8508 | #include <link.h> |
c906108c | 8509 | int main() { |
97bf5e38 | 8510 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8511 | ; return 0; } |
8512 | EOF | |
33f8ca73 | 8513 | if { (eval echo configure:8514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8514 | rm -rf conftest* |
97bf5e38 | 8515 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8516 | else |
8517 | echo "configure: failed program was:" >&5 | |
8518 | cat conftest.$ac_ext >&5 | |
8519 | rm -rf conftest* | |
97bf5e38 | 8520 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8521 | fi |
8522 | rm -f conftest* | |
8523 | fi | |
8524 | ||
97bf5e38 MK |
8525 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8526 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8527 | cat >> confdefs.h <<\EOF | |
8528 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8529 | EOF |
97bf5e38 MK |
8530 | |
8531 | fi | |
8532 | ||
8533 | ||
8534 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
33f8ca73 | 8535 | echo "configure:8536: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8536 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8537 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8538 | else |
97bf5e38 | 8539 | cat > conftest.$ac_ext <<EOF |
33f8ca73 | 8540 | #line 8541 "configure" |
97bf5e38 MK |
8541 | #include "confdefs.h" |
8542 | #include <sys/types.h> | |
8543 | #include <link.h> | |
8544 | int main() { | |
8545 | struct link_map lm; (void) lm.lm_addr; | |
8546 | ; return 0; } | |
8547 | EOF | |
33f8ca73 | 8548 | if { (eval echo configure:8549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8549 | rm -rf conftest* |
8550 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8551 | else | |
8552 | echo "configure: failed program was:" >&5 | |
8553 | cat conftest.$ac_ext >&5 | |
8554 | rm -rf conftest* | |
8555 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8556 | fi | |
8557 | rm -f conftest* | |
c906108c | 8558 | fi |
c906108c | 8559 | |
97bf5e38 MK |
8560 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8561 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8562 | cat >> confdefs.h <<\EOF | |
8563 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8564 | EOF | |
8565 | ||
8566 | fi | |
8567 | ||
8568 | ||
8569 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
33f8ca73 | 8570 | echo "configure:8571: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8571 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8572 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8573 | else |
8574 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8575 | #line 8576 "configure" |
c906108c | 8576 | #include "confdefs.h" |
97bf5e38 MK |
8577 | #include <sys/types.h> |
8578 | #ifdef HAVE_NLIST_H | |
8579 | #include <nlist.h> | |
8580 | #endif | |
8581 | #include <link.h> | |
8582 | int main() { | |
8583 | struct so_map lm; (void) lm.som_addr; | |
8584 | ; return 0; } | |
8585 | EOF | |
33f8ca73 | 8586 | if { (eval echo configure:8587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8587 | rm -rf conftest* |
8588 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8589 | else | |
8590 | echo "configure: failed program was:" >&5 | |
8591 | cat conftest.$ac_ext >&5 | |
8592 | rm -rf conftest* | |
8593 | gdb_cv_have_struct_so_map_with_som_members=no | |
8594 | fi | |
8595 | rm -f conftest* | |
8596 | fi | |
c906108c | 8597 | |
97bf5e38 MK |
8598 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8599 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8600 | cat >> confdefs.h <<\EOF | |
8601 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8602 | EOF | |
c906108c | 8603 | |
97bf5e38 | 8604 | fi |
c906108c | 8605 | |
97bf5e38 MK |
8606 | |
8607 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
33f8ca73 | 8608 | echo "configure:8609: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8609 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8611 | else | |
8612 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8613 | #line 8614 "configure" |
97bf5e38 MK |
8614 | #include "confdefs.h" |
8615 | #define _SYSCALL32 | |
8616 | #include <sys/link.h> | |
8617 | int main() { | |
8618 | struct link_map32 l; | |
8619 | ; return 0; } | |
8620 | EOF | |
33f8ca73 | 8621 | if { (eval echo configure:8622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8622 | rm -rf conftest* |
8623 | gdb_cv_have_struct_link_map32=yes | |
8624 | else | |
8625 | echo "configure: failed program was:" >&5 | |
8626 | cat conftest.$ac_ext >&5 | |
8627 | rm -rf conftest* | |
8628 | gdb_cv_have_struct_link_map32=no | |
8629 | fi | |
8630 | rm -f conftest* | |
8631 | fi | |
c906108c | 8632 | |
97bf5e38 MK |
8633 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8634 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8635 | cat >> confdefs.h <<\EOF | |
8636 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8637 | EOF | |
c906108c | 8638 | |
97bf5e38 MK |
8639 | cat >> confdefs.h <<\EOF |
8640 | #define _SYSCALL32 1 | |
8641 | EOF | |
c906108c | 8642 | |
97bf5e38 MK |
8643 | fi |
8644 | fi | |
c906108c | 8645 | |
c906108c | 8646 | |
97bf5e38 | 8647 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
33f8ca73 | 8648 | echo "configure:8649: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8649 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8650 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8651 | else | |
8652 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8653 | #line 8654 "configure" |
97bf5e38 | 8654 | #include "confdefs.h" |
c906108c | 8655 | |
97bf5e38 | 8656 | int main() { |
c906108c | 8657 | |
97bf5e38 MK |
8658 | extern long long foo; |
8659 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8660 | |
97bf5e38 MK |
8661 | ; return 0; } |
8662 | EOF | |
33f8ca73 | 8663 | if { (eval echo configure:8664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8664 | rm -rf conftest* |
8665 | gdb_cv_c_long_long=yes | |
8666 | else | |
8667 | echo "configure: failed program was:" >&5 | |
8668 | cat conftest.$ac_ext >&5 | |
8669 | rm -rf conftest* | |
8670 | gdb_cv_c_long_long=no | |
8671 | fi | |
8672 | rm -f conftest* | |
8673 | fi | |
c906108c | 8674 | |
97bf5e38 MK |
8675 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8676 | if test $gdb_cv_c_long_long = yes; then | |
8677 | cat >> confdefs.h <<\EOF | |
8678 | #define CC_HAS_LONG_LONG 1 | |
8679 | EOF | |
8680 | ||
8681 | fi | |
8682 | ||
8683 | ||
8684 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
33f8ca73 | 8685 | echo "configure:8686: checking for long long support in printf" >&5 |
97bf5e38 MK |
8686 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8688 | else | |
8689 | if test "$cross_compiling" = yes; then | |
8690 | gdb_cv_printf_has_long_long=no | |
8691 | else | |
8692 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8693 | #line 8694 "configure" |
97bf5e38 MK |
8694 | #include "confdefs.h" |
8695 | ||
8696 | int main () { | |
8697 | char buf[32]; | |
8698 | long long l = 0; | |
8699 | l = (l << 16) + 0x0123; | |
8700 | l = (l << 16) + 0x4567; | |
8701 | l = (l << 16) + 0x89ab; | |
8702 | l = (l << 16) + 0xcdef; | |
8703 | sprintf (buf, "0x%016llx", l); | |
8704 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8705 | } |
97bf5e38 | 8706 | EOF |
33f8ca73 | 8707 | if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8708 | then |
8709 | gdb_cv_printf_has_long_long=yes | |
8710 | else | |
8711 | echo "configure: failed program was:" >&5 | |
8712 | cat conftest.$ac_ext >&5 | |
8713 | rm -fr conftest* | |
8714 | gdb_cv_printf_has_long_long=no | |
8715 | fi | |
8716 | rm -fr conftest* | |
8717 | fi | |
8718 | ||
8719 | fi | |
8720 | ||
8721 | if test $gdb_cv_printf_has_long_long = yes; then | |
8722 | cat >> confdefs.h <<\EOF | |
8723 | #define PRINTF_HAS_LONG_LONG 1 | |
8724 | EOF | |
8725 | ||
8726 | fi | |
8727 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8728 | ||
8729 | ||
8730 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
33f8ca73 | 8731 | echo "configure:8732: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8732 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8734 | else | |
8735 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8736 | #line 8737 "configure" |
97bf5e38 MK |
8737 | #include "confdefs.h" |
8738 | ||
8739 | int main() { | |
8740 | long double foo; | |
8741 | ; return 0; } | |
8742 | EOF | |
33f8ca73 | 8743 | if { (eval echo configure:8744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8744 | rm -rf conftest* |
8745 | ac_cv_c_long_double=yes | |
8746 | else | |
8747 | echo "configure: failed program was:" >&5 | |
8748 | cat conftest.$ac_ext >&5 | |
8749 | rm -rf conftest* | |
8750 | ac_cv_c_long_double=no | |
8751 | fi | |
8752 | rm -f conftest* | |
8753 | fi | |
c906108c | 8754 | |
97bf5e38 MK |
8755 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8756 | if test $ac_cv_c_long_double = yes; then | |
8757 | cat >> confdefs.h <<\EOF | |
8758 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8759 | EOF |
97bf5e38 MK |
8760 | |
8761 | fi | |
8762 | ||
8763 | ||
8764 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
33f8ca73 | 8765 | echo "configure:8766: checking for long double support in printf" >&5 |
97bf5e38 MK |
8766 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8767 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8768 | else | |
8769 | if test "$cross_compiling" = yes; then | |
8770 | gdb_cv_printf_has_long_double=no | |
8771 | else | |
8772 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8773 | #line 8774 "configure" |
97bf5e38 MK |
8774 | #include "confdefs.h" |
8775 | ||
8776 | int main () { | |
8777 | char buf[16]; | |
8778 | long double f = 3.141592653; | |
8779 | sprintf (buf, "%Lg", f); | |
8780 | return (strncmp ("3.14159", buf, 7)); | |
8781 | } | |
8782 | EOF | |
33f8ca73 | 8783 | if { (eval echo configure:8784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8784 | then |
97bf5e38 | 8785 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8786 | else |
8787 | echo "configure: failed program was:" >&5 | |
8788 | cat conftest.$ac_ext >&5 | |
8789 | rm -fr conftest* | |
97bf5e38 | 8790 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8791 | fi |
8792 | rm -fr conftest* | |
8793 | fi | |
8794 | ||
8795 | fi | |
8796 | ||
97bf5e38 | 8797 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8798 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8799 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8800 | EOF | |
8801 | ||
8802 | fi | |
8803 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8804 | ||
8805 | ||
8806 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
33f8ca73 | 8807 | echo "configure:8808: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8808 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8809 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8810 | else | |
8811 | if test "$cross_compiling" = yes; then | |
8812 | gdb_cv_scanf_has_long_double=no | |
8813 | else | |
8814 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8815 | #line 8816 "configure" |
97bf5e38 MK |
8816 | #include "confdefs.h" |
8817 | ||
8818 | int main () { | |
8819 | char *buf = "3.141592653"; | |
8820 | long double f = 0; | |
8821 | sscanf (buf, "%Lg", &f); | |
8822 | return !(f > 3.14159 && f < 3.14160); | |
8823 | } | |
c906108c | 8824 | EOF |
33f8ca73 | 8825 | if { (eval echo configure:8826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8826 | then |
8827 | gdb_cv_scanf_has_long_double=yes | |
8828 | else | |
8829 | echo "configure: failed program was:" >&5 | |
8830 | cat conftest.$ac_ext >&5 | |
8831 | rm -fr conftest* | |
8832 | gdb_cv_scanf_has_long_double=no | |
8833 | fi | |
8834 | rm -fr conftest* | |
8835 | fi | |
c906108c SS |
8836 | |
8837 | fi | |
8838 | ||
97bf5e38 MK |
8839 | if test $gdb_cv_scanf_has_long_double = yes; then |
8840 | cat >> confdefs.h <<\EOF | |
8841 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8842 | EOF | |
8843 | ||
8844 | fi | |
8845 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8846 | |
438013df AO |
8847 | case ${host_os} in |
8848 | aix*) | |
8849 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
33f8ca73 | 8850 | echo "configure:8851: checking for -bbigtoc option" >&5 |
438013df AO |
8851 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8852 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8853 | else | |
8854 | ||
8855 | SAVE_LDFLAGS=$LDFLAGS | |
8856 | ||
8857 | case $GCC in | |
8858 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8859 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8860 | esac | |
8861 | ||
8862 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8863 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8864 | #line 8865 "configure" |
438013df AO |
8865 | #include "confdefs.h" |
8866 | ||
8867 | int main() { | |
8868 | int i; | |
8869 | ; return 0; } | |
8870 | EOF | |
33f8ca73 | 8871 | if { (eval echo configure:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8872 | : |
8873 | else | |
8874 | echo "configure: failed program was:" >&5 | |
8875 | cat conftest.$ac_ext >&5 | |
8876 | rm -rf conftest* | |
8877 | gdb_cv_bigtoc= | |
8878 | fi | |
8879 | rm -f conftest* | |
8880 | ||
8881 | fi | |
8882 | ||
8883 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8884 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8885 | ;; | |
8886 | esac | |
8887 | ||
c906108c SS |
8888 | |
8889 | ||
8890 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8891 | case ${host_os} in | |
8892 | hpux*) | |
8893 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
33f8ca73 | 8894 | echo "configure:8895: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8895 | if test -f /usr/include/dce/cma_config.h ; then |
8896 | if test "$GCC" = "yes" ; then | |
8897 | echo "$ac_t""yes" 1>&6 | |
8898 | cat >> confdefs.h <<\EOF | |
8899 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8900 | EOF | |
8901 | ||
66b965bb | 8902 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8903 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8904 | else | |
8905 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8906 | fi | |
8907 | else | |
8908 | echo "$ac_t""no" 1>&6 | |
8909 | fi | |
8910 | ;; | |
8911 | solaris*) | |
d92419e5 JB |
8912 | # See if thread_db library is around for Solaris thread debugging. |
8913 | # Note that we must explicitly test for version 1 of the library | |
8914 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8915 | # the same API. | |
c906108c | 8916 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
33f8ca73 | 8917 | echo "configure:8918: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8918 | if test -f /usr/lib/libthread_db.so.1 ; then |
8919 | echo "$ac_t""yes" 1>&6 | |
8920 | cat >> confdefs.h <<\EOF | |
8921 | #define HAVE_THREAD_DB_LIB 1 | |
8922 | EOF | |
8923 | ||
66b965bb | 8924 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8925 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8926 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
33f8ca73 | 8927 | echo "configure:8928: checking for dlopen in -ldl" >&5 |
c906108c SS |
8928 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8929 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8931 | else | |
8932 | ac_save_LIBS="$LIBS" | |
8933 | LIBS="-ldl $LIBS" | |
8934 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8935 | #line 8936 "configure" |
c906108c SS |
8936 | #include "confdefs.h" |
8937 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8938 | /* We use char because int might match the return type of a gcc2 | |
8939 | builtin and then its argument prototype would still apply. */ | |
8940 | char dlopen(); | |
8941 | ||
8942 | int main() { | |
8943 | dlopen() | |
8944 | ; return 0; } | |
8945 | EOF | |
33f8ca73 | 8946 | if { (eval echo configure:8947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8947 | rm -rf conftest* |
8948 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8949 | else | |
8950 | echo "configure: failed program was:" >&5 | |
8951 | cat conftest.$ac_ext >&5 | |
8952 | rm -rf conftest* | |
8953 | eval "ac_cv_lib_$ac_lib_var=no" | |
8954 | fi | |
8955 | rm -f conftest* | |
8956 | LIBS="$ac_save_LIBS" | |
8957 | ||
8958 | fi | |
8959 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8960 | echo "$ac_t""yes" 1>&6 | |
8961 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8962 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8963 | cat >> confdefs.h <<EOF | |
8964 | #define $ac_tr_lib 1 | |
8965 | EOF | |
8966 | ||
8967 | LIBS="-ldl $LIBS" | |
8968 | ||
8969 | else | |
8970 | echo "$ac_t""no" 1>&6 | |
8971 | fi | |
8972 | ||
8973 | if test "$GCC" = "yes" ; then | |
8974 | # The GNU linker requires the -export-dynamic option to make | |
8975 | # all symbols visible in the dynamic symbol table. | |
8976 | hold_ldflags=$LDFLAGS | |
8977 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
33f8ca73 | 8978 | echo "configure:8979: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8979 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8980 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 8981 | #line 8982 "configure" |
c906108c SS |
8982 | #include "confdefs.h" |
8983 | ||
8984 | int main() { | |
8985 | int i; | |
8986 | ; return 0; } | |
8987 | EOF | |
33f8ca73 | 8988 | if { (eval echo configure:8989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8989 | rm -rf conftest* |
8990 | found=yes | |
8991 | else | |
8992 | echo "configure: failed program was:" >&5 | |
8993 | cat conftest.$ac_ext >&5 | |
8994 | rm -rf conftest* | |
8995 | found=no | |
8996 | fi | |
8997 | rm -f conftest* | |
8998 | LDFLAGS=$hold_ldflags | |
8999 | echo "$ac_t""$found" 1>&6 | |
9000 | if test $found = yes; then | |
9001 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
9002 | fi | |
9003 | fi | |
9004 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
9005 | # at one point. | |
9006 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
33f8ca73 | 9007 | echo "configure:9008: checking if <proc_service.h> is old" >&5 |
c906108c SS |
9008 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
9009 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9010 | else | |
9011 | ||
9012 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9013 | #line 9014 "configure" |
c906108c SS |
9014 | #include "confdefs.h" |
9015 | ||
9016 | #include <proc_service.h> | |
9017 | ps_err_e ps_pdwrite | |
9018 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
9019 | ||
9020 | int main() { | |
9021 | ||
9022 | ; return 0; } | |
9023 | EOF | |
33f8ca73 | 9024 | if { (eval echo configure:9025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9025 | rm -rf conftest* |
9026 | gdb_cv_proc_service_is_old=no | |
9027 | else | |
9028 | echo "configure: failed program was:" >&5 | |
9029 | cat conftest.$ac_ext >&5 | |
9030 | rm -rf conftest* | |
9031 | gdb_cv_proc_service_is_old=yes | |
9032 | fi | |
9033 | rm -f conftest* | |
9034 | ||
9035 | fi | |
9036 | ||
9037 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
9038 | if test $gdb_cv_proc_service_is_old = yes; then | |
9039 | cat >> confdefs.h <<\EOF | |
9040 | #define PROC_SERVICE_IS_OLD 1 | |
9041 | EOF | |
9042 | ||
9043 | fi | |
9044 | else | |
9045 | echo "$ac_t""no" 1>&6 | |
9046 | fi | |
9047 | ;; | |
d92419e5 JB |
9048 | aix*) |
9049 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
33f8ca73 | 9050 | echo "configure:9051: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
9051 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
9052 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9053 | else | |
9054 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9055 | #line 9056 "configure" |
d92419e5 JB |
9056 | #include "confdefs.h" |
9057 | #include <sys/pthdebug.h> | |
9058 | int main() { | |
9059 | #ifndef PTHDB_VERSION_3 | |
9060 | #error | |
9061 | #endif | |
9062 | ; return 0; } | |
9063 | EOF | |
33f8ca73 | 9064 | if { (eval echo configure:9065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
9065 | rm -rf conftest* |
9066 | gdb_cv_have_aix_thread_debug=yes | |
9067 | else | |
9068 | echo "configure: failed program was:" >&5 | |
9069 | cat conftest.$ac_ext >&5 | |
9070 | rm -rf conftest* | |
9071 | gdb_cv_have_aix_thread_debug=no | |
9072 | fi | |
9073 | rm -f conftest* | |
9074 | fi | |
9075 | ||
9076 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
9077 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
9078 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
9079 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
9080 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
9081 | fi | |
9082 | ;; | |
c906108c SS |
9083 | esac |
9084 | ||
9085 | fi | |
9086 | ||
3f47be5c EZ |
9087 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
9088 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
33f8ca73 | 9089 | echo "configure:9090: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
9090 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
9091 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9092 | else | |
9093 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9094 | #line 9095 "configure" |
3f47be5c EZ |
9095 | #include "confdefs.h" |
9096 | #include <thread_db.h> | |
9097 | int main() { | |
9098 | int i = TD_NOTALLOC; | |
9099 | ; return 0; } | |
9100 | EOF | |
33f8ca73 | 9101 | if { (eval echo configure:9102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
9102 | rm -rf conftest* |
9103 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
9104 | else | |
9105 | echo "configure: failed program was:" >&5 | |
9106 | cat conftest.$ac_ext >&5 | |
9107 | rm -rf conftest* | |
9108 | gdb_cv_thread_db_h_has_td_notalloc=no | |
9109 | ||
9110 | fi | |
9111 | rm -f conftest* | |
9112 | ||
9113 | fi | |
9114 | ||
9115 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
9116 | fi | |
9117 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
9118 | cat >> confdefs.h <<\EOF | |
9119 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
9120 | EOF | |
9121 | ||
9122 | fi | |
9123 | ||
b757528f JJ |
9124 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
9125 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
33f8ca73 | 9126 | echo "configure:9127: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
9127 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
9128 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9129 | else | |
9130 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9131 | #line 9132 "configure" |
b757528f JJ |
9132 | #include "confdefs.h" |
9133 | #include <sys/syscall.h> | |
9134 | int main() { | |
9135 | int i = __NR_tkill; | |
9136 | ; return 0; } | |
9137 | EOF | |
33f8ca73 | 9138 | if { (eval echo configure:9139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
9139 | rm -rf conftest* |
9140 | gdb_cv_sys_syscall_h_has_tkill=yes | |
9141 | else | |
9142 | echo "configure: failed program was:" >&5 | |
9143 | cat conftest.$ac_ext >&5 | |
9144 | rm -rf conftest* | |
9145 | gdb_cv_sys_syscall_h_has_tkill=no | |
9146 | ||
9147 | fi | |
9148 | rm -f conftest* | |
9149 | ||
9150 | fi | |
9151 | ||
9152 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
9153 | fi | |
9154 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
9155 | cat >> confdefs.h <<\EOF | |
9156 | #define HAVE_TKILL_SYSCALL 1 | |
9157 | EOF | |
9158 | ||
9159 | fi | |
9160 | ||
fb40c209 | 9161 | |
030292b7 DJ |
9162 | # Check whether --with-sysroot or --without-sysroot was given. |
9163 | if test "${with_sysroot+set}" = set; then | |
9164 | withval="$with_sysroot" | |
9165 | ||
9166 | case ${with_sysroot} in | |
715d1656 | 9167 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
9168 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
9169 | esac | |
9170 | ||
9171 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
9172 | ||
9173 | if test "x$exec_prefix" = xNONE; then | |
9174 | if test "x$prefix" = xNONE; then | |
9175 | test_prefix=/usr/local | |
9176 | else | |
9177 | test_prefix=$prefix | |
9178 | fi | |
9179 | else | |
9180 | test_prefix=$exec_prefix | |
9181 | fi | |
9182 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
9183 | "${test_prefix}"|"${test_prefix}/"*|\ |
9184 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
9185 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
9186 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
9187 | ;; | |
9188 | esac | |
9189 | ||
9190 | else | |
9191 | ||
9192 | TARGET_SYSTEM_ROOT= | |
9193 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
9194 | ||
9195 | fi | |
9196 | ||
9197 | ||
9198 | ||
9199 | ||
3b851bce AC |
9200 | # NOTE: Don't add -Wall or -Wunused, they both include |
9201 | # -Wunused-parameter which reports bogus warnings. | |
9202 | # NOTE: If you add to this list, remember to update | |
9203 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 9204 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
0f0cffd2 AC |
9205 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \ |
9206 | -Wunused-label" | |
d8038014 | 9207 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
0f0cffd2 | 9208 | # -Wunused-function -Wunused-variable -Wunused-value |
93d56215 | 9209 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
9210 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
9211 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
9212 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
9213 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
9214 | if test "${enable_build_warnings+set}" = set; then | |
9215 | enableval="$enable_build_warnings" | |
1decb323 | 9216 | case "${enableval}" in |
c906108c SS |
9217 | yes) ;; |
9218 | no) build_warnings="-w";; | |
9219 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9220 | build_warnings="${build_warnings} ${t}";; | |
9221 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9222 | build_warnings="${t} ${build_warnings}";; | |
9223 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9224 | esac | |
d4f3574e | 9225 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 9226 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 9227 | fi |
1decb323 | 9228 | fi |
3b851bce AC |
9229 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
9230 | if test "${enable_gdb_build_warnings+set}" = set; then | |
9231 | enableval="$enable_gdb_build_warnings" | |
9232 | case "${enableval}" in | |
9233 | yes) ;; | |
9234 | no) build_warnings="-w";; | |
9235 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9236 | build_warnings="${build_warnings} ${t}";; | |
9237 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9238 | build_warnings="${t} ${build_warnings}";; | |
9239 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9240 | esac | |
9241 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9242 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9243 | fi | |
9244 | fi | |
104c1213 JM |
9245 | WARN_CFLAGS="" |
9246 | WERROR_CFLAGS="" | |
c906108c SS |
9247 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
9248 | then | |
746a987d | 9249 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
33f8ca73 | 9250 | echo "configure:9251: checking compiler warning flags" >&5 |
746a987d AC |
9251 | # Separate out the -Werror flag as some files just cannot be |
9252 | # compiled with it enabled. | |
9253 | for w in ${build_warnings}; do | |
9254 | case $w in | |
9255 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
9256 | *) # Check that GCC accepts it | |
4536bbc6 AC |
9257 | saved_CFLAGS="$CFLAGS" |
9258 | CFLAGS="$CFLAGS $w" | |
9259 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9260 | #line 9261 "configure" |
4536bbc6 AC |
9261 | #include "confdefs.h" |
9262 | ||
9263 | int main() { | |
9264 | ||
9265 | ; return 0; } | |
9266 | EOF | |
33f8ca73 | 9267 | if { (eval echo configure:9268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
9268 | rm -rf conftest* |
9269 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9270 | else | |
9271 | echo "configure: failed program was:" >&5 | |
9272 | cat conftest.$ac_ext >&5 | |
9273 | fi | |
9274 | rm -f conftest* | |
9275 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
9276 | esac |
9277 | done | |
9278 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
9279 | fi |
9280 | ||
9281 | ||
104c1213 | 9282 | |
7a292a7a SS |
9283 | # In the Cygwin environment, we need some additional flags. |
9284 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
33f8ca73 | 9285 | echo "configure:9286: checking for cygwin" >&5 |
7a292a7a SS |
9286 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9287 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9288 | else | |
9289 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9290 | #line 9291 "configure" |
7a292a7a SS |
9291 | #include "confdefs.h" |
9292 | ||
9293 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
9294 | lose | |
9295 | #endif | |
9296 | EOF | |
9297 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9298 | egrep "lose" >/dev/null 2>&1; then | |
9299 | rm -rf conftest* | |
9300 | gdb_cv_os_cygwin=yes | |
9301 | else | |
9302 | rm -rf conftest* | |
9303 | gdb_cv_os_cygwin=no | |
9304 | fi | |
9305 | rm -f conftest* | |
9306 | ||
9307 | fi | |
9308 | ||
9309 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
9310 | ||
aff38e61 AC |
9311 | |
9312 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9313 | case ${host} in | |
95cbc983 AC |
9314 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9315 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9316 | esac |
9317 | ||
9318 | ||
cd0fc7c3 SS |
9319 | # libreadline needs libuser32.a in a cygwin environment |
9320 | WIN32LIBS= | |
9321 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9322 | WIN32LIBS="-luser32" |
9323 | case "${target}" in | |
9324 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9325 | ;; | |
9326 | esac | |
cd0fc7c3 | 9327 | fi |
c906108c | 9328 | |
7a292a7a | 9329 | |
3fc11d3e JM |
9330 | LIBGUI="../libgui/src/libgui.a" |
9331 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9332 | ||
9333 | ||
7a292a7a | 9334 | |
3fc11d3e JM |
9335 | WIN32LDAPP= |
9336 | ||
9337 | ||
9338 | ||
9339 | configdir="unix" | |
9340 | ||
9341 | GDBTKLIBS= | |
9342 | if test "${enable_gdbtk}" = "yes"; then | |
9343 | ||
d1c3b63a KS |
9344 | # Gdbtk must have an absolute path to srcdir in order to run |
9345 | # properly when not installed. | |
9346 | here=`pwd` | |
9347 | cd ${srcdir} | |
9348 | GDBTK_SRC_DIR=`pwd` | |
9349 | cd $here | |
9350 | ||
3fc11d3e JM |
9351 | |
9352 | # | |
9353 | # Ok, lets find the tcl configuration | |
9354 | # First, look for one uninstalled. | |
9355 | # the alternative search directory is invoked by --with-tclconfig | |
9356 | # | |
9357 | ||
9358 | if test x"${no_tcl}" = x ; then | |
9359 | # we reset no_tcl in case something fails here | |
9360 | no_tcl=true | |
9361 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9362 | if test "${with_tclconfig+set}" = set; then | |
9363 | withval="$with_tclconfig" | |
9364 | with_tclconfig=${withval} | |
9365 | fi | |
9366 | ||
9367 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
33f8ca73 | 9368 | echo "configure:9369: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9369 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9370 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9371 | else | |
9372 | ||
9373 | ||
9374 | # First check to see if --with-tclconfig was specified. | |
9375 | if test x"${with_tclconfig}" != x ; then | |
9376 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9377 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9378 | else | |
9379 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9380 | fi | |
9381 | fi | |
9382 | ||
9383 | # then check for a private Tcl installation | |
9384 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9385 | for i in \ | |
9386 | ../tcl \ | |
9387 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9388 | ../../tcl \ | |
9389 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9390 | ../../../tcl \ | |
9391 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9392 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9393 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9394 | break | |
9395 | fi | |
9396 | done | |
9397 | fi | |
9398 | # check in a few common install locations | |
9399 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9400 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9401 | if test -f "$i/tclConfig.sh" ; then | |
9402 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9403 | break | |
9404 | fi | |
9405 | done | |
9406 | fi | |
9407 | # check in a few other private locations | |
9408 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9409 | for i in \ | |
9410 | ${srcdir}/../tcl \ | |
9411 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9412 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9413 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9414 | break | |
9415 | fi | |
9416 | done | |
9417 | fi | |
9418 | ||
9419 | fi | |
9420 | ||
9421 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9422 | TCLCONFIG="# no Tcl configs found" | |
9423 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9424 | else | |
9425 | no_tcl= | |
9426 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9427 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9428 | fi | |
9429 | fi | |
9430 | ||
9431 | if test -z "${no_tcl}"; then | |
9432 | ||
9433 | . $TCLCONFIG | |
9434 | ||
9435 | ||
9436 | ||
9437 | ||
9438 | ||
9439 | ||
9440 | ||
9441 | ||
9442 | ||
9443 | ||
9444 | ||
9445 | ||
9446 | ||
9447 | ||
9448 | ||
9449 | ||
9450 | ||
9451 | ||
9452 | ||
9453 | ||
033afc63 | 9454 | |
3fc11d3e JM |
9455 | |
9456 | ||
9457 | ||
9458 | ||
9459 | ||
9460 | ||
9461 | # | |
9462 | # Ok, lets find the tk configuration | |
9463 | # First, look for one uninstalled. | |
9464 | # the alternative search directory is invoked by --with-tkconfig | |
9465 | # | |
9466 | ||
9467 | if test x"${no_tk}" = x ; then | |
9468 | # we reset no_tk in case something fails here | |
9469 | no_tk=true | |
9470 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9471 | if test "${with_tkconfig+set}" = set; then | |
9472 | withval="$with_tkconfig" | |
9473 | with_tkconfig=${withval} | |
9474 | fi | |
9475 | ||
9476 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
33f8ca73 | 9477 | echo "configure:9478: checking for Tk configuration" >&5 |
3fc11d3e JM |
9478 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9480 | else | |
9481 | ||
9482 | ||
9483 | # First check to see if --with-tkconfig was specified. | |
9484 | if test x"${with_tkconfig}" != x ; then | |
9485 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9486 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9487 | else | |
9488 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9489 | fi | |
9490 | fi | |
9491 | ||
9492 | # then check for a private Tk library | |
9493 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9494 | for i in \ | |
9495 | ../tk \ | |
9496 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9497 | ../../tk \ | |
9498 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9499 | ../../../tk \ | |
9500 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9501 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9502 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9503 | break | |
9504 | fi | |
9505 | done | |
9506 | fi | |
9507 | # check in a few common install locations | |
9508 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9509 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9510 | if test -f "$i/tkConfig.sh" ; then | |
9511 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9512 | break | |
9513 | fi | |
9514 | done | |
9515 | fi | |
9516 | # check in a few other private locations | |
9517 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9518 | for i in \ | |
9519 | ${srcdir}/../tk \ | |
9520 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9521 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9522 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9523 | break | |
9524 | fi | |
9525 | done | |
9526 | fi | |
9527 | ||
9528 | fi | |
9529 | ||
9530 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9531 | TKCONFIG="# no Tk configs found" | |
9532 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9533 | else | |
9534 | no_tk= | |
9535 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9536 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9537 | fi | |
9538 | fi | |
9539 | ||
9540 | ||
9541 | ||
dd2504ab JM |
9542 | # now look for Tcl library stuff |
9543 | ||
9544 | case "${host}" in | |
9545 | *-*-cygwin*) | |
9546 | tcldir=../tcl/win/ | |
9547 | ;; | |
9548 | *) | |
9549 | tcldir=../tcl/unix/ | |
9550 | ;; | |
9551 | esac | |
9552 | ||
9553 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9554 | ||
3fc11d3e JM |
9555 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9556 | # point to doing Tcl. | |
9557 | if test -z "${no_tk}"; then | |
9558 | ||
9559 | if test -f "$TKCONFIG" ; then | |
9560 | . $TKCONFIG | |
9561 | fi | |
9562 | ||
9563 | ||
9564 | ||
9565 | ||
9566 | ||
9567 | ||
9568 | ||
9569 | ||
9570 | ||
9571 | ||
9572 | ||
9573 | ||
9574 | ||
9575 | ||
9576 | # | |
9577 | # Ok, lets find the tcl source trees so we can use the headers | |
9578 | # Warning: transition of version 9 to 10 will break this algorithm | |
9579 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9580 | # be careful that we don't match stuff like tclX by accident. | |
9581 | # the alternative search directory is involked by --with-tclinclude | |
9582 | # | |
9583 | ||
9584 | no_tcl=true | |
9585 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
33f8ca73 | 9586 | echo "configure:9587: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9587 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9588 | if test "${with_tclinclude+set}" = set; then | |
9589 | withval="$with_tclinclude" | |
9590 | with_tclinclude=${withval} | |
9591 | fi | |
9592 | ||
9593 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9594 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9595 | else | |
9596 | ||
9597 | # first check to see if --with-tclinclude was specified | |
9598 | if test x"${with_tclinclude}" != x ; then | |
9599 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9600 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9601 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9602 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9603 | else | |
9604 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9605 | fi | |
9606 | fi | |
9607 | ||
9608 | # next check if it came with Tcl configuration file | |
9609 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9610 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9611 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9612 | fi | |
9613 | fi | |
9614 | ||
9615 | # next check in private source directory | |
9616 | # | |
9617 | # since ls returns lowest version numbers first, reverse its output | |
9618 | if test x"${ac_cv_c_tclh}" = x ; then | |
9619 | for i in \ | |
9620 | ${srcdir}/../tcl \ | |
9621 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9622 | ${srcdir}/../../tcl \ | |
9623 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9624 | ${srcdir}/../../../tcl \ | |
9625 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9626 | if test -f $i/generic/tclInt.h ; then | |
9627 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9628 | break | |
9629 | fi | |
9630 | done | |
9631 | fi | |
9632 | # finally check in a few common install locations | |
9633 | # | |
9634 | # since ls returns lowest version numbers first, reverse its output | |
9635 | if test x"${ac_cv_c_tclh}" = x ; then | |
9636 | for i in \ | |
9637 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9638 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9639 | /usr/local/src/tcl \ | |
9640 | /usr/local/lib/tcl \ | |
9641 | ${prefix}/include ; do | |
9642 | if test -f $i/generic/tclInt.h ; then | |
9643 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9644 | break | |
9645 | fi | |
9646 | done | |
9647 | fi | |
9648 | # see if one is installed | |
9649 | if test x"${ac_cv_c_tclh}" = x ; then | |
9650 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9651 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
33f8ca73 | 9652 | echo "configure:9653: checking for tclInt.h" >&5 |
3fc11d3e JM |
9653 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9654 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9655 | else | |
9656 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9657 | #line 9658 "configure" |
3fc11d3e JM |
9658 | #include "confdefs.h" |
9659 | #include <tclInt.h> | |
9660 | EOF | |
9661 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 9662 | { (eval echo configure:9663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9663 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9664 | if test -z "$ac_err"; then | |
9665 | rm -rf conftest* | |
9666 | eval "ac_cv_header_$ac_safe=yes" | |
9667 | else | |
9668 | echo "$ac_err" >&5 | |
9669 | echo "configure: failed program was:" >&5 | |
9670 | cat conftest.$ac_ext >&5 | |
9671 | rm -rf conftest* | |
9672 | eval "ac_cv_header_$ac_safe=no" | |
9673 | fi | |
9674 | rm -f conftest* | |
9675 | fi | |
9676 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9677 | echo "$ac_t""yes" 1>&6 | |
9678 | ac_cv_c_tclh=installed | |
9679 | else | |
9680 | echo "$ac_t""no" 1>&6 | |
9681 | ac_cv_c_tclh="" | |
9682 | fi | |
9683 | ||
9684 | fi | |
9685 | ||
9686 | fi | |
9687 | ||
9688 | if test x"${ac_cv_c_tclh}" = x ; then | |
9689 | TCLHDIR="# no Tcl private headers found" | |
9690 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9691 | fi | |
9692 | if test x"${ac_cv_c_tclh}" != x ; then | |
9693 | no_tcl="" | |
9694 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9695 | echo "$ac_t""is installed" 1>&6 | |
9696 | TCLHDIR="" | |
9697 | else | |
9698 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9699 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9700 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9701 | fi | |
9702 | fi | |
9703 | ||
9704 | ||
9705 | ||
9706 | ||
9707 | # | |
9708 | # Ok, lets find the tk source trees so we can use the headers | |
9709 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9710 | # in preference to any others. Same logic is used when choosing library | |
9711 | # and again with Tcl. The search order is the best place to look first, then in | |
9712 | # decreasing significance. The loop breaks if the trigger file is found. | |
9713 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9714 | # directory. This converts the path from a relative to an absolute, so | |
9715 | # recursive cache variables for the path will work right. We check all | |
9716 | # the possible paths in one loop rather than many seperate loops to speed | |
9717 | # things up. | |
9718 | # the alternative search directory is involked by --with-tkinclude | |
9719 | # | |
9720 | no_tk=true | |
9721 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
33f8ca73 | 9722 | echo "configure:9723: checking for Tk private headers" >&5 |
3fc11d3e JM |
9723 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9724 | if test "${with_tkinclude+set}" = set; then | |
9725 | withval="$with_tkinclude" | |
9726 | with_tkinclude=${withval} | |
9727 | fi | |
9728 | ||
9729 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9730 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9731 | else | |
9732 | ||
9733 | # first check to see if --with-tkinclude was specified | |
9734 | if test x"${with_tkinclude}" != x ; then | |
9735 | if test -f ${with_tkinclude}/tk.h ; then | |
9736 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9737 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9738 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9739 | else | |
9740 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9741 | fi | |
9742 | fi | |
9743 | ||
9744 | # next check if it came with Tk configuration file | |
9745 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9746 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9747 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9748 | fi | |
9749 | fi | |
9750 | ||
9751 | # next check in private source directory | |
9752 | # | |
9753 | # since ls returns lowest version numbers first, reverse its output | |
9754 | if test x"${ac_cv_c_tkh}" = x ; then | |
9755 | for i in \ | |
9756 | ${srcdir}/../tk \ | |
9757 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9758 | ${srcdir}/../../tk \ | |
9759 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9760 | ${srcdir}/../../../tk \ | |
9761 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9762 | if test -f $i/generic/tk.h ; then | |
9763 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9764 | break | |
9765 | fi | |
9766 | done | |
9767 | fi | |
9768 | # finally check in a few common install locations | |
9769 | # | |
9770 | # since ls returns lowest version numbers first, reverse its output | |
9771 | if test x"${ac_cv_c_tkh}" = x ; then | |
9772 | for i in \ | |
9773 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9774 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9775 | /usr/local/src/tk \ | |
9776 | /usr/local/lib/tk \ | |
9777 | ${prefix}/include ; do | |
9778 | if test -f $i/generic/tk.h ; then | |
9779 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9780 | break | |
9781 | fi | |
9782 | done | |
9783 | fi | |
9784 | # see if one is installed | |
9785 | if test x"${ac_cv_c_tkh}" = x ; then | |
9786 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9787 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
33f8ca73 | 9788 | echo "configure:9789: checking for tk.h" >&5 |
3fc11d3e JM |
9789 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9790 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9791 | else | |
9792 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 9793 | #line 9794 "configure" |
3fc11d3e JM |
9794 | #include "confdefs.h" |
9795 | #include <tk.h> | |
9796 | EOF | |
9797 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 9798 | { (eval echo configure:9799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9799 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9800 | if test -z "$ac_err"; then | |
9801 | rm -rf conftest* | |
9802 | eval "ac_cv_header_$ac_safe=yes" | |
9803 | else | |
9804 | echo "$ac_err" >&5 | |
9805 | echo "configure: failed program was:" >&5 | |
9806 | cat conftest.$ac_ext >&5 | |
9807 | rm -rf conftest* | |
9808 | eval "ac_cv_header_$ac_safe=no" | |
9809 | fi | |
9810 | rm -f conftest* | |
9811 | fi | |
9812 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9813 | echo "$ac_t""yes" 1>&6 | |
9814 | ac_cv_c_tkh=installed | |
9815 | else | |
9816 | echo "$ac_t""no" 1>&6 | |
9817 | ac_cv_c_tkh="" | |
9818 | fi | |
9819 | ||
9820 | fi | |
9821 | ||
9822 | fi | |
9823 | ||
9824 | if test x"${ac_cv_c_tkh}" != x ; then | |
9825 | no_tk="" | |
9826 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9827 | echo "$ac_t""is installed" 1>&6 | |
9828 | TKHDIR="" | |
9829 | else | |
9830 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9831 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9832 | TKHDIR="-I${ac_cv_c_tkh}" | |
9833 | fi | |
9834 | else | |
9835 | TKHDIR="# no Tk directory found" | |
9836 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9837 | no_tk=true | |
9838 | fi | |
9839 | ||
9840 | ||
9841 | ||
9842 | ||
9843 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
33f8ca73 | 9844 | echo "configure:9845: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9845 | if test x"${ac_cv_c_itclh}" = x ; then |
9846 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9847 | if test -f $i/generic/itcl.h ; then | |
9848 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9849 | break | |
9850 | fi | |
9851 | done | |
9852 | fi | |
9853 | if test x"${ac_cv_c_itclh}" = x ; then | |
9854 | ITCLHDIR="# no Itcl private headers found" | |
9855 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9856 | fi | |
9857 | if test x"${ac_cv_c_itclh}" != x ; then | |
9858 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9859 | fi | |
9860 | # should always be here | |
9861 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9862 | ||
9863 | #AC_SUBST(ITCLLIB) | |
9864 | ||
9865 | ||
9866 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
33f8ca73 | 9867 | echo "configure:9868: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9868 | if test x"${ac_cv_c_itkh}" = x ; then |
9869 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9870 | if test -f $i/generic/itk.h ; then | |
9871 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9872 | break | |
9873 | fi | |
9874 | done | |
9875 | fi | |
9876 | if test x"${ac_cv_c_itkh}" = x ; then | |
9877 | ITKHDIR="# no Itk private headers found" | |
9878 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9879 | fi | |
9880 | if test x"${ac_cv_c_itkh}" != x ; then | |
9881 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9882 | fi | |
9883 | # should always be here | |
9884 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9885 | ||
9886 | #AC_SUBST(ITKLIB) | |
9887 | ||
3fc11d3e | 9888 | |
dd2504ab JM |
9889 | |
9890 | # now look for Tk library stuff | |
9891 | ||
9892 | case "${host}" in | |
9893 | *-*-cygwin*) | |
9894 | tkdir=../tk/win/ | |
9895 | ;; | |
9896 | *) | |
9897 | tkdir=../tk/unix/ | |
9898 | ;; | |
9899 | esac | |
9900 | ||
9901 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9902 | ||
3fc11d3e JM |
9903 | # now look for Itcl library stuff |
9904 | ||
9905 | ||
9906 | # | |
9907 | # Ok, lets find the itcl configuration | |
9908 | # First, look for one uninstalled. | |
9909 | # the alternative search directory is invoked by --with-itclconfig | |
9910 | # | |
9911 | ||
9912 | if test x"${no_itcl}" = x ; then | |
9913 | # we reset no_itcl in case something fails here | |
9914 | no_itcl=true | |
9915 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9916 | if test "${with_itclconfig+set}" = set; then | |
9917 | withval="$with_itclconfig" | |
9918 | with_itclconfig=${withval} | |
9919 | fi | |
9920 | ||
9921 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
33f8ca73 | 9922 | echo "configure:9923: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9923 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9924 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9925 | else | |
9926 | ||
9927 | ||
9928 | # First check to see if --with-itclconfig was specified. | |
9929 | if test x"${with_itclconfig}" != x ; then | |
9930 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9931 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9932 | else | |
9933 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9934 | fi | |
9935 | fi | |
9936 | ||
9937 | # then check for a private Itcl library | |
9938 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9939 | for i in \ | |
9940 | ../itcl/itcl \ | |
9941 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9942 | ../../itcl \ | |
9943 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9944 | ../../../itcl \ | |
9945 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9946 | if test -f "$i/itclConfig.sh" ; then | |
9947 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9948 | break | |
9949 | fi | |
9950 | done | |
9951 | fi | |
9952 | # check in a few common install locations | |
9953 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9954 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9955 | if test -f "$i/itclConfig.sh" ; then | |
9956 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9957 | break | |
9958 | fi | |
9959 | done | |
9960 | fi | |
9961 | # check in a few other private locations | |
9962 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9963 | for i in \ | |
9964 | ${srcdir}/../itcl/itcl \ | |
9965 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9966 | if test -f "$i/itclConfig.sh" ; then | |
9967 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9968 | break | |
9969 | fi | |
9970 | done | |
9971 | fi | |
9972 | ||
9973 | fi | |
9974 | ||
9975 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9976 | ITCLCONFIG="# no Itcl configs found" | |
9977 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9978 | else | |
9979 | no_itcl= | |
9980 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9981 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9982 | fi | |
9983 | fi | |
9984 | ||
9985 | if test -z "${no_itcl}"; then | |
9986 | ||
9987 | if test -f "$ITCLCONFIG" ; then | |
9988 | . $ITCLCONFIG | |
9989 | fi | |
9990 | ||
9991 | ||
9992 | ||
9993 | ||
9994 | ||
9995 | ||
9996 | ||
9997 | ||
9998 | ||
9999 | ||
3fc11d3e JM |
10000 | |
10001 | ||
10002 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 10003 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
10004 | fi |
10005 | ||
10006 | ||
10007 | # now look for Itk library stuff | |
10008 | ||
10009 | # | |
10010 | # Ok, lets find the itk configuration | |
10011 | # First, look for one uninstalled. | |
10012 | # the alternative search directory is invoked by --with-itkconfig | |
10013 | # | |
10014 | ||
10015 | if test x"${no_itk}" = x ; then | |
10016 | # we reset no_itk in case something fails here | |
10017 | no_itk=true | |
10018 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
10019 | if test "${with_itkconfig+set}" = set; then | |
10020 | withval="$with_itkconfig" | |
10021 | with_itkconfig=${withval} | |
10022 | fi | |
10023 | ||
10024 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
33f8ca73 | 10025 | echo "configure:10026: checking for Itk configuration" >&5 |
3fc11d3e JM |
10026 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
10027 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10028 | else | |
10029 | ||
10030 | ||
10031 | # First check to see if --with-itkconfig was specified. | |
10032 | if test x"${with_itkconfig}" != x ; then | |
10033 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
10034 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
10035 | else | |
10036 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
10037 | fi | |
10038 | fi | |
10039 | ||
10040 | # then check for a private Itk library | |
10041 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10042 | for i in \ | |
10043 | ../itcl/itk \ | |
10044 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
10045 | ../../itk \ | |
10046 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
10047 | ../../../itk \ | |
10048 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
10049 | if test -f "$i/itkConfig.sh" ; then | |
10050 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10051 | break | |
10052 | fi | |
10053 | done | |
10054 | fi | |
10055 | # check in a few common install locations | |
10056 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10057 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
10058 | if test -f "$i/itkConfig.sh" ; then | |
10059 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10060 | break | |
10061 | fi | |
10062 | done | |
10063 | fi | |
10064 | # check in a few other private locations | |
10065 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10066 | for i in \ | |
10067 | ${srcdir}/../itcl/itk \ | |
10068 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
10069 | if test -f "$i/itkConfig.sh" ; then | |
10070 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
10071 | break | |
10072 | fi | |
10073 | done | |
10074 | fi | |
10075 | ||
10076 | fi | |
10077 | ||
10078 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
10079 | ITKCONFIG="# no Itk configs found" | |
10080 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
10081 | else | |
10082 | no_itk= | |
10083 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
10084 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
10085 | fi | |
10086 | fi | |
10087 | ||
10088 | ||
10089 | if test -z "${no_itcl}"; then | |
10090 | ||
10091 | if test -f "$ITKCONFIG" ; then | |
10092 | . $ITKCONFIG | |
10093 | fi | |
10094 | ||
10095 | ||
10096 | ||
10097 | ||
10098 | ||
10099 | ||
10100 | ||
10101 | ||
10102 | ||
10103 | ||
10104 | ||
10105 | ||
3fc11d3e | 10106 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 10107 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
10108 | fi |
10109 | ||
4226a5a5 | 10110 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
10111 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
10112 | # know whether 8.2 will or not, but I bet it will. | |
10113 | # I don't have to worry about 7.x since we don't support it. | |
10114 | GDBTK_CFLAGS="" | |
10115 | if test "$GCC" = "yes"; then | |
10116 | if test "$TCL_VERSION" != "8.0" ; then | |
10117 | GDBTK_CFLAGS="-fwritable-strings" | |
10118 | fi | |
10119 | fi | |
10120 | ||
10121 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 10122 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
10123 | # Yes, the ordering seems wrong here. But it isn't. |
10124 | # TK_LIBS is the list of libraries that need to be linked | |
10125 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
10126 | # were in LIBS then any link tests after this point would | |
10127 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
10128 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
10129 | |
10130 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
10131 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
10132 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
33f8ca73 AC |
10133 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" |
10134 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
10135 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
10136 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e JM |
10137 | |
10138 | if test x$gdb_cv_os_cygwin = xyes; then | |
10139 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
10140 | WIN32LDAPP="-Wl,--subsystem,console" | |
10141 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
10142 | fi | |
10143 | fi | |
10144 | fi | |
ffc6a242 | 10145 | |
ffc6a242 | 10146 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
10147 | fi |
10148 | ||
10149 | ||
10150 | ||
10151 | ||
10152 | ||
10153 | ||
10154 | ||
10155 | ||
10156 | ||
10157 | ||
10158 | ||
10159 | ||
10160 | ||
dd2504ab | 10161 | |
c906108c SS |
10162 | # If we find X, set shell vars x_includes and x_libraries to the |
10163 | # paths, otherwise set no_x=yes. | |
10164 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
10165 | # --without-x overrides everything else, but does not touch the cache. | |
10166 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
33f8ca73 | 10167 | echo "configure:10168: checking for X" >&5 |
c906108c SS |
10168 | |
10169 | # Check whether --with-x or --without-x was given. | |
10170 | if test "${with_x+set}" = set; then | |
10171 | withval="$with_x" | |
10172 | : | |
10173 | fi | |
10174 | ||
10175 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
10176 | if test "x$with_x" = xno; then | |
10177 | # The user explicitly disabled X. | |
10178 | have_x=disabled | |
10179 | else | |
10180 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
10181 | # Both variables are already set. | |
10182 | have_x=yes | |
10183 | else | |
10184 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
10185 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10186 | else | |
10187 | # One or both of the vars are not set, and there is no cached value. | |
10188 | ac_x_includes=NO ac_x_libraries=NO | |
10189 | rm -fr conftestdir | |
10190 | if mkdir conftestdir; then | |
10191 | cd conftestdir | |
10192 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
10193 | cat > Imakefile <<'EOF' | |
10194 | acfindx: | |
10195 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
10196 | EOF | |
10197 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
10198 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
10199 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
10200 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
10201 | for ac_extension in a so sl; do | |
10202 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
10203 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
10204 | ac_im_usrlibdir=$ac_im_libdir; break | |
10205 | fi | |
10206 | done | |
10207 | # Screen out bogus values from the imake configuration. They are | |
10208 | # bogus both because they are the default anyway, and because | |
10209 | # using them would break gcc on systems where it needs fixed includes. | |
10210 | case "$ac_im_incroot" in | |
10211 | /usr/include) ;; | |
10212 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
10213 | esac | |
10214 | case "$ac_im_usrlibdir" in | |
10215 | /usr/lib | /lib) ;; | |
10216 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
10217 | esac | |
10218 | fi | |
10219 | cd .. | |
10220 | rm -fr conftestdir | |
10221 | fi | |
10222 | ||
10223 | if test "$ac_x_includes" = NO; then | |
10224 | # Guess where to find include files, by looking for this one X11 .h file. | |
10225 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
10226 | ||
10227 | # First, try using that file with no special directory specified. | |
10228 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 10229 | #line 10230 "configure" |
c906108c SS |
10230 | #include "confdefs.h" |
10231 | #include <$x_direct_test_include> | |
10232 | EOF | |
10233 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
33f8ca73 | 10234 | { (eval echo configure:10235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
10235 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
10236 | if test -z "$ac_err"; then | |
10237 | rm -rf conftest* | |
10238 | # We can compile using X headers with no special include directory. | |
10239 | ac_x_includes= | |
10240 | else | |
10241 | echo "$ac_err" >&5 | |
10242 | echo "configure: failed program was:" >&5 | |
10243 | cat conftest.$ac_ext >&5 | |
10244 | rm -rf conftest* | |
10245 | # Look for the header file in a standard set of common directories. | |
10246 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10247 | for ac_dir in \ | |
10248 | /usr/X11/include \ | |
10249 | /usr/X11R6/include \ | |
10250 | /usr/X11R5/include \ | |
10251 | /usr/X11R4/include \ | |
10252 | \ | |
10253 | /usr/include/X11 \ | |
10254 | /usr/include/X11R6 \ | |
10255 | /usr/include/X11R5 \ | |
10256 | /usr/include/X11R4 \ | |
10257 | \ | |
10258 | /usr/local/X11/include \ | |
10259 | /usr/local/X11R6/include \ | |
10260 | /usr/local/X11R5/include \ | |
10261 | /usr/local/X11R4/include \ | |
10262 | \ | |
10263 | /usr/local/include/X11 \ | |
10264 | /usr/local/include/X11R6 \ | |
10265 | /usr/local/include/X11R5 \ | |
10266 | /usr/local/include/X11R4 \ | |
10267 | \ | |
10268 | /usr/X386/include \ | |
10269 | /usr/x386/include \ | |
10270 | /usr/XFree86/include/X11 \ | |
10271 | \ | |
10272 | /usr/include \ | |
10273 | /usr/local/include \ | |
10274 | /usr/unsupported/include \ | |
10275 | /usr/athena/include \ | |
10276 | /usr/local/x11r5/include \ | |
10277 | /usr/lpp/Xamples/include \ | |
10278 | \ | |
10279 | /usr/openwin/include \ | |
10280 | /usr/openwin/share/include \ | |
10281 | ; \ | |
10282 | do | |
10283 | if test -r "$ac_dir/$x_direct_test_include"; then | |
10284 | ac_x_includes=$ac_dir | |
10285 | break | |
10286 | fi | |
10287 | done | |
10288 | fi | |
10289 | rm -f conftest* | |
10290 | fi # $ac_x_includes = NO | |
10291 | ||
10292 | if test "$ac_x_libraries" = NO; then | |
10293 | # Check for the libraries. | |
10294 | ||
10295 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
10296 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
10297 | ||
10298 | # See if we find them without any special options. | |
10299 | # Don't add to $LIBS permanently. | |
10300 | ac_save_LIBS="$LIBS" | |
10301 | LIBS="-l$x_direct_test_library $LIBS" | |
10302 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 10303 | #line 10304 "configure" |
c906108c SS |
10304 | #include "confdefs.h" |
10305 | ||
10306 | int main() { | |
10307 | ${x_direct_test_function}() | |
10308 | ; return 0; } | |
10309 | EOF | |
33f8ca73 | 10310 | if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10311 | rm -rf conftest* |
10312 | LIBS="$ac_save_LIBS" | |
10313 | # We can link X programs with no special library path. | |
10314 | ac_x_libraries= | |
10315 | else | |
10316 | echo "configure: failed program was:" >&5 | |
10317 | cat conftest.$ac_ext >&5 | |
10318 | rm -rf conftest* | |
10319 | LIBS="$ac_save_LIBS" | |
10320 | # First see if replacing the include by lib works. | |
10321 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10322 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10323 | /usr/X11/lib \ | |
10324 | /usr/X11R6/lib \ | |
10325 | /usr/X11R5/lib \ | |
10326 | /usr/X11R4/lib \ | |
10327 | \ | |
10328 | /usr/lib/X11 \ | |
10329 | /usr/lib/X11R6 \ | |
10330 | /usr/lib/X11R5 \ | |
10331 | /usr/lib/X11R4 \ | |
10332 | \ | |
10333 | /usr/local/X11/lib \ | |
10334 | /usr/local/X11R6/lib \ | |
10335 | /usr/local/X11R5/lib \ | |
10336 | /usr/local/X11R4/lib \ | |
10337 | \ | |
10338 | /usr/local/lib/X11 \ | |
10339 | /usr/local/lib/X11R6 \ | |
10340 | /usr/local/lib/X11R5 \ | |
10341 | /usr/local/lib/X11R4 \ | |
10342 | \ | |
10343 | /usr/X386/lib \ | |
10344 | /usr/x386/lib \ | |
10345 | /usr/XFree86/lib/X11 \ | |
10346 | \ | |
10347 | /usr/lib \ | |
10348 | /usr/local/lib \ | |
10349 | /usr/unsupported/lib \ | |
10350 | /usr/athena/lib \ | |
10351 | /usr/local/x11r5/lib \ | |
10352 | /usr/lpp/Xamples/lib \ | |
10353 | /lib/usr/lib/X11 \ | |
10354 | \ | |
10355 | /usr/openwin/lib \ | |
10356 | /usr/openwin/share/lib \ | |
10357 | ; \ | |
10358 | do | |
10359 | for ac_extension in a so sl; do | |
10360 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10361 | ac_x_libraries=$ac_dir | |
10362 | break 2 | |
10363 | fi | |
10364 | done | |
10365 | done | |
10366 | fi | |
10367 | rm -f conftest* | |
10368 | fi # $ac_x_libraries = NO | |
10369 | ||
10370 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10371 | # Didn't find X anywhere. Cache the known absence of X. | |
10372 | ac_cv_have_x="have_x=no" | |
10373 | else | |
10374 | # Record where we found X for the cache. | |
10375 | ac_cv_have_x="have_x=yes \ | |
10376 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10377 | fi | |
10378 | fi | |
10379 | fi | |
10380 | eval "$ac_cv_have_x" | |
10381 | fi # $with_x != no | |
10382 | ||
10383 | if test "$have_x" != yes; then | |
10384 | echo "$ac_t""$have_x" 1>&6 | |
10385 | no_x=yes | |
10386 | else | |
10387 | # If each of the values was on the command line, it overrides each guess. | |
10388 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10389 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10390 | # Update the cache value to reflect the command line values. | |
10391 | ac_cv_have_x="have_x=yes \ | |
10392 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10393 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10394 | fi | |
10395 | ||
10396 | ||
7a292a7a SS |
10397 | |
10398 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
10399 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10400 | # This code just checks for a few cases where we'd like to ignore those | |
10401 | # definitions, even when they're present in the '.mt' file. These cases | |
10402 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10403 | # not part of the source tree. |
7a292a7a SS |
10404 | # |
10405 | # Check whether --enable-sim or --disable-sim was given. | |
10406 | if test "${enable_sim+set}" = set; then | |
10407 | enableval="$enable_sim" | |
10408 | echo "enable_sim = $enable_sim"; | |
10409 | echo "enableval = ${enableval}"; | |
10410 | case "${enableval}" in | |
10411 | yes) ignore_sim=false ;; | |
10412 | no) ignore_sim=true ;; | |
10413 | *) ignore_sim=false ;; | |
10414 | esac | |
10415 | else | |
10416 | ignore_sim=false | |
10417 | fi | |
10418 | ||
10419 | ||
10420 | if test ! -d "${srcdir}/../sim"; then | |
10421 | ignore_sim=true | |
10422 | fi | |
10423 | ||
10424 | if test "${ignore_sim}" = "true"; then | |
10425 | IGNORE_SIM="SIM=" | |
10426 | IGNORE_SIM_OBS="SIM_OBS=" | |
10427 | else | |
10428 | IGNORE_SIM="" | |
10429 | IGNORE_SIM_OBS="" | |
10430 | cat >> confdefs.h <<\EOF | |
10431 | #define WITH_SIM 1 | |
10432 | EOF | |
10433 | ||
10434 | fi | |
10435 | ||
10436 | ||
10437 | ||
c906108c SS |
10438 | |
10439 | ||
10440 | ||
10441 | ||
10442 | ||
10443 | ||
dfcd3bfb | 10444 | |
e56ac5c3 AC |
10445 | |
10446 | ||
b3a90332 AC |
10447 | |
10448 | ||
c906108c SS |
10449 | # target_subdir is used by the testsuite to find the target libraries. |
10450 | target_subdir= | |
10451 | if test "${host}" != "${target}"; then | |
10452 | target_subdir="${target_alias}/" | |
10453 | fi | |
10454 | ||
10455 | ||
10456 | frags= | |
10457 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10458 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
10459 | # When building a native debuger the .mh file containing things |
10460 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
10461 | # since it no longer contains anything useful. | |
10462 | if test "${target}" = "${host}"; then | |
10463 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10464 | else | |
10465 | host_makefile_frag=/dev/null | |
10466 | fi | |
c906108c SS |
10467 | fi |
10468 | frags="$frags $host_makefile_frag" | |
10469 | ||
10470 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10471 | if test ! -f ${target_makefile_frag}; then | |
10472 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
10473 | fi | |
10474 | frags="$frags $target_makefile_frag" | |
10475 | ||
10476 | ||
10477 | ||
10478 | ||
10479 | ||
10480 | hostfile=`sed -n ' | |
10481 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10482 | ' ${host_makefile_frag}` | |
10483 | ||
10484 | targetfile=`sed -n ' | |
10485 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10486 | ' ${target_makefile_frag}` | |
10487 | ||
c906108c | 10488 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10489 | # We pick this up from the host configuration file (.mh) because we |
10490 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10491 | nativefile=`sed -n ' |
10492 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10493 | ' ${host_makefile_frag}` | |
c906108c SS |
10494 | fi |
10495 | ||
10496 | ||
b00a8037 DJ |
10497 | if test x"${gdb_osabi}" != x ; then |
10498 | cat >> confdefs.h <<EOF | |
10499 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10500 | EOF | |
10501 | ||
10502 | fi | |
10503 | ||
8dcde887 MK |
10504 | # Enable multi-ice-gdb-server. |
10505 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10506 | if test "${enable_multi_ice+set}" = set; then | |
10507 | enableval="$enable_multi_ice" | |
10508 | case $enableval in | |
10509 | yes | no) | |
10510 | ;; | |
10511 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10512 | esac | |
96baa820 JM |
10513 | fi |
10514 | ||
8dcde887 MK |
10515 | if test "x$enable_multi_ice" = xyes; then |
10516 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10517 | fi |
10518 | ||
8dcde887 MK |
10519 | # We only build gdbserver automatically if host and target are the same. |
10520 | if test "x$target" = "x$host"; then | |
10521 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
33f8ca73 | 10522 | echo "configure:10523: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10523 | if test "x$build_gdbserver" = xyes; then |
10524 | configdirs="$configdirs gdbserver" | |
10525 | echo "$ac_t""yes" 1>&6 | |
10526 | else | |
10527 | echo "$ac_t""no" 1>&6 | |
10528 | fi | |
10529 | fi | |
10530 | ||
10531 | subdirs="doc testsuite $configdirs" | |
10532 | ||
96baa820 | 10533 | |
c906108c | 10534 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10535 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10536 | # version. | |
c906108c SS |
10537 | |
10538 | files= | |
10539 | links= | |
5a2402b8 | 10540 | |
c906108c | 10541 | rm -f xm.h |
5a2402b8 | 10542 | xm_h="" |
c906108c | 10543 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10544 | xm_h=xm.h |
10545 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10546 | files="${files} ${GDB_XM_FILE}" | |
10547 | links="${links} xm.h" | |
10548 | cat >> confdefs.h <<EOF | |
10549 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10550 | EOF | |
10551 | ||
c906108c | 10552 | fi |
5a2402b8 AC |
10553 | |
10554 | ||
c906108c | 10555 | rm -f tm.h |
5a2402b8 | 10556 | tm_h="" |
c906108c | 10557 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10558 | tm_h=tm.h |
10559 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10560 | files="${files} ${GDB_TM_FILE}" | |
10561 | links="${links} tm.h" | |
10562 | cat >> confdefs.h <<EOF | |
10563 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10564 | EOF | |
10565 | ||
c906108c | 10566 | fi |
5a2402b8 AC |
10567 | |
10568 | ||
c906108c | 10569 | rm -f nm.h |
5a2402b8 | 10570 | nm_h="" |
c906108c | 10571 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10572 | nm_h=nm.h |
10573 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10574 | files="${files} ${GDB_NM_FILE}" | |
10575 | links="${links} nm.h" | |
10576 | cat >> confdefs.h <<EOF | |
10577 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10578 | EOF | |
10579 | ||
c906108c | 10580 | fi |
5a2402b8 AC |
10581 | |
10582 | ||
c906108c SS |
10583 | |
10584 | ||
10585 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
33f8ca73 | 10586 | echo "configure:10587: checking for Cygwin environment" >&5 |
c906108c SS |
10587 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10588 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10589 | else | |
10590 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 10591 | #line 10592 "configure" |
c906108c SS |
10592 | #include "confdefs.h" |
10593 | ||
10594 | int main() { | |
10595 | ||
10596 | #ifndef __CYGWIN__ | |
10597 | #define __CYGWIN__ __CYGWIN32__ | |
10598 | #endif | |
10599 | return __CYGWIN__; | |
10600 | ; return 0; } | |
10601 | EOF | |
33f8ca73 | 10602 | if { (eval echo configure:10603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10603 | rm -rf conftest* |
10604 | ac_cv_cygwin=yes | |
10605 | else | |
10606 | echo "configure: failed program was:" >&5 | |
10607 | cat conftest.$ac_ext >&5 | |
10608 | rm -rf conftest* | |
10609 | ac_cv_cygwin=no | |
10610 | fi | |
10611 | rm -f conftest* | |
10612 | rm -f conftest* | |
10613 | fi | |
10614 | ||
10615 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10616 | CYGWIN= | |
10617 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10618 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
33f8ca73 | 10619 | echo "configure:10620: checking for mingw32 environment" >&5 |
c906108c SS |
10620 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10621 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10622 | else | |
10623 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 10624 | #line 10625 "configure" |
c906108c SS |
10625 | #include "confdefs.h" |
10626 | ||
10627 | int main() { | |
10628 | return __MINGW32__; | |
10629 | ; return 0; } | |
10630 | EOF | |
33f8ca73 | 10631 | if { (eval echo configure:10632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10632 | rm -rf conftest* |
10633 | ac_cv_mingw32=yes | |
10634 | else | |
10635 | echo "configure: failed program was:" >&5 | |
10636 | cat conftest.$ac_ext >&5 | |
10637 | rm -rf conftest* | |
10638 | ac_cv_mingw32=no | |
10639 | fi | |
10640 | rm -f conftest* | |
10641 | rm -f conftest* | |
10642 | fi | |
10643 | ||
10644 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10645 | MINGW32= | |
10646 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10647 | ||
10648 | ||
10649 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
33f8ca73 | 10650 | echo "configure:10651: checking for executable suffix" >&5 |
c906108c SS |
10651 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10652 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10653 | else | |
10654 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10655 | ac_cv_exeext=.exe | |
10656 | else | |
10657 | rm -f conftest* | |
10658 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10659 | ac_cv_exeext= | |
33f8ca73 | 10660 | if { (eval echo configure:10661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10661 | for file in conftest.*; do |
10662 | case $file in | |
d836ee13 | 10663 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10664 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10665 | esac | |
10666 | done | |
10667 | else | |
10668 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10669 | fi | |
10670 | rm -f conftest* | |
10671 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10672 | fi | |
10673 | fi | |
10674 | ||
10675 | EXEEXT="" | |
10676 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10677 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10678 | ac_exeext=$EXEEXT | |
10679 | ||
10680 | ||
234b45d4 KB |
10681 | |
10682 | cat >> confdefs.h <<\EOF | |
10683 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10684 | EOF | |
10685 | ||
10686 | ||
10687 | ||
10688 | ||
10689 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10690 | if test "${with_libiconv_prefix+set}" = set; then | |
10691 | withval="$with_libiconv_prefix" | |
10692 | ||
10693 | for dir in `echo "$withval" | tr : ' '`; do | |
10694 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10695 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10696 | done | |
10697 | ||
10698 | fi | |
10699 | ||
10700 | ||
10701 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
33f8ca73 | 10702 | echo "configure:10703: checking for iconv" >&5 |
234b45d4 KB |
10703 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10705 | else | |
10706 | ||
10707 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10708 | am_cv_lib_iconv=no | |
10709 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 10710 | #line 10711 "configure" |
234b45d4 KB |
10711 | #include "confdefs.h" |
10712 | #include <stdlib.h> | |
10713 | #include <iconv.h> | |
10714 | int main() { | |
10715 | iconv_t cd = iconv_open("",""); | |
10716 | iconv(cd,NULL,NULL,NULL,NULL); | |
10717 | iconv_close(cd); | |
10718 | ; return 0; } | |
10719 | EOF | |
33f8ca73 | 10720 | if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10721 | rm -rf conftest* |
10722 | am_cv_func_iconv=yes | |
10723 | else | |
10724 | echo "configure: failed program was:" >&5 | |
10725 | cat conftest.$ac_ext >&5 | |
10726 | fi | |
10727 | rm -f conftest* | |
10728 | if test "$am_cv_func_iconv" != yes; then | |
10729 | am_save_LIBS="$LIBS" | |
10730 | LIBS="$LIBS -liconv" | |
10731 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 10732 | #line 10733 "configure" |
234b45d4 KB |
10733 | #include "confdefs.h" |
10734 | #include <stdlib.h> | |
10735 | #include <iconv.h> | |
10736 | int main() { | |
10737 | iconv_t cd = iconv_open("",""); | |
10738 | iconv(cd,NULL,NULL,NULL,NULL); | |
10739 | iconv_close(cd); | |
10740 | ; return 0; } | |
10741 | EOF | |
33f8ca73 | 10742 | if { (eval echo configure:10743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10743 | rm -rf conftest* |
10744 | am_cv_lib_iconv=yes | |
10745 | am_cv_func_iconv=yes | |
10746 | else | |
10747 | echo "configure: failed program was:" >&5 | |
10748 | cat conftest.$ac_ext >&5 | |
10749 | fi | |
10750 | rm -f conftest* | |
10751 | LIBS="$am_save_LIBS" | |
10752 | fi | |
10753 | ||
10754 | fi | |
10755 | ||
10756 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10757 | if test "$am_cv_func_iconv" = yes; then | |
10758 | cat >> confdefs.h <<\EOF | |
10759 | #define HAVE_ICONV 1 | |
10760 | EOF | |
10761 | ||
10762 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
33f8ca73 | 10763 | echo "configure:10764: checking for iconv declaration" >&5 |
234b45d4 KB |
10764 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10766 | else | |
10767 | ||
10768 | cat > conftest.$ac_ext <<EOF | |
33f8ca73 | 10769 | #line 10770 "configure" |
234b45d4 KB |
10770 | #include "confdefs.h" |
10771 | ||
10772 | #include <stdlib.h> | |
10773 | #include <iconv.h> | |
10774 | extern | |
10775 | #ifdef __cplusplus | |
10776 | "C" | |
10777 | #endif | |
10778 | #if defined(__STDC__) || defined(__cplusplus) | |
10779 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10780 | #else | |
10781 | size_t iconv(); | |
10782 | #endif | |
10783 | ||
10784 | int main() { | |
10785 | ||
10786 | ; return 0; } | |
10787 | EOF | |
33f8ca73 | 10788 | if { (eval echo configure:10789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10789 | rm -rf conftest* |
10790 | am_cv_proto_iconv_arg1="" | |
10791 | else | |
10792 | echo "configure: failed program was:" >&5 | |
10793 | cat conftest.$ac_ext >&5 | |
10794 | rm -rf conftest* | |
10795 | am_cv_proto_iconv_arg1="const" | |
10796 | fi | |
10797 | rm -f conftest* | |
10798 | 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);" | |
10799 | fi | |
10800 | ||
10801 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10802 | echo "$ac_t""${ac_t:- | |
10803 | }$am_cv_proto_iconv" 1>&6 | |
10804 | cat >> confdefs.h <<EOF | |
10805 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10806 | EOF | |
10807 | ||
10808 | fi | |
10809 | LIBICONV= | |
10810 | if test "$am_cv_lib_iconv" = yes; then | |
10811 | LIBICONV="-liconv" | |
10812 | fi | |
10813 | ||
10814 | ||
10815 | ||
c906108c SS |
10816 | trap '' 1 2 15 |
10817 | cat > confcache <<\EOF | |
10818 | # This file is a shell script that caches the results of configure | |
10819 | # tests run on this system so they can be shared between configure | |
10820 | # scripts and configure runs. It is not useful on other systems. | |
10821 | # If it contains results you don't want to keep, you may remove or edit it. | |
10822 | # | |
10823 | # By default, configure uses ./config.cache as the cache file, | |
10824 | # creating it if it does not exist already. You can give configure | |
10825 | # the --cache-file=FILE option to use a different cache file; that is | |
10826 | # what configure does when it calls configure scripts in | |
10827 | # subdirectories, so they share the cache. | |
10828 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10829 | # config.status only pays attention to the cache file if you give it the | |
10830 | # --recheck option to rerun configure. | |
10831 | # | |
10832 | EOF | |
10833 | # The following way of writing the cache mishandles newlines in values, | |
10834 | # but we know of no workaround that is simple, portable, and efficient. | |
10835 | # So, don't put newlines in cache variables' values. | |
10836 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10837 | # and sets the high bit in the cache file unless we assign to the vars. | |
10838 | (set) 2>&1 | | |
10839 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10840 | *ac_space=\ *) | |
10841 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10842 | # turns \\\\ into \\, and sed turns \\ into \). | |
10843 | sed -n \ | |
10844 | -e "s/'/'\\\\''/g" \ | |
10845 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10846 | ;; | |
10847 | *) | |
10848 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10849 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10850 | ;; | |
10851 | esac >> confcache | |
10852 | if cmp -s $cache_file confcache; then | |
10853 | : | |
10854 | else | |
10855 | if test -w $cache_file; then | |
10856 | echo "updating cache $cache_file" | |
10857 | cat confcache > $cache_file | |
10858 | else | |
10859 | echo "not updating unwritable cache $cache_file" | |
10860 | fi | |
10861 | fi | |
10862 | rm -f confcache | |
10863 | ||
10864 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10865 | ||
10866 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10867 | # Let make expand exec_prefix. | |
10868 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10869 | ||
10870 | # Any assignment to VPATH causes Sun make to only execute | |
10871 | # the first set of double-colon rules, so remove it if not needed. | |
10872 | # If there is a colon in the path, we need to keep it. | |
10873 | if test "x$srcdir" = x.; then | |
10874 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10875 | fi | |
10876 | ||
10877 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10878 | ||
10879 | DEFS=-DHAVE_CONFIG_H | |
10880 | ||
10881 | # Without the "./", some shells look in PATH for config.status. | |
10882 | : ${CONFIG_STATUS=./config.status} | |
10883 | ||
10884 | echo creating $CONFIG_STATUS | |
10885 | rm -f $CONFIG_STATUS | |
10886 | cat > $CONFIG_STATUS <<EOF | |
10887 | #! /bin/sh | |
10888 | # Generated automatically by configure. | |
10889 | # Run this file to recreate the current configuration. | |
10890 | # This directory was configured as follows, | |
10891 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10892 | # | |
10893 | # $0 $ac_configure_args | |
10894 | # | |
10895 | # Compiler output produced by configure, useful for debugging | |
10896 | # configure, is in ./config.log if it exists. | |
10897 | ||
10898 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10899 | for ac_option | |
10900 | do | |
10901 | case "\$ac_option" in | |
10902 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10903 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10904 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10905 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10906 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10907 | exit 0 ;; | |
10908 | -help | --help | --hel | --he | --h) | |
10909 | echo "\$ac_cs_usage"; exit 0 ;; | |
10910 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10911 | esac | |
10912 | done | |
10913 | ||
10914 | ac_given_srcdir=$srcdir | |
10915 | ac_given_INSTALL="$INSTALL" | |
10916 | ||
ed952ac5 | 10917 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10918 | EOF |
10919 | cat >> $CONFIG_STATUS <<EOF | |
10920 | ||
10921 | # Protect against being on the right side of a sed subst in config.status. | |
10922 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10923 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10924 | $ac_vpsub | |
10925 | $extrasub | |
10926 | s%@SHELL@%$SHELL%g | |
10927 | s%@CFLAGS@%$CFLAGS%g | |
10928 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10929 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10930 | s%@FFLAGS@%$FFLAGS%g | |
10931 | s%@DEFS@%$DEFS%g | |
10932 | s%@LDFLAGS@%$LDFLAGS%g | |
10933 | s%@LIBS@%$LIBS%g | |
10934 | s%@exec_prefix@%$exec_prefix%g | |
10935 | s%@prefix@%$prefix%g | |
10936 | s%@program_transform_name@%$program_transform_name%g | |
10937 | s%@bindir@%$bindir%g | |
10938 | s%@sbindir@%$sbindir%g | |
10939 | s%@libexecdir@%$libexecdir%g | |
10940 | s%@datadir@%$datadir%g | |
10941 | s%@sysconfdir@%$sysconfdir%g | |
10942 | s%@sharedstatedir@%$sharedstatedir%g | |
10943 | s%@localstatedir@%$localstatedir%g | |
10944 | s%@libdir@%$libdir%g | |
10945 | s%@includedir@%$includedir%g | |
10946 | s%@oldincludedir@%$oldincludedir%g | |
10947 | s%@infodir@%$infodir%g | |
10948 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10949 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10950 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10951 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10952 | s%@CC@%$CC%g |
10953 | s%@CPP@%$CPP%g | |
10954 | s%@host@%$host%g | |
10955 | s%@host_alias@%$host_alias%g | |
10956 | s%@host_cpu@%$host_cpu%g | |
10957 | s%@host_vendor@%$host_vendor%g | |
10958 | s%@host_os@%$host_os%g | |
10959 | s%@target@%$target%g | |
10960 | s%@target_alias@%$target_alias%g | |
10961 | s%@target_cpu@%$target_cpu%g | |
10962 | s%@target_vendor@%$target_vendor%g | |
10963 | s%@target_os@%$target_os%g | |
10964 | s%@build@%$build%g | |
10965 | s%@build_alias@%$build_alias%g | |
10966 | s%@build_cpu@%$build_cpu%g | |
10967 | s%@build_vendor@%$build_vendor%g | |
10968 | s%@build_os@%$build_os%g | |
c906108c | 10969 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10970 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10971 | s%@ALLOCA@%$ALLOCA%g |
10972 | s%@USE_NLS@%$USE_NLS%g | |
10973 | s%@MSGFMT@%$MSGFMT%g | |
10974 | s%@GMSGFMT@%$GMSGFMT%g | |
10975 | s%@XGETTEXT@%$XGETTEXT%g | |
10976 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10977 | s%@CATALOGS@%$CATALOGS%g | |
10978 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10979 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10980 | s%@GMOFILES@%$GMOFILES%g | |
10981 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10982 | s%@INTLDEPS@%$INTLDEPS%g | |
10983 | s%@INTLLIBS@%$INTLLIBS%g | |
10984 | s%@INTLOBJS@%$INTLOBJS%g | |
10985 | s%@POFILES@%$POFILES%g | |
10986 | s%@POSUB@%$POSUB%g | |
10987 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10988 | s%@GT_NO@%$GT_NO%g | |
10989 | s%@GT_YES@%$GT_YES%g | |
10990 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10991 | s%@l@%$l%g | |
8dcde887 | 10992 | s%@subdirs@%$subdirs%g |
7a292a7a | 10993 | s%@AWK@%$AWK%g |
c906108c SS |
10994 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10995 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10996 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10997 | s%@LN_S@%$LN_S%g |
10998 | s%@YACC@%$YACC%g | |
c906108c | 10999 | s%@AR@%$AR%g |
95ca63c4 CF |
11000 | s%@DLLTOOL@%$DLLTOOL%g |
11001 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 11002 | s%@MIG@%$MIG%g |
c906108c | 11003 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
11004 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
11005 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 11006 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 11007 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
aff38e61 | 11008 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 11009 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
11010 | s%@LIBGUI@%$LIBGUI%g |
11011 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
11012 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
11013 | s%@TCL_VERSION@%$TCL_VERSION%g | |
11014 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
11015 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
11016 | s%@TCL_CC@%$TCL_CC%g | |
11017 | s%@TCL_DEFS@%$TCL_DEFS%g | |
11018 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
11019 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
11020 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
11021 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
11022 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
11023 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
11024 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 11025 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
11026 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
11027 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
11028 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
11029 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
11030 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
11031 | s%@TK_VERSION@%$TK_VERSION%g | |
11032 | s%@TK_DEFS@%$TK_DEFS%g | |
11033 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
11034 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
11035 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
11036 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
11037 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
11038 | s%@TCLHDIR@%$TCLHDIR%g | |
11039 | s%@TKHDIR@%$TKHDIR%g | |
11040 | s%@ITCLHDIR@%$ITCLHDIR%g | |
11041 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
11042 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
11043 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
11044 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
11045 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
11046 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
11047 | s%@ITK_VERSION@%$ITK_VERSION%g | |
11048 | s%@ITK_DEFS@%$ITK_DEFS%g | |
11049 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
11050 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
11051 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
11052 | s%@X_CFLAGS@%$X_CFLAGS%g |
11053 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
11054 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
11055 | s%@TCL_DEPS@%$TCL_DEPS%g |
11056 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
11057 | s%@ITCLLIB@%$ITCLLIB%g |
11058 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
11059 | s%@ITKLIB@%$ITKLIB%g | |
11060 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
11061 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
11062 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 11063 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
11064 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
11065 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 11066 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 11067 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c SS |
11068 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
11069 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
11070 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
b3a90332 AC |
11071 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
11072 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
11073 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
11074 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
11075 | s%@target_subdir@%$target_subdir%g |
11076 | /@host_makefile_frag@/r $host_makefile_frag | |
11077 | s%@host_makefile_frag@%%g | |
11078 | /@target_makefile_frag@/r $target_makefile_frag | |
11079 | s%@target_makefile_frag@%%g | |
11080 | s%@frags@%$frags%g | |
5a2402b8 AC |
11081 | s%@xm_h@%$xm_h%g |
11082 | s%@tm_h@%$tm_h%g | |
11083 | s%@nm_h@%$nm_h%g | |
c906108c | 11084 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 11085 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
11086 | |
11087 | CEOF | |
11088 | EOF | |
11089 | ||
11090 | cat >> $CONFIG_STATUS <<\EOF | |
11091 | ||
11092 | # Split the substitutions into bite-sized pieces for seds with | |
11093 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 11094 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
11095 | ac_file=1 # Number of current file. |
11096 | ac_beg=1 # First line for current file. | |
11097 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
11098 | ac_more_lines=: | |
11099 | ac_sed_cmds="" | |
11100 | while $ac_more_lines; do | |
11101 | if test $ac_beg -gt 1; then | |
11102 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
11103 | else | |
11104 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
11105 | fi | |
11106 | if test ! -s conftest.s$ac_file; then | |
11107 | ac_more_lines=false | |
11108 | rm -f conftest.s$ac_file | |
11109 | else | |
11110 | if test -z "$ac_sed_cmds"; then | |
11111 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
11112 | else | |
11113 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
11114 | fi | |
11115 | ac_file=`expr $ac_file + 1` | |
11116 | ac_beg=$ac_end | |
11117 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
11118 | fi | |
11119 | done | |
11120 | if test -z "$ac_sed_cmds"; then | |
11121 | ac_sed_cmds=cat | |
11122 | fi | |
11123 | EOF | |
11124 | ||
11125 | cat >> $CONFIG_STATUS <<EOF | |
11126 | ||
ed952ac5 | 11127 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
11128 | EOF |
11129 | cat >> $CONFIG_STATUS <<\EOF | |
11130 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
11131 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11132 | case "$ac_file" in | |
11133 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11134 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11135 | *) ac_file_in="${ac_file}.in" ;; | |
11136 | esac | |
11137 | ||
11138 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
11139 | ||
11140 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11141 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11142 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11143 | # The file is in a subdirectory. | |
11144 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11145 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
11146 | # A "../" for each directory in $ac_dir_suffix. | |
11147 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
11148 | else | |
11149 | ac_dir_suffix= ac_dots= | |
11150 | fi | |
11151 | ||
11152 | case "$ac_given_srcdir" in | |
11153 | .) srcdir=. | |
11154 | if test -z "$ac_dots"; then top_srcdir=. | |
11155 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
11156 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
11157 | *) # Relative path. | |
11158 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
11159 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
11160 | esac | |
11161 | ||
11162 | case "$ac_given_INSTALL" in | |
11163 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11164 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11165 | esac | |
11166 | ||
11167 | echo creating "$ac_file" | |
11168 | rm -f "$ac_file" | |
11169 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
11170 | case "$ac_file" in | |
11171 | *Makefile*) ac_comsub="1i\\ | |
11172 | # $configure_input" ;; | |
11173 | *) ac_comsub= ;; | |
11174 | esac | |
11175 | ||
11176 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11177 | sed -e "$ac_comsub | |
11178 | s%@configure_input@%$configure_input%g | |
11179 | s%@srcdir@%$srcdir%g | |
11180 | s%@top_srcdir@%$top_srcdir%g | |
11181 | s%@INSTALL@%$INSTALL%g | |
11182 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
11183 | fi; done | |
11184 | rm -f conftest.s* | |
11185 | ||
11186 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
11187 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
11188 | # | |
11189 | # ac_d sets the value in "#define NAME VALUE" lines. | |
11190 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
11191 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
11192 | ac_dC='\3' | |
11193 | ac_dD='%g' | |
11194 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
11195 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11196 | ac_uB='\([ ]\)%\1#\2define\3' | |
11197 | ac_uC=' ' | |
11198 | ac_uD='\4%g' | |
11199 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
11200 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
11201 | ac_eB='$%\1#\2define\3' | |
11202 | ac_eC=' ' | |
11203 | ac_eD='%g' | |
11204 | ||
11205 | if test "${CONFIG_HEADERS+set}" != set; then | |
11206 | EOF | |
11207 | cat >> $CONFIG_STATUS <<EOF | |
11208 | CONFIG_HEADERS="config.h:config.in" | |
11209 | EOF | |
11210 | cat >> $CONFIG_STATUS <<\EOF | |
11211 | fi | |
11212 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
11213 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
11214 | case "$ac_file" in | |
11215 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
11216 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
11217 | *) ac_file_in="${ac_file}.in" ;; | |
11218 | esac | |
11219 | ||
11220 | echo creating $ac_file | |
11221 | ||
11222 | rm -f conftest.frag conftest.in conftest.out | |
11223 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
11224 | cat $ac_file_inputs > conftest.in | |
11225 | ||
11226 | EOF | |
11227 | ||
11228 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
11229 | # the proper values into config.h.in to produce config.h. And first: | |
11230 | # Protect against being on the right side of a sed subst in config.status. | |
11231 | # Protect against being in an unquoted here document in config.status. | |
11232 | rm -f conftest.vals | |
11233 | cat > conftest.hdr <<\EOF | |
11234 | s/[\\&%]/\\&/g | |
11235 | s%[\\$`]%\\&%g | |
11236 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
11237 | s%ac_d%ac_u%gp | |
11238 | s%ac_u%ac_e%gp | |
11239 | EOF | |
11240 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
11241 | rm -f conftest.hdr | |
11242 | ||
11243 | # This sed command replaces #undef with comments. This is necessary, for | |
11244 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
11245 | # on some systems where configure will not decide to define it. | |
11246 | cat >> conftest.vals <<\EOF | |
11247 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
11248 | EOF | |
11249 | ||
11250 | # Break up conftest.vals because some shells have a limit on | |
11251 | # the size of here documents, and old seds have small limits too. | |
11252 | ||
11253 | rm -f conftest.tail | |
11254 | while : | |
11255 | do | |
11256 | ac_lines=`grep -c . conftest.vals` | |
11257 | # grep -c gives empty output for an empty file on some AIX systems. | |
11258 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
11259 | # Write a limited-size here document to conftest.frag. | |
11260 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
11261 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
11262 | echo 'CEOF | |
11263 | sed -f conftest.frag conftest.in > conftest.out | |
11264 | rm -f conftest.in | |
11265 | mv conftest.out conftest.in | |
11266 | ' >> $CONFIG_STATUS | |
11267 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
11268 | rm -f conftest.vals | |
11269 | mv conftest.tail conftest.vals | |
11270 | done | |
11271 | rm -f conftest.vals | |
11272 | ||
11273 | cat >> $CONFIG_STATUS <<\EOF | |
11274 | rm -f conftest.frag conftest.h | |
11275 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11276 | cat conftest.in >> conftest.h | |
11277 | rm -f conftest.in | |
11278 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11279 | echo "$ac_file is unchanged" | |
11280 | rm -f conftest.h | |
11281 | else | |
11282 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11283 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11284 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11285 | # The file is in a subdirectory. | |
11286 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11287 | fi | |
11288 | rm -f $ac_file | |
11289 | mv conftest.h $ac_file | |
11290 | fi | |
11291 | fi; done | |
11292 | ||
11293 | EOF | |
11294 | ||
11295 | cat >> $CONFIG_STATUS <<EOF | |
11296 | ac_sources="$files" | |
11297 | ac_dests="$links" | |
11298 | EOF | |
11299 | ||
11300 | cat >> $CONFIG_STATUS <<\EOF | |
11301 | srcdir=$ac_given_srcdir | |
11302 | while test -n "$ac_sources"; do | |
11303 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11304 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11305 | ||
11306 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11307 | ||
11308 | if test ! -r $srcdir/$ac_source; then | |
11309 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11310 | fi | |
11311 | rm -f $ac_dest | |
11312 | ||
11313 | # Make relative symlinks. | |
11314 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11315 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11316 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11317 | # The dest file is in a subdirectory. | |
11318 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11319 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11320 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11321 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11322 | else | |
11323 | ac_dest_dir_suffix= ac_dots= | |
11324 | fi | |
11325 | ||
11326 | case "$srcdir" in | |
11327 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11328 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11329 | esac | |
11330 | ||
11331 | # Make a symlink if possible; otherwise try a hard link. | |
11332 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11333 | ln $srcdir/$ac_source $ac_dest; then : | |
11334 | else | |
11335 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11336 | fi | |
11337 | done | |
11338 | EOF | |
11339 | cat >> $CONFIG_STATUS <<EOF | |
11340 | ||
11341 | gdb_host_cpu=$gdb_host_cpu | |
11342 | gdb_target_cpu=$gdb_target_cpu | |
11343 | nativefile=$nativefile | |
11344 | ||
11345 | EOF | |
11346 | cat >> $CONFIG_STATUS <<\EOF | |
11347 | ||
7ee6d7eb | 11348 | if test "${nativefile}" = ""; then |
c4620205 | 11349 | < Makefile \ |
e27da16d JT |
11350 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
11351 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
11352 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
11353 | > Makefile.tem | |
c906108c SS |
11354 | mv -f Makefile.tem Makefile |
11355 | fi | |
11356 | ||
11357 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
11358 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
11359 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11360 | mv -f Makefile.tmp Makefile | |
11361 | ||
2acceee2 | 11362 | |
c906108c SS |
11363 | case x$CONFIG_HEADERS in |
11364 | xconfig.h:config.in) | |
11365 | echo > stamp-h ;; | |
11366 | esac | |
11367 | ||
11368 | exit 0 | |
11369 | EOF | |
11370 | chmod +x $CONFIG_STATUS | |
11371 | rm -fr confdefs* $ac_clean_files | |
11372 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11373 | ||
11374 | if test "$no_recursion" != yes; then | |
11375 | ||
11376 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11377 | ac_sub_configure_args= | |
11378 | ac_prev= | |
11379 | for ac_arg in $ac_configure_args; do | |
11380 | if test -n "$ac_prev"; then | |
11381 | ac_prev= | |
11382 | continue | |
11383 | fi | |
11384 | case "$ac_arg" in | |
11385 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11386 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11387 | ac_prev=cache_file ;; | |
11388 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11389 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11390 | ;; | |
11391 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11392 | ac_prev=srcdir ;; | |
11393 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11394 | ;; | |
11395 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11396 | esac | |
11397 | done | |
11398 | ||
8dcde887 | 11399 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11400 | |
11401 | # Do not complain, so a configure script can configure whichever | |
11402 | # parts of a large source tree are present. | |
11403 | if test ! -d $srcdir/$ac_config_dir; then | |
11404 | continue | |
11405 | fi | |
11406 | ||
11407 | echo configuring in $ac_config_dir | |
11408 | ||
11409 | case "$srcdir" in | |
11410 | .) ;; | |
11411 | *) | |
11412 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11413 | else | |
11414 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11415 | fi | |
11416 | ;; | |
11417 | esac | |
11418 | ||
11419 | ac_popdir=`pwd` | |
11420 | cd $ac_config_dir | |
11421 | ||
11422 | # A "../" for each directory in /$ac_config_dir. | |
11423 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11424 | ||
11425 | case "$srcdir" in | |
11426 | .) # No --srcdir option. We are building in place. | |
11427 | ac_sub_srcdir=$srcdir ;; | |
11428 | /*) # Absolute path. | |
11429 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11430 | *) # Relative path. | |
11431 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11432 | esac | |
11433 | ||
11434 | # Check for guested configure; otherwise get Cygnus style configure. | |
11435 | if test -f $ac_sub_srcdir/configure; then | |
11436 | ac_sub_configure=$ac_sub_srcdir/configure | |
11437 | elif test -f $ac_sub_srcdir/configure.in; then | |
11438 | ac_sub_configure=$ac_configure | |
11439 | else | |
11440 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11441 | ac_sub_configure= | |
11442 | fi | |
11443 | ||
11444 | # The recursion is here. | |
11445 | if test -n "$ac_sub_configure"; then | |
11446 | ||
11447 | # Make the cache file name correct relative to the subdirectory. | |
11448 | case "$cache_file" in | |
11449 | /*) ac_sub_cache_file=$cache_file ;; | |
11450 | *) # Relative path. | |
11451 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11452 | esac | |
11453 | case "$ac_given_INSTALL" in | |
11454 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11455 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11456 | esac | |
11457 | ||
11458 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11459 | # The eval makes quoting arguments work. | |
11460 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11461 | then : | |
11462 | else | |
11463 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11464 | fi | |
11465 | fi | |
11466 | ||
11467 | cd $ac_popdir | |
11468 | done | |
11469 | fi | |
11470 | ||
11471 | ||
11472 | exit 0 |