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. | |
72473524 DJ |
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 |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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 | ||
72473524 | 727 | #line 728 "configure" |
c906108c SS |
728 | #include "confdefs.h" |
729 | ||
730 | main(){return(0);} | |
731 | EOF | |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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 | |
72473524 | 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" | |
72473524 | 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 | |
72473524 | 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" | |
72473524 | 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 | |
72473524 | 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" | |
72473524 | 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 | |
72473524 | 903 | echo "configure:904: checking for AIX" >&5 |
c906108c | 904 | cat > conftest.$ac_ext <<EOF |
72473524 | 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 | ||
46711df8 MK |
926 | |
927 | echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 | |
928 | echo "configure:929: checking for strerror in -lcposix" >&5 | |
929 | ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` | |
930 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
931 | echo $ac_n "(cached) $ac_c" 1>&6 | |
932 | else | |
933 | ac_save_LIBS="$LIBS" | |
934 | LIBS="-lcposix $LIBS" | |
935 | cat > conftest.$ac_ext <<EOF | |
936 | #line 937 "configure" | |
937 | #include "confdefs.h" | |
938 | /* Override any gcc2 internal prototype to avoid an error. */ | |
939 | /* We use char because int might match the return type of a gcc2 | |
940 | builtin and then its argument prototype would still apply. */ | |
941 | char strerror(); | |
942 | ||
943 | int main() { | |
944 | strerror() | |
945 | ; return 0; } | |
c906108c | 946 | EOF |
46711df8 MK |
947 | if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
948 | rm -rf conftest* | |
949 | eval "ac_cv_lib_$ac_lib_var=yes" | |
950 | else | |
951 | echo "configure: failed program was:" >&5 | |
952 | cat conftest.$ac_ext >&5 | |
953 | rm -rf conftest* | |
954 | eval "ac_cv_lib_$ac_lib_var=no" | |
955 | fi | |
956 | rm -f conftest* | |
957 | LIBS="$ac_save_LIBS" | |
c906108c | 958 | |
46711df8 MK |
959 | fi |
960 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
961 | echo "$ac_t""yes" 1>&6 | |
962 | LIBS="$LIBS -lcposix" | |
c906108c SS |
963 | else |
964 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
965 | fi |
966 | ||
46711df8 MK |
967 | |
968 | ||
c906108c SS |
969 | |
970 | ||
971 | ||
972 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
46711df8 | 973 | echo "configure:974: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
974 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
975 | echo $ac_n "(cached) $ac_c" 1>&6 | |
976 | else | |
977 | am_cv_prog_cc_stdc=no | |
978 | ac_save_CC="$CC" | |
979 | # Don't try gcc -ansi; that turns off useful extensions and | |
980 | # breaks some systems' header files. | |
981 | # AIX -qlanglvl=ansi | |
982 | # Ultrix and OSF/1 -std1 | |
983 | # HP-UX -Aa -D_HPUX_SOURCE | |
984 | # SVR4 -Xc -D__EXTENSIONS__ | |
985 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
986 | do | |
987 | CC="$ac_save_CC $ac_arg" | |
988 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 989 | #line 990 "configure" |
c906108c SS |
990 | #include "confdefs.h" |
991 | #include <stdarg.h> | |
992 | #include <stdio.h> | |
993 | #include <sys/types.h> | |
994 | #include <sys/stat.h> | |
995 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
996 | struct buf { int x; }; | |
997 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
998 | static char *e (p, i) | |
999 | char **p; | |
1000 | int i; | |
1001 | { | |
1002 | return p[i]; | |
1003 | } | |
1004 | static char *f (char * (*g) (char **, int), char **p, ...) | |
1005 | { | |
1006 | char *s; | |
1007 | va_list v; | |
1008 | va_start (v,p); | |
1009 | s = g (p, va_arg (v,int)); | |
1010 | va_end (v); | |
1011 | return s; | |
1012 | } | |
1013 | int test (int i, double x); | |
1014 | struct s1 {int (*f) (int a);}; | |
1015 | struct s2 {int (*f) (double a);}; | |
1016 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1017 | int argc; | |
1018 | char **argv; | |
1019 | ||
1020 | int main() { | |
1021 | ||
1022 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1023 | ||
1024 | ; return 0; } | |
1025 | EOF | |
46711df8 | 1026 | if { (eval echo configure:1027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1027 | rm -rf conftest* |
1028 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1029 | else | |
1030 | echo "configure: failed program was:" >&5 | |
1031 | cat conftest.$ac_ext >&5 | |
1032 | fi | |
1033 | rm -f conftest* | |
1034 | done | |
1035 | CC="$ac_save_CC" | |
1036 | ||
1037 | fi | |
1038 | ||
1039 | if test -z "$am_cv_prog_cc_stdc"; then | |
1040 | echo "$ac_t""none needed" 1>&6 | |
1041 | else | |
1042 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1043 | fi | |
1044 | case "x$am_cv_prog_cc_stdc" in | |
1045 | x|xno) ;; | |
1046 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1047 | esac | |
1048 | ||
1049 | ||
1050 | ac_aux_dir= | |
1051 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1052 | if test -f $ac_dir/install-sh; then | |
1053 | ac_aux_dir=$ac_dir | |
1054 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1055 | break | |
1056 | elif test -f $ac_dir/install.sh; then | |
1057 | ac_aux_dir=$ac_dir | |
1058 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1059 | break | |
1060 | fi | |
1061 | done | |
1062 | if test -z "$ac_aux_dir"; then | |
1063 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1064 | fi | |
1065 | ac_config_guess=$ac_aux_dir/config.guess | |
1066 | ac_config_sub=$ac_aux_dir/config.sub | |
1067 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1068 | ||
1069 | ||
1070 | # Do some error checking and defaulting for the host and target type. | |
1071 | # The inputs are: | |
1072 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1073 | # | |
1074 | # The rules are: | |
1075 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1076 | # same time. | |
1077 | # 2. Host defaults to nonopt. | |
1078 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1079 | # as determined by config.guess. | |
1080 | # 4. Target and build default to nonopt. | |
1081 | # 5. If nonopt is not specified, then target and build default to host. | |
1082 | ||
1083 | # The aliases save the names the user supplied, while $host etc. | |
1084 | # will get canonicalized. | |
1085 | case $host---$target---$nonopt in | |
1086 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1087 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1088 | esac | |
1089 | ||
1090 | ||
1091 | # Make sure we can run config.sub. | |
1092 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1093 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1094 | fi | |
1095 | ||
1096 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
46711df8 | 1097 | echo "configure:1098: checking host system type" >&5 |
c906108c SS |
1098 | |
1099 | host_alias=$host | |
1100 | case "$host_alias" in | |
1101 | NONE) | |
1102 | case $nonopt in | |
1103 | NONE) | |
1104 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1105 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1106 | fi ;; | |
1107 | *) host_alias=$nonopt ;; | |
1108 | esac ;; | |
1109 | esac | |
1110 | ||
1111 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1112 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1113 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1114 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1115 | echo "$ac_t""$host" 1>&6 | |
1116 | ||
1117 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
46711df8 | 1118 | echo "configure:1119: checking target system type" >&5 |
c906108c SS |
1119 | |
1120 | target_alias=$target | |
1121 | case "$target_alias" in | |
1122 | NONE) | |
1123 | case $nonopt in | |
1124 | NONE) target_alias=$host_alias ;; | |
1125 | *) target_alias=$nonopt ;; | |
1126 | esac ;; | |
1127 | esac | |
1128 | ||
1129 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1130 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1131 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1132 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1133 | echo "$ac_t""$target" 1>&6 | |
1134 | ||
1135 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
46711df8 | 1136 | echo "configure:1137: checking build system type" >&5 |
c906108c SS |
1137 | |
1138 | build_alias=$build | |
1139 | case "$build_alias" in | |
1140 | NONE) | |
1141 | case $nonopt in | |
1142 | NONE) build_alias=$host_alias ;; | |
1143 | *) build_alias=$nonopt ;; | |
1144 | esac ;; | |
1145 | esac | |
1146 | ||
1147 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1148 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1149 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1150 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1151 | echo "$ac_t""$build" 1>&6 | |
1152 | ||
1153 | test "$host_alias" != "$target_alias" && | |
1154 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1155 | NONENONEs,x,x, && | |
1156 | program_prefix=${target_alias}- | |
1157 | ||
1158 | ||
1159 | ALL_LINGUAS= | |
1160 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
46711df8 | 1161 | echo "configure:1162: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1162 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1163 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1165 | else | |
1166 | cat > conftestmake <<\EOF | |
1167 | all: | |
1168 | @echo 'ac_maketemp="${MAKE}"' | |
1169 | EOF | |
1170 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1171 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1172 | if test -n "$ac_maketemp"; then | |
1173 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1174 | else | |
1175 | eval ac_cv_prog_make_${ac_make}_set=no | |
1176 | fi | |
1177 | rm -f conftestmake | |
1178 | fi | |
1179 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1180 | echo "$ac_t""yes" 1>&6 | |
1181 | SET_MAKE= | |
1182 | else | |
1183 | echo "$ac_t""no" 1>&6 | |
1184 | SET_MAKE="MAKE=${MAKE-make}" | |
1185 | fi | |
1186 | ||
1187 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1188 | set dummy ranlib; ac_word=$2 | |
1189 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 1190 | echo "configure:1191: checking for $ac_word" >&5 |
c906108c SS |
1191 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1193 | else | |
1194 | if test -n "$RANLIB"; then | |
1195 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1196 | else | |
1197 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1198 | ac_dummy="$PATH" | |
1199 | for ac_dir in $ac_dummy; do | |
1200 | test -z "$ac_dir" && ac_dir=. | |
1201 | if test -f $ac_dir/$ac_word; then | |
1202 | ac_cv_prog_RANLIB="ranlib" | |
1203 | break | |
1204 | fi | |
1205 | done | |
1206 | IFS="$ac_save_ifs" | |
1207 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1208 | fi | |
1209 | fi | |
1210 | RANLIB="$ac_cv_prog_RANLIB" | |
1211 | if test -n "$RANLIB"; then | |
1212 | echo "$ac_t""$RANLIB" 1>&6 | |
1213 | else | |
1214 | echo "$ac_t""no" 1>&6 | |
1215 | fi | |
1216 | ||
1217 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
46711df8 | 1218 | echo "configure:1219: checking for ANSI C header files" >&5 |
c906108c SS |
1219 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1220 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1221 | else | |
1222 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1223 | #line 1224 "configure" |
c906108c SS |
1224 | #include "confdefs.h" |
1225 | #include <stdlib.h> | |
1226 | #include <stdarg.h> | |
1227 | #include <string.h> | |
1228 | #include <float.h> | |
1229 | EOF | |
1230 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 1231 | { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1232 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1233 | if test -z "$ac_err"; then | |
1234 | rm -rf conftest* | |
1235 | ac_cv_header_stdc=yes | |
1236 | else | |
1237 | echo "$ac_err" >&5 | |
1238 | echo "configure: failed program was:" >&5 | |
1239 | cat conftest.$ac_ext >&5 | |
1240 | rm -rf conftest* | |
1241 | ac_cv_header_stdc=no | |
1242 | fi | |
1243 | rm -f conftest* | |
1244 | ||
1245 | if test $ac_cv_header_stdc = yes; then | |
1246 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1247 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1248 | #line 1249 "configure" |
c906108c SS |
1249 | #include "confdefs.h" |
1250 | #include <string.h> | |
1251 | EOF | |
1252 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1253 | egrep "memchr" >/dev/null 2>&1; then | |
1254 | : | |
1255 | else | |
1256 | rm -rf conftest* | |
1257 | ac_cv_header_stdc=no | |
1258 | fi | |
1259 | rm -f conftest* | |
1260 | ||
1261 | fi | |
1262 | ||
1263 | if test $ac_cv_header_stdc = yes; then | |
1264 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1265 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1266 | #line 1267 "configure" |
c906108c SS |
1267 | #include "confdefs.h" |
1268 | #include <stdlib.h> | |
1269 | EOF | |
1270 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1271 | egrep "free" >/dev/null 2>&1; then | |
1272 | : | |
1273 | else | |
1274 | rm -rf conftest* | |
1275 | ac_cv_header_stdc=no | |
1276 | fi | |
1277 | rm -f conftest* | |
1278 | ||
1279 | fi | |
1280 | ||
1281 | if test $ac_cv_header_stdc = yes; then | |
1282 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1283 | if test "$cross_compiling" = yes; then | |
1284 | : | |
1285 | else | |
1286 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1287 | #line 1288 "configure" |
c906108c SS |
1288 | #include "confdefs.h" |
1289 | #include <ctype.h> | |
1290 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1291 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1292 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1293 | int main () { int i; for (i = 0; i < 256; i++) | |
1294 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1295 | exit (0); } | |
1296 | ||
1297 | EOF | |
46711df8 | 1298 | if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1299 | then |
1300 | : | |
1301 | else | |
1302 | echo "configure: failed program was:" >&5 | |
1303 | cat conftest.$ac_ext >&5 | |
1304 | rm -fr conftest* | |
1305 | ac_cv_header_stdc=no | |
1306 | fi | |
1307 | rm -fr conftest* | |
1308 | fi | |
1309 | ||
1310 | fi | |
1311 | fi | |
1312 | ||
1313 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1314 | if test $ac_cv_header_stdc = yes; then | |
1315 | cat >> confdefs.h <<\EOF | |
1316 | #define STDC_HEADERS 1 | |
1317 | EOF | |
1318 | ||
1319 | fi | |
1320 | ||
1321 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
46711df8 | 1322 | echo "configure:1323: checking for working const" >&5 |
c906108c SS |
1323 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1324 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1325 | else | |
1326 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1327 | #line 1328 "configure" |
c906108c SS |
1328 | #include "confdefs.h" |
1329 | ||
1330 | int main() { | |
1331 | ||
1332 | /* Ultrix mips cc rejects this. */ | |
1333 | typedef int charset[2]; const charset x; | |
1334 | /* SunOS 4.1.1 cc rejects this. */ | |
1335 | char const *const *ccp; | |
1336 | char **p; | |
1337 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1338 | struct point {int x, y;}; | |
1339 | static struct point const zero = {0,0}; | |
1340 | /* AIX XL C 1.02.0.0 rejects this. | |
1341 | It does not let you subtract one const X* pointer from another in an arm | |
1342 | of an if-expression whose if-part is not a constant expression */ | |
1343 | const char *g = "string"; | |
1344 | ccp = &g + (g ? g-g : 0); | |
1345 | /* HPUX 7.0 cc rejects these. */ | |
1346 | ++ccp; | |
1347 | p = (char**) ccp; | |
1348 | ccp = (char const *const *) p; | |
1349 | { /* SCO 3.2v4 cc rejects this. */ | |
1350 | char *t; | |
1351 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1352 | ||
1353 | *t++ = 0; | |
1354 | } | |
1355 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1356 | int x[] = {25, 17}; | |
1357 | const int *foo = &x[0]; | |
1358 | ++foo; | |
1359 | } | |
1360 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1361 | typedef const int *iptr; | |
1362 | iptr p = 0; | |
1363 | ++p; | |
1364 | } | |
1365 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1366 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1367 | struct s { int j; const int *ap[3]; }; | |
1368 | struct s *b; b->j = 5; | |
1369 | } | |
1370 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1371 | const int foo = 10; | |
1372 | } | |
1373 | ||
1374 | ; return 0; } | |
1375 | EOF | |
46711df8 | 1376 | if { (eval echo configure:1377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1377 | rm -rf conftest* |
1378 | ac_cv_c_const=yes | |
1379 | else | |
1380 | echo "configure: failed program was:" >&5 | |
1381 | cat conftest.$ac_ext >&5 | |
1382 | rm -rf conftest* | |
1383 | ac_cv_c_const=no | |
1384 | fi | |
1385 | rm -f conftest* | |
1386 | fi | |
1387 | ||
1388 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1389 | if test $ac_cv_c_const = no; then | |
1390 | cat >> confdefs.h <<\EOF | |
1391 | #define const | |
1392 | EOF | |
1393 | ||
1394 | fi | |
1395 | ||
1396 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
46711df8 | 1397 | echo "configure:1398: checking for inline" >&5 |
c906108c SS |
1398 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1399 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1400 | else | |
1401 | ac_cv_c_inline=no | |
1402 | for ac_kw in inline __inline__ __inline; do | |
1403 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1404 | #line 1405 "configure" |
c906108c SS |
1405 | #include "confdefs.h" |
1406 | ||
1407 | int main() { | |
1408 | } $ac_kw foo() { | |
1409 | ; return 0; } | |
1410 | EOF | |
46711df8 | 1411 | if { (eval echo configure:1412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1412 | rm -rf conftest* |
1413 | ac_cv_c_inline=$ac_kw; break | |
1414 | else | |
1415 | echo "configure: failed program was:" >&5 | |
1416 | cat conftest.$ac_ext >&5 | |
1417 | fi | |
1418 | rm -f conftest* | |
1419 | done | |
1420 | ||
1421 | fi | |
1422 | ||
1423 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1424 | case "$ac_cv_c_inline" in | |
1425 | inline | yes) ;; | |
1426 | no) cat >> confdefs.h <<\EOF | |
1427 | #define inline | |
1428 | EOF | |
1429 | ;; | |
1430 | *) cat >> confdefs.h <<EOF | |
1431 | #define inline $ac_cv_c_inline | |
1432 | EOF | |
1433 | ;; | |
1434 | esac | |
1435 | ||
1436 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
46711df8 | 1437 | echo "configure:1438: checking for off_t" >&5 |
c906108c SS |
1438 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1439 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1440 | else | |
1441 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1442 | #line 1443 "configure" |
c906108c SS |
1443 | #include "confdefs.h" |
1444 | #include <sys/types.h> | |
1445 | #if STDC_HEADERS | |
1446 | #include <stdlib.h> | |
1447 | #include <stddef.h> | |
1448 | #endif | |
1449 | EOF | |
1450 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1451 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1452 | rm -rf conftest* | |
1453 | ac_cv_type_off_t=yes | |
1454 | else | |
1455 | rm -rf conftest* | |
1456 | ac_cv_type_off_t=no | |
1457 | fi | |
1458 | rm -f conftest* | |
1459 | ||
1460 | fi | |
1461 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1462 | if test $ac_cv_type_off_t = no; then | |
1463 | cat >> confdefs.h <<\EOF | |
1464 | #define off_t long | |
1465 | EOF | |
1466 | ||
1467 | fi | |
1468 | ||
1469 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
46711df8 | 1470 | echo "configure:1471: checking for size_t" >&5 |
c906108c SS |
1471 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1472 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1473 | else | |
1474 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1475 | #line 1476 "configure" |
c906108c SS |
1476 | #include "confdefs.h" |
1477 | #include <sys/types.h> | |
1478 | #if STDC_HEADERS | |
1479 | #include <stdlib.h> | |
1480 | #include <stddef.h> | |
1481 | #endif | |
1482 | EOF | |
1483 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1484 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1485 | rm -rf conftest* | |
1486 | ac_cv_type_size_t=yes | |
1487 | else | |
1488 | rm -rf conftest* | |
1489 | ac_cv_type_size_t=no | |
1490 | fi | |
1491 | rm -f conftest* | |
1492 | ||
1493 | fi | |
1494 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1495 | if test $ac_cv_type_size_t = no; then | |
1496 | cat >> confdefs.h <<\EOF | |
1497 | #define size_t unsigned | |
1498 | EOF | |
1499 | ||
1500 | fi | |
1501 | ||
1502 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1503 | # for constant arguments. Useless! | |
1504 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
46711df8 | 1505 | echo "configure:1506: checking for working alloca.h" >&5 |
c906108c SS |
1506 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1507 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1508 | else | |
1509 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1510 | #line 1511 "configure" |
c906108c SS |
1511 | #include "confdefs.h" |
1512 | #include <alloca.h> | |
1513 | int main() { | |
1514 | char *p = alloca(2 * sizeof(int)); | |
1515 | ; return 0; } | |
1516 | EOF | |
46711df8 | 1517 | if { (eval echo configure:1518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1518 | rm -rf conftest* |
1519 | ac_cv_header_alloca_h=yes | |
1520 | else | |
1521 | echo "configure: failed program was:" >&5 | |
1522 | cat conftest.$ac_ext >&5 | |
1523 | rm -rf conftest* | |
1524 | ac_cv_header_alloca_h=no | |
1525 | fi | |
1526 | rm -f conftest* | |
1527 | fi | |
1528 | ||
1529 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1530 | if test $ac_cv_header_alloca_h = yes; then | |
1531 | cat >> confdefs.h <<\EOF | |
1532 | #define HAVE_ALLOCA_H 1 | |
1533 | EOF | |
1534 | ||
1535 | fi | |
1536 | ||
1537 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
46711df8 | 1538 | echo "configure:1539: checking for alloca" >&5 |
c906108c SS |
1539 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1540 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1541 | else | |
1542 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1543 | #line 1544 "configure" |
c906108c SS |
1544 | #include "confdefs.h" |
1545 | ||
1546 | #ifdef __GNUC__ | |
1547 | # define alloca __builtin_alloca | |
1548 | #else | |
1549 | # ifdef _MSC_VER | |
1550 | # include <malloc.h> | |
1551 | # define alloca _alloca | |
1552 | # else | |
1553 | # if HAVE_ALLOCA_H | |
1554 | # include <alloca.h> | |
1555 | # else | |
1556 | # ifdef _AIX | |
1557 | #pragma alloca | |
1558 | # else | |
1559 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1560 | char *alloca (); | |
1561 | # endif | |
1562 | # endif | |
1563 | # endif | |
1564 | # endif | |
1565 | #endif | |
1566 | ||
1567 | int main() { | |
1568 | char *p = (char *) alloca(1); | |
1569 | ; return 0; } | |
1570 | EOF | |
46711df8 | 1571 | if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1572 | rm -rf conftest* |
1573 | ac_cv_func_alloca_works=yes | |
1574 | else | |
1575 | echo "configure: failed program was:" >&5 | |
1576 | cat conftest.$ac_ext >&5 | |
1577 | rm -rf conftest* | |
1578 | ac_cv_func_alloca_works=no | |
1579 | fi | |
1580 | rm -f conftest* | |
1581 | fi | |
1582 | ||
1583 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1584 | if test $ac_cv_func_alloca_works = yes; then | |
1585 | cat >> confdefs.h <<\EOF | |
1586 | #define HAVE_ALLOCA 1 | |
1587 | EOF | |
1588 | ||
1589 | fi | |
1590 | ||
1591 | if test $ac_cv_func_alloca_works = no; then | |
1592 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1593 | # that cause trouble. Some versions do not even contain alloca or | |
1594 | # contain a buggy version. If you still want to use their alloca, | |
1595 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1596 | ALLOCA=alloca.${ac_objext} | |
1597 | cat >> confdefs.h <<\EOF | |
1598 | #define C_ALLOCA 1 | |
1599 | EOF | |
1600 | ||
1601 | ||
1602 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
46711df8 | 1603 | echo "configure:1604: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1604 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1606 | else | |
1607 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1608 | #line 1609 "configure" |
c906108c SS |
1609 | #include "confdefs.h" |
1610 | #if defined(CRAY) && ! defined(CRAY2) | |
1611 | webecray | |
1612 | #else | |
1613 | wenotbecray | |
1614 | #endif | |
1615 | ||
1616 | EOF | |
1617 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1618 | egrep "webecray" >/dev/null 2>&1; then | |
1619 | rm -rf conftest* | |
1620 | ac_cv_os_cray=yes | |
1621 | else | |
1622 | rm -rf conftest* | |
1623 | ac_cv_os_cray=no | |
1624 | fi | |
1625 | rm -f conftest* | |
1626 | ||
1627 | fi | |
1628 | ||
1629 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1630 | if test $ac_cv_os_cray = yes; then | |
1631 | for ac_func in _getb67 GETB67 getb67; do | |
1632 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 1633 | echo "configure:1634: checking for $ac_func" >&5 |
c906108c SS |
1634 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1636 | else | |
1637 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1638 | #line 1639 "configure" |
c906108c SS |
1639 | #include "confdefs.h" |
1640 | /* System header to define __stub macros and hopefully few prototypes, | |
1641 | which can conflict with char $ac_func(); below. */ | |
1642 | #include <assert.h> | |
1643 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1644 | /* We use char because int might match the return type of a gcc2 | |
1645 | builtin and then its argument prototype would still apply. */ | |
1646 | char $ac_func(); | |
1647 | ||
1648 | int main() { | |
1649 | ||
1650 | /* The GNU C library defines this for functions which it implements | |
1651 | to always fail with ENOSYS. Some functions are actually named | |
1652 | something starting with __ and the normal name is an alias. */ | |
1653 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1654 | choke me | |
1655 | #else | |
1656 | $ac_func(); | |
1657 | #endif | |
1658 | ||
1659 | ; return 0; } | |
1660 | EOF | |
46711df8 | 1661 | if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1662 | rm -rf conftest* |
1663 | eval "ac_cv_func_$ac_func=yes" | |
1664 | else | |
1665 | echo "configure: failed program was:" >&5 | |
1666 | cat conftest.$ac_ext >&5 | |
1667 | rm -rf conftest* | |
1668 | eval "ac_cv_func_$ac_func=no" | |
1669 | fi | |
1670 | rm -f conftest* | |
1671 | fi | |
1672 | ||
1673 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1674 | echo "$ac_t""yes" 1>&6 | |
1675 | cat >> confdefs.h <<EOF | |
1676 | #define CRAY_STACKSEG_END $ac_func | |
1677 | EOF | |
1678 | ||
1679 | break | |
1680 | else | |
1681 | echo "$ac_t""no" 1>&6 | |
1682 | fi | |
1683 | ||
1684 | done | |
1685 | fi | |
1686 | ||
1687 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
46711df8 | 1688 | echo "configure:1689: checking stack direction for C alloca" >&5 |
c906108c SS |
1689 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1690 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1691 | else | |
1692 | if test "$cross_compiling" = yes; then | |
1693 | ac_cv_c_stack_direction=0 | |
1694 | else | |
1695 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1696 | #line 1697 "configure" |
c906108c SS |
1697 | #include "confdefs.h" |
1698 | find_stack_direction () | |
1699 | { | |
1700 | static char *addr = 0; | |
1701 | auto char dummy; | |
1702 | if (addr == 0) | |
1703 | { | |
1704 | addr = &dummy; | |
1705 | return find_stack_direction (); | |
1706 | } | |
1707 | else | |
1708 | return (&dummy > addr) ? 1 : -1; | |
1709 | } | |
1710 | main () | |
1711 | { | |
1712 | exit (find_stack_direction() < 0); | |
1713 | } | |
1714 | EOF | |
46711df8 | 1715 | if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1716 | then |
1717 | ac_cv_c_stack_direction=1 | |
1718 | else | |
1719 | echo "configure: failed program was:" >&5 | |
1720 | cat conftest.$ac_ext >&5 | |
1721 | rm -fr conftest* | |
1722 | ac_cv_c_stack_direction=-1 | |
1723 | fi | |
1724 | rm -fr conftest* | |
1725 | fi | |
1726 | ||
1727 | fi | |
1728 | ||
1729 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1730 | cat >> confdefs.h <<EOF | |
1731 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1732 | EOF | |
1733 | ||
1734 | fi | |
1735 | ||
1736 | for ac_hdr in unistd.h | |
1737 | do | |
1738 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1739 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
46711df8 | 1740 | echo "configure:1741: checking for $ac_hdr" >&5 |
c906108c SS |
1741 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1742 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1743 | else | |
1744 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1745 | #line 1746 "configure" |
c906108c SS |
1746 | #include "confdefs.h" |
1747 | #include <$ac_hdr> | |
1748 | EOF | |
1749 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 1750 | { (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1751 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1752 | if test -z "$ac_err"; then | |
1753 | rm -rf conftest* | |
1754 | eval "ac_cv_header_$ac_safe=yes" | |
1755 | else | |
1756 | echo "$ac_err" >&5 | |
1757 | echo "configure: failed program was:" >&5 | |
1758 | cat conftest.$ac_ext >&5 | |
1759 | rm -rf conftest* | |
1760 | eval "ac_cv_header_$ac_safe=no" | |
1761 | fi | |
1762 | rm -f conftest* | |
1763 | fi | |
1764 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1765 | echo "$ac_t""yes" 1>&6 | |
1766 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1767 | cat >> confdefs.h <<EOF | |
1768 | #define $ac_tr_hdr 1 | |
1769 | EOF | |
1770 | ||
1771 | else | |
1772 | echo "$ac_t""no" 1>&6 | |
1773 | fi | |
1774 | done | |
1775 | ||
1776 | for ac_func in getpagesize | |
1777 | do | |
1778 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 1779 | echo "configure:1780: checking for $ac_func" >&5 |
c906108c SS |
1780 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1781 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1782 | else | |
1783 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1784 | #line 1785 "configure" |
c906108c SS |
1785 | #include "confdefs.h" |
1786 | /* System header to define __stub macros and hopefully few prototypes, | |
1787 | which can conflict with char $ac_func(); below. */ | |
1788 | #include <assert.h> | |
1789 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1790 | /* We use char because int might match the return type of a gcc2 | |
1791 | builtin and then its argument prototype would still apply. */ | |
1792 | char $ac_func(); | |
1793 | ||
1794 | int main() { | |
1795 | ||
1796 | /* The GNU C library defines this for functions which it implements | |
1797 | to always fail with ENOSYS. Some functions are actually named | |
1798 | something starting with __ and the normal name is an alias. */ | |
1799 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1800 | choke me | |
1801 | #else | |
1802 | $ac_func(); | |
1803 | #endif | |
1804 | ||
1805 | ; return 0; } | |
1806 | EOF | |
46711df8 | 1807 | if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1808 | rm -rf conftest* |
1809 | eval "ac_cv_func_$ac_func=yes" | |
1810 | else | |
1811 | echo "configure: failed program was:" >&5 | |
1812 | cat conftest.$ac_ext >&5 | |
1813 | rm -rf conftest* | |
1814 | eval "ac_cv_func_$ac_func=no" | |
1815 | fi | |
1816 | rm -f conftest* | |
1817 | fi | |
1818 | ||
1819 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1820 | echo "$ac_t""yes" 1>&6 | |
1821 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1822 | cat >> confdefs.h <<EOF | |
1823 | #define $ac_tr_func 1 | |
1824 | EOF | |
1825 | ||
1826 | else | |
1827 | echo "$ac_t""no" 1>&6 | |
1828 | fi | |
1829 | done | |
1830 | ||
1831 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
46711df8 | 1832 | echo "configure:1833: checking for working mmap" >&5 |
c906108c SS |
1833 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1834 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1835 | else | |
1836 | if test "$cross_compiling" = yes; then | |
1837 | ac_cv_func_mmap_fixed_mapped=no | |
1838 | else | |
1839 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 1840 | #line 1841 "configure" |
c906108c SS |
1841 | #include "confdefs.h" |
1842 | ||
1843 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1844 | Here is a matrix of mmap possibilities: | |
1845 | mmap private not fixed | |
1846 | mmap private fixed at somewhere currently unmapped | |
1847 | mmap private fixed at somewhere already mapped | |
1848 | mmap shared not fixed | |
1849 | mmap shared fixed at somewhere currently unmapped | |
1850 | mmap shared fixed at somewhere already mapped | |
1851 | For private mappings, we should verify that changes cannot be read() | |
1852 | back from the file, nor mmap's back from the file at a different | |
1853 | address. (There have been systems where private was not correctly | |
1854 | implemented like the infamous i386 svr4.0, and systems where the | |
1855 | VM page cache was not coherent with the filesystem buffer cache | |
1856 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1857 | For shared mappings, we should conversely verify that changes get | |
1858 | propogated back to all the places they're supposed to be. | |
1859 | ||
1860 | Grep wants private fixed already mapped. | |
1861 | The main things grep needs to know about mmap are: | |
1862 | * does it exist and is it safe to write into the mmap'd area | |
1863 | * how to use it (BSD variants) */ | |
1864 | #include <sys/types.h> | |
1865 | #include <fcntl.h> | |
1866 | #include <sys/mman.h> | |
1867 | ||
1868 | /* This mess was copied from the GNU getpagesize.h. */ | |
1869 | #ifndef HAVE_GETPAGESIZE | |
1870 | # ifdef HAVE_UNISTD_H | |
1871 | # include <unistd.h> | |
1872 | # endif | |
1873 | ||
1874 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1875 | # ifndef HAVE_SYS_PARAM_H | |
1876 | # define HAVE_SYS_PARAM_H 1 | |
1877 | # endif | |
1878 | ||
1879 | # ifdef _SC_PAGESIZE | |
1880 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1881 | # else /* no _SC_PAGESIZE */ | |
1882 | # ifdef HAVE_SYS_PARAM_H | |
1883 | # include <sys/param.h> | |
1884 | # ifdef EXEC_PAGESIZE | |
1885 | # define getpagesize() EXEC_PAGESIZE | |
1886 | # else /* no EXEC_PAGESIZE */ | |
1887 | # ifdef NBPG | |
1888 | # define getpagesize() NBPG * CLSIZE | |
1889 | # ifndef CLSIZE | |
1890 | # define CLSIZE 1 | |
1891 | # endif /* no CLSIZE */ | |
1892 | # else /* no NBPG */ | |
1893 | # ifdef NBPC | |
1894 | # define getpagesize() NBPC | |
1895 | # else /* no NBPC */ | |
1896 | # ifdef PAGESIZE | |
1897 | # define getpagesize() PAGESIZE | |
1898 | # endif /* PAGESIZE */ | |
1899 | # endif /* no NBPC */ | |
1900 | # endif /* no NBPG */ | |
1901 | # endif /* no EXEC_PAGESIZE */ | |
1902 | # else /* no HAVE_SYS_PARAM_H */ | |
1903 | # define getpagesize() 8192 /* punt totally */ | |
1904 | # endif /* no HAVE_SYS_PARAM_H */ | |
1905 | # endif /* no _SC_PAGESIZE */ | |
1906 | ||
1907 | #endif /* no HAVE_GETPAGESIZE */ | |
1908 | ||
1909 | #ifdef __cplusplus | |
1910 | extern "C" { void *malloc(unsigned); } | |
1911 | #else | |
1912 | char *malloc(); | |
1913 | #endif | |
1914 | ||
1915 | int | |
1916 | main() | |
1917 | { | |
1918 | char *data, *data2, *data3; | |
1919 | int i, pagesize; | |
1920 | int fd; | |
1921 | ||
1922 | pagesize = getpagesize(); | |
1923 | ||
1924 | /* | |
1925 | * First, make a file with some known garbage in it. | |
1926 | */ | |
1927 | data = malloc(pagesize); | |
1928 | if (!data) | |
1929 | exit(1); | |
1930 | for (i = 0; i < pagesize; ++i) | |
1931 | *(data + i) = rand(); | |
1932 | umask(0); | |
1933 | fd = creat("conftestmmap", 0600); | |
1934 | if (fd < 0) | |
1935 | exit(1); | |
1936 | if (write(fd, data, pagesize) != pagesize) | |
1937 | exit(1); | |
1938 | close(fd); | |
1939 | ||
1940 | /* | |
1941 | * Next, try to mmap the file at a fixed address which | |
1942 | * already has something else allocated at it. If we can, | |
1943 | * also make sure that we see the same garbage. | |
1944 | */ | |
1945 | fd = open("conftestmmap", O_RDWR); | |
1946 | if (fd < 0) | |
1947 | exit(1); | |
1948 | data2 = malloc(2 * pagesize); | |
1949 | if (!data2) | |
1950 | exit(1); | |
1951 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1952 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1953 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1954 | exit(1); | |
1955 | for (i = 0; i < pagesize; ++i) | |
1956 | if (*(data + i) != *(data2 + i)) | |
1957 | exit(1); | |
1958 | ||
1959 | /* | |
1960 | * Finally, make sure that changes to the mapped area | |
1961 | * do not percolate back to the file as seen by read(). | |
1962 | * (This is a bug on some variants of i386 svr4.0.) | |
1963 | */ | |
1964 | for (i = 0; i < pagesize; ++i) | |
1965 | *(data2 + i) = *(data2 + i) + 1; | |
1966 | data3 = malloc(pagesize); | |
1967 | if (!data3) | |
1968 | exit(1); | |
1969 | if (read(fd, data3, pagesize) != pagesize) | |
1970 | exit(1); | |
1971 | for (i = 0; i < pagesize; ++i) | |
1972 | if (*(data + i) != *(data3 + i)) | |
1973 | exit(1); | |
1974 | close(fd); | |
1975 | unlink("conftestmmap"); | |
1976 | exit(0); | |
1977 | } | |
1978 | ||
1979 | EOF | |
46711df8 | 1980 | if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1981 | then |
1982 | ac_cv_func_mmap_fixed_mapped=yes | |
1983 | else | |
1984 | echo "configure: failed program was:" >&5 | |
1985 | cat conftest.$ac_ext >&5 | |
1986 | rm -fr conftest* | |
1987 | ac_cv_func_mmap_fixed_mapped=no | |
1988 | fi | |
1989 | rm -fr conftest* | |
1990 | fi | |
1991 | ||
1992 | fi | |
1993 | ||
1994 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1995 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1996 | cat >> confdefs.h <<\EOF | |
1997 | #define HAVE_MMAP 1 | |
1998 | EOF | |
1999 | ||
2000 | fi | |
2001 | ||
2002 | ||
2003 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2004 | unistd.h values.h sys/param.h | |
2005 | do | |
2006 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2007 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
46711df8 | 2008 | echo "configure:2009: checking for $ac_hdr" >&5 |
c906108c SS |
2009 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2010 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2011 | else | |
2012 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2013 | #line 2014 "configure" |
c906108c SS |
2014 | #include "confdefs.h" |
2015 | #include <$ac_hdr> | |
2016 | EOF | |
2017 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 2018 | { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2019 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2020 | if test -z "$ac_err"; then | |
2021 | rm -rf conftest* | |
2022 | eval "ac_cv_header_$ac_safe=yes" | |
2023 | else | |
2024 | echo "$ac_err" >&5 | |
2025 | echo "configure: failed program was:" >&5 | |
2026 | cat conftest.$ac_ext >&5 | |
2027 | rm -rf conftest* | |
2028 | eval "ac_cv_header_$ac_safe=no" | |
2029 | fi | |
2030 | rm -f conftest* | |
2031 | fi | |
2032 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2033 | echo "$ac_t""yes" 1>&6 | |
2034 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2035 | cat >> confdefs.h <<EOF | |
2036 | #define $ac_tr_hdr 1 | |
2037 | EOF | |
2038 | ||
2039 | else | |
2040 | echo "$ac_t""no" 1>&6 | |
2041 | fi | |
2042 | done | |
2043 | ||
2044 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2045 | __argz_count __argz_stringify __argz_next | |
2046 | do | |
2047 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 2048 | echo "configure:2049: checking for $ac_func" >&5 |
c906108c SS |
2049 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2050 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2051 | else | |
2052 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2053 | #line 2054 "configure" |
c906108c SS |
2054 | #include "confdefs.h" |
2055 | /* System header to define __stub macros and hopefully few prototypes, | |
2056 | which can conflict with char $ac_func(); below. */ | |
2057 | #include <assert.h> | |
2058 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2059 | /* We use char because int might match the return type of a gcc2 | |
2060 | builtin and then its argument prototype would still apply. */ | |
2061 | char $ac_func(); | |
2062 | ||
2063 | int main() { | |
2064 | ||
2065 | /* The GNU C library defines this for functions which it implements | |
2066 | to always fail with ENOSYS. Some functions are actually named | |
2067 | something starting with __ and the normal name is an alias. */ | |
2068 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2069 | choke me | |
2070 | #else | |
2071 | $ac_func(); | |
2072 | #endif | |
2073 | ||
2074 | ; return 0; } | |
2075 | EOF | |
46711df8 | 2076 | if { (eval echo configure:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2077 | rm -rf conftest* |
2078 | eval "ac_cv_func_$ac_func=yes" | |
2079 | else | |
2080 | echo "configure: failed program was:" >&5 | |
2081 | cat conftest.$ac_ext >&5 | |
2082 | rm -rf conftest* | |
2083 | eval "ac_cv_func_$ac_func=no" | |
2084 | fi | |
2085 | rm -f conftest* | |
2086 | fi | |
2087 | ||
2088 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2089 | echo "$ac_t""yes" 1>&6 | |
2090 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2091 | cat >> confdefs.h <<EOF | |
2092 | #define $ac_tr_func 1 | |
2093 | EOF | |
2094 | ||
2095 | else | |
2096 | echo "$ac_t""no" 1>&6 | |
2097 | fi | |
2098 | done | |
2099 | ||
2100 | ||
2101 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2102 | for ac_func in stpcpy | |
2103 | do | |
2104 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 2105 | echo "configure:2106: checking for $ac_func" >&5 |
c906108c SS |
2106 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2108 | else | |
2109 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2110 | #line 2111 "configure" |
c906108c SS |
2111 | #include "confdefs.h" |
2112 | /* System header to define __stub macros and hopefully few prototypes, | |
2113 | which can conflict with char $ac_func(); below. */ | |
2114 | #include <assert.h> | |
2115 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2116 | /* We use char because int might match the return type of a gcc2 | |
2117 | builtin and then its argument prototype would still apply. */ | |
2118 | char $ac_func(); | |
2119 | ||
2120 | int main() { | |
2121 | ||
2122 | /* The GNU C library defines this for functions which it implements | |
2123 | to always fail with ENOSYS. Some functions are actually named | |
2124 | something starting with __ and the normal name is an alias. */ | |
2125 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2126 | choke me | |
2127 | #else | |
2128 | $ac_func(); | |
2129 | #endif | |
2130 | ||
2131 | ; return 0; } | |
2132 | EOF | |
46711df8 | 2133 | if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2134 | rm -rf conftest* |
2135 | eval "ac_cv_func_$ac_func=yes" | |
2136 | else | |
2137 | echo "configure: failed program was:" >&5 | |
2138 | cat conftest.$ac_ext >&5 | |
2139 | rm -rf conftest* | |
2140 | eval "ac_cv_func_$ac_func=no" | |
2141 | fi | |
2142 | rm -f conftest* | |
2143 | fi | |
2144 | ||
2145 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2146 | echo "$ac_t""yes" 1>&6 | |
2147 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2148 | cat >> confdefs.h <<EOF | |
2149 | #define $ac_tr_func 1 | |
2150 | EOF | |
2151 | ||
2152 | else | |
2153 | echo "$ac_t""no" 1>&6 | |
2154 | fi | |
2155 | done | |
2156 | ||
2157 | fi | |
2158 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2159 | cat >> confdefs.h <<\EOF | |
2160 | #define HAVE_STPCPY 1 | |
2161 | EOF | |
2162 | ||
2163 | fi | |
2164 | ||
2165 | if test $ac_cv_header_locale_h = yes; then | |
2166 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
46711df8 | 2167 | echo "configure:2168: checking for LC_MESSAGES" >&5 |
c906108c SS |
2168 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2170 | else | |
2171 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2172 | #line 2173 "configure" |
c906108c SS |
2173 | #include "confdefs.h" |
2174 | #include <locale.h> | |
2175 | int main() { | |
2176 | return LC_MESSAGES | |
2177 | ; return 0; } | |
2178 | EOF | |
46711df8 | 2179 | if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2180 | rm -rf conftest* |
2181 | am_cv_val_LC_MESSAGES=yes | |
2182 | else | |
2183 | echo "configure: failed program was:" >&5 | |
2184 | cat conftest.$ac_ext >&5 | |
2185 | rm -rf conftest* | |
2186 | am_cv_val_LC_MESSAGES=no | |
2187 | fi | |
2188 | rm -f conftest* | |
2189 | fi | |
2190 | ||
2191 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2192 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2193 | cat >> confdefs.h <<\EOF | |
2194 | #define HAVE_LC_MESSAGES 1 | |
2195 | EOF | |
2196 | ||
2197 | fi | |
2198 | fi | |
2199 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
46711df8 | 2200 | echo "configure:2201: checking whether NLS is requested" >&5 |
c906108c SS |
2201 | # Check whether --enable-nls or --disable-nls was given. |
2202 | if test "${enable_nls+set}" = set; then | |
2203 | enableval="$enable_nls" | |
2204 | USE_NLS=$enableval | |
2205 | else | |
2206 | USE_NLS=yes | |
2207 | fi | |
2208 | ||
2209 | echo "$ac_t""$USE_NLS" 1>&6 | |
2210 | ||
2211 | ||
2212 | USE_INCLUDED_LIBINTL=no | |
2213 | ||
2214 | if test "$USE_NLS" = "yes"; then | |
2215 | cat >> confdefs.h <<\EOF | |
2216 | #define ENABLE_NLS 1 | |
2217 | EOF | |
2218 | ||
2219 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
46711df8 | 2220 | echo "configure:2221: checking whether included gettext is requested" >&5 |
c906108c SS |
2221 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2222 | if test "${with_included_gettext+set}" = set; then | |
2223 | withval="$with_included_gettext" | |
2224 | nls_cv_force_use_gnu_gettext=$withval | |
2225 | else | |
2226 | nls_cv_force_use_gnu_gettext=no | |
2227 | fi | |
2228 | ||
2229 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2230 | ||
2231 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2232 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2233 | nls_cv_header_intl= | |
2234 | nls_cv_header_libgt= | |
2235 | CATOBJEXT=NONE | |
2236 | ||
2237 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2238 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
46711df8 | 2239 | echo "configure:2240: checking for libintl.h" >&5 |
c906108c SS |
2240 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2241 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2242 | else | |
2243 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2244 | #line 2245 "configure" |
c906108c SS |
2245 | #include "confdefs.h" |
2246 | #include <libintl.h> | |
2247 | EOF | |
2248 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 2249 | { (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2250 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2251 | if test -z "$ac_err"; then | |
2252 | rm -rf conftest* | |
2253 | eval "ac_cv_header_$ac_safe=yes" | |
2254 | else | |
2255 | echo "$ac_err" >&5 | |
2256 | echo "configure: failed program was:" >&5 | |
2257 | cat conftest.$ac_ext >&5 | |
2258 | rm -rf conftest* | |
2259 | eval "ac_cv_header_$ac_safe=no" | |
2260 | fi | |
2261 | rm -f conftest* | |
2262 | fi | |
2263 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2264 | echo "$ac_t""yes" 1>&6 | |
2265 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
46711df8 | 2266 | echo "configure:2267: checking for gettext in libc" >&5 |
c906108c SS |
2267 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2268 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2269 | else | |
2270 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2271 | #line 2272 "configure" |
c906108c SS |
2272 | #include "confdefs.h" |
2273 | #include <libintl.h> | |
2274 | int main() { | |
2275 | return (int) gettext ("") | |
2276 | ; return 0; } | |
2277 | EOF | |
46711df8 | 2278 | if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2279 | rm -rf conftest* |
2280 | gt_cv_func_gettext_libc=yes | |
2281 | else | |
2282 | echo "configure: failed program was:" >&5 | |
2283 | cat conftest.$ac_ext >&5 | |
2284 | rm -rf conftest* | |
2285 | gt_cv_func_gettext_libc=no | |
2286 | fi | |
2287 | rm -f conftest* | |
2288 | fi | |
2289 | ||
2290 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2291 | ||
2292 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2293 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
46711df8 | 2294 | echo "configure:2295: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2295 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2296 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2298 | else | |
2299 | ac_save_LIBS="$LIBS" | |
2300 | LIBS="-lintl $LIBS" | |
2301 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2302 | #line 2303 "configure" |
c906108c SS |
2303 | #include "confdefs.h" |
2304 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2305 | /* We use char because int might match the return type of a gcc2 | |
2306 | builtin and then its argument prototype would still apply. */ | |
2307 | char bindtextdomain(); | |
2308 | ||
2309 | int main() { | |
2310 | bindtextdomain() | |
2311 | ; return 0; } | |
2312 | EOF | |
46711df8 | 2313 | if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2314 | rm -rf conftest* |
2315 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2316 | else | |
2317 | echo "configure: failed program was:" >&5 | |
2318 | cat conftest.$ac_ext >&5 | |
2319 | rm -rf conftest* | |
2320 | eval "ac_cv_lib_$ac_lib_var=no" | |
2321 | fi | |
2322 | rm -f conftest* | |
2323 | LIBS="$ac_save_LIBS" | |
2324 | ||
2325 | fi | |
2326 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2327 | echo "$ac_t""yes" 1>&6 | |
2328 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
46711df8 | 2329 | echo "configure:2330: checking for gettext in libintl" >&5 |
c906108c SS |
2330 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2331 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2332 | else | |
2333 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2334 | #line 2335 "configure" |
c906108c SS |
2335 | #include "confdefs.h" |
2336 | ||
2337 | int main() { | |
2338 | return (int) gettext ("") | |
2339 | ; return 0; } | |
2340 | EOF | |
46711df8 | 2341 | if { (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2342 | rm -rf conftest* |
2343 | gt_cv_func_gettext_libintl=yes | |
2344 | else | |
2345 | echo "configure: failed program was:" >&5 | |
2346 | cat conftest.$ac_ext >&5 | |
2347 | rm -rf conftest* | |
2348 | gt_cv_func_gettext_libintl=no | |
2349 | fi | |
2350 | rm -f conftest* | |
2351 | fi | |
2352 | ||
2353 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2354 | else | |
2355 | echo "$ac_t""no" 1>&6 | |
2356 | fi | |
2357 | ||
2358 | fi | |
2359 | ||
2360 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2361 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2362 | cat >> confdefs.h <<\EOF | |
2363 | #define HAVE_GETTEXT 1 | |
2364 | EOF | |
2365 | ||
2366 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2367 | set dummy msgfmt; ac_word=$2 | |
2368 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2369 | echo "configure:2370: checking for $ac_word" >&5 |
c906108c SS |
2370 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2371 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2372 | else | |
2373 | case "$MSGFMT" in | |
2374 | /*) | |
2375 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2376 | ;; | |
2377 | *) | |
2378 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2379 | for ac_dir in $PATH; do | |
2380 | test -z "$ac_dir" && ac_dir=. | |
2381 | if test -f $ac_dir/$ac_word; then | |
2382 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2383 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2384 | break | |
2385 | fi | |
2386 | fi | |
2387 | done | |
2388 | IFS="$ac_save_ifs" | |
2389 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2390 | ;; | |
2391 | esac | |
2392 | fi | |
2393 | MSGFMT="$ac_cv_path_MSGFMT" | |
2394 | if test -n "$MSGFMT"; then | |
2395 | echo "$ac_t""$MSGFMT" 1>&6 | |
2396 | else | |
2397 | echo "$ac_t""no" 1>&6 | |
2398 | fi | |
2399 | if test "$MSGFMT" != "no"; then | |
2400 | for ac_func in dcgettext | |
2401 | do | |
2402 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 2403 | echo "configure:2404: checking for $ac_func" >&5 |
c906108c SS |
2404 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2405 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2406 | else | |
2407 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2408 | #line 2409 "configure" |
c906108c SS |
2409 | #include "confdefs.h" |
2410 | /* System header to define __stub macros and hopefully few prototypes, | |
2411 | which can conflict with char $ac_func(); below. */ | |
2412 | #include <assert.h> | |
2413 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2414 | /* We use char because int might match the return type of a gcc2 | |
2415 | builtin and then its argument prototype would still apply. */ | |
2416 | char $ac_func(); | |
2417 | ||
2418 | int main() { | |
2419 | ||
2420 | /* The GNU C library defines this for functions which it implements | |
2421 | to always fail with ENOSYS. Some functions are actually named | |
2422 | something starting with __ and the normal name is an alias. */ | |
2423 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2424 | choke me | |
2425 | #else | |
2426 | $ac_func(); | |
2427 | #endif | |
2428 | ||
2429 | ; return 0; } | |
2430 | EOF | |
46711df8 | 2431 | if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2432 | rm -rf conftest* |
2433 | eval "ac_cv_func_$ac_func=yes" | |
2434 | else | |
2435 | echo "configure: failed program was:" >&5 | |
2436 | cat conftest.$ac_ext >&5 | |
2437 | rm -rf conftest* | |
2438 | eval "ac_cv_func_$ac_func=no" | |
2439 | fi | |
2440 | rm -f conftest* | |
2441 | fi | |
2442 | ||
2443 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2444 | echo "$ac_t""yes" 1>&6 | |
2445 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2446 | cat >> confdefs.h <<EOF | |
2447 | #define $ac_tr_func 1 | |
2448 | EOF | |
2449 | ||
2450 | else | |
2451 | echo "$ac_t""no" 1>&6 | |
2452 | fi | |
2453 | done | |
2454 | ||
2455 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2456 | set dummy gmsgfmt; ac_word=$2 | |
2457 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2458 | echo "configure:2459: checking for $ac_word" >&5 |
c906108c SS |
2459 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2460 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2461 | else | |
2462 | case "$GMSGFMT" in | |
2463 | /*) | |
2464 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2465 | ;; | |
2466 | ?:/*) | |
2467 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2468 | ;; | |
2469 | *) | |
2470 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2471 | ac_dummy="$PATH" | |
2472 | for ac_dir in $ac_dummy; do | |
2473 | test -z "$ac_dir" && ac_dir=. | |
2474 | if test -f $ac_dir/$ac_word; then | |
2475 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2476 | break | |
2477 | fi | |
2478 | done | |
2479 | IFS="$ac_save_ifs" | |
2480 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2481 | ;; | |
2482 | esac | |
2483 | fi | |
2484 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2485 | if test -n "$GMSGFMT"; then | |
2486 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2487 | else | |
2488 | echo "$ac_t""no" 1>&6 | |
2489 | fi | |
2490 | ||
2491 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2492 | set dummy xgettext; ac_word=$2 | |
2493 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2494 | echo "configure:2495: checking for $ac_word" >&5 |
c906108c SS |
2495 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2497 | else | |
2498 | case "$XGETTEXT" in | |
2499 | /*) | |
2500 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2501 | ;; | |
2502 | *) | |
2503 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2504 | for ac_dir in $PATH; do | |
2505 | test -z "$ac_dir" && ac_dir=. | |
2506 | if test -f $ac_dir/$ac_word; then | |
2507 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2508 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2509 | break | |
2510 | fi | |
2511 | fi | |
2512 | done | |
2513 | IFS="$ac_save_ifs" | |
2514 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2515 | ;; | |
2516 | esac | |
2517 | fi | |
2518 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2519 | if test -n "$XGETTEXT"; then | |
2520 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2521 | else | |
2522 | echo "$ac_t""no" 1>&6 | |
2523 | fi | |
2524 | ||
2525 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2526 | #line 2527 "configure" |
c906108c SS |
2527 | #include "confdefs.h" |
2528 | ||
2529 | int main() { | |
2530 | extern int _nl_msg_cat_cntr; | |
2531 | return _nl_msg_cat_cntr | |
2532 | ; return 0; } | |
2533 | EOF | |
46711df8 | 2534 | if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2535 | rm -rf conftest* |
2536 | CATOBJEXT=.gmo | |
2537 | DATADIRNAME=share | |
2538 | else | |
2539 | echo "configure: failed program was:" >&5 | |
2540 | cat conftest.$ac_ext >&5 | |
2541 | rm -rf conftest* | |
2542 | CATOBJEXT=.mo | |
2543 | DATADIRNAME=lib | |
2544 | fi | |
2545 | rm -f conftest* | |
2546 | INSTOBJEXT=.mo | |
2547 | fi | |
2548 | fi | |
2549 | ||
2550 | else | |
2551 | echo "$ac_t""no" 1>&6 | |
2552 | fi | |
2553 | ||
2554 | ||
2555 | ||
2556 | if test "$CATOBJEXT" = "NONE"; then | |
2557 | nls_cv_use_gnu_gettext=yes | |
2558 | fi | |
2559 | fi | |
2560 | ||
2561 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2562 | INTLOBJS="\$(GETTOBJS)" | |
2563 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2564 | set dummy msgfmt; ac_word=$2 | |
2565 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2566 | echo "configure:2567: checking for $ac_word" >&5 |
c906108c SS |
2567 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2568 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2569 | else | |
2570 | case "$MSGFMT" in | |
2571 | /*) | |
2572 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2573 | ;; | |
2574 | *) | |
2575 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2576 | for ac_dir in $PATH; do | |
2577 | test -z "$ac_dir" && ac_dir=. | |
2578 | if test -f $ac_dir/$ac_word; then | |
2579 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2580 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2581 | break | |
2582 | fi | |
2583 | fi | |
2584 | done | |
2585 | IFS="$ac_save_ifs" | |
2586 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2587 | ;; | |
2588 | esac | |
2589 | fi | |
2590 | MSGFMT="$ac_cv_path_MSGFMT" | |
2591 | if test -n "$MSGFMT"; then | |
2592 | echo "$ac_t""$MSGFMT" 1>&6 | |
2593 | else | |
2594 | echo "$ac_t""no" 1>&6 | |
2595 | fi | |
2596 | ||
2597 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2598 | set dummy gmsgfmt; ac_word=$2 | |
2599 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2600 | echo "configure:2601: checking for $ac_word" >&5 |
c906108c SS |
2601 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2602 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2603 | else | |
2604 | case "$GMSGFMT" in | |
2605 | /*) | |
2606 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2607 | ;; | |
2608 | ?:/*) | |
2609 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2610 | ;; | |
2611 | *) | |
2612 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2613 | ac_dummy="$PATH" | |
2614 | for ac_dir in $ac_dummy; do | |
2615 | test -z "$ac_dir" && ac_dir=. | |
2616 | if test -f $ac_dir/$ac_word; then | |
2617 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2618 | break | |
2619 | fi | |
2620 | done | |
2621 | IFS="$ac_save_ifs" | |
2622 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2623 | ;; | |
2624 | esac | |
2625 | fi | |
2626 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2627 | if test -n "$GMSGFMT"; then | |
2628 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2629 | else | |
2630 | echo "$ac_t""no" 1>&6 | |
2631 | fi | |
2632 | ||
2633 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2634 | set dummy xgettext; ac_word=$2 | |
2635 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2636 | echo "configure:2637: checking for $ac_word" >&5 |
c906108c SS |
2637 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2639 | else | |
2640 | case "$XGETTEXT" in | |
2641 | /*) | |
2642 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2643 | ;; | |
2644 | *) | |
2645 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2646 | for ac_dir in $PATH; do | |
2647 | test -z "$ac_dir" && ac_dir=. | |
2648 | if test -f $ac_dir/$ac_word; then | |
2649 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2650 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2651 | break | |
2652 | fi | |
2653 | fi | |
2654 | done | |
2655 | IFS="$ac_save_ifs" | |
2656 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2657 | ;; | |
2658 | esac | |
2659 | fi | |
2660 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2661 | if test -n "$XGETTEXT"; then | |
2662 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2663 | else | |
2664 | echo "$ac_t""no" 1>&6 | |
2665 | fi | |
2666 | ||
2667 | ||
2668 | USE_INCLUDED_LIBINTL=yes | |
2669 | CATOBJEXT=.gmo | |
2670 | INSTOBJEXT=.mo | |
2671 | DATADIRNAME=share | |
2672 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2673 | INTLLIBS=$INTLDEPS | |
2674 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2675 | nls_cv_header_intl=libintl.h | |
2676 | nls_cv_header_libgt=libgettext.h | |
2677 | fi | |
2678 | ||
2679 | if test "$XGETTEXT" != ":"; then | |
2680 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2681 | : ; | |
2682 | else | |
2683 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2684 | XGETTEXT=":" | |
2685 | fi | |
2686 | fi | |
2687 | ||
2688 | # We need to process the po/ directory. | |
2689 | POSUB=po | |
2690 | else | |
2691 | DATADIRNAME=share | |
2692 | nls_cv_header_intl=libintl.h | |
2693 | nls_cv_header_libgt=libgettext.h | |
2694 | fi | |
2695 | ||
2696 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2697 | # because some of the sources are only built for this goal. | |
2698 | if test "$PACKAGE" = gettext; then | |
2699 | USE_NLS=yes | |
2700 | USE_INCLUDED_LIBINTL=yes | |
2701 | fi | |
2702 | ||
2703 | for lang in $ALL_LINGUAS; do | |
2704 | GMOFILES="$GMOFILES $lang.gmo" | |
2705 | POFILES="$POFILES $lang.po" | |
2706 | done | |
2707 | ||
2708 | ||
2709 | ||
2710 | ||
2711 | ||
2712 | ||
2713 | ||
2714 | ||
2715 | ||
2716 | ||
2717 | ||
2718 | ||
2719 | ||
2720 | ||
2721 | if test "x$CATOBJEXT" != "x"; then | |
2722 | if test "x$ALL_LINGUAS" = "x"; then | |
2723 | LINGUAS= | |
2724 | else | |
2725 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
46711df8 | 2726 | echo "configure:2727: checking for catalogs to be installed" >&5 |
c906108c SS |
2727 | NEW_LINGUAS= |
2728 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2729 | case "$ALL_LINGUAS" in | |
2730 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2731 | esac | |
2732 | done | |
2733 | LINGUAS=$NEW_LINGUAS | |
2734 | echo "$ac_t""$LINGUAS" 1>&6 | |
2735 | fi | |
2736 | ||
2737 | if test -n "$LINGUAS"; then | |
2738 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2739 | fi | |
2740 | fi | |
2741 | ||
2742 | if test $ac_cv_header_locale_h = yes; then | |
2743 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2744 | else | |
2745 | INCLUDE_LOCALE_H="\ | |
2746 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2747 | fi | |
2748 | ||
2749 | ||
2750 | if test -f $srcdir/po2tbl.sed.in; then | |
2751 | if test "$CATOBJEXT" = ".cat"; then | |
2752 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2753 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
46711df8 | 2754 | echo "configure:2755: checking for linux/version.h" >&5 |
c906108c SS |
2755 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2756 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2757 | else | |
2758 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 2759 | #line 2760 "configure" |
c906108c SS |
2760 | #include "confdefs.h" |
2761 | #include <linux/version.h> | |
2762 | EOF | |
2763 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 2764 | { (eval echo configure:2765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2765 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2766 | if test -z "$ac_err"; then | |
2767 | rm -rf conftest* | |
2768 | eval "ac_cv_header_$ac_safe=yes" | |
2769 | else | |
2770 | echo "$ac_err" >&5 | |
2771 | echo "configure: failed program was:" >&5 | |
2772 | cat conftest.$ac_ext >&5 | |
2773 | rm -rf conftest* | |
2774 | eval "ac_cv_header_$ac_safe=no" | |
2775 | fi | |
2776 | rm -f conftest* | |
2777 | fi | |
2778 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2779 | echo "$ac_t""yes" 1>&6 | |
2780 | msgformat=linux | |
2781 | else | |
2782 | echo "$ac_t""no" 1>&6 | |
2783 | msgformat=xopen | |
2784 | fi | |
2785 | ||
2786 | ||
2787 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2788 | fi | |
2789 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2790 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2791 | fi | |
2792 | ||
2793 | if test "$PACKAGE" = "gettext"; then | |
2794 | GT_NO="#NO#" | |
2795 | GT_YES= | |
2796 | else | |
2797 | GT_NO= | |
2798 | GT_YES="#YES#" | |
2799 | fi | |
2800 | ||
2801 | ||
2802 | ||
2803 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2804 | ||
2805 | ||
2806 | l= | |
2807 | ||
2808 | ||
2809 | if test -d $srcdir/po; then | |
2810 | test -d po || mkdir po | |
2811 | if test "x$srcdir" != "x."; then | |
2812 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2813 | posrcprefix="$srcdir/" | |
2814 | else | |
2815 | posrcprefix="../$srcdir/" | |
2816 | fi | |
2817 | else | |
2818 | posrcprefix="../" | |
2819 | fi | |
2820 | rm -f po/POTFILES | |
2821 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2822 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2823 | fi | |
2824 | ||
2825 | ||
2826 | ||
2827 | CONFIG_OBS= | |
66b965bb | 2828 | CONFIG_LIB_OBS= |
c906108c SS |
2829 | CONFIG_DEPS= |
2830 | CONFIG_SRCS= | |
fb40c209 AC |
2831 | CONFIG_INITS= |
2832 | ENABLE_CFLAGS= | |
b3a90332 AC |
2833 | CONFIG_ALL= |
2834 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2835 | CONFIG_INSTALL= |
2836 | CONFIG_UNINSTALL= | |
c906108c SS |
2837 | |
2838 | configdirs="doc testsuite" | |
2839 | ||
96baa820 JM |
2840 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2841 | if test "${enable_multi_ice+set}" = set; then | |
2842 | enableval="$enable_multi_ice" | |
2843 | case "${enableval}" in | |
2844 | yes ) enable_multi_ice="yes" ;; | |
2845 | no) enable_multi_ice="no" ;; | |
2846 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2847 | esac | |
2848 | ||
2849 | fi | |
2850 | ||
2851 | ||
2852 | if test "${enable_multi_ice}" = "yes"; then | |
2853 | configdirs="${configdirs} multi-ice" | |
2854 | fi | |
2855 | ||
c906108c SS |
2856 | |
2857 | . ${srcdir}/configure.host | |
2858 | ||
2859 | . ${srcdir}/configure.tgt | |
2860 | ||
1ba607ad AC |
2861 | targ=${target} ; . ${srcdir}/../bfd/config.bfd |
2862 | ||
2863 | ||
2864 | targ=${target} | |
2865 | . ${srcdir}/../bfd/config.bfd | |
5c8cc331 AC |
2866 | |
2867 | targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'` | |
2868 | ||
1ba607ad AC |
2869 | if test x"${targ_archs}" != x ; then |
2870 | cat >> confdefs.h <<EOF | |
2871 | #define DEFAULT_BFD_ARCH ${targ_archs} | |
2872 | EOF | |
2873 | ||
2874 | fi | |
2875 | if test x"${targ_defvec}" != x ; then | |
2876 | cat >> confdefs.h <<EOF | |
2877 | #define DEFAULT_BFD_VEC ${targ_defvec} | |
2878 | EOF | |
2879 | ||
2880 | fi | |
c906108c | 2881 | |
46711df8 | 2882 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2883 | do |
2884 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2885 | set dummy $ac_prog; ac_word=$2 | |
2886 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2887 | echo "configure:2888: checking for $ac_word" >&5 |
7a292a7a SS |
2888 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2889 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2890 | else | |
2891 | if test -n "$AWK"; then | |
2892 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2893 | else | |
2894 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2895 | ac_dummy="$PATH" | |
2896 | for ac_dir in $ac_dummy; do | |
2897 | test -z "$ac_dir" && ac_dir=. | |
2898 | if test -f $ac_dir/$ac_word; then | |
2899 | ac_cv_prog_AWK="$ac_prog" | |
2900 | break | |
2901 | fi | |
2902 | done | |
2903 | IFS="$ac_save_ifs" | |
2904 | fi | |
2905 | fi | |
2906 | AWK="$ac_cv_prog_AWK" | |
2907 | if test -n "$AWK"; then | |
2908 | echo "$ac_t""$AWK" 1>&6 | |
2909 | else | |
2910 | echo "$ac_t""no" 1>&6 | |
2911 | fi | |
2912 | ||
2913 | test -n "$AWK" && break | |
2914 | done | |
2915 | ||
c906108c SS |
2916 | # Find a good install program. We prefer a C program (faster), |
2917 | # so one script is as good as another. But avoid the broken or | |
2918 | # incompatible versions: | |
2919 | # SysV /etc/install, /usr/sbin/install | |
2920 | # SunOS /usr/etc/install | |
2921 | # IRIX /sbin/install | |
2922 | # AIX /bin/install | |
2923 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2924 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2925 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2926 | # ./install, which can be erroneously created by make from ./install.sh. | |
2927 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
46711df8 | 2928 | echo "configure:2929: checking for a BSD compatible install" >&5 |
c906108c SS |
2929 | if test -z "$INSTALL"; then |
2930 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2931 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2932 | else | |
2933 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2934 | for ac_dir in $PATH; do | |
2935 | # Account for people who put trailing slashes in PATH elements. | |
2936 | case "$ac_dir/" in | |
2937 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2938 | *) | |
2939 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2940 | # Don't use installbsd from OSF since it installs stuff as root | |
2941 | # by default. | |
2942 | for ac_prog in ginstall scoinst install; do | |
2943 | if test -f $ac_dir/$ac_prog; then | |
2944 | if test $ac_prog = install && | |
2945 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2946 | # AIX install. It has an incompatible calling convention. | |
2947 | : | |
2948 | else | |
2949 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2950 | break 2 | |
2951 | fi | |
2952 | fi | |
2953 | done | |
2954 | ;; | |
2955 | esac | |
2956 | done | |
2957 | IFS="$ac_save_IFS" | |
2958 | ||
2959 | fi | |
2960 | if test "${ac_cv_path_install+set}" = set; then | |
2961 | INSTALL="$ac_cv_path_install" | |
2962 | else | |
2963 | # As a last resort, use the slow shell script. We don't cache a | |
2964 | # path for INSTALL within a source directory, because that will | |
2965 | # break other packages using the cache if that directory is | |
2966 | # removed, or if the path is relative. | |
2967 | INSTALL="$ac_install_sh" | |
2968 | fi | |
2969 | fi | |
2970 | echo "$ac_t""$INSTALL" 1>&6 | |
2971 | ||
2972 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2973 | # It thinks the first close brace ends the variable substitution. | |
2974 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2975 | ||
2976 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2977 | ||
2978 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2979 | ||
2980 | if test $host != $build; then | |
2981 | ac_tool_prefix=${host_alias}- | |
2982 | else | |
2983 | ac_tool_prefix= | |
2984 | fi | |
2985 | ||
2986 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2987 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2988 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 2989 | echo "configure:2990: checking for $ac_word" >&5 |
c906108c SS |
2990 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2991 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2992 | else | |
2993 | if test -n "$AR"; then | |
2994 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2995 | else | |
2996 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2997 | ac_dummy="$PATH" | |
2998 | for ac_dir in $ac_dummy; do | |
2999 | test -z "$ac_dir" && ac_dir=. | |
3000 | if test -f $ac_dir/$ac_word; then | |
3001 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
3002 | break | |
3003 | fi | |
3004 | done | |
3005 | IFS="$ac_save_ifs" | |
3006 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
3007 | fi | |
3008 | fi | |
3009 | AR="$ac_cv_prog_AR" | |
3010 | if test -n "$AR"; then | |
3011 | echo "$ac_t""$AR" 1>&6 | |
3012 | else | |
3013 | echo "$ac_t""no" 1>&6 | |
3014 | fi | |
3015 | ||
3016 | ||
3017 | ||
3018 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
3019 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
3020 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 3021 | echo "configure:3022: checking for $ac_word" >&5 |
c906108c SS |
3022 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3023 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3024 | else | |
3025 | if test -n "$RANLIB"; then | |
3026 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3027 | else | |
3028 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3029 | ac_dummy="$PATH" | |
3030 | for ac_dir in $ac_dummy; do | |
3031 | test -z "$ac_dir" && ac_dir=. | |
3032 | if test -f $ac_dir/$ac_word; then | |
3033 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3034 | break | |
3035 | fi | |
3036 | done | |
3037 | IFS="$ac_save_ifs" | |
3038 | fi | |
3039 | fi | |
3040 | RANLIB="$ac_cv_prog_RANLIB" | |
3041 | if test -n "$RANLIB"; then | |
3042 | echo "$ac_t""$RANLIB" 1>&6 | |
3043 | else | |
3044 | echo "$ac_t""no" 1>&6 | |
3045 | fi | |
3046 | ||
3047 | ||
3048 | if test -z "$ac_cv_prog_RANLIB"; then | |
3049 | if test -n "$ac_tool_prefix"; then | |
3050 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3051 | set dummy ranlib; ac_word=$2 | |
3052 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 3053 | echo "configure:3054: checking for $ac_word" >&5 |
c906108c SS |
3054 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3055 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3056 | else | |
3057 | if test -n "$RANLIB"; then | |
3058 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3059 | else | |
3060 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3061 | ac_dummy="$PATH" | |
3062 | for ac_dir in $ac_dummy; do | |
3063 | test -z "$ac_dir" && ac_dir=. | |
3064 | if test -f $ac_dir/$ac_word; then | |
3065 | ac_cv_prog_RANLIB="ranlib" | |
3066 | break | |
3067 | fi | |
3068 | done | |
3069 | IFS="$ac_save_ifs" | |
3070 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3071 | fi | |
3072 | fi | |
3073 | RANLIB="$ac_cv_prog_RANLIB" | |
3074 | if test -n "$RANLIB"; then | |
3075 | echo "$ac_t""$RANLIB" 1>&6 | |
3076 | else | |
3077 | echo "$ac_t""no" 1>&6 | |
3078 | fi | |
3079 | ||
3080 | else | |
3081 | RANLIB=":" | |
3082 | fi | |
3083 | fi | |
3084 | ||
95ca63c4 CF |
3085 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3086 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3087 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 3088 | echo "configure:3089: checking for $ac_word" >&5 |
95ca63c4 CF |
3089 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3091 | else | |
3092 | if test -n "$DLLTOOL"; then | |
3093 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3094 | else | |
3095 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3096 | ac_dummy="$PATH" | |
3097 | for ac_dir in $ac_dummy; do | |
3098 | test -z "$ac_dir" && ac_dir=. | |
3099 | if test -f $ac_dir/$ac_word; then | |
3100 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3101 | break | |
3102 | fi | |
3103 | done | |
3104 | IFS="$ac_save_ifs" | |
3105 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3106 | fi | |
3107 | fi | |
3108 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3109 | if test -n "$DLLTOOL"; then | |
3110 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3111 | else | |
3112 | echo "$ac_t""no" 1>&6 | |
3113 | fi | |
3114 | ||
3115 | ||
3116 | ||
3117 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3118 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3119 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 3120 | echo "configure:3121: checking for $ac_word" >&5 |
95ca63c4 CF |
3121 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3123 | else | |
3124 | if test -n "$WINDRES"; then | |
3125 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3126 | else | |
3127 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3128 | ac_dummy="$PATH" | |
3129 | for ac_dir in $ac_dummy; do | |
3130 | test -z "$ac_dir" && ac_dir=. | |
3131 | if test -f $ac_dir/$ac_word; then | |
3132 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3133 | break | |
3134 | fi | |
3135 | done | |
3136 | IFS="$ac_save_ifs" | |
3137 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3138 | fi | |
3139 | fi | |
3140 | WINDRES="$ac_cv_prog_WINDRES" | |
3141 | if test -n "$WINDRES"; then | |
3142 | echo "$ac_t""$WINDRES" 1>&6 | |
3143 | else | |
3144 | echo "$ac_t""no" 1>&6 | |
3145 | fi | |
3146 | ||
3147 | ||
3148 | ||
c906108c SS |
3149 | for ac_prog in 'bison -y' byacc |
3150 | do | |
3151 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3152 | set dummy $ac_prog; ac_word=$2 | |
3153 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 3154 | echo "configure:3155: checking for $ac_word" >&5 |
c906108c SS |
3155 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3156 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3157 | else | |
3158 | if test -n "$YACC"; then | |
3159 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3160 | else | |
3161 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3162 | ac_dummy="$PATH" | |
3163 | for ac_dir in $ac_dummy; do | |
3164 | test -z "$ac_dir" && ac_dir=. | |
3165 | if test -f $ac_dir/$ac_word; then | |
3166 | ac_cv_prog_YACC="$ac_prog" | |
3167 | break | |
3168 | fi | |
3169 | done | |
3170 | IFS="$ac_save_ifs" | |
3171 | fi | |
3172 | fi | |
3173 | YACC="$ac_cv_prog_YACC" | |
3174 | if test -n "$YACC"; then | |
3175 | echo "$ac_t""$YACC" 1>&6 | |
3176 | else | |
3177 | echo "$ac_t""no" 1>&6 | |
3178 | fi | |
3179 | ||
3180 | test -n "$YACC" && break | |
3181 | done | |
3182 | test -n "$YACC" || YACC="yacc" | |
3183 | ||
3184 | ||
75c6e08a MK |
3185 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3186 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3187 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
46711df8 | 3188 | echo "configure:3189: checking for $ac_word" >&5 |
75c6e08a MK |
3189 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3191 | else | |
3192 | if test -n "$MIG"; then | |
3193 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3194 | else | |
3195 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3196 | ac_dummy="$PATH" | |
3197 | for ac_dir in $ac_dummy; do | |
3198 | test -z "$ac_dir" && ac_dir=. | |
3199 | if test -f $ac_dir/$ac_word; then | |
3200 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3201 | break | |
3202 | fi | |
3203 | done | |
3204 | IFS="$ac_save_ifs" | |
3205 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3206 | fi | |
3207 | fi | |
3208 | MIG="$ac_cv_prog_MIG" | |
3209 | if test -n "$MIG"; then | |
3210 | echo "$ac_t""$MIG" 1>&6 | |
3211 | else | |
3212 | echo "$ac_t""no" 1>&6 | |
3213 | fi | |
3214 | ||
3215 | ||
3216 | ||
3217 | ||
c906108c SS |
3218 | if test "$program_transform_name" = s,x,x,; then |
3219 | program_transform_name= | |
3220 | else | |
3221 | # Double any \ or $. echo might interpret backslashes. | |
3222 | cat <<\EOF_SED > conftestsed | |
3223 | s,\\,\\\\,g; s,\$,$$,g | |
3224 | EOF_SED | |
3225 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3226 | rm -f conftestsed | |
3227 | fi | |
3228 | test "$program_prefix" != NONE && | |
3229 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3230 | # Use a double $ so make ignores it. | |
3231 | test "$program_suffix" != NONE && | |
3232 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3233 | ||
3234 | # sed with no file args requires a program. | |
3235 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3236 | ||
3237 | ||
3238 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
46711df8 | 3239 | echo "configure:3240: checking return type of signal handlers" >&5 |
c906108c SS |
3240 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3241 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3242 | else | |
3243 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3244 | #line 3245 "configure" |
c906108c SS |
3245 | #include "confdefs.h" |
3246 | #include <sys/types.h> | |
3247 | #include <signal.h> | |
3248 | #ifdef signal | |
3249 | #undef signal | |
3250 | #endif | |
3251 | #ifdef __cplusplus | |
3252 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3253 | #else | |
3254 | void (*signal ()) (); | |
3255 | #endif | |
3256 | ||
3257 | int main() { | |
3258 | int i; | |
3259 | ; return 0; } | |
3260 | EOF | |
46711df8 | 3261 | if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3262 | rm -rf conftest* |
3263 | ac_cv_type_signal=void | |
3264 | else | |
3265 | echo "configure: failed program was:" >&5 | |
3266 | cat conftest.$ac_ext >&5 | |
3267 | rm -rf conftest* | |
3268 | ac_cv_type_signal=int | |
3269 | fi | |
3270 | rm -f conftest* | |
3271 | fi | |
3272 | ||
3273 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3274 | cat >> confdefs.h <<EOF | |
3275 | #define RETSIGTYPE $ac_cv_type_signal | |
3276 | EOF | |
3277 | ||
3278 | ||
3279 | ||
3280 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
46711df8 | 3281 | echo "configure:3282: checking for ANSI C header files" >&5 |
c906108c SS |
3282 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3283 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3284 | else | |
3285 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3286 | #line 3287 "configure" |
c906108c SS |
3287 | #include "confdefs.h" |
3288 | #include <stdlib.h> | |
3289 | #include <stdarg.h> | |
3290 | #include <string.h> | |
3291 | #include <float.h> | |
3292 | EOF | |
3293 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 3294 | { (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3295 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3296 | if test -z "$ac_err"; then | |
3297 | rm -rf conftest* | |
3298 | ac_cv_header_stdc=yes | |
3299 | else | |
3300 | echo "$ac_err" >&5 | |
3301 | echo "configure: failed program was:" >&5 | |
3302 | cat conftest.$ac_ext >&5 | |
3303 | rm -rf conftest* | |
3304 | ac_cv_header_stdc=no | |
3305 | fi | |
3306 | rm -f conftest* | |
3307 | ||
3308 | if test $ac_cv_header_stdc = yes; then | |
3309 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3310 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3311 | #line 3312 "configure" |
c906108c SS |
3312 | #include "confdefs.h" |
3313 | #include <string.h> | |
3314 | EOF | |
3315 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3316 | egrep "memchr" >/dev/null 2>&1; then | |
3317 | : | |
3318 | else | |
3319 | rm -rf conftest* | |
3320 | ac_cv_header_stdc=no | |
3321 | fi | |
3322 | rm -f conftest* | |
3323 | ||
3324 | fi | |
3325 | ||
3326 | if test $ac_cv_header_stdc = yes; then | |
3327 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3328 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3329 | #line 3330 "configure" |
c906108c SS |
3330 | #include "confdefs.h" |
3331 | #include <stdlib.h> | |
3332 | EOF | |
3333 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3334 | egrep "free" >/dev/null 2>&1; then | |
3335 | : | |
3336 | else | |
3337 | rm -rf conftest* | |
3338 | ac_cv_header_stdc=no | |
3339 | fi | |
3340 | rm -f conftest* | |
3341 | ||
3342 | fi | |
3343 | ||
3344 | if test $ac_cv_header_stdc = yes; then | |
3345 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3346 | if test "$cross_compiling" = yes; then | |
3347 | : | |
3348 | else | |
3349 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3350 | #line 3351 "configure" |
c906108c SS |
3351 | #include "confdefs.h" |
3352 | #include <ctype.h> | |
3353 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3354 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3355 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3356 | int main () { int i; for (i = 0; i < 256; i++) | |
3357 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3358 | exit (0); } | |
3359 | ||
3360 | EOF | |
46711df8 | 3361 | if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3362 | then |
3363 | : | |
3364 | else | |
3365 | echo "configure: failed program was:" >&5 | |
3366 | cat conftest.$ac_ext >&5 | |
3367 | rm -fr conftest* | |
3368 | ac_cv_header_stdc=no | |
3369 | fi | |
3370 | rm -fr conftest* | |
3371 | fi | |
3372 | ||
3373 | fi | |
3374 | fi | |
3375 | ||
3376 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3377 | if test $ac_cv_header_stdc = yes; then | |
3378 | cat >> confdefs.h <<\EOF | |
3379 | #define STDC_HEADERS 1 | |
3380 | EOF | |
3381 | ||
3382 | fi | |
3383 | ||
3384 | ||
6abadcf8 | 3385 | |
3e0bf9f1 | 3386 | case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes) |
6abadcf8 ND |
3387 | cat >> confdefs.h <<\EOF |
3388 | #define _MSE_INT_H 1 | |
3389 | EOF | |
3390 | ||
3391 | esac; esac | |
3392 | ||
486363b6 | 3393 | for ac_hdr in ctype.h endian.h nlist.h link.h thread_db.h proc_service.h \ |
c906108c | 3394 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3395 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3396 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3397 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
596c9d4b | 3398 | time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \ |
2894793a | 3399 | dirent.h sys/ndir.h sys/dir.h ndir.h \ |
409a3f64 AC |
3400 | curses.h ncurses.h \ |
3401 | poll.h sys/poll.h | |
c906108c SS |
3402 | do |
3403 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3404 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
46711df8 | 3405 | echo "configure:3406: checking for $ac_hdr" >&5 |
c906108c SS |
3406 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3407 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3408 | else | |
3409 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3410 | #line 3411 "configure" |
c906108c SS |
3411 | #include "confdefs.h" |
3412 | #include <$ac_hdr> | |
3413 | EOF | |
3414 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 3415 | { (eval echo configure:3416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3416 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3417 | if test -z "$ac_err"; then | |
3418 | rm -rf conftest* | |
3419 | eval "ac_cv_header_$ac_safe=yes" | |
3420 | else | |
3421 | echo "$ac_err" >&5 | |
3422 | echo "configure: failed program was:" >&5 | |
3423 | cat conftest.$ac_ext >&5 | |
3424 | rm -rf conftest* | |
3425 | eval "ac_cv_header_$ac_safe=no" | |
3426 | fi | |
3427 | rm -f conftest* | |
3428 | fi | |
3429 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3430 | echo "$ac_t""yes" 1>&6 | |
3431 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3432 | cat >> confdefs.h <<EOF | |
3433 | #define $ac_tr_hdr 1 | |
3434 | EOF | |
3435 | ||
3436 | else | |
3437 | echo "$ac_t""no" 1>&6 | |
3438 | fi | |
3439 | done | |
3440 | ||
3441 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
46711df8 | 3442 | echo "configure:3443: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3443 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3445 | else | |
3446 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3447 | #line 3448 "configure" |
c906108c SS |
3448 | #include "confdefs.h" |
3449 | #include <sys/types.h> | |
3450 | #include <sys/stat.h> | |
3451 | ||
3452 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3453 | # if S_ISBLK (S_IFDIR) | |
3454 | You lose. | |
3455 | # endif | |
3456 | #endif | |
3457 | ||
3458 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3459 | # if S_ISBLK (S_IFCHR) | |
3460 | You lose. | |
3461 | # endif | |
3462 | #endif | |
3463 | ||
3464 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3465 | # if S_ISLNK (S_IFREG) | |
3466 | You lose. | |
3467 | # endif | |
3468 | #endif | |
3469 | ||
3470 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3471 | # if S_ISSOCK (S_IFREG) | |
3472 | You lose. | |
3473 | # endif | |
3474 | #endif | |
3475 | ||
3476 | EOF | |
3477 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3478 | egrep "You lose" >/dev/null 2>&1; then | |
3479 | rm -rf conftest* | |
3480 | ac_cv_header_stat_broken=yes | |
3481 | else | |
3482 | rm -rf conftest* | |
3483 | ac_cv_header_stat_broken=no | |
3484 | fi | |
3485 | rm -f conftest* | |
3486 | ||
3487 | fi | |
3488 | ||
3489 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3490 | if test $ac_cv_header_stat_broken = yes; then | |
3491 | cat >> confdefs.h <<\EOF | |
3492 | #define STAT_MACROS_BROKEN 1 | |
3493 | EOF | |
3494 | ||
3495 | fi | |
3496 | ||
3497 | ||
3498 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
46711df8 | 3499 | echo "configure:3500: checking for working const" >&5 |
c906108c SS |
3500 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3501 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3502 | else | |
3503 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3504 | #line 3505 "configure" |
c906108c SS |
3505 | #include "confdefs.h" |
3506 | ||
3507 | int main() { | |
3508 | ||
3509 | /* Ultrix mips cc rejects this. */ | |
3510 | typedef int charset[2]; const charset x; | |
3511 | /* SunOS 4.1.1 cc rejects this. */ | |
3512 | char const *const *ccp; | |
3513 | char **p; | |
3514 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3515 | struct point {int x, y;}; | |
3516 | static struct point const zero = {0,0}; | |
3517 | /* AIX XL C 1.02.0.0 rejects this. | |
3518 | It does not let you subtract one const X* pointer from another in an arm | |
3519 | of an if-expression whose if-part is not a constant expression */ | |
3520 | const char *g = "string"; | |
3521 | ccp = &g + (g ? g-g : 0); | |
3522 | /* HPUX 7.0 cc rejects these. */ | |
3523 | ++ccp; | |
3524 | p = (char**) ccp; | |
3525 | ccp = (char const *const *) p; | |
3526 | { /* SCO 3.2v4 cc rejects this. */ | |
3527 | char *t; | |
3528 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3529 | ||
3530 | *t++ = 0; | |
3531 | } | |
3532 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3533 | int x[] = {25, 17}; | |
3534 | const int *foo = &x[0]; | |
3535 | ++foo; | |
3536 | } | |
3537 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3538 | typedef const int *iptr; | |
3539 | iptr p = 0; | |
3540 | ++p; | |
3541 | } | |
3542 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3543 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3544 | struct s { int j; const int *ap[3]; }; | |
3545 | struct s *b; b->j = 5; | |
3546 | } | |
3547 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3548 | const int foo = 10; | |
3549 | } | |
3550 | ||
3551 | ; return 0; } | |
3552 | EOF | |
46711df8 | 3553 | if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3554 | rm -rf conftest* |
3555 | ac_cv_c_const=yes | |
3556 | else | |
3557 | echo "configure: failed program was:" >&5 | |
3558 | cat conftest.$ac_ext >&5 | |
3559 | rm -rf conftest* | |
3560 | ac_cv_c_const=no | |
3561 | fi | |
3562 | rm -f conftest* | |
3563 | fi | |
3564 | ||
3565 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3566 | if test $ac_cv_c_const = no; then | |
3567 | cat >> confdefs.h <<\EOF | |
3568 | #define const | |
3569 | EOF | |
3570 | ||
3571 | fi | |
3572 | ||
3573 | ||
46711df8 MK |
3574 | for ac_func in bcopy btowc bzero isascii poll sbrk setpgid setpgrp \ |
3575 | sigaction sigprocmask sigsetmask | |
c906108c SS |
3576 | do |
3577 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 3578 | echo "configure:3579: checking for $ac_func" >&5 |
c906108c SS |
3579 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3580 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3581 | else | |
3582 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3583 | #line 3584 "configure" |
c906108c SS |
3584 | #include "confdefs.h" |
3585 | /* System header to define __stub macros and hopefully few prototypes, | |
3586 | which can conflict with char $ac_func(); below. */ | |
3587 | #include <assert.h> | |
3588 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3589 | /* We use char because int might match the return type of a gcc2 | |
3590 | builtin and then its argument prototype would still apply. */ | |
3591 | char $ac_func(); | |
3592 | ||
3593 | int main() { | |
3594 | ||
3595 | /* The GNU C library defines this for functions which it implements | |
3596 | to always fail with ENOSYS. Some functions are actually named | |
3597 | something starting with __ and the normal name is an alias. */ | |
3598 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3599 | choke me | |
3600 | #else | |
3601 | $ac_func(); | |
3602 | #endif | |
3603 | ||
3604 | ; return 0; } | |
3605 | EOF | |
46711df8 | 3606 | if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3607 | rm -rf conftest* |
3608 | eval "ac_cv_func_$ac_func=yes" | |
3609 | else | |
3610 | echo "configure: failed program was:" >&5 | |
3611 | cat conftest.$ac_ext >&5 | |
3612 | rm -rf conftest* | |
3613 | eval "ac_cv_func_$ac_func=no" | |
3614 | fi | |
3615 | rm -f conftest* | |
3616 | fi | |
3617 | ||
3618 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3619 | echo "$ac_t""yes" 1>&6 | |
3620 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3621 | cat >> confdefs.h <<EOF | |
3622 | #define $ac_tr_func 1 | |
3623 | EOF | |
3624 | ||
3625 | else | |
3626 | echo "$ac_t""no" 1>&6 | |
3627 | fi | |
3628 | done | |
3629 | ||
46711df8 MK |
3630 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
3631 | # for constant arguments. Useless! | |
3632 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
3633 | echo "configure:3634: checking for working alloca.h" >&5 | |
3634 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then | |
3635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3636 | else | |
3637 | cat > conftest.$ac_ext <<EOF | |
3638 | #line 3639 "configure" | |
3639 | #include "confdefs.h" | |
3640 | #include <alloca.h> | |
3641 | int main() { | |
3642 | char *p = alloca(2 * sizeof(int)); | |
3643 | ; return 0; } | |
3644 | EOF | |
3645 | if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3646 | rm -rf conftest* | |
3647 | ac_cv_header_alloca_h=yes | |
3648 | else | |
3649 | echo "configure: failed program was:" >&5 | |
3650 | cat conftest.$ac_ext >&5 | |
3651 | rm -rf conftest* | |
3652 | ac_cv_header_alloca_h=no | |
3653 | fi | |
3654 | rm -f conftest* | |
3655 | fi | |
3656 | ||
3657 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3658 | if test $ac_cv_header_alloca_h = yes; then | |
3659 | cat >> confdefs.h <<\EOF | |
3660 | #define HAVE_ALLOCA_H 1 | |
3661 | EOF | |
3662 | ||
3663 | fi | |
3664 | ||
3665 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
3666 | echo "configure:3667: checking for alloca" >&5 | |
3667 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then | |
3668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3669 | else | |
3670 | cat > conftest.$ac_ext <<EOF | |
3671 | #line 3672 "configure" | |
3672 | #include "confdefs.h" | |
3673 | ||
3674 | #ifdef __GNUC__ | |
3675 | # define alloca __builtin_alloca | |
3676 | #else | |
3677 | # ifdef _MSC_VER | |
3678 | # include <malloc.h> | |
3679 | # define alloca _alloca | |
3680 | # else | |
3681 | # if HAVE_ALLOCA_H | |
3682 | # include <alloca.h> | |
3683 | # else | |
3684 | # ifdef _AIX | |
3685 | #pragma alloca | |
3686 | # else | |
3687 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3688 | char *alloca (); | |
3689 | # endif | |
3690 | # endif | |
3691 | # endif | |
3692 | # endif | |
3693 | #endif | |
3694 | ||
3695 | int main() { | |
3696 | char *p = (char *) alloca(1); | |
3697 | ; return 0; } | |
3698 | EOF | |
3699 | if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3700 | rm -rf conftest* | |
3701 | ac_cv_func_alloca_works=yes | |
3702 | else | |
3703 | echo "configure: failed program was:" >&5 | |
3704 | cat conftest.$ac_ext >&5 | |
3705 | rm -rf conftest* | |
3706 | ac_cv_func_alloca_works=no | |
3707 | fi | |
3708 | rm -f conftest* | |
3709 | fi | |
3710 | ||
3711 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3712 | if test $ac_cv_func_alloca_works = yes; then | |
3713 | cat >> confdefs.h <<\EOF | |
3714 | #define HAVE_ALLOCA 1 | |
3715 | EOF | |
3716 | ||
3717 | fi | |
3718 | ||
3719 | if test $ac_cv_func_alloca_works = no; then | |
3720 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3721 | # that cause trouble. Some versions do not even contain alloca or | |
3722 | # contain a buggy version. If you still want to use their alloca, | |
3723 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3724 | ALLOCA=alloca.${ac_objext} | |
3725 | cat >> confdefs.h <<\EOF | |
3726 | #define C_ALLOCA 1 | |
3727 | EOF | |
3728 | ||
3729 | ||
3730 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
3731 | echo "configure:3732: checking whether alloca needs Cray hooks" >&5 | |
3732 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then | |
3733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3734 | else | |
3735 | cat > conftest.$ac_ext <<EOF | |
3736 | #line 3737 "configure" | |
3737 | #include "confdefs.h" | |
3738 | #if defined(CRAY) && ! defined(CRAY2) | |
3739 | webecray | |
3740 | #else | |
3741 | wenotbecray | |
3742 | #endif | |
3743 | ||
3744 | EOF | |
3745 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3746 | egrep "webecray" >/dev/null 2>&1; then | |
3747 | rm -rf conftest* | |
3748 | ac_cv_os_cray=yes | |
3749 | else | |
3750 | rm -rf conftest* | |
3751 | ac_cv_os_cray=no | |
3752 | fi | |
3753 | rm -f conftest* | |
3754 | ||
3755 | fi | |
3756 | ||
3757 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3758 | if test $ac_cv_os_cray = yes; then | |
3759 | for ac_func in _getb67 GETB67 getb67; do | |
3760 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3761 | echo "configure:3762: checking for $ac_func" >&5 | |
3762 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
3763 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3764 | else | |
3765 | cat > conftest.$ac_ext <<EOF | |
3766 | #line 3767 "configure" | |
3767 | #include "confdefs.h" | |
3768 | /* System header to define __stub macros and hopefully few prototypes, | |
3769 | which can conflict with char $ac_func(); below. */ | |
3770 | #include <assert.h> | |
3771 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3772 | /* We use char because int might match the return type of a gcc2 | |
3773 | builtin and then its argument prototype would still apply. */ | |
3774 | char $ac_func(); | |
3775 | ||
3776 | int main() { | |
3777 | ||
3778 | /* The GNU C library defines this for functions which it implements | |
3779 | to always fail with ENOSYS. Some functions are actually named | |
3780 | something starting with __ and the normal name is an alias. */ | |
3781 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3782 | choke me | |
3783 | #else | |
3784 | $ac_func(); | |
3785 | #endif | |
3786 | ||
3787 | ; return 0; } | |
3788 | EOF | |
3789 | if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3790 | rm -rf conftest* | |
3791 | eval "ac_cv_func_$ac_func=yes" | |
3792 | else | |
3793 | echo "configure: failed program was:" >&5 | |
3794 | cat conftest.$ac_ext >&5 | |
3795 | rm -rf conftest* | |
3796 | eval "ac_cv_func_$ac_func=no" | |
3797 | fi | |
3798 | rm -f conftest* | |
3799 | fi | |
3800 | ||
3801 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3802 | echo "$ac_t""yes" 1>&6 | |
3803 | cat >> confdefs.h <<EOF | |
3804 | #define CRAY_STACKSEG_END $ac_func | |
3805 | EOF | |
3806 | ||
3807 | break | |
3808 | else | |
3809 | echo "$ac_t""no" 1>&6 | |
3810 | fi | |
3811 | ||
3812 | done | |
3813 | fi | |
3814 | ||
3815 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
3816 | echo "configure:3817: checking stack direction for C alloca" >&5 | |
3817 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then | |
3818 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3819 | else | |
3820 | if test "$cross_compiling" = yes; then | |
3821 | ac_cv_c_stack_direction=0 | |
3822 | else | |
3823 | cat > conftest.$ac_ext <<EOF | |
3824 | #line 3825 "configure" | |
3825 | #include "confdefs.h" | |
3826 | find_stack_direction () | |
3827 | { | |
3828 | static char *addr = 0; | |
3829 | auto char dummy; | |
3830 | if (addr == 0) | |
3831 | { | |
3832 | addr = &dummy; | |
3833 | return find_stack_direction (); | |
3834 | } | |
3835 | else | |
3836 | return (&dummy > addr) ? 1 : -1; | |
3837 | } | |
3838 | main () | |
3839 | { | |
3840 | exit (find_stack_direction() < 0); | |
3841 | } | |
3842 | EOF | |
3843 | if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
3844 | then | |
3845 | ac_cv_c_stack_direction=1 | |
3846 | else | |
3847 | echo "configure: failed program was:" >&5 | |
3848 | cat conftest.$ac_ext >&5 | |
3849 | rm -fr conftest* | |
3850 | ac_cv_c_stack_direction=-1 | |
3851 | fi | |
3852 | rm -fr conftest* | |
3853 | fi | |
3854 | ||
3855 | fi | |
3856 | ||
3857 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3858 | cat >> confdefs.h <<EOF | |
3859 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3860 | EOF | |
3861 | ||
3862 | fi | |
3863 | ||
74c1b268 | 3864 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
46711df8 | 3865 | echo "configure:3866: checking for pid_t" >&5 |
74c1b268 AC |
3866 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
3867 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3868 | else | |
3869 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3870 | #line 3871 "configure" |
74c1b268 AC |
3871 | #include "confdefs.h" |
3872 | #include <sys/types.h> | |
3873 | #if STDC_HEADERS | |
3874 | #include <stdlib.h> | |
3875 | #include <stddef.h> | |
3876 | #endif | |
3877 | EOF | |
3878 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3879 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3880 | rm -rf conftest* | |
3881 | ac_cv_type_pid_t=yes | |
3882 | else | |
3883 | rm -rf conftest* | |
3884 | ac_cv_type_pid_t=no | |
3885 | fi | |
3886 | rm -f conftest* | |
3887 | ||
3888 | fi | |
3889 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
3890 | if test $ac_cv_type_pid_t = no; then | |
3891 | cat >> confdefs.h <<\EOF | |
3892 | #define pid_t int | |
3893 | EOF | |
3894 | ||
3895 | fi | |
3896 | ||
3897 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
3898 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
46711df8 | 3899 | echo "configure:3900: checking for vfork.h" >&5 |
74c1b268 AC |
3900 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3901 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3902 | else | |
3903 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3904 | #line 3905 "configure" |
74c1b268 AC |
3905 | #include "confdefs.h" |
3906 | #include <vfork.h> | |
3907 | EOF | |
3908 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 3909 | { (eval echo configure:3910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
3910 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3911 | if test -z "$ac_err"; then | |
3912 | rm -rf conftest* | |
3913 | eval "ac_cv_header_$ac_safe=yes" | |
3914 | else | |
3915 | echo "$ac_err" >&5 | |
3916 | echo "configure: failed program was:" >&5 | |
3917 | cat conftest.$ac_ext >&5 | |
3918 | rm -rf conftest* | |
3919 | eval "ac_cv_header_$ac_safe=no" | |
3920 | fi | |
3921 | rm -f conftest* | |
3922 | fi | |
3923 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3924 | echo "$ac_t""yes" 1>&6 | |
3925 | cat >> confdefs.h <<\EOF | |
3926 | #define HAVE_VFORK_H 1 | |
3927 | EOF | |
3928 | ||
3929 | else | |
3930 | echo "$ac_t""no" 1>&6 | |
3931 | fi | |
3932 | ||
3933 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
46711df8 | 3934 | echo "configure:3935: checking for working vfork" >&5 |
74c1b268 AC |
3935 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
3936 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3937 | else | |
3938 | if test "$cross_compiling" = yes; then | |
3939 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
46711df8 | 3940 | echo "configure:3941: checking for vfork" >&5 |
74c1b268 AC |
3941 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
3942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3943 | else | |
3944 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3945 | #line 3946 "configure" |
74c1b268 AC |
3946 | #include "confdefs.h" |
3947 | /* System header to define __stub macros and hopefully few prototypes, | |
3948 | which can conflict with char vfork(); below. */ | |
3949 | #include <assert.h> | |
3950 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3951 | /* We use char because int might match the return type of a gcc2 | |
3952 | builtin and then its argument prototype would still apply. */ | |
3953 | char vfork(); | |
3954 | ||
3955 | int main() { | |
3956 | ||
3957 | /* The GNU C library defines this for functions which it implements | |
3958 | to always fail with ENOSYS. Some functions are actually named | |
3959 | something starting with __ and the normal name is an alias. */ | |
3960 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
3961 | choke me | |
3962 | #else | |
3963 | vfork(); | |
3964 | #endif | |
3965 | ||
3966 | ; return 0; } | |
3967 | EOF | |
46711df8 | 3968 | if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 AC |
3969 | rm -rf conftest* |
3970 | eval "ac_cv_func_vfork=yes" | |
3971 | else | |
3972 | echo "configure: failed program was:" >&5 | |
3973 | cat conftest.$ac_ext >&5 | |
3974 | rm -rf conftest* | |
3975 | eval "ac_cv_func_vfork=no" | |
3976 | fi | |
3977 | rm -f conftest* | |
3978 | fi | |
3979 | ||
3980 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
3981 | echo "$ac_t""yes" 1>&6 | |
3982 | : | |
3983 | else | |
3984 | echo "$ac_t""no" 1>&6 | |
3985 | fi | |
3986 | ||
3987 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
3988 | else | |
3989 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 3990 | #line 3991 "configure" |
74c1b268 AC |
3991 | #include "confdefs.h" |
3992 | /* Thanks to Paul Eggert for this test. */ | |
3993 | #include <stdio.h> | |
3994 | #include <sys/types.h> | |
3995 | #include <sys/stat.h> | |
3996 | #ifdef HAVE_UNISTD_H | |
3997 | #include <unistd.h> | |
3998 | #endif | |
3999 | #ifdef HAVE_VFORK_H | |
4000 | #include <vfork.h> | |
4001 | #endif | |
4002 | /* On some sparc systems, changes by the child to local and incoming | |
4003 | argument registers are propagated back to the parent. | |
4004 | The compiler is told about this with #include <vfork.h>, | |
4005 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4006 | Test for this by using a static variable whose address | |
4007 | is put into a register that is clobbered by the vfork. */ | |
4008 | static | |
4009 | #ifdef __cplusplus | |
4010 | sparc_address_test (int arg) | |
4011 | #else | |
4012 | sparc_address_test (arg) int arg; | |
4013 | #endif | |
4014 | { | |
4015 | static pid_t child; | |
4016 | if (!child) { | |
4017 | child = vfork (); | |
4018 | if (child < 0) { | |
4019 | perror ("vfork"); | |
4020 | _exit(2); | |
4021 | } | |
4022 | if (!child) { | |
4023 | arg = getpid(); | |
4024 | write(-1, "", 0); | |
4025 | _exit (arg); | |
4026 | } | |
4027 | } | |
4028 | } | |
4029 | main() { | |
4030 | pid_t parent = getpid (); | |
4031 | pid_t child; | |
4032 | ||
4033 | sparc_address_test (); | |
4034 | ||
4035 | child = vfork (); | |
4036 | ||
4037 | if (child == 0) { | |
4038 | /* Here is another test for sparc vfork register problems. | |
4039 | This test uses lots of local variables, at least | |
4040 | as many local variables as main has allocated so far | |
4041 | including compiler temporaries. 4 locals are enough for | |
4042 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4043 | A buggy compiler should reuse the register of parent | |
4044 | for one of the local variables, since it will think that | |
4045 | parent can't possibly be used any more in this routine. | |
4046 | Assigning to the local variable will thus munge parent | |
4047 | in the parent process. */ | |
4048 | pid_t | |
4049 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4050 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4051 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4052 | use the same hardware register for all 8 local variables. */ | |
4053 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4054 | || p != p5 || p != p6 || p != p7) | |
4055 | _exit(1); | |
4056 | ||
4057 | /* On some systems (e.g. IRIX 3.3), | |
4058 | vfork doesn't separate parent from child file descriptors. | |
4059 | If the child closes a descriptor before it execs or exits, | |
4060 | this munges the parent's descriptor as well. | |
4061 | Test for this by closing stdout in the child. */ | |
4062 | _exit(close(fileno(stdout)) != 0); | |
4063 | } else { | |
4064 | int status; | |
4065 | struct stat st; | |
4066 | ||
4067 | while (wait(&status) != child) | |
4068 | ; | |
4069 | exit( | |
4070 | /* Was there some problem with vforking? */ | |
4071 | child < 0 | |
4072 | ||
4073 | /* Did the child fail? (This shouldn't happen.) */ | |
4074 | || status | |
4075 | ||
4076 | /* Did the vfork/compiler bug occur? */ | |
4077 | || parent != getpid() | |
4078 | ||
4079 | /* Did the file descriptor bug occur? */ | |
4080 | || fstat(fileno(stdout), &st) != 0 | |
4081 | ); | |
4082 | } | |
4083 | } | |
4084 | EOF | |
46711df8 | 4085 | if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 AC |
4086 | then |
4087 | ac_cv_func_vfork_works=yes | |
4088 | else | |
4089 | echo "configure: failed program was:" >&5 | |
4090 | cat conftest.$ac_ext >&5 | |
4091 | rm -fr conftest* | |
4092 | ac_cv_func_vfork_works=no | |
4093 | fi | |
4094 | rm -fr conftest* | |
4095 | fi | |
4096 | ||
4097 | fi | |
4098 | ||
4099 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
4100 | if test $ac_cv_func_vfork_works = no; then | |
4101 | cat >> confdefs.h <<\EOF | |
4102 | #define vfork fork | |
4103 | EOF | |
4104 | ||
4105 | fi | |
4106 | ||
72473524 DJ |
4107 | if test "$cross_compiling" = no; then |
4108 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
46711df8 | 4109 | echo "configure:4110: checking whether setpgrp takes no argument" >&5 |
0200359f MK |
4110 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
4111 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4112 | else | |
4113 | if test "$cross_compiling" = yes; then | |
4114 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
4115 | else | |
4116 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4117 | #line 4118 "configure" |
0200359f MK |
4118 | #include "confdefs.h" |
4119 | ||
4120 | #ifdef HAVE_UNISTD_H | |
4121 | #include <unistd.h> | |
4122 | #endif | |
4123 | ||
4124 | /* | |
4125 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
4126 | * successfully. | |
4127 | */ | |
4128 | main() | |
4129 | { | |
4130 | if (setpgrp(1,1) == -1) | |
4131 | exit(0); | |
4132 | else | |
4133 | exit(1); | |
4134 | } | |
4135 | ||
4136 | EOF | |
46711df8 | 4137 | if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0200359f MK |
4138 | then |
4139 | ac_cv_func_setpgrp_void=no | |
4140 | else | |
4141 | echo "configure: failed program was:" >&5 | |
4142 | cat conftest.$ac_ext >&5 | |
4143 | rm -fr conftest* | |
4144 | ac_cv_func_setpgrp_void=yes | |
4145 | fi | |
4146 | rm -fr conftest* | |
4147 | fi | |
4148 | ||
4149 | ||
4150 | fi | |
4151 | ||
4152 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
4153 | if test $ac_cv_func_setpgrp_void = yes; then | |
4154 | cat >> confdefs.h <<\EOF | |
4155 | #define SETPGRP_VOID 1 | |
4156 | EOF | |
4157 | ||
4158 | fi | |
4159 | ||
72473524 DJ |
4160 | else |
4161 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
46711df8 | 4162 | echo "configure:4163: checking whether setpgrp takes no argument" >&5 |
72473524 DJ |
4163 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
4164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4165 | else | |
4166 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4167 | #line 4168 "configure" |
72473524 DJ |
4168 | #include "confdefs.h" |
4169 | ||
4170 | #include <unistd.h> | |
4171 | ||
4172 | int main() { | |
4173 | ||
4174 | if (setpgrp(1,1) == -1) | |
4175 | exit (0); | |
4176 | else | |
4177 | exit (1); | |
4178 | ||
4179 | ; return 0; } | |
4180 | EOF | |
46711df8 | 4181 | if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
72473524 DJ |
4182 | rm -rf conftest* |
4183 | ac_cv_func_setpgrp_void=no | |
4184 | else | |
4185 | echo "configure: failed program was:" >&5 | |
4186 | cat conftest.$ac_ext >&5 | |
4187 | rm -rf conftest* | |
4188 | ac_cv_func_setpgrp_void=yes | |
4189 | fi | |
4190 | rm -f conftest* | |
4191 | fi | |
4192 | ||
4193 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
4194 | if test $ac_cv_func_setpgrp_void = yes; then | |
4195 | cat >> confdefs.h <<\EOF | |
4196 | #define SETPGRP_VOID 1 | |
4197 | EOF | |
4198 | ||
4199 | fi | |
4200 | fi | |
c906108c | 4201 | |
2b2d558c MK |
4202 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
4203 | # since sigsetjmp might only be defined as a macro. | |
4204 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
46711df8 | 4205 | echo "configure:4206: checking for sigsetjmp" >&5 |
2b2d558c MK |
4206 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
4207 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4208 | else | |
4209 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4210 | #line 4211 "configure" |
2b2d558c MK |
4211 | #include "confdefs.h" |
4212 | ||
4213 | #include <setjmp.h> | |
4214 | ||
4215 | int main() { | |
4216 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
4217 | ; return 0; } | |
4218 | EOF | |
46711df8 | 4219 | if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2b2d558c MK |
4220 | rm -rf conftest* |
4221 | gdb_cv_func_sigsetjmp=yes | |
4222 | else | |
4223 | echo "configure: failed program was:" >&5 | |
4224 | cat conftest.$ac_ext >&5 | |
4225 | rm -rf conftest* | |
4226 | gdb_cv_func_sigsetjmp=no | |
4227 | fi | |
4228 | rm -f conftest* | |
4229 | fi | |
4230 | ||
4231 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 | |
4232 | if test $gdb_cv_func_sigsetjmp = yes; then | |
4233 | cat >> confdefs.h <<\EOF | |
4234 | #define HAVE_SIGSETJMP 1 | |
4235 | EOF | |
4236 | ||
4237 | fi | |
4238 | ||
0afdd437 | 4239 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
7dfa765c MK |
4240 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. |
4241 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
46711df8 | 4242 | echo "configure:4243: checking for r_fs in struct reg" >&5 |
422ea4b8 | 4243 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7dfa765c MK |
4244 | echo $ac_n "(cached) $ac_c" 1>&6 |
4245 | else | |
4246 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4247 | #line 4248 "configure" |
7dfa765c MK |
4248 | #include "confdefs.h" |
4249 | #include <machine/reg.h> | |
4250 | int main() { | |
4251 | struct reg r; r.r_fs; | |
4252 | ; return 0; } | |
4253 | EOF | |
46711df8 | 4254 | if { (eval echo configure:4255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 4255 | rm -rf conftest* |
422ea4b8 | 4256 | gdb_cv_struct_reg_r_fs=yes |
7dfa765c MK |
4257 | else |
4258 | echo "configure: failed program was:" >&5 | |
4259 | cat conftest.$ac_ext >&5 | |
4260 | rm -rf conftest* | |
422ea4b8 | 4261 | gdb_cv_struct_reg_r_fs=no |
7dfa765c MK |
4262 | fi |
4263 | rm -f conftest* | |
4264 | fi | |
4265 | ||
422ea4b8 MK |
4266 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
4267 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7dfa765c | 4268 | cat >> confdefs.h <<\EOF |
422ea4b8 | 4269 | #define HAVE_STRUCT_REG_R_FS 1 |
7dfa765c MK |
4270 | EOF |
4271 | ||
4272 | fi | |
4273 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
46711df8 | 4274 | echo "configure:4275: checking for r_gs in struct reg" >&5 |
422ea4b8 | 4275 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7dfa765c MK |
4276 | echo $ac_n "(cached) $ac_c" 1>&6 |
4277 | else | |
4278 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4279 | #line 4280 "configure" |
7dfa765c MK |
4280 | #include "confdefs.h" |
4281 | #include <machine/reg.h> | |
4282 | int main() { | |
4283 | struct reg r; r.r_gs; | |
4284 | ; return 0; } | |
4285 | EOF | |
46711df8 | 4286 | if { (eval echo configure:4287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 4287 | rm -rf conftest* |
422ea4b8 | 4288 | gdb_cv_struct_reg_r_gs=yes |
7dfa765c MK |
4289 | else |
4290 | echo "configure: failed program was:" >&5 | |
4291 | cat conftest.$ac_ext >&5 | |
4292 | rm -rf conftest* | |
422ea4b8 | 4293 | gdb_cv_struct_reg_r_gs=no |
7dfa765c MK |
4294 | fi |
4295 | rm -f conftest* | |
4296 | fi | |
4297 | ||
422ea4b8 MK |
4298 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
4299 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7dfa765c | 4300 | cat >> confdefs.h <<\EOF |
422ea4b8 | 4301 | #define HAVE_STRUCT_REG_R_GS 1 |
7dfa765c MK |
4302 | EOF |
4303 | ||
4304 | fi | |
4305 | ||
0afdd437 | 4306 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
64bb1671 | 4307 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 |
46711df8 | 4308 | echo "configure:4309: checking for PTRACE_GETREGS" >&5 |
64bb1671 MK |
4309 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
4310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4311 | else | |
4312 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4313 | #line 4314 "configure" |
64bb1671 MK |
4314 | #include "confdefs.h" |
4315 | #include <sys/ptrace.h> | |
4316 | int main() { | |
4317 | PTRACE_GETREGS; | |
4318 | ; return 0; } | |
4319 | EOF | |
46711df8 | 4320 | if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
64bb1671 MK |
4321 | rm -rf conftest* |
4322 | gdb_cv_have_ptrace_getregs=yes | |
4323 | else | |
4324 | echo "configure: failed program was:" >&5 | |
4325 | cat conftest.$ac_ext >&5 | |
4326 | rm -rf conftest* | |
4327 | gdb_cv_have_ptrace_getregs=no | |
4328 | fi | |
4329 | rm -f conftest* | |
4330 | fi | |
4331 | ||
4397a6ab | 4332 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
64bb1671 MK |
4333 | if test $gdb_cv_have_ptrace_getregs = yes; then |
4334 | cat >> confdefs.h <<\EOF | |
4335 | #define HAVE_PTRACE_GETREGS 1 | |
4336 | EOF | |
4337 | ||
4338 | fi | |
4339 | ||
0afdd437 | 4340 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6ce2ac0b | 4341 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 |
46711df8 | 4342 | echo "configure:4343: checking for PTRACE_GETFPXREGS" >&5 |
6ce2ac0b | 4343 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
5c44784c JM |
4344 | echo $ac_n "(cached) $ac_c" 1>&6 |
4345 | else | |
4346 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4347 | #line 4348 "configure" |
5c44784c JM |
4348 | #include "confdefs.h" |
4349 | #include <sys/ptrace.h> | |
4350 | int main() { | |
6ce2ac0b | 4351 | PTRACE_GETFPXREGS; |
5c44784c JM |
4352 | ; return 0; } |
4353 | EOF | |
46711df8 | 4354 | if { (eval echo configure:4355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c | 4355 | rm -rf conftest* |
6ce2ac0b | 4356 | gdb_cv_have_ptrace_getfpxregs=yes |
5c44784c JM |
4357 | else |
4358 | echo "configure: failed program was:" >&5 | |
4359 | cat conftest.$ac_ext >&5 | |
4360 | rm -rf conftest* | |
6ce2ac0b | 4361 | gdb_cv_have_ptrace_getfpxregs=no |
5c44784c JM |
4362 | fi |
4363 | rm -f conftest* | |
4364 | fi | |
4365 | ||
6ce2ac0b MK |
4366 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
4367 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
5c44784c | 4368 | cat >> confdefs.h <<\EOF |
6ce2ac0b | 4369 | #define HAVE_PTRACE_GETFPXREGS 1 |
5c44784c JM |
4370 | EOF |
4371 | ||
4372 | fi | |
4373 | ||
0afdd437 MK |
4374 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
4375 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
46711df8 | 4376 | echo "configure:4377: checking for PT_GETDBREGS" >&5 |
0afdd437 MK |
4377 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
4378 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4379 | else | |
4380 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4381 | #line 4382 "configure" |
0afdd437 MK |
4382 | #include "confdefs.h" |
4383 | #include <sys/types.h> | |
4384 | #include <sys/ptrace.h> | |
4385 | int main() { | |
4386 | PT_GETDBREGS; | |
4387 | ; return 0; } | |
4388 | EOF | |
46711df8 | 4389 | if { (eval echo configure:4390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0afdd437 MK |
4390 | rm -rf conftest* |
4391 | gdb_cv_have_pt_getdbregs=yes | |
4392 | else | |
4393 | echo "configure: failed program was:" >&5 | |
4394 | cat conftest.$ac_ext >&5 | |
4395 | rm -rf conftest* | |
4396 | gdb_cv_have_pt_getdbregs=no | |
4397 | fi | |
4398 | rm -f conftest* | |
4399 | fi | |
4400 | ||
4401 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 | |
4402 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
4403 | cat >> confdefs.h <<\EOF | |
4404 | #define HAVE_PT_GETDBREGS 1 | |
4405 | EOF | |
4406 | ||
4407 | fi | |
4408 | ||
4409 | ||
7be570e7 | 4410 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
46711df8 | 4411 | echo "configure:4412: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
4412 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
4413 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4414 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4415 | else | |
4416 | ac_save_LIBS="$LIBS" | |
4417 | LIBS="-lsocket $LIBS" | |
4418 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4419 | #line 4420 "configure" |
7be570e7 JM |
4420 | #include "confdefs.h" |
4421 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4422 | /* We use char because int might match the return type of a gcc2 | |
4423 | builtin and then its argument prototype would still apply. */ | |
4424 | char socketpair(); | |
4425 | ||
4426 | int main() { | |
4427 | socketpair() | |
4428 | ; return 0; } | |
4429 | EOF | |
46711df8 | 4430 | if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4431 | rm -rf conftest* |
4432 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4433 | else | |
4434 | echo "configure: failed program was:" >&5 | |
4435 | cat conftest.$ac_ext >&5 | |
4436 | rm -rf conftest* | |
4437 | eval "ac_cv_lib_$ac_lib_var=no" | |
4438 | fi | |
4439 | rm -f conftest* | |
4440 | LIBS="$ac_save_LIBS" | |
4441 | ||
4442 | fi | |
4443 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4444 | echo "$ac_t""yes" 1>&6 | |
4445 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4446 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4447 | cat >> confdefs.h <<EOF | |
4448 | #define $ac_tr_lib 1 | |
4449 | EOF | |
4450 | ||
4451 | LIBS="-lsocket $LIBS" | |
4452 | ||
4453 | else | |
4454 | echo "$ac_t""no" 1>&6 | |
4455 | fi | |
4456 | ||
4457 | for ac_func in socketpair | |
4458 | do | |
4459 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 4460 | echo "configure:4461: checking for $ac_func" >&5 |
7be570e7 JM |
4461 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4463 | else | |
4464 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4465 | #line 4466 "configure" |
7be570e7 JM |
4466 | #include "confdefs.h" |
4467 | /* System header to define __stub macros and hopefully few prototypes, | |
4468 | which can conflict with char $ac_func(); below. */ | |
4469 | #include <assert.h> | |
4470 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4471 | /* We use char because int might match the return type of a gcc2 | |
4472 | builtin and then its argument prototype would still apply. */ | |
4473 | char $ac_func(); | |
4474 | ||
4475 | int main() { | |
4476 | ||
4477 | /* The GNU C library defines this for functions which it implements | |
4478 | to always fail with ENOSYS. Some functions are actually named | |
4479 | something starting with __ and the normal name is an alias. */ | |
4480 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4481 | choke me | |
4482 | #else | |
4483 | $ac_func(); | |
4484 | #endif | |
4485 | ||
4486 | ; return 0; } | |
4487 | EOF | |
46711df8 | 4488 | if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4489 | rm -rf conftest* |
4490 | eval "ac_cv_func_$ac_func=yes" | |
4491 | else | |
4492 | echo "configure: failed program was:" >&5 | |
4493 | cat conftest.$ac_ext >&5 | |
4494 | rm -rf conftest* | |
4495 | eval "ac_cv_func_$ac_func=no" | |
4496 | fi | |
4497 | rm -f conftest* | |
4498 | fi | |
4499 | ||
4500 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4501 | echo "$ac_t""yes" 1>&6 | |
4502 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4503 | cat >> confdefs.h <<EOF | |
4504 | #define $ac_tr_func 1 | |
4505 | EOF | |
4506 | ||
4507 | else | |
4508 | echo "$ac_t""no" 1>&6 | |
4509 | fi | |
4510 | done | |
4511 | ||
4512 | ||
4513 | ||
c906108c | 4514 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
46711df8 | 4515 | echo "configure:4516: checking whether malloc must be declared" >&5 |
c906108c SS |
4516 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4517 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4518 | else | |
4519 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4520 | #line 4521 "configure" |
c906108c SS |
4521 | #include "confdefs.h" |
4522 | ||
4523 | #include <stdio.h> | |
4524 | #ifdef HAVE_STRING_H | |
4525 | #include <string.h> | |
4526 | #else | |
4527 | #ifdef HAVE_STRINGS_H | |
4528 | #include <strings.h> | |
4529 | #endif | |
4530 | #endif | |
4531 | #ifdef HAVE_STDLIB_H | |
4532 | #include <stdlib.h> | |
4533 | #endif | |
4534 | #ifdef HAVE_UNISTD_H | |
4535 | #include <unistd.h> | |
4536 | #endif | |
4537 | int main() { | |
4538 | char *(*pfn) = (char *(*)) malloc | |
4539 | ; return 0; } | |
4540 | EOF | |
46711df8 | 4541 | if { (eval echo configure:4542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4542 | rm -rf conftest* |
4543 | bfd_cv_decl_needed_malloc=no | |
4544 | else | |
4545 | echo "configure: failed program was:" >&5 | |
4546 | cat conftest.$ac_ext >&5 | |
4547 | rm -rf conftest* | |
4548 | bfd_cv_decl_needed_malloc=yes | |
4549 | fi | |
4550 | rm -f conftest* | |
4551 | fi | |
4552 | ||
4553 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4554 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4555 | cat >> confdefs.h <<\EOF | |
4556 | #define NEED_DECLARATION_MALLOC 1 | |
4557 | EOF | |
4558 | ||
4559 | fi | |
4560 | ||
4561 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
46711df8 | 4562 | echo "configure:4563: checking whether realloc must be declared" >&5 |
c906108c SS |
4563 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4564 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4565 | else | |
4566 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4567 | #line 4568 "configure" |
c906108c SS |
4568 | #include "confdefs.h" |
4569 | ||
4570 | #include <stdio.h> | |
4571 | #ifdef HAVE_STRING_H | |
4572 | #include <string.h> | |
4573 | #else | |
4574 | #ifdef HAVE_STRINGS_H | |
4575 | #include <strings.h> | |
4576 | #endif | |
4577 | #endif | |
4578 | #ifdef HAVE_STDLIB_H | |
4579 | #include <stdlib.h> | |
4580 | #endif | |
4581 | #ifdef HAVE_UNISTD_H | |
4582 | #include <unistd.h> | |
4583 | #endif | |
4584 | int main() { | |
4585 | char *(*pfn) = (char *(*)) realloc | |
4586 | ; return 0; } | |
4587 | EOF | |
46711df8 | 4588 | if { (eval echo configure:4589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4589 | rm -rf conftest* |
4590 | bfd_cv_decl_needed_realloc=no | |
4591 | else | |
4592 | echo "configure: failed program was:" >&5 | |
4593 | cat conftest.$ac_ext >&5 | |
4594 | rm -rf conftest* | |
4595 | bfd_cv_decl_needed_realloc=yes | |
4596 | fi | |
4597 | rm -f conftest* | |
4598 | fi | |
4599 | ||
4600 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4601 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4602 | cat >> confdefs.h <<\EOF | |
4603 | #define NEED_DECLARATION_REALLOC 1 | |
4604 | EOF | |
4605 | ||
4606 | fi | |
4607 | ||
4608 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
46711df8 | 4609 | echo "configure:4610: checking whether free must be declared" >&5 |
c906108c SS |
4610 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4611 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4612 | else | |
4613 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4614 | #line 4615 "configure" |
c906108c SS |
4615 | #include "confdefs.h" |
4616 | ||
4617 | #include <stdio.h> | |
4618 | #ifdef HAVE_STRING_H | |
4619 | #include <string.h> | |
4620 | #else | |
4621 | #ifdef HAVE_STRINGS_H | |
4622 | #include <strings.h> | |
4623 | #endif | |
4624 | #endif | |
4625 | #ifdef HAVE_STDLIB_H | |
4626 | #include <stdlib.h> | |
4627 | #endif | |
4628 | #ifdef HAVE_UNISTD_H | |
4629 | #include <unistd.h> | |
4630 | #endif | |
4631 | int main() { | |
4632 | char *(*pfn) = (char *(*)) free | |
4633 | ; return 0; } | |
4634 | EOF | |
46711df8 | 4635 | if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4636 | rm -rf conftest* |
4637 | bfd_cv_decl_needed_free=no | |
4638 | else | |
4639 | echo "configure: failed program was:" >&5 | |
4640 | cat conftest.$ac_ext >&5 | |
4641 | rm -rf conftest* | |
4642 | bfd_cv_decl_needed_free=yes | |
4643 | fi | |
4644 | rm -f conftest* | |
4645 | fi | |
4646 | ||
4647 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4648 | if test $bfd_cv_decl_needed_free = yes; then | |
4649 | cat >> confdefs.h <<\EOF | |
4650 | #define NEED_DECLARATION_FREE 1 | |
4651 | EOF | |
4652 | ||
4653 | fi | |
4654 | ||
4655 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
46711df8 | 4656 | echo "configure:4657: checking whether strerror must be declared" >&5 |
c906108c SS |
4657 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4658 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4659 | else | |
4660 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4661 | #line 4662 "configure" |
c906108c SS |
4662 | #include "confdefs.h" |
4663 | ||
4664 | #include <stdio.h> | |
4665 | #ifdef HAVE_STRING_H | |
4666 | #include <string.h> | |
4667 | #else | |
4668 | #ifdef HAVE_STRINGS_H | |
4669 | #include <strings.h> | |
4670 | #endif | |
4671 | #endif | |
4672 | #ifdef HAVE_STDLIB_H | |
4673 | #include <stdlib.h> | |
4674 | #endif | |
4675 | #ifdef HAVE_UNISTD_H | |
4676 | #include <unistd.h> | |
4677 | #endif | |
4678 | int main() { | |
4679 | char *(*pfn) = (char *(*)) strerror | |
4680 | ; return 0; } | |
4681 | EOF | |
46711df8 | 4682 | if { (eval echo configure:4683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4683 | rm -rf conftest* |
4684 | bfd_cv_decl_needed_strerror=no | |
4685 | else | |
4686 | echo "configure: failed program was:" >&5 | |
4687 | cat conftest.$ac_ext >&5 | |
4688 | rm -rf conftest* | |
4689 | bfd_cv_decl_needed_strerror=yes | |
4690 | fi | |
4691 | rm -f conftest* | |
4692 | fi | |
4693 | ||
4694 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4695 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4696 | cat >> confdefs.h <<\EOF | |
4697 | #define NEED_DECLARATION_STRERROR 1 | |
4698 | EOF | |
4699 | ||
4700 | fi | |
4701 | ||
4702 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
46711df8 | 4703 | echo "configure:4704: checking whether strdup must be declared" >&5 |
c906108c SS |
4704 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4705 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4706 | else | |
4707 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4708 | #line 4709 "configure" |
c906108c SS |
4709 | #include "confdefs.h" |
4710 | ||
4711 | #include <stdio.h> | |
4712 | #ifdef HAVE_STRING_H | |
4713 | #include <string.h> | |
4714 | #else | |
4715 | #ifdef HAVE_STRINGS_H | |
4716 | #include <strings.h> | |
4717 | #endif | |
4718 | #endif | |
4719 | #ifdef HAVE_STDLIB_H | |
4720 | #include <stdlib.h> | |
4721 | #endif | |
4722 | #ifdef HAVE_UNISTD_H | |
4723 | #include <unistd.h> | |
4724 | #endif | |
4725 | int main() { | |
4726 | char *(*pfn) = (char *(*)) strdup | |
4727 | ; return 0; } | |
4728 | EOF | |
46711df8 | 4729 | if { (eval echo configure:4730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4730 | rm -rf conftest* |
4731 | bfd_cv_decl_needed_strdup=no | |
4732 | else | |
4733 | echo "configure: failed program was:" >&5 | |
4734 | cat conftest.$ac_ext >&5 | |
4735 | rm -rf conftest* | |
4736 | bfd_cv_decl_needed_strdup=yes | |
4737 | fi | |
4738 | rm -f conftest* | |
4739 | fi | |
4740 | ||
4741 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4742 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4743 | cat >> confdefs.h <<\EOF | |
4744 | #define NEED_DECLARATION_STRDUP 1 | |
4745 | EOF | |
4746 | ||
4747 | fi | |
4748 | ||
b83266a0 | 4749 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
46711df8 | 4750 | echo "configure:4751: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4751 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4752 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4753 | else | |
4754 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4755 | #line 4756 "configure" |
b83266a0 SS |
4756 | #include "confdefs.h" |
4757 | ||
4758 | #include <stdio.h> | |
4759 | #ifdef HAVE_STRING_H | |
4760 | #include <string.h> | |
4761 | #else | |
4762 | #ifdef HAVE_STRINGS_H | |
4763 | #include <strings.h> | |
4764 | #endif | |
4765 | #endif | |
4766 | #ifdef HAVE_STDLIB_H | |
4767 | #include <stdlib.h> | |
4768 | #endif | |
4769 | #ifdef HAVE_UNISTD_H | |
4770 | #include <unistd.h> | |
4771 | #endif | |
4772 | int main() { | |
4773 | char *(*pfn) = (char *(*)) strstr | |
4774 | ; return 0; } | |
4775 | EOF | |
46711df8 | 4776 | if { (eval echo configure:4777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4777 | rm -rf conftest* |
4778 | bfd_cv_decl_needed_strstr=no | |
4779 | else | |
4780 | echo "configure: failed program was:" >&5 | |
4781 | cat conftest.$ac_ext >&5 | |
4782 | rm -rf conftest* | |
4783 | bfd_cv_decl_needed_strstr=yes | |
4784 | fi | |
4785 | rm -f conftest* | |
4786 | fi | |
4787 | ||
4788 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4789 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4790 | cat >> confdefs.h <<\EOF | |
4791 | #define NEED_DECLARATION_STRSTR 1 | |
4792 | EOF | |
4793 | ||
4794 | fi | |
4795 | ||
c906108c SS |
4796 | |
4797 | ||
4798 | # The following save_state_t checkery is only necessary for HPUX | |
4799 | # versions earlier than 10.20. When those fade from memory, this | |
4800 | # could be expunged. --jsm 1999-03-22 | |
4801 | ||
4802 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
46711df8 | 4803 | echo "configure:4804: checking for HPUX save_state structure" >&5 |
c906108c | 4804 | cat > conftest.$ac_ext <<EOF |
46711df8 | 4805 | #line 4806 "configure" |
c906108c SS |
4806 | #include "confdefs.h" |
4807 | #include <machine/save_state.h> | |
4808 | EOF | |
4809 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4810 | egrep "save_state_t" >/dev/null 2>&1; then | |
4811 | rm -rf conftest* | |
4812 | gdb_cv_hpux_savestate=yes | |
4813 | else | |
4814 | rm -rf conftest* | |
4815 | gdb_cv_hpux_savestate=no | |
4816 | fi | |
4817 | rm -f conftest* | |
4818 | ||
4819 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4820 | #line 4821 "configure" |
c906108c SS |
4821 | #include "confdefs.h" |
4822 | #include <machine/save_state.h> | |
4823 | EOF | |
4824 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4825 | egrep "ss_wide" >/dev/null 2>&1; then | |
4826 | rm -rf conftest* | |
4827 | gdb_cv_hpux_sswide=yes | |
4828 | else | |
4829 | rm -rf conftest* | |
4830 | gdb_cv_hpux_sswide=no | |
4831 | fi | |
4832 | rm -f conftest* | |
4833 | ||
4834 | if test $gdb_cv_hpux_savestate = yes | |
4835 | then | |
4836 | cat >> confdefs.h <<\EOF | |
4837 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4838 | EOF | |
4839 | ||
4840 | fi | |
4841 | if test $gdb_cv_hpux_sswide = yes | |
4842 | then | |
4843 | cat >> confdefs.h <<\EOF | |
4844 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4845 | EOF | |
4846 | ||
4847 | fi | |
4848 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4849 | ||
4850 | ||
4851 | # If we are configured native on GNU/Linux, work around problems with | |
4852 | # sys/procfs.h | |
c3f6f71d | 4853 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4854 | |
4855 | if test "${target}" = "${host}"; then | |
4856 | case "${host}" in | |
4857 | i[3456]86-*-linux*) | |
4858 | cat >> confdefs.h <<\EOF | |
4859 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4860 | EOF | |
4861 | ||
4862 | cat >> confdefs.h <<\EOF | |
4863 | #define sys_quotactl 1 | |
4864 | EOF | |
4865 | ||
4866 | ;; | |
596c9d4b KB |
4867 | ia64-*-aix*) |
4868 | cat >> confdefs.h <<\EOF | |
4869 | #define NEW_PROC_API 1 | |
4870 | EOF | |
4871 | ||
4872 | ;; | |
c5394b80 | 4873 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4874 | cat >> confdefs.h <<\EOF |
4875 | #define NEW_PROC_API 1 | |
c906108c SS |
4876 | EOF |
4877 | ||
c3f6f71d | 4878 | ;; |
3423db82 | 4879 | *-*-solaris2.[678]) |
c3f6f71d JM |
4880 | cat >> confdefs.h <<\EOF |
4881 | #define NEW_PROC_API 1 | |
4882 | EOF | |
4883 | ||
4884 | ;; | |
4885 | esac | |
c906108c SS |
4886 | fi |
4887 | ||
4888 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4889 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 4890 | echo "configure:4891: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4891 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4892 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4893 | else | |
4894 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4895 | #line 4896 "configure" |
c906108c | 4896 | #include "confdefs.h" |
e17bf198 AO |
4897 | |
4898 | #define _SYSCALL32 | |
c906108c SS |
4899 | #include <sys/procfs.h> |
4900 | int main() { | |
4901 | pstatus_t avar | |
4902 | ; return 0; } | |
4903 | EOF | |
46711df8 | 4904 | if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4905 | rm -rf conftest* |
4906 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
4907 | else | |
4908 | echo "configure: failed program was:" >&5 | |
4909 | cat conftest.$ac_ext >&5 | |
4910 | rm -rf conftest* | |
4911 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
4912 | ||
4913 | fi | |
4914 | rm -f conftest* | |
4915 | fi | |
4916 | ||
4917 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
4918 | cat >> confdefs.h <<\EOF | |
4919 | #define HAVE_PSTATUS_T 1 | |
4920 | EOF | |
4921 | ||
4922 | fi | |
4923 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
4924 | ||
4925 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 4926 | echo "configure:4927: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
4927 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
4928 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4929 | else | |
4930 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4931 | #line 4932 "configure" |
c906108c | 4932 | #include "confdefs.h" |
e17bf198 AO |
4933 | |
4934 | #define _SYSCALL32 | |
c906108c SS |
4935 | #include <sys/procfs.h> |
4936 | int main() { | |
4937 | prrun_t avar | |
4938 | ; return 0; } | |
4939 | EOF | |
46711df8 | 4940 | if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4941 | rm -rf conftest* |
4942 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
4943 | else | |
4944 | echo "configure: failed program was:" >&5 | |
4945 | cat conftest.$ac_ext >&5 | |
4946 | rm -rf conftest* | |
4947 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
4948 | ||
4949 | fi | |
4950 | rm -f conftest* | |
4951 | fi | |
4952 | ||
4953 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
4954 | cat >> confdefs.h <<\EOF | |
4955 | #define HAVE_PRRUN_T 1 | |
4956 | EOF | |
4957 | ||
4958 | fi | |
4959 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
4960 | ||
4961 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 4962 | echo "configure:4963: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
4963 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
4964 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4965 | else | |
4966 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 4967 | #line 4968 "configure" |
c906108c | 4968 | #include "confdefs.h" |
e17bf198 AO |
4969 | |
4970 | #define _SYSCALL32 | |
c906108c SS |
4971 | #include <sys/procfs.h> |
4972 | int main() { | |
4973 | gregset_t avar | |
4974 | ; return 0; } | |
4975 | EOF | |
46711df8 | 4976 | if { (eval echo configure:4977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4977 | rm -rf conftest* |
4978 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
4979 | else | |
4980 | echo "configure: failed program was:" >&5 | |
4981 | cat conftest.$ac_ext >&5 | |
4982 | rm -rf conftest* | |
4983 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
4984 | ||
4985 | fi | |
4986 | rm -f conftest* | |
4987 | fi | |
4988 | ||
4989 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
4990 | cat >> confdefs.h <<\EOF | |
4991 | #define HAVE_GREGSET_T 1 | |
4992 | EOF | |
4993 | ||
4994 | fi | |
4995 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
4996 | ||
4997 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 4998 | echo "configure:4999: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
4999 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
5000 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5001 | else | |
5002 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5003 | #line 5004 "configure" |
c906108c | 5004 | #include "confdefs.h" |
e17bf198 AO |
5005 | |
5006 | #define _SYSCALL32 | |
c906108c SS |
5007 | #include <sys/procfs.h> |
5008 | int main() { | |
5009 | fpregset_t avar | |
5010 | ; return 0; } | |
5011 | EOF | |
46711df8 | 5012 | if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5013 | rm -rf conftest* |
5014 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
5015 | else | |
5016 | echo "configure: failed program was:" >&5 | |
5017 | cat conftest.$ac_ext >&5 | |
5018 | rm -rf conftest* | |
5019 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
5020 | ||
5021 | fi | |
5022 | rm -f conftest* | |
5023 | fi | |
5024 | ||
5025 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
5026 | cat >> confdefs.h <<\EOF | |
5027 | #define HAVE_FPREGSET_T 1 | |
5028 | EOF | |
5029 | ||
5030 | fi | |
5031 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
5032 | ||
3862412b | 5033 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
46711df8 | 5034 | echo "configure:5035: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
5035 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
5036 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5037 | else | |
5038 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5039 | #line 5040 "configure" |
3862412b | 5040 | #include "confdefs.h" |
e17bf198 AO |
5041 | |
5042 | #define _SYSCALL32 | |
3862412b MK |
5043 | #include <sys/procfs.h> |
5044 | int main() { | |
5045 | prgregset_t avar | |
5046 | ; return 0; } | |
5047 | EOF | |
46711df8 | 5048 | if { (eval echo configure:5049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5049 | rm -rf conftest* |
5050 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
5051 | else | |
5052 | echo "configure: failed program was:" >&5 | |
5053 | cat conftest.$ac_ext >&5 | |
5054 | rm -rf conftest* | |
5055 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
5056 | ||
5057 | fi | |
5058 | rm -f conftest* | |
5059 | fi | |
5060 | ||
5061 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
5062 | cat >> confdefs.h <<\EOF | |
5063 | #define HAVE_PRGREGSET_T 1 | |
5064 | EOF | |
5065 | ||
5066 | fi | |
5067 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
5068 | ||
5069 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 5070 | echo "configure:5071: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
5071 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
5072 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5073 | else | |
5074 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5075 | #line 5076 "configure" |
3862412b | 5076 | #include "confdefs.h" |
e17bf198 AO |
5077 | |
5078 | #define _SYSCALL32 | |
3862412b MK |
5079 | #include <sys/procfs.h> |
5080 | int main() { | |
5081 | prfpregset_t avar | |
5082 | ; return 0; } | |
5083 | EOF | |
46711df8 | 5084 | if { (eval echo configure:5085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5085 | rm -rf conftest* |
5086 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
5087 | else | |
5088 | echo "configure: failed program was:" >&5 | |
5089 | cat conftest.$ac_ext >&5 | |
5090 | rm -rf conftest* | |
5091 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
5092 | ||
5093 | fi | |
5094 | rm -f conftest* | |
5095 | fi | |
5096 | ||
5097 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
5098 | cat >> confdefs.h <<\EOF | |
5099 | #define HAVE_PRFPREGSET_T 1 | |
5100 | EOF | |
5101 | ||
5102 | fi | |
5103 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
5104 | ||
451928c5 | 5105 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
46711df8 | 5106 | echo "configure:5107: checking for prgregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
5107 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
5108 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5109 | else | |
5110 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5111 | #line 5112 "configure" |
451928c5 | 5112 | #include "confdefs.h" |
e17bf198 AO |
5113 | |
5114 | #define _SYSCALL32 | |
451928c5 AC |
5115 | #include <sys/procfs.h> |
5116 | int main() { | |
5117 | prgregset32_t avar | |
5118 | ; return 0; } | |
5119 | EOF | |
46711df8 | 5120 | if { (eval echo configure:5121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
5121 | rm -rf conftest* |
5122 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
5123 | else | |
5124 | echo "configure: failed program was:" >&5 | |
5125 | cat conftest.$ac_ext >&5 | |
5126 | rm -rf conftest* | |
5127 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
5128 | ||
5129 | fi | |
5130 | rm -f conftest* | |
5131 | fi | |
5132 | ||
5133 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then | |
5134 | cat >> confdefs.h <<\EOF | |
5135 | #define HAVE_PRGREGSET32_T 1 | |
5136 | EOF | |
5137 | ||
5138 | fi | |
5139 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
5140 | ||
5141 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 5142 | echo "configure:5143: checking for prfpregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
5143 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
5144 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5145 | else | |
5146 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5147 | #line 5148 "configure" |
451928c5 | 5148 | #include "confdefs.h" |
e17bf198 AO |
5149 | |
5150 | #define _SYSCALL32 | |
451928c5 AC |
5151 | #include <sys/procfs.h> |
5152 | int main() { | |
5153 | prfpregset32_t avar | |
5154 | ; return 0; } | |
5155 | EOF | |
46711df8 | 5156 | if { (eval echo configure:5157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
5157 | rm -rf conftest* |
5158 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes | |
5159 | else | |
5160 | echo "configure: failed program was:" >&5 | |
5161 | cat conftest.$ac_ext >&5 | |
5162 | rm -rf conftest* | |
5163 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no | |
5164 | ||
5165 | fi | |
5166 | rm -f conftest* | |
5167 | fi | |
5168 | ||
5169 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then | |
5170 | cat >> confdefs.h <<\EOF | |
5171 | #define HAVE_PRFPREGSET32_T 1 | |
5172 | EOF | |
5173 | ||
5174 | fi | |
5175 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
5176 | ||
3862412b | 5177 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
46711df8 | 5178 | echo "configure:5179: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
5179 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
5180 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5181 | else | |
5182 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5183 | #line 5184 "configure" |
3862412b | 5184 | #include "confdefs.h" |
e17bf198 AO |
5185 | |
5186 | #define _SYSCALL32 | |
3862412b MK |
5187 | #include <sys/procfs.h> |
5188 | int main() { | |
5189 | lwpid_t avar | |
5190 | ; return 0; } | |
5191 | EOF | |
46711df8 | 5192 | if { (eval echo configure:5193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5193 | rm -rf conftest* |
5194 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
5195 | else | |
5196 | echo "configure: failed program was:" >&5 | |
5197 | cat conftest.$ac_ext >&5 | |
5198 | rm -rf conftest* | |
5199 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
5200 | ||
5201 | fi | |
5202 | rm -f conftest* | |
5203 | fi | |
5204 | ||
5205 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
5206 | cat >> confdefs.h <<\EOF | |
5207 | #define HAVE_LWPID_T 1 | |
5208 | EOF | |
5209 | ||
5210 | fi | |
5211 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
5212 | ||
5213 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 5214 | echo "configure:5215: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
5215 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
5216 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5217 | else | |
5218 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5219 | #line 5220 "configure" |
3862412b | 5220 | #include "confdefs.h" |
e17bf198 AO |
5221 | |
5222 | #define _SYSCALL32 | |
3862412b MK |
5223 | #include <sys/procfs.h> |
5224 | int main() { | |
5225 | psaddr_t avar | |
5226 | ; return 0; } | |
5227 | EOF | |
46711df8 | 5228 | if { (eval echo configure:5229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
5229 | rm -rf conftest* |
5230 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
5231 | else | |
5232 | echo "configure: failed program was:" >&5 | |
5233 | cat conftest.$ac_ext >&5 | |
5234 | rm -rf conftest* | |
5235 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
5236 | ||
5237 | fi | |
5238 | rm -f conftest* | |
5239 | fi | |
5240 | ||
5241 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
5242 | cat >> confdefs.h <<\EOF | |
5243 | #define HAVE_PSADDR_T 1 | |
5244 | EOF | |
5245 | ||
5246 | fi | |
5247 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
5248 | ||
596c9d4b | 5249 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
46711df8 | 5250 | echo "configure:5251: checking for prsysent_t in sys/procfs.h" >&5 |
596c9d4b KB |
5251 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
5252 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5253 | else | |
5254 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5255 | #line 5256 "configure" |
596c9d4b KB |
5256 | #include "confdefs.h" |
5257 | ||
5258 | #define _SYSCALL32 | |
5259 | #include <sys/procfs.h> | |
5260 | int main() { | |
5261 | prsysent_t avar | |
5262 | ; return 0; } | |
5263 | EOF | |
46711df8 | 5264 | if { (eval echo configure:5265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5265 | rm -rf conftest* |
5266 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
5267 | else | |
5268 | echo "configure: failed program was:" >&5 | |
5269 | cat conftest.$ac_ext >&5 | |
5270 | rm -rf conftest* | |
5271 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
5272 | ||
5273 | fi | |
5274 | rm -f conftest* | |
5275 | fi | |
5276 | ||
5277 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then | |
5278 | cat >> confdefs.h <<\EOF | |
5279 | #define HAVE_PRSYSENT_T 1 | |
5280 | EOF | |
5281 | ||
5282 | fi | |
5283 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
5284 | ||
5285 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 5286 | echo "configure:5287: checking for pr_sigset_t in sys/procfs.h" >&5 |
596c9d4b KB |
5287 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
5288 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5289 | else | |
5290 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5291 | #line 5292 "configure" |
596c9d4b KB |
5292 | #include "confdefs.h" |
5293 | ||
5294 | #define _SYSCALL32 | |
5295 | #include <sys/procfs.h> | |
5296 | int main() { | |
5297 | pr_sigset_t avar | |
5298 | ; return 0; } | |
5299 | EOF | |
46711df8 | 5300 | if { (eval echo configure:5301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5301 | rm -rf conftest* |
5302 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes | |
5303 | else | |
5304 | echo "configure: failed program was:" >&5 | |
5305 | cat conftest.$ac_ext >&5 | |
5306 | rm -rf conftest* | |
5307 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no | |
5308 | ||
5309 | fi | |
5310 | rm -f conftest* | |
5311 | fi | |
5312 | ||
5313 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then | |
5314 | cat >> confdefs.h <<\EOF | |
5315 | #define HAVE_PR_SIGSET_T 1 | |
5316 | EOF | |
5317 | ||
5318 | fi | |
5319 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
5320 | ||
5321 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 5322 | echo "configure:5323: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
596c9d4b KB |
5323 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
5324 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5325 | else | |
5326 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5327 | #line 5328 "configure" |
596c9d4b KB |
5328 | #include "confdefs.h" |
5329 | ||
5330 | #define _SYSCALL32 | |
5331 | #include <sys/procfs.h> | |
5332 | int main() { | |
5333 | pr_sigaction64_t avar | |
5334 | ; return 0; } | |
5335 | EOF | |
46711df8 | 5336 | if { (eval echo configure:5337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5337 | rm -rf conftest* |
5338 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
5339 | else | |
5340 | echo "configure: failed program was:" >&5 | |
5341 | cat conftest.$ac_ext >&5 | |
5342 | rm -rf conftest* | |
5343 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
5344 | ||
5345 | fi | |
5346 | rm -f conftest* | |
5347 | fi | |
5348 | ||
5349 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then | |
5350 | cat >> confdefs.h <<\EOF | |
5351 | #define HAVE_PR_SIGACTION64_T 1 | |
5352 | EOF | |
5353 | ||
5354 | fi | |
5355 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
5356 | ||
5357 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
46711df8 | 5358 | echo "configure:5359: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
596c9d4b KB |
5359 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
5360 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5361 | else | |
5362 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5363 | #line 5364 "configure" |
596c9d4b KB |
5364 | #include "confdefs.h" |
5365 | ||
5366 | #define _SYSCALL32 | |
5367 | #include <sys/procfs.h> | |
5368 | int main() { | |
5369 | pr_siginfo64_t avar | |
5370 | ; return 0; } | |
5371 | EOF | |
46711df8 | 5372 | if { (eval echo configure:5373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b KB |
5373 | rm -rf conftest* |
5374 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
5375 | else | |
5376 | echo "configure: failed program was:" >&5 | |
5377 | cat conftest.$ac_ext >&5 | |
5378 | rm -rf conftest* | |
5379 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
5380 | ||
5381 | fi | |
5382 | rm -f conftest* | |
5383 | fi | |
5384 | ||
5385 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then | |
5386 | cat >> confdefs.h <<\EOF | |
5387 | #define HAVE_PR_SIGINFO64_T 1 | |
5388 | EOF | |
5389 | ||
5390 | fi | |
5391 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
5392 | ||
c906108c | 5393 | |
451928c5 | 5394 | |
c906108c | 5395 | |
746a987d | 5396 | |
d84dd0c5 MK |
5397 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
5398 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
46711df8 | 5399 | echo "configure:5400: checking whether prfpregset_t type is broken" >&5 |
d84dd0c5 MK |
5400 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
5401 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5402 | else | |
5403 | if test "$cross_compiling" = yes; then | |
5404 | gdb_cv_prfpregset_t_broken=yes | |
5405 | else | |
5406 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5407 | #line 5408 "configure" |
d84dd0c5 MK |
5408 | #include "confdefs.h" |
5409 | #include <sys/procfs.h> | |
5410 | int main () | |
5411 | { | |
5412 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
5413 | return 1; | |
5414 | return 0; | |
5415 | } | |
5416 | EOF | |
46711df8 | 5417 | if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
d84dd0c5 MK |
5418 | then |
5419 | gdb_cv_prfpregset_t_broken=no | |
5420 | else | |
5421 | echo "configure: failed program was:" >&5 | |
5422 | cat conftest.$ac_ext >&5 | |
5423 | rm -fr conftest* | |
5424 | gdb_cv_prfpregset_t_broken=yes | |
5425 | fi | |
5426 | rm -fr conftest* | |
5427 | fi | |
5428 | ||
5429 | fi | |
5430 | ||
5431 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 | |
5432 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
5433 | cat >> confdefs.h <<\EOF | |
5434 | #define PRFPREGSET_T_BROKEN 1 | |
5435 | EOF | |
5436 | ||
5437 | fi | |
5438 | fi | |
5439 | ||
5440 | ||
c906108c | 5441 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 |
46711df8 | 5442 | echo "configure:5443: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
5443 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
5444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5445 | else | |
5446 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5447 | #line 5448 "configure" |
c906108c SS |
5448 | #include "confdefs.h" |
5449 | #include <unistd.h> | |
5450 | #include <sys/types.h> | |
5451 | #include <sys/procfs.h> | |
5452 | ||
5453 | int main() { | |
5454 | ||
5455 | int dummy;; | |
5456 | dummy = ioctl(0, PIOCSET, &dummy); | |
5457 | ||
5458 | ; return 0; } | |
5459 | EOF | |
46711df8 | 5460 | if { (eval echo configure:5461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5461 | rm -rf conftest* |
5462 | gdb_cv_have_procfs_piocset=yes | |
5463 | else | |
5464 | echo "configure: failed program was:" >&5 | |
5465 | cat conftest.$ac_ext >&5 | |
5466 | rm -rf conftest* | |
5467 | gdb_cv_have_procfs_piocset=no | |
5468 | fi | |
5469 | rm -f conftest* | |
5470 | fi | |
5471 | ||
5472 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
5473 | if test $gdb_cv_have_procfs_piocset = yes; then | |
5474 | cat >> confdefs.h <<\EOF | |
5475 | #define HAVE_PROCFS_PIOCSET 1 | |
5476 | EOF | |
5477 | ||
5478 | fi | |
5479 | fi | |
5480 | ||
d45fe813 KB |
5481 | if test ${host} = ${target} ; then |
5482 | ||
5483 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
46711df8 | 5484 | echo "configure:5485: checking for member l_addr in struct link_map" >&5 |
d45fe813 KB |
5485 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
5486 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5487 | else | |
5488 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5489 | #line 5490 "configure" |
d45fe813 KB |
5490 | #include "confdefs.h" |
5491 | #include <link.h> | |
5492 | int main() { | |
5493 | struct link_map lm; (void) lm.l_addr; | |
5494 | ; return 0; } | |
5495 | EOF | |
46711df8 | 5496 | if { (eval echo configure:5497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5497 | rm -rf conftest* |
5498 | gdb_cv_have_struct_link_map_with_l_members=yes | |
5499 | else | |
5500 | echo "configure: failed program was:" >&5 | |
5501 | cat conftest.$ac_ext >&5 | |
5502 | rm -rf conftest* | |
5503 | gdb_cv_have_struct_link_map_with_l_members=no | |
5504 | fi | |
5505 | rm -f conftest* | |
5506 | fi | |
5507 | ||
5508 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 | |
5509 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
5510 | cat >> confdefs.h <<\EOF | |
5511 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
5512 | EOF | |
5513 | ||
5514 | fi | |
5515 | ||
5516 | ||
5517 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
46711df8 | 5518 | echo "configure:5519: checking for member lm_addr in struct link_map" >&5 |
d45fe813 KB |
5519 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
5520 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5521 | else | |
5522 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5523 | #line 5524 "configure" |
d45fe813 KB |
5524 | #include "confdefs.h" |
5525 | #include <sys/types.h> | |
5526 | #include <link.h> | |
5527 | int main() { | |
5528 | struct link_map lm; (void) lm.lm_addr; | |
5529 | ; return 0; } | |
5530 | EOF | |
46711df8 | 5531 | if { (eval echo configure:5532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5532 | rm -rf conftest* |
5533 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
5534 | else | |
5535 | echo "configure: failed program was:" >&5 | |
5536 | cat conftest.$ac_ext >&5 | |
5537 | rm -rf conftest* | |
5538 | gdb_cv_have_struct_link_map_with_lm_members=no | |
5539 | fi | |
5540 | rm -f conftest* | |
5541 | fi | |
5542 | ||
5543 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 | |
5544 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
5545 | cat >> confdefs.h <<\EOF | |
5546 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
5547 | EOF | |
5548 | ||
5549 | fi | |
5550 | ||
5551 | ||
5552 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
46711df8 | 5553 | echo "configure:5554: checking for member som_addr in struct so_map" >&5 |
d45fe813 KB |
5554 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
5555 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5556 | else | |
5557 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5558 | #line 5559 "configure" |
d45fe813 KB |
5559 | #include "confdefs.h" |
5560 | #include <sys/types.h> | |
39812ceb C |
5561 | #ifdef HAVE_NLIST_H |
5562 | #include <nlist.h> | |
5563 | #endif | |
d45fe813 KB |
5564 | #include <link.h> |
5565 | int main() { | |
5566 | struct so_map lm; (void) lm.som_addr; | |
5567 | ; return 0; } | |
5568 | EOF | |
46711df8 | 5569 | if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5570 | rm -rf conftest* |
5571 | gdb_cv_have_struct_so_map_with_som_members=yes | |
5572 | else | |
5573 | echo "configure: failed program was:" >&5 | |
5574 | cat conftest.$ac_ext >&5 | |
5575 | rm -rf conftest* | |
5576 | gdb_cv_have_struct_so_map_with_som_members=no | |
5577 | fi | |
5578 | rm -f conftest* | |
5579 | fi | |
5580 | ||
5581 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 | |
5582 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
5583 | cat >> confdefs.h <<\EOF | |
5584 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
5585 | EOF | |
5586 | ||
5587 | fi | |
5588 | ||
5589 | ||
5590 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
46711df8 | 5591 | echo "configure:5592: checking for struct link_map32 in sys/link.h" >&5 |
d45fe813 KB |
5592 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
5593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5594 | else | |
5595 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5596 | #line 5597 "configure" |
d45fe813 KB |
5597 | #include "confdefs.h" |
5598 | #define _SYSCALL32 | |
5599 | #include <sys/link.h> | |
5600 | int main() { | |
5601 | struct link_map32 l; | |
5602 | ; return 0; } | |
5603 | EOF | |
46711df8 | 5604 | if { (eval echo configure:5605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 KB |
5605 | rm -rf conftest* |
5606 | gdb_cv_have_struct_link_map32=yes | |
5607 | else | |
5608 | echo "configure: failed program was:" >&5 | |
5609 | cat conftest.$ac_ext >&5 | |
5610 | rm -rf conftest* | |
5611 | gdb_cv_have_struct_link_map32=no | |
5612 | fi | |
5613 | rm -f conftest* | |
5614 | fi | |
5615 | ||
5616 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 | |
5617 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
5618 | cat >> confdefs.h <<\EOF | |
5619 | #define HAVE_STRUCT_LINK_MAP32 1 | |
5620 | EOF | |
5621 | ||
5622 | fi | |
5623 | fi | |
5624 | ||
c906108c | 5625 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
46711df8 | 5626 | echo "configure:5627: checking for main in -lm" >&5 |
c906108c SS |
5627 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
5628 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5630 | else | |
5631 | ac_save_LIBS="$LIBS" | |
5632 | LIBS="-lm $LIBS" | |
5633 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5634 | #line 5635 "configure" |
c906108c SS |
5635 | #include "confdefs.h" |
5636 | ||
5637 | int main() { | |
5638 | main() | |
5639 | ; return 0; } | |
5640 | EOF | |
46711df8 | 5641 | if { (eval echo configure:5642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5642 | rm -rf conftest* |
5643 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5644 | else | |
5645 | echo "configure: failed program was:" >&5 | |
5646 | cat conftest.$ac_ext >&5 | |
5647 | rm -rf conftest* | |
5648 | eval "ac_cv_lib_$ac_lib_var=no" | |
5649 | fi | |
5650 | rm -f conftest* | |
5651 | LIBS="$ac_save_LIBS" | |
5652 | ||
5653 | fi | |
5654 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5655 | echo "$ac_t""yes" 1>&6 | |
5656 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5657 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5658 | cat >> confdefs.h <<EOF | |
5659 | #define $ac_tr_lib 1 | |
5660 | EOF | |
5661 | ||
5662 | LIBS="-lm $LIBS" | |
5663 | ||
5664 | else | |
5665 | echo "$ac_t""no" 1>&6 | |
5666 | fi | |
5667 | ||
5668 | ||
5669 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
46711df8 | 5670 | echo "configure:5671: checking for wctype in -lc" >&5 |
c906108c SS |
5671 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
5672 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5674 | else | |
5675 | ac_save_LIBS="$LIBS" | |
5676 | LIBS="-lc $LIBS" | |
5677 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5678 | #line 5679 "configure" |
c906108c SS |
5679 | #include "confdefs.h" |
5680 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5681 | /* We use char because int might match the return type of a gcc2 | |
5682 | builtin and then its argument prototype would still apply. */ | |
5683 | char wctype(); | |
5684 | ||
5685 | int main() { | |
5686 | wctype() | |
5687 | ; return 0; } | |
5688 | EOF | |
46711df8 | 5689 | if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5690 | rm -rf conftest* |
5691 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5692 | else | |
5693 | echo "configure: failed program was:" >&5 | |
5694 | cat conftest.$ac_ext >&5 | |
5695 | rm -rf conftest* | |
5696 | eval "ac_cv_lib_$ac_lib_var=no" | |
5697 | fi | |
5698 | rm -f conftest* | |
5699 | LIBS="$ac_save_LIBS" | |
5700 | ||
5701 | fi | |
5702 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5703 | echo "$ac_t""yes" 1>&6 | |
5704 | : | |
5705 | else | |
5706 | echo "$ac_t""no" 1>&6 | |
5707 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
46711df8 | 5708 | echo "configure:5709: checking for wctype in -lw" >&5 |
c906108c SS |
5709 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
5710 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5712 | else | |
5713 | ac_save_LIBS="$LIBS" | |
5714 | LIBS="-lw $LIBS" | |
5715 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5716 | #line 5717 "configure" |
c906108c SS |
5717 | #include "confdefs.h" |
5718 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5719 | /* We use char because int might match the return type of a gcc2 | |
5720 | builtin and then its argument prototype would still apply. */ | |
5721 | char wctype(); | |
5722 | ||
5723 | int main() { | |
5724 | wctype() | |
5725 | ; return 0; } | |
5726 | EOF | |
46711df8 | 5727 | if { (eval echo configure:5728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5728 | rm -rf conftest* |
5729 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5730 | else | |
5731 | echo "configure: failed program was:" >&5 | |
5732 | cat conftest.$ac_ext >&5 | |
5733 | rm -rf conftest* | |
5734 | eval "ac_cv_lib_$ac_lib_var=no" | |
5735 | fi | |
5736 | rm -f conftest* | |
5737 | LIBS="$ac_save_LIBS" | |
5738 | ||
5739 | fi | |
5740 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5741 | echo "$ac_t""yes" 1>&6 | |
5742 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
5743 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5744 | cat >> confdefs.h <<EOF | |
5745 | #define $ac_tr_lib 1 | |
5746 | EOF | |
5747 | ||
5748 | LIBS="-lw $LIBS" | |
5749 | ||
5750 | else | |
5751 | echo "$ac_t""no" 1>&6 | |
5752 | fi | |
5753 | ||
5754 | fi | |
5755 | ||
5756 | ||
5757 | ||
5758 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
46711df8 | 5759 | echo "configure:5760: checking for long long support in compiler" >&5 |
c906108c SS |
5760 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
5761 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5762 | else | |
5763 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5764 | #line 5765 "configure" |
c906108c SS |
5765 | #include "confdefs.h" |
5766 | ||
5767 | int main() { | |
5768 | ||
5769 | extern long long foo; | |
5770 | switch (foo & 2) { case 0: return 1; } | |
5771 | ||
5772 | ; return 0; } | |
5773 | EOF | |
46711df8 | 5774 | if { (eval echo configure:5775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5775 | rm -rf conftest* |
5776 | gdb_cv_c_long_long=yes | |
5777 | else | |
5778 | echo "configure: failed program was:" >&5 | |
5779 | cat conftest.$ac_ext >&5 | |
5780 | rm -rf conftest* | |
5781 | gdb_cv_c_long_long=no | |
5782 | fi | |
5783 | rm -f conftest* | |
5784 | fi | |
5785 | ||
5786 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
5787 | if test $gdb_cv_c_long_long = yes; then | |
5788 | cat >> confdefs.h <<\EOF | |
5789 | #define CC_HAS_LONG_LONG 1 | |
5790 | EOF | |
5791 | ||
5792 | fi | |
5793 | ||
5794 | ||
5795 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
46711df8 | 5796 | echo "configure:5797: checking for long long support in printf" >&5 |
c906108c SS |
5797 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
5798 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5799 | else | |
5800 | if test "$cross_compiling" = yes; then | |
5801 | gdb_cv_printf_has_long_long=no | |
5802 | else | |
5803 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5804 | #line 5805 "configure" |
c906108c SS |
5805 | #include "confdefs.h" |
5806 | ||
5807 | int main () { | |
5808 | char buf[32]; | |
5809 | long long l = 0; | |
5810 | l = (l << 16) + 0x0123; | |
5811 | l = (l << 16) + 0x4567; | |
5812 | l = (l << 16) + 0x89ab; | |
5813 | l = (l << 16) + 0xcdef; | |
5814 | sprintf (buf, "0x%016llx", l); | |
5815 | return (strcmp ("0x0123456789abcdef", buf)); | |
5816 | } | |
5817 | EOF | |
46711df8 | 5818 | if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5819 | then |
5820 | gdb_cv_printf_has_long_long=yes | |
5821 | else | |
5822 | echo "configure: failed program was:" >&5 | |
5823 | cat conftest.$ac_ext >&5 | |
5824 | rm -fr conftest* | |
5825 | gdb_cv_printf_has_long_long=no | |
5826 | fi | |
5827 | rm -fr conftest* | |
5828 | fi | |
5829 | ||
5830 | fi | |
5831 | ||
5832 | if test $gdb_cv_printf_has_long_long = yes; then | |
5833 | cat >> confdefs.h <<\EOF | |
5834 | #define PRINTF_HAS_LONG_LONG 1 | |
5835 | EOF | |
5836 | ||
5837 | fi | |
5838 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
5839 | ||
5840 | ||
5841 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
46711df8 | 5842 | echo "configure:5843: checking for long double support in compiler" >&5 |
c906108c SS |
5843 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
5844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5845 | else | |
5846 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5847 | #line 5848 "configure" |
c906108c SS |
5848 | #include "confdefs.h" |
5849 | ||
5850 | int main() { | |
5851 | long double foo; | |
5852 | ; return 0; } | |
5853 | EOF | |
46711df8 | 5854 | if { (eval echo configure:5855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5855 | rm -rf conftest* |
5856 | ac_cv_c_long_double=yes | |
5857 | else | |
5858 | echo "configure: failed program was:" >&5 | |
5859 | cat conftest.$ac_ext >&5 | |
5860 | rm -rf conftest* | |
5861 | ac_cv_c_long_double=no | |
5862 | fi | |
5863 | rm -f conftest* | |
5864 | fi | |
5865 | ||
5866 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
5867 | if test $ac_cv_c_long_double = yes; then | |
5868 | cat >> confdefs.h <<\EOF | |
5869 | #define HAVE_LONG_DOUBLE 1 | |
5870 | EOF | |
5871 | ||
5872 | fi | |
5873 | ||
5874 | ||
5875 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
46711df8 | 5876 | echo "configure:5877: checking for long double support in printf" >&5 |
c906108c SS |
5877 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
5878 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5879 | else | |
5880 | if test "$cross_compiling" = yes; then | |
5881 | gdb_cv_printf_has_long_double=no | |
5882 | else | |
5883 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5884 | #line 5885 "configure" |
c906108c SS |
5885 | #include "confdefs.h" |
5886 | ||
5887 | int main () { | |
5888 | char buf[16]; | |
5889 | long double f = 3.141592653; | |
5890 | sprintf (buf, "%Lg", f); | |
5891 | return (strncmp ("3.14159", buf, 7)); | |
5892 | } | |
5893 | EOF | |
46711df8 | 5894 | if { (eval echo configure:5895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5895 | then |
5896 | gdb_cv_printf_has_long_double=yes | |
5897 | else | |
5898 | echo "configure: failed program was:" >&5 | |
5899 | cat conftest.$ac_ext >&5 | |
5900 | rm -fr conftest* | |
5901 | gdb_cv_printf_has_long_double=no | |
5902 | fi | |
5903 | rm -fr conftest* | |
5904 | fi | |
5905 | ||
5906 | fi | |
5907 | ||
5908 | if test $gdb_cv_printf_has_long_double = yes; then | |
5909 | cat >> confdefs.h <<\EOF | |
5910 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
5911 | EOF | |
5912 | ||
5913 | fi | |
5914 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
5915 | ||
5916 | ||
5917 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
46711df8 | 5918 | echo "configure:5919: checking for long double support in scanf" >&5 |
c906108c SS |
5919 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
5920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5921 | else | |
5922 | if test "$cross_compiling" = yes; then | |
5923 | gdb_cv_scanf_has_long_double=no | |
5924 | else | |
5925 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5926 | #line 5927 "configure" |
c906108c SS |
5927 | #include "confdefs.h" |
5928 | ||
5929 | int main () { | |
5930 | char *buf = "3.141592653"; | |
5931 | long double f = 0; | |
5932 | sscanf (buf, "%Lg", &f); | |
5933 | return !(f > 3.14159 && f < 3.14160); | |
5934 | } | |
5935 | EOF | |
46711df8 | 5936 | if { (eval echo configure:5937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5937 | then |
5938 | gdb_cv_scanf_has_long_double=yes | |
5939 | else | |
5940 | echo "configure: failed program was:" >&5 | |
5941 | cat conftest.$ac_ext >&5 | |
5942 | rm -fr conftest* | |
5943 | gdb_cv_scanf_has_long_double=no | |
5944 | fi | |
5945 | rm -fr conftest* | |
5946 | fi | |
5947 | ||
5948 | fi | |
5949 | ||
5950 | if test $gdb_cv_scanf_has_long_double = yes; then | |
5951 | cat >> confdefs.h <<\EOF | |
5952 | #define SCANF_HAS_LONG_DOUBLE 1 | |
5953 | EOF | |
5954 | ||
5955 | fi | |
5956 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
5957 | ||
5958 | for ac_hdr in unistd.h | |
5959 | do | |
5960 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5961 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
46711df8 | 5962 | echo "configure:5963: checking for $ac_hdr" >&5 |
c906108c SS |
5963 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5964 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5965 | else | |
5966 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 5967 | #line 5968 "configure" |
c906108c SS |
5968 | #include "confdefs.h" |
5969 | #include <$ac_hdr> | |
5970 | EOF | |
5971 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 5972 | { (eval echo configure:5973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5973 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5974 | if test -z "$ac_err"; then | |
5975 | rm -rf conftest* | |
5976 | eval "ac_cv_header_$ac_safe=yes" | |
5977 | else | |
5978 | echo "$ac_err" >&5 | |
5979 | echo "configure: failed program was:" >&5 | |
5980 | cat conftest.$ac_ext >&5 | |
5981 | rm -rf conftest* | |
5982 | eval "ac_cv_header_$ac_safe=no" | |
5983 | fi | |
5984 | rm -f conftest* | |
5985 | fi | |
5986 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5987 | echo "$ac_t""yes" 1>&6 | |
5988 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5989 | cat >> confdefs.h <<EOF | |
5990 | #define $ac_tr_hdr 1 | |
5991 | EOF | |
5992 | ||
5993 | else | |
5994 | echo "$ac_t""no" 1>&6 | |
5995 | fi | |
5996 | done | |
5997 | ||
5998 | for ac_func in getpagesize | |
5999 | do | |
6000 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46711df8 | 6001 | echo "configure:6002: checking for $ac_func" >&5 |
c906108c SS |
6002 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6003 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6004 | else | |
6005 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6006 | #line 6007 "configure" |
c906108c SS |
6007 | #include "confdefs.h" |
6008 | /* System header to define __stub macros and hopefully few prototypes, | |
6009 | which can conflict with char $ac_func(); below. */ | |
6010 | #include <assert.h> | |
6011 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6012 | /* We use char because int might match the return type of a gcc2 | |
6013 | builtin and then its argument prototype would still apply. */ | |
6014 | char $ac_func(); | |
6015 | ||
6016 | int main() { | |
6017 | ||
6018 | /* The GNU C library defines this for functions which it implements | |
6019 | to always fail with ENOSYS. Some functions are actually named | |
6020 | something starting with __ and the normal name is an alias. */ | |
6021 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6022 | choke me | |
6023 | #else | |
6024 | $ac_func(); | |
6025 | #endif | |
6026 | ||
6027 | ; return 0; } | |
6028 | EOF | |
46711df8 | 6029 | if { (eval echo configure:6030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6030 | rm -rf conftest* |
6031 | eval "ac_cv_func_$ac_func=yes" | |
6032 | else | |
6033 | echo "configure: failed program was:" >&5 | |
6034 | cat conftest.$ac_ext >&5 | |
6035 | rm -rf conftest* | |
6036 | eval "ac_cv_func_$ac_func=no" | |
6037 | fi | |
6038 | rm -f conftest* | |
6039 | fi | |
6040 | ||
6041 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6042 | echo "$ac_t""yes" 1>&6 | |
6043 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6044 | cat >> confdefs.h <<EOF | |
6045 | #define $ac_tr_func 1 | |
6046 | EOF | |
6047 | ||
6048 | else | |
6049 | echo "$ac_t""no" 1>&6 | |
6050 | fi | |
6051 | done | |
6052 | ||
6053 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
46711df8 | 6054 | echo "configure:6055: checking for working mmap" >&5 |
c906108c SS |
6055 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6056 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6057 | else | |
6058 | if test "$cross_compiling" = yes; then | |
6059 | ac_cv_func_mmap_fixed_mapped=no | |
6060 | else | |
6061 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6062 | #line 6063 "configure" |
c906108c SS |
6063 | #include "confdefs.h" |
6064 | ||
6065 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6066 | Here is a matrix of mmap possibilities: | |
6067 | mmap private not fixed | |
6068 | mmap private fixed at somewhere currently unmapped | |
6069 | mmap private fixed at somewhere already mapped | |
6070 | mmap shared not fixed | |
6071 | mmap shared fixed at somewhere currently unmapped | |
6072 | mmap shared fixed at somewhere already mapped | |
6073 | For private mappings, we should verify that changes cannot be read() | |
6074 | back from the file, nor mmap's back from the file at a different | |
6075 | address. (There have been systems where private was not correctly | |
6076 | implemented like the infamous i386 svr4.0, and systems where the | |
6077 | VM page cache was not coherent with the filesystem buffer cache | |
6078 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6079 | For shared mappings, we should conversely verify that changes get | |
6080 | propogated back to all the places they're supposed to be. | |
6081 | ||
6082 | Grep wants private fixed already mapped. | |
6083 | The main things grep needs to know about mmap are: | |
6084 | * does it exist and is it safe to write into the mmap'd area | |
6085 | * how to use it (BSD variants) */ | |
6086 | #include <sys/types.h> | |
6087 | #include <fcntl.h> | |
6088 | #include <sys/mman.h> | |
6089 | ||
6090 | /* This mess was copied from the GNU getpagesize.h. */ | |
6091 | #ifndef HAVE_GETPAGESIZE | |
6092 | # ifdef HAVE_UNISTD_H | |
6093 | # include <unistd.h> | |
6094 | # endif | |
6095 | ||
6096 | /* Assume that all systems that can run configure have sys/param.h. */ | |
6097 | # ifndef HAVE_SYS_PARAM_H | |
6098 | # define HAVE_SYS_PARAM_H 1 | |
6099 | # endif | |
6100 | ||
6101 | # ifdef _SC_PAGESIZE | |
6102 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6103 | # else /* no _SC_PAGESIZE */ | |
6104 | # ifdef HAVE_SYS_PARAM_H | |
6105 | # include <sys/param.h> | |
6106 | # ifdef EXEC_PAGESIZE | |
6107 | # define getpagesize() EXEC_PAGESIZE | |
6108 | # else /* no EXEC_PAGESIZE */ | |
6109 | # ifdef NBPG | |
6110 | # define getpagesize() NBPG * CLSIZE | |
6111 | # ifndef CLSIZE | |
6112 | # define CLSIZE 1 | |
6113 | # endif /* no CLSIZE */ | |
6114 | # else /* no NBPG */ | |
6115 | # ifdef NBPC | |
6116 | # define getpagesize() NBPC | |
6117 | # else /* no NBPC */ | |
6118 | # ifdef PAGESIZE | |
6119 | # define getpagesize() PAGESIZE | |
6120 | # endif /* PAGESIZE */ | |
6121 | # endif /* no NBPC */ | |
6122 | # endif /* no NBPG */ | |
6123 | # endif /* no EXEC_PAGESIZE */ | |
6124 | # else /* no HAVE_SYS_PARAM_H */ | |
6125 | # define getpagesize() 8192 /* punt totally */ | |
6126 | # endif /* no HAVE_SYS_PARAM_H */ | |
6127 | # endif /* no _SC_PAGESIZE */ | |
6128 | ||
6129 | #endif /* no HAVE_GETPAGESIZE */ | |
6130 | ||
6131 | #ifdef __cplusplus | |
6132 | extern "C" { void *malloc(unsigned); } | |
6133 | #else | |
6134 | char *malloc(); | |
6135 | #endif | |
6136 | ||
6137 | int | |
6138 | main() | |
6139 | { | |
6140 | char *data, *data2, *data3; | |
6141 | int i, pagesize; | |
6142 | int fd; | |
6143 | ||
6144 | pagesize = getpagesize(); | |
6145 | ||
6146 | /* | |
6147 | * First, make a file with some known garbage in it. | |
6148 | */ | |
6149 | data = malloc(pagesize); | |
6150 | if (!data) | |
6151 | exit(1); | |
6152 | for (i = 0; i < pagesize; ++i) | |
6153 | *(data + i) = rand(); | |
6154 | umask(0); | |
6155 | fd = creat("conftestmmap", 0600); | |
6156 | if (fd < 0) | |
6157 | exit(1); | |
6158 | if (write(fd, data, pagesize) != pagesize) | |
6159 | exit(1); | |
6160 | close(fd); | |
6161 | ||
6162 | /* | |
6163 | * Next, try to mmap the file at a fixed address which | |
6164 | * already has something else allocated at it. If we can, | |
6165 | * also make sure that we see the same garbage. | |
6166 | */ | |
6167 | fd = open("conftestmmap", O_RDWR); | |
6168 | if (fd < 0) | |
6169 | exit(1); | |
6170 | data2 = malloc(2 * pagesize); | |
6171 | if (!data2) | |
6172 | exit(1); | |
6173 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6174 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6175 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6176 | exit(1); | |
6177 | for (i = 0; i < pagesize; ++i) | |
6178 | if (*(data + i) != *(data2 + i)) | |
6179 | exit(1); | |
6180 | ||
6181 | /* | |
6182 | * Finally, make sure that changes to the mapped area | |
6183 | * do not percolate back to the file as seen by read(). | |
6184 | * (This is a bug on some variants of i386 svr4.0.) | |
6185 | */ | |
6186 | for (i = 0; i < pagesize; ++i) | |
6187 | *(data2 + i) = *(data2 + i) + 1; | |
6188 | data3 = malloc(pagesize); | |
6189 | if (!data3) | |
6190 | exit(1); | |
6191 | if (read(fd, data3, pagesize) != pagesize) | |
6192 | exit(1); | |
6193 | for (i = 0; i < pagesize; ++i) | |
6194 | if (*(data + i) != *(data3 + i)) | |
6195 | exit(1); | |
6196 | close(fd); | |
6197 | unlink("conftestmmap"); | |
6198 | exit(0); | |
6199 | } | |
6200 | ||
6201 | EOF | |
46711df8 | 6202 | if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
6203 | then |
6204 | ac_cv_func_mmap_fixed_mapped=yes | |
6205 | else | |
6206 | echo "configure: failed program was:" >&5 | |
6207 | cat conftest.$ac_ext >&5 | |
6208 | rm -fr conftest* | |
6209 | ac_cv_func_mmap_fixed_mapped=no | |
6210 | fi | |
6211 | rm -fr conftest* | |
6212 | fi | |
6213 | ||
6214 | fi | |
6215 | ||
6216 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
6217 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
6218 | cat >> confdefs.h <<\EOF | |
6219 | #define HAVE_MMAP 1 | |
6220 | EOF | |
6221 | ||
6222 | fi | |
6223 | ||
6224 | ||
6225 | ||
6226 | ||
6227 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
6228 | case ${host_os} in | |
6229 | hpux*) | |
6230 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
46711df8 | 6231 | echo "configure:6232: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
6232 | if test -f /usr/include/dce/cma_config.h ; then |
6233 | if test "$GCC" = "yes" ; then | |
6234 | echo "$ac_t""yes" 1>&6 | |
6235 | cat >> confdefs.h <<\EOF | |
6236 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
6237 | EOF | |
6238 | ||
66b965bb | 6239 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
6240 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
6241 | else | |
6242 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
6243 | fi | |
6244 | else | |
6245 | echo "$ac_t""no" 1>&6 | |
6246 | fi | |
6247 | ;; | |
6248 | solaris*) | |
6249 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
46711df8 | 6250 | echo "configure:6251: checking for Solaris thread debugging library" >&5 |
c906108c SS |
6251 | if test -f /usr/lib/libthread_db.so.1 ; then |
6252 | echo "$ac_t""yes" 1>&6 | |
6253 | cat >> confdefs.h <<\EOF | |
6254 | #define HAVE_THREAD_DB_LIB 1 | |
6255 | EOF | |
6256 | ||
66b965bb | 6257 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
6258 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
6259 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
46711df8 | 6260 | echo "configure:6261: checking for dlopen in -ldl" >&5 |
c906108c SS |
6261 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
6262 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6264 | else | |
6265 | ac_save_LIBS="$LIBS" | |
6266 | LIBS="-ldl $LIBS" | |
6267 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6268 | #line 6269 "configure" |
c906108c SS |
6269 | #include "confdefs.h" |
6270 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6271 | /* We use char because int might match the return type of a gcc2 | |
6272 | builtin and then its argument prototype would still apply. */ | |
6273 | char dlopen(); | |
6274 | ||
6275 | int main() { | |
6276 | dlopen() | |
6277 | ; return 0; } | |
6278 | EOF | |
46711df8 | 6279 | if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6280 | rm -rf conftest* |
6281 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6282 | else | |
6283 | echo "configure: failed program was:" >&5 | |
6284 | cat conftest.$ac_ext >&5 | |
6285 | rm -rf conftest* | |
6286 | eval "ac_cv_lib_$ac_lib_var=no" | |
6287 | fi | |
6288 | rm -f conftest* | |
6289 | LIBS="$ac_save_LIBS" | |
6290 | ||
6291 | fi | |
6292 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6293 | echo "$ac_t""yes" 1>&6 | |
6294 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
6295 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
6296 | cat >> confdefs.h <<EOF | |
6297 | #define $ac_tr_lib 1 | |
6298 | EOF | |
6299 | ||
6300 | LIBS="-ldl $LIBS" | |
6301 | ||
6302 | else | |
6303 | echo "$ac_t""no" 1>&6 | |
6304 | fi | |
6305 | ||
6306 | if test "$GCC" = "yes" ; then | |
6307 | # The GNU linker requires the -export-dynamic option to make | |
6308 | # all symbols visible in the dynamic symbol table. | |
6309 | hold_ldflags=$LDFLAGS | |
6310 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
46711df8 | 6311 | echo "configure:6312: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
6312 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
6313 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6314 | #line 6315 "configure" |
c906108c SS |
6315 | #include "confdefs.h" |
6316 | ||
6317 | int main() { | |
6318 | int i; | |
6319 | ; return 0; } | |
6320 | EOF | |
46711df8 | 6321 | if { (eval echo configure:6322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6322 | rm -rf conftest* |
6323 | found=yes | |
6324 | else | |
6325 | echo "configure: failed program was:" >&5 | |
6326 | cat conftest.$ac_ext >&5 | |
6327 | rm -rf conftest* | |
6328 | found=no | |
6329 | fi | |
6330 | rm -f conftest* | |
6331 | LDFLAGS=$hold_ldflags | |
6332 | echo "$ac_t""$found" 1>&6 | |
6333 | if test $found = yes; then | |
6334 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
6335 | fi | |
6336 | fi | |
6337 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
6338 | # at one point. | |
6339 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
46711df8 | 6340 | echo "configure:6341: checking if <proc_service.h> is old" >&5 |
c906108c SS |
6341 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
6342 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6343 | else | |
6344 | ||
6345 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6346 | #line 6347 "configure" |
c906108c SS |
6347 | #include "confdefs.h" |
6348 | ||
6349 | #include <proc_service.h> | |
6350 | ps_err_e ps_pdwrite | |
6351 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
6352 | ||
6353 | int main() { | |
6354 | ||
6355 | ; return 0; } | |
6356 | EOF | |
46711df8 | 6357 | if { (eval echo configure:6358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
6358 | rm -rf conftest* |
6359 | gdb_cv_proc_service_is_old=no | |
6360 | else | |
6361 | echo "configure: failed program was:" >&5 | |
6362 | cat conftest.$ac_ext >&5 | |
6363 | rm -rf conftest* | |
6364 | gdb_cv_proc_service_is_old=yes | |
6365 | fi | |
6366 | rm -f conftest* | |
6367 | ||
6368 | fi | |
6369 | ||
6370 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
6371 | if test $gdb_cv_proc_service_is_old = yes; then | |
6372 | cat >> confdefs.h <<\EOF | |
6373 | #define PROC_SERVICE_IS_OLD 1 | |
6374 | EOF | |
6375 | ||
6376 | fi | |
6377 | else | |
6378 | echo "$ac_t""no" 1>&6 | |
6379 | fi | |
6380 | ;; | |
6381 | esac | |
6382 | ||
6383 | fi | |
6384 | ||
fb40c209 | 6385 | |
d318976c FN |
6386 | # Check whether --enable-gdbcli or --disable-gdbcli was given. |
6387 | if test "${enable_gdbcli+set}" = set; then | |
6388 | enableval="$enable_gdbcli" | |
6389 | ||
6bad8db2 FN |
6390 | case "${enableval}" in |
6391 | yes) enable_gdbcli=yes ;; | |
6392 | "") enable_gdbcli=yes ;; | |
d318976c FN |
6393 | no) |
6394 | { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; } | |
6395 | ;; | |
6396 | *) | |
6bad8db2 | 6397 | { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; } |
d318976c FN |
6398 | ;; |
6399 | esac | |
6400 | ||
6401 | else | |
6402 | enable_gdbcli=yes | |
6403 | fi | |
6404 | ||
6405 | case ${enable_gdbcli} in | |
6406 | "yes" ) | |
6bad8db2 | 6407 | if test -d "${srcdir}/cli" ; then |
d318976c FN |
6408 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)" |
6409 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)" | |
486697a0 | 6410 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)" |
d318976c FN |
6411 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)" |
6412 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)" | |
6413 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)" | |
6414 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)" | |
6415 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)" | |
6416 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)" | |
6417 | fi | |
6418 | ;; | |
6419 | esac | |
6420 | ||
6421 | ||
fb40c209 AC |
6422 | # Check whether --enable-gdbmi or --disable-gdbmi was given. |
6423 | if test "${enable_gdbmi+set}" = set; then | |
6424 | enableval="$enable_gdbmi" | |
6425 | ||
6426 | case "${enable_gdbmi}" in | |
6427 | yes | no) ;; | |
6428 | "") enable_gdbmi=yes ;; | |
6429 | *) | |
6430 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
6431 | ;; | |
6432 | esac | |
6433 | ||
b0e2e90a AC |
6434 | else |
6435 | enable_gdbmi=yes | |
fb40c209 AC |
6436 | fi |
6437 | ||
6438 | case ${enable_gdbmi} in | |
6439 | "yes" ) | |
6440 | if test -d "${srcdir}/mi" ; then | |
6441 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
6442 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
486697a0 | 6443 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)" |
fb40c209 | 6444 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" |
b0b1b869 | 6445 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
6446 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
6447 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
6448 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
6449 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
6450 | fi |
6451 | ;; | |
6452 | esac | |
c906108c | 6453 | |
b4df4f68 FN |
6454 | # Configure UI_OUT by default (before 5.2 it can be disabled) |
6455 | # It must be configured if gdbmi is configured | |
6456 | ||
6457 | UIOUT_CFLAGS= | |
6458 | ||
6459 | ||
6460 | # Check whether --with-uiout or --without-uiout was given. | |
6461 | if test "${with_uiout+set}" = set; then | |
6462 | withval="$with_uiout" | |
6463 | case "${withval}" in | |
6464 | yes) want_uiout=true ;; | |
6465 | no) if test $enable_gdbmi = yes; then | |
6466 | { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; } | |
6467 | else | |
6468 | want_uiout=false | |
6469 | fi ;; | |
6470 | *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;; | |
6471 | esac | |
6472 | else | |
6473 | want_uiout=true | |
6474 | fi | |
6475 | ||
6476 | if test $want_uiout = true; then | |
6477 | UIOUT_CFLAGS="-DUI_OUT=1" | |
6478 | fi | |
6479 | ||
c906108c SS |
6480 | # Check whether --enable-tui or --disable-tui was given. |
6481 | if test "${enable_tui+set}" = set; then | |
6482 | enableval="$enable_tui" | |
6483 | ||
6484 | case "${enable_tui}" in | |
6485 | yes | no) ;; | |
6486 | "") enable_tui=yes ;; | |
6487 | *) | |
6488 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
6489 | ;; | |
6490 | esac | |
6491 | ||
6492 | fi | |
6493 | ||
6494 | case ${enable_tui} in | |
6495 | "yes" ) | |
ed952ac5 AC |
6496 | if test -d "${srcdir}/tui" ; then |
6497 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
6498 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
486697a0 | 6499 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)" |
ed952ac5 AC |
6500 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" |
6501 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
6502 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
6503 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
6504 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
6505 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
6506 | fi | |
6507 | ;; | |
c906108c SS |
6508 | esac |
6509 | ||
c906108c SS |
6510 | # Check whether --enable-netrom or --disable-netrom was given. |
6511 | if test "${enable_netrom+set}" = set; then | |
6512 | enableval="$enable_netrom" | |
6513 | case "${enableval}" in | |
6514 | yes) enable_netrom=yes ;; | |
6515 | no) enable_netrom=no ;; | |
6516 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
6517 | esac | |
6518 | fi | |
6519 | ||
6520 | ||
6521 | if test "${enable_netrom}" = "yes"; then | |
66b965bb | 6522 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" |
c906108c SS |
6523 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" |
6524 | fi | |
6525 | ||
1decb323 | 6526 | |
3b851bce AC |
6527 | # NOTE: Don't add -Wall or -Wunused, they both include |
6528 | # -Wunused-parameter which reports bogus warnings. | |
6529 | # NOTE: If you add to this list, remember to update | |
6530 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 6531 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 6532 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
6533 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
6534 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 6535 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
6536 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
6537 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
6538 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
6539 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
6540 | if test "${enable_build_warnings+set}" = set; then | |
6541 | enableval="$enable_build_warnings" | |
1decb323 | 6542 | case "${enableval}" in |
c906108c SS |
6543 | yes) ;; |
6544 | no) build_warnings="-w";; | |
6545 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6546 | build_warnings="${build_warnings} ${t}";; | |
6547 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6548 | build_warnings="${t} ${build_warnings}";; | |
6549 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
6550 | esac | |
d4f3574e | 6551 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 6552 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 6553 | fi |
1decb323 | 6554 | fi |
3b851bce AC |
6555 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
6556 | if test "${enable_gdb_build_warnings+set}" = set; then | |
6557 | enableval="$enable_gdb_build_warnings" | |
6558 | case "${enableval}" in | |
6559 | yes) ;; | |
6560 | no) build_warnings="-w";; | |
6561 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6562 | build_warnings="${build_warnings} ${t}";; | |
6563 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
6564 | build_warnings="${t} ${build_warnings}";; | |
6565 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
6566 | esac | |
6567 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
6568 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
6569 | fi | |
6570 | fi | |
104c1213 JM |
6571 | WARN_CFLAGS="" |
6572 | WERROR_CFLAGS="" | |
c906108c SS |
6573 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
6574 | then | |
746a987d | 6575 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
46711df8 | 6576 | echo "configure:6577: checking compiler warning flags" >&5 |
746a987d AC |
6577 | # Separate out the -Werror flag as some files just cannot be |
6578 | # compiled with it enabled. | |
6579 | for w in ${build_warnings}; do | |
6580 | case $w in | |
6581 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
6582 | *) # Check that GCC accepts it | |
6583 | if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then | |
6584 | : | |
6585 | else | |
6586 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
6587 | fi | |
6588 | esac | |
6589 | done | |
6590 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
6591 | fi |
6592 | ||
6593 | ||
104c1213 | 6594 | |
c906108c SS |
6595 | MMALLOC_CFLAGS= |
6596 | MMALLOC= | |
6597 | ||
6598 | ||
6599 | ||
6600 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
6601 | if test "${with_mmalloc+set}" = set; then | |
6602 | withval="$with_mmalloc" | |
6603 | case "${withval}" in | |
6604 | yes) want_mmalloc=true ;; | |
6605 | no) want_mmalloc=false;; | |
6606 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
6607 | esac | |
6608 | else | |
6609 | want_mmalloc=false | |
6610 | fi | |
6611 | ||
6612 | if test x$want_mmalloc = xtrue; then | |
6613 | cat >> confdefs.h <<\EOF | |
6614 | #define USE_MMALLOC 1 | |
6615 | EOF | |
6616 | ||
6617 | cat >> confdefs.h <<\EOF | |
6618 | #define MMCHECK_FORCE 1 | |
6619 | EOF | |
6620 | ||
6621 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
6622 | MMALLOC='../mmalloc/libmmalloc.a' | |
6623 | fi | |
6624 | ||
88987551 L |
6625 | # Check whether --with-included-regex or --without-included-regex was given. |
6626 | if test "${with_included_regex+set}" = set; then | |
6627 | withval="$with_included_regex" | |
6628 | case "${withval}" in | |
6629 | yes) want_included_regex=true ;; | |
6630 | no) want_included_regex=false;; | |
6631 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
6632 | esac | |
6633 | else | |
6634 | want_included_regex=true | |
6635 | fi | |
6636 | ||
88987551 L |
6637 | if test $want_included_regex = false; then |
6638 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
46711df8 | 6639 | echo "configure:6640: checking for GNU regex" >&5 |
88987551 L |
6640 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6641 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6642 | else | |
6643 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6644 | #line 6645 "configure" |
88987551 L |
6645 | #include "confdefs.h" |
6646 | #include <gnu-versions.h> | |
6647 | #include <sys/types.h> | |
6648 | #include <regex.h> | |
6649 | int main() { | |
6650 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
6651 | #error No valid GNU regex. | |
6652 | #endif | |
6653 | ||
6654 | ; return 0; } | |
6655 | EOF | |
46711df8 | 6656 | if { (eval echo configure:6657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
6657 | rm -rf conftest* |
6658 | gdb_cv_have_gnu_regex=yes | |
6659 | else | |
6660 | echo "configure: failed program was:" >&5 | |
6661 | cat conftest.$ac_ext >&5 | |
6662 | rm -rf conftest* | |
6663 | gdb_cv_have_gnu_regex=no | |
6664 | fi | |
6665 | rm -f conftest* | |
6666 | fi | |
6667 | ||
6668 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
6669 | if test $gdb_cv_have_gnu_regex = no; then |
6670 | want_included_regex=true | |
88987551 L |
6671 | fi |
6672 | fi | |
6673 | ||
e48f66e4 AC |
6674 | if test x${want_included_regex} = xtrue; then |
6675 | REGEX="gnu-regex.o" | |
6676 | cat >> confdefs.h <<\EOF | |
6677 | #define USE_INCLUDED_REGEX 1 | |
6678 | EOF | |
6679 | ||
6680 | fi | |
88987551 | 6681 | |
7a292a7a SS |
6682 | |
6683 | # In the Cygwin environment, we need some additional flags. | |
6684 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
46711df8 | 6685 | echo "configure:6686: checking for cygwin" >&5 |
7a292a7a SS |
6686 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
6687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6688 | else | |
6689 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6690 | #line 6691 "configure" |
7a292a7a SS |
6691 | #include "confdefs.h" |
6692 | ||
6693 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
6694 | lose | |
6695 | #endif | |
6696 | EOF | |
6697 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6698 | egrep "lose" >/dev/null 2>&1; then | |
6699 | rm -rf conftest* | |
6700 | gdb_cv_os_cygwin=yes | |
6701 | else | |
6702 | rm -rf conftest* | |
6703 | gdb_cv_os_cygwin=no | |
6704 | fi | |
6705 | rm -f conftest* | |
6706 | ||
6707 | fi | |
6708 | ||
6709 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
6710 | ||
aff38e61 AC |
6711 | |
6712 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
6713 | case ${host} in | |
95cbc983 AC |
6714 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
6715 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
6716 | esac |
6717 | ||
6718 | ||
6719 | ||
b83266a0 SS |
6720 | if test x$gdb_host = xgo32; then |
6721 | TERM_LIB= | |
6722 | else | |
c906108c SS |
6723 | if test x$gdb_cv_os_cygwin = xyes; then |
6724 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
6725 | else | |
6726 | TERM_LIB= | |
6727 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
46711df8 | 6728 | echo "configure:6729: checking for tgetent in -lncurses" >&5 |
c906108c SS |
6729 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
6730 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6731 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6732 | else | |
6733 | ac_save_LIBS="$LIBS" | |
6734 | LIBS="-lncurses $LIBS" | |
6735 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6736 | #line 6737 "configure" |
c906108c SS |
6737 | #include "confdefs.h" |
6738 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6739 | /* We use char because int might match the return type of a gcc2 | |
6740 | builtin and then its argument prototype would still apply. */ | |
6741 | char tgetent(); | |
6742 | ||
6743 | int main() { | |
6744 | tgetent() | |
6745 | ; return 0; } | |
6746 | EOF | |
46711df8 | 6747 | if { (eval echo configure:6748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6748 | rm -rf conftest* |
6749 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6750 | else | |
6751 | echo "configure: failed program was:" >&5 | |
6752 | cat conftest.$ac_ext >&5 | |
6753 | rm -rf conftest* | |
6754 | eval "ac_cv_lib_$ac_lib_var=no" | |
6755 | fi | |
6756 | rm -f conftest* | |
6757 | LIBS="$ac_save_LIBS" | |
6758 | ||
6759 | fi | |
6760 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6761 | echo "$ac_t""yes" 1>&6 | |
6762 | TERM_LIB=-lncurses | |
6763 | else | |
6764 | echo "$ac_t""no" 1>&6 | |
6765 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
46711df8 | 6766 | echo "configure:6767: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
6767 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
6768 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6769 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6770 | else | |
6771 | ac_save_LIBS="$LIBS" | |
6772 | LIBS="-lHcurses $LIBS" | |
6773 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6774 | #line 6775 "configure" |
c906108c SS |
6775 | #include "confdefs.h" |
6776 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6777 | /* We use char because int might match the return type of a gcc2 | |
6778 | builtin and then its argument prototype would still apply. */ | |
6779 | char tgetent(); | |
6780 | ||
6781 | int main() { | |
6782 | tgetent() | |
6783 | ; return 0; } | |
6784 | EOF | |
46711df8 | 6785 | if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6786 | rm -rf conftest* |
6787 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6788 | else | |
6789 | echo "configure: failed program was:" >&5 | |
6790 | cat conftest.$ac_ext >&5 | |
6791 | rm -rf conftest* | |
6792 | eval "ac_cv_lib_$ac_lib_var=no" | |
6793 | fi | |
6794 | rm -f conftest* | |
6795 | LIBS="$ac_save_LIBS" | |
6796 | ||
6797 | fi | |
6798 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6799 | echo "$ac_t""yes" 1>&6 | |
6800 | TERM_LIB=-lHcurses | |
6801 | else | |
6802 | echo "$ac_t""no" 1>&6 | |
6803 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
46711df8 | 6804 | echo "configure:6805: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
6805 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
6806 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6807 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6808 | else | |
6809 | ac_save_LIBS="$LIBS" | |
6810 | LIBS="-ltermlib $LIBS" | |
6811 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6812 | #line 6813 "configure" |
c906108c SS |
6813 | #include "confdefs.h" |
6814 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6815 | /* We use char because int might match the return type of a gcc2 | |
6816 | builtin and then its argument prototype would still apply. */ | |
6817 | char tgetent(); | |
6818 | ||
6819 | int main() { | |
6820 | tgetent() | |
6821 | ; return 0; } | |
6822 | EOF | |
46711df8 | 6823 | if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6824 | rm -rf conftest* |
6825 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6826 | else | |
6827 | echo "configure: failed program was:" >&5 | |
6828 | cat conftest.$ac_ext >&5 | |
6829 | rm -rf conftest* | |
6830 | eval "ac_cv_lib_$ac_lib_var=no" | |
6831 | fi | |
6832 | rm -f conftest* | |
6833 | LIBS="$ac_save_LIBS" | |
6834 | ||
6835 | fi | |
6836 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6837 | echo "$ac_t""yes" 1>&6 | |
6838 | TERM_LIB=-ltermlib | |
6839 | else | |
6840 | echo "$ac_t""no" 1>&6 | |
6841 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
46711df8 | 6842 | echo "configure:6843: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
6843 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
6844 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6845 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6846 | else | |
6847 | ac_save_LIBS="$LIBS" | |
6848 | LIBS="-ltermcap $LIBS" | |
6849 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6850 | #line 6851 "configure" |
c906108c SS |
6851 | #include "confdefs.h" |
6852 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6853 | /* We use char because int might match the return type of a gcc2 | |
6854 | builtin and then its argument prototype would still apply. */ | |
6855 | char tgetent(); | |
6856 | ||
6857 | int main() { | |
6858 | tgetent() | |
6859 | ; return 0; } | |
6860 | EOF | |
46711df8 | 6861 | if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6862 | rm -rf conftest* |
6863 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6864 | else | |
6865 | echo "configure: failed program was:" >&5 | |
6866 | cat conftest.$ac_ext >&5 | |
6867 | rm -rf conftest* | |
6868 | eval "ac_cv_lib_$ac_lib_var=no" | |
6869 | fi | |
6870 | rm -f conftest* | |
6871 | LIBS="$ac_save_LIBS" | |
6872 | ||
6873 | fi | |
6874 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6875 | echo "$ac_t""yes" 1>&6 | |
6876 | TERM_LIB=-ltermcap | |
6877 | else | |
6878 | echo "$ac_t""no" 1>&6 | |
6879 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
46711df8 | 6880 | echo "configure:6881: checking for tgetent in -lcurses" >&5 |
c906108c SS |
6881 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
6882 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6883 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6884 | else | |
6885 | ac_save_LIBS="$LIBS" | |
6886 | LIBS="-lcurses $LIBS" | |
6887 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6888 | #line 6889 "configure" |
c906108c SS |
6889 | #include "confdefs.h" |
6890 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6891 | /* We use char because int might match the return type of a gcc2 | |
6892 | builtin and then its argument prototype would still apply. */ | |
6893 | char tgetent(); | |
6894 | ||
6895 | int main() { | |
6896 | tgetent() | |
6897 | ; return 0; } | |
6898 | EOF | |
46711df8 | 6899 | if { (eval echo configure:6900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6900 | rm -rf conftest* |
6901 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6902 | else | |
6903 | echo "configure: failed program was:" >&5 | |
6904 | cat conftest.$ac_ext >&5 | |
6905 | rm -rf conftest* | |
6906 | eval "ac_cv_lib_$ac_lib_var=no" | |
6907 | fi | |
6908 | rm -f conftest* | |
6909 | LIBS="$ac_save_LIBS" | |
6910 | ||
6911 | fi | |
6912 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6913 | echo "$ac_t""yes" 1>&6 | |
6914 | TERM_LIB=-lcurses | |
6915 | else | |
6916 | echo "$ac_t""no" 1>&6 | |
6917 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
46711df8 | 6918 | echo "configure:6919: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
6919 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
6920 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6921 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6922 | else | |
6923 | ac_save_LIBS="$LIBS" | |
6924 | LIBS="-lterminfo $LIBS" | |
6925 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 6926 | #line 6927 "configure" |
c906108c SS |
6927 | #include "confdefs.h" |
6928 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6929 | /* We use char because int might match the return type of a gcc2 | |
6930 | builtin and then its argument prototype would still apply. */ | |
6931 | char tgetent(); | |
6932 | ||
6933 | int main() { | |
6934 | tgetent() | |
6935 | ; return 0; } | |
6936 | EOF | |
46711df8 | 6937 | if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6938 | rm -rf conftest* |
6939 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6940 | else | |
6941 | echo "configure: failed program was:" >&5 | |
6942 | cat conftest.$ac_ext >&5 | |
6943 | rm -rf conftest* | |
6944 | eval "ac_cv_lib_$ac_lib_var=no" | |
6945 | fi | |
6946 | rm -f conftest* | |
6947 | LIBS="$ac_save_LIBS" | |
6948 | ||
6949 | fi | |
6950 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6951 | echo "$ac_t""yes" 1>&6 | |
6952 | TERM_LIB=-lterminfo | |
6953 | else | |
6954 | echo "$ac_t""no" 1>&6 | |
6955 | fi | |
6956 | ||
6957 | fi | |
6958 | ||
6959 | fi | |
6960 | ||
6961 | fi | |
6962 | ||
6963 | fi | |
6964 | ||
6965 | fi | |
6966 | ||
6967 | ||
6968 | if test "x$TERM_LIB" = x | |
6969 | then | |
6970 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
6971 | fi | |
6972 | fi | |
b83266a0 | 6973 | fi |
c906108c SS |
6974 | |
6975 | ||
cd0fc7c3 SS |
6976 | # libreadline needs libuser32.a in a cygwin environment |
6977 | WIN32LIBS= | |
6978 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
6979 | WIN32LIBS="-luser32" |
6980 | case "${target}" in | |
6981 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
6982 | ;; | |
6983 | esac | |
cd0fc7c3 | 6984 | fi |
c906108c | 6985 | |
7a292a7a | 6986 | |
3fc11d3e JM |
6987 | LIBGUI="../libgui/src/libgui.a" |
6988 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
6989 | ||
6990 | ||
7a292a7a | 6991 | |
8b93c638 JM |
6992 | # Check whether --with-cpu or --without-cpu was given. |
6993 | if test "${with_cpu+set}" = set; then | |
6994 | withval="$with_cpu" | |
6995 | case "${target}" in | |
6996 | powerpc-* | powerpcle-* ) | |
6997 | ## It would be nice to keep this table in sync with the one in | |
6998 | ## gcc/configure. | |
6999 | case "${with_cpu}" in | |
7000 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
7001 | | 604 | 750 ) | |
7002 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
7003 | ;; | |
7004 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
7005 | ## These are all RS6000 variants, as far as GDB is concerned. | |
7006 | with_cpu=rs6000 | |
7007 | ;; | |
7008 | 603e | ec603e ) | |
7009 | with_cpu=603 | |
7010 | ;; | |
7011 | 604e ) | |
7012 | with_cpu=604 | |
7013 | ;; | |
7014 | * ) | |
7015 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
7016 | with_cpu=ppc-uisa | |
7017 | ;; | |
7018 | esac | |
7019 | ;; | |
7020 | * ) | |
7021 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
7022 | ;; | |
7023 | esac | |
7024 | cat >> confdefs.h <<EOF | |
7025 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
7026 | EOF | |
7027 | ||
7028 | ||
7029 | fi | |
7030 | ||
7031 | ||
7032 | ||
3fc11d3e JM |
7033 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
7034 | if test "${enable_gdbtk+set}" = set; then | |
7035 | enableval="$enable_gdbtk" | |
7036 | case "${enableval}" in | |
7037 | yes) | |
7038 | case "$host" in | |
7039 | *go32*) | |
7040 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
7041 | enable_gdbtk=no ;; | |
7042 | *windows*) | |
7043 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
7044 | enable_gdbtk=no ;; | |
7045 | *) | |
7046 | enable_gdbtk=yes ;; | |
7047 | esac ;; | |
7048 | no) | |
7049 | enable_gdbtk=no ;; | |
7050 | *) | |
7051 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
7052 | esac | |
7053 | else | |
7054 | ||
7055 | # Default is on for everything but go32 and Cygwin | |
7056 | case "$host" in | |
7057 | *go32* | *windows*) | |
7058 | ;; | |
7059 | *) | |
379d6434 AC |
7060 | if test -d "${srcdir}/gdbtk" ; then |
7061 | enable_gdbtk=yes | |
7062 | fi | |
7063 | ;; | |
7064 | esac | |
3fc11d3e JM |
7065 | |
7066 | fi | |
7067 | ||
7068 | ||
7069 | WIN32LDAPP= | |
7070 | ||
7071 | ||
7072 | ||
7073 | configdir="unix" | |
7074 | ||
7075 | GDBTKLIBS= | |
7076 | if test "${enable_gdbtk}" = "yes"; then | |
7077 | ||
d1c3b63a KS |
7078 | # Gdbtk must have an absolute path to srcdir in order to run |
7079 | # properly when not installed. | |
7080 | here=`pwd` | |
7081 | cd ${srcdir} | |
7082 | GDBTK_SRC_DIR=`pwd` | |
7083 | cd $here | |
7084 | ||
3fc11d3e JM |
7085 | |
7086 | # | |
7087 | # Ok, lets find the tcl configuration | |
7088 | # First, look for one uninstalled. | |
7089 | # the alternative search directory is invoked by --with-tclconfig | |
7090 | # | |
7091 | ||
7092 | if test x"${no_tcl}" = x ; then | |
7093 | # we reset no_tcl in case something fails here | |
7094 | no_tcl=true | |
7095 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
7096 | if test "${with_tclconfig+set}" = set; then | |
7097 | withval="$with_tclconfig" | |
7098 | with_tclconfig=${withval} | |
7099 | fi | |
7100 | ||
7101 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
46711df8 | 7102 | echo "configure:7103: checking for Tcl configuration" >&5 |
3fc11d3e JM |
7103 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
7104 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7105 | else | |
7106 | ||
7107 | ||
7108 | # First check to see if --with-tclconfig was specified. | |
7109 | if test x"${with_tclconfig}" != x ; then | |
7110 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
7111 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
7112 | else | |
7113 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
7114 | fi | |
7115 | fi | |
7116 | ||
7117 | # then check for a private Tcl installation | |
7118 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7119 | for i in \ | |
7120 | ../tcl \ | |
7121 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
7122 | ../../tcl \ | |
7123 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
7124 | ../../../tcl \ | |
7125 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
7126 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
7127 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
7128 | break | |
7129 | fi | |
7130 | done | |
7131 | fi | |
7132 | # check in a few common install locations | |
7133 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7134 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7135 | if test -f "$i/tclConfig.sh" ; then | |
7136 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
7137 | break | |
7138 | fi | |
7139 | done | |
7140 | fi | |
7141 | # check in a few other private locations | |
7142 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7143 | for i in \ | |
7144 | ${srcdir}/../tcl \ | |
7145 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
7146 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
7147 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
7148 | break | |
7149 | fi | |
7150 | done | |
7151 | fi | |
7152 | ||
7153 | fi | |
7154 | ||
7155 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7156 | TCLCONFIG="# no Tcl configs found" | |
7157 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
7158 | else | |
7159 | no_tcl= | |
7160 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
7161 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
7162 | fi | |
7163 | fi | |
7164 | ||
7165 | if test -z "${no_tcl}"; then | |
7166 | ||
7167 | . $TCLCONFIG | |
7168 | ||
7169 | ||
7170 | ||
7171 | ||
7172 | ||
7173 | ||
7174 | ||
7175 | ||
7176 | ||
7177 | ||
7178 | ||
7179 | ||
7180 | ||
7181 | ||
7182 | ||
7183 | ||
7184 | ||
7185 | ||
7186 | ||
7187 | ||
7188 | ||
7189 | ||
7190 | ||
7191 | ||
7192 | ||
7193 | ||
7194 | # | |
7195 | # Ok, lets find the tk configuration | |
7196 | # First, look for one uninstalled. | |
7197 | # the alternative search directory is invoked by --with-tkconfig | |
7198 | # | |
7199 | ||
7200 | if test x"${no_tk}" = x ; then | |
7201 | # we reset no_tk in case something fails here | |
7202 | no_tk=true | |
7203 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
7204 | if test "${with_tkconfig+set}" = set; then | |
7205 | withval="$with_tkconfig" | |
7206 | with_tkconfig=${withval} | |
7207 | fi | |
7208 | ||
7209 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
46711df8 | 7210 | echo "configure:7211: checking for Tk configuration" >&5 |
3fc11d3e JM |
7211 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
7212 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7213 | else | |
7214 | ||
7215 | ||
7216 | # First check to see if --with-tkconfig was specified. | |
7217 | if test x"${with_tkconfig}" != x ; then | |
7218 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
7219 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
7220 | else | |
7221 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
7222 | fi | |
7223 | fi | |
7224 | ||
7225 | # then check for a private Tk library | |
7226 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7227 | for i in \ | |
7228 | ../tk \ | |
7229 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
7230 | ../../tk \ | |
7231 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
7232 | ../../../tk \ | |
7233 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
7234 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
7235 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
7236 | break | |
7237 | fi | |
7238 | done | |
7239 | fi | |
7240 | # check in a few common install locations | |
7241 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7242 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7243 | if test -f "$i/tkConfig.sh" ; then | |
7244 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
7245 | break | |
7246 | fi | |
7247 | done | |
7248 | fi | |
7249 | # check in a few other private locations | |
7250 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7251 | for i in \ | |
7252 | ${srcdir}/../tk \ | |
7253 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
7254 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
7255 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
7256 | break | |
7257 | fi | |
7258 | done | |
7259 | fi | |
7260 | ||
7261 | fi | |
7262 | ||
7263 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7264 | TKCONFIG="# no Tk configs found" | |
7265 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
7266 | else | |
7267 | no_tk= | |
7268 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
7269 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
7270 | fi | |
7271 | fi | |
7272 | ||
7273 | ||
7274 | ||
dd2504ab JM |
7275 | # now look for Tcl library stuff |
7276 | ||
7277 | case "${host}" in | |
7278 | *-*-cygwin*) | |
7279 | tcldir=../tcl/win/ | |
7280 | ;; | |
7281 | *) | |
7282 | tcldir=../tcl/unix/ | |
7283 | ;; | |
7284 | esac | |
7285 | ||
7286 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
7287 | ||
3fc11d3e JM |
7288 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
7289 | # point to doing Tcl. | |
7290 | if test -z "${no_tk}"; then | |
7291 | ||
7292 | if test -f "$TKCONFIG" ; then | |
7293 | . $TKCONFIG | |
7294 | fi | |
7295 | ||
7296 | ||
7297 | ||
7298 | ||
7299 | ||
7300 | ||
7301 | ||
7302 | ||
7303 | ||
7304 | ||
7305 | ||
7306 | ||
7307 | ||
7308 | ||
7309 | # | |
7310 | # Ok, lets find the tcl source trees so we can use the headers | |
7311 | # Warning: transition of version 9 to 10 will break this algorithm | |
7312 | # because 10 sorts before 9. We also look for just tcl. We have to | |
7313 | # be careful that we don't match stuff like tclX by accident. | |
7314 | # the alternative search directory is involked by --with-tclinclude | |
7315 | # | |
7316 | ||
7317 | no_tcl=true | |
7318 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
46711df8 | 7319 | echo "configure:7320: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
7320 | # Check whether --with-tclinclude or --without-tclinclude was given. |
7321 | if test "${with_tclinclude+set}" = set; then | |
7322 | withval="$with_tclinclude" | |
7323 | with_tclinclude=${withval} | |
7324 | fi | |
7325 | ||
7326 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
7327 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7328 | else | |
7329 | ||
7330 | # first check to see if --with-tclinclude was specified | |
7331 | if test x"${with_tclinclude}" != x ; then | |
7332 | if test -f ${with_tclinclude}/tclInt.h ; then | |
7333 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
7334 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
7335 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
7336 | else | |
7337 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
7338 | fi | |
7339 | fi | |
7340 | ||
7341 | # next check if it came with Tcl configuration file | |
7342 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
7343 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
7344 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
7345 | fi | |
7346 | fi | |
7347 | ||
7348 | # next check in private source directory | |
7349 | # | |
7350 | # since ls returns lowest version numbers first, reverse its output | |
7351 | if test x"${ac_cv_c_tclh}" = x ; then | |
7352 | for i in \ | |
7353 | ${srcdir}/../tcl \ | |
7354 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
7355 | ${srcdir}/../../tcl \ | |
7356 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
7357 | ${srcdir}/../../../tcl \ | |
7358 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
7359 | if test -f $i/generic/tclInt.h ; then | |
7360 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
7361 | break | |
7362 | fi | |
7363 | done | |
7364 | fi | |
7365 | # finally check in a few common install locations | |
7366 | # | |
7367 | # since ls returns lowest version numbers first, reverse its output | |
7368 | if test x"${ac_cv_c_tclh}" = x ; then | |
7369 | for i in \ | |
7370 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
7371 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
7372 | /usr/local/src/tcl \ | |
7373 | /usr/local/lib/tcl \ | |
7374 | ${prefix}/include ; do | |
7375 | if test -f $i/generic/tclInt.h ; then | |
7376 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
7377 | break | |
7378 | fi | |
7379 | done | |
7380 | fi | |
7381 | # see if one is installed | |
7382 | if test x"${ac_cv_c_tclh}" = x ; then | |
7383 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
7384 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
46711df8 | 7385 | echo "configure:7386: checking for tclInt.h" >&5 |
3fc11d3e JM |
7386 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
7387 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7388 | else | |
7389 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 7390 | #line 7391 "configure" |
3fc11d3e JM |
7391 | #include "confdefs.h" |
7392 | #include <tclInt.h> | |
7393 | EOF | |
7394 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 7395 | { (eval echo configure:7396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
7396 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7397 | if test -z "$ac_err"; then | |
7398 | rm -rf conftest* | |
7399 | eval "ac_cv_header_$ac_safe=yes" | |
7400 | else | |
7401 | echo "$ac_err" >&5 | |
7402 | echo "configure: failed program was:" >&5 | |
7403 | cat conftest.$ac_ext >&5 | |
7404 | rm -rf conftest* | |
7405 | eval "ac_cv_header_$ac_safe=no" | |
7406 | fi | |
7407 | rm -f conftest* | |
7408 | fi | |
7409 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
7410 | echo "$ac_t""yes" 1>&6 | |
7411 | ac_cv_c_tclh=installed | |
7412 | else | |
7413 | echo "$ac_t""no" 1>&6 | |
7414 | ac_cv_c_tclh="" | |
7415 | fi | |
7416 | ||
7417 | fi | |
7418 | ||
7419 | fi | |
7420 | ||
7421 | if test x"${ac_cv_c_tclh}" = x ; then | |
7422 | TCLHDIR="# no Tcl private headers found" | |
7423 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
7424 | fi | |
7425 | if test x"${ac_cv_c_tclh}" != x ; then | |
7426 | no_tcl="" | |
7427 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
7428 | echo "$ac_t""is installed" 1>&6 | |
7429 | TCLHDIR="" | |
7430 | else | |
7431 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
7432 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
7433 | TCLHDIR="-I${ac_cv_c_tclh}" | |
7434 | fi | |
7435 | fi | |
7436 | ||
7437 | ||
7438 | ||
7439 | ||
7440 | # | |
7441 | # Ok, lets find the tk source trees so we can use the headers | |
7442 | # If the directory (presumably symlink) named "tk" exists, use that one | |
7443 | # in preference to any others. Same logic is used when choosing library | |
7444 | # and again with Tcl. The search order is the best place to look first, then in | |
7445 | # decreasing significance. The loop breaks if the trigger file is found. | |
7446 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
7447 | # directory. This converts the path from a relative to an absolute, so | |
7448 | # recursive cache variables for the path will work right. We check all | |
7449 | # the possible paths in one loop rather than many seperate loops to speed | |
7450 | # things up. | |
7451 | # the alternative search directory is involked by --with-tkinclude | |
7452 | # | |
7453 | no_tk=true | |
7454 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
46711df8 | 7455 | echo "configure:7456: checking for Tk private headers" >&5 |
3fc11d3e JM |
7456 | # Check whether --with-tkinclude or --without-tkinclude was given. |
7457 | if test "${with_tkinclude+set}" = set; then | |
7458 | withval="$with_tkinclude" | |
7459 | with_tkinclude=${withval} | |
7460 | fi | |
7461 | ||
7462 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
7463 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7464 | else | |
7465 | ||
7466 | # first check to see if --with-tkinclude was specified | |
7467 | if test x"${with_tkinclude}" != x ; then | |
7468 | if test -f ${with_tkinclude}/tk.h ; then | |
7469 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
7470 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
7471 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
7472 | else | |
7473 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
7474 | fi | |
7475 | fi | |
7476 | ||
7477 | # next check if it came with Tk configuration file | |
7478 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
7479 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
7480 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
7481 | fi | |
7482 | fi | |
7483 | ||
7484 | # next check in private source directory | |
7485 | # | |
7486 | # since ls returns lowest version numbers first, reverse its output | |
7487 | if test x"${ac_cv_c_tkh}" = x ; then | |
7488 | for i in \ | |
7489 | ${srcdir}/../tk \ | |
7490 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
7491 | ${srcdir}/../../tk \ | |
7492 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
7493 | ${srcdir}/../../../tk \ | |
7494 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
7495 | if test -f $i/generic/tk.h ; then | |
7496 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
7497 | break | |
7498 | fi | |
7499 | done | |
7500 | fi | |
7501 | # finally check in a few common install locations | |
7502 | # | |
7503 | # since ls returns lowest version numbers first, reverse its output | |
7504 | if test x"${ac_cv_c_tkh}" = x ; then | |
7505 | for i in \ | |
7506 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
7507 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
7508 | /usr/local/src/tk \ | |
7509 | /usr/local/lib/tk \ | |
7510 | ${prefix}/include ; do | |
7511 | if test -f $i/generic/tk.h ; then | |
7512 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
7513 | break | |
7514 | fi | |
7515 | done | |
7516 | fi | |
7517 | # see if one is installed | |
7518 | if test x"${ac_cv_c_tkh}" = x ; then | |
7519 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
7520 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
46711df8 | 7521 | echo "configure:7522: checking for tk.h" >&5 |
3fc11d3e JM |
7522 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
7523 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7524 | else | |
7525 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 7526 | #line 7527 "configure" |
3fc11d3e JM |
7527 | #include "confdefs.h" |
7528 | #include <tk.h> | |
7529 | EOF | |
7530 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 7531 | { (eval echo configure:7532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
7532 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7533 | if test -z "$ac_err"; then | |
7534 | rm -rf conftest* | |
7535 | eval "ac_cv_header_$ac_safe=yes" | |
7536 | else | |
7537 | echo "$ac_err" >&5 | |
7538 | echo "configure: failed program was:" >&5 | |
7539 | cat conftest.$ac_ext >&5 | |
7540 | rm -rf conftest* | |
7541 | eval "ac_cv_header_$ac_safe=no" | |
7542 | fi | |
7543 | rm -f conftest* | |
7544 | fi | |
7545 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
7546 | echo "$ac_t""yes" 1>&6 | |
7547 | ac_cv_c_tkh=installed | |
7548 | else | |
7549 | echo "$ac_t""no" 1>&6 | |
7550 | ac_cv_c_tkh="" | |
7551 | fi | |
7552 | ||
7553 | fi | |
7554 | ||
7555 | fi | |
7556 | ||
7557 | if test x"${ac_cv_c_tkh}" != x ; then | |
7558 | no_tk="" | |
7559 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
7560 | echo "$ac_t""is installed" 1>&6 | |
7561 | TKHDIR="" | |
7562 | else | |
7563 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
7564 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
7565 | TKHDIR="-I${ac_cv_c_tkh}" | |
7566 | fi | |
7567 | else | |
7568 | TKHDIR="# no Tk directory found" | |
7569 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
7570 | no_tk=true | |
7571 | fi | |
7572 | ||
7573 | ||
7574 | ||
7575 | ||
7576 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
46711df8 | 7577 | echo "configure:7578: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
7578 | if test x"${ac_cv_c_itclh}" = x ; then |
7579 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
7580 | if test -f $i/generic/itcl.h ; then | |
7581 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
7582 | break | |
7583 | fi | |
7584 | done | |
7585 | fi | |
7586 | if test x"${ac_cv_c_itclh}" = x ; then | |
7587 | ITCLHDIR="# no Itcl private headers found" | |
7588 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
7589 | fi | |
7590 | if test x"${ac_cv_c_itclh}" != x ; then | |
7591 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
7592 | fi | |
7593 | # should always be here | |
7594 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
7595 | ||
7596 | #AC_SUBST(ITCLLIB) | |
7597 | ||
7598 | ||
7599 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
46711df8 | 7600 | echo "configure:7601: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
7601 | if test x"${ac_cv_c_itkh}" = x ; then |
7602 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
7603 | if test -f $i/generic/itk.h ; then | |
7604 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
7605 | break | |
7606 | fi | |
7607 | done | |
7608 | fi | |
7609 | if test x"${ac_cv_c_itkh}" = x ; then | |
7610 | ITKHDIR="# no Itk private headers found" | |
7611 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
7612 | fi | |
7613 | if test x"${ac_cv_c_itkh}" != x ; then | |
7614 | ITKHDIR="-I${ac_cv_c_itkh}" | |
7615 | fi | |
7616 | # should always be here | |
7617 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
7618 | ||
7619 | #AC_SUBST(ITKLIB) | |
7620 | ||
7621 | ||
7622 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
46711df8 | 7623 | echo "configure:7624: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
7624 | if test x"${ac_cv_c_tixh}" = x ; then |
7625 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
7626 | if test -f $i/generic/tix.h ; then | |
7627 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
7628 | break | |
7629 | fi | |
7630 | done | |
7631 | fi | |
7632 | if test x"${ac_cv_c_tixh}" = x ; then | |
7633 | TIXHDIR="# no Tix private headers found" | |
7634 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
7635 | fi | |
7636 | if test x"${ac_cv_c_tixh}" != x ; then | |
7637 | TIXHDIR="-I${ac_cv_c_tixh}" | |
7638 | fi | |
7639 | ||
7640 | ||
7641 | ||
dd2504ab JM |
7642 | |
7643 | # now look for Tk library stuff | |
7644 | ||
7645 | case "${host}" in | |
7646 | *-*-cygwin*) | |
7647 | tkdir=../tk/win/ | |
7648 | ;; | |
7649 | *) | |
7650 | tkdir=../tk/unix/ | |
7651 | ;; | |
7652 | esac | |
7653 | ||
7654 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
7655 | ||
3fc11d3e JM |
7656 | # now look for Itcl library stuff |
7657 | ||
7658 | ||
7659 | # | |
7660 | # Ok, lets find the itcl configuration | |
7661 | # First, look for one uninstalled. | |
7662 | # the alternative search directory is invoked by --with-itclconfig | |
7663 | # | |
7664 | ||
7665 | if test x"${no_itcl}" = x ; then | |
7666 | # we reset no_itcl in case something fails here | |
7667 | no_itcl=true | |
7668 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
7669 | if test "${with_itclconfig+set}" = set; then | |
7670 | withval="$with_itclconfig" | |
7671 | with_itclconfig=${withval} | |
7672 | fi | |
7673 | ||
7674 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
46711df8 | 7675 | echo "configure:7676: checking for Itcl configuration" >&5 |
3fc11d3e JM |
7676 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
7677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7678 | else | |
7679 | ||
7680 | ||
7681 | # First check to see if --with-itclconfig was specified. | |
7682 | if test x"${with_itclconfig}" != x ; then | |
7683 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
7684 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
7685 | else | |
7686 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
7687 | fi | |
7688 | fi | |
7689 | ||
7690 | # then check for a private Itcl library | |
7691 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7692 | for i in \ | |
7693 | ../itcl/itcl \ | |
7694 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
7695 | ../../itcl \ | |
7696 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
7697 | ../../../itcl \ | |
7698 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
7699 | if test -f "$i/itclConfig.sh" ; then | |
7700 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
7701 | break | |
7702 | fi | |
7703 | done | |
7704 | fi | |
7705 | # check in a few common install locations | |
7706 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7707 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7708 | if test -f "$i/itclConfig.sh" ; then | |
7709 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
7710 | break | |
7711 | fi | |
7712 | done | |
7713 | fi | |
7714 | # check in a few other private locations | |
7715 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7716 | for i in \ | |
7717 | ${srcdir}/../itcl/itcl \ | |
7718 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
7719 | if test -f "$i/itclConfig.sh" ; then | |
7720 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
7721 | break | |
7722 | fi | |
7723 | done | |
7724 | fi | |
7725 | ||
7726 | fi | |
7727 | ||
7728 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7729 | ITCLCONFIG="# no Itcl configs found" | |
7730 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
7731 | else | |
7732 | no_itcl= | |
7733 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
7734 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
7735 | fi | |
7736 | fi | |
7737 | ||
7738 | if test -z "${no_itcl}"; then | |
7739 | ||
7740 | if test -f "$ITCLCONFIG" ; then | |
7741 | . $ITCLCONFIG | |
7742 | fi | |
7743 | ||
7744 | ||
7745 | ||
7746 | ||
7747 | ||
7748 | ||
7749 | ||
7750 | ||
7751 | ||
7752 | ||
7753 | ||
7754 | case "${host}" in | |
7755 | *-*-cygwin*) | |
7756 | itcldir=../itcl/itcl/win/ | |
7757 | ;; | |
7758 | *) | |
7759 | itcldir=../itcl/itcl/unix/ | |
7760 | ;; | |
7761 | esac | |
7762 | ||
7763 | ||
7764 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
7765 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
7766 | fi | |
7767 | ||
7768 | ||
7769 | # now look for Itk library stuff | |
7770 | ||
7771 | # | |
7772 | # Ok, lets find the itk configuration | |
7773 | # First, look for one uninstalled. | |
7774 | # the alternative search directory is invoked by --with-itkconfig | |
7775 | # | |
7776 | ||
7777 | if test x"${no_itk}" = x ; then | |
7778 | # we reset no_itk in case something fails here | |
7779 | no_itk=true | |
7780 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
7781 | if test "${with_itkconfig+set}" = set; then | |
7782 | withval="$with_itkconfig" | |
7783 | with_itkconfig=${withval} | |
7784 | fi | |
7785 | ||
7786 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
46711df8 | 7787 | echo "configure:7788: checking for Itk configuration" >&5 |
3fc11d3e JM |
7788 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
7789 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7790 | else | |
7791 | ||
7792 | ||
7793 | # First check to see if --with-itkconfig was specified. | |
7794 | if test x"${with_itkconfig}" != x ; then | |
7795 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
7796 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
7797 | else | |
7798 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
7799 | fi | |
7800 | fi | |
7801 | ||
7802 | # then check for a private Itk library | |
7803 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7804 | for i in \ | |
7805 | ../itcl/itk \ | |
7806 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
7807 | ../../itk \ | |
7808 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
7809 | ../../../itk \ | |
7810 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
7811 | if test -f "$i/itkConfig.sh" ; then | |
7812 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7813 | break | |
7814 | fi | |
7815 | done | |
7816 | fi | |
7817 | # check in a few common install locations | |
7818 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7819 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7820 | if test -f "$i/itkConfig.sh" ; then | |
7821 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7822 | break | |
7823 | fi | |
7824 | done | |
7825 | fi | |
7826 | # check in a few other private locations | |
7827 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7828 | for i in \ | |
7829 | ${srcdir}/../itcl/itk \ | |
7830 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
7831 | if test -f "$i/itkConfig.sh" ; then | |
7832 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7833 | break | |
7834 | fi | |
7835 | done | |
7836 | fi | |
7837 | ||
7838 | fi | |
7839 | ||
7840 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7841 | ITKCONFIG="# no Itk configs found" | |
7842 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
7843 | else | |
7844 | no_itk= | |
7845 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
7846 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
7847 | fi | |
7848 | fi | |
7849 | ||
7850 | ||
7851 | if test -z "${no_itcl}"; then | |
7852 | ||
7853 | if test -f "$ITKCONFIG" ; then | |
7854 | . $ITKCONFIG | |
7855 | fi | |
7856 | ||
7857 | ||
7858 | ||
7859 | ||
7860 | ||
7861 | ||
7862 | ||
7863 | ||
7864 | ||
7865 | ||
7866 | ||
7867 | ||
7868 | case "${host}" in | |
7869 | *-*-cygwin*) | |
7870 | itkdir=../itcl/itk/win/ | |
7871 | ;; | |
7872 | *) | |
7873 | itkdir=../itcl/itk/unix/ | |
7874 | ;; | |
7875 | esac | |
7876 | ||
7877 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
7878 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
7879 | fi | |
7880 | ||
7881 | # now look for Tix library stuff | |
7882 | ||
7883 | # | |
7884 | # Ok, lets find the tix configuration | |
7885 | # First, look for one uninstalled. | |
7886 | # the alternative search directory is invoked by --with-itkconfig | |
7887 | # | |
7888 | ||
7889 | if test x"${no_tix}" = x ; then | |
7890 | # we reset no_tix in case something fails here | |
7891 | no_tix=true | |
7892 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
7893 | if test "${with_tixconfig+set}" = set; then | |
7894 | withval="$with_tixconfig" | |
7895 | with_tixconfig=${withval} | |
7896 | fi | |
7897 | ||
7898 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
46711df8 | 7899 | echo "configure:7900: checking for Tix configuration" >&5 |
3fc11d3e JM |
7900 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
7901 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7902 | else | |
7903 | ||
7904 | ||
7905 | # First check to see if --with-tixconfig was specified. | |
7906 | if test x"${with_tixconfig}" != x ; then | |
7907 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
7908 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
7909 | else | |
7910 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
7911 | fi | |
7912 | fi | |
7913 | ||
7914 | # then check for a private Tix library | |
7915 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7916 | for i in \ | |
7917 | ../tix \ | |
7918 | `ls -dr ../tix 2>/dev/null` \ | |
7919 | ../../tix \ | |
7920 | `ls -dr ../../tix 2>/dev/null` \ | |
7921 | ../../../tix \ | |
7922 | `ls -dr ../../../tix 2>/dev/null` ; do | |
7923 | echo "**** Looking at $i - with ${configdir}" | |
7924 | if test -f "$i/tixConfig.sh" ; then | |
7925 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
7926 | break | |
7927 | fi | |
7928 | done | |
7929 | fi | |
7930 | # check in a few common install locations | |
7931 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7932 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7933 | echo "**** Looking at $i" | |
7934 | if test -f "$i/tixConfig.sh" ; then | |
7935 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
7936 | break | |
7937 | fi | |
7938 | done | |
7939 | fi | |
7940 | # check in a few other private locations | |
7941 | echo "**** Other private locations" | |
7942 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7943 | for i in \ | |
7944 | ${srcdir}/../tix \ | |
7945 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
7946 | echo "**** Looking at $i - with ${configdir}" | |
7947 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
7948 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
7949 | break | |
7950 | fi | |
7951 | done | |
7952 | fi | |
7953 | ||
7954 | fi | |
7955 | ||
7956 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7957 | TIXCONFIG="# no Tix configs found" | |
7958 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
7959 | else | |
7960 | no_tix= | |
7961 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
7962 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
7963 | fi | |
7964 | fi | |
7965 | ||
7966 | ||
7967 | if test -z "${no_tix}"; then | |
7968 | ||
7969 | if test -f "$TIXCONFIG" ; then | |
7970 | . $TIXCONFIG | |
7971 | fi | |
7972 | ||
7973 | ||
7974 | ||
7975 | ||
7976 | ||
7977 | ||
7978 | ||
7979 | ||
7980 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
7981 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
7982 | fi | |
7983 | ||
4226a5a5 | 7984 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
7985 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
7986 | # know whether 8.2 will or not, but I bet it will. | |
7987 | # I don't have to worry about 7.x since we don't support it. | |
7988 | GDBTK_CFLAGS="" | |
7989 | if test "$GCC" = "yes"; then | |
7990 | if test "$TCL_VERSION" != "8.0" ; then | |
7991 | GDBTK_CFLAGS="-fwritable-strings" | |
7992 | fi | |
7993 | fi | |
7994 | ||
7995 | # Include some libraries that Tcl and Tk want. | |
7996 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
3fc11d3e JM |
7997 | # Yes, the ordering seems wrong here. But it isn't. |
7998 | # TK_LIBS is the list of libraries that need to be linked | |
7999 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
8000 | # were in LIBS then any link tests after this point would | |
8001 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
8002 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
8003 | |
8004 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
8005 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
8006 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
8007 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 8008 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 8009 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
8010 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
8011 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
8012 | |
8013 | if test x$gdb_cv_os_cygwin = xyes; then | |
8014 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
8015 | WIN32LDAPP="-Wl,--subsystem,console" | |
8016 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
8017 | fi | |
8018 | fi | |
8019 | fi | |
8020 | fi | |
8021 | ||
8022 | ||
8023 | ||
8024 | ||
8025 | ||
8026 | ||
8027 | ||
8028 | ||
8029 | ||
8030 | ||
8031 | ||
8032 | ||
8033 | ||
dd2504ab JM |
8034 | |
8035 | ||
d1c3b63a | 8036 | |
c906108c SS |
8037 | # If we find X, set shell vars x_includes and x_libraries to the |
8038 | # paths, otherwise set no_x=yes. | |
8039 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
8040 | # --without-x overrides everything else, but does not touch the cache. | |
8041 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
46711df8 | 8042 | echo "configure:8043: checking for X" >&5 |
c906108c SS |
8043 | |
8044 | # Check whether --with-x or --without-x was given. | |
8045 | if test "${with_x+set}" = set; then | |
8046 | withval="$with_x" | |
8047 | : | |
8048 | fi | |
8049 | ||
8050 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
8051 | if test "x$with_x" = xno; then | |
8052 | # The user explicitly disabled X. | |
8053 | have_x=disabled | |
8054 | else | |
8055 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
8056 | # Both variables are already set. | |
8057 | have_x=yes | |
8058 | else | |
8059 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
8060 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8061 | else | |
8062 | # One or both of the vars are not set, and there is no cached value. | |
8063 | ac_x_includes=NO ac_x_libraries=NO | |
8064 | rm -fr conftestdir | |
8065 | if mkdir conftestdir; then | |
8066 | cd conftestdir | |
8067 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
8068 | cat > Imakefile <<'EOF' | |
8069 | acfindx: | |
8070 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
8071 | EOF | |
8072 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
8073 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
8074 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
8075 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
8076 | for ac_extension in a so sl; do | |
8077 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
8078 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
8079 | ac_im_usrlibdir=$ac_im_libdir; break | |
8080 | fi | |
8081 | done | |
8082 | # Screen out bogus values from the imake configuration. They are | |
8083 | # bogus both because they are the default anyway, and because | |
8084 | # using them would break gcc on systems where it needs fixed includes. | |
8085 | case "$ac_im_incroot" in | |
8086 | /usr/include) ;; | |
8087 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
8088 | esac | |
8089 | case "$ac_im_usrlibdir" in | |
8090 | /usr/lib | /lib) ;; | |
8091 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
8092 | esac | |
8093 | fi | |
8094 | cd .. | |
8095 | rm -fr conftestdir | |
8096 | fi | |
8097 | ||
8098 | if test "$ac_x_includes" = NO; then | |
8099 | # Guess where to find include files, by looking for this one X11 .h file. | |
8100 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
8101 | ||
8102 | # First, try using that file with no special directory specified. | |
8103 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 8104 | #line 8105 "configure" |
c906108c SS |
8105 | #include "confdefs.h" |
8106 | #include <$x_direct_test_include> | |
8107 | EOF | |
8108 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46711df8 | 8109 | { (eval echo configure:8110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
8110 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
8111 | if test -z "$ac_err"; then | |
8112 | rm -rf conftest* | |
8113 | # We can compile using X headers with no special include directory. | |
8114 | ac_x_includes= | |
8115 | else | |
8116 | echo "$ac_err" >&5 | |
8117 | echo "configure: failed program was:" >&5 | |
8118 | cat conftest.$ac_ext >&5 | |
8119 | rm -rf conftest* | |
8120 | # Look for the header file in a standard set of common directories. | |
8121 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
8122 | for ac_dir in \ | |
8123 | /usr/X11/include \ | |
8124 | /usr/X11R6/include \ | |
8125 | /usr/X11R5/include \ | |
8126 | /usr/X11R4/include \ | |
8127 | \ | |
8128 | /usr/include/X11 \ | |
8129 | /usr/include/X11R6 \ | |
8130 | /usr/include/X11R5 \ | |
8131 | /usr/include/X11R4 \ | |
8132 | \ | |
8133 | /usr/local/X11/include \ | |
8134 | /usr/local/X11R6/include \ | |
8135 | /usr/local/X11R5/include \ | |
8136 | /usr/local/X11R4/include \ | |
8137 | \ | |
8138 | /usr/local/include/X11 \ | |
8139 | /usr/local/include/X11R6 \ | |
8140 | /usr/local/include/X11R5 \ | |
8141 | /usr/local/include/X11R4 \ | |
8142 | \ | |
8143 | /usr/X386/include \ | |
8144 | /usr/x386/include \ | |
8145 | /usr/XFree86/include/X11 \ | |
8146 | \ | |
8147 | /usr/include \ | |
8148 | /usr/local/include \ | |
8149 | /usr/unsupported/include \ | |
8150 | /usr/athena/include \ | |
8151 | /usr/local/x11r5/include \ | |
8152 | /usr/lpp/Xamples/include \ | |
8153 | \ | |
8154 | /usr/openwin/include \ | |
8155 | /usr/openwin/share/include \ | |
8156 | ; \ | |
8157 | do | |
8158 | if test -r "$ac_dir/$x_direct_test_include"; then | |
8159 | ac_x_includes=$ac_dir | |
8160 | break | |
8161 | fi | |
8162 | done | |
8163 | fi | |
8164 | rm -f conftest* | |
8165 | fi # $ac_x_includes = NO | |
8166 | ||
8167 | if test "$ac_x_libraries" = NO; then | |
8168 | # Check for the libraries. | |
8169 | ||
8170 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
8171 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
8172 | ||
8173 | # See if we find them without any special options. | |
8174 | # Don't add to $LIBS permanently. | |
8175 | ac_save_LIBS="$LIBS" | |
8176 | LIBS="-l$x_direct_test_library $LIBS" | |
8177 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 8178 | #line 8179 "configure" |
c906108c SS |
8179 | #include "confdefs.h" |
8180 | ||
8181 | int main() { | |
8182 | ${x_direct_test_function}() | |
8183 | ; return 0; } | |
8184 | EOF | |
46711df8 | 8185 | if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8186 | rm -rf conftest* |
8187 | LIBS="$ac_save_LIBS" | |
8188 | # We can link X programs with no special library path. | |
8189 | ac_x_libraries= | |
8190 | else | |
8191 | echo "configure: failed program was:" >&5 | |
8192 | cat conftest.$ac_ext >&5 | |
8193 | rm -rf conftest* | |
8194 | LIBS="$ac_save_LIBS" | |
8195 | # First see if replacing the include by lib works. | |
8196 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
8197 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
8198 | /usr/X11/lib \ | |
8199 | /usr/X11R6/lib \ | |
8200 | /usr/X11R5/lib \ | |
8201 | /usr/X11R4/lib \ | |
8202 | \ | |
8203 | /usr/lib/X11 \ | |
8204 | /usr/lib/X11R6 \ | |
8205 | /usr/lib/X11R5 \ | |
8206 | /usr/lib/X11R4 \ | |
8207 | \ | |
8208 | /usr/local/X11/lib \ | |
8209 | /usr/local/X11R6/lib \ | |
8210 | /usr/local/X11R5/lib \ | |
8211 | /usr/local/X11R4/lib \ | |
8212 | \ | |
8213 | /usr/local/lib/X11 \ | |
8214 | /usr/local/lib/X11R6 \ | |
8215 | /usr/local/lib/X11R5 \ | |
8216 | /usr/local/lib/X11R4 \ | |
8217 | \ | |
8218 | /usr/X386/lib \ | |
8219 | /usr/x386/lib \ | |
8220 | /usr/XFree86/lib/X11 \ | |
8221 | \ | |
8222 | /usr/lib \ | |
8223 | /usr/local/lib \ | |
8224 | /usr/unsupported/lib \ | |
8225 | /usr/athena/lib \ | |
8226 | /usr/local/x11r5/lib \ | |
8227 | /usr/lpp/Xamples/lib \ | |
8228 | /lib/usr/lib/X11 \ | |
8229 | \ | |
8230 | /usr/openwin/lib \ | |
8231 | /usr/openwin/share/lib \ | |
8232 | ; \ | |
8233 | do | |
8234 | for ac_extension in a so sl; do | |
8235 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
8236 | ac_x_libraries=$ac_dir | |
8237 | break 2 | |
8238 | fi | |
8239 | done | |
8240 | done | |
8241 | fi | |
8242 | rm -f conftest* | |
8243 | fi # $ac_x_libraries = NO | |
8244 | ||
8245 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
8246 | # Didn't find X anywhere. Cache the known absence of X. | |
8247 | ac_cv_have_x="have_x=no" | |
8248 | else | |
8249 | # Record where we found X for the cache. | |
8250 | ac_cv_have_x="have_x=yes \ | |
8251 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
8252 | fi | |
8253 | fi | |
8254 | fi | |
8255 | eval "$ac_cv_have_x" | |
8256 | fi # $with_x != no | |
8257 | ||
8258 | if test "$have_x" != yes; then | |
8259 | echo "$ac_t""$have_x" 1>&6 | |
8260 | no_x=yes | |
8261 | else | |
8262 | # If each of the values was on the command line, it overrides each guess. | |
8263 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
8264 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
8265 | # Update the cache value to reflect the command line values. | |
8266 | ac_cv_have_x="have_x=yes \ | |
8267 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
8268 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
8269 | fi | |
8270 | ||
8271 | ||
7a292a7a SS |
8272 | |
8273 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
8274 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
8275 | # This code just checks for a few cases where we'd like to ignore those | |
8276 | # definitions, even when they're present in the '.mt' file. These cases | |
8277 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 8278 | # not part of the source tree. |
7a292a7a SS |
8279 | # |
8280 | # Check whether --enable-sim or --disable-sim was given. | |
8281 | if test "${enable_sim+set}" = set; then | |
8282 | enableval="$enable_sim" | |
8283 | echo "enable_sim = $enable_sim"; | |
8284 | echo "enableval = ${enableval}"; | |
8285 | case "${enableval}" in | |
8286 | yes) ignore_sim=false ;; | |
8287 | no) ignore_sim=true ;; | |
8288 | *) ignore_sim=false ;; | |
8289 | esac | |
8290 | else | |
8291 | ignore_sim=false | |
8292 | fi | |
8293 | ||
8294 | ||
8295 | if test ! -d "${srcdir}/../sim"; then | |
8296 | ignore_sim=true | |
8297 | fi | |
8298 | ||
8299 | if test "${ignore_sim}" = "true"; then | |
8300 | IGNORE_SIM="SIM=" | |
8301 | IGNORE_SIM_OBS="SIM_OBS=" | |
8302 | else | |
8303 | IGNORE_SIM="" | |
8304 | IGNORE_SIM_OBS="" | |
8305 | cat >> confdefs.h <<\EOF | |
8306 | #define WITH_SIM 1 | |
8307 | EOF | |
8308 | ||
8309 | fi | |
8310 | ||
8311 | ||
8312 | ||
c906108c SS |
8313 | |
8314 | ||
8315 | ||
8316 | ||
8317 | ||
8318 | ||
dfcd3bfb | 8319 | |
e56ac5c3 AC |
8320 | |
8321 | ||
b3a90332 AC |
8322 | |
8323 | ||
b46cd165 | 8324 | |
c906108c SS |
8325 | # Begin stuff to support --enable-shared |
8326 | # Check whether --enable-shared or --disable-shared was given. | |
8327 | if test "${enable_shared+set}" = set; then | |
8328 | enableval="$enable_shared" | |
8329 | case "${enableval}" in | |
8330 | yes) shared=true ;; | |
8331 | no) shared=false ;; | |
8332 | *) shared=true ;; | |
8333 | esac | |
8334 | fi | |
8335 | ||
8336 | HLDFLAGS= | |
8337 | HLDENV= | |
8338 | # If we have shared libraries, try to set rpath reasonably. | |
8339 | if test "${shared}" = "true"; then | |
8340 | case "${host}" in | |
8341 | *-*-hpux*) | |
8342 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
8343 | ;; | |
8344 | *-*-irix5* | *-*-irix6*) | |
8345 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
8346 | ;; | |
8347 | *-*-linux*aout*) | |
8348 | ;; | |
88987551 | 8349 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
8350 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
8351 | ;; | |
8352 | *-*-solaris*) | |
8353 | HLDFLAGS='-R $(libdir)' | |
8354 | ;; | |
8355 | *-*-sysv4*) | |
8356 | 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;' | |
8357 | ;; | |
8358 | esac | |
8359 | fi | |
8360 | ||
8361 | # On SunOS, if the linker supports the -rpath option, use it to | |
8362 | # prevent ../bfd and ../opcodes from being included in the run time | |
8363 | # search path. | |
8364 | case "${host}" in | |
8365 | *-*-sunos*) | |
8366 | echo 'main () { }' > conftest.c | |
8367 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
8368 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
8369 | : | |
8370 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
8371 | : | |
8372 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
8373 | : | |
8374 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
8375 | : | |
8376 | elif test "${shared}" = "true"; then | |
8377 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
8378 | else | |
8379 | HLDFLAGS='-Wl,-rpath=' | |
8380 | fi | |
8381 | rm -f conftest.t conftest.c conftest | |
8382 | ;; | |
8383 | esac | |
8384 | ||
8385 | ||
8386 | # End stuff to support --enable-shared | |
8387 | ||
8388 | # target_subdir is used by the testsuite to find the target libraries. | |
8389 | target_subdir= | |
8390 | if test "${host}" != "${target}"; then | |
8391 | target_subdir="${target_alias}/" | |
8392 | fi | |
8393 | ||
8394 | ||
8395 | frags= | |
8396 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
8397 | if test ! -f ${host_makefile_frag}; then | |
8398 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
8399 | fi | |
8400 | frags="$frags $host_makefile_frag" | |
8401 | ||
8402 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
8403 | if test ! -f ${target_makefile_frag}; then | |
8404 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
8405 | fi | |
8406 | frags="$frags $target_makefile_frag" | |
8407 | ||
8408 | ||
8409 | ||
8410 | ||
8411 | ||
8412 | hostfile=`sed -n ' | |
8413 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
8414 | ' ${host_makefile_frag}` | |
8415 | ||
8416 | targetfile=`sed -n ' | |
8417 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
8418 | ' ${target_makefile_frag}` | |
8419 | ||
6166d547 AC |
8420 | GDB_MULTI_ARCH=`sed -n ' |
8421 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
8422 | ' ${target_makefile_frag}` | |
8423 | ||
c906108c SS |
8424 | # these really aren't orthogonal true/false values of the same condition, |
8425 | # but shells are slow enough that I like to reuse the test conditions | |
8426 | # whenever possible | |
8427 | if test "${target}" = "${host}"; then | |
8428 | nativefile=`sed -n ' | |
8429 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
8430 | ' ${host_makefile_frag}` | |
8431 | # else | |
6c5cfe5b | 8432 | # GDBserver is only useful in a "native" environment |
c906108c SS |
8433 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` |
8434 | fi | |
8435 | ||
8436 | ||
6166d547 AC |
8437 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
8438 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
8439 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
8440 | # will be the default. | |
8441 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
8442 | case "${gdb_multi_arch}" in | |
8443 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
8444 | no ) GDB_MULTI_ARCH=0 ;; | |
8445 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
8446 | esac | |
8447 | fi | |
8448 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
8449 | cat >> confdefs.h <<EOF | |
8450 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
8451 | EOF | |
8452 | ||
8453 | fi | |
6c5cfe5b | 8454 | # Warn the user when they use an old practice |
6166d547 AC |
8455 | case "${GDB_MULTI_ARCH}" in |
8456 | "" ) ;; | |
8457 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
8458 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
8459 | GDB_MULTI_ARCH_PURE ) | |
8460 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 8461 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 8462 | targetfile="" |
6166d547 AC |
8463 | fi ;; |
8464 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
8465 | esac | |
8466 | ||
8467 | ||
96baa820 JM |
8468 | SUBDIRS="doc testsuite nlm" |
8469 | if test "${enable_multi_ice}" = "yes"; then | |
8470 | SUBDIRS="${SUBDIRS} multi-ice" | |
8471 | fi | |
8472 | ||
8473 | ||
8474 | ||
c906108c | 8475 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
8476 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
8477 | # version. | |
c906108c SS |
8478 | |
8479 | files= | |
8480 | links= | |
5a2402b8 | 8481 | |
c906108c | 8482 | rm -f xm.h |
5a2402b8 | 8483 | xm_h="" |
c906108c | 8484 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
8485 | xm_h=xm.h |
8486 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
8487 | files="${files} ${GDB_XM_FILE}" | |
8488 | links="${links} xm.h" | |
8489 | cat >> confdefs.h <<EOF | |
8490 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
8491 | EOF | |
8492 | ||
c906108c | 8493 | fi |
5a2402b8 AC |
8494 | |
8495 | ||
c906108c | 8496 | rm -f tm.h |
5a2402b8 | 8497 | tm_h="" |
c906108c | 8498 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
8499 | tm_h=tm.h |
8500 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
8501 | files="${files} ${GDB_TM_FILE}" | |
8502 | links="${links} tm.h" | |
8503 | cat >> confdefs.h <<EOF | |
8504 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
8505 | EOF | |
8506 | ||
c906108c | 8507 | fi |
5a2402b8 AC |
8508 | |
8509 | ||
c906108c | 8510 | rm -f nm.h |
5a2402b8 | 8511 | nm_h="" |
c906108c | 8512 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
8513 | nm_h=nm.h |
8514 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
8515 | files="${files} ${GDB_NM_FILE}" | |
8516 | links="${links} nm.h" | |
8517 | cat >> confdefs.h <<EOF | |
8518 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
8519 | EOF | |
8520 | ||
c906108c | 8521 | fi |
5a2402b8 AC |
8522 | |
8523 | ||
3fc11d3e | 8524 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
46711df8 | 8525 | echo "configure:8526: checking whether ln -s works" >&5 |
3fc11d3e JM |
8526 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
8527 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8528 | else | |
8529 | rm -f conftestdata | |
8530 | if ln -s X conftestdata 2>/dev/null | |
8531 | then | |
8532 | rm -f conftestdata | |
8533 | ac_cv_prog_LN_S="ln -s" | |
8534 | else | |
8535 | ac_cv_prog_LN_S=ln | |
8536 | fi | |
8537 | fi | |
8538 | LN_S="$ac_cv_prog_LN_S" | |
8539 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
8540 | echo "$ac_t""yes" 1>&6 | |
8541 | else | |
8542 | echo "$ac_t""no" 1>&6 | |
8543 | fi | |
8544 | ||
c906108c SS |
8545 | |
8546 | ||
8547 | ||
8548 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
46711df8 | 8549 | echo "configure:8550: checking for Cygwin environment" >&5 |
c906108c SS |
8550 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
8551 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8552 | else | |
8553 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 8554 | #line 8555 "configure" |
c906108c SS |
8555 | #include "confdefs.h" |
8556 | ||
8557 | int main() { | |
8558 | ||
8559 | #ifndef __CYGWIN__ | |
8560 | #define __CYGWIN__ __CYGWIN32__ | |
8561 | #endif | |
8562 | return __CYGWIN__; | |
8563 | ; return 0; } | |
8564 | EOF | |
46711df8 | 8565 | if { (eval echo configure:8566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8566 | rm -rf conftest* |
8567 | ac_cv_cygwin=yes | |
8568 | else | |
8569 | echo "configure: failed program was:" >&5 | |
8570 | cat conftest.$ac_ext >&5 | |
8571 | rm -rf conftest* | |
8572 | ac_cv_cygwin=no | |
8573 | fi | |
8574 | rm -f conftest* | |
8575 | rm -f conftest* | |
8576 | fi | |
8577 | ||
8578 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
8579 | CYGWIN= | |
8580 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
8581 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
46711df8 | 8582 | echo "configure:8583: checking for mingw32 environment" >&5 |
c906108c SS |
8583 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
8584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8585 | else | |
8586 | cat > conftest.$ac_ext <<EOF | |
46711df8 | 8587 | #line 8588 "configure" |
c906108c SS |
8588 | #include "confdefs.h" |
8589 | ||
8590 | int main() { | |
8591 | return __MINGW32__; | |
8592 | ; return 0; } | |
8593 | EOF | |
46711df8 | 8594 | if { (eval echo configure:8595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8595 | rm -rf conftest* |
8596 | ac_cv_mingw32=yes | |
8597 | else | |
8598 | echo "configure: failed program was:" >&5 | |
8599 | cat conftest.$ac_ext >&5 | |
8600 | rm -rf conftest* | |
8601 | ac_cv_mingw32=no | |
8602 | fi | |
8603 | rm -f conftest* | |
8604 | rm -f conftest* | |
8605 | fi | |
8606 | ||
8607 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
8608 | MINGW32= | |
8609 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
8610 | ||
8611 | ||
8612 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
46711df8 | 8613 | echo "configure:8614: checking for executable suffix" >&5 |
c906108c SS |
8614 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
8615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8616 | else | |
8617 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
8618 | ac_cv_exeext=.exe | |
8619 | else | |
8620 | rm -f conftest* | |
8621 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
8622 | ac_cv_exeext= | |
46711df8 | 8623 | if { (eval echo configure:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
8624 | for file in conftest.*; do |
8625 | case $file in | |
72473524 | 8626 | *.c | *.o | *.obj) ;; |
c906108c SS |
8627 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
8628 | esac | |
8629 | done | |
8630 | else | |
8631 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
8632 | fi | |
8633 | rm -f conftest* | |
8634 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
8635 | fi | |
8636 | fi | |
8637 | ||
8638 | EXEEXT="" | |
8639 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
8640 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
8641 | ac_exeext=$EXEEXT | |
8642 | ||
8643 | ||
8644 | subdirs="$configdirs" | |
8645 | ||
8646 | trap '' 1 2 15 | |
8647 | cat > confcache <<\EOF | |
8648 | # This file is a shell script that caches the results of configure | |
8649 | # tests run on this system so they can be shared between configure | |
8650 | # scripts and configure runs. It is not useful on other systems. | |
8651 | # If it contains results you don't want to keep, you may remove or edit it. | |
8652 | # | |
8653 | # By default, configure uses ./config.cache as the cache file, | |
8654 | # creating it if it does not exist already. You can give configure | |
8655 | # the --cache-file=FILE option to use a different cache file; that is | |
8656 | # what configure does when it calls configure scripts in | |
8657 | # subdirectories, so they share the cache. | |
8658 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8659 | # config.status only pays attention to the cache file if you give it the | |
8660 | # --recheck option to rerun configure. | |
8661 | # | |
8662 | EOF | |
8663 | # The following way of writing the cache mishandles newlines in values, | |
8664 | # but we know of no workaround that is simple, portable, and efficient. | |
8665 | # So, don't put newlines in cache variables' values. | |
8666 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8667 | # and sets the high bit in the cache file unless we assign to the vars. | |
8668 | (set) 2>&1 | | |
8669 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
8670 | *ac_space=\ *) | |
8671 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8672 | # turns \\\\ into \\, and sed turns \\ into \). | |
8673 | sed -n \ | |
8674 | -e "s/'/'\\\\''/g" \ | |
8675 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8676 | ;; | |
8677 | *) | |
8678 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8679 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8680 | ;; | |
8681 | esac >> confcache | |
8682 | if cmp -s $cache_file confcache; then | |
8683 | : | |
8684 | else | |
8685 | if test -w $cache_file; then | |
8686 | echo "updating cache $cache_file" | |
8687 | cat confcache > $cache_file | |
8688 | else | |
8689 | echo "not updating unwritable cache $cache_file" | |
8690 | fi | |
8691 | fi | |
8692 | rm -f confcache | |
8693 | ||
8694 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
8695 | ||
8696 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
8697 | # Let make expand exec_prefix. | |
8698 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8699 | ||
8700 | # Any assignment to VPATH causes Sun make to only execute | |
8701 | # the first set of double-colon rules, so remove it if not needed. | |
8702 | # If there is a colon in the path, we need to keep it. | |
8703 | if test "x$srcdir" = x.; then | |
8704 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
8705 | fi | |
8706 | ||
8707 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
8708 | ||
8709 | DEFS=-DHAVE_CONFIG_H | |
8710 | ||
8711 | # Without the "./", some shells look in PATH for config.status. | |
8712 | : ${CONFIG_STATUS=./config.status} | |
8713 | ||
8714 | echo creating $CONFIG_STATUS | |
8715 | rm -f $CONFIG_STATUS | |
8716 | cat > $CONFIG_STATUS <<EOF | |
8717 | #! /bin/sh | |
8718 | # Generated automatically by configure. | |
8719 | # Run this file to recreate the current configuration. | |
8720 | # This directory was configured as follows, | |
8721 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
8722 | # | |
8723 | # $0 $ac_configure_args | |
8724 | # | |
8725 | # Compiler output produced by configure, useful for debugging | |
8726 | # configure, is in ./config.log if it exists. | |
8727 | ||
8728 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
8729 | for ac_option | |
8730 | do | |
8731 | case "\$ac_option" in | |
8732 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8733 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8734 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8735 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
8736 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
8737 | exit 0 ;; | |
8738 | -help | --help | --hel | --he | --h) | |
8739 | echo "\$ac_cs_usage"; exit 0 ;; | |
8740 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8741 | esac | |
8742 | done | |
8743 | ||
8744 | ac_given_srcdir=$srcdir | |
8745 | ac_given_INSTALL="$INSTALL" | |
8746 | ||
ed952ac5 | 8747 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
8748 | EOF |
8749 | cat >> $CONFIG_STATUS <<EOF | |
8750 | ||
8751 | # Protect against being on the right side of a sed subst in config.status. | |
8752 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8753 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8754 | $ac_vpsub | |
8755 | $extrasub | |
8756 | s%@SHELL@%$SHELL%g | |
8757 | s%@CFLAGS@%$CFLAGS%g | |
8758 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8759 | s%@CXXFLAGS@%$CXXFLAGS%g | |
8760 | s%@FFLAGS@%$FFLAGS%g | |
8761 | s%@DEFS@%$DEFS%g | |
8762 | s%@LDFLAGS@%$LDFLAGS%g | |
8763 | s%@LIBS@%$LIBS%g | |
8764 | s%@exec_prefix@%$exec_prefix%g | |
8765 | s%@prefix@%$prefix%g | |
8766 | s%@program_transform_name@%$program_transform_name%g | |
8767 | s%@bindir@%$bindir%g | |
8768 | s%@sbindir@%$sbindir%g | |
8769 | s%@libexecdir@%$libexecdir%g | |
8770 | s%@datadir@%$datadir%g | |
8771 | s%@sysconfdir@%$sysconfdir%g | |
8772 | s%@sharedstatedir@%$sharedstatedir%g | |
8773 | s%@localstatedir@%$localstatedir%g | |
8774 | s%@libdir@%$libdir%g | |
8775 | s%@includedir@%$includedir%g | |
8776 | s%@oldincludedir@%$oldincludedir%g | |
8777 | s%@infodir@%$infodir%g | |
8778 | s%@mandir@%$mandir%g | |
413ccac7 AC |
8779 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
8780 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
8781 | s%@MAINT@%$MAINT%g | |
c906108c SS |
8782 | s%@CC@%$CC%g |
8783 | s%@CPP@%$CPP%g | |
8784 | s%@host@%$host%g | |
8785 | s%@host_alias@%$host_alias%g | |
8786 | s%@host_cpu@%$host_cpu%g | |
8787 | s%@host_vendor@%$host_vendor%g | |
8788 | s%@host_os@%$host_os%g | |
8789 | s%@target@%$target%g | |
8790 | s%@target_alias@%$target_alias%g | |
8791 | s%@target_cpu@%$target_cpu%g | |
8792 | s%@target_vendor@%$target_vendor%g | |
8793 | s%@target_os@%$target_os%g | |
8794 | s%@build@%$build%g | |
8795 | s%@build_alias@%$build_alias%g | |
8796 | s%@build_cpu@%$build_cpu%g | |
8797 | s%@build_vendor@%$build_vendor%g | |
8798 | s%@build_os@%$build_os%g | |
8799 | s%@SET_MAKE@%$SET_MAKE%g | |
8800 | s%@RANLIB@%$RANLIB%g | |
8801 | s%@ALLOCA@%$ALLOCA%g | |
8802 | s%@USE_NLS@%$USE_NLS%g | |
8803 | s%@MSGFMT@%$MSGFMT%g | |
8804 | s%@GMSGFMT@%$GMSGFMT%g | |
8805 | s%@XGETTEXT@%$XGETTEXT%g | |
8806 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
8807 | s%@CATALOGS@%$CATALOGS%g | |
8808 | s%@CATOBJEXT@%$CATOBJEXT%g | |
8809 | s%@DATADIRNAME@%$DATADIRNAME%g | |
8810 | s%@GMOFILES@%$GMOFILES%g | |
8811 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8812 | s%@INTLDEPS@%$INTLDEPS%g | |
8813 | s%@INTLLIBS@%$INTLLIBS%g | |
8814 | s%@INTLOBJS@%$INTLOBJS%g | |
8815 | s%@POFILES@%$POFILES%g | |
8816 | s%@POSUB@%$POSUB%g | |
8817 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
8818 | s%@GT_NO@%$GT_NO%g | |
8819 | s%@GT_YES@%$GT_YES%g | |
8820 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
8821 | s%@l@%$l%g | |
7a292a7a | 8822 | s%@AWK@%$AWK%g |
c906108c SS |
8823 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
8824 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
8825 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8826 | s%@AR@%$AR%g | |
95ca63c4 CF |
8827 | s%@DLLTOOL@%$DLLTOOL%g |
8828 | s%@WINDRES@%$WINDRES%g | |
c906108c | 8829 | s%@YACC@%$YACC%g |
75c6e08a | 8830 | s%@MIG@%$MIG%g |
c906108c | 8831 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
b4df4f68 | 8832 | s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g |
c906108c | 8833 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 8834 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
8835 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
8836 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 8837 | s%@REGEX@%$REGEX%g |
aff38e61 | 8838 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
c906108c | 8839 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 8840 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
8841 | s%@LIBGUI@%$LIBGUI%g |
8842 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
8843 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
8844 | s%@TCL_VERSION@%$TCL_VERSION%g | |
8845 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
8846 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
8847 | s%@TCL_CC@%$TCL_CC%g | |
8848 | s%@TCL_DEFS@%$TCL_DEFS%g | |
8849 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
8850 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
8851 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
8852 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
8853 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
8854 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
8855 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
8856 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
8857 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
8858 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
8859 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
8860 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
8861 | s%@TK_VERSION@%$TK_VERSION%g | |
8862 | s%@TK_DEFS@%$TK_DEFS%g | |
8863 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
8864 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
8865 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
8866 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
8867 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
8868 | s%@TCLHDIR@%$TCLHDIR%g | |
8869 | s%@TKHDIR@%$TKHDIR%g | |
8870 | s%@ITCLHDIR@%$ITCLHDIR%g | |
8871 | s%@ITKHDIR@%$ITKHDIR%g | |
8872 | s%@TIXHDIR@%$TIXHDIR%g | |
8873 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
8874 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
8875 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
8876 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
8877 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
8878 | s%@ITK_VERSION@%$ITK_VERSION%g | |
8879 | s%@ITK_DEFS@%$ITK_DEFS%g | |
8880 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
8881 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
8882 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
8883 | s%@TIX_VERSION@%$TIX_VERSION%g | |
8884 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
8885 | s%@X_CFLAGS@%$X_CFLAGS%g |
8886 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
8887 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
8888 | s%@TCL_DEPS@%$TCL_DEPS%g |
8889 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
8890 | s%@ITCLLIB@%$ITCLLIB%g |
8891 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
8892 | s%@ITKLIB@%$ITKLIB%g | |
8893 | s%@ITK_DEPS@%$ITK_DEPS%g | |
8894 | s%@TIXLIB@%$TIXLIB%g | |
8895 | s%@TIX_DEPS@%$TIX_DEPS%g | |
8896 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
8897 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 8898 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
8899 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
8900 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
8901 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
8902 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 8903 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
8904 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
8905 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 8906 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
8907 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
8908 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
8909 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
8910 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
8911 | s%@HLDFLAGS@%$HLDFLAGS%g |
8912 | s%@HLDENV@%$HLDENV%g | |
8913 | s%@target_subdir@%$target_subdir%g | |
8914 | /@host_makefile_frag@/r $host_makefile_frag | |
8915 | s%@host_makefile_frag@%%g | |
8916 | /@target_makefile_frag@/r $target_makefile_frag | |
8917 | s%@target_makefile_frag@%%g | |
8918 | s%@frags@%$frags%g | |
96baa820 | 8919 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
8920 | s%@xm_h@%$xm_h%g |
8921 | s%@tm_h@%$tm_h%g | |
8922 | s%@nm_h@%$nm_h%g | |
7a292a7a | 8923 | s%@LN_S@%$LN_S%g |
c906108c SS |
8924 | s%@EXEEXT@%$EXEEXT%g |
8925 | s%@subdirs@%$subdirs%g | |
8926 | ||
8927 | CEOF | |
8928 | EOF | |
8929 | ||
8930 | cat >> $CONFIG_STATUS <<\EOF | |
8931 | ||
8932 | # Split the substitutions into bite-sized pieces for seds with | |
8933 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
72473524 | 8934 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
8935 | ac_file=1 # Number of current file. |
8936 | ac_beg=1 # First line for current file. | |
8937 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8938 | ac_more_lines=: | |
8939 | ac_sed_cmds="" | |
8940 | while $ac_more_lines; do | |
8941 | if test $ac_beg -gt 1; then | |
8942 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8943 | else | |
8944 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8945 | fi | |
8946 | if test ! -s conftest.s$ac_file; then | |
8947 | ac_more_lines=false | |
8948 | rm -f conftest.s$ac_file | |
8949 | else | |
8950 | if test -z "$ac_sed_cmds"; then | |
8951 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8952 | else | |
8953 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8954 | fi | |
8955 | ac_file=`expr $ac_file + 1` | |
8956 | ac_beg=$ac_end | |
8957 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8958 | fi | |
8959 | done | |
8960 | if test -z "$ac_sed_cmds"; then | |
8961 | ac_sed_cmds=cat | |
8962 | fi | |
8963 | EOF | |
8964 | ||
8965 | cat >> $CONFIG_STATUS <<EOF | |
8966 | ||
ed952ac5 | 8967 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
8968 | EOF |
8969 | cat >> $CONFIG_STATUS <<\EOF | |
8970 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8971 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8972 | case "$ac_file" in | |
8973 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8974 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8975 | *) ac_file_in="${ac_file}.in" ;; | |
8976 | esac | |
8977 | ||
8978 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8979 | ||
8980 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8981 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8982 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8983 | # The file is in a subdirectory. | |
8984 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8985 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8986 | # A "../" for each directory in $ac_dir_suffix. | |
8987 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8988 | else | |
8989 | ac_dir_suffix= ac_dots= | |
8990 | fi | |
8991 | ||
8992 | case "$ac_given_srcdir" in | |
8993 | .) srcdir=. | |
8994 | if test -z "$ac_dots"; then top_srcdir=. | |
8995 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8996 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8997 | *) # Relative path. | |
8998 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8999 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9000 | esac | |
9001 | ||
9002 | case "$ac_given_INSTALL" in | |
9003 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
9004 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
9005 | esac | |
9006 | ||
9007 | echo creating "$ac_file" | |
9008 | rm -f "$ac_file" | |
9009 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9010 | case "$ac_file" in | |
9011 | *Makefile*) ac_comsub="1i\\ | |
9012 | # $configure_input" ;; | |
9013 | *) ac_comsub= ;; | |
9014 | esac | |
9015 | ||
9016 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9017 | sed -e "$ac_comsub | |
9018 | s%@configure_input@%$configure_input%g | |
9019 | s%@srcdir@%$srcdir%g | |
9020 | s%@top_srcdir@%$top_srcdir%g | |
9021 | s%@INSTALL@%$INSTALL%g | |
9022 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
9023 | fi; done | |
9024 | rm -f conftest.s* | |
9025 | ||
9026 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9027 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9028 | # | |
9029 | # ac_d sets the value in "#define NAME VALUE" lines. | |
9030 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
9031 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9032 | ac_dC='\3' | |
9033 | ac_dD='%g' | |
9034 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9035 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9036 | ac_uB='\([ ]\)%\1#\2define\3' | |
9037 | ac_uC=' ' | |
9038 | ac_uD='\4%g' | |
9039 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9040 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9041 | ac_eB='$%\1#\2define\3' | |
9042 | ac_eC=' ' | |
9043 | ac_eD='%g' | |
9044 | ||
9045 | if test "${CONFIG_HEADERS+set}" != set; then | |
9046 | EOF | |
9047 | cat >> $CONFIG_STATUS <<EOF | |
9048 | CONFIG_HEADERS="config.h:config.in" | |
9049 | EOF | |
9050 | cat >> $CONFIG_STATUS <<\EOF | |
9051 | fi | |
9052 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
9053 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9054 | case "$ac_file" in | |
9055 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9056 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9057 | *) ac_file_in="${ac_file}.in" ;; | |
9058 | esac | |
9059 | ||
9060 | echo creating $ac_file | |
9061 | ||
9062 | rm -f conftest.frag conftest.in conftest.out | |
9063 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9064 | cat $ac_file_inputs > conftest.in | |
9065 | ||
9066 | EOF | |
9067 | ||
9068 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9069 | # the proper values into config.h.in to produce config.h. And first: | |
9070 | # Protect against being on the right side of a sed subst in config.status. | |
9071 | # Protect against being in an unquoted here document in config.status. | |
9072 | rm -f conftest.vals | |
9073 | cat > conftest.hdr <<\EOF | |
9074 | s/[\\&%]/\\&/g | |
9075 | s%[\\$`]%\\&%g | |
9076 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9077 | s%ac_d%ac_u%gp | |
9078 | s%ac_u%ac_e%gp | |
9079 | EOF | |
9080 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9081 | rm -f conftest.hdr | |
9082 | ||
9083 | # This sed command replaces #undef with comments. This is necessary, for | |
9084 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9085 | # on some systems where configure will not decide to define it. | |
9086 | cat >> conftest.vals <<\EOF | |
9087 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9088 | EOF | |
9089 | ||
9090 | # Break up conftest.vals because some shells have a limit on | |
9091 | # the size of here documents, and old seds have small limits too. | |
9092 | ||
9093 | rm -f conftest.tail | |
9094 | while : | |
9095 | do | |
9096 | ac_lines=`grep -c . conftest.vals` | |
9097 | # grep -c gives empty output for an empty file on some AIX systems. | |
9098 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9099 | # Write a limited-size here document to conftest.frag. | |
9100 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9101 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
9102 | echo 'CEOF | |
9103 | sed -f conftest.frag conftest.in > conftest.out | |
9104 | rm -f conftest.in | |
9105 | mv conftest.out conftest.in | |
9106 | ' >> $CONFIG_STATUS | |
9107 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9108 | rm -f conftest.vals | |
9109 | mv conftest.tail conftest.vals | |
9110 | done | |
9111 | rm -f conftest.vals | |
9112 | ||
9113 | cat >> $CONFIG_STATUS <<\EOF | |
9114 | rm -f conftest.frag conftest.h | |
9115 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9116 | cat conftest.in >> conftest.h | |
9117 | rm -f conftest.in | |
9118 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9119 | echo "$ac_file is unchanged" | |
9120 | rm -f conftest.h | |
9121 | else | |
9122 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9123 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9124 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9125 | # The file is in a subdirectory. | |
9126 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9127 | fi | |
9128 | rm -f $ac_file | |
9129 | mv conftest.h $ac_file | |
9130 | fi | |
9131 | fi; done | |
9132 | ||
9133 | EOF | |
9134 | ||
9135 | cat >> $CONFIG_STATUS <<EOF | |
9136 | ac_sources="$files" | |
9137 | ac_dests="$links" | |
9138 | EOF | |
9139 | ||
9140 | cat >> $CONFIG_STATUS <<\EOF | |
9141 | srcdir=$ac_given_srcdir | |
9142 | while test -n "$ac_sources"; do | |
9143 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
9144 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
9145 | ||
9146 | echo "linking $srcdir/$ac_source to $ac_dest" | |
9147 | ||
9148 | if test ! -r $srcdir/$ac_source; then | |
9149 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
9150 | fi | |
9151 | rm -f $ac_dest | |
9152 | ||
9153 | # Make relative symlinks. | |
9154 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9155 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
9156 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
9157 | # The dest file is in a subdirectory. | |
9158 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
9159 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
9160 | # A "../" for each directory in $ac_dest_dir_suffix. | |
9161 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
9162 | else | |
9163 | ac_dest_dir_suffix= ac_dots= | |
9164 | fi | |
9165 | ||
9166 | case "$srcdir" in | |
9167 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
9168 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
9169 | esac | |
9170 | ||
9171 | # Make a symlink if possible; otherwise try a hard link. | |
9172 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
9173 | ln $srcdir/$ac_source $ac_dest; then : | |
9174 | else | |
9175 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
9176 | fi | |
9177 | done | |
9178 | EOF | |
9179 | cat >> $CONFIG_STATUS <<EOF | |
9180 | ||
9181 | gdb_host_cpu=$gdb_host_cpu | |
9182 | gdb_target_cpu=$gdb_target_cpu | |
9183 | nativefile=$nativefile | |
9184 | ||
9185 | EOF | |
9186 | cat >> $CONFIG_STATUS <<\EOF | |
9187 | ||
9188 | if test "${nativefile}" = ""; then | |
9189 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ | |
9190 | < Makefile > Makefile.tem | |
9191 | mv -f Makefile.tem Makefile | |
9192 | fi | |
9193 | ||
9194 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
9195 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
9196 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
9197 | mv -f Makefile.tmp Makefile | |
9198 | ||
2acceee2 | 9199 | |
c906108c SS |
9200 | case x$CONFIG_HEADERS in |
9201 | xconfig.h:config.in) | |
9202 | echo > stamp-h ;; | |
9203 | esac | |
9204 | ||
9205 | exit 0 | |
9206 | EOF | |
9207 | chmod +x $CONFIG_STATUS | |
9208 | rm -fr confdefs* $ac_clean_files | |
9209 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
9210 | ||
9211 | if test "$no_recursion" != yes; then | |
9212 | ||
9213 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
9214 | ac_sub_configure_args= | |
9215 | ac_prev= | |
9216 | for ac_arg in $ac_configure_args; do | |
9217 | if test -n "$ac_prev"; then | |
9218 | ac_prev= | |
9219 | continue | |
9220 | fi | |
9221 | case "$ac_arg" in | |
9222 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
9223 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
9224 | ac_prev=cache_file ;; | |
9225 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
9226 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
9227 | ;; | |
9228 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
9229 | ac_prev=srcdir ;; | |
9230 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
9231 | ;; | |
9232 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
9233 | esac | |
9234 | done | |
9235 | ||
9236 | for ac_config_dir in $configdirs; do | |
9237 | ||
9238 | # Do not complain, so a configure script can configure whichever | |
9239 | # parts of a large source tree are present. | |
9240 | if test ! -d $srcdir/$ac_config_dir; then | |
9241 | continue | |
9242 | fi | |
9243 | ||
9244 | echo configuring in $ac_config_dir | |
9245 | ||
9246 | case "$srcdir" in | |
9247 | .) ;; | |
9248 | *) | |
9249 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
9250 | else | |
9251 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
9252 | fi | |
9253 | ;; | |
9254 | esac | |
9255 | ||
9256 | ac_popdir=`pwd` | |
9257 | cd $ac_config_dir | |
9258 | ||
9259 | # A "../" for each directory in /$ac_config_dir. | |
9260 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
9261 | ||
9262 | case "$srcdir" in | |
9263 | .) # No --srcdir option. We are building in place. | |
9264 | ac_sub_srcdir=$srcdir ;; | |
9265 | /*) # Absolute path. | |
9266 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
9267 | *) # Relative path. | |
9268 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
9269 | esac | |
9270 | ||
9271 | # Check for guested configure; otherwise get Cygnus style configure. | |
9272 | if test -f $ac_sub_srcdir/configure; then | |
9273 | ac_sub_configure=$ac_sub_srcdir/configure | |
9274 | elif test -f $ac_sub_srcdir/configure.in; then | |
9275 | ac_sub_configure=$ac_configure | |
9276 | else | |
9277 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
9278 | ac_sub_configure= | |
9279 | fi | |
9280 | ||
9281 | # The recursion is here. | |
9282 | if test -n "$ac_sub_configure"; then | |
9283 | ||
9284 | # Make the cache file name correct relative to the subdirectory. | |
9285 | case "$cache_file" in | |
9286 | /*) ac_sub_cache_file=$cache_file ;; | |
9287 | *) # Relative path. | |
9288 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
9289 | esac | |
9290 | case "$ac_given_INSTALL" in | |
9291 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
9292 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
9293 | esac | |
9294 | ||
9295 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
9296 | # The eval makes quoting arguments work. | |
9297 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
9298 | then : | |
9299 | else | |
9300 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
9301 | fi | |
9302 | fi | |
9303 | ||
9304 | cd $ac_popdir | |
9305 | done | |
9306 | fi | |
9307 | ||
9308 | ||
9309 | exit 0 |