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" | |
96baa820 JM |
21 | ac_help="$ac_help |
22 | --enable-multi-ice Build the multi-ice-gdb-server" | |
d318976c FN |
23 | ac_help="$ac_help |
24 | --enable-gdbcli Enable GDB-CLI interface" | |
fb40c209 AC |
25 | ac_help="$ac_help |
26 | --enable-gdbmi Enable GDB-MI interface" | |
b4df4f68 | 27 | ac_help="$ac_help |
6c5cfe5b | 28 | --with-uiout Use new uiout functions instead of *printf's" |
c906108c SS |
29 | ac_help="$ac_help |
30 | --enable-tui Enable full-screen terminal user interface" | |
31 | ac_help="$ac_help | |
32 | --enable-netrom Enable NetROM support" | |
33 | ac_help="$ac_help | |
34 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
35 | ac_help="$ac_help |
36 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
37 | ac_help="$ac_help |
38 | --with-mmalloc Use memory mapped malloc package" | |
88987551 L |
39 | ac_help="$ac_help |
40 | --with-included-regex Use included regex" | |
7a292a7a SS |
41 | ac_help="$ac_help |
42 | --with-cpu=CPU Set the default CPU variant to debug" | |
43 | ac_help="$ac_help | |
44 | --enable-gdbtk Enable GDBTK GUI front end" | |
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)" | |
57 | ac_help="$ac_help | |
58 | --with-tixconfig Directory containing tix configuration (tixConfig.sh)" | |
c906108c SS |
59 | ac_help="$ac_help |
60 | --with-x use the X Window System" | |
7a292a7a SS |
61 | ac_help="$ac_help |
62 | --enable-sim Link gdb with simulator" | |
c906108c SS |
63 | ac_help="$ac_help |
64 | --enable-shared Use shared libraries" | |
65 | ||
66 | # Initialize some variables set by options. | |
67 | # The variables have the same names as the options, with | |
68 | # dashes changed to underlines. | |
69 | build=NONE | |
70 | cache_file=./config.cache | |
71 | exec_prefix=NONE | |
72 | host=NONE | |
73 | no_create= | |
74 | nonopt=NONE | |
75 | no_recursion= | |
76 | prefix=NONE | |
77 | program_prefix=NONE | |
78 | program_suffix=NONE | |
79 | program_transform_name=s,x,x, | |
80 | silent= | |
81 | site= | |
82 | srcdir= | |
83 | target=NONE | |
84 | verbose= | |
85 | x_includes=NONE | |
86 | x_libraries=NONE | |
87 | bindir='${exec_prefix}/bin' | |
88 | sbindir='${exec_prefix}/sbin' | |
89 | libexecdir='${exec_prefix}/libexec' | |
90 | datadir='${prefix}/share' | |
91 | sysconfdir='${prefix}/etc' | |
92 | sharedstatedir='${prefix}/com' | |
93 | localstatedir='${prefix}/var' | |
94 | libdir='${exec_prefix}/lib' | |
95 | includedir='${prefix}/include' | |
96 | oldincludedir='/usr/include' | |
97 | infodir='${prefix}/info' | |
98 | mandir='${prefix}/man' | |
99 | ||
100 | # Initialize some other variables. | |
101 | subdirs= | |
102 | MFLAGS= MAKEFLAGS= | |
103 | SHELL=${CONFIG_SHELL-/bin/sh} | |
104 | # Maximum number of lines to put in a shell here document. | |
105 | ac_max_here_lines=12 | |
106 | ||
107 | ac_prev= | |
108 | for ac_option | |
109 | do | |
110 | ||
111 | # If the previous option needs an argument, assign it. | |
112 | if test -n "$ac_prev"; then | |
113 | eval "$ac_prev=\$ac_option" | |
114 | ac_prev= | |
115 | continue | |
116 | fi | |
117 | ||
118 | case "$ac_option" in | |
119 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
120 | *) ac_optarg= ;; | |
121 | esac | |
122 | ||
123 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
124 | ||
125 | case "$ac_option" in | |
126 | ||
127 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
128 | ac_prev=bindir ;; | |
129 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
130 | bindir="$ac_optarg" ;; | |
131 | ||
132 | -build | --build | --buil | --bui | --bu) | |
133 | ac_prev=build ;; | |
134 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
135 | build="$ac_optarg" ;; | |
136 | ||
137 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
138 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
139 | ac_prev=cache_file ;; | |
140 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
141 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
142 | cache_file="$ac_optarg" ;; | |
143 | ||
144 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
145 | ac_prev=datadir ;; | |
146 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
147 | | --da=*) | |
148 | datadir="$ac_optarg" ;; | |
149 | ||
150 | -disable-* | --disable-*) | |
151 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
152 | # Reject names that are not valid shell variable names. | |
153 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
154 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
155 | fi | |
156 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
157 | eval "enable_${ac_feature}=no" ;; | |
158 | ||
159 | -enable-* | --enable-*) | |
160 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
161 | # Reject names that are not valid shell variable names. | |
162 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
163 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
164 | fi | |
165 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
166 | case "$ac_option" in | |
167 | *=*) ;; | |
168 | *) ac_optarg=yes ;; | |
169 | esac | |
170 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
171 | ||
172 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
173 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
174 | | --exec | --exe | --ex) | |
175 | ac_prev=exec_prefix ;; | |
176 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
177 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
178 | | --exec=* | --exe=* | --ex=*) | |
179 | exec_prefix="$ac_optarg" ;; | |
180 | ||
181 | -gas | --gas | --ga | --g) | |
182 | # Obsolete; use --with-gas. | |
183 | with_gas=yes ;; | |
184 | ||
185 | -help | --help | --hel | --he) | |
186 | # Omit some internal or obsolete options to make the list less imposing. | |
187 | # This message is too long to be a string in the A/UX 3.1 sh. | |
188 | cat << EOF | |
189 | Usage: configure [options] [host] | |
190 | Options: [defaults in brackets after descriptions] | |
191 | Configuration: | |
192 | --cache-file=FILE cache test results in FILE | |
193 | --help print this message | |
194 | --no-create do not create output files | |
195 | --quiet, --silent do not print \`checking...' messages | |
196 | --version print the version of autoconf that created configure | |
197 | Directory and file names: | |
198 | --prefix=PREFIX install architecture-independent files in PREFIX | |
199 | [$ac_default_prefix] | |
200 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
201 | [same as prefix] | |
202 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
203 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
204 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
205 | --datadir=DIR read-only architecture-independent data in DIR | |
206 | [PREFIX/share] | |
207 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
208 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
209 | [PREFIX/com] | |
210 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
211 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
212 | --includedir=DIR C header files in DIR [PREFIX/include] | |
213 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
214 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
215 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
216 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
217 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
218 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
219 | --program-transform-name=PROGRAM | |
220 | run sed PROGRAM on installed program names | |
221 | EOF | |
222 | cat << EOF | |
223 | Host type: | |
224 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
225 | --host=HOST configure for HOST [guessed] | |
226 | --target=TARGET configure for TARGET [TARGET=HOST] | |
227 | Features and packages: | |
228 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
229 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
230 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
231 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
232 | --x-includes=DIR X include files are in DIR | |
233 | --x-libraries=DIR X library files are in DIR | |
234 | EOF | |
235 | if test -n "$ac_help"; then | |
236 | echo "--enable and --with options recognized:$ac_help" | |
237 | fi | |
238 | exit 0 ;; | |
239 | ||
240 | -host | --host | --hos | --ho) | |
241 | ac_prev=host ;; | |
242 | -host=* | --host=* | --hos=* | --ho=*) | |
243 | host="$ac_optarg" ;; | |
244 | ||
245 | -includedir | --includedir | --includedi | --included | --include \ | |
246 | | --includ | --inclu | --incl | --inc) | |
247 | ac_prev=includedir ;; | |
248 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
249 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
250 | includedir="$ac_optarg" ;; | |
251 | ||
252 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
253 | ac_prev=infodir ;; | |
254 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
255 | infodir="$ac_optarg" ;; | |
256 | ||
257 | -libdir | --libdir | --libdi | --libd) | |
258 | ac_prev=libdir ;; | |
259 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
260 | libdir="$ac_optarg" ;; | |
261 | ||
262 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
263 | | --libexe | --libex | --libe) | |
264 | ac_prev=libexecdir ;; | |
265 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
266 | | --libexe=* | --libex=* | --libe=*) | |
267 | libexecdir="$ac_optarg" ;; | |
268 | ||
269 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
270 | | --localstate | --localstat | --localsta | --localst \ | |
271 | | --locals | --local | --loca | --loc | --lo) | |
272 | ac_prev=localstatedir ;; | |
273 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
274 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
275 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
276 | localstatedir="$ac_optarg" ;; | |
277 | ||
278 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
279 | ac_prev=mandir ;; | |
280 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
281 | mandir="$ac_optarg" ;; | |
282 | ||
283 | -nfp | --nfp | --nf) | |
284 | # Obsolete; use --without-fp. | |
285 | with_fp=no ;; | |
286 | ||
287 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
288 | | --no-cr | --no-c) | |
289 | no_create=yes ;; | |
290 | ||
291 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
292 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
293 | no_recursion=yes ;; | |
294 | ||
295 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
296 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
297 | | --oldin | --oldi | --old | --ol | --o) | |
298 | ac_prev=oldincludedir ;; | |
299 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
300 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
301 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
302 | oldincludedir="$ac_optarg" ;; | |
303 | ||
304 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
305 | ac_prev=prefix ;; | |
306 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
307 | prefix="$ac_optarg" ;; | |
308 | ||
309 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
310 | | --program-pre | --program-pr | --program-p) | |
311 | ac_prev=program_prefix ;; | |
312 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
313 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
314 | program_prefix="$ac_optarg" ;; | |
315 | ||
316 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
317 | | --program-suf | --program-su | --program-s) | |
318 | ac_prev=program_suffix ;; | |
319 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
320 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
321 | program_suffix="$ac_optarg" ;; | |
322 | ||
323 | -program-transform-name | --program-transform-name \ | |
324 | | --program-transform-nam | --program-transform-na \ | |
325 | | --program-transform-n | --program-transform- \ | |
326 | | --program-transform | --program-transfor \ | |
327 | | --program-transfo | --program-transf \ | |
328 | | --program-trans | --program-tran \ | |
329 | | --progr-tra | --program-tr | --program-t) | |
330 | ac_prev=program_transform_name ;; | |
331 | -program-transform-name=* | --program-transform-name=* \ | |
332 | | --program-transform-nam=* | --program-transform-na=* \ | |
333 | | --program-transform-n=* | --program-transform-=* \ | |
334 | | --program-transform=* | --program-transfor=* \ | |
335 | | --program-transfo=* | --program-transf=* \ | |
336 | | --program-trans=* | --program-tran=* \ | |
337 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
338 | program_transform_name="$ac_optarg" ;; | |
339 | ||
340 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
341 | | -silent | --silent | --silen | --sile | --sil) | |
342 | silent=yes ;; | |
343 | ||
344 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
345 | ac_prev=sbindir ;; | |
346 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
347 | | --sbi=* | --sb=*) | |
348 | sbindir="$ac_optarg" ;; | |
349 | ||
350 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
351 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
352 | | --sharedst | --shareds | --shared | --share | --shar \ | |
353 | | --sha | --sh) | |
354 | ac_prev=sharedstatedir ;; | |
355 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
356 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
357 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
358 | | --sha=* | --sh=*) | |
359 | sharedstatedir="$ac_optarg" ;; | |
360 | ||
361 | -site | --site | --sit) | |
362 | ac_prev=site ;; | |
363 | -site=* | --site=* | --sit=*) | |
364 | site="$ac_optarg" ;; | |
365 | ||
366 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
367 | ac_prev=srcdir ;; | |
368 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
369 | srcdir="$ac_optarg" ;; | |
370 | ||
371 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
372 | | --syscon | --sysco | --sysc | --sys | --sy) | |
373 | ac_prev=sysconfdir ;; | |
374 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
375 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
376 | sysconfdir="$ac_optarg" ;; | |
377 | ||
378 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
379 | ac_prev=target ;; | |
380 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
381 | target="$ac_optarg" ;; | |
382 | ||
383 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
384 | verbose=yes ;; | |
385 | ||
386 | -version | --version | --versio | --versi | --vers) | |
387 | echo "configure generated by autoconf version 2.13" | |
388 | exit 0 ;; | |
389 | ||
390 | -with-* | --with-*) | |
391 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
392 | # Reject names that are not valid shell variable names. | |
393 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
394 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
395 | fi | |
396 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
397 | case "$ac_option" in | |
398 | *=*) ;; | |
399 | *) ac_optarg=yes ;; | |
400 | esac | |
401 | eval "with_${ac_package}='$ac_optarg'" ;; | |
402 | ||
403 | -without-* | --without-*) | |
404 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
405 | # Reject names that are not valid shell variable names. | |
406 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
407 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
408 | fi | |
409 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
410 | eval "with_${ac_package}=no" ;; | |
411 | ||
412 | --x) | |
413 | # Obsolete; use --with-x. | |
414 | with_x=yes ;; | |
415 | ||
416 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
417 | | --x-incl | --x-inc | --x-in | --x-i) | |
418 | ac_prev=x_includes ;; | |
419 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
420 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
421 | x_includes="$ac_optarg" ;; | |
422 | ||
423 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
424 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
425 | ac_prev=x_libraries ;; | |
426 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
427 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
428 | x_libraries="$ac_optarg" ;; | |
429 | ||
430 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
431 | ;; | |
432 | ||
433 | *) | |
434 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
435 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
436 | fi | |
437 | if test "x$nonopt" != xNONE; then | |
438 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
439 | fi | |
440 | nonopt="$ac_option" | |
441 | ;; | |
442 | ||
443 | esac | |
444 | done | |
445 | ||
446 | if test -n "$ac_prev"; then | |
447 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
448 | fi | |
449 | ||
450 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
451 | ||
452 | # File descriptor usage: | |
453 | # 0 standard input | |
454 | # 1 file creation | |
455 | # 2 errors and warnings | |
456 | # 3 some systems may open it to /dev/tty | |
457 | # 4 used on the Kubota Titan | |
458 | # 6 checking for... messages and results | |
459 | # 5 compiler messages saved in config.log | |
460 | if test "$silent" = yes; then | |
461 | exec 6>/dev/null | |
462 | else | |
463 | exec 6>&1 | |
464 | fi | |
465 | exec 5>./config.log | |
466 | ||
467 | echo "\ | |
468 | This file contains any messages produced by compilers while | |
469 | running configure, to aid debugging if configure makes a mistake. | |
470 | " 1>&5 | |
471 | ||
472 | # Strip out --no-create and --no-recursion so they do not pile up. | |
473 | # Also quote any args containing shell metacharacters. | |
474 | ac_configure_args= | |
475 | for ac_arg | |
476 | do | |
477 | case "$ac_arg" in | |
478 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
479 | | --no-cr | --no-c) ;; | |
480 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
481 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
482 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
483 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
484 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
485 | esac | |
486 | done | |
487 | ||
488 | # NLS nuisances. | |
489 | # Only set these to C if already set. These must not be set unconditionally | |
490 | # because not all systems understand e.g. LANG=C (notably SCO). | |
491 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
492 | # Non-C LC_CTYPE values break the ctype check. | |
493 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
494 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
495 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
496 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
497 | ||
498 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
499 | rm -rf conftest* confdefs.h | |
500 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
501 | echo > confdefs.h | |
502 | ||
503 | # A filename unique to this package, relative to the directory that | |
504 | # configure is in, which we can look for to find out if srcdir is correct. | |
505 | ac_unique_file=main.c | |
506 | ||
507 | # Find the source files, if location was not specified. | |
508 | if test -z "$srcdir"; then | |
509 | ac_srcdir_defaulted=yes | |
510 | # Try the directory containing this script, then its parent. | |
511 | ac_prog=$0 | |
512 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
513 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
514 | srcdir=$ac_confdir | |
515 | if test ! -r $srcdir/$ac_unique_file; then | |
516 | srcdir=.. | |
517 | fi | |
518 | else | |
519 | ac_srcdir_defaulted=no | |
520 | fi | |
521 | if test ! -r $srcdir/$ac_unique_file; then | |
522 | if test "$ac_srcdir_defaulted" = yes; then | |
523 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
524 | else | |
525 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
526 | fi | |
527 | fi | |
528 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
529 | ||
530 | # Prefer explicitly selected file to automatically selected ones. | |
e27da16d JT |
531 | if test -z "$CONFIG_SITE"; then |
532 | if test "x$prefix" != xNONE; then | |
533 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
534 | else | |
535 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
c906108c SS |
536 | fi |
537 | fi | |
538 | for ac_site_file in $CONFIG_SITE; do | |
539 | if test -r "$ac_site_file"; then | |
540 | echo "loading site script $ac_site_file" | |
541 | . "$ac_site_file" | |
542 | fi | |
543 | done | |
544 | ||
545 | if test -r "$cache_file"; then | |
546 | echo "loading cache $cache_file" | |
547 | . $cache_file | |
548 | else | |
549 | echo "creating cache $cache_file" | |
550 | > $cache_file | |
551 | fi | |
552 | ||
553 | ac_ext=c | |
554 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
555 | ac_cpp='$CPP $CPPFLAGS' | |
556 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
557 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
558 | cross_compiling=$ac_cv_prog_cc_cross | |
559 | ||
560 | ac_exeext= | |
561 | ac_objext=o | |
562 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
563 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
564 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
565 | ac_n= ac_c=' | |
566 | ' ac_t=' ' | |
567 | else | |
568 | ac_n=-n ac_c= ac_t= | |
569 | fi | |
570 | else | |
571 | ac_n= ac_c='\c' ac_t= | |
572 | fi | |
573 | ||
574 | ||
575 | ||
413ccac7 | 576 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
e27da16d | 577 | echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
578 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
579 | if test "${enable_maintainer_mode+set}" = set; then | |
580 | enableval="$enable_maintainer_mode" | |
581 | USE_MAINTAINER_MODE=$enableval | |
582 | else | |
583 | USE_MAINTAINER_MODE=no | |
584 | fi | |
585 | ||
586 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
587 | ||
588 | ||
589 | if test $USE_MAINTAINER_MODE = yes; then | |
590 | MAINTAINER_MODE_TRUE= | |
591 | MAINTAINER_MODE_FALSE='#' | |
592 | else | |
593 | MAINTAINER_MODE_TRUE='#' | |
594 | MAINTAINER_MODE_FALSE= | |
595 | fi | |
596 | MAINT=$MAINTAINER_MODE_TRUE | |
597 | ||
598 | ||
c906108c SS |
599 | |
600 | # Extract the first word of "gcc", so it can be a program name with args. | |
601 | set dummy gcc; ac_word=$2 | |
602 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 603 | echo "configure:604: checking for $ac_word" >&5 |
c906108c SS |
604 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
606 | else | |
607 | if test -n "$CC"; then | |
608 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
609 | else | |
610 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
611 | ac_dummy="$PATH" | |
612 | for ac_dir in $ac_dummy; do | |
613 | test -z "$ac_dir" && ac_dir=. | |
614 | if test -f $ac_dir/$ac_word; then | |
615 | ac_cv_prog_CC="gcc" | |
616 | break | |
617 | fi | |
618 | done | |
619 | IFS="$ac_save_ifs" | |
620 | fi | |
621 | fi | |
622 | CC="$ac_cv_prog_CC" | |
623 | if test -n "$CC"; then | |
624 | echo "$ac_t""$CC" 1>&6 | |
625 | else | |
626 | echo "$ac_t""no" 1>&6 | |
627 | fi | |
628 | ||
629 | if test -z "$CC"; then | |
630 | # Extract the first word of "cc", so it can be a program name with args. | |
631 | set dummy cc; ac_word=$2 | |
632 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 633 | echo "configure:634: checking for $ac_word" >&5 |
c906108c SS |
634 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
636 | else | |
637 | if test -n "$CC"; then | |
638 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
639 | else | |
640 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
641 | ac_prog_rejected=no | |
642 | ac_dummy="$PATH" | |
643 | for ac_dir in $ac_dummy; do | |
644 | test -z "$ac_dir" && ac_dir=. | |
645 | if test -f $ac_dir/$ac_word; then | |
646 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
647 | ac_prog_rejected=yes | |
648 | continue | |
649 | fi | |
650 | ac_cv_prog_CC="cc" | |
651 | break | |
652 | fi | |
653 | done | |
654 | IFS="$ac_save_ifs" | |
655 | if test $ac_prog_rejected = yes; then | |
656 | # We found a bogon in the path, so make sure we never use it. | |
657 | set dummy $ac_cv_prog_CC | |
658 | shift | |
659 | if test $# -gt 0; then | |
660 | # We chose a different compiler from the bogus one. | |
661 | # However, it has the same basename, so the bogon will be chosen | |
662 | # first if we set CC to just the basename; use the full file name. | |
663 | shift | |
664 | set dummy "$ac_dir/$ac_word" "$@" | |
665 | shift | |
666 | ac_cv_prog_CC="$@" | |
667 | fi | |
668 | fi | |
669 | fi | |
670 | fi | |
671 | CC="$ac_cv_prog_CC" | |
672 | if test -n "$CC"; then | |
673 | echo "$ac_t""$CC" 1>&6 | |
674 | else | |
675 | echo "$ac_t""no" 1>&6 | |
676 | fi | |
677 | ||
678 | if test -z "$CC"; then | |
679 | case "`uname -s`" in | |
680 | *win32* | *WIN32*) | |
681 | # Extract the first word of "cl", so it can be a program name with args. | |
682 | set dummy cl; ac_word=$2 | |
683 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 684 | echo "configure:685: checking for $ac_word" >&5 |
c906108c SS |
685 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
687 | else | |
688 | if test -n "$CC"; then | |
689 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
690 | else | |
691 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
692 | ac_dummy="$PATH" | |
693 | for ac_dir in $ac_dummy; do | |
694 | test -z "$ac_dir" && ac_dir=. | |
695 | if test -f $ac_dir/$ac_word; then | |
696 | ac_cv_prog_CC="cl" | |
697 | break | |
698 | fi | |
699 | done | |
700 | IFS="$ac_save_ifs" | |
701 | fi | |
702 | fi | |
703 | CC="$ac_cv_prog_CC" | |
704 | if test -n "$CC"; then | |
705 | echo "$ac_t""$CC" 1>&6 | |
706 | else | |
707 | echo "$ac_t""no" 1>&6 | |
708 | fi | |
709 | ;; | |
710 | esac | |
711 | fi | |
712 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
713 | fi | |
714 | ||
715 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
e27da16d | 716 | echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
717 | |
718 | ac_ext=c | |
719 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
720 | ac_cpp='$CPP $CPPFLAGS' | |
721 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
722 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
723 | cross_compiling=$ac_cv_prog_cc_cross | |
724 | ||
725 | cat > conftest.$ac_ext << EOF | |
726 | ||
e27da16d | 727 | #line 728 "configure" |
c906108c SS |
728 | #include "confdefs.h" |
729 | ||
730 | main(){return(0);} | |
731 | EOF | |
e27da16d | 732 | if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
733 | ac_cv_prog_cc_works=yes |
734 | # If we can't run a trivial program, we are probably using a cross compiler. | |
735 | if (./conftest; exit) 2>/dev/null; then | |
736 | ac_cv_prog_cc_cross=no | |
737 | else | |
738 | ac_cv_prog_cc_cross=yes | |
739 | fi | |
740 | else | |
741 | echo "configure: failed program was:" >&5 | |
742 | cat conftest.$ac_ext >&5 | |
743 | ac_cv_prog_cc_works=no | |
744 | fi | |
745 | rm -fr conftest* | |
746 | ac_ext=c | |
747 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
748 | ac_cpp='$CPP $CPPFLAGS' | |
749 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
750 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
751 | cross_compiling=$ac_cv_prog_cc_cross | |
752 | ||
753 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
754 | if test $ac_cv_prog_cc_works = no; then | |
755 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
756 | fi | |
757 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
e27da16d | 758 | echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
759 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
760 | cross_compiling=$ac_cv_prog_cc_cross | |
761 | ||
762 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
e27da16d | 763 | echo "configure:764: checking whether we are using GNU C" >&5 |
c906108c SS |
764 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
766 | else | |
767 | cat > conftest.c <<EOF | |
768 | #ifdef __GNUC__ | |
769 | yes; | |
770 | #endif | |
771 | EOF | |
e27da16d | 772 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
773 | ac_cv_prog_gcc=yes |
774 | else | |
775 | ac_cv_prog_gcc=no | |
776 | fi | |
777 | fi | |
778 | ||
779 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
780 | ||
781 | if test $ac_cv_prog_gcc = yes; then | |
782 | GCC=yes | |
783 | else | |
784 | GCC= | |
785 | fi | |
786 | ||
787 | ac_test_CFLAGS="${CFLAGS+set}" | |
788 | ac_save_CFLAGS="$CFLAGS" | |
789 | CFLAGS= | |
790 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
e27da16d | 791 | echo "configure:792: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
792 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
793 | echo $ac_n "(cached) $ac_c" 1>&6 | |
794 | else | |
795 | echo 'void f(){}' > conftest.c | |
796 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
797 | ac_cv_prog_cc_g=yes | |
798 | else | |
799 | ac_cv_prog_cc_g=no | |
800 | fi | |
801 | rm -f conftest* | |
802 | ||
803 | fi | |
804 | ||
805 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
806 | if test "$ac_test_CFLAGS" = set; then | |
807 | CFLAGS="$ac_save_CFLAGS" | |
808 | elif test $ac_cv_prog_cc_g = yes; then | |
809 | if test "$GCC" = yes; then | |
810 | CFLAGS="-g -O2" | |
811 | else | |
812 | CFLAGS="-g" | |
813 | fi | |
814 | else | |
815 | if test "$GCC" = yes; then | |
816 | CFLAGS="-O2" | |
817 | else | |
818 | CFLAGS= | |
819 | fi | |
820 | fi | |
821 | ||
822 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
e27da16d | 823 | echo "configure:824: checking how to run the C preprocessor" >&5 |
c906108c SS |
824 | # On Suns, sometimes $CPP names a directory. |
825 | if test -n "$CPP" && test -d "$CPP"; then | |
826 | CPP= | |
827 | fi | |
828 | if test -z "$CPP"; then | |
829 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
830 | echo $ac_n "(cached) $ac_c" 1>&6 | |
831 | else | |
832 | # This must be in double quotes, not single quotes, because CPP may get | |
833 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
834 | CPP="${CC-cc} -E" | |
835 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
836 | # not just through cpp. | |
837 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 838 | #line 839 "configure" |
c906108c SS |
839 | #include "confdefs.h" |
840 | #include <assert.h> | |
841 | Syntax Error | |
842 | EOF | |
843 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 844 | { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
845 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
846 | if test -z "$ac_err"; then | |
847 | : | |
848 | else | |
849 | echo "$ac_err" >&5 | |
850 | echo "configure: failed program was:" >&5 | |
851 | cat conftest.$ac_ext >&5 | |
852 | rm -rf conftest* | |
853 | CPP="${CC-cc} -E -traditional-cpp" | |
854 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 855 | #line 856 "configure" |
c906108c SS |
856 | #include "confdefs.h" |
857 | #include <assert.h> | |
858 | Syntax Error | |
859 | EOF | |
860 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 861 | { (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
862 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
863 | if test -z "$ac_err"; then | |
864 | : | |
865 | else | |
866 | echo "$ac_err" >&5 | |
867 | echo "configure: failed program was:" >&5 | |
868 | cat conftest.$ac_ext >&5 | |
869 | rm -rf conftest* | |
870 | CPP="${CC-cc} -nologo -E" | |
871 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 872 | #line 873 "configure" |
c906108c SS |
873 | #include "confdefs.h" |
874 | #include <assert.h> | |
875 | Syntax Error | |
876 | EOF | |
877 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 878 | { (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
879 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
880 | if test -z "$ac_err"; then | |
881 | : | |
882 | else | |
883 | echo "$ac_err" >&5 | |
884 | echo "configure: failed program was:" >&5 | |
885 | cat conftest.$ac_ext >&5 | |
886 | rm -rf conftest* | |
887 | CPP=/lib/cpp | |
888 | fi | |
889 | rm -f conftest* | |
890 | fi | |
891 | rm -f conftest* | |
892 | fi | |
893 | rm -f conftest* | |
894 | ac_cv_prog_CPP="$CPP" | |
895 | fi | |
896 | CPP="$ac_cv_prog_CPP" | |
897 | else | |
898 | ac_cv_prog_CPP="$CPP" | |
899 | fi | |
900 | echo "$ac_t""$CPP" 1>&6 | |
901 | ||
902 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
e27da16d | 903 | echo "configure:904: checking for AIX" >&5 |
c906108c | 904 | cat > conftest.$ac_ext <<EOF |
e27da16d | 905 | #line 906 "configure" |
c906108c SS |
906 | #include "confdefs.h" |
907 | #ifdef _AIX | |
908 | yes | |
909 | #endif | |
910 | ||
911 | EOF | |
912 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
913 | egrep "yes" >/dev/null 2>&1; then | |
914 | rm -rf conftest* | |
915 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
916 | #define _ALL_SOURCE 1 | |
917 | EOF | |
918 | ||
919 | else | |
920 | rm -rf conftest* | |
921 | echo "$ac_t""no" 1>&6 | |
922 | fi | |
923 | rm -f conftest* | |
924 | ||
925 | ||
56157b4a | 926 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
e27da16d | 927 | echo "configure:928: checking for POSIXized ISC" >&5 |
56157b4a AC |
928 | if test -d /etc/conf/kconfig.d && |
929 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
930 | then | |
931 | echo "$ac_t""yes" 1>&6 | |
932 | ISC=yes # If later tests want to check for ISC. | |
933 | cat >> confdefs.h <<\EOF | |
934 | #define _POSIX_SOURCE 1 | |
c906108c SS |
935 | EOF |
936 | ||
56157b4a AC |
937 | if test "$GCC" = yes; then |
938 | CC="$CC -posix" | |
939 | else | |
940 | CC="$CC -Xp" | |
941 | fi | |
c906108c SS |
942 | else |
943 | echo "$ac_t""no" 1>&6 | |
56157b4a | 944 | ISC= |
c906108c SS |
945 | fi |
946 | ||
947 | ||
948 | ||
949 | ||
950 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
e27da16d | 951 | echo "configure:952: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
952 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
953 | echo $ac_n "(cached) $ac_c" 1>&6 | |
954 | else | |
955 | am_cv_prog_cc_stdc=no | |
956 | ac_save_CC="$CC" | |
957 | # Don't try gcc -ansi; that turns off useful extensions and | |
958 | # breaks some systems' header files. | |
959 | # AIX -qlanglvl=ansi | |
960 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
961 | # HP-UX 10.20 and later -Ae |
962 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 963 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 964 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
965 | do |
966 | CC="$ac_save_CC $ac_arg" | |
967 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 968 | #line 969 "configure" |
c906108c SS |
969 | #include "confdefs.h" |
970 | #include <stdarg.h> | |
971 | #include <stdio.h> | |
972 | #include <sys/types.h> | |
973 | #include <sys/stat.h> | |
974 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
975 | struct buf { int x; }; | |
976 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
977 | static char *e (p, i) | |
978 | char **p; | |
979 | int i; | |
980 | { | |
981 | return p[i]; | |
982 | } | |
983 | static char *f (char * (*g) (char **, int), char **p, ...) | |
984 | { | |
985 | char *s; | |
986 | va_list v; | |
987 | va_start (v,p); | |
988 | s = g (p, va_arg (v,int)); | |
989 | va_end (v); | |
990 | return s; | |
991 | } | |
992 | int test (int i, double x); | |
993 | struct s1 {int (*f) (int a);}; | |
994 | struct s2 {int (*f) (double a);}; | |
995 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
996 | int argc; | |
997 | char **argv; | |
998 | ||
999 | int main() { | |
1000 | ||
1001 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1002 | ||
1003 | ; return 0; } | |
1004 | EOF | |
e27da16d | 1005 | if { (eval echo configure:1006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1006 | rm -rf conftest* |
1007 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1008 | else | |
1009 | echo "configure: failed program was:" >&5 | |
1010 | cat conftest.$ac_ext >&5 | |
1011 | fi | |
1012 | rm -f conftest* | |
1013 | done | |
1014 | CC="$ac_save_CC" | |
1015 | ||
1016 | fi | |
1017 | ||
1018 | if test -z "$am_cv_prog_cc_stdc"; then | |
1019 | echo "$ac_t""none needed" 1>&6 | |
1020 | else | |
1021 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1022 | fi | |
1023 | case "x$am_cv_prog_cc_stdc" in | |
1024 | x|xno) ;; | |
1025 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1026 | esac | |
1027 | ||
1028 | ||
1029 | ac_aux_dir= | |
1030 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1031 | if test -f $ac_dir/install-sh; then | |
1032 | ac_aux_dir=$ac_dir | |
1033 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1034 | break | |
1035 | elif test -f $ac_dir/install.sh; then | |
1036 | ac_aux_dir=$ac_dir | |
1037 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1038 | break | |
1039 | fi | |
1040 | done | |
1041 | if test -z "$ac_aux_dir"; then | |
1042 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1043 | fi | |
1044 | ac_config_guess=$ac_aux_dir/config.guess | |
1045 | ac_config_sub=$ac_aux_dir/config.sub | |
1046 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1047 | ||
1048 | ||
1049 | # Do some error checking and defaulting for the host and target type. | |
1050 | # The inputs are: | |
1051 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1052 | # | |
1053 | # The rules are: | |
1054 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1055 | # same time. | |
1056 | # 2. Host defaults to nonopt. | |
1057 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1058 | # as determined by config.guess. | |
1059 | # 4. Target and build default to nonopt. | |
1060 | # 5. If nonopt is not specified, then target and build default to host. | |
1061 | ||
1062 | # The aliases save the names the user supplied, while $host etc. | |
1063 | # will get canonicalized. | |
1064 | case $host---$target---$nonopt in | |
1065 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1066 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1067 | esac | |
1068 | ||
1069 | ||
1070 | # Make sure we can run config.sub. | |
1071 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1072 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1073 | fi | |
1074 | ||
1075 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
e27da16d | 1076 | echo "configure:1077: checking host system type" >&5 |
c906108c SS |
1077 | |
1078 | host_alias=$host | |
1079 | case "$host_alias" in | |
1080 | NONE) | |
1081 | case $nonopt in | |
1082 | NONE) | |
1083 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1084 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1085 | fi ;; | |
1086 | *) host_alias=$nonopt ;; | |
1087 | esac ;; | |
1088 | esac | |
1089 | ||
1090 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1091 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1092 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1093 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1094 | echo "$ac_t""$host" 1>&6 | |
1095 | ||
1096 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
e27da16d | 1097 | echo "configure:1098: checking target system type" >&5 |
c906108c SS |
1098 | |
1099 | target_alias=$target | |
1100 | case "$target_alias" in | |
1101 | NONE) | |
1102 | case $nonopt in | |
1103 | NONE) target_alias=$host_alias ;; | |
1104 | *) target_alias=$nonopt ;; | |
1105 | esac ;; | |
1106 | esac | |
1107 | ||
1108 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1109 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1110 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1111 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1112 | echo "$ac_t""$target" 1>&6 | |
1113 | ||
1114 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
e27da16d | 1115 | echo "configure:1116: checking build system type" >&5 |
c906108c SS |
1116 | |
1117 | build_alias=$build | |
1118 | case "$build_alias" in | |
1119 | NONE) | |
1120 | case $nonopt in | |
1121 | NONE) build_alias=$host_alias ;; | |
1122 | *) build_alias=$nonopt ;; | |
1123 | esac ;; | |
1124 | esac | |
1125 | ||
1126 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1127 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1128 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1129 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1130 | echo "$ac_t""$build" 1>&6 | |
1131 | ||
1132 | test "$host_alias" != "$target_alias" && | |
1133 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1134 | NONENONEs,x,x, && | |
1135 | program_prefix=${target_alias}- | |
1136 | ||
1137 | ||
1138 | ALL_LINGUAS= | |
1139 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
e27da16d | 1140 | echo "configure:1141: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1141 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1142 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1143 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1144 | else | |
1145 | cat > conftestmake <<\EOF | |
1146 | all: | |
1147 | @echo 'ac_maketemp="${MAKE}"' | |
1148 | EOF | |
1149 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1150 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1151 | if test -n "$ac_maketemp"; then | |
1152 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1153 | else | |
1154 | eval ac_cv_prog_make_${ac_make}_set=no | |
1155 | fi | |
1156 | rm -f conftestmake | |
1157 | fi | |
1158 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1159 | echo "$ac_t""yes" 1>&6 | |
1160 | SET_MAKE= | |
1161 | else | |
1162 | echo "$ac_t""no" 1>&6 | |
1163 | SET_MAKE="MAKE=${MAKE-make}" | |
1164 | fi | |
1165 | ||
1166 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1167 | set dummy ranlib; ac_word=$2 | |
1168 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 1169 | echo "configure:1170: checking for $ac_word" >&5 |
c906108c SS |
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="ranlib" | |
1182 | break | |
1183 | fi | |
1184 | done | |
1185 | IFS="$ac_save_ifs" | |
1186 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1187 | fi | |
1188 | fi | |
1189 | RANLIB="$ac_cv_prog_RANLIB" | |
1190 | if test -n "$RANLIB"; then | |
1191 | echo "$ac_t""$RANLIB" 1>&6 | |
1192 | else | |
1193 | echo "$ac_t""no" 1>&6 | |
1194 | fi | |
1195 | ||
1196 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
e27da16d | 1197 | echo "configure:1198: checking for ANSI C header files" >&5 |
c906108c SS |
1198 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1199 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1200 | else | |
1201 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1202 | #line 1203 "configure" |
c906108c SS |
1203 | #include "confdefs.h" |
1204 | #include <stdlib.h> | |
1205 | #include <stdarg.h> | |
1206 | #include <string.h> | |
1207 | #include <float.h> | |
1208 | EOF | |
1209 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 1210 | { (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1211 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1212 | if test -z "$ac_err"; then | |
1213 | rm -rf conftest* | |
1214 | ac_cv_header_stdc=yes | |
1215 | else | |
1216 | echo "$ac_err" >&5 | |
1217 | echo "configure: failed program was:" >&5 | |
1218 | cat conftest.$ac_ext >&5 | |
1219 | rm -rf conftest* | |
1220 | ac_cv_header_stdc=no | |
1221 | fi | |
1222 | rm -f conftest* | |
1223 | ||
1224 | if test $ac_cv_header_stdc = yes; then | |
1225 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1226 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1227 | #line 1228 "configure" |
c906108c SS |
1228 | #include "confdefs.h" |
1229 | #include <string.h> | |
1230 | EOF | |
1231 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1232 | egrep "memchr" >/dev/null 2>&1; then | |
1233 | : | |
1234 | else | |
1235 | rm -rf conftest* | |
1236 | ac_cv_header_stdc=no | |
1237 | fi | |
1238 | rm -f conftest* | |
1239 | ||
1240 | fi | |
1241 | ||
1242 | if test $ac_cv_header_stdc = yes; then | |
1243 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1244 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1245 | #line 1246 "configure" |
c906108c SS |
1246 | #include "confdefs.h" |
1247 | #include <stdlib.h> | |
1248 | EOF | |
1249 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1250 | egrep "free" >/dev/null 2>&1; then | |
1251 | : | |
1252 | else | |
1253 | rm -rf conftest* | |
1254 | ac_cv_header_stdc=no | |
1255 | fi | |
1256 | rm -f conftest* | |
1257 | ||
1258 | fi | |
1259 | ||
1260 | if test $ac_cv_header_stdc = yes; then | |
1261 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1262 | if test "$cross_compiling" = yes; then | |
1263 | : | |
1264 | else | |
1265 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1266 | #line 1267 "configure" |
c906108c SS |
1267 | #include "confdefs.h" |
1268 | #include <ctype.h> | |
1269 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1270 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1271 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1272 | int main () { int i; for (i = 0; i < 256; i++) | |
1273 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1274 | exit (0); } | |
1275 | ||
1276 | EOF | |
e27da16d | 1277 | if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1278 | then |
1279 | : | |
1280 | else | |
1281 | echo "configure: failed program was:" >&5 | |
1282 | cat conftest.$ac_ext >&5 | |
1283 | rm -fr conftest* | |
1284 | ac_cv_header_stdc=no | |
1285 | fi | |
1286 | rm -fr conftest* | |
1287 | fi | |
1288 | ||
1289 | fi | |
1290 | fi | |
1291 | ||
1292 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1293 | if test $ac_cv_header_stdc = yes; then | |
1294 | cat >> confdefs.h <<\EOF | |
1295 | #define STDC_HEADERS 1 | |
1296 | EOF | |
1297 | ||
1298 | fi | |
1299 | ||
1300 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
e27da16d | 1301 | echo "configure:1302: checking for working const" >&5 |
c906108c SS |
1302 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1304 | else | |
1305 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1306 | #line 1307 "configure" |
c906108c SS |
1307 | #include "confdefs.h" |
1308 | ||
1309 | int main() { | |
1310 | ||
1311 | /* Ultrix mips cc rejects this. */ | |
1312 | typedef int charset[2]; const charset x; | |
1313 | /* SunOS 4.1.1 cc rejects this. */ | |
1314 | char const *const *ccp; | |
1315 | char **p; | |
1316 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1317 | struct point {int x, y;}; | |
1318 | static struct point const zero = {0,0}; | |
1319 | /* AIX XL C 1.02.0.0 rejects this. | |
1320 | It does not let you subtract one const X* pointer from another in an arm | |
1321 | of an if-expression whose if-part is not a constant expression */ | |
1322 | const char *g = "string"; | |
1323 | ccp = &g + (g ? g-g : 0); | |
1324 | /* HPUX 7.0 cc rejects these. */ | |
1325 | ++ccp; | |
1326 | p = (char**) ccp; | |
1327 | ccp = (char const *const *) p; | |
1328 | { /* SCO 3.2v4 cc rejects this. */ | |
1329 | char *t; | |
1330 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1331 | ||
1332 | *t++ = 0; | |
1333 | } | |
1334 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1335 | int x[] = {25, 17}; | |
1336 | const int *foo = &x[0]; | |
1337 | ++foo; | |
1338 | } | |
1339 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1340 | typedef const int *iptr; | |
1341 | iptr p = 0; | |
1342 | ++p; | |
1343 | } | |
1344 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1345 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1346 | struct s { int j; const int *ap[3]; }; | |
1347 | struct s *b; b->j = 5; | |
1348 | } | |
1349 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1350 | const int foo = 10; | |
1351 | } | |
1352 | ||
1353 | ; return 0; } | |
1354 | EOF | |
e27da16d | 1355 | if { (eval echo configure:1356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1356 | rm -rf conftest* |
1357 | ac_cv_c_const=yes | |
1358 | else | |
1359 | echo "configure: failed program was:" >&5 | |
1360 | cat conftest.$ac_ext >&5 | |
1361 | rm -rf conftest* | |
1362 | ac_cv_c_const=no | |
1363 | fi | |
1364 | rm -f conftest* | |
1365 | fi | |
1366 | ||
1367 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1368 | if test $ac_cv_c_const = no; then | |
1369 | cat >> confdefs.h <<\EOF | |
1370 | #define const | |
1371 | EOF | |
1372 | ||
1373 | fi | |
1374 | ||
1375 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
e27da16d | 1376 | echo "configure:1377: checking for inline" >&5 |
c906108c SS |
1377 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1378 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1379 | else | |
1380 | ac_cv_c_inline=no | |
1381 | for ac_kw in inline __inline__ __inline; do | |
1382 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1383 | #line 1384 "configure" |
c906108c SS |
1384 | #include "confdefs.h" |
1385 | ||
1386 | int main() { | |
1387 | } $ac_kw foo() { | |
1388 | ; return 0; } | |
1389 | EOF | |
e27da16d | 1390 | if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1391 | rm -rf conftest* |
1392 | ac_cv_c_inline=$ac_kw; break | |
1393 | else | |
1394 | echo "configure: failed program was:" >&5 | |
1395 | cat conftest.$ac_ext >&5 | |
1396 | fi | |
1397 | rm -f conftest* | |
1398 | done | |
1399 | ||
1400 | fi | |
1401 | ||
1402 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1403 | case "$ac_cv_c_inline" in | |
1404 | inline | yes) ;; | |
1405 | no) cat >> confdefs.h <<\EOF | |
1406 | #define inline | |
1407 | EOF | |
1408 | ;; | |
1409 | *) cat >> confdefs.h <<EOF | |
1410 | #define inline $ac_cv_c_inline | |
1411 | EOF | |
1412 | ;; | |
1413 | esac | |
1414 | ||
1415 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
e27da16d | 1416 | echo "configure:1417: checking for off_t" >&5 |
c906108c SS |
1417 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1418 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1419 | else | |
1420 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1421 | #line 1422 "configure" |
c906108c SS |
1422 | #include "confdefs.h" |
1423 | #include <sys/types.h> | |
1424 | #if STDC_HEADERS | |
1425 | #include <stdlib.h> | |
1426 | #include <stddef.h> | |
1427 | #endif | |
1428 | EOF | |
1429 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1430 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1431 | rm -rf conftest* | |
1432 | ac_cv_type_off_t=yes | |
1433 | else | |
1434 | rm -rf conftest* | |
1435 | ac_cv_type_off_t=no | |
1436 | fi | |
1437 | rm -f conftest* | |
1438 | ||
1439 | fi | |
1440 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1441 | if test $ac_cv_type_off_t = no; then | |
1442 | cat >> confdefs.h <<\EOF | |
1443 | #define off_t long | |
1444 | EOF | |
1445 | ||
1446 | fi | |
1447 | ||
1448 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
e27da16d | 1449 | echo "configure:1450: checking for size_t" >&5 |
c906108c SS |
1450 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1452 | else | |
1453 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1454 | #line 1455 "configure" |
c906108c SS |
1455 | #include "confdefs.h" |
1456 | #include <sys/types.h> | |
1457 | #if STDC_HEADERS | |
1458 | #include <stdlib.h> | |
1459 | #include <stddef.h> | |
1460 | #endif | |
1461 | EOF | |
1462 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1463 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1464 | rm -rf conftest* | |
1465 | ac_cv_type_size_t=yes | |
1466 | else | |
1467 | rm -rf conftest* | |
1468 | ac_cv_type_size_t=no | |
1469 | fi | |
1470 | rm -f conftest* | |
1471 | ||
1472 | fi | |
1473 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1474 | if test $ac_cv_type_size_t = no; then | |
1475 | cat >> confdefs.h <<\EOF | |
1476 | #define size_t unsigned | |
1477 | EOF | |
1478 | ||
1479 | fi | |
1480 | ||
1481 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1482 | # for constant arguments. Useless! | |
1483 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
e27da16d | 1484 | echo "configure:1485: checking for working alloca.h" >&5 |
c906108c SS |
1485 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1486 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1487 | else | |
1488 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1489 | #line 1490 "configure" |
c906108c SS |
1490 | #include "confdefs.h" |
1491 | #include <alloca.h> | |
1492 | int main() { | |
1493 | char *p = alloca(2 * sizeof(int)); | |
1494 | ; return 0; } | |
1495 | EOF | |
e27da16d | 1496 | if { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1497 | rm -rf conftest* |
1498 | ac_cv_header_alloca_h=yes | |
1499 | else | |
1500 | echo "configure: failed program was:" >&5 | |
1501 | cat conftest.$ac_ext >&5 | |
1502 | rm -rf conftest* | |
1503 | ac_cv_header_alloca_h=no | |
1504 | fi | |
1505 | rm -f conftest* | |
1506 | fi | |
1507 | ||
1508 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1509 | if test $ac_cv_header_alloca_h = yes; then | |
1510 | cat >> confdefs.h <<\EOF | |
1511 | #define HAVE_ALLOCA_H 1 | |
1512 | EOF | |
1513 | ||
1514 | fi | |
1515 | ||
1516 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
e27da16d | 1517 | echo "configure:1518: checking for alloca" >&5 |
c906108c SS |
1518 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1519 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1520 | else | |
1521 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1522 | #line 1523 "configure" |
c906108c SS |
1523 | #include "confdefs.h" |
1524 | ||
1525 | #ifdef __GNUC__ | |
1526 | # define alloca __builtin_alloca | |
1527 | #else | |
1528 | # ifdef _MSC_VER | |
1529 | # include <malloc.h> | |
1530 | # define alloca _alloca | |
1531 | # else | |
1532 | # if HAVE_ALLOCA_H | |
1533 | # include <alloca.h> | |
1534 | # else | |
1535 | # ifdef _AIX | |
1536 | #pragma alloca | |
1537 | # else | |
1538 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1539 | char *alloca (); | |
1540 | # endif | |
1541 | # endif | |
1542 | # endif | |
1543 | # endif | |
1544 | #endif | |
1545 | ||
1546 | int main() { | |
1547 | char *p = (char *) alloca(1); | |
1548 | ; return 0; } | |
1549 | EOF | |
e27da16d | 1550 | if { (eval echo configure:1551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1551 | rm -rf conftest* |
1552 | ac_cv_func_alloca_works=yes | |
1553 | else | |
1554 | echo "configure: failed program was:" >&5 | |
1555 | cat conftest.$ac_ext >&5 | |
1556 | rm -rf conftest* | |
1557 | ac_cv_func_alloca_works=no | |
1558 | fi | |
1559 | rm -f conftest* | |
1560 | fi | |
1561 | ||
1562 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1563 | if test $ac_cv_func_alloca_works = yes; then | |
1564 | cat >> confdefs.h <<\EOF | |
1565 | #define HAVE_ALLOCA 1 | |
1566 | EOF | |
1567 | ||
1568 | fi | |
1569 | ||
1570 | if test $ac_cv_func_alloca_works = no; then | |
1571 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1572 | # that cause trouble. Some versions do not even contain alloca or | |
1573 | # contain a buggy version. If you still want to use their alloca, | |
1574 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1575 | ALLOCA=alloca.${ac_objext} | |
1576 | cat >> confdefs.h <<\EOF | |
1577 | #define C_ALLOCA 1 | |
1578 | EOF | |
1579 | ||
1580 | ||
1581 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
e27da16d | 1582 | echo "configure:1583: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1583 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1585 | else | |
1586 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1587 | #line 1588 "configure" |
c906108c SS |
1588 | #include "confdefs.h" |
1589 | #if defined(CRAY) && ! defined(CRAY2) | |
1590 | webecray | |
1591 | #else | |
1592 | wenotbecray | |
1593 | #endif | |
1594 | ||
1595 | EOF | |
1596 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1597 | egrep "webecray" >/dev/null 2>&1; then | |
1598 | rm -rf conftest* | |
1599 | ac_cv_os_cray=yes | |
1600 | else | |
1601 | rm -rf conftest* | |
1602 | ac_cv_os_cray=no | |
1603 | fi | |
1604 | rm -f conftest* | |
1605 | ||
1606 | fi | |
1607 | ||
1608 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1609 | if test $ac_cv_os_cray = yes; then | |
1610 | for ac_func in _getb67 GETB67 getb67; do | |
1611 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 1612 | echo "configure:1613: checking for $ac_func" >&5 |
c906108c SS |
1613 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1614 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1615 | else | |
1616 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1617 | #line 1618 "configure" |
c906108c SS |
1618 | #include "confdefs.h" |
1619 | /* System header to define __stub macros and hopefully few prototypes, | |
1620 | which can conflict with char $ac_func(); below. */ | |
1621 | #include <assert.h> | |
1622 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1623 | /* We use char because int might match the return type of a gcc2 | |
1624 | builtin and then its argument prototype would still apply. */ | |
1625 | char $ac_func(); | |
1626 | ||
1627 | int main() { | |
1628 | ||
1629 | /* The GNU C library defines this for functions which it implements | |
1630 | to always fail with ENOSYS. Some functions are actually named | |
1631 | something starting with __ and the normal name is an alias. */ | |
1632 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1633 | choke me | |
1634 | #else | |
1635 | $ac_func(); | |
1636 | #endif | |
1637 | ||
1638 | ; return 0; } | |
1639 | EOF | |
e27da16d | 1640 | if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1641 | rm -rf conftest* |
1642 | eval "ac_cv_func_$ac_func=yes" | |
1643 | else | |
1644 | echo "configure: failed program was:" >&5 | |
1645 | cat conftest.$ac_ext >&5 | |
1646 | rm -rf conftest* | |
1647 | eval "ac_cv_func_$ac_func=no" | |
1648 | fi | |
1649 | rm -f conftest* | |
1650 | fi | |
1651 | ||
1652 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1653 | echo "$ac_t""yes" 1>&6 | |
1654 | cat >> confdefs.h <<EOF | |
1655 | #define CRAY_STACKSEG_END $ac_func | |
1656 | EOF | |
1657 | ||
1658 | break | |
1659 | else | |
1660 | echo "$ac_t""no" 1>&6 | |
1661 | fi | |
1662 | ||
1663 | done | |
1664 | fi | |
1665 | ||
1666 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
e27da16d | 1667 | echo "configure:1668: checking stack direction for C alloca" >&5 |
c906108c SS |
1668 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1670 | else | |
1671 | if test "$cross_compiling" = yes; then | |
1672 | ac_cv_c_stack_direction=0 | |
1673 | else | |
1674 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1675 | #line 1676 "configure" |
c906108c SS |
1676 | #include "confdefs.h" |
1677 | find_stack_direction () | |
1678 | { | |
1679 | static char *addr = 0; | |
1680 | auto char dummy; | |
1681 | if (addr == 0) | |
1682 | { | |
1683 | addr = &dummy; | |
1684 | return find_stack_direction (); | |
1685 | } | |
1686 | else | |
1687 | return (&dummy > addr) ? 1 : -1; | |
1688 | } | |
1689 | main () | |
1690 | { | |
1691 | exit (find_stack_direction() < 0); | |
1692 | } | |
1693 | EOF | |
e27da16d | 1694 | if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1695 | then |
1696 | ac_cv_c_stack_direction=1 | |
1697 | else | |
1698 | echo "configure: failed program was:" >&5 | |
1699 | cat conftest.$ac_ext >&5 | |
1700 | rm -fr conftest* | |
1701 | ac_cv_c_stack_direction=-1 | |
1702 | fi | |
1703 | rm -fr conftest* | |
1704 | fi | |
1705 | ||
1706 | fi | |
1707 | ||
1708 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1709 | cat >> confdefs.h <<EOF | |
1710 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1711 | EOF | |
1712 | ||
1713 | fi | |
1714 | ||
1715 | for ac_hdr in unistd.h | |
1716 | do | |
1717 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1718 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e27da16d | 1719 | echo "configure:1720: checking for $ac_hdr" >&5 |
c906108c SS |
1720 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1721 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1722 | else | |
1723 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1724 | #line 1725 "configure" |
c906108c SS |
1725 | #include "confdefs.h" |
1726 | #include <$ac_hdr> | |
1727 | EOF | |
1728 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 1729 | { (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1730 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1731 | if test -z "$ac_err"; then | |
1732 | rm -rf conftest* | |
1733 | eval "ac_cv_header_$ac_safe=yes" | |
1734 | else | |
1735 | echo "$ac_err" >&5 | |
1736 | echo "configure: failed program was:" >&5 | |
1737 | cat conftest.$ac_ext >&5 | |
1738 | rm -rf conftest* | |
1739 | eval "ac_cv_header_$ac_safe=no" | |
1740 | fi | |
1741 | rm -f conftest* | |
1742 | fi | |
1743 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1744 | echo "$ac_t""yes" 1>&6 | |
1745 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1746 | cat >> confdefs.h <<EOF | |
1747 | #define $ac_tr_hdr 1 | |
1748 | EOF | |
1749 | ||
1750 | else | |
1751 | echo "$ac_t""no" 1>&6 | |
1752 | fi | |
1753 | done | |
1754 | ||
1755 | for ac_func in getpagesize | |
1756 | do | |
1757 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 1758 | echo "configure:1759: checking for $ac_func" >&5 |
c906108c SS |
1759 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1760 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1761 | else | |
1762 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1763 | #line 1764 "configure" |
c906108c SS |
1764 | #include "confdefs.h" |
1765 | /* System header to define __stub macros and hopefully few prototypes, | |
1766 | which can conflict with char $ac_func(); below. */ | |
1767 | #include <assert.h> | |
1768 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1769 | /* We use char because int might match the return type of a gcc2 | |
1770 | builtin and then its argument prototype would still apply. */ | |
1771 | char $ac_func(); | |
1772 | ||
1773 | int main() { | |
1774 | ||
1775 | /* The GNU C library defines this for functions which it implements | |
1776 | to always fail with ENOSYS. Some functions are actually named | |
1777 | something starting with __ and the normal name is an alias. */ | |
1778 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1779 | choke me | |
1780 | #else | |
1781 | $ac_func(); | |
1782 | #endif | |
1783 | ||
1784 | ; return 0; } | |
1785 | EOF | |
e27da16d | 1786 | if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1787 | rm -rf conftest* |
1788 | eval "ac_cv_func_$ac_func=yes" | |
1789 | else | |
1790 | echo "configure: failed program was:" >&5 | |
1791 | cat conftest.$ac_ext >&5 | |
1792 | rm -rf conftest* | |
1793 | eval "ac_cv_func_$ac_func=no" | |
1794 | fi | |
1795 | rm -f conftest* | |
1796 | fi | |
1797 | ||
1798 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1799 | echo "$ac_t""yes" 1>&6 | |
1800 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1801 | cat >> confdefs.h <<EOF | |
1802 | #define $ac_tr_func 1 | |
1803 | EOF | |
1804 | ||
1805 | else | |
1806 | echo "$ac_t""no" 1>&6 | |
1807 | fi | |
1808 | done | |
1809 | ||
1810 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
e27da16d | 1811 | echo "configure:1812: checking for working mmap" >&5 |
c906108c SS |
1812 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1813 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1814 | else | |
1815 | if test "$cross_compiling" = yes; then | |
1816 | ac_cv_func_mmap_fixed_mapped=no | |
1817 | else | |
1818 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1819 | #line 1820 "configure" |
c906108c SS |
1820 | #include "confdefs.h" |
1821 | ||
1822 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1823 | Here is a matrix of mmap possibilities: | |
1824 | mmap private not fixed | |
1825 | mmap private fixed at somewhere currently unmapped | |
1826 | mmap private fixed at somewhere already mapped | |
1827 | mmap shared not fixed | |
1828 | mmap shared fixed at somewhere currently unmapped | |
1829 | mmap shared fixed at somewhere already mapped | |
1830 | For private mappings, we should verify that changes cannot be read() | |
1831 | back from the file, nor mmap's back from the file at a different | |
1832 | address. (There have been systems where private was not correctly | |
1833 | implemented like the infamous i386 svr4.0, and systems where the | |
1834 | VM page cache was not coherent with the filesystem buffer cache | |
1835 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1836 | For shared mappings, we should conversely verify that changes get | |
1837 | propogated back to all the places they're supposed to be. | |
1838 | ||
1839 | Grep wants private fixed already mapped. | |
1840 | The main things grep needs to know about mmap are: | |
1841 | * does it exist and is it safe to write into the mmap'd area | |
1842 | * how to use it (BSD variants) */ | |
1843 | #include <sys/types.h> | |
1844 | #include <fcntl.h> | |
1845 | #include <sys/mman.h> | |
1846 | ||
1847 | /* This mess was copied from the GNU getpagesize.h. */ | |
1848 | #ifndef HAVE_GETPAGESIZE | |
1849 | # ifdef HAVE_UNISTD_H | |
1850 | # include <unistd.h> | |
1851 | # endif | |
1852 | ||
1853 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1854 | # ifndef HAVE_SYS_PARAM_H | |
1855 | # define HAVE_SYS_PARAM_H 1 | |
1856 | # endif | |
1857 | ||
1858 | # ifdef _SC_PAGESIZE | |
1859 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1860 | # else /* no _SC_PAGESIZE */ | |
1861 | # ifdef HAVE_SYS_PARAM_H | |
1862 | # include <sys/param.h> | |
1863 | # ifdef EXEC_PAGESIZE | |
1864 | # define getpagesize() EXEC_PAGESIZE | |
1865 | # else /* no EXEC_PAGESIZE */ | |
1866 | # ifdef NBPG | |
1867 | # define getpagesize() NBPG * CLSIZE | |
1868 | # ifndef CLSIZE | |
1869 | # define CLSIZE 1 | |
1870 | # endif /* no CLSIZE */ | |
1871 | # else /* no NBPG */ | |
1872 | # ifdef NBPC | |
1873 | # define getpagesize() NBPC | |
1874 | # else /* no NBPC */ | |
1875 | # ifdef PAGESIZE | |
1876 | # define getpagesize() PAGESIZE | |
1877 | # endif /* PAGESIZE */ | |
1878 | # endif /* no NBPC */ | |
1879 | # endif /* no NBPG */ | |
1880 | # endif /* no EXEC_PAGESIZE */ | |
1881 | # else /* no HAVE_SYS_PARAM_H */ | |
1882 | # define getpagesize() 8192 /* punt totally */ | |
1883 | # endif /* no HAVE_SYS_PARAM_H */ | |
1884 | # endif /* no _SC_PAGESIZE */ | |
1885 | ||
1886 | #endif /* no HAVE_GETPAGESIZE */ | |
1887 | ||
1888 | #ifdef __cplusplus | |
1889 | extern "C" { void *malloc(unsigned); } | |
1890 | #else | |
1891 | char *malloc(); | |
1892 | #endif | |
1893 | ||
1894 | int | |
1895 | main() | |
1896 | { | |
1897 | char *data, *data2, *data3; | |
1898 | int i, pagesize; | |
1899 | int fd; | |
1900 | ||
1901 | pagesize = getpagesize(); | |
1902 | ||
1903 | /* | |
1904 | * First, make a file with some known garbage in it. | |
1905 | */ | |
1906 | data = malloc(pagesize); | |
1907 | if (!data) | |
1908 | exit(1); | |
1909 | for (i = 0; i < pagesize; ++i) | |
1910 | *(data + i) = rand(); | |
1911 | umask(0); | |
1912 | fd = creat("conftestmmap", 0600); | |
1913 | if (fd < 0) | |
1914 | exit(1); | |
1915 | if (write(fd, data, pagesize) != pagesize) | |
1916 | exit(1); | |
1917 | close(fd); | |
1918 | ||
1919 | /* | |
1920 | * Next, try to mmap the file at a fixed address which | |
1921 | * already has something else allocated at it. If we can, | |
1922 | * also make sure that we see the same garbage. | |
1923 | */ | |
1924 | fd = open("conftestmmap", O_RDWR); | |
1925 | if (fd < 0) | |
1926 | exit(1); | |
1927 | data2 = malloc(2 * pagesize); | |
1928 | if (!data2) | |
1929 | exit(1); | |
1930 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1931 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1932 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1933 | exit(1); | |
1934 | for (i = 0; i < pagesize; ++i) | |
1935 | if (*(data + i) != *(data2 + i)) | |
1936 | exit(1); | |
1937 | ||
1938 | /* | |
1939 | * Finally, make sure that changes to the mapped area | |
1940 | * do not percolate back to the file as seen by read(). | |
1941 | * (This is a bug on some variants of i386 svr4.0.) | |
1942 | */ | |
1943 | for (i = 0; i < pagesize; ++i) | |
1944 | *(data2 + i) = *(data2 + i) + 1; | |
1945 | data3 = malloc(pagesize); | |
1946 | if (!data3) | |
1947 | exit(1); | |
1948 | if (read(fd, data3, pagesize) != pagesize) | |
1949 | exit(1); | |
1950 | for (i = 0; i < pagesize; ++i) | |
1951 | if (*(data + i) != *(data3 + i)) | |
1952 | exit(1); | |
1953 | close(fd); | |
1954 | unlink("conftestmmap"); | |
1955 | exit(0); | |
1956 | } | |
1957 | ||
1958 | EOF | |
e27da16d | 1959 | if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1960 | then |
1961 | ac_cv_func_mmap_fixed_mapped=yes | |
1962 | else | |
1963 | echo "configure: failed program was:" >&5 | |
1964 | cat conftest.$ac_ext >&5 | |
1965 | rm -fr conftest* | |
1966 | ac_cv_func_mmap_fixed_mapped=no | |
1967 | fi | |
1968 | rm -fr conftest* | |
1969 | fi | |
1970 | ||
1971 | fi | |
1972 | ||
1973 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1974 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1975 | cat >> confdefs.h <<\EOF | |
1976 | #define HAVE_MMAP 1 | |
1977 | EOF | |
1978 | ||
1979 | fi | |
1980 | ||
1981 | ||
1982 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1983 | unistd.h values.h sys/param.h | |
1984 | do | |
1985 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1986 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e27da16d | 1987 | echo "configure:1988: checking for $ac_hdr" >&5 |
c906108c SS |
1988 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1990 | else | |
1991 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 1992 | #line 1993 "configure" |
c906108c SS |
1993 | #include "confdefs.h" |
1994 | #include <$ac_hdr> | |
1995 | EOF | |
1996 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 1997 | { (eval echo configure:1998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1998 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1999 | if test -z "$ac_err"; then | |
2000 | rm -rf conftest* | |
2001 | eval "ac_cv_header_$ac_safe=yes" | |
2002 | else | |
2003 | echo "$ac_err" >&5 | |
2004 | echo "configure: failed program was:" >&5 | |
2005 | cat conftest.$ac_ext >&5 | |
2006 | rm -rf conftest* | |
2007 | eval "ac_cv_header_$ac_safe=no" | |
2008 | fi | |
2009 | rm -f conftest* | |
2010 | fi | |
2011 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2012 | echo "$ac_t""yes" 1>&6 | |
2013 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2014 | cat >> confdefs.h <<EOF | |
2015 | #define $ac_tr_hdr 1 | |
2016 | EOF | |
2017 | ||
2018 | else | |
2019 | echo "$ac_t""no" 1>&6 | |
2020 | fi | |
2021 | done | |
2022 | ||
2023 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2024 | __argz_count __argz_stringify __argz_next | |
2025 | do | |
2026 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 2027 | echo "configure:2028: checking for $ac_func" >&5 |
c906108c SS |
2028 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2029 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2030 | else | |
2031 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2032 | #line 2033 "configure" |
c906108c SS |
2033 | #include "confdefs.h" |
2034 | /* System header to define __stub macros and hopefully few prototypes, | |
2035 | which can conflict with char $ac_func(); below. */ | |
2036 | #include <assert.h> | |
2037 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2038 | /* We use char because int might match the return type of a gcc2 | |
2039 | builtin and then its argument prototype would still apply. */ | |
2040 | char $ac_func(); | |
2041 | ||
2042 | int main() { | |
2043 | ||
2044 | /* The GNU C library defines this for functions which it implements | |
2045 | to always fail with ENOSYS. Some functions are actually named | |
2046 | something starting with __ and the normal name is an alias. */ | |
2047 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2048 | choke me | |
2049 | #else | |
2050 | $ac_func(); | |
2051 | #endif | |
2052 | ||
2053 | ; return 0; } | |
2054 | EOF | |
e27da16d | 2055 | if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2056 | rm -rf conftest* |
2057 | eval "ac_cv_func_$ac_func=yes" | |
2058 | else | |
2059 | echo "configure: failed program was:" >&5 | |
2060 | cat conftest.$ac_ext >&5 | |
2061 | rm -rf conftest* | |
2062 | eval "ac_cv_func_$ac_func=no" | |
2063 | fi | |
2064 | rm -f conftest* | |
2065 | fi | |
2066 | ||
2067 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2068 | echo "$ac_t""yes" 1>&6 | |
2069 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2070 | cat >> confdefs.h <<EOF | |
2071 | #define $ac_tr_func 1 | |
2072 | EOF | |
2073 | ||
2074 | else | |
2075 | echo "$ac_t""no" 1>&6 | |
2076 | fi | |
2077 | done | |
2078 | ||
2079 | ||
2080 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2081 | for ac_func in stpcpy | |
2082 | do | |
2083 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 2084 | echo "configure:2085: checking for $ac_func" >&5 |
c906108c SS |
2085 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2086 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2087 | else | |
2088 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2089 | #line 2090 "configure" |
c906108c SS |
2090 | #include "confdefs.h" |
2091 | /* System header to define __stub macros and hopefully few prototypes, | |
2092 | which can conflict with char $ac_func(); below. */ | |
2093 | #include <assert.h> | |
2094 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2095 | /* We use char because int might match the return type of a gcc2 | |
2096 | builtin and then its argument prototype would still apply. */ | |
2097 | char $ac_func(); | |
2098 | ||
2099 | int main() { | |
2100 | ||
2101 | /* The GNU C library defines this for functions which it implements | |
2102 | to always fail with ENOSYS. Some functions are actually named | |
2103 | something starting with __ and the normal name is an alias. */ | |
2104 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2105 | choke me | |
2106 | #else | |
2107 | $ac_func(); | |
2108 | #endif | |
2109 | ||
2110 | ; return 0; } | |
2111 | EOF | |
e27da16d | 2112 | if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2113 | rm -rf conftest* |
2114 | eval "ac_cv_func_$ac_func=yes" | |
2115 | else | |
2116 | echo "configure: failed program was:" >&5 | |
2117 | cat conftest.$ac_ext >&5 | |
2118 | rm -rf conftest* | |
2119 | eval "ac_cv_func_$ac_func=no" | |
2120 | fi | |
2121 | rm -f conftest* | |
2122 | fi | |
2123 | ||
2124 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2125 | echo "$ac_t""yes" 1>&6 | |
2126 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2127 | cat >> confdefs.h <<EOF | |
2128 | #define $ac_tr_func 1 | |
2129 | EOF | |
2130 | ||
2131 | else | |
2132 | echo "$ac_t""no" 1>&6 | |
2133 | fi | |
2134 | done | |
2135 | ||
2136 | fi | |
2137 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2138 | cat >> confdefs.h <<\EOF | |
2139 | #define HAVE_STPCPY 1 | |
2140 | EOF | |
2141 | ||
2142 | fi | |
2143 | ||
2144 | if test $ac_cv_header_locale_h = yes; then | |
2145 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
e27da16d | 2146 | echo "configure:2147: checking for LC_MESSAGES" >&5 |
c906108c SS |
2147 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2148 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2149 | else | |
2150 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2151 | #line 2152 "configure" |
c906108c SS |
2152 | #include "confdefs.h" |
2153 | #include <locale.h> | |
2154 | int main() { | |
2155 | return LC_MESSAGES | |
2156 | ; return 0; } | |
2157 | EOF | |
e27da16d | 2158 | if { (eval echo configure:2159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2159 | rm -rf conftest* |
2160 | am_cv_val_LC_MESSAGES=yes | |
2161 | else | |
2162 | echo "configure: failed program was:" >&5 | |
2163 | cat conftest.$ac_ext >&5 | |
2164 | rm -rf conftest* | |
2165 | am_cv_val_LC_MESSAGES=no | |
2166 | fi | |
2167 | rm -f conftest* | |
2168 | fi | |
2169 | ||
2170 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2171 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2172 | cat >> confdefs.h <<\EOF | |
2173 | #define HAVE_LC_MESSAGES 1 | |
2174 | EOF | |
2175 | ||
2176 | fi | |
2177 | fi | |
2178 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
e27da16d | 2179 | echo "configure:2180: checking whether NLS is requested" >&5 |
c906108c SS |
2180 | # Check whether --enable-nls or --disable-nls was given. |
2181 | if test "${enable_nls+set}" = set; then | |
2182 | enableval="$enable_nls" | |
2183 | USE_NLS=$enableval | |
2184 | else | |
2185 | USE_NLS=yes | |
2186 | fi | |
2187 | ||
2188 | echo "$ac_t""$USE_NLS" 1>&6 | |
2189 | ||
2190 | ||
2191 | USE_INCLUDED_LIBINTL=no | |
2192 | ||
2193 | if test "$USE_NLS" = "yes"; then | |
2194 | cat >> confdefs.h <<\EOF | |
2195 | #define ENABLE_NLS 1 | |
2196 | EOF | |
2197 | ||
2198 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
e27da16d | 2199 | echo "configure:2200: checking whether included gettext is requested" >&5 |
c906108c SS |
2200 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2201 | if test "${with_included_gettext+set}" = set; then | |
2202 | withval="$with_included_gettext" | |
2203 | nls_cv_force_use_gnu_gettext=$withval | |
2204 | else | |
2205 | nls_cv_force_use_gnu_gettext=no | |
2206 | fi | |
2207 | ||
2208 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2209 | ||
2210 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2211 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2212 | nls_cv_header_intl= | |
2213 | nls_cv_header_libgt= | |
2214 | CATOBJEXT=NONE | |
2215 | ||
2216 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2217 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
e27da16d | 2218 | echo "configure:2219: checking for libintl.h" >&5 |
c906108c SS |
2219 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2220 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2221 | else | |
2222 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2223 | #line 2224 "configure" |
c906108c SS |
2224 | #include "confdefs.h" |
2225 | #include <libintl.h> | |
2226 | EOF | |
2227 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 2228 | { (eval echo configure:2229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2229 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2230 | if test -z "$ac_err"; then | |
2231 | rm -rf conftest* | |
2232 | eval "ac_cv_header_$ac_safe=yes" | |
2233 | else | |
2234 | echo "$ac_err" >&5 | |
2235 | echo "configure: failed program was:" >&5 | |
2236 | cat conftest.$ac_ext >&5 | |
2237 | rm -rf conftest* | |
2238 | eval "ac_cv_header_$ac_safe=no" | |
2239 | fi | |
2240 | rm -f conftest* | |
2241 | fi | |
2242 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2243 | echo "$ac_t""yes" 1>&6 | |
2244 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
e27da16d | 2245 | echo "configure:2246: checking for gettext in libc" >&5 |
c906108c SS |
2246 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2247 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2248 | else | |
2249 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2250 | #line 2251 "configure" |
c906108c SS |
2251 | #include "confdefs.h" |
2252 | #include <libintl.h> | |
2253 | int main() { | |
2254 | return (int) gettext ("") | |
2255 | ; return 0; } | |
2256 | EOF | |
e27da16d | 2257 | if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2258 | rm -rf conftest* |
2259 | gt_cv_func_gettext_libc=yes | |
2260 | else | |
2261 | echo "configure: failed program was:" >&5 | |
2262 | cat conftest.$ac_ext >&5 | |
2263 | rm -rf conftest* | |
2264 | gt_cv_func_gettext_libc=no | |
2265 | fi | |
2266 | rm -f conftest* | |
2267 | fi | |
2268 | ||
2269 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2270 | ||
2271 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2272 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
e27da16d | 2273 | echo "configure:2274: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2274 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2275 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2276 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2277 | else | |
2278 | ac_save_LIBS="$LIBS" | |
2279 | LIBS="-lintl $LIBS" | |
2280 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2281 | #line 2282 "configure" |
c906108c SS |
2282 | #include "confdefs.h" |
2283 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2284 | /* We use char because int might match the return type of a gcc2 | |
2285 | builtin and then its argument prototype would still apply. */ | |
2286 | char bindtextdomain(); | |
2287 | ||
2288 | int main() { | |
2289 | bindtextdomain() | |
2290 | ; return 0; } | |
2291 | EOF | |
e27da16d | 2292 | if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2293 | rm -rf conftest* |
2294 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2295 | else | |
2296 | echo "configure: failed program was:" >&5 | |
2297 | cat conftest.$ac_ext >&5 | |
2298 | rm -rf conftest* | |
2299 | eval "ac_cv_lib_$ac_lib_var=no" | |
2300 | fi | |
2301 | rm -f conftest* | |
2302 | LIBS="$ac_save_LIBS" | |
2303 | ||
2304 | fi | |
2305 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2306 | echo "$ac_t""yes" 1>&6 | |
2307 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
e27da16d | 2308 | echo "configure:2309: checking for gettext in libintl" >&5 |
c906108c SS |
2309 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2311 | else | |
2312 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2313 | #line 2314 "configure" |
c906108c SS |
2314 | #include "confdefs.h" |
2315 | ||
2316 | int main() { | |
2317 | return (int) gettext ("") | |
2318 | ; return 0; } | |
2319 | EOF | |
e27da16d | 2320 | if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2321 | rm -rf conftest* |
2322 | gt_cv_func_gettext_libintl=yes | |
2323 | else | |
2324 | echo "configure: failed program was:" >&5 | |
2325 | cat conftest.$ac_ext >&5 | |
2326 | rm -rf conftest* | |
2327 | gt_cv_func_gettext_libintl=no | |
2328 | fi | |
2329 | rm -f conftest* | |
2330 | fi | |
2331 | ||
2332 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2333 | else | |
2334 | echo "$ac_t""no" 1>&6 | |
2335 | fi | |
2336 | ||
2337 | fi | |
2338 | ||
2339 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2340 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2341 | cat >> confdefs.h <<\EOF | |
2342 | #define HAVE_GETTEXT 1 | |
2343 | EOF | |
2344 | ||
2345 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2346 | set dummy msgfmt; ac_word=$2 | |
2347 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2348 | echo "configure:2349: checking for $ac_word" >&5 |
c906108c SS |
2349 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2350 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2351 | else | |
2352 | case "$MSGFMT" in | |
2353 | /*) | |
2354 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2355 | ;; | |
2356 | *) | |
2357 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2358 | for ac_dir in $PATH; do | |
2359 | test -z "$ac_dir" && ac_dir=. | |
2360 | if test -f $ac_dir/$ac_word; then | |
2361 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2362 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2363 | break | |
2364 | fi | |
2365 | fi | |
2366 | done | |
2367 | IFS="$ac_save_ifs" | |
2368 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2369 | ;; | |
2370 | esac | |
2371 | fi | |
2372 | MSGFMT="$ac_cv_path_MSGFMT" | |
2373 | if test -n "$MSGFMT"; then | |
2374 | echo "$ac_t""$MSGFMT" 1>&6 | |
2375 | else | |
2376 | echo "$ac_t""no" 1>&6 | |
2377 | fi | |
2378 | if test "$MSGFMT" != "no"; then | |
2379 | for ac_func in dcgettext | |
2380 | do | |
2381 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 2382 | echo "configure:2383: checking for $ac_func" >&5 |
c906108c SS |
2383 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2384 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2385 | else | |
2386 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2387 | #line 2388 "configure" |
c906108c SS |
2388 | #include "confdefs.h" |
2389 | /* System header to define __stub macros and hopefully few prototypes, | |
2390 | which can conflict with char $ac_func(); below. */ | |
2391 | #include <assert.h> | |
2392 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2393 | /* We use char because int might match the return type of a gcc2 | |
2394 | builtin and then its argument prototype would still apply. */ | |
2395 | char $ac_func(); | |
2396 | ||
2397 | int main() { | |
2398 | ||
2399 | /* The GNU C library defines this for functions which it implements | |
2400 | to always fail with ENOSYS. Some functions are actually named | |
2401 | something starting with __ and the normal name is an alias. */ | |
2402 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2403 | choke me | |
2404 | #else | |
2405 | $ac_func(); | |
2406 | #endif | |
2407 | ||
2408 | ; return 0; } | |
2409 | EOF | |
e27da16d | 2410 | if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2411 | rm -rf conftest* |
2412 | eval "ac_cv_func_$ac_func=yes" | |
2413 | else | |
2414 | echo "configure: failed program was:" >&5 | |
2415 | cat conftest.$ac_ext >&5 | |
2416 | rm -rf conftest* | |
2417 | eval "ac_cv_func_$ac_func=no" | |
2418 | fi | |
2419 | rm -f conftest* | |
2420 | fi | |
2421 | ||
2422 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2423 | echo "$ac_t""yes" 1>&6 | |
2424 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2425 | cat >> confdefs.h <<EOF | |
2426 | #define $ac_tr_func 1 | |
2427 | EOF | |
2428 | ||
2429 | else | |
2430 | echo "$ac_t""no" 1>&6 | |
2431 | fi | |
2432 | done | |
2433 | ||
2434 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2435 | set dummy gmsgfmt; ac_word=$2 | |
2436 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2437 | echo "configure:2438: checking for $ac_word" >&5 |
c906108c SS |
2438 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2439 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2440 | else | |
2441 | case "$GMSGFMT" in | |
2442 | /*) | |
2443 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2444 | ;; | |
2445 | ?:/*) | |
2446 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2447 | ;; | |
2448 | *) | |
2449 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2450 | ac_dummy="$PATH" | |
2451 | for ac_dir in $ac_dummy; do | |
2452 | test -z "$ac_dir" && ac_dir=. | |
2453 | if test -f $ac_dir/$ac_word; then | |
2454 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2455 | break | |
2456 | fi | |
2457 | done | |
2458 | IFS="$ac_save_ifs" | |
2459 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2460 | ;; | |
2461 | esac | |
2462 | fi | |
2463 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2464 | if test -n "$GMSGFMT"; then | |
2465 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2466 | else | |
2467 | echo "$ac_t""no" 1>&6 | |
2468 | fi | |
2469 | ||
2470 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2471 | set dummy xgettext; ac_word=$2 | |
2472 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2473 | echo "configure:2474: checking for $ac_word" >&5 |
c906108c SS |
2474 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2475 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2476 | else | |
2477 | case "$XGETTEXT" in | |
2478 | /*) | |
2479 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2480 | ;; | |
2481 | *) | |
2482 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2483 | for ac_dir in $PATH; do | |
2484 | test -z "$ac_dir" && ac_dir=. | |
2485 | if test -f $ac_dir/$ac_word; then | |
2486 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2487 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2488 | break | |
2489 | fi | |
2490 | fi | |
2491 | done | |
2492 | IFS="$ac_save_ifs" | |
2493 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2494 | ;; | |
2495 | esac | |
2496 | fi | |
2497 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2498 | if test -n "$XGETTEXT"; then | |
2499 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2500 | else | |
2501 | echo "$ac_t""no" 1>&6 | |
2502 | fi | |
2503 | ||
2504 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2505 | #line 2506 "configure" |
c906108c SS |
2506 | #include "confdefs.h" |
2507 | ||
2508 | int main() { | |
2509 | extern int _nl_msg_cat_cntr; | |
2510 | return _nl_msg_cat_cntr | |
2511 | ; return 0; } | |
2512 | EOF | |
e27da16d | 2513 | if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2514 | rm -rf conftest* |
2515 | CATOBJEXT=.gmo | |
2516 | DATADIRNAME=share | |
2517 | else | |
2518 | echo "configure: failed program was:" >&5 | |
2519 | cat conftest.$ac_ext >&5 | |
2520 | rm -rf conftest* | |
2521 | CATOBJEXT=.mo | |
2522 | DATADIRNAME=lib | |
2523 | fi | |
2524 | rm -f conftest* | |
2525 | INSTOBJEXT=.mo | |
2526 | fi | |
2527 | fi | |
2528 | ||
2529 | else | |
2530 | echo "$ac_t""no" 1>&6 | |
2531 | fi | |
2532 | ||
2533 | ||
2534 | ||
2535 | if test "$CATOBJEXT" = "NONE"; then | |
2536 | nls_cv_use_gnu_gettext=yes | |
2537 | fi | |
2538 | fi | |
2539 | ||
2540 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2541 | INTLOBJS="\$(GETTOBJS)" | |
2542 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2543 | set dummy msgfmt; ac_word=$2 | |
2544 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2545 | echo "configure:2546: checking for $ac_word" >&5 |
c906108c SS |
2546 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2547 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2548 | else | |
2549 | case "$MSGFMT" in | |
2550 | /*) | |
2551 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2552 | ;; | |
2553 | *) | |
2554 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2555 | for ac_dir in $PATH; do | |
2556 | test -z "$ac_dir" && ac_dir=. | |
2557 | if test -f $ac_dir/$ac_word; then | |
2558 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2559 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2560 | break | |
2561 | fi | |
2562 | fi | |
2563 | done | |
2564 | IFS="$ac_save_ifs" | |
2565 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2566 | ;; | |
2567 | esac | |
2568 | fi | |
2569 | MSGFMT="$ac_cv_path_MSGFMT" | |
2570 | if test -n "$MSGFMT"; then | |
2571 | echo "$ac_t""$MSGFMT" 1>&6 | |
2572 | else | |
2573 | echo "$ac_t""no" 1>&6 | |
2574 | fi | |
2575 | ||
2576 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2577 | set dummy gmsgfmt; ac_word=$2 | |
2578 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2579 | echo "configure:2580: checking for $ac_word" >&5 |
c906108c SS |
2580 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2581 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2582 | else | |
2583 | case "$GMSGFMT" in | |
2584 | /*) | |
2585 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2586 | ;; | |
2587 | ?:/*) | |
2588 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2589 | ;; | |
2590 | *) | |
2591 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2592 | ac_dummy="$PATH" | |
2593 | for ac_dir in $ac_dummy; do | |
2594 | test -z "$ac_dir" && ac_dir=. | |
2595 | if test -f $ac_dir/$ac_word; then | |
2596 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2597 | break | |
2598 | fi | |
2599 | done | |
2600 | IFS="$ac_save_ifs" | |
2601 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2602 | ;; | |
2603 | esac | |
2604 | fi | |
2605 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2606 | if test -n "$GMSGFMT"; then | |
2607 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2608 | else | |
2609 | echo "$ac_t""no" 1>&6 | |
2610 | fi | |
2611 | ||
2612 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2613 | set dummy xgettext; ac_word=$2 | |
2614 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2615 | echo "configure:2616: checking for $ac_word" >&5 |
c906108c SS |
2616 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2618 | else | |
2619 | case "$XGETTEXT" in | |
2620 | /*) | |
2621 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2622 | ;; | |
2623 | *) | |
2624 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2625 | for ac_dir in $PATH; do | |
2626 | test -z "$ac_dir" && ac_dir=. | |
2627 | if test -f $ac_dir/$ac_word; then | |
2628 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2629 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2630 | break | |
2631 | fi | |
2632 | fi | |
2633 | done | |
2634 | IFS="$ac_save_ifs" | |
2635 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2636 | ;; | |
2637 | esac | |
2638 | fi | |
2639 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2640 | if test -n "$XGETTEXT"; then | |
2641 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2642 | else | |
2643 | echo "$ac_t""no" 1>&6 | |
2644 | fi | |
2645 | ||
2646 | ||
2647 | USE_INCLUDED_LIBINTL=yes | |
2648 | CATOBJEXT=.gmo | |
2649 | INSTOBJEXT=.mo | |
2650 | DATADIRNAME=share | |
2651 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2652 | INTLLIBS=$INTLDEPS | |
2653 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2654 | nls_cv_header_intl=libintl.h | |
2655 | nls_cv_header_libgt=libgettext.h | |
2656 | fi | |
2657 | ||
2658 | if test "$XGETTEXT" != ":"; then | |
2659 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2660 | : ; | |
2661 | else | |
2662 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2663 | XGETTEXT=":" | |
2664 | fi | |
2665 | fi | |
2666 | ||
2667 | # We need to process the po/ directory. | |
2668 | POSUB=po | |
2669 | else | |
2670 | DATADIRNAME=share | |
2671 | nls_cv_header_intl=libintl.h | |
2672 | nls_cv_header_libgt=libgettext.h | |
2673 | fi | |
2674 | ||
2675 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2676 | # because some of the sources are only built for this goal. | |
2677 | if test "$PACKAGE" = gettext; then | |
2678 | USE_NLS=yes | |
2679 | USE_INCLUDED_LIBINTL=yes | |
2680 | fi | |
2681 | ||
2682 | for lang in $ALL_LINGUAS; do | |
2683 | GMOFILES="$GMOFILES $lang.gmo" | |
2684 | POFILES="$POFILES $lang.po" | |
2685 | done | |
2686 | ||
2687 | ||
2688 | ||
2689 | ||
2690 | ||
2691 | ||
2692 | ||
2693 | ||
2694 | ||
2695 | ||
2696 | ||
2697 | ||
2698 | ||
2699 | ||
2700 | if test "x$CATOBJEXT" != "x"; then | |
2701 | if test "x$ALL_LINGUAS" = "x"; then | |
2702 | LINGUAS= | |
2703 | else | |
2704 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
e27da16d | 2705 | echo "configure:2706: checking for catalogs to be installed" >&5 |
c906108c SS |
2706 | NEW_LINGUAS= |
2707 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2708 | case "$ALL_LINGUAS" in | |
2709 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2710 | esac | |
2711 | done | |
2712 | LINGUAS=$NEW_LINGUAS | |
2713 | echo "$ac_t""$LINGUAS" 1>&6 | |
2714 | fi | |
2715 | ||
2716 | if test -n "$LINGUAS"; then | |
2717 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2718 | fi | |
2719 | fi | |
2720 | ||
2721 | if test $ac_cv_header_locale_h = yes; then | |
2722 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2723 | else | |
2724 | INCLUDE_LOCALE_H="\ | |
2725 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2726 | fi | |
2727 | ||
2728 | ||
2729 | if test -f $srcdir/po2tbl.sed.in; then | |
2730 | if test "$CATOBJEXT" = ".cat"; then | |
2731 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2732 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
e27da16d | 2733 | echo "configure:2734: checking for linux/version.h" >&5 |
c906108c SS |
2734 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2735 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2736 | else | |
2737 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 2738 | #line 2739 "configure" |
c906108c SS |
2739 | #include "confdefs.h" |
2740 | #include <linux/version.h> | |
2741 | EOF | |
2742 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 2743 | { (eval echo configure:2744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2744 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2745 | if test -z "$ac_err"; then | |
2746 | rm -rf conftest* | |
2747 | eval "ac_cv_header_$ac_safe=yes" | |
2748 | else | |
2749 | echo "$ac_err" >&5 | |
2750 | echo "configure: failed program was:" >&5 | |
2751 | cat conftest.$ac_ext >&5 | |
2752 | rm -rf conftest* | |
2753 | eval "ac_cv_header_$ac_safe=no" | |
2754 | fi | |
2755 | rm -f conftest* | |
2756 | fi | |
2757 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2758 | echo "$ac_t""yes" 1>&6 | |
2759 | msgformat=linux | |
2760 | else | |
2761 | echo "$ac_t""no" 1>&6 | |
2762 | msgformat=xopen | |
2763 | fi | |
2764 | ||
2765 | ||
2766 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2767 | fi | |
2768 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2769 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2770 | fi | |
2771 | ||
2772 | if test "$PACKAGE" = "gettext"; then | |
2773 | GT_NO="#NO#" | |
2774 | GT_YES= | |
2775 | else | |
2776 | GT_NO= | |
2777 | GT_YES="#YES#" | |
2778 | fi | |
2779 | ||
2780 | ||
2781 | ||
2782 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2783 | ||
2784 | ||
2785 | l= | |
2786 | ||
2787 | ||
4536bbc6 | 2788 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2789 | test -d po || mkdir po |
2790 | if test "x$srcdir" != "x."; then | |
2791 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2792 | posrcprefix="$srcdir/" | |
2793 | else | |
2794 | posrcprefix="../$srcdir/" | |
2795 | fi | |
2796 | else | |
2797 | posrcprefix="../" | |
2798 | fi | |
2799 | rm -f po/POTFILES | |
2800 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2801 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2802 | fi | |
2803 | ||
2804 | ||
2805 | ||
2806 | CONFIG_OBS= | |
66b965bb | 2807 | CONFIG_LIB_OBS= |
c906108c SS |
2808 | CONFIG_DEPS= |
2809 | CONFIG_SRCS= | |
fb40c209 AC |
2810 | CONFIG_INITS= |
2811 | ENABLE_CFLAGS= | |
b3a90332 AC |
2812 | CONFIG_ALL= |
2813 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2814 | CONFIG_INSTALL= |
2815 | CONFIG_UNINSTALL= | |
c906108c SS |
2816 | |
2817 | configdirs="doc testsuite" | |
2818 | ||
96baa820 JM |
2819 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2820 | if test "${enable_multi_ice+set}" = set; then | |
2821 | enableval="$enable_multi_ice" | |
2822 | case "${enableval}" in | |
2823 | yes ) enable_multi_ice="yes" ;; | |
2824 | no) enable_multi_ice="no" ;; | |
2825 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2826 | esac | |
2827 | ||
2828 | fi | |
2829 | ||
2830 | ||
2831 | if test "${enable_multi_ice}" = "yes"; then | |
2832 | configdirs="${configdirs} multi-ice" | |
2833 | fi | |
2834 | ||
c906108c SS |
2835 | |
2836 | . ${srcdir}/configure.host | |
2837 | ||
2838 | . ${srcdir}/configure.tgt | |
2839 | ||
1ba607ad AC |
2840 | targ=${target} ; . ${srcdir}/../bfd/config.bfd |
2841 | ||
2842 | ||
2843 | targ=${target} | |
2844 | . ${srcdir}/../bfd/config.bfd | |
5c8cc331 AC |
2845 | |
2846 | targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'` | |
2847 | ||
1ba607ad AC |
2848 | if test x"${targ_archs}" != x ; then |
2849 | cat >> confdefs.h <<EOF | |
2850 | #define DEFAULT_BFD_ARCH ${targ_archs} | |
2851 | EOF | |
2852 | ||
2853 | fi | |
2854 | if test x"${targ_defvec}" != x ; then | |
2855 | cat >> confdefs.h <<EOF | |
2856 | #define DEFAULT_BFD_VEC ${targ_defvec} | |
2857 | EOF | |
2858 | ||
2859 | fi | |
c906108c | 2860 | |
56157b4a | 2861 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2862 | do |
2863 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2864 | set dummy $ac_prog; ac_word=$2 | |
2865 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2866 | echo "configure:2867: checking for $ac_word" >&5 |
7a292a7a SS |
2867 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2868 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2869 | else | |
2870 | if test -n "$AWK"; then | |
2871 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2872 | else | |
2873 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2874 | ac_dummy="$PATH" | |
2875 | for ac_dir in $ac_dummy; do | |
2876 | test -z "$ac_dir" && ac_dir=. | |
2877 | if test -f $ac_dir/$ac_word; then | |
2878 | ac_cv_prog_AWK="$ac_prog" | |
2879 | break | |
2880 | fi | |
2881 | done | |
2882 | IFS="$ac_save_ifs" | |
2883 | fi | |
2884 | fi | |
2885 | AWK="$ac_cv_prog_AWK" | |
2886 | if test -n "$AWK"; then | |
2887 | echo "$ac_t""$AWK" 1>&6 | |
2888 | else | |
2889 | echo "$ac_t""no" 1>&6 | |
2890 | fi | |
2891 | ||
2892 | test -n "$AWK" && break | |
2893 | done | |
2894 | ||
c906108c SS |
2895 | # Find a good install program. We prefer a C program (faster), |
2896 | # so one script is as good as another. But avoid the broken or | |
2897 | # incompatible versions: | |
2898 | # SysV /etc/install, /usr/sbin/install | |
2899 | # SunOS /usr/etc/install | |
2900 | # IRIX /sbin/install | |
2901 | # AIX /bin/install | |
2902 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2903 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2904 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2905 | # ./install, which can be erroneously created by make from ./install.sh. | |
2906 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
e27da16d | 2907 | echo "configure:2908: checking for a BSD compatible install" >&5 |
c906108c SS |
2908 | if test -z "$INSTALL"; then |
2909 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2910 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2911 | else | |
2912 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2913 | for ac_dir in $PATH; do | |
2914 | # Account for people who put trailing slashes in PATH elements. | |
2915 | case "$ac_dir/" in | |
2916 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2917 | *) | |
2918 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2919 | # Don't use installbsd from OSF since it installs stuff as root | |
2920 | # by default. | |
2921 | for ac_prog in ginstall scoinst install; do | |
2922 | if test -f $ac_dir/$ac_prog; then | |
2923 | if test $ac_prog = install && | |
2924 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2925 | # AIX install. It has an incompatible calling convention. | |
2926 | : | |
2927 | else | |
2928 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2929 | break 2 | |
2930 | fi | |
2931 | fi | |
2932 | done | |
2933 | ;; | |
2934 | esac | |
2935 | done | |
2936 | IFS="$ac_save_IFS" | |
2937 | ||
2938 | fi | |
2939 | if test "${ac_cv_path_install+set}" = set; then | |
2940 | INSTALL="$ac_cv_path_install" | |
2941 | else | |
2942 | # As a last resort, use the slow shell script. We don't cache a | |
2943 | # path for INSTALL within a source directory, because that will | |
2944 | # break other packages using the cache if that directory is | |
2945 | # removed, or if the path is relative. | |
2946 | INSTALL="$ac_install_sh" | |
2947 | fi | |
2948 | fi | |
2949 | echo "$ac_t""$INSTALL" 1>&6 | |
2950 | ||
2951 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2952 | # It thinks the first close brace ends the variable substitution. | |
2953 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2954 | ||
2955 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2956 | ||
2957 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2958 | ||
2959 | if test $host != $build; then | |
2960 | ac_tool_prefix=${host_alias}- | |
2961 | else | |
2962 | ac_tool_prefix= | |
2963 | fi | |
2964 | ||
2965 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2966 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2967 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 2968 | echo "configure:2969: checking for $ac_word" >&5 |
c906108c SS |
2969 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2970 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2971 | else | |
2972 | if test -n "$AR"; then | |
2973 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2974 | else | |
2975 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2976 | ac_dummy="$PATH" | |
2977 | for ac_dir in $ac_dummy; do | |
2978 | test -z "$ac_dir" && ac_dir=. | |
2979 | if test -f $ac_dir/$ac_word; then | |
2980 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2981 | break | |
2982 | fi | |
2983 | done | |
2984 | IFS="$ac_save_ifs" | |
2985 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2986 | fi | |
2987 | fi | |
2988 | AR="$ac_cv_prog_AR" | |
2989 | if test -n "$AR"; then | |
2990 | echo "$ac_t""$AR" 1>&6 | |
2991 | else | |
2992 | echo "$ac_t""no" 1>&6 | |
2993 | fi | |
2994 | ||
2995 | ||
2996 | ||
2997 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2998 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2999 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 3000 | echo "configure:3001: checking for $ac_word" >&5 |
c906108c SS |
3001 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3002 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3003 | else | |
3004 | if test -n "$RANLIB"; then | |
3005 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3006 | else | |
3007 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3008 | ac_dummy="$PATH" | |
3009 | for ac_dir in $ac_dummy; do | |
3010 | test -z "$ac_dir" && ac_dir=. | |
3011 | if test -f $ac_dir/$ac_word; then | |
3012 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3013 | break | |
3014 | fi | |
3015 | done | |
3016 | IFS="$ac_save_ifs" | |
3017 | fi | |
3018 | fi | |
3019 | RANLIB="$ac_cv_prog_RANLIB" | |
3020 | if test -n "$RANLIB"; then | |
3021 | echo "$ac_t""$RANLIB" 1>&6 | |
3022 | else | |
3023 | echo "$ac_t""no" 1>&6 | |
3024 | fi | |
3025 | ||
3026 | ||
3027 | if test -z "$ac_cv_prog_RANLIB"; then | |
3028 | if test -n "$ac_tool_prefix"; then | |
3029 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3030 | set dummy ranlib; ac_word=$2 | |
3031 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 3032 | echo "configure:3033: checking for $ac_word" >&5 |
c906108c SS |
3033 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3034 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3035 | else | |
3036 | if test -n "$RANLIB"; then | |
3037 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3038 | else | |
3039 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3040 | ac_dummy="$PATH" | |
3041 | for ac_dir in $ac_dummy; do | |
3042 | test -z "$ac_dir" && ac_dir=. | |
3043 | if test -f $ac_dir/$ac_word; then | |
3044 | ac_cv_prog_RANLIB="ranlib" | |
3045 | break | |
3046 | fi | |
3047 | done | |
3048 | IFS="$ac_save_ifs" | |
3049 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3050 | fi | |
3051 | fi | |
3052 | RANLIB="$ac_cv_prog_RANLIB" | |
3053 | if test -n "$RANLIB"; then | |
3054 | echo "$ac_t""$RANLIB" 1>&6 | |
3055 | else | |
3056 | echo "$ac_t""no" 1>&6 | |
3057 | fi | |
3058 | ||
3059 | else | |
3060 | RANLIB=":" | |
3061 | fi | |
3062 | fi | |
3063 | ||
95ca63c4 CF |
3064 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3065 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3066 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 3067 | echo "configure:3068: checking for $ac_word" >&5 |
95ca63c4 CF |
3068 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3069 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3070 | else | |
3071 | if test -n "$DLLTOOL"; then | |
3072 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3073 | else | |
3074 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3075 | ac_dummy="$PATH" | |
3076 | for ac_dir in $ac_dummy; do | |
3077 | test -z "$ac_dir" && ac_dir=. | |
3078 | if test -f $ac_dir/$ac_word; then | |
3079 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3080 | break | |
3081 | fi | |
3082 | done | |
3083 | IFS="$ac_save_ifs" | |
3084 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3085 | fi | |
3086 | fi | |
3087 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3088 | if test -n "$DLLTOOL"; then | |
3089 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3090 | else | |
3091 | echo "$ac_t""no" 1>&6 | |
3092 | fi | |
3093 | ||
3094 | ||
3095 | ||
3096 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3097 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3098 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 3099 | echo "configure:3100: checking for $ac_word" >&5 |
95ca63c4 CF |
3100 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3101 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3102 | else | |
3103 | if test -n "$WINDRES"; then | |
3104 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3105 | else | |
3106 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3107 | ac_dummy="$PATH" | |
3108 | for ac_dir in $ac_dummy; do | |
3109 | test -z "$ac_dir" && ac_dir=. | |
3110 | if test -f $ac_dir/$ac_word; then | |
3111 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3112 | break | |
3113 | fi | |
3114 | done | |
3115 | IFS="$ac_save_ifs" | |
3116 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3117 | fi | |
3118 | fi | |
3119 | WINDRES="$ac_cv_prog_WINDRES" | |
3120 | if test -n "$WINDRES"; then | |
3121 | echo "$ac_t""$WINDRES" 1>&6 | |
3122 | else | |
3123 | echo "$ac_t""no" 1>&6 | |
3124 | fi | |
3125 | ||
3126 | ||
3127 | ||
c906108c SS |
3128 | for ac_prog in 'bison -y' byacc |
3129 | do | |
3130 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3131 | set dummy $ac_prog; ac_word=$2 | |
3132 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 3133 | echo "configure:3134: checking for $ac_word" >&5 |
c906108c SS |
3134 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3135 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3136 | else | |
3137 | if test -n "$YACC"; then | |
3138 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3139 | else | |
3140 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3141 | ac_dummy="$PATH" | |
3142 | for ac_dir in $ac_dummy; do | |
3143 | test -z "$ac_dir" && ac_dir=. | |
3144 | if test -f $ac_dir/$ac_word; then | |
3145 | ac_cv_prog_YACC="$ac_prog" | |
3146 | break | |
3147 | fi | |
3148 | done | |
3149 | IFS="$ac_save_ifs" | |
3150 | fi | |
3151 | fi | |
3152 | YACC="$ac_cv_prog_YACC" | |
3153 | if test -n "$YACC"; then | |
3154 | echo "$ac_t""$YACC" 1>&6 | |
3155 | else | |
3156 | echo "$ac_t""no" 1>&6 | |
3157 | fi | |
3158 | ||
3159 | test -n "$YACC" && break | |
3160 | done | |
3161 | test -n "$YACC" || YACC="yacc" | |
3162 | ||
3163 | ||
75c6e08a MK |
3164 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3165 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3166 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e27da16d | 3167 | echo "configure:3168: checking for $ac_word" >&5 |
75c6e08a MK |
3168 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3170 | else | |
3171 | if test -n "$MIG"; then | |
3172 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3173 | else | |
3174 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3175 | ac_dummy="$PATH" | |
3176 | for ac_dir in $ac_dummy; do | |
3177 | test -z "$ac_dir" && ac_dir=. | |
3178 | if test -f $ac_dir/$ac_word; then | |
3179 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3180 | break | |
3181 | fi | |
3182 | done | |
3183 | IFS="$ac_save_ifs" | |
3184 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3185 | fi | |
3186 | fi | |
3187 | MIG="$ac_cv_prog_MIG" | |
3188 | if test -n "$MIG"; then | |
3189 | echo "$ac_t""$MIG" 1>&6 | |
3190 | else | |
3191 | echo "$ac_t""no" 1>&6 | |
3192 | fi | |
3193 | ||
3194 | ||
3195 | ||
3196 | ||
c906108c SS |
3197 | if test "$program_transform_name" = s,x,x,; then |
3198 | program_transform_name= | |
3199 | else | |
3200 | # Double any \ or $. echo might interpret backslashes. | |
3201 | cat <<\EOF_SED > conftestsed | |
3202 | s,\\,\\\\,g; s,\$,$$,g | |
3203 | EOF_SED | |
3204 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3205 | rm -f conftestsed | |
3206 | fi | |
3207 | test "$program_prefix" != NONE && | |
3208 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3209 | # Use a double $ so make ignores it. | |
3210 | test "$program_suffix" != NONE && | |
3211 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3212 | ||
3213 | # sed with no file args requires a program. | |
3214 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3215 | ||
3216 | ||
3217 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
e27da16d | 3218 | echo "configure:3219: checking return type of signal handlers" >&5 |
c906108c SS |
3219 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3220 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3221 | else | |
3222 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3223 | #line 3224 "configure" |
c906108c SS |
3224 | #include "confdefs.h" |
3225 | #include <sys/types.h> | |
3226 | #include <signal.h> | |
3227 | #ifdef signal | |
3228 | #undef signal | |
3229 | #endif | |
3230 | #ifdef __cplusplus | |
3231 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3232 | #else | |
3233 | void (*signal ()) (); | |
3234 | #endif | |
3235 | ||
3236 | int main() { | |
3237 | int i; | |
3238 | ; return 0; } | |
3239 | EOF | |
e27da16d | 3240 | if { (eval echo configure:3241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3241 | rm -rf conftest* |
3242 | ac_cv_type_signal=void | |
3243 | else | |
3244 | echo "configure: failed program was:" >&5 | |
3245 | cat conftest.$ac_ext >&5 | |
3246 | rm -rf conftest* | |
3247 | ac_cv_type_signal=int | |
3248 | fi | |
3249 | rm -f conftest* | |
3250 | fi | |
3251 | ||
3252 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3253 | cat >> confdefs.h <<EOF | |
3254 | #define RETSIGTYPE $ac_cv_type_signal | |
3255 | EOF | |
3256 | ||
3257 | ||
3258 | ||
3259 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
e27da16d | 3260 | echo "configure:3261: checking for ANSI C header files" >&5 |
c906108c SS |
3261 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3262 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3263 | else | |
3264 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3265 | #line 3266 "configure" |
c906108c SS |
3266 | #include "confdefs.h" |
3267 | #include <stdlib.h> | |
3268 | #include <stdarg.h> | |
3269 | #include <string.h> | |
3270 | #include <float.h> | |
3271 | EOF | |
3272 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 3273 | { (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3274 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3275 | if test -z "$ac_err"; then | |
3276 | rm -rf conftest* | |
3277 | ac_cv_header_stdc=yes | |
3278 | else | |
3279 | echo "$ac_err" >&5 | |
3280 | echo "configure: failed program was:" >&5 | |
3281 | cat conftest.$ac_ext >&5 | |
3282 | rm -rf conftest* | |
3283 | ac_cv_header_stdc=no | |
3284 | fi | |
3285 | rm -f conftest* | |
3286 | ||
3287 | if test $ac_cv_header_stdc = yes; then | |
3288 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3289 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3290 | #line 3291 "configure" |
c906108c SS |
3291 | #include "confdefs.h" |
3292 | #include <string.h> | |
3293 | EOF | |
3294 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3295 | egrep "memchr" >/dev/null 2>&1; then | |
3296 | : | |
3297 | else | |
3298 | rm -rf conftest* | |
3299 | ac_cv_header_stdc=no | |
3300 | fi | |
3301 | rm -f conftest* | |
3302 | ||
3303 | fi | |
3304 | ||
3305 | if test $ac_cv_header_stdc = yes; then | |
3306 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3307 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3308 | #line 3309 "configure" |
c906108c SS |
3309 | #include "confdefs.h" |
3310 | #include <stdlib.h> | |
3311 | EOF | |
3312 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3313 | egrep "free" >/dev/null 2>&1; then | |
3314 | : | |
3315 | else | |
3316 | rm -rf conftest* | |
3317 | ac_cv_header_stdc=no | |
3318 | fi | |
3319 | rm -f conftest* | |
3320 | ||
3321 | fi | |
3322 | ||
3323 | if test $ac_cv_header_stdc = yes; then | |
3324 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3325 | if test "$cross_compiling" = yes; then | |
3326 | : | |
3327 | else | |
3328 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3329 | #line 3330 "configure" |
c906108c SS |
3330 | #include "confdefs.h" |
3331 | #include <ctype.h> | |
3332 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3333 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3334 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3335 | int main () { int i; for (i = 0; i < 256; i++) | |
3336 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3337 | exit (0); } | |
3338 | ||
3339 | EOF | |
e27da16d | 3340 | if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3341 | then |
3342 | : | |
3343 | else | |
3344 | echo "configure: failed program was:" >&5 | |
3345 | cat conftest.$ac_ext >&5 | |
3346 | rm -fr conftest* | |
3347 | ac_cv_header_stdc=no | |
3348 | fi | |
3349 | rm -fr conftest* | |
3350 | fi | |
3351 | ||
3352 | fi | |
3353 | fi | |
3354 | ||
3355 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3356 | if test $ac_cv_header_stdc = yes; then | |
3357 | cat >> confdefs.h <<\EOF | |
3358 | #define STDC_HEADERS 1 | |
3359 | EOF | |
3360 | ||
3361 | fi | |
3362 | ||
3363 | ||
6abadcf8 | 3364 | |
3e0bf9f1 | 3365 | case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes) |
6abadcf8 ND |
3366 | cat >> confdefs.h <<\EOF |
3367 | #define _MSE_INT_H 1 | |
3368 | EOF | |
3369 | ||
3370 | esac; esac | |
3371 | ||
9299404e | 3372 | for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \ |
c906108c | 3373 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3374 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3375 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3376 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
596c9d4b | 3377 | time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \ |
0cf3e697 | 3378 | dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \ |
409a3f64 AC |
3379 | curses.h ncurses.h \ |
3380 | poll.h sys/poll.h | |
c906108c SS |
3381 | do |
3382 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3383 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e27da16d | 3384 | echo "configure:3385: checking for $ac_hdr" >&5 |
c906108c SS |
3385 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3386 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3387 | else | |
3388 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3389 | #line 3390 "configure" |
c906108c SS |
3390 | #include "confdefs.h" |
3391 | #include <$ac_hdr> | |
3392 | EOF | |
3393 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 3394 | { (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3395 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3396 | if test -z "$ac_err"; then | |
3397 | rm -rf conftest* | |
3398 | eval "ac_cv_header_$ac_safe=yes" | |
3399 | else | |
3400 | echo "$ac_err" >&5 | |
3401 | echo "configure: failed program was:" >&5 | |
3402 | cat conftest.$ac_ext >&5 | |
3403 | rm -rf conftest* | |
3404 | eval "ac_cv_header_$ac_safe=no" | |
3405 | fi | |
3406 | rm -f conftest* | |
3407 | fi | |
3408 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3409 | echo "$ac_t""yes" 1>&6 | |
3410 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3411 | cat >> confdefs.h <<EOF | |
3412 | #define $ac_tr_hdr 1 | |
3413 | EOF | |
3414 | ||
3415 | else | |
3416 | echo "$ac_t""no" 1>&6 | |
3417 | fi | |
3418 | done | |
3419 | ||
3420 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
e27da16d | 3421 | echo "configure:3422: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3422 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3423 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3424 | else | |
3425 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3426 | #line 3427 "configure" |
c906108c SS |
3427 | #include "confdefs.h" |
3428 | #include <sys/types.h> | |
3429 | #include <sys/stat.h> | |
3430 | ||
3431 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3432 | # if S_ISBLK (S_IFDIR) | |
3433 | You lose. | |
3434 | # endif | |
3435 | #endif | |
3436 | ||
3437 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3438 | # if S_ISBLK (S_IFCHR) | |
3439 | You lose. | |
3440 | # endif | |
3441 | #endif | |
3442 | ||
3443 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3444 | # if S_ISLNK (S_IFREG) | |
3445 | You lose. | |
3446 | # endif | |
3447 | #endif | |
3448 | ||
3449 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3450 | # if S_ISSOCK (S_IFREG) | |
3451 | You lose. | |
3452 | # endif | |
3453 | #endif | |
3454 | ||
3455 | EOF | |
3456 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3457 | egrep "You lose" >/dev/null 2>&1; then | |
3458 | rm -rf conftest* | |
3459 | ac_cv_header_stat_broken=yes | |
3460 | else | |
3461 | rm -rf conftest* | |
3462 | ac_cv_header_stat_broken=no | |
3463 | fi | |
3464 | rm -f conftest* | |
3465 | ||
3466 | fi | |
3467 | ||
3468 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3469 | if test $ac_cv_header_stat_broken = yes; then | |
3470 | cat >> confdefs.h <<\EOF | |
3471 | #define STAT_MACROS_BROKEN 1 | |
3472 | EOF | |
3473 | ||
3474 | fi | |
3475 | ||
3476 | ||
3477 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
e27da16d | 3478 | echo "configure:3479: checking for working const" >&5 |
c906108c SS |
3479 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3481 | else | |
3482 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3483 | #line 3484 "configure" |
c906108c SS |
3484 | #include "confdefs.h" |
3485 | ||
3486 | int main() { | |
3487 | ||
3488 | /* Ultrix mips cc rejects this. */ | |
3489 | typedef int charset[2]; const charset x; | |
3490 | /* SunOS 4.1.1 cc rejects this. */ | |
3491 | char const *const *ccp; | |
3492 | char **p; | |
3493 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3494 | struct point {int x, y;}; | |
3495 | static struct point const zero = {0,0}; | |
3496 | /* AIX XL C 1.02.0.0 rejects this. | |
3497 | It does not let you subtract one const X* pointer from another in an arm | |
3498 | of an if-expression whose if-part is not a constant expression */ | |
3499 | const char *g = "string"; | |
3500 | ccp = &g + (g ? g-g : 0); | |
3501 | /* HPUX 7.0 cc rejects these. */ | |
3502 | ++ccp; | |
3503 | p = (char**) ccp; | |
3504 | ccp = (char const *const *) p; | |
3505 | { /* SCO 3.2v4 cc rejects this. */ | |
3506 | char *t; | |
3507 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3508 | ||
3509 | *t++ = 0; | |
3510 | } | |
3511 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3512 | int x[] = {25, 17}; | |
3513 | const int *foo = &x[0]; | |
3514 | ++foo; | |
3515 | } | |
3516 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3517 | typedef const int *iptr; | |
3518 | iptr p = 0; | |
3519 | ++p; | |
3520 | } | |
3521 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3522 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3523 | struct s { int j; const int *ap[3]; }; | |
3524 | struct s *b; b->j = 5; | |
3525 | } | |
3526 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3527 | const int foo = 10; | |
3528 | } | |
3529 | ||
3530 | ; return 0; } | |
3531 | EOF | |
e27da16d | 3532 | if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3533 | rm -rf conftest* |
3534 | ac_cv_c_const=yes | |
3535 | else | |
3536 | echo "configure: failed program was:" >&5 | |
3537 | cat conftest.$ac_ext >&5 | |
3538 | rm -rf conftest* | |
3539 | ac_cv_c_const=no | |
3540 | fi | |
3541 | rm -f conftest* | |
3542 | fi | |
3543 | ||
3544 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3545 | if test $ac_cv_c_const = no; then | |
3546 | cat >> confdefs.h <<\EOF | |
3547 | #define const | |
3548 | EOF | |
3549 | ||
3550 | fi | |
3551 | ||
bce58c09 | 3552 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
e27da16d | 3553 | echo "configure:3554: checking for inline" >&5 |
bce58c09 JB |
3554 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
3555 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3556 | else | |
3557 | ac_cv_c_inline=no | |
3558 | for ac_kw in inline __inline__ __inline; do | |
3559 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3560 | #line 3561 "configure" |
bce58c09 JB |
3561 | #include "confdefs.h" |
3562 | ||
3563 | int main() { | |
3564 | } $ac_kw foo() { | |
3565 | ; return 0; } | |
3566 | EOF | |
e27da16d | 3567 | if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
3568 | rm -rf conftest* |
3569 | ac_cv_c_inline=$ac_kw; break | |
3570 | else | |
3571 | echo "configure: failed program was:" >&5 | |
3572 | cat conftest.$ac_ext >&5 | |
3573 | fi | |
3574 | rm -f conftest* | |
3575 | done | |
3576 | ||
3577 | fi | |
3578 | ||
3579 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
3580 | case "$ac_cv_c_inline" in | |
3581 | inline | yes) ;; | |
3582 | no) cat >> confdefs.h <<\EOF | |
3583 | #define inline | |
3584 | EOF | |
3585 | ;; | |
3586 | *) cat >> confdefs.h <<EOF | |
3587 | #define inline $ac_cv_c_inline | |
3588 | EOF | |
3589 | ;; | |
3590 | esac | |
3591 | ||
c906108c | 3592 | |
27aac7ff AC |
3593 | for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \ |
3594 | realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask | |
c906108c SS |
3595 | do |
3596 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 3597 | echo "configure:3598: checking for $ac_func" >&5 |
c906108c SS |
3598 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3599 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3600 | else | |
3601 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3602 | #line 3603 "configure" |
c906108c SS |
3603 | #include "confdefs.h" |
3604 | /* System header to define __stub macros and hopefully few prototypes, | |
3605 | which can conflict with char $ac_func(); below. */ | |
3606 | #include <assert.h> | |
3607 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3608 | /* We use char because int might match the return type of a gcc2 | |
3609 | builtin and then its argument prototype would still apply. */ | |
3610 | char $ac_func(); | |
3611 | ||
3612 | int main() { | |
3613 | ||
3614 | /* The GNU C library defines this for functions which it implements | |
3615 | to always fail with ENOSYS. Some functions are actually named | |
3616 | something starting with __ and the normal name is an alias. */ | |
3617 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3618 | choke me | |
3619 | #else | |
3620 | $ac_func(); | |
3621 | #endif | |
3622 | ||
3623 | ; return 0; } | |
3624 | EOF | |
e27da16d | 3625 | if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3626 | rm -rf conftest* |
3627 | eval "ac_cv_func_$ac_func=yes" | |
3628 | else | |
3629 | echo "configure: failed program was:" >&5 | |
3630 | cat conftest.$ac_ext >&5 | |
3631 | rm -rf conftest* | |
3632 | eval "ac_cv_func_$ac_func=no" | |
3633 | fi | |
3634 | rm -f conftest* | |
3635 | fi | |
3636 | ||
3637 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3638 | echo "$ac_t""yes" 1>&6 | |
3639 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3640 | cat >> confdefs.h <<EOF | |
3641 | #define $ac_tr_func 1 | |
3642 | EOF | |
3643 | ||
3644 | else | |
3645 | echo "$ac_t""no" 1>&6 | |
3646 | fi | |
3647 | done | |
3648 | ||
46711df8 MK |
3649 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
3650 | # for constant arguments. Useless! | |
3651 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
e27da16d | 3652 | echo "configure:3653: checking for working alloca.h" >&5 |
46711df8 MK |
3653 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3654 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3655 | else | |
3656 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3657 | #line 3658 "configure" |
46711df8 MK |
3658 | #include "confdefs.h" |
3659 | #include <alloca.h> | |
3660 | int main() { | |
3661 | char *p = alloca(2 * sizeof(int)); | |
3662 | ; return 0; } | |
3663 | EOF | |
e27da16d | 3664 | if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
3665 | rm -rf conftest* |
3666 | ac_cv_header_alloca_h=yes | |
3667 | else | |
3668 | echo "configure: failed program was:" >&5 | |
3669 | cat conftest.$ac_ext >&5 | |
3670 | rm -rf conftest* | |
3671 | ac_cv_header_alloca_h=no | |
3672 | fi | |
3673 | rm -f conftest* | |
3674 | fi | |
3675 | ||
3676 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3677 | if test $ac_cv_header_alloca_h = yes; then | |
3678 | cat >> confdefs.h <<\EOF | |
3679 | #define HAVE_ALLOCA_H 1 | |
3680 | EOF | |
3681 | ||
3682 | fi | |
3683 | ||
3684 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
e27da16d | 3685 | echo "configure:3686: checking for alloca" >&5 |
46711df8 MK |
3686 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3688 | else | |
3689 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3690 | #line 3691 "configure" |
46711df8 MK |
3691 | #include "confdefs.h" |
3692 | ||
3693 | #ifdef __GNUC__ | |
3694 | # define alloca __builtin_alloca | |
3695 | #else | |
3696 | # ifdef _MSC_VER | |
3697 | # include <malloc.h> | |
3698 | # define alloca _alloca | |
3699 | # else | |
3700 | # if HAVE_ALLOCA_H | |
3701 | # include <alloca.h> | |
3702 | # else | |
3703 | # ifdef _AIX | |
3704 | #pragma alloca | |
3705 | # else | |
3706 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3707 | char *alloca (); | |
3708 | # endif | |
3709 | # endif | |
3710 | # endif | |
3711 | # endif | |
3712 | #endif | |
3713 | ||
3714 | int main() { | |
3715 | char *p = (char *) alloca(1); | |
3716 | ; return 0; } | |
3717 | EOF | |
e27da16d | 3718 | if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
3719 | rm -rf conftest* |
3720 | ac_cv_func_alloca_works=yes | |
3721 | else | |
3722 | echo "configure: failed program was:" >&5 | |
3723 | cat conftest.$ac_ext >&5 | |
3724 | rm -rf conftest* | |
3725 | ac_cv_func_alloca_works=no | |
3726 | fi | |
3727 | rm -f conftest* | |
3728 | fi | |
3729 | ||
3730 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3731 | if test $ac_cv_func_alloca_works = yes; then | |
3732 | cat >> confdefs.h <<\EOF | |
3733 | #define HAVE_ALLOCA 1 | |
3734 | EOF | |
3735 | ||
3736 | fi | |
3737 | ||
3738 | if test $ac_cv_func_alloca_works = no; then | |
3739 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3740 | # that cause trouble. Some versions do not even contain alloca or | |
3741 | # contain a buggy version. If you still want to use their alloca, | |
3742 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3743 | ALLOCA=alloca.${ac_objext} | |
3744 | cat >> confdefs.h <<\EOF | |
3745 | #define C_ALLOCA 1 | |
3746 | EOF | |
3747 | ||
3748 | ||
3749 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
e27da16d | 3750 | echo "configure:3751: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
3751 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3752 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3753 | else | |
3754 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3755 | #line 3756 "configure" |
46711df8 MK |
3756 | #include "confdefs.h" |
3757 | #if defined(CRAY) && ! defined(CRAY2) | |
3758 | webecray | |
3759 | #else | |
3760 | wenotbecray | |
3761 | #endif | |
3762 | ||
3763 | EOF | |
3764 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3765 | egrep "webecray" >/dev/null 2>&1; then | |
3766 | rm -rf conftest* | |
3767 | ac_cv_os_cray=yes | |
3768 | else | |
3769 | rm -rf conftest* | |
3770 | ac_cv_os_cray=no | |
3771 | fi | |
3772 | rm -f conftest* | |
3773 | ||
3774 | fi | |
3775 | ||
3776 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3777 | if test $ac_cv_os_cray = yes; then | |
3778 | for ac_func in _getb67 GETB67 getb67; do | |
3779 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 3780 | echo "configure:3781: checking for $ac_func" >&5 |
46711df8 MK |
3781 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3782 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3783 | else | |
3784 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3785 | #line 3786 "configure" |
46711df8 MK |
3786 | #include "confdefs.h" |
3787 | /* System header to define __stub macros and hopefully few prototypes, | |
3788 | which can conflict with char $ac_func(); below. */ | |
3789 | #include <assert.h> | |
3790 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3791 | /* We use char because int might match the return type of a gcc2 | |
3792 | builtin and then its argument prototype would still apply. */ | |
3793 | char $ac_func(); | |
3794 | ||
3795 | int main() { | |
3796 | ||
3797 | /* The GNU C library defines this for functions which it implements | |
3798 | to always fail with ENOSYS. Some functions are actually named | |
3799 | something starting with __ and the normal name is an alias. */ | |
3800 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3801 | choke me | |
3802 | #else | |
3803 | $ac_func(); | |
3804 | #endif | |
3805 | ||
3806 | ; return 0; } | |
3807 | EOF | |
e27da16d | 3808 | if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
3809 | rm -rf conftest* |
3810 | eval "ac_cv_func_$ac_func=yes" | |
3811 | else | |
3812 | echo "configure: failed program was:" >&5 | |
3813 | cat conftest.$ac_ext >&5 | |
3814 | rm -rf conftest* | |
3815 | eval "ac_cv_func_$ac_func=no" | |
3816 | fi | |
3817 | rm -f conftest* | |
3818 | fi | |
3819 | ||
3820 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3821 | echo "$ac_t""yes" 1>&6 | |
3822 | cat >> confdefs.h <<EOF | |
3823 | #define CRAY_STACKSEG_END $ac_func | |
3824 | EOF | |
3825 | ||
3826 | break | |
3827 | else | |
3828 | echo "$ac_t""no" 1>&6 | |
3829 | fi | |
3830 | ||
3831 | done | |
3832 | fi | |
3833 | ||
3834 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
e27da16d | 3835 | echo "configure:3836: checking stack direction for C alloca" >&5 |
46711df8 MK |
3836 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3838 | else | |
3839 | if test "$cross_compiling" = yes; then | |
3840 | ac_cv_c_stack_direction=0 | |
3841 | else | |
3842 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3843 | #line 3844 "configure" |
46711df8 MK |
3844 | #include "confdefs.h" |
3845 | find_stack_direction () | |
3846 | { | |
3847 | static char *addr = 0; | |
3848 | auto char dummy; | |
3849 | if (addr == 0) | |
3850 | { | |
3851 | addr = &dummy; | |
3852 | return find_stack_direction (); | |
3853 | } | |
3854 | else | |
3855 | return (&dummy > addr) ? 1 : -1; | |
3856 | } | |
3857 | main () | |
3858 | { | |
3859 | exit (find_stack_direction() < 0); | |
3860 | } | |
3861 | EOF | |
e27da16d | 3862 | if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
3863 | then |
3864 | ac_cv_c_stack_direction=1 | |
3865 | else | |
3866 | echo "configure: failed program was:" >&5 | |
3867 | cat conftest.$ac_ext >&5 | |
3868 | rm -fr conftest* | |
3869 | ac_cv_c_stack_direction=-1 | |
3870 | fi | |
3871 | rm -fr conftest* | |
3872 | fi | |
3873 | ||
3874 | fi | |
3875 | ||
3876 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3877 | cat >> confdefs.h <<EOF | |
3878 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3879 | EOF | |
3880 | ||
3881 | fi | |
3882 | ||
74c1b268 | 3883 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
e27da16d | 3884 | echo "configure:3885: checking for pid_t" >&5 |
74c1b268 AC |
3885 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
3886 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3887 | else | |
3888 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3889 | #line 3890 "configure" |
74c1b268 AC |
3890 | #include "confdefs.h" |
3891 | #include <sys/types.h> | |
3892 | #if STDC_HEADERS | |
3893 | #include <stdlib.h> | |
3894 | #include <stddef.h> | |
3895 | #endif | |
3896 | EOF | |
3897 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3898 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3899 | rm -rf conftest* | |
3900 | ac_cv_type_pid_t=yes | |
3901 | else | |
3902 | rm -rf conftest* | |
3903 | ac_cv_type_pid_t=no | |
3904 | fi | |
3905 | rm -f conftest* | |
3906 | ||
3907 | fi | |
3908 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
3909 | if test $ac_cv_type_pid_t = no; then | |
3910 | cat >> confdefs.h <<\EOF | |
3911 | #define pid_t int | |
3912 | EOF | |
3913 | ||
3914 | fi | |
3915 | ||
3916 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
3917 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
e27da16d | 3918 | echo "configure:3919: checking for vfork.h" >&5 |
74c1b268 AC |
3919 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3921 | else | |
3922 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3923 | #line 3924 "configure" |
74c1b268 AC |
3924 | #include "confdefs.h" |
3925 | #include <vfork.h> | |
3926 | EOF | |
3927 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 3928 | { (eval echo configure:3929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
3929 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3930 | if test -z "$ac_err"; then | |
3931 | rm -rf conftest* | |
3932 | eval "ac_cv_header_$ac_safe=yes" | |
3933 | else | |
3934 | echo "$ac_err" >&5 | |
3935 | echo "configure: failed program was:" >&5 | |
3936 | cat conftest.$ac_ext >&5 | |
3937 | rm -rf conftest* | |
3938 | eval "ac_cv_header_$ac_safe=no" | |
3939 | fi | |
3940 | rm -f conftest* | |
3941 | fi | |
3942 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3943 | echo "$ac_t""yes" 1>&6 | |
3944 | cat >> confdefs.h <<\EOF | |
3945 | #define HAVE_VFORK_H 1 | |
3946 | EOF | |
3947 | ||
3948 | else | |
3949 | echo "$ac_t""no" 1>&6 | |
3950 | fi | |
3951 | ||
3952 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
e27da16d | 3953 | echo "configure:3954: checking for working vfork" >&5 |
74c1b268 AC |
3954 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
3955 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3956 | else | |
3957 | if test "$cross_compiling" = yes; then | |
3958 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
e27da16d | 3959 | echo "configure:3960: checking for vfork" >&5 |
74c1b268 AC |
3960 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
3961 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3962 | else | |
3963 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 3964 | #line 3965 "configure" |
74c1b268 AC |
3965 | #include "confdefs.h" |
3966 | /* System header to define __stub macros and hopefully few prototypes, | |
3967 | which can conflict with char vfork(); below. */ | |
3968 | #include <assert.h> | |
3969 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3970 | /* We use char because int might match the return type of a gcc2 | |
3971 | builtin and then its argument prototype would still apply. */ | |
3972 | char vfork(); | |
3973 | ||
3974 | int main() { | |
3975 | ||
3976 | /* The GNU C library defines this for functions which it implements | |
3977 | to always fail with ENOSYS. Some functions are actually named | |
3978 | something starting with __ and the normal name is an alias. */ | |
3979 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
3980 | choke me | |
3981 | #else | |
3982 | vfork(); | |
3983 | #endif | |
3984 | ||
3985 | ; return 0; } | |
3986 | EOF | |
e27da16d | 3987 | if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 AC |
3988 | rm -rf conftest* |
3989 | eval "ac_cv_func_vfork=yes" | |
3990 | else | |
3991 | echo "configure: failed program was:" >&5 | |
3992 | cat conftest.$ac_ext >&5 | |
3993 | rm -rf conftest* | |
3994 | eval "ac_cv_func_vfork=no" | |
3995 | fi | |
3996 | rm -f conftest* | |
3997 | fi | |
3998 | ||
3999 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
4000 | echo "$ac_t""yes" 1>&6 | |
4001 | : | |
4002 | else | |
4003 | echo "$ac_t""no" 1>&6 | |
4004 | fi | |
4005 | ||
4006 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
4007 | else | |
4008 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4009 | #line 4010 "configure" |
74c1b268 AC |
4010 | #include "confdefs.h" |
4011 | /* Thanks to Paul Eggert for this test. */ | |
4012 | #include <stdio.h> | |
4013 | #include <sys/types.h> | |
4014 | #include <sys/stat.h> | |
4015 | #ifdef HAVE_UNISTD_H | |
4016 | #include <unistd.h> | |
4017 | #endif | |
4018 | #ifdef HAVE_VFORK_H | |
4019 | #include <vfork.h> | |
4020 | #endif | |
4021 | /* On some sparc systems, changes by the child to local and incoming | |
4022 | argument registers are propagated back to the parent. | |
4023 | The compiler is told about this with #include <vfork.h>, | |
4024 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4025 | Test for this by using a static variable whose address | |
4026 | is put into a register that is clobbered by the vfork. */ | |
4027 | static | |
4028 | #ifdef __cplusplus | |
4029 | sparc_address_test (int arg) | |
4030 | #else | |
4031 | sparc_address_test (arg) int arg; | |
4032 | #endif | |
4033 | { | |
4034 | static pid_t child; | |
4035 | if (!child) { | |
4036 | child = vfork (); | |
4037 | if (child < 0) { | |
4038 | perror ("vfork"); | |
4039 | _exit(2); | |
4040 | } | |
4041 | if (!child) { | |
4042 | arg = getpid(); | |
4043 | write(-1, "", 0); | |
4044 | _exit (arg); | |
4045 | } | |
4046 | } | |
4047 | } | |
4048 | main() { | |
4049 | pid_t parent = getpid (); | |
4050 | pid_t child; | |
4051 | ||
4052 | sparc_address_test (); | |
4053 | ||
4054 | child = vfork (); | |
4055 | ||
4056 | if (child == 0) { | |
4057 | /* Here is another test for sparc vfork register problems. | |
4058 | This test uses lots of local variables, at least | |
4059 | as many local variables as main has allocated so far | |
4060 | including compiler temporaries. 4 locals are enough for | |
4061 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4062 | A buggy compiler should reuse the register of parent | |
4063 | for one of the local variables, since it will think that | |
4064 | parent can't possibly be used any more in this routine. | |
4065 | Assigning to the local variable will thus munge parent | |
4066 | in the parent process. */ | |
4067 | pid_t | |
4068 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4069 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4070 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4071 | use the same hardware register for all 8 local variables. */ | |
4072 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4073 | || p != p5 || p != p6 || p != p7) | |
4074 | _exit(1); | |
4075 | ||
4076 | /* On some systems (e.g. IRIX 3.3), | |
4077 | vfork doesn't separate parent from child file descriptors. | |
4078 | If the child closes a descriptor before it execs or exits, | |
4079 | this munges the parent's descriptor as well. | |
4080 | Test for this by closing stdout in the child. */ | |
4081 | _exit(close(fileno(stdout)) != 0); | |
4082 | } else { | |
4083 | int status; | |
4084 | struct stat st; | |
4085 | ||
4086 | while (wait(&status) != child) | |
4087 | ; | |
4088 | exit( | |
4089 | /* Was there some problem with vforking? */ | |
4090 | child < 0 | |
4091 | ||
4092 | /* Did the child fail? (This shouldn't happen.) */ | |
4093 | || status | |
4094 | ||
4095 | /* Did the vfork/compiler bug occur? */ | |
4096 | || parent != getpid() | |
4097 | ||
4098 | /* Did the file descriptor bug occur? */ | |
4099 | || fstat(fileno(stdout), &st) != 0 | |
4100 | ); | |
4101 | } | |
4102 | } | |
4103 | EOF | |
e27da16d | 4104 | if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 AC |
4105 | then |
4106 | ac_cv_func_vfork_works=yes | |
4107 | else | |
4108 | echo "configure: failed program was:" >&5 | |
4109 | cat conftest.$ac_ext >&5 | |
4110 | rm -fr conftest* | |
4111 | ac_cv_func_vfork_works=no | |
4112 | fi | |
4113 | rm -fr conftest* | |
4114 | fi | |
4115 | ||
4116 | fi | |
4117 | ||
4118 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
4119 | if test $ac_cv_func_vfork_works = no; then | |
4120 | cat >> confdefs.h <<\EOF | |
4121 | #define vfork fork | |
4122 | EOF | |
4123 | ||
4124 | fi | |
4125 | ||
72473524 DJ |
4126 | if test "$cross_compiling" = no; then |
4127 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
e27da16d | 4128 | echo "configure:4129: checking whether setpgrp takes no argument" >&5 |
0200359f MK |
4129 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
4130 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4131 | else | |
4132 | if test "$cross_compiling" = yes; then | |
4133 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
4134 | else | |
4135 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4136 | #line 4137 "configure" |
0200359f MK |
4137 | #include "confdefs.h" |
4138 | ||
4139 | #ifdef HAVE_UNISTD_H | |
4140 | #include <unistd.h> | |
4141 | #endif | |
4142 | ||
4143 | /* | |
4144 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
4145 | * successfully. | |
4146 | */ | |
4147 | main() | |
4148 | { | |
4149 | if (setpgrp(1,1) == -1) | |
4150 | exit(0); | |
4151 | else | |
4152 | exit(1); | |
4153 | } | |
4154 | ||
4155 | EOF | |
e27da16d | 4156 | if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0200359f MK |
4157 | then |
4158 | ac_cv_func_setpgrp_void=no | |
4159 | else | |
4160 | echo "configure: failed program was:" >&5 | |
4161 | cat conftest.$ac_ext >&5 | |
4162 | rm -fr conftest* | |
4163 | ac_cv_func_setpgrp_void=yes | |
4164 | fi | |
4165 | rm -fr conftest* | |
4166 | fi | |
4167 | ||
4168 | ||
4169 | fi | |
4170 | ||
4171 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
4172 | if test $ac_cv_func_setpgrp_void = yes; then | |
4173 | cat >> confdefs.h <<\EOF | |
4174 | #define SETPGRP_VOID 1 | |
4175 | EOF | |
4176 | ||
4177 | fi | |
4178 | ||
72473524 DJ |
4179 | else |
4180 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
e27da16d | 4181 | echo "configure:4182: checking whether setpgrp takes no argument" >&5 |
72473524 DJ |
4182 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
4183 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4184 | else | |
4185 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4186 | #line 4187 "configure" |
72473524 DJ |
4187 | #include "confdefs.h" |
4188 | ||
4189 | #include <unistd.h> | |
4190 | ||
4191 | int main() { | |
4192 | ||
4193 | if (setpgrp(1,1) == -1) | |
4194 | exit (0); | |
4195 | else | |
4196 | exit (1); | |
4197 | ||
4198 | ; return 0; } | |
4199 | EOF | |
e27da16d | 4200 | if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
72473524 DJ |
4201 | rm -rf conftest* |
4202 | ac_cv_func_setpgrp_void=no | |
4203 | else | |
4204 | echo "configure: failed program was:" >&5 | |
4205 | cat conftest.$ac_ext >&5 | |
4206 | rm -rf conftest* | |
4207 | ac_cv_func_setpgrp_void=yes | |
4208 | fi | |
4209 | rm -f conftest* | |
4210 | fi | |
4211 | ||
4212 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
4213 | if test $ac_cv_func_setpgrp_void = yes; then | |
4214 | cat >> confdefs.h <<\EOF | |
4215 | #define SETPGRP_VOID 1 | |
4216 | EOF | |
4217 | ||
4218 | fi | |
4219 | fi | |
c906108c | 4220 | |
2b2d558c MK |
4221 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
4222 | # since sigsetjmp might only be defined as a macro. | |
4223 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
e27da16d | 4224 | echo "configure:4225: checking for sigsetjmp" >&5 |
2b2d558c MK |
4225 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
4226 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4227 | else | |
4228 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4229 | #line 4230 "configure" |
2b2d558c MK |
4230 | #include "confdefs.h" |
4231 | ||
4232 | #include <setjmp.h> | |
4233 | ||
4234 | int main() { | |
4235 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
4236 | ; return 0; } | |
4237 | EOF | |
e27da16d | 4238 | if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2b2d558c MK |
4239 | rm -rf conftest* |
4240 | gdb_cv_func_sigsetjmp=yes | |
4241 | else | |
4242 | echo "configure: failed program was:" >&5 | |
4243 | cat conftest.$ac_ext >&5 | |
4244 | rm -rf conftest* | |
4245 | gdb_cv_func_sigsetjmp=no | |
4246 | fi | |
4247 | rm -f conftest* | |
4248 | fi | |
4249 | ||
4250 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 | |
4251 | if test $gdb_cv_func_sigsetjmp = yes; then | |
4252 | cat >> confdefs.h <<\EOF | |
4253 | #define HAVE_SIGSETJMP 1 | |
4254 | EOF | |
4255 | ||
4256 | fi | |
4257 | ||
0afdd437 | 4258 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7dfa765c MK |
4259 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. |
4260 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
e27da16d | 4261 | echo "configure:4262: checking for r_fs in struct reg" >&5 |
422ea4b8 | 4262 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7dfa765c MK |
4263 | echo $ac_n "(cached) $ac_c" 1>&6 |
4264 | else | |
4265 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4266 | #line 4267 "configure" |
7dfa765c MK |
4267 | #include "confdefs.h" |
4268 | #include <machine/reg.h> | |
4269 | int main() { | |
4270 | struct reg r; r.r_fs; | |
4271 | ; return 0; } | |
4272 | EOF | |
e27da16d | 4273 | if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 4274 | rm -rf conftest* |
422ea4b8 | 4275 | gdb_cv_struct_reg_r_fs=yes |
7dfa765c MK |
4276 | else |
4277 | echo "configure: failed program was:" >&5 | |
4278 | cat conftest.$ac_ext >&5 | |
4279 | rm -rf conftest* | |
422ea4b8 | 4280 | gdb_cv_struct_reg_r_fs=no |
7dfa765c MK |
4281 | fi |
4282 | rm -f conftest* | |
4283 | fi | |
4284 | ||
422ea4b8 MK |
4285 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
4286 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7dfa765c | 4287 | cat >> confdefs.h <<\EOF |
422ea4b8 | 4288 | #define HAVE_STRUCT_REG_R_FS 1 |
7dfa765c MK |
4289 | EOF |
4290 | ||
4291 | fi | |
4292 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
e27da16d | 4293 | echo "configure:4294: checking for r_gs in struct reg" >&5 |
422ea4b8 | 4294 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7dfa765c MK |
4295 | echo $ac_n "(cached) $ac_c" 1>&6 |
4296 | else | |
4297 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4298 | #line 4299 "configure" |
7dfa765c MK |
4299 | #include "confdefs.h" |
4300 | #include <machine/reg.h> | |
4301 | int main() { | |
4302 | struct reg r; r.r_gs; | |
4303 | ; return 0; } | |
4304 | EOF | |
e27da16d | 4305 | if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 4306 | rm -rf conftest* |
422ea4b8 | 4307 | gdb_cv_struct_reg_r_gs=yes |
7dfa765c MK |
4308 | else |
4309 | echo "configure: failed program was:" >&5 | |
4310 | cat conftest.$ac_ext >&5 | |
4311 | rm -rf conftest* | |
422ea4b8 | 4312 | gdb_cv_struct_reg_r_gs=no |
7dfa765c MK |
4313 | fi |
4314 | rm -f conftest* | |
4315 | fi | |
4316 | ||
422ea4b8 MK |
4317 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
4318 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7dfa765c | 4319 | cat >> confdefs.h <<\EOF |
422ea4b8 | 4320 | #define HAVE_STRUCT_REG_R_GS 1 |
7dfa765c MK |
4321 | EOF |
4322 | ||
4323 | fi | |
4324 | ||
0afdd437 | 4325 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
64bb1671 | 4326 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 |
e27da16d | 4327 | echo "configure:4328: checking for PTRACE_GETREGS" >&5 |
64bb1671 MK |
4328 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
4329 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4330 | else | |
4331 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4332 | #line 4333 "configure" |
64bb1671 MK |
4333 | #include "confdefs.h" |
4334 | #include <sys/ptrace.h> | |
4335 | int main() { | |
4336 | PTRACE_GETREGS; | |
4337 | ; return 0; } | |
4338 | EOF | |
e27da16d | 4339 | if { (eval echo configure:4340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
64bb1671 MK |
4340 | rm -rf conftest* |
4341 | gdb_cv_have_ptrace_getregs=yes | |
4342 | else | |
4343 | echo "configure: failed program was:" >&5 | |
4344 | cat conftest.$ac_ext >&5 | |
4345 | rm -rf conftest* | |
4346 | gdb_cv_have_ptrace_getregs=no | |
4347 | fi | |
4348 | rm -f conftest* | |
4349 | fi | |
4350 | ||
4397a6ab | 4351 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
64bb1671 MK |
4352 | if test $gdb_cv_have_ptrace_getregs = yes; then |
4353 | cat >> confdefs.h <<\EOF | |
4354 | #define HAVE_PTRACE_GETREGS 1 | |
4355 | EOF | |
4356 | ||
4357 | fi | |
4358 | ||
0afdd437 | 4359 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6ce2ac0b | 4360 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 |
e27da16d | 4361 | echo "configure:4362: checking for PTRACE_GETFPXREGS" >&5 |
6ce2ac0b | 4362 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
5c44784c JM |
4363 | echo $ac_n "(cached) $ac_c" 1>&6 |
4364 | else | |
4365 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4366 | #line 4367 "configure" |
5c44784c JM |
4367 | #include "confdefs.h" |
4368 | #include <sys/ptrace.h> | |
4369 | int main() { | |
6ce2ac0b | 4370 | PTRACE_GETFPXREGS; |
5c44784c JM |
4371 | ; return 0; } |
4372 | EOF | |
e27da16d | 4373 | if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c | 4374 | rm -rf conftest* |
6ce2ac0b | 4375 | gdb_cv_have_ptrace_getfpxregs=yes |
5c44784c JM |
4376 | else |
4377 | echo "configure: failed program was:" >&5 | |
4378 | cat conftest.$ac_ext >&5 | |
4379 | rm -rf conftest* | |
6ce2ac0b | 4380 | gdb_cv_have_ptrace_getfpxregs=no |
5c44784c JM |
4381 | fi |
4382 | rm -f conftest* | |
4383 | fi | |
4384 | ||
6ce2ac0b MK |
4385 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
4386 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
5c44784c | 4387 | cat >> confdefs.h <<\EOF |
6ce2ac0b | 4388 | #define HAVE_PTRACE_GETFPXREGS 1 |
5c44784c JM |
4389 | EOF |
4390 | ||
4391 | fi | |
4392 | ||
0afdd437 MK |
4393 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
4394 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
e27da16d | 4395 | echo "configure:4396: checking for PT_GETDBREGS" >&5 |
0afdd437 MK |
4396 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
4397 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4398 | else | |
4399 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4400 | #line 4401 "configure" |
0afdd437 MK |
4401 | #include "confdefs.h" |
4402 | #include <sys/types.h> | |
4403 | #include <sys/ptrace.h> | |
4404 | int main() { | |
4405 | PT_GETDBREGS; | |
4406 | ; return 0; } | |
4407 | EOF | |
e27da16d | 4408 | if { (eval echo configure:4409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0afdd437 MK |
4409 | rm -rf conftest* |
4410 | gdb_cv_have_pt_getdbregs=yes | |
4411 | else | |
4412 | echo "configure: failed program was:" >&5 | |
4413 | cat conftest.$ac_ext >&5 | |
4414 | rm -rf conftest* | |
4415 | gdb_cv_have_pt_getdbregs=no | |
4416 | fi | |
4417 | rm -f conftest* | |
4418 | fi | |
4419 | ||
4420 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 | |
4421 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
4422 | cat >> confdefs.h <<\EOF | |
4423 | #define HAVE_PT_GETDBREGS 1 | |
4424 | EOF | |
4425 | ||
4426 | fi | |
4427 | ||
7e89e357 JT |
4428 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
4429 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
e27da16d | 4430 | echo "configure:4431: checking for PT_GETXMMREGS" >&5 |
7e89e357 JT |
4431 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
4432 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4433 | else | |
4434 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4435 | #line 4436 "configure" |
7e89e357 JT |
4436 | #include "confdefs.h" |
4437 | #include <sys/types.h> | |
4438 | #include <sys/ptrace.h> | |
4439 | int main() { | |
4440 | PT_GETXMMREGS; | |
4441 | ; return 0; } | |
4442 | EOF | |
e27da16d | 4443 | if { (eval echo configure:4444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7e89e357 JT |
4444 | rm -rf conftest* |
4445 | gdb_cv_have_pt_getxmmregs=yes | |
4446 | else | |
4447 | echo "configure: failed program was:" >&5 | |
4448 | cat conftest.$ac_ext >&5 | |
4449 | rm -rf conftest* | |
4450 | gdb_cv_have_pt_getxmmregs=no | |
4451 | fi | |
4452 | rm -f conftest* | |
4453 | fi | |
4454 | ||
4455 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 | |
4456 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
4457 | cat >> confdefs.h <<\EOF | |
4458 | #define HAVE_PT_GETXMMREGS 1 | |
4459 | EOF | |
4460 | ||
4461 | fi | |
4462 | ||
0afdd437 | 4463 | |
7be570e7 | 4464 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
e27da16d | 4465 | echo "configure:4466: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
4466 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
4467 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4469 | else | |
4470 | ac_save_LIBS="$LIBS" | |
4471 | LIBS="-lsocket $LIBS" | |
4472 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4473 | #line 4474 "configure" |
7be570e7 JM |
4474 | #include "confdefs.h" |
4475 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4476 | /* We use char because int might match the return type of a gcc2 | |
4477 | builtin and then its argument prototype would still apply. */ | |
4478 | char socketpair(); | |
4479 | ||
4480 | int main() { | |
4481 | socketpair() | |
4482 | ; return 0; } | |
4483 | EOF | |
e27da16d | 4484 | if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4485 | rm -rf conftest* |
4486 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4487 | else | |
4488 | echo "configure: failed program was:" >&5 | |
4489 | cat conftest.$ac_ext >&5 | |
4490 | rm -rf conftest* | |
4491 | eval "ac_cv_lib_$ac_lib_var=no" | |
4492 | fi | |
4493 | rm -f conftest* | |
4494 | LIBS="$ac_save_LIBS" | |
4495 | ||
4496 | fi | |
4497 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4498 | echo "$ac_t""yes" 1>&6 | |
4499 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4500 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4501 | cat >> confdefs.h <<EOF | |
4502 | #define $ac_tr_lib 1 | |
4503 | EOF | |
4504 | ||
4505 | LIBS="-lsocket $LIBS" | |
4506 | ||
4507 | else | |
4508 | echo "$ac_t""no" 1>&6 | |
4509 | fi | |
4510 | ||
4511 | for ac_func in socketpair | |
4512 | do | |
4513 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 4514 | echo "configure:4515: checking for $ac_func" >&5 |
7be570e7 JM |
4515 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4516 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4517 | else | |
4518 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4519 | #line 4520 "configure" |
7be570e7 JM |
4520 | #include "confdefs.h" |
4521 | /* System header to define __stub macros and hopefully few prototypes, | |
4522 | which can conflict with char $ac_func(); below. */ | |
4523 | #include <assert.h> | |
4524 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4525 | /* We use char because int might match the return type of a gcc2 | |
4526 | builtin and then its argument prototype would still apply. */ | |
4527 | char $ac_func(); | |
4528 | ||
4529 | int main() { | |
4530 | ||
4531 | /* The GNU C library defines this for functions which it implements | |
4532 | to always fail with ENOSYS. Some functions are actually named | |
4533 | something starting with __ and the normal name is an alias. */ | |
4534 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4535 | choke me | |
4536 | #else | |
4537 | $ac_func(); | |
4538 | #endif | |
4539 | ||
4540 | ; return 0; } | |
4541 | EOF | |
e27da16d | 4542 | if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4543 | rm -rf conftest* |
4544 | eval "ac_cv_func_$ac_func=yes" | |
4545 | else | |
4546 | echo "configure: failed program was:" >&5 | |
4547 | cat conftest.$ac_ext >&5 | |
4548 | rm -rf conftest* | |
4549 | eval "ac_cv_func_$ac_func=no" | |
4550 | fi | |
4551 | rm -f conftest* | |
4552 | fi | |
4553 | ||
4554 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4555 | echo "$ac_t""yes" 1>&6 | |
4556 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4557 | cat >> confdefs.h <<EOF | |
4558 | #define $ac_tr_func 1 | |
4559 | EOF | |
4560 | ||
4561 | else | |
4562 | echo "$ac_t""no" 1>&6 | |
4563 | fi | |
4564 | done | |
4565 | ||
4566 | ||
4567 | ||
c906108c | 4568 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
e27da16d | 4569 | echo "configure:4570: checking whether malloc must be declared" >&5 |
c906108c SS |
4570 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4572 | else | |
4573 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4574 | #line 4575 "configure" |
c906108c SS |
4575 | #include "confdefs.h" |
4576 | ||
4577 | #include <stdio.h> | |
4578 | #ifdef HAVE_STRING_H | |
4579 | #include <string.h> | |
4580 | #else | |
4581 | #ifdef HAVE_STRINGS_H | |
4582 | #include <strings.h> | |
4583 | #endif | |
4584 | #endif | |
4585 | #ifdef HAVE_STDLIB_H | |
4586 | #include <stdlib.h> | |
4587 | #endif | |
4588 | #ifdef HAVE_UNISTD_H | |
4589 | #include <unistd.h> | |
4590 | #endif | |
4591 | int main() { | |
4592 | char *(*pfn) = (char *(*)) malloc | |
4593 | ; return 0; } | |
4594 | EOF | |
e27da16d | 4595 | if { (eval echo configure:4596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4596 | rm -rf conftest* |
4597 | bfd_cv_decl_needed_malloc=no | |
4598 | else | |
4599 | echo "configure: failed program was:" >&5 | |
4600 | cat conftest.$ac_ext >&5 | |
4601 | rm -rf conftest* | |
4602 | bfd_cv_decl_needed_malloc=yes | |
4603 | fi | |
4604 | rm -f conftest* | |
4605 | fi | |
4606 | ||
4607 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4608 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4609 | cat >> confdefs.h <<\EOF | |
4610 | #define NEED_DECLARATION_MALLOC 1 | |
4611 | EOF | |
4612 | ||
4613 | fi | |
4614 | ||
4615 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
e27da16d | 4616 | echo "configure:4617: checking whether realloc must be declared" >&5 |
c906108c SS |
4617 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4618 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4619 | else | |
4620 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4621 | #line 4622 "configure" |
c906108c SS |
4622 | #include "confdefs.h" |
4623 | ||
4624 | #include <stdio.h> | |
4625 | #ifdef HAVE_STRING_H | |
4626 | #include <string.h> | |
4627 | #else | |
4628 | #ifdef HAVE_STRINGS_H | |
4629 | #include <strings.h> | |
4630 | #endif | |
4631 | #endif | |
4632 | #ifdef HAVE_STDLIB_H | |
4633 | #include <stdlib.h> | |
4634 | #endif | |
4635 | #ifdef HAVE_UNISTD_H | |
4636 | #include <unistd.h> | |
4637 | #endif | |
4638 | int main() { | |
4639 | char *(*pfn) = (char *(*)) realloc | |
4640 | ; return 0; } | |
4641 | EOF | |
e27da16d | 4642 | if { (eval echo configure:4643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4643 | rm -rf conftest* |
4644 | bfd_cv_decl_needed_realloc=no | |
4645 | else | |
4646 | echo "configure: failed program was:" >&5 | |
4647 | cat conftest.$ac_ext >&5 | |
4648 | rm -rf conftest* | |
4649 | bfd_cv_decl_needed_realloc=yes | |
4650 | fi | |
4651 | rm -f conftest* | |
4652 | fi | |
4653 | ||
4654 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4655 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4656 | cat >> confdefs.h <<\EOF | |
4657 | #define NEED_DECLARATION_REALLOC 1 | |
4658 | EOF | |
4659 | ||
4660 | fi | |
4661 | ||
4662 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
e27da16d | 4663 | echo "configure:4664: checking whether free must be declared" >&5 |
c906108c SS |
4664 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4665 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4666 | else | |
4667 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4668 | #line 4669 "configure" |
c906108c SS |
4669 | #include "confdefs.h" |
4670 | ||
4671 | #include <stdio.h> | |
4672 | #ifdef HAVE_STRING_H | |
4673 | #include <string.h> | |
4674 | #else | |
4675 | #ifdef HAVE_STRINGS_H | |
4676 | #include <strings.h> | |
4677 | #endif | |
4678 | #endif | |
4679 | #ifdef HAVE_STDLIB_H | |
4680 | #include <stdlib.h> | |
4681 | #endif | |
4682 | #ifdef HAVE_UNISTD_H | |
4683 | #include <unistd.h> | |
4684 | #endif | |
4685 | int main() { | |
4686 | char *(*pfn) = (char *(*)) free | |
4687 | ; return 0; } | |
4688 | EOF | |
e27da16d | 4689 | if { (eval echo configure:4690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4690 | rm -rf conftest* |
4691 | bfd_cv_decl_needed_free=no | |
4692 | else | |
4693 | echo "configure: failed program was:" >&5 | |
4694 | cat conftest.$ac_ext >&5 | |
4695 | rm -rf conftest* | |
4696 | bfd_cv_decl_needed_free=yes | |
4697 | fi | |
4698 | rm -f conftest* | |
4699 | fi | |
4700 | ||
4701 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4702 | if test $bfd_cv_decl_needed_free = yes; then | |
4703 | cat >> confdefs.h <<\EOF | |
4704 | #define NEED_DECLARATION_FREE 1 | |
4705 | EOF | |
4706 | ||
4707 | fi | |
4708 | ||
4709 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
e27da16d | 4710 | echo "configure:4711: checking whether strerror must be declared" >&5 |
c906108c SS |
4711 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4712 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4713 | else | |
4714 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4715 | #line 4716 "configure" |
c906108c SS |
4716 | #include "confdefs.h" |
4717 | ||
4718 | #include <stdio.h> | |
4719 | #ifdef HAVE_STRING_H | |
4720 | #include <string.h> | |
4721 | #else | |
4722 | #ifdef HAVE_STRINGS_H | |
4723 | #include <strings.h> | |
4724 | #endif | |
4725 | #endif | |
4726 | #ifdef HAVE_STDLIB_H | |
4727 | #include <stdlib.h> | |
4728 | #endif | |
4729 | #ifdef HAVE_UNISTD_H | |
4730 | #include <unistd.h> | |
4731 | #endif | |
4732 | int main() { | |
4733 | char *(*pfn) = (char *(*)) strerror | |
4734 | ; return 0; } | |
4735 | EOF | |
e27da16d | 4736 | if { (eval echo configure:4737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4737 | rm -rf conftest* |
4738 | bfd_cv_decl_needed_strerror=no | |
4739 | else | |
4740 | echo "configure: failed program was:" >&5 | |
4741 | cat conftest.$ac_ext >&5 | |
4742 | rm -rf conftest* | |
4743 | bfd_cv_decl_needed_strerror=yes | |
4744 | fi | |
4745 | rm -f conftest* | |
4746 | fi | |
4747 | ||
4748 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4749 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4750 | cat >> confdefs.h <<\EOF | |
4751 | #define NEED_DECLARATION_STRERROR 1 | |
4752 | EOF | |
4753 | ||
4754 | fi | |
4755 | ||
4756 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
e27da16d | 4757 | echo "configure:4758: checking whether strdup must be declared" >&5 |
c906108c SS |
4758 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4760 | else | |
4761 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4762 | #line 4763 "configure" |
c906108c SS |
4763 | #include "confdefs.h" |
4764 | ||
4765 | #include <stdio.h> | |
4766 | #ifdef HAVE_STRING_H | |
4767 | #include <string.h> | |
4768 | #else | |
4769 | #ifdef HAVE_STRINGS_H | |
4770 | #include <strings.h> | |
4771 | #endif | |
4772 | #endif | |
4773 | #ifdef HAVE_STDLIB_H | |
4774 | #include <stdlib.h> | |
4775 | #endif | |
4776 | #ifdef HAVE_UNISTD_H | |
4777 | #include <unistd.h> | |
4778 | #endif | |
4779 | int main() { | |
4780 | char *(*pfn) = (char *(*)) strdup | |
4781 | ; return 0; } | |
4782 | EOF | |
e27da16d | 4783 | if { (eval echo configure:4784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4784 | rm -rf conftest* |
4785 | bfd_cv_decl_needed_strdup=no | |
4786 | else | |
4787 | echo "configure: failed program was:" >&5 | |
4788 | cat conftest.$ac_ext >&5 | |
4789 | rm -rf conftest* | |
4790 | bfd_cv_decl_needed_strdup=yes | |
4791 | fi | |
4792 | rm -f conftest* | |
4793 | fi | |
4794 | ||
4795 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4796 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4797 | cat >> confdefs.h <<\EOF | |
4798 | #define NEED_DECLARATION_STRDUP 1 | |
4799 | EOF | |
4800 | ||
4801 | fi | |
4802 | ||
b83266a0 | 4803 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
e27da16d | 4804 | echo "configure:4805: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4805 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4807 | else | |
4808 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4809 | #line 4810 "configure" |
b83266a0 SS |
4810 | #include "confdefs.h" |
4811 | ||
4812 | #include <stdio.h> | |
4813 | #ifdef HAVE_STRING_H | |
4814 | #include <string.h> | |
4815 | #else | |
4816 | #ifdef HAVE_STRINGS_H | |
4817 | #include <strings.h> | |
4818 | #endif | |
4819 | #endif | |
4820 | #ifdef HAVE_STDLIB_H | |
4821 | #include <stdlib.h> | |
4822 | #endif | |
4823 | #ifdef HAVE_UNISTD_H | |
4824 | #include <unistd.h> | |
4825 | #endif | |
4826 | int main() { | |
4827 | char *(*pfn) = (char *(*)) strstr | |
4828 | ; return 0; } | |
4829 | EOF | |
e27da16d | 4830 | if { (eval echo configure:4831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4831 | rm -rf conftest* |
4832 | bfd_cv_decl_needed_strstr=no | |
4833 | else | |
4834 | echo "configure: failed program was:" >&5 | |
4835 | cat conftest.$ac_ext >&5 | |
4836 | rm -rf conftest* | |
4837 | bfd_cv_decl_needed_strstr=yes | |
4838 | fi | |
4839 | rm -f conftest* | |
4840 | fi | |
4841 | ||
4842 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4843 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4844 | cat >> confdefs.h <<\EOF | |
4845 | #define NEED_DECLARATION_STRSTR 1 | |
4846 | EOF | |
4847 | ||
4848 | fi | |
4849 | ||
a4db0f07 | 4850 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
e27da16d | 4851 | echo "configure:4852: checking whether canonicalize_file_name must be declared" >&5 |
a4db0f07 RH |
4852 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
4853 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4854 | else | |
4855 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4856 | #line 4857 "configure" |
a4db0f07 RH |
4857 | #include "confdefs.h" |
4858 | ||
4859 | #include <stdio.h> | |
4860 | #ifdef HAVE_STRING_H | |
4861 | #include <string.h> | |
4862 | #else | |
4863 | #ifdef HAVE_STRINGS_H | |
4864 | #include <strings.h> | |
4865 | #endif | |
4866 | #endif | |
4867 | #ifdef HAVE_STDLIB_H | |
4868 | #include <stdlib.h> | |
4869 | #endif | |
4870 | #ifdef HAVE_UNISTD_H | |
4871 | #include <unistd.h> | |
4872 | #endif | |
4873 | int main() { | |
4874 | char *(*pfn) = (char *(*)) canonicalize_file_name | |
4875 | ; return 0; } | |
4876 | EOF | |
e27da16d | 4877 | if { (eval echo configure:4878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 RH |
4878 | rm -rf conftest* |
4879 | bfd_cv_decl_needed_canonicalize_file_name=no | |
4880 | else | |
4881 | echo "configure: failed program was:" >&5 | |
4882 | cat conftest.$ac_ext >&5 | |
4883 | rm -rf conftest* | |
4884 | bfd_cv_decl_needed_canonicalize_file_name=yes | |
4885 | fi | |
4886 | rm -f conftest* | |
4887 | fi | |
4888 | ||
4889 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 | |
4890 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
4891 | cat >> confdefs.h <<\EOF | |
4892 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
4893 | EOF | |
4894 | ||
4895 | fi | |
c906108c SS |
4896 | |
4897 | ||
4898 | # The following save_state_t checkery is only necessary for HPUX | |
4899 | # versions earlier than 10.20. When those fade from memory, this | |
4900 | # could be expunged. --jsm 1999-03-22 | |
4901 | ||
4902 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
e27da16d | 4903 | echo "configure:4904: checking for HPUX save_state structure" >&5 |
c906108c | 4904 | cat > conftest.$ac_ext <<EOF |
e27da16d | 4905 | #line 4906 "configure" |
c906108c SS |
4906 | #include "confdefs.h" |
4907 | #include <machine/save_state.h> | |
4908 | EOF | |
4909 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4910 | egrep "save_state_t" >/dev/null 2>&1; then | |
4911 | rm -rf conftest* | |
4912 | gdb_cv_hpux_savestate=yes | |
4913 | else | |
4914 | rm -rf conftest* | |
4915 | gdb_cv_hpux_savestate=no | |
4916 | fi | |
4917 | rm -f conftest* | |
4918 | ||
4919 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4920 | #line 4921 "configure" |
c906108c SS |
4921 | #include "confdefs.h" |
4922 | #include <machine/save_state.h> | |
4923 | EOF | |
4924 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4925 | egrep "ss_wide" >/dev/null 2>&1; then | |
4926 | rm -rf conftest* | |
4927 | gdb_cv_hpux_sswide=yes | |
4928 | else | |
4929 | rm -rf conftest* | |
4930 | gdb_cv_hpux_sswide=no | |
4931 | fi | |
4932 | rm -f conftest* | |
4933 | ||
4934 | if test $gdb_cv_hpux_savestate = yes | |
4935 | then | |
4936 | cat >> confdefs.h <<\EOF | |
4937 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4938 | EOF | |
4939 | ||
4940 | fi | |
4941 | if test $gdb_cv_hpux_sswide = yes | |
4942 | then | |
4943 | cat >> confdefs.h <<\EOF | |
4944 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4945 | EOF | |
4946 | ||
4947 | fi | |
4948 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4949 | ||
4950 | ||
4951 | # If we are configured native on GNU/Linux, work around problems with | |
4952 | # sys/procfs.h | |
c3f6f71d | 4953 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4954 | |
4955 | if test "${target}" = "${host}"; then | |
4956 | case "${host}" in | |
4957 | i[3456]86-*-linux*) | |
4958 | cat >> confdefs.h <<\EOF | |
4959 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4960 | EOF | |
4961 | ||
4962 | cat >> confdefs.h <<\EOF | |
4963 | #define sys_quotactl 1 | |
4964 | EOF | |
4965 | ||
4966 | ;; | |
596c9d4b KB |
4967 | ia64-*-aix*) |
4968 | cat >> confdefs.h <<\EOF | |
4969 | #define NEW_PROC_API 1 | |
4970 | EOF | |
4971 | ||
4972 | ;; | |
c5394b80 | 4973 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4974 | cat >> confdefs.h <<\EOF |
4975 | #define NEW_PROC_API 1 | |
c906108c SS |
4976 | EOF |
4977 | ||
c3f6f71d | 4978 | ;; |
3423db82 | 4979 | *-*-solaris2.[678]) |
c3f6f71d JM |
4980 | cat >> confdefs.h <<\EOF |
4981 | #define NEW_PROC_API 1 | |
4982 | EOF | |
4983 | ||
4984 | ;; | |
4985 | esac | |
c906108c SS |
4986 | fi |
4987 | ||
4988 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4989 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 4990 | echo "configure:4991: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4991 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4992 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4993 | else | |
4994 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 4995 | #line 4996 "configure" |
c906108c | 4996 | #include "confdefs.h" |
e17bf198 AO |
4997 | |
4998 | #define _SYSCALL32 | |
c906108c SS |
4999 | #include <sys/procfs.h> |
5000 | int main() { | |
5001 | pstatus_t avar | |
5002 | ; return 0; } | |
5003 | EOF | |
e27da16d | 5004 | if { (eval echo configure:5005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5005 | rm -rf conftest* |
5006 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
5007 | else | |
5008 | echo "configure: failed program was:" >&5 | |
5009 | cat conftest.$ac_ext >&5 | |
5010 | rm -rf conftest* | |
5011 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
5012 | ||
5013 | fi | |
5014 | rm -f conftest* | |
5015 | fi | |
5016 | ||
5017 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
5018 | cat >> confdefs.h <<\EOF | |
5019 | #define HAVE_PSTATUS_T 1 | |
5020 | EOF | |
5021 | ||
5022 | fi | |
5023 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
5024 | ||
5025 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5026 | echo "configure:5027: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
5027 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
5028 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5029 | else | |
5030 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5031 | #line 5032 "configure" |
c906108c | 5032 | #include "confdefs.h" |
e17bf198 AO |
5033 | |
5034 | #define _SYSCALL32 | |
c906108c SS |
5035 | #include <sys/procfs.h> |
5036 | int main() { | |
5037 | prrun_t avar | |
5038 | ; return 0; } | |
5039 | EOF | |
e27da16d | 5040 | if { (eval echo configure:5041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5041 | rm -rf conftest* |
5042 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
5043 | else | |
5044 | echo "configure: failed program was:" >&5 | |
5045 | cat conftest.$ac_ext >&5 | |
5046 | rm -rf conftest* | |
5047 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
5048 | ||
5049 | fi | |
5050 | rm -f conftest* | |
5051 | fi | |
5052 | ||
5053 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
5054 | cat >> confdefs.h <<\EOF | |
5055 | #define HAVE_PRRUN_T 1 | |
5056 | EOF | |
5057 | ||
5058 | fi | |
5059 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
5060 | ||
5061 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5062 | echo "configure:5063: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
5063 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
5064 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5065 | else | |
5066 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5067 | #line 5068 "configure" |
c906108c | 5068 | #include "confdefs.h" |
e17bf198 AO |
5069 | |
5070 | #define _SYSCALL32 | |
c906108c SS |
5071 | #include <sys/procfs.h> |
5072 | int main() { | |
5073 | gregset_t avar | |
5074 | ; return 0; } | |
5075 | EOF | |
e27da16d | 5076 | if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5077 | rm -rf conftest* |
5078 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
5079 | else | |
5080 | echo "configure: failed program was:" >&5 | |
5081 | cat conftest.$ac_ext >&5 | |
5082 | rm -rf conftest* | |
5083 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
5084 | ||
5085 | fi | |
5086 | rm -f conftest* | |
5087 | fi | |
5088 | ||
5089 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
5090 | cat >> confdefs.h <<\EOF | |
5091 | #define HAVE_GREGSET_T 1 | |
5092 | EOF | |
5093 | ||
5094 | fi | |
5095 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
5096 | ||
5097 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5098 | echo "configure:5099: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
5099 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
5100 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5101 | else | |
5102 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5103 | #line 5104 "configure" |
c906108c | 5104 | #include "confdefs.h" |
e17bf198 AO |
5105 | |
5106 | #define _SYSCALL32 | |
c906108c SS |
5107 | #include <sys/procfs.h> |
5108 | int main() { | |
5109 | fpregset_t avar | |
5110 | ; return 0; } | |
5111 | EOF | |
e27da16d | 5112 | if { (eval echo configure:5113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5113 | rm -rf conftest* |
5114 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
5115 | else | |
5116 | echo "configure: failed program was:" >&5 | |
5117 | cat conftest.$ac_ext >&5 | |
5118 | rm -rf conftest* | |
5119 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
5120 | ||
5121 | fi | |
5122 | rm -f conftest* | |
5123 | fi | |
5124 | ||
5125 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
5126 | cat >> confdefs.h <<\EOF | |
5127 | #define HAVE_FPREGSET_T 1 | |
5128 | EOF | |
5129 | ||
5130 | fi | |
5131 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
5132 | ||
3862412b | 5133 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
e27da16d | 5134 | echo "configure:5135: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
5135 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
5136 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5137 | else | |
5138 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5139 | #line 5140 "configure" |
3862412b | 5140 | #include "confdefs.h" |
e17bf198 AO |
5141 | |
5142 | #define _SYSCALL32 | |
3862412b MK |
5143 | #include <sys/procfs.h> |
5144 | int main() { | |
5145 | prgregset_t avar | |
5146 | ; return 0; } | |
5147 | EOF | |
e27da16d | 5148 | if { (eval echo configure:5149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5149 | rm -rf conftest* |
5150 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
5151 | else | |
5152 | echo "configure: failed program was:" >&5 | |
5153 | cat conftest.$ac_ext >&5 | |
5154 | rm -rf conftest* | |
5155 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
5156 | ||
5157 | fi | |
5158 | rm -f conftest* | |
5159 | fi | |
5160 | ||
5161 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
5162 | cat >> confdefs.h <<\EOF | |
5163 | #define HAVE_PRGREGSET_T 1 | |
5164 | EOF | |
5165 | ||
5166 | fi | |
5167 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
5168 | ||
5169 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5170 | echo "configure:5171: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
5171 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
5172 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5173 | else | |
5174 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5175 | #line 5176 "configure" |
3862412b | 5176 | #include "confdefs.h" |
e17bf198 AO |
5177 | |
5178 | #define _SYSCALL32 | |
3862412b MK |
5179 | #include <sys/procfs.h> |
5180 | int main() { | |
5181 | prfpregset_t avar | |
5182 | ; return 0; } | |
5183 | EOF | |
e27da16d | 5184 | if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5185 | rm -rf conftest* |
5186 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
5187 | else | |
5188 | echo "configure: failed program was:" >&5 | |
5189 | cat conftest.$ac_ext >&5 | |
5190 | rm -rf conftest* | |
5191 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
5192 | ||
5193 | fi | |
5194 | rm -f conftest* | |
5195 | fi | |
5196 | ||
5197 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
5198 | cat >> confdefs.h <<\EOF | |
5199 | #define HAVE_PRFPREGSET_T 1 | |
5200 | EOF | |
5201 | ||
5202 | fi | |
5203 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
5204 | ||
451928c5 | 5205 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
e27da16d | 5206 | echo "configure:5207: checking for prgregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
5207 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
5208 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5209 | else | |
5210 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5211 | #line 5212 "configure" |
451928c5 | 5212 | #include "confdefs.h" |
e17bf198 AO |
5213 | |
5214 | #define _SYSCALL32 | |
451928c5 AC |
5215 | #include <sys/procfs.h> |
5216 | int main() { | |
5217 | prgregset32_t avar | |
5218 | ; return 0; } | |
5219 | EOF | |
e27da16d | 5220 | if { (eval echo configure:5221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
5221 | rm -rf conftest* |
5222 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
5223 | else | |
5224 | echo "configure: failed program was:" >&5 | |
5225 | cat conftest.$ac_ext >&5 | |
5226 | rm -rf conftest* | |
5227 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
5228 | ||
5229 | fi | |
5230 | rm -f conftest* | |
5231 | fi | |
5232 | ||
5233 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then | |
5234 | cat >> confdefs.h <<\EOF | |
5235 | #define HAVE_PRGREGSET32_T 1 | |
5236 | EOF | |
5237 | ||
5238 | fi | |
5239 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
5240 | ||
5241 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5242 | echo "configure:5243: checking for prfpregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
5243 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
5244 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5245 | else | |
5246 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5247 | #line 5248 "configure" |
451928c5 | 5248 | #include "confdefs.h" |
e17bf198 AO |
5249 | |
5250 | #define _SYSCALL32 | |
451928c5 AC |
5251 | #include <sys/procfs.h> |
5252 | int main() { | |
5253 | prfpregset32_t avar | |
5254 | ; return 0; } | |
5255 | EOF | |
e27da16d | 5256 | if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
5257 | rm -rf conftest* |
5258 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes | |
5259 | else | |
5260 | echo "configure: failed program was:" >&5 | |
5261 | cat conftest.$ac_ext >&5 | |
5262 | rm -rf conftest* | |
5263 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no | |
5264 | ||
5265 | fi | |
5266 | rm -f conftest* | |
5267 | fi | |
5268 | ||
5269 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then | |
5270 | cat >> confdefs.h <<\EOF | |
5271 | #define HAVE_PRFPREGSET32_T 1 | |
5272 | EOF | |
5273 | ||
5274 | fi | |
5275 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
5276 | ||
3862412b | 5277 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
e27da16d | 5278 | echo "configure:5279: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
5279 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
5280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5281 | else | |
5282 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5283 | #line 5284 "configure" |
3862412b | 5284 | #include "confdefs.h" |
e17bf198 AO |
5285 | |
5286 | #define _SYSCALL32 | |
3862412b MK |
5287 | #include <sys/procfs.h> |
5288 | int main() { | |
5289 | lwpid_t avar | |
5290 | ; return 0; } | |
5291 | EOF | |
e27da16d | 5292 | if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5293 | rm -rf conftest* |
5294 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
5295 | else | |
5296 | echo "configure: failed program was:" >&5 | |
5297 | cat conftest.$ac_ext >&5 | |
5298 | rm -rf conftest* | |
5299 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
5300 | ||
5301 | fi | |
5302 | rm -f conftest* | |
5303 | fi | |
5304 | ||
5305 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
5306 | cat >> confdefs.h <<\EOF | |
5307 | #define HAVE_LWPID_T 1 | |
5308 | EOF | |
5309 | ||
5310 | fi | |
5311 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
5312 | ||
5313 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5314 | echo "configure:5315: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
5315 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
5316 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5317 | else | |
5318 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5319 | #line 5320 "configure" |
3862412b | 5320 | #include "confdefs.h" |
e17bf198 AO |
5321 | |
5322 | #define _SYSCALL32 | |
3862412b MK |
5323 | #include <sys/procfs.h> |
5324 | int main() { | |
5325 | psaddr_t avar | |
5326 | ; return 0; } | |
5327 | EOF | |
e27da16d | 5328 | if { (eval echo configure:5329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5329 | rm -rf conftest* |
5330 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
5331 | else | |
5332 | echo "configure: failed program was:" >&5 | |
5333 | cat conftest.$ac_ext >&5 | |
5334 | rm -rf conftest* | |
5335 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
5336 | ||
5337 | fi | |
5338 | rm -f conftest* | |
5339 | fi | |
5340 | ||
5341 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
5342 | cat >> confdefs.h <<\EOF | |
5343 | #define HAVE_PSADDR_T 1 | |
5344 | EOF | |
5345 | ||
5346 | fi | |
5347 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
5348 | ||
596c9d4b | 5349 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
e27da16d | 5350 | echo "configure:5351: checking for prsysent_t in sys/procfs.h" >&5 |
596c9d4b KB |
5351 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
5352 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5353 | else | |
5354 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5355 | #line 5356 "configure" |
596c9d4b KB |
5356 | #include "confdefs.h" |
5357 | ||
5358 | #define _SYSCALL32 | |
5359 | #include <sys/procfs.h> | |
5360 | int main() { | |
5361 | prsysent_t avar | |
5362 | ; return 0; } | |
5363 | EOF | |
e27da16d | 5364 | if { (eval echo configure:5365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5365 | rm -rf conftest* |
5366 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
5367 | else | |
5368 | echo "configure: failed program was:" >&5 | |
5369 | cat conftest.$ac_ext >&5 | |
5370 | rm -rf conftest* | |
5371 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
5372 | ||
5373 | fi | |
5374 | rm -f conftest* | |
5375 | fi | |
5376 | ||
5377 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then | |
5378 | cat >> confdefs.h <<\EOF | |
5379 | #define HAVE_PRSYSENT_T 1 | |
5380 | EOF | |
5381 | ||
5382 | fi | |
5383 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
5384 | ||
5385 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5386 | echo "configure:5387: checking for pr_sigset_t in sys/procfs.h" >&5 |
596c9d4b KB |
5387 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
5388 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5389 | else | |
5390 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5391 | #line 5392 "configure" |
596c9d4b KB |
5392 | #include "confdefs.h" |
5393 | ||
5394 | #define _SYSCALL32 | |
5395 | #include <sys/procfs.h> | |
5396 | int main() { | |
5397 | pr_sigset_t avar | |
5398 | ; return 0; } | |
5399 | EOF | |
e27da16d | 5400 | if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5401 | rm -rf conftest* |
5402 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes | |
5403 | else | |
5404 | echo "configure: failed program was:" >&5 | |
5405 | cat conftest.$ac_ext >&5 | |
5406 | rm -rf conftest* | |
5407 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no | |
5408 | ||
5409 | fi | |
5410 | rm -f conftest* | |
5411 | fi | |
5412 | ||
5413 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then | |
5414 | cat >> confdefs.h <<\EOF | |
5415 | #define HAVE_PR_SIGSET_T 1 | |
5416 | EOF | |
5417 | ||
5418 | fi | |
5419 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
5420 | ||
5421 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5422 | echo "configure:5423: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
596c9d4b KB |
5423 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
5424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5425 | else | |
5426 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5427 | #line 5428 "configure" |
596c9d4b KB |
5428 | #include "confdefs.h" |
5429 | ||
5430 | #define _SYSCALL32 | |
5431 | #include <sys/procfs.h> | |
5432 | int main() { | |
5433 | pr_sigaction64_t avar | |
5434 | ; return 0; } | |
5435 | EOF | |
e27da16d | 5436 | if { (eval echo configure:5437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5437 | rm -rf conftest* |
5438 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
5439 | else | |
5440 | echo "configure: failed program was:" >&5 | |
5441 | cat conftest.$ac_ext >&5 | |
5442 | rm -rf conftest* | |
5443 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
5444 | ||
5445 | fi | |
5446 | rm -f conftest* | |
5447 | fi | |
5448 | ||
5449 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then | |
5450 | cat >> confdefs.h <<\EOF | |
5451 | #define HAVE_PR_SIGACTION64_T 1 | |
5452 | EOF | |
5453 | ||
5454 | fi | |
5455 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
5456 | ||
5457 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
e27da16d | 5458 | echo "configure:5459: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
596c9d4b KB |
5459 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
5460 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5461 | else | |
5462 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5463 | #line 5464 "configure" |
596c9d4b KB |
5464 | #include "confdefs.h" |
5465 | ||
5466 | #define _SYSCALL32 | |
5467 | #include <sys/procfs.h> | |
5468 | int main() { | |
5469 | pr_siginfo64_t avar | |
5470 | ; return 0; } | |
5471 | EOF | |
e27da16d | 5472 | if { (eval echo configure:5473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5473 | rm -rf conftest* |
5474 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
5475 | else | |
5476 | echo "configure: failed program was:" >&5 | |
5477 | cat conftest.$ac_ext >&5 | |
5478 | rm -rf conftest* | |
5479 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
5480 | ||
5481 | fi | |
5482 | rm -f conftest* | |
5483 | fi | |
5484 | ||
5485 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then | |
5486 | cat >> confdefs.h <<\EOF | |
5487 | #define HAVE_PR_SIGINFO64_T 1 | |
5488 | EOF | |
5489 | ||
5490 | fi | |
5491 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
5492 | ||
c906108c | 5493 | |
451928c5 | 5494 | |
c906108c | 5495 | |
746a987d | 5496 | |
d84dd0c5 MK |
5497 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
5498 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
e27da16d | 5499 | echo "configure:5500: checking whether prfpregset_t type is broken" >&5 |
d84dd0c5 MK |
5500 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
5501 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5502 | else | |
5503 | if test "$cross_compiling" = yes; then | |
5504 | gdb_cv_prfpregset_t_broken=yes | |
5505 | else | |
5506 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5507 | #line 5508 "configure" |
d84dd0c5 MK |
5508 | #include "confdefs.h" |
5509 | #include <sys/procfs.h> | |
5510 | int main () | |
5511 | { | |
5512 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
5513 | return 1; | |
5514 | return 0; | |
5515 | } | |
5516 | EOF | |
e27da16d | 5517 | if { (eval echo configure:5518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
d84dd0c5 MK |
5518 | then |
5519 | gdb_cv_prfpregset_t_broken=no | |
5520 | else | |
5521 | echo "configure: failed program was:" >&5 | |
5522 | cat conftest.$ac_ext >&5 | |
5523 | rm -fr conftest* | |
5524 | gdb_cv_prfpregset_t_broken=yes | |
5525 | fi | |
5526 | rm -fr conftest* | |
5527 | fi | |
5528 | ||
5529 | fi | |
5530 | ||
5531 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 | |
5532 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
5533 | cat >> confdefs.h <<\EOF | |
5534 | #define PRFPREGSET_T_BROKEN 1 | |
5535 | EOF | |
5536 | ||
5537 | fi | |
5538 | fi | |
5539 | ||
5540 | ||
c906108c | 5541 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 |
e27da16d | 5542 | echo "configure:5543: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
5543 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
5544 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5545 | else | |
5546 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5547 | #line 5548 "configure" |
c906108c SS |
5548 | #include "confdefs.h" |
5549 | #include <unistd.h> | |
5550 | #include <sys/types.h> | |
5551 | #include <sys/procfs.h> | |
5552 | ||
5553 | int main() { | |
5554 | ||
5555 | int dummy;; | |
5556 | dummy = ioctl(0, PIOCSET, &dummy); | |
5557 | ||
5558 | ; return 0; } | |
5559 | EOF | |
e27da16d | 5560 | if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5561 | rm -rf conftest* |
5562 | gdb_cv_have_procfs_piocset=yes | |
5563 | else | |
5564 | echo "configure: failed program was:" >&5 | |
5565 | cat conftest.$ac_ext >&5 | |
5566 | rm -rf conftest* | |
5567 | gdb_cv_have_procfs_piocset=no | |
5568 | fi | |
5569 | rm -f conftest* | |
5570 | fi | |
5571 | ||
5572 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
5573 | if test $gdb_cv_have_procfs_piocset = yes; then | |
5574 | cat >> confdefs.h <<\EOF | |
5575 | #define HAVE_PROCFS_PIOCSET 1 | |
5576 | EOF | |
5577 | ||
5578 | fi | |
5579 | fi | |
5580 | ||
d45fe813 KB |
5581 | if test ${host} = ${target} ; then |
5582 | ||
5583 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
e27da16d | 5584 | echo "configure:5585: checking for member l_addr in struct link_map" >&5 |
d45fe813 KB |
5585 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
5586 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5587 | else | |
5588 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5589 | #line 5590 "configure" |
d45fe813 KB |
5590 | #include "confdefs.h" |
5591 | #include <link.h> | |
5592 | int main() { | |
5593 | struct link_map lm; (void) lm.l_addr; | |
5594 | ; return 0; } | |
5595 | EOF | |
e27da16d | 5596 | if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5597 | rm -rf conftest* |
5598 | gdb_cv_have_struct_link_map_with_l_members=yes | |
5599 | else | |
5600 | echo "configure: failed program was:" >&5 | |
5601 | cat conftest.$ac_ext >&5 | |
5602 | rm -rf conftest* | |
5603 | gdb_cv_have_struct_link_map_with_l_members=no | |
5604 | fi | |
5605 | rm -f conftest* | |
5606 | fi | |
5607 | ||
5608 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 | |
5609 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
5610 | cat >> confdefs.h <<\EOF | |
5611 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
5612 | EOF | |
5613 | ||
5614 | fi | |
5615 | ||
5616 | ||
5617 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
e27da16d | 5618 | echo "configure:5619: checking for member lm_addr in struct link_map" >&5 |
d45fe813 KB |
5619 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
5620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5621 | else | |
5622 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5623 | #line 5624 "configure" |
d45fe813 KB |
5624 | #include "confdefs.h" |
5625 | #include <sys/types.h> | |
5626 | #include <link.h> | |
5627 | int main() { | |
5628 | struct link_map lm; (void) lm.lm_addr; | |
5629 | ; return 0; } | |
5630 | EOF | |
e27da16d | 5631 | if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5632 | rm -rf conftest* |
5633 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
5634 | else | |
5635 | echo "configure: failed program was:" >&5 | |
5636 | cat conftest.$ac_ext >&5 | |
5637 | rm -rf conftest* | |
5638 | gdb_cv_have_struct_link_map_with_lm_members=no | |
5639 | fi | |
5640 | rm -f conftest* | |
5641 | fi | |
5642 | ||
5643 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 | |
5644 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
5645 | cat >> confdefs.h <<\EOF | |
5646 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
5647 | EOF | |
5648 | ||
5649 | fi | |
5650 | ||
5651 | ||
5652 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
e27da16d | 5653 | echo "configure:5654: checking for member som_addr in struct so_map" >&5 |
d45fe813 KB |
5654 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
5655 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5656 | else | |
5657 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5658 | #line 5659 "configure" |
d45fe813 KB |
5659 | #include "confdefs.h" |
5660 | #include <sys/types.h> | |
39812ceb C |
5661 | #ifdef HAVE_NLIST_H |
5662 | #include <nlist.h> | |
5663 | #endif | |
d45fe813 KB |
5664 | #include <link.h> |
5665 | int main() { | |
5666 | struct so_map lm; (void) lm.som_addr; | |
5667 | ; return 0; } | |
5668 | EOF | |
e27da16d | 5669 | if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5670 | rm -rf conftest* |
5671 | gdb_cv_have_struct_so_map_with_som_members=yes | |
5672 | else | |
5673 | echo "configure: failed program was:" >&5 | |
5674 | cat conftest.$ac_ext >&5 | |
5675 | rm -rf conftest* | |
5676 | gdb_cv_have_struct_so_map_with_som_members=no | |
5677 | fi | |
5678 | rm -f conftest* | |
5679 | fi | |
5680 | ||
5681 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 | |
5682 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
5683 | cat >> confdefs.h <<\EOF | |
5684 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
5685 | EOF | |
5686 | ||
5687 | fi | |
5688 | ||
5689 | ||
5690 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
e27da16d | 5691 | echo "configure:5692: checking for struct link_map32 in sys/link.h" >&5 |
d45fe813 KB |
5692 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
5693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5694 | else | |
5695 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5696 | #line 5697 "configure" |
d45fe813 KB |
5697 | #include "confdefs.h" |
5698 | #define _SYSCALL32 | |
5699 | #include <sys/link.h> | |
5700 | int main() { | |
5701 | struct link_map32 l; | |
5702 | ; return 0; } | |
5703 | EOF | |
e27da16d | 5704 | if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5705 | rm -rf conftest* |
5706 | gdb_cv_have_struct_link_map32=yes | |
5707 | else | |
5708 | echo "configure: failed program was:" >&5 | |
5709 | cat conftest.$ac_ext >&5 | |
5710 | rm -rf conftest* | |
5711 | gdb_cv_have_struct_link_map32=no | |
5712 | fi | |
5713 | rm -f conftest* | |
5714 | fi | |
5715 | ||
5716 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 | |
5717 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
5718 | cat >> confdefs.h <<\EOF | |
5719 | #define HAVE_STRUCT_LINK_MAP32 1 | |
943c9c25 MS |
5720 | EOF |
5721 | ||
5722 | cat >> confdefs.h <<\EOF | |
5723 | #define _SYSCALL32 1 | |
d45fe813 KB |
5724 | EOF |
5725 | ||
5726 | fi | |
5727 | fi | |
5728 | ||
c906108c | 5729 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
e27da16d | 5730 | echo "configure:5731: checking for main in -lm" >&5 |
c906108c SS |
5731 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
5732 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5734 | else | |
5735 | ac_save_LIBS="$LIBS" | |
5736 | LIBS="-lm $LIBS" | |
5737 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5738 | #line 5739 "configure" |
c906108c SS |
5739 | #include "confdefs.h" |
5740 | ||
5741 | int main() { | |
5742 | main() | |
5743 | ; return 0; } | |
5744 | EOF | |
e27da16d | 5745 | if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5746 | rm -rf conftest* |
5747 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5748 | else | |
5749 | echo "configure: failed program was:" >&5 | |
5750 | cat conftest.$ac_ext >&5 | |
5751 | rm -rf conftest* | |
5752 | eval "ac_cv_lib_$ac_lib_var=no" | |
5753 | fi | |
5754 | rm -f conftest* | |
5755 | LIBS="$ac_save_LIBS" | |
5756 | ||
5757 | fi | |
5758 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5759 | echo "$ac_t""yes" 1>&6 | |
5760 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5761 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5762 | cat >> confdefs.h <<EOF | |
5763 | #define $ac_tr_lib 1 | |
5764 | EOF | |
5765 | ||
5766 | LIBS="-lm $LIBS" | |
5767 | ||
5768 | else | |
5769 | echo "$ac_t""no" 1>&6 | |
5770 | fi | |
5771 | ||
5772 | ||
5773 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
e27da16d | 5774 | echo "configure:5775: checking for wctype in -lc" >&5 |
c906108c SS |
5775 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
5776 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5777 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5778 | else | |
5779 | ac_save_LIBS="$LIBS" | |
5780 | LIBS="-lc $LIBS" | |
5781 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5782 | #line 5783 "configure" |
c906108c SS |
5783 | #include "confdefs.h" |
5784 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5785 | /* We use char because int might match the return type of a gcc2 | |
5786 | builtin and then its argument prototype would still apply. */ | |
5787 | char wctype(); | |
5788 | ||
5789 | int main() { | |
5790 | wctype() | |
5791 | ; return 0; } | |
5792 | EOF | |
e27da16d | 5793 | if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5794 | rm -rf conftest* |
5795 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5796 | else | |
5797 | echo "configure: failed program was:" >&5 | |
5798 | cat conftest.$ac_ext >&5 | |
5799 | rm -rf conftest* | |
5800 | eval "ac_cv_lib_$ac_lib_var=no" | |
5801 | fi | |
5802 | rm -f conftest* | |
5803 | LIBS="$ac_save_LIBS" | |
5804 | ||
5805 | fi | |
5806 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5807 | echo "$ac_t""yes" 1>&6 | |
5808 | : | |
5809 | else | |
5810 | echo "$ac_t""no" 1>&6 | |
5811 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
e27da16d | 5812 | echo "configure:5813: checking for wctype in -lw" >&5 |
c906108c SS |
5813 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
5814 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5815 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5816 | else | |
5817 | ac_save_LIBS="$LIBS" | |
5818 | LIBS="-lw $LIBS" | |
5819 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5820 | #line 5821 "configure" |
c906108c SS |
5821 | #include "confdefs.h" |
5822 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5823 | /* We use char because int might match the return type of a gcc2 | |
5824 | builtin and then its argument prototype would still apply. */ | |
5825 | char wctype(); | |
5826 | ||
5827 | int main() { | |
5828 | wctype() | |
5829 | ; return 0; } | |
5830 | EOF | |
e27da16d | 5831 | if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5832 | rm -rf conftest* |
5833 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5834 | else | |
5835 | echo "configure: failed program was:" >&5 | |
5836 | cat conftest.$ac_ext >&5 | |
5837 | rm -rf conftest* | |
5838 | eval "ac_cv_lib_$ac_lib_var=no" | |
5839 | fi | |
5840 | rm -f conftest* | |
5841 | LIBS="$ac_save_LIBS" | |
5842 | ||
5843 | fi | |
5844 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5845 | echo "$ac_t""yes" 1>&6 | |
5846 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
5847 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5848 | cat >> confdefs.h <<EOF | |
5849 | #define $ac_tr_lib 1 | |
5850 | EOF | |
5851 | ||
5852 | LIBS="-lw $LIBS" | |
5853 | ||
5854 | else | |
5855 | echo "$ac_t""no" 1>&6 | |
5856 | fi | |
5857 | ||
5858 | fi | |
5859 | ||
5860 | ||
5861 | ||
5862 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
e27da16d | 5863 | echo "configure:5864: checking for long long support in compiler" >&5 |
c906108c SS |
5864 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
5865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5866 | else | |
5867 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5868 | #line 5869 "configure" |
c906108c SS |
5869 | #include "confdefs.h" |
5870 | ||
5871 | int main() { | |
5872 | ||
5873 | extern long long foo; | |
5874 | switch (foo & 2) { case 0: return 1; } | |
5875 | ||
5876 | ; return 0; } | |
5877 | EOF | |
e27da16d | 5878 | if { (eval echo configure:5879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5879 | rm -rf conftest* |
5880 | gdb_cv_c_long_long=yes | |
5881 | else | |
5882 | echo "configure: failed program was:" >&5 | |
5883 | cat conftest.$ac_ext >&5 | |
5884 | rm -rf conftest* | |
5885 | gdb_cv_c_long_long=no | |
5886 | fi | |
5887 | rm -f conftest* | |
5888 | fi | |
5889 | ||
5890 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
5891 | if test $gdb_cv_c_long_long = yes; then | |
5892 | cat >> confdefs.h <<\EOF | |
5893 | #define CC_HAS_LONG_LONG 1 | |
5894 | EOF | |
5895 | ||
5896 | fi | |
5897 | ||
5898 | ||
5899 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
e27da16d | 5900 | echo "configure:5901: checking for long long support in printf" >&5 |
c906108c SS |
5901 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
5902 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5903 | else | |
5904 | if test "$cross_compiling" = yes; then | |
5905 | gdb_cv_printf_has_long_long=no | |
5906 | else | |
5907 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5908 | #line 5909 "configure" |
c906108c SS |
5909 | #include "confdefs.h" |
5910 | ||
5911 | int main () { | |
5912 | char buf[32]; | |
5913 | long long l = 0; | |
5914 | l = (l << 16) + 0x0123; | |
5915 | l = (l << 16) + 0x4567; | |
5916 | l = (l << 16) + 0x89ab; | |
5917 | l = (l << 16) + 0xcdef; | |
5918 | sprintf (buf, "0x%016llx", l); | |
5919 | return (strcmp ("0x0123456789abcdef", buf)); | |
5920 | } | |
5921 | EOF | |
e27da16d | 5922 | if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5923 | then |
5924 | gdb_cv_printf_has_long_long=yes | |
5925 | else | |
5926 | echo "configure: failed program was:" >&5 | |
5927 | cat conftest.$ac_ext >&5 | |
5928 | rm -fr conftest* | |
5929 | gdb_cv_printf_has_long_long=no | |
5930 | fi | |
5931 | rm -fr conftest* | |
5932 | fi | |
5933 | ||
5934 | fi | |
5935 | ||
5936 | if test $gdb_cv_printf_has_long_long = yes; then | |
5937 | cat >> confdefs.h <<\EOF | |
5938 | #define PRINTF_HAS_LONG_LONG 1 | |
5939 | EOF | |
5940 | ||
5941 | fi | |
5942 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
5943 | ||
5944 | ||
5945 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
e27da16d | 5946 | echo "configure:5947: checking for long double support in compiler" >&5 |
c906108c SS |
5947 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
5948 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5949 | else | |
5950 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5951 | #line 5952 "configure" |
c906108c SS |
5952 | #include "confdefs.h" |
5953 | ||
5954 | int main() { | |
5955 | long double foo; | |
5956 | ; return 0; } | |
5957 | EOF | |
e27da16d | 5958 | if { (eval echo configure:5959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5959 | rm -rf conftest* |
5960 | ac_cv_c_long_double=yes | |
5961 | else | |
5962 | echo "configure: failed program was:" >&5 | |
5963 | cat conftest.$ac_ext >&5 | |
5964 | rm -rf conftest* | |
5965 | ac_cv_c_long_double=no | |
5966 | fi | |
5967 | rm -f conftest* | |
5968 | fi | |
5969 | ||
5970 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
5971 | if test $ac_cv_c_long_double = yes; then | |
5972 | cat >> confdefs.h <<\EOF | |
5973 | #define HAVE_LONG_DOUBLE 1 | |
5974 | EOF | |
5975 | ||
5976 | fi | |
5977 | ||
5978 | ||
5979 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
e27da16d | 5980 | echo "configure:5981: checking for long double support in printf" >&5 |
c906108c SS |
5981 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
5982 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5983 | else | |
5984 | if test "$cross_compiling" = yes; then | |
5985 | gdb_cv_printf_has_long_double=no | |
5986 | else | |
5987 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 5988 | #line 5989 "configure" |
c906108c SS |
5989 | #include "confdefs.h" |
5990 | ||
5991 | int main () { | |
5992 | char buf[16]; | |
5993 | long double f = 3.141592653; | |
5994 | sprintf (buf, "%Lg", f); | |
5995 | return (strncmp ("3.14159", buf, 7)); | |
5996 | } | |
5997 | EOF | |
e27da16d | 5998 | if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5999 | then |
6000 | gdb_cv_printf_has_long_double=yes | |
6001 | else | |
6002 | echo "configure: failed program was:" >&5 | |
6003 | cat conftest.$ac_ext >&5 | |
6004 | rm -fr conftest* | |
6005 | gdb_cv_printf_has_long_double=no | |
6006 | fi | |
6007 | rm -fr conftest* | |
6008 | fi | |
6009 | ||
6010 | fi | |
6011 | ||
6012 | if test $gdb_cv_printf_has_long_double = yes; then | |
6013 | cat >> confdefs.h <<\EOF | |
6014 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
6015 | EOF | |
6016 | ||
6017 | fi | |
6018 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
6019 | ||
6020 | ||
6021 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
e27da16d | 6022 | echo "configure:6023: checking for long double support in scanf" >&5 |
c906108c SS |
6023 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
6024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6025 | else | |
6026 | if test "$cross_compiling" = yes; then | |
6027 | gdb_cv_scanf_has_long_double=no | |
6028 | else | |
6029 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6030 | #line 6031 "configure" |
c906108c SS |
6031 | #include "confdefs.h" |
6032 | ||
6033 | int main () { | |
6034 | char *buf = "3.141592653"; | |
6035 | long double f = 0; | |
6036 | sscanf (buf, "%Lg", &f); | |
6037 | return !(f > 3.14159 && f < 3.14160); | |
6038 | } | |
6039 | EOF | |
e27da16d | 6040 | if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
6041 | then |
6042 | gdb_cv_scanf_has_long_double=yes | |
6043 | else | |
6044 | echo "configure: failed program was:" >&5 | |
6045 | cat conftest.$ac_ext >&5 | |
6046 | rm -fr conftest* | |
6047 | gdb_cv_scanf_has_long_double=no | |
6048 | fi | |
6049 | rm -fr conftest* | |
6050 | fi | |
6051 | ||
6052 | fi | |
6053 | ||
6054 | if test $gdb_cv_scanf_has_long_double = yes; then | |
6055 | cat >> confdefs.h <<\EOF | |
6056 | #define SCANF_HAS_LONG_DOUBLE 1 | |
6057 | EOF | |
6058 | ||
6059 | fi | |
6060 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
6061 | ||
6062 | for ac_hdr in unistd.h | |
6063 | do | |
6064 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
6065 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e27da16d | 6066 | echo "configure:6067: checking for $ac_hdr" >&5 |
c906108c SS |
6067 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6068 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6069 | else | |
6070 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6071 | #line 6072 "configure" |
c906108c SS |
6072 | #include "confdefs.h" |
6073 | #include <$ac_hdr> | |
6074 | EOF | |
6075 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 6076 | { (eval echo configure:6077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
6077 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6078 | if test -z "$ac_err"; then | |
6079 | rm -rf conftest* | |
6080 | eval "ac_cv_header_$ac_safe=yes" | |
6081 | else | |
6082 | echo "$ac_err" >&5 | |
6083 | echo "configure: failed program was:" >&5 | |
6084 | cat conftest.$ac_ext >&5 | |
6085 | rm -rf conftest* | |
6086 | eval "ac_cv_header_$ac_safe=no" | |
6087 | fi | |
6088 | rm -f conftest* | |
6089 | fi | |
6090 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6091 | echo "$ac_t""yes" 1>&6 | |
6092 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
6093 | cat >> confdefs.h <<EOF | |
6094 | #define $ac_tr_hdr 1 | |
6095 | EOF | |
6096 | ||
6097 | else | |
6098 | echo "$ac_t""no" 1>&6 | |
6099 | fi | |
6100 | done | |
6101 | ||
6102 | for ac_func in getpagesize | |
6103 | do | |
6104 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e27da16d | 6105 | echo "configure:6106: checking for $ac_func" >&5 |
c906108c SS |
6106 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6108 | else | |
6109 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6110 | #line 6111 "configure" |
c906108c SS |
6111 | #include "confdefs.h" |
6112 | /* System header to define __stub macros and hopefully few prototypes, | |
6113 | which can conflict with char $ac_func(); below. */ | |
6114 | #include <assert.h> | |
6115 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6116 | /* We use char because int might match the return type of a gcc2 | |
6117 | builtin and then its argument prototype would still apply. */ | |
6118 | char $ac_func(); | |
6119 | ||
6120 | int main() { | |
6121 | ||
6122 | /* The GNU C library defines this for functions which it implements | |
6123 | to always fail with ENOSYS. Some functions are actually named | |
6124 | something starting with __ and the normal name is an alias. */ | |
6125 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6126 | choke me | |
6127 | #else | |
6128 | $ac_func(); | |
6129 | #endif | |
6130 | ||
6131 | ; return 0; } | |
6132 | EOF | |
e27da16d | 6133 | if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6134 | rm -rf conftest* |
6135 | eval "ac_cv_func_$ac_func=yes" | |
6136 | else | |
6137 | echo "configure: failed program was:" >&5 | |
6138 | cat conftest.$ac_ext >&5 | |
6139 | rm -rf conftest* | |
6140 | eval "ac_cv_func_$ac_func=no" | |
6141 | fi | |
6142 | rm -f conftest* | |
6143 | fi | |
6144 | ||
6145 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6146 | echo "$ac_t""yes" 1>&6 | |
6147 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6148 | cat >> confdefs.h <<EOF | |
6149 | #define $ac_tr_func 1 | |
6150 | EOF | |
6151 | ||
6152 | else | |
6153 | echo "$ac_t""no" 1>&6 | |
6154 | fi | |
6155 | done | |
6156 | ||
6157 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
e27da16d | 6158 | echo "configure:6159: checking for working mmap" >&5 |
c906108c SS |
6159 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6161 | else | |
6162 | if test "$cross_compiling" = yes; then | |
6163 | ac_cv_func_mmap_fixed_mapped=no | |
6164 | else | |
6165 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6166 | #line 6167 "configure" |
c906108c SS |
6167 | #include "confdefs.h" |
6168 | ||
6169 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6170 | Here is a matrix of mmap possibilities: | |
6171 | mmap private not fixed | |
6172 | mmap private fixed at somewhere currently unmapped | |
6173 | mmap private fixed at somewhere already mapped | |
6174 | mmap shared not fixed | |
6175 | mmap shared fixed at somewhere currently unmapped | |
6176 | mmap shared fixed at somewhere already mapped | |
6177 | For private mappings, we should verify that changes cannot be read() | |
6178 | back from the file, nor mmap's back from the file at a different | |
6179 | address. (There have been systems where private was not correctly | |
6180 | implemented like the infamous i386 svr4.0, and systems where the | |
6181 | VM page cache was not coherent with the filesystem buffer cache | |
6182 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6183 | For shared mappings, we should conversely verify that changes get | |
6184 | propogated back to all the places they're supposed to be. | |
6185 | ||
6186 | Grep wants private fixed already mapped. | |
6187 | The main things grep needs to know about mmap are: | |
6188 | * does it exist and is it safe to write into the mmap'd area | |
6189 | * how to use it (BSD variants) */ | |
6190 | #include <sys/types.h> | |
6191 | #include <fcntl.h> | |
6192 | #include <sys/mman.h> | |
6193 | ||
6194 | /* This mess was copied from the GNU getpagesize.h. */ | |
6195 | #ifndef HAVE_GETPAGESIZE | |
6196 | # ifdef HAVE_UNISTD_H | |
6197 | # include <unistd.h> | |
6198 | # endif | |
6199 | ||
6200 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6201 | # ifndef HAVE_SYS_PARAM_H | |
6202 | # define HAVE_SYS_PARAM_H 1 | |
6203 | # endif | |
6204 | ||
6205 | # ifdef _SC_PAGESIZE | |
6206 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6207 | # else /* no _SC_PAGESIZE */ | |
6208 | # ifdef HAVE_SYS_PARAM_H | |
6209 | # include <sys/param.h> | |
6210 | # ifdef EXEC_PAGESIZE | |
6211 | # define getpagesize() EXEC_PAGESIZE | |
6212 | # else /* no EXEC_PAGESIZE */ | |
6213 | # ifdef NBPG | |
6214 | # define getpagesize() NBPG * CLSIZE | |
6215 | # ifndef CLSIZE | |
6216 | # define CLSIZE 1 | |
6217 | # endif /* no CLSIZE */ | |
6218 | # else /* no NBPG */ | |
6219 | # ifdef NBPC | |
6220 | # define getpagesize() NBPC | |
6221 | # else /* no NBPC */ | |
6222 | # ifdef PAGESIZE | |
6223 | # define getpagesize() PAGESIZE | |
6224 | # endif /* PAGESIZE */ | |
6225 | # endif /* no NBPC */ | |
6226 | # endif /* no NBPG */ | |
6227 | # endif /* no EXEC_PAGESIZE */ | |
6228 | # else /* no HAVE_SYS_PARAM_H */ | |
6229 | # define getpagesize() 8192 /* punt totally */ | |
6230 | # endif /* no HAVE_SYS_PARAM_H */ | |
6231 | # endif /* no _SC_PAGESIZE */ | |
6232 | ||
6233 | #endif /* no HAVE_GETPAGESIZE */ | |
6234 | ||
6235 | #ifdef __cplusplus | |
6236 | extern "C" { void *malloc(unsigned); } | |
6237 | #else | |
6238 | char *malloc(); | |
6239 | #endif | |
6240 | ||
6241 | int | |
6242 | main() | |
6243 | { | |
6244 | char *data, *data2, *data3; | |
6245 | int i, pagesize; | |
6246 | int fd; | |
6247 | ||
6248 | pagesize = getpagesize(); | |
6249 | ||
6250 | /* | |
6251 | * First, make a file with some known garbage in it. | |
6252 | */ | |
6253 | data = malloc(pagesize); | |
6254 | if (!data) | |
6255 | exit(1); | |
6256 | for (i = 0; i < pagesize; ++i) | |
6257 | *(data + i) = rand(); | |
6258 | umask(0); | |
6259 | fd = creat("conftestmmap", 0600); | |
6260 | if (fd < 0) | |
6261 | exit(1); | |
6262 | if (write(fd, data, pagesize) != pagesize) | |
6263 | exit(1); | |
6264 | close(fd); | |
6265 | ||
6266 | /* | |
6267 | * Next, try to mmap the file at a fixed address which | |
6268 | * already has something else allocated at it. If we can, | |
6269 | * also make sure that we see the same garbage. | |
6270 | */ | |
6271 | fd = open("conftestmmap", O_RDWR); | |
6272 | if (fd < 0) | |
6273 | exit(1); | |
6274 | data2 = malloc(2 * pagesize); | |
6275 | if (!data2) | |
6276 | exit(1); | |
6277 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6278 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6279 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6280 | exit(1); | |
6281 | for (i = 0; i < pagesize; ++i) | |
6282 | if (*(data + i) != *(data2 + i)) | |
6283 | exit(1); | |
6284 | ||
6285 | /* | |
6286 | * Finally, make sure that changes to the mapped area | |
6287 | * do not percolate back to the file as seen by read(). | |
6288 | * (This is a bug on some variants of i386 svr4.0.) | |
6289 | */ | |
6290 | for (i = 0; i < pagesize; ++i) | |
6291 | *(data2 + i) = *(data2 + i) + 1; | |
6292 | data3 = malloc(pagesize); | |
6293 | if (!data3) | |
6294 | exit(1); | |
6295 | if (read(fd, data3, pagesize) != pagesize) | |
6296 | exit(1); | |
6297 | for (i = 0; i < pagesize; ++i) | |
6298 | if (*(data + i) != *(data3 + i)) | |
6299 | exit(1); | |
6300 | close(fd); | |
6301 | unlink("conftestmmap"); | |
6302 | exit(0); | |
6303 | } | |
6304 | ||
6305 | EOF | |
e27da16d | 6306 | if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
6307 | then |
6308 | ac_cv_func_mmap_fixed_mapped=yes | |
6309 | else | |
6310 | echo "configure: failed program was:" >&5 | |
6311 | cat conftest.$ac_ext >&5 | |
6312 | rm -fr conftest* | |
6313 | ac_cv_func_mmap_fixed_mapped=no | |
6314 | fi | |
6315 | rm -fr conftest* | |
6316 | fi | |
6317 | ||
6318 | fi | |
6319 | ||
6320 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
6321 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
6322 | cat >> confdefs.h <<\EOF | |
6323 | #define HAVE_MMAP 1 | |
6324 | EOF | |
6325 | ||
6326 | fi | |
6327 | ||
6328 | ||
438013df AO |
6329 | case ${host_os} in |
6330 | aix*) | |
6331 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
e27da16d | 6332 | echo "configure:6333: checking for -bbigtoc option" >&5 |
438013df AO |
6333 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
6334 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6335 | else | |
6336 | ||
6337 | SAVE_LDFLAGS=$LDFLAGS | |
6338 | ||
6339 | case $GCC in | |
6340 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
6341 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
6342 | esac | |
6343 | ||
6344 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
6345 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6346 | #line 6347 "configure" |
438013df AO |
6347 | #include "confdefs.h" |
6348 | ||
6349 | int main() { | |
6350 | int i; | |
6351 | ; return 0; } | |
6352 | EOF | |
e27da16d | 6353 | if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
6354 | : |
6355 | else | |
6356 | echo "configure: failed program was:" >&5 | |
6357 | cat conftest.$ac_ext >&5 | |
6358 | rm -rf conftest* | |
6359 | gdb_cv_bigtoc= | |
6360 | fi | |
6361 | rm -f conftest* | |
6362 | ||
6363 | fi | |
6364 | ||
6365 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
6366 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
6367 | ;; | |
6368 | esac | |
6369 | ||
c906108c SS |
6370 | |
6371 | ||
6372 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
6373 | case ${host_os} in | |
6374 | hpux*) | |
6375 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
e27da16d | 6376 | echo "configure:6377: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
6377 | if test -f /usr/include/dce/cma_config.h ; then |
6378 | if test "$GCC" = "yes" ; then | |
6379 | echo "$ac_t""yes" 1>&6 | |
6380 | cat >> confdefs.h <<\EOF | |
6381 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
6382 | EOF | |
6383 | ||
66b965bb | 6384 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
6385 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
6386 | else | |
6387 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
6388 | fi | |
6389 | else | |
6390 | echo "$ac_t""no" 1>&6 | |
6391 | fi | |
6392 | ;; | |
6393 | solaris*) | |
6394 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
e27da16d | 6395 | echo "configure:6396: checking for Solaris thread debugging library" >&5 |
c906108c SS |
6396 | if test -f /usr/lib/libthread_db.so.1 ; then |
6397 | echo "$ac_t""yes" 1>&6 | |
6398 | cat >> confdefs.h <<\EOF | |
6399 | #define HAVE_THREAD_DB_LIB 1 | |
6400 | EOF | |
6401 | ||
66b965bb | 6402 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
6403 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
6404 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
e27da16d | 6405 | echo "configure:6406: checking for dlopen in -ldl" >&5 |
c906108c SS |
6406 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
6407 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6408 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6409 | else | |
6410 | ac_save_LIBS="$LIBS" | |
6411 | LIBS="-ldl $LIBS" | |
6412 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6413 | #line 6414 "configure" |
c906108c SS |
6414 | #include "confdefs.h" |
6415 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6416 | /* We use char because int might match the return type of a gcc2 | |
6417 | builtin and then its argument prototype would still apply. */ | |
6418 | char dlopen(); | |
6419 | ||
6420 | int main() { | |
6421 | dlopen() | |
6422 | ; return 0; } | |
6423 | EOF | |
e27da16d | 6424 | if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6425 | rm -rf conftest* |
6426 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6427 | else | |
6428 | echo "configure: failed program was:" >&5 | |
6429 | cat conftest.$ac_ext >&5 | |
6430 | rm -rf conftest* | |
6431 | eval "ac_cv_lib_$ac_lib_var=no" | |
6432 | fi | |
6433 | rm -f conftest* | |
6434 | LIBS="$ac_save_LIBS" | |
6435 | ||
6436 | fi | |
6437 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6438 | echo "$ac_t""yes" 1>&6 | |
6439 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
6440 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
6441 | cat >> confdefs.h <<EOF | |
6442 | #define $ac_tr_lib 1 | |
6443 | EOF | |
6444 | ||
6445 | LIBS="-ldl $LIBS" | |
6446 | ||
6447 | else | |
6448 | echo "$ac_t""no" 1>&6 | |
6449 | fi | |
6450 | ||
6451 | if test "$GCC" = "yes" ; then | |
6452 | # The GNU linker requires the -export-dynamic option to make | |
6453 | # all symbols visible in the dynamic symbol table. | |
6454 | hold_ldflags=$LDFLAGS | |
6455 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
e27da16d | 6456 | echo "configure:6457: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
6457 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
6458 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6459 | #line 6460 "configure" |
c906108c SS |
6460 | #include "confdefs.h" |
6461 | ||
6462 | int main() { | |
6463 | int i; | |
6464 | ; return 0; } | |
6465 | EOF | |
e27da16d | 6466 | if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6467 | rm -rf conftest* |
6468 | found=yes | |
6469 | else | |
6470 | echo "configure: failed program was:" >&5 | |
6471 | cat conftest.$ac_ext >&5 | |
6472 | rm -rf conftest* | |
6473 | found=no | |
6474 | fi | |
6475 | rm -f conftest* | |
6476 | LDFLAGS=$hold_ldflags | |
6477 | echo "$ac_t""$found" 1>&6 | |
6478 | if test $found = yes; then | |
6479 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
6480 | fi | |
6481 | fi | |
6482 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
6483 | # at one point. | |
6484 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
e27da16d | 6485 | echo "configure:6486: checking if <proc_service.h> is old" >&5 |
c906108c SS |
6486 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
6487 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6488 | else | |
6489 | ||
6490 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6491 | #line 6492 "configure" |
c906108c SS |
6492 | #include "confdefs.h" |
6493 | ||
6494 | #include <proc_service.h> | |
6495 | ps_err_e ps_pdwrite | |
6496 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
6497 | ||
6498 | int main() { | |
6499 | ||
6500 | ; return 0; } | |
6501 | EOF | |
e27da16d | 6502 | if { (eval echo configure:6503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
6503 | rm -rf conftest* |
6504 | gdb_cv_proc_service_is_old=no | |
6505 | else | |
6506 | echo "configure: failed program was:" >&5 | |
6507 | cat conftest.$ac_ext >&5 | |
6508 | rm -rf conftest* | |
6509 | gdb_cv_proc_service_is_old=yes | |
6510 | fi | |
6511 | rm -f conftest* | |
6512 | ||
6513 | fi | |
6514 | ||
6515 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
6516 | if test $gdb_cv_proc_service_is_old = yes; then | |
6517 | cat >> confdefs.h <<\EOF | |
6518 | #define PROC_SERVICE_IS_OLD 1 | |
6519 | EOF | |
6520 | ||
6521 | fi | |
6522 | else | |
6523 | echo "$ac_t""no" 1>&6 | |
6524 | fi | |
6525 | ;; | |
6526 | esac | |
6527 | ||
6528 | fi | |
6529 | ||
fb40c209 | 6530 | |
d318976c FN |
6531 | # Check whether --enable-gdbcli or --disable-gdbcli was given. |
6532 | if test "${enable_gdbcli+set}" = set; then | |
6533 | enableval="$enable_gdbcli" | |
6534 | ||
6bad8db2 FN |
6535 | case "${enableval}" in |
6536 | yes) enable_gdbcli=yes ;; | |
6537 | "") enable_gdbcli=yes ;; | |
d318976c FN |
6538 | no) |
6539 | { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; } | |
6540 | ;; | |
6541 | *) | |
6bad8db2 | 6542 | { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; } |
d318976c FN |
6543 | ;; |
6544 | esac | |
6545 | ||
6546 | else | |
6547 | enable_gdbcli=yes | |
6548 | fi | |
6549 | ||
6550 | case ${enable_gdbcli} in | |
6551 | "yes" ) | |
6bad8db2 | 6552 | if test -d "${srcdir}/cli" ; then |
d318976c FN |
6553 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)" |
6554 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)" | |
486697a0 | 6555 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)" |
d318976c FN |
6556 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)" |
6557 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)" | |
6558 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)" | |
6559 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)" | |
6560 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)" | |
6561 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)" | |
6562 | fi | |
6563 | ;; | |
6564 | esac | |
6565 | ||
6566 | ||
fb40c209 AC |
6567 | # Check whether --enable-gdbmi or --disable-gdbmi was given. |
6568 | if test "${enable_gdbmi+set}" = set; then | |
6569 | enableval="$enable_gdbmi" | |
6570 | ||
6571 | case "${enable_gdbmi}" in | |
6572 | yes | no) ;; | |
6573 | "") enable_gdbmi=yes ;; | |
6574 | *) | |
6575 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
6576 | ;; | |
6577 | esac | |
6578 | ||
b0e2e90a AC |
6579 | else |
6580 | enable_gdbmi=yes | |
fb40c209 AC |
6581 | fi |
6582 | ||
6583 | case ${enable_gdbmi} in | |
6584 | "yes" ) | |
6585 | if test -d "${srcdir}/mi" ; then | |
6586 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
6587 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
486697a0 | 6588 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)" |
fb40c209 | 6589 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" |
b0b1b869 | 6590 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
6591 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
6592 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
6593 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
6594 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
6595 | fi |
6596 | ;; | |
6597 | esac | |
c906108c | 6598 | |
b4df4f68 FN |
6599 | # Configure UI_OUT by default (before 5.2 it can be disabled) |
6600 | # It must be configured if gdbmi is configured | |
6601 | ||
6602 | UIOUT_CFLAGS= | |
6603 | ||
6604 | ||
6605 | # Check whether --with-uiout or --without-uiout was given. | |
6606 | if test "${with_uiout+set}" = set; then | |
6607 | withval="$with_uiout" | |
6608 | case "${withval}" in | |
6609 | yes) want_uiout=true ;; | |
6610 | no) if test $enable_gdbmi = yes; then | |
6611 | { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; } | |
6612 | else | |
6613 | want_uiout=false | |
6614 | fi ;; | |
6615 | *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;; | |
6616 | esac | |
6617 | else | |
6618 | want_uiout=true | |
6619 | fi | |
6620 | ||
6621 | if test $want_uiout = true; then | |
6622 | UIOUT_CFLAGS="-DUI_OUT=1" | |
6623 | fi | |
6624 | ||
c906108c SS |
6625 | # Check whether --enable-tui or --disable-tui was given. |
6626 | if test "${enable_tui+set}" = set; then | |
6627 | enableval="$enable_tui" | |
6628 | ||
6629 | case "${enable_tui}" in | |
6630 | yes | no) ;; | |
6631 | "") enable_tui=yes ;; | |
6632 | *) | |
6633 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
6634 | ;; | |
6635 | esac | |
6636 | ||
6637 | fi | |
6638 | ||
6639 | case ${enable_tui} in | |
6640 | "yes" ) | |
ed952ac5 AC |
6641 | if test -d "${srcdir}/tui" ; then |
6642 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
6643 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
486697a0 | 6644 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)" |
ed952ac5 AC |
6645 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" |
6646 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
6647 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
6648 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
6649 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
6650 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
6651 | fi | |
6652 | ;; | |
c906108c SS |
6653 | esac |
6654 | ||
c906108c SS |
6655 | # Check whether --enable-netrom or --disable-netrom was given. |
6656 | if test "${enable_netrom+set}" = set; then | |
6657 | enableval="$enable_netrom" | |
6658 | case "${enableval}" in | |
6659 | yes) enable_netrom=yes ;; | |
6660 | no) enable_netrom=no ;; | |
6661 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
6662 | esac | |
6663 | fi | |
6664 | ||
6665 | ||
6666 | if test "${enable_netrom}" = "yes"; then | |
66b965bb | 6667 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" |
c906108c SS |
6668 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" |
6669 | fi | |
6670 | ||
1decb323 | 6671 | |
3b851bce AC |
6672 | # NOTE: Don't add -Wall or -Wunused, they both include |
6673 | # -Wunused-parameter which reports bogus warnings. | |
6674 | # NOTE: If you add to this list, remember to update | |
6675 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 6676 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 6677 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
6678 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
6679 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 6680 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
6681 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
6682 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
6683 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
6684 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
6685 | if test "${enable_build_warnings+set}" = set; then | |
6686 | enableval="$enable_build_warnings" | |
1decb323 | 6687 | case "${enableval}" in |
c906108c SS |
6688 | yes) ;; |
6689 | no) build_warnings="-w";; | |
6690 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6691 | build_warnings="${build_warnings} ${t}";; | |
6692 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6693 | build_warnings="${t} ${build_warnings}";; | |
6694 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
6695 | esac | |
d4f3574e | 6696 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 6697 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 6698 | fi |
1decb323 | 6699 | fi |
3b851bce AC |
6700 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
6701 | if test "${enable_gdb_build_warnings+set}" = set; then | |
6702 | enableval="$enable_gdb_build_warnings" | |
6703 | case "${enableval}" in | |
6704 | yes) ;; | |
6705 | no) build_warnings="-w";; | |
6706 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6707 | build_warnings="${build_warnings} ${t}";; | |
6708 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6709 | build_warnings="${t} ${build_warnings}";; | |
6710 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
6711 | esac | |
6712 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
6713 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
6714 | fi | |
6715 | fi | |
104c1213 JM |
6716 | WARN_CFLAGS="" |
6717 | WERROR_CFLAGS="" | |
c906108c SS |
6718 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
6719 | then | |
746a987d | 6720 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
e27da16d | 6721 | echo "configure:6722: checking compiler warning flags" >&5 |
746a987d AC |
6722 | # Separate out the -Werror flag as some files just cannot be |
6723 | # compiled with it enabled. | |
6724 | for w in ${build_warnings}; do | |
6725 | case $w in | |
6726 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
6727 | *) # Check that GCC accepts it | |
4536bbc6 AC |
6728 | saved_CFLAGS="$CFLAGS" |
6729 | CFLAGS="$CFLAGS $w" | |
6730 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6731 | #line 6732 "configure" |
4536bbc6 AC |
6732 | #include "confdefs.h" |
6733 | ||
6734 | int main() { | |
6735 | ||
6736 | ; return 0; } | |
6737 | EOF | |
e27da16d | 6738 | if { (eval echo configure:6739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
6739 | rm -rf conftest* |
6740 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
6741 | else | |
6742 | echo "configure: failed program was:" >&5 | |
6743 | cat conftest.$ac_ext >&5 | |
6744 | fi | |
6745 | rm -f conftest* | |
6746 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
6747 | esac |
6748 | done | |
6749 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
6750 | fi |
6751 | ||
6752 | ||
104c1213 | 6753 | |
c906108c SS |
6754 | MMALLOC_CFLAGS= |
6755 | MMALLOC= | |
6756 | ||
6757 | ||
6758 | ||
6759 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
6760 | if test "${with_mmalloc+set}" = set; then | |
6761 | withval="$with_mmalloc" | |
6762 | case "${withval}" in | |
6763 | yes) want_mmalloc=true ;; | |
6764 | no) want_mmalloc=false;; | |
6765 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
6766 | esac | |
6767 | else | |
6768 | want_mmalloc=false | |
6769 | fi | |
6770 | ||
6771 | if test x$want_mmalloc = xtrue; then | |
6772 | cat >> confdefs.h <<\EOF | |
6773 | #define USE_MMALLOC 1 | |
6774 | EOF | |
6775 | ||
6776 | cat >> confdefs.h <<\EOF | |
6777 | #define MMCHECK_FORCE 1 | |
6778 | EOF | |
6779 | ||
6780 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
6781 | MMALLOC='../mmalloc/libmmalloc.a' | |
6782 | fi | |
6783 | ||
88987551 L |
6784 | # Check whether --with-included-regex or --without-included-regex was given. |
6785 | if test "${with_included_regex+set}" = set; then | |
6786 | withval="$with_included_regex" | |
6787 | case "${withval}" in | |
6788 | yes) want_included_regex=true ;; | |
6789 | no) want_included_regex=false;; | |
6790 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
6791 | esac | |
6792 | else | |
6793 | want_included_regex=true | |
6794 | fi | |
6795 | ||
88987551 L |
6796 | if test $want_included_regex = false; then |
6797 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
e27da16d | 6798 | echo "configure:6799: checking for GNU regex" >&5 |
88987551 L |
6799 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6800 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6801 | else | |
6802 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6803 | #line 6804 "configure" |
88987551 L |
6804 | #include "confdefs.h" |
6805 | #include <gnu-versions.h> | |
6806 | #include <sys/types.h> | |
6807 | #include <regex.h> | |
6808 | int main() { | |
6809 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
6810 | #error No valid GNU regex. | |
6811 | #endif | |
6812 | ||
6813 | ; return 0; } | |
6814 | EOF | |
e27da16d | 6815 | if { (eval echo configure:6816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
6816 | rm -rf conftest* |
6817 | gdb_cv_have_gnu_regex=yes | |
6818 | else | |
6819 | echo "configure: failed program was:" >&5 | |
6820 | cat conftest.$ac_ext >&5 | |
6821 | rm -rf conftest* | |
6822 | gdb_cv_have_gnu_regex=no | |
6823 | fi | |
6824 | rm -f conftest* | |
6825 | fi | |
6826 | ||
6827 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
6828 | if test $gdb_cv_have_gnu_regex = no; then |
6829 | want_included_regex=true | |
88987551 L |
6830 | fi |
6831 | fi | |
6832 | ||
e48f66e4 AC |
6833 | if test x${want_included_regex} = xtrue; then |
6834 | REGEX="gnu-regex.o" | |
6835 | cat >> confdefs.h <<\EOF | |
6836 | #define USE_INCLUDED_REGEX 1 | |
6837 | EOF | |
6838 | ||
6839 | fi | |
88987551 | 6840 | |
7a292a7a SS |
6841 | |
6842 | # In the Cygwin environment, we need some additional flags. | |
6843 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
e27da16d | 6844 | echo "configure:6845: checking for cygwin" >&5 |
7a292a7a SS |
6845 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
6846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6847 | else | |
6848 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6849 | #line 6850 "configure" |
7a292a7a SS |
6850 | #include "confdefs.h" |
6851 | ||
6852 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
6853 | lose | |
6854 | #endif | |
6855 | EOF | |
6856 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6857 | egrep "lose" >/dev/null 2>&1; then | |
6858 | rm -rf conftest* | |
6859 | gdb_cv_os_cygwin=yes | |
6860 | else | |
6861 | rm -rf conftest* | |
6862 | gdb_cv_os_cygwin=no | |
6863 | fi | |
6864 | rm -f conftest* | |
6865 | ||
6866 | fi | |
6867 | ||
6868 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
6869 | ||
aff38e61 AC |
6870 | |
6871 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
6872 | case ${host} in | |
95cbc983 AC |
6873 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
6874 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
6875 | esac |
6876 | ||
6877 | ||
6878 | ||
b83266a0 SS |
6879 | if test x$gdb_host = xgo32; then |
6880 | TERM_LIB= | |
6881 | else | |
c906108c SS |
6882 | if test x$gdb_cv_os_cygwin = xyes; then |
6883 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
6884 | else | |
6885 | TERM_LIB= | |
6886 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
e27da16d | 6887 | echo "configure:6888: checking for tgetent in -lncurses" >&5 |
c906108c SS |
6888 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
6889 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6890 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6891 | else | |
6892 | ac_save_LIBS="$LIBS" | |
6893 | LIBS="-lncurses $LIBS" | |
6894 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6895 | #line 6896 "configure" |
c906108c SS |
6896 | #include "confdefs.h" |
6897 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6898 | /* We use char because int might match the return type of a gcc2 | |
6899 | builtin and then its argument prototype would still apply. */ | |
6900 | char tgetent(); | |
6901 | ||
6902 | int main() { | |
6903 | tgetent() | |
6904 | ; return 0; } | |
6905 | EOF | |
e27da16d | 6906 | if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6907 | rm -rf conftest* |
6908 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6909 | else | |
6910 | echo "configure: failed program was:" >&5 | |
6911 | cat conftest.$ac_ext >&5 | |
6912 | rm -rf conftest* | |
6913 | eval "ac_cv_lib_$ac_lib_var=no" | |
6914 | fi | |
6915 | rm -f conftest* | |
6916 | LIBS="$ac_save_LIBS" | |
6917 | ||
6918 | fi | |
6919 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6920 | echo "$ac_t""yes" 1>&6 | |
6921 | TERM_LIB=-lncurses | |
6922 | else | |
6923 | echo "$ac_t""no" 1>&6 | |
6924 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
e27da16d | 6925 | echo "configure:6926: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
6926 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
6927 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6928 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6929 | else | |
6930 | ac_save_LIBS="$LIBS" | |
6931 | LIBS="-lHcurses $LIBS" | |
6932 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6933 | #line 6934 "configure" |
c906108c SS |
6934 | #include "confdefs.h" |
6935 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6936 | /* We use char because int might match the return type of a gcc2 | |
6937 | builtin and then its argument prototype would still apply. */ | |
6938 | char tgetent(); | |
6939 | ||
6940 | int main() { | |
6941 | tgetent() | |
6942 | ; return 0; } | |
6943 | EOF | |
e27da16d | 6944 | if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6945 | rm -rf conftest* |
6946 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6947 | else | |
6948 | echo "configure: failed program was:" >&5 | |
6949 | cat conftest.$ac_ext >&5 | |
6950 | rm -rf conftest* | |
6951 | eval "ac_cv_lib_$ac_lib_var=no" | |
6952 | fi | |
6953 | rm -f conftest* | |
6954 | LIBS="$ac_save_LIBS" | |
6955 | ||
6956 | fi | |
6957 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6958 | echo "$ac_t""yes" 1>&6 | |
6959 | TERM_LIB=-lHcurses | |
6960 | else | |
6961 | echo "$ac_t""no" 1>&6 | |
6962 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
e27da16d | 6963 | echo "configure:6964: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
6964 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
6965 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6966 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6967 | else | |
6968 | ac_save_LIBS="$LIBS" | |
6969 | LIBS="-ltermlib $LIBS" | |
6970 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 6971 | #line 6972 "configure" |
c906108c SS |
6972 | #include "confdefs.h" |
6973 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6974 | /* We use char because int might match the return type of a gcc2 | |
6975 | builtin and then its argument prototype would still apply. */ | |
6976 | char tgetent(); | |
6977 | ||
6978 | int main() { | |
6979 | tgetent() | |
6980 | ; return 0; } | |
6981 | EOF | |
e27da16d | 6982 | if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6983 | rm -rf conftest* |
6984 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6985 | else | |
6986 | echo "configure: failed program was:" >&5 | |
6987 | cat conftest.$ac_ext >&5 | |
6988 | rm -rf conftest* | |
6989 | eval "ac_cv_lib_$ac_lib_var=no" | |
6990 | fi | |
6991 | rm -f conftest* | |
6992 | LIBS="$ac_save_LIBS" | |
6993 | ||
6994 | fi | |
6995 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6996 | echo "$ac_t""yes" 1>&6 | |
6997 | TERM_LIB=-ltermlib | |
6998 | else | |
6999 | echo "$ac_t""no" 1>&6 | |
7000 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
e27da16d | 7001 | echo "configure:7002: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
7002 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
7003 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
7004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7005 | else | |
7006 | ac_save_LIBS="$LIBS" | |
7007 | LIBS="-ltermcap $LIBS" | |
7008 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 7009 | #line 7010 "configure" |
c906108c SS |
7010 | #include "confdefs.h" |
7011 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7012 | /* We use char because int might match the return type of a gcc2 | |
7013 | builtin and then its argument prototype would still apply. */ | |
7014 | char tgetent(); | |
7015 | ||
7016 | int main() { | |
7017 | tgetent() | |
7018 | ; return 0; } | |
7019 | EOF | |
e27da16d | 7020 | if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7021 | rm -rf conftest* |
7022 | eval "ac_cv_lib_$ac_lib_var=yes" | |
7023 | else | |
7024 | echo "configure: failed program was:" >&5 | |
7025 | cat conftest.$ac_ext >&5 | |
7026 | rm -rf conftest* | |
7027 | eval "ac_cv_lib_$ac_lib_var=no" | |
7028 | fi | |
7029 | rm -f conftest* | |
7030 | LIBS="$ac_save_LIBS" | |
7031 | ||
7032 | fi | |
7033 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
7034 | echo "$ac_t""yes" 1>&6 | |
7035 | TERM_LIB=-ltermcap | |
7036 | else | |
7037 | echo "$ac_t""no" 1>&6 | |
7038 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
e27da16d | 7039 | echo "configure:7040: checking for tgetent in -lcurses" >&5 |
c906108c SS |
7040 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
7041 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
7042 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7043 | else | |
7044 | ac_save_LIBS="$LIBS" | |
7045 | LIBS="-lcurses $LIBS" | |
7046 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 7047 | #line 7048 "configure" |
c906108c SS |
7048 | #include "confdefs.h" |
7049 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7050 | /* We use char because int might match the return type of a gcc2 | |
7051 | builtin and then its argument prototype would still apply. */ | |
7052 | char tgetent(); | |
7053 | ||
7054 | int main() { | |
7055 | tgetent() | |
7056 | ; return 0; } | |
7057 | EOF | |
e27da16d | 7058 | if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7059 | rm -rf conftest* |
7060 | eval "ac_cv_lib_$ac_lib_var=yes" | |
7061 | else | |
7062 | echo "configure: failed program was:" >&5 | |
7063 | cat conftest.$ac_ext >&5 | |
7064 | rm -rf conftest* | |
7065 | eval "ac_cv_lib_$ac_lib_var=no" | |
7066 | fi | |
7067 | rm -f conftest* | |
7068 | LIBS="$ac_save_LIBS" | |
7069 | ||
7070 | fi | |
7071 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
7072 | echo "$ac_t""yes" 1>&6 | |
7073 | TERM_LIB=-lcurses | |
7074 | else | |
7075 | echo "$ac_t""no" 1>&6 | |
7076 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
e27da16d | 7077 | echo "configure:7078: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
7078 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
7079 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
7080 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7081 | else | |
7082 | ac_save_LIBS="$LIBS" | |
7083 | LIBS="-lterminfo $LIBS" | |
7084 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 7085 | #line 7086 "configure" |
c906108c SS |
7086 | #include "confdefs.h" |
7087 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7088 | /* We use char because int might match the return type of a gcc2 | |
7089 | builtin and then its argument prototype would still apply. */ | |
7090 | char tgetent(); | |
7091 | ||
7092 | int main() { | |
7093 | tgetent() | |
7094 | ; return 0; } | |
7095 | EOF | |
e27da16d | 7096 | if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7097 | rm -rf conftest* |
7098 | eval "ac_cv_lib_$ac_lib_var=yes" | |
7099 | else | |
7100 | echo "configure: failed program was:" >&5 | |
7101 | cat conftest.$ac_ext >&5 | |
7102 | rm -rf conftest* | |
7103 | eval "ac_cv_lib_$ac_lib_var=no" | |
7104 | fi | |
7105 | rm -f conftest* | |
7106 | LIBS="$ac_save_LIBS" | |
7107 | ||
7108 | fi | |
7109 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
7110 | echo "$ac_t""yes" 1>&6 | |
7111 | TERM_LIB=-lterminfo | |
7112 | else | |
7113 | echo "$ac_t""no" 1>&6 | |
7114 | fi | |
7115 | ||
7116 | fi | |
7117 | ||
7118 | fi | |
7119 | ||
7120 | fi | |
7121 | ||
7122 | fi | |
7123 | ||
7124 | fi | |
7125 | ||
7126 | ||
7127 | if test "x$TERM_LIB" = x | |
7128 | then | |
7129 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
7130 | fi | |
7131 | fi | |
b83266a0 | 7132 | fi |
c906108c SS |
7133 | |
7134 | ||
cd0fc7c3 SS |
7135 | # libreadline needs libuser32.a in a cygwin environment |
7136 | WIN32LIBS= | |
7137 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
7138 | WIN32LIBS="-luser32" |
7139 | case "${target}" in | |
7140 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
7141 | ;; | |
7142 | esac | |
cd0fc7c3 | 7143 | fi |
c906108c | 7144 | |
7a292a7a | 7145 | |
3fc11d3e JM |
7146 | LIBGUI="../libgui/src/libgui.a" |
7147 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
7148 | ||
7149 | ||
7a292a7a | 7150 | |
8b93c638 JM |
7151 | # Check whether --with-cpu or --without-cpu was given. |
7152 | if test "${with_cpu+set}" = set; then | |
7153 | withval="$with_cpu" | |
7154 | case "${target}" in | |
7155 | powerpc-* | powerpcle-* ) | |
7156 | ## It would be nice to keep this table in sync with the one in | |
7157 | ## gcc/configure. | |
7158 | case "${with_cpu}" in | |
7159 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
7160 | | 604 | 750 ) | |
7161 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
7162 | ;; | |
7163 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
7164 | ## These are all RS6000 variants, as far as GDB is concerned. | |
7165 | with_cpu=rs6000 | |
7166 | ;; | |
7167 | 603e | ec603e ) | |
7168 | with_cpu=603 | |
7169 | ;; | |
7170 | 604e ) | |
7171 | with_cpu=604 | |
7172 | ;; | |
7173 | * ) | |
7174 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
7175 | with_cpu=ppc-uisa | |
7176 | ;; | |
7177 | esac | |
7178 | ;; | |
7179 | * ) | |
7180 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
7181 | ;; | |
7182 | esac | |
7183 | cat >> confdefs.h <<EOF | |
7184 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
7185 | EOF | |
7186 | ||
7187 | ||
7188 | fi | |
7189 | ||
7190 | ||
7191 | ||
3fc11d3e JM |
7192 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
7193 | if test "${enable_gdbtk+set}" = set; then | |
7194 | enableval="$enable_gdbtk" | |
7195 | case "${enableval}" in | |
7196 | yes) | |
7197 | case "$host" in | |
7198 | *go32*) | |
7199 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
7200 | enable_gdbtk=no ;; | |
7201 | *windows*) | |
7202 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
7203 | enable_gdbtk=no ;; | |
7204 | *) | |
7205 | enable_gdbtk=yes ;; | |
7206 | esac ;; | |
7207 | no) | |
7208 | enable_gdbtk=no ;; | |
7209 | *) | |
7210 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
7211 | esac | |
7212 | else | |
7213 | ||
7214 | # Default is on for everything but go32 and Cygwin | |
7215 | case "$host" in | |
7216 | *go32* | *windows*) | |
7217 | ;; | |
7218 | *) | |
379d6434 AC |
7219 | if test -d "${srcdir}/gdbtk" ; then |
7220 | enable_gdbtk=yes | |
7221 | fi | |
7222 | ;; | |
7223 | esac | |
3fc11d3e JM |
7224 | |
7225 | fi | |
7226 | ||
7227 | ||
7228 | WIN32LDAPP= | |
7229 | ||
7230 | ||
7231 | ||
7232 | configdir="unix" | |
7233 | ||
7234 | GDBTKLIBS= | |
7235 | if test "${enable_gdbtk}" = "yes"; then | |
7236 | ||
d1c3b63a KS |
7237 | # Gdbtk must have an absolute path to srcdir in order to run |
7238 | # properly when not installed. | |
7239 | here=`pwd` | |
7240 | cd ${srcdir} | |
7241 | GDBTK_SRC_DIR=`pwd` | |
7242 | cd $here | |
7243 | ||
3fc11d3e JM |
7244 | |
7245 | # | |
7246 | # Ok, lets find the tcl configuration | |
7247 | # First, look for one uninstalled. | |
7248 | # the alternative search directory is invoked by --with-tclconfig | |
7249 | # | |
7250 | ||
7251 | if test x"${no_tcl}" = x ; then | |
7252 | # we reset no_tcl in case something fails here | |
7253 | no_tcl=true | |
7254 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
7255 | if test "${with_tclconfig+set}" = set; then | |
7256 | withval="$with_tclconfig" | |
7257 | with_tclconfig=${withval} | |
7258 | fi | |
7259 | ||
7260 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
e27da16d | 7261 | echo "configure:7262: checking for Tcl configuration" >&5 |
3fc11d3e JM |
7262 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
7263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7264 | else | |
7265 | ||
7266 | ||
7267 | # First check to see if --with-tclconfig was specified. | |
7268 | if test x"${with_tclconfig}" != x ; then | |
7269 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
7270 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
7271 | else | |
7272 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
7273 | fi | |
7274 | fi | |
7275 | ||
7276 | # then check for a private Tcl installation | |
7277 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7278 | for i in \ | |
7279 | ../tcl \ | |
7280 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
7281 | ../../tcl \ | |
7282 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
7283 | ../../../tcl \ | |
7284 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
7285 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
7286 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
7287 | break | |
7288 | fi | |
7289 | done | |
7290 | fi | |
7291 | # check in a few common install locations | |
7292 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7293 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7294 | if test -f "$i/tclConfig.sh" ; then | |
7295 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
7296 | break | |
7297 | fi | |
7298 | done | |
7299 | fi | |
7300 | # check in a few other private locations | |
7301 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7302 | for i in \ | |
7303 | ${srcdir}/../tcl \ | |
7304 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
7305 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
7306 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
7307 | break | |
7308 | fi | |
7309 | done | |
7310 | fi | |
7311 | ||
7312 | fi | |
7313 | ||
7314 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7315 | TCLCONFIG="# no Tcl configs found" | |
7316 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
7317 | else | |
7318 | no_tcl= | |
7319 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
7320 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
7321 | fi | |
7322 | fi | |
7323 | ||
7324 | if test -z "${no_tcl}"; then | |
7325 | ||
7326 | . $TCLCONFIG | |
7327 | ||
7328 | ||
7329 | ||
7330 | ||
7331 | ||
7332 | ||
7333 | ||
7334 | ||
7335 | ||
7336 | ||
7337 | ||
7338 | ||
7339 | ||
7340 | ||
7341 | ||
7342 | ||
7343 | ||
7344 | ||
7345 | ||
7346 | ||
7347 | ||
7348 | ||
7349 | ||
7350 | ||
7351 | ||
7352 | ||
7353 | # | |
7354 | # Ok, lets find the tk configuration | |
7355 | # First, look for one uninstalled. | |
7356 | # the alternative search directory is invoked by --with-tkconfig | |
7357 | # | |
7358 | ||
7359 | if test x"${no_tk}" = x ; then | |
7360 | # we reset no_tk in case something fails here | |
7361 | no_tk=true | |
7362 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
7363 | if test "${with_tkconfig+set}" = set; then | |
7364 | withval="$with_tkconfig" | |
7365 | with_tkconfig=${withval} | |
7366 | fi | |
7367 | ||
7368 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
e27da16d | 7369 | echo "configure:7370: checking for Tk configuration" >&5 |
3fc11d3e JM |
7370 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
7371 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7372 | else | |
7373 | ||
7374 | ||
7375 | # First check to see if --with-tkconfig was specified. | |
7376 | if test x"${with_tkconfig}" != x ; then | |
7377 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
7378 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
7379 | else | |
7380 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
7381 | fi | |
7382 | fi | |
7383 | ||
7384 | # then check for a private Tk library | |
7385 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7386 | for i in \ | |
7387 | ../tk \ | |
7388 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
7389 | ../../tk \ | |
7390 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
7391 | ../../../tk \ | |
7392 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
7393 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
7394 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
7395 | break | |
7396 | fi | |
7397 | done | |
7398 | fi | |
7399 | # check in a few common install locations | |
7400 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7401 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7402 | if test -f "$i/tkConfig.sh" ; then | |
7403 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
7404 | break | |
7405 | fi | |
7406 | done | |
7407 | fi | |
7408 | # check in a few other private locations | |
7409 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7410 | for i in \ | |
7411 | ${srcdir}/../tk \ | |
7412 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
7413 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
7414 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
7415 | break | |
7416 | fi | |
7417 | done | |
7418 | fi | |
7419 | ||
7420 | fi | |
7421 | ||
7422 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7423 | TKCONFIG="# no Tk configs found" | |
7424 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
7425 | else | |
7426 | no_tk= | |
7427 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
7428 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
7429 | fi | |
7430 | fi | |
7431 | ||
7432 | ||
7433 | ||
dd2504ab JM |
7434 | # now look for Tcl library stuff |
7435 | ||
7436 | case "${host}" in | |
7437 | *-*-cygwin*) | |
7438 | tcldir=../tcl/win/ | |
7439 | ;; | |
7440 | *) | |
7441 | tcldir=../tcl/unix/ | |
7442 | ;; | |
7443 | esac | |
7444 | ||
7445 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
7446 | ||
3fc11d3e JM |
7447 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
7448 | # point to doing Tcl. | |
7449 | if test -z "${no_tk}"; then | |
7450 | ||
7451 | if test -f "$TKCONFIG" ; then | |
7452 | . $TKCONFIG | |
7453 | fi | |
7454 | ||
7455 | ||
7456 | ||
7457 | ||
7458 | ||
7459 | ||
7460 | ||
7461 | ||
7462 | ||
7463 | ||
7464 | ||
7465 | ||
7466 | ||
7467 | ||
7468 | # | |
7469 | # Ok, lets find the tcl source trees so we can use the headers | |
7470 | # Warning: transition of version 9 to 10 will break this algorithm | |
7471 | # because 10 sorts before 9. We also look for just tcl. We have to | |
7472 | # be careful that we don't match stuff like tclX by accident. | |
7473 | # the alternative search directory is involked by --with-tclinclude | |
7474 | # | |
7475 | ||
7476 | no_tcl=true | |
7477 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
e27da16d | 7478 | echo "configure:7479: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
7479 | # Check whether --with-tclinclude or --without-tclinclude was given. |
7480 | if test "${with_tclinclude+set}" = set; then | |
7481 | withval="$with_tclinclude" | |
7482 | with_tclinclude=${withval} | |
7483 | fi | |
7484 | ||
7485 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
7486 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7487 | else | |
7488 | ||
7489 | # first check to see if --with-tclinclude was specified | |
7490 | if test x"${with_tclinclude}" != x ; then | |
7491 | if test -f ${with_tclinclude}/tclInt.h ; then | |
7492 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
7493 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
7494 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
7495 | else | |
7496 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
7497 | fi | |
7498 | fi | |
7499 | ||
7500 | # next check if it came with Tcl configuration file | |
7501 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7502 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
7503 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
7504 | fi | |
7505 | fi | |
7506 | ||
7507 | # next check in private source directory | |
7508 | # | |
7509 | # since ls returns lowest version numbers first, reverse its output | |
7510 | if test x"${ac_cv_c_tclh}" = x ; then | |
7511 | for i in \ | |
7512 | ${srcdir}/../tcl \ | |
7513 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
7514 | ${srcdir}/../../tcl \ | |
7515 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
7516 | ${srcdir}/../../../tcl \ | |
7517 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
7518 | if test -f $i/generic/tclInt.h ; then | |
7519 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
7520 | break | |
7521 | fi | |
7522 | done | |
7523 | fi | |
7524 | # finally check in a few common install locations | |
7525 | # | |
7526 | # since ls returns lowest version numbers first, reverse its output | |
7527 | if test x"${ac_cv_c_tclh}" = x ; then | |
7528 | for i in \ | |
7529 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
7530 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
7531 | /usr/local/src/tcl \ | |
7532 | /usr/local/lib/tcl \ | |
7533 | ${prefix}/include ; do | |
7534 | if test -f $i/generic/tclInt.h ; then | |
7535 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
7536 | break | |
7537 | fi | |
7538 | done | |
7539 | fi | |
7540 | # see if one is installed | |
7541 | if test x"${ac_cv_c_tclh}" = x ; then | |
7542 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
7543 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
e27da16d | 7544 | echo "configure:7545: checking for tclInt.h" >&5 |
3fc11d3e JM |
7545 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
7546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7547 | else | |
7548 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 7549 | #line 7550 "configure" |
3fc11d3e JM |
7550 | #include "confdefs.h" |
7551 | #include <tclInt.h> | |
7552 | EOF | |
7553 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 7554 | { (eval echo configure:7555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
7555 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7556 | if test -z "$ac_err"; then | |
7557 | rm -rf conftest* | |
7558 | eval "ac_cv_header_$ac_safe=yes" | |
7559 | else | |
7560 | echo "$ac_err" >&5 | |
7561 | echo "configure: failed program was:" >&5 | |
7562 | cat conftest.$ac_ext >&5 | |
7563 | rm -rf conftest* | |
7564 | eval "ac_cv_header_$ac_safe=no" | |
7565 | fi | |
7566 | rm -f conftest* | |
7567 | fi | |
7568 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
7569 | echo "$ac_t""yes" 1>&6 | |
7570 | ac_cv_c_tclh=installed | |
7571 | else | |
7572 | echo "$ac_t""no" 1>&6 | |
7573 | ac_cv_c_tclh="" | |
7574 | fi | |
7575 | ||
7576 | fi | |
7577 | ||
7578 | fi | |
7579 | ||
7580 | if test x"${ac_cv_c_tclh}" = x ; then | |
7581 | TCLHDIR="# no Tcl private headers found" | |
7582 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
7583 | fi | |
7584 | if test x"${ac_cv_c_tclh}" != x ; then | |
7585 | no_tcl="" | |
7586 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
7587 | echo "$ac_t""is installed" 1>&6 | |
7588 | TCLHDIR="" | |
7589 | else | |
7590 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
7591 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
7592 | TCLHDIR="-I${ac_cv_c_tclh}" | |
7593 | fi | |
7594 | fi | |
7595 | ||
7596 | ||
7597 | ||
7598 | ||
7599 | # | |
7600 | # Ok, lets find the tk source trees so we can use the headers | |
7601 | # If the directory (presumably symlink) named "tk" exists, use that one | |
7602 | # in preference to any others. Same logic is used when choosing library | |
7603 | # and again with Tcl. The search order is the best place to look first, then in | |
7604 | # decreasing significance. The loop breaks if the trigger file is found. | |
7605 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
7606 | # directory. This converts the path from a relative to an absolute, so | |
7607 | # recursive cache variables for the path will work right. We check all | |
7608 | # the possible paths in one loop rather than many seperate loops to speed | |
7609 | # things up. | |
7610 | # the alternative search directory is involked by --with-tkinclude | |
7611 | # | |
7612 | no_tk=true | |
7613 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
e27da16d | 7614 | echo "configure:7615: checking for Tk private headers" >&5 |
3fc11d3e JM |
7615 | # Check whether --with-tkinclude or --without-tkinclude was given. |
7616 | if test "${with_tkinclude+set}" = set; then | |
7617 | withval="$with_tkinclude" | |
7618 | with_tkinclude=${withval} | |
7619 | fi | |
7620 | ||
7621 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
7622 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7623 | else | |
7624 | ||
7625 | # first check to see if --with-tkinclude was specified | |
7626 | if test x"${with_tkinclude}" != x ; then | |
7627 | if test -f ${with_tkinclude}/tk.h ; then | |
7628 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
7629 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
7630 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
7631 | else | |
7632 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
7633 | fi | |
7634 | fi | |
7635 | ||
7636 | # next check if it came with Tk configuration file | |
7637 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7638 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
7639 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
7640 | fi | |
7641 | fi | |
7642 | ||
7643 | # next check in private source directory | |
7644 | # | |
7645 | # since ls returns lowest version numbers first, reverse its output | |
7646 | if test x"${ac_cv_c_tkh}" = x ; then | |
7647 | for i in \ | |
7648 | ${srcdir}/../tk \ | |
7649 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
7650 | ${srcdir}/../../tk \ | |
7651 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
7652 | ${srcdir}/../../../tk \ | |
7653 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
7654 | if test -f $i/generic/tk.h ; then | |
7655 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
7656 | break | |
7657 | fi | |
7658 | done | |
7659 | fi | |
7660 | # finally check in a few common install locations | |
7661 | # | |
7662 | # since ls returns lowest version numbers first, reverse its output | |
7663 | if test x"${ac_cv_c_tkh}" = x ; then | |
7664 | for i in \ | |
7665 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
7666 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
7667 | /usr/local/src/tk \ | |
7668 | /usr/local/lib/tk \ | |
7669 | ${prefix}/include ; do | |
7670 | if test -f $i/generic/tk.h ; then | |
7671 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
7672 | break | |
7673 | fi | |
7674 | done | |
7675 | fi | |
7676 | # see if one is installed | |
7677 | if test x"${ac_cv_c_tkh}" = x ; then | |
7678 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
7679 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
e27da16d | 7680 | echo "configure:7681: checking for tk.h" >&5 |
3fc11d3e JM |
7681 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
7682 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7683 | else | |
7684 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 7685 | #line 7686 "configure" |
3fc11d3e JM |
7686 | #include "confdefs.h" |
7687 | #include <tk.h> | |
7688 | EOF | |
7689 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 7690 | { (eval echo configure:7691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
7691 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7692 | if test -z "$ac_err"; then | |
7693 | rm -rf conftest* | |
7694 | eval "ac_cv_header_$ac_safe=yes" | |
7695 | else | |
7696 | echo "$ac_err" >&5 | |
7697 | echo "configure: failed program was:" >&5 | |
7698 | cat conftest.$ac_ext >&5 | |
7699 | rm -rf conftest* | |
7700 | eval "ac_cv_header_$ac_safe=no" | |
7701 | fi | |
7702 | rm -f conftest* | |
7703 | fi | |
7704 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
7705 | echo "$ac_t""yes" 1>&6 | |
7706 | ac_cv_c_tkh=installed | |
7707 | else | |
7708 | echo "$ac_t""no" 1>&6 | |
7709 | ac_cv_c_tkh="" | |
7710 | fi | |
7711 | ||
7712 | fi | |
7713 | ||
7714 | fi | |
7715 | ||
7716 | if test x"${ac_cv_c_tkh}" != x ; then | |
7717 | no_tk="" | |
7718 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
7719 | echo "$ac_t""is installed" 1>&6 | |
7720 | TKHDIR="" | |
7721 | else | |
7722 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
7723 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
7724 | TKHDIR="-I${ac_cv_c_tkh}" | |
7725 | fi | |
7726 | else | |
7727 | TKHDIR="# no Tk directory found" | |
7728 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
7729 | no_tk=true | |
7730 | fi | |
7731 | ||
7732 | ||
7733 | ||
7734 | ||
7735 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
e27da16d | 7736 | echo "configure:7737: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
7737 | if test x"${ac_cv_c_itclh}" = x ; then |
7738 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
7739 | if test -f $i/generic/itcl.h ; then | |
7740 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
7741 | break | |
7742 | fi | |
7743 | done | |
7744 | fi | |
7745 | if test x"${ac_cv_c_itclh}" = x ; then | |
7746 | ITCLHDIR="# no Itcl private headers found" | |
7747 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
7748 | fi | |
7749 | if test x"${ac_cv_c_itclh}" != x ; then | |
7750 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
7751 | fi | |
7752 | # should always be here | |
7753 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
7754 | ||
7755 | #AC_SUBST(ITCLLIB) | |
7756 | ||
7757 | ||
7758 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
e27da16d | 7759 | echo "configure:7760: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
7760 | if test x"${ac_cv_c_itkh}" = x ; then |
7761 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
7762 | if test -f $i/generic/itk.h ; then | |
7763 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
7764 | break | |
7765 | fi | |
7766 | done | |
7767 | fi | |
7768 | if test x"${ac_cv_c_itkh}" = x ; then | |
7769 | ITKHDIR="# no Itk private headers found" | |
7770 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
7771 | fi | |
7772 | if test x"${ac_cv_c_itkh}" != x ; then | |
7773 | ITKHDIR="-I${ac_cv_c_itkh}" | |
7774 | fi | |
7775 | # should always be here | |
7776 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
7777 | ||
7778 | #AC_SUBST(ITKLIB) | |
7779 | ||
7780 | ||
7781 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
e27da16d | 7782 | echo "configure:7783: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
7783 | if test x"${ac_cv_c_tixh}" = x ; then |
7784 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
7785 | if test -f $i/generic/tix.h ; then | |
7786 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
7787 | break | |
7788 | fi | |
7789 | done | |
7790 | fi | |
7791 | if test x"${ac_cv_c_tixh}" = x ; then | |
7792 | TIXHDIR="# no Tix private headers found" | |
7793 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
7794 | fi | |
7795 | if test x"${ac_cv_c_tixh}" != x ; then | |
7796 | TIXHDIR="-I${ac_cv_c_tixh}" | |
7797 | fi | |
7798 | ||
7799 | ||
7800 | ||
dd2504ab JM |
7801 | |
7802 | # now look for Tk library stuff | |
7803 | ||
7804 | case "${host}" in | |
7805 | *-*-cygwin*) | |
7806 | tkdir=../tk/win/ | |
7807 | ;; | |
7808 | *) | |
7809 | tkdir=../tk/unix/ | |
7810 | ;; | |
7811 | esac | |
7812 | ||
7813 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
7814 | ||
3fc11d3e JM |
7815 | # now look for Itcl library stuff |
7816 | ||
7817 | ||
7818 | # | |
7819 | # Ok, lets find the itcl configuration | |
7820 | # First, look for one uninstalled. | |
7821 | # the alternative search directory is invoked by --with-itclconfig | |
7822 | # | |
7823 | ||
7824 | if test x"${no_itcl}" = x ; then | |
7825 | # we reset no_itcl in case something fails here | |
7826 | no_itcl=true | |
7827 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
7828 | if test "${with_itclconfig+set}" = set; then | |
7829 | withval="$with_itclconfig" | |
7830 | with_itclconfig=${withval} | |
7831 | fi | |
7832 | ||
7833 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
e27da16d | 7834 | echo "configure:7835: checking for Itcl configuration" >&5 |
3fc11d3e JM |
7835 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
7836 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7837 | else | |
7838 | ||
7839 | ||
7840 | # First check to see if --with-itclconfig was specified. | |
7841 | if test x"${with_itclconfig}" != x ; then | |
7842 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
7843 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
7844 | else | |
7845 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
7846 | fi | |
7847 | fi | |
7848 | ||
7849 | # then check for a private Itcl library | |
7850 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7851 | for i in \ | |
7852 | ../itcl/itcl \ | |
7853 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
7854 | ../../itcl \ | |
7855 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
7856 | ../../../itcl \ | |
7857 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
7858 | if test -f "$i/itclConfig.sh" ; then | |
7859 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
7860 | break | |
7861 | fi | |
7862 | done | |
7863 | fi | |
7864 | # check in a few common install locations | |
7865 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7866 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7867 | if test -f "$i/itclConfig.sh" ; then | |
7868 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
7869 | break | |
7870 | fi | |
7871 | done | |
7872 | fi | |
7873 | # check in a few other private locations | |
7874 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7875 | for i in \ | |
7876 | ${srcdir}/../itcl/itcl \ | |
7877 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
7878 | if test -f "$i/itclConfig.sh" ; then | |
7879 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
7880 | break | |
7881 | fi | |
7882 | done | |
7883 | fi | |
7884 | ||
7885 | fi | |
7886 | ||
7887 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7888 | ITCLCONFIG="# no Itcl configs found" | |
7889 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
7890 | else | |
7891 | no_itcl= | |
7892 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
7893 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
7894 | fi | |
7895 | fi | |
7896 | ||
7897 | if test -z "${no_itcl}"; then | |
7898 | ||
7899 | if test -f "$ITCLCONFIG" ; then | |
7900 | . $ITCLCONFIG | |
7901 | fi | |
7902 | ||
7903 | ||
7904 | ||
7905 | ||
7906 | ||
7907 | ||
7908 | ||
7909 | ||
7910 | ||
7911 | ||
3fc11d3e JM |
7912 | |
7913 | ||
7914 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 7915 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
7916 | fi |
7917 | ||
7918 | ||
7919 | # now look for Itk library stuff | |
7920 | ||
7921 | # | |
7922 | # Ok, lets find the itk configuration | |
7923 | # First, look for one uninstalled. | |
7924 | # the alternative search directory is invoked by --with-itkconfig | |
7925 | # | |
7926 | ||
7927 | if test x"${no_itk}" = x ; then | |
7928 | # we reset no_itk in case something fails here | |
7929 | no_itk=true | |
7930 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
7931 | if test "${with_itkconfig+set}" = set; then | |
7932 | withval="$with_itkconfig" | |
7933 | with_itkconfig=${withval} | |
7934 | fi | |
7935 | ||
7936 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
e27da16d | 7937 | echo "configure:7938: checking for Itk configuration" >&5 |
3fc11d3e JM |
7938 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
7939 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7940 | else | |
7941 | ||
7942 | ||
7943 | # First check to see if --with-itkconfig was specified. | |
7944 | if test x"${with_itkconfig}" != x ; then | |
7945 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
7946 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
7947 | else | |
7948 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
7949 | fi | |
7950 | fi | |
7951 | ||
7952 | # then check for a private Itk library | |
7953 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7954 | for i in \ | |
7955 | ../itcl/itk \ | |
7956 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
7957 | ../../itk \ | |
7958 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
7959 | ../../../itk \ | |
7960 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
7961 | if test -f "$i/itkConfig.sh" ; then | |
7962 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7963 | break | |
7964 | fi | |
7965 | done | |
7966 | fi | |
7967 | # check in a few common install locations | |
7968 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7969 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7970 | if test -f "$i/itkConfig.sh" ; then | |
7971 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7972 | break | |
7973 | fi | |
7974 | done | |
7975 | fi | |
7976 | # check in a few other private locations | |
7977 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7978 | for i in \ | |
7979 | ${srcdir}/../itcl/itk \ | |
7980 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
7981 | if test -f "$i/itkConfig.sh" ; then | |
7982 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7983 | break | |
7984 | fi | |
7985 | done | |
7986 | fi | |
7987 | ||
7988 | fi | |
7989 | ||
7990 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7991 | ITKCONFIG="# no Itk configs found" | |
7992 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
7993 | else | |
7994 | no_itk= | |
7995 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
7996 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
7997 | fi | |
7998 | fi | |
7999 | ||
8000 | ||
8001 | if test -z "${no_itcl}"; then | |
8002 | ||
8003 | if test -f "$ITKCONFIG" ; then | |
8004 | . $ITKCONFIG | |
8005 | fi | |
8006 | ||
8007 | ||
8008 | ||
8009 | ||
8010 | ||
8011 | ||
8012 | ||
8013 | ||
8014 | ||
8015 | ||
8016 | ||
8017 | ||
3fc11d3e | 8018 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 8019 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
8020 | fi |
8021 | ||
8022 | # now look for Tix library stuff | |
8023 | ||
8024 | # | |
8025 | # Ok, lets find the tix configuration | |
8026 | # First, look for one uninstalled. | |
8027 | # the alternative search directory is invoked by --with-itkconfig | |
8028 | # | |
8029 | ||
8030 | if test x"${no_tix}" = x ; then | |
8031 | # we reset no_tix in case something fails here | |
8032 | no_tix=true | |
8033 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
8034 | if test "${with_tixconfig+set}" = set; then | |
8035 | withval="$with_tixconfig" | |
8036 | with_tixconfig=${withval} | |
8037 | fi | |
8038 | ||
8039 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
e27da16d | 8040 | echo "configure:8041: checking for Tix configuration" >&5 |
3fc11d3e JM |
8041 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
8042 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8043 | else | |
8044 | ||
8045 | ||
8046 | # First check to see if --with-tixconfig was specified. | |
8047 | if test x"${with_tixconfig}" != x ; then | |
8048 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
8049 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
8050 | else | |
8051 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
8052 | fi | |
8053 | fi | |
8054 | ||
8055 | # then check for a private Tix library | |
8056 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
8057 | for i in \ | |
8058 | ../tix \ | |
8059 | `ls -dr ../tix 2>/dev/null` \ | |
8060 | ../../tix \ | |
8061 | `ls -dr ../../tix 2>/dev/null` \ | |
8062 | ../../../tix \ | |
8063 | `ls -dr ../../../tix 2>/dev/null` ; do | |
8064 | echo "**** Looking at $i - with ${configdir}" | |
8065 | if test -f "$i/tixConfig.sh" ; then | |
8066 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
8067 | break | |
8068 | fi | |
8069 | done | |
8070 | fi | |
8071 | # check in a few common install locations | |
8072 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
8073 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8074 | echo "**** Looking at $i" | |
8075 | if test -f "$i/tixConfig.sh" ; then | |
8076 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
8077 | break | |
8078 | fi | |
8079 | done | |
8080 | fi | |
8081 | # check in a few other private locations | |
8082 | echo "**** Other private locations" | |
8083 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
8084 | for i in \ | |
8085 | ${srcdir}/../tix \ | |
8086 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
8087 | echo "**** Looking at $i - with ${configdir}" | |
8088 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
8089 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
8090 | break | |
8091 | fi | |
8092 | done | |
8093 | fi | |
8094 | ||
8095 | fi | |
8096 | ||
8097 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
8098 | TIXCONFIG="# no Tix configs found" | |
8099 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
8100 | else | |
8101 | no_tix= | |
8102 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
8103 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
8104 | fi | |
8105 | fi | |
8106 | ||
8107 | ||
8108 | if test -z "${no_tix}"; then | |
8109 | ||
8110 | if test -f "$TIXCONFIG" ; then | |
8111 | . $TIXCONFIG | |
8112 | fi | |
8113 | ||
8114 | ||
8115 | ||
8116 | ||
8117 | ||
8118 | ||
8119 | ||
8120 | ||
8121 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
8122 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
8123 | fi | |
8124 | ||
4226a5a5 | 8125 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
8126 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
8127 | # know whether 8.2 will or not, but I bet it will. | |
8128 | # I don't have to worry about 7.x since we don't support it. | |
8129 | GDBTK_CFLAGS="" | |
8130 | if test "$GCC" = "yes"; then | |
8131 | if test "$TCL_VERSION" != "8.0" ; then | |
8132 | GDBTK_CFLAGS="-fwritable-strings" | |
8133 | fi | |
8134 | fi | |
8135 | ||
8136 | # Include some libraries that Tcl and Tk want. | |
8137 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
3fc11d3e JM |
8138 | # Yes, the ordering seems wrong here. But it isn't. |
8139 | # TK_LIBS is the list of libraries that need to be linked | |
8140 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
8141 | # were in LIBS then any link tests after this point would | |
8142 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
8143 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
8144 | |
8145 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
8146 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
8147 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
8148 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 8149 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 8150 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
8151 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
8152 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
8153 | |
8154 | if test x$gdb_cv_os_cygwin = xyes; then | |
8155 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
8156 | WIN32LDAPP="-Wl,--subsystem,console" | |
8157 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
8158 | fi | |
8159 | fi | |
8160 | fi | |
8161 | fi | |
8162 | ||
8163 | ||
8164 | ||
8165 | ||
8166 | ||
8167 | ||
8168 | ||
8169 | ||
8170 | ||
8171 | ||
8172 | ||
8173 | ||
8174 | ||
dd2504ab JM |
8175 | |
8176 | ||
d1c3b63a | 8177 | |
c906108c SS |
8178 | # If we find X, set shell vars x_includes and x_libraries to the |
8179 | # paths, otherwise set no_x=yes. | |
8180 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
8181 | # --without-x overrides everything else, but does not touch the cache. | |
8182 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
e27da16d | 8183 | echo "configure:8184: checking for X" >&5 |
c906108c SS |
8184 | |
8185 | # Check whether --with-x or --without-x was given. | |
8186 | if test "${with_x+set}" = set; then | |
8187 | withval="$with_x" | |
8188 | : | |
8189 | fi | |
8190 | ||
8191 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
8192 | if test "x$with_x" = xno; then | |
8193 | # The user explicitly disabled X. | |
8194 | have_x=disabled | |
8195 | else | |
8196 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
8197 | # Both variables are already set. | |
8198 | have_x=yes | |
8199 | else | |
8200 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
8201 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8202 | else | |
8203 | # One or both of the vars are not set, and there is no cached value. | |
8204 | ac_x_includes=NO ac_x_libraries=NO | |
8205 | rm -fr conftestdir | |
8206 | if mkdir conftestdir; then | |
8207 | cd conftestdir | |
8208 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
8209 | cat > Imakefile <<'EOF' | |
8210 | acfindx: | |
8211 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
8212 | EOF | |
8213 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
8214 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
8215 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
8216 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
8217 | for ac_extension in a so sl; do | |
8218 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
8219 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
8220 | ac_im_usrlibdir=$ac_im_libdir; break | |
8221 | fi | |
8222 | done | |
8223 | # Screen out bogus values from the imake configuration. They are | |
8224 | # bogus both because they are the default anyway, and because | |
8225 | # using them would break gcc on systems where it needs fixed includes. | |
8226 | case "$ac_im_incroot" in | |
8227 | /usr/include) ;; | |
8228 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
8229 | esac | |
8230 | case "$ac_im_usrlibdir" in | |
8231 | /usr/lib | /lib) ;; | |
8232 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
8233 | esac | |
8234 | fi | |
8235 | cd .. | |
8236 | rm -fr conftestdir | |
8237 | fi | |
8238 | ||
8239 | if test "$ac_x_includes" = NO; then | |
8240 | # Guess where to find include files, by looking for this one X11 .h file. | |
8241 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
8242 | ||
8243 | # First, try using that file with no special directory specified. | |
8244 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 8245 | #line 8246 "configure" |
c906108c SS |
8246 | #include "confdefs.h" |
8247 | #include <$x_direct_test_include> | |
8248 | EOF | |
8249 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e27da16d | 8250 | { (eval echo configure:8251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
8251 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
8252 | if test -z "$ac_err"; then | |
8253 | rm -rf conftest* | |
8254 | # We can compile using X headers with no special include directory. | |
8255 | ac_x_includes= | |
8256 | else | |
8257 | echo "$ac_err" >&5 | |
8258 | echo "configure: failed program was:" >&5 | |
8259 | cat conftest.$ac_ext >&5 | |
8260 | rm -rf conftest* | |
8261 | # Look for the header file in a standard set of common directories. | |
8262 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
8263 | for ac_dir in \ | |
8264 | /usr/X11/include \ | |
8265 | /usr/X11R6/include \ | |
8266 | /usr/X11R5/include \ | |
8267 | /usr/X11R4/include \ | |
8268 | \ | |
8269 | /usr/include/X11 \ | |
8270 | /usr/include/X11R6 \ | |
8271 | /usr/include/X11R5 \ | |
8272 | /usr/include/X11R4 \ | |
8273 | \ | |
8274 | /usr/local/X11/include \ | |
8275 | /usr/local/X11R6/include \ | |
8276 | /usr/local/X11R5/include \ | |
8277 | /usr/local/X11R4/include \ | |
8278 | \ | |
8279 | /usr/local/include/X11 \ | |
8280 | /usr/local/include/X11R6 \ | |
8281 | /usr/local/include/X11R5 \ | |
8282 | /usr/local/include/X11R4 \ | |
8283 | \ | |
8284 | /usr/X386/include \ | |
8285 | /usr/x386/include \ | |
8286 | /usr/XFree86/include/X11 \ | |
8287 | \ | |
8288 | /usr/include \ | |
8289 | /usr/local/include \ | |
8290 | /usr/unsupported/include \ | |
8291 | /usr/athena/include \ | |
8292 | /usr/local/x11r5/include \ | |
8293 | /usr/lpp/Xamples/include \ | |
8294 | \ | |
8295 | /usr/openwin/include \ | |
8296 | /usr/openwin/share/include \ | |
8297 | ; \ | |
8298 | do | |
8299 | if test -r "$ac_dir/$x_direct_test_include"; then | |
8300 | ac_x_includes=$ac_dir | |
8301 | break | |
8302 | fi | |
8303 | done | |
8304 | fi | |
8305 | rm -f conftest* | |
8306 | fi # $ac_x_includes = NO | |
8307 | ||
8308 | if test "$ac_x_libraries" = NO; then | |
8309 | # Check for the libraries. | |
8310 | ||
8311 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
8312 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
8313 | ||
8314 | # See if we find them without any special options. | |
8315 | # Don't add to $LIBS permanently. | |
8316 | ac_save_LIBS="$LIBS" | |
8317 | LIBS="-l$x_direct_test_library $LIBS" | |
8318 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 8319 | #line 8320 "configure" |
c906108c SS |
8320 | #include "confdefs.h" |
8321 | ||
8322 | int main() { | |
8323 | ${x_direct_test_function}() | |
8324 | ; return 0; } | |
8325 | EOF | |
e27da16d | 8326 | if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8327 | rm -rf conftest* |
8328 | LIBS="$ac_save_LIBS" | |
8329 | # We can link X programs with no special library path. | |
8330 | ac_x_libraries= | |
8331 | else | |
8332 | echo "configure: failed program was:" >&5 | |
8333 | cat conftest.$ac_ext >&5 | |
8334 | rm -rf conftest* | |
8335 | LIBS="$ac_save_LIBS" | |
8336 | # First see if replacing the include by lib works. | |
8337 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
8338 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
8339 | /usr/X11/lib \ | |
8340 | /usr/X11R6/lib \ | |
8341 | /usr/X11R5/lib \ | |
8342 | /usr/X11R4/lib \ | |
8343 | \ | |
8344 | /usr/lib/X11 \ | |
8345 | /usr/lib/X11R6 \ | |
8346 | /usr/lib/X11R5 \ | |
8347 | /usr/lib/X11R4 \ | |
8348 | \ | |
8349 | /usr/local/X11/lib \ | |
8350 | /usr/local/X11R6/lib \ | |
8351 | /usr/local/X11R5/lib \ | |
8352 | /usr/local/X11R4/lib \ | |
8353 | \ | |
8354 | /usr/local/lib/X11 \ | |
8355 | /usr/local/lib/X11R6 \ | |
8356 | /usr/local/lib/X11R5 \ | |
8357 | /usr/local/lib/X11R4 \ | |
8358 | \ | |
8359 | /usr/X386/lib \ | |
8360 | /usr/x386/lib \ | |
8361 | /usr/XFree86/lib/X11 \ | |
8362 | \ | |
8363 | /usr/lib \ | |
8364 | /usr/local/lib \ | |
8365 | /usr/unsupported/lib \ | |
8366 | /usr/athena/lib \ | |
8367 | /usr/local/x11r5/lib \ | |
8368 | /usr/lpp/Xamples/lib \ | |
8369 | /lib/usr/lib/X11 \ | |
8370 | \ | |
8371 | /usr/openwin/lib \ | |
8372 | /usr/openwin/share/lib \ | |
8373 | ; \ | |
8374 | do | |
8375 | for ac_extension in a so sl; do | |
8376 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
8377 | ac_x_libraries=$ac_dir | |
8378 | break 2 | |
8379 | fi | |
8380 | done | |
8381 | done | |
8382 | fi | |
8383 | rm -f conftest* | |
8384 | fi # $ac_x_libraries = NO | |
8385 | ||
8386 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
8387 | # Didn't find X anywhere. Cache the known absence of X. | |
8388 | ac_cv_have_x="have_x=no" | |
8389 | else | |
8390 | # Record where we found X for the cache. | |
8391 | ac_cv_have_x="have_x=yes \ | |
8392 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
8393 | fi | |
8394 | fi | |
8395 | fi | |
8396 | eval "$ac_cv_have_x" | |
8397 | fi # $with_x != no | |
8398 | ||
8399 | if test "$have_x" != yes; then | |
8400 | echo "$ac_t""$have_x" 1>&6 | |
8401 | no_x=yes | |
8402 | else | |
8403 | # If each of the values was on the command line, it overrides each guess. | |
8404 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
8405 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
8406 | # Update the cache value to reflect the command line values. | |
8407 | ac_cv_have_x="have_x=yes \ | |
8408 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
8409 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
8410 | fi | |
8411 | ||
8412 | ||
7a292a7a SS |
8413 | |
8414 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
8415 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
8416 | # This code just checks for a few cases where we'd like to ignore those | |
8417 | # definitions, even when they're present in the '.mt' file. These cases | |
8418 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 8419 | # not part of the source tree. |
7a292a7a SS |
8420 | # |
8421 | # Check whether --enable-sim or --disable-sim was given. | |
8422 | if test "${enable_sim+set}" = set; then | |
8423 | enableval="$enable_sim" | |
8424 | echo "enable_sim = $enable_sim"; | |
8425 | echo "enableval = ${enableval}"; | |
8426 | case "${enableval}" in | |
8427 | yes) ignore_sim=false ;; | |
8428 | no) ignore_sim=true ;; | |
8429 | *) ignore_sim=false ;; | |
8430 | esac | |
8431 | else | |
8432 | ignore_sim=false | |
8433 | fi | |
8434 | ||
8435 | ||
8436 | if test ! -d "${srcdir}/../sim"; then | |
8437 | ignore_sim=true | |
8438 | fi | |
8439 | ||
8440 | if test "${ignore_sim}" = "true"; then | |
8441 | IGNORE_SIM="SIM=" | |
8442 | IGNORE_SIM_OBS="SIM_OBS=" | |
8443 | else | |
8444 | IGNORE_SIM="" | |
8445 | IGNORE_SIM_OBS="" | |
8446 | cat >> confdefs.h <<\EOF | |
8447 | #define WITH_SIM 1 | |
8448 | EOF | |
8449 | ||
8450 | fi | |
8451 | ||
8452 | ||
8453 | ||
c906108c SS |
8454 | |
8455 | ||
8456 | ||
8457 | ||
8458 | ||
8459 | ||
dfcd3bfb | 8460 | |
e56ac5c3 AC |
8461 | |
8462 | ||
b3a90332 AC |
8463 | |
8464 | ||
b46cd165 | 8465 | |
c906108c SS |
8466 | # Begin stuff to support --enable-shared |
8467 | # Check whether --enable-shared or --disable-shared was given. | |
8468 | if test "${enable_shared+set}" = set; then | |
8469 | enableval="$enable_shared" | |
8470 | case "${enableval}" in | |
8471 | yes) shared=true ;; | |
8472 | no) shared=false ;; | |
8473 | *) shared=true ;; | |
8474 | esac | |
8475 | fi | |
8476 | ||
8477 | HLDFLAGS= | |
8478 | HLDENV= | |
8479 | # If we have shared libraries, try to set rpath reasonably. | |
8480 | if test "${shared}" = "true"; then | |
8481 | case "${host}" in | |
8482 | *-*-hpux*) | |
8483 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
8484 | ;; | |
8485 | *-*-irix5* | *-*-irix6*) | |
8486 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
8487 | ;; | |
8488 | *-*-linux*aout*) | |
8489 | ;; | |
88987551 | 8490 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
8491 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
8492 | ;; | |
8493 | *-*-solaris*) | |
8494 | HLDFLAGS='-R $(libdir)' | |
8495 | ;; | |
8496 | *-*-sysv4*) | |
8497 | HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' | |
8498 | ;; | |
8499 | esac | |
8500 | fi | |
8501 | ||
8502 | # On SunOS, if the linker supports the -rpath option, use it to | |
8503 | # prevent ../bfd and ../opcodes from being included in the run time | |
8504 | # search path. | |
8505 | case "${host}" in | |
8506 | *-*-sunos*) | |
8507 | echo 'main () { }' > conftest.c | |
8508 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
8509 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
8510 | : | |
8511 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
8512 | : | |
8513 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
8514 | : | |
8515 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
8516 | : | |
8517 | elif test "${shared}" = "true"; then | |
8518 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
8519 | else | |
8520 | HLDFLAGS='-Wl,-rpath=' | |
8521 | fi | |
8522 | rm -f conftest.t conftest.c conftest | |
8523 | ;; | |
8524 | esac | |
8525 | ||
8526 | ||
8527 | # End stuff to support --enable-shared | |
8528 | ||
8529 | # target_subdir is used by the testsuite to find the target libraries. | |
8530 | target_subdir= | |
8531 | if test "${host}" != "${target}"; then | |
8532 | target_subdir="${target_alias}/" | |
8533 | fi | |
8534 | ||
8535 | ||
8536 | frags= | |
8537 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
8538 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
8539 | # When building a native debuger the .mh file containing things |
8540 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
8541 | # since it no longer contains anything useful. | |
8542 | if test "${target}" = "${host}"; then | |
8543 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
8544 | else | |
8545 | host_makefile_frag=/dev/null | |
8546 | fi | |
c906108c SS |
8547 | fi |
8548 | frags="$frags $host_makefile_frag" | |
8549 | ||
8550 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
8551 | if test ! -f ${target_makefile_frag}; then | |
8552 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
8553 | fi | |
8554 | frags="$frags $target_makefile_frag" | |
8555 | ||
8556 | ||
8557 | ||
8558 | ||
8559 | ||
8560 | hostfile=`sed -n ' | |
8561 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
8562 | ' ${host_makefile_frag}` | |
8563 | ||
8564 | targetfile=`sed -n ' | |
8565 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
8566 | ' ${target_makefile_frag}` | |
8567 | ||
6166d547 AC |
8568 | GDB_MULTI_ARCH=`sed -n ' |
8569 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
8570 | ' ${target_makefile_frag}` | |
8571 | ||
c906108c | 8572 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
8573 | # We pick this up from the host configuration file (.mh) because we |
8574 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
8575 | nativefile=`sed -n ' |
8576 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
8577 | ' ${host_makefile_frag}` | |
c906108c SS |
8578 | fi |
8579 | ||
8580 | ||
6166d547 AC |
8581 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
8582 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
8583 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
8584 | # will be the default. | |
8585 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
8586 | case "${gdb_multi_arch}" in | |
8587 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
8588 | no ) GDB_MULTI_ARCH=0 ;; | |
8589 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
8590 | esac | |
8591 | fi | |
8592 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
8593 | cat >> confdefs.h <<EOF | |
8594 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
8595 | EOF | |
8596 | ||
8597 | fi | |
6c5cfe5b | 8598 | # Warn the user when they use an old practice |
6166d547 AC |
8599 | case "${GDB_MULTI_ARCH}" in |
8600 | "" ) ;; | |
8601 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
8602 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
8603 | GDB_MULTI_ARCH_PURE ) | |
8604 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 8605 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 8606 | targetfile="" |
6166d547 AC |
8607 | fi ;; |
8608 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
8609 | esac | |
8610 | ||
96baa820 JM |
8611 | SUBDIRS="doc testsuite nlm" |
8612 | if test "${enable_multi_ice}" = "yes"; then | |
8613 | SUBDIRS="${SUBDIRS} multi-ice" | |
8614 | fi | |
8615 | ||
a85f51e7 DJ |
8616 | # ``gdbserver'' can only be built in a native configuration. |
8617 | if test x"${target}" = x"${host}"; then | |
8618 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
e27da16d | 8619 | echo "configure:8620: checking whether gdbserver is supported on this host" >&5 |
a85f51e7 DJ |
8620 | if test x"${build_gdbserver}" = xyes ; then |
8621 | configdirs="${configdirs} gdbserver" | |
8622 | SUBDIRS="${SUBDIRS} gdbserver" | |
8623 | echo "$ac_t""yes" 1>&6 | |
8624 | else | |
8625 | echo "$ac_t""no" 1>&6 | |
8626 | fi | |
8627 | fi | |
8628 | ||
96baa820 JM |
8629 | |
8630 | ||
c906108c | 8631 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
8632 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
8633 | # version. | |
c906108c SS |
8634 | |
8635 | files= | |
8636 | links= | |
5a2402b8 | 8637 | |
c906108c | 8638 | rm -f xm.h |
5a2402b8 | 8639 | xm_h="" |
c906108c | 8640 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
8641 | xm_h=xm.h |
8642 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
8643 | files="${files} ${GDB_XM_FILE}" | |
8644 | links="${links} xm.h" | |
8645 | cat >> confdefs.h <<EOF | |
8646 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
8647 | EOF | |
8648 | ||
c906108c | 8649 | fi |
5a2402b8 AC |
8650 | |
8651 | ||
c906108c | 8652 | rm -f tm.h |
5a2402b8 | 8653 | tm_h="" |
c906108c | 8654 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
8655 | tm_h=tm.h |
8656 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
8657 | files="${files} ${GDB_TM_FILE}" | |
8658 | links="${links} tm.h" | |
8659 | cat >> confdefs.h <<EOF | |
8660 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
8661 | EOF | |
8662 | ||
c906108c | 8663 | fi |
5a2402b8 AC |
8664 | |
8665 | ||
c906108c | 8666 | rm -f nm.h |
5a2402b8 | 8667 | nm_h="" |
c906108c | 8668 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
8669 | nm_h=nm.h |
8670 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
8671 | files="${files} ${GDB_NM_FILE}" | |
8672 | links="${links} nm.h" | |
8673 | cat >> confdefs.h <<EOF | |
8674 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
8675 | EOF | |
8676 | ||
c906108c | 8677 | fi |
5a2402b8 AC |
8678 | |
8679 | ||
3fc11d3e | 8680 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
e27da16d | 8681 | echo "configure:8682: checking whether ln -s works" >&5 |
3fc11d3e JM |
8682 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
8683 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8684 | else | |
8685 | rm -f conftestdata | |
8686 | if ln -s X conftestdata 2>/dev/null | |
8687 | then | |
8688 | rm -f conftestdata | |
8689 | ac_cv_prog_LN_S="ln -s" | |
8690 | else | |
8691 | ac_cv_prog_LN_S=ln | |
8692 | fi | |
8693 | fi | |
8694 | LN_S="$ac_cv_prog_LN_S" | |
8695 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
8696 | echo "$ac_t""yes" 1>&6 | |
8697 | else | |
8698 | echo "$ac_t""no" 1>&6 | |
8699 | fi | |
8700 | ||
c906108c SS |
8701 | |
8702 | ||
8703 | ||
8704 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
e27da16d | 8705 | echo "configure:8706: checking for Cygwin environment" >&5 |
c906108c SS |
8706 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
8707 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8708 | else | |
8709 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 8710 | #line 8711 "configure" |
c906108c SS |
8711 | #include "confdefs.h" |
8712 | ||
8713 | int main() { | |
8714 | ||
8715 | #ifndef __CYGWIN__ | |
8716 | #define __CYGWIN__ __CYGWIN32__ | |
8717 | #endif | |
8718 | return __CYGWIN__; | |
8719 | ; return 0; } | |
8720 | EOF | |
e27da16d | 8721 | if { (eval echo configure:8722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8722 | rm -rf conftest* |
8723 | ac_cv_cygwin=yes | |
8724 | else | |
8725 | echo "configure: failed program was:" >&5 | |
8726 | cat conftest.$ac_ext >&5 | |
8727 | rm -rf conftest* | |
8728 | ac_cv_cygwin=no | |
8729 | fi | |
8730 | rm -f conftest* | |
8731 | rm -f conftest* | |
8732 | fi | |
8733 | ||
8734 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
8735 | CYGWIN= | |
8736 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
8737 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
e27da16d | 8738 | echo "configure:8739: checking for mingw32 environment" >&5 |
c906108c SS |
8739 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
8740 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8741 | else | |
8742 | cat > conftest.$ac_ext <<EOF | |
e27da16d | 8743 | #line 8744 "configure" |
c906108c SS |
8744 | #include "confdefs.h" |
8745 | ||
8746 | int main() { | |
8747 | return __MINGW32__; | |
8748 | ; return 0; } | |
8749 | EOF | |
e27da16d | 8750 | if { (eval echo configure:8751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8751 | rm -rf conftest* |
8752 | ac_cv_mingw32=yes | |
8753 | else | |
8754 | echo "configure: failed program was:" >&5 | |
8755 | cat conftest.$ac_ext >&5 | |
8756 | rm -rf conftest* | |
8757 | ac_cv_mingw32=no | |
8758 | fi | |
8759 | rm -f conftest* | |
8760 | rm -f conftest* | |
8761 | fi | |
8762 | ||
8763 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
8764 | MINGW32= | |
8765 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
8766 | ||
8767 | ||
8768 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
e27da16d | 8769 | echo "configure:8770: checking for executable suffix" >&5 |
c906108c SS |
8770 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
8771 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8772 | else | |
8773 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
8774 | ac_cv_exeext=.exe | |
8775 | else | |
8776 | rm -f conftest* | |
8777 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
8778 | ac_cv_exeext= | |
e27da16d | 8779 | if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
8780 | for file in conftest.*; do |
8781 | case $file in | |
e27da16d | 8782 | *.c | *.o | *.obj) ;; |
c906108c SS |
8783 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
8784 | esac | |
8785 | done | |
8786 | else | |
8787 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
8788 | fi | |
8789 | rm -f conftest* | |
8790 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
8791 | fi | |
8792 | fi | |
8793 | ||
8794 | EXEEXT="" | |
8795 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
8796 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
8797 | ac_exeext=$EXEEXT | |
8798 | ||
8799 | ||
8800 | subdirs="$configdirs" | |
8801 | ||
8802 | trap '' 1 2 15 | |
8803 | cat > confcache <<\EOF | |
8804 | # This file is a shell script that caches the results of configure | |
8805 | # tests run on this system so they can be shared between configure | |
8806 | # scripts and configure runs. It is not useful on other systems. | |
8807 | # If it contains results you don't want to keep, you may remove or edit it. | |
8808 | # | |
8809 | # By default, configure uses ./config.cache as the cache file, | |
8810 | # creating it if it does not exist already. You can give configure | |
8811 | # the --cache-file=FILE option to use a different cache file; that is | |
8812 | # what configure does when it calls configure scripts in | |
8813 | # subdirectories, so they share the cache. | |
8814 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8815 | # config.status only pays attention to the cache file if you give it the | |
8816 | # --recheck option to rerun configure. | |
8817 | # | |
8818 | EOF | |
8819 | # The following way of writing the cache mishandles newlines in values, | |
8820 | # but we know of no workaround that is simple, portable, and efficient. | |
8821 | # So, don't put newlines in cache variables' values. | |
8822 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8823 | # and sets the high bit in the cache file unless we assign to the vars. | |
8824 | (set) 2>&1 | | |
8825 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
8826 | *ac_space=\ *) | |
8827 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8828 | # turns \\\\ into \\, and sed turns \\ into \). | |
8829 | sed -n \ | |
8830 | -e "s/'/'\\\\''/g" \ | |
8831 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8832 | ;; | |
8833 | *) | |
8834 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8835 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8836 | ;; | |
8837 | esac >> confcache | |
8838 | if cmp -s $cache_file confcache; then | |
8839 | : | |
8840 | else | |
8841 | if test -w $cache_file; then | |
8842 | echo "updating cache $cache_file" | |
8843 | cat confcache > $cache_file | |
8844 | else | |
8845 | echo "not updating unwritable cache $cache_file" | |
8846 | fi | |
8847 | fi | |
8848 | rm -f confcache | |
8849 | ||
8850 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
8851 | ||
8852 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
8853 | # Let make expand exec_prefix. | |
8854 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8855 | ||
8856 | # Any assignment to VPATH causes Sun make to only execute | |
8857 | # the first set of double-colon rules, so remove it if not needed. | |
8858 | # If there is a colon in the path, we need to keep it. | |
8859 | if test "x$srcdir" = x.; then | |
8860 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
8861 | fi | |
8862 | ||
8863 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
8864 | ||
8865 | DEFS=-DHAVE_CONFIG_H | |
8866 | ||
8867 | # Without the "./", some shells look in PATH for config.status. | |
8868 | : ${CONFIG_STATUS=./config.status} | |
8869 | ||
8870 | echo creating $CONFIG_STATUS | |
8871 | rm -f $CONFIG_STATUS | |
8872 | cat > $CONFIG_STATUS <<EOF | |
8873 | #! /bin/sh | |
8874 | # Generated automatically by configure. | |
8875 | # Run this file to recreate the current configuration. | |
8876 | # This directory was configured as follows, | |
8877 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
8878 | # | |
8879 | # $0 $ac_configure_args | |
8880 | # | |
8881 | # Compiler output produced by configure, useful for debugging | |
8882 | # configure, is in ./config.log if it exists. | |
8883 | ||
8884 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
8885 | for ac_option | |
8886 | do | |
8887 | case "\$ac_option" in | |
8888 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8889 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8890 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8891 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
8892 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
8893 | exit 0 ;; | |
8894 | -help | --help | --hel | --he | --h) | |
8895 | echo "\$ac_cs_usage"; exit 0 ;; | |
8896 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8897 | esac | |
8898 | done | |
8899 | ||
8900 | ac_given_srcdir=$srcdir | |
8901 | ac_given_INSTALL="$INSTALL" | |
8902 | ||
ed952ac5 | 8903 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
8904 | EOF |
8905 | cat >> $CONFIG_STATUS <<EOF | |
8906 | ||
8907 | # Protect against being on the right side of a sed subst in config.status. | |
8908 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8909 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8910 | $ac_vpsub | |
8911 | $extrasub | |
8912 | s%@SHELL@%$SHELL%g | |
8913 | s%@CFLAGS@%$CFLAGS%g | |
8914 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8915 | s%@CXXFLAGS@%$CXXFLAGS%g | |
8916 | s%@FFLAGS@%$FFLAGS%g | |
8917 | s%@DEFS@%$DEFS%g | |
8918 | s%@LDFLAGS@%$LDFLAGS%g | |
8919 | s%@LIBS@%$LIBS%g | |
8920 | s%@exec_prefix@%$exec_prefix%g | |
8921 | s%@prefix@%$prefix%g | |
8922 | s%@program_transform_name@%$program_transform_name%g | |
8923 | s%@bindir@%$bindir%g | |
8924 | s%@sbindir@%$sbindir%g | |
8925 | s%@libexecdir@%$libexecdir%g | |
8926 | s%@datadir@%$datadir%g | |
8927 | s%@sysconfdir@%$sysconfdir%g | |
8928 | s%@sharedstatedir@%$sharedstatedir%g | |
8929 | s%@localstatedir@%$localstatedir%g | |
8930 | s%@libdir@%$libdir%g | |
8931 | s%@includedir@%$includedir%g | |
8932 | s%@oldincludedir@%$oldincludedir%g | |
8933 | s%@infodir@%$infodir%g | |
8934 | s%@mandir@%$mandir%g | |
413ccac7 AC |
8935 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
8936 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
8937 | s%@MAINT@%$MAINT%g | |
c906108c SS |
8938 | s%@CC@%$CC%g |
8939 | s%@CPP@%$CPP%g | |
8940 | s%@host@%$host%g | |
8941 | s%@host_alias@%$host_alias%g | |
8942 | s%@host_cpu@%$host_cpu%g | |
8943 | s%@host_vendor@%$host_vendor%g | |
8944 | s%@host_os@%$host_os%g | |
8945 | s%@target@%$target%g | |
8946 | s%@target_alias@%$target_alias%g | |
8947 | s%@target_cpu@%$target_cpu%g | |
8948 | s%@target_vendor@%$target_vendor%g | |
8949 | s%@target_os@%$target_os%g | |
8950 | s%@build@%$build%g | |
8951 | s%@build_alias@%$build_alias%g | |
8952 | s%@build_cpu@%$build_cpu%g | |
8953 | s%@build_vendor@%$build_vendor%g | |
8954 | s%@build_os@%$build_os%g | |
8955 | s%@SET_MAKE@%$SET_MAKE%g | |
8956 | s%@RANLIB@%$RANLIB%g | |
8957 | s%@ALLOCA@%$ALLOCA%g | |
8958 | s%@USE_NLS@%$USE_NLS%g | |
8959 | s%@MSGFMT@%$MSGFMT%g | |
8960 | s%@GMSGFMT@%$GMSGFMT%g | |
8961 | s%@XGETTEXT@%$XGETTEXT%g | |
8962 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
8963 | s%@CATALOGS@%$CATALOGS%g | |
8964 | s%@CATOBJEXT@%$CATOBJEXT%g | |
8965 | s%@DATADIRNAME@%$DATADIRNAME%g | |
8966 | s%@GMOFILES@%$GMOFILES%g | |
8967 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8968 | s%@INTLDEPS@%$INTLDEPS%g | |
8969 | s%@INTLLIBS@%$INTLLIBS%g | |
8970 | s%@INTLOBJS@%$INTLOBJS%g | |
8971 | s%@POFILES@%$POFILES%g | |
8972 | s%@POSUB@%$POSUB%g | |
8973 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
8974 | s%@GT_NO@%$GT_NO%g | |
8975 | s%@GT_YES@%$GT_YES%g | |
8976 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
8977 | s%@l@%$l%g | |
7a292a7a | 8978 | s%@AWK@%$AWK%g |
c906108c SS |
8979 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
8980 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
8981 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8982 | s%@AR@%$AR%g | |
95ca63c4 CF |
8983 | s%@DLLTOOL@%$DLLTOOL%g |
8984 | s%@WINDRES@%$WINDRES%g | |
c906108c | 8985 | s%@YACC@%$YACC%g |
75c6e08a | 8986 | s%@MIG@%$MIG%g |
c906108c | 8987 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
b4df4f68 | 8988 | s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g |
c906108c | 8989 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 8990 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
8991 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
8992 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 8993 | s%@REGEX@%$REGEX%g |
aff38e61 | 8994 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
c906108c | 8995 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 8996 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
8997 | s%@LIBGUI@%$LIBGUI%g |
8998 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
8999 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
9000 | s%@TCL_VERSION@%$TCL_VERSION%g | |
9001 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
9002 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
9003 | s%@TCL_CC@%$TCL_CC%g | |
9004 | s%@TCL_DEFS@%$TCL_DEFS%g | |
9005 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
9006 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
9007 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
9008 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
9009 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
9010 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
9011 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
9012 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
9013 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
9014 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
9015 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
9016 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
9017 | s%@TK_VERSION@%$TK_VERSION%g | |
9018 | s%@TK_DEFS@%$TK_DEFS%g | |
9019 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
9020 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
9021 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
9022 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
9023 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
9024 | s%@TCLHDIR@%$TCLHDIR%g | |
9025 | s%@TKHDIR@%$TKHDIR%g | |
9026 | s%@ITCLHDIR@%$ITCLHDIR%g | |
9027 | s%@ITKHDIR@%$ITKHDIR%g | |
9028 | s%@TIXHDIR@%$TIXHDIR%g | |
9029 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
9030 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
9031 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
9032 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
9033 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
9034 | s%@ITK_VERSION@%$ITK_VERSION%g | |
9035 | s%@ITK_DEFS@%$ITK_DEFS%g | |
9036 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
9037 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
9038 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
9039 | s%@TIX_VERSION@%$TIX_VERSION%g | |
9040 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
9041 | s%@X_CFLAGS@%$X_CFLAGS%g |
9042 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
9043 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
9044 | s%@TCL_DEPS@%$TCL_DEPS%g |
9045 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
9046 | s%@ITCLLIB@%$ITCLLIB%g |
9047 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
9048 | s%@ITKLIB@%$ITKLIB%g | |
9049 | s%@ITK_DEPS@%$ITK_DEPS%g | |
9050 | s%@TIXLIB@%$TIXLIB%g | |
9051 | s%@TIX_DEPS@%$TIX_DEPS%g | |
9052 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
9053 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 9054 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
9055 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
9056 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
9057 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
9058 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 9059 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
9060 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
9061 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 9062 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
9063 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
9064 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
9065 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
9066 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
9067 | s%@HLDFLAGS@%$HLDFLAGS%g |
9068 | s%@HLDENV@%$HLDENV%g | |
9069 | s%@target_subdir@%$target_subdir%g | |
9070 | /@host_makefile_frag@/r $host_makefile_frag | |
9071 | s%@host_makefile_frag@%%g | |
9072 | /@target_makefile_frag@/r $target_makefile_frag | |
9073 | s%@target_makefile_frag@%%g | |
9074 | s%@frags@%$frags%g | |
96baa820 | 9075 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
9076 | s%@xm_h@%$xm_h%g |
9077 | s%@tm_h@%$tm_h%g | |
9078 | s%@nm_h@%$nm_h%g | |
7a292a7a | 9079 | s%@LN_S@%$LN_S%g |
c906108c SS |
9080 | s%@EXEEXT@%$EXEEXT%g |
9081 | s%@subdirs@%$subdirs%g | |
9082 | ||
9083 | CEOF | |
9084 | EOF | |
9085 | ||
9086 | cat >> $CONFIG_STATUS <<\EOF | |
9087 | ||
9088 | # Split the substitutions into bite-sized pieces for seds with | |
9089 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
4536bbc6 | 9090 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
9091 | ac_file=1 # Number of current file. |
9092 | ac_beg=1 # First line for current file. | |
9093 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
9094 | ac_more_lines=: | |
9095 | ac_sed_cmds="" | |
9096 | while $ac_more_lines; do | |
9097 | if test $ac_beg -gt 1; then | |
9098 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
9099 | else | |
9100 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
9101 | fi | |
9102 | if test ! -s conftest.s$ac_file; then | |
9103 | ac_more_lines=false | |
9104 | rm -f conftest.s$ac_file | |
9105 | else | |
9106 | if test -z "$ac_sed_cmds"; then | |
9107 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
9108 | else | |
9109 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
9110 | fi | |
9111 | ac_file=`expr $ac_file + 1` | |
9112 | ac_beg=$ac_end | |
9113 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
9114 | fi | |
9115 | done | |
9116 | if test -z "$ac_sed_cmds"; then | |
9117 | ac_sed_cmds=cat | |
9118 | fi | |
9119 | EOF | |
9120 | ||
9121 | cat >> $CONFIG_STATUS <<EOF | |
9122 | ||
ed952ac5 | 9123 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
9124 | EOF |
9125 | cat >> $CONFIG_STATUS <<\EOF | |
9126 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
9127 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9128 | case "$ac_file" in | |
9129 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9130 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9131 | *) ac_file_in="${ac_file}.in" ;; | |
9132 | esac | |
9133 | ||
9134 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
9135 | ||
9136 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9137 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9138 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9139 | # The file is in a subdirectory. | |
9140 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9141 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
9142 | # A "../" for each directory in $ac_dir_suffix. | |
9143 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
9144 | else | |
9145 | ac_dir_suffix= ac_dots= | |
9146 | fi | |
9147 | ||
9148 | case "$ac_given_srcdir" in | |
9149 | .) srcdir=. | |
9150 | if test -z "$ac_dots"; then top_srcdir=. | |
9151 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
9152 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
9153 | *) # Relative path. | |
9154 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
9155 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9156 | esac | |
9157 | ||
9158 | case "$ac_given_INSTALL" in | |
9159 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
9160 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
9161 | esac | |
9162 | ||
9163 | echo creating "$ac_file" | |
9164 | rm -f "$ac_file" | |
9165 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9166 | case "$ac_file" in | |
9167 | *Makefile*) ac_comsub="1i\\ | |
9168 | # $configure_input" ;; | |
9169 | *) ac_comsub= ;; | |
9170 | esac | |
9171 | ||
9172 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9173 | sed -e "$ac_comsub | |
9174 | s%@configure_input@%$configure_input%g | |
9175 | s%@srcdir@%$srcdir%g | |
9176 | s%@top_srcdir@%$top_srcdir%g | |
9177 | s%@INSTALL@%$INSTALL%g | |
9178 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
9179 | fi; done | |
9180 | rm -f conftest.s* | |
9181 | ||
9182 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9183 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9184 | # | |
9185 | # ac_d sets the value in "#define NAME VALUE" lines. | |
9186 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
9187 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9188 | ac_dC='\3' | |
9189 | ac_dD='%g' | |
9190 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9191 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9192 | ac_uB='\([ ]\)%\1#\2define\3' | |
9193 | ac_uC=' ' | |
9194 | ac_uD='\4%g' | |
9195 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9196 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9197 | ac_eB='$%\1#\2define\3' | |
9198 | ac_eC=' ' | |
9199 | ac_eD='%g' | |
9200 | ||
9201 | if test "${CONFIG_HEADERS+set}" != set; then | |
9202 | EOF | |
9203 | cat >> $CONFIG_STATUS <<EOF | |
9204 | CONFIG_HEADERS="config.h:config.in" | |
9205 | EOF | |
9206 | cat >> $CONFIG_STATUS <<\EOF | |
9207 | fi | |
9208 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
9209 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9210 | case "$ac_file" in | |
9211 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9212 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9213 | *) ac_file_in="${ac_file}.in" ;; | |
9214 | esac | |
9215 | ||
9216 | echo creating $ac_file | |
9217 | ||
9218 | rm -f conftest.frag conftest.in conftest.out | |
9219 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9220 | cat $ac_file_inputs > conftest.in | |
9221 | ||
9222 | EOF | |
9223 | ||
9224 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9225 | # the proper values into config.h.in to produce config.h. And first: | |
9226 | # Protect against being on the right side of a sed subst in config.status. | |
9227 | # Protect against being in an unquoted here document in config.status. | |
9228 | rm -f conftest.vals | |
9229 | cat > conftest.hdr <<\EOF | |
9230 | s/[\\&%]/\\&/g | |
9231 | s%[\\$`]%\\&%g | |
9232 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9233 | s%ac_d%ac_u%gp | |
9234 | s%ac_u%ac_e%gp | |
9235 | EOF | |
9236 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9237 | rm -f conftest.hdr | |
9238 | ||
9239 | # This sed command replaces #undef with comments. This is necessary, for | |
9240 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9241 | # on some systems where configure will not decide to define it. | |
9242 | cat >> conftest.vals <<\EOF | |
9243 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9244 | EOF | |
9245 | ||
9246 | # Break up conftest.vals because some shells have a limit on | |
9247 | # the size of here documents, and old seds have small limits too. | |
9248 | ||
9249 | rm -f conftest.tail | |
9250 | while : | |
9251 | do | |
9252 | ac_lines=`grep -c . conftest.vals` | |
9253 | # grep -c gives empty output for an empty file on some AIX systems. | |
9254 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9255 | # Write a limited-size here document to conftest.frag. | |
9256 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9257 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
9258 | echo 'CEOF | |
9259 | sed -f conftest.frag conftest.in > conftest.out | |
9260 | rm -f conftest.in | |
9261 | mv conftest.out conftest.in | |
9262 | ' >> $CONFIG_STATUS | |
9263 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9264 | rm -f conftest.vals | |
9265 | mv conftest.tail conftest.vals | |
9266 | done | |
9267 | rm -f conftest.vals | |
9268 | ||
9269 | cat >> $CONFIG_STATUS <<\EOF | |
9270 | rm -f conftest.frag conftest.h | |
9271 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9272 | cat conftest.in >> conftest.h | |
9273 | rm -f conftest.in | |
9274 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9275 | echo "$ac_file is unchanged" | |
9276 | rm -f conftest.h | |
9277 | else | |
9278 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9279 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9280 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9281 | # The file is in a subdirectory. | |
9282 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9283 | fi | |
9284 | rm -f $ac_file | |
9285 | mv conftest.h $ac_file | |
9286 | fi | |
9287 | fi; done | |
9288 | ||
9289 | EOF | |
9290 | ||
9291 | cat >> $CONFIG_STATUS <<EOF | |
9292 | ac_sources="$files" | |
9293 | ac_dests="$links" | |
9294 | EOF | |
9295 | ||
9296 | cat >> $CONFIG_STATUS <<\EOF | |
9297 | srcdir=$ac_given_srcdir | |
9298 | while test -n "$ac_sources"; do | |
9299 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
9300 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
9301 | ||
9302 | echo "linking $srcdir/$ac_source to $ac_dest" | |
9303 | ||
9304 | if test ! -r $srcdir/$ac_source; then | |
9305 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
9306 | fi | |
9307 | rm -f $ac_dest | |
9308 | ||
9309 | # Make relative symlinks. | |
9310 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9311 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
9312 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
9313 | # The dest file is in a subdirectory. | |
9314 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
9315 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
9316 | # A "../" for each directory in $ac_dest_dir_suffix. | |
9317 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
9318 | else | |
9319 | ac_dest_dir_suffix= ac_dots= | |
9320 | fi | |
9321 | ||
9322 | case "$srcdir" in | |
9323 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
9324 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
9325 | esac | |
9326 | ||
9327 | # Make a symlink if possible; otherwise try a hard link. | |
9328 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
9329 | ln $srcdir/$ac_source $ac_dest; then : | |
9330 | else | |
9331 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
9332 | fi | |
9333 | done | |
9334 | EOF | |
9335 | cat >> $CONFIG_STATUS <<EOF | |
9336 | ||
9337 | gdb_host_cpu=$gdb_host_cpu | |
9338 | gdb_target_cpu=$gdb_target_cpu | |
9339 | nativefile=$nativefile | |
9340 | ||
9341 | EOF | |
9342 | cat >> $CONFIG_STATUS <<\EOF | |
9343 | ||
9344 | if test "${nativefile}" = ""; then | |
c4620205 | 9345 | < Makefile \ |
e27da16d JT |
9346 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
9347 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
9348 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
9349 | > Makefile.tem | |
c906108c SS |
9350 | mv -f Makefile.tem Makefile |
9351 | fi | |
9352 | ||
9353 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
9354 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
9355 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
9356 | mv -f Makefile.tmp Makefile | |
9357 | ||
2acceee2 | 9358 | |
c906108c SS |
9359 | case x$CONFIG_HEADERS in |
9360 | xconfig.h:config.in) | |
9361 | echo > stamp-h ;; | |
9362 | esac | |
9363 | ||
9364 | exit 0 | |
9365 | EOF | |
9366 | chmod +x $CONFIG_STATUS | |
9367 | rm -fr confdefs* $ac_clean_files | |
9368 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
9369 | ||
9370 | if test "$no_recursion" != yes; then | |
9371 | ||
9372 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
9373 | ac_sub_configure_args= | |
9374 | ac_prev= | |
9375 | for ac_arg in $ac_configure_args; do | |
9376 | if test -n "$ac_prev"; then | |
9377 | ac_prev= | |
9378 | continue | |
9379 | fi | |
9380 | case "$ac_arg" in | |
9381 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
9382 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
9383 | ac_prev=cache_file ;; | |
9384 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
9385 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
9386 | ;; | |
9387 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
9388 | ac_prev=srcdir ;; | |
9389 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
9390 | ;; | |
9391 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
9392 | esac | |
9393 | done | |
9394 | ||
9395 | for ac_config_dir in $configdirs; do | |
9396 | ||
9397 | # Do not complain, so a configure script can configure whichever | |
9398 | # parts of a large source tree are present. | |
9399 | if test ! -d $srcdir/$ac_config_dir; then | |
9400 | continue | |
9401 | fi | |
9402 | ||
9403 | echo configuring in $ac_config_dir | |
9404 | ||
9405 | case "$srcdir" in | |
9406 | .) ;; | |
9407 | *) | |
9408 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
9409 | else | |
9410 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
9411 | fi | |
9412 | ;; | |
9413 | esac | |
9414 | ||
9415 | ac_popdir=`pwd` | |
9416 | cd $ac_config_dir | |
9417 | ||
9418 | # A "../" for each directory in /$ac_config_dir. | |
9419 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
9420 | ||
9421 | case "$srcdir" in | |
9422 | .) # No --srcdir option. We are building in place. | |
9423 | ac_sub_srcdir=$srcdir ;; | |
9424 | /*) # Absolute path. | |
9425 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
9426 | *) # Relative path. | |
9427 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
9428 | esac | |
9429 | ||
9430 | # Check for guested configure; otherwise get Cygnus style configure. | |
9431 | if test -f $ac_sub_srcdir/configure; then | |
9432 | ac_sub_configure=$ac_sub_srcdir/configure | |
9433 | elif test -f $ac_sub_srcdir/configure.in; then | |
9434 | ac_sub_configure=$ac_configure | |
9435 | else | |
9436 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
9437 | ac_sub_configure= | |
9438 | fi | |
9439 | ||
9440 | # The recursion is here. | |
9441 | if test -n "$ac_sub_configure"; then | |
9442 | ||
9443 | # Make the cache file name correct relative to the subdirectory. | |
9444 | case "$cache_file" in | |
9445 | /*) ac_sub_cache_file=$cache_file ;; | |
9446 | *) # Relative path. | |
9447 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
9448 | esac | |
9449 | case "$ac_given_INSTALL" in | |
9450 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
9451 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
9452 | esac | |
9453 | ||
9454 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
9455 | # The eval makes quoting arguments work. | |
9456 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
9457 | then : | |
9458 | else | |
9459 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
9460 | fi | |
9461 | fi | |
9462 | ||
9463 | cd $ac_popdir | |
9464 | done | |
9465 | fi | |
9466 | ||
9467 | ||
9468 | exit 0 |