]>
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" | |
fb40c209 AC |
23 | ac_help="$ac_help |
24 | --enable-gdbmi Enable GDB-MI interface" | |
c906108c SS |
25 | ac_help="$ac_help |
26 | --enable-tui Enable full-screen terminal user interface" | |
27 | ac_help="$ac_help | |
28 | --enable-netrom Enable NetROM support" | |
29 | ac_help="$ac_help | |
30 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
31 | ac_help="$ac_help |
32 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
33 | ac_help="$ac_help |
34 | --with-mmalloc Use memory mapped malloc package" | |
88987551 L |
35 | ac_help="$ac_help |
36 | --with-included-regex Use included regex" | |
7a292a7a SS |
37 | ac_help="$ac_help |
38 | --with-cpu=CPU Set the default CPU variant to debug" | |
39 | ac_help="$ac_help | |
40 | --enable-gdbtk Enable GDBTK GUI front end" | |
41 | ac_help="$ac_help | |
42 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
43 | ac_help="$ac_help | |
44 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
45 | ac_help="$ac_help | |
46 | --with-tclinclude=DIR Directory where tcl private headers are" | |
47 | ac_help="$ac_help | |
48 | --with-tkinclude=DIR Directory where tk private headers are" | |
49 | ac_help="$ac_help | |
50 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
51 | ac_help="$ac_help | |
52 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
53 | ac_help="$ac_help | |
54 | --with-tixconfig Directory containing tix configuration (tixConfig.sh)" | |
c906108c SS |
55 | ac_help="$ac_help |
56 | --with-x use the X Window System" | |
7a292a7a SS |
57 | ac_help="$ac_help |
58 | --enable-sim Link gdb with simulator" | |
c906108c SS |
59 | ac_help="$ac_help |
60 | --enable-shared Use shared libraries" | |
61 | ||
62 | # Initialize some variables set by options. | |
63 | # The variables have the same names as the options, with | |
64 | # dashes changed to underlines. | |
65 | build=NONE | |
66 | cache_file=./config.cache | |
67 | exec_prefix=NONE | |
68 | host=NONE | |
69 | no_create= | |
70 | nonopt=NONE | |
71 | no_recursion= | |
72 | prefix=NONE | |
73 | program_prefix=NONE | |
74 | program_suffix=NONE | |
75 | program_transform_name=s,x,x, | |
76 | silent= | |
77 | site= | |
3b851bce | 78 | sitefile= |
c906108c SS |
79 | srcdir= |
80 | target=NONE | |
81 | verbose= | |
82 | x_includes=NONE | |
83 | x_libraries=NONE | |
84 | bindir='${exec_prefix}/bin' | |
85 | sbindir='${exec_prefix}/sbin' | |
86 | libexecdir='${exec_prefix}/libexec' | |
87 | datadir='${prefix}/share' | |
88 | sysconfdir='${prefix}/etc' | |
89 | sharedstatedir='${prefix}/com' | |
90 | localstatedir='${prefix}/var' | |
91 | libdir='${exec_prefix}/lib' | |
92 | includedir='${prefix}/include' | |
93 | oldincludedir='/usr/include' | |
94 | infodir='${prefix}/info' | |
95 | mandir='${prefix}/man' | |
96 | ||
97 | # Initialize some other variables. | |
98 | subdirs= | |
99 | MFLAGS= MAKEFLAGS= | |
100 | SHELL=${CONFIG_SHELL-/bin/sh} | |
101 | # Maximum number of lines to put in a shell here document. | |
102 | ac_max_here_lines=12 | |
103 | ||
104 | ac_prev= | |
105 | for ac_option | |
106 | do | |
107 | ||
108 | # If the previous option needs an argument, assign it. | |
109 | if test -n "$ac_prev"; then | |
110 | eval "$ac_prev=\$ac_option" | |
111 | ac_prev= | |
112 | continue | |
113 | fi | |
114 | ||
115 | case "$ac_option" in | |
116 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
117 | *) ac_optarg= ;; | |
118 | esac | |
119 | ||
120 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
121 | ||
122 | case "$ac_option" in | |
123 | ||
124 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
125 | ac_prev=bindir ;; | |
126 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
127 | bindir="$ac_optarg" ;; | |
128 | ||
129 | -build | --build | --buil | --bui | --bu) | |
130 | ac_prev=build ;; | |
131 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
132 | build="$ac_optarg" ;; | |
133 | ||
134 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
135 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
136 | ac_prev=cache_file ;; | |
137 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
138 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
139 | cache_file="$ac_optarg" ;; | |
140 | ||
141 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
142 | ac_prev=datadir ;; | |
143 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
144 | | --da=*) | |
145 | datadir="$ac_optarg" ;; | |
146 | ||
147 | -disable-* | --disable-*) | |
148 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
149 | # Reject names that are not valid shell variable names. | |
150 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
151 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
152 | fi | |
153 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
154 | eval "enable_${ac_feature}=no" ;; | |
155 | ||
156 | -enable-* | --enable-*) | |
157 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
158 | # Reject names that are not valid shell variable names. | |
159 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
160 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
161 | fi | |
162 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
163 | case "$ac_option" in | |
164 | *=*) ;; | |
165 | *) ac_optarg=yes ;; | |
166 | esac | |
167 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
168 | ||
169 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
170 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
171 | | --exec | --exe | --ex) | |
172 | ac_prev=exec_prefix ;; | |
173 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
174 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
175 | | --exec=* | --exe=* | --ex=*) | |
176 | exec_prefix="$ac_optarg" ;; | |
177 | ||
178 | -gas | --gas | --ga | --g) | |
179 | # Obsolete; use --with-gas. | |
180 | with_gas=yes ;; | |
181 | ||
182 | -help | --help | --hel | --he) | |
183 | # Omit some internal or obsolete options to make the list less imposing. | |
184 | # This message is too long to be a string in the A/UX 3.1 sh. | |
185 | cat << EOF | |
186 | Usage: configure [options] [host] | |
187 | Options: [defaults in brackets after descriptions] | |
188 | Configuration: | |
189 | --cache-file=FILE cache test results in FILE | |
190 | --help print this message | |
191 | --no-create do not create output files | |
192 | --quiet, --silent do not print \`checking...' messages | |
3b851bce | 193 | --site-file=FILE use FILE as the site file |
c906108c SS |
194 | --version print the version of autoconf that created configure |
195 | Directory and file names: | |
196 | --prefix=PREFIX install architecture-independent files in PREFIX | |
197 | [$ac_default_prefix] | |
198 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
199 | [same as prefix] | |
200 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
201 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
202 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
203 | --datadir=DIR read-only architecture-independent data in DIR | |
204 | [PREFIX/share] | |
205 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
206 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
207 | [PREFIX/com] | |
208 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
209 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
210 | --includedir=DIR C header files in DIR [PREFIX/include] | |
211 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
212 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
213 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
214 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
215 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
216 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
217 | --program-transform-name=PROGRAM | |
218 | run sed PROGRAM on installed program names | |
219 | EOF | |
220 | cat << EOF | |
221 | Host type: | |
222 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
223 | --host=HOST configure for HOST [guessed] | |
224 | --target=TARGET configure for TARGET [TARGET=HOST] | |
225 | Features and packages: | |
226 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
227 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
228 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
229 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
230 | --x-includes=DIR X include files are in DIR | |
231 | --x-libraries=DIR X library files are in DIR | |
232 | EOF | |
233 | if test -n "$ac_help"; then | |
234 | echo "--enable and --with options recognized:$ac_help" | |
235 | fi | |
236 | exit 0 ;; | |
237 | ||
238 | -host | --host | --hos | --ho) | |
239 | ac_prev=host ;; | |
240 | -host=* | --host=* | --hos=* | --ho=*) | |
241 | host="$ac_optarg" ;; | |
242 | ||
243 | -includedir | --includedir | --includedi | --included | --include \ | |
244 | | --includ | --inclu | --incl | --inc) | |
245 | ac_prev=includedir ;; | |
246 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
247 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
248 | includedir="$ac_optarg" ;; | |
249 | ||
250 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
251 | ac_prev=infodir ;; | |
252 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
253 | infodir="$ac_optarg" ;; | |
254 | ||
255 | -libdir | --libdir | --libdi | --libd) | |
256 | ac_prev=libdir ;; | |
257 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
258 | libdir="$ac_optarg" ;; | |
259 | ||
260 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
261 | | --libexe | --libex | --libe) | |
262 | ac_prev=libexecdir ;; | |
263 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
264 | | --libexe=* | --libex=* | --libe=*) | |
265 | libexecdir="$ac_optarg" ;; | |
266 | ||
267 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
268 | | --localstate | --localstat | --localsta | --localst \ | |
269 | | --locals | --local | --loca | --loc | --lo) | |
270 | ac_prev=localstatedir ;; | |
271 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
272 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
273 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
274 | localstatedir="$ac_optarg" ;; | |
275 | ||
276 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
277 | ac_prev=mandir ;; | |
278 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
279 | mandir="$ac_optarg" ;; | |
280 | ||
281 | -nfp | --nfp | --nf) | |
282 | # Obsolete; use --without-fp. | |
283 | with_fp=no ;; | |
284 | ||
285 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
286 | | --no-cr | --no-c) | |
287 | no_create=yes ;; | |
288 | ||
289 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
290 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
291 | no_recursion=yes ;; | |
292 | ||
293 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
294 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
295 | | --oldin | --oldi | --old | --ol | --o) | |
296 | ac_prev=oldincludedir ;; | |
297 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
298 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
299 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
300 | oldincludedir="$ac_optarg" ;; | |
301 | ||
302 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
303 | ac_prev=prefix ;; | |
304 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
305 | prefix="$ac_optarg" ;; | |
306 | ||
307 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
308 | | --program-pre | --program-pr | --program-p) | |
309 | ac_prev=program_prefix ;; | |
310 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
311 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
312 | program_prefix="$ac_optarg" ;; | |
313 | ||
314 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
315 | | --program-suf | --program-su | --program-s) | |
316 | ac_prev=program_suffix ;; | |
317 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
318 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
319 | program_suffix="$ac_optarg" ;; | |
320 | ||
321 | -program-transform-name | --program-transform-name \ | |
322 | | --program-transform-nam | --program-transform-na \ | |
323 | | --program-transform-n | --program-transform- \ | |
324 | | --program-transform | --program-transfor \ | |
325 | | --program-transfo | --program-transf \ | |
326 | | --program-trans | --program-tran \ | |
327 | | --progr-tra | --program-tr | --program-t) | |
328 | ac_prev=program_transform_name ;; | |
329 | -program-transform-name=* | --program-transform-name=* \ | |
330 | | --program-transform-nam=* | --program-transform-na=* \ | |
331 | | --program-transform-n=* | --program-transform-=* \ | |
332 | | --program-transform=* | --program-transfor=* \ | |
333 | | --program-transfo=* | --program-transf=* \ | |
334 | | --program-trans=* | --program-tran=* \ | |
335 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
336 | program_transform_name="$ac_optarg" ;; | |
337 | ||
338 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
339 | | -silent | --silent | --silen | --sile | --sil) | |
340 | silent=yes ;; | |
341 | ||
342 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
343 | ac_prev=sbindir ;; | |
344 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
345 | | --sbi=* | --sb=*) | |
346 | sbindir="$ac_optarg" ;; | |
347 | ||
348 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
349 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
350 | | --sharedst | --shareds | --shared | --share | --shar \ | |
351 | | --sha | --sh) | |
352 | ac_prev=sharedstatedir ;; | |
353 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
354 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
355 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
356 | | --sha=* | --sh=*) | |
357 | sharedstatedir="$ac_optarg" ;; | |
358 | ||
359 | -site | --site | --sit) | |
360 | ac_prev=site ;; | |
361 | -site=* | --site=* | --sit=*) | |
362 | site="$ac_optarg" ;; | |
363 | ||
3b851bce AC |
364 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
365 | ac_prev=sitefile ;; | |
366 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
367 | sitefile="$ac_optarg" ;; | |
368 | ||
c906108c SS |
369 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
370 | ac_prev=srcdir ;; | |
371 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
372 | srcdir="$ac_optarg" ;; | |
373 | ||
374 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
375 | | --syscon | --sysco | --sysc | --sys | --sy) | |
376 | ac_prev=sysconfdir ;; | |
377 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
378 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
379 | sysconfdir="$ac_optarg" ;; | |
380 | ||
381 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
382 | ac_prev=target ;; | |
383 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
384 | target="$ac_optarg" ;; | |
385 | ||
386 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
387 | verbose=yes ;; | |
388 | ||
389 | -version | --version | --versio | --versi | --vers) | |
390 | echo "configure generated by autoconf version 2.13" | |
391 | exit 0 ;; | |
392 | ||
393 | -with-* | --with-*) | |
394 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
395 | # Reject names that are not valid shell variable names. | |
396 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
397 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
398 | fi | |
399 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
400 | case "$ac_option" in | |
401 | *=*) ;; | |
402 | *) ac_optarg=yes ;; | |
403 | esac | |
404 | eval "with_${ac_package}='$ac_optarg'" ;; | |
405 | ||
406 | -without-* | --without-*) | |
407 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
408 | # Reject names that are not valid shell variable names. | |
409 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
410 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
411 | fi | |
412 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
413 | eval "with_${ac_package}=no" ;; | |
414 | ||
415 | --x) | |
416 | # Obsolete; use --with-x. | |
417 | with_x=yes ;; | |
418 | ||
419 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
420 | | --x-incl | --x-inc | --x-in | --x-i) | |
421 | ac_prev=x_includes ;; | |
422 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
423 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
424 | x_includes="$ac_optarg" ;; | |
425 | ||
426 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
427 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
428 | ac_prev=x_libraries ;; | |
429 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
430 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
431 | x_libraries="$ac_optarg" ;; | |
432 | ||
433 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
434 | ;; | |
435 | ||
436 | *) | |
437 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
438 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
439 | fi | |
440 | if test "x$nonopt" != xNONE; then | |
441 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
442 | fi | |
443 | nonopt="$ac_option" | |
444 | ;; | |
445 | ||
446 | esac | |
447 | done | |
448 | ||
449 | if test -n "$ac_prev"; then | |
450 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
451 | fi | |
452 | ||
453 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
454 | ||
455 | # File descriptor usage: | |
456 | # 0 standard input | |
457 | # 1 file creation | |
458 | # 2 errors and warnings | |
459 | # 3 some systems may open it to /dev/tty | |
460 | # 4 used on the Kubota Titan | |
461 | # 6 checking for... messages and results | |
462 | # 5 compiler messages saved in config.log | |
463 | if test "$silent" = yes; then | |
464 | exec 6>/dev/null | |
465 | else | |
466 | exec 6>&1 | |
467 | fi | |
468 | exec 5>./config.log | |
469 | ||
470 | echo "\ | |
471 | This file contains any messages produced by compilers while | |
472 | running configure, to aid debugging if configure makes a mistake. | |
473 | " 1>&5 | |
474 | ||
475 | # Strip out --no-create and --no-recursion so they do not pile up. | |
476 | # Also quote any args containing shell metacharacters. | |
477 | ac_configure_args= | |
478 | for ac_arg | |
479 | do | |
480 | case "$ac_arg" in | |
481 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
482 | | --no-cr | --no-c) ;; | |
483 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
484 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
485 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
486 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
487 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
488 | esac | |
489 | done | |
490 | ||
491 | # NLS nuisances. | |
492 | # Only set these to C if already set. These must not be set unconditionally | |
493 | # because not all systems understand e.g. LANG=C (notably SCO). | |
494 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
495 | # Non-C LC_CTYPE values break the ctype check. | |
496 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
497 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
498 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
499 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
500 | ||
501 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
502 | rm -rf conftest* confdefs.h | |
503 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
504 | echo > confdefs.h | |
505 | ||
506 | # A filename unique to this package, relative to the directory that | |
507 | # configure is in, which we can look for to find out if srcdir is correct. | |
508 | ac_unique_file=main.c | |
509 | ||
510 | # Find the source files, if location was not specified. | |
511 | if test -z "$srcdir"; then | |
512 | ac_srcdir_defaulted=yes | |
513 | # Try the directory containing this script, then its parent. | |
514 | ac_prog=$0 | |
515 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
516 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
517 | srcdir=$ac_confdir | |
518 | if test ! -r $srcdir/$ac_unique_file; then | |
519 | srcdir=.. | |
520 | fi | |
521 | else | |
522 | ac_srcdir_defaulted=no | |
523 | fi | |
524 | if test ! -r $srcdir/$ac_unique_file; then | |
525 | if test "$ac_srcdir_defaulted" = yes; then | |
526 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
527 | else | |
528 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
529 | fi | |
530 | fi | |
531 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
532 | ||
533 | # Prefer explicitly selected file to automatically selected ones. | |
3b851bce AC |
534 | if test -z "$sitefile"; then |
535 | if test -z "$CONFIG_SITE"; then | |
536 | if test "x$prefix" != xNONE; then | |
537 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
538 | else | |
539 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
540 | fi | |
c906108c | 541 | fi |
3b851bce AC |
542 | else |
543 | CONFIG_SITE="$sitefile" | |
c906108c SS |
544 | fi |
545 | for ac_site_file in $CONFIG_SITE; do | |
546 | if test -r "$ac_site_file"; then | |
547 | echo "loading site script $ac_site_file" | |
548 | . "$ac_site_file" | |
549 | fi | |
550 | done | |
551 | ||
552 | if test -r "$cache_file"; then | |
553 | echo "loading cache $cache_file" | |
554 | . $cache_file | |
555 | else | |
556 | echo "creating cache $cache_file" | |
557 | > $cache_file | |
558 | fi | |
559 | ||
560 | ac_ext=c | |
561 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
562 | ac_cpp='$CPP $CPPFLAGS' | |
563 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
564 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
565 | cross_compiling=$ac_cv_prog_cc_cross | |
566 | ||
567 | ac_exeext= | |
568 | ac_objext=o | |
569 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
570 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
571 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
572 | ac_n= ac_c=' | |
573 | ' ac_t=' ' | |
574 | else | |
575 | ac_n=-n ac_c= ac_t= | |
576 | fi | |
577 | else | |
578 | ac_n= ac_c='\c' ac_t= | |
579 | fi | |
580 | ||
581 | ||
582 | ||
413ccac7 | 583 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
3b851bce | 584 | echo "configure:585: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
585 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
586 | if test "${enable_maintainer_mode+set}" = set; then | |
587 | enableval="$enable_maintainer_mode" | |
588 | USE_MAINTAINER_MODE=$enableval | |
589 | else | |
590 | USE_MAINTAINER_MODE=no | |
591 | fi | |
592 | ||
593 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
594 | ||
595 | ||
596 | if test $USE_MAINTAINER_MODE = yes; then | |
597 | MAINTAINER_MODE_TRUE= | |
598 | MAINTAINER_MODE_FALSE='#' | |
599 | else | |
600 | MAINTAINER_MODE_TRUE='#' | |
601 | MAINTAINER_MODE_FALSE= | |
602 | fi | |
603 | MAINT=$MAINTAINER_MODE_TRUE | |
604 | ||
605 | ||
c906108c SS |
606 | |
607 | # Extract the first word of "gcc", so it can be a program name with args. | |
608 | set dummy gcc; ac_word=$2 | |
609 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 610 | echo "configure:611: checking for $ac_word" >&5 |
c906108c SS |
611 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
613 | else | |
614 | if test -n "$CC"; then | |
615 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
616 | else | |
617 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
618 | ac_dummy="$PATH" | |
619 | for ac_dir in $ac_dummy; do | |
620 | test -z "$ac_dir" && ac_dir=. | |
621 | if test -f $ac_dir/$ac_word; then | |
622 | ac_cv_prog_CC="gcc" | |
623 | break | |
624 | fi | |
625 | done | |
626 | IFS="$ac_save_ifs" | |
627 | fi | |
628 | fi | |
629 | CC="$ac_cv_prog_CC" | |
630 | if test -n "$CC"; then | |
631 | echo "$ac_t""$CC" 1>&6 | |
632 | else | |
633 | echo "$ac_t""no" 1>&6 | |
634 | fi | |
635 | ||
636 | if test -z "$CC"; then | |
637 | # Extract the first word of "cc", so it can be a program name with args. | |
638 | set dummy cc; ac_word=$2 | |
639 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 640 | echo "configure:641: checking for $ac_word" >&5 |
c906108c SS |
641 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
643 | else | |
644 | if test -n "$CC"; then | |
645 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
646 | else | |
647 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
648 | ac_prog_rejected=no | |
649 | ac_dummy="$PATH" | |
650 | for ac_dir in $ac_dummy; do | |
651 | test -z "$ac_dir" && ac_dir=. | |
652 | if test -f $ac_dir/$ac_word; then | |
653 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
654 | ac_prog_rejected=yes | |
655 | continue | |
656 | fi | |
657 | ac_cv_prog_CC="cc" | |
658 | break | |
659 | fi | |
660 | done | |
661 | IFS="$ac_save_ifs" | |
662 | if test $ac_prog_rejected = yes; then | |
663 | # We found a bogon in the path, so make sure we never use it. | |
664 | set dummy $ac_cv_prog_CC | |
665 | shift | |
666 | if test $# -gt 0; then | |
667 | # We chose a different compiler from the bogus one. | |
668 | # However, it has the same basename, so the bogon will be chosen | |
669 | # first if we set CC to just the basename; use the full file name. | |
670 | shift | |
671 | set dummy "$ac_dir/$ac_word" "$@" | |
672 | shift | |
673 | ac_cv_prog_CC="$@" | |
674 | fi | |
675 | fi | |
676 | fi | |
677 | fi | |
678 | CC="$ac_cv_prog_CC" | |
679 | if test -n "$CC"; then | |
680 | echo "$ac_t""$CC" 1>&6 | |
681 | else | |
682 | echo "$ac_t""no" 1>&6 | |
683 | fi | |
684 | ||
685 | if test -z "$CC"; then | |
686 | case "`uname -s`" in | |
687 | *win32* | *WIN32*) | |
688 | # Extract the first word of "cl", so it can be a program name with args. | |
689 | set dummy cl; ac_word=$2 | |
690 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 691 | echo "configure:692: checking for $ac_word" >&5 |
c906108c SS |
692 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
694 | else | |
695 | if test -n "$CC"; then | |
696 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
697 | else | |
698 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
699 | ac_dummy="$PATH" | |
700 | for ac_dir in $ac_dummy; do | |
701 | test -z "$ac_dir" && ac_dir=. | |
702 | if test -f $ac_dir/$ac_word; then | |
703 | ac_cv_prog_CC="cl" | |
704 | break | |
705 | fi | |
706 | done | |
707 | IFS="$ac_save_ifs" | |
708 | fi | |
709 | fi | |
710 | CC="$ac_cv_prog_CC" | |
711 | if test -n "$CC"; then | |
712 | echo "$ac_t""$CC" 1>&6 | |
713 | else | |
714 | echo "$ac_t""no" 1>&6 | |
715 | fi | |
716 | ;; | |
717 | esac | |
718 | fi | |
719 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
720 | fi | |
721 | ||
722 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
3b851bce | 723 | echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
724 | |
725 | ac_ext=c | |
726 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
727 | ac_cpp='$CPP $CPPFLAGS' | |
728 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
729 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
730 | cross_compiling=$ac_cv_prog_cc_cross | |
731 | ||
732 | cat > conftest.$ac_ext << EOF | |
733 | ||
3b851bce | 734 | #line 735 "configure" |
c906108c SS |
735 | #include "confdefs.h" |
736 | ||
737 | main(){return(0);} | |
738 | EOF | |
3b851bce | 739 | if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
740 | ac_cv_prog_cc_works=yes |
741 | # If we can't run a trivial program, we are probably using a cross compiler. | |
742 | if (./conftest; exit) 2>/dev/null; then | |
743 | ac_cv_prog_cc_cross=no | |
744 | else | |
745 | ac_cv_prog_cc_cross=yes | |
746 | fi | |
747 | else | |
748 | echo "configure: failed program was:" >&5 | |
749 | cat conftest.$ac_ext >&5 | |
750 | ac_cv_prog_cc_works=no | |
751 | fi | |
752 | rm -fr conftest* | |
753 | ac_ext=c | |
754 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
755 | ac_cpp='$CPP $CPPFLAGS' | |
756 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
757 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
758 | cross_compiling=$ac_cv_prog_cc_cross | |
759 | ||
760 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
761 | if test $ac_cv_prog_cc_works = no; then | |
762 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
763 | fi | |
764 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
3b851bce | 765 | echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
766 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
767 | cross_compiling=$ac_cv_prog_cc_cross | |
768 | ||
769 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
3b851bce | 770 | echo "configure:771: checking whether we are using GNU C" >&5 |
c906108c SS |
771 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
773 | else | |
774 | cat > conftest.c <<EOF | |
775 | #ifdef __GNUC__ | |
776 | yes; | |
777 | #endif | |
778 | EOF | |
3b851bce | 779 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
780 | ac_cv_prog_gcc=yes |
781 | else | |
782 | ac_cv_prog_gcc=no | |
783 | fi | |
784 | fi | |
785 | ||
786 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
787 | ||
788 | if test $ac_cv_prog_gcc = yes; then | |
789 | GCC=yes | |
790 | else | |
791 | GCC= | |
792 | fi | |
793 | ||
794 | ac_test_CFLAGS="${CFLAGS+set}" | |
795 | ac_save_CFLAGS="$CFLAGS" | |
796 | CFLAGS= | |
797 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
3b851bce | 798 | echo "configure:799: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
799 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
800 | echo $ac_n "(cached) $ac_c" 1>&6 | |
801 | else | |
802 | echo 'void f(){}' > conftest.c | |
803 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
804 | ac_cv_prog_cc_g=yes | |
805 | else | |
806 | ac_cv_prog_cc_g=no | |
807 | fi | |
808 | rm -f conftest* | |
809 | ||
810 | fi | |
811 | ||
812 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
813 | if test "$ac_test_CFLAGS" = set; then | |
814 | CFLAGS="$ac_save_CFLAGS" | |
815 | elif test $ac_cv_prog_cc_g = yes; then | |
816 | if test "$GCC" = yes; then | |
817 | CFLAGS="-g -O2" | |
818 | else | |
819 | CFLAGS="-g" | |
820 | fi | |
821 | else | |
822 | if test "$GCC" = yes; then | |
823 | CFLAGS="-O2" | |
824 | else | |
825 | CFLAGS= | |
826 | fi | |
827 | fi | |
828 | ||
829 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
3b851bce | 830 | echo "configure:831: checking how to run the C preprocessor" >&5 |
c906108c SS |
831 | # On Suns, sometimes $CPP names a directory. |
832 | if test -n "$CPP" && test -d "$CPP"; then | |
833 | CPP= | |
834 | fi | |
835 | if test -z "$CPP"; then | |
836 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
838 | else | |
839 | # This must be in double quotes, not single quotes, because CPP may get | |
840 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
841 | CPP="${CC-cc} -E" | |
842 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
843 | # not just through cpp. | |
844 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 845 | #line 846 "configure" |
c906108c SS |
846 | #include "confdefs.h" |
847 | #include <assert.h> | |
848 | Syntax Error | |
849 | EOF | |
850 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 851 | { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
852 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
853 | if test -z "$ac_err"; then | |
854 | : | |
855 | else | |
856 | echo "$ac_err" >&5 | |
857 | echo "configure: failed program was:" >&5 | |
858 | cat conftest.$ac_ext >&5 | |
859 | rm -rf conftest* | |
860 | CPP="${CC-cc} -E -traditional-cpp" | |
861 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 862 | #line 863 "configure" |
c906108c SS |
863 | #include "confdefs.h" |
864 | #include <assert.h> | |
865 | Syntax Error | |
866 | EOF | |
867 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 868 | { (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
869 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
870 | if test -z "$ac_err"; then | |
871 | : | |
872 | else | |
873 | echo "$ac_err" >&5 | |
874 | echo "configure: failed program was:" >&5 | |
875 | cat conftest.$ac_ext >&5 | |
876 | rm -rf conftest* | |
877 | CPP="${CC-cc} -nologo -E" | |
878 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 879 | #line 880 "configure" |
c906108c SS |
880 | #include "confdefs.h" |
881 | #include <assert.h> | |
882 | Syntax Error | |
883 | EOF | |
884 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 885 | { (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
886 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
887 | if test -z "$ac_err"; then | |
888 | : | |
889 | else | |
890 | echo "$ac_err" >&5 | |
891 | echo "configure: failed program was:" >&5 | |
892 | cat conftest.$ac_ext >&5 | |
893 | rm -rf conftest* | |
894 | CPP=/lib/cpp | |
895 | fi | |
896 | rm -f conftest* | |
897 | fi | |
898 | rm -f conftest* | |
899 | fi | |
900 | rm -f conftest* | |
901 | ac_cv_prog_CPP="$CPP" | |
902 | fi | |
903 | CPP="$ac_cv_prog_CPP" | |
904 | else | |
905 | ac_cv_prog_CPP="$CPP" | |
906 | fi | |
907 | echo "$ac_t""$CPP" 1>&6 | |
908 | ||
909 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
3b851bce | 910 | echo "configure:911: checking for AIX" >&5 |
c906108c | 911 | cat > conftest.$ac_ext <<EOF |
3b851bce | 912 | #line 913 "configure" |
c906108c SS |
913 | #include "confdefs.h" |
914 | #ifdef _AIX | |
915 | yes | |
916 | #endif | |
917 | ||
918 | EOF | |
919 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
920 | egrep "yes" >/dev/null 2>&1; then | |
921 | rm -rf conftest* | |
922 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
923 | #define _ALL_SOURCE 1 | |
924 | EOF | |
925 | ||
926 | else | |
927 | rm -rf conftest* | |
928 | echo "$ac_t""no" 1>&6 | |
929 | fi | |
930 | rm -f conftest* | |
931 | ||
932 | ||
933 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
3b851bce | 934 | echo "configure:935: checking for POSIXized ISC" >&5 |
c906108c SS |
935 | if test -d /etc/conf/kconfig.d && |
936 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
937 | then | |
938 | echo "$ac_t""yes" 1>&6 | |
939 | ISC=yes # If later tests want to check for ISC. | |
940 | cat >> confdefs.h <<\EOF | |
941 | #define _POSIX_SOURCE 1 | |
942 | EOF | |
943 | ||
944 | if test "$GCC" = yes; then | |
945 | CC="$CC -posix" | |
946 | else | |
947 | CC="$CC -Xp" | |
948 | fi | |
949 | else | |
950 | echo "$ac_t""no" 1>&6 | |
951 | ISC= | |
952 | fi | |
953 | ||
954 | ||
955 | ||
956 | ||
957 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
3b851bce | 958 | echo "configure:959: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
959 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
960 | echo $ac_n "(cached) $ac_c" 1>&6 | |
961 | else | |
962 | am_cv_prog_cc_stdc=no | |
963 | ac_save_CC="$CC" | |
964 | # Don't try gcc -ansi; that turns off useful extensions and | |
965 | # breaks some systems' header files. | |
966 | # AIX -qlanglvl=ansi | |
967 | # Ultrix and OSF/1 -std1 | |
968 | # HP-UX -Aa -D_HPUX_SOURCE | |
969 | # SVR4 -Xc -D__EXTENSIONS__ | |
970 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
971 | do | |
972 | CC="$ac_save_CC $ac_arg" | |
973 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 974 | #line 975 "configure" |
c906108c SS |
975 | #include "confdefs.h" |
976 | #include <stdarg.h> | |
977 | #include <stdio.h> | |
978 | #include <sys/types.h> | |
979 | #include <sys/stat.h> | |
980 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
981 | struct buf { int x; }; | |
982 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
983 | static char *e (p, i) | |
984 | char **p; | |
985 | int i; | |
986 | { | |
987 | return p[i]; | |
988 | } | |
989 | static char *f (char * (*g) (char **, int), char **p, ...) | |
990 | { | |
991 | char *s; | |
992 | va_list v; | |
993 | va_start (v,p); | |
994 | s = g (p, va_arg (v,int)); | |
995 | va_end (v); | |
996 | return s; | |
997 | } | |
998 | int test (int i, double x); | |
999 | struct s1 {int (*f) (int a);}; | |
1000 | struct s2 {int (*f) (double a);}; | |
1001 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1002 | int argc; | |
1003 | char **argv; | |
1004 | ||
1005 | int main() { | |
1006 | ||
1007 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1008 | ||
1009 | ; return 0; } | |
1010 | EOF | |
3b851bce | 1011 | if { (eval echo configure:1012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1012 | rm -rf conftest* |
1013 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1014 | else | |
1015 | echo "configure: failed program was:" >&5 | |
1016 | cat conftest.$ac_ext >&5 | |
1017 | fi | |
1018 | rm -f conftest* | |
1019 | done | |
1020 | CC="$ac_save_CC" | |
1021 | ||
1022 | fi | |
1023 | ||
1024 | if test -z "$am_cv_prog_cc_stdc"; then | |
1025 | echo "$ac_t""none needed" 1>&6 | |
1026 | else | |
1027 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1028 | fi | |
1029 | case "x$am_cv_prog_cc_stdc" in | |
1030 | x|xno) ;; | |
1031 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1032 | esac | |
1033 | ||
1034 | ||
1035 | ac_aux_dir= | |
1036 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1037 | if test -f $ac_dir/install-sh; then | |
1038 | ac_aux_dir=$ac_dir | |
1039 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1040 | break | |
1041 | elif test -f $ac_dir/install.sh; then | |
1042 | ac_aux_dir=$ac_dir | |
1043 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1044 | break | |
1045 | fi | |
1046 | done | |
1047 | if test -z "$ac_aux_dir"; then | |
1048 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1049 | fi | |
1050 | ac_config_guess=$ac_aux_dir/config.guess | |
1051 | ac_config_sub=$ac_aux_dir/config.sub | |
1052 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1053 | ||
1054 | ||
1055 | # Do some error checking and defaulting for the host and target type. | |
1056 | # The inputs are: | |
1057 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1058 | # | |
1059 | # The rules are: | |
1060 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1061 | # same time. | |
1062 | # 2. Host defaults to nonopt. | |
1063 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1064 | # as determined by config.guess. | |
1065 | # 4. Target and build default to nonopt. | |
1066 | # 5. If nonopt is not specified, then target and build default to host. | |
1067 | ||
1068 | # The aliases save the names the user supplied, while $host etc. | |
1069 | # will get canonicalized. | |
1070 | case $host---$target---$nonopt in | |
1071 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1072 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1073 | esac | |
1074 | ||
1075 | ||
1076 | # Make sure we can run config.sub. | |
1077 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1078 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1079 | fi | |
1080 | ||
1081 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
3b851bce | 1082 | echo "configure:1083: checking host system type" >&5 |
c906108c SS |
1083 | |
1084 | host_alias=$host | |
1085 | case "$host_alias" in | |
1086 | NONE) | |
1087 | case $nonopt in | |
1088 | NONE) | |
1089 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1090 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1091 | fi ;; | |
1092 | *) host_alias=$nonopt ;; | |
1093 | esac ;; | |
1094 | esac | |
1095 | ||
1096 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1097 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1098 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1099 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1100 | echo "$ac_t""$host" 1>&6 | |
1101 | ||
1102 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
3b851bce | 1103 | echo "configure:1104: checking target system type" >&5 |
c906108c SS |
1104 | |
1105 | target_alias=$target | |
1106 | case "$target_alias" in | |
1107 | NONE) | |
1108 | case $nonopt in | |
1109 | NONE) target_alias=$host_alias ;; | |
1110 | *) target_alias=$nonopt ;; | |
1111 | esac ;; | |
1112 | esac | |
1113 | ||
1114 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1115 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1116 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1117 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1118 | echo "$ac_t""$target" 1>&6 | |
1119 | ||
1120 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
3b851bce | 1121 | echo "configure:1122: checking build system type" >&5 |
c906108c SS |
1122 | |
1123 | build_alias=$build | |
1124 | case "$build_alias" in | |
1125 | NONE) | |
1126 | case $nonopt in | |
1127 | NONE) build_alias=$host_alias ;; | |
1128 | *) build_alias=$nonopt ;; | |
1129 | esac ;; | |
1130 | esac | |
1131 | ||
1132 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1133 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1134 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1135 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1136 | echo "$ac_t""$build" 1>&6 | |
1137 | ||
1138 | test "$host_alias" != "$target_alias" && | |
1139 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1140 | NONENONEs,x,x, && | |
1141 | program_prefix=${target_alias}- | |
1142 | ||
1143 | ||
1144 | ALL_LINGUAS= | |
1145 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
3b851bce | 1146 | echo "configure:1147: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1147 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1148 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1149 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1150 | else | |
1151 | cat > conftestmake <<\EOF | |
1152 | all: | |
1153 | @echo 'ac_maketemp="${MAKE}"' | |
1154 | EOF | |
1155 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1156 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1157 | if test -n "$ac_maketemp"; then | |
1158 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1159 | else | |
1160 | eval ac_cv_prog_make_${ac_make}_set=no | |
1161 | fi | |
1162 | rm -f conftestmake | |
1163 | fi | |
1164 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1165 | echo "$ac_t""yes" 1>&6 | |
1166 | SET_MAKE= | |
1167 | else | |
1168 | echo "$ac_t""no" 1>&6 | |
1169 | SET_MAKE="MAKE=${MAKE-make}" | |
1170 | fi | |
1171 | ||
1172 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1173 | set dummy ranlib; ac_word=$2 | |
1174 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 1175 | echo "configure:1176: checking for $ac_word" >&5 |
c906108c SS |
1176 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1177 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1178 | else | |
1179 | if test -n "$RANLIB"; then | |
1180 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1181 | else | |
1182 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1183 | ac_dummy="$PATH" | |
1184 | for ac_dir in $ac_dummy; do | |
1185 | test -z "$ac_dir" && ac_dir=. | |
1186 | if test -f $ac_dir/$ac_word; then | |
1187 | ac_cv_prog_RANLIB="ranlib" | |
1188 | break | |
1189 | fi | |
1190 | done | |
1191 | IFS="$ac_save_ifs" | |
1192 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1193 | fi | |
1194 | fi | |
1195 | RANLIB="$ac_cv_prog_RANLIB" | |
1196 | if test -n "$RANLIB"; then | |
1197 | echo "$ac_t""$RANLIB" 1>&6 | |
1198 | else | |
1199 | echo "$ac_t""no" 1>&6 | |
1200 | fi | |
1201 | ||
1202 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
3b851bce | 1203 | echo "configure:1204: checking for ANSI C header files" >&5 |
c906108c SS |
1204 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1205 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1206 | else | |
1207 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1208 | #line 1209 "configure" |
c906108c SS |
1209 | #include "confdefs.h" |
1210 | #include <stdlib.h> | |
1211 | #include <stdarg.h> | |
1212 | #include <string.h> | |
1213 | #include <float.h> | |
1214 | EOF | |
1215 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 1216 | { (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1217 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1218 | if test -z "$ac_err"; then | |
1219 | rm -rf conftest* | |
1220 | ac_cv_header_stdc=yes | |
1221 | else | |
1222 | echo "$ac_err" >&5 | |
1223 | echo "configure: failed program was:" >&5 | |
1224 | cat conftest.$ac_ext >&5 | |
1225 | rm -rf conftest* | |
1226 | ac_cv_header_stdc=no | |
1227 | fi | |
1228 | rm -f conftest* | |
1229 | ||
1230 | if test $ac_cv_header_stdc = yes; then | |
1231 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1232 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1233 | #line 1234 "configure" |
c906108c SS |
1234 | #include "confdefs.h" |
1235 | #include <string.h> | |
1236 | EOF | |
1237 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1238 | egrep "memchr" >/dev/null 2>&1; then | |
1239 | : | |
1240 | else | |
1241 | rm -rf conftest* | |
1242 | ac_cv_header_stdc=no | |
1243 | fi | |
1244 | rm -f conftest* | |
1245 | ||
1246 | fi | |
1247 | ||
1248 | if test $ac_cv_header_stdc = yes; then | |
1249 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1250 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1251 | #line 1252 "configure" |
c906108c SS |
1252 | #include "confdefs.h" |
1253 | #include <stdlib.h> | |
1254 | EOF | |
1255 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1256 | egrep "free" >/dev/null 2>&1; then | |
1257 | : | |
1258 | else | |
1259 | rm -rf conftest* | |
1260 | ac_cv_header_stdc=no | |
1261 | fi | |
1262 | rm -f conftest* | |
1263 | ||
1264 | fi | |
1265 | ||
1266 | if test $ac_cv_header_stdc = yes; then | |
1267 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1268 | if test "$cross_compiling" = yes; then | |
1269 | : | |
1270 | else | |
1271 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1272 | #line 1273 "configure" |
c906108c SS |
1273 | #include "confdefs.h" |
1274 | #include <ctype.h> | |
1275 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1276 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1277 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1278 | int main () { int i; for (i = 0; i < 256; i++) | |
1279 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1280 | exit (0); } | |
1281 | ||
1282 | EOF | |
3b851bce | 1283 | if { (eval echo configure:1284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1284 | then |
1285 | : | |
1286 | else | |
1287 | echo "configure: failed program was:" >&5 | |
1288 | cat conftest.$ac_ext >&5 | |
1289 | rm -fr conftest* | |
1290 | ac_cv_header_stdc=no | |
1291 | fi | |
1292 | rm -fr conftest* | |
1293 | fi | |
1294 | ||
1295 | fi | |
1296 | fi | |
1297 | ||
1298 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1299 | if test $ac_cv_header_stdc = yes; then | |
1300 | cat >> confdefs.h <<\EOF | |
1301 | #define STDC_HEADERS 1 | |
1302 | EOF | |
1303 | ||
1304 | fi | |
1305 | ||
1306 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
3b851bce | 1307 | echo "configure:1308: checking for working const" >&5 |
c906108c SS |
1308 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1309 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1310 | else | |
1311 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1312 | #line 1313 "configure" |
c906108c SS |
1313 | #include "confdefs.h" |
1314 | ||
1315 | int main() { | |
1316 | ||
1317 | /* Ultrix mips cc rejects this. */ | |
1318 | typedef int charset[2]; const charset x; | |
1319 | /* SunOS 4.1.1 cc rejects this. */ | |
1320 | char const *const *ccp; | |
1321 | char **p; | |
1322 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1323 | struct point {int x, y;}; | |
1324 | static struct point const zero = {0,0}; | |
1325 | /* AIX XL C 1.02.0.0 rejects this. | |
1326 | It does not let you subtract one const X* pointer from another in an arm | |
1327 | of an if-expression whose if-part is not a constant expression */ | |
1328 | const char *g = "string"; | |
1329 | ccp = &g + (g ? g-g : 0); | |
1330 | /* HPUX 7.0 cc rejects these. */ | |
1331 | ++ccp; | |
1332 | p = (char**) ccp; | |
1333 | ccp = (char const *const *) p; | |
1334 | { /* SCO 3.2v4 cc rejects this. */ | |
1335 | char *t; | |
1336 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1337 | ||
1338 | *t++ = 0; | |
1339 | } | |
1340 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1341 | int x[] = {25, 17}; | |
1342 | const int *foo = &x[0]; | |
1343 | ++foo; | |
1344 | } | |
1345 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1346 | typedef const int *iptr; | |
1347 | iptr p = 0; | |
1348 | ++p; | |
1349 | } | |
1350 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1351 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1352 | struct s { int j; const int *ap[3]; }; | |
1353 | struct s *b; b->j = 5; | |
1354 | } | |
1355 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1356 | const int foo = 10; | |
1357 | } | |
1358 | ||
1359 | ; return 0; } | |
1360 | EOF | |
3b851bce | 1361 | if { (eval echo configure:1362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1362 | rm -rf conftest* |
1363 | ac_cv_c_const=yes | |
1364 | else | |
1365 | echo "configure: failed program was:" >&5 | |
1366 | cat conftest.$ac_ext >&5 | |
1367 | rm -rf conftest* | |
1368 | ac_cv_c_const=no | |
1369 | fi | |
1370 | rm -f conftest* | |
1371 | fi | |
1372 | ||
1373 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1374 | if test $ac_cv_c_const = no; then | |
1375 | cat >> confdefs.h <<\EOF | |
1376 | #define const | |
1377 | EOF | |
1378 | ||
1379 | fi | |
1380 | ||
1381 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
3b851bce | 1382 | echo "configure:1383: checking for inline" >&5 |
c906108c SS |
1383 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1384 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1385 | else | |
1386 | ac_cv_c_inline=no | |
1387 | for ac_kw in inline __inline__ __inline; do | |
1388 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1389 | #line 1390 "configure" |
c906108c SS |
1390 | #include "confdefs.h" |
1391 | ||
1392 | int main() { | |
1393 | } $ac_kw foo() { | |
1394 | ; return 0; } | |
1395 | EOF | |
3b851bce | 1396 | if { (eval echo configure:1397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1397 | rm -rf conftest* |
1398 | ac_cv_c_inline=$ac_kw; break | |
1399 | else | |
1400 | echo "configure: failed program was:" >&5 | |
1401 | cat conftest.$ac_ext >&5 | |
1402 | fi | |
1403 | rm -f conftest* | |
1404 | done | |
1405 | ||
1406 | fi | |
1407 | ||
1408 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1409 | case "$ac_cv_c_inline" in | |
1410 | inline | yes) ;; | |
1411 | no) cat >> confdefs.h <<\EOF | |
1412 | #define inline | |
1413 | EOF | |
1414 | ;; | |
1415 | *) cat >> confdefs.h <<EOF | |
1416 | #define inline $ac_cv_c_inline | |
1417 | EOF | |
1418 | ;; | |
1419 | esac | |
1420 | ||
1421 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
3b851bce | 1422 | echo "configure:1423: checking for off_t" >&5 |
c906108c SS |
1423 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1425 | else | |
1426 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1427 | #line 1428 "configure" |
c906108c SS |
1428 | #include "confdefs.h" |
1429 | #include <sys/types.h> | |
1430 | #if STDC_HEADERS | |
1431 | #include <stdlib.h> | |
1432 | #include <stddef.h> | |
1433 | #endif | |
1434 | EOF | |
1435 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1436 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1437 | rm -rf conftest* | |
1438 | ac_cv_type_off_t=yes | |
1439 | else | |
1440 | rm -rf conftest* | |
1441 | ac_cv_type_off_t=no | |
1442 | fi | |
1443 | rm -f conftest* | |
1444 | ||
1445 | fi | |
1446 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1447 | if test $ac_cv_type_off_t = no; then | |
1448 | cat >> confdefs.h <<\EOF | |
1449 | #define off_t long | |
1450 | EOF | |
1451 | ||
1452 | fi | |
1453 | ||
1454 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
3b851bce | 1455 | echo "configure:1456: checking for size_t" >&5 |
c906108c SS |
1456 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1457 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1458 | else | |
1459 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1460 | #line 1461 "configure" |
c906108c SS |
1461 | #include "confdefs.h" |
1462 | #include <sys/types.h> | |
1463 | #if STDC_HEADERS | |
1464 | #include <stdlib.h> | |
1465 | #include <stddef.h> | |
1466 | #endif | |
1467 | EOF | |
1468 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1469 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1470 | rm -rf conftest* | |
1471 | ac_cv_type_size_t=yes | |
1472 | else | |
1473 | rm -rf conftest* | |
1474 | ac_cv_type_size_t=no | |
1475 | fi | |
1476 | rm -f conftest* | |
1477 | ||
1478 | fi | |
1479 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1480 | if test $ac_cv_type_size_t = no; then | |
1481 | cat >> confdefs.h <<\EOF | |
1482 | #define size_t unsigned | |
1483 | EOF | |
1484 | ||
1485 | fi | |
1486 | ||
1487 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1488 | # for constant arguments. Useless! | |
1489 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
3b851bce | 1490 | echo "configure:1491: checking for working alloca.h" >&5 |
c906108c SS |
1491 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1492 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1493 | else | |
1494 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1495 | #line 1496 "configure" |
c906108c SS |
1496 | #include "confdefs.h" |
1497 | #include <alloca.h> | |
1498 | int main() { | |
1499 | char *p = alloca(2 * sizeof(int)); | |
1500 | ; return 0; } | |
1501 | EOF | |
3b851bce | 1502 | if { (eval echo configure:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1503 | rm -rf conftest* |
1504 | ac_cv_header_alloca_h=yes | |
1505 | else | |
1506 | echo "configure: failed program was:" >&5 | |
1507 | cat conftest.$ac_ext >&5 | |
1508 | rm -rf conftest* | |
1509 | ac_cv_header_alloca_h=no | |
1510 | fi | |
1511 | rm -f conftest* | |
1512 | fi | |
1513 | ||
1514 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1515 | if test $ac_cv_header_alloca_h = yes; then | |
1516 | cat >> confdefs.h <<\EOF | |
1517 | #define HAVE_ALLOCA_H 1 | |
1518 | EOF | |
1519 | ||
1520 | fi | |
1521 | ||
1522 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
3b851bce | 1523 | echo "configure:1524: checking for alloca" >&5 |
c906108c SS |
1524 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1525 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1526 | else | |
1527 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1528 | #line 1529 "configure" |
c906108c SS |
1529 | #include "confdefs.h" |
1530 | ||
1531 | #ifdef __GNUC__ | |
1532 | # define alloca __builtin_alloca | |
1533 | #else | |
1534 | # ifdef _MSC_VER | |
1535 | # include <malloc.h> | |
1536 | # define alloca _alloca | |
1537 | # else | |
1538 | # if HAVE_ALLOCA_H | |
1539 | # include <alloca.h> | |
1540 | # else | |
1541 | # ifdef _AIX | |
1542 | #pragma alloca | |
1543 | # else | |
1544 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1545 | char *alloca (); | |
1546 | # endif | |
1547 | # endif | |
1548 | # endif | |
1549 | # endif | |
1550 | #endif | |
1551 | ||
1552 | int main() { | |
1553 | char *p = (char *) alloca(1); | |
1554 | ; return 0; } | |
1555 | EOF | |
3b851bce | 1556 | if { (eval echo configure:1557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1557 | rm -rf conftest* |
1558 | ac_cv_func_alloca_works=yes | |
1559 | else | |
1560 | echo "configure: failed program was:" >&5 | |
1561 | cat conftest.$ac_ext >&5 | |
1562 | rm -rf conftest* | |
1563 | ac_cv_func_alloca_works=no | |
1564 | fi | |
1565 | rm -f conftest* | |
1566 | fi | |
1567 | ||
1568 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1569 | if test $ac_cv_func_alloca_works = yes; then | |
1570 | cat >> confdefs.h <<\EOF | |
1571 | #define HAVE_ALLOCA 1 | |
1572 | EOF | |
1573 | ||
1574 | fi | |
1575 | ||
1576 | if test $ac_cv_func_alloca_works = no; then | |
1577 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1578 | # that cause trouble. Some versions do not even contain alloca or | |
1579 | # contain a buggy version. If you still want to use their alloca, | |
1580 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1581 | ALLOCA=alloca.${ac_objext} | |
1582 | cat >> confdefs.h <<\EOF | |
1583 | #define C_ALLOCA 1 | |
1584 | EOF | |
1585 | ||
1586 | ||
1587 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
3b851bce | 1588 | echo "configure:1589: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1589 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1591 | else | |
1592 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1593 | #line 1594 "configure" |
c906108c SS |
1594 | #include "confdefs.h" |
1595 | #if defined(CRAY) && ! defined(CRAY2) | |
1596 | webecray | |
1597 | #else | |
1598 | wenotbecray | |
1599 | #endif | |
1600 | ||
1601 | EOF | |
1602 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1603 | egrep "webecray" >/dev/null 2>&1; then | |
1604 | rm -rf conftest* | |
1605 | ac_cv_os_cray=yes | |
1606 | else | |
1607 | rm -rf conftest* | |
1608 | ac_cv_os_cray=no | |
1609 | fi | |
1610 | rm -f conftest* | |
1611 | ||
1612 | fi | |
1613 | ||
1614 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1615 | if test $ac_cv_os_cray = yes; then | |
1616 | for ac_func in _getb67 GETB67 getb67; do | |
1617 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 1618 | echo "configure:1619: checking for $ac_func" >&5 |
c906108c SS |
1619 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1621 | else | |
1622 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1623 | #line 1624 "configure" |
c906108c SS |
1624 | #include "confdefs.h" |
1625 | /* System header to define __stub macros and hopefully few prototypes, | |
1626 | which can conflict with char $ac_func(); below. */ | |
1627 | #include <assert.h> | |
1628 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1629 | /* We use char because int might match the return type of a gcc2 | |
1630 | builtin and then its argument prototype would still apply. */ | |
1631 | char $ac_func(); | |
1632 | ||
1633 | int main() { | |
1634 | ||
1635 | /* The GNU C library defines this for functions which it implements | |
1636 | to always fail with ENOSYS. Some functions are actually named | |
1637 | something starting with __ and the normal name is an alias. */ | |
1638 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1639 | choke me | |
1640 | #else | |
1641 | $ac_func(); | |
1642 | #endif | |
1643 | ||
1644 | ; return 0; } | |
1645 | EOF | |
3b851bce | 1646 | if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1647 | rm -rf conftest* |
1648 | eval "ac_cv_func_$ac_func=yes" | |
1649 | else | |
1650 | echo "configure: failed program was:" >&5 | |
1651 | cat conftest.$ac_ext >&5 | |
1652 | rm -rf conftest* | |
1653 | eval "ac_cv_func_$ac_func=no" | |
1654 | fi | |
1655 | rm -f conftest* | |
1656 | fi | |
1657 | ||
1658 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1659 | echo "$ac_t""yes" 1>&6 | |
1660 | cat >> confdefs.h <<EOF | |
1661 | #define CRAY_STACKSEG_END $ac_func | |
1662 | EOF | |
1663 | ||
1664 | break | |
1665 | else | |
1666 | echo "$ac_t""no" 1>&6 | |
1667 | fi | |
1668 | ||
1669 | done | |
1670 | fi | |
1671 | ||
1672 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
3b851bce | 1673 | echo "configure:1674: checking stack direction for C alloca" >&5 |
c906108c SS |
1674 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1675 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1676 | else | |
1677 | if test "$cross_compiling" = yes; then | |
1678 | ac_cv_c_stack_direction=0 | |
1679 | else | |
1680 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1681 | #line 1682 "configure" |
c906108c SS |
1682 | #include "confdefs.h" |
1683 | find_stack_direction () | |
1684 | { | |
1685 | static char *addr = 0; | |
1686 | auto char dummy; | |
1687 | if (addr == 0) | |
1688 | { | |
1689 | addr = &dummy; | |
1690 | return find_stack_direction (); | |
1691 | } | |
1692 | else | |
1693 | return (&dummy > addr) ? 1 : -1; | |
1694 | } | |
1695 | main () | |
1696 | { | |
1697 | exit (find_stack_direction() < 0); | |
1698 | } | |
1699 | EOF | |
3b851bce | 1700 | if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1701 | then |
1702 | ac_cv_c_stack_direction=1 | |
1703 | else | |
1704 | echo "configure: failed program was:" >&5 | |
1705 | cat conftest.$ac_ext >&5 | |
1706 | rm -fr conftest* | |
1707 | ac_cv_c_stack_direction=-1 | |
1708 | fi | |
1709 | rm -fr conftest* | |
1710 | fi | |
1711 | ||
1712 | fi | |
1713 | ||
1714 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1715 | cat >> confdefs.h <<EOF | |
1716 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1717 | EOF | |
1718 | ||
1719 | fi | |
1720 | ||
1721 | for ac_hdr in unistd.h | |
1722 | do | |
1723 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1724 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3b851bce | 1725 | echo "configure:1726: checking for $ac_hdr" >&5 |
c906108c SS |
1726 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1727 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1728 | else | |
1729 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1730 | #line 1731 "configure" |
c906108c SS |
1731 | #include "confdefs.h" |
1732 | #include <$ac_hdr> | |
1733 | EOF | |
1734 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 1735 | { (eval echo configure:1736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1736 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1737 | if test -z "$ac_err"; then | |
1738 | rm -rf conftest* | |
1739 | eval "ac_cv_header_$ac_safe=yes" | |
1740 | else | |
1741 | echo "$ac_err" >&5 | |
1742 | echo "configure: failed program was:" >&5 | |
1743 | cat conftest.$ac_ext >&5 | |
1744 | rm -rf conftest* | |
1745 | eval "ac_cv_header_$ac_safe=no" | |
1746 | fi | |
1747 | rm -f conftest* | |
1748 | fi | |
1749 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1750 | echo "$ac_t""yes" 1>&6 | |
1751 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1752 | cat >> confdefs.h <<EOF | |
1753 | #define $ac_tr_hdr 1 | |
1754 | EOF | |
1755 | ||
1756 | else | |
1757 | echo "$ac_t""no" 1>&6 | |
1758 | fi | |
1759 | done | |
1760 | ||
1761 | for ac_func in getpagesize | |
1762 | do | |
1763 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 1764 | echo "configure:1765: checking for $ac_func" >&5 |
c906108c SS |
1765 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1766 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1767 | else | |
1768 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1769 | #line 1770 "configure" |
c906108c SS |
1770 | #include "confdefs.h" |
1771 | /* System header to define __stub macros and hopefully few prototypes, | |
1772 | which can conflict with char $ac_func(); below. */ | |
1773 | #include <assert.h> | |
1774 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1775 | /* We use char because int might match the return type of a gcc2 | |
1776 | builtin and then its argument prototype would still apply. */ | |
1777 | char $ac_func(); | |
1778 | ||
1779 | int main() { | |
1780 | ||
1781 | /* The GNU C library defines this for functions which it implements | |
1782 | to always fail with ENOSYS. Some functions are actually named | |
1783 | something starting with __ and the normal name is an alias. */ | |
1784 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1785 | choke me | |
1786 | #else | |
1787 | $ac_func(); | |
1788 | #endif | |
1789 | ||
1790 | ; return 0; } | |
1791 | EOF | |
3b851bce | 1792 | if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1793 | rm -rf conftest* |
1794 | eval "ac_cv_func_$ac_func=yes" | |
1795 | else | |
1796 | echo "configure: failed program was:" >&5 | |
1797 | cat conftest.$ac_ext >&5 | |
1798 | rm -rf conftest* | |
1799 | eval "ac_cv_func_$ac_func=no" | |
1800 | fi | |
1801 | rm -f conftest* | |
1802 | fi | |
1803 | ||
1804 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1805 | echo "$ac_t""yes" 1>&6 | |
1806 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1807 | cat >> confdefs.h <<EOF | |
1808 | #define $ac_tr_func 1 | |
1809 | EOF | |
1810 | ||
1811 | else | |
1812 | echo "$ac_t""no" 1>&6 | |
1813 | fi | |
1814 | done | |
1815 | ||
1816 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
3b851bce | 1817 | echo "configure:1818: checking for working mmap" >&5 |
c906108c SS |
1818 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1819 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1820 | else | |
1821 | if test "$cross_compiling" = yes; then | |
1822 | ac_cv_func_mmap_fixed_mapped=no | |
1823 | else | |
1824 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1825 | #line 1826 "configure" |
c906108c SS |
1826 | #include "confdefs.h" |
1827 | ||
1828 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1829 | Here is a matrix of mmap possibilities: | |
1830 | mmap private not fixed | |
1831 | mmap private fixed at somewhere currently unmapped | |
1832 | mmap private fixed at somewhere already mapped | |
1833 | mmap shared not fixed | |
1834 | mmap shared fixed at somewhere currently unmapped | |
1835 | mmap shared fixed at somewhere already mapped | |
1836 | For private mappings, we should verify that changes cannot be read() | |
1837 | back from the file, nor mmap's back from the file at a different | |
1838 | address. (There have been systems where private was not correctly | |
1839 | implemented like the infamous i386 svr4.0, and systems where the | |
1840 | VM page cache was not coherent with the filesystem buffer cache | |
1841 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1842 | For shared mappings, we should conversely verify that changes get | |
1843 | propogated back to all the places they're supposed to be. | |
1844 | ||
1845 | Grep wants private fixed already mapped. | |
1846 | The main things grep needs to know about mmap are: | |
1847 | * does it exist and is it safe to write into the mmap'd area | |
1848 | * how to use it (BSD variants) */ | |
1849 | #include <sys/types.h> | |
1850 | #include <fcntl.h> | |
1851 | #include <sys/mman.h> | |
1852 | ||
1853 | /* This mess was copied from the GNU getpagesize.h. */ | |
1854 | #ifndef HAVE_GETPAGESIZE | |
1855 | # ifdef HAVE_UNISTD_H | |
1856 | # include <unistd.h> | |
1857 | # endif | |
1858 | ||
1859 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1860 | # ifndef HAVE_SYS_PARAM_H | |
1861 | # define HAVE_SYS_PARAM_H 1 | |
1862 | # endif | |
1863 | ||
1864 | # ifdef _SC_PAGESIZE | |
1865 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1866 | # else /* no _SC_PAGESIZE */ | |
1867 | # ifdef HAVE_SYS_PARAM_H | |
1868 | # include <sys/param.h> | |
1869 | # ifdef EXEC_PAGESIZE | |
1870 | # define getpagesize() EXEC_PAGESIZE | |
1871 | # else /* no EXEC_PAGESIZE */ | |
1872 | # ifdef NBPG | |
1873 | # define getpagesize() NBPG * CLSIZE | |
1874 | # ifndef CLSIZE | |
1875 | # define CLSIZE 1 | |
1876 | # endif /* no CLSIZE */ | |
1877 | # else /* no NBPG */ | |
1878 | # ifdef NBPC | |
1879 | # define getpagesize() NBPC | |
1880 | # else /* no NBPC */ | |
1881 | # ifdef PAGESIZE | |
1882 | # define getpagesize() PAGESIZE | |
1883 | # endif /* PAGESIZE */ | |
1884 | # endif /* no NBPC */ | |
1885 | # endif /* no NBPG */ | |
1886 | # endif /* no EXEC_PAGESIZE */ | |
1887 | # else /* no HAVE_SYS_PARAM_H */ | |
1888 | # define getpagesize() 8192 /* punt totally */ | |
1889 | # endif /* no HAVE_SYS_PARAM_H */ | |
1890 | # endif /* no _SC_PAGESIZE */ | |
1891 | ||
1892 | #endif /* no HAVE_GETPAGESIZE */ | |
1893 | ||
1894 | #ifdef __cplusplus | |
1895 | extern "C" { void *malloc(unsigned); } | |
1896 | #else | |
1897 | char *malloc(); | |
1898 | #endif | |
1899 | ||
1900 | int | |
1901 | main() | |
1902 | { | |
1903 | char *data, *data2, *data3; | |
1904 | int i, pagesize; | |
1905 | int fd; | |
1906 | ||
1907 | pagesize = getpagesize(); | |
1908 | ||
1909 | /* | |
1910 | * First, make a file with some known garbage in it. | |
1911 | */ | |
1912 | data = malloc(pagesize); | |
1913 | if (!data) | |
1914 | exit(1); | |
1915 | for (i = 0; i < pagesize; ++i) | |
1916 | *(data + i) = rand(); | |
1917 | umask(0); | |
1918 | fd = creat("conftestmmap", 0600); | |
1919 | if (fd < 0) | |
1920 | exit(1); | |
1921 | if (write(fd, data, pagesize) != pagesize) | |
1922 | exit(1); | |
1923 | close(fd); | |
1924 | ||
1925 | /* | |
1926 | * Next, try to mmap the file at a fixed address which | |
1927 | * already has something else allocated at it. If we can, | |
1928 | * also make sure that we see the same garbage. | |
1929 | */ | |
1930 | fd = open("conftestmmap", O_RDWR); | |
1931 | if (fd < 0) | |
1932 | exit(1); | |
1933 | data2 = malloc(2 * pagesize); | |
1934 | if (!data2) | |
1935 | exit(1); | |
1936 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1937 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1938 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1939 | exit(1); | |
1940 | for (i = 0; i < pagesize; ++i) | |
1941 | if (*(data + i) != *(data2 + i)) | |
1942 | exit(1); | |
1943 | ||
1944 | /* | |
1945 | * Finally, make sure that changes to the mapped area | |
1946 | * do not percolate back to the file as seen by read(). | |
1947 | * (This is a bug on some variants of i386 svr4.0.) | |
1948 | */ | |
1949 | for (i = 0; i < pagesize; ++i) | |
1950 | *(data2 + i) = *(data2 + i) + 1; | |
1951 | data3 = malloc(pagesize); | |
1952 | if (!data3) | |
1953 | exit(1); | |
1954 | if (read(fd, data3, pagesize) != pagesize) | |
1955 | exit(1); | |
1956 | for (i = 0; i < pagesize; ++i) | |
1957 | if (*(data + i) != *(data3 + i)) | |
1958 | exit(1); | |
1959 | close(fd); | |
1960 | unlink("conftestmmap"); | |
1961 | exit(0); | |
1962 | } | |
1963 | ||
1964 | EOF | |
3b851bce | 1965 | if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1966 | then |
1967 | ac_cv_func_mmap_fixed_mapped=yes | |
1968 | else | |
1969 | echo "configure: failed program was:" >&5 | |
1970 | cat conftest.$ac_ext >&5 | |
1971 | rm -fr conftest* | |
1972 | ac_cv_func_mmap_fixed_mapped=no | |
1973 | fi | |
1974 | rm -fr conftest* | |
1975 | fi | |
1976 | ||
1977 | fi | |
1978 | ||
1979 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1980 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1981 | cat >> confdefs.h <<\EOF | |
1982 | #define HAVE_MMAP 1 | |
1983 | EOF | |
1984 | ||
1985 | fi | |
1986 | ||
1987 | ||
1988 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1989 | unistd.h values.h sys/param.h | |
1990 | do | |
1991 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1992 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3b851bce | 1993 | echo "configure:1994: checking for $ac_hdr" >&5 |
c906108c SS |
1994 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1995 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1996 | else | |
1997 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 1998 | #line 1999 "configure" |
c906108c SS |
1999 | #include "confdefs.h" |
2000 | #include <$ac_hdr> | |
2001 | EOF | |
2002 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 2003 | { (eval echo configure:2004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2004 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2005 | if test -z "$ac_err"; then | |
2006 | rm -rf conftest* | |
2007 | eval "ac_cv_header_$ac_safe=yes" | |
2008 | else | |
2009 | echo "$ac_err" >&5 | |
2010 | echo "configure: failed program was:" >&5 | |
2011 | cat conftest.$ac_ext >&5 | |
2012 | rm -rf conftest* | |
2013 | eval "ac_cv_header_$ac_safe=no" | |
2014 | fi | |
2015 | rm -f conftest* | |
2016 | fi | |
2017 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2018 | echo "$ac_t""yes" 1>&6 | |
2019 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2020 | cat >> confdefs.h <<EOF | |
2021 | #define $ac_tr_hdr 1 | |
2022 | EOF | |
2023 | ||
2024 | else | |
2025 | echo "$ac_t""no" 1>&6 | |
2026 | fi | |
2027 | done | |
2028 | ||
2029 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2030 | __argz_count __argz_stringify __argz_next | |
2031 | do | |
2032 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 2033 | echo "configure:2034: checking for $ac_func" >&5 |
c906108c SS |
2034 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2035 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2036 | else | |
2037 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2038 | #line 2039 "configure" |
c906108c SS |
2039 | #include "confdefs.h" |
2040 | /* System header to define __stub macros and hopefully few prototypes, | |
2041 | which can conflict with char $ac_func(); below. */ | |
2042 | #include <assert.h> | |
2043 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2044 | /* We use char because int might match the return type of a gcc2 | |
2045 | builtin and then its argument prototype would still apply. */ | |
2046 | char $ac_func(); | |
2047 | ||
2048 | int main() { | |
2049 | ||
2050 | /* The GNU C library defines this for functions which it implements | |
2051 | to always fail with ENOSYS. Some functions are actually named | |
2052 | something starting with __ and the normal name is an alias. */ | |
2053 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2054 | choke me | |
2055 | #else | |
2056 | $ac_func(); | |
2057 | #endif | |
2058 | ||
2059 | ; return 0; } | |
2060 | EOF | |
3b851bce | 2061 | if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2062 | rm -rf conftest* |
2063 | eval "ac_cv_func_$ac_func=yes" | |
2064 | else | |
2065 | echo "configure: failed program was:" >&5 | |
2066 | cat conftest.$ac_ext >&5 | |
2067 | rm -rf conftest* | |
2068 | eval "ac_cv_func_$ac_func=no" | |
2069 | fi | |
2070 | rm -f conftest* | |
2071 | fi | |
2072 | ||
2073 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2074 | echo "$ac_t""yes" 1>&6 | |
2075 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2076 | cat >> confdefs.h <<EOF | |
2077 | #define $ac_tr_func 1 | |
2078 | EOF | |
2079 | ||
2080 | else | |
2081 | echo "$ac_t""no" 1>&6 | |
2082 | fi | |
2083 | done | |
2084 | ||
2085 | ||
2086 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2087 | for ac_func in stpcpy | |
2088 | do | |
2089 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 2090 | echo "configure:2091: checking for $ac_func" >&5 |
c906108c SS |
2091 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2092 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2093 | else | |
2094 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2095 | #line 2096 "configure" |
c906108c SS |
2096 | #include "confdefs.h" |
2097 | /* System header to define __stub macros and hopefully few prototypes, | |
2098 | which can conflict with char $ac_func(); below. */ | |
2099 | #include <assert.h> | |
2100 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2101 | /* We use char because int might match the return type of a gcc2 | |
2102 | builtin and then its argument prototype would still apply. */ | |
2103 | char $ac_func(); | |
2104 | ||
2105 | int main() { | |
2106 | ||
2107 | /* The GNU C library defines this for functions which it implements | |
2108 | to always fail with ENOSYS. Some functions are actually named | |
2109 | something starting with __ and the normal name is an alias. */ | |
2110 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2111 | choke me | |
2112 | #else | |
2113 | $ac_func(); | |
2114 | #endif | |
2115 | ||
2116 | ; return 0; } | |
2117 | EOF | |
3b851bce | 2118 | if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2119 | rm -rf conftest* |
2120 | eval "ac_cv_func_$ac_func=yes" | |
2121 | else | |
2122 | echo "configure: failed program was:" >&5 | |
2123 | cat conftest.$ac_ext >&5 | |
2124 | rm -rf conftest* | |
2125 | eval "ac_cv_func_$ac_func=no" | |
2126 | fi | |
2127 | rm -f conftest* | |
2128 | fi | |
2129 | ||
2130 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2131 | echo "$ac_t""yes" 1>&6 | |
2132 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2133 | cat >> confdefs.h <<EOF | |
2134 | #define $ac_tr_func 1 | |
2135 | EOF | |
2136 | ||
2137 | else | |
2138 | echo "$ac_t""no" 1>&6 | |
2139 | fi | |
2140 | done | |
2141 | ||
2142 | fi | |
2143 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2144 | cat >> confdefs.h <<\EOF | |
2145 | #define HAVE_STPCPY 1 | |
2146 | EOF | |
2147 | ||
2148 | fi | |
2149 | ||
2150 | if test $ac_cv_header_locale_h = yes; then | |
2151 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
3b851bce | 2152 | echo "configure:2153: checking for LC_MESSAGES" >&5 |
c906108c SS |
2153 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2154 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2155 | else | |
2156 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2157 | #line 2158 "configure" |
c906108c SS |
2158 | #include "confdefs.h" |
2159 | #include <locale.h> | |
2160 | int main() { | |
2161 | return LC_MESSAGES | |
2162 | ; return 0; } | |
2163 | EOF | |
3b851bce | 2164 | if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2165 | rm -rf conftest* |
2166 | am_cv_val_LC_MESSAGES=yes | |
2167 | else | |
2168 | echo "configure: failed program was:" >&5 | |
2169 | cat conftest.$ac_ext >&5 | |
2170 | rm -rf conftest* | |
2171 | am_cv_val_LC_MESSAGES=no | |
2172 | fi | |
2173 | rm -f conftest* | |
2174 | fi | |
2175 | ||
2176 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2177 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2178 | cat >> confdefs.h <<\EOF | |
2179 | #define HAVE_LC_MESSAGES 1 | |
2180 | EOF | |
2181 | ||
2182 | fi | |
2183 | fi | |
2184 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
3b851bce | 2185 | echo "configure:2186: checking whether NLS is requested" >&5 |
c906108c SS |
2186 | # Check whether --enable-nls or --disable-nls was given. |
2187 | if test "${enable_nls+set}" = set; then | |
2188 | enableval="$enable_nls" | |
2189 | USE_NLS=$enableval | |
2190 | else | |
2191 | USE_NLS=yes | |
2192 | fi | |
2193 | ||
2194 | echo "$ac_t""$USE_NLS" 1>&6 | |
2195 | ||
2196 | ||
2197 | USE_INCLUDED_LIBINTL=no | |
2198 | ||
2199 | if test "$USE_NLS" = "yes"; then | |
2200 | cat >> confdefs.h <<\EOF | |
2201 | #define ENABLE_NLS 1 | |
2202 | EOF | |
2203 | ||
2204 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
3b851bce | 2205 | echo "configure:2206: checking whether included gettext is requested" >&5 |
c906108c SS |
2206 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2207 | if test "${with_included_gettext+set}" = set; then | |
2208 | withval="$with_included_gettext" | |
2209 | nls_cv_force_use_gnu_gettext=$withval | |
2210 | else | |
2211 | nls_cv_force_use_gnu_gettext=no | |
2212 | fi | |
2213 | ||
2214 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2215 | ||
2216 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2217 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2218 | nls_cv_header_intl= | |
2219 | nls_cv_header_libgt= | |
2220 | CATOBJEXT=NONE | |
2221 | ||
2222 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2223 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
3b851bce | 2224 | echo "configure:2225: checking for libintl.h" >&5 |
c906108c SS |
2225 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2226 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2227 | else | |
2228 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2229 | #line 2230 "configure" |
c906108c SS |
2230 | #include "confdefs.h" |
2231 | #include <libintl.h> | |
2232 | EOF | |
2233 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 2234 | { (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2235 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2236 | if test -z "$ac_err"; then | |
2237 | rm -rf conftest* | |
2238 | eval "ac_cv_header_$ac_safe=yes" | |
2239 | else | |
2240 | echo "$ac_err" >&5 | |
2241 | echo "configure: failed program was:" >&5 | |
2242 | cat conftest.$ac_ext >&5 | |
2243 | rm -rf conftest* | |
2244 | eval "ac_cv_header_$ac_safe=no" | |
2245 | fi | |
2246 | rm -f conftest* | |
2247 | fi | |
2248 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2249 | echo "$ac_t""yes" 1>&6 | |
2250 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
3b851bce | 2251 | echo "configure:2252: checking for gettext in libc" >&5 |
c906108c SS |
2252 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2253 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2254 | else | |
2255 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2256 | #line 2257 "configure" |
c906108c SS |
2257 | #include "confdefs.h" |
2258 | #include <libintl.h> | |
2259 | int main() { | |
2260 | return (int) gettext ("") | |
2261 | ; return 0; } | |
2262 | EOF | |
3b851bce | 2263 | if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2264 | rm -rf conftest* |
2265 | gt_cv_func_gettext_libc=yes | |
2266 | else | |
2267 | echo "configure: failed program was:" >&5 | |
2268 | cat conftest.$ac_ext >&5 | |
2269 | rm -rf conftest* | |
2270 | gt_cv_func_gettext_libc=no | |
2271 | fi | |
2272 | rm -f conftest* | |
2273 | fi | |
2274 | ||
2275 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2276 | ||
2277 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2278 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
3b851bce | 2279 | echo "configure:2280: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2280 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2281 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2283 | else | |
2284 | ac_save_LIBS="$LIBS" | |
2285 | LIBS="-lintl $LIBS" | |
2286 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2287 | #line 2288 "configure" |
c906108c SS |
2288 | #include "confdefs.h" |
2289 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2290 | /* We use char because int might match the return type of a gcc2 | |
2291 | builtin and then its argument prototype would still apply. */ | |
2292 | char bindtextdomain(); | |
2293 | ||
2294 | int main() { | |
2295 | bindtextdomain() | |
2296 | ; return 0; } | |
2297 | EOF | |
3b851bce | 2298 | if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2299 | rm -rf conftest* |
2300 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2301 | else | |
2302 | echo "configure: failed program was:" >&5 | |
2303 | cat conftest.$ac_ext >&5 | |
2304 | rm -rf conftest* | |
2305 | eval "ac_cv_lib_$ac_lib_var=no" | |
2306 | fi | |
2307 | rm -f conftest* | |
2308 | LIBS="$ac_save_LIBS" | |
2309 | ||
2310 | fi | |
2311 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2312 | echo "$ac_t""yes" 1>&6 | |
2313 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
3b851bce | 2314 | echo "configure:2315: checking for gettext in libintl" >&5 |
c906108c SS |
2315 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2316 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2317 | else | |
2318 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2319 | #line 2320 "configure" |
c906108c SS |
2320 | #include "confdefs.h" |
2321 | ||
2322 | int main() { | |
2323 | return (int) gettext ("") | |
2324 | ; return 0; } | |
2325 | EOF | |
3b851bce | 2326 | if { (eval echo configure:2327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2327 | rm -rf conftest* |
2328 | gt_cv_func_gettext_libintl=yes | |
2329 | else | |
2330 | echo "configure: failed program was:" >&5 | |
2331 | cat conftest.$ac_ext >&5 | |
2332 | rm -rf conftest* | |
2333 | gt_cv_func_gettext_libintl=no | |
2334 | fi | |
2335 | rm -f conftest* | |
2336 | fi | |
2337 | ||
2338 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2339 | else | |
2340 | echo "$ac_t""no" 1>&6 | |
2341 | fi | |
2342 | ||
2343 | fi | |
2344 | ||
2345 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2346 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2347 | cat >> confdefs.h <<\EOF | |
2348 | #define HAVE_GETTEXT 1 | |
2349 | EOF | |
2350 | ||
2351 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2352 | set dummy msgfmt; ac_word=$2 | |
2353 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2354 | echo "configure:2355: checking for $ac_word" >&5 |
c906108c SS |
2355 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2356 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2357 | else | |
2358 | case "$MSGFMT" in | |
2359 | /*) | |
2360 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2361 | ;; | |
2362 | *) | |
2363 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2364 | for ac_dir in $PATH; do | |
2365 | test -z "$ac_dir" && ac_dir=. | |
2366 | if test -f $ac_dir/$ac_word; then | |
2367 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2368 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2369 | break | |
2370 | fi | |
2371 | fi | |
2372 | done | |
2373 | IFS="$ac_save_ifs" | |
2374 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2375 | ;; | |
2376 | esac | |
2377 | fi | |
2378 | MSGFMT="$ac_cv_path_MSGFMT" | |
2379 | if test -n "$MSGFMT"; then | |
2380 | echo "$ac_t""$MSGFMT" 1>&6 | |
2381 | else | |
2382 | echo "$ac_t""no" 1>&6 | |
2383 | fi | |
2384 | if test "$MSGFMT" != "no"; then | |
2385 | for ac_func in dcgettext | |
2386 | do | |
2387 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 2388 | echo "configure:2389: checking for $ac_func" >&5 |
c906108c SS |
2389 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2391 | else | |
2392 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2393 | #line 2394 "configure" |
c906108c SS |
2394 | #include "confdefs.h" |
2395 | /* System header to define __stub macros and hopefully few prototypes, | |
2396 | which can conflict with char $ac_func(); below. */ | |
2397 | #include <assert.h> | |
2398 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2399 | /* We use char because int might match the return type of a gcc2 | |
2400 | builtin and then its argument prototype would still apply. */ | |
2401 | char $ac_func(); | |
2402 | ||
2403 | int main() { | |
2404 | ||
2405 | /* The GNU C library defines this for functions which it implements | |
2406 | to always fail with ENOSYS. Some functions are actually named | |
2407 | something starting with __ and the normal name is an alias. */ | |
2408 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2409 | choke me | |
2410 | #else | |
2411 | $ac_func(); | |
2412 | #endif | |
2413 | ||
2414 | ; return 0; } | |
2415 | EOF | |
3b851bce | 2416 | if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2417 | rm -rf conftest* |
2418 | eval "ac_cv_func_$ac_func=yes" | |
2419 | else | |
2420 | echo "configure: failed program was:" >&5 | |
2421 | cat conftest.$ac_ext >&5 | |
2422 | rm -rf conftest* | |
2423 | eval "ac_cv_func_$ac_func=no" | |
2424 | fi | |
2425 | rm -f conftest* | |
2426 | fi | |
2427 | ||
2428 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2429 | echo "$ac_t""yes" 1>&6 | |
2430 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2431 | cat >> confdefs.h <<EOF | |
2432 | #define $ac_tr_func 1 | |
2433 | EOF | |
2434 | ||
2435 | else | |
2436 | echo "$ac_t""no" 1>&6 | |
2437 | fi | |
2438 | done | |
2439 | ||
2440 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2441 | set dummy gmsgfmt; ac_word=$2 | |
2442 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2443 | echo "configure:2444: checking for $ac_word" >&5 |
c906108c SS |
2444 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2445 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2446 | else | |
2447 | case "$GMSGFMT" in | |
2448 | /*) | |
2449 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2450 | ;; | |
2451 | ?:/*) | |
2452 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2453 | ;; | |
2454 | *) | |
2455 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2456 | ac_dummy="$PATH" | |
2457 | for ac_dir in $ac_dummy; do | |
2458 | test -z "$ac_dir" && ac_dir=. | |
2459 | if test -f $ac_dir/$ac_word; then | |
2460 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2461 | break | |
2462 | fi | |
2463 | done | |
2464 | IFS="$ac_save_ifs" | |
2465 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2466 | ;; | |
2467 | esac | |
2468 | fi | |
2469 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2470 | if test -n "$GMSGFMT"; then | |
2471 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2472 | else | |
2473 | echo "$ac_t""no" 1>&6 | |
2474 | fi | |
2475 | ||
2476 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2477 | set dummy xgettext; ac_word=$2 | |
2478 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2479 | echo "configure:2480: checking for $ac_word" >&5 |
c906108c SS |
2480 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2481 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2482 | else | |
2483 | case "$XGETTEXT" in | |
2484 | /*) | |
2485 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2486 | ;; | |
2487 | *) | |
2488 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2489 | for ac_dir in $PATH; do | |
2490 | test -z "$ac_dir" && ac_dir=. | |
2491 | if test -f $ac_dir/$ac_word; then | |
2492 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2493 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2494 | break | |
2495 | fi | |
2496 | fi | |
2497 | done | |
2498 | IFS="$ac_save_ifs" | |
2499 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2500 | ;; | |
2501 | esac | |
2502 | fi | |
2503 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2504 | if test -n "$XGETTEXT"; then | |
2505 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2506 | else | |
2507 | echo "$ac_t""no" 1>&6 | |
2508 | fi | |
2509 | ||
2510 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2511 | #line 2512 "configure" |
c906108c SS |
2512 | #include "confdefs.h" |
2513 | ||
2514 | int main() { | |
2515 | extern int _nl_msg_cat_cntr; | |
2516 | return _nl_msg_cat_cntr | |
2517 | ; return 0; } | |
2518 | EOF | |
3b851bce | 2519 | if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2520 | rm -rf conftest* |
2521 | CATOBJEXT=.gmo | |
2522 | DATADIRNAME=share | |
2523 | else | |
2524 | echo "configure: failed program was:" >&5 | |
2525 | cat conftest.$ac_ext >&5 | |
2526 | rm -rf conftest* | |
2527 | CATOBJEXT=.mo | |
2528 | DATADIRNAME=lib | |
2529 | fi | |
2530 | rm -f conftest* | |
2531 | INSTOBJEXT=.mo | |
2532 | fi | |
2533 | fi | |
2534 | ||
2535 | else | |
2536 | echo "$ac_t""no" 1>&6 | |
2537 | fi | |
2538 | ||
2539 | ||
2540 | ||
2541 | if test "$CATOBJEXT" = "NONE"; then | |
2542 | nls_cv_use_gnu_gettext=yes | |
2543 | fi | |
2544 | fi | |
2545 | ||
2546 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2547 | INTLOBJS="\$(GETTOBJS)" | |
2548 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2549 | set dummy msgfmt; ac_word=$2 | |
2550 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2551 | echo "configure:2552: checking for $ac_word" >&5 |
c906108c SS |
2552 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2553 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2554 | else | |
2555 | case "$MSGFMT" in | |
2556 | /*) | |
2557 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2558 | ;; | |
2559 | *) | |
2560 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2561 | for ac_dir in $PATH; do | |
2562 | test -z "$ac_dir" && ac_dir=. | |
2563 | if test -f $ac_dir/$ac_word; then | |
2564 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2565 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2566 | break | |
2567 | fi | |
2568 | fi | |
2569 | done | |
2570 | IFS="$ac_save_ifs" | |
2571 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2572 | ;; | |
2573 | esac | |
2574 | fi | |
2575 | MSGFMT="$ac_cv_path_MSGFMT" | |
2576 | if test -n "$MSGFMT"; then | |
2577 | echo "$ac_t""$MSGFMT" 1>&6 | |
2578 | else | |
2579 | echo "$ac_t""no" 1>&6 | |
2580 | fi | |
2581 | ||
2582 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2583 | set dummy gmsgfmt; ac_word=$2 | |
2584 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2585 | echo "configure:2586: checking for $ac_word" >&5 |
c906108c SS |
2586 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2587 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2588 | else | |
2589 | case "$GMSGFMT" in | |
2590 | /*) | |
2591 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2592 | ;; | |
2593 | ?:/*) | |
2594 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2595 | ;; | |
2596 | *) | |
2597 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2598 | ac_dummy="$PATH" | |
2599 | for ac_dir in $ac_dummy; do | |
2600 | test -z "$ac_dir" && ac_dir=. | |
2601 | if test -f $ac_dir/$ac_word; then | |
2602 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2603 | break | |
2604 | fi | |
2605 | done | |
2606 | IFS="$ac_save_ifs" | |
2607 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2608 | ;; | |
2609 | esac | |
2610 | fi | |
2611 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2612 | if test -n "$GMSGFMT"; then | |
2613 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2614 | else | |
2615 | echo "$ac_t""no" 1>&6 | |
2616 | fi | |
2617 | ||
2618 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2619 | set dummy xgettext; ac_word=$2 | |
2620 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2621 | echo "configure:2622: checking for $ac_word" >&5 |
c906108c SS |
2622 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2623 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2624 | else | |
2625 | case "$XGETTEXT" in | |
2626 | /*) | |
2627 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2628 | ;; | |
2629 | *) | |
2630 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2631 | for ac_dir in $PATH; do | |
2632 | test -z "$ac_dir" && ac_dir=. | |
2633 | if test -f $ac_dir/$ac_word; then | |
2634 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2635 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2636 | break | |
2637 | fi | |
2638 | fi | |
2639 | done | |
2640 | IFS="$ac_save_ifs" | |
2641 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2642 | ;; | |
2643 | esac | |
2644 | fi | |
2645 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2646 | if test -n "$XGETTEXT"; then | |
2647 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2648 | else | |
2649 | echo "$ac_t""no" 1>&6 | |
2650 | fi | |
2651 | ||
2652 | ||
2653 | USE_INCLUDED_LIBINTL=yes | |
2654 | CATOBJEXT=.gmo | |
2655 | INSTOBJEXT=.mo | |
2656 | DATADIRNAME=share | |
2657 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2658 | INTLLIBS=$INTLDEPS | |
2659 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2660 | nls_cv_header_intl=libintl.h | |
2661 | nls_cv_header_libgt=libgettext.h | |
2662 | fi | |
2663 | ||
2664 | if test "$XGETTEXT" != ":"; then | |
2665 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2666 | : ; | |
2667 | else | |
2668 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2669 | XGETTEXT=":" | |
2670 | fi | |
2671 | fi | |
2672 | ||
2673 | # We need to process the po/ directory. | |
2674 | POSUB=po | |
2675 | else | |
2676 | DATADIRNAME=share | |
2677 | nls_cv_header_intl=libintl.h | |
2678 | nls_cv_header_libgt=libgettext.h | |
2679 | fi | |
2680 | ||
2681 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2682 | # because some of the sources are only built for this goal. | |
2683 | if test "$PACKAGE" = gettext; then | |
2684 | USE_NLS=yes | |
2685 | USE_INCLUDED_LIBINTL=yes | |
2686 | fi | |
2687 | ||
2688 | for lang in $ALL_LINGUAS; do | |
2689 | GMOFILES="$GMOFILES $lang.gmo" | |
2690 | POFILES="$POFILES $lang.po" | |
2691 | done | |
2692 | ||
2693 | ||
2694 | ||
2695 | ||
2696 | ||
2697 | ||
2698 | ||
2699 | ||
2700 | ||
2701 | ||
2702 | ||
2703 | ||
2704 | ||
2705 | ||
2706 | if test "x$CATOBJEXT" != "x"; then | |
2707 | if test "x$ALL_LINGUAS" = "x"; then | |
2708 | LINGUAS= | |
2709 | else | |
2710 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
3b851bce | 2711 | echo "configure:2712: checking for catalogs to be installed" >&5 |
c906108c SS |
2712 | NEW_LINGUAS= |
2713 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2714 | case "$ALL_LINGUAS" in | |
2715 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2716 | esac | |
2717 | done | |
2718 | LINGUAS=$NEW_LINGUAS | |
2719 | echo "$ac_t""$LINGUAS" 1>&6 | |
2720 | fi | |
2721 | ||
2722 | if test -n "$LINGUAS"; then | |
2723 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2724 | fi | |
2725 | fi | |
2726 | ||
2727 | if test $ac_cv_header_locale_h = yes; then | |
2728 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2729 | else | |
2730 | INCLUDE_LOCALE_H="\ | |
2731 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2732 | fi | |
2733 | ||
2734 | ||
2735 | if test -f $srcdir/po2tbl.sed.in; then | |
2736 | if test "$CATOBJEXT" = ".cat"; then | |
2737 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2738 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
3b851bce | 2739 | echo "configure:2740: checking for linux/version.h" >&5 |
c906108c SS |
2740 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2741 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2742 | else | |
2743 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 2744 | #line 2745 "configure" |
c906108c SS |
2745 | #include "confdefs.h" |
2746 | #include <linux/version.h> | |
2747 | EOF | |
2748 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 2749 | { (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2750 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2751 | if test -z "$ac_err"; then | |
2752 | rm -rf conftest* | |
2753 | eval "ac_cv_header_$ac_safe=yes" | |
2754 | else | |
2755 | echo "$ac_err" >&5 | |
2756 | echo "configure: failed program was:" >&5 | |
2757 | cat conftest.$ac_ext >&5 | |
2758 | rm -rf conftest* | |
2759 | eval "ac_cv_header_$ac_safe=no" | |
2760 | fi | |
2761 | rm -f conftest* | |
2762 | fi | |
2763 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2764 | echo "$ac_t""yes" 1>&6 | |
2765 | msgformat=linux | |
2766 | else | |
2767 | echo "$ac_t""no" 1>&6 | |
2768 | msgformat=xopen | |
2769 | fi | |
2770 | ||
2771 | ||
2772 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2773 | fi | |
2774 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2775 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2776 | fi | |
2777 | ||
2778 | if test "$PACKAGE" = "gettext"; then | |
2779 | GT_NO="#NO#" | |
2780 | GT_YES= | |
2781 | else | |
2782 | GT_NO= | |
2783 | GT_YES="#YES#" | |
2784 | fi | |
2785 | ||
2786 | ||
2787 | ||
2788 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2789 | ||
2790 | ||
2791 | l= | |
2792 | ||
2793 | ||
2794 | if test -d $srcdir/po; then | |
2795 | test -d po || mkdir po | |
2796 | if test "x$srcdir" != "x."; then | |
2797 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2798 | posrcprefix="$srcdir/" | |
2799 | else | |
2800 | posrcprefix="../$srcdir/" | |
2801 | fi | |
2802 | else | |
2803 | posrcprefix="../" | |
2804 | fi | |
2805 | rm -f po/POTFILES | |
2806 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2807 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2808 | fi | |
2809 | ||
2810 | ||
2811 | ||
2812 | CONFIG_OBS= | |
2813 | CONFIG_DEPS= | |
2814 | CONFIG_SRCS= | |
fb40c209 AC |
2815 | CONFIG_INITS= |
2816 | ENABLE_CFLAGS= | |
b3a90332 AC |
2817 | CONFIG_ALL= |
2818 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2819 | CONFIG_INSTALL= |
2820 | CONFIG_UNINSTALL= | |
c906108c SS |
2821 | |
2822 | configdirs="doc testsuite" | |
2823 | ||
96baa820 JM |
2824 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2825 | if test "${enable_multi_ice+set}" = set; then | |
2826 | enableval="$enable_multi_ice" | |
2827 | case "${enableval}" in | |
2828 | yes ) enable_multi_ice="yes" ;; | |
2829 | no) enable_multi_ice="no" ;; | |
2830 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2831 | esac | |
2832 | ||
2833 | fi | |
2834 | ||
2835 | ||
2836 | if test "${enable_multi_ice}" = "yes"; then | |
2837 | configdirs="${configdirs} multi-ice" | |
2838 | fi | |
2839 | ||
c906108c SS |
2840 | |
2841 | . ${srcdir}/configure.host | |
2842 | ||
2843 | . ${srcdir}/configure.tgt | |
2844 | ||
1ba607ad AC |
2845 | targ=${target} ; . ${srcdir}/../bfd/config.bfd |
2846 | ||
2847 | ||
2848 | targ=${target} | |
2849 | . ${srcdir}/../bfd/config.bfd | |
5c8cc331 AC |
2850 | |
2851 | targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'` | |
2852 | ||
1ba607ad AC |
2853 | if test x"${targ_archs}" != x ; then |
2854 | cat >> confdefs.h <<EOF | |
2855 | #define DEFAULT_BFD_ARCH ${targ_archs} | |
2856 | EOF | |
2857 | ||
2858 | fi | |
2859 | if test x"${targ_defvec}" != x ; then | |
2860 | cat >> confdefs.h <<EOF | |
2861 | #define DEFAULT_BFD_VEC ${targ_defvec} | |
2862 | EOF | |
2863 | ||
2864 | fi | |
c906108c | 2865 | |
3b851bce | 2866 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2867 | do |
2868 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2869 | set dummy $ac_prog; ac_word=$2 | |
2870 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2871 | echo "configure:2872: checking for $ac_word" >&5 |
7a292a7a SS |
2872 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2873 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2874 | else | |
2875 | if test -n "$AWK"; then | |
2876 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2877 | else | |
2878 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2879 | ac_dummy="$PATH" | |
2880 | for ac_dir in $ac_dummy; do | |
2881 | test -z "$ac_dir" && ac_dir=. | |
2882 | if test -f $ac_dir/$ac_word; then | |
2883 | ac_cv_prog_AWK="$ac_prog" | |
2884 | break | |
2885 | fi | |
2886 | done | |
2887 | IFS="$ac_save_ifs" | |
2888 | fi | |
2889 | fi | |
2890 | AWK="$ac_cv_prog_AWK" | |
2891 | if test -n "$AWK"; then | |
2892 | echo "$ac_t""$AWK" 1>&6 | |
2893 | else | |
2894 | echo "$ac_t""no" 1>&6 | |
2895 | fi | |
2896 | ||
2897 | test -n "$AWK" && break | |
2898 | done | |
2899 | ||
c906108c SS |
2900 | # Find a good install program. We prefer a C program (faster), |
2901 | # so one script is as good as another. But avoid the broken or | |
2902 | # incompatible versions: | |
2903 | # SysV /etc/install, /usr/sbin/install | |
2904 | # SunOS /usr/etc/install | |
2905 | # IRIX /sbin/install | |
2906 | # AIX /bin/install | |
2907 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2908 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2909 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2910 | # ./install, which can be erroneously created by make from ./install.sh. | |
2911 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
3b851bce | 2912 | echo "configure:2913: checking for a BSD compatible install" >&5 |
c906108c SS |
2913 | if test -z "$INSTALL"; then |
2914 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2915 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2916 | else | |
2917 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2918 | for ac_dir in $PATH; do | |
2919 | # Account for people who put trailing slashes in PATH elements. | |
2920 | case "$ac_dir/" in | |
2921 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2922 | *) | |
2923 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2924 | # Don't use installbsd from OSF since it installs stuff as root | |
2925 | # by default. | |
2926 | for ac_prog in ginstall scoinst install; do | |
2927 | if test -f $ac_dir/$ac_prog; then | |
2928 | if test $ac_prog = install && | |
2929 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2930 | # AIX install. It has an incompatible calling convention. | |
2931 | : | |
2932 | else | |
2933 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2934 | break 2 | |
2935 | fi | |
2936 | fi | |
2937 | done | |
2938 | ;; | |
2939 | esac | |
2940 | done | |
2941 | IFS="$ac_save_IFS" | |
2942 | ||
2943 | fi | |
2944 | if test "${ac_cv_path_install+set}" = set; then | |
2945 | INSTALL="$ac_cv_path_install" | |
2946 | else | |
2947 | # As a last resort, use the slow shell script. We don't cache a | |
2948 | # path for INSTALL within a source directory, because that will | |
2949 | # break other packages using the cache if that directory is | |
2950 | # removed, or if the path is relative. | |
2951 | INSTALL="$ac_install_sh" | |
2952 | fi | |
2953 | fi | |
2954 | echo "$ac_t""$INSTALL" 1>&6 | |
2955 | ||
2956 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2957 | # It thinks the first close brace ends the variable substitution. | |
2958 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2959 | ||
2960 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2961 | ||
2962 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2963 | ||
2964 | if test $host != $build; then | |
2965 | ac_tool_prefix=${host_alias}- | |
2966 | else | |
2967 | ac_tool_prefix= | |
2968 | fi | |
2969 | ||
2970 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2971 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2972 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 2973 | echo "configure:2974: checking for $ac_word" >&5 |
c906108c SS |
2974 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2975 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2976 | else | |
2977 | if test -n "$AR"; then | |
2978 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2979 | else | |
2980 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2981 | ac_dummy="$PATH" | |
2982 | for ac_dir in $ac_dummy; do | |
2983 | test -z "$ac_dir" && ac_dir=. | |
2984 | if test -f $ac_dir/$ac_word; then | |
2985 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2986 | break | |
2987 | fi | |
2988 | done | |
2989 | IFS="$ac_save_ifs" | |
2990 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2991 | fi | |
2992 | fi | |
2993 | AR="$ac_cv_prog_AR" | |
2994 | if test -n "$AR"; then | |
2995 | echo "$ac_t""$AR" 1>&6 | |
2996 | else | |
2997 | echo "$ac_t""no" 1>&6 | |
2998 | fi | |
2999 | ||
3000 | ||
3001 | ||
3002 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
3003 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
3004 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 3005 | echo "configure:3006: checking for $ac_word" >&5 |
c906108c SS |
3006 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3007 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3008 | else | |
3009 | if test -n "$RANLIB"; then | |
3010 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3011 | else | |
3012 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3013 | ac_dummy="$PATH" | |
3014 | for ac_dir in $ac_dummy; do | |
3015 | test -z "$ac_dir" && ac_dir=. | |
3016 | if test -f $ac_dir/$ac_word; then | |
3017 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3018 | break | |
3019 | fi | |
3020 | done | |
3021 | IFS="$ac_save_ifs" | |
3022 | fi | |
3023 | fi | |
3024 | RANLIB="$ac_cv_prog_RANLIB" | |
3025 | if test -n "$RANLIB"; then | |
3026 | echo "$ac_t""$RANLIB" 1>&6 | |
3027 | else | |
3028 | echo "$ac_t""no" 1>&6 | |
3029 | fi | |
3030 | ||
3031 | ||
3032 | if test -z "$ac_cv_prog_RANLIB"; then | |
3033 | if test -n "$ac_tool_prefix"; then | |
3034 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3035 | set dummy ranlib; ac_word=$2 | |
3036 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 3037 | echo "configure:3038: checking for $ac_word" >&5 |
c906108c SS |
3038 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3040 | else | |
3041 | if test -n "$RANLIB"; then | |
3042 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3043 | else | |
3044 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3045 | ac_dummy="$PATH" | |
3046 | for ac_dir in $ac_dummy; do | |
3047 | test -z "$ac_dir" && ac_dir=. | |
3048 | if test -f $ac_dir/$ac_word; then | |
3049 | ac_cv_prog_RANLIB="ranlib" | |
3050 | break | |
3051 | fi | |
3052 | done | |
3053 | IFS="$ac_save_ifs" | |
3054 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3055 | fi | |
3056 | fi | |
3057 | RANLIB="$ac_cv_prog_RANLIB" | |
3058 | if test -n "$RANLIB"; then | |
3059 | echo "$ac_t""$RANLIB" 1>&6 | |
3060 | else | |
3061 | echo "$ac_t""no" 1>&6 | |
3062 | fi | |
3063 | ||
3064 | else | |
3065 | RANLIB=":" | |
3066 | fi | |
3067 | fi | |
3068 | ||
95ca63c4 CF |
3069 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3070 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3071 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 3072 | echo "configure:3073: checking for $ac_word" >&5 |
95ca63c4 CF |
3073 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3074 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3075 | else | |
3076 | if test -n "$DLLTOOL"; then | |
3077 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3078 | else | |
3079 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3080 | ac_dummy="$PATH" | |
3081 | for ac_dir in $ac_dummy; do | |
3082 | test -z "$ac_dir" && ac_dir=. | |
3083 | if test -f $ac_dir/$ac_word; then | |
3084 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3085 | break | |
3086 | fi | |
3087 | done | |
3088 | IFS="$ac_save_ifs" | |
3089 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3090 | fi | |
3091 | fi | |
3092 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3093 | if test -n "$DLLTOOL"; then | |
3094 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3095 | else | |
3096 | echo "$ac_t""no" 1>&6 | |
3097 | fi | |
3098 | ||
3099 | ||
3100 | ||
3101 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3102 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3103 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 3104 | echo "configure:3105: checking for $ac_word" >&5 |
95ca63c4 CF |
3105 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3106 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3107 | else | |
3108 | if test -n "$WINDRES"; then | |
3109 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3110 | else | |
3111 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3112 | ac_dummy="$PATH" | |
3113 | for ac_dir in $ac_dummy; do | |
3114 | test -z "$ac_dir" && ac_dir=. | |
3115 | if test -f $ac_dir/$ac_word; then | |
3116 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3117 | break | |
3118 | fi | |
3119 | done | |
3120 | IFS="$ac_save_ifs" | |
3121 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3122 | fi | |
3123 | fi | |
3124 | WINDRES="$ac_cv_prog_WINDRES" | |
3125 | if test -n "$WINDRES"; then | |
3126 | echo "$ac_t""$WINDRES" 1>&6 | |
3127 | else | |
3128 | echo "$ac_t""no" 1>&6 | |
3129 | fi | |
3130 | ||
3131 | ||
3132 | ||
c906108c SS |
3133 | for ac_prog in 'bison -y' byacc |
3134 | do | |
3135 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3136 | set dummy $ac_prog; ac_word=$2 | |
3137 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 3138 | echo "configure:3139: checking for $ac_word" >&5 |
c906108c SS |
3139 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3140 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3141 | else | |
3142 | if test -n "$YACC"; then | |
3143 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3144 | else | |
3145 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3146 | ac_dummy="$PATH" | |
3147 | for ac_dir in $ac_dummy; do | |
3148 | test -z "$ac_dir" && ac_dir=. | |
3149 | if test -f $ac_dir/$ac_word; then | |
3150 | ac_cv_prog_YACC="$ac_prog" | |
3151 | break | |
3152 | fi | |
3153 | done | |
3154 | IFS="$ac_save_ifs" | |
3155 | fi | |
3156 | fi | |
3157 | YACC="$ac_cv_prog_YACC" | |
3158 | if test -n "$YACC"; then | |
3159 | echo "$ac_t""$YACC" 1>&6 | |
3160 | else | |
3161 | echo "$ac_t""no" 1>&6 | |
3162 | fi | |
3163 | ||
3164 | test -n "$YACC" && break | |
3165 | done | |
3166 | test -n "$YACC" || YACC="yacc" | |
3167 | ||
3168 | ||
75c6e08a MK |
3169 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3170 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3171 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b851bce | 3172 | echo "configure:3173: checking for $ac_word" >&5 |
75c6e08a MK |
3173 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3174 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3175 | else | |
3176 | if test -n "$MIG"; then | |
3177 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3178 | else | |
3179 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3180 | ac_dummy="$PATH" | |
3181 | for ac_dir in $ac_dummy; do | |
3182 | test -z "$ac_dir" && ac_dir=. | |
3183 | if test -f $ac_dir/$ac_word; then | |
3184 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3185 | break | |
3186 | fi | |
3187 | done | |
3188 | IFS="$ac_save_ifs" | |
3189 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3190 | fi | |
3191 | fi | |
3192 | MIG="$ac_cv_prog_MIG" | |
3193 | if test -n "$MIG"; then | |
3194 | echo "$ac_t""$MIG" 1>&6 | |
3195 | else | |
3196 | echo "$ac_t""no" 1>&6 | |
3197 | fi | |
3198 | ||
3199 | ||
3200 | ||
3201 | ||
c906108c SS |
3202 | if test "$program_transform_name" = s,x,x,; then |
3203 | program_transform_name= | |
3204 | else | |
3205 | # Double any \ or $. echo might interpret backslashes. | |
3206 | cat <<\EOF_SED > conftestsed | |
3207 | s,\\,\\\\,g; s,\$,$$,g | |
3208 | EOF_SED | |
3209 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3210 | rm -f conftestsed | |
3211 | fi | |
3212 | test "$program_prefix" != NONE && | |
3213 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3214 | # Use a double $ so make ignores it. | |
3215 | test "$program_suffix" != NONE && | |
3216 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3217 | ||
3218 | # sed with no file args requires a program. | |
3219 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3220 | ||
3221 | ||
3222 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
3b851bce | 3223 | echo "configure:3224: checking return type of signal handlers" >&5 |
c906108c SS |
3224 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3225 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3226 | else | |
3227 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3228 | #line 3229 "configure" |
c906108c SS |
3229 | #include "confdefs.h" |
3230 | #include <sys/types.h> | |
3231 | #include <signal.h> | |
3232 | #ifdef signal | |
3233 | #undef signal | |
3234 | #endif | |
3235 | #ifdef __cplusplus | |
3236 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3237 | #else | |
3238 | void (*signal ()) (); | |
3239 | #endif | |
3240 | ||
3241 | int main() { | |
3242 | int i; | |
3243 | ; return 0; } | |
3244 | EOF | |
3b851bce | 3245 | if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3246 | rm -rf conftest* |
3247 | ac_cv_type_signal=void | |
3248 | else | |
3249 | echo "configure: failed program was:" >&5 | |
3250 | cat conftest.$ac_ext >&5 | |
3251 | rm -rf conftest* | |
3252 | ac_cv_type_signal=int | |
3253 | fi | |
3254 | rm -f conftest* | |
3255 | fi | |
3256 | ||
3257 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3258 | cat >> confdefs.h <<EOF | |
3259 | #define RETSIGTYPE $ac_cv_type_signal | |
3260 | EOF | |
3261 | ||
3262 | ||
3263 | ||
3264 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
3b851bce | 3265 | echo "configure:3266: checking for ANSI C header files" >&5 |
c906108c SS |
3266 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3267 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3268 | else | |
3269 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3270 | #line 3271 "configure" |
c906108c SS |
3271 | #include "confdefs.h" |
3272 | #include <stdlib.h> | |
3273 | #include <stdarg.h> | |
3274 | #include <string.h> | |
3275 | #include <float.h> | |
3276 | EOF | |
3277 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 3278 | { (eval echo configure:3279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3279 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3280 | if test -z "$ac_err"; then | |
3281 | rm -rf conftest* | |
3282 | ac_cv_header_stdc=yes | |
3283 | else | |
3284 | echo "$ac_err" >&5 | |
3285 | echo "configure: failed program was:" >&5 | |
3286 | cat conftest.$ac_ext >&5 | |
3287 | rm -rf conftest* | |
3288 | ac_cv_header_stdc=no | |
3289 | fi | |
3290 | rm -f conftest* | |
3291 | ||
3292 | if test $ac_cv_header_stdc = yes; then | |
3293 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3294 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3295 | #line 3296 "configure" |
c906108c SS |
3296 | #include "confdefs.h" |
3297 | #include <string.h> | |
3298 | EOF | |
3299 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3300 | egrep "memchr" >/dev/null 2>&1; then | |
3301 | : | |
3302 | else | |
3303 | rm -rf conftest* | |
3304 | ac_cv_header_stdc=no | |
3305 | fi | |
3306 | rm -f conftest* | |
3307 | ||
3308 | fi | |
3309 | ||
3310 | if test $ac_cv_header_stdc = yes; then | |
3311 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3312 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3313 | #line 3314 "configure" |
c906108c SS |
3314 | #include "confdefs.h" |
3315 | #include <stdlib.h> | |
3316 | EOF | |
3317 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3318 | egrep "free" >/dev/null 2>&1; then | |
3319 | : | |
3320 | else | |
3321 | rm -rf conftest* | |
3322 | ac_cv_header_stdc=no | |
3323 | fi | |
3324 | rm -f conftest* | |
3325 | ||
3326 | fi | |
3327 | ||
3328 | if test $ac_cv_header_stdc = yes; then | |
3329 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3330 | if test "$cross_compiling" = yes; then | |
3331 | : | |
3332 | else | |
3333 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3334 | #line 3335 "configure" |
c906108c SS |
3335 | #include "confdefs.h" |
3336 | #include <ctype.h> | |
3337 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3338 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3339 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3340 | int main () { int i; for (i = 0; i < 256; i++) | |
3341 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3342 | exit (0); } | |
3343 | ||
3344 | EOF | |
3b851bce | 3345 | if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3346 | then |
3347 | : | |
3348 | else | |
3349 | echo "configure: failed program was:" >&5 | |
3350 | cat conftest.$ac_ext >&5 | |
3351 | rm -fr conftest* | |
3352 | ac_cv_header_stdc=no | |
3353 | fi | |
3354 | rm -fr conftest* | |
3355 | fi | |
3356 | ||
3357 | fi | |
3358 | fi | |
3359 | ||
3360 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3361 | if test $ac_cv_header_stdc = yes; then | |
3362 | cat >> confdefs.h <<\EOF | |
3363 | #define STDC_HEADERS 1 | |
3364 | EOF | |
3365 | ||
3366 | fi | |
3367 | ||
3368 | ||
6abadcf8 | 3369 | |
3e0bf9f1 | 3370 | case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes) |
6abadcf8 ND |
3371 | cat >> confdefs.h <<\EOF |
3372 | #define _MSE_INT_H 1 | |
3373 | EOF | |
3374 | ||
3375 | esac; esac | |
3376 | ||
2894793a | 3377 | for ac_hdr in ctype.h endian.h link.h thread_db.h proc_service.h \ |
c906108c | 3378 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3379 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3380 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3381 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
4b14d3e4 | 3382 | time.h sys/ioctl.h sys/user.h \ |
2894793a | 3383 | dirent.h sys/ndir.h sys/dir.h ndir.h \ |
409a3f64 AC |
3384 | curses.h ncurses.h \ |
3385 | poll.h sys/poll.h | |
c906108c SS |
3386 | do |
3387 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3388 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3b851bce | 3389 | echo "configure:3390: checking for $ac_hdr" >&5 |
c906108c SS |
3390 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3392 | else | |
3393 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3394 | #line 3395 "configure" |
c906108c SS |
3395 | #include "confdefs.h" |
3396 | #include <$ac_hdr> | |
3397 | EOF | |
3398 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 3399 | { (eval echo configure:3400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3400 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3401 | if test -z "$ac_err"; then | |
3402 | rm -rf conftest* | |
3403 | eval "ac_cv_header_$ac_safe=yes" | |
3404 | else | |
3405 | echo "$ac_err" >&5 | |
3406 | echo "configure: failed program was:" >&5 | |
3407 | cat conftest.$ac_ext >&5 | |
3408 | rm -rf conftest* | |
3409 | eval "ac_cv_header_$ac_safe=no" | |
3410 | fi | |
3411 | rm -f conftest* | |
3412 | fi | |
3413 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3414 | echo "$ac_t""yes" 1>&6 | |
3415 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3416 | cat >> confdefs.h <<EOF | |
3417 | #define $ac_tr_hdr 1 | |
3418 | EOF | |
3419 | ||
3420 | else | |
3421 | echo "$ac_t""no" 1>&6 | |
3422 | fi | |
3423 | done | |
3424 | ||
3425 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
3b851bce | 3426 | echo "configure:3427: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3427 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3428 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3429 | else | |
3430 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3431 | #line 3432 "configure" |
c906108c SS |
3432 | #include "confdefs.h" |
3433 | #include <sys/types.h> | |
3434 | #include <sys/stat.h> | |
3435 | ||
3436 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3437 | # if S_ISBLK (S_IFDIR) | |
3438 | You lose. | |
3439 | # endif | |
3440 | #endif | |
3441 | ||
3442 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3443 | # if S_ISBLK (S_IFCHR) | |
3444 | You lose. | |
3445 | # endif | |
3446 | #endif | |
3447 | ||
3448 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3449 | # if S_ISLNK (S_IFREG) | |
3450 | You lose. | |
3451 | # endif | |
3452 | #endif | |
3453 | ||
3454 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3455 | # if S_ISSOCK (S_IFREG) | |
3456 | You lose. | |
3457 | # endif | |
3458 | #endif | |
3459 | ||
3460 | EOF | |
3461 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3462 | egrep "You lose" >/dev/null 2>&1; then | |
3463 | rm -rf conftest* | |
3464 | ac_cv_header_stat_broken=yes | |
3465 | else | |
3466 | rm -rf conftest* | |
3467 | ac_cv_header_stat_broken=no | |
3468 | fi | |
3469 | rm -f conftest* | |
3470 | ||
3471 | fi | |
3472 | ||
3473 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3474 | if test $ac_cv_header_stat_broken = yes; then | |
3475 | cat >> confdefs.h <<\EOF | |
3476 | #define STAT_MACROS_BROKEN 1 | |
3477 | EOF | |
3478 | ||
3479 | fi | |
3480 | ||
3481 | ||
3482 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
3b851bce | 3483 | echo "configure:3484: checking for working const" >&5 |
c906108c SS |
3484 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3485 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3486 | else | |
3487 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3488 | #line 3489 "configure" |
c906108c SS |
3489 | #include "confdefs.h" |
3490 | ||
3491 | int main() { | |
3492 | ||
3493 | /* Ultrix mips cc rejects this. */ | |
3494 | typedef int charset[2]; const charset x; | |
3495 | /* SunOS 4.1.1 cc rejects this. */ | |
3496 | char const *const *ccp; | |
3497 | char **p; | |
3498 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3499 | struct point {int x, y;}; | |
3500 | static struct point const zero = {0,0}; | |
3501 | /* AIX XL C 1.02.0.0 rejects this. | |
3502 | It does not let you subtract one const X* pointer from another in an arm | |
3503 | of an if-expression whose if-part is not a constant expression */ | |
3504 | const char *g = "string"; | |
3505 | ccp = &g + (g ? g-g : 0); | |
3506 | /* HPUX 7.0 cc rejects these. */ | |
3507 | ++ccp; | |
3508 | p = (char**) ccp; | |
3509 | ccp = (char const *const *) p; | |
3510 | { /* SCO 3.2v4 cc rejects this. */ | |
3511 | char *t; | |
3512 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3513 | ||
3514 | *t++ = 0; | |
3515 | } | |
3516 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3517 | int x[] = {25, 17}; | |
3518 | const int *foo = &x[0]; | |
3519 | ++foo; | |
3520 | } | |
3521 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3522 | typedef const int *iptr; | |
3523 | iptr p = 0; | |
3524 | ++p; | |
3525 | } | |
3526 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3527 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3528 | struct s { int j; const int *ap[3]; }; | |
3529 | struct s *b; b->j = 5; | |
3530 | } | |
3531 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3532 | const int foo = 10; | |
3533 | } | |
3534 | ||
3535 | ; return 0; } | |
3536 | EOF | |
3b851bce | 3537 | if { (eval echo configure:3538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3538 | rm -rf conftest* |
3539 | ac_cv_c_const=yes | |
3540 | else | |
3541 | echo "configure: failed program was:" >&5 | |
3542 | cat conftest.$ac_ext >&5 | |
3543 | rm -rf conftest* | |
3544 | ac_cv_c_const=no | |
3545 | fi | |
3546 | rm -f conftest* | |
3547 | fi | |
3548 | ||
3549 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3550 | if test $ac_cv_c_const = no; then | |
3551 | cat >> confdefs.h <<\EOF | |
3552 | #define const | |
3553 | EOF | |
3554 | ||
3555 | fi | |
3556 | ||
3557 | ||
2acceee2 | 3558 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask |
c906108c SS |
3559 | do |
3560 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 3561 | echo "configure:3562: checking for $ac_func" >&5 |
c906108c SS |
3562 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3563 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3564 | else | |
3565 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3566 | #line 3567 "configure" |
c906108c SS |
3567 | #include "confdefs.h" |
3568 | /* System header to define __stub macros and hopefully few prototypes, | |
3569 | which can conflict with char $ac_func(); below. */ | |
3570 | #include <assert.h> | |
3571 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3572 | /* We use char because int might match the return type of a gcc2 | |
3573 | builtin and then its argument prototype would still apply. */ | |
3574 | char $ac_func(); | |
3575 | ||
3576 | int main() { | |
3577 | ||
3578 | /* The GNU C library defines this for functions which it implements | |
3579 | to always fail with ENOSYS. Some functions are actually named | |
3580 | something starting with __ and the normal name is an alias. */ | |
3581 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3582 | choke me | |
3583 | #else | |
3584 | $ac_func(); | |
3585 | #endif | |
3586 | ||
3587 | ; return 0; } | |
3588 | EOF | |
3b851bce | 3589 | if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3590 | rm -rf conftest* |
3591 | eval "ac_cv_func_$ac_func=yes" | |
3592 | else | |
3593 | echo "configure: failed program was:" >&5 | |
3594 | cat conftest.$ac_ext >&5 | |
3595 | rm -rf conftest* | |
3596 | eval "ac_cv_func_$ac_func=no" | |
3597 | fi | |
3598 | rm -f conftest* | |
3599 | fi | |
3600 | ||
3601 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3602 | echo "$ac_t""yes" 1>&6 | |
3603 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3604 | cat >> confdefs.h <<EOF | |
3605 | #define $ac_tr_func 1 | |
3606 | EOF | |
3607 | ||
3608 | else | |
3609 | echo "$ac_t""no" 1>&6 | |
3610 | fi | |
3611 | done | |
3612 | ||
3613 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3614 | # for constant arguments. Useless! | |
3615 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
3b851bce | 3616 | echo "configure:3617: checking for working alloca.h" >&5 |
c906108c SS |
3617 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3618 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3619 | else | |
3620 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3621 | #line 3622 "configure" |
c906108c SS |
3622 | #include "confdefs.h" |
3623 | #include <alloca.h> | |
3624 | int main() { | |
3625 | char *p = alloca(2 * sizeof(int)); | |
3626 | ; return 0; } | |
3627 | EOF | |
3b851bce | 3628 | if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3629 | rm -rf conftest* |
3630 | ac_cv_header_alloca_h=yes | |
3631 | else | |
3632 | echo "configure: failed program was:" >&5 | |
3633 | cat conftest.$ac_ext >&5 | |
3634 | rm -rf conftest* | |
3635 | ac_cv_header_alloca_h=no | |
3636 | fi | |
3637 | rm -f conftest* | |
3638 | fi | |
3639 | ||
3640 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3641 | if test $ac_cv_header_alloca_h = yes; then | |
3642 | cat >> confdefs.h <<\EOF | |
3643 | #define HAVE_ALLOCA_H 1 | |
3644 | EOF | |
3645 | ||
3646 | fi | |
3647 | ||
3648 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
3b851bce | 3649 | echo "configure:3650: checking for alloca" >&5 |
c906108c SS |
3650 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3651 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3652 | else | |
3653 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3654 | #line 3655 "configure" |
c906108c SS |
3655 | #include "confdefs.h" |
3656 | ||
3657 | #ifdef __GNUC__ | |
3658 | # define alloca __builtin_alloca | |
3659 | #else | |
3660 | # ifdef _MSC_VER | |
3661 | # include <malloc.h> | |
3662 | # define alloca _alloca | |
3663 | # else | |
3664 | # if HAVE_ALLOCA_H | |
3665 | # include <alloca.h> | |
3666 | # else | |
3667 | # ifdef _AIX | |
3668 | #pragma alloca | |
3669 | # else | |
3670 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3671 | char *alloca (); | |
3672 | # endif | |
3673 | # endif | |
3674 | # endif | |
3675 | # endif | |
3676 | #endif | |
3677 | ||
3678 | int main() { | |
3679 | char *p = (char *) alloca(1); | |
3680 | ; return 0; } | |
3681 | EOF | |
3b851bce | 3682 | if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3683 | rm -rf conftest* |
3684 | ac_cv_func_alloca_works=yes | |
3685 | else | |
3686 | echo "configure: failed program was:" >&5 | |
3687 | cat conftest.$ac_ext >&5 | |
3688 | rm -rf conftest* | |
3689 | ac_cv_func_alloca_works=no | |
3690 | fi | |
3691 | rm -f conftest* | |
3692 | fi | |
3693 | ||
3694 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3695 | if test $ac_cv_func_alloca_works = yes; then | |
3696 | cat >> confdefs.h <<\EOF | |
3697 | #define HAVE_ALLOCA 1 | |
3698 | EOF | |
3699 | ||
3700 | fi | |
3701 | ||
3702 | if test $ac_cv_func_alloca_works = no; then | |
3703 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3704 | # that cause trouble. Some versions do not even contain alloca or | |
3705 | # contain a buggy version. If you still want to use their alloca, | |
3706 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3707 | ALLOCA=alloca.${ac_objext} | |
3708 | cat >> confdefs.h <<\EOF | |
3709 | #define C_ALLOCA 1 | |
3710 | EOF | |
3711 | ||
3712 | ||
3713 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
3b851bce | 3714 | echo "configure:3715: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
3715 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3716 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3717 | else | |
3718 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3719 | #line 3720 "configure" |
c906108c SS |
3720 | #include "confdefs.h" |
3721 | #if defined(CRAY) && ! defined(CRAY2) | |
3722 | webecray | |
3723 | #else | |
3724 | wenotbecray | |
3725 | #endif | |
3726 | ||
3727 | EOF | |
3728 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3729 | egrep "webecray" >/dev/null 2>&1; then | |
3730 | rm -rf conftest* | |
3731 | ac_cv_os_cray=yes | |
3732 | else | |
3733 | rm -rf conftest* | |
3734 | ac_cv_os_cray=no | |
3735 | fi | |
3736 | rm -f conftest* | |
3737 | ||
3738 | fi | |
3739 | ||
3740 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3741 | if test $ac_cv_os_cray = yes; then | |
3742 | for ac_func in _getb67 GETB67 getb67; do | |
3743 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 3744 | echo "configure:3745: checking for $ac_func" >&5 |
c906108c SS |
3745 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3746 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3747 | else | |
3748 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3749 | #line 3750 "configure" |
c906108c SS |
3750 | #include "confdefs.h" |
3751 | /* System header to define __stub macros and hopefully few prototypes, | |
3752 | which can conflict with char $ac_func(); below. */ | |
3753 | #include <assert.h> | |
3754 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3755 | /* We use char because int might match the return type of a gcc2 | |
3756 | builtin and then its argument prototype would still apply. */ | |
3757 | char $ac_func(); | |
3758 | ||
3759 | int main() { | |
3760 | ||
3761 | /* The GNU C library defines this for functions which it implements | |
3762 | to always fail with ENOSYS. Some functions are actually named | |
3763 | something starting with __ and the normal name is an alias. */ | |
3764 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3765 | choke me | |
3766 | #else | |
3767 | $ac_func(); | |
3768 | #endif | |
3769 | ||
3770 | ; return 0; } | |
3771 | EOF | |
3b851bce | 3772 | if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3773 | rm -rf conftest* |
3774 | eval "ac_cv_func_$ac_func=yes" | |
3775 | else | |
3776 | echo "configure: failed program was:" >&5 | |
3777 | cat conftest.$ac_ext >&5 | |
3778 | rm -rf conftest* | |
3779 | eval "ac_cv_func_$ac_func=no" | |
3780 | fi | |
3781 | rm -f conftest* | |
3782 | fi | |
3783 | ||
3784 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3785 | echo "$ac_t""yes" 1>&6 | |
3786 | cat >> confdefs.h <<EOF | |
3787 | #define CRAY_STACKSEG_END $ac_func | |
3788 | EOF | |
3789 | ||
3790 | break | |
3791 | else | |
3792 | echo "$ac_t""no" 1>&6 | |
3793 | fi | |
3794 | ||
3795 | done | |
3796 | fi | |
3797 | ||
3798 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
3b851bce | 3799 | echo "configure:3800: checking stack direction for C alloca" >&5 |
c906108c SS |
3800 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3801 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3802 | else | |
3803 | if test "$cross_compiling" = yes; then | |
3804 | ac_cv_c_stack_direction=0 | |
3805 | else | |
3806 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3807 | #line 3808 "configure" |
c906108c SS |
3808 | #include "confdefs.h" |
3809 | find_stack_direction () | |
3810 | { | |
3811 | static char *addr = 0; | |
3812 | auto char dummy; | |
3813 | if (addr == 0) | |
3814 | { | |
3815 | addr = &dummy; | |
3816 | return find_stack_direction (); | |
3817 | } | |
3818 | else | |
3819 | return (&dummy > addr) ? 1 : -1; | |
3820 | } | |
3821 | main () | |
3822 | { | |
3823 | exit (find_stack_direction() < 0); | |
3824 | } | |
3825 | EOF | |
3b851bce | 3826 | if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3827 | then |
3828 | ac_cv_c_stack_direction=1 | |
3829 | else | |
3830 | echo "configure: failed program was:" >&5 | |
3831 | cat conftest.$ac_ext >&5 | |
3832 | rm -fr conftest* | |
3833 | ac_cv_c_stack_direction=-1 | |
3834 | fi | |
3835 | rm -fr conftest* | |
3836 | fi | |
3837 | ||
3838 | fi | |
3839 | ||
3840 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3841 | cat >> confdefs.h <<EOF | |
3842 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3843 | EOF | |
3844 | ||
3845 | fi | |
3846 | ||
3847 | ||
7dfa765c MK |
3848 | # See if machine/reg.h supports the %fs and %gs i386 segment registers. |
3849 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
3850 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
3b851bce | 3851 | echo "configure:3852: checking for r_fs in struct reg" >&5 |
422ea4b8 | 3852 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7dfa765c MK |
3853 | echo $ac_n "(cached) $ac_c" 1>&6 |
3854 | else | |
3855 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3856 | #line 3857 "configure" |
7dfa765c MK |
3857 | #include "confdefs.h" |
3858 | #include <machine/reg.h> | |
3859 | int main() { | |
3860 | struct reg r; r.r_fs; | |
3861 | ; return 0; } | |
3862 | EOF | |
3b851bce | 3863 | if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3864 | rm -rf conftest* |
422ea4b8 | 3865 | gdb_cv_struct_reg_r_fs=yes |
7dfa765c MK |
3866 | else |
3867 | echo "configure: failed program was:" >&5 | |
3868 | cat conftest.$ac_ext >&5 | |
3869 | rm -rf conftest* | |
422ea4b8 | 3870 | gdb_cv_struct_reg_r_fs=no |
7dfa765c MK |
3871 | fi |
3872 | rm -f conftest* | |
3873 | fi | |
3874 | ||
422ea4b8 MK |
3875 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
3876 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7dfa765c | 3877 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3878 | #define HAVE_STRUCT_REG_R_FS 1 |
7dfa765c MK |
3879 | EOF |
3880 | ||
3881 | fi | |
3882 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
3b851bce | 3883 | echo "configure:3884: checking for r_gs in struct reg" >&5 |
422ea4b8 | 3884 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7dfa765c MK |
3885 | echo $ac_n "(cached) $ac_c" 1>&6 |
3886 | else | |
3887 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3888 | #line 3889 "configure" |
7dfa765c MK |
3889 | #include "confdefs.h" |
3890 | #include <machine/reg.h> | |
3891 | int main() { | |
3892 | struct reg r; r.r_gs; | |
3893 | ; return 0; } | |
3894 | EOF | |
3b851bce | 3895 | if { (eval echo configure:3896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3896 | rm -rf conftest* |
422ea4b8 | 3897 | gdb_cv_struct_reg_r_gs=yes |
7dfa765c MK |
3898 | else |
3899 | echo "configure: failed program was:" >&5 | |
3900 | cat conftest.$ac_ext >&5 | |
3901 | rm -rf conftest* | |
422ea4b8 | 3902 | gdb_cv_struct_reg_r_gs=no |
7dfa765c MK |
3903 | fi |
3904 | rm -f conftest* | |
3905 | fi | |
3906 | ||
422ea4b8 MK |
3907 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
3908 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7dfa765c | 3909 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3910 | #define HAVE_STRUCT_REG_R_GS 1 |
7dfa765c MK |
3911 | EOF |
3912 | ||
3913 | fi | |
3914 | ||
64bb1671 | 3915 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 |
3b851bce | 3916 | echo "configure:3917: checking for PTRACE_GETREGS" >&5 |
64bb1671 MK |
3917 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
3918 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3919 | else | |
3920 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3921 | #line 3922 "configure" |
64bb1671 MK |
3922 | #include "confdefs.h" |
3923 | #include <sys/ptrace.h> | |
3924 | int main() { | |
3925 | PTRACE_GETREGS; | |
3926 | ; return 0; } | |
3927 | EOF | |
3b851bce | 3928 | if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
64bb1671 MK |
3929 | rm -rf conftest* |
3930 | gdb_cv_have_ptrace_getregs=yes | |
3931 | else | |
3932 | echo "configure: failed program was:" >&5 | |
3933 | cat conftest.$ac_ext >&5 | |
3934 | rm -rf conftest* | |
3935 | gdb_cv_have_ptrace_getregs=no | |
3936 | fi | |
3937 | rm -f conftest* | |
3938 | fi | |
3939 | ||
4397a6ab | 3940 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
64bb1671 MK |
3941 | if test $gdb_cv_have_ptrace_getregs = yes; then |
3942 | cat >> confdefs.h <<\EOF | |
3943 | #define HAVE_PTRACE_GETREGS 1 | |
3944 | EOF | |
3945 | ||
3946 | fi | |
3947 | ||
6ce2ac0b | 3948 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 |
3b851bce | 3949 | echo "configure:3950: checking for PTRACE_GETFPXREGS" >&5 |
6ce2ac0b | 3950 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
5c44784c JM |
3951 | echo $ac_n "(cached) $ac_c" 1>&6 |
3952 | else | |
3953 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3954 | #line 3955 "configure" |
5c44784c JM |
3955 | #include "confdefs.h" |
3956 | #include <sys/ptrace.h> | |
3957 | int main() { | |
6ce2ac0b | 3958 | PTRACE_GETFPXREGS; |
5c44784c JM |
3959 | ; return 0; } |
3960 | EOF | |
3b851bce | 3961 | if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c | 3962 | rm -rf conftest* |
6ce2ac0b | 3963 | gdb_cv_have_ptrace_getfpxregs=yes |
5c44784c JM |
3964 | else |
3965 | echo "configure: failed program was:" >&5 | |
3966 | cat conftest.$ac_ext >&5 | |
3967 | rm -rf conftest* | |
6ce2ac0b | 3968 | gdb_cv_have_ptrace_getfpxregs=no |
5c44784c JM |
3969 | fi |
3970 | rm -f conftest* | |
3971 | fi | |
3972 | ||
6ce2ac0b MK |
3973 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
3974 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
5c44784c | 3975 | cat >> confdefs.h <<\EOF |
6ce2ac0b | 3976 | #define HAVE_PTRACE_GETFPXREGS 1 |
5c44784c JM |
3977 | EOF |
3978 | ||
3979 | fi | |
3980 | ||
7be570e7 | 3981 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
3b851bce | 3982 | echo "configure:3983: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
3983 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
3984 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3985 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3986 | else | |
3987 | ac_save_LIBS="$LIBS" | |
3988 | LIBS="-lsocket $LIBS" | |
3989 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 3990 | #line 3991 "configure" |
7be570e7 JM |
3991 | #include "confdefs.h" |
3992 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3993 | /* We use char because int might match the return type of a gcc2 | |
3994 | builtin and then its argument prototype would still apply. */ | |
3995 | char socketpair(); | |
3996 | ||
3997 | int main() { | |
3998 | socketpair() | |
3999 | ; return 0; } | |
4000 | EOF | |
3b851bce | 4001 | if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4002 | rm -rf conftest* |
4003 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4004 | else | |
4005 | echo "configure: failed program was:" >&5 | |
4006 | cat conftest.$ac_ext >&5 | |
4007 | rm -rf conftest* | |
4008 | eval "ac_cv_lib_$ac_lib_var=no" | |
4009 | fi | |
4010 | rm -f conftest* | |
4011 | LIBS="$ac_save_LIBS" | |
4012 | ||
4013 | fi | |
4014 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4015 | echo "$ac_t""yes" 1>&6 | |
4016 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4017 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4018 | cat >> confdefs.h <<EOF | |
4019 | #define $ac_tr_lib 1 | |
4020 | EOF | |
4021 | ||
4022 | LIBS="-lsocket $LIBS" | |
4023 | ||
4024 | else | |
4025 | echo "$ac_t""no" 1>&6 | |
4026 | fi | |
4027 | ||
4028 | for ac_func in socketpair | |
4029 | do | |
4030 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 4031 | echo "configure:4032: checking for $ac_func" >&5 |
7be570e7 JM |
4032 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4034 | else | |
4035 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4036 | #line 4037 "configure" |
7be570e7 JM |
4037 | #include "confdefs.h" |
4038 | /* System header to define __stub macros and hopefully few prototypes, | |
4039 | which can conflict with char $ac_func(); below. */ | |
4040 | #include <assert.h> | |
4041 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4042 | /* We use char because int might match the return type of a gcc2 | |
4043 | builtin and then its argument prototype would still apply. */ | |
4044 | char $ac_func(); | |
4045 | ||
4046 | int main() { | |
4047 | ||
4048 | /* The GNU C library defines this for functions which it implements | |
4049 | to always fail with ENOSYS. Some functions are actually named | |
4050 | something starting with __ and the normal name is an alias. */ | |
4051 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4052 | choke me | |
4053 | #else | |
4054 | $ac_func(); | |
4055 | #endif | |
4056 | ||
4057 | ; return 0; } | |
4058 | EOF | |
3b851bce | 4059 | if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4060 | rm -rf conftest* |
4061 | eval "ac_cv_func_$ac_func=yes" | |
4062 | else | |
4063 | echo "configure: failed program was:" >&5 | |
4064 | cat conftest.$ac_ext >&5 | |
4065 | rm -rf conftest* | |
4066 | eval "ac_cv_func_$ac_func=no" | |
4067 | fi | |
4068 | rm -f conftest* | |
4069 | fi | |
4070 | ||
4071 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4072 | echo "$ac_t""yes" 1>&6 | |
4073 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4074 | cat >> confdefs.h <<EOF | |
4075 | #define $ac_tr_func 1 | |
4076 | EOF | |
4077 | ||
4078 | else | |
4079 | echo "$ac_t""no" 1>&6 | |
4080 | fi | |
4081 | done | |
4082 | ||
4083 | ||
4084 | ||
c906108c | 4085 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
3b851bce | 4086 | echo "configure:4087: checking whether malloc must be declared" >&5 |
c906108c SS |
4087 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4088 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4089 | else | |
4090 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4091 | #line 4092 "configure" |
c906108c SS |
4092 | #include "confdefs.h" |
4093 | ||
4094 | #include <stdio.h> | |
4095 | #ifdef HAVE_STRING_H | |
4096 | #include <string.h> | |
4097 | #else | |
4098 | #ifdef HAVE_STRINGS_H | |
4099 | #include <strings.h> | |
4100 | #endif | |
4101 | #endif | |
4102 | #ifdef HAVE_STDLIB_H | |
4103 | #include <stdlib.h> | |
4104 | #endif | |
4105 | #ifdef HAVE_UNISTD_H | |
4106 | #include <unistd.h> | |
4107 | #endif | |
4108 | int main() { | |
4109 | char *(*pfn) = (char *(*)) malloc | |
4110 | ; return 0; } | |
4111 | EOF | |
3b851bce | 4112 | if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4113 | rm -rf conftest* |
4114 | bfd_cv_decl_needed_malloc=no | |
4115 | else | |
4116 | echo "configure: failed program was:" >&5 | |
4117 | cat conftest.$ac_ext >&5 | |
4118 | rm -rf conftest* | |
4119 | bfd_cv_decl_needed_malloc=yes | |
4120 | fi | |
4121 | rm -f conftest* | |
4122 | fi | |
4123 | ||
4124 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4125 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4126 | cat >> confdefs.h <<\EOF | |
4127 | #define NEED_DECLARATION_MALLOC 1 | |
4128 | EOF | |
4129 | ||
4130 | fi | |
4131 | ||
4132 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
3b851bce | 4133 | echo "configure:4134: checking whether realloc must be declared" >&5 |
c906108c SS |
4134 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4135 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4136 | else | |
4137 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4138 | #line 4139 "configure" |
c906108c SS |
4139 | #include "confdefs.h" |
4140 | ||
4141 | #include <stdio.h> | |
4142 | #ifdef HAVE_STRING_H | |
4143 | #include <string.h> | |
4144 | #else | |
4145 | #ifdef HAVE_STRINGS_H | |
4146 | #include <strings.h> | |
4147 | #endif | |
4148 | #endif | |
4149 | #ifdef HAVE_STDLIB_H | |
4150 | #include <stdlib.h> | |
4151 | #endif | |
4152 | #ifdef HAVE_UNISTD_H | |
4153 | #include <unistd.h> | |
4154 | #endif | |
4155 | int main() { | |
4156 | char *(*pfn) = (char *(*)) realloc | |
4157 | ; return 0; } | |
4158 | EOF | |
3b851bce | 4159 | if { (eval echo configure:4160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4160 | rm -rf conftest* |
4161 | bfd_cv_decl_needed_realloc=no | |
4162 | else | |
4163 | echo "configure: failed program was:" >&5 | |
4164 | cat conftest.$ac_ext >&5 | |
4165 | rm -rf conftest* | |
4166 | bfd_cv_decl_needed_realloc=yes | |
4167 | fi | |
4168 | rm -f conftest* | |
4169 | fi | |
4170 | ||
4171 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4172 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4173 | cat >> confdefs.h <<\EOF | |
4174 | #define NEED_DECLARATION_REALLOC 1 | |
4175 | EOF | |
4176 | ||
4177 | fi | |
4178 | ||
4179 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
3b851bce | 4180 | echo "configure:4181: checking whether free must be declared" >&5 |
c906108c SS |
4181 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4182 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4183 | else | |
4184 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4185 | #line 4186 "configure" |
c906108c SS |
4186 | #include "confdefs.h" |
4187 | ||
4188 | #include <stdio.h> | |
4189 | #ifdef HAVE_STRING_H | |
4190 | #include <string.h> | |
4191 | #else | |
4192 | #ifdef HAVE_STRINGS_H | |
4193 | #include <strings.h> | |
4194 | #endif | |
4195 | #endif | |
4196 | #ifdef HAVE_STDLIB_H | |
4197 | #include <stdlib.h> | |
4198 | #endif | |
4199 | #ifdef HAVE_UNISTD_H | |
4200 | #include <unistd.h> | |
4201 | #endif | |
4202 | int main() { | |
4203 | char *(*pfn) = (char *(*)) free | |
4204 | ; return 0; } | |
4205 | EOF | |
3b851bce | 4206 | if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4207 | rm -rf conftest* |
4208 | bfd_cv_decl_needed_free=no | |
4209 | else | |
4210 | echo "configure: failed program was:" >&5 | |
4211 | cat conftest.$ac_ext >&5 | |
4212 | rm -rf conftest* | |
4213 | bfd_cv_decl_needed_free=yes | |
4214 | fi | |
4215 | rm -f conftest* | |
4216 | fi | |
4217 | ||
4218 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4219 | if test $bfd_cv_decl_needed_free = yes; then | |
4220 | cat >> confdefs.h <<\EOF | |
4221 | #define NEED_DECLARATION_FREE 1 | |
4222 | EOF | |
4223 | ||
4224 | fi | |
4225 | ||
4226 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
3b851bce | 4227 | echo "configure:4228: checking whether strerror must be declared" >&5 |
c906108c SS |
4228 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4229 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4230 | else | |
4231 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4232 | #line 4233 "configure" |
c906108c SS |
4233 | #include "confdefs.h" |
4234 | ||
4235 | #include <stdio.h> | |
4236 | #ifdef HAVE_STRING_H | |
4237 | #include <string.h> | |
4238 | #else | |
4239 | #ifdef HAVE_STRINGS_H | |
4240 | #include <strings.h> | |
4241 | #endif | |
4242 | #endif | |
4243 | #ifdef HAVE_STDLIB_H | |
4244 | #include <stdlib.h> | |
4245 | #endif | |
4246 | #ifdef HAVE_UNISTD_H | |
4247 | #include <unistd.h> | |
4248 | #endif | |
4249 | int main() { | |
4250 | char *(*pfn) = (char *(*)) strerror | |
4251 | ; return 0; } | |
4252 | EOF | |
3b851bce | 4253 | if { (eval echo configure:4254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4254 | rm -rf conftest* |
4255 | bfd_cv_decl_needed_strerror=no | |
4256 | else | |
4257 | echo "configure: failed program was:" >&5 | |
4258 | cat conftest.$ac_ext >&5 | |
4259 | rm -rf conftest* | |
4260 | bfd_cv_decl_needed_strerror=yes | |
4261 | fi | |
4262 | rm -f conftest* | |
4263 | fi | |
4264 | ||
4265 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4266 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4267 | cat >> confdefs.h <<\EOF | |
4268 | #define NEED_DECLARATION_STRERROR 1 | |
4269 | EOF | |
4270 | ||
4271 | fi | |
4272 | ||
4273 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
3b851bce | 4274 | echo "configure:4275: checking whether strdup must be declared" >&5 |
c906108c SS |
4275 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4276 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4277 | else | |
4278 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4279 | #line 4280 "configure" |
c906108c SS |
4280 | #include "confdefs.h" |
4281 | ||
4282 | #include <stdio.h> | |
4283 | #ifdef HAVE_STRING_H | |
4284 | #include <string.h> | |
4285 | #else | |
4286 | #ifdef HAVE_STRINGS_H | |
4287 | #include <strings.h> | |
4288 | #endif | |
4289 | #endif | |
4290 | #ifdef HAVE_STDLIB_H | |
4291 | #include <stdlib.h> | |
4292 | #endif | |
4293 | #ifdef HAVE_UNISTD_H | |
4294 | #include <unistd.h> | |
4295 | #endif | |
4296 | int main() { | |
4297 | char *(*pfn) = (char *(*)) strdup | |
4298 | ; return 0; } | |
4299 | EOF | |
3b851bce | 4300 | if { (eval echo configure:4301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4301 | rm -rf conftest* |
4302 | bfd_cv_decl_needed_strdup=no | |
4303 | else | |
4304 | echo "configure: failed program was:" >&5 | |
4305 | cat conftest.$ac_ext >&5 | |
4306 | rm -rf conftest* | |
4307 | bfd_cv_decl_needed_strdup=yes | |
4308 | fi | |
4309 | rm -f conftest* | |
4310 | fi | |
4311 | ||
4312 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4313 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4314 | cat >> confdefs.h <<\EOF | |
4315 | #define NEED_DECLARATION_STRDUP 1 | |
4316 | EOF | |
4317 | ||
4318 | fi | |
4319 | ||
b83266a0 | 4320 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
3b851bce | 4321 | echo "configure:4322: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4322 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4323 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4324 | else | |
4325 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4326 | #line 4327 "configure" |
b83266a0 SS |
4327 | #include "confdefs.h" |
4328 | ||
4329 | #include <stdio.h> | |
4330 | #ifdef HAVE_STRING_H | |
4331 | #include <string.h> | |
4332 | #else | |
4333 | #ifdef HAVE_STRINGS_H | |
4334 | #include <strings.h> | |
4335 | #endif | |
4336 | #endif | |
4337 | #ifdef HAVE_STDLIB_H | |
4338 | #include <stdlib.h> | |
4339 | #endif | |
4340 | #ifdef HAVE_UNISTD_H | |
4341 | #include <unistd.h> | |
4342 | #endif | |
4343 | int main() { | |
4344 | char *(*pfn) = (char *(*)) strstr | |
4345 | ; return 0; } | |
4346 | EOF | |
3b851bce | 4347 | if { (eval echo configure:4348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4348 | rm -rf conftest* |
4349 | bfd_cv_decl_needed_strstr=no | |
4350 | else | |
4351 | echo "configure: failed program was:" >&5 | |
4352 | cat conftest.$ac_ext >&5 | |
4353 | rm -rf conftest* | |
4354 | bfd_cv_decl_needed_strstr=yes | |
4355 | fi | |
4356 | rm -f conftest* | |
4357 | fi | |
4358 | ||
4359 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4360 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4361 | cat >> confdefs.h <<\EOF | |
4362 | #define NEED_DECLARATION_STRSTR 1 | |
4363 | EOF | |
4364 | ||
4365 | fi | |
4366 | ||
c906108c SS |
4367 | |
4368 | ||
4369 | # The following save_state_t checkery is only necessary for HPUX | |
4370 | # versions earlier than 10.20. When those fade from memory, this | |
4371 | # could be expunged. --jsm 1999-03-22 | |
4372 | ||
4373 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
3b851bce | 4374 | echo "configure:4375: checking for HPUX save_state structure" >&5 |
c906108c | 4375 | cat > conftest.$ac_ext <<EOF |
3b851bce | 4376 | #line 4377 "configure" |
c906108c SS |
4377 | #include "confdefs.h" |
4378 | #include <machine/save_state.h> | |
4379 | EOF | |
4380 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4381 | egrep "save_state_t" >/dev/null 2>&1; then | |
4382 | rm -rf conftest* | |
4383 | gdb_cv_hpux_savestate=yes | |
4384 | else | |
4385 | rm -rf conftest* | |
4386 | gdb_cv_hpux_savestate=no | |
4387 | fi | |
4388 | rm -f conftest* | |
4389 | ||
4390 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4391 | #line 4392 "configure" |
c906108c SS |
4392 | #include "confdefs.h" |
4393 | #include <machine/save_state.h> | |
4394 | EOF | |
4395 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4396 | egrep "ss_wide" >/dev/null 2>&1; then | |
4397 | rm -rf conftest* | |
4398 | gdb_cv_hpux_sswide=yes | |
4399 | else | |
4400 | rm -rf conftest* | |
4401 | gdb_cv_hpux_sswide=no | |
4402 | fi | |
4403 | rm -f conftest* | |
4404 | ||
4405 | if test $gdb_cv_hpux_savestate = yes | |
4406 | then | |
4407 | cat >> confdefs.h <<\EOF | |
4408 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4409 | EOF | |
4410 | ||
4411 | fi | |
4412 | if test $gdb_cv_hpux_sswide = yes | |
4413 | then | |
4414 | cat >> confdefs.h <<\EOF | |
4415 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4416 | EOF | |
4417 | ||
4418 | fi | |
4419 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4420 | ||
4421 | ||
4422 | # If we are configured native on GNU/Linux, work around problems with | |
4423 | # sys/procfs.h | |
c3f6f71d | 4424 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4425 | |
4426 | if test "${target}" = "${host}"; then | |
4427 | case "${host}" in | |
4428 | i[3456]86-*-linux*) | |
4429 | cat >> confdefs.h <<\EOF | |
4430 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4431 | EOF | |
4432 | ||
4433 | cat >> confdefs.h <<\EOF | |
4434 | #define sys_quotactl 1 | |
4435 | EOF | |
4436 | ||
4437 | ;; | |
c5394b80 | 4438 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4439 | cat >> confdefs.h <<\EOF |
4440 | #define NEW_PROC_API 1 | |
c906108c SS |
4441 | EOF |
4442 | ||
c3f6f71d | 4443 | ;; |
3423db82 | 4444 | *-*-solaris2.[678]) |
c3f6f71d JM |
4445 | cat >> confdefs.h <<\EOF |
4446 | #define NEW_PROC_API 1 | |
4447 | EOF | |
4448 | ||
4449 | ;; | |
4450 | esac | |
c906108c SS |
4451 | fi |
4452 | ||
4453 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4454 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
3b851bce | 4455 | echo "configure:4456: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4456 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4457 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4458 | else | |
4459 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4460 | #line 4461 "configure" |
c906108c | 4461 | #include "confdefs.h" |
e17bf198 AO |
4462 | |
4463 | #define _SYSCALL32 | |
c906108c SS |
4464 | #include <sys/procfs.h> |
4465 | int main() { | |
4466 | pstatus_t avar | |
4467 | ; return 0; } | |
4468 | EOF | |
3b851bce | 4469 | if { (eval echo configure:4470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4470 | rm -rf conftest* |
4471 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
4472 | else | |
4473 | echo "configure: failed program was:" >&5 | |
4474 | cat conftest.$ac_ext >&5 | |
4475 | rm -rf conftest* | |
4476 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
4477 | ||
4478 | fi | |
4479 | rm -f conftest* | |
4480 | fi | |
4481 | ||
4482 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
4483 | cat >> confdefs.h <<\EOF | |
4484 | #define HAVE_PSTATUS_T 1 | |
4485 | EOF | |
4486 | ||
4487 | fi | |
4488 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
4489 | ||
4490 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
3b851bce | 4491 | echo "configure:4492: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
4492 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
4493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4494 | else | |
4495 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4496 | #line 4497 "configure" |
c906108c | 4497 | #include "confdefs.h" |
e17bf198 AO |
4498 | |
4499 | #define _SYSCALL32 | |
c906108c SS |
4500 | #include <sys/procfs.h> |
4501 | int main() { | |
4502 | prrun_t avar | |
4503 | ; return 0; } | |
4504 | EOF | |
3b851bce | 4505 | if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4506 | rm -rf conftest* |
4507 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
4508 | else | |
4509 | echo "configure: failed program was:" >&5 | |
4510 | cat conftest.$ac_ext >&5 | |
4511 | rm -rf conftest* | |
4512 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
4513 | ||
4514 | fi | |
4515 | rm -f conftest* | |
4516 | fi | |
4517 | ||
4518 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
4519 | cat >> confdefs.h <<\EOF | |
4520 | #define HAVE_PRRUN_T 1 | |
4521 | EOF | |
4522 | ||
4523 | fi | |
4524 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
4525 | ||
4526 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
3b851bce | 4527 | echo "configure:4528: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
4528 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
4529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4530 | else | |
4531 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4532 | #line 4533 "configure" |
c906108c | 4533 | #include "confdefs.h" |
e17bf198 AO |
4534 | |
4535 | #define _SYSCALL32 | |
c906108c SS |
4536 | #include <sys/procfs.h> |
4537 | int main() { | |
4538 | gregset_t avar | |
4539 | ; return 0; } | |
4540 | EOF | |
3b851bce | 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_have_sys_procfs_type_gregset_t=yes | |
4544 | else | |
4545 | echo "configure: failed program was:" >&5 | |
4546 | cat conftest.$ac_ext >&5 | |
4547 | rm -rf conftest* | |
4548 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
4549 | ||
4550 | fi | |
4551 | rm -f conftest* | |
4552 | fi | |
4553 | ||
4554 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
4555 | cat >> confdefs.h <<\EOF | |
4556 | #define HAVE_GREGSET_T 1 | |
4557 | EOF | |
4558 | ||
4559 | fi | |
4560 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
4561 | ||
4562 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
3b851bce | 4563 | echo "configure:4564: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
4564 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
4565 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4566 | else | |
4567 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4568 | #line 4569 "configure" |
c906108c | 4569 | #include "confdefs.h" |
e17bf198 AO |
4570 | |
4571 | #define _SYSCALL32 | |
c906108c SS |
4572 | #include <sys/procfs.h> |
4573 | int main() { | |
4574 | fpregset_t avar | |
4575 | ; return 0; } | |
4576 | EOF | |
3b851bce | 4577 | if { (eval echo configure:4578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4578 | rm -rf conftest* |
4579 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
4580 | else | |
4581 | echo "configure: failed program was:" >&5 | |
4582 | cat conftest.$ac_ext >&5 | |
4583 | rm -rf conftest* | |
4584 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
4585 | ||
4586 | fi | |
4587 | rm -f conftest* | |
4588 | fi | |
4589 | ||
4590 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
4591 | cat >> confdefs.h <<\EOF | |
4592 | #define HAVE_FPREGSET_T 1 | |
4593 | EOF | |
4594 | ||
4595 | fi | |
4596 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
4597 | ||
3862412b | 4598 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
3b851bce | 4599 | echo "configure:4600: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
4600 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
4601 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4602 | else | |
4603 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4604 | #line 4605 "configure" |
3862412b | 4605 | #include "confdefs.h" |
e17bf198 AO |
4606 | |
4607 | #define _SYSCALL32 | |
3862412b MK |
4608 | #include <sys/procfs.h> |
4609 | int main() { | |
4610 | prgregset_t avar | |
4611 | ; return 0; } | |
4612 | EOF | |
3b851bce | 4613 | if { (eval echo configure:4614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4614 | rm -rf conftest* |
4615 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
4616 | else | |
4617 | echo "configure: failed program was:" >&5 | |
4618 | cat conftest.$ac_ext >&5 | |
4619 | rm -rf conftest* | |
4620 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
4621 | ||
4622 | fi | |
4623 | rm -f conftest* | |
4624 | fi | |
4625 | ||
4626 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
4627 | cat >> confdefs.h <<\EOF | |
4628 | #define HAVE_PRGREGSET_T 1 | |
4629 | EOF | |
4630 | ||
4631 | fi | |
4632 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
4633 | ||
4634 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
3b851bce | 4635 | echo "configure:4636: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
4636 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
4637 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4638 | else | |
4639 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4640 | #line 4641 "configure" |
3862412b | 4641 | #include "confdefs.h" |
e17bf198 AO |
4642 | |
4643 | #define _SYSCALL32 | |
3862412b MK |
4644 | #include <sys/procfs.h> |
4645 | int main() { | |
4646 | prfpregset_t avar | |
4647 | ; return 0; } | |
4648 | EOF | |
3b851bce | 4649 | if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4650 | rm -rf conftest* |
4651 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
4652 | else | |
4653 | echo "configure: failed program was:" >&5 | |
4654 | cat conftest.$ac_ext >&5 | |
4655 | rm -rf conftest* | |
4656 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
4657 | ||
4658 | fi | |
4659 | rm -f conftest* | |
4660 | fi | |
4661 | ||
4662 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
4663 | cat >> confdefs.h <<\EOF | |
4664 | #define HAVE_PRFPREGSET_T 1 | |
4665 | EOF | |
4666 | ||
4667 | fi | |
4668 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
4669 | ||
451928c5 | 4670 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
3b851bce | 4671 | echo "configure:4672: checking for prgregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
4672 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
4673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4674 | else | |
4675 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4676 | #line 4677 "configure" |
451928c5 | 4677 | #include "confdefs.h" |
e17bf198 AO |
4678 | |
4679 | #define _SYSCALL32 | |
451928c5 AC |
4680 | #include <sys/procfs.h> |
4681 | int main() { | |
4682 | prgregset32_t avar | |
4683 | ; return 0; } | |
4684 | EOF | |
3b851bce | 4685 | if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
4686 | rm -rf conftest* |
4687 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
4688 | else | |
4689 | echo "configure: failed program was:" >&5 | |
4690 | cat conftest.$ac_ext >&5 | |
4691 | rm -rf conftest* | |
4692 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
4693 | ||
4694 | fi | |
4695 | rm -f conftest* | |
4696 | fi | |
4697 | ||
4698 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then | |
4699 | cat >> confdefs.h <<\EOF | |
4700 | #define HAVE_PRGREGSET32_T 1 | |
4701 | EOF | |
4702 | ||
4703 | fi | |
4704 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
4705 | ||
4706 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 | |
3b851bce | 4707 | echo "configure:4708: checking for prfpregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
4708 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
4709 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4710 | else | |
4711 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4712 | #line 4713 "configure" |
451928c5 | 4713 | #include "confdefs.h" |
e17bf198 AO |
4714 | |
4715 | #define _SYSCALL32 | |
451928c5 AC |
4716 | #include <sys/procfs.h> |
4717 | int main() { | |
4718 | prfpregset32_t avar | |
4719 | ; return 0; } | |
4720 | EOF | |
3b851bce | 4721 | if { (eval echo configure:4722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
4722 | rm -rf conftest* |
4723 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes | |
4724 | else | |
4725 | echo "configure: failed program was:" >&5 | |
4726 | cat conftest.$ac_ext >&5 | |
4727 | rm -rf conftest* | |
4728 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no | |
4729 | ||
4730 | fi | |
4731 | rm -f conftest* | |
4732 | fi | |
4733 | ||
4734 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then | |
4735 | cat >> confdefs.h <<\EOF | |
4736 | #define HAVE_PRFPREGSET32_T 1 | |
4737 | EOF | |
4738 | ||
4739 | fi | |
4740 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
4741 | ||
3862412b | 4742 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
3b851bce | 4743 | echo "configure:4744: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
4744 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
4745 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4746 | else | |
4747 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4748 | #line 4749 "configure" |
3862412b | 4749 | #include "confdefs.h" |
e17bf198 AO |
4750 | |
4751 | #define _SYSCALL32 | |
3862412b MK |
4752 | #include <sys/procfs.h> |
4753 | int main() { | |
4754 | lwpid_t avar | |
4755 | ; return 0; } | |
4756 | EOF | |
3b851bce | 4757 | if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4758 | rm -rf conftest* |
4759 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
4760 | else | |
4761 | echo "configure: failed program was:" >&5 | |
4762 | cat conftest.$ac_ext >&5 | |
4763 | rm -rf conftest* | |
4764 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
4765 | ||
4766 | fi | |
4767 | rm -f conftest* | |
4768 | fi | |
4769 | ||
4770 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
4771 | cat >> confdefs.h <<\EOF | |
4772 | #define HAVE_LWPID_T 1 | |
4773 | EOF | |
4774 | ||
4775 | fi | |
4776 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
4777 | ||
4778 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
3b851bce | 4779 | echo "configure:4780: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
4780 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
4781 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4782 | else | |
4783 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4784 | #line 4785 "configure" |
3862412b | 4785 | #include "confdefs.h" |
e17bf198 AO |
4786 | |
4787 | #define _SYSCALL32 | |
3862412b MK |
4788 | #include <sys/procfs.h> |
4789 | int main() { | |
4790 | psaddr_t avar | |
4791 | ; return 0; } | |
4792 | EOF | |
3b851bce | 4793 | if { (eval echo configure:4794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4794 | rm -rf conftest* |
4795 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
4796 | else | |
4797 | echo "configure: failed program was:" >&5 | |
4798 | cat conftest.$ac_ext >&5 | |
4799 | rm -rf conftest* | |
4800 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
4801 | ||
4802 | fi | |
4803 | rm -f conftest* | |
4804 | fi | |
4805 | ||
4806 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
4807 | cat >> confdefs.h <<\EOF | |
4808 | #define HAVE_PSADDR_T 1 | |
4809 | EOF | |
4810 | ||
4811 | fi | |
4812 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
4813 | ||
c906108c | 4814 | |
451928c5 AC |
4815 | |
4816 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
3b851bce | 4817 | echo "configure:4818: checking for struct link_map32 in sys/link.h" >&5 |
451928c5 AC |
4818 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
4819 | echo $ac_n "(cached) $ac_c" 1>&6 | |
451928c5 AC |
4820 | else |
4821 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4822 | #line 4823 "configure" |
451928c5 AC |
4823 | #include "confdefs.h" |
4824 | #define _SYSCALL32 | |
2bba1017 KB |
4825 | #include <sys/link.h> |
4826 | int main() { | |
4827 | struct link_map32 l; | |
4828 | ; return 0; } | |
4829 | EOF | |
3b851bce | 4830 | if { (eval echo configure:4831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2bba1017 KB |
4831 | rm -rf conftest* |
4832 | gdb_cv_have_struct_link_map32=yes | |
451928c5 AC |
4833 | else |
4834 | echo "configure: failed program was:" >&5 | |
4835 | cat conftest.$ac_ext >&5 | |
2bba1017 KB |
4836 | rm -rf conftest* |
4837 | gdb_cv_have_struct_link_map32=no | |
451928c5 | 4838 | fi |
2bba1017 | 4839 | rm -f conftest* |
451928c5 AC |
4840 | fi |
4841 | ||
4842 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 | |
4843 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
4844 | cat >> confdefs.h <<\EOF | |
4845 | #define HAVE_STRUCT_LINK_MAP32 1 | |
4846 | EOF | |
4847 | ||
4848 | fi | |
4849 | ||
c906108c | 4850 | |
746a987d | 4851 | |
d84dd0c5 MK |
4852 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
4853 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
3b851bce | 4854 | echo "configure:4855: checking whether prfpregset_t type is broken" >&5 |
d84dd0c5 MK |
4855 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
4856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4857 | else | |
4858 | if test "$cross_compiling" = yes; then | |
4859 | gdb_cv_prfpregset_t_broken=yes | |
4860 | else | |
4861 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4862 | #line 4863 "configure" |
d84dd0c5 MK |
4863 | #include "confdefs.h" |
4864 | #include <sys/procfs.h> | |
4865 | int main () | |
4866 | { | |
4867 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
4868 | return 1; | |
4869 | return 0; | |
4870 | } | |
4871 | EOF | |
3b851bce | 4872 | if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
d84dd0c5 MK |
4873 | then |
4874 | gdb_cv_prfpregset_t_broken=no | |
4875 | else | |
4876 | echo "configure: failed program was:" >&5 | |
4877 | cat conftest.$ac_ext >&5 | |
4878 | rm -fr conftest* | |
4879 | gdb_cv_prfpregset_t_broken=yes | |
4880 | fi | |
4881 | rm -fr conftest* | |
4882 | fi | |
4883 | ||
4884 | fi | |
4885 | ||
4886 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 | |
4887 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
4888 | cat >> confdefs.h <<\EOF | |
4889 | #define PRFPREGSET_T_BROKEN 1 | |
4890 | EOF | |
4891 | ||
4892 | fi | |
4893 | fi | |
4894 | ||
4895 | ||
c906108c | 4896 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 |
3b851bce | 4897 | echo "configure:4898: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
4898 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
4899 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4900 | else | |
4901 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4902 | #line 4903 "configure" |
c906108c SS |
4903 | #include "confdefs.h" |
4904 | #include <unistd.h> | |
4905 | #include <sys/types.h> | |
4906 | #include <sys/procfs.h> | |
4907 | ||
4908 | int main() { | |
4909 | ||
4910 | int dummy;; | |
4911 | dummy = ioctl(0, PIOCSET, &dummy); | |
4912 | ||
4913 | ; return 0; } | |
4914 | EOF | |
3b851bce | 4915 | if { (eval echo configure:4916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4916 | rm -rf conftest* |
4917 | gdb_cv_have_procfs_piocset=yes | |
4918 | else | |
4919 | echo "configure: failed program was:" >&5 | |
4920 | cat conftest.$ac_ext >&5 | |
4921 | rm -rf conftest* | |
4922 | gdb_cv_have_procfs_piocset=no | |
4923 | fi | |
4924 | rm -f conftest* | |
4925 | fi | |
4926 | ||
4927 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
4928 | if test $gdb_cv_have_procfs_piocset = yes; then | |
4929 | cat >> confdefs.h <<\EOF | |
4930 | #define HAVE_PROCFS_PIOCSET 1 | |
4931 | EOF | |
4932 | ||
4933 | fi | |
4934 | fi | |
4935 | ||
4936 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
3b851bce | 4937 | echo "configure:4938: checking for main in -lm" >&5 |
c906108c SS |
4938 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
4939 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4940 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4941 | else | |
4942 | ac_save_LIBS="$LIBS" | |
4943 | LIBS="-lm $LIBS" | |
4944 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4945 | #line 4946 "configure" |
c906108c SS |
4946 | #include "confdefs.h" |
4947 | ||
4948 | int main() { | |
4949 | main() | |
4950 | ; return 0; } | |
4951 | EOF | |
3b851bce | 4952 | if { (eval echo configure:4953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4953 | rm -rf conftest* |
4954 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4955 | else | |
4956 | echo "configure: failed program was:" >&5 | |
4957 | cat conftest.$ac_ext >&5 | |
4958 | rm -rf conftest* | |
4959 | eval "ac_cv_lib_$ac_lib_var=no" | |
4960 | fi | |
4961 | rm -f conftest* | |
4962 | LIBS="$ac_save_LIBS" | |
4963 | ||
4964 | fi | |
4965 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4966 | echo "$ac_t""yes" 1>&6 | |
4967 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4968 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4969 | cat >> confdefs.h <<EOF | |
4970 | #define $ac_tr_lib 1 | |
4971 | EOF | |
4972 | ||
4973 | LIBS="-lm $LIBS" | |
4974 | ||
4975 | else | |
4976 | echo "$ac_t""no" 1>&6 | |
4977 | fi | |
4978 | ||
4979 | ||
4980 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
3b851bce | 4981 | echo "configure:4982: checking for wctype in -lc" >&5 |
c906108c SS |
4982 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
4983 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4984 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4985 | else | |
4986 | ac_save_LIBS="$LIBS" | |
4987 | LIBS="-lc $LIBS" | |
4988 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 4989 | #line 4990 "configure" |
c906108c SS |
4990 | #include "confdefs.h" |
4991 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4992 | /* We use char because int might match the return type of a gcc2 | |
4993 | builtin and then its argument prototype would still apply. */ | |
4994 | char wctype(); | |
4995 | ||
4996 | int main() { | |
4997 | wctype() | |
4998 | ; return 0; } | |
4999 | EOF | |
3b851bce | 5000 | if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5001 | rm -rf conftest* |
5002 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5003 | else | |
5004 | echo "configure: failed program was:" >&5 | |
5005 | cat conftest.$ac_ext >&5 | |
5006 | rm -rf conftest* | |
5007 | eval "ac_cv_lib_$ac_lib_var=no" | |
5008 | fi | |
5009 | rm -f conftest* | |
5010 | LIBS="$ac_save_LIBS" | |
5011 | ||
5012 | fi | |
5013 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5014 | echo "$ac_t""yes" 1>&6 | |
5015 | : | |
5016 | else | |
5017 | echo "$ac_t""no" 1>&6 | |
5018 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
3b851bce | 5019 | echo "configure:5020: checking for wctype in -lw" >&5 |
c906108c SS |
5020 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
5021 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5022 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5023 | else | |
5024 | ac_save_LIBS="$LIBS" | |
5025 | LIBS="-lw $LIBS" | |
5026 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5027 | #line 5028 "configure" |
c906108c SS |
5028 | #include "confdefs.h" |
5029 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5030 | /* We use char because int might match the return type of a gcc2 | |
5031 | builtin and then its argument prototype would still apply. */ | |
5032 | char wctype(); | |
5033 | ||
5034 | int main() { | |
5035 | wctype() | |
5036 | ; return 0; } | |
5037 | EOF | |
3b851bce | 5038 | if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5039 | rm -rf conftest* |
5040 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5041 | else | |
5042 | echo "configure: failed program was:" >&5 | |
5043 | cat conftest.$ac_ext >&5 | |
5044 | rm -rf conftest* | |
5045 | eval "ac_cv_lib_$ac_lib_var=no" | |
5046 | fi | |
5047 | rm -f conftest* | |
5048 | LIBS="$ac_save_LIBS" | |
5049 | ||
5050 | fi | |
5051 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5052 | echo "$ac_t""yes" 1>&6 | |
5053 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
5054 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5055 | cat >> confdefs.h <<EOF | |
5056 | #define $ac_tr_lib 1 | |
5057 | EOF | |
5058 | ||
5059 | LIBS="-lw $LIBS" | |
5060 | ||
5061 | else | |
5062 | echo "$ac_t""no" 1>&6 | |
5063 | fi | |
5064 | ||
5065 | fi | |
5066 | ||
5067 | ||
5068 | ||
5069 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
3b851bce | 5070 | echo "configure:5071: checking for long long support in compiler" >&5 |
c906108c SS |
5071 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
5072 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5073 | else | |
5074 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5075 | #line 5076 "configure" |
c906108c SS |
5076 | #include "confdefs.h" |
5077 | ||
5078 | int main() { | |
5079 | ||
5080 | extern long long foo; | |
5081 | switch (foo & 2) { case 0: return 1; } | |
5082 | ||
5083 | ; return 0; } | |
5084 | EOF | |
3b851bce | 5085 | if { (eval echo configure:5086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5086 | rm -rf conftest* |
5087 | gdb_cv_c_long_long=yes | |
5088 | else | |
5089 | echo "configure: failed program was:" >&5 | |
5090 | cat conftest.$ac_ext >&5 | |
5091 | rm -rf conftest* | |
5092 | gdb_cv_c_long_long=no | |
5093 | fi | |
5094 | rm -f conftest* | |
5095 | fi | |
5096 | ||
5097 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
5098 | if test $gdb_cv_c_long_long = yes; then | |
5099 | cat >> confdefs.h <<\EOF | |
5100 | #define CC_HAS_LONG_LONG 1 | |
5101 | EOF | |
5102 | ||
5103 | fi | |
5104 | ||
5105 | ||
5106 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
3b851bce | 5107 | echo "configure:5108: checking for long long support in printf" >&5 |
c906108c SS |
5108 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
5109 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5110 | else | |
5111 | if test "$cross_compiling" = yes; then | |
5112 | gdb_cv_printf_has_long_long=no | |
5113 | else | |
5114 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5115 | #line 5116 "configure" |
c906108c SS |
5116 | #include "confdefs.h" |
5117 | ||
5118 | int main () { | |
5119 | char buf[32]; | |
5120 | long long l = 0; | |
5121 | l = (l << 16) + 0x0123; | |
5122 | l = (l << 16) + 0x4567; | |
5123 | l = (l << 16) + 0x89ab; | |
5124 | l = (l << 16) + 0xcdef; | |
5125 | sprintf (buf, "0x%016llx", l); | |
5126 | return (strcmp ("0x0123456789abcdef", buf)); | |
5127 | } | |
5128 | EOF | |
3b851bce | 5129 | if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5130 | then |
5131 | gdb_cv_printf_has_long_long=yes | |
5132 | else | |
5133 | echo "configure: failed program was:" >&5 | |
5134 | cat conftest.$ac_ext >&5 | |
5135 | rm -fr conftest* | |
5136 | gdb_cv_printf_has_long_long=no | |
5137 | fi | |
5138 | rm -fr conftest* | |
5139 | fi | |
5140 | ||
5141 | fi | |
5142 | ||
5143 | if test $gdb_cv_printf_has_long_long = yes; then | |
5144 | cat >> confdefs.h <<\EOF | |
5145 | #define PRINTF_HAS_LONG_LONG 1 | |
5146 | EOF | |
5147 | ||
5148 | fi | |
5149 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
5150 | ||
5151 | ||
5152 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
3b851bce | 5153 | echo "configure:5154: checking for long double support in compiler" >&5 |
c906108c SS |
5154 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
5155 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5156 | else | |
5157 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5158 | #line 5159 "configure" |
c906108c SS |
5159 | #include "confdefs.h" |
5160 | ||
5161 | int main() { | |
5162 | long double foo; | |
5163 | ; return 0; } | |
5164 | EOF | |
3b851bce | 5165 | if { (eval echo configure:5166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5166 | rm -rf conftest* |
5167 | ac_cv_c_long_double=yes | |
5168 | else | |
5169 | echo "configure: failed program was:" >&5 | |
5170 | cat conftest.$ac_ext >&5 | |
5171 | rm -rf conftest* | |
5172 | ac_cv_c_long_double=no | |
5173 | fi | |
5174 | rm -f conftest* | |
5175 | fi | |
5176 | ||
5177 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
5178 | if test $ac_cv_c_long_double = yes; then | |
5179 | cat >> confdefs.h <<\EOF | |
5180 | #define HAVE_LONG_DOUBLE 1 | |
5181 | EOF | |
5182 | ||
5183 | fi | |
5184 | ||
5185 | ||
5186 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
3b851bce | 5187 | echo "configure:5188: checking for long double support in printf" >&5 |
c906108c SS |
5188 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
5189 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5190 | else | |
5191 | if test "$cross_compiling" = yes; then | |
5192 | gdb_cv_printf_has_long_double=no | |
5193 | else | |
5194 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5195 | #line 5196 "configure" |
c906108c SS |
5196 | #include "confdefs.h" |
5197 | ||
5198 | int main () { | |
5199 | char buf[16]; | |
5200 | long double f = 3.141592653; | |
5201 | sprintf (buf, "%Lg", f); | |
5202 | return (strncmp ("3.14159", buf, 7)); | |
5203 | } | |
5204 | EOF | |
3b851bce | 5205 | if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5206 | then |
5207 | gdb_cv_printf_has_long_double=yes | |
5208 | else | |
5209 | echo "configure: failed program was:" >&5 | |
5210 | cat conftest.$ac_ext >&5 | |
5211 | rm -fr conftest* | |
5212 | gdb_cv_printf_has_long_double=no | |
5213 | fi | |
5214 | rm -fr conftest* | |
5215 | fi | |
5216 | ||
5217 | fi | |
5218 | ||
5219 | if test $gdb_cv_printf_has_long_double = yes; then | |
5220 | cat >> confdefs.h <<\EOF | |
5221 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
5222 | EOF | |
5223 | ||
5224 | fi | |
5225 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
5226 | ||
5227 | ||
5228 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
3b851bce | 5229 | echo "configure:5230: checking for long double support in scanf" >&5 |
c906108c SS |
5230 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
5231 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5232 | else | |
5233 | if test "$cross_compiling" = yes; then | |
5234 | gdb_cv_scanf_has_long_double=no | |
5235 | else | |
5236 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5237 | #line 5238 "configure" |
c906108c SS |
5238 | #include "confdefs.h" |
5239 | ||
5240 | int main () { | |
5241 | char *buf = "3.141592653"; | |
5242 | long double f = 0; | |
5243 | sscanf (buf, "%Lg", &f); | |
5244 | return !(f > 3.14159 && f < 3.14160); | |
5245 | } | |
5246 | EOF | |
3b851bce | 5247 | if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5248 | then |
5249 | gdb_cv_scanf_has_long_double=yes | |
5250 | else | |
5251 | echo "configure: failed program was:" >&5 | |
5252 | cat conftest.$ac_ext >&5 | |
5253 | rm -fr conftest* | |
5254 | gdb_cv_scanf_has_long_double=no | |
5255 | fi | |
5256 | rm -fr conftest* | |
5257 | fi | |
5258 | ||
5259 | fi | |
5260 | ||
5261 | if test $gdb_cv_scanf_has_long_double = yes; then | |
5262 | cat >> confdefs.h <<\EOF | |
5263 | #define SCANF_HAS_LONG_DOUBLE 1 | |
5264 | EOF | |
5265 | ||
5266 | fi | |
5267 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
5268 | ||
5269 | for ac_hdr in unistd.h | |
5270 | do | |
5271 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5272 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3b851bce | 5273 | echo "configure:5274: checking for $ac_hdr" >&5 |
c906108c SS |
5274 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5275 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5276 | else | |
5277 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5278 | #line 5279 "configure" |
c906108c SS |
5279 | #include "confdefs.h" |
5280 | #include <$ac_hdr> | |
5281 | EOF | |
5282 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 5283 | { (eval echo configure:5284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5284 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5285 | if test -z "$ac_err"; then | |
5286 | rm -rf conftest* | |
5287 | eval "ac_cv_header_$ac_safe=yes" | |
5288 | else | |
5289 | echo "$ac_err" >&5 | |
5290 | echo "configure: failed program was:" >&5 | |
5291 | cat conftest.$ac_ext >&5 | |
5292 | rm -rf conftest* | |
5293 | eval "ac_cv_header_$ac_safe=no" | |
5294 | fi | |
5295 | rm -f conftest* | |
5296 | fi | |
5297 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5298 | echo "$ac_t""yes" 1>&6 | |
5299 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5300 | cat >> confdefs.h <<EOF | |
5301 | #define $ac_tr_hdr 1 | |
5302 | EOF | |
5303 | ||
5304 | else | |
5305 | echo "$ac_t""no" 1>&6 | |
5306 | fi | |
5307 | done | |
5308 | ||
5309 | for ac_func in getpagesize | |
5310 | do | |
5311 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b851bce | 5312 | echo "configure:5313: checking for $ac_func" >&5 |
c906108c SS |
5313 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5314 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5315 | else | |
5316 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5317 | #line 5318 "configure" |
c906108c SS |
5318 | #include "confdefs.h" |
5319 | /* System header to define __stub macros and hopefully few prototypes, | |
5320 | which can conflict with char $ac_func(); below. */ | |
5321 | #include <assert.h> | |
5322 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5323 | /* We use char because int might match the return type of a gcc2 | |
5324 | builtin and then its argument prototype would still apply. */ | |
5325 | char $ac_func(); | |
5326 | ||
5327 | int main() { | |
5328 | ||
5329 | /* The GNU C library defines this for functions which it implements | |
5330 | to always fail with ENOSYS. Some functions are actually named | |
5331 | something starting with __ and the normal name is an alias. */ | |
5332 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5333 | choke me | |
5334 | #else | |
5335 | $ac_func(); | |
5336 | #endif | |
5337 | ||
5338 | ; return 0; } | |
5339 | EOF | |
3b851bce | 5340 | if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5341 | rm -rf conftest* |
5342 | eval "ac_cv_func_$ac_func=yes" | |
5343 | else | |
5344 | echo "configure: failed program was:" >&5 | |
5345 | cat conftest.$ac_ext >&5 | |
5346 | rm -rf conftest* | |
5347 | eval "ac_cv_func_$ac_func=no" | |
5348 | fi | |
5349 | rm -f conftest* | |
5350 | fi | |
5351 | ||
5352 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5353 | echo "$ac_t""yes" 1>&6 | |
5354 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5355 | cat >> confdefs.h <<EOF | |
5356 | #define $ac_tr_func 1 | |
5357 | EOF | |
5358 | ||
5359 | else | |
5360 | echo "$ac_t""no" 1>&6 | |
5361 | fi | |
5362 | done | |
5363 | ||
5364 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
3b851bce | 5365 | echo "configure:5366: checking for working mmap" >&5 |
c906108c SS |
5366 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5367 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5368 | else | |
5369 | if test "$cross_compiling" = yes; then | |
5370 | ac_cv_func_mmap_fixed_mapped=no | |
5371 | else | |
5372 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5373 | #line 5374 "configure" |
c906108c SS |
5374 | #include "confdefs.h" |
5375 | ||
5376 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5377 | Here is a matrix of mmap possibilities: | |
5378 | mmap private not fixed | |
5379 | mmap private fixed at somewhere currently unmapped | |
5380 | mmap private fixed at somewhere already mapped | |
5381 | mmap shared not fixed | |
5382 | mmap shared fixed at somewhere currently unmapped | |
5383 | mmap shared fixed at somewhere already mapped | |
5384 | For private mappings, we should verify that changes cannot be read() | |
5385 | back from the file, nor mmap's back from the file at a different | |
5386 | address. (There have been systems where private was not correctly | |
5387 | implemented like the infamous i386 svr4.0, and systems where the | |
5388 | VM page cache was not coherent with the filesystem buffer cache | |
5389 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5390 | For shared mappings, we should conversely verify that changes get | |
5391 | propogated back to all the places they're supposed to be. | |
5392 | ||
5393 | Grep wants private fixed already mapped. | |
5394 | The main things grep needs to know about mmap are: | |
5395 | * does it exist and is it safe to write into the mmap'd area | |
5396 | * how to use it (BSD variants) */ | |
5397 | #include <sys/types.h> | |
5398 | #include <fcntl.h> | |
5399 | #include <sys/mman.h> | |
5400 | ||
5401 | /* This mess was copied from the GNU getpagesize.h. */ | |
5402 | #ifndef HAVE_GETPAGESIZE | |
5403 | # ifdef HAVE_UNISTD_H | |
5404 | # include <unistd.h> | |
5405 | # endif | |
5406 | ||
5407 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5408 | # ifndef HAVE_SYS_PARAM_H | |
5409 | # define HAVE_SYS_PARAM_H 1 | |
5410 | # endif | |
5411 | ||
5412 | # ifdef _SC_PAGESIZE | |
5413 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5414 | # else /* no _SC_PAGESIZE */ | |
5415 | # ifdef HAVE_SYS_PARAM_H | |
5416 | # include <sys/param.h> | |
5417 | # ifdef EXEC_PAGESIZE | |
5418 | # define getpagesize() EXEC_PAGESIZE | |
5419 | # else /* no EXEC_PAGESIZE */ | |
5420 | # ifdef NBPG | |
5421 | # define getpagesize() NBPG * CLSIZE | |
5422 | # ifndef CLSIZE | |
5423 | # define CLSIZE 1 | |
5424 | # endif /* no CLSIZE */ | |
5425 | # else /* no NBPG */ | |
5426 | # ifdef NBPC | |
5427 | # define getpagesize() NBPC | |
5428 | # else /* no NBPC */ | |
5429 | # ifdef PAGESIZE | |
5430 | # define getpagesize() PAGESIZE | |
5431 | # endif /* PAGESIZE */ | |
5432 | # endif /* no NBPC */ | |
5433 | # endif /* no NBPG */ | |
5434 | # endif /* no EXEC_PAGESIZE */ | |
5435 | # else /* no HAVE_SYS_PARAM_H */ | |
5436 | # define getpagesize() 8192 /* punt totally */ | |
5437 | # endif /* no HAVE_SYS_PARAM_H */ | |
5438 | # endif /* no _SC_PAGESIZE */ | |
5439 | ||
5440 | #endif /* no HAVE_GETPAGESIZE */ | |
5441 | ||
5442 | #ifdef __cplusplus | |
5443 | extern "C" { void *malloc(unsigned); } | |
5444 | #else | |
5445 | char *malloc(); | |
5446 | #endif | |
5447 | ||
5448 | int | |
5449 | main() | |
5450 | { | |
5451 | char *data, *data2, *data3; | |
5452 | int i, pagesize; | |
5453 | int fd; | |
5454 | ||
5455 | pagesize = getpagesize(); | |
5456 | ||
5457 | /* | |
5458 | * First, make a file with some known garbage in it. | |
5459 | */ | |
5460 | data = malloc(pagesize); | |
5461 | if (!data) | |
5462 | exit(1); | |
5463 | for (i = 0; i < pagesize; ++i) | |
5464 | *(data + i) = rand(); | |
5465 | umask(0); | |
5466 | fd = creat("conftestmmap", 0600); | |
5467 | if (fd < 0) | |
5468 | exit(1); | |
5469 | if (write(fd, data, pagesize) != pagesize) | |
5470 | exit(1); | |
5471 | close(fd); | |
5472 | ||
5473 | /* | |
5474 | * Next, try to mmap the file at a fixed address which | |
5475 | * already has something else allocated at it. If we can, | |
5476 | * also make sure that we see the same garbage. | |
5477 | */ | |
5478 | fd = open("conftestmmap", O_RDWR); | |
5479 | if (fd < 0) | |
5480 | exit(1); | |
5481 | data2 = malloc(2 * pagesize); | |
5482 | if (!data2) | |
5483 | exit(1); | |
5484 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5485 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5486 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5487 | exit(1); | |
5488 | for (i = 0; i < pagesize; ++i) | |
5489 | if (*(data + i) != *(data2 + i)) | |
5490 | exit(1); | |
5491 | ||
5492 | /* | |
5493 | * Finally, make sure that changes to the mapped area | |
5494 | * do not percolate back to the file as seen by read(). | |
5495 | * (This is a bug on some variants of i386 svr4.0.) | |
5496 | */ | |
5497 | for (i = 0; i < pagesize; ++i) | |
5498 | *(data2 + i) = *(data2 + i) + 1; | |
5499 | data3 = malloc(pagesize); | |
5500 | if (!data3) | |
5501 | exit(1); | |
5502 | if (read(fd, data3, pagesize) != pagesize) | |
5503 | exit(1); | |
5504 | for (i = 0; i < pagesize; ++i) | |
5505 | if (*(data + i) != *(data3 + i)) | |
5506 | exit(1); | |
5507 | close(fd); | |
5508 | unlink("conftestmmap"); | |
5509 | exit(0); | |
5510 | } | |
5511 | ||
5512 | EOF | |
3b851bce | 5513 | if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5514 | then |
5515 | ac_cv_func_mmap_fixed_mapped=yes | |
5516 | else | |
5517 | echo "configure: failed program was:" >&5 | |
5518 | cat conftest.$ac_ext >&5 | |
5519 | rm -fr conftest* | |
5520 | ac_cv_func_mmap_fixed_mapped=no | |
5521 | fi | |
5522 | rm -fr conftest* | |
5523 | fi | |
5524 | ||
5525 | fi | |
5526 | ||
5527 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
5528 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5529 | cat >> confdefs.h <<\EOF | |
5530 | #define HAVE_MMAP 1 | |
5531 | EOF | |
5532 | ||
5533 | fi | |
5534 | ||
5535 | ||
5536 | ||
5537 | ||
5538 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5539 | case ${host_os} in | |
5540 | hpux*) | |
5541 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
3b851bce | 5542 | echo "configure:5543: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
5543 | if test -f /usr/include/dce/cma_config.h ; then |
5544 | if test "$GCC" = "yes" ; then | |
5545 | echo "$ac_t""yes" 1>&6 | |
5546 | cat >> confdefs.h <<\EOF | |
5547 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
5548 | EOF | |
5549 | ||
5550 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" | |
5551 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" | |
5552 | else | |
5553 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
5554 | fi | |
5555 | else | |
5556 | echo "$ac_t""no" 1>&6 | |
5557 | fi | |
5558 | ;; | |
5559 | solaris*) | |
5560 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
3b851bce | 5561 | echo "configure:5562: checking for Solaris thread debugging library" >&5 |
c906108c SS |
5562 | if test -f /usr/lib/libthread_db.so.1 ; then |
5563 | echo "$ac_t""yes" 1>&6 | |
5564 | cat >> confdefs.h <<\EOF | |
5565 | #define HAVE_THREAD_DB_LIB 1 | |
5566 | EOF | |
5567 | ||
5568 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
5569 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" | |
5570 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
3b851bce | 5571 | echo "configure:5572: checking for dlopen in -ldl" >&5 |
c906108c SS |
5572 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
5573 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5574 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5575 | else | |
5576 | ac_save_LIBS="$LIBS" | |
5577 | LIBS="-ldl $LIBS" | |
5578 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5579 | #line 5580 "configure" |
c906108c SS |
5580 | #include "confdefs.h" |
5581 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5582 | /* We use char because int might match the return type of a gcc2 | |
5583 | builtin and then its argument prototype would still apply. */ | |
5584 | char dlopen(); | |
5585 | ||
5586 | int main() { | |
5587 | dlopen() | |
5588 | ; return 0; } | |
5589 | EOF | |
3b851bce | 5590 | if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5591 | rm -rf conftest* |
5592 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5593 | else | |
5594 | echo "configure: failed program was:" >&5 | |
5595 | cat conftest.$ac_ext >&5 | |
5596 | rm -rf conftest* | |
5597 | eval "ac_cv_lib_$ac_lib_var=no" | |
5598 | fi | |
5599 | rm -f conftest* | |
5600 | LIBS="$ac_save_LIBS" | |
5601 | ||
5602 | fi | |
5603 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5604 | echo "$ac_t""yes" 1>&6 | |
5605 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5606 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5607 | cat >> confdefs.h <<EOF | |
5608 | #define $ac_tr_lib 1 | |
5609 | EOF | |
5610 | ||
5611 | LIBS="-ldl $LIBS" | |
5612 | ||
5613 | else | |
5614 | echo "$ac_t""no" 1>&6 | |
5615 | fi | |
5616 | ||
5617 | if test "$GCC" = "yes" ; then | |
5618 | # The GNU linker requires the -export-dynamic option to make | |
5619 | # all symbols visible in the dynamic symbol table. | |
5620 | hold_ldflags=$LDFLAGS | |
5621 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
3b851bce | 5622 | echo "configure:5623: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
5623 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
5624 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5625 | #line 5626 "configure" |
c906108c SS |
5626 | #include "confdefs.h" |
5627 | ||
5628 | int main() { | |
5629 | int i; | |
5630 | ; return 0; } | |
5631 | EOF | |
3b851bce | 5632 | if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5633 | rm -rf conftest* |
5634 | found=yes | |
5635 | else | |
5636 | echo "configure: failed program was:" >&5 | |
5637 | cat conftest.$ac_ext >&5 | |
5638 | rm -rf conftest* | |
5639 | found=no | |
5640 | fi | |
5641 | rm -f conftest* | |
5642 | LDFLAGS=$hold_ldflags | |
5643 | echo "$ac_t""$found" 1>&6 | |
5644 | if test $found = yes; then | |
5645 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
5646 | fi | |
5647 | fi | |
5648 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
5649 | # at one point. | |
5650 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
3b851bce | 5651 | echo "configure:5652: checking if <proc_service.h> is old" >&5 |
c906108c SS |
5652 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
5653 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5654 | else | |
5655 | ||
5656 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5657 | #line 5658 "configure" |
c906108c SS |
5658 | #include "confdefs.h" |
5659 | ||
5660 | #include <proc_service.h> | |
5661 | ps_err_e ps_pdwrite | |
5662 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
5663 | ||
5664 | int main() { | |
5665 | ||
5666 | ; return 0; } | |
5667 | EOF | |
3b851bce | 5668 | if { (eval echo configure:5669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5669 | rm -rf conftest* |
5670 | gdb_cv_proc_service_is_old=no | |
5671 | else | |
5672 | echo "configure: failed program was:" >&5 | |
5673 | cat conftest.$ac_ext >&5 | |
5674 | rm -rf conftest* | |
5675 | gdb_cv_proc_service_is_old=yes | |
5676 | fi | |
5677 | rm -f conftest* | |
5678 | ||
5679 | fi | |
5680 | ||
5681 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
5682 | if test $gdb_cv_proc_service_is_old = yes; then | |
5683 | cat >> confdefs.h <<\EOF | |
5684 | #define PROC_SERVICE_IS_OLD 1 | |
5685 | EOF | |
5686 | ||
5687 | fi | |
5688 | else | |
5689 | echo "$ac_t""no" 1>&6 | |
5690 | fi | |
5691 | ;; | |
5692 | esac | |
5693 | ||
5694 | fi | |
5695 | ||
fb40c209 AC |
5696 | |
5697 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
5698 | if test "${enable_gdbmi+set}" = set; then | |
5699 | enableval="$enable_gdbmi" | |
5700 | ||
5701 | case "${enable_gdbmi}" in | |
5702 | yes | no) ;; | |
5703 | "") enable_gdbmi=yes ;; | |
5704 | *) | |
5705 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
5706 | ;; | |
5707 | esac | |
5708 | ||
5709 | fi | |
5710 | ||
5711 | case ${enable_gdbmi} in | |
5712 | "yes" ) | |
5713 | if test -d "${srcdir}/mi" ; then | |
5714 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
5715 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
5716 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)" | |
5717 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" | |
b0b1b869 | 5718 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
5719 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
5720 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
5721 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
5722 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
5723 | fi |
5724 | ;; | |
5725 | esac | |
c906108c SS |
5726 | |
5727 | # Check whether --enable-tui or --disable-tui was given. | |
5728 | if test "${enable_tui+set}" = set; then | |
5729 | enableval="$enable_tui" | |
5730 | ||
5731 | case "${enable_tui}" in | |
5732 | yes | no) ;; | |
5733 | "") enable_tui=yes ;; | |
5734 | *) | |
5735 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
5736 | ;; | |
5737 | esac | |
5738 | ||
5739 | fi | |
5740 | ||
5741 | case ${enable_tui} in | |
5742 | "yes" ) | |
ed952ac5 AC |
5743 | if test -d "${srcdir}/tui" ; then |
5744 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
5745 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
5746 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_TUI_SRCS)" | |
5747 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" | |
5748 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
5749 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
5750 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
5751 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
5752 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
5753 | fi | |
5754 | ;; | |
c906108c SS |
5755 | esac |
5756 | ||
c906108c SS |
5757 | # Check whether --enable-netrom or --disable-netrom was given. |
5758 | if test "${enable_netrom+set}" = set; then | |
5759 | enableval="$enable_netrom" | |
5760 | case "${enableval}" in | |
5761 | yes) enable_netrom=yes ;; | |
5762 | no) enable_netrom=no ;; | |
5763 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
5764 | esac | |
5765 | fi | |
5766 | ||
5767 | ||
5768 | if test "${enable_netrom}" = "yes"; then | |
5769 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" | |
5770 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" | |
5771 | fi | |
5772 | ||
1decb323 | 5773 | |
3b851bce AC |
5774 | # NOTE: Don't add -Wall or -Wunused, they both include |
5775 | # -Wunused-parameter which reports bogus warnings. | |
5776 | # NOTE: If you add to this list, remember to update | |
5777 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 5778 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
16cadf39 | 5779 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
5780 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
5781 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
5782 | # -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual | |
5783 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes | |
5784 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
5785 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
5786 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
5787 | if test "${enable_build_warnings+set}" = set; then | |
5788 | enableval="$enable_build_warnings" | |
1decb323 | 5789 | case "${enableval}" in |
c906108c SS |
5790 | yes) ;; |
5791 | no) build_warnings="-w";; | |
5792 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5793 | build_warnings="${build_warnings} ${t}";; | |
5794 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5795 | build_warnings="${t} ${build_warnings}";; | |
5796 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5797 | esac | |
d4f3574e | 5798 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 5799 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 5800 | fi |
1decb323 | 5801 | fi |
3b851bce AC |
5802 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
5803 | if test "${enable_gdb_build_warnings+set}" = set; then | |
5804 | enableval="$enable_gdb_build_warnings" | |
5805 | case "${enableval}" in | |
5806 | yes) ;; | |
5807 | no) build_warnings="-w";; | |
5808 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5809 | build_warnings="${build_warnings} ${t}";; | |
5810 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5811 | build_warnings="${t} ${build_warnings}";; | |
5812 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5813 | esac | |
5814 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
5815 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
5816 | fi | |
5817 | fi | |
104c1213 JM |
5818 | WARN_CFLAGS="" |
5819 | WERROR_CFLAGS="" | |
c906108c SS |
5820 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
5821 | then | |
746a987d | 5822 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
3b851bce | 5823 | echo "configure:5824: checking compiler warning flags" >&5 |
746a987d AC |
5824 | # Separate out the -Werror flag as some files just cannot be |
5825 | # compiled with it enabled. | |
5826 | for w in ${build_warnings}; do | |
5827 | case $w in | |
5828 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
5829 | *) # Check that GCC accepts it | |
5830 | if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then | |
5831 | : | |
5832 | else | |
5833 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
5834 | fi | |
5835 | esac | |
5836 | done | |
5837 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
5838 | fi |
5839 | ||
5840 | ||
104c1213 | 5841 | |
c906108c SS |
5842 | MMALLOC_CFLAGS= |
5843 | MMALLOC= | |
5844 | ||
5845 | ||
5846 | ||
5847 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
5848 | if test "${with_mmalloc+set}" = set; then | |
5849 | withval="$with_mmalloc" | |
5850 | case "${withval}" in | |
5851 | yes) want_mmalloc=true ;; | |
5852 | no) want_mmalloc=false;; | |
5853 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
5854 | esac | |
5855 | else | |
5856 | want_mmalloc=false | |
5857 | fi | |
5858 | ||
5859 | if test x$want_mmalloc = xtrue; then | |
5860 | cat >> confdefs.h <<\EOF | |
5861 | #define USE_MMALLOC 1 | |
5862 | EOF | |
5863 | ||
5864 | cat >> confdefs.h <<\EOF | |
5865 | #define MMCHECK_FORCE 1 | |
5866 | EOF | |
5867 | ||
5868 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
5869 | MMALLOC='../mmalloc/libmmalloc.a' | |
5870 | fi | |
5871 | ||
88987551 L |
5872 | # Check whether --with-included-regex or --without-included-regex was given. |
5873 | if test "${with_included_regex+set}" = set; then | |
5874 | withval="$with_included_regex" | |
5875 | case "${withval}" in | |
5876 | yes) want_included_regex=true ;; | |
5877 | no) want_included_regex=false;; | |
5878 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
5879 | esac | |
5880 | else | |
5881 | want_included_regex=true | |
5882 | fi | |
5883 | ||
88987551 L |
5884 | if test $want_included_regex = false; then |
5885 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
3b851bce | 5886 | echo "configure:5887: checking for GNU regex" >&5 |
88987551 L |
5887 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
5888 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5889 | else | |
5890 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5891 | #line 5892 "configure" |
88987551 L |
5892 | #include "confdefs.h" |
5893 | #include <gnu-versions.h> | |
5894 | #include <sys/types.h> | |
5895 | #include <regex.h> | |
5896 | int main() { | |
5897 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
5898 | #error No valid GNU regex. | |
5899 | #endif | |
5900 | ||
5901 | ; return 0; } | |
5902 | EOF | |
3b851bce | 5903 | if { (eval echo configure:5904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
5904 | rm -rf conftest* |
5905 | gdb_cv_have_gnu_regex=yes | |
5906 | else | |
5907 | echo "configure: failed program was:" >&5 | |
5908 | cat conftest.$ac_ext >&5 | |
5909 | rm -rf conftest* | |
5910 | gdb_cv_have_gnu_regex=no | |
5911 | fi | |
5912 | rm -f conftest* | |
5913 | fi | |
5914 | ||
5915 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
5916 | if test $gdb_cv_have_gnu_regex = no; then |
5917 | want_included_regex=true | |
88987551 L |
5918 | fi |
5919 | fi | |
5920 | ||
e48f66e4 AC |
5921 | if test x${want_included_regex} = xtrue; then |
5922 | REGEX="gnu-regex.o" | |
5923 | cat >> confdefs.h <<\EOF | |
5924 | #define USE_INCLUDED_REGEX 1 | |
5925 | EOF | |
5926 | ||
5927 | fi | |
88987551 | 5928 | |
7a292a7a SS |
5929 | |
5930 | # In the Cygwin environment, we need some additional flags. | |
5931 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
3b851bce | 5932 | echo "configure:5933: checking for cygwin" >&5 |
7a292a7a SS |
5933 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
5934 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5935 | else | |
5936 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5937 | #line 5938 "configure" |
7a292a7a SS |
5938 | #include "confdefs.h" |
5939 | ||
5940 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
5941 | lose | |
5942 | #endif | |
5943 | EOF | |
5944 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5945 | egrep "lose" >/dev/null 2>&1; then | |
5946 | rm -rf conftest* | |
5947 | gdb_cv_os_cygwin=yes | |
5948 | else | |
5949 | rm -rf conftest* | |
5950 | gdb_cv_os_cygwin=no | |
5951 | fi | |
5952 | rm -f conftest* | |
5953 | ||
5954 | fi | |
5955 | ||
5956 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
5957 | ||
aff38e61 AC |
5958 | |
5959 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
5960 | case ${host} in | |
95cbc983 AC |
5961 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
5962 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
5963 | esac |
5964 | ||
5965 | ||
5966 | ||
b83266a0 SS |
5967 | if test x$gdb_host = xgo32; then |
5968 | TERM_LIB= | |
5969 | else | |
c906108c SS |
5970 | if test x$gdb_cv_os_cygwin = xyes; then |
5971 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
5972 | else | |
5973 | TERM_LIB= | |
5974 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
3b851bce | 5975 | echo "configure:5976: checking for tgetent in -lncurses" >&5 |
c906108c SS |
5976 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
5977 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5978 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5979 | else | |
5980 | ac_save_LIBS="$LIBS" | |
5981 | LIBS="-lncurses $LIBS" | |
5982 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 5983 | #line 5984 "configure" |
c906108c SS |
5984 | #include "confdefs.h" |
5985 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5986 | /* We use char because int might match the return type of a gcc2 | |
5987 | builtin and then its argument prototype would still apply. */ | |
5988 | char tgetent(); | |
5989 | ||
5990 | int main() { | |
5991 | tgetent() | |
5992 | ; return 0; } | |
5993 | EOF | |
3b851bce | 5994 | if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5995 | rm -rf conftest* |
5996 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5997 | else | |
5998 | echo "configure: failed program was:" >&5 | |
5999 | cat conftest.$ac_ext >&5 | |
6000 | rm -rf conftest* | |
6001 | eval "ac_cv_lib_$ac_lib_var=no" | |
6002 | fi | |
6003 | rm -f conftest* | |
6004 | LIBS="$ac_save_LIBS" | |
6005 | ||
6006 | fi | |
6007 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6008 | echo "$ac_t""yes" 1>&6 | |
6009 | TERM_LIB=-lncurses | |
6010 | else | |
6011 | echo "$ac_t""no" 1>&6 | |
6012 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
3b851bce | 6013 | echo "configure:6014: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
6014 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
6015 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6016 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6017 | else | |
6018 | ac_save_LIBS="$LIBS" | |
6019 | LIBS="-lHcurses $LIBS" | |
6020 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 6021 | #line 6022 "configure" |
c906108c SS |
6022 | #include "confdefs.h" |
6023 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6024 | /* We use char because int might match the return type of a gcc2 | |
6025 | builtin and then its argument prototype would still apply. */ | |
6026 | char tgetent(); | |
6027 | ||
6028 | int main() { | |
6029 | tgetent() | |
6030 | ; return 0; } | |
6031 | EOF | |
3b851bce | 6032 | if { (eval echo configure:6033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6033 | rm -rf conftest* |
6034 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6035 | else | |
6036 | echo "configure: failed program was:" >&5 | |
6037 | cat conftest.$ac_ext >&5 | |
6038 | rm -rf conftest* | |
6039 | eval "ac_cv_lib_$ac_lib_var=no" | |
6040 | fi | |
6041 | rm -f conftest* | |
6042 | LIBS="$ac_save_LIBS" | |
6043 | ||
6044 | fi | |
6045 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6046 | echo "$ac_t""yes" 1>&6 | |
6047 | TERM_LIB=-lHcurses | |
6048 | else | |
6049 | echo "$ac_t""no" 1>&6 | |
6050 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
3b851bce | 6051 | echo "configure:6052: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
6052 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
6053 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6054 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6055 | else | |
6056 | ac_save_LIBS="$LIBS" | |
6057 | LIBS="-ltermlib $LIBS" | |
6058 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 6059 | #line 6060 "configure" |
c906108c SS |
6060 | #include "confdefs.h" |
6061 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6062 | /* We use char because int might match the return type of a gcc2 | |
6063 | builtin and then its argument prototype would still apply. */ | |
6064 | char tgetent(); | |
6065 | ||
6066 | int main() { | |
6067 | tgetent() | |
6068 | ; return 0; } | |
6069 | EOF | |
3b851bce | 6070 | if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6071 | rm -rf conftest* |
6072 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6073 | else | |
6074 | echo "configure: failed program was:" >&5 | |
6075 | cat conftest.$ac_ext >&5 | |
6076 | rm -rf conftest* | |
6077 | eval "ac_cv_lib_$ac_lib_var=no" | |
6078 | fi | |
6079 | rm -f conftest* | |
6080 | LIBS="$ac_save_LIBS" | |
6081 | ||
6082 | fi | |
6083 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6084 | echo "$ac_t""yes" 1>&6 | |
6085 | TERM_LIB=-ltermlib | |
6086 | else | |
6087 | echo "$ac_t""no" 1>&6 | |
6088 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
3b851bce | 6089 | echo "configure:6090: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
6090 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
6091 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6092 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6093 | else | |
6094 | ac_save_LIBS="$LIBS" | |
6095 | LIBS="-ltermcap $LIBS" | |
6096 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 6097 | #line 6098 "configure" |
c906108c SS |
6098 | #include "confdefs.h" |
6099 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6100 | /* We use char because int might match the return type of a gcc2 | |
6101 | builtin and then its argument prototype would still apply. */ | |
6102 | char tgetent(); | |
6103 | ||
6104 | int main() { | |
6105 | tgetent() | |
6106 | ; return 0; } | |
6107 | EOF | |
3b851bce | 6108 | if { (eval echo configure:6109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6109 | rm -rf conftest* |
6110 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6111 | else | |
6112 | echo "configure: failed program was:" >&5 | |
6113 | cat conftest.$ac_ext >&5 | |
6114 | rm -rf conftest* | |
6115 | eval "ac_cv_lib_$ac_lib_var=no" | |
6116 | fi | |
6117 | rm -f conftest* | |
6118 | LIBS="$ac_save_LIBS" | |
6119 | ||
6120 | fi | |
6121 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6122 | echo "$ac_t""yes" 1>&6 | |
6123 | TERM_LIB=-ltermcap | |
6124 | else | |
6125 | echo "$ac_t""no" 1>&6 | |
6126 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
3b851bce | 6127 | echo "configure:6128: checking for tgetent in -lcurses" >&5 |
c906108c SS |
6128 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
6129 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6130 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6131 | else | |
6132 | ac_save_LIBS="$LIBS" | |
6133 | LIBS="-lcurses $LIBS" | |
6134 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 6135 | #line 6136 "configure" |
c906108c SS |
6136 | #include "confdefs.h" |
6137 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6138 | /* We use char because int might match the return type of a gcc2 | |
6139 | builtin and then its argument prototype would still apply. */ | |
6140 | char tgetent(); | |
6141 | ||
6142 | int main() { | |
6143 | tgetent() | |
6144 | ; return 0; } | |
6145 | EOF | |
3b851bce | 6146 | if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6147 | rm -rf conftest* |
6148 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6149 | else | |
6150 | echo "configure: failed program was:" >&5 | |
6151 | cat conftest.$ac_ext >&5 | |
6152 | rm -rf conftest* | |
6153 | eval "ac_cv_lib_$ac_lib_var=no" | |
6154 | fi | |
6155 | rm -f conftest* | |
6156 | LIBS="$ac_save_LIBS" | |
6157 | ||
6158 | fi | |
6159 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6160 | echo "$ac_t""yes" 1>&6 | |
6161 | TERM_LIB=-lcurses | |
6162 | else | |
6163 | echo "$ac_t""no" 1>&6 | |
6164 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
3b851bce | 6165 | echo "configure:6166: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
6166 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
6167 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6168 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6169 | else | |
6170 | ac_save_LIBS="$LIBS" | |
6171 | LIBS="-lterminfo $LIBS" | |
6172 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 6173 | #line 6174 "configure" |
c906108c SS |
6174 | #include "confdefs.h" |
6175 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6176 | /* We use char because int might match the return type of a gcc2 | |
6177 | builtin and then its argument prototype would still apply. */ | |
6178 | char tgetent(); | |
6179 | ||
6180 | int main() { | |
6181 | tgetent() | |
6182 | ; return 0; } | |
6183 | EOF | |
3b851bce | 6184 | if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6185 | rm -rf conftest* |
6186 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6187 | else | |
6188 | echo "configure: failed program was:" >&5 | |
6189 | cat conftest.$ac_ext >&5 | |
6190 | rm -rf conftest* | |
6191 | eval "ac_cv_lib_$ac_lib_var=no" | |
6192 | fi | |
6193 | rm -f conftest* | |
6194 | LIBS="$ac_save_LIBS" | |
6195 | ||
6196 | fi | |
6197 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6198 | echo "$ac_t""yes" 1>&6 | |
6199 | TERM_LIB=-lterminfo | |
6200 | else | |
6201 | echo "$ac_t""no" 1>&6 | |
6202 | fi | |
6203 | ||
6204 | fi | |
6205 | ||
6206 | fi | |
6207 | ||
6208 | fi | |
6209 | ||
6210 | fi | |
6211 | ||
6212 | fi | |
6213 | ||
6214 | ||
6215 | if test "x$TERM_LIB" = x | |
6216 | then | |
6217 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
6218 | fi | |
6219 | fi | |
b83266a0 | 6220 | fi |
c906108c SS |
6221 | |
6222 | ||
cd0fc7c3 SS |
6223 | # libreadline needs libuser32.a in a cygwin environment |
6224 | WIN32LIBS= | |
6225 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
6226 | WIN32LIBS="-luser32" |
6227 | case "${target}" in | |
6228 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
6229 | ;; | |
6230 | esac | |
cd0fc7c3 | 6231 | fi |
c906108c | 6232 | |
7a292a7a | 6233 | |
3fc11d3e JM |
6234 | LIBGUI="../libgui/src/libgui.a" |
6235 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
6236 | ||
6237 | ||
7a292a7a | 6238 | |
8b93c638 JM |
6239 | # Check whether --with-cpu or --without-cpu was given. |
6240 | if test "${with_cpu+set}" = set; then | |
6241 | withval="$with_cpu" | |
6242 | case "${target}" in | |
6243 | powerpc-* | powerpcle-* ) | |
6244 | ## It would be nice to keep this table in sync with the one in | |
6245 | ## gcc/configure. | |
6246 | case "${with_cpu}" in | |
6247 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
6248 | | 604 | 750 ) | |
6249 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
6250 | ;; | |
6251 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
6252 | ## These are all RS6000 variants, as far as GDB is concerned. | |
6253 | with_cpu=rs6000 | |
6254 | ;; | |
6255 | 603e | ec603e ) | |
6256 | with_cpu=603 | |
6257 | ;; | |
6258 | 604e ) | |
6259 | with_cpu=604 | |
6260 | ;; | |
6261 | * ) | |
6262 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
6263 | with_cpu=ppc-uisa | |
6264 | ;; | |
6265 | esac | |
6266 | ;; | |
6267 | * ) | |
6268 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
6269 | ;; | |
6270 | esac | |
6271 | cat >> confdefs.h <<EOF | |
6272 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
6273 | EOF | |
6274 | ||
6275 | ||
6276 | fi | |
6277 | ||
6278 | ||
6279 | ||
3fc11d3e JM |
6280 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
6281 | if test "${enable_gdbtk+set}" = set; then | |
6282 | enableval="$enable_gdbtk" | |
6283 | case "${enableval}" in | |
6284 | yes) | |
6285 | case "$host" in | |
6286 | *go32*) | |
6287 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6288 | enable_gdbtk=no ;; | |
6289 | *windows*) | |
6290 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6291 | enable_gdbtk=no ;; | |
6292 | *) | |
6293 | enable_gdbtk=yes ;; | |
6294 | esac ;; | |
6295 | no) | |
6296 | enable_gdbtk=no ;; | |
6297 | *) | |
6298 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
6299 | esac | |
6300 | else | |
6301 | ||
6302 | # Default is on for everything but go32 and Cygwin | |
6303 | case "$host" in | |
6304 | *go32* | *windows*) | |
6305 | ;; | |
6306 | *) | |
379d6434 AC |
6307 | if test -d "${srcdir}/gdbtk" ; then |
6308 | enable_gdbtk=yes | |
6309 | fi | |
6310 | ;; | |
6311 | esac | |
3fc11d3e JM |
6312 | |
6313 | fi | |
6314 | ||
6315 | ||
6316 | WIN32LDAPP= | |
6317 | ||
6318 | ||
6319 | ||
6320 | configdir="unix" | |
6321 | ||
6322 | GDBTKLIBS= | |
6323 | if test "${enable_gdbtk}" = "yes"; then | |
6324 | ||
6325 | ||
6326 | # | |
6327 | # Ok, lets find the tcl configuration | |
6328 | # First, look for one uninstalled. | |
6329 | # the alternative search directory is invoked by --with-tclconfig | |
6330 | # | |
6331 | ||
6332 | if test x"${no_tcl}" = x ; then | |
6333 | # we reset no_tcl in case something fails here | |
6334 | no_tcl=true | |
6335 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
6336 | if test "${with_tclconfig+set}" = set; then | |
6337 | withval="$with_tclconfig" | |
6338 | with_tclconfig=${withval} | |
6339 | fi | |
6340 | ||
6341 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
3b851bce | 6342 | echo "configure:6343: checking for Tcl configuration" >&5 |
3fc11d3e JM |
6343 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
6344 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6345 | else | |
6346 | ||
6347 | ||
6348 | # First check to see if --with-tclconfig was specified. | |
6349 | if test x"${with_tclconfig}" != x ; then | |
6350 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
6351 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
6352 | else | |
6353 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
6354 | fi | |
6355 | fi | |
6356 | ||
6357 | # then check for a private Tcl installation | |
6358 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6359 | for i in \ | |
6360 | ../tcl \ | |
6361 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
6362 | ../../tcl \ | |
6363 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
6364 | ../../../tcl \ | |
6365 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
6366 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6367 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6368 | break | |
6369 | fi | |
6370 | done | |
6371 | fi | |
6372 | # check in a few common install locations | |
6373 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6374 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6375 | if test -f "$i/tclConfig.sh" ; then | |
6376 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
6377 | break | |
6378 | fi | |
6379 | done | |
6380 | fi | |
6381 | # check in a few other private locations | |
6382 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6383 | for i in \ | |
6384 | ${srcdir}/../tcl \ | |
6385 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
6386 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6387 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6388 | break | |
6389 | fi | |
6390 | done | |
6391 | fi | |
6392 | ||
6393 | fi | |
6394 | ||
6395 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6396 | TCLCONFIG="# no Tcl configs found" | |
6397 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
6398 | else | |
6399 | no_tcl= | |
6400 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
6401 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
6402 | fi | |
6403 | fi | |
6404 | ||
6405 | if test -z "${no_tcl}"; then | |
6406 | ||
6407 | . $TCLCONFIG | |
6408 | ||
6409 | ||
6410 | ||
6411 | ||
6412 | ||
6413 | ||
6414 | ||
6415 | ||
6416 | ||
6417 | ||
6418 | ||
6419 | ||
6420 | ||
6421 | ||
6422 | ||
6423 | ||
6424 | ||
6425 | ||
6426 | ||
6427 | ||
6428 | ||
6429 | ||
6430 | ||
6431 | ||
6432 | ||
6433 | ||
6434 | # | |
6435 | # Ok, lets find the tk configuration | |
6436 | # First, look for one uninstalled. | |
6437 | # the alternative search directory is invoked by --with-tkconfig | |
6438 | # | |
6439 | ||
6440 | if test x"${no_tk}" = x ; then | |
6441 | # we reset no_tk in case something fails here | |
6442 | no_tk=true | |
6443 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
6444 | if test "${with_tkconfig+set}" = set; then | |
6445 | withval="$with_tkconfig" | |
6446 | with_tkconfig=${withval} | |
6447 | fi | |
6448 | ||
6449 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
3b851bce | 6450 | echo "configure:6451: checking for Tk configuration" >&5 |
3fc11d3e JM |
6451 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
6452 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6453 | else | |
6454 | ||
6455 | ||
6456 | # First check to see if --with-tkconfig was specified. | |
6457 | if test x"${with_tkconfig}" != x ; then | |
6458 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
6459 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
6460 | else | |
6461 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
6462 | fi | |
6463 | fi | |
6464 | ||
6465 | # then check for a private Tk library | |
6466 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6467 | for i in \ | |
6468 | ../tk \ | |
6469 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
6470 | ../../tk \ | |
6471 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
6472 | ../../../tk \ | |
6473 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
6474 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6475 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6476 | break | |
6477 | fi | |
6478 | done | |
6479 | fi | |
6480 | # check in a few common install locations | |
6481 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6482 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6483 | if test -f "$i/tkConfig.sh" ; then | |
6484 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
6485 | break | |
6486 | fi | |
6487 | done | |
6488 | fi | |
6489 | # check in a few other private locations | |
6490 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6491 | for i in \ | |
6492 | ${srcdir}/../tk \ | |
6493 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
6494 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6495 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6496 | break | |
6497 | fi | |
6498 | done | |
6499 | fi | |
6500 | ||
6501 | fi | |
6502 | ||
6503 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6504 | TKCONFIG="# no Tk configs found" | |
6505 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
6506 | else | |
6507 | no_tk= | |
6508 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
6509 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
6510 | fi | |
6511 | fi | |
6512 | ||
6513 | ||
6514 | ||
6515 | # If $no_tk is nonempty, then we can't do Tk, and there is no | |
6516 | # point to doing Tcl. | |
6517 | if test -z "${no_tk}"; then | |
6518 | ||
6519 | if test -f "$TKCONFIG" ; then | |
6520 | . $TKCONFIG | |
6521 | fi | |
6522 | ||
6523 | ||
6524 | ||
6525 | ||
6526 | ||
6527 | ||
6528 | ||
6529 | ||
6530 | ||
6531 | ||
6532 | ||
6533 | ||
6534 | ||
6535 | ||
6536 | # | |
6537 | # Ok, lets find the tcl source trees so we can use the headers | |
6538 | # Warning: transition of version 9 to 10 will break this algorithm | |
6539 | # because 10 sorts before 9. We also look for just tcl. We have to | |
6540 | # be careful that we don't match stuff like tclX by accident. | |
6541 | # the alternative search directory is involked by --with-tclinclude | |
6542 | # | |
6543 | ||
6544 | no_tcl=true | |
6545 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
3b851bce | 6546 | echo "configure:6547: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
6547 | # Check whether --with-tclinclude or --without-tclinclude was given. |
6548 | if test "${with_tclinclude+set}" = set; then | |
6549 | withval="$with_tclinclude" | |
6550 | with_tclinclude=${withval} | |
6551 | fi | |
6552 | ||
6553 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
6554 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6555 | else | |
6556 | ||
6557 | # first check to see if --with-tclinclude was specified | |
6558 | if test x"${with_tclinclude}" != x ; then | |
6559 | if test -f ${with_tclinclude}/tclInt.h ; then | |
6560 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
6561 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
6562 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
6563 | else | |
6564 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6565 | fi | |
6566 | fi | |
6567 | ||
6568 | # next check if it came with Tcl configuration file | |
6569 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6570 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
6571 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
6572 | fi | |
6573 | fi | |
6574 | ||
6575 | # next check in private source directory | |
6576 | # | |
6577 | # since ls returns lowest version numbers first, reverse its output | |
6578 | if test x"${ac_cv_c_tclh}" = x ; then | |
6579 | for i in \ | |
6580 | ${srcdir}/../tcl \ | |
6581 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
6582 | ${srcdir}/../../tcl \ | |
6583 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
6584 | ${srcdir}/../../../tcl \ | |
6585 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
6586 | if test -f $i/generic/tclInt.h ; then | |
6587 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6588 | break | |
6589 | fi | |
6590 | done | |
6591 | fi | |
6592 | # finally check in a few common install locations | |
6593 | # | |
6594 | # since ls returns lowest version numbers first, reverse its output | |
6595 | if test x"${ac_cv_c_tclh}" = x ; then | |
6596 | for i in \ | |
6597 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
6598 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
6599 | /usr/local/src/tcl \ | |
6600 | /usr/local/lib/tcl \ | |
6601 | ${prefix}/include ; do | |
6602 | if test -f $i/generic/tclInt.h ; then | |
6603 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6604 | break | |
6605 | fi | |
6606 | done | |
6607 | fi | |
6608 | # see if one is installed | |
6609 | if test x"${ac_cv_c_tclh}" = x ; then | |
6610 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
6611 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
3b851bce | 6612 | echo "configure:6613: checking for tclInt.h" >&5 |
3fc11d3e JM |
6613 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6614 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6615 | else | |
6616 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 6617 | #line 6618 "configure" |
3fc11d3e JM |
6618 | #include "confdefs.h" |
6619 | #include <tclInt.h> | |
6620 | EOF | |
6621 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 6622 | { (eval echo configure:6623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6623 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6624 | if test -z "$ac_err"; then | |
6625 | rm -rf conftest* | |
6626 | eval "ac_cv_header_$ac_safe=yes" | |
6627 | else | |
6628 | echo "$ac_err" >&5 | |
6629 | echo "configure: failed program was:" >&5 | |
6630 | cat conftest.$ac_ext >&5 | |
6631 | rm -rf conftest* | |
6632 | eval "ac_cv_header_$ac_safe=no" | |
6633 | fi | |
6634 | rm -f conftest* | |
6635 | fi | |
6636 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6637 | echo "$ac_t""yes" 1>&6 | |
6638 | ac_cv_c_tclh=installed | |
6639 | else | |
6640 | echo "$ac_t""no" 1>&6 | |
6641 | ac_cv_c_tclh="" | |
6642 | fi | |
6643 | ||
6644 | fi | |
6645 | ||
6646 | fi | |
6647 | ||
6648 | if test x"${ac_cv_c_tclh}" = x ; then | |
6649 | TCLHDIR="# no Tcl private headers found" | |
6650 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
6651 | fi | |
6652 | if test x"${ac_cv_c_tclh}" != x ; then | |
6653 | no_tcl="" | |
6654 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
6655 | echo "$ac_t""is installed" 1>&6 | |
6656 | TCLHDIR="" | |
6657 | else | |
6658 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
6659 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
6660 | TCLHDIR="-I${ac_cv_c_tclh}" | |
6661 | fi | |
6662 | fi | |
6663 | ||
6664 | ||
6665 | ||
6666 | ||
6667 | # | |
6668 | # Ok, lets find the tk source trees so we can use the headers | |
6669 | # If the directory (presumably symlink) named "tk" exists, use that one | |
6670 | # in preference to any others. Same logic is used when choosing library | |
6671 | # and again with Tcl. The search order is the best place to look first, then in | |
6672 | # decreasing significance. The loop breaks if the trigger file is found. | |
6673 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
6674 | # directory. This converts the path from a relative to an absolute, so | |
6675 | # recursive cache variables for the path will work right. We check all | |
6676 | # the possible paths in one loop rather than many seperate loops to speed | |
6677 | # things up. | |
6678 | # the alternative search directory is involked by --with-tkinclude | |
6679 | # | |
6680 | no_tk=true | |
6681 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
3b851bce | 6682 | echo "configure:6683: checking for Tk private headers" >&5 |
3fc11d3e JM |
6683 | # Check whether --with-tkinclude or --without-tkinclude was given. |
6684 | if test "${with_tkinclude+set}" = set; then | |
6685 | withval="$with_tkinclude" | |
6686 | with_tkinclude=${withval} | |
6687 | fi | |
6688 | ||
6689 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
6690 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6691 | else | |
6692 | ||
6693 | # first check to see if --with-tkinclude was specified | |
6694 | if test x"${with_tkinclude}" != x ; then | |
6695 | if test -f ${with_tkinclude}/tk.h ; then | |
6696 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
6697 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
6698 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
6699 | else | |
6700 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6701 | fi | |
6702 | fi | |
6703 | ||
6704 | # next check if it came with Tk configuration file | |
6705 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6706 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
6707 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
6708 | fi | |
6709 | fi | |
6710 | ||
6711 | # next check in private source directory | |
6712 | # | |
6713 | # since ls returns lowest version numbers first, reverse its output | |
6714 | if test x"${ac_cv_c_tkh}" = x ; then | |
6715 | for i in \ | |
6716 | ${srcdir}/../tk \ | |
6717 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
6718 | ${srcdir}/../../tk \ | |
6719 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
6720 | ${srcdir}/../../../tk \ | |
6721 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
6722 | if test -f $i/generic/tk.h ; then | |
6723 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6724 | break | |
6725 | fi | |
6726 | done | |
6727 | fi | |
6728 | # finally check in a few common install locations | |
6729 | # | |
6730 | # since ls returns lowest version numbers first, reverse its output | |
6731 | if test x"${ac_cv_c_tkh}" = x ; then | |
6732 | for i in \ | |
6733 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
6734 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
6735 | /usr/local/src/tk \ | |
6736 | /usr/local/lib/tk \ | |
6737 | ${prefix}/include ; do | |
6738 | if test -f $i/generic/tk.h ; then | |
6739 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6740 | break | |
6741 | fi | |
6742 | done | |
6743 | fi | |
6744 | # see if one is installed | |
6745 | if test x"${ac_cv_c_tkh}" = x ; then | |
6746 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
6747 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
3b851bce | 6748 | echo "configure:6749: checking for tk.h" >&5 |
3fc11d3e JM |
6749 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6750 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6751 | else | |
6752 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 6753 | #line 6754 "configure" |
3fc11d3e JM |
6754 | #include "confdefs.h" |
6755 | #include <tk.h> | |
6756 | EOF | |
6757 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 6758 | { (eval echo configure:6759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6759 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6760 | if test -z "$ac_err"; then | |
6761 | rm -rf conftest* | |
6762 | eval "ac_cv_header_$ac_safe=yes" | |
6763 | else | |
6764 | echo "$ac_err" >&5 | |
6765 | echo "configure: failed program was:" >&5 | |
6766 | cat conftest.$ac_ext >&5 | |
6767 | rm -rf conftest* | |
6768 | eval "ac_cv_header_$ac_safe=no" | |
6769 | fi | |
6770 | rm -f conftest* | |
6771 | fi | |
6772 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6773 | echo "$ac_t""yes" 1>&6 | |
6774 | ac_cv_c_tkh=installed | |
6775 | else | |
6776 | echo "$ac_t""no" 1>&6 | |
6777 | ac_cv_c_tkh="" | |
6778 | fi | |
6779 | ||
6780 | fi | |
6781 | ||
6782 | fi | |
6783 | ||
6784 | if test x"${ac_cv_c_tkh}" != x ; then | |
6785 | no_tk="" | |
6786 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
6787 | echo "$ac_t""is installed" 1>&6 | |
6788 | TKHDIR="" | |
6789 | else | |
6790 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
6791 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
6792 | TKHDIR="-I${ac_cv_c_tkh}" | |
6793 | fi | |
6794 | else | |
6795 | TKHDIR="# no Tk directory found" | |
6796 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
6797 | no_tk=true | |
6798 | fi | |
6799 | ||
6800 | ||
6801 | ||
6802 | ||
6803 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
3b851bce | 6804 | echo "configure:6805: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6805 | if test x"${ac_cv_c_itclh}" = x ; then |
6806 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
6807 | if test -f $i/generic/itcl.h ; then | |
6808 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
6809 | break | |
6810 | fi | |
6811 | done | |
6812 | fi | |
6813 | if test x"${ac_cv_c_itclh}" = x ; then | |
6814 | ITCLHDIR="# no Itcl private headers found" | |
6815 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
6816 | fi | |
6817 | if test x"${ac_cv_c_itclh}" != x ; then | |
6818 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
6819 | fi | |
6820 | # should always be here | |
6821 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
6822 | ||
6823 | #AC_SUBST(ITCLLIB) | |
6824 | ||
6825 | ||
6826 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
3b851bce | 6827 | echo "configure:6828: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6828 | if test x"${ac_cv_c_itkh}" = x ; then |
6829 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
6830 | if test -f $i/generic/itk.h ; then | |
6831 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
6832 | break | |
6833 | fi | |
6834 | done | |
6835 | fi | |
6836 | if test x"${ac_cv_c_itkh}" = x ; then | |
6837 | ITKHDIR="# no Itk private headers found" | |
6838 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
6839 | fi | |
6840 | if test x"${ac_cv_c_itkh}" != x ; then | |
6841 | ITKHDIR="-I${ac_cv_c_itkh}" | |
6842 | fi | |
6843 | # should always be here | |
6844 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
6845 | ||
6846 | #AC_SUBST(ITKLIB) | |
6847 | ||
6848 | ||
6849 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
3b851bce | 6850 | echo "configure:6851: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6851 | if test x"${ac_cv_c_tixh}" = x ; then |
6852 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
6853 | if test -f $i/generic/tix.h ; then | |
6854 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
6855 | break | |
6856 | fi | |
6857 | done | |
6858 | fi | |
6859 | if test x"${ac_cv_c_tixh}" = x ; then | |
6860 | TIXHDIR="# no Tix private headers found" | |
6861 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
6862 | fi | |
6863 | if test x"${ac_cv_c_tixh}" != x ; then | |
6864 | TIXHDIR="-I${ac_cv_c_tixh}" | |
6865 | fi | |
6866 | ||
6867 | ||
6868 | ||
6869 | # now look for Itcl library stuff | |
6870 | ||
6871 | ||
6872 | # | |
6873 | # Ok, lets find the itcl configuration | |
6874 | # First, look for one uninstalled. | |
6875 | # the alternative search directory is invoked by --with-itclconfig | |
6876 | # | |
6877 | ||
6878 | if test x"${no_itcl}" = x ; then | |
6879 | # we reset no_itcl in case something fails here | |
6880 | no_itcl=true | |
6881 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
6882 | if test "${with_itclconfig+set}" = set; then | |
6883 | withval="$with_itclconfig" | |
6884 | with_itclconfig=${withval} | |
6885 | fi | |
6886 | ||
6887 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
3b851bce | 6888 | echo "configure:6889: checking for Itcl configuration" >&5 |
3fc11d3e JM |
6889 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
6890 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6891 | else | |
6892 | ||
6893 | ||
6894 | # First check to see if --with-itclconfig was specified. | |
6895 | if test x"${with_itclconfig}" != x ; then | |
6896 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
6897 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
6898 | else | |
6899 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
6900 | fi | |
6901 | fi | |
6902 | ||
6903 | # then check for a private Itcl library | |
6904 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6905 | for i in \ | |
6906 | ../itcl/itcl \ | |
6907 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
6908 | ../../itcl \ | |
6909 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
6910 | ../../../itcl \ | |
6911 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6912 | if test -f "$i/itclConfig.sh" ; then | |
6913 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6914 | break | |
6915 | fi | |
6916 | done | |
6917 | fi | |
6918 | # check in a few common install locations | |
6919 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6920 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6921 | if test -f "$i/itclConfig.sh" ; then | |
6922 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6923 | break | |
6924 | fi | |
6925 | done | |
6926 | fi | |
6927 | # check in a few other private locations | |
6928 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6929 | for i in \ | |
6930 | ${srcdir}/../itcl/itcl \ | |
6931 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6932 | if test -f "$i/itclConfig.sh" ; then | |
6933 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6934 | break | |
6935 | fi | |
6936 | done | |
6937 | fi | |
6938 | ||
6939 | fi | |
6940 | ||
6941 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6942 | ITCLCONFIG="# no Itcl configs found" | |
6943 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
6944 | else | |
6945 | no_itcl= | |
6946 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
6947 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
6948 | fi | |
6949 | fi | |
6950 | ||
6951 | if test -z "${no_itcl}"; then | |
6952 | ||
6953 | if test -f "$ITCLCONFIG" ; then | |
6954 | . $ITCLCONFIG | |
6955 | fi | |
6956 | ||
6957 | ||
6958 | ||
6959 | ||
6960 | ||
6961 | ||
6962 | ||
6963 | ||
6964 | ||
6965 | ||
6966 | ||
6967 | case "${host}" in | |
6968 | *-*-cygwin*) | |
6969 | itcldir=../itcl/itcl/win/ | |
6970 | ;; | |
6971 | *) | |
6972 | itcldir=../itcl/itcl/unix/ | |
6973 | ;; | |
6974 | esac | |
6975 | ||
6976 | ||
6977 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
6978 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
6979 | fi | |
6980 | ||
6981 | ||
6982 | # now look for Itk library stuff | |
6983 | ||
6984 | # | |
6985 | # Ok, lets find the itk configuration | |
6986 | # First, look for one uninstalled. | |
6987 | # the alternative search directory is invoked by --with-itkconfig | |
6988 | # | |
6989 | ||
6990 | if test x"${no_itk}" = x ; then | |
6991 | # we reset no_itk in case something fails here | |
6992 | no_itk=true | |
6993 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
6994 | if test "${with_itkconfig+set}" = set; then | |
6995 | withval="$with_itkconfig" | |
6996 | with_itkconfig=${withval} | |
6997 | fi | |
6998 | ||
6999 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
3b851bce | 7000 | echo "configure:7001: checking for Itk configuration" >&5 |
3fc11d3e JM |
7001 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
7002 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7003 | else | |
7004 | ||
7005 | ||
7006 | # First check to see if --with-itkconfig was specified. | |
7007 | if test x"${with_itkconfig}" != x ; then | |
7008 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
7009 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
7010 | else | |
7011 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
7012 | fi | |
7013 | fi | |
7014 | ||
7015 | # then check for a private Itk library | |
7016 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7017 | for i in \ | |
7018 | ../itcl/itk \ | |
7019 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
7020 | ../../itk \ | |
7021 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
7022 | ../../../itk \ | |
7023 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
7024 | if test -f "$i/itkConfig.sh" ; then | |
7025 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7026 | break | |
7027 | fi | |
7028 | done | |
7029 | fi | |
7030 | # check in a few common install locations | |
7031 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7032 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7033 | if test -f "$i/itkConfig.sh" ; then | |
7034 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7035 | break | |
7036 | fi | |
7037 | done | |
7038 | fi | |
7039 | # check in a few other private locations | |
7040 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7041 | for i in \ | |
7042 | ${srcdir}/../itcl/itk \ | |
7043 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
7044 | if test -f "$i/itkConfig.sh" ; then | |
7045 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7046 | break | |
7047 | fi | |
7048 | done | |
7049 | fi | |
7050 | ||
7051 | fi | |
7052 | ||
7053 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7054 | ITKCONFIG="# no Itk configs found" | |
7055 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
7056 | else | |
7057 | no_itk= | |
7058 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
7059 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
7060 | fi | |
7061 | fi | |
7062 | ||
7063 | ||
7064 | if test -z "${no_itcl}"; then | |
7065 | ||
7066 | if test -f "$ITKCONFIG" ; then | |
7067 | . $ITKCONFIG | |
7068 | fi | |
7069 | ||
7070 | ||
7071 | ||
7072 | ||
7073 | ||
7074 | ||
7075 | ||
7076 | ||
7077 | ||
7078 | ||
7079 | ||
7080 | ||
7081 | case "${host}" in | |
7082 | *-*-cygwin*) | |
7083 | itkdir=../itcl/itk/win/ | |
7084 | ;; | |
7085 | *) | |
7086 | itkdir=../itcl/itk/unix/ | |
7087 | ;; | |
7088 | esac | |
7089 | ||
7090 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
7091 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
7092 | fi | |
7093 | ||
7094 | # now look for Tix library stuff | |
7095 | ||
7096 | # | |
7097 | # Ok, lets find the tix configuration | |
7098 | # First, look for one uninstalled. | |
7099 | # the alternative search directory is invoked by --with-itkconfig | |
7100 | # | |
7101 | ||
7102 | if test x"${no_tix}" = x ; then | |
7103 | # we reset no_tix in case something fails here | |
7104 | no_tix=true | |
7105 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
7106 | if test "${with_tixconfig+set}" = set; then | |
7107 | withval="$with_tixconfig" | |
7108 | with_tixconfig=${withval} | |
7109 | fi | |
7110 | ||
7111 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
3b851bce | 7112 | echo "configure:7113: checking for Tix configuration" >&5 |
3fc11d3e JM |
7113 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
7114 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7115 | else | |
7116 | ||
7117 | ||
7118 | # First check to see if --with-tixconfig was specified. | |
7119 | if test x"${with_tixconfig}" != x ; then | |
7120 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
7121 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
7122 | else | |
7123 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
7124 | fi | |
7125 | fi | |
7126 | ||
7127 | # then check for a private Tix library | |
7128 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7129 | for i in \ | |
7130 | ../tix \ | |
7131 | `ls -dr ../tix 2>/dev/null` \ | |
7132 | ../../tix \ | |
7133 | `ls -dr ../../tix 2>/dev/null` \ | |
7134 | ../../../tix \ | |
7135 | `ls -dr ../../../tix 2>/dev/null` ; do | |
7136 | echo "**** Looking at $i - with ${configdir}" | |
7137 | if test -f "$i/tixConfig.sh" ; then | |
7138 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
7139 | break | |
7140 | fi | |
7141 | done | |
7142 | fi | |
7143 | # check in a few common install locations | |
7144 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7145 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7146 | echo "**** Looking at $i" | |
7147 | if test -f "$i/tixConfig.sh" ; then | |
7148 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
7149 | break | |
7150 | fi | |
7151 | done | |
7152 | fi | |
7153 | # check in a few other private locations | |
7154 | echo "**** Other private locations" | |
7155 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7156 | for i in \ | |
7157 | ${srcdir}/../tix \ | |
7158 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
7159 | echo "**** Looking at $i - with ${configdir}" | |
7160 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
7161 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
7162 | break | |
7163 | fi | |
7164 | done | |
7165 | fi | |
7166 | ||
7167 | fi | |
7168 | ||
7169 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7170 | TIXCONFIG="# no Tix configs found" | |
7171 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
7172 | else | |
7173 | no_tix= | |
7174 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
7175 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
7176 | fi | |
7177 | fi | |
7178 | ||
7179 | ||
7180 | if test -z "${no_tix}"; then | |
7181 | ||
7182 | if test -f "$TIXCONFIG" ; then | |
7183 | . $TIXCONFIG | |
7184 | fi | |
7185 | ||
7186 | ||
7187 | ||
7188 | ||
7189 | ||
7190 | ||
7191 | ||
7192 | ||
7193 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
7194 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
7195 | fi | |
7196 | ||
3fc11d3e JM |
7197 | ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK" |
7198 | # Tcl/Tk 8.1 require -fwritable strings. I don't | |
7199 | # know whether 8.2 will or not, but I bet it will. | |
7200 | # I don't have to worry about 7.x since we don't support it. | |
7201 | GDBTK_CFLAGS="" | |
7202 | if test "$GCC" = "yes"; then | |
7203 | if test "$TCL_VERSION" != "8.0" ; then | |
7204 | GDBTK_CFLAGS="-fwritable-strings" | |
7205 | fi | |
7206 | fi | |
7207 | ||
7208 | # Include some libraries that Tcl and Tk want. | |
7209 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
7210 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
7211 | # Yes, the ordering seems wrong here. But it isn't. | |
7212 | # TK_LIBS is the list of libraries that need to be linked | |
7213 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
7214 | # were in LIBS then any link tests after this point would | |
7215 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
7216 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
d45b9300 FN |
7217 | CONFIG_SRCS="${CONFIG_SRCS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c" |
7218 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o" | |
7219 | CONFIG_INITS="${CONFIG_INITS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c" | |
b3a90332 | 7220 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 7221 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
7222 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
7223 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
7224 | |
7225 | if test x$gdb_cv_os_cygwin = xyes; then | |
7226 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
7227 | WIN32LDAPP="-Wl,--subsystem,console" | |
7228 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
7229 | fi | |
7230 | fi | |
7231 | fi | |
7232 | fi | |
7233 | ||
7234 | ||
7235 | ||
7236 | ||
7237 | ||
7238 | ||
7239 | ||
7240 | ||
7241 | ||
7242 | ||
7243 | ||
7244 | ||
7245 | ||
c906108c SS |
7246 | # If we find X, set shell vars x_includes and x_libraries to the |
7247 | # paths, otherwise set no_x=yes. | |
7248 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
7249 | # --without-x overrides everything else, but does not touch the cache. | |
7250 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
3b851bce | 7251 | echo "configure:7252: checking for X" >&5 |
c906108c SS |
7252 | |
7253 | # Check whether --with-x or --without-x was given. | |
7254 | if test "${with_x+set}" = set; then | |
7255 | withval="$with_x" | |
7256 | : | |
7257 | fi | |
7258 | ||
7259 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
7260 | if test "x$with_x" = xno; then | |
7261 | # The user explicitly disabled X. | |
7262 | have_x=disabled | |
7263 | else | |
7264 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
7265 | # Both variables are already set. | |
7266 | have_x=yes | |
7267 | else | |
7268 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
7269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7270 | else | |
7271 | # One or both of the vars are not set, and there is no cached value. | |
7272 | ac_x_includes=NO ac_x_libraries=NO | |
7273 | rm -fr conftestdir | |
7274 | if mkdir conftestdir; then | |
7275 | cd conftestdir | |
7276 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
7277 | cat > Imakefile <<'EOF' | |
7278 | acfindx: | |
7279 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
7280 | EOF | |
7281 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
7282 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
7283 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
7284 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
7285 | for ac_extension in a so sl; do | |
7286 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
7287 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
7288 | ac_im_usrlibdir=$ac_im_libdir; break | |
7289 | fi | |
7290 | done | |
7291 | # Screen out bogus values from the imake configuration. They are | |
7292 | # bogus both because they are the default anyway, and because | |
7293 | # using them would break gcc on systems where it needs fixed includes. | |
7294 | case "$ac_im_incroot" in | |
7295 | /usr/include) ;; | |
7296 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
7297 | esac | |
7298 | case "$ac_im_usrlibdir" in | |
7299 | /usr/lib | /lib) ;; | |
7300 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
7301 | esac | |
7302 | fi | |
7303 | cd .. | |
7304 | rm -fr conftestdir | |
7305 | fi | |
7306 | ||
7307 | if test "$ac_x_includes" = NO; then | |
7308 | # Guess where to find include files, by looking for this one X11 .h file. | |
7309 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
7310 | ||
7311 | # First, try using that file with no special directory specified. | |
7312 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 7313 | #line 7314 "configure" |
c906108c SS |
7314 | #include "confdefs.h" |
7315 | #include <$x_direct_test_include> | |
7316 | EOF | |
7317 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b851bce | 7318 | { (eval echo configure:7319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
7319 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7320 | if test -z "$ac_err"; then | |
7321 | rm -rf conftest* | |
7322 | # We can compile using X headers with no special include directory. | |
7323 | ac_x_includes= | |
7324 | else | |
7325 | echo "$ac_err" >&5 | |
7326 | echo "configure: failed program was:" >&5 | |
7327 | cat conftest.$ac_ext >&5 | |
7328 | rm -rf conftest* | |
7329 | # Look for the header file in a standard set of common directories. | |
7330 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7331 | for ac_dir in \ | |
7332 | /usr/X11/include \ | |
7333 | /usr/X11R6/include \ | |
7334 | /usr/X11R5/include \ | |
7335 | /usr/X11R4/include \ | |
7336 | \ | |
7337 | /usr/include/X11 \ | |
7338 | /usr/include/X11R6 \ | |
7339 | /usr/include/X11R5 \ | |
7340 | /usr/include/X11R4 \ | |
7341 | \ | |
7342 | /usr/local/X11/include \ | |
7343 | /usr/local/X11R6/include \ | |
7344 | /usr/local/X11R5/include \ | |
7345 | /usr/local/X11R4/include \ | |
7346 | \ | |
7347 | /usr/local/include/X11 \ | |
7348 | /usr/local/include/X11R6 \ | |
7349 | /usr/local/include/X11R5 \ | |
7350 | /usr/local/include/X11R4 \ | |
7351 | \ | |
7352 | /usr/X386/include \ | |
7353 | /usr/x386/include \ | |
7354 | /usr/XFree86/include/X11 \ | |
7355 | \ | |
7356 | /usr/include \ | |
7357 | /usr/local/include \ | |
7358 | /usr/unsupported/include \ | |
7359 | /usr/athena/include \ | |
7360 | /usr/local/x11r5/include \ | |
7361 | /usr/lpp/Xamples/include \ | |
7362 | \ | |
7363 | /usr/openwin/include \ | |
7364 | /usr/openwin/share/include \ | |
7365 | ; \ | |
7366 | do | |
7367 | if test -r "$ac_dir/$x_direct_test_include"; then | |
7368 | ac_x_includes=$ac_dir | |
7369 | break | |
7370 | fi | |
7371 | done | |
7372 | fi | |
7373 | rm -f conftest* | |
7374 | fi # $ac_x_includes = NO | |
7375 | ||
7376 | if test "$ac_x_libraries" = NO; then | |
7377 | # Check for the libraries. | |
7378 | ||
7379 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
7380 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
7381 | ||
7382 | # See if we find them without any special options. | |
7383 | # Don't add to $LIBS permanently. | |
7384 | ac_save_LIBS="$LIBS" | |
7385 | LIBS="-l$x_direct_test_library $LIBS" | |
7386 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 7387 | #line 7388 "configure" |
c906108c SS |
7388 | #include "confdefs.h" |
7389 | ||
7390 | int main() { | |
7391 | ${x_direct_test_function}() | |
7392 | ; return 0; } | |
7393 | EOF | |
3b851bce | 7394 | if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7395 | rm -rf conftest* |
7396 | LIBS="$ac_save_LIBS" | |
7397 | # We can link X programs with no special library path. | |
7398 | ac_x_libraries= | |
7399 | else | |
7400 | echo "configure: failed program was:" >&5 | |
7401 | cat conftest.$ac_ext >&5 | |
7402 | rm -rf conftest* | |
7403 | LIBS="$ac_save_LIBS" | |
7404 | # First see if replacing the include by lib works. | |
7405 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7406 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
7407 | /usr/X11/lib \ | |
7408 | /usr/X11R6/lib \ | |
7409 | /usr/X11R5/lib \ | |
7410 | /usr/X11R4/lib \ | |
7411 | \ | |
7412 | /usr/lib/X11 \ | |
7413 | /usr/lib/X11R6 \ | |
7414 | /usr/lib/X11R5 \ | |
7415 | /usr/lib/X11R4 \ | |
7416 | \ | |
7417 | /usr/local/X11/lib \ | |
7418 | /usr/local/X11R6/lib \ | |
7419 | /usr/local/X11R5/lib \ | |
7420 | /usr/local/X11R4/lib \ | |
7421 | \ | |
7422 | /usr/local/lib/X11 \ | |
7423 | /usr/local/lib/X11R6 \ | |
7424 | /usr/local/lib/X11R5 \ | |
7425 | /usr/local/lib/X11R4 \ | |
7426 | \ | |
7427 | /usr/X386/lib \ | |
7428 | /usr/x386/lib \ | |
7429 | /usr/XFree86/lib/X11 \ | |
7430 | \ | |
7431 | /usr/lib \ | |
7432 | /usr/local/lib \ | |
7433 | /usr/unsupported/lib \ | |
7434 | /usr/athena/lib \ | |
7435 | /usr/local/x11r5/lib \ | |
7436 | /usr/lpp/Xamples/lib \ | |
7437 | /lib/usr/lib/X11 \ | |
7438 | \ | |
7439 | /usr/openwin/lib \ | |
7440 | /usr/openwin/share/lib \ | |
7441 | ; \ | |
7442 | do | |
7443 | for ac_extension in a so sl; do | |
7444 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
7445 | ac_x_libraries=$ac_dir | |
7446 | break 2 | |
7447 | fi | |
7448 | done | |
7449 | done | |
7450 | fi | |
7451 | rm -f conftest* | |
7452 | fi # $ac_x_libraries = NO | |
7453 | ||
7454 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
7455 | # Didn't find X anywhere. Cache the known absence of X. | |
7456 | ac_cv_have_x="have_x=no" | |
7457 | else | |
7458 | # Record where we found X for the cache. | |
7459 | ac_cv_have_x="have_x=yes \ | |
7460 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
7461 | fi | |
7462 | fi | |
7463 | fi | |
7464 | eval "$ac_cv_have_x" | |
7465 | fi # $with_x != no | |
7466 | ||
7467 | if test "$have_x" != yes; then | |
7468 | echo "$ac_t""$have_x" 1>&6 | |
7469 | no_x=yes | |
7470 | else | |
7471 | # If each of the values was on the command line, it overrides each guess. | |
7472 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
7473 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
7474 | # Update the cache value to reflect the command line values. | |
7475 | ac_cv_have_x="have_x=yes \ | |
7476 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
7477 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
7478 | fi | |
7479 | ||
7480 | ||
7a292a7a SS |
7481 | |
7482 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
7483 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
7484 | # This code just checks for a few cases where we'd like to ignore those | |
7485 | # definitions, even when they're present in the '.mt' file. These cases | |
7486 | # are when --disable-sim is specified, or if the simulator directory is | |
7487 | # not part of the soruce tree. | |
7488 | # | |
7489 | # Check whether --enable-sim or --disable-sim was given. | |
7490 | if test "${enable_sim+set}" = set; then | |
7491 | enableval="$enable_sim" | |
7492 | echo "enable_sim = $enable_sim"; | |
7493 | echo "enableval = ${enableval}"; | |
7494 | case "${enableval}" in | |
7495 | yes) ignore_sim=false ;; | |
7496 | no) ignore_sim=true ;; | |
7497 | *) ignore_sim=false ;; | |
7498 | esac | |
7499 | else | |
7500 | ignore_sim=false | |
7501 | fi | |
7502 | ||
7503 | ||
7504 | if test ! -d "${srcdir}/../sim"; then | |
7505 | ignore_sim=true | |
7506 | fi | |
7507 | ||
7508 | if test "${ignore_sim}" = "true"; then | |
7509 | IGNORE_SIM="SIM=" | |
7510 | IGNORE_SIM_OBS="SIM_OBS=" | |
7511 | else | |
7512 | IGNORE_SIM="" | |
7513 | IGNORE_SIM_OBS="" | |
7514 | cat >> confdefs.h <<\EOF | |
7515 | #define WITH_SIM 1 | |
7516 | EOF | |
7517 | ||
7518 | fi | |
7519 | ||
7520 | ||
7521 | ||
c906108c SS |
7522 | |
7523 | ||
7524 | ||
7525 | ||
7526 | ||
7527 | ||
dfcd3bfb | 7528 | |
e56ac5c3 AC |
7529 | |
7530 | ||
b3a90332 AC |
7531 | |
7532 | ||
c906108c SS |
7533 | # Begin stuff to support --enable-shared |
7534 | # Check whether --enable-shared or --disable-shared was given. | |
7535 | if test "${enable_shared+set}" = set; then | |
7536 | enableval="$enable_shared" | |
7537 | case "${enableval}" in | |
7538 | yes) shared=true ;; | |
7539 | no) shared=false ;; | |
7540 | *) shared=true ;; | |
7541 | esac | |
7542 | fi | |
7543 | ||
7544 | HLDFLAGS= | |
7545 | HLDENV= | |
7546 | # If we have shared libraries, try to set rpath reasonably. | |
7547 | if test "${shared}" = "true"; then | |
7548 | case "${host}" in | |
7549 | *-*-hpux*) | |
7550 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
7551 | ;; | |
7552 | *-*-irix5* | *-*-irix6*) | |
7553 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
7554 | ;; | |
7555 | *-*-linux*aout*) | |
7556 | ;; | |
88987551 | 7557 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
7558 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
7559 | ;; | |
7560 | *-*-solaris*) | |
7561 | HLDFLAGS='-R $(libdir)' | |
7562 | ;; | |
7563 | *-*-sysv4*) | |
7564 | 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;' | |
7565 | ;; | |
7566 | esac | |
7567 | fi | |
7568 | ||
7569 | # On SunOS, if the linker supports the -rpath option, use it to | |
7570 | # prevent ../bfd and ../opcodes from being included in the run time | |
7571 | # search path. | |
7572 | case "${host}" in | |
7573 | *-*-sunos*) | |
7574 | echo 'main () { }' > conftest.c | |
7575 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
7576 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
7577 | : | |
7578 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
7579 | : | |
7580 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
7581 | : | |
7582 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
7583 | : | |
7584 | elif test "${shared}" = "true"; then | |
7585 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
7586 | else | |
7587 | HLDFLAGS='-Wl,-rpath=' | |
7588 | fi | |
7589 | rm -f conftest.t conftest.c conftest | |
7590 | ;; | |
7591 | esac | |
7592 | ||
7593 | ||
7594 | # End stuff to support --enable-shared | |
7595 | ||
7596 | # target_subdir is used by the testsuite to find the target libraries. | |
7597 | target_subdir= | |
7598 | if test "${host}" != "${target}"; then | |
7599 | target_subdir="${target_alias}/" | |
7600 | fi | |
7601 | ||
7602 | ||
7603 | frags= | |
7604 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
7605 | if test ! -f ${host_makefile_frag}; then | |
7606 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
7607 | fi | |
7608 | frags="$frags $host_makefile_frag" | |
7609 | ||
7610 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
7611 | if test ! -f ${target_makefile_frag}; then | |
7612 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
7613 | fi | |
7614 | frags="$frags $target_makefile_frag" | |
7615 | ||
7616 | ||
7617 | ||
7618 | ||
7619 | ||
7620 | hostfile=`sed -n ' | |
7621 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7622 | ' ${host_makefile_frag}` | |
7623 | ||
7624 | targetfile=`sed -n ' | |
7625 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7626 | ' ${target_makefile_frag}` | |
7627 | ||
6166d547 AC |
7628 | GDB_MULTI_ARCH=`sed -n ' |
7629 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
7630 | ' ${target_makefile_frag}` | |
7631 | ||
c906108c SS |
7632 | # these really aren't orthogonal true/false values of the same condition, |
7633 | # but shells are slow enough that I like to reuse the test conditions | |
7634 | # whenever possible | |
7635 | if test "${target}" = "${host}"; then | |
7636 | nativefile=`sed -n ' | |
7637 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7638 | ' ${host_makefile_frag}` | |
7639 | # else | |
7640 | # GDBserver is only useful in a "native" enviroment | |
7641 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
7642 | fi | |
7643 | ||
7644 | ||
6166d547 AC |
7645 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
7646 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
7647 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
7648 | # will be the default. | |
7649 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
7650 | case "${gdb_multi_arch}" in | |
7651 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
7652 | no ) GDB_MULTI_ARCH=0 ;; | |
7653 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
7654 | esac | |
7655 | fi | |
7656 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
7657 | cat >> confdefs.h <<EOF | |
7658 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
7659 | EOF | |
7660 | ||
7661 | fi | |
7662 | # Warn the user when they use an old pratice | |
7663 | case "${GDB_MULTI_ARCH}" in | |
7664 | "" ) ;; | |
7665 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
7666 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
7667 | GDB_MULTI_ARCH_PURE ) | |
7668 | if test x"${targetfile}" != x ; then | |
7669 | echo "configure: warning: "GDB: Ingoring TM_FILE in ${target_makefile_frag}"" 1>&2 | |
5a2402b8 | 7670 | targetfile="" |
6166d547 AC |
7671 | fi ;; |
7672 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
7673 | esac | |
7674 | ||
7675 | ||
96baa820 JM |
7676 | SUBDIRS="doc testsuite nlm" |
7677 | if test "${enable_multi_ice}" = "yes"; then | |
7678 | SUBDIRS="${SUBDIRS} multi-ice" | |
7679 | fi | |
7680 | ||
7681 | ||
7682 | ||
c906108c | 7683 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
7684 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
7685 | # version. | |
c906108c SS |
7686 | |
7687 | files= | |
7688 | links= | |
5a2402b8 | 7689 | |
c906108c | 7690 | rm -f xm.h |
5a2402b8 | 7691 | xm_h="" |
c906108c | 7692 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
7693 | xm_h=xm.h |
7694 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
7695 | files="${files} ${GDB_XM_FILE}" | |
7696 | links="${links} xm.h" | |
7697 | cat >> confdefs.h <<EOF | |
7698 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
7699 | EOF | |
7700 | ||
c906108c | 7701 | fi |
5a2402b8 AC |
7702 | |
7703 | ||
c906108c | 7704 | rm -f tm.h |
5a2402b8 | 7705 | tm_h="" |
c906108c | 7706 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
7707 | tm_h=tm.h |
7708 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
7709 | files="${files} ${GDB_TM_FILE}" | |
7710 | links="${links} tm.h" | |
7711 | cat >> confdefs.h <<EOF | |
7712 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
7713 | EOF | |
7714 | ||
c906108c | 7715 | fi |
5a2402b8 AC |
7716 | |
7717 | ||
c906108c | 7718 | rm -f nm.h |
5a2402b8 | 7719 | nm_h="" |
c906108c | 7720 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
7721 | nm_h=nm.h |
7722 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
7723 | files="${files} ${GDB_NM_FILE}" | |
7724 | links="${links} nm.h" | |
7725 | cat >> confdefs.h <<EOF | |
7726 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
7727 | EOF | |
7728 | ||
c906108c | 7729 | fi |
5a2402b8 AC |
7730 | |
7731 | ||
3fc11d3e | 7732 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
3b851bce | 7733 | echo "configure:7734: checking whether ln -s works" >&5 |
3fc11d3e JM |
7734 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
7735 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7736 | else | |
7737 | rm -f conftestdata | |
7738 | if ln -s X conftestdata 2>/dev/null | |
7739 | then | |
7740 | rm -f conftestdata | |
7741 | ac_cv_prog_LN_S="ln -s" | |
7742 | else | |
7743 | ac_cv_prog_LN_S=ln | |
7744 | fi | |
7745 | fi | |
7746 | LN_S="$ac_cv_prog_LN_S" | |
7747 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
7748 | echo "$ac_t""yes" 1>&6 | |
7749 | else | |
7750 | echo "$ac_t""no" 1>&6 | |
7751 | fi | |
7752 | ||
c906108c SS |
7753 | |
7754 | ||
7755 | ||
7756 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
3b851bce | 7757 | echo "configure:7758: checking for Cygwin environment" >&5 |
c906108c SS |
7758 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
7759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7760 | else | |
7761 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 7762 | #line 7763 "configure" |
c906108c SS |
7763 | #include "confdefs.h" |
7764 | ||
7765 | int main() { | |
7766 | ||
7767 | #ifndef __CYGWIN__ | |
7768 | #define __CYGWIN__ __CYGWIN32__ | |
7769 | #endif | |
7770 | return __CYGWIN__; | |
7771 | ; return 0; } | |
7772 | EOF | |
3b851bce | 7773 | if { (eval echo configure:7774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7774 | rm -rf conftest* |
7775 | ac_cv_cygwin=yes | |
7776 | else | |
7777 | echo "configure: failed program was:" >&5 | |
7778 | cat conftest.$ac_ext >&5 | |
7779 | rm -rf conftest* | |
7780 | ac_cv_cygwin=no | |
7781 | fi | |
7782 | rm -f conftest* | |
7783 | rm -f conftest* | |
7784 | fi | |
7785 | ||
7786 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
7787 | CYGWIN= | |
7788 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
7789 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
3b851bce | 7790 | echo "configure:7791: checking for mingw32 environment" >&5 |
c906108c SS |
7791 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
7792 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7793 | else | |
7794 | cat > conftest.$ac_ext <<EOF | |
3b851bce | 7795 | #line 7796 "configure" |
c906108c SS |
7796 | #include "confdefs.h" |
7797 | ||
7798 | int main() { | |
7799 | return __MINGW32__; | |
7800 | ; return 0; } | |
7801 | EOF | |
3b851bce | 7802 | if { (eval echo configure:7803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7803 | rm -rf conftest* |
7804 | ac_cv_mingw32=yes | |
7805 | else | |
7806 | echo "configure: failed program was:" >&5 | |
7807 | cat conftest.$ac_ext >&5 | |
7808 | rm -rf conftest* | |
7809 | ac_cv_mingw32=no | |
7810 | fi | |
7811 | rm -f conftest* | |
7812 | rm -f conftest* | |
7813 | fi | |
7814 | ||
7815 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
7816 | MINGW32= | |
7817 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
7818 | ||
7819 | ||
7820 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
3b851bce | 7821 | echo "configure:7822: checking for executable suffix" >&5 |
c906108c SS |
7822 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
7823 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7824 | else | |
7825 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
7826 | ac_cv_exeext=.exe | |
7827 | else | |
7828 | rm -f conftest* | |
7829 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
7830 | ac_cv_exeext= | |
3b851bce | 7831 | if { (eval echo configure:7832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
7832 | for file in conftest.*; do |
7833 | case $file in | |
3b851bce | 7834 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
7835 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
7836 | esac | |
7837 | done | |
7838 | else | |
7839 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
7840 | fi | |
7841 | rm -f conftest* | |
7842 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
7843 | fi | |
7844 | fi | |
7845 | ||
7846 | EXEEXT="" | |
7847 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
7848 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
7849 | ac_exeext=$EXEEXT | |
7850 | ||
7851 | ||
7852 | subdirs="$configdirs" | |
7853 | ||
7854 | trap '' 1 2 15 | |
7855 | cat > confcache <<\EOF | |
7856 | # This file is a shell script that caches the results of configure | |
7857 | # tests run on this system so they can be shared between configure | |
7858 | # scripts and configure runs. It is not useful on other systems. | |
7859 | # If it contains results you don't want to keep, you may remove or edit it. | |
7860 | # | |
7861 | # By default, configure uses ./config.cache as the cache file, | |
7862 | # creating it if it does not exist already. You can give configure | |
7863 | # the --cache-file=FILE option to use a different cache file; that is | |
7864 | # what configure does when it calls configure scripts in | |
7865 | # subdirectories, so they share the cache. | |
7866 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7867 | # config.status only pays attention to the cache file if you give it the | |
7868 | # --recheck option to rerun configure. | |
7869 | # | |
7870 | EOF | |
7871 | # The following way of writing the cache mishandles newlines in values, | |
7872 | # but we know of no workaround that is simple, portable, and efficient. | |
7873 | # So, don't put newlines in cache variables' values. | |
7874 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7875 | # and sets the high bit in the cache file unless we assign to the vars. | |
7876 | (set) 2>&1 | | |
7877 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
7878 | *ac_space=\ *) | |
7879 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7880 | # turns \\\\ into \\, and sed turns \\ into \). | |
7881 | sed -n \ | |
7882 | -e "s/'/'\\\\''/g" \ | |
7883 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7884 | ;; | |
7885 | *) | |
7886 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7887 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7888 | ;; | |
7889 | esac >> confcache | |
7890 | if cmp -s $cache_file confcache; then | |
7891 | : | |
7892 | else | |
7893 | if test -w $cache_file; then | |
7894 | echo "updating cache $cache_file" | |
7895 | cat confcache > $cache_file | |
7896 | else | |
7897 | echo "not updating unwritable cache $cache_file" | |
7898 | fi | |
7899 | fi | |
7900 | rm -f confcache | |
7901 | ||
7902 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7903 | ||
7904 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7905 | # Let make expand exec_prefix. | |
7906 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7907 | ||
7908 | # Any assignment to VPATH causes Sun make to only execute | |
7909 | # the first set of double-colon rules, so remove it if not needed. | |
7910 | # If there is a colon in the path, we need to keep it. | |
7911 | if test "x$srcdir" = x.; then | |
7912 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7913 | fi | |
7914 | ||
7915 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7916 | ||
7917 | DEFS=-DHAVE_CONFIG_H | |
7918 | ||
7919 | # Without the "./", some shells look in PATH for config.status. | |
7920 | : ${CONFIG_STATUS=./config.status} | |
7921 | ||
7922 | echo creating $CONFIG_STATUS | |
7923 | rm -f $CONFIG_STATUS | |
7924 | cat > $CONFIG_STATUS <<EOF | |
7925 | #! /bin/sh | |
7926 | # Generated automatically by configure. | |
7927 | # Run this file to recreate the current configuration. | |
7928 | # This directory was configured as follows, | |
7929 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7930 | # | |
7931 | # $0 $ac_configure_args | |
7932 | # | |
7933 | # Compiler output produced by configure, useful for debugging | |
7934 | # configure, is in ./config.log if it exists. | |
7935 | ||
7936 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
7937 | for ac_option | |
7938 | do | |
7939 | case "\$ac_option" in | |
7940 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7941 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7942 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7943 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
7944 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
7945 | exit 0 ;; | |
7946 | -help | --help | --hel | --he | --h) | |
7947 | echo "\$ac_cs_usage"; exit 0 ;; | |
7948 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
7949 | esac | |
7950 | done | |
7951 | ||
7952 | ac_given_srcdir=$srcdir | |
7953 | ac_given_INSTALL="$INSTALL" | |
7954 | ||
ed952ac5 | 7955 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
7956 | EOF |
7957 | cat >> $CONFIG_STATUS <<EOF | |
7958 | ||
7959 | # Protect against being on the right side of a sed subst in config.status. | |
7960 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7961 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7962 | $ac_vpsub | |
7963 | $extrasub | |
7964 | s%@SHELL@%$SHELL%g | |
7965 | s%@CFLAGS@%$CFLAGS%g | |
7966 | s%@CPPFLAGS@%$CPPFLAGS%g | |
7967 | s%@CXXFLAGS@%$CXXFLAGS%g | |
7968 | s%@FFLAGS@%$FFLAGS%g | |
7969 | s%@DEFS@%$DEFS%g | |
7970 | s%@LDFLAGS@%$LDFLAGS%g | |
7971 | s%@LIBS@%$LIBS%g | |
7972 | s%@exec_prefix@%$exec_prefix%g | |
7973 | s%@prefix@%$prefix%g | |
7974 | s%@program_transform_name@%$program_transform_name%g | |
7975 | s%@bindir@%$bindir%g | |
7976 | s%@sbindir@%$sbindir%g | |
7977 | s%@libexecdir@%$libexecdir%g | |
7978 | s%@datadir@%$datadir%g | |
7979 | s%@sysconfdir@%$sysconfdir%g | |
7980 | s%@sharedstatedir@%$sharedstatedir%g | |
7981 | s%@localstatedir@%$localstatedir%g | |
7982 | s%@libdir@%$libdir%g | |
7983 | s%@includedir@%$includedir%g | |
7984 | s%@oldincludedir@%$oldincludedir%g | |
7985 | s%@infodir@%$infodir%g | |
7986 | s%@mandir@%$mandir%g | |
413ccac7 AC |
7987 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
7988 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
7989 | s%@MAINT@%$MAINT%g | |
c906108c SS |
7990 | s%@CC@%$CC%g |
7991 | s%@CPP@%$CPP%g | |
7992 | s%@host@%$host%g | |
7993 | s%@host_alias@%$host_alias%g | |
7994 | s%@host_cpu@%$host_cpu%g | |
7995 | s%@host_vendor@%$host_vendor%g | |
7996 | s%@host_os@%$host_os%g | |
7997 | s%@target@%$target%g | |
7998 | s%@target_alias@%$target_alias%g | |
7999 | s%@target_cpu@%$target_cpu%g | |
8000 | s%@target_vendor@%$target_vendor%g | |
8001 | s%@target_os@%$target_os%g | |
8002 | s%@build@%$build%g | |
8003 | s%@build_alias@%$build_alias%g | |
8004 | s%@build_cpu@%$build_cpu%g | |
8005 | s%@build_vendor@%$build_vendor%g | |
8006 | s%@build_os@%$build_os%g | |
8007 | s%@SET_MAKE@%$SET_MAKE%g | |
8008 | s%@RANLIB@%$RANLIB%g | |
8009 | s%@ALLOCA@%$ALLOCA%g | |
8010 | s%@USE_NLS@%$USE_NLS%g | |
8011 | s%@MSGFMT@%$MSGFMT%g | |
8012 | s%@GMSGFMT@%$GMSGFMT%g | |
8013 | s%@XGETTEXT@%$XGETTEXT%g | |
8014 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
8015 | s%@CATALOGS@%$CATALOGS%g | |
8016 | s%@CATOBJEXT@%$CATOBJEXT%g | |
8017 | s%@DATADIRNAME@%$DATADIRNAME%g | |
8018 | s%@GMOFILES@%$GMOFILES%g | |
8019 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8020 | s%@INTLDEPS@%$INTLDEPS%g | |
8021 | s%@INTLLIBS@%$INTLLIBS%g | |
8022 | s%@INTLOBJS@%$INTLOBJS%g | |
8023 | s%@POFILES@%$POFILES%g | |
8024 | s%@POSUB@%$POSUB%g | |
8025 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
8026 | s%@GT_NO@%$GT_NO%g | |
8027 | s%@GT_YES@%$GT_YES%g | |
8028 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
8029 | s%@l@%$l%g | |
7a292a7a | 8030 | s%@AWK@%$AWK%g |
c906108c SS |
8031 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
8032 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
8033 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8034 | s%@AR@%$AR%g | |
95ca63c4 CF |
8035 | s%@DLLTOOL@%$DLLTOOL%g |
8036 | s%@WINDRES@%$WINDRES%g | |
c906108c | 8037 | s%@YACC@%$YACC%g |
75c6e08a | 8038 | s%@MIG@%$MIG%g |
c906108c | 8039 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
c906108c | 8040 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 8041 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
8042 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
8043 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 8044 | s%@REGEX@%$REGEX%g |
aff38e61 | 8045 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
c906108c | 8046 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 8047 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
8048 | s%@LIBGUI@%$LIBGUI%g |
8049 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
8050 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
8051 | s%@TCL_VERSION@%$TCL_VERSION%g | |
8052 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
8053 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
8054 | s%@TCL_CC@%$TCL_CC%g | |
8055 | s%@TCL_DEFS@%$TCL_DEFS%g | |
8056 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
8057 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
8058 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
8059 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
8060 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
8061 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
8062 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
8063 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
8064 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
8065 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
8066 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
8067 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
8068 | s%@TK_VERSION@%$TK_VERSION%g | |
8069 | s%@TK_DEFS@%$TK_DEFS%g | |
8070 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
8071 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
8072 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
8073 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
8074 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
8075 | s%@TCLHDIR@%$TCLHDIR%g | |
8076 | s%@TKHDIR@%$TKHDIR%g | |
8077 | s%@ITCLHDIR@%$ITCLHDIR%g | |
8078 | s%@ITKHDIR@%$ITKHDIR%g | |
8079 | s%@TIXHDIR@%$TIXHDIR%g | |
8080 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
8081 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
8082 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
8083 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
8084 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
8085 | s%@ITK_VERSION@%$ITK_VERSION%g | |
8086 | s%@ITK_DEFS@%$ITK_DEFS%g | |
8087 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
8088 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
8089 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
8090 | s%@TIX_VERSION@%$TIX_VERSION%g | |
8091 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
8092 | s%@X_CFLAGS@%$X_CFLAGS%g |
8093 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
8094 | s%@X_LIBS@%$X_LIBS%g | |
8095 | s%@ITCLLIB@%$ITCLLIB%g | |
8096 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
8097 | s%@ITKLIB@%$ITKLIB%g | |
8098 | s%@ITK_DEPS@%$ITK_DEPS%g | |
8099 | s%@TIXLIB@%$TIXLIB%g | |
8100 | s%@TIX_DEPS@%$TIX_DEPS%g | |
8101 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
8102 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
8103 | s%@IGNORE_SIM@%$IGNORE_SIM%g | |
8104 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
8105 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
8106 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
8107 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
8108 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 8109 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
8110 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
8111 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
8112 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
8113 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
8114 | s%@HLDFLAGS@%$HLDFLAGS%g |
8115 | s%@HLDENV@%$HLDENV%g | |
8116 | s%@target_subdir@%$target_subdir%g | |
8117 | /@host_makefile_frag@/r $host_makefile_frag | |
8118 | s%@host_makefile_frag@%%g | |
8119 | /@target_makefile_frag@/r $target_makefile_frag | |
8120 | s%@target_makefile_frag@%%g | |
8121 | s%@frags@%$frags%g | |
96baa820 | 8122 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
8123 | s%@xm_h@%$xm_h%g |
8124 | s%@tm_h@%$tm_h%g | |
8125 | s%@nm_h@%$nm_h%g | |
7a292a7a | 8126 | s%@LN_S@%$LN_S%g |
c906108c SS |
8127 | s%@EXEEXT@%$EXEEXT%g |
8128 | s%@subdirs@%$subdirs%g | |
8129 | ||
8130 | CEOF | |
8131 | EOF | |
8132 | ||
8133 | cat >> $CONFIG_STATUS <<\EOF | |
8134 | ||
8135 | # Split the substitutions into bite-sized pieces for seds with | |
8136 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8137 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8138 | ac_file=1 # Number of current file. | |
8139 | ac_beg=1 # First line for current file. | |
8140 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8141 | ac_more_lines=: | |
8142 | ac_sed_cmds="" | |
8143 | while $ac_more_lines; do | |
8144 | if test $ac_beg -gt 1; then | |
8145 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8146 | else | |
8147 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8148 | fi | |
8149 | if test ! -s conftest.s$ac_file; then | |
8150 | ac_more_lines=false | |
8151 | rm -f conftest.s$ac_file | |
8152 | else | |
8153 | if test -z "$ac_sed_cmds"; then | |
8154 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8155 | else | |
8156 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8157 | fi | |
8158 | ac_file=`expr $ac_file + 1` | |
8159 | ac_beg=$ac_end | |
8160 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8161 | fi | |
8162 | done | |
8163 | if test -z "$ac_sed_cmds"; then | |
8164 | ac_sed_cmds=cat | |
8165 | fi | |
8166 | EOF | |
8167 | ||
8168 | cat >> $CONFIG_STATUS <<EOF | |
8169 | ||
ed952ac5 | 8170 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
8171 | EOF |
8172 | cat >> $CONFIG_STATUS <<\EOF | |
8173 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8174 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8175 | case "$ac_file" in | |
8176 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8177 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8178 | *) ac_file_in="${ac_file}.in" ;; | |
8179 | esac | |
8180 | ||
8181 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8182 | ||
8183 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8184 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8185 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8186 | # The file is in a subdirectory. | |
8187 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8188 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8189 | # A "../" for each directory in $ac_dir_suffix. | |
8190 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8191 | else | |
8192 | ac_dir_suffix= ac_dots= | |
8193 | fi | |
8194 | ||
8195 | case "$ac_given_srcdir" in | |
8196 | .) srcdir=. | |
8197 | if test -z "$ac_dots"; then top_srcdir=. | |
8198 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8199 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8200 | *) # Relative path. | |
8201 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8202 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8203 | esac | |
8204 | ||
8205 | case "$ac_given_INSTALL" in | |
8206 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8207 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8208 | esac | |
8209 | ||
8210 | echo creating "$ac_file" | |
8211 | rm -f "$ac_file" | |
8212 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8213 | case "$ac_file" in | |
8214 | *Makefile*) ac_comsub="1i\\ | |
8215 | # $configure_input" ;; | |
8216 | *) ac_comsub= ;; | |
8217 | esac | |
8218 | ||
8219 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8220 | sed -e "$ac_comsub | |
8221 | s%@configure_input@%$configure_input%g | |
8222 | s%@srcdir@%$srcdir%g | |
8223 | s%@top_srcdir@%$top_srcdir%g | |
8224 | s%@INSTALL@%$INSTALL%g | |
8225 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
8226 | fi; done | |
8227 | rm -f conftest.s* | |
8228 | ||
8229 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8230 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8231 | # | |
8232 | # ac_d sets the value in "#define NAME VALUE" lines. | |
8233 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8234 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8235 | ac_dC='\3' | |
8236 | ac_dD='%g' | |
8237 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8238 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8239 | ac_uB='\([ ]\)%\1#\2define\3' | |
8240 | ac_uC=' ' | |
8241 | ac_uD='\4%g' | |
8242 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8243 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8244 | ac_eB='$%\1#\2define\3' | |
8245 | ac_eC=' ' | |
8246 | ac_eD='%g' | |
8247 | ||
8248 | if test "${CONFIG_HEADERS+set}" != set; then | |
8249 | EOF | |
8250 | cat >> $CONFIG_STATUS <<EOF | |
8251 | CONFIG_HEADERS="config.h:config.in" | |
8252 | EOF | |
8253 | cat >> $CONFIG_STATUS <<\EOF | |
8254 | fi | |
8255 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8256 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8257 | case "$ac_file" in | |
8258 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8259 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8260 | *) ac_file_in="${ac_file}.in" ;; | |
8261 | esac | |
8262 | ||
8263 | echo creating $ac_file | |
8264 | ||
8265 | rm -f conftest.frag conftest.in conftest.out | |
8266 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8267 | cat $ac_file_inputs > conftest.in | |
8268 | ||
8269 | EOF | |
8270 | ||
8271 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8272 | # the proper values into config.h.in to produce config.h. And first: | |
8273 | # Protect against being on the right side of a sed subst in config.status. | |
8274 | # Protect against being in an unquoted here document in config.status. | |
8275 | rm -f conftest.vals | |
8276 | cat > conftest.hdr <<\EOF | |
8277 | s/[\\&%]/\\&/g | |
8278 | s%[\\$`]%\\&%g | |
8279 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8280 | s%ac_d%ac_u%gp | |
8281 | s%ac_u%ac_e%gp | |
8282 | EOF | |
8283 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8284 | rm -f conftest.hdr | |
8285 | ||
8286 | # This sed command replaces #undef with comments. This is necessary, for | |
8287 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8288 | # on some systems where configure will not decide to define it. | |
8289 | cat >> conftest.vals <<\EOF | |
8290 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8291 | EOF | |
8292 | ||
8293 | # Break up conftest.vals because some shells have a limit on | |
8294 | # the size of here documents, and old seds have small limits too. | |
8295 | ||
8296 | rm -f conftest.tail | |
8297 | while : | |
8298 | do | |
8299 | ac_lines=`grep -c . conftest.vals` | |
8300 | # grep -c gives empty output for an empty file on some AIX systems. | |
8301 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8302 | # Write a limited-size here document to conftest.frag. | |
8303 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8304 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8305 | echo 'CEOF | |
8306 | sed -f conftest.frag conftest.in > conftest.out | |
8307 | rm -f conftest.in | |
8308 | mv conftest.out conftest.in | |
8309 | ' >> $CONFIG_STATUS | |
8310 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8311 | rm -f conftest.vals | |
8312 | mv conftest.tail conftest.vals | |
8313 | done | |
8314 | rm -f conftest.vals | |
8315 | ||
8316 | cat >> $CONFIG_STATUS <<\EOF | |
8317 | rm -f conftest.frag conftest.h | |
8318 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8319 | cat conftest.in >> conftest.h | |
8320 | rm -f conftest.in | |
8321 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8322 | echo "$ac_file is unchanged" | |
8323 | rm -f conftest.h | |
8324 | else | |
8325 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8326 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8327 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8328 | # The file is in a subdirectory. | |
8329 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8330 | fi | |
8331 | rm -f $ac_file | |
8332 | mv conftest.h $ac_file | |
8333 | fi | |
8334 | fi; done | |
8335 | ||
8336 | EOF | |
8337 | ||
8338 | cat >> $CONFIG_STATUS <<EOF | |
8339 | ac_sources="$files" | |
8340 | ac_dests="$links" | |
8341 | EOF | |
8342 | ||
8343 | cat >> $CONFIG_STATUS <<\EOF | |
8344 | srcdir=$ac_given_srcdir | |
8345 | while test -n "$ac_sources"; do | |
8346 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
8347 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
8348 | ||
8349 | echo "linking $srcdir/$ac_source to $ac_dest" | |
8350 | ||
8351 | if test ! -r $srcdir/$ac_source; then | |
8352 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
8353 | fi | |
8354 | rm -f $ac_dest | |
8355 | ||
8356 | # Make relative symlinks. | |
8357 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8358 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
8359 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
8360 | # The dest file is in a subdirectory. | |
8361 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
8362 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
8363 | # A "../" for each directory in $ac_dest_dir_suffix. | |
8364 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
8365 | else | |
8366 | ac_dest_dir_suffix= ac_dots= | |
8367 | fi | |
8368 | ||
8369 | case "$srcdir" in | |
8370 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
8371 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
8372 | esac | |
8373 | ||
8374 | # Make a symlink if possible; otherwise try a hard link. | |
8375 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
8376 | ln $srcdir/$ac_source $ac_dest; then : | |
8377 | else | |
8378 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
8379 | fi | |
8380 | done | |
8381 | EOF | |
8382 | cat >> $CONFIG_STATUS <<EOF | |
8383 | ||
8384 | gdb_host_cpu=$gdb_host_cpu | |
8385 | gdb_target_cpu=$gdb_target_cpu | |
8386 | nativefile=$nativefile | |
8387 | ||
8388 | EOF | |
8389 | cat >> $CONFIG_STATUS <<\EOF | |
8390 | ||
8391 | if test "${nativefile}" = ""; then | |
8392 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ | |
8393 | < Makefile > Makefile.tem | |
8394 | mv -f Makefile.tem Makefile | |
8395 | fi | |
8396 | ||
8397 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
8398 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
8399 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
8400 | mv -f Makefile.tmp Makefile | |
8401 | ||
2acceee2 | 8402 | |
c906108c SS |
8403 | case x$CONFIG_HEADERS in |
8404 | xconfig.h:config.in) | |
8405 | echo > stamp-h ;; | |
8406 | esac | |
8407 | ||
8408 | exit 0 | |
8409 | EOF | |
8410 | chmod +x $CONFIG_STATUS | |
8411 | rm -fr confdefs* $ac_clean_files | |
8412 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8413 | ||
8414 | if test "$no_recursion" != yes; then | |
8415 | ||
8416 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
8417 | ac_sub_configure_args= | |
8418 | ac_prev= | |
8419 | for ac_arg in $ac_configure_args; do | |
8420 | if test -n "$ac_prev"; then | |
8421 | ac_prev= | |
8422 | continue | |
8423 | fi | |
8424 | case "$ac_arg" in | |
8425 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
8426 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
8427 | ac_prev=cache_file ;; | |
8428 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
8429 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
8430 | ;; | |
8431 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
8432 | ac_prev=srcdir ;; | |
8433 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
8434 | ;; | |
8435 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
8436 | esac | |
8437 | done | |
8438 | ||
8439 | for ac_config_dir in $configdirs; do | |
8440 | ||
8441 | # Do not complain, so a configure script can configure whichever | |
8442 | # parts of a large source tree are present. | |
8443 | if test ! -d $srcdir/$ac_config_dir; then | |
8444 | continue | |
8445 | fi | |
8446 | ||
8447 | echo configuring in $ac_config_dir | |
8448 | ||
8449 | case "$srcdir" in | |
8450 | .) ;; | |
8451 | *) | |
8452 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
8453 | else | |
8454 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
8455 | fi | |
8456 | ;; | |
8457 | esac | |
8458 | ||
8459 | ac_popdir=`pwd` | |
8460 | cd $ac_config_dir | |
8461 | ||
8462 | # A "../" for each directory in /$ac_config_dir. | |
8463 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
8464 | ||
8465 | case "$srcdir" in | |
8466 | .) # No --srcdir option. We are building in place. | |
8467 | ac_sub_srcdir=$srcdir ;; | |
8468 | /*) # Absolute path. | |
8469 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
8470 | *) # Relative path. | |
8471 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
8472 | esac | |
8473 | ||
8474 | # Check for guested configure; otherwise get Cygnus style configure. | |
8475 | if test -f $ac_sub_srcdir/configure; then | |
8476 | ac_sub_configure=$ac_sub_srcdir/configure | |
8477 | elif test -f $ac_sub_srcdir/configure.in; then | |
8478 | ac_sub_configure=$ac_configure | |
8479 | else | |
8480 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
8481 | ac_sub_configure= | |
8482 | fi | |
8483 | ||
8484 | # The recursion is here. | |
8485 | if test -n "$ac_sub_configure"; then | |
8486 | ||
8487 | # Make the cache file name correct relative to the subdirectory. | |
8488 | case "$cache_file" in | |
8489 | /*) ac_sub_cache_file=$cache_file ;; | |
8490 | *) # Relative path. | |
8491 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
8492 | esac | |
8493 | case "$ac_given_INSTALL" in | |
8494 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8495 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8496 | esac | |
8497 | ||
8498 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
8499 | # The eval makes quoting arguments work. | |
8500 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
8501 | then : | |
8502 | else | |
8503 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
8504 | fi | |
8505 | fi | |
8506 | ||
8507 | cd $ac_popdir | |
8508 | done | |
8509 | fi | |
8510 | ||
8511 | ||
8512 | exit 0 |