]>
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" | |
31 | ac_help="$ac_help | |
32 | --with-mmalloc Use memory mapped malloc package" | |
88987551 L |
33 | ac_help="$ac_help |
34 | --with-included-regex Use included regex" | |
7a292a7a SS |
35 | ac_help="$ac_help |
36 | --with-cpu=CPU Set the default CPU variant to debug" | |
37 | ac_help="$ac_help | |
38 | --enable-gdbtk Enable GDBTK GUI front end" | |
39 | ac_help="$ac_help | |
40 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
41 | ac_help="$ac_help | |
42 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
43 | ac_help="$ac_help | |
44 | --with-tclinclude=DIR Directory where tcl private headers are" | |
45 | ac_help="$ac_help | |
46 | --with-tkinclude=DIR Directory where tk private headers are" | |
47 | ac_help="$ac_help | |
48 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
51 | ac_help="$ac_help | |
52 | --with-tixconfig Directory containing tix configuration (tixConfig.sh)" | |
c906108c SS |
53 | ac_help="$ac_help |
54 | --with-x use the X Window System" | |
7a292a7a SS |
55 | ac_help="$ac_help |
56 | --enable-sim Link gdb with simulator" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --enable-shared Use shared libraries" | |
59 | ||
60 | # Initialize some variables set by options. | |
61 | # The variables have the same names as the options, with | |
62 | # dashes changed to underlines. | |
63 | build=NONE | |
64 | cache_file=./config.cache | |
65 | exec_prefix=NONE | |
66 | host=NONE | |
67 | no_create= | |
68 | nonopt=NONE | |
69 | no_recursion= | |
70 | prefix=NONE | |
71 | program_prefix=NONE | |
72 | program_suffix=NONE | |
73 | program_transform_name=s,x,x, | |
74 | silent= | |
75 | site= | |
76 | srcdir= | |
77 | target=NONE | |
78 | verbose= | |
79 | x_includes=NONE | |
80 | x_libraries=NONE | |
81 | bindir='${exec_prefix}/bin' | |
82 | sbindir='${exec_prefix}/sbin' | |
83 | libexecdir='${exec_prefix}/libexec' | |
84 | datadir='${prefix}/share' | |
85 | sysconfdir='${prefix}/etc' | |
86 | sharedstatedir='${prefix}/com' | |
87 | localstatedir='${prefix}/var' | |
88 | libdir='${exec_prefix}/lib' | |
89 | includedir='${prefix}/include' | |
90 | oldincludedir='/usr/include' | |
91 | infodir='${prefix}/info' | |
92 | mandir='${prefix}/man' | |
93 | ||
94 | # Initialize some other variables. | |
95 | subdirs= | |
96 | MFLAGS= MAKEFLAGS= | |
97 | SHELL=${CONFIG_SHELL-/bin/sh} | |
98 | # Maximum number of lines to put in a shell here document. | |
99 | ac_max_here_lines=12 | |
100 | ||
101 | ac_prev= | |
102 | for ac_option | |
103 | do | |
104 | ||
105 | # If the previous option needs an argument, assign it. | |
106 | if test -n "$ac_prev"; then | |
107 | eval "$ac_prev=\$ac_option" | |
108 | ac_prev= | |
109 | continue | |
110 | fi | |
111 | ||
112 | case "$ac_option" in | |
113 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
114 | *) ac_optarg= ;; | |
115 | esac | |
116 | ||
117 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
118 | ||
119 | case "$ac_option" in | |
120 | ||
121 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
122 | ac_prev=bindir ;; | |
123 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
124 | bindir="$ac_optarg" ;; | |
125 | ||
126 | -build | --build | --buil | --bui | --bu) | |
127 | ac_prev=build ;; | |
128 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
129 | build="$ac_optarg" ;; | |
130 | ||
131 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
132 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
133 | ac_prev=cache_file ;; | |
134 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
135 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
136 | cache_file="$ac_optarg" ;; | |
137 | ||
138 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
139 | ac_prev=datadir ;; | |
140 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
141 | | --da=*) | |
142 | datadir="$ac_optarg" ;; | |
143 | ||
144 | -disable-* | --disable-*) | |
145 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
146 | # Reject names that are not valid shell variable names. | |
147 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
148 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
149 | fi | |
150 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
151 | eval "enable_${ac_feature}=no" ;; | |
152 | ||
153 | -enable-* | --enable-*) | |
154 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
155 | # Reject names that are not valid shell variable names. | |
156 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
157 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
158 | fi | |
159 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
160 | case "$ac_option" in | |
161 | *=*) ;; | |
162 | *) ac_optarg=yes ;; | |
163 | esac | |
164 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
165 | ||
166 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
167 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
168 | | --exec | --exe | --ex) | |
169 | ac_prev=exec_prefix ;; | |
170 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
171 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
172 | | --exec=* | --exe=* | --ex=*) | |
173 | exec_prefix="$ac_optarg" ;; | |
174 | ||
175 | -gas | --gas | --ga | --g) | |
176 | # Obsolete; use --with-gas. | |
177 | with_gas=yes ;; | |
178 | ||
179 | -help | --help | --hel | --he) | |
180 | # Omit some internal or obsolete options to make the list less imposing. | |
181 | # This message is too long to be a string in the A/UX 3.1 sh. | |
182 | cat << EOF | |
183 | Usage: configure [options] [host] | |
184 | Options: [defaults in brackets after descriptions] | |
185 | Configuration: | |
186 | --cache-file=FILE cache test results in FILE | |
187 | --help print this message | |
188 | --no-create do not create output files | |
189 | --quiet, --silent do not print \`checking...' messages | |
190 | --version print the version of autoconf that created configure | |
191 | Directory and file names: | |
192 | --prefix=PREFIX install architecture-independent files in PREFIX | |
193 | [$ac_default_prefix] | |
194 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
195 | [same as prefix] | |
196 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
197 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
198 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
199 | --datadir=DIR read-only architecture-independent data in DIR | |
200 | [PREFIX/share] | |
201 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
202 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
203 | [PREFIX/com] | |
204 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
205 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
206 | --includedir=DIR C header files in DIR [PREFIX/include] | |
207 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
208 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
209 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
210 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
211 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
212 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
213 | --program-transform-name=PROGRAM | |
214 | run sed PROGRAM on installed program names | |
215 | EOF | |
216 | cat << EOF | |
217 | Host type: | |
218 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
219 | --host=HOST configure for HOST [guessed] | |
220 | --target=TARGET configure for TARGET [TARGET=HOST] | |
221 | Features and packages: | |
222 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
223 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
224 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
225 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
226 | --x-includes=DIR X include files are in DIR | |
227 | --x-libraries=DIR X library files are in DIR | |
228 | EOF | |
229 | if test -n "$ac_help"; then | |
230 | echo "--enable and --with options recognized:$ac_help" | |
231 | fi | |
232 | exit 0 ;; | |
233 | ||
234 | -host | --host | --hos | --ho) | |
235 | ac_prev=host ;; | |
236 | -host=* | --host=* | --hos=* | --ho=*) | |
237 | host="$ac_optarg" ;; | |
238 | ||
239 | -includedir | --includedir | --includedi | --included | --include \ | |
240 | | --includ | --inclu | --incl | --inc) | |
241 | ac_prev=includedir ;; | |
242 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
243 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
244 | includedir="$ac_optarg" ;; | |
245 | ||
246 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
247 | ac_prev=infodir ;; | |
248 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
249 | infodir="$ac_optarg" ;; | |
250 | ||
251 | -libdir | --libdir | --libdi | --libd) | |
252 | ac_prev=libdir ;; | |
253 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
254 | libdir="$ac_optarg" ;; | |
255 | ||
256 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
257 | | --libexe | --libex | --libe) | |
258 | ac_prev=libexecdir ;; | |
259 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
260 | | --libexe=* | --libex=* | --libe=*) | |
261 | libexecdir="$ac_optarg" ;; | |
262 | ||
263 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
264 | | --localstate | --localstat | --localsta | --localst \ | |
265 | | --locals | --local | --loca | --loc | --lo) | |
266 | ac_prev=localstatedir ;; | |
267 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
268 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
269 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
270 | localstatedir="$ac_optarg" ;; | |
271 | ||
272 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
273 | ac_prev=mandir ;; | |
274 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
275 | mandir="$ac_optarg" ;; | |
276 | ||
277 | -nfp | --nfp | --nf) | |
278 | # Obsolete; use --without-fp. | |
279 | with_fp=no ;; | |
280 | ||
281 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
282 | | --no-cr | --no-c) | |
283 | no_create=yes ;; | |
284 | ||
285 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
286 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
287 | no_recursion=yes ;; | |
288 | ||
289 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
290 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
291 | | --oldin | --oldi | --old | --ol | --o) | |
292 | ac_prev=oldincludedir ;; | |
293 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
294 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
295 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
296 | oldincludedir="$ac_optarg" ;; | |
297 | ||
298 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
299 | ac_prev=prefix ;; | |
300 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
301 | prefix="$ac_optarg" ;; | |
302 | ||
303 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
304 | | --program-pre | --program-pr | --program-p) | |
305 | ac_prev=program_prefix ;; | |
306 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
307 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
308 | program_prefix="$ac_optarg" ;; | |
309 | ||
310 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
311 | | --program-suf | --program-su | --program-s) | |
312 | ac_prev=program_suffix ;; | |
313 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
314 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
315 | program_suffix="$ac_optarg" ;; | |
316 | ||
317 | -program-transform-name | --program-transform-name \ | |
318 | | --program-transform-nam | --program-transform-na \ | |
319 | | --program-transform-n | --program-transform- \ | |
320 | | --program-transform | --program-transfor \ | |
321 | | --program-transfo | --program-transf \ | |
322 | | --program-trans | --program-tran \ | |
323 | | --progr-tra | --program-tr | --program-t) | |
324 | ac_prev=program_transform_name ;; | |
325 | -program-transform-name=* | --program-transform-name=* \ | |
326 | | --program-transform-nam=* | --program-transform-na=* \ | |
327 | | --program-transform-n=* | --program-transform-=* \ | |
328 | | --program-transform=* | --program-transfor=* \ | |
329 | | --program-transfo=* | --program-transf=* \ | |
330 | | --program-trans=* | --program-tran=* \ | |
331 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
332 | program_transform_name="$ac_optarg" ;; | |
333 | ||
334 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
335 | | -silent | --silent | --silen | --sile | --sil) | |
336 | silent=yes ;; | |
337 | ||
338 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
339 | ac_prev=sbindir ;; | |
340 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
341 | | --sbi=* | --sb=*) | |
342 | sbindir="$ac_optarg" ;; | |
343 | ||
344 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
345 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
346 | | --sharedst | --shareds | --shared | --share | --shar \ | |
347 | | --sha | --sh) | |
348 | ac_prev=sharedstatedir ;; | |
349 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
350 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
351 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
352 | | --sha=* | --sh=*) | |
353 | sharedstatedir="$ac_optarg" ;; | |
354 | ||
355 | -site | --site | --sit) | |
356 | ac_prev=site ;; | |
357 | -site=* | --site=* | --sit=*) | |
358 | site="$ac_optarg" ;; | |
359 | ||
360 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
361 | ac_prev=srcdir ;; | |
362 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
363 | srcdir="$ac_optarg" ;; | |
364 | ||
365 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
366 | | --syscon | --sysco | --sysc | --sys | --sy) | |
367 | ac_prev=sysconfdir ;; | |
368 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
369 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
370 | sysconfdir="$ac_optarg" ;; | |
371 | ||
372 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
373 | ac_prev=target ;; | |
374 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
375 | target="$ac_optarg" ;; | |
376 | ||
377 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
378 | verbose=yes ;; | |
379 | ||
380 | -version | --version | --versio | --versi | --vers) | |
381 | echo "configure generated by autoconf version 2.13" | |
382 | exit 0 ;; | |
383 | ||
384 | -with-* | --with-*) | |
385 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
386 | # Reject names that are not valid shell variable names. | |
387 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
388 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
389 | fi | |
390 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
391 | case "$ac_option" in | |
392 | *=*) ;; | |
393 | *) ac_optarg=yes ;; | |
394 | esac | |
395 | eval "with_${ac_package}='$ac_optarg'" ;; | |
396 | ||
397 | -without-* | --without-*) | |
398 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
399 | # Reject names that are not valid shell variable names. | |
400 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
401 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
402 | fi | |
403 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
404 | eval "with_${ac_package}=no" ;; | |
405 | ||
406 | --x) | |
407 | # Obsolete; use --with-x. | |
408 | with_x=yes ;; | |
409 | ||
410 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
411 | | --x-incl | --x-inc | --x-in | --x-i) | |
412 | ac_prev=x_includes ;; | |
413 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
414 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
415 | x_includes="$ac_optarg" ;; | |
416 | ||
417 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
418 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
419 | ac_prev=x_libraries ;; | |
420 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
421 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
422 | x_libraries="$ac_optarg" ;; | |
423 | ||
424 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
425 | ;; | |
426 | ||
427 | *) | |
428 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
429 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
430 | fi | |
431 | if test "x$nonopt" != xNONE; then | |
432 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
433 | fi | |
434 | nonopt="$ac_option" | |
435 | ;; | |
436 | ||
437 | esac | |
438 | done | |
439 | ||
440 | if test -n "$ac_prev"; then | |
441 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
442 | fi | |
443 | ||
444 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
445 | ||
446 | # File descriptor usage: | |
447 | # 0 standard input | |
448 | # 1 file creation | |
449 | # 2 errors and warnings | |
450 | # 3 some systems may open it to /dev/tty | |
451 | # 4 used on the Kubota Titan | |
452 | # 6 checking for... messages and results | |
453 | # 5 compiler messages saved in config.log | |
454 | if test "$silent" = yes; then | |
455 | exec 6>/dev/null | |
456 | else | |
457 | exec 6>&1 | |
458 | fi | |
459 | exec 5>./config.log | |
460 | ||
461 | echo "\ | |
462 | This file contains any messages produced by compilers while | |
463 | running configure, to aid debugging if configure makes a mistake. | |
464 | " 1>&5 | |
465 | ||
466 | # Strip out --no-create and --no-recursion so they do not pile up. | |
467 | # Also quote any args containing shell metacharacters. | |
468 | ac_configure_args= | |
469 | for ac_arg | |
470 | do | |
471 | case "$ac_arg" in | |
472 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
473 | | --no-cr | --no-c) ;; | |
474 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
475 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
476 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
477 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
478 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
479 | esac | |
480 | done | |
481 | ||
482 | # NLS nuisances. | |
483 | # Only set these to C if already set. These must not be set unconditionally | |
484 | # because not all systems understand e.g. LANG=C (notably SCO). | |
485 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
486 | # Non-C LC_CTYPE values break the ctype check. | |
487 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
488 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
489 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
490 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
491 | ||
492 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
493 | rm -rf conftest* confdefs.h | |
494 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
495 | echo > confdefs.h | |
496 | ||
497 | # A filename unique to this package, relative to the directory that | |
498 | # configure is in, which we can look for to find out if srcdir is correct. | |
499 | ac_unique_file=main.c | |
500 | ||
501 | # Find the source files, if location was not specified. | |
502 | if test -z "$srcdir"; then | |
503 | ac_srcdir_defaulted=yes | |
504 | # Try the directory containing this script, then its parent. | |
505 | ac_prog=$0 | |
506 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
507 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
508 | srcdir=$ac_confdir | |
509 | if test ! -r $srcdir/$ac_unique_file; then | |
510 | srcdir=.. | |
511 | fi | |
512 | else | |
513 | ac_srcdir_defaulted=no | |
514 | fi | |
515 | if test ! -r $srcdir/$ac_unique_file; then | |
516 | if test "$ac_srcdir_defaulted" = yes; then | |
517 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
518 | else | |
519 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
520 | fi | |
521 | fi | |
522 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
523 | ||
524 | # Prefer explicitly selected file to automatically selected ones. | |
6ce2ac0b MK |
525 | if test -z "$CONFIG_SITE"; then |
526 | if test "x$prefix" != xNONE; then | |
527 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
528 | else | |
529 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
c906108c SS |
530 | fi |
531 | fi | |
532 | for ac_site_file in $CONFIG_SITE; do | |
533 | if test -r "$ac_site_file"; then | |
534 | echo "loading site script $ac_site_file" | |
535 | . "$ac_site_file" | |
536 | fi | |
537 | done | |
538 | ||
539 | if test -r "$cache_file"; then | |
540 | echo "loading cache $cache_file" | |
541 | . $cache_file | |
542 | else | |
543 | echo "creating cache $cache_file" | |
544 | > $cache_file | |
545 | fi | |
546 | ||
547 | ac_ext=c | |
548 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
549 | ac_cpp='$CPP $CPPFLAGS' | |
550 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
551 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
552 | cross_compiling=$ac_cv_prog_cc_cross | |
553 | ||
554 | ac_exeext= | |
555 | ac_objext=o | |
556 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
557 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
558 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
559 | ac_n= ac_c=' | |
560 | ' ac_t=' ' | |
561 | else | |
562 | ac_n=-n ac_c= ac_t= | |
563 | fi | |
564 | else | |
565 | ac_n= ac_c='\c' ac_t= | |
566 | fi | |
567 | ||
568 | ||
569 | ||
413ccac7 | 570 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
6ce2ac0b | 571 | echo "configure:572: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
572 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
573 | if test "${enable_maintainer_mode+set}" = set; then | |
574 | enableval="$enable_maintainer_mode" | |
575 | USE_MAINTAINER_MODE=$enableval | |
576 | else | |
577 | USE_MAINTAINER_MODE=no | |
578 | fi | |
579 | ||
580 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
581 | ||
582 | ||
583 | if test $USE_MAINTAINER_MODE = yes; then | |
584 | MAINTAINER_MODE_TRUE= | |
585 | MAINTAINER_MODE_FALSE='#' | |
586 | else | |
587 | MAINTAINER_MODE_TRUE='#' | |
588 | MAINTAINER_MODE_FALSE= | |
589 | fi | |
590 | MAINT=$MAINTAINER_MODE_TRUE | |
591 | ||
592 | ||
c906108c SS |
593 | |
594 | # Extract the first word of "gcc", so it can be a program name with args. | |
595 | set dummy gcc; ac_word=$2 | |
596 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 597 | echo "configure:598: checking for $ac_word" >&5 |
c906108c SS |
598 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
599 | echo $ac_n "(cached) $ac_c" 1>&6 | |
600 | else | |
601 | if test -n "$CC"; then | |
602 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
603 | else | |
604 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
605 | ac_dummy="$PATH" | |
606 | for ac_dir in $ac_dummy; do | |
607 | test -z "$ac_dir" && ac_dir=. | |
608 | if test -f $ac_dir/$ac_word; then | |
609 | ac_cv_prog_CC="gcc" | |
610 | break | |
611 | fi | |
612 | done | |
613 | IFS="$ac_save_ifs" | |
614 | fi | |
615 | fi | |
616 | CC="$ac_cv_prog_CC" | |
617 | if test -n "$CC"; then | |
618 | echo "$ac_t""$CC" 1>&6 | |
619 | else | |
620 | echo "$ac_t""no" 1>&6 | |
621 | fi | |
622 | ||
623 | if test -z "$CC"; then | |
624 | # Extract the first word of "cc", so it can be a program name with args. | |
625 | set dummy cc; ac_word=$2 | |
626 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 627 | echo "configure:628: checking for $ac_word" >&5 |
c906108c SS |
628 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
630 | else | |
631 | if test -n "$CC"; then | |
632 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
633 | else | |
634 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
635 | ac_prog_rejected=no | |
636 | ac_dummy="$PATH" | |
637 | for ac_dir in $ac_dummy; do | |
638 | test -z "$ac_dir" && ac_dir=. | |
639 | if test -f $ac_dir/$ac_word; then | |
640 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
641 | ac_prog_rejected=yes | |
642 | continue | |
643 | fi | |
644 | ac_cv_prog_CC="cc" | |
645 | break | |
646 | fi | |
647 | done | |
648 | IFS="$ac_save_ifs" | |
649 | if test $ac_prog_rejected = yes; then | |
650 | # We found a bogon in the path, so make sure we never use it. | |
651 | set dummy $ac_cv_prog_CC | |
652 | shift | |
653 | if test $# -gt 0; then | |
654 | # We chose a different compiler from the bogus one. | |
655 | # However, it has the same basename, so the bogon will be chosen | |
656 | # first if we set CC to just the basename; use the full file name. | |
657 | shift | |
658 | set dummy "$ac_dir/$ac_word" "$@" | |
659 | shift | |
660 | ac_cv_prog_CC="$@" | |
661 | fi | |
662 | fi | |
663 | fi | |
664 | fi | |
665 | CC="$ac_cv_prog_CC" | |
666 | if test -n "$CC"; then | |
667 | echo "$ac_t""$CC" 1>&6 | |
668 | else | |
669 | echo "$ac_t""no" 1>&6 | |
670 | fi | |
671 | ||
672 | if test -z "$CC"; then | |
673 | case "`uname -s`" in | |
674 | *win32* | *WIN32*) | |
675 | # Extract the first word of "cl", so it can be a program name with args. | |
676 | set dummy cl; ac_word=$2 | |
677 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 678 | echo "configure:679: checking for $ac_word" >&5 |
c906108c SS |
679 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
681 | else | |
682 | if test -n "$CC"; then | |
683 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
684 | else | |
685 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
686 | ac_dummy="$PATH" | |
687 | for ac_dir in $ac_dummy; do | |
688 | test -z "$ac_dir" && ac_dir=. | |
689 | if test -f $ac_dir/$ac_word; then | |
690 | ac_cv_prog_CC="cl" | |
691 | break | |
692 | fi | |
693 | done | |
694 | IFS="$ac_save_ifs" | |
695 | fi | |
696 | fi | |
697 | CC="$ac_cv_prog_CC" | |
698 | if test -n "$CC"; then | |
699 | echo "$ac_t""$CC" 1>&6 | |
700 | else | |
701 | echo "$ac_t""no" 1>&6 | |
702 | fi | |
703 | ;; | |
704 | esac | |
705 | fi | |
706 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
707 | fi | |
708 | ||
709 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
6ce2ac0b | 710 | echo "configure:711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
711 | |
712 | ac_ext=c | |
713 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
714 | ac_cpp='$CPP $CPPFLAGS' | |
715 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
716 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
717 | cross_compiling=$ac_cv_prog_cc_cross | |
718 | ||
719 | cat > conftest.$ac_ext << EOF | |
720 | ||
6ce2ac0b | 721 | #line 722 "configure" |
c906108c SS |
722 | #include "confdefs.h" |
723 | ||
724 | main(){return(0);} | |
725 | EOF | |
6ce2ac0b | 726 | if { (eval echo configure:727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
727 | ac_cv_prog_cc_works=yes |
728 | # If we can't run a trivial program, we are probably using a cross compiler. | |
729 | if (./conftest; exit) 2>/dev/null; then | |
730 | ac_cv_prog_cc_cross=no | |
731 | else | |
732 | ac_cv_prog_cc_cross=yes | |
733 | fi | |
734 | else | |
735 | echo "configure: failed program was:" >&5 | |
736 | cat conftest.$ac_ext >&5 | |
737 | ac_cv_prog_cc_works=no | |
738 | fi | |
739 | rm -fr conftest* | |
740 | ac_ext=c | |
741 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
742 | ac_cpp='$CPP $CPPFLAGS' | |
743 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
744 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
745 | cross_compiling=$ac_cv_prog_cc_cross | |
746 | ||
747 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
748 | if test $ac_cv_prog_cc_works = no; then | |
749 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
750 | fi | |
751 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
6ce2ac0b | 752 | echo "configure:753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
753 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
754 | cross_compiling=$ac_cv_prog_cc_cross | |
755 | ||
756 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
6ce2ac0b | 757 | echo "configure:758: checking whether we are using GNU C" >&5 |
c906108c SS |
758 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
760 | else | |
761 | cat > conftest.c <<EOF | |
762 | #ifdef __GNUC__ | |
763 | yes; | |
764 | #endif | |
765 | EOF | |
6ce2ac0b | 766 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
767 | ac_cv_prog_gcc=yes |
768 | else | |
769 | ac_cv_prog_gcc=no | |
770 | fi | |
771 | fi | |
772 | ||
773 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
774 | ||
775 | if test $ac_cv_prog_gcc = yes; then | |
776 | GCC=yes | |
777 | else | |
778 | GCC= | |
779 | fi | |
780 | ||
781 | ac_test_CFLAGS="${CFLAGS+set}" | |
782 | ac_save_CFLAGS="$CFLAGS" | |
783 | CFLAGS= | |
784 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
6ce2ac0b | 785 | echo "configure:786: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
786 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
787 | echo $ac_n "(cached) $ac_c" 1>&6 | |
788 | else | |
789 | echo 'void f(){}' > conftest.c | |
790 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
791 | ac_cv_prog_cc_g=yes | |
792 | else | |
793 | ac_cv_prog_cc_g=no | |
794 | fi | |
795 | rm -f conftest* | |
796 | ||
797 | fi | |
798 | ||
799 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
800 | if test "$ac_test_CFLAGS" = set; then | |
801 | CFLAGS="$ac_save_CFLAGS" | |
802 | elif test $ac_cv_prog_cc_g = yes; then | |
803 | if test "$GCC" = yes; then | |
804 | CFLAGS="-g -O2" | |
805 | else | |
806 | CFLAGS="-g" | |
807 | fi | |
808 | else | |
809 | if test "$GCC" = yes; then | |
810 | CFLAGS="-O2" | |
811 | else | |
812 | CFLAGS= | |
813 | fi | |
814 | fi | |
815 | ||
816 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
6ce2ac0b | 817 | echo "configure:818: checking how to run the C preprocessor" >&5 |
c906108c SS |
818 | # On Suns, sometimes $CPP names a directory. |
819 | if test -n "$CPP" && test -d "$CPP"; then | |
820 | CPP= | |
821 | fi | |
822 | if test -z "$CPP"; then | |
823 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
824 | echo $ac_n "(cached) $ac_c" 1>&6 | |
825 | else | |
826 | # This must be in double quotes, not single quotes, because CPP may get | |
827 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
828 | CPP="${CC-cc} -E" | |
829 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
830 | # not just through cpp. | |
831 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 832 | #line 833 "configure" |
c906108c SS |
833 | #include "confdefs.h" |
834 | #include <assert.h> | |
835 | Syntax Error | |
836 | EOF | |
837 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 838 | { (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
839 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
840 | if test -z "$ac_err"; then | |
841 | : | |
842 | else | |
843 | echo "$ac_err" >&5 | |
844 | echo "configure: failed program was:" >&5 | |
845 | cat conftest.$ac_ext >&5 | |
846 | rm -rf conftest* | |
847 | CPP="${CC-cc} -E -traditional-cpp" | |
848 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 849 | #line 850 "configure" |
c906108c SS |
850 | #include "confdefs.h" |
851 | #include <assert.h> | |
852 | Syntax Error | |
853 | EOF | |
854 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 855 | { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
856 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
857 | if test -z "$ac_err"; then | |
858 | : | |
859 | else | |
860 | echo "$ac_err" >&5 | |
861 | echo "configure: failed program was:" >&5 | |
862 | cat conftest.$ac_ext >&5 | |
863 | rm -rf conftest* | |
864 | CPP="${CC-cc} -nologo -E" | |
865 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 866 | #line 867 "configure" |
c906108c SS |
867 | #include "confdefs.h" |
868 | #include <assert.h> | |
869 | Syntax Error | |
870 | EOF | |
871 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 872 | { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
873 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
874 | if test -z "$ac_err"; then | |
875 | : | |
876 | else | |
877 | echo "$ac_err" >&5 | |
878 | echo "configure: failed program was:" >&5 | |
879 | cat conftest.$ac_ext >&5 | |
880 | rm -rf conftest* | |
881 | CPP=/lib/cpp | |
882 | fi | |
883 | rm -f conftest* | |
884 | fi | |
885 | rm -f conftest* | |
886 | fi | |
887 | rm -f conftest* | |
888 | ac_cv_prog_CPP="$CPP" | |
889 | fi | |
890 | CPP="$ac_cv_prog_CPP" | |
891 | else | |
892 | ac_cv_prog_CPP="$CPP" | |
893 | fi | |
894 | echo "$ac_t""$CPP" 1>&6 | |
895 | ||
896 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
6ce2ac0b | 897 | echo "configure:898: checking for AIX" >&5 |
c906108c | 898 | cat > conftest.$ac_ext <<EOF |
6ce2ac0b | 899 | #line 900 "configure" |
c906108c SS |
900 | #include "confdefs.h" |
901 | #ifdef _AIX | |
902 | yes | |
903 | #endif | |
904 | ||
905 | EOF | |
906 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
907 | egrep "yes" >/dev/null 2>&1; then | |
908 | rm -rf conftest* | |
909 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
910 | #define _ALL_SOURCE 1 | |
911 | EOF | |
912 | ||
913 | else | |
914 | rm -rf conftest* | |
915 | echo "$ac_t""no" 1>&6 | |
916 | fi | |
917 | rm -f conftest* | |
918 | ||
919 | ||
920 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
6ce2ac0b | 921 | echo "configure:922: checking for POSIXized ISC" >&5 |
c906108c SS |
922 | if test -d /etc/conf/kconfig.d && |
923 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
924 | then | |
925 | echo "$ac_t""yes" 1>&6 | |
926 | ISC=yes # If later tests want to check for ISC. | |
927 | cat >> confdefs.h <<\EOF | |
928 | #define _POSIX_SOURCE 1 | |
929 | EOF | |
930 | ||
931 | if test "$GCC" = yes; then | |
932 | CC="$CC -posix" | |
933 | else | |
934 | CC="$CC -Xp" | |
935 | fi | |
936 | else | |
937 | echo "$ac_t""no" 1>&6 | |
938 | ISC= | |
939 | fi | |
940 | ||
941 | ||
942 | ||
943 | ||
944 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
6ce2ac0b | 945 | echo "configure:946: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
946 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
947 | echo $ac_n "(cached) $ac_c" 1>&6 | |
948 | else | |
949 | am_cv_prog_cc_stdc=no | |
950 | ac_save_CC="$CC" | |
951 | # Don't try gcc -ansi; that turns off useful extensions and | |
952 | # breaks some systems' header files. | |
953 | # AIX -qlanglvl=ansi | |
954 | # Ultrix and OSF/1 -std1 | |
955 | # HP-UX -Aa -D_HPUX_SOURCE | |
956 | # SVR4 -Xc -D__EXTENSIONS__ | |
957 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
958 | do | |
959 | CC="$ac_save_CC $ac_arg" | |
960 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 961 | #line 962 "configure" |
c906108c SS |
962 | #include "confdefs.h" |
963 | #include <stdarg.h> | |
964 | #include <stdio.h> | |
965 | #include <sys/types.h> | |
966 | #include <sys/stat.h> | |
967 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
968 | struct buf { int x; }; | |
969 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
970 | static char *e (p, i) | |
971 | char **p; | |
972 | int i; | |
973 | { | |
974 | return p[i]; | |
975 | } | |
976 | static char *f (char * (*g) (char **, int), char **p, ...) | |
977 | { | |
978 | char *s; | |
979 | va_list v; | |
980 | va_start (v,p); | |
981 | s = g (p, va_arg (v,int)); | |
982 | va_end (v); | |
983 | return s; | |
984 | } | |
985 | int test (int i, double x); | |
986 | struct s1 {int (*f) (int a);}; | |
987 | struct s2 {int (*f) (double a);}; | |
988 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
989 | int argc; | |
990 | char **argv; | |
991 | ||
992 | int main() { | |
993 | ||
994 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
995 | ||
996 | ; return 0; } | |
997 | EOF | |
6ce2ac0b | 998 | if { (eval echo configure:999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
999 | rm -rf conftest* |
1000 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1001 | else | |
1002 | echo "configure: failed program was:" >&5 | |
1003 | cat conftest.$ac_ext >&5 | |
1004 | fi | |
1005 | rm -f conftest* | |
1006 | done | |
1007 | CC="$ac_save_CC" | |
1008 | ||
1009 | fi | |
1010 | ||
1011 | if test -z "$am_cv_prog_cc_stdc"; then | |
1012 | echo "$ac_t""none needed" 1>&6 | |
1013 | else | |
1014 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1015 | fi | |
1016 | case "x$am_cv_prog_cc_stdc" in | |
1017 | x|xno) ;; | |
1018 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1019 | esac | |
1020 | ||
1021 | ||
1022 | ac_aux_dir= | |
1023 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1024 | if test -f $ac_dir/install-sh; then | |
1025 | ac_aux_dir=$ac_dir | |
1026 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1027 | break | |
1028 | elif test -f $ac_dir/install.sh; then | |
1029 | ac_aux_dir=$ac_dir | |
1030 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1031 | break | |
1032 | fi | |
1033 | done | |
1034 | if test -z "$ac_aux_dir"; then | |
1035 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1036 | fi | |
1037 | ac_config_guess=$ac_aux_dir/config.guess | |
1038 | ac_config_sub=$ac_aux_dir/config.sub | |
1039 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1040 | ||
1041 | ||
1042 | # Do some error checking and defaulting for the host and target type. | |
1043 | # The inputs are: | |
1044 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1045 | # | |
1046 | # The rules are: | |
1047 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1048 | # same time. | |
1049 | # 2. Host defaults to nonopt. | |
1050 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1051 | # as determined by config.guess. | |
1052 | # 4. Target and build default to nonopt. | |
1053 | # 5. If nonopt is not specified, then target and build default to host. | |
1054 | ||
1055 | # The aliases save the names the user supplied, while $host etc. | |
1056 | # will get canonicalized. | |
1057 | case $host---$target---$nonopt in | |
1058 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1059 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1060 | esac | |
1061 | ||
1062 | ||
1063 | # Make sure we can run config.sub. | |
1064 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1065 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1066 | fi | |
1067 | ||
1068 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
6ce2ac0b | 1069 | echo "configure:1070: checking host system type" >&5 |
c906108c SS |
1070 | |
1071 | host_alias=$host | |
1072 | case "$host_alias" in | |
1073 | NONE) | |
1074 | case $nonopt in | |
1075 | NONE) | |
1076 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1077 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1078 | fi ;; | |
1079 | *) host_alias=$nonopt ;; | |
1080 | esac ;; | |
1081 | esac | |
1082 | ||
1083 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1084 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1085 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1086 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1087 | echo "$ac_t""$host" 1>&6 | |
1088 | ||
1089 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
6ce2ac0b | 1090 | echo "configure:1091: checking target system type" >&5 |
c906108c SS |
1091 | |
1092 | target_alias=$target | |
1093 | case "$target_alias" in | |
1094 | NONE) | |
1095 | case $nonopt in | |
1096 | NONE) target_alias=$host_alias ;; | |
1097 | *) target_alias=$nonopt ;; | |
1098 | esac ;; | |
1099 | esac | |
1100 | ||
1101 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1102 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1103 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1104 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1105 | echo "$ac_t""$target" 1>&6 | |
1106 | ||
1107 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
6ce2ac0b | 1108 | echo "configure:1109: checking build system type" >&5 |
c906108c SS |
1109 | |
1110 | build_alias=$build | |
1111 | case "$build_alias" in | |
1112 | NONE) | |
1113 | case $nonopt in | |
1114 | NONE) build_alias=$host_alias ;; | |
1115 | *) build_alias=$nonopt ;; | |
1116 | esac ;; | |
1117 | esac | |
1118 | ||
1119 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1120 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1121 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1122 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1123 | echo "$ac_t""$build" 1>&6 | |
1124 | ||
1125 | test "$host_alias" != "$target_alias" && | |
1126 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1127 | NONENONEs,x,x, && | |
1128 | program_prefix=${target_alias}- | |
1129 | ||
1130 | ||
1131 | ALL_LINGUAS= | |
1132 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
6ce2ac0b | 1133 | echo "configure:1134: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1134 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1135 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1136 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1137 | else | |
1138 | cat > conftestmake <<\EOF | |
1139 | all: | |
1140 | @echo 'ac_maketemp="${MAKE}"' | |
1141 | EOF | |
1142 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1143 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1144 | if test -n "$ac_maketemp"; then | |
1145 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1146 | else | |
1147 | eval ac_cv_prog_make_${ac_make}_set=no | |
1148 | fi | |
1149 | rm -f conftestmake | |
1150 | fi | |
1151 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1152 | echo "$ac_t""yes" 1>&6 | |
1153 | SET_MAKE= | |
1154 | else | |
1155 | echo "$ac_t""no" 1>&6 | |
1156 | SET_MAKE="MAKE=${MAKE-make}" | |
1157 | fi | |
1158 | ||
1159 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1160 | set dummy ranlib; ac_word=$2 | |
1161 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 1162 | echo "configure:1163: checking for $ac_word" >&5 |
c906108c SS |
1163 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1165 | else | |
1166 | if test -n "$RANLIB"; then | |
1167 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1168 | else | |
1169 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1170 | ac_dummy="$PATH" | |
1171 | for ac_dir in $ac_dummy; do | |
1172 | test -z "$ac_dir" && ac_dir=. | |
1173 | if test -f $ac_dir/$ac_word; then | |
1174 | ac_cv_prog_RANLIB="ranlib" | |
1175 | break | |
1176 | fi | |
1177 | done | |
1178 | IFS="$ac_save_ifs" | |
1179 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1180 | fi | |
1181 | fi | |
1182 | RANLIB="$ac_cv_prog_RANLIB" | |
1183 | if test -n "$RANLIB"; then | |
1184 | echo "$ac_t""$RANLIB" 1>&6 | |
1185 | else | |
1186 | echo "$ac_t""no" 1>&6 | |
1187 | fi | |
1188 | ||
1189 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
6ce2ac0b | 1190 | echo "configure:1191: checking for ANSI C header files" >&5 |
c906108c SS |
1191 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1193 | else | |
1194 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1195 | #line 1196 "configure" |
c906108c SS |
1196 | #include "confdefs.h" |
1197 | #include <stdlib.h> | |
1198 | #include <stdarg.h> | |
1199 | #include <string.h> | |
1200 | #include <float.h> | |
1201 | EOF | |
1202 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 1203 | { (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1204 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1205 | if test -z "$ac_err"; then | |
1206 | rm -rf conftest* | |
1207 | ac_cv_header_stdc=yes | |
1208 | else | |
1209 | echo "$ac_err" >&5 | |
1210 | echo "configure: failed program was:" >&5 | |
1211 | cat conftest.$ac_ext >&5 | |
1212 | rm -rf conftest* | |
1213 | ac_cv_header_stdc=no | |
1214 | fi | |
1215 | rm -f conftest* | |
1216 | ||
1217 | if test $ac_cv_header_stdc = yes; then | |
1218 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1219 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1220 | #line 1221 "configure" |
c906108c SS |
1221 | #include "confdefs.h" |
1222 | #include <string.h> | |
1223 | EOF | |
1224 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1225 | egrep "memchr" >/dev/null 2>&1; then | |
1226 | : | |
1227 | else | |
1228 | rm -rf conftest* | |
1229 | ac_cv_header_stdc=no | |
1230 | fi | |
1231 | rm -f conftest* | |
1232 | ||
1233 | fi | |
1234 | ||
1235 | if test $ac_cv_header_stdc = yes; then | |
1236 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1237 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1238 | #line 1239 "configure" |
c906108c SS |
1239 | #include "confdefs.h" |
1240 | #include <stdlib.h> | |
1241 | EOF | |
1242 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1243 | egrep "free" >/dev/null 2>&1; then | |
1244 | : | |
1245 | else | |
1246 | rm -rf conftest* | |
1247 | ac_cv_header_stdc=no | |
1248 | fi | |
1249 | rm -f conftest* | |
1250 | ||
1251 | fi | |
1252 | ||
1253 | if test $ac_cv_header_stdc = yes; then | |
1254 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1255 | if test "$cross_compiling" = yes; then | |
1256 | : | |
1257 | else | |
1258 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1259 | #line 1260 "configure" |
c906108c SS |
1260 | #include "confdefs.h" |
1261 | #include <ctype.h> | |
1262 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1263 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1264 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1265 | int main () { int i; for (i = 0; i < 256; i++) | |
1266 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1267 | exit (0); } | |
1268 | ||
1269 | EOF | |
6ce2ac0b | 1270 | if { (eval echo configure:1271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1271 | then |
1272 | : | |
1273 | else | |
1274 | echo "configure: failed program was:" >&5 | |
1275 | cat conftest.$ac_ext >&5 | |
1276 | rm -fr conftest* | |
1277 | ac_cv_header_stdc=no | |
1278 | fi | |
1279 | rm -fr conftest* | |
1280 | fi | |
1281 | ||
1282 | fi | |
1283 | fi | |
1284 | ||
1285 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1286 | if test $ac_cv_header_stdc = yes; then | |
1287 | cat >> confdefs.h <<\EOF | |
1288 | #define STDC_HEADERS 1 | |
1289 | EOF | |
1290 | ||
1291 | fi | |
1292 | ||
1293 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
6ce2ac0b | 1294 | echo "configure:1295: checking for working const" >&5 |
c906108c SS |
1295 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1296 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1297 | else | |
1298 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1299 | #line 1300 "configure" |
c906108c SS |
1300 | #include "confdefs.h" |
1301 | ||
1302 | int main() { | |
1303 | ||
1304 | /* Ultrix mips cc rejects this. */ | |
1305 | typedef int charset[2]; const charset x; | |
1306 | /* SunOS 4.1.1 cc rejects this. */ | |
1307 | char const *const *ccp; | |
1308 | char **p; | |
1309 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1310 | struct point {int x, y;}; | |
1311 | static struct point const zero = {0,0}; | |
1312 | /* AIX XL C 1.02.0.0 rejects this. | |
1313 | It does not let you subtract one const X* pointer from another in an arm | |
1314 | of an if-expression whose if-part is not a constant expression */ | |
1315 | const char *g = "string"; | |
1316 | ccp = &g + (g ? g-g : 0); | |
1317 | /* HPUX 7.0 cc rejects these. */ | |
1318 | ++ccp; | |
1319 | p = (char**) ccp; | |
1320 | ccp = (char const *const *) p; | |
1321 | { /* SCO 3.2v4 cc rejects this. */ | |
1322 | char *t; | |
1323 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1324 | ||
1325 | *t++ = 0; | |
1326 | } | |
1327 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1328 | int x[] = {25, 17}; | |
1329 | const int *foo = &x[0]; | |
1330 | ++foo; | |
1331 | } | |
1332 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1333 | typedef const int *iptr; | |
1334 | iptr p = 0; | |
1335 | ++p; | |
1336 | } | |
1337 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1338 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1339 | struct s { int j; const int *ap[3]; }; | |
1340 | struct s *b; b->j = 5; | |
1341 | } | |
1342 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1343 | const int foo = 10; | |
1344 | } | |
1345 | ||
1346 | ; return 0; } | |
1347 | EOF | |
6ce2ac0b | 1348 | if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1349 | rm -rf conftest* |
1350 | ac_cv_c_const=yes | |
1351 | else | |
1352 | echo "configure: failed program was:" >&5 | |
1353 | cat conftest.$ac_ext >&5 | |
1354 | rm -rf conftest* | |
1355 | ac_cv_c_const=no | |
1356 | fi | |
1357 | rm -f conftest* | |
1358 | fi | |
1359 | ||
1360 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1361 | if test $ac_cv_c_const = no; then | |
1362 | cat >> confdefs.h <<\EOF | |
1363 | #define const | |
1364 | EOF | |
1365 | ||
1366 | fi | |
1367 | ||
1368 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
6ce2ac0b | 1369 | echo "configure:1370: checking for inline" >&5 |
c906108c SS |
1370 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1371 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1372 | else | |
1373 | ac_cv_c_inline=no | |
1374 | for ac_kw in inline __inline__ __inline; do | |
1375 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1376 | #line 1377 "configure" |
c906108c SS |
1377 | #include "confdefs.h" |
1378 | ||
1379 | int main() { | |
1380 | } $ac_kw foo() { | |
1381 | ; return 0; } | |
1382 | EOF | |
6ce2ac0b | 1383 | if { (eval echo configure:1384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1384 | rm -rf conftest* |
1385 | ac_cv_c_inline=$ac_kw; break | |
1386 | else | |
1387 | echo "configure: failed program was:" >&5 | |
1388 | cat conftest.$ac_ext >&5 | |
1389 | fi | |
1390 | rm -f conftest* | |
1391 | done | |
1392 | ||
1393 | fi | |
1394 | ||
1395 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1396 | case "$ac_cv_c_inline" in | |
1397 | inline | yes) ;; | |
1398 | no) cat >> confdefs.h <<\EOF | |
1399 | #define inline | |
1400 | EOF | |
1401 | ;; | |
1402 | *) cat >> confdefs.h <<EOF | |
1403 | #define inline $ac_cv_c_inline | |
1404 | EOF | |
1405 | ;; | |
1406 | esac | |
1407 | ||
1408 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
6ce2ac0b | 1409 | echo "configure:1410: checking for off_t" >&5 |
c906108c SS |
1410 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1411 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1412 | else | |
1413 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1414 | #line 1415 "configure" |
c906108c SS |
1415 | #include "confdefs.h" |
1416 | #include <sys/types.h> | |
1417 | #if STDC_HEADERS | |
1418 | #include <stdlib.h> | |
1419 | #include <stddef.h> | |
1420 | #endif | |
1421 | EOF | |
1422 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1423 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1424 | rm -rf conftest* | |
1425 | ac_cv_type_off_t=yes | |
1426 | else | |
1427 | rm -rf conftest* | |
1428 | ac_cv_type_off_t=no | |
1429 | fi | |
1430 | rm -f conftest* | |
1431 | ||
1432 | fi | |
1433 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1434 | if test $ac_cv_type_off_t = no; then | |
1435 | cat >> confdefs.h <<\EOF | |
1436 | #define off_t long | |
1437 | EOF | |
1438 | ||
1439 | fi | |
1440 | ||
1441 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
6ce2ac0b | 1442 | echo "configure:1443: checking for size_t" >&5 |
c906108c SS |
1443 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1445 | else | |
1446 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1447 | #line 1448 "configure" |
c906108c SS |
1448 | #include "confdefs.h" |
1449 | #include <sys/types.h> | |
1450 | #if STDC_HEADERS | |
1451 | #include <stdlib.h> | |
1452 | #include <stddef.h> | |
1453 | #endif | |
1454 | EOF | |
1455 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1456 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1457 | rm -rf conftest* | |
1458 | ac_cv_type_size_t=yes | |
1459 | else | |
1460 | rm -rf conftest* | |
1461 | ac_cv_type_size_t=no | |
1462 | fi | |
1463 | rm -f conftest* | |
1464 | ||
1465 | fi | |
1466 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1467 | if test $ac_cv_type_size_t = no; then | |
1468 | cat >> confdefs.h <<\EOF | |
1469 | #define size_t unsigned | |
1470 | EOF | |
1471 | ||
1472 | fi | |
1473 | ||
1474 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1475 | # for constant arguments. Useless! | |
1476 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
6ce2ac0b | 1477 | echo "configure:1478: checking for working alloca.h" >&5 |
c906108c SS |
1478 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1480 | else | |
1481 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1482 | #line 1483 "configure" |
c906108c SS |
1483 | #include "confdefs.h" |
1484 | #include <alloca.h> | |
1485 | int main() { | |
1486 | char *p = alloca(2 * sizeof(int)); | |
1487 | ; return 0; } | |
1488 | EOF | |
6ce2ac0b | 1489 | if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1490 | rm -rf conftest* |
1491 | ac_cv_header_alloca_h=yes | |
1492 | else | |
1493 | echo "configure: failed program was:" >&5 | |
1494 | cat conftest.$ac_ext >&5 | |
1495 | rm -rf conftest* | |
1496 | ac_cv_header_alloca_h=no | |
1497 | fi | |
1498 | rm -f conftest* | |
1499 | fi | |
1500 | ||
1501 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1502 | if test $ac_cv_header_alloca_h = yes; then | |
1503 | cat >> confdefs.h <<\EOF | |
1504 | #define HAVE_ALLOCA_H 1 | |
1505 | EOF | |
1506 | ||
1507 | fi | |
1508 | ||
1509 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
6ce2ac0b | 1510 | echo "configure:1511: checking for alloca" >&5 |
c906108c SS |
1511 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1512 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1513 | else | |
1514 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1515 | #line 1516 "configure" |
c906108c SS |
1516 | #include "confdefs.h" |
1517 | ||
1518 | #ifdef __GNUC__ | |
1519 | # define alloca __builtin_alloca | |
1520 | #else | |
1521 | # ifdef _MSC_VER | |
1522 | # include <malloc.h> | |
1523 | # define alloca _alloca | |
1524 | # else | |
1525 | # if HAVE_ALLOCA_H | |
1526 | # include <alloca.h> | |
1527 | # else | |
1528 | # ifdef _AIX | |
1529 | #pragma alloca | |
1530 | # else | |
1531 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1532 | char *alloca (); | |
1533 | # endif | |
1534 | # endif | |
1535 | # endif | |
1536 | # endif | |
1537 | #endif | |
1538 | ||
1539 | int main() { | |
1540 | char *p = (char *) alloca(1); | |
1541 | ; return 0; } | |
1542 | EOF | |
6ce2ac0b | 1543 | if { (eval echo configure:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1544 | rm -rf conftest* |
1545 | ac_cv_func_alloca_works=yes | |
1546 | else | |
1547 | echo "configure: failed program was:" >&5 | |
1548 | cat conftest.$ac_ext >&5 | |
1549 | rm -rf conftest* | |
1550 | ac_cv_func_alloca_works=no | |
1551 | fi | |
1552 | rm -f conftest* | |
1553 | fi | |
1554 | ||
1555 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1556 | if test $ac_cv_func_alloca_works = yes; then | |
1557 | cat >> confdefs.h <<\EOF | |
1558 | #define HAVE_ALLOCA 1 | |
1559 | EOF | |
1560 | ||
1561 | fi | |
1562 | ||
1563 | if test $ac_cv_func_alloca_works = no; then | |
1564 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1565 | # that cause trouble. Some versions do not even contain alloca or | |
1566 | # contain a buggy version. If you still want to use their alloca, | |
1567 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1568 | ALLOCA=alloca.${ac_objext} | |
1569 | cat >> confdefs.h <<\EOF | |
1570 | #define C_ALLOCA 1 | |
1571 | EOF | |
1572 | ||
1573 | ||
1574 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
6ce2ac0b | 1575 | echo "configure:1576: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1576 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1577 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1578 | else | |
1579 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1580 | #line 1581 "configure" |
c906108c SS |
1581 | #include "confdefs.h" |
1582 | #if defined(CRAY) && ! defined(CRAY2) | |
1583 | webecray | |
1584 | #else | |
1585 | wenotbecray | |
1586 | #endif | |
1587 | ||
1588 | EOF | |
1589 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1590 | egrep "webecray" >/dev/null 2>&1; then | |
1591 | rm -rf conftest* | |
1592 | ac_cv_os_cray=yes | |
1593 | else | |
1594 | rm -rf conftest* | |
1595 | ac_cv_os_cray=no | |
1596 | fi | |
1597 | rm -f conftest* | |
1598 | ||
1599 | fi | |
1600 | ||
1601 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1602 | if test $ac_cv_os_cray = yes; then | |
1603 | for ac_func in _getb67 GETB67 getb67; do | |
1604 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 1605 | echo "configure:1606: checking for $ac_func" >&5 |
c906108c SS |
1606 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1607 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1608 | else | |
1609 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1610 | #line 1611 "configure" |
c906108c SS |
1611 | #include "confdefs.h" |
1612 | /* System header to define __stub macros and hopefully few prototypes, | |
1613 | which can conflict with char $ac_func(); below. */ | |
1614 | #include <assert.h> | |
1615 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1616 | /* We use char because int might match the return type of a gcc2 | |
1617 | builtin and then its argument prototype would still apply. */ | |
1618 | char $ac_func(); | |
1619 | ||
1620 | int main() { | |
1621 | ||
1622 | /* The GNU C library defines this for functions which it implements | |
1623 | to always fail with ENOSYS. Some functions are actually named | |
1624 | something starting with __ and the normal name is an alias. */ | |
1625 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1626 | choke me | |
1627 | #else | |
1628 | $ac_func(); | |
1629 | #endif | |
1630 | ||
1631 | ; return 0; } | |
1632 | EOF | |
6ce2ac0b | 1633 | if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1634 | rm -rf conftest* |
1635 | eval "ac_cv_func_$ac_func=yes" | |
1636 | else | |
1637 | echo "configure: failed program was:" >&5 | |
1638 | cat conftest.$ac_ext >&5 | |
1639 | rm -rf conftest* | |
1640 | eval "ac_cv_func_$ac_func=no" | |
1641 | fi | |
1642 | rm -f conftest* | |
1643 | fi | |
1644 | ||
1645 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1646 | echo "$ac_t""yes" 1>&6 | |
1647 | cat >> confdefs.h <<EOF | |
1648 | #define CRAY_STACKSEG_END $ac_func | |
1649 | EOF | |
1650 | ||
1651 | break | |
1652 | else | |
1653 | echo "$ac_t""no" 1>&6 | |
1654 | fi | |
1655 | ||
1656 | done | |
1657 | fi | |
1658 | ||
1659 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
6ce2ac0b | 1660 | echo "configure:1661: checking stack direction for C alloca" >&5 |
c906108c SS |
1661 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1662 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1663 | else | |
1664 | if test "$cross_compiling" = yes; then | |
1665 | ac_cv_c_stack_direction=0 | |
1666 | else | |
1667 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1668 | #line 1669 "configure" |
c906108c SS |
1669 | #include "confdefs.h" |
1670 | find_stack_direction () | |
1671 | { | |
1672 | static char *addr = 0; | |
1673 | auto char dummy; | |
1674 | if (addr == 0) | |
1675 | { | |
1676 | addr = &dummy; | |
1677 | return find_stack_direction (); | |
1678 | } | |
1679 | else | |
1680 | return (&dummy > addr) ? 1 : -1; | |
1681 | } | |
1682 | main () | |
1683 | { | |
1684 | exit (find_stack_direction() < 0); | |
1685 | } | |
1686 | EOF | |
6ce2ac0b | 1687 | if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1688 | then |
1689 | ac_cv_c_stack_direction=1 | |
1690 | else | |
1691 | echo "configure: failed program was:" >&5 | |
1692 | cat conftest.$ac_ext >&5 | |
1693 | rm -fr conftest* | |
1694 | ac_cv_c_stack_direction=-1 | |
1695 | fi | |
1696 | rm -fr conftest* | |
1697 | fi | |
1698 | ||
1699 | fi | |
1700 | ||
1701 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1702 | cat >> confdefs.h <<EOF | |
1703 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1704 | EOF | |
1705 | ||
1706 | fi | |
1707 | ||
1708 | for ac_hdr in unistd.h | |
1709 | do | |
1710 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1711 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
6ce2ac0b | 1712 | echo "configure:1713: checking for $ac_hdr" >&5 |
c906108c SS |
1713 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1714 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1715 | else | |
1716 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1717 | #line 1718 "configure" |
c906108c SS |
1718 | #include "confdefs.h" |
1719 | #include <$ac_hdr> | |
1720 | EOF | |
1721 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 1722 | { (eval echo configure:1723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1723 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1724 | if test -z "$ac_err"; then | |
1725 | rm -rf conftest* | |
1726 | eval "ac_cv_header_$ac_safe=yes" | |
1727 | else | |
1728 | echo "$ac_err" >&5 | |
1729 | echo "configure: failed program was:" >&5 | |
1730 | cat conftest.$ac_ext >&5 | |
1731 | rm -rf conftest* | |
1732 | eval "ac_cv_header_$ac_safe=no" | |
1733 | fi | |
1734 | rm -f conftest* | |
1735 | fi | |
1736 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1737 | echo "$ac_t""yes" 1>&6 | |
1738 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1739 | cat >> confdefs.h <<EOF | |
1740 | #define $ac_tr_hdr 1 | |
1741 | EOF | |
1742 | ||
1743 | else | |
1744 | echo "$ac_t""no" 1>&6 | |
1745 | fi | |
1746 | done | |
1747 | ||
1748 | for ac_func in getpagesize | |
1749 | do | |
1750 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 1751 | echo "configure:1752: checking for $ac_func" >&5 |
c906108c SS |
1752 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1753 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1754 | else | |
1755 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1756 | #line 1757 "configure" |
c906108c SS |
1757 | #include "confdefs.h" |
1758 | /* System header to define __stub macros and hopefully few prototypes, | |
1759 | which can conflict with char $ac_func(); below. */ | |
1760 | #include <assert.h> | |
1761 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1762 | /* We use char because int might match the return type of a gcc2 | |
1763 | builtin and then its argument prototype would still apply. */ | |
1764 | char $ac_func(); | |
1765 | ||
1766 | int main() { | |
1767 | ||
1768 | /* The GNU C library defines this for functions which it implements | |
1769 | to always fail with ENOSYS. Some functions are actually named | |
1770 | something starting with __ and the normal name is an alias. */ | |
1771 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1772 | choke me | |
1773 | #else | |
1774 | $ac_func(); | |
1775 | #endif | |
1776 | ||
1777 | ; return 0; } | |
1778 | EOF | |
6ce2ac0b | 1779 | if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1780 | rm -rf conftest* |
1781 | eval "ac_cv_func_$ac_func=yes" | |
1782 | else | |
1783 | echo "configure: failed program was:" >&5 | |
1784 | cat conftest.$ac_ext >&5 | |
1785 | rm -rf conftest* | |
1786 | eval "ac_cv_func_$ac_func=no" | |
1787 | fi | |
1788 | rm -f conftest* | |
1789 | fi | |
1790 | ||
1791 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1792 | echo "$ac_t""yes" 1>&6 | |
1793 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1794 | cat >> confdefs.h <<EOF | |
1795 | #define $ac_tr_func 1 | |
1796 | EOF | |
1797 | ||
1798 | else | |
1799 | echo "$ac_t""no" 1>&6 | |
1800 | fi | |
1801 | done | |
1802 | ||
1803 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
6ce2ac0b | 1804 | echo "configure:1805: checking for working mmap" >&5 |
c906108c SS |
1805 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1807 | else | |
1808 | if test "$cross_compiling" = yes; then | |
1809 | ac_cv_func_mmap_fixed_mapped=no | |
1810 | else | |
1811 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1812 | #line 1813 "configure" |
c906108c SS |
1813 | #include "confdefs.h" |
1814 | ||
1815 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1816 | Here is a matrix of mmap possibilities: | |
1817 | mmap private not fixed | |
1818 | mmap private fixed at somewhere currently unmapped | |
1819 | mmap private fixed at somewhere already mapped | |
1820 | mmap shared not fixed | |
1821 | mmap shared fixed at somewhere currently unmapped | |
1822 | mmap shared fixed at somewhere already mapped | |
1823 | For private mappings, we should verify that changes cannot be read() | |
1824 | back from the file, nor mmap's back from the file at a different | |
1825 | address. (There have been systems where private was not correctly | |
1826 | implemented like the infamous i386 svr4.0, and systems where the | |
1827 | VM page cache was not coherent with the filesystem buffer cache | |
1828 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1829 | For shared mappings, we should conversely verify that changes get | |
1830 | propogated back to all the places they're supposed to be. | |
1831 | ||
1832 | Grep wants private fixed already mapped. | |
1833 | The main things grep needs to know about mmap are: | |
1834 | * does it exist and is it safe to write into the mmap'd area | |
1835 | * how to use it (BSD variants) */ | |
1836 | #include <sys/types.h> | |
1837 | #include <fcntl.h> | |
1838 | #include <sys/mman.h> | |
1839 | ||
1840 | /* This mess was copied from the GNU getpagesize.h. */ | |
1841 | #ifndef HAVE_GETPAGESIZE | |
1842 | # ifdef HAVE_UNISTD_H | |
1843 | # include <unistd.h> | |
1844 | # endif | |
1845 | ||
1846 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1847 | # ifndef HAVE_SYS_PARAM_H | |
1848 | # define HAVE_SYS_PARAM_H 1 | |
1849 | # endif | |
1850 | ||
1851 | # ifdef _SC_PAGESIZE | |
1852 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1853 | # else /* no _SC_PAGESIZE */ | |
1854 | # ifdef HAVE_SYS_PARAM_H | |
1855 | # include <sys/param.h> | |
1856 | # ifdef EXEC_PAGESIZE | |
1857 | # define getpagesize() EXEC_PAGESIZE | |
1858 | # else /* no EXEC_PAGESIZE */ | |
1859 | # ifdef NBPG | |
1860 | # define getpagesize() NBPG * CLSIZE | |
1861 | # ifndef CLSIZE | |
1862 | # define CLSIZE 1 | |
1863 | # endif /* no CLSIZE */ | |
1864 | # else /* no NBPG */ | |
1865 | # ifdef NBPC | |
1866 | # define getpagesize() NBPC | |
1867 | # else /* no NBPC */ | |
1868 | # ifdef PAGESIZE | |
1869 | # define getpagesize() PAGESIZE | |
1870 | # endif /* PAGESIZE */ | |
1871 | # endif /* no NBPC */ | |
1872 | # endif /* no NBPG */ | |
1873 | # endif /* no EXEC_PAGESIZE */ | |
1874 | # else /* no HAVE_SYS_PARAM_H */ | |
1875 | # define getpagesize() 8192 /* punt totally */ | |
1876 | # endif /* no HAVE_SYS_PARAM_H */ | |
1877 | # endif /* no _SC_PAGESIZE */ | |
1878 | ||
1879 | #endif /* no HAVE_GETPAGESIZE */ | |
1880 | ||
1881 | #ifdef __cplusplus | |
1882 | extern "C" { void *malloc(unsigned); } | |
1883 | #else | |
1884 | char *malloc(); | |
1885 | #endif | |
1886 | ||
1887 | int | |
1888 | main() | |
1889 | { | |
1890 | char *data, *data2, *data3; | |
1891 | int i, pagesize; | |
1892 | int fd; | |
1893 | ||
1894 | pagesize = getpagesize(); | |
1895 | ||
1896 | /* | |
1897 | * First, make a file with some known garbage in it. | |
1898 | */ | |
1899 | data = malloc(pagesize); | |
1900 | if (!data) | |
1901 | exit(1); | |
1902 | for (i = 0; i < pagesize; ++i) | |
1903 | *(data + i) = rand(); | |
1904 | umask(0); | |
1905 | fd = creat("conftestmmap", 0600); | |
1906 | if (fd < 0) | |
1907 | exit(1); | |
1908 | if (write(fd, data, pagesize) != pagesize) | |
1909 | exit(1); | |
1910 | close(fd); | |
1911 | ||
1912 | /* | |
1913 | * Next, try to mmap the file at a fixed address which | |
1914 | * already has something else allocated at it. If we can, | |
1915 | * also make sure that we see the same garbage. | |
1916 | */ | |
1917 | fd = open("conftestmmap", O_RDWR); | |
1918 | if (fd < 0) | |
1919 | exit(1); | |
1920 | data2 = malloc(2 * pagesize); | |
1921 | if (!data2) | |
1922 | exit(1); | |
1923 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1924 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1925 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1926 | exit(1); | |
1927 | for (i = 0; i < pagesize; ++i) | |
1928 | if (*(data + i) != *(data2 + i)) | |
1929 | exit(1); | |
1930 | ||
1931 | /* | |
1932 | * Finally, make sure that changes to the mapped area | |
1933 | * do not percolate back to the file as seen by read(). | |
1934 | * (This is a bug on some variants of i386 svr4.0.) | |
1935 | */ | |
1936 | for (i = 0; i < pagesize; ++i) | |
1937 | *(data2 + i) = *(data2 + i) + 1; | |
1938 | data3 = malloc(pagesize); | |
1939 | if (!data3) | |
1940 | exit(1); | |
1941 | if (read(fd, data3, pagesize) != pagesize) | |
1942 | exit(1); | |
1943 | for (i = 0; i < pagesize; ++i) | |
1944 | if (*(data + i) != *(data3 + i)) | |
1945 | exit(1); | |
1946 | close(fd); | |
1947 | unlink("conftestmmap"); | |
1948 | exit(0); | |
1949 | } | |
1950 | ||
1951 | EOF | |
6ce2ac0b | 1952 | if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1953 | then |
1954 | ac_cv_func_mmap_fixed_mapped=yes | |
1955 | else | |
1956 | echo "configure: failed program was:" >&5 | |
1957 | cat conftest.$ac_ext >&5 | |
1958 | rm -fr conftest* | |
1959 | ac_cv_func_mmap_fixed_mapped=no | |
1960 | fi | |
1961 | rm -fr conftest* | |
1962 | fi | |
1963 | ||
1964 | fi | |
1965 | ||
1966 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1967 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1968 | cat >> confdefs.h <<\EOF | |
1969 | #define HAVE_MMAP 1 | |
1970 | EOF | |
1971 | ||
1972 | fi | |
1973 | ||
1974 | ||
1975 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1976 | unistd.h values.h sys/param.h | |
1977 | do | |
1978 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1979 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
6ce2ac0b | 1980 | echo "configure:1981: checking for $ac_hdr" >&5 |
c906108c SS |
1981 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1982 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1983 | else | |
1984 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 1985 | #line 1986 "configure" |
c906108c SS |
1986 | #include "confdefs.h" |
1987 | #include <$ac_hdr> | |
1988 | EOF | |
1989 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 1990 | { (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1991 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1992 | if test -z "$ac_err"; then | |
1993 | rm -rf conftest* | |
1994 | eval "ac_cv_header_$ac_safe=yes" | |
1995 | else | |
1996 | echo "$ac_err" >&5 | |
1997 | echo "configure: failed program was:" >&5 | |
1998 | cat conftest.$ac_ext >&5 | |
1999 | rm -rf conftest* | |
2000 | eval "ac_cv_header_$ac_safe=no" | |
2001 | fi | |
2002 | rm -f conftest* | |
2003 | fi | |
2004 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2005 | echo "$ac_t""yes" 1>&6 | |
2006 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2007 | cat >> confdefs.h <<EOF | |
2008 | #define $ac_tr_hdr 1 | |
2009 | EOF | |
2010 | ||
2011 | else | |
2012 | echo "$ac_t""no" 1>&6 | |
2013 | fi | |
2014 | done | |
2015 | ||
2016 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2017 | __argz_count __argz_stringify __argz_next | |
2018 | do | |
2019 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 2020 | echo "configure:2021: checking for $ac_func" >&5 |
c906108c SS |
2021 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2022 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2023 | else | |
2024 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2025 | #line 2026 "configure" |
c906108c SS |
2026 | #include "confdefs.h" |
2027 | /* System header to define __stub macros and hopefully few prototypes, | |
2028 | which can conflict with char $ac_func(); below. */ | |
2029 | #include <assert.h> | |
2030 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2031 | /* We use char because int might match the return type of a gcc2 | |
2032 | builtin and then its argument prototype would still apply. */ | |
2033 | char $ac_func(); | |
2034 | ||
2035 | int main() { | |
2036 | ||
2037 | /* The GNU C library defines this for functions which it implements | |
2038 | to always fail with ENOSYS. Some functions are actually named | |
2039 | something starting with __ and the normal name is an alias. */ | |
2040 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2041 | choke me | |
2042 | #else | |
2043 | $ac_func(); | |
2044 | #endif | |
2045 | ||
2046 | ; return 0; } | |
2047 | EOF | |
6ce2ac0b | 2048 | if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2049 | rm -rf conftest* |
2050 | eval "ac_cv_func_$ac_func=yes" | |
2051 | else | |
2052 | echo "configure: failed program was:" >&5 | |
2053 | cat conftest.$ac_ext >&5 | |
2054 | rm -rf conftest* | |
2055 | eval "ac_cv_func_$ac_func=no" | |
2056 | fi | |
2057 | rm -f conftest* | |
2058 | fi | |
2059 | ||
2060 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2061 | echo "$ac_t""yes" 1>&6 | |
2062 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2063 | cat >> confdefs.h <<EOF | |
2064 | #define $ac_tr_func 1 | |
2065 | EOF | |
2066 | ||
2067 | else | |
2068 | echo "$ac_t""no" 1>&6 | |
2069 | fi | |
2070 | done | |
2071 | ||
2072 | ||
2073 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2074 | for ac_func in stpcpy | |
2075 | do | |
2076 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 2077 | echo "configure:2078: checking for $ac_func" >&5 |
c906108c SS |
2078 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2079 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2080 | else | |
2081 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2082 | #line 2083 "configure" |
c906108c SS |
2083 | #include "confdefs.h" |
2084 | /* System header to define __stub macros and hopefully few prototypes, | |
2085 | which can conflict with char $ac_func(); below. */ | |
2086 | #include <assert.h> | |
2087 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2088 | /* We use char because int might match the return type of a gcc2 | |
2089 | builtin and then its argument prototype would still apply. */ | |
2090 | char $ac_func(); | |
2091 | ||
2092 | int main() { | |
2093 | ||
2094 | /* The GNU C library defines this for functions which it implements | |
2095 | to always fail with ENOSYS. Some functions are actually named | |
2096 | something starting with __ and the normal name is an alias. */ | |
2097 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2098 | choke me | |
2099 | #else | |
2100 | $ac_func(); | |
2101 | #endif | |
2102 | ||
2103 | ; return 0; } | |
2104 | EOF | |
6ce2ac0b | 2105 | if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2106 | rm -rf conftest* |
2107 | eval "ac_cv_func_$ac_func=yes" | |
2108 | else | |
2109 | echo "configure: failed program was:" >&5 | |
2110 | cat conftest.$ac_ext >&5 | |
2111 | rm -rf conftest* | |
2112 | eval "ac_cv_func_$ac_func=no" | |
2113 | fi | |
2114 | rm -f conftest* | |
2115 | fi | |
2116 | ||
2117 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2118 | echo "$ac_t""yes" 1>&6 | |
2119 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2120 | cat >> confdefs.h <<EOF | |
2121 | #define $ac_tr_func 1 | |
2122 | EOF | |
2123 | ||
2124 | else | |
2125 | echo "$ac_t""no" 1>&6 | |
2126 | fi | |
2127 | done | |
2128 | ||
2129 | fi | |
2130 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2131 | cat >> confdefs.h <<\EOF | |
2132 | #define HAVE_STPCPY 1 | |
2133 | EOF | |
2134 | ||
2135 | fi | |
2136 | ||
2137 | if test $ac_cv_header_locale_h = yes; then | |
2138 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
6ce2ac0b | 2139 | echo "configure:2140: checking for LC_MESSAGES" >&5 |
c906108c SS |
2140 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2141 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2142 | else | |
2143 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2144 | #line 2145 "configure" |
c906108c SS |
2145 | #include "confdefs.h" |
2146 | #include <locale.h> | |
2147 | int main() { | |
2148 | return LC_MESSAGES | |
2149 | ; return 0; } | |
2150 | EOF | |
6ce2ac0b | 2151 | if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2152 | rm -rf conftest* |
2153 | am_cv_val_LC_MESSAGES=yes | |
2154 | else | |
2155 | echo "configure: failed program was:" >&5 | |
2156 | cat conftest.$ac_ext >&5 | |
2157 | rm -rf conftest* | |
2158 | am_cv_val_LC_MESSAGES=no | |
2159 | fi | |
2160 | rm -f conftest* | |
2161 | fi | |
2162 | ||
2163 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2164 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2165 | cat >> confdefs.h <<\EOF | |
2166 | #define HAVE_LC_MESSAGES 1 | |
2167 | EOF | |
2168 | ||
2169 | fi | |
2170 | fi | |
2171 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
6ce2ac0b | 2172 | echo "configure:2173: checking whether NLS is requested" >&5 |
c906108c SS |
2173 | # Check whether --enable-nls or --disable-nls was given. |
2174 | if test "${enable_nls+set}" = set; then | |
2175 | enableval="$enable_nls" | |
2176 | USE_NLS=$enableval | |
2177 | else | |
2178 | USE_NLS=yes | |
2179 | fi | |
2180 | ||
2181 | echo "$ac_t""$USE_NLS" 1>&6 | |
2182 | ||
2183 | ||
2184 | USE_INCLUDED_LIBINTL=no | |
2185 | ||
2186 | if test "$USE_NLS" = "yes"; then | |
2187 | cat >> confdefs.h <<\EOF | |
2188 | #define ENABLE_NLS 1 | |
2189 | EOF | |
2190 | ||
2191 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
6ce2ac0b | 2192 | echo "configure:2193: checking whether included gettext is requested" >&5 |
c906108c SS |
2193 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2194 | if test "${with_included_gettext+set}" = set; then | |
2195 | withval="$with_included_gettext" | |
2196 | nls_cv_force_use_gnu_gettext=$withval | |
2197 | else | |
2198 | nls_cv_force_use_gnu_gettext=no | |
2199 | fi | |
2200 | ||
2201 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2202 | ||
2203 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2204 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2205 | nls_cv_header_intl= | |
2206 | nls_cv_header_libgt= | |
2207 | CATOBJEXT=NONE | |
2208 | ||
2209 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2210 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
6ce2ac0b | 2211 | echo "configure:2212: checking for libintl.h" >&5 |
c906108c SS |
2212 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2214 | else | |
2215 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2216 | #line 2217 "configure" |
c906108c SS |
2217 | #include "confdefs.h" |
2218 | #include <libintl.h> | |
2219 | EOF | |
2220 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 2221 | { (eval echo configure:2222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2222 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2223 | if test -z "$ac_err"; then | |
2224 | rm -rf conftest* | |
2225 | eval "ac_cv_header_$ac_safe=yes" | |
2226 | else | |
2227 | echo "$ac_err" >&5 | |
2228 | echo "configure: failed program was:" >&5 | |
2229 | cat conftest.$ac_ext >&5 | |
2230 | rm -rf conftest* | |
2231 | eval "ac_cv_header_$ac_safe=no" | |
2232 | fi | |
2233 | rm -f conftest* | |
2234 | fi | |
2235 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2236 | echo "$ac_t""yes" 1>&6 | |
2237 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
6ce2ac0b | 2238 | echo "configure:2239: checking for gettext in libc" >&5 |
c906108c SS |
2239 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2240 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2241 | else | |
2242 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2243 | #line 2244 "configure" |
c906108c SS |
2244 | #include "confdefs.h" |
2245 | #include <libintl.h> | |
2246 | int main() { | |
2247 | return (int) gettext ("") | |
2248 | ; return 0; } | |
2249 | EOF | |
6ce2ac0b | 2250 | if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2251 | rm -rf conftest* |
2252 | gt_cv_func_gettext_libc=yes | |
2253 | else | |
2254 | echo "configure: failed program was:" >&5 | |
2255 | cat conftest.$ac_ext >&5 | |
2256 | rm -rf conftest* | |
2257 | gt_cv_func_gettext_libc=no | |
2258 | fi | |
2259 | rm -f conftest* | |
2260 | fi | |
2261 | ||
2262 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2263 | ||
2264 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2265 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
6ce2ac0b | 2266 | echo "configure:2267: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2267 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2268 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2270 | else | |
2271 | ac_save_LIBS="$LIBS" | |
2272 | LIBS="-lintl $LIBS" | |
2273 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2274 | #line 2275 "configure" |
c906108c SS |
2275 | #include "confdefs.h" |
2276 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2277 | /* We use char because int might match the return type of a gcc2 | |
2278 | builtin and then its argument prototype would still apply. */ | |
2279 | char bindtextdomain(); | |
2280 | ||
2281 | int main() { | |
2282 | bindtextdomain() | |
2283 | ; return 0; } | |
2284 | EOF | |
6ce2ac0b | 2285 | if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2286 | rm -rf conftest* |
2287 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2288 | else | |
2289 | echo "configure: failed program was:" >&5 | |
2290 | cat conftest.$ac_ext >&5 | |
2291 | rm -rf conftest* | |
2292 | eval "ac_cv_lib_$ac_lib_var=no" | |
2293 | fi | |
2294 | rm -f conftest* | |
2295 | LIBS="$ac_save_LIBS" | |
2296 | ||
2297 | fi | |
2298 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2299 | echo "$ac_t""yes" 1>&6 | |
2300 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
6ce2ac0b | 2301 | echo "configure:2302: checking for gettext in libintl" >&5 |
c906108c SS |
2302 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2304 | else | |
2305 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2306 | #line 2307 "configure" |
c906108c SS |
2307 | #include "confdefs.h" |
2308 | ||
2309 | int main() { | |
2310 | return (int) gettext ("") | |
2311 | ; return 0; } | |
2312 | EOF | |
6ce2ac0b | 2313 | if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2314 | rm -rf conftest* |
2315 | gt_cv_func_gettext_libintl=yes | |
2316 | else | |
2317 | echo "configure: failed program was:" >&5 | |
2318 | cat conftest.$ac_ext >&5 | |
2319 | rm -rf conftest* | |
2320 | gt_cv_func_gettext_libintl=no | |
2321 | fi | |
2322 | rm -f conftest* | |
2323 | fi | |
2324 | ||
2325 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2326 | else | |
2327 | echo "$ac_t""no" 1>&6 | |
2328 | fi | |
2329 | ||
2330 | fi | |
2331 | ||
2332 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2333 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2334 | cat >> confdefs.h <<\EOF | |
2335 | #define HAVE_GETTEXT 1 | |
2336 | EOF | |
2337 | ||
2338 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2339 | set dummy msgfmt; ac_word=$2 | |
2340 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2341 | echo "configure:2342: checking for $ac_word" >&5 |
c906108c SS |
2342 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2344 | else | |
2345 | case "$MSGFMT" in | |
2346 | /*) | |
2347 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2348 | ;; | |
2349 | *) | |
2350 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2351 | for ac_dir in $PATH; do | |
2352 | test -z "$ac_dir" && ac_dir=. | |
2353 | if test -f $ac_dir/$ac_word; then | |
2354 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2355 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2356 | break | |
2357 | fi | |
2358 | fi | |
2359 | done | |
2360 | IFS="$ac_save_ifs" | |
2361 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2362 | ;; | |
2363 | esac | |
2364 | fi | |
2365 | MSGFMT="$ac_cv_path_MSGFMT" | |
2366 | if test -n "$MSGFMT"; then | |
2367 | echo "$ac_t""$MSGFMT" 1>&6 | |
2368 | else | |
2369 | echo "$ac_t""no" 1>&6 | |
2370 | fi | |
2371 | if test "$MSGFMT" != "no"; then | |
2372 | for ac_func in dcgettext | |
2373 | do | |
2374 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 2375 | echo "configure:2376: checking for $ac_func" >&5 |
c906108c SS |
2376 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2377 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2378 | else | |
2379 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2380 | #line 2381 "configure" |
c906108c SS |
2381 | #include "confdefs.h" |
2382 | /* System header to define __stub macros and hopefully few prototypes, | |
2383 | which can conflict with char $ac_func(); below. */ | |
2384 | #include <assert.h> | |
2385 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2386 | /* We use char because int might match the return type of a gcc2 | |
2387 | builtin and then its argument prototype would still apply. */ | |
2388 | char $ac_func(); | |
2389 | ||
2390 | int main() { | |
2391 | ||
2392 | /* The GNU C library defines this for functions which it implements | |
2393 | to always fail with ENOSYS. Some functions are actually named | |
2394 | something starting with __ and the normal name is an alias. */ | |
2395 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2396 | choke me | |
2397 | #else | |
2398 | $ac_func(); | |
2399 | #endif | |
2400 | ||
2401 | ; return 0; } | |
2402 | EOF | |
6ce2ac0b | 2403 | if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2404 | rm -rf conftest* |
2405 | eval "ac_cv_func_$ac_func=yes" | |
2406 | else | |
2407 | echo "configure: failed program was:" >&5 | |
2408 | cat conftest.$ac_ext >&5 | |
2409 | rm -rf conftest* | |
2410 | eval "ac_cv_func_$ac_func=no" | |
2411 | fi | |
2412 | rm -f conftest* | |
2413 | fi | |
2414 | ||
2415 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2416 | echo "$ac_t""yes" 1>&6 | |
2417 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2418 | cat >> confdefs.h <<EOF | |
2419 | #define $ac_tr_func 1 | |
2420 | EOF | |
2421 | ||
2422 | else | |
2423 | echo "$ac_t""no" 1>&6 | |
2424 | fi | |
2425 | done | |
2426 | ||
2427 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2428 | set dummy gmsgfmt; ac_word=$2 | |
2429 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2430 | echo "configure:2431: checking for $ac_word" >&5 |
c906108c SS |
2431 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2432 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2433 | else | |
2434 | case "$GMSGFMT" in | |
2435 | /*) | |
2436 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2437 | ;; | |
2438 | ?:/*) | |
2439 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2440 | ;; | |
2441 | *) | |
2442 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2443 | ac_dummy="$PATH" | |
2444 | for ac_dir in $ac_dummy; do | |
2445 | test -z "$ac_dir" && ac_dir=. | |
2446 | if test -f $ac_dir/$ac_word; then | |
2447 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2448 | break | |
2449 | fi | |
2450 | done | |
2451 | IFS="$ac_save_ifs" | |
2452 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2453 | ;; | |
2454 | esac | |
2455 | fi | |
2456 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2457 | if test -n "$GMSGFMT"; then | |
2458 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2459 | else | |
2460 | echo "$ac_t""no" 1>&6 | |
2461 | fi | |
2462 | ||
2463 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2464 | set dummy xgettext; ac_word=$2 | |
2465 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2466 | echo "configure:2467: checking for $ac_word" >&5 |
c906108c SS |
2467 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2469 | else | |
2470 | case "$XGETTEXT" in | |
2471 | /*) | |
2472 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2473 | ;; | |
2474 | *) | |
2475 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2476 | for ac_dir in $PATH; do | |
2477 | test -z "$ac_dir" && ac_dir=. | |
2478 | if test -f $ac_dir/$ac_word; then | |
2479 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2480 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2481 | break | |
2482 | fi | |
2483 | fi | |
2484 | done | |
2485 | IFS="$ac_save_ifs" | |
2486 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2487 | ;; | |
2488 | esac | |
2489 | fi | |
2490 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2491 | if test -n "$XGETTEXT"; then | |
2492 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2493 | else | |
2494 | echo "$ac_t""no" 1>&6 | |
2495 | fi | |
2496 | ||
2497 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2498 | #line 2499 "configure" |
c906108c SS |
2499 | #include "confdefs.h" |
2500 | ||
2501 | int main() { | |
2502 | extern int _nl_msg_cat_cntr; | |
2503 | return _nl_msg_cat_cntr | |
2504 | ; return 0; } | |
2505 | EOF | |
6ce2ac0b | 2506 | if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2507 | rm -rf conftest* |
2508 | CATOBJEXT=.gmo | |
2509 | DATADIRNAME=share | |
2510 | else | |
2511 | echo "configure: failed program was:" >&5 | |
2512 | cat conftest.$ac_ext >&5 | |
2513 | rm -rf conftest* | |
2514 | CATOBJEXT=.mo | |
2515 | DATADIRNAME=lib | |
2516 | fi | |
2517 | rm -f conftest* | |
2518 | INSTOBJEXT=.mo | |
2519 | fi | |
2520 | fi | |
2521 | ||
2522 | else | |
2523 | echo "$ac_t""no" 1>&6 | |
2524 | fi | |
2525 | ||
2526 | ||
2527 | ||
2528 | if test "$CATOBJEXT" = "NONE"; then | |
2529 | nls_cv_use_gnu_gettext=yes | |
2530 | fi | |
2531 | fi | |
2532 | ||
2533 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2534 | INTLOBJS="\$(GETTOBJS)" | |
2535 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2536 | set dummy msgfmt; ac_word=$2 | |
2537 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2538 | echo "configure:2539: checking for $ac_word" >&5 |
c906108c SS |
2539 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2540 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2541 | else | |
2542 | case "$MSGFMT" in | |
2543 | /*) | |
2544 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2545 | ;; | |
2546 | *) | |
2547 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2548 | for ac_dir in $PATH; do | |
2549 | test -z "$ac_dir" && ac_dir=. | |
2550 | if test -f $ac_dir/$ac_word; then | |
2551 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2552 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2553 | break | |
2554 | fi | |
2555 | fi | |
2556 | done | |
2557 | IFS="$ac_save_ifs" | |
2558 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2559 | ;; | |
2560 | esac | |
2561 | fi | |
2562 | MSGFMT="$ac_cv_path_MSGFMT" | |
2563 | if test -n "$MSGFMT"; then | |
2564 | echo "$ac_t""$MSGFMT" 1>&6 | |
2565 | else | |
2566 | echo "$ac_t""no" 1>&6 | |
2567 | fi | |
2568 | ||
2569 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2570 | set dummy gmsgfmt; ac_word=$2 | |
2571 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2572 | echo "configure:2573: checking for $ac_word" >&5 |
c906108c SS |
2573 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2574 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2575 | else | |
2576 | case "$GMSGFMT" in | |
2577 | /*) | |
2578 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2579 | ;; | |
2580 | ?:/*) | |
2581 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2582 | ;; | |
2583 | *) | |
2584 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2585 | ac_dummy="$PATH" | |
2586 | for ac_dir in $ac_dummy; do | |
2587 | test -z "$ac_dir" && ac_dir=. | |
2588 | if test -f $ac_dir/$ac_word; then | |
2589 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2590 | break | |
2591 | fi | |
2592 | done | |
2593 | IFS="$ac_save_ifs" | |
2594 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2595 | ;; | |
2596 | esac | |
2597 | fi | |
2598 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2599 | if test -n "$GMSGFMT"; then | |
2600 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2601 | else | |
2602 | echo "$ac_t""no" 1>&6 | |
2603 | fi | |
2604 | ||
2605 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2606 | set dummy xgettext; ac_word=$2 | |
2607 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2608 | echo "configure:2609: checking for $ac_word" >&5 |
c906108c SS |
2609 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2611 | else | |
2612 | case "$XGETTEXT" in | |
2613 | /*) | |
2614 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2615 | ;; | |
2616 | *) | |
2617 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2618 | for ac_dir in $PATH; do | |
2619 | test -z "$ac_dir" && ac_dir=. | |
2620 | if test -f $ac_dir/$ac_word; then | |
2621 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2622 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2623 | break | |
2624 | fi | |
2625 | fi | |
2626 | done | |
2627 | IFS="$ac_save_ifs" | |
2628 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2629 | ;; | |
2630 | esac | |
2631 | fi | |
2632 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2633 | if test -n "$XGETTEXT"; then | |
2634 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2635 | else | |
2636 | echo "$ac_t""no" 1>&6 | |
2637 | fi | |
2638 | ||
2639 | ||
2640 | USE_INCLUDED_LIBINTL=yes | |
2641 | CATOBJEXT=.gmo | |
2642 | INSTOBJEXT=.mo | |
2643 | DATADIRNAME=share | |
2644 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2645 | INTLLIBS=$INTLDEPS | |
2646 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2647 | nls_cv_header_intl=libintl.h | |
2648 | nls_cv_header_libgt=libgettext.h | |
2649 | fi | |
2650 | ||
2651 | if test "$XGETTEXT" != ":"; then | |
2652 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2653 | : ; | |
2654 | else | |
2655 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2656 | XGETTEXT=":" | |
2657 | fi | |
2658 | fi | |
2659 | ||
2660 | # We need to process the po/ directory. | |
2661 | POSUB=po | |
2662 | else | |
2663 | DATADIRNAME=share | |
2664 | nls_cv_header_intl=libintl.h | |
2665 | nls_cv_header_libgt=libgettext.h | |
2666 | fi | |
2667 | ||
2668 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2669 | # because some of the sources are only built for this goal. | |
2670 | if test "$PACKAGE" = gettext; then | |
2671 | USE_NLS=yes | |
2672 | USE_INCLUDED_LIBINTL=yes | |
2673 | fi | |
2674 | ||
2675 | for lang in $ALL_LINGUAS; do | |
2676 | GMOFILES="$GMOFILES $lang.gmo" | |
2677 | POFILES="$POFILES $lang.po" | |
2678 | done | |
2679 | ||
2680 | ||
2681 | ||
2682 | ||
2683 | ||
2684 | ||
2685 | ||
2686 | ||
2687 | ||
2688 | ||
2689 | ||
2690 | ||
2691 | ||
2692 | ||
2693 | if test "x$CATOBJEXT" != "x"; then | |
2694 | if test "x$ALL_LINGUAS" = "x"; then | |
2695 | LINGUAS= | |
2696 | else | |
2697 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
6ce2ac0b | 2698 | echo "configure:2699: checking for catalogs to be installed" >&5 |
c906108c SS |
2699 | NEW_LINGUAS= |
2700 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2701 | case "$ALL_LINGUAS" in | |
2702 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2703 | esac | |
2704 | done | |
2705 | LINGUAS=$NEW_LINGUAS | |
2706 | echo "$ac_t""$LINGUAS" 1>&6 | |
2707 | fi | |
2708 | ||
2709 | if test -n "$LINGUAS"; then | |
2710 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2711 | fi | |
2712 | fi | |
2713 | ||
2714 | if test $ac_cv_header_locale_h = yes; then | |
2715 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2716 | else | |
2717 | INCLUDE_LOCALE_H="\ | |
2718 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2719 | fi | |
2720 | ||
2721 | ||
2722 | if test -f $srcdir/po2tbl.sed.in; then | |
2723 | if test "$CATOBJEXT" = ".cat"; then | |
2724 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2725 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
6ce2ac0b | 2726 | echo "configure:2727: checking for linux/version.h" >&5 |
c906108c SS |
2727 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2728 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2729 | else | |
2730 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 2731 | #line 2732 "configure" |
c906108c SS |
2732 | #include "confdefs.h" |
2733 | #include <linux/version.h> | |
2734 | EOF | |
2735 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 2736 | { (eval echo configure:2737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2737 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2738 | if test -z "$ac_err"; then | |
2739 | rm -rf conftest* | |
2740 | eval "ac_cv_header_$ac_safe=yes" | |
2741 | else | |
2742 | echo "$ac_err" >&5 | |
2743 | echo "configure: failed program was:" >&5 | |
2744 | cat conftest.$ac_ext >&5 | |
2745 | rm -rf conftest* | |
2746 | eval "ac_cv_header_$ac_safe=no" | |
2747 | fi | |
2748 | rm -f conftest* | |
2749 | fi | |
2750 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2751 | echo "$ac_t""yes" 1>&6 | |
2752 | msgformat=linux | |
2753 | else | |
2754 | echo "$ac_t""no" 1>&6 | |
2755 | msgformat=xopen | |
2756 | fi | |
2757 | ||
2758 | ||
2759 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2760 | fi | |
2761 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2762 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2763 | fi | |
2764 | ||
2765 | if test "$PACKAGE" = "gettext"; then | |
2766 | GT_NO="#NO#" | |
2767 | GT_YES= | |
2768 | else | |
2769 | GT_NO= | |
2770 | GT_YES="#YES#" | |
2771 | fi | |
2772 | ||
2773 | ||
2774 | ||
2775 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2776 | ||
2777 | ||
2778 | l= | |
2779 | ||
2780 | ||
2781 | if test -d $srcdir/po; then | |
2782 | test -d po || mkdir po | |
2783 | if test "x$srcdir" != "x."; then | |
2784 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2785 | posrcprefix="$srcdir/" | |
2786 | else | |
2787 | posrcprefix="../$srcdir/" | |
2788 | fi | |
2789 | else | |
2790 | posrcprefix="../" | |
2791 | fi | |
2792 | rm -f po/POTFILES | |
2793 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2794 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2795 | fi | |
2796 | ||
2797 | ||
2798 | ||
2799 | CONFIG_OBS= | |
2800 | CONFIG_DEPS= | |
2801 | CONFIG_SRCS= | |
fb40c209 AC |
2802 | CONFIG_INITS= |
2803 | ENABLE_CFLAGS= | |
b3a90332 AC |
2804 | CONFIG_ALL= |
2805 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2806 | CONFIG_INSTALL= |
2807 | CONFIG_UNINSTALL= | |
c906108c SS |
2808 | |
2809 | configdirs="doc testsuite" | |
2810 | ||
96baa820 JM |
2811 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2812 | if test "${enable_multi_ice+set}" = set; then | |
2813 | enableval="$enable_multi_ice" | |
2814 | case "${enableval}" in | |
2815 | yes ) enable_multi_ice="yes" ;; | |
2816 | no) enable_multi_ice="no" ;; | |
2817 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2818 | esac | |
2819 | ||
2820 | fi | |
2821 | ||
2822 | ||
2823 | if test "${enable_multi_ice}" = "yes"; then | |
2824 | configdirs="${configdirs} multi-ice" | |
2825 | fi | |
2826 | ||
c906108c SS |
2827 | |
2828 | . ${srcdir}/configure.host | |
2829 | ||
2830 | . ${srcdir}/configure.tgt | |
2831 | ||
1ba607ad AC |
2832 | targ=${target} ; . ${srcdir}/../bfd/config.bfd |
2833 | ||
2834 | ||
2835 | targ=${target} | |
2836 | . ${srcdir}/../bfd/config.bfd | |
5c8cc331 AC |
2837 | |
2838 | targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'` | |
2839 | ||
1ba607ad AC |
2840 | if test x"${targ_archs}" != x ; then |
2841 | cat >> confdefs.h <<EOF | |
2842 | #define DEFAULT_BFD_ARCH ${targ_archs} | |
2843 | EOF | |
2844 | ||
2845 | fi | |
2846 | if test x"${targ_defvec}" != x ; then | |
2847 | cat >> confdefs.h <<EOF | |
2848 | #define DEFAULT_BFD_VEC ${targ_defvec} | |
2849 | EOF | |
2850 | ||
2851 | fi | |
c906108c | 2852 | |
0d06e24b | 2853 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2854 | do |
2855 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2856 | set dummy $ac_prog; ac_word=$2 | |
2857 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2858 | echo "configure:2859: checking for $ac_word" >&5 |
7a292a7a SS |
2859 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2860 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2861 | else | |
2862 | if test -n "$AWK"; then | |
2863 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2864 | else | |
2865 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2866 | ac_dummy="$PATH" | |
2867 | for ac_dir in $ac_dummy; do | |
2868 | test -z "$ac_dir" && ac_dir=. | |
2869 | if test -f $ac_dir/$ac_word; then | |
2870 | ac_cv_prog_AWK="$ac_prog" | |
2871 | break | |
2872 | fi | |
2873 | done | |
2874 | IFS="$ac_save_ifs" | |
2875 | fi | |
2876 | fi | |
2877 | AWK="$ac_cv_prog_AWK" | |
2878 | if test -n "$AWK"; then | |
2879 | echo "$ac_t""$AWK" 1>&6 | |
2880 | else | |
2881 | echo "$ac_t""no" 1>&6 | |
2882 | fi | |
2883 | ||
2884 | test -n "$AWK" && break | |
2885 | done | |
2886 | ||
c906108c SS |
2887 | # Find a good install program. We prefer a C program (faster), |
2888 | # so one script is as good as another. But avoid the broken or | |
2889 | # incompatible versions: | |
2890 | # SysV /etc/install, /usr/sbin/install | |
2891 | # SunOS /usr/etc/install | |
2892 | # IRIX /sbin/install | |
2893 | # AIX /bin/install | |
2894 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2895 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2896 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2897 | # ./install, which can be erroneously created by make from ./install.sh. | |
2898 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
6ce2ac0b | 2899 | echo "configure:2900: checking for a BSD compatible install" >&5 |
c906108c SS |
2900 | if test -z "$INSTALL"; then |
2901 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2902 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2903 | else | |
2904 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2905 | for ac_dir in $PATH; do | |
2906 | # Account for people who put trailing slashes in PATH elements. | |
2907 | case "$ac_dir/" in | |
2908 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2909 | *) | |
2910 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2911 | # Don't use installbsd from OSF since it installs stuff as root | |
2912 | # by default. | |
2913 | for ac_prog in ginstall scoinst install; do | |
2914 | if test -f $ac_dir/$ac_prog; then | |
2915 | if test $ac_prog = install && | |
2916 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2917 | # AIX install. It has an incompatible calling convention. | |
2918 | : | |
2919 | else | |
2920 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2921 | break 2 | |
2922 | fi | |
2923 | fi | |
2924 | done | |
2925 | ;; | |
2926 | esac | |
2927 | done | |
2928 | IFS="$ac_save_IFS" | |
2929 | ||
2930 | fi | |
2931 | if test "${ac_cv_path_install+set}" = set; then | |
2932 | INSTALL="$ac_cv_path_install" | |
2933 | else | |
2934 | # As a last resort, use the slow shell script. We don't cache a | |
2935 | # path for INSTALL within a source directory, because that will | |
2936 | # break other packages using the cache if that directory is | |
2937 | # removed, or if the path is relative. | |
2938 | INSTALL="$ac_install_sh" | |
2939 | fi | |
2940 | fi | |
2941 | echo "$ac_t""$INSTALL" 1>&6 | |
2942 | ||
2943 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2944 | # It thinks the first close brace ends the variable substitution. | |
2945 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2946 | ||
2947 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2948 | ||
2949 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2950 | ||
2951 | if test $host != $build; then | |
2952 | ac_tool_prefix=${host_alias}- | |
2953 | else | |
2954 | ac_tool_prefix= | |
2955 | fi | |
2956 | ||
2957 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2958 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2959 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2960 | echo "configure:2961: checking for $ac_word" >&5 |
c906108c SS |
2961 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2962 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2963 | else | |
2964 | if test -n "$AR"; then | |
2965 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2966 | else | |
2967 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2968 | ac_dummy="$PATH" | |
2969 | for ac_dir in $ac_dummy; do | |
2970 | test -z "$ac_dir" && ac_dir=. | |
2971 | if test -f $ac_dir/$ac_word; then | |
2972 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2973 | break | |
2974 | fi | |
2975 | done | |
2976 | IFS="$ac_save_ifs" | |
2977 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2978 | fi | |
2979 | fi | |
2980 | AR="$ac_cv_prog_AR" | |
2981 | if test -n "$AR"; then | |
2982 | echo "$ac_t""$AR" 1>&6 | |
2983 | else | |
2984 | echo "$ac_t""no" 1>&6 | |
2985 | fi | |
2986 | ||
2987 | ||
2988 | ||
2989 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2990 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2991 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 2992 | echo "configure:2993: checking for $ac_word" >&5 |
c906108c SS |
2993 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2994 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2995 | else | |
2996 | if test -n "$RANLIB"; then | |
2997 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2998 | else | |
2999 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3000 | ac_dummy="$PATH" | |
3001 | for ac_dir in $ac_dummy; do | |
3002 | test -z "$ac_dir" && ac_dir=. | |
3003 | if test -f $ac_dir/$ac_word; then | |
3004 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3005 | break | |
3006 | fi | |
3007 | done | |
3008 | IFS="$ac_save_ifs" | |
3009 | fi | |
3010 | fi | |
3011 | RANLIB="$ac_cv_prog_RANLIB" | |
3012 | if test -n "$RANLIB"; then | |
3013 | echo "$ac_t""$RANLIB" 1>&6 | |
3014 | else | |
3015 | echo "$ac_t""no" 1>&6 | |
3016 | fi | |
3017 | ||
3018 | ||
3019 | if test -z "$ac_cv_prog_RANLIB"; then | |
3020 | if test -n "$ac_tool_prefix"; then | |
3021 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3022 | set dummy ranlib; ac_word=$2 | |
3023 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 3024 | echo "configure:3025: checking for $ac_word" >&5 |
c906108c SS |
3025 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3027 | else | |
3028 | if test -n "$RANLIB"; then | |
3029 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3030 | else | |
3031 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3032 | ac_dummy="$PATH" | |
3033 | for ac_dir in $ac_dummy; do | |
3034 | test -z "$ac_dir" && ac_dir=. | |
3035 | if test -f $ac_dir/$ac_word; then | |
3036 | ac_cv_prog_RANLIB="ranlib" | |
3037 | break | |
3038 | fi | |
3039 | done | |
3040 | IFS="$ac_save_ifs" | |
3041 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3042 | fi | |
3043 | fi | |
3044 | RANLIB="$ac_cv_prog_RANLIB" | |
3045 | if test -n "$RANLIB"; then | |
3046 | echo "$ac_t""$RANLIB" 1>&6 | |
3047 | else | |
3048 | echo "$ac_t""no" 1>&6 | |
3049 | fi | |
3050 | ||
3051 | else | |
3052 | RANLIB=":" | |
3053 | fi | |
3054 | fi | |
3055 | ||
95ca63c4 CF |
3056 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3057 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3058 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 3059 | echo "configure:3060: checking for $ac_word" >&5 |
95ca63c4 CF |
3060 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3061 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3062 | else | |
3063 | if test -n "$DLLTOOL"; then | |
3064 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3065 | else | |
3066 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3067 | ac_dummy="$PATH" | |
3068 | for ac_dir in $ac_dummy; do | |
3069 | test -z "$ac_dir" && ac_dir=. | |
3070 | if test -f $ac_dir/$ac_word; then | |
3071 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3072 | break | |
3073 | fi | |
3074 | done | |
3075 | IFS="$ac_save_ifs" | |
3076 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3077 | fi | |
3078 | fi | |
3079 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3080 | if test -n "$DLLTOOL"; then | |
3081 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3082 | else | |
3083 | echo "$ac_t""no" 1>&6 | |
3084 | fi | |
3085 | ||
3086 | ||
3087 | ||
3088 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3089 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3090 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 3091 | echo "configure:3092: checking for $ac_word" >&5 |
95ca63c4 CF |
3092 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3093 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3094 | else | |
3095 | if test -n "$WINDRES"; then | |
3096 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3097 | else | |
3098 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3099 | ac_dummy="$PATH" | |
3100 | for ac_dir in $ac_dummy; do | |
3101 | test -z "$ac_dir" && ac_dir=. | |
3102 | if test -f $ac_dir/$ac_word; then | |
3103 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3104 | break | |
3105 | fi | |
3106 | done | |
3107 | IFS="$ac_save_ifs" | |
3108 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3109 | fi | |
3110 | fi | |
3111 | WINDRES="$ac_cv_prog_WINDRES" | |
3112 | if test -n "$WINDRES"; then | |
3113 | echo "$ac_t""$WINDRES" 1>&6 | |
3114 | else | |
3115 | echo "$ac_t""no" 1>&6 | |
3116 | fi | |
3117 | ||
3118 | ||
3119 | ||
c906108c SS |
3120 | for ac_prog in 'bison -y' byacc |
3121 | do | |
3122 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3123 | set dummy $ac_prog; ac_word=$2 | |
3124 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 3125 | echo "configure:3126: checking for $ac_word" >&5 |
c906108c SS |
3126 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3127 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3128 | else | |
3129 | if test -n "$YACC"; then | |
3130 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3131 | else | |
3132 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3133 | ac_dummy="$PATH" | |
3134 | for ac_dir in $ac_dummy; do | |
3135 | test -z "$ac_dir" && ac_dir=. | |
3136 | if test -f $ac_dir/$ac_word; then | |
3137 | ac_cv_prog_YACC="$ac_prog" | |
3138 | break | |
3139 | fi | |
3140 | done | |
3141 | IFS="$ac_save_ifs" | |
3142 | fi | |
3143 | fi | |
3144 | YACC="$ac_cv_prog_YACC" | |
3145 | if test -n "$YACC"; then | |
3146 | echo "$ac_t""$YACC" 1>&6 | |
3147 | else | |
3148 | echo "$ac_t""no" 1>&6 | |
3149 | fi | |
3150 | ||
3151 | test -n "$YACC" && break | |
3152 | done | |
3153 | test -n "$YACC" || YACC="yacc" | |
3154 | ||
3155 | ||
75c6e08a MK |
3156 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3157 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3158 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6ce2ac0b | 3159 | echo "configure:3160: checking for $ac_word" >&5 |
75c6e08a MK |
3160 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3161 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3162 | else | |
3163 | if test -n "$MIG"; then | |
3164 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3165 | else | |
3166 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3167 | ac_dummy="$PATH" | |
3168 | for ac_dir in $ac_dummy; do | |
3169 | test -z "$ac_dir" && ac_dir=. | |
3170 | if test -f $ac_dir/$ac_word; then | |
3171 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3172 | break | |
3173 | fi | |
3174 | done | |
3175 | IFS="$ac_save_ifs" | |
3176 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3177 | fi | |
3178 | fi | |
3179 | MIG="$ac_cv_prog_MIG" | |
3180 | if test -n "$MIG"; then | |
3181 | echo "$ac_t""$MIG" 1>&6 | |
3182 | else | |
3183 | echo "$ac_t""no" 1>&6 | |
3184 | fi | |
3185 | ||
3186 | ||
3187 | ||
3188 | ||
c906108c SS |
3189 | if test "$program_transform_name" = s,x,x,; then |
3190 | program_transform_name= | |
3191 | else | |
3192 | # Double any \ or $. echo might interpret backslashes. | |
3193 | cat <<\EOF_SED > conftestsed | |
3194 | s,\\,\\\\,g; s,\$,$$,g | |
3195 | EOF_SED | |
3196 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3197 | rm -f conftestsed | |
3198 | fi | |
3199 | test "$program_prefix" != NONE && | |
3200 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3201 | # Use a double $ so make ignores it. | |
3202 | test "$program_suffix" != NONE && | |
3203 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3204 | ||
3205 | # sed with no file args requires a program. | |
3206 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3207 | ||
3208 | ||
3209 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
6ce2ac0b | 3210 | echo "configure:3211: checking return type of signal handlers" >&5 |
c906108c SS |
3211 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3212 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3213 | else | |
3214 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3215 | #line 3216 "configure" |
c906108c SS |
3216 | #include "confdefs.h" |
3217 | #include <sys/types.h> | |
3218 | #include <signal.h> | |
3219 | #ifdef signal | |
3220 | #undef signal | |
3221 | #endif | |
3222 | #ifdef __cplusplus | |
3223 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3224 | #else | |
3225 | void (*signal ()) (); | |
3226 | #endif | |
3227 | ||
3228 | int main() { | |
3229 | int i; | |
3230 | ; return 0; } | |
3231 | EOF | |
6ce2ac0b | 3232 | if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3233 | rm -rf conftest* |
3234 | ac_cv_type_signal=void | |
3235 | else | |
3236 | echo "configure: failed program was:" >&5 | |
3237 | cat conftest.$ac_ext >&5 | |
3238 | rm -rf conftest* | |
3239 | ac_cv_type_signal=int | |
3240 | fi | |
3241 | rm -f conftest* | |
3242 | fi | |
3243 | ||
3244 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3245 | cat >> confdefs.h <<EOF | |
3246 | #define RETSIGTYPE $ac_cv_type_signal | |
3247 | EOF | |
3248 | ||
3249 | ||
3250 | ||
3251 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
6ce2ac0b | 3252 | echo "configure:3253: checking for ANSI C header files" >&5 |
c906108c SS |
3253 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3254 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3255 | else | |
3256 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3257 | #line 3258 "configure" |
c906108c SS |
3258 | #include "confdefs.h" |
3259 | #include <stdlib.h> | |
3260 | #include <stdarg.h> | |
3261 | #include <string.h> | |
3262 | #include <float.h> | |
3263 | EOF | |
3264 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 3265 | { (eval echo configure:3266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3266 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3267 | if test -z "$ac_err"; then | |
3268 | rm -rf conftest* | |
3269 | ac_cv_header_stdc=yes | |
3270 | else | |
3271 | echo "$ac_err" >&5 | |
3272 | echo "configure: failed program was:" >&5 | |
3273 | cat conftest.$ac_ext >&5 | |
3274 | rm -rf conftest* | |
3275 | ac_cv_header_stdc=no | |
3276 | fi | |
3277 | rm -f conftest* | |
3278 | ||
3279 | if test $ac_cv_header_stdc = yes; then | |
3280 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3281 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3282 | #line 3283 "configure" |
c906108c SS |
3283 | #include "confdefs.h" |
3284 | #include <string.h> | |
3285 | EOF | |
3286 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3287 | egrep "memchr" >/dev/null 2>&1; then | |
3288 | : | |
3289 | else | |
3290 | rm -rf conftest* | |
3291 | ac_cv_header_stdc=no | |
3292 | fi | |
3293 | rm -f conftest* | |
3294 | ||
3295 | fi | |
3296 | ||
3297 | if test $ac_cv_header_stdc = yes; then | |
3298 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3299 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3300 | #line 3301 "configure" |
c906108c SS |
3301 | #include "confdefs.h" |
3302 | #include <stdlib.h> | |
3303 | EOF | |
3304 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3305 | egrep "free" >/dev/null 2>&1; then | |
3306 | : | |
3307 | else | |
3308 | rm -rf conftest* | |
3309 | ac_cv_header_stdc=no | |
3310 | fi | |
3311 | rm -f conftest* | |
3312 | ||
3313 | fi | |
3314 | ||
3315 | if test $ac_cv_header_stdc = yes; then | |
3316 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3317 | if test "$cross_compiling" = yes; then | |
3318 | : | |
3319 | else | |
3320 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3321 | #line 3322 "configure" |
c906108c SS |
3322 | #include "confdefs.h" |
3323 | #include <ctype.h> | |
3324 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3325 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3326 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3327 | int main () { int i; for (i = 0; i < 256; i++) | |
3328 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3329 | exit (0); } | |
3330 | ||
3331 | EOF | |
6ce2ac0b | 3332 | if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3333 | then |
3334 | : | |
3335 | else | |
3336 | echo "configure: failed program was:" >&5 | |
3337 | cat conftest.$ac_ext >&5 | |
3338 | rm -fr conftest* | |
3339 | ac_cv_header_stdc=no | |
3340 | fi | |
3341 | rm -fr conftest* | |
3342 | fi | |
3343 | ||
3344 | fi | |
3345 | fi | |
3346 | ||
3347 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3348 | if test $ac_cv_header_stdc = yes; then | |
3349 | cat >> confdefs.h <<\EOF | |
3350 | #define STDC_HEADERS 1 | |
3351 | EOF | |
3352 | ||
3353 | fi | |
3354 | ||
3355 | ||
6abadcf8 | 3356 | |
3e0bf9f1 | 3357 | case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes) |
6abadcf8 ND |
3358 | cat >> confdefs.h <<\EOF |
3359 | #define _MSE_INT_H 1 | |
3360 | EOF | |
3361 | ||
3362 | esac; esac | |
3363 | ||
2894793a | 3364 | for ac_hdr in ctype.h endian.h link.h thread_db.h proc_service.h \ |
c906108c | 3365 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3366 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3367 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3368 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
4b14d3e4 | 3369 | time.h sys/ioctl.h sys/user.h \ |
2894793a | 3370 | dirent.h sys/ndir.h sys/dir.h ndir.h \ |
409a3f64 AC |
3371 | curses.h ncurses.h \ |
3372 | poll.h sys/poll.h | |
c906108c SS |
3373 | do |
3374 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3375 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
6ce2ac0b | 3376 | echo "configure:3377: checking for $ac_hdr" >&5 |
c906108c SS |
3377 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3378 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3379 | else | |
3380 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3381 | #line 3382 "configure" |
c906108c SS |
3382 | #include "confdefs.h" |
3383 | #include <$ac_hdr> | |
3384 | EOF | |
3385 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 3386 | { (eval echo configure:3387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3387 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3388 | if test -z "$ac_err"; then | |
3389 | rm -rf conftest* | |
3390 | eval "ac_cv_header_$ac_safe=yes" | |
3391 | else | |
3392 | echo "$ac_err" >&5 | |
3393 | echo "configure: failed program was:" >&5 | |
3394 | cat conftest.$ac_ext >&5 | |
3395 | rm -rf conftest* | |
3396 | eval "ac_cv_header_$ac_safe=no" | |
3397 | fi | |
3398 | rm -f conftest* | |
3399 | fi | |
3400 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3401 | echo "$ac_t""yes" 1>&6 | |
3402 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3403 | cat >> confdefs.h <<EOF | |
3404 | #define $ac_tr_hdr 1 | |
3405 | EOF | |
3406 | ||
3407 | else | |
3408 | echo "$ac_t""no" 1>&6 | |
3409 | fi | |
3410 | done | |
3411 | ||
3412 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
6ce2ac0b | 3413 | echo "configure:3414: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3414 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3415 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3416 | else | |
3417 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3418 | #line 3419 "configure" |
c906108c SS |
3419 | #include "confdefs.h" |
3420 | #include <sys/types.h> | |
3421 | #include <sys/stat.h> | |
3422 | ||
3423 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3424 | # if S_ISBLK (S_IFDIR) | |
3425 | You lose. | |
3426 | # endif | |
3427 | #endif | |
3428 | ||
3429 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3430 | # if S_ISBLK (S_IFCHR) | |
3431 | You lose. | |
3432 | # endif | |
3433 | #endif | |
3434 | ||
3435 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3436 | # if S_ISLNK (S_IFREG) | |
3437 | You lose. | |
3438 | # endif | |
3439 | #endif | |
3440 | ||
3441 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3442 | # if S_ISSOCK (S_IFREG) | |
3443 | You lose. | |
3444 | # endif | |
3445 | #endif | |
3446 | ||
3447 | EOF | |
3448 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3449 | egrep "You lose" >/dev/null 2>&1; then | |
3450 | rm -rf conftest* | |
3451 | ac_cv_header_stat_broken=yes | |
3452 | else | |
3453 | rm -rf conftest* | |
3454 | ac_cv_header_stat_broken=no | |
3455 | fi | |
3456 | rm -f conftest* | |
3457 | ||
3458 | fi | |
3459 | ||
3460 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3461 | if test $ac_cv_header_stat_broken = yes; then | |
3462 | cat >> confdefs.h <<\EOF | |
3463 | #define STAT_MACROS_BROKEN 1 | |
3464 | EOF | |
3465 | ||
3466 | fi | |
3467 | ||
3468 | ||
3469 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
6ce2ac0b | 3470 | echo "configure:3471: checking for working const" >&5 |
c906108c SS |
3471 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3472 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3473 | else | |
3474 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3475 | #line 3476 "configure" |
c906108c SS |
3476 | #include "confdefs.h" |
3477 | ||
3478 | int main() { | |
3479 | ||
3480 | /* Ultrix mips cc rejects this. */ | |
3481 | typedef int charset[2]; const charset x; | |
3482 | /* SunOS 4.1.1 cc rejects this. */ | |
3483 | char const *const *ccp; | |
3484 | char **p; | |
3485 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3486 | struct point {int x, y;}; | |
3487 | static struct point const zero = {0,0}; | |
3488 | /* AIX XL C 1.02.0.0 rejects this. | |
3489 | It does not let you subtract one const X* pointer from another in an arm | |
3490 | of an if-expression whose if-part is not a constant expression */ | |
3491 | const char *g = "string"; | |
3492 | ccp = &g + (g ? g-g : 0); | |
3493 | /* HPUX 7.0 cc rejects these. */ | |
3494 | ++ccp; | |
3495 | p = (char**) ccp; | |
3496 | ccp = (char const *const *) p; | |
3497 | { /* SCO 3.2v4 cc rejects this. */ | |
3498 | char *t; | |
3499 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3500 | ||
3501 | *t++ = 0; | |
3502 | } | |
3503 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3504 | int x[] = {25, 17}; | |
3505 | const int *foo = &x[0]; | |
3506 | ++foo; | |
3507 | } | |
3508 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3509 | typedef const int *iptr; | |
3510 | iptr p = 0; | |
3511 | ++p; | |
3512 | } | |
3513 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3514 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3515 | struct s { int j; const int *ap[3]; }; | |
3516 | struct s *b; b->j = 5; | |
3517 | } | |
3518 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3519 | const int foo = 10; | |
3520 | } | |
3521 | ||
3522 | ; return 0; } | |
3523 | EOF | |
6ce2ac0b | 3524 | if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3525 | rm -rf conftest* |
3526 | ac_cv_c_const=yes | |
3527 | else | |
3528 | echo "configure: failed program was:" >&5 | |
3529 | cat conftest.$ac_ext >&5 | |
3530 | rm -rf conftest* | |
3531 | ac_cv_c_const=no | |
3532 | fi | |
3533 | rm -f conftest* | |
3534 | fi | |
3535 | ||
3536 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3537 | if test $ac_cv_c_const = no; then | |
3538 | cat >> confdefs.h <<\EOF | |
3539 | #define const | |
3540 | EOF | |
3541 | ||
3542 | fi | |
3543 | ||
3544 | ||
2acceee2 | 3545 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask |
c906108c SS |
3546 | do |
3547 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 3548 | echo "configure:3549: checking for $ac_func" >&5 |
c906108c SS |
3549 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3550 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3551 | else | |
3552 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3553 | #line 3554 "configure" |
c906108c SS |
3554 | #include "confdefs.h" |
3555 | /* System header to define __stub macros and hopefully few prototypes, | |
3556 | which can conflict with char $ac_func(); below. */ | |
3557 | #include <assert.h> | |
3558 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3559 | /* We use char because int might match the return type of a gcc2 | |
3560 | builtin and then its argument prototype would still apply. */ | |
3561 | char $ac_func(); | |
3562 | ||
3563 | int main() { | |
3564 | ||
3565 | /* The GNU C library defines this for functions which it implements | |
3566 | to always fail with ENOSYS. Some functions are actually named | |
3567 | something starting with __ and the normal name is an alias. */ | |
3568 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3569 | choke me | |
3570 | #else | |
3571 | $ac_func(); | |
3572 | #endif | |
3573 | ||
3574 | ; return 0; } | |
3575 | EOF | |
6ce2ac0b | 3576 | if { (eval echo configure:3577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3577 | rm -rf conftest* |
3578 | eval "ac_cv_func_$ac_func=yes" | |
3579 | else | |
3580 | echo "configure: failed program was:" >&5 | |
3581 | cat conftest.$ac_ext >&5 | |
3582 | rm -rf conftest* | |
3583 | eval "ac_cv_func_$ac_func=no" | |
3584 | fi | |
3585 | rm -f conftest* | |
3586 | fi | |
3587 | ||
3588 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3589 | echo "$ac_t""yes" 1>&6 | |
3590 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3591 | cat >> confdefs.h <<EOF | |
3592 | #define $ac_tr_func 1 | |
3593 | EOF | |
3594 | ||
3595 | else | |
3596 | echo "$ac_t""no" 1>&6 | |
3597 | fi | |
3598 | done | |
3599 | ||
3600 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3601 | # for constant arguments. Useless! | |
3602 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
6ce2ac0b | 3603 | echo "configure:3604: checking for working alloca.h" >&5 |
c906108c SS |
3604 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3606 | else | |
3607 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3608 | #line 3609 "configure" |
c906108c SS |
3609 | #include "confdefs.h" |
3610 | #include <alloca.h> | |
3611 | int main() { | |
3612 | char *p = alloca(2 * sizeof(int)); | |
3613 | ; return 0; } | |
3614 | EOF | |
6ce2ac0b | 3615 | if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3616 | rm -rf conftest* |
3617 | ac_cv_header_alloca_h=yes | |
3618 | else | |
3619 | echo "configure: failed program was:" >&5 | |
3620 | cat conftest.$ac_ext >&5 | |
3621 | rm -rf conftest* | |
3622 | ac_cv_header_alloca_h=no | |
3623 | fi | |
3624 | rm -f conftest* | |
3625 | fi | |
3626 | ||
3627 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3628 | if test $ac_cv_header_alloca_h = yes; then | |
3629 | cat >> confdefs.h <<\EOF | |
3630 | #define HAVE_ALLOCA_H 1 | |
3631 | EOF | |
3632 | ||
3633 | fi | |
3634 | ||
3635 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
6ce2ac0b | 3636 | echo "configure:3637: checking for alloca" >&5 |
c906108c SS |
3637 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3639 | else | |
3640 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3641 | #line 3642 "configure" |
c906108c SS |
3642 | #include "confdefs.h" |
3643 | ||
3644 | #ifdef __GNUC__ | |
3645 | # define alloca __builtin_alloca | |
3646 | #else | |
3647 | # ifdef _MSC_VER | |
3648 | # include <malloc.h> | |
3649 | # define alloca _alloca | |
3650 | # else | |
3651 | # if HAVE_ALLOCA_H | |
3652 | # include <alloca.h> | |
3653 | # else | |
3654 | # ifdef _AIX | |
3655 | #pragma alloca | |
3656 | # else | |
3657 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3658 | char *alloca (); | |
3659 | # endif | |
3660 | # endif | |
3661 | # endif | |
3662 | # endif | |
3663 | #endif | |
3664 | ||
3665 | int main() { | |
3666 | char *p = (char *) alloca(1); | |
3667 | ; return 0; } | |
3668 | EOF | |
6ce2ac0b | 3669 | if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3670 | rm -rf conftest* |
3671 | ac_cv_func_alloca_works=yes | |
3672 | else | |
3673 | echo "configure: failed program was:" >&5 | |
3674 | cat conftest.$ac_ext >&5 | |
3675 | rm -rf conftest* | |
3676 | ac_cv_func_alloca_works=no | |
3677 | fi | |
3678 | rm -f conftest* | |
3679 | fi | |
3680 | ||
3681 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3682 | if test $ac_cv_func_alloca_works = yes; then | |
3683 | cat >> confdefs.h <<\EOF | |
3684 | #define HAVE_ALLOCA 1 | |
3685 | EOF | |
3686 | ||
3687 | fi | |
3688 | ||
3689 | if test $ac_cv_func_alloca_works = no; then | |
3690 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3691 | # that cause trouble. Some versions do not even contain alloca or | |
3692 | # contain a buggy version. If you still want to use their alloca, | |
3693 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3694 | ALLOCA=alloca.${ac_objext} | |
3695 | cat >> confdefs.h <<\EOF | |
3696 | #define C_ALLOCA 1 | |
3697 | EOF | |
3698 | ||
3699 | ||
3700 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
6ce2ac0b | 3701 | echo "configure:3702: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
3702 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3703 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3704 | else | |
3705 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3706 | #line 3707 "configure" |
c906108c SS |
3707 | #include "confdefs.h" |
3708 | #if defined(CRAY) && ! defined(CRAY2) | |
3709 | webecray | |
3710 | #else | |
3711 | wenotbecray | |
3712 | #endif | |
3713 | ||
3714 | EOF | |
3715 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3716 | egrep "webecray" >/dev/null 2>&1; then | |
3717 | rm -rf conftest* | |
3718 | ac_cv_os_cray=yes | |
3719 | else | |
3720 | rm -rf conftest* | |
3721 | ac_cv_os_cray=no | |
3722 | fi | |
3723 | rm -f conftest* | |
3724 | ||
3725 | fi | |
3726 | ||
3727 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3728 | if test $ac_cv_os_cray = yes; then | |
3729 | for ac_func in _getb67 GETB67 getb67; do | |
3730 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 3731 | echo "configure:3732: checking for $ac_func" >&5 |
c906108c SS |
3732 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3734 | else | |
3735 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3736 | #line 3737 "configure" |
c906108c SS |
3737 | #include "confdefs.h" |
3738 | /* System header to define __stub macros and hopefully few prototypes, | |
3739 | which can conflict with char $ac_func(); below. */ | |
3740 | #include <assert.h> | |
3741 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3742 | /* We use char because int might match the return type of a gcc2 | |
3743 | builtin and then its argument prototype would still apply. */ | |
3744 | char $ac_func(); | |
3745 | ||
3746 | int main() { | |
3747 | ||
3748 | /* The GNU C library defines this for functions which it implements | |
3749 | to always fail with ENOSYS. Some functions are actually named | |
3750 | something starting with __ and the normal name is an alias. */ | |
3751 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3752 | choke me | |
3753 | #else | |
3754 | $ac_func(); | |
3755 | #endif | |
3756 | ||
3757 | ; return 0; } | |
3758 | EOF | |
6ce2ac0b | 3759 | if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3760 | rm -rf conftest* |
3761 | eval "ac_cv_func_$ac_func=yes" | |
3762 | else | |
3763 | echo "configure: failed program was:" >&5 | |
3764 | cat conftest.$ac_ext >&5 | |
3765 | rm -rf conftest* | |
3766 | eval "ac_cv_func_$ac_func=no" | |
3767 | fi | |
3768 | rm -f conftest* | |
3769 | fi | |
3770 | ||
3771 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3772 | echo "$ac_t""yes" 1>&6 | |
3773 | cat >> confdefs.h <<EOF | |
3774 | #define CRAY_STACKSEG_END $ac_func | |
3775 | EOF | |
3776 | ||
3777 | break | |
3778 | else | |
3779 | echo "$ac_t""no" 1>&6 | |
3780 | fi | |
3781 | ||
3782 | done | |
3783 | fi | |
3784 | ||
3785 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
6ce2ac0b | 3786 | echo "configure:3787: checking stack direction for C alloca" >&5 |
c906108c SS |
3787 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3788 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3789 | else | |
3790 | if test "$cross_compiling" = yes; then | |
3791 | ac_cv_c_stack_direction=0 | |
3792 | else | |
3793 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3794 | #line 3795 "configure" |
c906108c SS |
3795 | #include "confdefs.h" |
3796 | find_stack_direction () | |
3797 | { | |
3798 | static char *addr = 0; | |
3799 | auto char dummy; | |
3800 | if (addr == 0) | |
3801 | { | |
3802 | addr = &dummy; | |
3803 | return find_stack_direction (); | |
3804 | } | |
3805 | else | |
3806 | return (&dummy > addr) ? 1 : -1; | |
3807 | } | |
3808 | main () | |
3809 | { | |
3810 | exit (find_stack_direction() < 0); | |
3811 | } | |
3812 | EOF | |
6ce2ac0b | 3813 | if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3814 | then |
3815 | ac_cv_c_stack_direction=1 | |
3816 | else | |
3817 | echo "configure: failed program was:" >&5 | |
3818 | cat conftest.$ac_ext >&5 | |
3819 | rm -fr conftest* | |
3820 | ac_cv_c_stack_direction=-1 | |
3821 | fi | |
3822 | rm -fr conftest* | |
3823 | fi | |
3824 | ||
3825 | fi | |
3826 | ||
3827 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3828 | cat >> confdefs.h <<EOF | |
3829 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3830 | EOF | |
3831 | ||
3832 | fi | |
3833 | ||
3834 | ||
7dfa765c MK |
3835 | # See if machine/reg.h supports the %fs and %gs i386 segment registers. |
3836 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
3837 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
6ce2ac0b | 3838 | echo "configure:3839: checking for r_fs in struct reg" >&5 |
422ea4b8 | 3839 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7dfa765c MK |
3840 | echo $ac_n "(cached) $ac_c" 1>&6 |
3841 | else | |
3842 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3843 | #line 3844 "configure" |
7dfa765c MK |
3844 | #include "confdefs.h" |
3845 | #include <machine/reg.h> | |
3846 | int main() { | |
3847 | struct reg r; r.r_fs; | |
3848 | ; return 0; } | |
3849 | EOF | |
6ce2ac0b | 3850 | if { (eval echo configure:3851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3851 | rm -rf conftest* |
422ea4b8 | 3852 | gdb_cv_struct_reg_r_fs=yes |
7dfa765c MK |
3853 | else |
3854 | echo "configure: failed program was:" >&5 | |
3855 | cat conftest.$ac_ext >&5 | |
3856 | rm -rf conftest* | |
422ea4b8 | 3857 | gdb_cv_struct_reg_r_fs=no |
7dfa765c MK |
3858 | fi |
3859 | rm -f conftest* | |
3860 | fi | |
3861 | ||
422ea4b8 MK |
3862 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
3863 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7dfa765c | 3864 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3865 | #define HAVE_STRUCT_REG_R_FS 1 |
7dfa765c MK |
3866 | EOF |
3867 | ||
3868 | fi | |
3869 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
6ce2ac0b | 3870 | echo "configure:3871: checking for r_gs in struct reg" >&5 |
422ea4b8 | 3871 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7dfa765c MK |
3872 | echo $ac_n "(cached) $ac_c" 1>&6 |
3873 | else | |
3874 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3875 | #line 3876 "configure" |
7dfa765c MK |
3876 | #include "confdefs.h" |
3877 | #include <machine/reg.h> | |
3878 | int main() { | |
3879 | struct reg r; r.r_gs; | |
3880 | ; return 0; } | |
3881 | EOF | |
6ce2ac0b | 3882 | if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3883 | rm -rf conftest* |
422ea4b8 | 3884 | gdb_cv_struct_reg_r_gs=yes |
7dfa765c MK |
3885 | else |
3886 | echo "configure: failed program was:" >&5 | |
3887 | cat conftest.$ac_ext >&5 | |
3888 | rm -rf conftest* | |
422ea4b8 | 3889 | gdb_cv_struct_reg_r_gs=no |
7dfa765c MK |
3890 | fi |
3891 | rm -f conftest* | |
3892 | fi | |
3893 | ||
422ea4b8 MK |
3894 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
3895 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7dfa765c | 3896 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3897 | #define HAVE_STRUCT_REG_R_GS 1 |
7dfa765c MK |
3898 | EOF |
3899 | ||
3900 | fi | |
3901 | ||
64bb1671 | 3902 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 |
6ce2ac0b | 3903 | echo "configure:3904: checking for PTRACE_GETREGS" >&5 |
64bb1671 MK |
3904 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
3905 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3906 | else | |
3907 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3908 | #line 3909 "configure" |
64bb1671 MK |
3909 | #include "confdefs.h" |
3910 | #include <sys/ptrace.h> | |
3911 | int main() { | |
3912 | PTRACE_GETREGS; | |
3913 | ; return 0; } | |
3914 | EOF | |
6ce2ac0b | 3915 | if { (eval echo configure:3916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
64bb1671 MK |
3916 | rm -rf conftest* |
3917 | gdb_cv_have_ptrace_getregs=yes | |
3918 | else | |
3919 | echo "configure: failed program was:" >&5 | |
3920 | cat conftest.$ac_ext >&5 | |
3921 | rm -rf conftest* | |
3922 | gdb_cv_have_ptrace_getregs=no | |
3923 | fi | |
3924 | rm -f conftest* | |
3925 | fi | |
3926 | ||
4397a6ab | 3927 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
64bb1671 MK |
3928 | if test $gdb_cv_have_ptrace_getregs = yes; then |
3929 | cat >> confdefs.h <<\EOF | |
3930 | #define HAVE_PTRACE_GETREGS 1 | |
3931 | EOF | |
3932 | ||
3933 | fi | |
3934 | ||
6ce2ac0b MK |
3935 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 |
3936 | echo "configure:3937: checking for PTRACE_GETFPXREGS" >&5 | |
3937 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then | |
5c44784c JM |
3938 | echo $ac_n "(cached) $ac_c" 1>&6 |
3939 | else | |
3940 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3941 | #line 3942 "configure" |
5c44784c JM |
3942 | #include "confdefs.h" |
3943 | #include <sys/ptrace.h> | |
3944 | int main() { | |
6ce2ac0b | 3945 | PTRACE_GETFPXREGS; |
5c44784c JM |
3946 | ; return 0; } |
3947 | EOF | |
6ce2ac0b | 3948 | if { (eval echo configure:3949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c | 3949 | rm -rf conftest* |
6ce2ac0b | 3950 | gdb_cv_have_ptrace_getfpxregs=yes |
5c44784c JM |
3951 | else |
3952 | echo "configure: failed program was:" >&5 | |
3953 | cat conftest.$ac_ext >&5 | |
3954 | rm -rf conftest* | |
6ce2ac0b | 3955 | gdb_cv_have_ptrace_getfpxregs=no |
5c44784c JM |
3956 | fi |
3957 | rm -f conftest* | |
3958 | fi | |
3959 | ||
6ce2ac0b MK |
3960 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
3961 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
5c44784c | 3962 | cat >> confdefs.h <<\EOF |
6ce2ac0b | 3963 | #define HAVE_PTRACE_GETFPXREGS 1 |
5c44784c JM |
3964 | EOF |
3965 | ||
3966 | fi | |
3967 | ||
7be570e7 | 3968 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
6ce2ac0b | 3969 | echo "configure:3970: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
3970 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
3971 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3972 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3973 | else | |
3974 | ac_save_LIBS="$LIBS" | |
3975 | LIBS="-lsocket $LIBS" | |
3976 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 3977 | #line 3978 "configure" |
7be570e7 JM |
3978 | #include "confdefs.h" |
3979 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3980 | /* We use char because int might match the return type of a gcc2 | |
3981 | builtin and then its argument prototype would still apply. */ | |
3982 | char socketpair(); | |
3983 | ||
3984 | int main() { | |
3985 | socketpair() | |
3986 | ; return 0; } | |
3987 | EOF | |
6ce2ac0b | 3988 | if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
3989 | rm -rf conftest* |
3990 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3991 | else | |
3992 | echo "configure: failed program was:" >&5 | |
3993 | cat conftest.$ac_ext >&5 | |
3994 | rm -rf conftest* | |
3995 | eval "ac_cv_lib_$ac_lib_var=no" | |
3996 | fi | |
3997 | rm -f conftest* | |
3998 | LIBS="$ac_save_LIBS" | |
3999 | ||
4000 | fi | |
4001 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4002 | echo "$ac_t""yes" 1>&6 | |
4003 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4004 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4005 | cat >> confdefs.h <<EOF | |
4006 | #define $ac_tr_lib 1 | |
4007 | EOF | |
4008 | ||
4009 | LIBS="-lsocket $LIBS" | |
4010 | ||
4011 | else | |
4012 | echo "$ac_t""no" 1>&6 | |
4013 | fi | |
4014 | ||
4015 | for ac_func in socketpair | |
4016 | do | |
4017 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 4018 | echo "configure:4019: checking for $ac_func" >&5 |
7be570e7 JM |
4019 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4020 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4021 | else | |
4022 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4023 | #line 4024 "configure" |
7be570e7 JM |
4024 | #include "confdefs.h" |
4025 | /* System header to define __stub macros and hopefully few prototypes, | |
4026 | which can conflict with char $ac_func(); below. */ | |
4027 | #include <assert.h> | |
4028 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4029 | /* We use char because int might match the return type of a gcc2 | |
4030 | builtin and then its argument prototype would still apply. */ | |
4031 | char $ac_func(); | |
4032 | ||
4033 | int main() { | |
4034 | ||
4035 | /* The GNU C library defines this for functions which it implements | |
4036 | to always fail with ENOSYS. Some functions are actually named | |
4037 | something starting with __ and the normal name is an alias. */ | |
4038 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4039 | choke me | |
4040 | #else | |
4041 | $ac_func(); | |
4042 | #endif | |
4043 | ||
4044 | ; return 0; } | |
4045 | EOF | |
6ce2ac0b | 4046 | if { (eval echo configure:4047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4047 | rm -rf conftest* |
4048 | eval "ac_cv_func_$ac_func=yes" | |
4049 | else | |
4050 | echo "configure: failed program was:" >&5 | |
4051 | cat conftest.$ac_ext >&5 | |
4052 | rm -rf conftest* | |
4053 | eval "ac_cv_func_$ac_func=no" | |
4054 | fi | |
4055 | rm -f conftest* | |
4056 | fi | |
4057 | ||
4058 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4059 | echo "$ac_t""yes" 1>&6 | |
4060 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4061 | cat >> confdefs.h <<EOF | |
4062 | #define $ac_tr_func 1 | |
4063 | EOF | |
4064 | ||
4065 | else | |
4066 | echo "$ac_t""no" 1>&6 | |
4067 | fi | |
4068 | done | |
4069 | ||
4070 | ||
4071 | ||
c906108c | 4072 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
6ce2ac0b | 4073 | echo "configure:4074: checking whether malloc must be declared" >&5 |
c906108c SS |
4074 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4075 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4076 | else | |
4077 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4078 | #line 4079 "configure" |
c906108c SS |
4079 | #include "confdefs.h" |
4080 | ||
4081 | #include <stdio.h> | |
4082 | #ifdef HAVE_STRING_H | |
4083 | #include <string.h> | |
4084 | #else | |
4085 | #ifdef HAVE_STRINGS_H | |
4086 | #include <strings.h> | |
4087 | #endif | |
4088 | #endif | |
4089 | #ifdef HAVE_STDLIB_H | |
4090 | #include <stdlib.h> | |
4091 | #endif | |
4092 | #ifdef HAVE_UNISTD_H | |
4093 | #include <unistd.h> | |
4094 | #endif | |
4095 | int main() { | |
4096 | char *(*pfn) = (char *(*)) malloc | |
4097 | ; return 0; } | |
4098 | EOF | |
6ce2ac0b | 4099 | if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4100 | rm -rf conftest* |
4101 | bfd_cv_decl_needed_malloc=no | |
4102 | else | |
4103 | echo "configure: failed program was:" >&5 | |
4104 | cat conftest.$ac_ext >&5 | |
4105 | rm -rf conftest* | |
4106 | bfd_cv_decl_needed_malloc=yes | |
4107 | fi | |
4108 | rm -f conftest* | |
4109 | fi | |
4110 | ||
4111 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4112 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4113 | cat >> confdefs.h <<\EOF | |
4114 | #define NEED_DECLARATION_MALLOC 1 | |
4115 | EOF | |
4116 | ||
4117 | fi | |
4118 | ||
4119 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
6ce2ac0b | 4120 | echo "configure:4121: checking whether realloc must be declared" >&5 |
c906108c SS |
4121 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4123 | else | |
4124 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4125 | #line 4126 "configure" |
c906108c SS |
4126 | #include "confdefs.h" |
4127 | ||
4128 | #include <stdio.h> | |
4129 | #ifdef HAVE_STRING_H | |
4130 | #include <string.h> | |
4131 | #else | |
4132 | #ifdef HAVE_STRINGS_H | |
4133 | #include <strings.h> | |
4134 | #endif | |
4135 | #endif | |
4136 | #ifdef HAVE_STDLIB_H | |
4137 | #include <stdlib.h> | |
4138 | #endif | |
4139 | #ifdef HAVE_UNISTD_H | |
4140 | #include <unistd.h> | |
4141 | #endif | |
4142 | int main() { | |
4143 | char *(*pfn) = (char *(*)) realloc | |
4144 | ; return 0; } | |
4145 | EOF | |
6ce2ac0b | 4146 | if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4147 | rm -rf conftest* |
4148 | bfd_cv_decl_needed_realloc=no | |
4149 | else | |
4150 | echo "configure: failed program was:" >&5 | |
4151 | cat conftest.$ac_ext >&5 | |
4152 | rm -rf conftest* | |
4153 | bfd_cv_decl_needed_realloc=yes | |
4154 | fi | |
4155 | rm -f conftest* | |
4156 | fi | |
4157 | ||
4158 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4159 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4160 | cat >> confdefs.h <<\EOF | |
4161 | #define NEED_DECLARATION_REALLOC 1 | |
4162 | EOF | |
4163 | ||
4164 | fi | |
4165 | ||
4166 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
6ce2ac0b | 4167 | echo "configure:4168: checking whether free must be declared" >&5 |
c906108c SS |
4168 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4170 | else | |
4171 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4172 | #line 4173 "configure" |
c906108c SS |
4173 | #include "confdefs.h" |
4174 | ||
4175 | #include <stdio.h> | |
4176 | #ifdef HAVE_STRING_H | |
4177 | #include <string.h> | |
4178 | #else | |
4179 | #ifdef HAVE_STRINGS_H | |
4180 | #include <strings.h> | |
4181 | #endif | |
4182 | #endif | |
4183 | #ifdef HAVE_STDLIB_H | |
4184 | #include <stdlib.h> | |
4185 | #endif | |
4186 | #ifdef HAVE_UNISTD_H | |
4187 | #include <unistd.h> | |
4188 | #endif | |
4189 | int main() { | |
4190 | char *(*pfn) = (char *(*)) free | |
4191 | ; return 0; } | |
4192 | EOF | |
6ce2ac0b | 4193 | if { (eval echo configure:4194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4194 | rm -rf conftest* |
4195 | bfd_cv_decl_needed_free=no | |
4196 | else | |
4197 | echo "configure: failed program was:" >&5 | |
4198 | cat conftest.$ac_ext >&5 | |
4199 | rm -rf conftest* | |
4200 | bfd_cv_decl_needed_free=yes | |
4201 | fi | |
4202 | rm -f conftest* | |
4203 | fi | |
4204 | ||
4205 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4206 | if test $bfd_cv_decl_needed_free = yes; then | |
4207 | cat >> confdefs.h <<\EOF | |
4208 | #define NEED_DECLARATION_FREE 1 | |
4209 | EOF | |
4210 | ||
4211 | fi | |
4212 | ||
4213 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
6ce2ac0b | 4214 | echo "configure:4215: checking whether strerror must be declared" >&5 |
c906108c SS |
4215 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4216 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4217 | else | |
4218 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4219 | #line 4220 "configure" |
c906108c SS |
4220 | #include "confdefs.h" |
4221 | ||
4222 | #include <stdio.h> | |
4223 | #ifdef HAVE_STRING_H | |
4224 | #include <string.h> | |
4225 | #else | |
4226 | #ifdef HAVE_STRINGS_H | |
4227 | #include <strings.h> | |
4228 | #endif | |
4229 | #endif | |
4230 | #ifdef HAVE_STDLIB_H | |
4231 | #include <stdlib.h> | |
4232 | #endif | |
4233 | #ifdef HAVE_UNISTD_H | |
4234 | #include <unistd.h> | |
4235 | #endif | |
4236 | int main() { | |
4237 | char *(*pfn) = (char *(*)) strerror | |
4238 | ; return 0; } | |
4239 | EOF | |
6ce2ac0b | 4240 | if { (eval echo configure:4241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4241 | rm -rf conftest* |
4242 | bfd_cv_decl_needed_strerror=no | |
4243 | else | |
4244 | echo "configure: failed program was:" >&5 | |
4245 | cat conftest.$ac_ext >&5 | |
4246 | rm -rf conftest* | |
4247 | bfd_cv_decl_needed_strerror=yes | |
4248 | fi | |
4249 | rm -f conftest* | |
4250 | fi | |
4251 | ||
4252 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4253 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4254 | cat >> confdefs.h <<\EOF | |
4255 | #define NEED_DECLARATION_STRERROR 1 | |
4256 | EOF | |
4257 | ||
4258 | fi | |
4259 | ||
4260 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
6ce2ac0b | 4261 | echo "configure:4262: checking whether strdup must be declared" >&5 |
c906108c SS |
4262 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4264 | else | |
4265 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4266 | #line 4267 "configure" |
c906108c SS |
4267 | #include "confdefs.h" |
4268 | ||
4269 | #include <stdio.h> | |
4270 | #ifdef HAVE_STRING_H | |
4271 | #include <string.h> | |
4272 | #else | |
4273 | #ifdef HAVE_STRINGS_H | |
4274 | #include <strings.h> | |
4275 | #endif | |
4276 | #endif | |
4277 | #ifdef HAVE_STDLIB_H | |
4278 | #include <stdlib.h> | |
4279 | #endif | |
4280 | #ifdef HAVE_UNISTD_H | |
4281 | #include <unistd.h> | |
4282 | #endif | |
4283 | int main() { | |
4284 | char *(*pfn) = (char *(*)) strdup | |
4285 | ; return 0; } | |
4286 | EOF | |
6ce2ac0b | 4287 | if { (eval echo configure:4288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4288 | rm -rf conftest* |
4289 | bfd_cv_decl_needed_strdup=no | |
4290 | else | |
4291 | echo "configure: failed program was:" >&5 | |
4292 | cat conftest.$ac_ext >&5 | |
4293 | rm -rf conftest* | |
4294 | bfd_cv_decl_needed_strdup=yes | |
4295 | fi | |
4296 | rm -f conftest* | |
4297 | fi | |
4298 | ||
4299 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4300 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4301 | cat >> confdefs.h <<\EOF | |
4302 | #define NEED_DECLARATION_STRDUP 1 | |
4303 | EOF | |
4304 | ||
4305 | fi | |
4306 | ||
b83266a0 | 4307 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
6ce2ac0b | 4308 | echo "configure:4309: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4309 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4311 | else | |
4312 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4313 | #line 4314 "configure" |
b83266a0 SS |
4314 | #include "confdefs.h" |
4315 | ||
4316 | #include <stdio.h> | |
4317 | #ifdef HAVE_STRING_H | |
4318 | #include <string.h> | |
4319 | #else | |
4320 | #ifdef HAVE_STRINGS_H | |
4321 | #include <strings.h> | |
4322 | #endif | |
4323 | #endif | |
4324 | #ifdef HAVE_STDLIB_H | |
4325 | #include <stdlib.h> | |
4326 | #endif | |
4327 | #ifdef HAVE_UNISTD_H | |
4328 | #include <unistd.h> | |
4329 | #endif | |
4330 | int main() { | |
4331 | char *(*pfn) = (char *(*)) strstr | |
4332 | ; return 0; } | |
4333 | EOF | |
6ce2ac0b | 4334 | if { (eval echo configure:4335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4335 | rm -rf conftest* |
4336 | bfd_cv_decl_needed_strstr=no | |
4337 | else | |
4338 | echo "configure: failed program was:" >&5 | |
4339 | cat conftest.$ac_ext >&5 | |
4340 | rm -rf conftest* | |
4341 | bfd_cv_decl_needed_strstr=yes | |
4342 | fi | |
4343 | rm -f conftest* | |
4344 | fi | |
4345 | ||
4346 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4347 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4348 | cat >> confdefs.h <<\EOF | |
4349 | #define NEED_DECLARATION_STRSTR 1 | |
4350 | EOF | |
4351 | ||
4352 | fi | |
4353 | ||
c906108c SS |
4354 | |
4355 | ||
4356 | # The following save_state_t checkery is only necessary for HPUX | |
4357 | # versions earlier than 10.20. When those fade from memory, this | |
4358 | # could be expunged. --jsm 1999-03-22 | |
4359 | ||
4360 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
6ce2ac0b | 4361 | echo "configure:4362: checking for HPUX save_state structure" >&5 |
c906108c | 4362 | cat > conftest.$ac_ext <<EOF |
6ce2ac0b | 4363 | #line 4364 "configure" |
c906108c SS |
4364 | #include "confdefs.h" |
4365 | #include <machine/save_state.h> | |
4366 | EOF | |
4367 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4368 | egrep "save_state_t" >/dev/null 2>&1; then | |
4369 | rm -rf conftest* | |
4370 | gdb_cv_hpux_savestate=yes | |
4371 | else | |
4372 | rm -rf conftest* | |
4373 | gdb_cv_hpux_savestate=no | |
4374 | fi | |
4375 | rm -f conftest* | |
4376 | ||
4377 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4378 | #line 4379 "configure" |
c906108c SS |
4379 | #include "confdefs.h" |
4380 | #include <machine/save_state.h> | |
4381 | EOF | |
4382 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4383 | egrep "ss_wide" >/dev/null 2>&1; then | |
4384 | rm -rf conftest* | |
4385 | gdb_cv_hpux_sswide=yes | |
4386 | else | |
4387 | rm -rf conftest* | |
4388 | gdb_cv_hpux_sswide=no | |
4389 | fi | |
4390 | rm -f conftest* | |
4391 | ||
4392 | if test $gdb_cv_hpux_savestate = yes | |
4393 | then | |
4394 | cat >> confdefs.h <<\EOF | |
4395 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4396 | EOF | |
4397 | ||
4398 | fi | |
4399 | if test $gdb_cv_hpux_sswide = yes | |
4400 | then | |
4401 | cat >> confdefs.h <<\EOF | |
4402 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4403 | EOF | |
4404 | ||
4405 | fi | |
4406 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4407 | ||
4408 | ||
4409 | # If we are configured native on GNU/Linux, work around problems with | |
4410 | # sys/procfs.h | |
c3f6f71d | 4411 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4412 | |
4413 | if test "${target}" = "${host}"; then | |
4414 | case "${host}" in | |
4415 | i[3456]86-*-linux*) | |
4416 | cat >> confdefs.h <<\EOF | |
4417 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4418 | EOF | |
4419 | ||
4420 | cat >> confdefs.h <<\EOF | |
4421 | #define sys_quotactl 1 | |
4422 | EOF | |
4423 | ||
4424 | ;; | |
c5394b80 | 4425 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4426 | cat >> confdefs.h <<\EOF |
4427 | #define NEW_PROC_API 1 | |
c906108c SS |
4428 | EOF |
4429 | ||
c3f6f71d | 4430 | ;; |
3423db82 | 4431 | *-*-solaris2.[678]) |
c3f6f71d JM |
4432 | cat >> confdefs.h <<\EOF |
4433 | #define NEW_PROC_API 1 | |
4434 | EOF | |
4435 | ||
4436 | ;; | |
4437 | esac | |
c906108c SS |
4438 | fi |
4439 | ||
4440 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4441 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
6ce2ac0b | 4442 | echo "configure:4443: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4443 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4445 | else | |
4446 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4447 | #line 4448 "configure" |
c906108c SS |
4448 | #include "confdefs.h" |
4449 | #include <sys/procfs.h> | |
4450 | int main() { | |
4451 | pstatus_t avar | |
4452 | ; return 0; } | |
4453 | EOF | |
6ce2ac0b | 4454 | if { (eval echo configure:4455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4455 | rm -rf conftest* |
4456 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
4457 | else | |
4458 | echo "configure: failed program was:" >&5 | |
4459 | cat conftest.$ac_ext >&5 | |
4460 | rm -rf conftest* | |
4461 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
4462 | ||
4463 | fi | |
4464 | rm -f conftest* | |
4465 | fi | |
4466 | ||
4467 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
4468 | cat >> confdefs.h <<\EOF | |
4469 | #define HAVE_PSTATUS_T 1 | |
4470 | EOF | |
4471 | ||
4472 | fi | |
4473 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
4474 | ||
4475 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
6ce2ac0b | 4476 | echo "configure:4477: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
4477 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
4478 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4479 | else | |
4480 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4481 | #line 4482 "configure" |
c906108c SS |
4482 | #include "confdefs.h" |
4483 | #include <sys/procfs.h> | |
4484 | int main() { | |
4485 | prrun_t avar | |
4486 | ; return 0; } | |
4487 | EOF | |
6ce2ac0b | 4488 | if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4489 | rm -rf conftest* |
4490 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
4491 | else | |
4492 | echo "configure: failed program was:" >&5 | |
4493 | cat conftest.$ac_ext >&5 | |
4494 | rm -rf conftest* | |
4495 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
4496 | ||
4497 | fi | |
4498 | rm -f conftest* | |
4499 | fi | |
4500 | ||
4501 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
4502 | cat >> confdefs.h <<\EOF | |
4503 | #define HAVE_PRRUN_T 1 | |
4504 | EOF | |
4505 | ||
4506 | fi | |
4507 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
4508 | ||
4509 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
6ce2ac0b | 4510 | echo "configure:4511: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
4511 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
4512 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4513 | else | |
4514 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4515 | #line 4516 "configure" |
c906108c SS |
4516 | #include "confdefs.h" |
4517 | #include <sys/procfs.h> | |
4518 | int main() { | |
4519 | gregset_t avar | |
4520 | ; return 0; } | |
4521 | EOF | |
6ce2ac0b | 4522 | if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4523 | rm -rf conftest* |
4524 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
4525 | else | |
4526 | echo "configure: failed program was:" >&5 | |
4527 | cat conftest.$ac_ext >&5 | |
4528 | rm -rf conftest* | |
4529 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
4530 | ||
4531 | fi | |
4532 | rm -f conftest* | |
4533 | fi | |
4534 | ||
4535 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
4536 | cat >> confdefs.h <<\EOF | |
4537 | #define HAVE_GREGSET_T 1 | |
4538 | EOF | |
4539 | ||
4540 | fi | |
4541 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
4542 | ||
4543 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
6ce2ac0b | 4544 | echo "configure:4545: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
4545 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
4546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4547 | else | |
4548 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4549 | #line 4550 "configure" |
c906108c SS |
4550 | #include "confdefs.h" |
4551 | #include <sys/procfs.h> | |
4552 | int main() { | |
4553 | fpregset_t avar | |
4554 | ; return 0; } | |
4555 | EOF | |
6ce2ac0b | 4556 | if { (eval echo configure:4557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4557 | rm -rf conftest* |
4558 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
4559 | else | |
4560 | echo "configure: failed program was:" >&5 | |
4561 | cat conftest.$ac_ext >&5 | |
4562 | rm -rf conftest* | |
4563 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
4564 | ||
4565 | fi | |
4566 | rm -f conftest* | |
4567 | fi | |
4568 | ||
4569 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
4570 | cat >> confdefs.h <<\EOF | |
4571 | #define HAVE_FPREGSET_T 1 | |
4572 | EOF | |
4573 | ||
4574 | fi | |
4575 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
4576 | ||
3862412b | 4577 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
6ce2ac0b | 4578 | echo "configure:4579: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
4579 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
4580 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4581 | else | |
4582 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4583 | #line 4584 "configure" |
3862412b MK |
4584 | #include "confdefs.h" |
4585 | #include <sys/procfs.h> | |
4586 | int main() { | |
4587 | prgregset_t avar | |
4588 | ; return 0; } | |
4589 | EOF | |
6ce2ac0b | 4590 | if { (eval echo configure:4591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4591 | rm -rf conftest* |
4592 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
4593 | else | |
4594 | echo "configure: failed program was:" >&5 | |
4595 | cat conftest.$ac_ext >&5 | |
4596 | rm -rf conftest* | |
4597 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
4598 | ||
4599 | fi | |
4600 | rm -f conftest* | |
4601 | fi | |
4602 | ||
4603 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
4604 | cat >> confdefs.h <<\EOF | |
4605 | #define HAVE_PRGREGSET_T 1 | |
4606 | EOF | |
4607 | ||
4608 | fi | |
4609 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
4610 | ||
4611 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
6ce2ac0b | 4612 | echo "configure:4613: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
4613 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
4614 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4615 | else | |
4616 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4617 | #line 4618 "configure" |
3862412b MK |
4618 | #include "confdefs.h" |
4619 | #include <sys/procfs.h> | |
4620 | int main() { | |
4621 | prfpregset_t avar | |
4622 | ; return 0; } | |
4623 | EOF | |
6ce2ac0b | 4624 | if { (eval echo configure:4625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4625 | rm -rf conftest* |
4626 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
4627 | else | |
4628 | echo "configure: failed program was:" >&5 | |
4629 | cat conftest.$ac_ext >&5 | |
4630 | rm -rf conftest* | |
4631 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
4632 | ||
4633 | fi | |
4634 | rm -f conftest* | |
4635 | fi | |
4636 | ||
4637 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
4638 | cat >> confdefs.h <<\EOF | |
4639 | #define HAVE_PRFPREGSET_T 1 | |
4640 | EOF | |
4641 | ||
4642 | fi | |
4643 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
4644 | ||
4645 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 | |
6ce2ac0b | 4646 | echo "configure:4647: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
4647 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
4648 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4649 | else | |
4650 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4651 | #line 4652 "configure" |
3862412b MK |
4652 | #include "confdefs.h" |
4653 | #include <sys/procfs.h> | |
4654 | int main() { | |
4655 | lwpid_t avar | |
4656 | ; return 0; } | |
4657 | EOF | |
6ce2ac0b | 4658 | if { (eval echo configure:4659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4659 | rm -rf conftest* |
4660 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
4661 | else | |
4662 | echo "configure: failed program was:" >&5 | |
4663 | cat conftest.$ac_ext >&5 | |
4664 | rm -rf conftest* | |
4665 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
4666 | ||
4667 | fi | |
4668 | rm -f conftest* | |
4669 | fi | |
4670 | ||
4671 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
4672 | cat >> confdefs.h <<\EOF | |
4673 | #define HAVE_LWPID_T 1 | |
4674 | EOF | |
4675 | ||
4676 | fi | |
4677 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
4678 | ||
4679 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
6ce2ac0b | 4680 | echo "configure:4681: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
4681 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
4682 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4683 | else | |
4684 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4685 | #line 4686 "configure" |
3862412b MK |
4686 | #include "confdefs.h" |
4687 | #include <sys/procfs.h> | |
4688 | int main() { | |
4689 | psaddr_t avar | |
4690 | ; return 0; } | |
4691 | EOF | |
6ce2ac0b | 4692 | if { (eval echo configure:4693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4693 | rm -rf conftest* |
4694 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
4695 | else | |
4696 | echo "configure: failed program was:" >&5 | |
4697 | cat conftest.$ac_ext >&5 | |
4698 | rm -rf conftest* | |
4699 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
4700 | ||
4701 | fi | |
4702 | rm -f conftest* | |
4703 | fi | |
4704 | ||
4705 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
4706 | cat >> confdefs.h <<\EOF | |
4707 | #define HAVE_PSADDR_T 1 | |
4708 | EOF | |
4709 | ||
4710 | fi | |
4711 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
4712 | ||
c906108c SS |
4713 | |
4714 | ||
746a987d | 4715 | |
d84dd0c5 MK |
4716 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
4717 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
6ce2ac0b | 4718 | echo "configure:4719: checking whether prfpregset_t type is broken" >&5 |
d84dd0c5 MK |
4719 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
4720 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4721 | else | |
4722 | if test "$cross_compiling" = yes; then | |
4723 | gdb_cv_prfpregset_t_broken=yes | |
4724 | else | |
4725 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4726 | #line 4727 "configure" |
d84dd0c5 MK |
4727 | #include "confdefs.h" |
4728 | #include <sys/procfs.h> | |
4729 | int main () | |
4730 | { | |
4731 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
4732 | return 1; | |
4733 | return 0; | |
4734 | } | |
4735 | EOF | |
6ce2ac0b | 4736 | if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
d84dd0c5 MK |
4737 | then |
4738 | gdb_cv_prfpregset_t_broken=no | |
4739 | else | |
4740 | echo "configure: failed program was:" >&5 | |
4741 | cat conftest.$ac_ext >&5 | |
4742 | rm -fr conftest* | |
4743 | gdb_cv_prfpregset_t_broken=yes | |
4744 | fi | |
4745 | rm -fr conftest* | |
4746 | fi | |
4747 | ||
4748 | fi | |
4749 | ||
4750 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 | |
4751 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
4752 | cat >> confdefs.h <<\EOF | |
4753 | #define PRFPREGSET_T_BROKEN 1 | |
4754 | EOF | |
4755 | ||
4756 | fi | |
4757 | fi | |
4758 | ||
4759 | ||
c906108c | 4760 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 |
6ce2ac0b | 4761 | echo "configure:4762: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
4762 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
4763 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4764 | else | |
4765 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4766 | #line 4767 "configure" |
c906108c SS |
4767 | #include "confdefs.h" |
4768 | #include <unistd.h> | |
4769 | #include <sys/types.h> | |
4770 | #include <sys/procfs.h> | |
4771 | ||
4772 | int main() { | |
4773 | ||
4774 | int dummy;; | |
4775 | dummy = ioctl(0, PIOCSET, &dummy); | |
4776 | ||
4777 | ; return 0; } | |
4778 | EOF | |
6ce2ac0b | 4779 | if { (eval echo configure:4780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4780 | rm -rf conftest* |
4781 | gdb_cv_have_procfs_piocset=yes | |
4782 | else | |
4783 | echo "configure: failed program was:" >&5 | |
4784 | cat conftest.$ac_ext >&5 | |
4785 | rm -rf conftest* | |
4786 | gdb_cv_have_procfs_piocset=no | |
4787 | fi | |
4788 | rm -f conftest* | |
4789 | fi | |
4790 | ||
4791 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
4792 | if test $gdb_cv_have_procfs_piocset = yes; then | |
4793 | cat >> confdefs.h <<\EOF | |
4794 | #define HAVE_PROCFS_PIOCSET 1 | |
4795 | EOF | |
4796 | ||
4797 | fi | |
4798 | fi | |
4799 | ||
4800 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
6ce2ac0b | 4801 | echo "configure:4802: checking for main in -lm" >&5 |
c906108c SS |
4802 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
4803 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4805 | else | |
4806 | ac_save_LIBS="$LIBS" | |
4807 | LIBS="-lm $LIBS" | |
4808 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4809 | #line 4810 "configure" |
c906108c SS |
4810 | #include "confdefs.h" |
4811 | ||
4812 | int main() { | |
4813 | main() | |
4814 | ; return 0; } | |
4815 | EOF | |
6ce2ac0b | 4816 | if { (eval echo configure:4817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4817 | rm -rf conftest* |
4818 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4819 | else | |
4820 | echo "configure: failed program was:" >&5 | |
4821 | cat conftest.$ac_ext >&5 | |
4822 | rm -rf conftest* | |
4823 | eval "ac_cv_lib_$ac_lib_var=no" | |
4824 | fi | |
4825 | rm -f conftest* | |
4826 | LIBS="$ac_save_LIBS" | |
4827 | ||
4828 | fi | |
4829 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4830 | echo "$ac_t""yes" 1>&6 | |
4831 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4832 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4833 | cat >> confdefs.h <<EOF | |
4834 | #define $ac_tr_lib 1 | |
4835 | EOF | |
4836 | ||
4837 | LIBS="-lm $LIBS" | |
4838 | ||
4839 | else | |
4840 | echo "$ac_t""no" 1>&6 | |
4841 | fi | |
4842 | ||
4843 | ||
4844 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
6ce2ac0b | 4845 | echo "configure:4846: checking for wctype in -lc" >&5 |
c906108c SS |
4846 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
4847 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4848 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4849 | else | |
4850 | ac_save_LIBS="$LIBS" | |
4851 | LIBS="-lc $LIBS" | |
4852 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4853 | #line 4854 "configure" |
c906108c SS |
4854 | #include "confdefs.h" |
4855 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4856 | /* We use char because int might match the return type of a gcc2 | |
4857 | builtin and then its argument prototype would still apply. */ | |
4858 | char wctype(); | |
4859 | ||
4860 | int main() { | |
4861 | wctype() | |
4862 | ; return 0; } | |
4863 | EOF | |
6ce2ac0b | 4864 | if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4865 | rm -rf conftest* |
4866 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4867 | else | |
4868 | echo "configure: failed program was:" >&5 | |
4869 | cat conftest.$ac_ext >&5 | |
4870 | rm -rf conftest* | |
4871 | eval "ac_cv_lib_$ac_lib_var=no" | |
4872 | fi | |
4873 | rm -f conftest* | |
4874 | LIBS="$ac_save_LIBS" | |
4875 | ||
4876 | fi | |
4877 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4878 | echo "$ac_t""yes" 1>&6 | |
4879 | : | |
4880 | else | |
4881 | echo "$ac_t""no" 1>&6 | |
4882 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
6ce2ac0b | 4883 | echo "configure:4884: checking for wctype in -lw" >&5 |
c906108c SS |
4884 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
4885 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4886 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4887 | else | |
4888 | ac_save_LIBS="$LIBS" | |
4889 | LIBS="-lw $LIBS" | |
4890 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4891 | #line 4892 "configure" |
c906108c SS |
4892 | #include "confdefs.h" |
4893 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4894 | /* We use char because int might match the return type of a gcc2 | |
4895 | builtin and then its argument prototype would still apply. */ | |
4896 | char wctype(); | |
4897 | ||
4898 | int main() { | |
4899 | wctype() | |
4900 | ; return 0; } | |
4901 | EOF | |
6ce2ac0b | 4902 | if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4903 | rm -rf conftest* |
4904 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4905 | else | |
4906 | echo "configure: failed program was:" >&5 | |
4907 | cat conftest.$ac_ext >&5 | |
4908 | rm -rf conftest* | |
4909 | eval "ac_cv_lib_$ac_lib_var=no" | |
4910 | fi | |
4911 | rm -f conftest* | |
4912 | LIBS="$ac_save_LIBS" | |
4913 | ||
4914 | fi | |
4915 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4916 | echo "$ac_t""yes" 1>&6 | |
4917 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
4918 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4919 | cat >> confdefs.h <<EOF | |
4920 | #define $ac_tr_lib 1 | |
4921 | EOF | |
4922 | ||
4923 | LIBS="-lw $LIBS" | |
4924 | ||
4925 | else | |
4926 | echo "$ac_t""no" 1>&6 | |
4927 | fi | |
4928 | ||
4929 | fi | |
4930 | ||
4931 | ||
4932 | ||
4933 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
6ce2ac0b | 4934 | echo "configure:4935: checking for long long support in compiler" >&5 |
c906108c SS |
4935 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
4936 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4937 | else | |
4938 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4939 | #line 4940 "configure" |
c906108c SS |
4940 | #include "confdefs.h" |
4941 | ||
4942 | int main() { | |
4943 | ||
4944 | extern long long foo; | |
4945 | switch (foo & 2) { case 0: return 1; } | |
4946 | ||
4947 | ; return 0; } | |
4948 | EOF | |
6ce2ac0b | 4949 | if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4950 | rm -rf conftest* |
4951 | gdb_cv_c_long_long=yes | |
4952 | else | |
4953 | echo "configure: failed program was:" >&5 | |
4954 | cat conftest.$ac_ext >&5 | |
4955 | rm -rf conftest* | |
4956 | gdb_cv_c_long_long=no | |
4957 | fi | |
4958 | rm -f conftest* | |
4959 | fi | |
4960 | ||
4961 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
4962 | if test $gdb_cv_c_long_long = yes; then | |
4963 | cat >> confdefs.h <<\EOF | |
4964 | #define CC_HAS_LONG_LONG 1 | |
4965 | EOF | |
4966 | ||
4967 | fi | |
4968 | ||
4969 | ||
4970 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
6ce2ac0b | 4971 | echo "configure:4972: checking for long long support in printf" >&5 |
c906108c SS |
4972 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
4973 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4974 | else | |
4975 | if test "$cross_compiling" = yes; then | |
4976 | gdb_cv_printf_has_long_long=no | |
4977 | else | |
4978 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 4979 | #line 4980 "configure" |
c906108c SS |
4980 | #include "confdefs.h" |
4981 | ||
4982 | int main () { | |
4983 | char buf[32]; | |
4984 | long long l = 0; | |
4985 | l = (l << 16) + 0x0123; | |
4986 | l = (l << 16) + 0x4567; | |
4987 | l = (l << 16) + 0x89ab; | |
4988 | l = (l << 16) + 0xcdef; | |
4989 | sprintf (buf, "0x%016llx", l); | |
4990 | return (strcmp ("0x0123456789abcdef", buf)); | |
4991 | } | |
4992 | EOF | |
6ce2ac0b | 4993 | if { (eval echo configure:4994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
4994 | then |
4995 | gdb_cv_printf_has_long_long=yes | |
4996 | else | |
4997 | echo "configure: failed program was:" >&5 | |
4998 | cat conftest.$ac_ext >&5 | |
4999 | rm -fr conftest* | |
5000 | gdb_cv_printf_has_long_long=no | |
5001 | fi | |
5002 | rm -fr conftest* | |
5003 | fi | |
5004 | ||
5005 | fi | |
5006 | ||
5007 | if test $gdb_cv_printf_has_long_long = yes; then | |
5008 | cat >> confdefs.h <<\EOF | |
5009 | #define PRINTF_HAS_LONG_LONG 1 | |
5010 | EOF | |
5011 | ||
5012 | fi | |
5013 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
5014 | ||
5015 | ||
5016 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
6ce2ac0b | 5017 | echo "configure:5018: checking for long double support in compiler" >&5 |
c906108c SS |
5018 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
5019 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5020 | else | |
5021 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5022 | #line 5023 "configure" |
c906108c SS |
5023 | #include "confdefs.h" |
5024 | ||
5025 | int main() { | |
5026 | long double foo; | |
5027 | ; return 0; } | |
5028 | EOF | |
6ce2ac0b | 5029 | if { (eval echo configure:5030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5030 | rm -rf conftest* |
5031 | ac_cv_c_long_double=yes | |
5032 | else | |
5033 | echo "configure: failed program was:" >&5 | |
5034 | cat conftest.$ac_ext >&5 | |
5035 | rm -rf conftest* | |
5036 | ac_cv_c_long_double=no | |
5037 | fi | |
5038 | rm -f conftest* | |
5039 | fi | |
5040 | ||
5041 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
5042 | if test $ac_cv_c_long_double = yes; then | |
5043 | cat >> confdefs.h <<\EOF | |
5044 | #define HAVE_LONG_DOUBLE 1 | |
5045 | EOF | |
5046 | ||
5047 | fi | |
5048 | ||
5049 | ||
5050 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
6ce2ac0b | 5051 | echo "configure:5052: checking for long double support in printf" >&5 |
c906108c SS |
5052 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
5053 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5054 | else | |
5055 | if test "$cross_compiling" = yes; then | |
5056 | gdb_cv_printf_has_long_double=no | |
5057 | else | |
5058 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5059 | #line 5060 "configure" |
c906108c SS |
5060 | #include "confdefs.h" |
5061 | ||
5062 | int main () { | |
5063 | char buf[16]; | |
5064 | long double f = 3.141592653; | |
5065 | sprintf (buf, "%Lg", f); | |
5066 | return (strncmp ("3.14159", buf, 7)); | |
5067 | } | |
5068 | EOF | |
6ce2ac0b | 5069 | if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5070 | then |
5071 | gdb_cv_printf_has_long_double=yes | |
5072 | else | |
5073 | echo "configure: failed program was:" >&5 | |
5074 | cat conftest.$ac_ext >&5 | |
5075 | rm -fr conftest* | |
5076 | gdb_cv_printf_has_long_double=no | |
5077 | fi | |
5078 | rm -fr conftest* | |
5079 | fi | |
5080 | ||
5081 | fi | |
5082 | ||
5083 | if test $gdb_cv_printf_has_long_double = yes; then | |
5084 | cat >> confdefs.h <<\EOF | |
5085 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
5086 | EOF | |
5087 | ||
5088 | fi | |
5089 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
5090 | ||
5091 | ||
5092 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
6ce2ac0b | 5093 | echo "configure:5094: checking for long double support in scanf" >&5 |
c906108c SS |
5094 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
5095 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5096 | else | |
5097 | if test "$cross_compiling" = yes; then | |
5098 | gdb_cv_scanf_has_long_double=no | |
5099 | else | |
5100 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5101 | #line 5102 "configure" |
c906108c SS |
5102 | #include "confdefs.h" |
5103 | ||
5104 | int main () { | |
5105 | char *buf = "3.141592653"; | |
5106 | long double f = 0; | |
5107 | sscanf (buf, "%Lg", &f); | |
5108 | return !(f > 3.14159 && f < 3.14160); | |
5109 | } | |
5110 | EOF | |
6ce2ac0b | 5111 | if { (eval echo configure:5112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5112 | then |
5113 | gdb_cv_scanf_has_long_double=yes | |
5114 | else | |
5115 | echo "configure: failed program was:" >&5 | |
5116 | cat conftest.$ac_ext >&5 | |
5117 | rm -fr conftest* | |
5118 | gdb_cv_scanf_has_long_double=no | |
5119 | fi | |
5120 | rm -fr conftest* | |
5121 | fi | |
5122 | ||
5123 | fi | |
5124 | ||
5125 | if test $gdb_cv_scanf_has_long_double = yes; then | |
5126 | cat >> confdefs.h <<\EOF | |
5127 | #define SCANF_HAS_LONG_DOUBLE 1 | |
5128 | EOF | |
5129 | ||
5130 | fi | |
5131 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
5132 | ||
5133 | for ac_hdr in unistd.h | |
5134 | do | |
5135 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5136 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
6ce2ac0b | 5137 | echo "configure:5138: checking for $ac_hdr" >&5 |
c906108c SS |
5138 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5139 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5140 | else | |
5141 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5142 | #line 5143 "configure" |
c906108c SS |
5143 | #include "confdefs.h" |
5144 | #include <$ac_hdr> | |
5145 | EOF | |
5146 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 5147 | { (eval echo configure:5148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5148 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5149 | if test -z "$ac_err"; then | |
5150 | rm -rf conftest* | |
5151 | eval "ac_cv_header_$ac_safe=yes" | |
5152 | else | |
5153 | echo "$ac_err" >&5 | |
5154 | echo "configure: failed program was:" >&5 | |
5155 | cat conftest.$ac_ext >&5 | |
5156 | rm -rf conftest* | |
5157 | eval "ac_cv_header_$ac_safe=no" | |
5158 | fi | |
5159 | rm -f conftest* | |
5160 | fi | |
5161 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5162 | echo "$ac_t""yes" 1>&6 | |
5163 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5164 | cat >> confdefs.h <<EOF | |
5165 | #define $ac_tr_hdr 1 | |
5166 | EOF | |
5167 | ||
5168 | else | |
5169 | echo "$ac_t""no" 1>&6 | |
5170 | fi | |
5171 | done | |
5172 | ||
5173 | for ac_func in getpagesize | |
5174 | do | |
5175 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6ce2ac0b | 5176 | echo "configure:5177: checking for $ac_func" >&5 |
c906108c SS |
5177 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5178 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5179 | else | |
5180 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5181 | #line 5182 "configure" |
c906108c SS |
5182 | #include "confdefs.h" |
5183 | /* System header to define __stub macros and hopefully few prototypes, | |
5184 | which can conflict with char $ac_func(); below. */ | |
5185 | #include <assert.h> | |
5186 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5187 | /* We use char because int might match the return type of a gcc2 | |
5188 | builtin and then its argument prototype would still apply. */ | |
5189 | char $ac_func(); | |
5190 | ||
5191 | int main() { | |
5192 | ||
5193 | /* The GNU C library defines this for functions which it implements | |
5194 | to always fail with ENOSYS. Some functions are actually named | |
5195 | something starting with __ and the normal name is an alias. */ | |
5196 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5197 | choke me | |
5198 | #else | |
5199 | $ac_func(); | |
5200 | #endif | |
5201 | ||
5202 | ; return 0; } | |
5203 | EOF | |
6ce2ac0b | 5204 | if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5205 | rm -rf conftest* |
5206 | eval "ac_cv_func_$ac_func=yes" | |
5207 | else | |
5208 | echo "configure: failed program was:" >&5 | |
5209 | cat conftest.$ac_ext >&5 | |
5210 | rm -rf conftest* | |
5211 | eval "ac_cv_func_$ac_func=no" | |
5212 | fi | |
5213 | rm -f conftest* | |
5214 | fi | |
5215 | ||
5216 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5217 | echo "$ac_t""yes" 1>&6 | |
5218 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5219 | cat >> confdefs.h <<EOF | |
5220 | #define $ac_tr_func 1 | |
5221 | EOF | |
5222 | ||
5223 | else | |
5224 | echo "$ac_t""no" 1>&6 | |
5225 | fi | |
5226 | done | |
5227 | ||
5228 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
6ce2ac0b | 5229 | echo "configure:5230: checking for working mmap" >&5 |
c906108c SS |
5230 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5231 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5232 | else | |
5233 | if test "$cross_compiling" = yes; then | |
5234 | ac_cv_func_mmap_fixed_mapped=no | |
5235 | else | |
5236 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5237 | #line 5238 "configure" |
c906108c SS |
5238 | #include "confdefs.h" |
5239 | ||
5240 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5241 | Here is a matrix of mmap possibilities: | |
5242 | mmap private not fixed | |
5243 | mmap private fixed at somewhere currently unmapped | |
5244 | mmap private fixed at somewhere already mapped | |
5245 | mmap shared not fixed | |
5246 | mmap shared fixed at somewhere currently unmapped | |
5247 | mmap shared fixed at somewhere already mapped | |
5248 | For private mappings, we should verify that changes cannot be read() | |
5249 | back from the file, nor mmap's back from the file at a different | |
5250 | address. (There have been systems where private was not correctly | |
5251 | implemented like the infamous i386 svr4.0, and systems where the | |
5252 | VM page cache was not coherent with the filesystem buffer cache | |
5253 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5254 | For shared mappings, we should conversely verify that changes get | |
5255 | propogated back to all the places they're supposed to be. | |
5256 | ||
5257 | Grep wants private fixed already mapped. | |
5258 | The main things grep needs to know about mmap are: | |
5259 | * does it exist and is it safe to write into the mmap'd area | |
5260 | * how to use it (BSD variants) */ | |
5261 | #include <sys/types.h> | |
5262 | #include <fcntl.h> | |
5263 | #include <sys/mman.h> | |
5264 | ||
5265 | /* This mess was copied from the GNU getpagesize.h. */ | |
5266 | #ifndef HAVE_GETPAGESIZE | |
5267 | # ifdef HAVE_UNISTD_H | |
5268 | # include <unistd.h> | |
5269 | # endif | |
5270 | ||
5271 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5272 | # ifndef HAVE_SYS_PARAM_H | |
5273 | # define HAVE_SYS_PARAM_H 1 | |
5274 | # endif | |
5275 | ||
5276 | # ifdef _SC_PAGESIZE | |
5277 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5278 | # else /* no _SC_PAGESIZE */ | |
5279 | # ifdef HAVE_SYS_PARAM_H | |
5280 | # include <sys/param.h> | |
5281 | # ifdef EXEC_PAGESIZE | |
5282 | # define getpagesize() EXEC_PAGESIZE | |
5283 | # else /* no EXEC_PAGESIZE */ | |
5284 | # ifdef NBPG | |
5285 | # define getpagesize() NBPG * CLSIZE | |
5286 | # ifndef CLSIZE | |
5287 | # define CLSIZE 1 | |
5288 | # endif /* no CLSIZE */ | |
5289 | # else /* no NBPG */ | |
5290 | # ifdef NBPC | |
5291 | # define getpagesize() NBPC | |
5292 | # else /* no NBPC */ | |
5293 | # ifdef PAGESIZE | |
5294 | # define getpagesize() PAGESIZE | |
5295 | # endif /* PAGESIZE */ | |
5296 | # endif /* no NBPC */ | |
5297 | # endif /* no NBPG */ | |
5298 | # endif /* no EXEC_PAGESIZE */ | |
5299 | # else /* no HAVE_SYS_PARAM_H */ | |
5300 | # define getpagesize() 8192 /* punt totally */ | |
5301 | # endif /* no HAVE_SYS_PARAM_H */ | |
5302 | # endif /* no _SC_PAGESIZE */ | |
5303 | ||
5304 | #endif /* no HAVE_GETPAGESIZE */ | |
5305 | ||
5306 | #ifdef __cplusplus | |
5307 | extern "C" { void *malloc(unsigned); } | |
5308 | #else | |
5309 | char *malloc(); | |
5310 | #endif | |
5311 | ||
5312 | int | |
5313 | main() | |
5314 | { | |
5315 | char *data, *data2, *data3; | |
5316 | int i, pagesize; | |
5317 | int fd; | |
5318 | ||
5319 | pagesize = getpagesize(); | |
5320 | ||
5321 | /* | |
5322 | * First, make a file with some known garbage in it. | |
5323 | */ | |
5324 | data = malloc(pagesize); | |
5325 | if (!data) | |
5326 | exit(1); | |
5327 | for (i = 0; i < pagesize; ++i) | |
5328 | *(data + i) = rand(); | |
5329 | umask(0); | |
5330 | fd = creat("conftestmmap", 0600); | |
5331 | if (fd < 0) | |
5332 | exit(1); | |
5333 | if (write(fd, data, pagesize) != pagesize) | |
5334 | exit(1); | |
5335 | close(fd); | |
5336 | ||
5337 | /* | |
5338 | * Next, try to mmap the file at a fixed address which | |
5339 | * already has something else allocated at it. If we can, | |
5340 | * also make sure that we see the same garbage. | |
5341 | */ | |
5342 | fd = open("conftestmmap", O_RDWR); | |
5343 | if (fd < 0) | |
5344 | exit(1); | |
5345 | data2 = malloc(2 * pagesize); | |
5346 | if (!data2) | |
5347 | exit(1); | |
5348 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5349 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5350 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5351 | exit(1); | |
5352 | for (i = 0; i < pagesize; ++i) | |
5353 | if (*(data + i) != *(data2 + i)) | |
5354 | exit(1); | |
5355 | ||
5356 | /* | |
5357 | * Finally, make sure that changes to the mapped area | |
5358 | * do not percolate back to the file as seen by read(). | |
5359 | * (This is a bug on some variants of i386 svr4.0.) | |
5360 | */ | |
5361 | for (i = 0; i < pagesize; ++i) | |
5362 | *(data2 + i) = *(data2 + i) + 1; | |
5363 | data3 = malloc(pagesize); | |
5364 | if (!data3) | |
5365 | exit(1); | |
5366 | if (read(fd, data3, pagesize) != pagesize) | |
5367 | exit(1); | |
5368 | for (i = 0; i < pagesize; ++i) | |
5369 | if (*(data + i) != *(data3 + i)) | |
5370 | exit(1); | |
5371 | close(fd); | |
5372 | unlink("conftestmmap"); | |
5373 | exit(0); | |
5374 | } | |
5375 | ||
5376 | EOF | |
6ce2ac0b | 5377 | if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5378 | then |
5379 | ac_cv_func_mmap_fixed_mapped=yes | |
5380 | else | |
5381 | echo "configure: failed program was:" >&5 | |
5382 | cat conftest.$ac_ext >&5 | |
5383 | rm -fr conftest* | |
5384 | ac_cv_func_mmap_fixed_mapped=no | |
5385 | fi | |
5386 | rm -fr conftest* | |
5387 | fi | |
5388 | ||
5389 | fi | |
5390 | ||
5391 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
5392 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5393 | cat >> confdefs.h <<\EOF | |
5394 | #define HAVE_MMAP 1 | |
5395 | EOF | |
5396 | ||
5397 | fi | |
5398 | ||
5399 | ||
5400 | ||
5401 | ||
5402 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5403 | case ${host_os} in | |
5404 | hpux*) | |
5405 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
6ce2ac0b | 5406 | echo "configure:5407: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
5407 | if test -f /usr/include/dce/cma_config.h ; then |
5408 | if test "$GCC" = "yes" ; then | |
5409 | echo "$ac_t""yes" 1>&6 | |
5410 | cat >> confdefs.h <<\EOF | |
5411 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
5412 | EOF | |
5413 | ||
5414 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" | |
5415 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" | |
5416 | else | |
5417 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
5418 | fi | |
5419 | else | |
5420 | echo "$ac_t""no" 1>&6 | |
5421 | fi | |
5422 | ;; | |
5423 | solaris*) | |
5424 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
6ce2ac0b | 5425 | echo "configure:5426: checking for Solaris thread debugging library" >&5 |
c906108c SS |
5426 | if test -f /usr/lib/libthread_db.so.1 ; then |
5427 | echo "$ac_t""yes" 1>&6 | |
5428 | cat >> confdefs.h <<\EOF | |
5429 | #define HAVE_THREAD_DB_LIB 1 | |
5430 | EOF | |
5431 | ||
5432 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
5433 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" | |
5434 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
6ce2ac0b | 5435 | echo "configure:5436: checking for dlopen in -ldl" >&5 |
c906108c SS |
5436 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
5437 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5438 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5439 | else | |
5440 | ac_save_LIBS="$LIBS" | |
5441 | LIBS="-ldl $LIBS" | |
5442 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5443 | #line 5444 "configure" |
c906108c SS |
5444 | #include "confdefs.h" |
5445 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5446 | /* We use char because int might match the return type of a gcc2 | |
5447 | builtin and then its argument prototype would still apply. */ | |
5448 | char dlopen(); | |
5449 | ||
5450 | int main() { | |
5451 | dlopen() | |
5452 | ; return 0; } | |
5453 | EOF | |
6ce2ac0b | 5454 | if { (eval echo configure:5455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5455 | rm -rf conftest* |
5456 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5457 | else | |
5458 | echo "configure: failed program was:" >&5 | |
5459 | cat conftest.$ac_ext >&5 | |
5460 | rm -rf conftest* | |
5461 | eval "ac_cv_lib_$ac_lib_var=no" | |
5462 | fi | |
5463 | rm -f conftest* | |
5464 | LIBS="$ac_save_LIBS" | |
5465 | ||
5466 | fi | |
5467 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5468 | echo "$ac_t""yes" 1>&6 | |
5469 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5470 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5471 | cat >> confdefs.h <<EOF | |
5472 | #define $ac_tr_lib 1 | |
5473 | EOF | |
5474 | ||
5475 | LIBS="-ldl $LIBS" | |
5476 | ||
5477 | else | |
5478 | echo "$ac_t""no" 1>&6 | |
5479 | fi | |
5480 | ||
5481 | if test "$GCC" = "yes" ; then | |
5482 | # The GNU linker requires the -export-dynamic option to make | |
5483 | # all symbols visible in the dynamic symbol table. | |
5484 | hold_ldflags=$LDFLAGS | |
5485 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
6ce2ac0b | 5486 | echo "configure:5487: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
5487 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
5488 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5489 | #line 5490 "configure" |
c906108c SS |
5490 | #include "confdefs.h" |
5491 | ||
5492 | int main() { | |
5493 | int i; | |
5494 | ; return 0; } | |
5495 | EOF | |
6ce2ac0b | 5496 | if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5497 | rm -rf conftest* |
5498 | found=yes | |
5499 | else | |
5500 | echo "configure: failed program was:" >&5 | |
5501 | cat conftest.$ac_ext >&5 | |
5502 | rm -rf conftest* | |
5503 | found=no | |
5504 | fi | |
5505 | rm -f conftest* | |
5506 | LDFLAGS=$hold_ldflags | |
5507 | echo "$ac_t""$found" 1>&6 | |
5508 | if test $found = yes; then | |
5509 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
5510 | fi | |
5511 | fi | |
5512 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
5513 | # at one point. | |
5514 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
6ce2ac0b | 5515 | echo "configure:5516: checking if <proc_service.h> is old" >&5 |
c906108c SS |
5516 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
5517 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5518 | else | |
5519 | ||
5520 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5521 | #line 5522 "configure" |
c906108c SS |
5522 | #include "confdefs.h" |
5523 | ||
5524 | #include <proc_service.h> | |
5525 | ps_err_e ps_pdwrite | |
5526 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
5527 | ||
5528 | int main() { | |
5529 | ||
5530 | ; return 0; } | |
5531 | EOF | |
6ce2ac0b | 5532 | if { (eval echo configure:5533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5533 | rm -rf conftest* |
5534 | gdb_cv_proc_service_is_old=no | |
5535 | else | |
5536 | echo "configure: failed program was:" >&5 | |
5537 | cat conftest.$ac_ext >&5 | |
5538 | rm -rf conftest* | |
5539 | gdb_cv_proc_service_is_old=yes | |
5540 | fi | |
5541 | rm -f conftest* | |
5542 | ||
5543 | fi | |
5544 | ||
5545 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
5546 | if test $gdb_cv_proc_service_is_old = yes; then | |
5547 | cat >> confdefs.h <<\EOF | |
5548 | #define PROC_SERVICE_IS_OLD 1 | |
5549 | EOF | |
5550 | ||
5551 | fi | |
5552 | else | |
5553 | echo "$ac_t""no" 1>&6 | |
5554 | fi | |
5555 | ;; | |
5556 | esac | |
5557 | ||
5558 | fi | |
5559 | ||
fb40c209 AC |
5560 | |
5561 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
5562 | if test "${enable_gdbmi+set}" = set; then | |
5563 | enableval="$enable_gdbmi" | |
5564 | ||
5565 | case "${enable_gdbmi}" in | |
5566 | yes | no) ;; | |
5567 | "") enable_gdbmi=yes ;; | |
5568 | *) | |
5569 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
5570 | ;; | |
5571 | esac | |
5572 | ||
5573 | fi | |
5574 | ||
5575 | case ${enable_gdbmi} in | |
5576 | "yes" ) | |
5577 | if test -d "${srcdir}/mi" ; then | |
5578 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
5579 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
5580 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)" | |
5581 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" | |
b0b1b869 | 5582 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
5583 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
5584 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
5585 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
5586 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
5587 | fi |
5588 | ;; | |
5589 | esac | |
c906108c SS |
5590 | |
5591 | # Check whether --enable-tui or --disable-tui was given. | |
5592 | if test "${enable_tui+set}" = set; then | |
5593 | enableval="$enable_tui" | |
5594 | ||
5595 | case "${enable_tui}" in | |
5596 | yes | no) ;; | |
5597 | "") enable_tui=yes ;; | |
5598 | *) | |
5599 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
5600 | ;; | |
5601 | esac | |
5602 | ||
5603 | fi | |
5604 | ||
5605 | case ${enable_tui} in | |
5606 | "yes" ) | |
ed952ac5 AC |
5607 | if test -d "${srcdir}/tui" ; then |
5608 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
5609 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
5610 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_TUI_SRCS)" | |
5611 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" | |
5612 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
5613 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
5614 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
5615 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
5616 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
5617 | fi | |
5618 | ;; | |
c906108c SS |
5619 | esac |
5620 | ||
c906108c SS |
5621 | # Check whether --enable-netrom or --disable-netrom was given. |
5622 | if test "${enable_netrom+set}" = set; then | |
5623 | enableval="$enable_netrom" | |
5624 | case "${enableval}" in | |
5625 | yes) enable_netrom=yes ;; | |
5626 | no) enable_netrom=no ;; | |
5627 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
5628 | esac | |
5629 | fi | |
5630 | ||
5631 | ||
5632 | if test "${enable_netrom}" = "yes"; then | |
5633 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" | |
5634 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" | |
5635 | fi | |
5636 | ||
1decb323 | 5637 | |
d8038014 AC |
5638 | # Don't add -Wall or -Wunused, they include -Wunused-parameter which |
5639 | # causes noise. | |
1decb323 | 5640 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
16cadf39 | 5641 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
5642 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
5643 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
5644 | # -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual | |
5645 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes | |
5646 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
5647 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
5648 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
5649 | if test "${enable_build_warnings+set}" = set; then | |
5650 | enableval="$enable_build_warnings" | |
1decb323 | 5651 | case "${enableval}" in |
c906108c SS |
5652 | yes) ;; |
5653 | no) build_warnings="-w";; | |
5654 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5655 | build_warnings="${build_warnings} ${t}";; | |
5656 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5657 | build_warnings="${t} ${build_warnings}";; | |
5658 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5659 | esac | |
d4f3574e | 5660 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 5661 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 5662 | fi |
1decb323 | 5663 | fi |
104c1213 JM |
5664 | WARN_CFLAGS="" |
5665 | WERROR_CFLAGS="" | |
c906108c SS |
5666 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
5667 | then | |
746a987d | 5668 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
6ce2ac0b | 5669 | echo "configure:5670: checking compiler warning flags" >&5 |
746a987d AC |
5670 | # Separate out the -Werror flag as some files just cannot be |
5671 | # compiled with it enabled. | |
5672 | for w in ${build_warnings}; do | |
5673 | case $w in | |
5674 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
5675 | *) # Check that GCC accepts it | |
5676 | if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then | |
5677 | : | |
5678 | else | |
5679 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
5680 | fi | |
5681 | esac | |
5682 | done | |
5683 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
5684 | fi |
5685 | ||
5686 | ||
104c1213 | 5687 | |
c906108c SS |
5688 | MMALLOC_CFLAGS= |
5689 | MMALLOC= | |
5690 | ||
5691 | ||
5692 | ||
5693 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
5694 | if test "${with_mmalloc+set}" = set; then | |
5695 | withval="$with_mmalloc" | |
5696 | case "${withval}" in | |
5697 | yes) want_mmalloc=true ;; | |
5698 | no) want_mmalloc=false;; | |
5699 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
5700 | esac | |
5701 | else | |
5702 | want_mmalloc=false | |
5703 | fi | |
5704 | ||
5705 | if test x$want_mmalloc = xtrue; then | |
5706 | cat >> confdefs.h <<\EOF | |
5707 | #define USE_MMALLOC 1 | |
5708 | EOF | |
5709 | ||
5710 | cat >> confdefs.h <<\EOF | |
5711 | #define MMCHECK_FORCE 1 | |
5712 | EOF | |
5713 | ||
5714 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
5715 | MMALLOC='../mmalloc/libmmalloc.a' | |
5716 | fi | |
5717 | ||
88987551 L |
5718 | # Check whether --with-included-regex or --without-included-regex was given. |
5719 | if test "${with_included_regex+set}" = set; then | |
5720 | withval="$with_included_regex" | |
5721 | case "${withval}" in | |
5722 | yes) want_included_regex=true ;; | |
5723 | no) want_included_regex=false;; | |
5724 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
5725 | esac | |
5726 | else | |
5727 | want_included_regex=true | |
5728 | fi | |
5729 | ||
88987551 L |
5730 | if test $want_included_regex = false; then |
5731 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
6ce2ac0b | 5732 | echo "configure:5733: checking for GNU regex" >&5 |
88987551 L |
5733 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
5734 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5735 | else | |
5736 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5737 | #line 5738 "configure" |
88987551 L |
5738 | #include "confdefs.h" |
5739 | #include <gnu-versions.h> | |
5740 | #include <sys/types.h> | |
5741 | #include <regex.h> | |
5742 | int main() { | |
5743 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
5744 | #error No valid GNU regex. | |
5745 | #endif | |
5746 | ||
5747 | ; return 0; } | |
5748 | EOF | |
6ce2ac0b | 5749 | if { (eval echo configure:5750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
5750 | rm -rf conftest* |
5751 | gdb_cv_have_gnu_regex=yes | |
5752 | else | |
5753 | echo "configure: failed program was:" >&5 | |
5754 | cat conftest.$ac_ext >&5 | |
5755 | rm -rf conftest* | |
5756 | gdb_cv_have_gnu_regex=no | |
5757 | fi | |
5758 | rm -f conftest* | |
5759 | fi | |
5760 | ||
5761 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
5762 | if test $gdb_cv_have_gnu_regex = no; then |
5763 | want_included_regex=true | |
88987551 L |
5764 | fi |
5765 | fi | |
5766 | ||
e48f66e4 AC |
5767 | if test x${want_included_regex} = xtrue; then |
5768 | REGEX="gnu-regex.o" | |
5769 | cat >> confdefs.h <<\EOF | |
5770 | #define USE_INCLUDED_REGEX 1 | |
5771 | EOF | |
5772 | ||
5773 | fi | |
88987551 | 5774 | |
7a292a7a SS |
5775 | |
5776 | # In the Cygwin environment, we need some additional flags. | |
5777 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
6ce2ac0b | 5778 | echo "configure:5779: checking for cygwin" >&5 |
7a292a7a SS |
5779 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
5780 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5781 | else | |
5782 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5783 | #line 5784 "configure" |
7a292a7a SS |
5784 | #include "confdefs.h" |
5785 | ||
5786 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
5787 | lose | |
5788 | #endif | |
5789 | EOF | |
5790 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5791 | egrep "lose" >/dev/null 2>&1; then | |
5792 | rm -rf conftest* | |
5793 | gdb_cv_os_cygwin=yes | |
5794 | else | |
5795 | rm -rf conftest* | |
5796 | gdb_cv_os_cygwin=no | |
5797 | fi | |
5798 | rm -f conftest* | |
5799 | ||
5800 | fi | |
5801 | ||
5802 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
5803 | ||
aff38e61 AC |
5804 | |
5805 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
5806 | case ${host} in | |
95cbc983 AC |
5807 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
5808 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
5809 | esac |
5810 | ||
5811 | ||
5812 | ||
b83266a0 SS |
5813 | if test x$gdb_host = xgo32; then |
5814 | TERM_LIB= | |
5815 | else | |
c906108c SS |
5816 | if test x$gdb_cv_os_cygwin = xyes; then |
5817 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
5818 | else | |
5819 | TERM_LIB= | |
5820 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
6ce2ac0b | 5821 | echo "configure:5822: checking for tgetent in -lncurses" >&5 |
c906108c SS |
5822 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
5823 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5824 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5825 | else | |
5826 | ac_save_LIBS="$LIBS" | |
5827 | LIBS="-lncurses $LIBS" | |
5828 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5829 | #line 5830 "configure" |
c906108c SS |
5830 | #include "confdefs.h" |
5831 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5832 | /* We use char because int might match the return type of a gcc2 | |
5833 | builtin and then its argument prototype would still apply. */ | |
5834 | char tgetent(); | |
5835 | ||
5836 | int main() { | |
5837 | tgetent() | |
5838 | ; return 0; } | |
5839 | EOF | |
6ce2ac0b | 5840 | if { (eval echo configure:5841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5841 | rm -rf conftest* |
5842 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5843 | else | |
5844 | echo "configure: failed program was:" >&5 | |
5845 | cat conftest.$ac_ext >&5 | |
5846 | rm -rf conftest* | |
5847 | eval "ac_cv_lib_$ac_lib_var=no" | |
5848 | fi | |
5849 | rm -f conftest* | |
5850 | LIBS="$ac_save_LIBS" | |
5851 | ||
5852 | fi | |
5853 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5854 | echo "$ac_t""yes" 1>&6 | |
5855 | TERM_LIB=-lncurses | |
5856 | else | |
5857 | echo "$ac_t""no" 1>&6 | |
5858 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
6ce2ac0b | 5859 | echo "configure:5860: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
5860 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
5861 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5862 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5863 | else | |
5864 | ac_save_LIBS="$LIBS" | |
5865 | LIBS="-lHcurses $LIBS" | |
5866 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5867 | #line 5868 "configure" |
c906108c SS |
5868 | #include "confdefs.h" |
5869 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5870 | /* We use char because int might match the return type of a gcc2 | |
5871 | builtin and then its argument prototype would still apply. */ | |
5872 | char tgetent(); | |
5873 | ||
5874 | int main() { | |
5875 | tgetent() | |
5876 | ; return 0; } | |
5877 | EOF | |
6ce2ac0b | 5878 | if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5879 | rm -rf conftest* |
5880 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5881 | else | |
5882 | echo "configure: failed program was:" >&5 | |
5883 | cat conftest.$ac_ext >&5 | |
5884 | rm -rf conftest* | |
5885 | eval "ac_cv_lib_$ac_lib_var=no" | |
5886 | fi | |
5887 | rm -f conftest* | |
5888 | LIBS="$ac_save_LIBS" | |
5889 | ||
5890 | fi | |
5891 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5892 | echo "$ac_t""yes" 1>&6 | |
5893 | TERM_LIB=-lHcurses | |
5894 | else | |
5895 | echo "$ac_t""no" 1>&6 | |
5896 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
6ce2ac0b | 5897 | echo "configure:5898: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
5898 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
5899 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5900 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5901 | else | |
5902 | ac_save_LIBS="$LIBS" | |
5903 | LIBS="-ltermlib $LIBS" | |
5904 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5905 | #line 5906 "configure" |
c906108c SS |
5906 | #include "confdefs.h" |
5907 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5908 | /* We use char because int might match the return type of a gcc2 | |
5909 | builtin and then its argument prototype would still apply. */ | |
5910 | char tgetent(); | |
5911 | ||
5912 | int main() { | |
5913 | tgetent() | |
5914 | ; return 0; } | |
5915 | EOF | |
6ce2ac0b | 5916 | if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5917 | rm -rf conftest* |
5918 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5919 | else | |
5920 | echo "configure: failed program was:" >&5 | |
5921 | cat conftest.$ac_ext >&5 | |
5922 | rm -rf conftest* | |
5923 | eval "ac_cv_lib_$ac_lib_var=no" | |
5924 | fi | |
5925 | rm -f conftest* | |
5926 | LIBS="$ac_save_LIBS" | |
5927 | ||
5928 | fi | |
5929 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5930 | echo "$ac_t""yes" 1>&6 | |
5931 | TERM_LIB=-ltermlib | |
5932 | else | |
5933 | echo "$ac_t""no" 1>&6 | |
5934 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
6ce2ac0b | 5935 | echo "configure:5936: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
5936 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
5937 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5938 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5939 | else | |
5940 | ac_save_LIBS="$LIBS" | |
5941 | LIBS="-ltermcap $LIBS" | |
5942 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5943 | #line 5944 "configure" |
c906108c SS |
5944 | #include "confdefs.h" |
5945 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5946 | /* We use char because int might match the return type of a gcc2 | |
5947 | builtin and then its argument prototype would still apply. */ | |
5948 | char tgetent(); | |
5949 | ||
5950 | int main() { | |
5951 | tgetent() | |
5952 | ; return 0; } | |
5953 | EOF | |
6ce2ac0b | 5954 | if { (eval echo configure:5955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5955 | rm -rf conftest* |
5956 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5957 | else | |
5958 | echo "configure: failed program was:" >&5 | |
5959 | cat conftest.$ac_ext >&5 | |
5960 | rm -rf conftest* | |
5961 | eval "ac_cv_lib_$ac_lib_var=no" | |
5962 | fi | |
5963 | rm -f conftest* | |
5964 | LIBS="$ac_save_LIBS" | |
5965 | ||
5966 | fi | |
5967 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5968 | echo "$ac_t""yes" 1>&6 | |
5969 | TERM_LIB=-ltermcap | |
5970 | else | |
5971 | echo "$ac_t""no" 1>&6 | |
5972 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
6ce2ac0b | 5973 | echo "configure:5974: checking for tgetent in -lcurses" >&5 |
c906108c SS |
5974 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
5975 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5976 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5977 | else | |
5978 | ac_save_LIBS="$LIBS" | |
5979 | LIBS="-lcurses $LIBS" | |
5980 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 5981 | #line 5982 "configure" |
c906108c SS |
5982 | #include "confdefs.h" |
5983 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5984 | /* We use char because int might match the return type of a gcc2 | |
5985 | builtin and then its argument prototype would still apply. */ | |
5986 | char tgetent(); | |
5987 | ||
5988 | int main() { | |
5989 | tgetent() | |
5990 | ; return 0; } | |
5991 | EOF | |
6ce2ac0b | 5992 | if { (eval echo configure:5993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5993 | rm -rf conftest* |
5994 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5995 | else | |
5996 | echo "configure: failed program was:" >&5 | |
5997 | cat conftest.$ac_ext >&5 | |
5998 | rm -rf conftest* | |
5999 | eval "ac_cv_lib_$ac_lib_var=no" | |
6000 | fi | |
6001 | rm -f conftest* | |
6002 | LIBS="$ac_save_LIBS" | |
6003 | ||
6004 | fi | |
6005 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6006 | echo "$ac_t""yes" 1>&6 | |
6007 | TERM_LIB=-lcurses | |
6008 | else | |
6009 | echo "$ac_t""no" 1>&6 | |
6010 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
6ce2ac0b | 6011 | echo "configure:6012: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
6012 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
6013 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6014 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6015 | else | |
6016 | ac_save_LIBS="$LIBS" | |
6017 | LIBS="-lterminfo $LIBS" | |
6018 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 6019 | #line 6020 "configure" |
c906108c SS |
6020 | #include "confdefs.h" |
6021 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6022 | /* We use char because int might match the return type of a gcc2 | |
6023 | builtin and then its argument prototype would still apply. */ | |
6024 | char tgetent(); | |
6025 | ||
6026 | int main() { | |
6027 | tgetent() | |
6028 | ; return 0; } | |
6029 | EOF | |
6ce2ac0b | 6030 | if { (eval echo configure:6031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6031 | rm -rf conftest* |
6032 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6033 | else | |
6034 | echo "configure: failed program was:" >&5 | |
6035 | cat conftest.$ac_ext >&5 | |
6036 | rm -rf conftest* | |
6037 | eval "ac_cv_lib_$ac_lib_var=no" | |
6038 | fi | |
6039 | rm -f conftest* | |
6040 | LIBS="$ac_save_LIBS" | |
6041 | ||
6042 | fi | |
6043 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6044 | echo "$ac_t""yes" 1>&6 | |
6045 | TERM_LIB=-lterminfo | |
6046 | else | |
6047 | echo "$ac_t""no" 1>&6 | |
6048 | fi | |
6049 | ||
6050 | fi | |
6051 | ||
6052 | fi | |
6053 | ||
6054 | fi | |
6055 | ||
6056 | fi | |
6057 | ||
6058 | fi | |
6059 | ||
6060 | ||
6061 | if test "x$TERM_LIB" = x | |
6062 | then | |
6063 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
6064 | fi | |
6065 | fi | |
b83266a0 | 6066 | fi |
c906108c SS |
6067 | |
6068 | ||
cd0fc7c3 SS |
6069 | # libreadline needs libuser32.a in a cygwin environment |
6070 | WIN32LIBS= | |
6071 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
6072 | WIN32LIBS="-luser32" |
6073 | case "${target}" in | |
6074 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
6075 | ;; | |
6076 | esac | |
cd0fc7c3 | 6077 | fi |
c906108c | 6078 | |
7a292a7a | 6079 | |
3fc11d3e JM |
6080 | LIBGUI="../libgui/src/libgui.a" |
6081 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
6082 | ||
6083 | ||
7a292a7a | 6084 | |
8b93c638 JM |
6085 | # Check whether --with-cpu or --without-cpu was given. |
6086 | if test "${with_cpu+set}" = set; then | |
6087 | withval="$with_cpu" | |
6088 | case "${target}" in | |
6089 | powerpc-* | powerpcle-* ) | |
6090 | ## It would be nice to keep this table in sync with the one in | |
6091 | ## gcc/configure. | |
6092 | case "${with_cpu}" in | |
6093 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
6094 | | 604 | 750 ) | |
6095 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
6096 | ;; | |
6097 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
6098 | ## These are all RS6000 variants, as far as GDB is concerned. | |
6099 | with_cpu=rs6000 | |
6100 | ;; | |
6101 | 603e | ec603e ) | |
6102 | with_cpu=603 | |
6103 | ;; | |
6104 | 604e ) | |
6105 | with_cpu=604 | |
6106 | ;; | |
6107 | * ) | |
6108 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
6109 | with_cpu=ppc-uisa | |
6110 | ;; | |
6111 | esac | |
6112 | ;; | |
6113 | * ) | |
6114 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
6115 | ;; | |
6116 | esac | |
6117 | cat >> confdefs.h <<EOF | |
6118 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
6119 | EOF | |
6120 | ||
6121 | ||
6122 | fi | |
6123 | ||
6124 | ||
6125 | ||
3fc11d3e JM |
6126 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
6127 | if test "${enable_gdbtk+set}" = set; then | |
6128 | enableval="$enable_gdbtk" | |
6129 | case "${enableval}" in | |
6130 | yes) | |
6131 | case "$host" in | |
6132 | *go32*) | |
6133 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6134 | enable_gdbtk=no ;; | |
6135 | *windows*) | |
6136 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6137 | enable_gdbtk=no ;; | |
6138 | *) | |
6139 | enable_gdbtk=yes ;; | |
6140 | esac ;; | |
6141 | no) | |
6142 | enable_gdbtk=no ;; | |
6143 | *) | |
6144 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
6145 | esac | |
6146 | else | |
6147 | ||
6148 | # Default is on for everything but go32 and Cygwin | |
6149 | case "$host" in | |
6150 | *go32* | *windows*) | |
6151 | ;; | |
6152 | *) | |
379d6434 AC |
6153 | if test -d "${srcdir}/gdbtk" ; then |
6154 | enable_gdbtk=yes | |
6155 | fi | |
6156 | ;; | |
6157 | esac | |
3fc11d3e JM |
6158 | |
6159 | fi | |
6160 | ||
6161 | ||
6162 | WIN32LDAPP= | |
6163 | ||
6164 | ||
6165 | ||
6166 | configdir="unix" | |
6167 | ||
6168 | GDBTKLIBS= | |
6169 | if test "${enable_gdbtk}" = "yes"; then | |
6170 | ||
6171 | ||
6172 | # | |
6173 | # Ok, lets find the tcl configuration | |
6174 | # First, look for one uninstalled. | |
6175 | # the alternative search directory is invoked by --with-tclconfig | |
6176 | # | |
6177 | ||
6178 | if test x"${no_tcl}" = x ; then | |
6179 | # we reset no_tcl in case something fails here | |
6180 | no_tcl=true | |
6181 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
6182 | if test "${with_tclconfig+set}" = set; then | |
6183 | withval="$with_tclconfig" | |
6184 | with_tclconfig=${withval} | |
6185 | fi | |
6186 | ||
6187 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
6ce2ac0b | 6188 | echo "configure:6189: checking for Tcl configuration" >&5 |
3fc11d3e JM |
6189 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
6190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6191 | else | |
6192 | ||
6193 | ||
6194 | # First check to see if --with-tclconfig was specified. | |
6195 | if test x"${with_tclconfig}" != x ; then | |
6196 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
6197 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
6198 | else | |
6199 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
6200 | fi | |
6201 | fi | |
6202 | ||
6203 | # then check for a private Tcl installation | |
6204 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6205 | for i in \ | |
6206 | ../tcl \ | |
6207 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
6208 | ../../tcl \ | |
6209 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
6210 | ../../../tcl \ | |
6211 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
6212 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6213 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6214 | break | |
6215 | fi | |
6216 | done | |
6217 | fi | |
6218 | # check in a few common install locations | |
6219 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6220 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6221 | if test -f "$i/tclConfig.sh" ; then | |
6222 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
6223 | break | |
6224 | fi | |
6225 | done | |
6226 | fi | |
6227 | # check in a few other private locations | |
6228 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6229 | for i in \ | |
6230 | ${srcdir}/../tcl \ | |
6231 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
6232 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6233 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6234 | break | |
6235 | fi | |
6236 | done | |
6237 | fi | |
6238 | ||
6239 | fi | |
6240 | ||
6241 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6242 | TCLCONFIG="# no Tcl configs found" | |
6243 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
6244 | else | |
6245 | no_tcl= | |
6246 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
6247 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
6248 | fi | |
6249 | fi | |
6250 | ||
6251 | if test -z "${no_tcl}"; then | |
6252 | ||
6253 | . $TCLCONFIG | |
6254 | ||
6255 | ||
6256 | ||
6257 | ||
6258 | ||
6259 | ||
6260 | ||
6261 | ||
6262 | ||
6263 | ||
6264 | ||
6265 | ||
6266 | ||
6267 | ||
6268 | ||
6269 | ||
6270 | ||
6271 | ||
6272 | ||
6273 | ||
6274 | ||
6275 | ||
6276 | ||
6277 | ||
6278 | ||
6279 | ||
6280 | # | |
6281 | # Ok, lets find the tk configuration | |
6282 | # First, look for one uninstalled. | |
6283 | # the alternative search directory is invoked by --with-tkconfig | |
6284 | # | |
6285 | ||
6286 | if test x"${no_tk}" = x ; then | |
6287 | # we reset no_tk in case something fails here | |
6288 | no_tk=true | |
6289 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
6290 | if test "${with_tkconfig+set}" = set; then | |
6291 | withval="$with_tkconfig" | |
6292 | with_tkconfig=${withval} | |
6293 | fi | |
6294 | ||
6295 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
6ce2ac0b | 6296 | echo "configure:6297: checking for Tk configuration" >&5 |
3fc11d3e JM |
6297 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
6298 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6299 | else | |
6300 | ||
6301 | ||
6302 | # First check to see if --with-tkconfig was specified. | |
6303 | if test x"${with_tkconfig}" != x ; then | |
6304 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
6305 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
6306 | else | |
6307 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
6308 | fi | |
6309 | fi | |
6310 | ||
6311 | # then check for a private Tk library | |
6312 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6313 | for i in \ | |
6314 | ../tk \ | |
6315 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
6316 | ../../tk \ | |
6317 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
6318 | ../../../tk \ | |
6319 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
6320 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6321 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6322 | break | |
6323 | fi | |
6324 | done | |
6325 | fi | |
6326 | # check in a few common install locations | |
6327 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6328 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6329 | if test -f "$i/tkConfig.sh" ; then | |
6330 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
6331 | break | |
6332 | fi | |
6333 | done | |
6334 | fi | |
6335 | # check in a few other private locations | |
6336 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6337 | for i in \ | |
6338 | ${srcdir}/../tk \ | |
6339 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
6340 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6341 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6342 | break | |
6343 | fi | |
6344 | done | |
6345 | fi | |
6346 | ||
6347 | fi | |
6348 | ||
6349 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6350 | TKCONFIG="# no Tk configs found" | |
6351 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
6352 | else | |
6353 | no_tk= | |
6354 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
6355 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
6356 | fi | |
6357 | fi | |
6358 | ||
6359 | ||
6360 | ||
6361 | # If $no_tk is nonempty, then we can't do Tk, and there is no | |
6362 | # point to doing Tcl. | |
6363 | if test -z "${no_tk}"; then | |
6364 | ||
6365 | if test -f "$TKCONFIG" ; then | |
6366 | . $TKCONFIG | |
6367 | fi | |
6368 | ||
6369 | ||
6370 | ||
6371 | ||
6372 | ||
6373 | ||
6374 | ||
6375 | ||
6376 | ||
6377 | ||
6378 | ||
6379 | ||
6380 | ||
6381 | ||
6382 | # | |
6383 | # Ok, lets find the tcl source trees so we can use the headers | |
6384 | # Warning: transition of version 9 to 10 will break this algorithm | |
6385 | # because 10 sorts before 9. We also look for just tcl. We have to | |
6386 | # be careful that we don't match stuff like tclX by accident. | |
6387 | # the alternative search directory is involked by --with-tclinclude | |
6388 | # | |
6389 | ||
6390 | no_tcl=true | |
6391 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
6ce2ac0b | 6392 | echo "configure:6393: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
6393 | # Check whether --with-tclinclude or --without-tclinclude was given. |
6394 | if test "${with_tclinclude+set}" = set; then | |
6395 | withval="$with_tclinclude" | |
6396 | with_tclinclude=${withval} | |
6397 | fi | |
6398 | ||
6399 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
6400 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6401 | else | |
6402 | ||
6403 | # first check to see if --with-tclinclude was specified | |
6404 | if test x"${with_tclinclude}" != x ; then | |
6405 | if test -f ${with_tclinclude}/tclInt.h ; then | |
6406 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
6407 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
6408 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
6409 | else | |
6410 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6411 | fi | |
6412 | fi | |
6413 | ||
6414 | # next check if it came with Tcl configuration file | |
6415 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6416 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
6417 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
6418 | fi | |
6419 | fi | |
6420 | ||
6421 | # next check in private source directory | |
6422 | # | |
6423 | # since ls returns lowest version numbers first, reverse its output | |
6424 | if test x"${ac_cv_c_tclh}" = x ; then | |
6425 | for i in \ | |
6426 | ${srcdir}/../tcl \ | |
6427 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
6428 | ${srcdir}/../../tcl \ | |
6429 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
6430 | ${srcdir}/../../../tcl \ | |
6431 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
6432 | if test -f $i/generic/tclInt.h ; then | |
6433 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6434 | break | |
6435 | fi | |
6436 | done | |
6437 | fi | |
6438 | # finally check in a few common install locations | |
6439 | # | |
6440 | # since ls returns lowest version numbers first, reverse its output | |
6441 | if test x"${ac_cv_c_tclh}" = x ; then | |
6442 | for i in \ | |
6443 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
6444 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
6445 | /usr/local/src/tcl \ | |
6446 | /usr/local/lib/tcl \ | |
6447 | ${prefix}/include ; do | |
6448 | if test -f $i/generic/tclInt.h ; then | |
6449 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6450 | break | |
6451 | fi | |
6452 | done | |
6453 | fi | |
6454 | # see if one is installed | |
6455 | if test x"${ac_cv_c_tclh}" = x ; then | |
6456 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
6457 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
6ce2ac0b | 6458 | echo "configure:6459: checking for tclInt.h" >&5 |
3fc11d3e JM |
6459 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6460 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6461 | else | |
6462 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 6463 | #line 6464 "configure" |
3fc11d3e JM |
6464 | #include "confdefs.h" |
6465 | #include <tclInt.h> | |
6466 | EOF | |
6467 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 6468 | { (eval echo configure:6469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6469 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6470 | if test -z "$ac_err"; then | |
6471 | rm -rf conftest* | |
6472 | eval "ac_cv_header_$ac_safe=yes" | |
6473 | else | |
6474 | echo "$ac_err" >&5 | |
6475 | echo "configure: failed program was:" >&5 | |
6476 | cat conftest.$ac_ext >&5 | |
6477 | rm -rf conftest* | |
6478 | eval "ac_cv_header_$ac_safe=no" | |
6479 | fi | |
6480 | rm -f conftest* | |
6481 | fi | |
6482 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6483 | echo "$ac_t""yes" 1>&6 | |
6484 | ac_cv_c_tclh=installed | |
6485 | else | |
6486 | echo "$ac_t""no" 1>&6 | |
6487 | ac_cv_c_tclh="" | |
6488 | fi | |
6489 | ||
6490 | fi | |
6491 | ||
6492 | fi | |
6493 | ||
6494 | if test x"${ac_cv_c_tclh}" = x ; then | |
6495 | TCLHDIR="# no Tcl private headers found" | |
6496 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
6497 | fi | |
6498 | if test x"${ac_cv_c_tclh}" != x ; then | |
6499 | no_tcl="" | |
6500 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
6501 | echo "$ac_t""is installed" 1>&6 | |
6502 | TCLHDIR="" | |
6503 | else | |
6504 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
6505 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
6506 | TCLHDIR="-I${ac_cv_c_tclh}" | |
6507 | fi | |
6508 | fi | |
6509 | ||
6510 | ||
6511 | ||
6512 | ||
6513 | # | |
6514 | # Ok, lets find the tk source trees so we can use the headers | |
6515 | # If the directory (presumably symlink) named "tk" exists, use that one | |
6516 | # in preference to any others. Same logic is used when choosing library | |
6517 | # and again with Tcl. The search order is the best place to look first, then in | |
6518 | # decreasing significance. The loop breaks if the trigger file is found. | |
6519 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
6520 | # directory. This converts the path from a relative to an absolute, so | |
6521 | # recursive cache variables for the path will work right. We check all | |
6522 | # the possible paths in one loop rather than many seperate loops to speed | |
6523 | # things up. | |
6524 | # the alternative search directory is involked by --with-tkinclude | |
6525 | # | |
6526 | no_tk=true | |
6527 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
6ce2ac0b | 6528 | echo "configure:6529: checking for Tk private headers" >&5 |
3fc11d3e JM |
6529 | # Check whether --with-tkinclude or --without-tkinclude was given. |
6530 | if test "${with_tkinclude+set}" = set; then | |
6531 | withval="$with_tkinclude" | |
6532 | with_tkinclude=${withval} | |
6533 | fi | |
6534 | ||
6535 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
6536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6537 | else | |
6538 | ||
6539 | # first check to see if --with-tkinclude was specified | |
6540 | if test x"${with_tkinclude}" != x ; then | |
6541 | if test -f ${with_tkinclude}/tk.h ; then | |
6542 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
6543 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
6544 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
6545 | else | |
6546 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6547 | fi | |
6548 | fi | |
6549 | ||
6550 | # next check if it came with Tk configuration file | |
6551 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6552 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
6553 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
6554 | fi | |
6555 | fi | |
6556 | ||
6557 | # next check in private source directory | |
6558 | # | |
6559 | # since ls returns lowest version numbers first, reverse its output | |
6560 | if test x"${ac_cv_c_tkh}" = x ; then | |
6561 | for i in \ | |
6562 | ${srcdir}/../tk \ | |
6563 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
6564 | ${srcdir}/../../tk \ | |
6565 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
6566 | ${srcdir}/../../../tk \ | |
6567 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
6568 | if test -f $i/generic/tk.h ; then | |
6569 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6570 | break | |
6571 | fi | |
6572 | done | |
6573 | fi | |
6574 | # finally check in a few common install locations | |
6575 | # | |
6576 | # since ls returns lowest version numbers first, reverse its output | |
6577 | if test x"${ac_cv_c_tkh}" = x ; then | |
6578 | for i in \ | |
6579 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
6580 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
6581 | /usr/local/src/tk \ | |
6582 | /usr/local/lib/tk \ | |
6583 | ${prefix}/include ; do | |
6584 | if test -f $i/generic/tk.h ; then | |
6585 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6586 | break | |
6587 | fi | |
6588 | done | |
6589 | fi | |
6590 | # see if one is installed | |
6591 | if test x"${ac_cv_c_tkh}" = x ; then | |
6592 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
6593 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
6ce2ac0b | 6594 | echo "configure:6595: checking for tk.h" >&5 |
3fc11d3e JM |
6595 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6596 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6597 | else | |
6598 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 6599 | #line 6600 "configure" |
3fc11d3e JM |
6600 | #include "confdefs.h" |
6601 | #include <tk.h> | |
6602 | EOF | |
6603 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 6604 | { (eval echo configure:6605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6605 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6606 | if test -z "$ac_err"; then | |
6607 | rm -rf conftest* | |
6608 | eval "ac_cv_header_$ac_safe=yes" | |
6609 | else | |
6610 | echo "$ac_err" >&5 | |
6611 | echo "configure: failed program was:" >&5 | |
6612 | cat conftest.$ac_ext >&5 | |
6613 | rm -rf conftest* | |
6614 | eval "ac_cv_header_$ac_safe=no" | |
6615 | fi | |
6616 | rm -f conftest* | |
6617 | fi | |
6618 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6619 | echo "$ac_t""yes" 1>&6 | |
6620 | ac_cv_c_tkh=installed | |
6621 | else | |
6622 | echo "$ac_t""no" 1>&6 | |
6623 | ac_cv_c_tkh="" | |
6624 | fi | |
6625 | ||
6626 | fi | |
6627 | ||
6628 | fi | |
6629 | ||
6630 | if test x"${ac_cv_c_tkh}" != x ; then | |
6631 | no_tk="" | |
6632 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
6633 | echo "$ac_t""is installed" 1>&6 | |
6634 | TKHDIR="" | |
6635 | else | |
6636 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
6637 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
6638 | TKHDIR="-I${ac_cv_c_tkh}" | |
6639 | fi | |
6640 | else | |
6641 | TKHDIR="# no Tk directory found" | |
6642 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
6643 | no_tk=true | |
6644 | fi | |
6645 | ||
6646 | ||
6647 | ||
6648 | ||
6649 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
6ce2ac0b | 6650 | echo "configure:6651: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6651 | if test x"${ac_cv_c_itclh}" = x ; then |
6652 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
6653 | if test -f $i/generic/itcl.h ; then | |
6654 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
6655 | break | |
6656 | fi | |
6657 | done | |
6658 | fi | |
6659 | if test x"${ac_cv_c_itclh}" = x ; then | |
6660 | ITCLHDIR="# no Itcl private headers found" | |
6661 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
6662 | fi | |
6663 | if test x"${ac_cv_c_itclh}" != x ; then | |
6664 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
6665 | fi | |
6666 | # should always be here | |
6667 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
6668 | ||
6669 | #AC_SUBST(ITCLLIB) | |
6670 | ||
6671 | ||
6672 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
6ce2ac0b | 6673 | echo "configure:6674: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6674 | if test x"${ac_cv_c_itkh}" = x ; then |
6675 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
6676 | if test -f $i/generic/itk.h ; then | |
6677 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
6678 | break | |
6679 | fi | |
6680 | done | |
6681 | fi | |
6682 | if test x"${ac_cv_c_itkh}" = x ; then | |
6683 | ITKHDIR="# no Itk private headers found" | |
6684 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
6685 | fi | |
6686 | if test x"${ac_cv_c_itkh}" != x ; then | |
6687 | ITKHDIR="-I${ac_cv_c_itkh}" | |
6688 | fi | |
6689 | # should always be here | |
6690 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
6691 | ||
6692 | #AC_SUBST(ITKLIB) | |
6693 | ||
6694 | ||
6695 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
6ce2ac0b | 6696 | echo "configure:6697: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6697 | if test x"${ac_cv_c_tixh}" = x ; then |
6698 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
6699 | if test -f $i/generic/tix.h ; then | |
6700 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
6701 | break | |
6702 | fi | |
6703 | done | |
6704 | fi | |
6705 | if test x"${ac_cv_c_tixh}" = x ; then | |
6706 | TIXHDIR="# no Tix private headers found" | |
6707 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
6708 | fi | |
6709 | if test x"${ac_cv_c_tixh}" != x ; then | |
6710 | TIXHDIR="-I${ac_cv_c_tixh}" | |
6711 | fi | |
6712 | ||
6713 | ||
6714 | ||
6715 | # now look for Itcl library stuff | |
6716 | ||
6717 | ||
6718 | # | |
6719 | # Ok, lets find the itcl configuration | |
6720 | # First, look for one uninstalled. | |
6721 | # the alternative search directory is invoked by --with-itclconfig | |
6722 | # | |
6723 | ||
6724 | if test x"${no_itcl}" = x ; then | |
6725 | # we reset no_itcl in case something fails here | |
6726 | no_itcl=true | |
6727 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
6728 | if test "${with_itclconfig+set}" = set; then | |
6729 | withval="$with_itclconfig" | |
6730 | with_itclconfig=${withval} | |
6731 | fi | |
6732 | ||
6733 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
6ce2ac0b | 6734 | echo "configure:6735: checking for Itcl configuration" >&5 |
3fc11d3e JM |
6735 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
6736 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6737 | else | |
6738 | ||
6739 | ||
6740 | # First check to see if --with-itclconfig was specified. | |
6741 | if test x"${with_itclconfig}" != x ; then | |
6742 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
6743 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
6744 | else | |
6745 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
6746 | fi | |
6747 | fi | |
6748 | ||
6749 | # then check for a private Itcl library | |
6750 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6751 | for i in \ | |
6752 | ../itcl/itcl \ | |
6753 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
6754 | ../../itcl \ | |
6755 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
6756 | ../../../itcl \ | |
6757 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6758 | if test -f "$i/itclConfig.sh" ; then | |
6759 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6760 | break | |
6761 | fi | |
6762 | done | |
6763 | fi | |
6764 | # check in a few common install locations | |
6765 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6766 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6767 | if test -f "$i/itclConfig.sh" ; then | |
6768 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6769 | break | |
6770 | fi | |
6771 | done | |
6772 | fi | |
6773 | # check in a few other private locations | |
6774 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6775 | for i in \ | |
6776 | ${srcdir}/../itcl/itcl \ | |
6777 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6778 | if test -f "$i/itclConfig.sh" ; then | |
6779 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6780 | break | |
6781 | fi | |
6782 | done | |
6783 | fi | |
6784 | ||
6785 | fi | |
6786 | ||
6787 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6788 | ITCLCONFIG="# no Itcl configs found" | |
6789 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
6790 | else | |
6791 | no_itcl= | |
6792 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
6793 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
6794 | fi | |
6795 | fi | |
6796 | ||
6797 | if test -z "${no_itcl}"; then | |
6798 | ||
6799 | if test -f "$ITCLCONFIG" ; then | |
6800 | . $ITCLCONFIG | |
6801 | fi | |
6802 | ||
6803 | ||
6804 | ||
6805 | ||
6806 | ||
6807 | ||
6808 | ||
6809 | ||
6810 | ||
6811 | ||
6812 | ||
6813 | case "${host}" in | |
6814 | *-*-cygwin*) | |
6815 | itcldir=../itcl/itcl/win/ | |
6816 | ;; | |
6817 | *) | |
6818 | itcldir=../itcl/itcl/unix/ | |
6819 | ;; | |
6820 | esac | |
6821 | ||
6822 | ||
6823 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
6824 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
6825 | fi | |
6826 | ||
6827 | ||
6828 | # now look for Itk library stuff | |
6829 | ||
6830 | # | |
6831 | # Ok, lets find the itk configuration | |
6832 | # First, look for one uninstalled. | |
6833 | # the alternative search directory is invoked by --with-itkconfig | |
6834 | # | |
6835 | ||
6836 | if test x"${no_itk}" = x ; then | |
6837 | # we reset no_itk in case something fails here | |
6838 | no_itk=true | |
6839 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
6840 | if test "${with_itkconfig+set}" = set; then | |
6841 | withval="$with_itkconfig" | |
6842 | with_itkconfig=${withval} | |
6843 | fi | |
6844 | ||
6845 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
6ce2ac0b | 6846 | echo "configure:6847: checking for Itk configuration" >&5 |
3fc11d3e JM |
6847 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
6848 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6849 | else | |
6850 | ||
6851 | ||
6852 | # First check to see if --with-itkconfig was specified. | |
6853 | if test x"${with_itkconfig}" != x ; then | |
6854 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
6855 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
6856 | else | |
6857 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
6858 | fi | |
6859 | fi | |
6860 | ||
6861 | # then check for a private Itk library | |
6862 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6863 | for i in \ | |
6864 | ../itcl/itk \ | |
6865 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
6866 | ../../itk \ | |
6867 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
6868 | ../../../itk \ | |
6869 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
6870 | if test -f "$i/itkConfig.sh" ; then | |
6871 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6872 | break | |
6873 | fi | |
6874 | done | |
6875 | fi | |
6876 | # check in a few common install locations | |
6877 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6878 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6879 | if test -f "$i/itkConfig.sh" ; then | |
6880 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6881 | break | |
6882 | fi | |
6883 | done | |
6884 | fi | |
6885 | # check in a few other private locations | |
6886 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6887 | for i in \ | |
6888 | ${srcdir}/../itcl/itk \ | |
6889 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
6890 | if test -f "$i/itkConfig.sh" ; then | |
6891 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6892 | break | |
6893 | fi | |
6894 | done | |
6895 | fi | |
6896 | ||
6897 | fi | |
6898 | ||
6899 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6900 | ITKCONFIG="# no Itk configs found" | |
6901 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
6902 | else | |
6903 | no_itk= | |
6904 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
6905 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
6906 | fi | |
6907 | fi | |
6908 | ||
6909 | ||
6910 | if test -z "${no_itcl}"; then | |
6911 | ||
6912 | if test -f "$ITKCONFIG" ; then | |
6913 | . $ITKCONFIG | |
6914 | fi | |
6915 | ||
6916 | ||
6917 | ||
6918 | ||
6919 | ||
6920 | ||
6921 | ||
6922 | ||
6923 | ||
6924 | ||
6925 | ||
6926 | ||
6927 | case "${host}" in | |
6928 | *-*-cygwin*) | |
6929 | itkdir=../itcl/itk/win/ | |
6930 | ;; | |
6931 | *) | |
6932 | itkdir=../itcl/itk/unix/ | |
6933 | ;; | |
6934 | esac | |
6935 | ||
6936 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
6937 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
6938 | fi | |
6939 | ||
6940 | # now look for Tix library stuff | |
6941 | ||
6942 | # | |
6943 | # Ok, lets find the tix configuration | |
6944 | # First, look for one uninstalled. | |
6945 | # the alternative search directory is invoked by --with-itkconfig | |
6946 | # | |
6947 | ||
6948 | if test x"${no_tix}" = x ; then | |
6949 | # we reset no_tix in case something fails here | |
6950 | no_tix=true | |
6951 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
6952 | if test "${with_tixconfig+set}" = set; then | |
6953 | withval="$with_tixconfig" | |
6954 | with_tixconfig=${withval} | |
6955 | fi | |
6956 | ||
6957 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
6ce2ac0b | 6958 | echo "configure:6959: checking for Tix configuration" >&5 |
3fc11d3e JM |
6959 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
6960 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6961 | else | |
6962 | ||
6963 | ||
6964 | # First check to see if --with-tixconfig was specified. | |
6965 | if test x"${with_tixconfig}" != x ; then | |
6966 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
6967 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
6968 | else | |
6969 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
6970 | fi | |
6971 | fi | |
6972 | ||
6973 | # then check for a private Tix library | |
6974 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6975 | for i in \ | |
6976 | ../tix \ | |
6977 | `ls -dr ../tix 2>/dev/null` \ | |
6978 | ../../tix \ | |
6979 | `ls -dr ../../tix 2>/dev/null` \ | |
6980 | ../../../tix \ | |
6981 | `ls -dr ../../../tix 2>/dev/null` ; do | |
6982 | echo "**** Looking at $i - with ${configdir}" | |
6983 | if test -f "$i/tixConfig.sh" ; then | |
6984 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6985 | break | |
6986 | fi | |
6987 | done | |
6988 | fi | |
6989 | # check in a few common install locations | |
6990 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6991 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6992 | echo "**** Looking at $i" | |
6993 | if test -f "$i/tixConfig.sh" ; then | |
6994 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6995 | break | |
6996 | fi | |
6997 | done | |
6998 | fi | |
6999 | # check in a few other private locations | |
7000 | echo "**** Other private locations" | |
7001 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7002 | for i in \ | |
7003 | ${srcdir}/../tix \ | |
7004 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
7005 | echo "**** Looking at $i - with ${configdir}" | |
7006 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
7007 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
7008 | break | |
7009 | fi | |
7010 | done | |
7011 | fi | |
7012 | ||
7013 | fi | |
7014 | ||
7015 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7016 | TIXCONFIG="# no Tix configs found" | |
7017 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
7018 | else | |
7019 | no_tix= | |
7020 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
7021 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
7022 | fi | |
7023 | fi | |
7024 | ||
7025 | ||
7026 | if test -z "${no_tix}"; then | |
7027 | ||
7028 | if test -f "$TIXCONFIG" ; then | |
7029 | . $TIXCONFIG | |
7030 | fi | |
7031 | ||
7032 | ||
7033 | ||
7034 | ||
7035 | ||
7036 | ||
7037 | ||
7038 | ||
7039 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
7040 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
7041 | fi | |
7042 | ||
3fc11d3e JM |
7043 | ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK" |
7044 | # Tcl/Tk 8.1 require -fwritable strings. I don't | |
7045 | # know whether 8.2 will or not, but I bet it will. | |
7046 | # I don't have to worry about 7.x since we don't support it. | |
7047 | GDBTK_CFLAGS="" | |
7048 | if test "$GCC" = "yes"; then | |
7049 | if test "$TCL_VERSION" != "8.0" ; then | |
7050 | GDBTK_CFLAGS="-fwritable-strings" | |
7051 | fi | |
7052 | fi | |
7053 | ||
7054 | # Include some libraries that Tcl and Tk want. | |
7055 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
7056 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
7057 | # Yes, the ordering seems wrong here. But it isn't. | |
7058 | # TK_LIBS is the list of libraries that need to be linked | |
7059 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
7060 | # were in LIBS then any link tests after this point would | |
7061 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
7062 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
d45b9300 FN |
7063 | 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" |
7064 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o" | |
7065 | 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 | 7066 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 7067 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
7068 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
7069 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
7070 | |
7071 | if test x$gdb_cv_os_cygwin = xyes; then | |
7072 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
7073 | WIN32LDAPP="-Wl,--subsystem,console" | |
7074 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
7075 | fi | |
7076 | fi | |
7077 | fi | |
7078 | fi | |
7079 | ||
7080 | ||
7081 | ||
7082 | ||
7083 | ||
7084 | ||
7085 | ||
7086 | ||
7087 | ||
7088 | ||
7089 | ||
7090 | ||
7091 | ||
c906108c SS |
7092 | # If we find X, set shell vars x_includes and x_libraries to the |
7093 | # paths, otherwise set no_x=yes. | |
7094 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
7095 | # --without-x overrides everything else, but does not touch the cache. | |
7096 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
6ce2ac0b | 7097 | echo "configure:7098: checking for X" >&5 |
c906108c SS |
7098 | |
7099 | # Check whether --with-x or --without-x was given. | |
7100 | if test "${with_x+set}" = set; then | |
7101 | withval="$with_x" | |
7102 | : | |
7103 | fi | |
7104 | ||
7105 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
7106 | if test "x$with_x" = xno; then | |
7107 | # The user explicitly disabled X. | |
7108 | have_x=disabled | |
7109 | else | |
7110 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
7111 | # Both variables are already set. | |
7112 | have_x=yes | |
7113 | else | |
7114 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
7115 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7116 | else | |
7117 | # One or both of the vars are not set, and there is no cached value. | |
7118 | ac_x_includes=NO ac_x_libraries=NO | |
7119 | rm -fr conftestdir | |
7120 | if mkdir conftestdir; then | |
7121 | cd conftestdir | |
7122 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
7123 | cat > Imakefile <<'EOF' | |
7124 | acfindx: | |
7125 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
7126 | EOF | |
7127 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
7128 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
7129 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
7130 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
7131 | for ac_extension in a so sl; do | |
7132 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
7133 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
7134 | ac_im_usrlibdir=$ac_im_libdir; break | |
7135 | fi | |
7136 | done | |
7137 | # Screen out bogus values from the imake configuration. They are | |
7138 | # bogus both because they are the default anyway, and because | |
7139 | # using them would break gcc on systems where it needs fixed includes. | |
7140 | case "$ac_im_incroot" in | |
7141 | /usr/include) ;; | |
7142 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
7143 | esac | |
7144 | case "$ac_im_usrlibdir" in | |
7145 | /usr/lib | /lib) ;; | |
7146 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
7147 | esac | |
7148 | fi | |
7149 | cd .. | |
7150 | rm -fr conftestdir | |
7151 | fi | |
7152 | ||
7153 | if test "$ac_x_includes" = NO; then | |
7154 | # Guess where to find include files, by looking for this one X11 .h file. | |
7155 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
7156 | ||
7157 | # First, try using that file with no special directory specified. | |
7158 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 7159 | #line 7160 "configure" |
c906108c SS |
7160 | #include "confdefs.h" |
7161 | #include <$x_direct_test_include> | |
7162 | EOF | |
7163 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6ce2ac0b | 7164 | { (eval echo configure:7165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
7165 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7166 | if test -z "$ac_err"; then | |
7167 | rm -rf conftest* | |
7168 | # We can compile using X headers with no special include directory. | |
7169 | ac_x_includes= | |
7170 | else | |
7171 | echo "$ac_err" >&5 | |
7172 | echo "configure: failed program was:" >&5 | |
7173 | cat conftest.$ac_ext >&5 | |
7174 | rm -rf conftest* | |
7175 | # Look for the header file in a standard set of common directories. | |
7176 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7177 | for ac_dir in \ | |
7178 | /usr/X11/include \ | |
7179 | /usr/X11R6/include \ | |
7180 | /usr/X11R5/include \ | |
7181 | /usr/X11R4/include \ | |
7182 | \ | |
7183 | /usr/include/X11 \ | |
7184 | /usr/include/X11R6 \ | |
7185 | /usr/include/X11R5 \ | |
7186 | /usr/include/X11R4 \ | |
7187 | \ | |
7188 | /usr/local/X11/include \ | |
7189 | /usr/local/X11R6/include \ | |
7190 | /usr/local/X11R5/include \ | |
7191 | /usr/local/X11R4/include \ | |
7192 | \ | |
7193 | /usr/local/include/X11 \ | |
7194 | /usr/local/include/X11R6 \ | |
7195 | /usr/local/include/X11R5 \ | |
7196 | /usr/local/include/X11R4 \ | |
7197 | \ | |
7198 | /usr/X386/include \ | |
7199 | /usr/x386/include \ | |
7200 | /usr/XFree86/include/X11 \ | |
7201 | \ | |
7202 | /usr/include \ | |
7203 | /usr/local/include \ | |
7204 | /usr/unsupported/include \ | |
7205 | /usr/athena/include \ | |
7206 | /usr/local/x11r5/include \ | |
7207 | /usr/lpp/Xamples/include \ | |
7208 | \ | |
7209 | /usr/openwin/include \ | |
7210 | /usr/openwin/share/include \ | |
7211 | ; \ | |
7212 | do | |
7213 | if test -r "$ac_dir/$x_direct_test_include"; then | |
7214 | ac_x_includes=$ac_dir | |
7215 | break | |
7216 | fi | |
7217 | done | |
7218 | fi | |
7219 | rm -f conftest* | |
7220 | fi # $ac_x_includes = NO | |
7221 | ||
7222 | if test "$ac_x_libraries" = NO; then | |
7223 | # Check for the libraries. | |
7224 | ||
7225 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
7226 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
7227 | ||
7228 | # See if we find them without any special options. | |
7229 | # Don't add to $LIBS permanently. | |
7230 | ac_save_LIBS="$LIBS" | |
7231 | LIBS="-l$x_direct_test_library $LIBS" | |
7232 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 7233 | #line 7234 "configure" |
c906108c SS |
7234 | #include "confdefs.h" |
7235 | ||
7236 | int main() { | |
7237 | ${x_direct_test_function}() | |
7238 | ; return 0; } | |
7239 | EOF | |
6ce2ac0b | 7240 | if { (eval echo configure:7241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7241 | rm -rf conftest* |
7242 | LIBS="$ac_save_LIBS" | |
7243 | # We can link X programs with no special library path. | |
7244 | ac_x_libraries= | |
7245 | else | |
7246 | echo "configure: failed program was:" >&5 | |
7247 | cat conftest.$ac_ext >&5 | |
7248 | rm -rf conftest* | |
7249 | LIBS="$ac_save_LIBS" | |
7250 | # First see if replacing the include by lib works. | |
7251 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7252 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
7253 | /usr/X11/lib \ | |
7254 | /usr/X11R6/lib \ | |
7255 | /usr/X11R5/lib \ | |
7256 | /usr/X11R4/lib \ | |
7257 | \ | |
7258 | /usr/lib/X11 \ | |
7259 | /usr/lib/X11R6 \ | |
7260 | /usr/lib/X11R5 \ | |
7261 | /usr/lib/X11R4 \ | |
7262 | \ | |
7263 | /usr/local/X11/lib \ | |
7264 | /usr/local/X11R6/lib \ | |
7265 | /usr/local/X11R5/lib \ | |
7266 | /usr/local/X11R4/lib \ | |
7267 | \ | |
7268 | /usr/local/lib/X11 \ | |
7269 | /usr/local/lib/X11R6 \ | |
7270 | /usr/local/lib/X11R5 \ | |
7271 | /usr/local/lib/X11R4 \ | |
7272 | \ | |
7273 | /usr/X386/lib \ | |
7274 | /usr/x386/lib \ | |
7275 | /usr/XFree86/lib/X11 \ | |
7276 | \ | |
7277 | /usr/lib \ | |
7278 | /usr/local/lib \ | |
7279 | /usr/unsupported/lib \ | |
7280 | /usr/athena/lib \ | |
7281 | /usr/local/x11r5/lib \ | |
7282 | /usr/lpp/Xamples/lib \ | |
7283 | /lib/usr/lib/X11 \ | |
7284 | \ | |
7285 | /usr/openwin/lib \ | |
7286 | /usr/openwin/share/lib \ | |
7287 | ; \ | |
7288 | do | |
7289 | for ac_extension in a so sl; do | |
7290 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
7291 | ac_x_libraries=$ac_dir | |
7292 | break 2 | |
7293 | fi | |
7294 | done | |
7295 | done | |
7296 | fi | |
7297 | rm -f conftest* | |
7298 | fi # $ac_x_libraries = NO | |
7299 | ||
7300 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
7301 | # Didn't find X anywhere. Cache the known absence of X. | |
7302 | ac_cv_have_x="have_x=no" | |
7303 | else | |
7304 | # Record where we found X for the cache. | |
7305 | ac_cv_have_x="have_x=yes \ | |
7306 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
7307 | fi | |
7308 | fi | |
7309 | fi | |
7310 | eval "$ac_cv_have_x" | |
7311 | fi # $with_x != no | |
7312 | ||
7313 | if test "$have_x" != yes; then | |
7314 | echo "$ac_t""$have_x" 1>&6 | |
7315 | no_x=yes | |
7316 | else | |
7317 | # If each of the values was on the command line, it overrides each guess. | |
7318 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
7319 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
7320 | # Update the cache value to reflect the command line values. | |
7321 | ac_cv_have_x="have_x=yes \ | |
7322 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
7323 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
7324 | fi | |
7325 | ||
7326 | ||
7a292a7a SS |
7327 | |
7328 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
7329 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
7330 | # This code just checks for a few cases where we'd like to ignore those | |
7331 | # definitions, even when they're present in the '.mt' file. These cases | |
7332 | # are when --disable-sim is specified, or if the simulator directory is | |
7333 | # not part of the soruce tree. | |
7334 | # | |
7335 | # Check whether --enable-sim or --disable-sim was given. | |
7336 | if test "${enable_sim+set}" = set; then | |
7337 | enableval="$enable_sim" | |
7338 | echo "enable_sim = $enable_sim"; | |
7339 | echo "enableval = ${enableval}"; | |
7340 | case "${enableval}" in | |
7341 | yes) ignore_sim=false ;; | |
7342 | no) ignore_sim=true ;; | |
7343 | *) ignore_sim=false ;; | |
7344 | esac | |
7345 | else | |
7346 | ignore_sim=false | |
7347 | fi | |
7348 | ||
7349 | ||
7350 | if test ! -d "${srcdir}/../sim"; then | |
7351 | ignore_sim=true | |
7352 | fi | |
7353 | ||
7354 | if test "${ignore_sim}" = "true"; then | |
7355 | IGNORE_SIM="SIM=" | |
7356 | IGNORE_SIM_OBS="SIM_OBS=" | |
7357 | else | |
7358 | IGNORE_SIM="" | |
7359 | IGNORE_SIM_OBS="" | |
7360 | cat >> confdefs.h <<\EOF | |
7361 | #define WITH_SIM 1 | |
7362 | EOF | |
7363 | ||
7364 | fi | |
7365 | ||
7366 | ||
7367 | ||
c906108c SS |
7368 | |
7369 | ||
7370 | ||
7371 | ||
7372 | ||
7373 | ||
dfcd3bfb | 7374 | |
e56ac5c3 AC |
7375 | |
7376 | ||
b3a90332 AC |
7377 | |
7378 | ||
c906108c SS |
7379 | # Begin stuff to support --enable-shared |
7380 | # Check whether --enable-shared or --disable-shared was given. | |
7381 | if test "${enable_shared+set}" = set; then | |
7382 | enableval="$enable_shared" | |
7383 | case "${enableval}" in | |
7384 | yes) shared=true ;; | |
7385 | no) shared=false ;; | |
7386 | *) shared=true ;; | |
7387 | esac | |
7388 | fi | |
7389 | ||
7390 | HLDFLAGS= | |
7391 | HLDENV= | |
7392 | # If we have shared libraries, try to set rpath reasonably. | |
7393 | if test "${shared}" = "true"; then | |
7394 | case "${host}" in | |
7395 | *-*-hpux*) | |
7396 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
7397 | ;; | |
7398 | *-*-irix5* | *-*-irix6*) | |
7399 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
7400 | ;; | |
7401 | *-*-linux*aout*) | |
7402 | ;; | |
88987551 | 7403 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
7404 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
7405 | ;; | |
7406 | *-*-solaris*) | |
7407 | HLDFLAGS='-R $(libdir)' | |
7408 | ;; | |
7409 | *-*-sysv4*) | |
7410 | 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;' | |
7411 | ;; | |
7412 | esac | |
7413 | fi | |
7414 | ||
7415 | # On SunOS, if the linker supports the -rpath option, use it to | |
7416 | # prevent ../bfd and ../opcodes from being included in the run time | |
7417 | # search path. | |
7418 | case "${host}" in | |
7419 | *-*-sunos*) | |
7420 | echo 'main () { }' > conftest.c | |
7421 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
7422 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
7423 | : | |
7424 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
7425 | : | |
7426 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
7427 | : | |
7428 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
7429 | : | |
7430 | elif test "${shared}" = "true"; then | |
7431 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
7432 | else | |
7433 | HLDFLAGS='-Wl,-rpath=' | |
7434 | fi | |
7435 | rm -f conftest.t conftest.c conftest | |
7436 | ;; | |
7437 | esac | |
7438 | ||
7439 | ||
7440 | # End stuff to support --enable-shared | |
7441 | ||
7442 | # target_subdir is used by the testsuite to find the target libraries. | |
7443 | target_subdir= | |
7444 | if test "${host}" != "${target}"; then | |
7445 | target_subdir="${target_alias}/" | |
7446 | fi | |
7447 | ||
7448 | ||
7449 | frags= | |
7450 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
7451 | if test ! -f ${host_makefile_frag}; then | |
7452 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
7453 | fi | |
7454 | frags="$frags $host_makefile_frag" | |
7455 | ||
7456 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
7457 | if test ! -f ${target_makefile_frag}; then | |
7458 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
7459 | fi | |
7460 | frags="$frags $target_makefile_frag" | |
7461 | ||
7462 | ||
7463 | ||
7464 | ||
7465 | ||
7466 | hostfile=`sed -n ' | |
7467 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7468 | ' ${host_makefile_frag}` | |
7469 | ||
7470 | targetfile=`sed -n ' | |
7471 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7472 | ' ${target_makefile_frag}` | |
7473 | ||
6166d547 AC |
7474 | GDB_MULTI_ARCH=`sed -n ' |
7475 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
7476 | ' ${target_makefile_frag}` | |
7477 | ||
c906108c SS |
7478 | # these really aren't orthogonal true/false values of the same condition, |
7479 | # but shells are slow enough that I like to reuse the test conditions | |
7480 | # whenever possible | |
7481 | if test "${target}" = "${host}"; then | |
7482 | nativefile=`sed -n ' | |
7483 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7484 | ' ${host_makefile_frag}` | |
7485 | # else | |
7486 | # GDBserver is only useful in a "native" enviroment | |
7487 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
7488 | fi | |
7489 | ||
7490 | ||
6166d547 AC |
7491 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
7492 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
7493 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
7494 | # will be the default. | |
7495 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
7496 | case "${gdb_multi_arch}" in | |
7497 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
7498 | no ) GDB_MULTI_ARCH=0 ;; | |
7499 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
7500 | esac | |
7501 | fi | |
7502 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
7503 | cat >> confdefs.h <<EOF | |
7504 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
7505 | EOF | |
7506 | ||
7507 | fi | |
7508 | # Warn the user when they use an old pratice | |
7509 | case "${GDB_MULTI_ARCH}" in | |
7510 | "" ) ;; | |
7511 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
7512 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
7513 | GDB_MULTI_ARCH_PURE ) | |
7514 | if test x"${targetfile}" != x ; then | |
7515 | echo "configure: warning: "GDB: Ingoring TM_FILE in ${target_makefile_frag}"" 1>&2 | |
5a2402b8 | 7516 | targetfile="" |
6166d547 AC |
7517 | fi ;; |
7518 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
7519 | esac | |
7520 | ||
7521 | ||
96baa820 JM |
7522 | SUBDIRS="doc testsuite nlm" |
7523 | if test "${enable_multi_ice}" = "yes"; then | |
7524 | SUBDIRS="${SUBDIRS} multi-ice" | |
7525 | fi | |
7526 | ||
7527 | ||
7528 | ||
c906108c | 7529 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
7530 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
7531 | # version. | |
c906108c SS |
7532 | |
7533 | files= | |
7534 | links= | |
5a2402b8 | 7535 | |
c906108c | 7536 | rm -f xm.h |
5a2402b8 | 7537 | xm_h="" |
c906108c | 7538 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
7539 | xm_h=xm.h |
7540 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
7541 | files="${files} ${GDB_XM_FILE}" | |
7542 | links="${links} xm.h" | |
7543 | cat >> confdefs.h <<EOF | |
7544 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
7545 | EOF | |
7546 | ||
c906108c | 7547 | fi |
5a2402b8 AC |
7548 | |
7549 | ||
c906108c | 7550 | rm -f tm.h |
5a2402b8 | 7551 | tm_h="" |
c906108c | 7552 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
7553 | tm_h=tm.h |
7554 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
7555 | files="${files} ${GDB_TM_FILE}" | |
7556 | links="${links} tm.h" | |
7557 | cat >> confdefs.h <<EOF | |
7558 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
7559 | EOF | |
7560 | ||
c906108c | 7561 | fi |
5a2402b8 AC |
7562 | |
7563 | ||
c906108c | 7564 | rm -f nm.h |
5a2402b8 | 7565 | nm_h="" |
c906108c | 7566 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
7567 | nm_h=nm.h |
7568 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
7569 | files="${files} ${GDB_NM_FILE}" | |
7570 | links="${links} nm.h" | |
7571 | cat >> confdefs.h <<EOF | |
7572 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
7573 | EOF | |
7574 | ||
c906108c | 7575 | fi |
5a2402b8 AC |
7576 | |
7577 | ||
3fc11d3e | 7578 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
6ce2ac0b | 7579 | echo "configure:7580: checking whether ln -s works" >&5 |
3fc11d3e JM |
7580 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
7581 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7582 | else | |
7583 | rm -f conftestdata | |
7584 | if ln -s X conftestdata 2>/dev/null | |
7585 | then | |
7586 | rm -f conftestdata | |
7587 | ac_cv_prog_LN_S="ln -s" | |
7588 | else | |
7589 | ac_cv_prog_LN_S=ln | |
7590 | fi | |
7591 | fi | |
7592 | LN_S="$ac_cv_prog_LN_S" | |
7593 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
7594 | echo "$ac_t""yes" 1>&6 | |
7595 | else | |
7596 | echo "$ac_t""no" 1>&6 | |
7597 | fi | |
7598 | ||
c906108c SS |
7599 | |
7600 | ||
7601 | ||
7602 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
6ce2ac0b | 7603 | echo "configure:7604: checking for Cygwin environment" >&5 |
c906108c SS |
7604 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
7605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7606 | else | |
7607 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 7608 | #line 7609 "configure" |
c906108c SS |
7609 | #include "confdefs.h" |
7610 | ||
7611 | int main() { | |
7612 | ||
7613 | #ifndef __CYGWIN__ | |
7614 | #define __CYGWIN__ __CYGWIN32__ | |
7615 | #endif | |
7616 | return __CYGWIN__; | |
7617 | ; return 0; } | |
7618 | EOF | |
6ce2ac0b | 7619 | if { (eval echo configure:7620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7620 | rm -rf conftest* |
7621 | ac_cv_cygwin=yes | |
7622 | else | |
7623 | echo "configure: failed program was:" >&5 | |
7624 | cat conftest.$ac_ext >&5 | |
7625 | rm -rf conftest* | |
7626 | ac_cv_cygwin=no | |
7627 | fi | |
7628 | rm -f conftest* | |
7629 | rm -f conftest* | |
7630 | fi | |
7631 | ||
7632 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
7633 | CYGWIN= | |
7634 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
7635 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
6ce2ac0b | 7636 | echo "configure:7637: checking for mingw32 environment" >&5 |
c906108c SS |
7637 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
7638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7639 | else | |
7640 | cat > conftest.$ac_ext <<EOF | |
6ce2ac0b | 7641 | #line 7642 "configure" |
c906108c SS |
7642 | #include "confdefs.h" |
7643 | ||
7644 | int main() { | |
7645 | return __MINGW32__; | |
7646 | ; return 0; } | |
7647 | EOF | |
6ce2ac0b | 7648 | if { (eval echo configure:7649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7649 | rm -rf conftest* |
7650 | ac_cv_mingw32=yes | |
7651 | else | |
7652 | echo "configure: failed program was:" >&5 | |
7653 | cat conftest.$ac_ext >&5 | |
7654 | rm -rf conftest* | |
7655 | ac_cv_mingw32=no | |
7656 | fi | |
7657 | rm -f conftest* | |
7658 | rm -f conftest* | |
7659 | fi | |
7660 | ||
7661 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
7662 | MINGW32= | |
7663 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
7664 | ||
7665 | ||
7666 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
6ce2ac0b | 7667 | echo "configure:7668: checking for executable suffix" >&5 |
c906108c SS |
7668 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
7669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7670 | else | |
7671 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
7672 | ac_cv_exeext=.exe | |
7673 | else | |
7674 | rm -f conftest* | |
7675 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
7676 | ac_cv_exeext= | |
6ce2ac0b | 7677 | if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
7678 | for file in conftest.*; do |
7679 | case $file in | |
6ce2ac0b | 7680 | *.c | *.o | *.obj) ;; |
c906108c SS |
7681 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
7682 | esac | |
7683 | done | |
7684 | else | |
7685 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
7686 | fi | |
7687 | rm -f conftest* | |
7688 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
7689 | fi | |
7690 | fi | |
7691 | ||
7692 | EXEEXT="" | |
7693 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
7694 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
7695 | ac_exeext=$EXEEXT | |
7696 | ||
7697 | ||
7698 | subdirs="$configdirs" | |
7699 | ||
7700 | trap '' 1 2 15 | |
7701 | cat > confcache <<\EOF | |
7702 | # This file is a shell script that caches the results of configure | |
7703 | # tests run on this system so they can be shared between configure | |
7704 | # scripts and configure runs. It is not useful on other systems. | |
7705 | # If it contains results you don't want to keep, you may remove or edit it. | |
7706 | # | |
7707 | # By default, configure uses ./config.cache as the cache file, | |
7708 | # creating it if it does not exist already. You can give configure | |
7709 | # the --cache-file=FILE option to use a different cache file; that is | |
7710 | # what configure does when it calls configure scripts in | |
7711 | # subdirectories, so they share the cache. | |
7712 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7713 | # config.status only pays attention to the cache file if you give it the | |
7714 | # --recheck option to rerun configure. | |
7715 | # | |
7716 | EOF | |
7717 | # The following way of writing the cache mishandles newlines in values, | |
7718 | # but we know of no workaround that is simple, portable, and efficient. | |
7719 | # So, don't put newlines in cache variables' values. | |
7720 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7721 | # and sets the high bit in the cache file unless we assign to the vars. | |
7722 | (set) 2>&1 | | |
7723 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
7724 | *ac_space=\ *) | |
7725 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7726 | # turns \\\\ into \\, and sed turns \\ into \). | |
7727 | sed -n \ | |
7728 | -e "s/'/'\\\\''/g" \ | |
7729 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7730 | ;; | |
7731 | *) | |
7732 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7733 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7734 | ;; | |
7735 | esac >> confcache | |
7736 | if cmp -s $cache_file confcache; then | |
7737 | : | |
7738 | else | |
7739 | if test -w $cache_file; then | |
7740 | echo "updating cache $cache_file" | |
7741 | cat confcache > $cache_file | |
7742 | else | |
7743 | echo "not updating unwritable cache $cache_file" | |
7744 | fi | |
7745 | fi | |
7746 | rm -f confcache | |
7747 | ||
7748 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7749 | ||
7750 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7751 | # Let make expand exec_prefix. | |
7752 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7753 | ||
7754 | # Any assignment to VPATH causes Sun make to only execute | |
7755 | # the first set of double-colon rules, so remove it if not needed. | |
7756 | # If there is a colon in the path, we need to keep it. | |
7757 | if test "x$srcdir" = x.; then | |
7758 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7759 | fi | |
7760 | ||
7761 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7762 | ||
7763 | DEFS=-DHAVE_CONFIG_H | |
7764 | ||
7765 | # Without the "./", some shells look in PATH for config.status. | |
7766 | : ${CONFIG_STATUS=./config.status} | |
7767 | ||
7768 | echo creating $CONFIG_STATUS | |
7769 | rm -f $CONFIG_STATUS | |
7770 | cat > $CONFIG_STATUS <<EOF | |
7771 | #! /bin/sh | |
7772 | # Generated automatically by configure. | |
7773 | # Run this file to recreate the current configuration. | |
7774 | # This directory was configured as follows, | |
7775 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7776 | # | |
7777 | # $0 $ac_configure_args | |
7778 | # | |
7779 | # Compiler output produced by configure, useful for debugging | |
7780 | # configure, is in ./config.log if it exists. | |
7781 | ||
7782 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
7783 | for ac_option | |
7784 | do | |
7785 | case "\$ac_option" in | |
7786 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7787 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7788 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7789 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
7790 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
7791 | exit 0 ;; | |
7792 | -help | --help | --hel | --he | --h) | |
7793 | echo "\$ac_cs_usage"; exit 0 ;; | |
7794 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
7795 | esac | |
7796 | done | |
7797 | ||
7798 | ac_given_srcdir=$srcdir | |
7799 | ac_given_INSTALL="$INSTALL" | |
7800 | ||
ed952ac5 | 7801 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
7802 | EOF |
7803 | cat >> $CONFIG_STATUS <<EOF | |
7804 | ||
7805 | # Protect against being on the right side of a sed subst in config.status. | |
7806 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7807 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7808 | $ac_vpsub | |
7809 | $extrasub | |
7810 | s%@SHELL@%$SHELL%g | |
7811 | s%@CFLAGS@%$CFLAGS%g | |
7812 | s%@CPPFLAGS@%$CPPFLAGS%g | |
7813 | s%@CXXFLAGS@%$CXXFLAGS%g | |
7814 | s%@FFLAGS@%$FFLAGS%g | |
7815 | s%@DEFS@%$DEFS%g | |
7816 | s%@LDFLAGS@%$LDFLAGS%g | |
7817 | s%@LIBS@%$LIBS%g | |
7818 | s%@exec_prefix@%$exec_prefix%g | |
7819 | s%@prefix@%$prefix%g | |
7820 | s%@program_transform_name@%$program_transform_name%g | |
7821 | s%@bindir@%$bindir%g | |
7822 | s%@sbindir@%$sbindir%g | |
7823 | s%@libexecdir@%$libexecdir%g | |
7824 | s%@datadir@%$datadir%g | |
7825 | s%@sysconfdir@%$sysconfdir%g | |
7826 | s%@sharedstatedir@%$sharedstatedir%g | |
7827 | s%@localstatedir@%$localstatedir%g | |
7828 | s%@libdir@%$libdir%g | |
7829 | s%@includedir@%$includedir%g | |
7830 | s%@oldincludedir@%$oldincludedir%g | |
7831 | s%@infodir@%$infodir%g | |
7832 | s%@mandir@%$mandir%g | |
413ccac7 AC |
7833 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
7834 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
7835 | s%@MAINT@%$MAINT%g | |
c906108c SS |
7836 | s%@CC@%$CC%g |
7837 | s%@CPP@%$CPP%g | |
7838 | s%@host@%$host%g | |
7839 | s%@host_alias@%$host_alias%g | |
7840 | s%@host_cpu@%$host_cpu%g | |
7841 | s%@host_vendor@%$host_vendor%g | |
7842 | s%@host_os@%$host_os%g | |
7843 | s%@target@%$target%g | |
7844 | s%@target_alias@%$target_alias%g | |
7845 | s%@target_cpu@%$target_cpu%g | |
7846 | s%@target_vendor@%$target_vendor%g | |
7847 | s%@target_os@%$target_os%g | |
7848 | s%@build@%$build%g | |
7849 | s%@build_alias@%$build_alias%g | |
7850 | s%@build_cpu@%$build_cpu%g | |
7851 | s%@build_vendor@%$build_vendor%g | |
7852 | s%@build_os@%$build_os%g | |
7853 | s%@SET_MAKE@%$SET_MAKE%g | |
7854 | s%@RANLIB@%$RANLIB%g | |
7855 | s%@ALLOCA@%$ALLOCA%g | |
7856 | s%@USE_NLS@%$USE_NLS%g | |
7857 | s%@MSGFMT@%$MSGFMT%g | |
7858 | s%@GMSGFMT@%$GMSGFMT%g | |
7859 | s%@XGETTEXT@%$XGETTEXT%g | |
7860 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
7861 | s%@CATALOGS@%$CATALOGS%g | |
7862 | s%@CATOBJEXT@%$CATOBJEXT%g | |
7863 | s%@DATADIRNAME@%$DATADIRNAME%g | |
7864 | s%@GMOFILES@%$GMOFILES%g | |
7865 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
7866 | s%@INTLDEPS@%$INTLDEPS%g | |
7867 | s%@INTLLIBS@%$INTLLIBS%g | |
7868 | s%@INTLOBJS@%$INTLOBJS%g | |
7869 | s%@POFILES@%$POFILES%g | |
7870 | s%@POSUB@%$POSUB%g | |
7871 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
7872 | s%@GT_NO@%$GT_NO%g | |
7873 | s%@GT_YES@%$GT_YES%g | |
7874 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
7875 | s%@l@%$l%g | |
7a292a7a | 7876 | s%@AWK@%$AWK%g |
c906108c SS |
7877 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
7878 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
7879 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
7880 | s%@AR@%$AR%g | |
95ca63c4 CF |
7881 | s%@DLLTOOL@%$DLLTOOL%g |
7882 | s%@WINDRES@%$WINDRES%g | |
c906108c | 7883 | s%@YACC@%$YACC%g |
75c6e08a | 7884 | s%@MIG@%$MIG%g |
c906108c | 7885 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
c906108c | 7886 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 7887 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
7888 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
7889 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 7890 | s%@REGEX@%$REGEX%g |
aff38e61 | 7891 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
c906108c | 7892 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 7893 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
7894 | s%@LIBGUI@%$LIBGUI%g |
7895 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
7896 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
7897 | s%@TCL_VERSION@%$TCL_VERSION%g | |
7898 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
7899 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
7900 | s%@TCL_CC@%$TCL_CC%g | |
7901 | s%@TCL_DEFS@%$TCL_DEFS%g | |
7902 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
7903 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
7904 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
7905 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
7906 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
7907 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
7908 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
7909 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
7910 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
7911 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
7912 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
7913 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
7914 | s%@TK_VERSION@%$TK_VERSION%g | |
7915 | s%@TK_DEFS@%$TK_DEFS%g | |
7916 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
7917 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
7918 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
7919 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
7920 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
7921 | s%@TCLHDIR@%$TCLHDIR%g | |
7922 | s%@TKHDIR@%$TKHDIR%g | |
7923 | s%@ITCLHDIR@%$ITCLHDIR%g | |
7924 | s%@ITKHDIR@%$ITKHDIR%g | |
7925 | s%@TIXHDIR@%$TIXHDIR%g | |
7926 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
7927 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
7928 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
7929 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
7930 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
7931 | s%@ITK_VERSION@%$ITK_VERSION%g | |
7932 | s%@ITK_DEFS@%$ITK_DEFS%g | |
7933 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
7934 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
7935 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7936 | s%@TIX_VERSION@%$TIX_VERSION%g | |
7937 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
7938 | s%@X_CFLAGS@%$X_CFLAGS%g |
7939 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
7940 | s%@X_LIBS@%$X_LIBS%g | |
7941 | s%@ITCLLIB@%$ITCLLIB%g | |
7942 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
7943 | s%@ITKLIB@%$ITKLIB%g | |
7944 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7945 | s%@TIXLIB@%$TIXLIB%g | |
7946 | s%@TIX_DEPS@%$TIX_DEPS%g | |
7947 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
7948 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
7949 | s%@IGNORE_SIM@%$IGNORE_SIM%g | |
7950 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
7951 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
7952 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
7953 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
7954 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 7955 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
7956 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
7957 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
7958 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
7959 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
7960 | s%@HLDFLAGS@%$HLDFLAGS%g |
7961 | s%@HLDENV@%$HLDENV%g | |
7962 | s%@target_subdir@%$target_subdir%g | |
7963 | /@host_makefile_frag@/r $host_makefile_frag | |
7964 | s%@host_makefile_frag@%%g | |
7965 | /@target_makefile_frag@/r $target_makefile_frag | |
7966 | s%@target_makefile_frag@%%g | |
7967 | s%@frags@%$frags%g | |
96baa820 | 7968 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
7969 | s%@xm_h@%$xm_h%g |
7970 | s%@tm_h@%$tm_h%g | |
7971 | s%@nm_h@%$nm_h%g | |
7a292a7a | 7972 | s%@LN_S@%$LN_S%g |
c906108c SS |
7973 | s%@EXEEXT@%$EXEEXT%g |
7974 | s%@subdirs@%$subdirs%g | |
7975 | ||
7976 | CEOF | |
7977 | EOF | |
7978 | ||
7979 | cat >> $CONFIG_STATUS <<\EOF | |
7980 | ||
7981 | # Split the substitutions into bite-sized pieces for seds with | |
7982 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
7983 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
7984 | ac_file=1 # Number of current file. | |
7985 | ac_beg=1 # First line for current file. | |
7986 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
7987 | ac_more_lines=: | |
7988 | ac_sed_cmds="" | |
7989 | while $ac_more_lines; do | |
7990 | if test $ac_beg -gt 1; then | |
7991 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
7992 | else | |
7993 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
7994 | fi | |
7995 | if test ! -s conftest.s$ac_file; then | |
7996 | ac_more_lines=false | |
7997 | rm -f conftest.s$ac_file | |
7998 | else | |
7999 | if test -z "$ac_sed_cmds"; then | |
8000 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8001 | else | |
8002 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8003 | fi | |
8004 | ac_file=`expr $ac_file + 1` | |
8005 | ac_beg=$ac_end | |
8006 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8007 | fi | |
8008 | done | |
8009 | if test -z "$ac_sed_cmds"; then | |
8010 | ac_sed_cmds=cat | |
8011 | fi | |
8012 | EOF | |
8013 | ||
8014 | cat >> $CONFIG_STATUS <<EOF | |
8015 | ||
ed952ac5 | 8016 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
8017 | EOF |
8018 | cat >> $CONFIG_STATUS <<\EOF | |
8019 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8020 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8021 | case "$ac_file" in | |
8022 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8023 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8024 | *) ac_file_in="${ac_file}.in" ;; | |
8025 | esac | |
8026 | ||
8027 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8028 | ||
8029 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8030 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8031 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8032 | # The file is in a subdirectory. | |
8033 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8034 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8035 | # A "../" for each directory in $ac_dir_suffix. | |
8036 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8037 | else | |
8038 | ac_dir_suffix= ac_dots= | |
8039 | fi | |
8040 | ||
8041 | case "$ac_given_srcdir" in | |
8042 | .) srcdir=. | |
8043 | if test -z "$ac_dots"; then top_srcdir=. | |
8044 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8045 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8046 | *) # Relative path. | |
8047 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8048 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8049 | esac | |
8050 | ||
8051 | case "$ac_given_INSTALL" in | |
8052 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8053 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8054 | esac | |
8055 | ||
8056 | echo creating "$ac_file" | |
8057 | rm -f "$ac_file" | |
8058 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8059 | case "$ac_file" in | |
8060 | *Makefile*) ac_comsub="1i\\ | |
8061 | # $configure_input" ;; | |
8062 | *) ac_comsub= ;; | |
8063 | esac | |
8064 | ||
8065 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8066 | sed -e "$ac_comsub | |
8067 | s%@configure_input@%$configure_input%g | |
8068 | s%@srcdir@%$srcdir%g | |
8069 | s%@top_srcdir@%$top_srcdir%g | |
8070 | s%@INSTALL@%$INSTALL%g | |
8071 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
8072 | fi; done | |
8073 | rm -f conftest.s* | |
8074 | ||
8075 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8076 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8077 | # | |
8078 | # ac_d sets the value in "#define NAME VALUE" lines. | |
8079 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8080 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8081 | ac_dC='\3' | |
8082 | ac_dD='%g' | |
8083 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8084 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8085 | ac_uB='\([ ]\)%\1#\2define\3' | |
8086 | ac_uC=' ' | |
8087 | ac_uD='\4%g' | |
8088 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8089 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8090 | ac_eB='$%\1#\2define\3' | |
8091 | ac_eC=' ' | |
8092 | ac_eD='%g' | |
8093 | ||
8094 | if test "${CONFIG_HEADERS+set}" != set; then | |
8095 | EOF | |
8096 | cat >> $CONFIG_STATUS <<EOF | |
8097 | CONFIG_HEADERS="config.h:config.in" | |
8098 | EOF | |
8099 | cat >> $CONFIG_STATUS <<\EOF | |
8100 | fi | |
8101 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8102 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8103 | case "$ac_file" in | |
8104 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8105 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8106 | *) ac_file_in="${ac_file}.in" ;; | |
8107 | esac | |
8108 | ||
8109 | echo creating $ac_file | |
8110 | ||
8111 | rm -f conftest.frag conftest.in conftest.out | |
8112 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8113 | cat $ac_file_inputs > conftest.in | |
8114 | ||
8115 | EOF | |
8116 | ||
8117 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8118 | # the proper values into config.h.in to produce config.h. And first: | |
8119 | # Protect against being on the right side of a sed subst in config.status. | |
8120 | # Protect against being in an unquoted here document in config.status. | |
8121 | rm -f conftest.vals | |
8122 | cat > conftest.hdr <<\EOF | |
8123 | s/[\\&%]/\\&/g | |
8124 | s%[\\$`]%\\&%g | |
8125 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8126 | s%ac_d%ac_u%gp | |
8127 | s%ac_u%ac_e%gp | |
8128 | EOF | |
8129 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8130 | rm -f conftest.hdr | |
8131 | ||
8132 | # This sed command replaces #undef with comments. This is necessary, for | |
8133 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8134 | # on some systems where configure will not decide to define it. | |
8135 | cat >> conftest.vals <<\EOF | |
8136 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8137 | EOF | |
8138 | ||
8139 | # Break up conftest.vals because some shells have a limit on | |
8140 | # the size of here documents, and old seds have small limits too. | |
8141 | ||
8142 | rm -f conftest.tail | |
8143 | while : | |
8144 | do | |
8145 | ac_lines=`grep -c . conftest.vals` | |
8146 | # grep -c gives empty output for an empty file on some AIX systems. | |
8147 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8148 | # Write a limited-size here document to conftest.frag. | |
8149 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8150 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8151 | echo 'CEOF | |
8152 | sed -f conftest.frag conftest.in > conftest.out | |
8153 | rm -f conftest.in | |
8154 | mv conftest.out conftest.in | |
8155 | ' >> $CONFIG_STATUS | |
8156 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8157 | rm -f conftest.vals | |
8158 | mv conftest.tail conftest.vals | |
8159 | done | |
8160 | rm -f conftest.vals | |
8161 | ||
8162 | cat >> $CONFIG_STATUS <<\EOF | |
8163 | rm -f conftest.frag conftest.h | |
8164 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8165 | cat conftest.in >> conftest.h | |
8166 | rm -f conftest.in | |
8167 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8168 | echo "$ac_file is unchanged" | |
8169 | rm -f conftest.h | |
8170 | else | |
8171 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8172 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8173 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8174 | # The file is in a subdirectory. | |
8175 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8176 | fi | |
8177 | rm -f $ac_file | |
8178 | mv conftest.h $ac_file | |
8179 | fi | |
8180 | fi; done | |
8181 | ||
8182 | EOF | |
8183 | ||
8184 | cat >> $CONFIG_STATUS <<EOF | |
8185 | ac_sources="$files" | |
8186 | ac_dests="$links" | |
8187 | EOF | |
8188 | ||
8189 | cat >> $CONFIG_STATUS <<\EOF | |
8190 | srcdir=$ac_given_srcdir | |
8191 | while test -n "$ac_sources"; do | |
8192 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
8193 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
8194 | ||
8195 | echo "linking $srcdir/$ac_source to $ac_dest" | |
8196 | ||
8197 | if test ! -r $srcdir/$ac_source; then | |
8198 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
8199 | fi | |
8200 | rm -f $ac_dest | |
8201 | ||
8202 | # Make relative symlinks. | |
8203 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8204 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
8205 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
8206 | # The dest file is in a subdirectory. | |
8207 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
8208 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
8209 | # A "../" for each directory in $ac_dest_dir_suffix. | |
8210 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
8211 | else | |
8212 | ac_dest_dir_suffix= ac_dots= | |
8213 | fi | |
8214 | ||
8215 | case "$srcdir" in | |
8216 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
8217 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
8218 | esac | |
8219 | ||
8220 | # Make a symlink if possible; otherwise try a hard link. | |
8221 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
8222 | ln $srcdir/$ac_source $ac_dest; then : | |
8223 | else | |
8224 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
8225 | fi | |
8226 | done | |
8227 | EOF | |
8228 | cat >> $CONFIG_STATUS <<EOF | |
8229 | ||
8230 | gdb_host_cpu=$gdb_host_cpu | |
8231 | gdb_target_cpu=$gdb_target_cpu | |
8232 | nativefile=$nativefile | |
8233 | ||
8234 | EOF | |
8235 | cat >> $CONFIG_STATUS <<\EOF | |
8236 | ||
8237 | if test "${nativefile}" = ""; then | |
8238 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ | |
8239 | < Makefile > Makefile.tem | |
8240 | mv -f Makefile.tem Makefile | |
8241 | fi | |
8242 | ||
8243 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
8244 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
8245 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
8246 | mv -f Makefile.tmp Makefile | |
8247 | ||
2acceee2 | 8248 | |
c906108c SS |
8249 | case x$CONFIG_HEADERS in |
8250 | xconfig.h:config.in) | |
8251 | echo > stamp-h ;; | |
8252 | esac | |
8253 | ||
8254 | exit 0 | |
8255 | EOF | |
8256 | chmod +x $CONFIG_STATUS | |
8257 | rm -fr confdefs* $ac_clean_files | |
8258 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8259 | ||
8260 | if test "$no_recursion" != yes; then | |
8261 | ||
8262 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
8263 | ac_sub_configure_args= | |
8264 | ac_prev= | |
8265 | for ac_arg in $ac_configure_args; do | |
8266 | if test -n "$ac_prev"; then | |
8267 | ac_prev= | |
8268 | continue | |
8269 | fi | |
8270 | case "$ac_arg" in | |
8271 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
8272 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
8273 | ac_prev=cache_file ;; | |
8274 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
8275 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
8276 | ;; | |
8277 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
8278 | ac_prev=srcdir ;; | |
8279 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
8280 | ;; | |
8281 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
8282 | esac | |
8283 | done | |
8284 | ||
8285 | for ac_config_dir in $configdirs; do | |
8286 | ||
8287 | # Do not complain, so a configure script can configure whichever | |
8288 | # parts of a large source tree are present. | |
8289 | if test ! -d $srcdir/$ac_config_dir; then | |
8290 | continue | |
8291 | fi | |
8292 | ||
8293 | echo configuring in $ac_config_dir | |
8294 | ||
8295 | case "$srcdir" in | |
8296 | .) ;; | |
8297 | *) | |
8298 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
8299 | else | |
8300 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
8301 | fi | |
8302 | ;; | |
8303 | esac | |
8304 | ||
8305 | ac_popdir=`pwd` | |
8306 | cd $ac_config_dir | |
8307 | ||
8308 | # A "../" for each directory in /$ac_config_dir. | |
8309 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
8310 | ||
8311 | case "$srcdir" in | |
8312 | .) # No --srcdir option. We are building in place. | |
8313 | ac_sub_srcdir=$srcdir ;; | |
8314 | /*) # Absolute path. | |
8315 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
8316 | *) # Relative path. | |
8317 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
8318 | esac | |
8319 | ||
8320 | # Check for guested configure; otherwise get Cygnus style configure. | |
8321 | if test -f $ac_sub_srcdir/configure; then | |
8322 | ac_sub_configure=$ac_sub_srcdir/configure | |
8323 | elif test -f $ac_sub_srcdir/configure.in; then | |
8324 | ac_sub_configure=$ac_configure | |
8325 | else | |
8326 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
8327 | ac_sub_configure= | |
8328 | fi | |
8329 | ||
8330 | # The recursion is here. | |
8331 | if test -n "$ac_sub_configure"; then | |
8332 | ||
8333 | # Make the cache file name correct relative to the subdirectory. | |
8334 | case "$cache_file" in | |
8335 | /*) ac_sub_cache_file=$cache_file ;; | |
8336 | *) # Relative path. | |
8337 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
8338 | esac | |
8339 | case "$ac_given_INSTALL" in | |
8340 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8341 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8342 | esac | |
8343 | ||
8344 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
8345 | # The eval makes quoting arguments work. | |
8346 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
8347 | then : | |
8348 | else | |
8349 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
8350 | fi | |
8351 | fi | |
8352 | ||
8353 | cd $ac_popdir | |
8354 | done | |
8355 | fi | |
8356 | ||
8357 | ||
8358 | exit 0 |