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= | |
2894793a | 76 | sitefile= |
c906108c SS |
77 | srcdir= |
78 | target=NONE | |
79 | verbose= | |
80 | x_includes=NONE | |
81 | x_libraries=NONE | |
82 | bindir='${exec_prefix}/bin' | |
83 | sbindir='${exec_prefix}/sbin' | |
84 | libexecdir='${exec_prefix}/libexec' | |
85 | datadir='${prefix}/share' | |
86 | sysconfdir='${prefix}/etc' | |
87 | sharedstatedir='${prefix}/com' | |
88 | localstatedir='${prefix}/var' | |
89 | libdir='${exec_prefix}/lib' | |
90 | includedir='${prefix}/include' | |
91 | oldincludedir='/usr/include' | |
92 | infodir='${prefix}/info' | |
93 | mandir='${prefix}/man' | |
94 | ||
95 | # Initialize some other variables. | |
96 | subdirs= | |
97 | MFLAGS= MAKEFLAGS= | |
98 | SHELL=${CONFIG_SHELL-/bin/sh} | |
99 | # Maximum number of lines to put in a shell here document. | |
100 | ac_max_here_lines=12 | |
101 | ||
102 | ac_prev= | |
103 | for ac_option | |
104 | do | |
105 | ||
106 | # If the previous option needs an argument, assign it. | |
107 | if test -n "$ac_prev"; then | |
108 | eval "$ac_prev=\$ac_option" | |
109 | ac_prev= | |
110 | continue | |
111 | fi | |
112 | ||
113 | case "$ac_option" in | |
114 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
115 | *) ac_optarg= ;; | |
116 | esac | |
117 | ||
118 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
119 | ||
120 | case "$ac_option" in | |
121 | ||
122 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
123 | ac_prev=bindir ;; | |
124 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
125 | bindir="$ac_optarg" ;; | |
126 | ||
127 | -build | --build | --buil | --bui | --bu) | |
128 | ac_prev=build ;; | |
129 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
130 | build="$ac_optarg" ;; | |
131 | ||
132 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
133 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
134 | ac_prev=cache_file ;; | |
135 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
136 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
137 | cache_file="$ac_optarg" ;; | |
138 | ||
139 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
140 | ac_prev=datadir ;; | |
141 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
142 | | --da=*) | |
143 | datadir="$ac_optarg" ;; | |
144 | ||
145 | -disable-* | --disable-*) | |
146 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
147 | # Reject names that are not valid shell variable names. | |
148 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
149 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
150 | fi | |
151 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
152 | eval "enable_${ac_feature}=no" ;; | |
153 | ||
154 | -enable-* | --enable-*) | |
155 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
156 | # Reject names that are not valid shell variable names. | |
157 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
158 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
159 | fi | |
160 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
161 | case "$ac_option" in | |
162 | *=*) ;; | |
163 | *) ac_optarg=yes ;; | |
164 | esac | |
165 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
166 | ||
167 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
168 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
169 | | --exec | --exe | --ex) | |
170 | ac_prev=exec_prefix ;; | |
171 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
172 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
173 | | --exec=* | --exe=* | --ex=*) | |
174 | exec_prefix="$ac_optarg" ;; | |
175 | ||
176 | -gas | --gas | --ga | --g) | |
177 | # Obsolete; use --with-gas. | |
178 | with_gas=yes ;; | |
179 | ||
180 | -help | --help | --hel | --he) | |
181 | # Omit some internal or obsolete options to make the list less imposing. | |
182 | # This message is too long to be a string in the A/UX 3.1 sh. | |
183 | cat << EOF | |
184 | Usage: configure [options] [host] | |
185 | Options: [defaults in brackets after descriptions] | |
186 | Configuration: | |
187 | --cache-file=FILE cache test results in FILE | |
188 | --help print this message | |
189 | --no-create do not create output files | |
190 | --quiet, --silent do not print \`checking...' messages | |
2894793a | 191 | --site-file=FILE use FILE as the site file |
c906108c SS |
192 | --version print the version of autoconf that created configure |
193 | Directory and file names: | |
194 | --prefix=PREFIX install architecture-independent files in PREFIX | |
195 | [$ac_default_prefix] | |
196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
197 | [same as prefix] | |
198 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
201 | --datadir=DIR read-only architecture-independent data in DIR | |
202 | [PREFIX/share] | |
203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
205 | [PREFIX/com] | |
206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
208 | --includedir=DIR C header files in DIR [PREFIX/include] | |
209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
210 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
211 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
212 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
213 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
214 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
215 | --program-transform-name=PROGRAM | |
216 | run sed PROGRAM on installed program names | |
217 | EOF | |
218 | cat << EOF | |
219 | Host type: | |
220 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
221 | --host=HOST configure for HOST [guessed] | |
222 | --target=TARGET configure for TARGET [TARGET=HOST] | |
223 | Features and packages: | |
224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
228 | --x-includes=DIR X include files are in DIR | |
229 | --x-libraries=DIR X library files are in DIR | |
230 | EOF | |
231 | if test -n "$ac_help"; then | |
232 | echo "--enable and --with options recognized:$ac_help" | |
233 | fi | |
234 | exit 0 ;; | |
235 | ||
236 | -host | --host | --hos | --ho) | |
237 | ac_prev=host ;; | |
238 | -host=* | --host=* | --hos=* | --ho=*) | |
239 | host="$ac_optarg" ;; | |
240 | ||
241 | -includedir | --includedir | --includedi | --included | --include \ | |
242 | | --includ | --inclu | --incl | --inc) | |
243 | ac_prev=includedir ;; | |
244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
245 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
246 | includedir="$ac_optarg" ;; | |
247 | ||
248 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
249 | ac_prev=infodir ;; | |
250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
251 | infodir="$ac_optarg" ;; | |
252 | ||
253 | -libdir | --libdir | --libdi | --libd) | |
254 | ac_prev=libdir ;; | |
255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
256 | libdir="$ac_optarg" ;; | |
257 | ||
258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
259 | | --libexe | --libex | --libe) | |
260 | ac_prev=libexecdir ;; | |
261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
262 | | --libexe=* | --libex=* | --libe=*) | |
263 | libexecdir="$ac_optarg" ;; | |
264 | ||
265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
266 | | --localstate | --localstat | --localsta | --localst \ | |
267 | | --locals | --local | --loca | --loc | --lo) | |
268 | ac_prev=localstatedir ;; | |
269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
272 | localstatedir="$ac_optarg" ;; | |
273 | ||
274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
275 | ac_prev=mandir ;; | |
276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
277 | mandir="$ac_optarg" ;; | |
278 | ||
279 | -nfp | --nfp | --nf) | |
280 | # Obsolete; use --without-fp. | |
281 | with_fp=no ;; | |
282 | ||
283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
284 | | --no-cr | --no-c) | |
285 | no_create=yes ;; | |
286 | ||
287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
289 | no_recursion=yes ;; | |
290 | ||
291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
293 | | --oldin | --oldi | --old | --ol | --o) | |
294 | ac_prev=oldincludedir ;; | |
295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
298 | oldincludedir="$ac_optarg" ;; | |
299 | ||
300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
301 | ac_prev=prefix ;; | |
302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
303 | prefix="$ac_optarg" ;; | |
304 | ||
305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
306 | | --program-pre | --program-pr | --program-p) | |
307 | ac_prev=program_prefix ;; | |
308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
310 | program_prefix="$ac_optarg" ;; | |
311 | ||
312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
313 | | --program-suf | --program-su | --program-s) | |
314 | ac_prev=program_suffix ;; | |
315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
317 | program_suffix="$ac_optarg" ;; | |
318 | ||
319 | -program-transform-name | --program-transform-name \ | |
320 | | --program-transform-nam | --program-transform-na \ | |
321 | | --program-transform-n | --program-transform- \ | |
322 | | --program-transform | --program-transfor \ | |
323 | | --program-transfo | --program-transf \ | |
324 | | --program-trans | --program-tran \ | |
325 | | --progr-tra | --program-tr | --program-t) | |
326 | ac_prev=program_transform_name ;; | |
327 | -program-transform-name=* | --program-transform-name=* \ | |
328 | | --program-transform-nam=* | --program-transform-na=* \ | |
329 | | --program-transform-n=* | --program-transform-=* \ | |
330 | | --program-transform=* | --program-transfor=* \ | |
331 | | --program-transfo=* | --program-transf=* \ | |
332 | | --program-trans=* | --program-tran=* \ | |
333 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
334 | program_transform_name="$ac_optarg" ;; | |
335 | ||
336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
337 | | -silent | --silent | --silen | --sile | --sil) | |
338 | silent=yes ;; | |
339 | ||
340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
341 | ac_prev=sbindir ;; | |
342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
343 | | --sbi=* | --sb=*) | |
344 | sbindir="$ac_optarg" ;; | |
345 | ||
346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
348 | | --sharedst | --shareds | --shared | --share | --shar \ | |
349 | | --sha | --sh) | |
350 | ac_prev=sharedstatedir ;; | |
351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
354 | | --sha=* | --sh=*) | |
355 | sharedstatedir="$ac_optarg" ;; | |
356 | ||
357 | -site | --site | --sit) | |
358 | ac_prev=site ;; | |
359 | -site=* | --site=* | --sit=*) | |
360 | site="$ac_optarg" ;; | |
361 | ||
2894793a AC |
362 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
363 | ac_prev=sitefile ;; | |
364 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
365 | sitefile="$ac_optarg" ;; | |
366 | ||
c906108c SS |
367 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
368 | ac_prev=srcdir ;; | |
369 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
370 | srcdir="$ac_optarg" ;; | |
371 | ||
372 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
373 | | --syscon | --sysco | --sysc | --sys | --sy) | |
374 | ac_prev=sysconfdir ;; | |
375 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
376 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
377 | sysconfdir="$ac_optarg" ;; | |
378 | ||
379 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
380 | ac_prev=target ;; | |
381 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
382 | target="$ac_optarg" ;; | |
383 | ||
384 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
385 | verbose=yes ;; | |
386 | ||
387 | -version | --version | --versio | --versi | --vers) | |
388 | echo "configure generated by autoconf version 2.13" | |
389 | exit 0 ;; | |
390 | ||
391 | -with-* | --with-*) | |
392 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
393 | # Reject names that are not valid shell variable names. | |
394 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
395 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
396 | fi | |
397 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
398 | case "$ac_option" in | |
399 | *=*) ;; | |
400 | *) ac_optarg=yes ;; | |
401 | esac | |
402 | eval "with_${ac_package}='$ac_optarg'" ;; | |
403 | ||
404 | -without-* | --without-*) | |
405 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
406 | # Reject names that are not valid shell variable names. | |
407 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
408 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
409 | fi | |
410 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
411 | eval "with_${ac_package}=no" ;; | |
412 | ||
413 | --x) | |
414 | # Obsolete; use --with-x. | |
415 | with_x=yes ;; | |
416 | ||
417 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
418 | | --x-incl | --x-inc | --x-in | --x-i) | |
419 | ac_prev=x_includes ;; | |
420 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
421 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
422 | x_includes="$ac_optarg" ;; | |
423 | ||
424 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
425 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
426 | ac_prev=x_libraries ;; | |
427 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
428 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
429 | x_libraries="$ac_optarg" ;; | |
430 | ||
431 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
432 | ;; | |
433 | ||
434 | *) | |
435 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
436 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
437 | fi | |
438 | if test "x$nonopt" != xNONE; then | |
439 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
440 | fi | |
441 | nonopt="$ac_option" | |
442 | ;; | |
443 | ||
444 | esac | |
445 | done | |
446 | ||
447 | if test -n "$ac_prev"; then | |
448 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
449 | fi | |
450 | ||
451 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
452 | ||
453 | # File descriptor usage: | |
454 | # 0 standard input | |
455 | # 1 file creation | |
456 | # 2 errors and warnings | |
457 | # 3 some systems may open it to /dev/tty | |
458 | # 4 used on the Kubota Titan | |
459 | # 6 checking for... messages and results | |
460 | # 5 compiler messages saved in config.log | |
461 | if test "$silent" = yes; then | |
462 | exec 6>/dev/null | |
463 | else | |
464 | exec 6>&1 | |
465 | fi | |
466 | exec 5>./config.log | |
467 | ||
468 | echo "\ | |
469 | This file contains any messages produced by compilers while | |
470 | running configure, to aid debugging if configure makes a mistake. | |
471 | " 1>&5 | |
472 | ||
473 | # Strip out --no-create and --no-recursion so they do not pile up. | |
474 | # Also quote any args containing shell metacharacters. | |
475 | ac_configure_args= | |
476 | for ac_arg | |
477 | do | |
478 | case "$ac_arg" in | |
479 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
480 | | --no-cr | --no-c) ;; | |
481 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
482 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
483 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
484 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
485 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
486 | esac | |
487 | done | |
488 | ||
489 | # NLS nuisances. | |
490 | # Only set these to C if already set. These must not be set unconditionally | |
491 | # because not all systems understand e.g. LANG=C (notably SCO). | |
492 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
493 | # Non-C LC_CTYPE values break the ctype check. | |
494 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
495 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
496 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
497 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
498 | ||
499 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
500 | rm -rf conftest* confdefs.h | |
501 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
502 | echo > confdefs.h | |
503 | ||
504 | # A filename unique to this package, relative to the directory that | |
505 | # configure is in, which we can look for to find out if srcdir is correct. | |
506 | ac_unique_file=main.c | |
507 | ||
508 | # Find the source files, if location was not specified. | |
509 | if test -z "$srcdir"; then | |
510 | ac_srcdir_defaulted=yes | |
511 | # Try the directory containing this script, then its parent. | |
512 | ac_prog=$0 | |
513 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
514 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
515 | srcdir=$ac_confdir | |
516 | if test ! -r $srcdir/$ac_unique_file; then | |
517 | srcdir=.. | |
518 | fi | |
519 | else | |
520 | ac_srcdir_defaulted=no | |
521 | fi | |
522 | if test ! -r $srcdir/$ac_unique_file; then | |
523 | if test "$ac_srcdir_defaulted" = yes; then | |
524 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
525 | else | |
526 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
527 | fi | |
528 | fi | |
529 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
530 | ||
531 | # Prefer explicitly selected file to automatically selected ones. | |
2894793a AC |
532 | if test -z "$sitefile"; then |
533 | if test -z "$CONFIG_SITE"; then | |
534 | if test "x$prefix" != xNONE; then | |
535 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
536 | else | |
537 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
538 | fi | |
c906108c | 539 | fi |
2894793a AC |
540 | else |
541 | CONFIG_SITE="$sitefile" | |
c906108c SS |
542 | fi |
543 | for ac_site_file in $CONFIG_SITE; do | |
544 | if test -r "$ac_site_file"; then | |
545 | echo "loading site script $ac_site_file" | |
546 | . "$ac_site_file" | |
547 | fi | |
548 | done | |
549 | ||
550 | if test -r "$cache_file"; then | |
551 | echo "loading cache $cache_file" | |
552 | . $cache_file | |
553 | else | |
554 | echo "creating cache $cache_file" | |
555 | > $cache_file | |
556 | fi | |
557 | ||
558 | ac_ext=c | |
559 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
560 | ac_cpp='$CPP $CPPFLAGS' | |
561 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
562 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
563 | cross_compiling=$ac_cv_prog_cc_cross | |
564 | ||
565 | ac_exeext= | |
566 | ac_objext=o | |
567 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
568 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
569 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
570 | ac_n= ac_c=' | |
571 | ' ac_t=' ' | |
572 | else | |
573 | ac_n=-n ac_c= ac_t= | |
574 | fi | |
575 | else | |
576 | ac_n= ac_c='\c' ac_t= | |
577 | fi | |
578 | ||
579 | ||
580 | ||
413ccac7 | 581 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
2894793a | 582 | echo "configure:583: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
583 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
584 | if test "${enable_maintainer_mode+set}" = set; then | |
585 | enableval="$enable_maintainer_mode" | |
586 | USE_MAINTAINER_MODE=$enableval | |
587 | else | |
588 | USE_MAINTAINER_MODE=no | |
589 | fi | |
590 | ||
591 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
592 | ||
593 | ||
594 | if test $USE_MAINTAINER_MODE = yes; then | |
595 | MAINTAINER_MODE_TRUE= | |
596 | MAINTAINER_MODE_FALSE='#' | |
597 | else | |
598 | MAINTAINER_MODE_TRUE='#' | |
599 | MAINTAINER_MODE_FALSE= | |
600 | fi | |
601 | MAINT=$MAINTAINER_MODE_TRUE | |
602 | ||
603 | ||
c906108c SS |
604 | |
605 | # Extract the first word of "gcc", so it can be a program name with args. | |
606 | set dummy gcc; ac_word=$2 | |
607 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 608 | echo "configure:609: checking for $ac_word" >&5 |
c906108c SS |
609 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
611 | else | |
612 | if test -n "$CC"; then | |
613 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
614 | else | |
615 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
616 | ac_dummy="$PATH" | |
617 | for ac_dir in $ac_dummy; do | |
618 | test -z "$ac_dir" && ac_dir=. | |
619 | if test -f $ac_dir/$ac_word; then | |
620 | ac_cv_prog_CC="gcc" | |
621 | break | |
622 | fi | |
623 | done | |
624 | IFS="$ac_save_ifs" | |
625 | fi | |
626 | fi | |
627 | CC="$ac_cv_prog_CC" | |
628 | if test -n "$CC"; then | |
629 | echo "$ac_t""$CC" 1>&6 | |
630 | else | |
631 | echo "$ac_t""no" 1>&6 | |
632 | fi | |
633 | ||
634 | if test -z "$CC"; then | |
635 | # Extract the first word of "cc", so it can be a program name with args. | |
636 | set dummy cc; ac_word=$2 | |
637 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 638 | echo "configure:639: checking for $ac_word" >&5 |
c906108c SS |
639 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
640 | echo $ac_n "(cached) $ac_c" 1>&6 | |
641 | else | |
642 | if test -n "$CC"; then | |
643 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
644 | else | |
645 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
646 | ac_prog_rejected=no | |
647 | ac_dummy="$PATH" | |
648 | for ac_dir in $ac_dummy; do | |
649 | test -z "$ac_dir" && ac_dir=. | |
650 | if test -f $ac_dir/$ac_word; then | |
651 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
652 | ac_prog_rejected=yes | |
653 | continue | |
654 | fi | |
655 | ac_cv_prog_CC="cc" | |
656 | break | |
657 | fi | |
658 | done | |
659 | IFS="$ac_save_ifs" | |
660 | if test $ac_prog_rejected = yes; then | |
661 | # We found a bogon in the path, so make sure we never use it. | |
662 | set dummy $ac_cv_prog_CC | |
663 | shift | |
664 | if test $# -gt 0; then | |
665 | # We chose a different compiler from the bogus one. | |
666 | # However, it has the same basename, so the bogon will be chosen | |
667 | # first if we set CC to just the basename; use the full file name. | |
668 | shift | |
669 | set dummy "$ac_dir/$ac_word" "$@" | |
670 | shift | |
671 | ac_cv_prog_CC="$@" | |
672 | fi | |
673 | fi | |
674 | fi | |
675 | fi | |
676 | CC="$ac_cv_prog_CC" | |
677 | if test -n "$CC"; then | |
678 | echo "$ac_t""$CC" 1>&6 | |
679 | else | |
680 | echo "$ac_t""no" 1>&6 | |
681 | fi | |
682 | ||
683 | if test -z "$CC"; then | |
684 | case "`uname -s`" in | |
685 | *win32* | *WIN32*) | |
686 | # Extract the first word of "cl", so it can be a program name with args. | |
687 | set dummy cl; ac_word=$2 | |
688 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 689 | echo "configure:690: checking for $ac_word" >&5 |
c906108c SS |
690 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
692 | else | |
693 | if test -n "$CC"; then | |
694 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
695 | else | |
696 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
697 | ac_dummy="$PATH" | |
698 | for ac_dir in $ac_dummy; do | |
699 | test -z "$ac_dir" && ac_dir=. | |
700 | if test -f $ac_dir/$ac_word; then | |
701 | ac_cv_prog_CC="cl" | |
702 | break | |
703 | fi | |
704 | done | |
705 | IFS="$ac_save_ifs" | |
706 | fi | |
707 | fi | |
708 | CC="$ac_cv_prog_CC" | |
709 | if test -n "$CC"; then | |
710 | echo "$ac_t""$CC" 1>&6 | |
711 | else | |
712 | echo "$ac_t""no" 1>&6 | |
713 | fi | |
714 | ;; | |
715 | esac | |
716 | fi | |
717 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
718 | fi | |
719 | ||
720 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
2894793a | 721 | echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
722 | |
723 | ac_ext=c | |
724 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
725 | ac_cpp='$CPP $CPPFLAGS' | |
726 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
727 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
728 | cross_compiling=$ac_cv_prog_cc_cross | |
729 | ||
730 | cat > conftest.$ac_ext << EOF | |
731 | ||
2894793a | 732 | #line 733 "configure" |
c906108c SS |
733 | #include "confdefs.h" |
734 | ||
735 | main(){return(0);} | |
736 | EOF | |
2894793a | 737 | if { (eval echo configure:738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
738 | ac_cv_prog_cc_works=yes |
739 | # If we can't run a trivial program, we are probably using a cross compiler. | |
740 | if (./conftest; exit) 2>/dev/null; then | |
741 | ac_cv_prog_cc_cross=no | |
742 | else | |
743 | ac_cv_prog_cc_cross=yes | |
744 | fi | |
745 | else | |
746 | echo "configure: failed program was:" >&5 | |
747 | cat conftest.$ac_ext >&5 | |
748 | ac_cv_prog_cc_works=no | |
749 | fi | |
750 | rm -fr conftest* | |
751 | ac_ext=c | |
752 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
753 | ac_cpp='$CPP $CPPFLAGS' | |
754 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
755 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
756 | cross_compiling=$ac_cv_prog_cc_cross | |
757 | ||
758 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
759 | if test $ac_cv_prog_cc_works = no; then | |
760 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
761 | fi | |
762 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
2894793a | 763 | echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
764 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
765 | cross_compiling=$ac_cv_prog_cc_cross | |
766 | ||
767 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
2894793a | 768 | echo "configure:769: checking whether we are using GNU C" >&5 |
c906108c SS |
769 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
771 | else | |
772 | cat > conftest.c <<EOF | |
773 | #ifdef __GNUC__ | |
774 | yes; | |
775 | #endif | |
776 | EOF | |
2894793a | 777 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
778 | ac_cv_prog_gcc=yes |
779 | else | |
780 | ac_cv_prog_gcc=no | |
781 | fi | |
782 | fi | |
783 | ||
784 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
785 | ||
786 | if test $ac_cv_prog_gcc = yes; then | |
787 | GCC=yes | |
788 | else | |
789 | GCC= | |
790 | fi | |
791 | ||
792 | ac_test_CFLAGS="${CFLAGS+set}" | |
793 | ac_save_CFLAGS="$CFLAGS" | |
794 | CFLAGS= | |
795 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
2894793a | 796 | echo "configure:797: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
797 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
798 | echo $ac_n "(cached) $ac_c" 1>&6 | |
799 | else | |
800 | echo 'void f(){}' > conftest.c | |
801 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
802 | ac_cv_prog_cc_g=yes | |
803 | else | |
804 | ac_cv_prog_cc_g=no | |
805 | fi | |
806 | rm -f conftest* | |
807 | ||
808 | fi | |
809 | ||
810 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
811 | if test "$ac_test_CFLAGS" = set; then | |
812 | CFLAGS="$ac_save_CFLAGS" | |
813 | elif test $ac_cv_prog_cc_g = yes; then | |
814 | if test "$GCC" = yes; then | |
815 | CFLAGS="-g -O2" | |
816 | else | |
817 | CFLAGS="-g" | |
818 | fi | |
819 | else | |
820 | if test "$GCC" = yes; then | |
821 | CFLAGS="-O2" | |
822 | else | |
823 | CFLAGS= | |
824 | fi | |
825 | fi | |
826 | ||
827 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
2894793a | 828 | echo "configure:829: checking how to run the C preprocessor" >&5 |
c906108c SS |
829 | # On Suns, sometimes $CPP names a directory. |
830 | if test -n "$CPP" && test -d "$CPP"; then | |
831 | CPP= | |
832 | fi | |
833 | if test -z "$CPP"; then | |
834 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
835 | echo $ac_n "(cached) $ac_c" 1>&6 | |
836 | else | |
837 | # This must be in double quotes, not single quotes, because CPP may get | |
838 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
839 | CPP="${CC-cc} -E" | |
840 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
841 | # not just through cpp. | |
842 | cat > conftest.$ac_ext <<EOF | |
2894793a | 843 | #line 844 "configure" |
c906108c SS |
844 | #include "confdefs.h" |
845 | #include <assert.h> | |
846 | Syntax Error | |
847 | EOF | |
848 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 849 | { (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
850 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
851 | if test -z "$ac_err"; then | |
852 | : | |
853 | else | |
854 | echo "$ac_err" >&5 | |
855 | echo "configure: failed program was:" >&5 | |
856 | cat conftest.$ac_ext >&5 | |
857 | rm -rf conftest* | |
858 | CPP="${CC-cc} -E -traditional-cpp" | |
859 | cat > conftest.$ac_ext <<EOF | |
2894793a | 860 | #line 861 "configure" |
c906108c SS |
861 | #include "confdefs.h" |
862 | #include <assert.h> | |
863 | Syntax Error | |
864 | EOF | |
865 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 866 | { (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
867 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
868 | if test -z "$ac_err"; then | |
869 | : | |
870 | else | |
871 | echo "$ac_err" >&5 | |
872 | echo "configure: failed program was:" >&5 | |
873 | cat conftest.$ac_ext >&5 | |
874 | rm -rf conftest* | |
875 | CPP="${CC-cc} -nologo -E" | |
876 | cat > conftest.$ac_ext <<EOF | |
2894793a | 877 | #line 878 "configure" |
c906108c SS |
878 | #include "confdefs.h" |
879 | #include <assert.h> | |
880 | Syntax Error | |
881 | EOF | |
882 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 883 | { (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
884 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
885 | if test -z "$ac_err"; then | |
886 | : | |
887 | else | |
888 | echo "$ac_err" >&5 | |
889 | echo "configure: failed program was:" >&5 | |
890 | cat conftest.$ac_ext >&5 | |
891 | rm -rf conftest* | |
892 | CPP=/lib/cpp | |
893 | fi | |
894 | rm -f conftest* | |
895 | fi | |
896 | rm -f conftest* | |
897 | fi | |
898 | rm -f conftest* | |
899 | ac_cv_prog_CPP="$CPP" | |
900 | fi | |
901 | CPP="$ac_cv_prog_CPP" | |
902 | else | |
903 | ac_cv_prog_CPP="$CPP" | |
904 | fi | |
905 | echo "$ac_t""$CPP" 1>&6 | |
906 | ||
907 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
2894793a | 908 | echo "configure:909: checking for AIX" >&5 |
c906108c | 909 | cat > conftest.$ac_ext <<EOF |
2894793a | 910 | #line 911 "configure" |
c906108c SS |
911 | #include "confdefs.h" |
912 | #ifdef _AIX | |
913 | yes | |
914 | #endif | |
915 | ||
916 | EOF | |
917 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
918 | egrep "yes" >/dev/null 2>&1; then | |
919 | rm -rf conftest* | |
920 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
921 | #define _ALL_SOURCE 1 | |
922 | EOF | |
923 | ||
924 | else | |
925 | rm -rf conftest* | |
926 | echo "$ac_t""no" 1>&6 | |
927 | fi | |
928 | rm -f conftest* | |
929 | ||
930 | ||
931 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
2894793a | 932 | echo "configure:933: checking for POSIXized ISC" >&5 |
c906108c SS |
933 | if test -d /etc/conf/kconfig.d && |
934 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
935 | then | |
936 | echo "$ac_t""yes" 1>&6 | |
937 | ISC=yes # If later tests want to check for ISC. | |
938 | cat >> confdefs.h <<\EOF | |
939 | #define _POSIX_SOURCE 1 | |
940 | EOF | |
941 | ||
942 | if test "$GCC" = yes; then | |
943 | CC="$CC -posix" | |
944 | else | |
945 | CC="$CC -Xp" | |
946 | fi | |
947 | else | |
948 | echo "$ac_t""no" 1>&6 | |
949 | ISC= | |
950 | fi | |
951 | ||
952 | ||
953 | ||
954 | ||
955 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
2894793a | 956 | echo "configure:957: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
957 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
958 | echo $ac_n "(cached) $ac_c" 1>&6 | |
959 | else | |
960 | am_cv_prog_cc_stdc=no | |
961 | ac_save_CC="$CC" | |
962 | # Don't try gcc -ansi; that turns off useful extensions and | |
963 | # breaks some systems' header files. | |
964 | # AIX -qlanglvl=ansi | |
965 | # Ultrix and OSF/1 -std1 | |
966 | # HP-UX -Aa -D_HPUX_SOURCE | |
967 | # SVR4 -Xc -D__EXTENSIONS__ | |
968 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
969 | do | |
970 | CC="$ac_save_CC $ac_arg" | |
971 | cat > conftest.$ac_ext <<EOF | |
2894793a | 972 | #line 973 "configure" |
c906108c SS |
973 | #include "confdefs.h" |
974 | #include <stdarg.h> | |
975 | #include <stdio.h> | |
976 | #include <sys/types.h> | |
977 | #include <sys/stat.h> | |
978 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
979 | struct buf { int x; }; | |
980 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
981 | static char *e (p, i) | |
982 | char **p; | |
983 | int i; | |
984 | { | |
985 | return p[i]; | |
986 | } | |
987 | static char *f (char * (*g) (char **, int), char **p, ...) | |
988 | { | |
989 | char *s; | |
990 | va_list v; | |
991 | va_start (v,p); | |
992 | s = g (p, va_arg (v,int)); | |
993 | va_end (v); | |
994 | return s; | |
995 | } | |
996 | int test (int i, double x); | |
997 | struct s1 {int (*f) (int a);}; | |
998 | struct s2 {int (*f) (double a);}; | |
999 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1000 | int argc; | |
1001 | char **argv; | |
1002 | ||
1003 | int main() { | |
1004 | ||
1005 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1006 | ||
1007 | ; return 0; } | |
1008 | EOF | |
2894793a | 1009 | if { (eval echo configure:1010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1010 | rm -rf conftest* |
1011 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1012 | else | |
1013 | echo "configure: failed program was:" >&5 | |
1014 | cat conftest.$ac_ext >&5 | |
1015 | fi | |
1016 | rm -f conftest* | |
1017 | done | |
1018 | CC="$ac_save_CC" | |
1019 | ||
1020 | fi | |
1021 | ||
1022 | if test -z "$am_cv_prog_cc_stdc"; then | |
1023 | echo "$ac_t""none needed" 1>&6 | |
1024 | else | |
1025 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1026 | fi | |
1027 | case "x$am_cv_prog_cc_stdc" in | |
1028 | x|xno) ;; | |
1029 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1030 | esac | |
1031 | ||
1032 | ||
1033 | ac_aux_dir= | |
1034 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1035 | if test -f $ac_dir/install-sh; then | |
1036 | ac_aux_dir=$ac_dir | |
1037 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1038 | break | |
1039 | elif test -f $ac_dir/install.sh; then | |
1040 | ac_aux_dir=$ac_dir | |
1041 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1042 | break | |
1043 | fi | |
1044 | done | |
1045 | if test -z "$ac_aux_dir"; then | |
1046 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1047 | fi | |
1048 | ac_config_guess=$ac_aux_dir/config.guess | |
1049 | ac_config_sub=$ac_aux_dir/config.sub | |
1050 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1051 | ||
1052 | ||
1053 | # Do some error checking and defaulting for the host and target type. | |
1054 | # The inputs are: | |
1055 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1056 | # | |
1057 | # The rules are: | |
1058 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1059 | # same time. | |
1060 | # 2. Host defaults to nonopt. | |
1061 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1062 | # as determined by config.guess. | |
1063 | # 4. Target and build default to nonopt. | |
1064 | # 5. If nonopt is not specified, then target and build default to host. | |
1065 | ||
1066 | # The aliases save the names the user supplied, while $host etc. | |
1067 | # will get canonicalized. | |
1068 | case $host---$target---$nonopt in | |
1069 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1070 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1071 | esac | |
1072 | ||
1073 | ||
1074 | # Make sure we can run config.sub. | |
1075 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1076 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1077 | fi | |
1078 | ||
1079 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
2894793a | 1080 | echo "configure:1081: checking host system type" >&5 |
c906108c SS |
1081 | |
1082 | host_alias=$host | |
1083 | case "$host_alias" in | |
1084 | NONE) | |
1085 | case $nonopt in | |
1086 | NONE) | |
1087 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1088 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1089 | fi ;; | |
1090 | *) host_alias=$nonopt ;; | |
1091 | esac ;; | |
1092 | esac | |
1093 | ||
1094 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1095 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1096 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1097 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1098 | echo "$ac_t""$host" 1>&6 | |
1099 | ||
1100 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
2894793a | 1101 | echo "configure:1102: checking target system type" >&5 |
c906108c SS |
1102 | |
1103 | target_alias=$target | |
1104 | case "$target_alias" in | |
1105 | NONE) | |
1106 | case $nonopt in | |
1107 | NONE) target_alias=$host_alias ;; | |
1108 | *) target_alias=$nonopt ;; | |
1109 | esac ;; | |
1110 | esac | |
1111 | ||
1112 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1113 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1114 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1115 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1116 | echo "$ac_t""$target" 1>&6 | |
1117 | ||
1118 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
2894793a | 1119 | echo "configure:1120: checking build system type" >&5 |
c906108c SS |
1120 | |
1121 | build_alias=$build | |
1122 | case "$build_alias" in | |
1123 | NONE) | |
1124 | case $nonopt in | |
1125 | NONE) build_alias=$host_alias ;; | |
1126 | *) build_alias=$nonopt ;; | |
1127 | esac ;; | |
1128 | esac | |
1129 | ||
1130 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1131 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1132 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1133 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1134 | echo "$ac_t""$build" 1>&6 | |
1135 | ||
1136 | test "$host_alias" != "$target_alias" && | |
1137 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1138 | NONENONEs,x,x, && | |
1139 | program_prefix=${target_alias}- | |
1140 | ||
1141 | ||
1142 | ALL_LINGUAS= | |
1143 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
2894793a | 1144 | echo "configure:1145: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1145 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1146 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1147 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1148 | else | |
1149 | cat > conftestmake <<\EOF | |
1150 | all: | |
1151 | @echo 'ac_maketemp="${MAKE}"' | |
1152 | EOF | |
1153 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1154 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1155 | if test -n "$ac_maketemp"; then | |
1156 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1157 | else | |
1158 | eval ac_cv_prog_make_${ac_make}_set=no | |
1159 | fi | |
1160 | rm -f conftestmake | |
1161 | fi | |
1162 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1163 | echo "$ac_t""yes" 1>&6 | |
1164 | SET_MAKE= | |
1165 | else | |
1166 | echo "$ac_t""no" 1>&6 | |
1167 | SET_MAKE="MAKE=${MAKE-make}" | |
1168 | fi | |
1169 | ||
1170 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1171 | set dummy ranlib; ac_word=$2 | |
1172 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 1173 | echo "configure:1174: checking for $ac_word" >&5 |
c906108c SS |
1174 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1176 | else | |
1177 | if test -n "$RANLIB"; then | |
1178 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1179 | else | |
1180 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1181 | ac_dummy="$PATH" | |
1182 | for ac_dir in $ac_dummy; do | |
1183 | test -z "$ac_dir" && ac_dir=. | |
1184 | if test -f $ac_dir/$ac_word; then | |
1185 | ac_cv_prog_RANLIB="ranlib" | |
1186 | break | |
1187 | fi | |
1188 | done | |
1189 | IFS="$ac_save_ifs" | |
1190 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1191 | fi | |
1192 | fi | |
1193 | RANLIB="$ac_cv_prog_RANLIB" | |
1194 | if test -n "$RANLIB"; then | |
1195 | echo "$ac_t""$RANLIB" 1>&6 | |
1196 | else | |
1197 | echo "$ac_t""no" 1>&6 | |
1198 | fi | |
1199 | ||
1200 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
2894793a | 1201 | echo "configure:1202: checking for ANSI C header files" >&5 |
c906108c SS |
1202 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1204 | else | |
1205 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1206 | #line 1207 "configure" |
c906108c SS |
1207 | #include "confdefs.h" |
1208 | #include <stdlib.h> | |
1209 | #include <stdarg.h> | |
1210 | #include <string.h> | |
1211 | #include <float.h> | |
1212 | EOF | |
1213 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 1214 | { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1215 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1216 | if test -z "$ac_err"; then | |
1217 | rm -rf conftest* | |
1218 | ac_cv_header_stdc=yes | |
1219 | else | |
1220 | echo "$ac_err" >&5 | |
1221 | echo "configure: failed program was:" >&5 | |
1222 | cat conftest.$ac_ext >&5 | |
1223 | rm -rf conftest* | |
1224 | ac_cv_header_stdc=no | |
1225 | fi | |
1226 | rm -f conftest* | |
1227 | ||
1228 | if test $ac_cv_header_stdc = yes; then | |
1229 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1230 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1231 | #line 1232 "configure" |
c906108c SS |
1232 | #include "confdefs.h" |
1233 | #include <string.h> | |
1234 | EOF | |
1235 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1236 | egrep "memchr" >/dev/null 2>&1; then | |
1237 | : | |
1238 | else | |
1239 | rm -rf conftest* | |
1240 | ac_cv_header_stdc=no | |
1241 | fi | |
1242 | rm -f conftest* | |
1243 | ||
1244 | fi | |
1245 | ||
1246 | if test $ac_cv_header_stdc = yes; then | |
1247 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1248 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1249 | #line 1250 "configure" |
c906108c SS |
1250 | #include "confdefs.h" |
1251 | #include <stdlib.h> | |
1252 | EOF | |
1253 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1254 | egrep "free" >/dev/null 2>&1; then | |
1255 | : | |
1256 | else | |
1257 | rm -rf conftest* | |
1258 | ac_cv_header_stdc=no | |
1259 | fi | |
1260 | rm -f conftest* | |
1261 | ||
1262 | fi | |
1263 | ||
1264 | if test $ac_cv_header_stdc = yes; then | |
1265 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1266 | if test "$cross_compiling" = yes; then | |
1267 | : | |
1268 | else | |
1269 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1270 | #line 1271 "configure" |
c906108c SS |
1271 | #include "confdefs.h" |
1272 | #include <ctype.h> | |
1273 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1274 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1275 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1276 | int main () { int i; for (i = 0; i < 256; i++) | |
1277 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1278 | exit (0); } | |
1279 | ||
1280 | EOF | |
2894793a | 1281 | if { (eval echo configure:1282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1282 | then |
1283 | : | |
1284 | else | |
1285 | echo "configure: failed program was:" >&5 | |
1286 | cat conftest.$ac_ext >&5 | |
1287 | rm -fr conftest* | |
1288 | ac_cv_header_stdc=no | |
1289 | fi | |
1290 | rm -fr conftest* | |
1291 | fi | |
1292 | ||
1293 | fi | |
1294 | fi | |
1295 | ||
1296 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1297 | if test $ac_cv_header_stdc = yes; then | |
1298 | cat >> confdefs.h <<\EOF | |
1299 | #define STDC_HEADERS 1 | |
1300 | EOF | |
1301 | ||
1302 | fi | |
1303 | ||
1304 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
2894793a | 1305 | echo "configure:1306: checking for working const" >&5 |
c906108c SS |
1306 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1307 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1308 | else | |
1309 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1310 | #line 1311 "configure" |
c906108c SS |
1311 | #include "confdefs.h" |
1312 | ||
1313 | int main() { | |
1314 | ||
1315 | /* Ultrix mips cc rejects this. */ | |
1316 | typedef int charset[2]; const charset x; | |
1317 | /* SunOS 4.1.1 cc rejects this. */ | |
1318 | char const *const *ccp; | |
1319 | char **p; | |
1320 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1321 | struct point {int x, y;}; | |
1322 | static struct point const zero = {0,0}; | |
1323 | /* AIX XL C 1.02.0.0 rejects this. | |
1324 | It does not let you subtract one const X* pointer from another in an arm | |
1325 | of an if-expression whose if-part is not a constant expression */ | |
1326 | const char *g = "string"; | |
1327 | ccp = &g + (g ? g-g : 0); | |
1328 | /* HPUX 7.0 cc rejects these. */ | |
1329 | ++ccp; | |
1330 | p = (char**) ccp; | |
1331 | ccp = (char const *const *) p; | |
1332 | { /* SCO 3.2v4 cc rejects this. */ | |
1333 | char *t; | |
1334 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1335 | ||
1336 | *t++ = 0; | |
1337 | } | |
1338 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1339 | int x[] = {25, 17}; | |
1340 | const int *foo = &x[0]; | |
1341 | ++foo; | |
1342 | } | |
1343 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1344 | typedef const int *iptr; | |
1345 | iptr p = 0; | |
1346 | ++p; | |
1347 | } | |
1348 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1349 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1350 | struct s { int j; const int *ap[3]; }; | |
1351 | struct s *b; b->j = 5; | |
1352 | } | |
1353 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1354 | const int foo = 10; | |
1355 | } | |
1356 | ||
1357 | ; return 0; } | |
1358 | EOF | |
2894793a | 1359 | if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1360 | rm -rf conftest* |
1361 | ac_cv_c_const=yes | |
1362 | else | |
1363 | echo "configure: failed program was:" >&5 | |
1364 | cat conftest.$ac_ext >&5 | |
1365 | rm -rf conftest* | |
1366 | ac_cv_c_const=no | |
1367 | fi | |
1368 | rm -f conftest* | |
1369 | fi | |
1370 | ||
1371 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1372 | if test $ac_cv_c_const = no; then | |
1373 | cat >> confdefs.h <<\EOF | |
1374 | #define const | |
1375 | EOF | |
1376 | ||
1377 | fi | |
1378 | ||
1379 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
2894793a | 1380 | echo "configure:1381: checking for inline" >&5 |
c906108c SS |
1381 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1382 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1383 | else | |
1384 | ac_cv_c_inline=no | |
1385 | for ac_kw in inline __inline__ __inline; do | |
1386 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1387 | #line 1388 "configure" |
c906108c SS |
1388 | #include "confdefs.h" |
1389 | ||
1390 | int main() { | |
1391 | } $ac_kw foo() { | |
1392 | ; return 0; } | |
1393 | EOF | |
2894793a | 1394 | if { (eval echo configure:1395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1395 | rm -rf conftest* |
1396 | ac_cv_c_inline=$ac_kw; break | |
1397 | else | |
1398 | echo "configure: failed program was:" >&5 | |
1399 | cat conftest.$ac_ext >&5 | |
1400 | fi | |
1401 | rm -f conftest* | |
1402 | done | |
1403 | ||
1404 | fi | |
1405 | ||
1406 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1407 | case "$ac_cv_c_inline" in | |
1408 | inline | yes) ;; | |
1409 | no) cat >> confdefs.h <<\EOF | |
1410 | #define inline | |
1411 | EOF | |
1412 | ;; | |
1413 | *) cat >> confdefs.h <<EOF | |
1414 | #define inline $ac_cv_c_inline | |
1415 | EOF | |
1416 | ;; | |
1417 | esac | |
1418 | ||
1419 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
2894793a | 1420 | echo "configure:1421: checking for off_t" >&5 |
c906108c SS |
1421 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1422 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1423 | else | |
1424 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1425 | #line 1426 "configure" |
c906108c SS |
1426 | #include "confdefs.h" |
1427 | #include <sys/types.h> | |
1428 | #if STDC_HEADERS | |
1429 | #include <stdlib.h> | |
1430 | #include <stddef.h> | |
1431 | #endif | |
1432 | EOF | |
1433 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1434 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1435 | rm -rf conftest* | |
1436 | ac_cv_type_off_t=yes | |
1437 | else | |
1438 | rm -rf conftest* | |
1439 | ac_cv_type_off_t=no | |
1440 | fi | |
1441 | rm -f conftest* | |
1442 | ||
1443 | fi | |
1444 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1445 | if test $ac_cv_type_off_t = no; then | |
1446 | cat >> confdefs.h <<\EOF | |
1447 | #define off_t long | |
1448 | EOF | |
1449 | ||
1450 | fi | |
1451 | ||
1452 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
2894793a | 1453 | echo "configure:1454: checking for size_t" >&5 |
c906108c SS |
1454 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1455 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1456 | else | |
1457 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1458 | #line 1459 "configure" |
c906108c SS |
1459 | #include "confdefs.h" |
1460 | #include <sys/types.h> | |
1461 | #if STDC_HEADERS | |
1462 | #include <stdlib.h> | |
1463 | #include <stddef.h> | |
1464 | #endif | |
1465 | EOF | |
1466 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1467 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1468 | rm -rf conftest* | |
1469 | ac_cv_type_size_t=yes | |
1470 | else | |
1471 | rm -rf conftest* | |
1472 | ac_cv_type_size_t=no | |
1473 | fi | |
1474 | rm -f conftest* | |
1475 | ||
1476 | fi | |
1477 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1478 | if test $ac_cv_type_size_t = no; then | |
1479 | cat >> confdefs.h <<\EOF | |
1480 | #define size_t unsigned | |
1481 | EOF | |
1482 | ||
1483 | fi | |
1484 | ||
1485 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1486 | # for constant arguments. Useless! | |
1487 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
2894793a | 1488 | echo "configure:1489: checking for working alloca.h" >&5 |
c906108c SS |
1489 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1490 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1491 | else | |
1492 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1493 | #line 1494 "configure" |
c906108c SS |
1494 | #include "confdefs.h" |
1495 | #include <alloca.h> | |
1496 | int main() { | |
1497 | char *p = alloca(2 * sizeof(int)); | |
1498 | ; return 0; } | |
1499 | EOF | |
2894793a | 1500 | if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1501 | rm -rf conftest* |
1502 | ac_cv_header_alloca_h=yes | |
1503 | else | |
1504 | echo "configure: failed program was:" >&5 | |
1505 | cat conftest.$ac_ext >&5 | |
1506 | rm -rf conftest* | |
1507 | ac_cv_header_alloca_h=no | |
1508 | fi | |
1509 | rm -f conftest* | |
1510 | fi | |
1511 | ||
1512 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1513 | if test $ac_cv_header_alloca_h = yes; then | |
1514 | cat >> confdefs.h <<\EOF | |
1515 | #define HAVE_ALLOCA_H 1 | |
1516 | EOF | |
1517 | ||
1518 | fi | |
1519 | ||
1520 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
2894793a | 1521 | echo "configure:1522: checking for alloca" >&5 |
c906108c SS |
1522 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1523 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1524 | else | |
1525 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1526 | #line 1527 "configure" |
c906108c SS |
1527 | #include "confdefs.h" |
1528 | ||
1529 | #ifdef __GNUC__ | |
1530 | # define alloca __builtin_alloca | |
1531 | #else | |
1532 | # ifdef _MSC_VER | |
1533 | # include <malloc.h> | |
1534 | # define alloca _alloca | |
1535 | # else | |
1536 | # if HAVE_ALLOCA_H | |
1537 | # include <alloca.h> | |
1538 | # else | |
1539 | # ifdef _AIX | |
1540 | #pragma alloca | |
1541 | # else | |
1542 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1543 | char *alloca (); | |
1544 | # endif | |
1545 | # endif | |
1546 | # endif | |
1547 | # endif | |
1548 | #endif | |
1549 | ||
1550 | int main() { | |
1551 | char *p = (char *) alloca(1); | |
1552 | ; return 0; } | |
1553 | EOF | |
2894793a | 1554 | if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1555 | rm -rf conftest* |
1556 | ac_cv_func_alloca_works=yes | |
1557 | else | |
1558 | echo "configure: failed program was:" >&5 | |
1559 | cat conftest.$ac_ext >&5 | |
1560 | rm -rf conftest* | |
1561 | ac_cv_func_alloca_works=no | |
1562 | fi | |
1563 | rm -f conftest* | |
1564 | fi | |
1565 | ||
1566 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1567 | if test $ac_cv_func_alloca_works = yes; then | |
1568 | cat >> confdefs.h <<\EOF | |
1569 | #define HAVE_ALLOCA 1 | |
1570 | EOF | |
1571 | ||
1572 | fi | |
1573 | ||
1574 | if test $ac_cv_func_alloca_works = no; then | |
1575 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1576 | # that cause trouble. Some versions do not even contain alloca or | |
1577 | # contain a buggy version. If you still want to use their alloca, | |
1578 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1579 | ALLOCA=alloca.${ac_objext} | |
1580 | cat >> confdefs.h <<\EOF | |
1581 | #define C_ALLOCA 1 | |
1582 | EOF | |
1583 | ||
1584 | ||
1585 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
2894793a | 1586 | echo "configure:1587: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1587 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1588 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1589 | else | |
1590 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1591 | #line 1592 "configure" |
c906108c SS |
1592 | #include "confdefs.h" |
1593 | #if defined(CRAY) && ! defined(CRAY2) | |
1594 | webecray | |
1595 | #else | |
1596 | wenotbecray | |
1597 | #endif | |
1598 | ||
1599 | EOF | |
1600 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1601 | egrep "webecray" >/dev/null 2>&1; then | |
1602 | rm -rf conftest* | |
1603 | ac_cv_os_cray=yes | |
1604 | else | |
1605 | rm -rf conftest* | |
1606 | ac_cv_os_cray=no | |
1607 | fi | |
1608 | rm -f conftest* | |
1609 | ||
1610 | fi | |
1611 | ||
1612 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1613 | if test $ac_cv_os_cray = yes; then | |
1614 | for ac_func in _getb67 GETB67 getb67; do | |
1615 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2894793a | 1616 | echo "configure:1617: checking for $ac_func" >&5 |
c906108c SS |
1617 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1618 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1619 | else | |
1620 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1621 | #line 1622 "configure" |
c906108c SS |
1622 | #include "confdefs.h" |
1623 | /* System header to define __stub macros and hopefully few prototypes, | |
1624 | which can conflict with char $ac_func(); below. */ | |
1625 | #include <assert.h> | |
1626 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1627 | /* We use char because int might match the return type of a gcc2 | |
1628 | builtin and then its argument prototype would still apply. */ | |
1629 | char $ac_func(); | |
1630 | ||
1631 | int main() { | |
1632 | ||
1633 | /* The GNU C library defines this for functions which it implements | |
1634 | to always fail with ENOSYS. Some functions are actually named | |
1635 | something starting with __ and the normal name is an alias. */ | |
1636 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1637 | choke me | |
1638 | #else | |
1639 | $ac_func(); | |
1640 | #endif | |
1641 | ||
1642 | ; return 0; } | |
1643 | EOF | |
2894793a | 1644 | if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1645 | rm -rf conftest* |
1646 | eval "ac_cv_func_$ac_func=yes" | |
1647 | else | |
1648 | echo "configure: failed program was:" >&5 | |
1649 | cat conftest.$ac_ext >&5 | |
1650 | rm -rf conftest* | |
1651 | eval "ac_cv_func_$ac_func=no" | |
1652 | fi | |
1653 | rm -f conftest* | |
1654 | fi | |
1655 | ||
1656 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1657 | echo "$ac_t""yes" 1>&6 | |
1658 | cat >> confdefs.h <<EOF | |
1659 | #define CRAY_STACKSEG_END $ac_func | |
1660 | EOF | |
1661 | ||
1662 | break | |
1663 | else | |
1664 | echo "$ac_t""no" 1>&6 | |
1665 | fi | |
1666 | ||
1667 | done | |
1668 | fi | |
1669 | ||
1670 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
2894793a | 1671 | echo "configure:1672: checking stack direction for C alloca" >&5 |
c906108c SS |
1672 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1674 | else | |
1675 | if test "$cross_compiling" = yes; then | |
1676 | ac_cv_c_stack_direction=0 | |
1677 | else | |
1678 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1679 | #line 1680 "configure" |
c906108c SS |
1680 | #include "confdefs.h" |
1681 | find_stack_direction () | |
1682 | { | |
1683 | static char *addr = 0; | |
1684 | auto char dummy; | |
1685 | if (addr == 0) | |
1686 | { | |
1687 | addr = &dummy; | |
1688 | return find_stack_direction (); | |
1689 | } | |
1690 | else | |
1691 | return (&dummy > addr) ? 1 : -1; | |
1692 | } | |
1693 | main () | |
1694 | { | |
1695 | exit (find_stack_direction() < 0); | |
1696 | } | |
1697 | EOF | |
2894793a | 1698 | if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1699 | then |
1700 | ac_cv_c_stack_direction=1 | |
1701 | else | |
1702 | echo "configure: failed program was:" >&5 | |
1703 | cat conftest.$ac_ext >&5 | |
1704 | rm -fr conftest* | |
1705 | ac_cv_c_stack_direction=-1 | |
1706 | fi | |
1707 | rm -fr conftest* | |
1708 | fi | |
1709 | ||
1710 | fi | |
1711 | ||
1712 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1713 | cat >> confdefs.h <<EOF | |
1714 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1715 | EOF | |
1716 | ||
1717 | fi | |
1718 | ||
1719 | for ac_hdr in unistd.h | |
1720 | do | |
1721 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1722 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
2894793a | 1723 | echo "configure:1724: checking for $ac_hdr" >&5 |
c906108c SS |
1724 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1725 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1726 | else | |
1727 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1728 | #line 1729 "configure" |
c906108c SS |
1729 | #include "confdefs.h" |
1730 | #include <$ac_hdr> | |
1731 | EOF | |
1732 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 1733 | { (eval echo configure:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1734 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1735 | if test -z "$ac_err"; then | |
1736 | rm -rf conftest* | |
1737 | eval "ac_cv_header_$ac_safe=yes" | |
1738 | else | |
1739 | echo "$ac_err" >&5 | |
1740 | echo "configure: failed program was:" >&5 | |
1741 | cat conftest.$ac_ext >&5 | |
1742 | rm -rf conftest* | |
1743 | eval "ac_cv_header_$ac_safe=no" | |
1744 | fi | |
1745 | rm -f conftest* | |
1746 | fi | |
1747 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1748 | echo "$ac_t""yes" 1>&6 | |
1749 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1750 | cat >> confdefs.h <<EOF | |
1751 | #define $ac_tr_hdr 1 | |
1752 | EOF | |
1753 | ||
1754 | else | |
1755 | echo "$ac_t""no" 1>&6 | |
1756 | fi | |
1757 | done | |
1758 | ||
1759 | for ac_func in getpagesize | |
1760 | do | |
1761 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2894793a | 1762 | echo "configure:1763: checking for $ac_func" >&5 |
c906108c SS |
1763 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1764 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1765 | else | |
1766 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1767 | #line 1768 "configure" |
c906108c SS |
1768 | #include "confdefs.h" |
1769 | /* System header to define __stub macros and hopefully few prototypes, | |
1770 | which can conflict with char $ac_func(); below. */ | |
1771 | #include <assert.h> | |
1772 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1773 | /* We use char because int might match the return type of a gcc2 | |
1774 | builtin and then its argument prototype would still apply. */ | |
1775 | char $ac_func(); | |
1776 | ||
1777 | int main() { | |
1778 | ||
1779 | /* The GNU C library defines this for functions which it implements | |
1780 | to always fail with ENOSYS. Some functions are actually named | |
1781 | something starting with __ and the normal name is an alias. */ | |
1782 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1783 | choke me | |
1784 | #else | |
1785 | $ac_func(); | |
1786 | #endif | |
1787 | ||
1788 | ; return 0; } | |
1789 | EOF | |
2894793a | 1790 | if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1791 | rm -rf conftest* |
1792 | eval "ac_cv_func_$ac_func=yes" | |
1793 | else | |
1794 | echo "configure: failed program was:" >&5 | |
1795 | cat conftest.$ac_ext >&5 | |
1796 | rm -rf conftest* | |
1797 | eval "ac_cv_func_$ac_func=no" | |
1798 | fi | |
1799 | rm -f conftest* | |
1800 | fi | |
1801 | ||
1802 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1803 | echo "$ac_t""yes" 1>&6 | |
1804 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1805 | cat >> confdefs.h <<EOF | |
1806 | #define $ac_tr_func 1 | |
1807 | EOF | |
1808 | ||
1809 | else | |
1810 | echo "$ac_t""no" 1>&6 | |
1811 | fi | |
1812 | done | |
1813 | ||
1814 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
2894793a | 1815 | echo "configure:1816: checking for working mmap" >&5 |
c906108c SS |
1816 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1818 | else | |
1819 | if test "$cross_compiling" = yes; then | |
1820 | ac_cv_func_mmap_fixed_mapped=no | |
1821 | else | |
1822 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1823 | #line 1824 "configure" |
c906108c SS |
1824 | #include "confdefs.h" |
1825 | ||
1826 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1827 | Here is a matrix of mmap possibilities: | |
1828 | mmap private not fixed | |
1829 | mmap private fixed at somewhere currently unmapped | |
1830 | mmap private fixed at somewhere already mapped | |
1831 | mmap shared not fixed | |
1832 | mmap shared fixed at somewhere currently unmapped | |
1833 | mmap shared fixed at somewhere already mapped | |
1834 | For private mappings, we should verify that changes cannot be read() | |
1835 | back from the file, nor mmap's back from the file at a different | |
1836 | address. (There have been systems where private was not correctly | |
1837 | implemented like the infamous i386 svr4.0, and systems where the | |
1838 | VM page cache was not coherent with the filesystem buffer cache | |
1839 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1840 | For shared mappings, we should conversely verify that changes get | |
1841 | propogated back to all the places they're supposed to be. | |
1842 | ||
1843 | Grep wants private fixed already mapped. | |
1844 | The main things grep needs to know about mmap are: | |
1845 | * does it exist and is it safe to write into the mmap'd area | |
1846 | * how to use it (BSD variants) */ | |
1847 | #include <sys/types.h> | |
1848 | #include <fcntl.h> | |
1849 | #include <sys/mman.h> | |
1850 | ||
1851 | /* This mess was copied from the GNU getpagesize.h. */ | |
1852 | #ifndef HAVE_GETPAGESIZE | |
1853 | # ifdef HAVE_UNISTD_H | |
1854 | # include <unistd.h> | |
1855 | # endif | |
1856 | ||
1857 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1858 | # ifndef HAVE_SYS_PARAM_H | |
1859 | # define HAVE_SYS_PARAM_H 1 | |
1860 | # endif | |
1861 | ||
1862 | # ifdef _SC_PAGESIZE | |
1863 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1864 | # else /* no _SC_PAGESIZE */ | |
1865 | # ifdef HAVE_SYS_PARAM_H | |
1866 | # include <sys/param.h> | |
1867 | # ifdef EXEC_PAGESIZE | |
1868 | # define getpagesize() EXEC_PAGESIZE | |
1869 | # else /* no EXEC_PAGESIZE */ | |
1870 | # ifdef NBPG | |
1871 | # define getpagesize() NBPG * CLSIZE | |
1872 | # ifndef CLSIZE | |
1873 | # define CLSIZE 1 | |
1874 | # endif /* no CLSIZE */ | |
1875 | # else /* no NBPG */ | |
1876 | # ifdef NBPC | |
1877 | # define getpagesize() NBPC | |
1878 | # else /* no NBPC */ | |
1879 | # ifdef PAGESIZE | |
1880 | # define getpagesize() PAGESIZE | |
1881 | # endif /* PAGESIZE */ | |
1882 | # endif /* no NBPC */ | |
1883 | # endif /* no NBPG */ | |
1884 | # endif /* no EXEC_PAGESIZE */ | |
1885 | # else /* no HAVE_SYS_PARAM_H */ | |
1886 | # define getpagesize() 8192 /* punt totally */ | |
1887 | # endif /* no HAVE_SYS_PARAM_H */ | |
1888 | # endif /* no _SC_PAGESIZE */ | |
1889 | ||
1890 | #endif /* no HAVE_GETPAGESIZE */ | |
1891 | ||
1892 | #ifdef __cplusplus | |
1893 | extern "C" { void *malloc(unsigned); } | |
1894 | #else | |
1895 | char *malloc(); | |
1896 | #endif | |
1897 | ||
1898 | int | |
1899 | main() | |
1900 | { | |
1901 | char *data, *data2, *data3; | |
1902 | int i, pagesize; | |
1903 | int fd; | |
1904 | ||
1905 | pagesize = getpagesize(); | |
1906 | ||
1907 | /* | |
1908 | * First, make a file with some known garbage in it. | |
1909 | */ | |
1910 | data = malloc(pagesize); | |
1911 | if (!data) | |
1912 | exit(1); | |
1913 | for (i = 0; i < pagesize; ++i) | |
1914 | *(data + i) = rand(); | |
1915 | umask(0); | |
1916 | fd = creat("conftestmmap", 0600); | |
1917 | if (fd < 0) | |
1918 | exit(1); | |
1919 | if (write(fd, data, pagesize) != pagesize) | |
1920 | exit(1); | |
1921 | close(fd); | |
1922 | ||
1923 | /* | |
1924 | * Next, try to mmap the file at a fixed address which | |
1925 | * already has something else allocated at it. If we can, | |
1926 | * also make sure that we see the same garbage. | |
1927 | */ | |
1928 | fd = open("conftestmmap", O_RDWR); | |
1929 | if (fd < 0) | |
1930 | exit(1); | |
1931 | data2 = malloc(2 * pagesize); | |
1932 | if (!data2) | |
1933 | exit(1); | |
1934 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1935 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1936 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1937 | exit(1); | |
1938 | for (i = 0; i < pagesize; ++i) | |
1939 | if (*(data + i) != *(data2 + i)) | |
1940 | exit(1); | |
1941 | ||
1942 | /* | |
1943 | * Finally, make sure that changes to the mapped area | |
1944 | * do not percolate back to the file as seen by read(). | |
1945 | * (This is a bug on some variants of i386 svr4.0.) | |
1946 | */ | |
1947 | for (i = 0; i < pagesize; ++i) | |
1948 | *(data2 + i) = *(data2 + i) + 1; | |
1949 | data3 = malloc(pagesize); | |
1950 | if (!data3) | |
1951 | exit(1); | |
1952 | if (read(fd, data3, pagesize) != pagesize) | |
1953 | exit(1); | |
1954 | for (i = 0; i < pagesize; ++i) | |
1955 | if (*(data + i) != *(data3 + i)) | |
1956 | exit(1); | |
1957 | close(fd); | |
1958 | unlink("conftestmmap"); | |
1959 | exit(0); | |
1960 | } | |
1961 | ||
1962 | EOF | |
2894793a | 1963 | if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1964 | then |
1965 | ac_cv_func_mmap_fixed_mapped=yes | |
1966 | else | |
1967 | echo "configure: failed program was:" >&5 | |
1968 | cat conftest.$ac_ext >&5 | |
1969 | rm -fr conftest* | |
1970 | ac_cv_func_mmap_fixed_mapped=no | |
1971 | fi | |
1972 | rm -fr conftest* | |
1973 | fi | |
1974 | ||
1975 | fi | |
1976 | ||
1977 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1978 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1979 | cat >> confdefs.h <<\EOF | |
1980 | #define HAVE_MMAP 1 | |
1981 | EOF | |
1982 | ||
1983 | fi | |
1984 | ||
1985 | ||
1986 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1987 | unistd.h values.h sys/param.h | |
1988 | do | |
1989 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1990 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
2894793a | 1991 | echo "configure:1992: checking for $ac_hdr" >&5 |
c906108c SS |
1992 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1993 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1994 | else | |
1995 | cat > conftest.$ac_ext <<EOF | |
2894793a | 1996 | #line 1997 "configure" |
c906108c SS |
1997 | #include "confdefs.h" |
1998 | #include <$ac_hdr> | |
1999 | EOF | |
2000 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 2001 | { (eval echo configure:2002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2002 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2003 | if test -z "$ac_err"; then | |
2004 | rm -rf conftest* | |
2005 | eval "ac_cv_header_$ac_safe=yes" | |
2006 | else | |
2007 | echo "$ac_err" >&5 | |
2008 | echo "configure: failed program was:" >&5 | |
2009 | cat conftest.$ac_ext >&5 | |
2010 | rm -rf conftest* | |
2011 | eval "ac_cv_header_$ac_safe=no" | |
2012 | fi | |
2013 | rm -f conftest* | |
2014 | fi | |
2015 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2016 | echo "$ac_t""yes" 1>&6 | |
2017 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2018 | cat >> confdefs.h <<EOF | |
2019 | #define $ac_tr_hdr 1 | |
2020 | EOF | |
2021 | ||
2022 | else | |
2023 | echo "$ac_t""no" 1>&6 | |
2024 | fi | |
2025 | done | |
2026 | ||
2027 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2028 | __argz_count __argz_stringify __argz_next | |
2029 | do | |
2030 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2894793a | 2031 | echo "configure:2032: checking for $ac_func" >&5 |
c906108c SS |
2032 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2034 | else | |
2035 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2036 | #line 2037 "configure" |
c906108c SS |
2037 | #include "confdefs.h" |
2038 | /* System header to define __stub macros and hopefully few prototypes, | |
2039 | which can conflict with char $ac_func(); below. */ | |
2040 | #include <assert.h> | |
2041 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2042 | /* We use char because int might match the return type of a gcc2 | |
2043 | builtin and then its argument prototype would still apply. */ | |
2044 | char $ac_func(); | |
2045 | ||
2046 | int main() { | |
2047 | ||
2048 | /* The GNU C library defines this for functions which it implements | |
2049 | to always fail with ENOSYS. Some functions are actually named | |
2050 | something starting with __ and the normal name is an alias. */ | |
2051 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2052 | choke me | |
2053 | #else | |
2054 | $ac_func(); | |
2055 | #endif | |
2056 | ||
2057 | ; return 0; } | |
2058 | EOF | |
2894793a | 2059 | if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2060 | rm -rf conftest* |
2061 | eval "ac_cv_func_$ac_func=yes" | |
2062 | else | |
2063 | echo "configure: failed program was:" >&5 | |
2064 | cat conftest.$ac_ext >&5 | |
2065 | rm -rf conftest* | |
2066 | eval "ac_cv_func_$ac_func=no" | |
2067 | fi | |
2068 | rm -f conftest* | |
2069 | fi | |
2070 | ||
2071 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2072 | echo "$ac_t""yes" 1>&6 | |
2073 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2074 | cat >> confdefs.h <<EOF | |
2075 | #define $ac_tr_func 1 | |
2076 | EOF | |
2077 | ||
2078 | else | |
2079 | echo "$ac_t""no" 1>&6 | |
2080 | fi | |
2081 | done | |
2082 | ||
2083 | ||
2084 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2085 | for ac_func in stpcpy | |
2086 | do | |
2087 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2894793a | 2088 | echo "configure:2089: checking for $ac_func" >&5 |
c906108c SS |
2089 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2091 | else | |
2092 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2093 | #line 2094 "configure" |
c906108c SS |
2094 | #include "confdefs.h" |
2095 | /* System header to define __stub macros and hopefully few prototypes, | |
2096 | which can conflict with char $ac_func(); below. */ | |
2097 | #include <assert.h> | |
2098 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2099 | /* We use char because int might match the return type of a gcc2 | |
2100 | builtin and then its argument prototype would still apply. */ | |
2101 | char $ac_func(); | |
2102 | ||
2103 | int main() { | |
2104 | ||
2105 | /* The GNU C library defines this for functions which it implements | |
2106 | to always fail with ENOSYS. Some functions are actually named | |
2107 | something starting with __ and the normal name is an alias. */ | |
2108 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2109 | choke me | |
2110 | #else | |
2111 | $ac_func(); | |
2112 | #endif | |
2113 | ||
2114 | ; return 0; } | |
2115 | EOF | |
2894793a | 2116 | if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2117 | rm -rf conftest* |
2118 | eval "ac_cv_func_$ac_func=yes" | |
2119 | else | |
2120 | echo "configure: failed program was:" >&5 | |
2121 | cat conftest.$ac_ext >&5 | |
2122 | rm -rf conftest* | |
2123 | eval "ac_cv_func_$ac_func=no" | |
2124 | fi | |
2125 | rm -f conftest* | |
2126 | fi | |
2127 | ||
2128 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2129 | echo "$ac_t""yes" 1>&6 | |
2130 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2131 | cat >> confdefs.h <<EOF | |
2132 | #define $ac_tr_func 1 | |
2133 | EOF | |
2134 | ||
2135 | else | |
2136 | echo "$ac_t""no" 1>&6 | |
2137 | fi | |
2138 | done | |
2139 | ||
2140 | fi | |
2141 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2142 | cat >> confdefs.h <<\EOF | |
2143 | #define HAVE_STPCPY 1 | |
2144 | EOF | |
2145 | ||
2146 | fi | |
2147 | ||
2148 | if test $ac_cv_header_locale_h = yes; then | |
2149 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
2894793a | 2150 | echo "configure:2151: checking for LC_MESSAGES" >&5 |
c906108c SS |
2151 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2152 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2153 | else | |
2154 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2155 | #line 2156 "configure" |
c906108c SS |
2156 | #include "confdefs.h" |
2157 | #include <locale.h> | |
2158 | int main() { | |
2159 | return LC_MESSAGES | |
2160 | ; return 0; } | |
2161 | EOF | |
2894793a | 2162 | if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2163 | rm -rf conftest* |
2164 | am_cv_val_LC_MESSAGES=yes | |
2165 | else | |
2166 | echo "configure: failed program was:" >&5 | |
2167 | cat conftest.$ac_ext >&5 | |
2168 | rm -rf conftest* | |
2169 | am_cv_val_LC_MESSAGES=no | |
2170 | fi | |
2171 | rm -f conftest* | |
2172 | fi | |
2173 | ||
2174 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2175 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2176 | cat >> confdefs.h <<\EOF | |
2177 | #define HAVE_LC_MESSAGES 1 | |
2178 | EOF | |
2179 | ||
2180 | fi | |
2181 | fi | |
2182 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
2894793a | 2183 | echo "configure:2184: checking whether NLS is requested" >&5 |
c906108c SS |
2184 | # Check whether --enable-nls or --disable-nls was given. |
2185 | if test "${enable_nls+set}" = set; then | |
2186 | enableval="$enable_nls" | |
2187 | USE_NLS=$enableval | |
2188 | else | |
2189 | USE_NLS=yes | |
2190 | fi | |
2191 | ||
2192 | echo "$ac_t""$USE_NLS" 1>&6 | |
2193 | ||
2194 | ||
2195 | USE_INCLUDED_LIBINTL=no | |
2196 | ||
2197 | if test "$USE_NLS" = "yes"; then | |
2198 | cat >> confdefs.h <<\EOF | |
2199 | #define ENABLE_NLS 1 | |
2200 | EOF | |
2201 | ||
2202 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
2894793a | 2203 | echo "configure:2204: checking whether included gettext is requested" >&5 |
c906108c SS |
2204 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2205 | if test "${with_included_gettext+set}" = set; then | |
2206 | withval="$with_included_gettext" | |
2207 | nls_cv_force_use_gnu_gettext=$withval | |
2208 | else | |
2209 | nls_cv_force_use_gnu_gettext=no | |
2210 | fi | |
2211 | ||
2212 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2213 | ||
2214 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2215 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2216 | nls_cv_header_intl= | |
2217 | nls_cv_header_libgt= | |
2218 | CATOBJEXT=NONE | |
2219 | ||
2220 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2221 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
2894793a | 2222 | echo "configure:2223: checking for libintl.h" >&5 |
c906108c SS |
2223 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2224 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2225 | else | |
2226 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2227 | #line 2228 "configure" |
c906108c SS |
2228 | #include "confdefs.h" |
2229 | #include <libintl.h> | |
2230 | EOF | |
2231 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 2232 | { (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2233 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2234 | if test -z "$ac_err"; then | |
2235 | rm -rf conftest* | |
2236 | eval "ac_cv_header_$ac_safe=yes" | |
2237 | else | |
2238 | echo "$ac_err" >&5 | |
2239 | echo "configure: failed program was:" >&5 | |
2240 | cat conftest.$ac_ext >&5 | |
2241 | rm -rf conftest* | |
2242 | eval "ac_cv_header_$ac_safe=no" | |
2243 | fi | |
2244 | rm -f conftest* | |
2245 | fi | |
2246 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2247 | echo "$ac_t""yes" 1>&6 | |
2248 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
2894793a | 2249 | echo "configure:2250: checking for gettext in libc" >&5 |
c906108c SS |
2250 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2251 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2252 | else | |
2253 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2254 | #line 2255 "configure" |
c906108c SS |
2255 | #include "confdefs.h" |
2256 | #include <libintl.h> | |
2257 | int main() { | |
2258 | return (int) gettext ("") | |
2259 | ; return 0; } | |
2260 | EOF | |
2894793a | 2261 | if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2262 | rm -rf conftest* |
2263 | gt_cv_func_gettext_libc=yes | |
2264 | else | |
2265 | echo "configure: failed program was:" >&5 | |
2266 | cat conftest.$ac_ext >&5 | |
2267 | rm -rf conftest* | |
2268 | gt_cv_func_gettext_libc=no | |
2269 | fi | |
2270 | rm -f conftest* | |
2271 | fi | |
2272 | ||
2273 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2274 | ||
2275 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2276 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
2894793a | 2277 | echo "configure:2278: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2278 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2279 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2281 | else | |
2282 | ac_save_LIBS="$LIBS" | |
2283 | LIBS="-lintl $LIBS" | |
2284 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2285 | #line 2286 "configure" |
c906108c SS |
2286 | #include "confdefs.h" |
2287 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2288 | /* We use char because int might match the return type of a gcc2 | |
2289 | builtin and then its argument prototype would still apply. */ | |
2290 | char bindtextdomain(); | |
2291 | ||
2292 | int main() { | |
2293 | bindtextdomain() | |
2294 | ; return 0; } | |
2295 | EOF | |
2894793a | 2296 | if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2297 | rm -rf conftest* |
2298 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2299 | else | |
2300 | echo "configure: failed program was:" >&5 | |
2301 | cat conftest.$ac_ext >&5 | |
2302 | rm -rf conftest* | |
2303 | eval "ac_cv_lib_$ac_lib_var=no" | |
2304 | fi | |
2305 | rm -f conftest* | |
2306 | LIBS="$ac_save_LIBS" | |
2307 | ||
2308 | fi | |
2309 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2310 | echo "$ac_t""yes" 1>&6 | |
2311 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
2894793a | 2312 | echo "configure:2313: checking for gettext in libintl" >&5 |
c906108c SS |
2313 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2314 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2315 | else | |
2316 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2317 | #line 2318 "configure" |
c906108c SS |
2318 | #include "confdefs.h" |
2319 | ||
2320 | int main() { | |
2321 | return (int) gettext ("") | |
2322 | ; return 0; } | |
2323 | EOF | |
2894793a | 2324 | if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2325 | rm -rf conftest* |
2326 | gt_cv_func_gettext_libintl=yes | |
2327 | else | |
2328 | echo "configure: failed program was:" >&5 | |
2329 | cat conftest.$ac_ext >&5 | |
2330 | rm -rf conftest* | |
2331 | gt_cv_func_gettext_libintl=no | |
2332 | fi | |
2333 | rm -f conftest* | |
2334 | fi | |
2335 | ||
2336 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2337 | else | |
2338 | echo "$ac_t""no" 1>&6 | |
2339 | fi | |
2340 | ||
2341 | fi | |
2342 | ||
2343 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2344 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2345 | cat >> confdefs.h <<\EOF | |
2346 | #define HAVE_GETTEXT 1 | |
2347 | EOF | |
2348 | ||
2349 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2350 | set dummy msgfmt; ac_word=$2 | |
2351 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2352 | echo "configure:2353: checking for $ac_word" >&5 |
c906108c SS |
2353 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2354 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2355 | else | |
2356 | case "$MSGFMT" in | |
2357 | /*) | |
2358 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2359 | ;; | |
2360 | *) | |
2361 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2362 | for ac_dir in $PATH; do | |
2363 | test -z "$ac_dir" && ac_dir=. | |
2364 | if test -f $ac_dir/$ac_word; then | |
2365 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2366 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2367 | break | |
2368 | fi | |
2369 | fi | |
2370 | done | |
2371 | IFS="$ac_save_ifs" | |
2372 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2373 | ;; | |
2374 | esac | |
2375 | fi | |
2376 | MSGFMT="$ac_cv_path_MSGFMT" | |
2377 | if test -n "$MSGFMT"; then | |
2378 | echo "$ac_t""$MSGFMT" 1>&6 | |
2379 | else | |
2380 | echo "$ac_t""no" 1>&6 | |
2381 | fi | |
2382 | if test "$MSGFMT" != "no"; then | |
2383 | for ac_func in dcgettext | |
2384 | do | |
2385 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2894793a | 2386 | echo "configure:2387: checking for $ac_func" >&5 |
c906108c SS |
2387 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2388 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2389 | else | |
2390 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2391 | #line 2392 "configure" |
c906108c SS |
2392 | #include "confdefs.h" |
2393 | /* System header to define __stub macros and hopefully few prototypes, | |
2394 | which can conflict with char $ac_func(); below. */ | |
2395 | #include <assert.h> | |
2396 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2397 | /* We use char because int might match the return type of a gcc2 | |
2398 | builtin and then its argument prototype would still apply. */ | |
2399 | char $ac_func(); | |
2400 | ||
2401 | int main() { | |
2402 | ||
2403 | /* The GNU C library defines this for functions which it implements | |
2404 | to always fail with ENOSYS. Some functions are actually named | |
2405 | something starting with __ and the normal name is an alias. */ | |
2406 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2407 | choke me | |
2408 | #else | |
2409 | $ac_func(); | |
2410 | #endif | |
2411 | ||
2412 | ; return 0; } | |
2413 | EOF | |
2894793a | 2414 | if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2415 | rm -rf conftest* |
2416 | eval "ac_cv_func_$ac_func=yes" | |
2417 | else | |
2418 | echo "configure: failed program was:" >&5 | |
2419 | cat conftest.$ac_ext >&5 | |
2420 | rm -rf conftest* | |
2421 | eval "ac_cv_func_$ac_func=no" | |
2422 | fi | |
2423 | rm -f conftest* | |
2424 | fi | |
2425 | ||
2426 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2427 | echo "$ac_t""yes" 1>&6 | |
2428 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2429 | cat >> confdefs.h <<EOF | |
2430 | #define $ac_tr_func 1 | |
2431 | EOF | |
2432 | ||
2433 | else | |
2434 | echo "$ac_t""no" 1>&6 | |
2435 | fi | |
2436 | done | |
2437 | ||
2438 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2439 | set dummy gmsgfmt; ac_word=$2 | |
2440 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2441 | echo "configure:2442: checking for $ac_word" >&5 |
c906108c SS |
2442 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2443 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2444 | else | |
2445 | case "$GMSGFMT" in | |
2446 | /*) | |
2447 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2448 | ;; | |
2449 | ?:/*) | |
2450 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2451 | ;; | |
2452 | *) | |
2453 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2454 | ac_dummy="$PATH" | |
2455 | for ac_dir in $ac_dummy; do | |
2456 | test -z "$ac_dir" && ac_dir=. | |
2457 | if test -f $ac_dir/$ac_word; then | |
2458 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2459 | break | |
2460 | fi | |
2461 | done | |
2462 | IFS="$ac_save_ifs" | |
2463 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2464 | ;; | |
2465 | esac | |
2466 | fi | |
2467 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2468 | if test -n "$GMSGFMT"; then | |
2469 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2470 | else | |
2471 | echo "$ac_t""no" 1>&6 | |
2472 | fi | |
2473 | ||
2474 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2475 | set dummy xgettext; ac_word=$2 | |
2476 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2477 | echo "configure:2478: checking for $ac_word" >&5 |
c906108c SS |
2478 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2480 | else | |
2481 | case "$XGETTEXT" in | |
2482 | /*) | |
2483 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2484 | ;; | |
2485 | *) | |
2486 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2487 | for ac_dir in $PATH; do | |
2488 | test -z "$ac_dir" && ac_dir=. | |
2489 | if test -f $ac_dir/$ac_word; then | |
2490 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2491 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2492 | break | |
2493 | fi | |
2494 | fi | |
2495 | done | |
2496 | IFS="$ac_save_ifs" | |
2497 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2498 | ;; | |
2499 | esac | |
2500 | fi | |
2501 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2502 | if test -n "$XGETTEXT"; then | |
2503 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2504 | else | |
2505 | echo "$ac_t""no" 1>&6 | |
2506 | fi | |
2507 | ||
2508 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2509 | #line 2510 "configure" |
c906108c SS |
2510 | #include "confdefs.h" |
2511 | ||
2512 | int main() { | |
2513 | extern int _nl_msg_cat_cntr; | |
2514 | return _nl_msg_cat_cntr | |
2515 | ; return 0; } | |
2516 | EOF | |
2894793a | 2517 | if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2518 | rm -rf conftest* |
2519 | CATOBJEXT=.gmo | |
2520 | DATADIRNAME=share | |
2521 | else | |
2522 | echo "configure: failed program was:" >&5 | |
2523 | cat conftest.$ac_ext >&5 | |
2524 | rm -rf conftest* | |
2525 | CATOBJEXT=.mo | |
2526 | DATADIRNAME=lib | |
2527 | fi | |
2528 | rm -f conftest* | |
2529 | INSTOBJEXT=.mo | |
2530 | fi | |
2531 | fi | |
2532 | ||
2533 | else | |
2534 | echo "$ac_t""no" 1>&6 | |
2535 | fi | |
2536 | ||
2537 | ||
2538 | ||
2539 | if test "$CATOBJEXT" = "NONE"; then | |
2540 | nls_cv_use_gnu_gettext=yes | |
2541 | fi | |
2542 | fi | |
2543 | ||
2544 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2545 | INTLOBJS="\$(GETTOBJS)" | |
2546 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2547 | set dummy msgfmt; ac_word=$2 | |
2548 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2549 | echo "configure:2550: checking for $ac_word" >&5 |
c906108c SS |
2550 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2551 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2552 | else | |
2553 | case "$MSGFMT" in | |
2554 | /*) | |
2555 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2556 | ;; | |
2557 | *) | |
2558 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2559 | for ac_dir in $PATH; do | |
2560 | test -z "$ac_dir" && ac_dir=. | |
2561 | if test -f $ac_dir/$ac_word; then | |
2562 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2563 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2564 | break | |
2565 | fi | |
2566 | fi | |
2567 | done | |
2568 | IFS="$ac_save_ifs" | |
2569 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2570 | ;; | |
2571 | esac | |
2572 | fi | |
2573 | MSGFMT="$ac_cv_path_MSGFMT" | |
2574 | if test -n "$MSGFMT"; then | |
2575 | echo "$ac_t""$MSGFMT" 1>&6 | |
2576 | else | |
2577 | echo "$ac_t""no" 1>&6 | |
2578 | fi | |
2579 | ||
2580 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2581 | set dummy gmsgfmt; ac_word=$2 | |
2582 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2583 | echo "configure:2584: checking for $ac_word" >&5 |
c906108c SS |
2584 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2585 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2586 | else | |
2587 | case "$GMSGFMT" in | |
2588 | /*) | |
2589 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2590 | ;; | |
2591 | ?:/*) | |
2592 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2593 | ;; | |
2594 | *) | |
2595 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2596 | ac_dummy="$PATH" | |
2597 | for ac_dir in $ac_dummy; do | |
2598 | test -z "$ac_dir" && ac_dir=. | |
2599 | if test -f $ac_dir/$ac_word; then | |
2600 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2601 | break | |
2602 | fi | |
2603 | done | |
2604 | IFS="$ac_save_ifs" | |
2605 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2606 | ;; | |
2607 | esac | |
2608 | fi | |
2609 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2610 | if test -n "$GMSGFMT"; then | |
2611 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2612 | else | |
2613 | echo "$ac_t""no" 1>&6 | |
2614 | fi | |
2615 | ||
2616 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2617 | set dummy xgettext; ac_word=$2 | |
2618 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2619 | echo "configure:2620: checking for $ac_word" >&5 |
c906108c SS |
2620 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2621 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2622 | else | |
2623 | case "$XGETTEXT" in | |
2624 | /*) | |
2625 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2626 | ;; | |
2627 | *) | |
2628 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2629 | for ac_dir in $PATH; do | |
2630 | test -z "$ac_dir" && ac_dir=. | |
2631 | if test -f $ac_dir/$ac_word; then | |
2632 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2633 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2634 | break | |
2635 | fi | |
2636 | fi | |
2637 | done | |
2638 | IFS="$ac_save_ifs" | |
2639 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2640 | ;; | |
2641 | esac | |
2642 | fi | |
2643 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2644 | if test -n "$XGETTEXT"; then | |
2645 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2646 | else | |
2647 | echo "$ac_t""no" 1>&6 | |
2648 | fi | |
2649 | ||
2650 | ||
2651 | USE_INCLUDED_LIBINTL=yes | |
2652 | CATOBJEXT=.gmo | |
2653 | INSTOBJEXT=.mo | |
2654 | DATADIRNAME=share | |
2655 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2656 | INTLLIBS=$INTLDEPS | |
2657 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2658 | nls_cv_header_intl=libintl.h | |
2659 | nls_cv_header_libgt=libgettext.h | |
2660 | fi | |
2661 | ||
2662 | if test "$XGETTEXT" != ":"; then | |
2663 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2664 | : ; | |
2665 | else | |
2666 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2667 | XGETTEXT=":" | |
2668 | fi | |
2669 | fi | |
2670 | ||
2671 | # We need to process the po/ directory. | |
2672 | POSUB=po | |
2673 | else | |
2674 | DATADIRNAME=share | |
2675 | nls_cv_header_intl=libintl.h | |
2676 | nls_cv_header_libgt=libgettext.h | |
2677 | fi | |
2678 | ||
2679 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2680 | # because some of the sources are only built for this goal. | |
2681 | if test "$PACKAGE" = gettext; then | |
2682 | USE_NLS=yes | |
2683 | USE_INCLUDED_LIBINTL=yes | |
2684 | fi | |
2685 | ||
2686 | for lang in $ALL_LINGUAS; do | |
2687 | GMOFILES="$GMOFILES $lang.gmo" | |
2688 | POFILES="$POFILES $lang.po" | |
2689 | done | |
2690 | ||
2691 | ||
2692 | ||
2693 | ||
2694 | ||
2695 | ||
2696 | ||
2697 | ||
2698 | ||
2699 | ||
2700 | ||
2701 | ||
2702 | ||
2703 | ||
2704 | if test "x$CATOBJEXT" != "x"; then | |
2705 | if test "x$ALL_LINGUAS" = "x"; then | |
2706 | LINGUAS= | |
2707 | else | |
2708 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
2894793a | 2709 | echo "configure:2710: checking for catalogs to be installed" >&5 |
c906108c SS |
2710 | NEW_LINGUAS= |
2711 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2712 | case "$ALL_LINGUAS" in | |
2713 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2714 | esac | |
2715 | done | |
2716 | LINGUAS=$NEW_LINGUAS | |
2717 | echo "$ac_t""$LINGUAS" 1>&6 | |
2718 | fi | |
2719 | ||
2720 | if test -n "$LINGUAS"; then | |
2721 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2722 | fi | |
2723 | fi | |
2724 | ||
2725 | if test $ac_cv_header_locale_h = yes; then | |
2726 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2727 | else | |
2728 | INCLUDE_LOCALE_H="\ | |
2729 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2730 | fi | |
2731 | ||
2732 | ||
2733 | if test -f $srcdir/po2tbl.sed.in; then | |
2734 | if test "$CATOBJEXT" = ".cat"; then | |
2735 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2736 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
2894793a | 2737 | echo "configure:2738: checking for linux/version.h" >&5 |
c906108c SS |
2738 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2739 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2740 | else | |
2741 | cat > conftest.$ac_ext <<EOF | |
2894793a | 2742 | #line 2743 "configure" |
c906108c SS |
2743 | #include "confdefs.h" |
2744 | #include <linux/version.h> | |
2745 | EOF | |
2746 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2894793a | 2747 | { (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2748 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2749 | if test -z "$ac_err"; then | |
2750 | rm -rf conftest* | |
2751 | eval "ac_cv_header_$ac_safe=yes" | |
2752 | else | |
2753 | echo "$ac_err" >&5 | |
2754 | echo "configure: failed program was:" >&5 | |
2755 | cat conftest.$ac_ext >&5 | |
2756 | rm -rf conftest* | |
2757 | eval "ac_cv_header_$ac_safe=no" | |
2758 | fi | |
2759 | rm -f conftest* | |
2760 | fi | |
2761 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2762 | echo "$ac_t""yes" 1>&6 | |
2763 | msgformat=linux | |
2764 | else | |
2765 | echo "$ac_t""no" 1>&6 | |
2766 | msgformat=xopen | |
2767 | fi | |
2768 | ||
2769 | ||
2770 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2771 | fi | |
2772 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2773 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2774 | fi | |
2775 | ||
2776 | if test "$PACKAGE" = "gettext"; then | |
2777 | GT_NO="#NO#" | |
2778 | GT_YES= | |
2779 | else | |
2780 | GT_NO= | |
2781 | GT_YES="#YES#" | |
2782 | fi | |
2783 | ||
2784 | ||
2785 | ||
2786 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2787 | ||
2788 | ||
2789 | l= | |
2790 | ||
2791 | ||
2792 | if test -d $srcdir/po; then | |
2793 | test -d po || mkdir po | |
2794 | if test "x$srcdir" != "x."; then | |
2795 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2796 | posrcprefix="$srcdir/" | |
2797 | else | |
2798 | posrcprefix="../$srcdir/" | |
2799 | fi | |
2800 | else | |
2801 | posrcprefix="../" | |
2802 | fi | |
2803 | rm -f po/POTFILES | |
2804 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2805 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2806 | fi | |
2807 | ||
2808 | ||
2809 | ||
2810 | CONFIG_OBS= | |
2811 | CONFIG_DEPS= | |
2812 | CONFIG_SRCS= | |
fb40c209 AC |
2813 | CONFIG_INITS= |
2814 | ENABLE_CFLAGS= | |
b3a90332 AC |
2815 | CONFIG_ALL= |
2816 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2817 | CONFIG_INSTALL= |
2818 | CONFIG_UNINSTALL= | |
c906108c SS |
2819 | |
2820 | configdirs="doc testsuite" | |
2821 | ||
96baa820 JM |
2822 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2823 | if test "${enable_multi_ice+set}" = set; then | |
2824 | enableval="$enable_multi_ice" | |
2825 | case "${enableval}" in | |
2826 | yes ) enable_multi_ice="yes" ;; | |
2827 | no) enable_multi_ice="no" ;; | |
2828 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2829 | esac | |
2830 | ||
2831 | fi | |
2832 | ||
2833 | ||
2834 | if test "${enable_multi_ice}" = "yes"; then | |
2835 | configdirs="${configdirs} multi-ice" | |
2836 | fi | |
2837 | ||
c906108c SS |
2838 | |
2839 | . ${srcdir}/configure.host | |
2840 | ||
2841 | . ${srcdir}/configure.tgt | |
2842 | ||
2843 | ||
0d06e24b | 2844 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2845 | do |
2846 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2847 | set dummy $ac_prog; ac_word=$2 | |
2848 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2849 | echo "configure:2850: checking for $ac_word" >&5 |
7a292a7a SS |
2850 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2851 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2852 | else | |
2853 | if test -n "$AWK"; then | |
2854 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2855 | else | |
2856 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2857 | ac_dummy="$PATH" | |
2858 | for ac_dir in $ac_dummy; do | |
2859 | test -z "$ac_dir" && ac_dir=. | |
2860 | if test -f $ac_dir/$ac_word; then | |
2861 | ac_cv_prog_AWK="$ac_prog" | |
2862 | break | |
2863 | fi | |
2864 | done | |
2865 | IFS="$ac_save_ifs" | |
2866 | fi | |
2867 | fi | |
2868 | AWK="$ac_cv_prog_AWK" | |
2869 | if test -n "$AWK"; then | |
2870 | echo "$ac_t""$AWK" 1>&6 | |
2871 | else | |
2872 | echo "$ac_t""no" 1>&6 | |
2873 | fi | |
2874 | ||
2875 | test -n "$AWK" && break | |
2876 | done | |
2877 | ||
c906108c SS |
2878 | # Find a good install program. We prefer a C program (faster), |
2879 | # so one script is as good as another. But avoid the broken or | |
2880 | # incompatible versions: | |
2881 | # SysV /etc/install, /usr/sbin/install | |
2882 | # SunOS /usr/etc/install | |
2883 | # IRIX /sbin/install | |
2884 | # AIX /bin/install | |
2885 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2886 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2887 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2888 | # ./install, which can be erroneously created by make from ./install.sh. | |
2889 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
2894793a | 2890 | echo "configure:2891: checking for a BSD compatible install" >&5 |
c906108c SS |
2891 | if test -z "$INSTALL"; then |
2892 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2893 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2894 | else | |
2895 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2896 | for ac_dir in $PATH; do | |
2897 | # Account for people who put trailing slashes in PATH elements. | |
2898 | case "$ac_dir/" in | |
2899 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2900 | *) | |
2901 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2902 | # Don't use installbsd from OSF since it installs stuff as root | |
2903 | # by default. | |
2904 | for ac_prog in ginstall scoinst install; do | |
2905 | if test -f $ac_dir/$ac_prog; then | |
2906 | if test $ac_prog = install && | |
2907 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2908 | # AIX install. It has an incompatible calling convention. | |
2909 | : | |
2910 | else | |
2911 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2912 | break 2 | |
2913 | fi | |
2914 | fi | |
2915 | done | |
2916 | ;; | |
2917 | esac | |
2918 | done | |
2919 | IFS="$ac_save_IFS" | |
2920 | ||
2921 | fi | |
2922 | if test "${ac_cv_path_install+set}" = set; then | |
2923 | INSTALL="$ac_cv_path_install" | |
2924 | else | |
2925 | # As a last resort, use the slow shell script. We don't cache a | |
2926 | # path for INSTALL within a source directory, because that will | |
2927 | # break other packages using the cache if that directory is | |
2928 | # removed, or if the path is relative. | |
2929 | INSTALL="$ac_install_sh" | |
2930 | fi | |
2931 | fi | |
2932 | echo "$ac_t""$INSTALL" 1>&6 | |
2933 | ||
2934 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2935 | # It thinks the first close brace ends the variable substitution. | |
2936 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2937 | ||
2938 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2939 | ||
2940 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2941 | ||
2942 | if test $host != $build; then | |
2943 | ac_tool_prefix=${host_alias}- | |
2944 | else | |
2945 | ac_tool_prefix= | |
2946 | fi | |
2947 | ||
2948 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2949 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2950 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2951 | echo "configure:2952: checking for $ac_word" >&5 |
c906108c SS |
2952 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2953 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2954 | else | |
2955 | if test -n "$AR"; then | |
2956 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2957 | else | |
2958 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2959 | ac_dummy="$PATH" | |
2960 | for ac_dir in $ac_dummy; do | |
2961 | test -z "$ac_dir" && ac_dir=. | |
2962 | if test -f $ac_dir/$ac_word; then | |
2963 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2964 | break | |
2965 | fi | |
2966 | done | |
2967 | IFS="$ac_save_ifs" | |
2968 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2969 | fi | |
2970 | fi | |
2971 | AR="$ac_cv_prog_AR" | |
2972 | if test -n "$AR"; then | |
2973 | echo "$ac_t""$AR" 1>&6 | |
2974 | else | |
2975 | echo "$ac_t""no" 1>&6 | |
2976 | fi | |
2977 | ||
2978 | ||
2979 | ||
2980 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2981 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2982 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 2983 | echo "configure:2984: checking for $ac_word" >&5 |
c906108c SS |
2984 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2985 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2986 | else | |
2987 | if test -n "$RANLIB"; then | |
2988 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2989 | else | |
2990 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2991 | ac_dummy="$PATH" | |
2992 | for ac_dir in $ac_dummy; do | |
2993 | test -z "$ac_dir" && ac_dir=. | |
2994 | if test -f $ac_dir/$ac_word; then | |
2995 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
2996 | break | |
2997 | fi | |
2998 | done | |
2999 | IFS="$ac_save_ifs" | |
3000 | fi | |
3001 | fi | |
3002 | RANLIB="$ac_cv_prog_RANLIB" | |
3003 | if test -n "$RANLIB"; then | |
3004 | echo "$ac_t""$RANLIB" 1>&6 | |
3005 | else | |
3006 | echo "$ac_t""no" 1>&6 | |
3007 | fi | |
3008 | ||
3009 | ||
3010 | if test -z "$ac_cv_prog_RANLIB"; then | |
3011 | if test -n "$ac_tool_prefix"; then | |
3012 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3013 | set dummy ranlib; ac_word=$2 | |
3014 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2894793a | 3015 | echo "configure:3016: checking for $ac_word" >&5 |
c906108c SS |
3016 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3017 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3018 | else | |
3019 | if test -n "$RANLIB"; then | |
3020 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3021 | else | |
3022 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3023 | ac_dummy="$PATH" | |
3024 | for ac_dir in $ac_dummy; do | |
3025 | test -z "$ac_dir" && ac_dir=. | |
3026 | if test -f $ac_dir/$ac_word; then | |
3027 | ac_cv_prog_RANLIB="ranlib" | |
3028 | break | |
3029 | fi | |
3030 | done | |
3031 | IFS="$ac_save_ifs" | |
3032 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3033 | fi | |
3034 | fi | |
3035 | RANLIB="$ac_cv_prog_RANLIB" | |
3036 | if test -n "$RANLIB"; then | |
3037 | echo "$ac_t""$RANLIB" 1>&6 | |
3038 | else | |
3039 | echo "$ac_t""no" 1>&6 | |
3040 | fi | |
3041 | ||
3042 | else | |
3043 | RANLIB=":" | |
3044 | fi | |
3045 | fi | |
3046 | ||
95ca63c4 CF |
3047 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3048 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3049 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3050 | echo "configure:3051: checking for $ac_word" >&5 | |
3051 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then | |
3052 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3053 | else | |
3054 | if test -n "$DLLTOOL"; then | |
3055 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3056 | else | |
3057 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3058 | ac_dummy="$PATH" | |
3059 | for ac_dir in $ac_dummy; do | |
3060 | test -z "$ac_dir" && ac_dir=. | |
3061 | if test -f $ac_dir/$ac_word; then | |
3062 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3063 | break | |
3064 | fi | |
3065 | done | |
3066 | IFS="$ac_save_ifs" | |
3067 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3068 | fi | |
3069 | fi | |
3070 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3071 | if test -n "$DLLTOOL"; then | |
3072 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3073 | else | |
3074 | echo "$ac_t""no" 1>&6 | |
3075 | fi | |
3076 | ||
3077 | ||
3078 | ||
3079 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3080 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3081 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3082 | echo "configure:3083: checking for $ac_word" >&5 | |
3083 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then | |
3084 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3085 | else | |
3086 | if test -n "$WINDRES"; then | |
3087 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3088 | else | |
3089 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3090 | ac_dummy="$PATH" | |
3091 | for ac_dir in $ac_dummy; do | |
3092 | test -z "$ac_dir" && ac_dir=. | |
3093 | if test -f $ac_dir/$ac_word; then | |
3094 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3095 | break | |
3096 | fi | |
3097 | done | |
3098 | IFS="$ac_save_ifs" | |
3099 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3100 | fi | |
3101 | fi | |
3102 | WINDRES="$ac_cv_prog_WINDRES" | |
3103 | if test -n "$WINDRES"; then | |
3104 | echo "$ac_t""$WINDRES" 1>&6 | |
3105 | else | |
3106 | echo "$ac_t""no" 1>&6 | |
3107 | fi | |
3108 | ||
3109 | ||
3110 | ||
c906108c SS |
3111 | for ac_prog in 'bison -y' byacc |
3112 | do | |
3113 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3114 | set dummy $ac_prog; ac_word=$2 | |
3115 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
95ca63c4 | 3116 | echo "configure:3117: checking for $ac_word" >&5 |
c906108c SS |
3117 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3119 | else | |
3120 | if test -n "$YACC"; then | |
3121 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3122 | else | |
3123 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3124 | ac_dummy="$PATH" | |
3125 | for ac_dir in $ac_dummy; do | |
3126 | test -z "$ac_dir" && ac_dir=. | |
3127 | if test -f $ac_dir/$ac_word; then | |
3128 | ac_cv_prog_YACC="$ac_prog" | |
3129 | break | |
3130 | fi | |
3131 | done | |
3132 | IFS="$ac_save_ifs" | |
3133 | fi | |
3134 | fi | |
3135 | YACC="$ac_cv_prog_YACC" | |
3136 | if test -n "$YACC"; then | |
3137 | echo "$ac_t""$YACC" 1>&6 | |
3138 | else | |
3139 | echo "$ac_t""no" 1>&6 | |
3140 | fi | |
3141 | ||
3142 | test -n "$YACC" && break | |
3143 | done | |
3144 | test -n "$YACC" || YACC="yacc" | |
3145 | ||
3146 | ||
75c6e08a MK |
3147 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3148 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3149 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
95ca63c4 | 3150 | echo "configure:3151: checking for $ac_word" >&5 |
75c6e08a MK |
3151 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3152 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3153 | else | |
3154 | if test -n "$MIG"; then | |
3155 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3156 | else | |
3157 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3158 | ac_dummy="$PATH" | |
3159 | for ac_dir in $ac_dummy; do | |
3160 | test -z "$ac_dir" && ac_dir=. | |
3161 | if test -f $ac_dir/$ac_word; then | |
3162 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3163 | break | |
3164 | fi | |
3165 | done | |
3166 | IFS="$ac_save_ifs" | |
3167 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3168 | fi | |
3169 | fi | |
3170 | MIG="$ac_cv_prog_MIG" | |
3171 | if test -n "$MIG"; then | |
3172 | echo "$ac_t""$MIG" 1>&6 | |
3173 | else | |
3174 | echo "$ac_t""no" 1>&6 | |
3175 | fi | |
3176 | ||
3177 | ||
3178 | ||
3179 | ||
c906108c SS |
3180 | if test "$program_transform_name" = s,x,x,; then |
3181 | program_transform_name= | |
3182 | else | |
3183 | # Double any \ or $. echo might interpret backslashes. | |
3184 | cat <<\EOF_SED > conftestsed | |
3185 | s,\\,\\\\,g; s,\$,$$,g | |
3186 | EOF_SED | |
3187 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3188 | rm -f conftestsed | |
3189 | fi | |
3190 | test "$program_prefix" != NONE && | |
3191 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3192 | # Use a double $ so make ignores it. | |
3193 | test "$program_suffix" != NONE && | |
3194 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3195 | ||
3196 | # sed with no file args requires a program. | |
3197 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3198 | ||
3199 | ||
3200 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
95ca63c4 | 3201 | echo "configure:3202: checking return type of signal handlers" >&5 |
c906108c SS |
3202 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3204 | else | |
3205 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3206 | #line 3207 "configure" |
c906108c SS |
3207 | #include "confdefs.h" |
3208 | #include <sys/types.h> | |
3209 | #include <signal.h> | |
3210 | #ifdef signal | |
3211 | #undef signal | |
3212 | #endif | |
3213 | #ifdef __cplusplus | |
3214 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3215 | #else | |
3216 | void (*signal ()) (); | |
3217 | #endif | |
3218 | ||
3219 | int main() { | |
3220 | int i; | |
3221 | ; return 0; } | |
3222 | EOF | |
95ca63c4 | 3223 | if { (eval echo configure:3224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3224 | rm -rf conftest* |
3225 | ac_cv_type_signal=void | |
3226 | else | |
3227 | echo "configure: failed program was:" >&5 | |
3228 | cat conftest.$ac_ext >&5 | |
3229 | rm -rf conftest* | |
3230 | ac_cv_type_signal=int | |
3231 | fi | |
3232 | rm -f conftest* | |
3233 | fi | |
3234 | ||
3235 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3236 | cat >> confdefs.h <<EOF | |
3237 | #define RETSIGTYPE $ac_cv_type_signal | |
3238 | EOF | |
3239 | ||
3240 | ||
3241 | ||
3242 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
95ca63c4 | 3243 | echo "configure:3244: checking for ANSI C header files" >&5 |
c906108c SS |
3244 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3245 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3246 | else | |
3247 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3248 | #line 3249 "configure" |
c906108c SS |
3249 | #include "confdefs.h" |
3250 | #include <stdlib.h> | |
3251 | #include <stdarg.h> | |
3252 | #include <string.h> | |
3253 | #include <float.h> | |
3254 | EOF | |
3255 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
95ca63c4 | 3256 | { (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3257 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3258 | if test -z "$ac_err"; then | |
3259 | rm -rf conftest* | |
3260 | ac_cv_header_stdc=yes | |
3261 | else | |
3262 | echo "$ac_err" >&5 | |
3263 | echo "configure: failed program was:" >&5 | |
3264 | cat conftest.$ac_ext >&5 | |
3265 | rm -rf conftest* | |
3266 | ac_cv_header_stdc=no | |
3267 | fi | |
3268 | rm -f conftest* | |
3269 | ||
3270 | if test $ac_cv_header_stdc = yes; then | |
3271 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3272 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3273 | #line 3274 "configure" |
c906108c SS |
3274 | #include "confdefs.h" |
3275 | #include <string.h> | |
3276 | EOF | |
3277 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3278 | egrep "memchr" >/dev/null 2>&1; then | |
3279 | : | |
3280 | else | |
3281 | rm -rf conftest* | |
3282 | ac_cv_header_stdc=no | |
3283 | fi | |
3284 | rm -f conftest* | |
3285 | ||
3286 | fi | |
3287 | ||
3288 | if test $ac_cv_header_stdc = yes; then | |
3289 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3290 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3291 | #line 3292 "configure" |
c906108c SS |
3292 | #include "confdefs.h" |
3293 | #include <stdlib.h> | |
3294 | EOF | |
3295 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3296 | egrep "free" >/dev/null 2>&1; then | |
3297 | : | |
3298 | else | |
3299 | rm -rf conftest* | |
3300 | ac_cv_header_stdc=no | |
3301 | fi | |
3302 | rm -f conftest* | |
3303 | ||
3304 | fi | |
3305 | ||
3306 | if test $ac_cv_header_stdc = yes; then | |
3307 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3308 | if test "$cross_compiling" = yes; then | |
3309 | : | |
3310 | else | |
3311 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3312 | #line 3313 "configure" |
c906108c SS |
3313 | #include "confdefs.h" |
3314 | #include <ctype.h> | |
3315 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3316 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3317 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3318 | int main () { int i; for (i = 0; i < 256; i++) | |
3319 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3320 | exit (0); } | |
3321 | ||
3322 | EOF | |
95ca63c4 | 3323 | if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3324 | then |
3325 | : | |
3326 | else | |
3327 | echo "configure: failed program was:" >&5 | |
3328 | cat conftest.$ac_ext >&5 | |
3329 | rm -fr conftest* | |
3330 | ac_cv_header_stdc=no | |
3331 | fi | |
3332 | rm -fr conftest* | |
3333 | fi | |
3334 | ||
3335 | fi | |
3336 | fi | |
3337 | ||
3338 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3339 | if test $ac_cv_header_stdc = yes; then | |
3340 | cat >> confdefs.h <<\EOF | |
3341 | #define STDC_HEADERS 1 | |
3342 | EOF | |
3343 | ||
3344 | fi | |
3345 | ||
3346 | ||
6abadcf8 ND |
3347 | |
3348 | case $host_os in solaris2.7) case "$GCC" in yes) | |
3349 | cat >> confdefs.h <<\EOF | |
3350 | #define _MSE_INT_H 1 | |
3351 | EOF | |
3352 | ||
3353 | esac; esac | |
3354 | ||
2894793a | 3355 | for ac_hdr in ctype.h endian.h link.h thread_db.h proc_service.h \ |
c906108c | 3356 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3357 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3358 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3359 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
4b14d3e4 | 3360 | time.h sys/ioctl.h sys/user.h \ |
2894793a AC |
3361 | dirent.h sys/ndir.h sys/dir.h ndir.h \ |
3362 | curses.h ncurses.h | |
c906108c SS |
3363 | do |
3364 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3365 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
95ca63c4 | 3366 | echo "configure:3367: checking for $ac_hdr" >&5 |
c906108c SS |
3367 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3368 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3369 | else | |
3370 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3371 | #line 3372 "configure" |
c906108c SS |
3372 | #include "confdefs.h" |
3373 | #include <$ac_hdr> | |
3374 | EOF | |
3375 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
95ca63c4 | 3376 | { (eval echo configure:3377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3377 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3378 | if test -z "$ac_err"; then | |
3379 | rm -rf conftest* | |
3380 | eval "ac_cv_header_$ac_safe=yes" | |
3381 | else | |
3382 | echo "$ac_err" >&5 | |
3383 | echo "configure: failed program was:" >&5 | |
3384 | cat conftest.$ac_ext >&5 | |
3385 | rm -rf conftest* | |
3386 | eval "ac_cv_header_$ac_safe=no" | |
3387 | fi | |
3388 | rm -f conftest* | |
3389 | fi | |
3390 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3391 | echo "$ac_t""yes" 1>&6 | |
3392 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3393 | cat >> confdefs.h <<EOF | |
3394 | #define $ac_tr_hdr 1 | |
3395 | EOF | |
3396 | ||
3397 | else | |
3398 | echo "$ac_t""no" 1>&6 | |
3399 | fi | |
3400 | done | |
3401 | ||
3402 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
95ca63c4 | 3403 | echo "configure:3404: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3404 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3405 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3406 | else | |
3407 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3408 | #line 3409 "configure" |
c906108c SS |
3409 | #include "confdefs.h" |
3410 | #include <sys/types.h> | |
3411 | #include <sys/stat.h> | |
3412 | ||
3413 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3414 | # if S_ISBLK (S_IFDIR) | |
3415 | You lose. | |
3416 | # endif | |
3417 | #endif | |
3418 | ||
3419 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3420 | # if S_ISBLK (S_IFCHR) | |
3421 | You lose. | |
3422 | # endif | |
3423 | #endif | |
3424 | ||
3425 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3426 | # if S_ISLNK (S_IFREG) | |
3427 | You lose. | |
3428 | # endif | |
3429 | #endif | |
3430 | ||
3431 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3432 | # if S_ISSOCK (S_IFREG) | |
3433 | You lose. | |
3434 | # endif | |
3435 | #endif | |
3436 | ||
3437 | EOF | |
3438 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3439 | egrep "You lose" >/dev/null 2>&1; then | |
3440 | rm -rf conftest* | |
3441 | ac_cv_header_stat_broken=yes | |
3442 | else | |
3443 | rm -rf conftest* | |
3444 | ac_cv_header_stat_broken=no | |
3445 | fi | |
3446 | rm -f conftest* | |
3447 | ||
3448 | fi | |
3449 | ||
3450 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3451 | if test $ac_cv_header_stat_broken = yes; then | |
3452 | cat >> confdefs.h <<\EOF | |
3453 | #define STAT_MACROS_BROKEN 1 | |
3454 | EOF | |
3455 | ||
3456 | fi | |
3457 | ||
3458 | ||
3459 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
95ca63c4 | 3460 | echo "configure:3461: checking for working const" >&5 |
c906108c SS |
3461 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3463 | else | |
3464 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3465 | #line 3466 "configure" |
c906108c SS |
3466 | #include "confdefs.h" |
3467 | ||
3468 | int main() { | |
3469 | ||
3470 | /* Ultrix mips cc rejects this. */ | |
3471 | typedef int charset[2]; const charset x; | |
3472 | /* SunOS 4.1.1 cc rejects this. */ | |
3473 | char const *const *ccp; | |
3474 | char **p; | |
3475 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3476 | struct point {int x, y;}; | |
3477 | static struct point const zero = {0,0}; | |
3478 | /* AIX XL C 1.02.0.0 rejects this. | |
3479 | It does not let you subtract one const X* pointer from another in an arm | |
3480 | of an if-expression whose if-part is not a constant expression */ | |
3481 | const char *g = "string"; | |
3482 | ccp = &g + (g ? g-g : 0); | |
3483 | /* HPUX 7.0 cc rejects these. */ | |
3484 | ++ccp; | |
3485 | p = (char**) ccp; | |
3486 | ccp = (char const *const *) p; | |
3487 | { /* SCO 3.2v4 cc rejects this. */ | |
3488 | char *t; | |
3489 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3490 | ||
3491 | *t++ = 0; | |
3492 | } | |
3493 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3494 | int x[] = {25, 17}; | |
3495 | const int *foo = &x[0]; | |
3496 | ++foo; | |
3497 | } | |
3498 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3499 | typedef const int *iptr; | |
3500 | iptr p = 0; | |
3501 | ++p; | |
3502 | } | |
3503 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3504 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3505 | struct s { int j; const int *ap[3]; }; | |
3506 | struct s *b; b->j = 5; | |
3507 | } | |
3508 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3509 | const int foo = 10; | |
3510 | } | |
3511 | ||
3512 | ; return 0; } | |
3513 | EOF | |
95ca63c4 | 3514 | if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3515 | rm -rf conftest* |
3516 | ac_cv_c_const=yes | |
3517 | else | |
3518 | echo "configure: failed program was:" >&5 | |
3519 | cat conftest.$ac_ext >&5 | |
3520 | rm -rf conftest* | |
3521 | ac_cv_c_const=no | |
3522 | fi | |
3523 | rm -f conftest* | |
3524 | fi | |
3525 | ||
3526 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3527 | if test $ac_cv_c_const = no; then | |
3528 | cat >> confdefs.h <<\EOF | |
3529 | #define const | |
3530 | EOF | |
3531 | ||
3532 | fi | |
3533 | ||
3534 | ||
2acceee2 | 3535 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask |
c906108c SS |
3536 | do |
3537 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
95ca63c4 | 3538 | echo "configure:3539: checking for $ac_func" >&5 |
c906108c SS |
3539 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3540 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3541 | else | |
3542 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3543 | #line 3544 "configure" |
c906108c SS |
3544 | #include "confdefs.h" |
3545 | /* System header to define __stub macros and hopefully few prototypes, | |
3546 | which can conflict with char $ac_func(); below. */ | |
3547 | #include <assert.h> | |
3548 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3549 | /* We use char because int might match the return type of a gcc2 | |
3550 | builtin and then its argument prototype would still apply. */ | |
3551 | char $ac_func(); | |
3552 | ||
3553 | int main() { | |
3554 | ||
3555 | /* The GNU C library defines this for functions which it implements | |
3556 | to always fail with ENOSYS. Some functions are actually named | |
3557 | something starting with __ and the normal name is an alias. */ | |
3558 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3559 | choke me | |
3560 | #else | |
3561 | $ac_func(); | |
3562 | #endif | |
3563 | ||
3564 | ; return 0; } | |
3565 | EOF | |
95ca63c4 | 3566 | if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3567 | rm -rf conftest* |
3568 | eval "ac_cv_func_$ac_func=yes" | |
3569 | else | |
3570 | echo "configure: failed program was:" >&5 | |
3571 | cat conftest.$ac_ext >&5 | |
3572 | rm -rf conftest* | |
3573 | eval "ac_cv_func_$ac_func=no" | |
3574 | fi | |
3575 | rm -f conftest* | |
3576 | fi | |
3577 | ||
3578 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3579 | echo "$ac_t""yes" 1>&6 | |
3580 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3581 | cat >> confdefs.h <<EOF | |
3582 | #define $ac_tr_func 1 | |
3583 | EOF | |
3584 | ||
3585 | else | |
3586 | echo "$ac_t""no" 1>&6 | |
3587 | fi | |
3588 | done | |
3589 | ||
3590 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3591 | # for constant arguments. Useless! | |
3592 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
95ca63c4 | 3593 | echo "configure:3594: checking for working alloca.h" >&5 |
c906108c SS |
3594 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3595 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3596 | else | |
3597 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3598 | #line 3599 "configure" |
c906108c SS |
3599 | #include "confdefs.h" |
3600 | #include <alloca.h> | |
3601 | int main() { | |
3602 | char *p = alloca(2 * sizeof(int)); | |
3603 | ; return 0; } | |
3604 | EOF | |
95ca63c4 | 3605 | if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3606 | rm -rf conftest* |
3607 | ac_cv_header_alloca_h=yes | |
3608 | else | |
3609 | echo "configure: failed program was:" >&5 | |
3610 | cat conftest.$ac_ext >&5 | |
3611 | rm -rf conftest* | |
3612 | ac_cv_header_alloca_h=no | |
3613 | fi | |
3614 | rm -f conftest* | |
3615 | fi | |
3616 | ||
3617 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3618 | if test $ac_cv_header_alloca_h = yes; then | |
3619 | cat >> confdefs.h <<\EOF | |
3620 | #define HAVE_ALLOCA_H 1 | |
3621 | EOF | |
3622 | ||
3623 | fi | |
3624 | ||
3625 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
95ca63c4 | 3626 | echo "configure:3627: checking for alloca" >&5 |
c906108c SS |
3627 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3628 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3629 | else | |
3630 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3631 | #line 3632 "configure" |
c906108c SS |
3632 | #include "confdefs.h" |
3633 | ||
3634 | #ifdef __GNUC__ | |
3635 | # define alloca __builtin_alloca | |
3636 | #else | |
3637 | # ifdef _MSC_VER | |
3638 | # include <malloc.h> | |
3639 | # define alloca _alloca | |
3640 | # else | |
3641 | # if HAVE_ALLOCA_H | |
3642 | # include <alloca.h> | |
3643 | # else | |
3644 | # ifdef _AIX | |
3645 | #pragma alloca | |
3646 | # else | |
3647 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3648 | char *alloca (); | |
3649 | # endif | |
3650 | # endif | |
3651 | # endif | |
3652 | # endif | |
3653 | #endif | |
3654 | ||
3655 | int main() { | |
3656 | char *p = (char *) alloca(1); | |
3657 | ; return 0; } | |
3658 | EOF | |
95ca63c4 | 3659 | if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3660 | rm -rf conftest* |
3661 | ac_cv_func_alloca_works=yes | |
3662 | else | |
3663 | echo "configure: failed program was:" >&5 | |
3664 | cat conftest.$ac_ext >&5 | |
3665 | rm -rf conftest* | |
3666 | ac_cv_func_alloca_works=no | |
3667 | fi | |
3668 | rm -f conftest* | |
3669 | fi | |
3670 | ||
3671 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3672 | if test $ac_cv_func_alloca_works = yes; then | |
3673 | cat >> confdefs.h <<\EOF | |
3674 | #define HAVE_ALLOCA 1 | |
3675 | EOF | |
3676 | ||
3677 | fi | |
3678 | ||
3679 | if test $ac_cv_func_alloca_works = no; then | |
3680 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3681 | # that cause trouble. Some versions do not even contain alloca or | |
3682 | # contain a buggy version. If you still want to use their alloca, | |
3683 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3684 | ALLOCA=alloca.${ac_objext} | |
3685 | cat >> confdefs.h <<\EOF | |
3686 | #define C_ALLOCA 1 | |
3687 | EOF | |
3688 | ||
3689 | ||
3690 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
95ca63c4 | 3691 | echo "configure:3692: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
3692 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3694 | else | |
3695 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3696 | #line 3697 "configure" |
c906108c SS |
3697 | #include "confdefs.h" |
3698 | #if defined(CRAY) && ! defined(CRAY2) | |
3699 | webecray | |
3700 | #else | |
3701 | wenotbecray | |
3702 | #endif | |
3703 | ||
3704 | EOF | |
3705 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3706 | egrep "webecray" >/dev/null 2>&1; then | |
3707 | rm -rf conftest* | |
3708 | ac_cv_os_cray=yes | |
3709 | else | |
3710 | rm -rf conftest* | |
3711 | ac_cv_os_cray=no | |
3712 | fi | |
3713 | rm -f conftest* | |
3714 | ||
3715 | fi | |
3716 | ||
3717 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3718 | if test $ac_cv_os_cray = yes; then | |
3719 | for ac_func in _getb67 GETB67 getb67; do | |
3720 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
95ca63c4 | 3721 | echo "configure:3722: checking for $ac_func" >&5 |
c906108c SS |
3722 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3723 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3724 | else | |
3725 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3726 | #line 3727 "configure" |
c906108c SS |
3727 | #include "confdefs.h" |
3728 | /* System header to define __stub macros and hopefully few prototypes, | |
3729 | which can conflict with char $ac_func(); below. */ | |
3730 | #include <assert.h> | |
3731 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3732 | /* We use char because int might match the return type of a gcc2 | |
3733 | builtin and then its argument prototype would still apply. */ | |
3734 | char $ac_func(); | |
3735 | ||
3736 | int main() { | |
3737 | ||
3738 | /* The GNU C library defines this for functions which it implements | |
3739 | to always fail with ENOSYS. Some functions are actually named | |
3740 | something starting with __ and the normal name is an alias. */ | |
3741 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3742 | choke me | |
3743 | #else | |
3744 | $ac_func(); | |
3745 | #endif | |
3746 | ||
3747 | ; return 0; } | |
3748 | EOF | |
95ca63c4 | 3749 | if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3750 | rm -rf conftest* |
3751 | eval "ac_cv_func_$ac_func=yes" | |
3752 | else | |
3753 | echo "configure: failed program was:" >&5 | |
3754 | cat conftest.$ac_ext >&5 | |
3755 | rm -rf conftest* | |
3756 | eval "ac_cv_func_$ac_func=no" | |
3757 | fi | |
3758 | rm -f conftest* | |
3759 | fi | |
3760 | ||
3761 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3762 | echo "$ac_t""yes" 1>&6 | |
3763 | cat >> confdefs.h <<EOF | |
3764 | #define CRAY_STACKSEG_END $ac_func | |
3765 | EOF | |
3766 | ||
3767 | break | |
3768 | else | |
3769 | echo "$ac_t""no" 1>&6 | |
3770 | fi | |
3771 | ||
3772 | done | |
3773 | fi | |
3774 | ||
3775 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
95ca63c4 | 3776 | echo "configure:3777: checking stack direction for C alloca" >&5 |
c906108c SS |
3777 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3778 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3779 | else | |
3780 | if test "$cross_compiling" = yes; then | |
3781 | ac_cv_c_stack_direction=0 | |
3782 | else | |
3783 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3784 | #line 3785 "configure" |
c906108c SS |
3785 | #include "confdefs.h" |
3786 | find_stack_direction () | |
3787 | { | |
3788 | static char *addr = 0; | |
3789 | auto char dummy; | |
3790 | if (addr == 0) | |
3791 | { | |
3792 | addr = &dummy; | |
3793 | return find_stack_direction (); | |
3794 | } | |
3795 | else | |
3796 | return (&dummy > addr) ? 1 : -1; | |
3797 | } | |
3798 | main () | |
3799 | { | |
3800 | exit (find_stack_direction() < 0); | |
3801 | } | |
3802 | EOF | |
95ca63c4 | 3803 | if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3804 | then |
3805 | ac_cv_c_stack_direction=1 | |
3806 | else | |
3807 | echo "configure: failed program was:" >&5 | |
3808 | cat conftest.$ac_ext >&5 | |
3809 | rm -fr conftest* | |
3810 | ac_cv_c_stack_direction=-1 | |
3811 | fi | |
3812 | rm -fr conftest* | |
3813 | fi | |
3814 | ||
3815 | fi | |
3816 | ||
3817 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3818 | cat >> confdefs.h <<EOF | |
3819 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3820 | EOF | |
3821 | ||
3822 | fi | |
3823 | ||
3824 | ||
7dfa765c MK |
3825 | # See if machine/reg.h supports the %fs and %gs i386 segment registers. |
3826 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
3827 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
95ca63c4 | 3828 | echo "configure:3829: checking for r_fs in struct reg" >&5 |
7dfa765c MK |
3829 | if eval "test \"`echo '$''{'gdb_cv_struct_r_fs'+set}'`\" = set"; then |
3830 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3831 | else | |
3832 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3833 | #line 3834 "configure" |
7dfa765c MK |
3834 | #include "confdefs.h" |
3835 | #include <machine/reg.h> | |
3836 | int main() { | |
3837 | struct reg r; r.r_fs; | |
3838 | ; return 0; } | |
3839 | EOF | |
95ca63c4 | 3840 | if { (eval echo configure:3841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c MK |
3841 | rm -rf conftest* |
3842 | gdb_cv_struct_r_fs=yes | |
3843 | else | |
3844 | echo "configure: failed program was:" >&5 | |
3845 | cat conftest.$ac_ext >&5 | |
3846 | rm -rf conftest* | |
3847 | gdb_cv_struct_r_fs=no | |
3848 | fi | |
3849 | rm -f conftest* | |
3850 | fi | |
3851 | ||
3852 | echo "$ac_t""$gdb_cv_struct_r_fs" 1>&6 | |
3853 | if test $gdb_cv_struct_r_fs = yes; then | |
3854 | cat >> confdefs.h <<\EOF | |
3855 | #define HAVE_R_FS 1 | |
3856 | EOF | |
3857 | ||
3858 | fi | |
3859 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
95ca63c4 | 3860 | echo "configure:3861: checking for r_gs in struct reg" >&5 |
7dfa765c MK |
3861 | if eval "test \"`echo '$''{'gdb_cv_struct_r_gs'+set}'`\" = set"; then |
3862 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3863 | else | |
3864 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3865 | #line 3866 "configure" |
7dfa765c MK |
3866 | #include "confdefs.h" |
3867 | #include <machine/reg.h> | |
3868 | int main() { | |
3869 | struct reg r; r.r_gs; | |
3870 | ; return 0; } | |
3871 | EOF | |
95ca63c4 | 3872 | if { (eval echo configure:3873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c MK |
3873 | rm -rf conftest* |
3874 | gdb_cv_struct_r_gs=yes | |
3875 | else | |
3876 | echo "configure: failed program was:" >&5 | |
3877 | cat conftest.$ac_ext >&5 | |
3878 | rm -rf conftest* | |
3879 | gdb_cv_struct_r_gs=no | |
3880 | fi | |
3881 | rm -f conftest* | |
3882 | fi | |
3883 | ||
3884 | echo "$ac_t""$gdb_cv_struct_r_gs" 1>&6 | |
3885 | if test $gdb_cv_struct_r_gs = yes; then | |
3886 | cat >> confdefs.h <<\EOF | |
3887 | #define HAVE_R_GS 1 | |
3888 | EOF | |
3889 | ||
3890 | fi | |
3891 | ||
64bb1671 | 3892 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 |
95ca63c4 | 3893 | echo "configure:3894: checking for PTRACE_GETREGS" >&5 |
64bb1671 MK |
3894 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
3895 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3896 | else | |
3897 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3898 | #line 3899 "configure" |
64bb1671 MK |
3899 | #include "confdefs.h" |
3900 | #include <sys/ptrace.h> | |
3901 | int main() { | |
3902 | PTRACE_GETREGS; | |
3903 | ; return 0; } | |
3904 | EOF | |
95ca63c4 | 3905 | if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
64bb1671 MK |
3906 | rm -rf conftest* |
3907 | gdb_cv_have_ptrace_getregs=yes | |
3908 | else | |
3909 | echo "configure: failed program was:" >&5 | |
3910 | cat conftest.$ac_ext >&5 | |
3911 | rm -rf conftest* | |
3912 | gdb_cv_have_ptrace_getregs=no | |
3913 | fi | |
3914 | rm -f conftest* | |
3915 | fi | |
3916 | ||
4397a6ab | 3917 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
64bb1671 MK |
3918 | if test $gdb_cv_have_ptrace_getregs = yes; then |
3919 | cat >> confdefs.h <<\EOF | |
3920 | #define HAVE_PTRACE_GETREGS 1 | |
3921 | EOF | |
3922 | ||
3923 | fi | |
3924 | ||
5c44784c | 3925 | echo $ac_n "checking for PTRACE_GETXFPREGS""... $ac_c" 1>&6 |
95ca63c4 | 3926 | echo "configure:3927: checking for PTRACE_GETXFPREGS" >&5 |
5c44784c JM |
3927 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getxfpregs'+set}'`\" = set"; then |
3928 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3929 | else | |
3930 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3931 | #line 3932 "configure" |
5c44784c JM |
3932 | #include "confdefs.h" |
3933 | #include <sys/ptrace.h> | |
3934 | int main() { | |
3935 | PTRACE_GETXFPREGS; | |
3936 | ; return 0; } | |
3937 | EOF | |
95ca63c4 | 3938 | if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c JM |
3939 | rm -rf conftest* |
3940 | gdb_cv_have_ptrace_getxfpregs=yes | |
3941 | else | |
3942 | echo "configure: failed program was:" >&5 | |
3943 | cat conftest.$ac_ext >&5 | |
3944 | rm -rf conftest* | |
3945 | gdb_cv_have_ptrace_getxfpregs=no | |
3946 | fi | |
3947 | rm -f conftest* | |
3948 | fi | |
3949 | ||
3950 | echo "$ac_t""$gdb_cv_have_ptrace_getxfpregs" 1>&6 | |
3951 | if test $gdb_cv_have_ptrace_getxfpregs = yes; then | |
3952 | cat >> confdefs.h <<\EOF | |
3953 | #define HAVE_PTRACE_GETXFPREGS 1 | |
3954 | EOF | |
3955 | ||
3956 | fi | |
3957 | ||
7be570e7 | 3958 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
95ca63c4 | 3959 | echo "configure:3960: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
3960 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
3961 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3962 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3963 | else | |
3964 | ac_save_LIBS="$LIBS" | |
3965 | LIBS="-lsocket $LIBS" | |
3966 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 3967 | #line 3968 "configure" |
7be570e7 JM |
3968 | #include "confdefs.h" |
3969 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3970 | /* We use char because int might match the return type of a gcc2 | |
3971 | builtin and then its argument prototype would still apply. */ | |
3972 | char socketpair(); | |
3973 | ||
3974 | int main() { | |
3975 | socketpair() | |
3976 | ; return 0; } | |
3977 | EOF | |
95ca63c4 | 3978 | if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
3979 | rm -rf conftest* |
3980 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3981 | else | |
3982 | echo "configure: failed program was:" >&5 | |
3983 | cat conftest.$ac_ext >&5 | |
3984 | rm -rf conftest* | |
3985 | eval "ac_cv_lib_$ac_lib_var=no" | |
3986 | fi | |
3987 | rm -f conftest* | |
3988 | LIBS="$ac_save_LIBS" | |
3989 | ||
3990 | fi | |
3991 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3992 | echo "$ac_t""yes" 1>&6 | |
3993 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3994 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3995 | cat >> confdefs.h <<EOF | |
3996 | #define $ac_tr_lib 1 | |
3997 | EOF | |
3998 | ||
3999 | LIBS="-lsocket $LIBS" | |
4000 | ||
4001 | else | |
4002 | echo "$ac_t""no" 1>&6 | |
4003 | fi | |
4004 | ||
4005 | for ac_func in socketpair | |
4006 | do | |
4007 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
95ca63c4 | 4008 | echo "configure:4009: checking for $ac_func" >&5 |
7be570e7 JM |
4009 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4010 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4011 | else | |
4012 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4013 | #line 4014 "configure" |
7be570e7 JM |
4014 | #include "confdefs.h" |
4015 | /* System header to define __stub macros and hopefully few prototypes, | |
4016 | which can conflict with char $ac_func(); below. */ | |
4017 | #include <assert.h> | |
4018 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4019 | /* We use char because int might match the return type of a gcc2 | |
4020 | builtin and then its argument prototype would still apply. */ | |
4021 | char $ac_func(); | |
4022 | ||
4023 | int main() { | |
4024 | ||
4025 | /* The GNU C library defines this for functions which it implements | |
4026 | to always fail with ENOSYS. Some functions are actually named | |
4027 | something starting with __ and the normal name is an alias. */ | |
4028 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4029 | choke me | |
4030 | #else | |
4031 | $ac_func(); | |
4032 | #endif | |
4033 | ||
4034 | ; return 0; } | |
4035 | EOF | |
95ca63c4 | 4036 | if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4037 | rm -rf conftest* |
4038 | eval "ac_cv_func_$ac_func=yes" | |
4039 | else | |
4040 | echo "configure: failed program was:" >&5 | |
4041 | cat conftest.$ac_ext >&5 | |
4042 | rm -rf conftest* | |
4043 | eval "ac_cv_func_$ac_func=no" | |
4044 | fi | |
4045 | rm -f conftest* | |
4046 | fi | |
4047 | ||
4048 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4049 | echo "$ac_t""yes" 1>&6 | |
4050 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4051 | cat >> confdefs.h <<EOF | |
4052 | #define $ac_tr_func 1 | |
4053 | EOF | |
4054 | ||
4055 | else | |
4056 | echo "$ac_t""no" 1>&6 | |
4057 | fi | |
4058 | done | |
4059 | ||
4060 | ||
4061 | ||
c906108c | 4062 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
95ca63c4 | 4063 | echo "configure:4064: checking whether malloc must be declared" >&5 |
c906108c SS |
4064 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4065 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4066 | else | |
4067 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4068 | #line 4069 "configure" |
c906108c SS |
4069 | #include "confdefs.h" |
4070 | ||
4071 | #include <stdio.h> | |
4072 | #ifdef HAVE_STRING_H | |
4073 | #include <string.h> | |
4074 | #else | |
4075 | #ifdef HAVE_STRINGS_H | |
4076 | #include <strings.h> | |
4077 | #endif | |
4078 | #endif | |
4079 | #ifdef HAVE_STDLIB_H | |
4080 | #include <stdlib.h> | |
4081 | #endif | |
4082 | #ifdef HAVE_UNISTD_H | |
4083 | #include <unistd.h> | |
4084 | #endif | |
4085 | int main() { | |
4086 | char *(*pfn) = (char *(*)) malloc | |
4087 | ; return 0; } | |
4088 | EOF | |
95ca63c4 | 4089 | if { (eval echo configure:4090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4090 | rm -rf conftest* |
4091 | bfd_cv_decl_needed_malloc=no | |
4092 | else | |
4093 | echo "configure: failed program was:" >&5 | |
4094 | cat conftest.$ac_ext >&5 | |
4095 | rm -rf conftest* | |
4096 | bfd_cv_decl_needed_malloc=yes | |
4097 | fi | |
4098 | rm -f conftest* | |
4099 | fi | |
4100 | ||
4101 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4102 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4103 | cat >> confdefs.h <<\EOF | |
4104 | #define NEED_DECLARATION_MALLOC 1 | |
4105 | EOF | |
4106 | ||
4107 | fi | |
4108 | ||
4109 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
95ca63c4 | 4110 | echo "configure:4111: checking whether realloc must be declared" >&5 |
c906108c SS |
4111 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4112 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4113 | else | |
4114 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4115 | #line 4116 "configure" |
c906108c SS |
4116 | #include "confdefs.h" |
4117 | ||
4118 | #include <stdio.h> | |
4119 | #ifdef HAVE_STRING_H | |
4120 | #include <string.h> | |
4121 | #else | |
4122 | #ifdef HAVE_STRINGS_H | |
4123 | #include <strings.h> | |
4124 | #endif | |
4125 | #endif | |
4126 | #ifdef HAVE_STDLIB_H | |
4127 | #include <stdlib.h> | |
4128 | #endif | |
4129 | #ifdef HAVE_UNISTD_H | |
4130 | #include <unistd.h> | |
4131 | #endif | |
4132 | int main() { | |
4133 | char *(*pfn) = (char *(*)) realloc | |
4134 | ; return 0; } | |
4135 | EOF | |
95ca63c4 | 4136 | if { (eval echo configure:4137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4137 | rm -rf conftest* |
4138 | bfd_cv_decl_needed_realloc=no | |
4139 | else | |
4140 | echo "configure: failed program was:" >&5 | |
4141 | cat conftest.$ac_ext >&5 | |
4142 | rm -rf conftest* | |
4143 | bfd_cv_decl_needed_realloc=yes | |
4144 | fi | |
4145 | rm -f conftest* | |
4146 | fi | |
4147 | ||
4148 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4149 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4150 | cat >> confdefs.h <<\EOF | |
4151 | #define NEED_DECLARATION_REALLOC 1 | |
4152 | EOF | |
4153 | ||
4154 | fi | |
4155 | ||
4156 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
95ca63c4 | 4157 | echo "configure:4158: checking whether free must be declared" >&5 |
c906108c SS |
4158 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4159 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4160 | else | |
4161 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4162 | #line 4163 "configure" |
c906108c SS |
4163 | #include "confdefs.h" |
4164 | ||
4165 | #include <stdio.h> | |
4166 | #ifdef HAVE_STRING_H | |
4167 | #include <string.h> | |
4168 | #else | |
4169 | #ifdef HAVE_STRINGS_H | |
4170 | #include <strings.h> | |
4171 | #endif | |
4172 | #endif | |
4173 | #ifdef HAVE_STDLIB_H | |
4174 | #include <stdlib.h> | |
4175 | #endif | |
4176 | #ifdef HAVE_UNISTD_H | |
4177 | #include <unistd.h> | |
4178 | #endif | |
4179 | int main() { | |
4180 | char *(*pfn) = (char *(*)) free | |
4181 | ; return 0; } | |
4182 | EOF | |
95ca63c4 | 4183 | if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4184 | rm -rf conftest* |
4185 | bfd_cv_decl_needed_free=no | |
4186 | else | |
4187 | echo "configure: failed program was:" >&5 | |
4188 | cat conftest.$ac_ext >&5 | |
4189 | rm -rf conftest* | |
4190 | bfd_cv_decl_needed_free=yes | |
4191 | fi | |
4192 | rm -f conftest* | |
4193 | fi | |
4194 | ||
4195 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4196 | if test $bfd_cv_decl_needed_free = yes; then | |
4197 | cat >> confdefs.h <<\EOF | |
4198 | #define NEED_DECLARATION_FREE 1 | |
4199 | EOF | |
4200 | ||
4201 | fi | |
4202 | ||
4203 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
95ca63c4 | 4204 | echo "configure:4205: checking whether strerror must be declared" >&5 |
c906108c SS |
4205 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4206 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4207 | else | |
4208 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4209 | #line 4210 "configure" |
c906108c SS |
4210 | #include "confdefs.h" |
4211 | ||
4212 | #include <stdio.h> | |
4213 | #ifdef HAVE_STRING_H | |
4214 | #include <string.h> | |
4215 | #else | |
4216 | #ifdef HAVE_STRINGS_H | |
4217 | #include <strings.h> | |
4218 | #endif | |
4219 | #endif | |
4220 | #ifdef HAVE_STDLIB_H | |
4221 | #include <stdlib.h> | |
4222 | #endif | |
4223 | #ifdef HAVE_UNISTD_H | |
4224 | #include <unistd.h> | |
4225 | #endif | |
4226 | int main() { | |
4227 | char *(*pfn) = (char *(*)) strerror | |
4228 | ; return 0; } | |
4229 | EOF | |
95ca63c4 | 4230 | if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4231 | rm -rf conftest* |
4232 | bfd_cv_decl_needed_strerror=no | |
4233 | else | |
4234 | echo "configure: failed program was:" >&5 | |
4235 | cat conftest.$ac_ext >&5 | |
4236 | rm -rf conftest* | |
4237 | bfd_cv_decl_needed_strerror=yes | |
4238 | fi | |
4239 | rm -f conftest* | |
4240 | fi | |
4241 | ||
4242 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4243 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4244 | cat >> confdefs.h <<\EOF | |
4245 | #define NEED_DECLARATION_STRERROR 1 | |
4246 | EOF | |
4247 | ||
4248 | fi | |
4249 | ||
4250 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
95ca63c4 | 4251 | echo "configure:4252: checking whether strdup must be declared" >&5 |
c906108c SS |
4252 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4253 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4254 | else | |
4255 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4256 | #line 4257 "configure" |
c906108c SS |
4257 | #include "confdefs.h" |
4258 | ||
4259 | #include <stdio.h> | |
4260 | #ifdef HAVE_STRING_H | |
4261 | #include <string.h> | |
4262 | #else | |
4263 | #ifdef HAVE_STRINGS_H | |
4264 | #include <strings.h> | |
4265 | #endif | |
4266 | #endif | |
4267 | #ifdef HAVE_STDLIB_H | |
4268 | #include <stdlib.h> | |
4269 | #endif | |
4270 | #ifdef HAVE_UNISTD_H | |
4271 | #include <unistd.h> | |
4272 | #endif | |
4273 | int main() { | |
4274 | char *(*pfn) = (char *(*)) strdup | |
4275 | ; return 0; } | |
4276 | EOF | |
95ca63c4 | 4277 | if { (eval echo configure:4278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4278 | rm -rf conftest* |
4279 | bfd_cv_decl_needed_strdup=no | |
4280 | else | |
4281 | echo "configure: failed program was:" >&5 | |
4282 | cat conftest.$ac_ext >&5 | |
4283 | rm -rf conftest* | |
4284 | bfd_cv_decl_needed_strdup=yes | |
4285 | fi | |
4286 | rm -f conftest* | |
4287 | fi | |
4288 | ||
4289 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4290 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4291 | cat >> confdefs.h <<\EOF | |
4292 | #define NEED_DECLARATION_STRDUP 1 | |
4293 | EOF | |
4294 | ||
4295 | fi | |
4296 | ||
b83266a0 | 4297 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
95ca63c4 | 4298 | echo "configure:4299: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4299 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4300 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4301 | else | |
4302 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4303 | #line 4304 "configure" |
b83266a0 SS |
4304 | #include "confdefs.h" |
4305 | ||
4306 | #include <stdio.h> | |
4307 | #ifdef HAVE_STRING_H | |
4308 | #include <string.h> | |
4309 | #else | |
4310 | #ifdef HAVE_STRINGS_H | |
4311 | #include <strings.h> | |
4312 | #endif | |
4313 | #endif | |
4314 | #ifdef HAVE_STDLIB_H | |
4315 | #include <stdlib.h> | |
4316 | #endif | |
4317 | #ifdef HAVE_UNISTD_H | |
4318 | #include <unistd.h> | |
4319 | #endif | |
4320 | int main() { | |
4321 | char *(*pfn) = (char *(*)) strstr | |
4322 | ; return 0; } | |
4323 | EOF | |
95ca63c4 | 4324 | if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4325 | rm -rf conftest* |
4326 | bfd_cv_decl_needed_strstr=no | |
4327 | else | |
4328 | echo "configure: failed program was:" >&5 | |
4329 | cat conftest.$ac_ext >&5 | |
4330 | rm -rf conftest* | |
4331 | bfd_cv_decl_needed_strstr=yes | |
4332 | fi | |
4333 | rm -f conftest* | |
4334 | fi | |
4335 | ||
4336 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4337 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4338 | cat >> confdefs.h <<\EOF | |
4339 | #define NEED_DECLARATION_STRSTR 1 | |
4340 | EOF | |
4341 | ||
4342 | fi | |
4343 | ||
c906108c SS |
4344 | |
4345 | ||
4346 | # The following save_state_t checkery is only necessary for HPUX | |
4347 | # versions earlier than 10.20. When those fade from memory, this | |
4348 | # could be expunged. --jsm 1999-03-22 | |
4349 | ||
4350 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
95ca63c4 | 4351 | echo "configure:4352: checking for HPUX save_state structure" >&5 |
c906108c | 4352 | cat > conftest.$ac_ext <<EOF |
95ca63c4 | 4353 | #line 4354 "configure" |
c906108c SS |
4354 | #include "confdefs.h" |
4355 | #include <machine/save_state.h> | |
4356 | EOF | |
4357 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4358 | egrep "save_state_t" >/dev/null 2>&1; then | |
4359 | rm -rf conftest* | |
4360 | gdb_cv_hpux_savestate=yes | |
4361 | else | |
4362 | rm -rf conftest* | |
4363 | gdb_cv_hpux_savestate=no | |
4364 | fi | |
4365 | rm -f conftest* | |
4366 | ||
4367 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4368 | #line 4369 "configure" |
c906108c SS |
4369 | #include "confdefs.h" |
4370 | #include <machine/save_state.h> | |
4371 | EOF | |
4372 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4373 | egrep "ss_wide" >/dev/null 2>&1; then | |
4374 | rm -rf conftest* | |
4375 | gdb_cv_hpux_sswide=yes | |
4376 | else | |
4377 | rm -rf conftest* | |
4378 | gdb_cv_hpux_sswide=no | |
4379 | fi | |
4380 | rm -f conftest* | |
4381 | ||
4382 | if test $gdb_cv_hpux_savestate = yes | |
4383 | then | |
4384 | cat >> confdefs.h <<\EOF | |
4385 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4386 | EOF | |
4387 | ||
4388 | fi | |
4389 | if test $gdb_cv_hpux_sswide = yes | |
4390 | then | |
4391 | cat >> confdefs.h <<\EOF | |
4392 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4393 | EOF | |
4394 | ||
4395 | fi | |
4396 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4397 | ||
4398 | ||
4399 | # If we are configured native on GNU/Linux, work around problems with | |
4400 | # sys/procfs.h | |
c3f6f71d | 4401 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4402 | |
4403 | if test "${target}" = "${host}"; then | |
4404 | case "${host}" in | |
4405 | i[3456]86-*-linux*) | |
4406 | cat >> confdefs.h <<\EOF | |
4407 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4408 | EOF | |
4409 | ||
4410 | cat >> confdefs.h <<\EOF | |
4411 | #define sys_quotactl 1 | |
4412 | EOF | |
4413 | ||
4414 | ;; | |
c5394b80 | 4415 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4416 | cat >> confdefs.h <<\EOF |
4417 | #define NEW_PROC_API 1 | |
c906108c SS |
4418 | EOF |
4419 | ||
c3f6f71d | 4420 | ;; |
3423db82 | 4421 | *-*-solaris2.[678]) |
c3f6f71d JM |
4422 | cat >> confdefs.h <<\EOF |
4423 | #define NEW_PROC_API 1 | |
4424 | EOF | |
4425 | ||
4426 | ;; | |
4427 | esac | |
c906108c SS |
4428 | fi |
4429 | ||
4430 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4431 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
95ca63c4 | 4432 | echo "configure:4433: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4433 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4434 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4435 | else | |
4436 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4437 | #line 4438 "configure" |
c906108c SS |
4438 | #include "confdefs.h" |
4439 | #include <sys/procfs.h> | |
4440 | int main() { | |
4441 | pstatus_t avar | |
4442 | ; return 0; } | |
4443 | EOF | |
95ca63c4 | 4444 | if { (eval echo configure:4445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4445 | rm -rf conftest* |
4446 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
4447 | else | |
4448 | echo "configure: failed program was:" >&5 | |
4449 | cat conftest.$ac_ext >&5 | |
4450 | rm -rf conftest* | |
4451 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
4452 | ||
4453 | fi | |
4454 | rm -f conftest* | |
4455 | fi | |
4456 | ||
4457 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
4458 | cat >> confdefs.h <<\EOF | |
4459 | #define HAVE_PSTATUS_T 1 | |
4460 | EOF | |
4461 | ||
4462 | fi | |
4463 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
4464 | ||
4465 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
95ca63c4 | 4466 | echo "configure:4467: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
4467 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
4468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4469 | else | |
4470 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4471 | #line 4472 "configure" |
c906108c SS |
4472 | #include "confdefs.h" |
4473 | #include <sys/procfs.h> | |
4474 | int main() { | |
4475 | prrun_t avar | |
4476 | ; return 0; } | |
4477 | EOF | |
95ca63c4 | 4478 | if { (eval echo configure:4479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4479 | rm -rf conftest* |
4480 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
4481 | else | |
4482 | echo "configure: failed program was:" >&5 | |
4483 | cat conftest.$ac_ext >&5 | |
4484 | rm -rf conftest* | |
4485 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
4486 | ||
4487 | fi | |
4488 | rm -f conftest* | |
4489 | fi | |
4490 | ||
4491 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
4492 | cat >> confdefs.h <<\EOF | |
4493 | #define HAVE_PRRUN_T 1 | |
4494 | EOF | |
4495 | ||
4496 | fi | |
4497 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
4498 | ||
4499 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
95ca63c4 | 4500 | echo "configure:4501: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
4501 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
4502 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4503 | else | |
4504 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4505 | #line 4506 "configure" |
c906108c SS |
4506 | #include "confdefs.h" |
4507 | #include <sys/procfs.h> | |
4508 | int main() { | |
4509 | gregset_t avar | |
4510 | ; return 0; } | |
4511 | EOF | |
95ca63c4 | 4512 | if { (eval echo configure:4513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4513 | rm -rf conftest* |
4514 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
4515 | else | |
4516 | echo "configure: failed program was:" >&5 | |
4517 | cat conftest.$ac_ext >&5 | |
4518 | rm -rf conftest* | |
4519 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
4520 | ||
4521 | fi | |
4522 | rm -f conftest* | |
4523 | fi | |
4524 | ||
4525 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
4526 | cat >> confdefs.h <<\EOF | |
4527 | #define HAVE_GREGSET_T 1 | |
4528 | EOF | |
4529 | ||
4530 | fi | |
4531 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
4532 | ||
4533 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
95ca63c4 | 4534 | echo "configure:4535: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
4535 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
4536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4537 | else | |
4538 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4539 | #line 4540 "configure" |
c906108c SS |
4540 | #include "confdefs.h" |
4541 | #include <sys/procfs.h> | |
4542 | int main() { | |
4543 | fpregset_t avar | |
4544 | ; return 0; } | |
4545 | EOF | |
95ca63c4 | 4546 | if { (eval echo configure:4547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4547 | rm -rf conftest* |
4548 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
4549 | else | |
4550 | echo "configure: failed program was:" >&5 | |
4551 | cat conftest.$ac_ext >&5 | |
4552 | rm -rf conftest* | |
4553 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
4554 | ||
4555 | fi | |
4556 | rm -f conftest* | |
4557 | fi | |
4558 | ||
4559 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
4560 | cat >> confdefs.h <<\EOF | |
4561 | #define HAVE_FPREGSET_T 1 | |
4562 | EOF | |
4563 | ||
4564 | fi | |
4565 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
4566 | ||
3862412b | 4567 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
95ca63c4 | 4568 | echo "configure:4569: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
4569 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
4570 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4571 | else | |
4572 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4573 | #line 4574 "configure" |
3862412b MK |
4574 | #include "confdefs.h" |
4575 | #include <sys/procfs.h> | |
4576 | int main() { | |
4577 | prgregset_t avar | |
4578 | ; return 0; } | |
4579 | EOF | |
95ca63c4 | 4580 | if { (eval echo configure:4581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4581 | rm -rf conftest* |
4582 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
4583 | else | |
4584 | echo "configure: failed program was:" >&5 | |
4585 | cat conftest.$ac_ext >&5 | |
4586 | rm -rf conftest* | |
4587 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
4588 | ||
4589 | fi | |
4590 | rm -f conftest* | |
4591 | fi | |
4592 | ||
4593 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
4594 | cat >> confdefs.h <<\EOF | |
4595 | #define HAVE_PRGREGSET_T 1 | |
4596 | EOF | |
4597 | ||
4598 | fi | |
4599 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
4600 | ||
4601 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
95ca63c4 | 4602 | echo "configure:4603: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
4603 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
4604 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4605 | else | |
4606 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4607 | #line 4608 "configure" |
3862412b MK |
4608 | #include "confdefs.h" |
4609 | #include <sys/procfs.h> | |
4610 | int main() { | |
4611 | prfpregset_t avar | |
4612 | ; return 0; } | |
4613 | EOF | |
95ca63c4 | 4614 | if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4615 | rm -rf conftest* |
4616 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
4617 | else | |
4618 | echo "configure: failed program was:" >&5 | |
4619 | cat conftest.$ac_ext >&5 | |
4620 | rm -rf conftest* | |
4621 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
4622 | ||
4623 | fi | |
4624 | rm -f conftest* | |
4625 | fi | |
4626 | ||
4627 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
4628 | cat >> confdefs.h <<\EOF | |
4629 | #define HAVE_PRFPREGSET_T 1 | |
4630 | EOF | |
4631 | ||
4632 | fi | |
4633 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
4634 | ||
4635 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 | |
95ca63c4 | 4636 | echo "configure:4637: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
4637 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
4638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4639 | else | |
4640 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4641 | #line 4642 "configure" |
3862412b MK |
4642 | #include "confdefs.h" |
4643 | #include <sys/procfs.h> | |
4644 | int main() { | |
4645 | lwpid_t avar | |
4646 | ; return 0; } | |
4647 | EOF | |
95ca63c4 | 4648 | if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4649 | rm -rf conftest* |
4650 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
4651 | else | |
4652 | echo "configure: failed program was:" >&5 | |
4653 | cat conftest.$ac_ext >&5 | |
4654 | rm -rf conftest* | |
4655 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
4656 | ||
4657 | fi | |
4658 | rm -f conftest* | |
4659 | fi | |
4660 | ||
4661 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
4662 | cat >> confdefs.h <<\EOF | |
4663 | #define HAVE_LWPID_T 1 | |
4664 | EOF | |
4665 | ||
4666 | fi | |
4667 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
4668 | ||
4669 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
95ca63c4 | 4670 | echo "configure:4671: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
4671 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
4672 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4673 | else | |
4674 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4675 | #line 4676 "configure" |
3862412b MK |
4676 | #include "confdefs.h" |
4677 | #include <sys/procfs.h> | |
4678 | int main() { | |
4679 | psaddr_t avar | |
4680 | ; return 0; } | |
4681 | EOF | |
95ca63c4 | 4682 | if { (eval echo configure:4683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4683 | rm -rf conftest* |
4684 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
4685 | else | |
4686 | echo "configure: failed program was:" >&5 | |
4687 | cat conftest.$ac_ext >&5 | |
4688 | rm -rf conftest* | |
4689 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
4690 | ||
4691 | fi | |
4692 | rm -f conftest* | |
4693 | fi | |
4694 | ||
4695 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
4696 | cat >> confdefs.h <<\EOF | |
4697 | #define HAVE_PSADDR_T 1 | |
4698 | EOF | |
4699 | ||
4700 | fi | |
4701 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
4702 | ||
c906108c SS |
4703 | |
4704 | ||
746a987d | 4705 | |
d84dd0c5 MK |
4706 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
4707 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
95ca63c4 | 4708 | echo "configure:4709: checking whether prfpregset_t type is broken" >&5 |
d84dd0c5 MK |
4709 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
4710 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4711 | else | |
4712 | if test "$cross_compiling" = yes; then | |
4713 | gdb_cv_prfpregset_t_broken=yes | |
4714 | else | |
4715 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4716 | #line 4717 "configure" |
d84dd0c5 MK |
4717 | #include "confdefs.h" |
4718 | #include <sys/procfs.h> | |
4719 | int main () | |
4720 | { | |
4721 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
4722 | return 1; | |
4723 | return 0; | |
4724 | } | |
4725 | EOF | |
95ca63c4 | 4726 | if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
d84dd0c5 MK |
4727 | then |
4728 | gdb_cv_prfpregset_t_broken=no | |
4729 | else | |
4730 | echo "configure: failed program was:" >&5 | |
4731 | cat conftest.$ac_ext >&5 | |
4732 | rm -fr conftest* | |
4733 | gdb_cv_prfpregset_t_broken=yes | |
4734 | fi | |
4735 | rm -fr conftest* | |
4736 | fi | |
4737 | ||
4738 | fi | |
4739 | ||
4740 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 | |
4741 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
4742 | cat >> confdefs.h <<\EOF | |
4743 | #define PRFPREGSET_T_BROKEN 1 | |
4744 | EOF | |
4745 | ||
4746 | fi | |
4747 | fi | |
4748 | ||
4749 | ||
c906108c | 4750 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 |
95ca63c4 | 4751 | echo "configure:4752: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
4752 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
4753 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4754 | else | |
4755 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4756 | #line 4757 "configure" |
c906108c SS |
4757 | #include "confdefs.h" |
4758 | #include <unistd.h> | |
4759 | #include <sys/types.h> | |
4760 | #include <sys/procfs.h> | |
4761 | ||
4762 | int main() { | |
4763 | ||
4764 | int dummy;; | |
4765 | dummy = ioctl(0, PIOCSET, &dummy); | |
4766 | ||
4767 | ; return 0; } | |
4768 | EOF | |
95ca63c4 | 4769 | if { (eval echo configure:4770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4770 | rm -rf conftest* |
4771 | gdb_cv_have_procfs_piocset=yes | |
4772 | else | |
4773 | echo "configure: failed program was:" >&5 | |
4774 | cat conftest.$ac_ext >&5 | |
4775 | rm -rf conftest* | |
4776 | gdb_cv_have_procfs_piocset=no | |
4777 | fi | |
4778 | rm -f conftest* | |
4779 | fi | |
4780 | ||
4781 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
4782 | if test $gdb_cv_have_procfs_piocset = yes; then | |
4783 | cat >> confdefs.h <<\EOF | |
4784 | #define HAVE_PROCFS_PIOCSET 1 | |
4785 | EOF | |
4786 | ||
4787 | fi | |
4788 | fi | |
4789 | ||
4790 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
95ca63c4 | 4791 | echo "configure:4792: checking for main in -lm" >&5 |
c906108c SS |
4792 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
4793 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4794 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4795 | else | |
4796 | ac_save_LIBS="$LIBS" | |
4797 | LIBS="-lm $LIBS" | |
4798 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4799 | #line 4800 "configure" |
c906108c SS |
4800 | #include "confdefs.h" |
4801 | ||
4802 | int main() { | |
4803 | main() | |
4804 | ; return 0; } | |
4805 | EOF | |
95ca63c4 | 4806 | if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4807 | rm -rf conftest* |
4808 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4809 | else | |
4810 | echo "configure: failed program was:" >&5 | |
4811 | cat conftest.$ac_ext >&5 | |
4812 | rm -rf conftest* | |
4813 | eval "ac_cv_lib_$ac_lib_var=no" | |
4814 | fi | |
4815 | rm -f conftest* | |
4816 | LIBS="$ac_save_LIBS" | |
4817 | ||
4818 | fi | |
4819 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4820 | echo "$ac_t""yes" 1>&6 | |
4821 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4822 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4823 | cat >> confdefs.h <<EOF | |
4824 | #define $ac_tr_lib 1 | |
4825 | EOF | |
4826 | ||
4827 | LIBS="-lm $LIBS" | |
4828 | ||
4829 | else | |
4830 | echo "$ac_t""no" 1>&6 | |
4831 | fi | |
4832 | ||
4833 | ||
4834 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
95ca63c4 | 4835 | echo "configure:4836: checking for wctype in -lc" >&5 |
c906108c SS |
4836 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
4837 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4838 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4839 | else | |
4840 | ac_save_LIBS="$LIBS" | |
4841 | LIBS="-lc $LIBS" | |
4842 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4843 | #line 4844 "configure" |
c906108c SS |
4844 | #include "confdefs.h" |
4845 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4846 | /* We use char because int might match the return type of a gcc2 | |
4847 | builtin and then its argument prototype would still apply. */ | |
4848 | char wctype(); | |
4849 | ||
4850 | int main() { | |
4851 | wctype() | |
4852 | ; return 0; } | |
4853 | EOF | |
95ca63c4 | 4854 | if { (eval echo configure:4855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4855 | rm -rf conftest* |
4856 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4857 | else | |
4858 | echo "configure: failed program was:" >&5 | |
4859 | cat conftest.$ac_ext >&5 | |
4860 | rm -rf conftest* | |
4861 | eval "ac_cv_lib_$ac_lib_var=no" | |
4862 | fi | |
4863 | rm -f conftest* | |
4864 | LIBS="$ac_save_LIBS" | |
4865 | ||
4866 | fi | |
4867 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4868 | echo "$ac_t""yes" 1>&6 | |
4869 | : | |
4870 | else | |
4871 | echo "$ac_t""no" 1>&6 | |
4872 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
95ca63c4 | 4873 | echo "configure:4874: checking for wctype in -lw" >&5 |
c906108c SS |
4874 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
4875 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4876 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4877 | else | |
4878 | ac_save_LIBS="$LIBS" | |
4879 | LIBS="-lw $LIBS" | |
4880 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4881 | #line 4882 "configure" |
c906108c SS |
4882 | #include "confdefs.h" |
4883 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4884 | /* We use char because int might match the return type of a gcc2 | |
4885 | builtin and then its argument prototype would still apply. */ | |
4886 | char wctype(); | |
4887 | ||
4888 | int main() { | |
4889 | wctype() | |
4890 | ; return 0; } | |
4891 | EOF | |
95ca63c4 | 4892 | if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4893 | rm -rf conftest* |
4894 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4895 | else | |
4896 | echo "configure: failed program was:" >&5 | |
4897 | cat conftest.$ac_ext >&5 | |
4898 | rm -rf conftest* | |
4899 | eval "ac_cv_lib_$ac_lib_var=no" | |
4900 | fi | |
4901 | rm -f conftest* | |
4902 | LIBS="$ac_save_LIBS" | |
4903 | ||
4904 | fi | |
4905 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4906 | echo "$ac_t""yes" 1>&6 | |
4907 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
4908 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4909 | cat >> confdefs.h <<EOF | |
4910 | #define $ac_tr_lib 1 | |
4911 | EOF | |
4912 | ||
4913 | LIBS="-lw $LIBS" | |
4914 | ||
4915 | else | |
4916 | echo "$ac_t""no" 1>&6 | |
4917 | fi | |
4918 | ||
4919 | fi | |
4920 | ||
4921 | ||
4922 | ||
4923 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
95ca63c4 | 4924 | echo "configure:4925: checking for long long support in compiler" >&5 |
c906108c SS |
4925 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
4926 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4927 | else | |
4928 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4929 | #line 4930 "configure" |
c906108c SS |
4930 | #include "confdefs.h" |
4931 | ||
4932 | int main() { | |
4933 | ||
4934 | extern long long foo; | |
4935 | switch (foo & 2) { case 0: return 1; } | |
4936 | ||
4937 | ; return 0; } | |
4938 | EOF | |
95ca63c4 | 4939 | if { (eval echo configure:4940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4940 | rm -rf conftest* |
4941 | gdb_cv_c_long_long=yes | |
4942 | else | |
4943 | echo "configure: failed program was:" >&5 | |
4944 | cat conftest.$ac_ext >&5 | |
4945 | rm -rf conftest* | |
4946 | gdb_cv_c_long_long=no | |
4947 | fi | |
4948 | rm -f conftest* | |
4949 | fi | |
4950 | ||
4951 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
4952 | if test $gdb_cv_c_long_long = yes; then | |
4953 | cat >> confdefs.h <<\EOF | |
4954 | #define CC_HAS_LONG_LONG 1 | |
4955 | EOF | |
4956 | ||
4957 | fi | |
4958 | ||
4959 | ||
4960 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
95ca63c4 | 4961 | echo "configure:4962: checking for long long support in printf" >&5 |
c906108c SS |
4962 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
4963 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4964 | else | |
4965 | if test "$cross_compiling" = yes; then | |
4966 | gdb_cv_printf_has_long_long=no | |
4967 | else | |
4968 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 4969 | #line 4970 "configure" |
c906108c SS |
4970 | #include "confdefs.h" |
4971 | ||
4972 | int main () { | |
4973 | char buf[32]; | |
4974 | long long l = 0; | |
4975 | l = (l << 16) + 0x0123; | |
4976 | l = (l << 16) + 0x4567; | |
4977 | l = (l << 16) + 0x89ab; | |
4978 | l = (l << 16) + 0xcdef; | |
4979 | sprintf (buf, "0x%016llx", l); | |
4980 | return (strcmp ("0x0123456789abcdef", buf)); | |
4981 | } | |
4982 | EOF | |
95ca63c4 | 4983 | if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
4984 | then |
4985 | gdb_cv_printf_has_long_long=yes | |
4986 | else | |
4987 | echo "configure: failed program was:" >&5 | |
4988 | cat conftest.$ac_ext >&5 | |
4989 | rm -fr conftest* | |
4990 | gdb_cv_printf_has_long_long=no | |
4991 | fi | |
4992 | rm -fr conftest* | |
4993 | fi | |
4994 | ||
4995 | fi | |
4996 | ||
4997 | if test $gdb_cv_printf_has_long_long = yes; then | |
4998 | cat >> confdefs.h <<\EOF | |
4999 | #define PRINTF_HAS_LONG_LONG 1 | |
5000 | EOF | |
5001 | ||
5002 | fi | |
5003 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
5004 | ||
5005 | ||
5006 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
95ca63c4 | 5007 | echo "configure:5008: checking for long double support in compiler" >&5 |
c906108c SS |
5008 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
5009 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5010 | else | |
5011 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5012 | #line 5013 "configure" |
c906108c SS |
5013 | #include "confdefs.h" |
5014 | ||
5015 | int main() { | |
5016 | long double foo; | |
5017 | ; return 0; } | |
5018 | EOF | |
95ca63c4 | 5019 | if { (eval echo configure:5020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5020 | rm -rf conftest* |
5021 | ac_cv_c_long_double=yes | |
5022 | else | |
5023 | echo "configure: failed program was:" >&5 | |
5024 | cat conftest.$ac_ext >&5 | |
5025 | rm -rf conftest* | |
5026 | ac_cv_c_long_double=no | |
5027 | fi | |
5028 | rm -f conftest* | |
5029 | fi | |
5030 | ||
5031 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
5032 | if test $ac_cv_c_long_double = yes; then | |
5033 | cat >> confdefs.h <<\EOF | |
5034 | #define HAVE_LONG_DOUBLE 1 | |
5035 | EOF | |
5036 | ||
5037 | fi | |
5038 | ||
5039 | ||
5040 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
95ca63c4 | 5041 | echo "configure:5042: checking for long double support in printf" >&5 |
c906108c SS |
5042 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
5043 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5044 | else | |
5045 | if test "$cross_compiling" = yes; then | |
5046 | gdb_cv_printf_has_long_double=no | |
5047 | else | |
5048 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5049 | #line 5050 "configure" |
c906108c SS |
5050 | #include "confdefs.h" |
5051 | ||
5052 | int main () { | |
5053 | char buf[16]; | |
5054 | long double f = 3.141592653; | |
5055 | sprintf (buf, "%Lg", f); | |
5056 | return (strncmp ("3.14159", buf, 7)); | |
5057 | } | |
5058 | EOF | |
95ca63c4 | 5059 | if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5060 | then |
5061 | gdb_cv_printf_has_long_double=yes | |
5062 | else | |
5063 | echo "configure: failed program was:" >&5 | |
5064 | cat conftest.$ac_ext >&5 | |
5065 | rm -fr conftest* | |
5066 | gdb_cv_printf_has_long_double=no | |
5067 | fi | |
5068 | rm -fr conftest* | |
5069 | fi | |
5070 | ||
5071 | fi | |
5072 | ||
5073 | if test $gdb_cv_printf_has_long_double = yes; then | |
5074 | cat >> confdefs.h <<\EOF | |
5075 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
5076 | EOF | |
5077 | ||
5078 | fi | |
5079 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
5080 | ||
5081 | ||
5082 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
95ca63c4 | 5083 | echo "configure:5084: checking for long double support in scanf" >&5 |
c906108c SS |
5084 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
5085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5086 | else | |
5087 | if test "$cross_compiling" = yes; then | |
5088 | gdb_cv_scanf_has_long_double=no | |
5089 | else | |
5090 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5091 | #line 5092 "configure" |
c906108c SS |
5092 | #include "confdefs.h" |
5093 | ||
5094 | int main () { | |
5095 | char *buf = "3.141592653"; | |
5096 | long double f = 0; | |
5097 | sscanf (buf, "%Lg", &f); | |
5098 | return !(f > 3.14159 && f < 3.14160); | |
5099 | } | |
5100 | EOF | |
95ca63c4 | 5101 | if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5102 | then |
5103 | gdb_cv_scanf_has_long_double=yes | |
5104 | else | |
5105 | echo "configure: failed program was:" >&5 | |
5106 | cat conftest.$ac_ext >&5 | |
5107 | rm -fr conftest* | |
5108 | gdb_cv_scanf_has_long_double=no | |
5109 | fi | |
5110 | rm -fr conftest* | |
5111 | fi | |
5112 | ||
5113 | fi | |
5114 | ||
5115 | if test $gdb_cv_scanf_has_long_double = yes; then | |
5116 | cat >> confdefs.h <<\EOF | |
5117 | #define SCANF_HAS_LONG_DOUBLE 1 | |
5118 | EOF | |
5119 | ||
5120 | fi | |
5121 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
5122 | ||
5123 | for ac_hdr in unistd.h | |
5124 | do | |
5125 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5126 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
95ca63c4 | 5127 | echo "configure:5128: checking for $ac_hdr" >&5 |
c906108c SS |
5128 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5129 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5130 | else | |
5131 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5132 | #line 5133 "configure" |
c906108c SS |
5133 | #include "confdefs.h" |
5134 | #include <$ac_hdr> | |
5135 | EOF | |
5136 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
95ca63c4 | 5137 | { (eval echo configure:5138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5138 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5139 | if test -z "$ac_err"; then | |
5140 | rm -rf conftest* | |
5141 | eval "ac_cv_header_$ac_safe=yes" | |
5142 | else | |
5143 | echo "$ac_err" >&5 | |
5144 | echo "configure: failed program was:" >&5 | |
5145 | cat conftest.$ac_ext >&5 | |
5146 | rm -rf conftest* | |
5147 | eval "ac_cv_header_$ac_safe=no" | |
5148 | fi | |
5149 | rm -f conftest* | |
5150 | fi | |
5151 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5152 | echo "$ac_t""yes" 1>&6 | |
5153 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5154 | cat >> confdefs.h <<EOF | |
5155 | #define $ac_tr_hdr 1 | |
5156 | EOF | |
5157 | ||
5158 | else | |
5159 | echo "$ac_t""no" 1>&6 | |
5160 | fi | |
5161 | done | |
5162 | ||
5163 | for ac_func in getpagesize | |
5164 | do | |
5165 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
95ca63c4 | 5166 | echo "configure:5167: checking for $ac_func" >&5 |
c906108c SS |
5167 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5168 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5169 | else | |
5170 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5171 | #line 5172 "configure" |
c906108c SS |
5172 | #include "confdefs.h" |
5173 | /* System header to define __stub macros and hopefully few prototypes, | |
5174 | which can conflict with char $ac_func(); below. */ | |
5175 | #include <assert.h> | |
5176 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5177 | /* We use char because int might match the return type of a gcc2 | |
5178 | builtin and then its argument prototype would still apply. */ | |
5179 | char $ac_func(); | |
5180 | ||
5181 | int main() { | |
5182 | ||
5183 | /* The GNU C library defines this for functions which it implements | |
5184 | to always fail with ENOSYS. Some functions are actually named | |
5185 | something starting with __ and the normal name is an alias. */ | |
5186 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5187 | choke me | |
5188 | #else | |
5189 | $ac_func(); | |
5190 | #endif | |
5191 | ||
5192 | ; return 0; } | |
5193 | EOF | |
95ca63c4 | 5194 | if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5195 | rm -rf conftest* |
5196 | eval "ac_cv_func_$ac_func=yes" | |
5197 | else | |
5198 | echo "configure: failed program was:" >&5 | |
5199 | cat conftest.$ac_ext >&5 | |
5200 | rm -rf conftest* | |
5201 | eval "ac_cv_func_$ac_func=no" | |
5202 | fi | |
5203 | rm -f conftest* | |
5204 | fi | |
5205 | ||
5206 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5207 | echo "$ac_t""yes" 1>&6 | |
5208 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5209 | cat >> confdefs.h <<EOF | |
5210 | #define $ac_tr_func 1 | |
5211 | EOF | |
5212 | ||
5213 | else | |
5214 | echo "$ac_t""no" 1>&6 | |
5215 | fi | |
5216 | done | |
5217 | ||
5218 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
95ca63c4 | 5219 | echo "configure:5220: checking for working mmap" >&5 |
c906108c SS |
5220 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5221 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5222 | else | |
5223 | if test "$cross_compiling" = yes; then | |
5224 | ac_cv_func_mmap_fixed_mapped=no | |
5225 | else | |
5226 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5227 | #line 5228 "configure" |
c906108c SS |
5228 | #include "confdefs.h" |
5229 | ||
5230 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5231 | Here is a matrix of mmap possibilities: | |
5232 | mmap private not fixed | |
5233 | mmap private fixed at somewhere currently unmapped | |
5234 | mmap private fixed at somewhere already mapped | |
5235 | mmap shared not fixed | |
5236 | mmap shared fixed at somewhere currently unmapped | |
5237 | mmap shared fixed at somewhere already mapped | |
5238 | For private mappings, we should verify that changes cannot be read() | |
5239 | back from the file, nor mmap's back from the file at a different | |
5240 | address. (There have been systems where private was not correctly | |
5241 | implemented like the infamous i386 svr4.0, and systems where the | |
5242 | VM page cache was not coherent with the filesystem buffer cache | |
5243 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5244 | For shared mappings, we should conversely verify that changes get | |
5245 | propogated back to all the places they're supposed to be. | |
5246 | ||
5247 | Grep wants private fixed already mapped. | |
5248 | The main things grep needs to know about mmap are: | |
5249 | * does it exist and is it safe to write into the mmap'd area | |
5250 | * how to use it (BSD variants) */ | |
5251 | #include <sys/types.h> | |
5252 | #include <fcntl.h> | |
5253 | #include <sys/mman.h> | |
5254 | ||
5255 | /* This mess was copied from the GNU getpagesize.h. */ | |
5256 | #ifndef HAVE_GETPAGESIZE | |
5257 | # ifdef HAVE_UNISTD_H | |
5258 | # include <unistd.h> | |
5259 | # endif | |
5260 | ||
5261 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5262 | # ifndef HAVE_SYS_PARAM_H | |
5263 | # define HAVE_SYS_PARAM_H 1 | |
5264 | # endif | |
5265 | ||
5266 | # ifdef _SC_PAGESIZE | |
5267 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5268 | # else /* no _SC_PAGESIZE */ | |
5269 | # ifdef HAVE_SYS_PARAM_H | |
5270 | # include <sys/param.h> | |
5271 | # ifdef EXEC_PAGESIZE | |
5272 | # define getpagesize() EXEC_PAGESIZE | |
5273 | # else /* no EXEC_PAGESIZE */ | |
5274 | # ifdef NBPG | |
5275 | # define getpagesize() NBPG * CLSIZE | |
5276 | # ifndef CLSIZE | |
5277 | # define CLSIZE 1 | |
5278 | # endif /* no CLSIZE */ | |
5279 | # else /* no NBPG */ | |
5280 | # ifdef NBPC | |
5281 | # define getpagesize() NBPC | |
5282 | # else /* no NBPC */ | |
5283 | # ifdef PAGESIZE | |
5284 | # define getpagesize() PAGESIZE | |
5285 | # endif /* PAGESIZE */ | |
5286 | # endif /* no NBPC */ | |
5287 | # endif /* no NBPG */ | |
5288 | # endif /* no EXEC_PAGESIZE */ | |
5289 | # else /* no HAVE_SYS_PARAM_H */ | |
5290 | # define getpagesize() 8192 /* punt totally */ | |
5291 | # endif /* no HAVE_SYS_PARAM_H */ | |
5292 | # endif /* no _SC_PAGESIZE */ | |
5293 | ||
5294 | #endif /* no HAVE_GETPAGESIZE */ | |
5295 | ||
5296 | #ifdef __cplusplus | |
5297 | extern "C" { void *malloc(unsigned); } | |
5298 | #else | |
5299 | char *malloc(); | |
5300 | #endif | |
5301 | ||
5302 | int | |
5303 | main() | |
5304 | { | |
5305 | char *data, *data2, *data3; | |
5306 | int i, pagesize; | |
5307 | int fd; | |
5308 | ||
5309 | pagesize = getpagesize(); | |
5310 | ||
5311 | /* | |
5312 | * First, make a file with some known garbage in it. | |
5313 | */ | |
5314 | data = malloc(pagesize); | |
5315 | if (!data) | |
5316 | exit(1); | |
5317 | for (i = 0; i < pagesize; ++i) | |
5318 | *(data + i) = rand(); | |
5319 | umask(0); | |
5320 | fd = creat("conftestmmap", 0600); | |
5321 | if (fd < 0) | |
5322 | exit(1); | |
5323 | if (write(fd, data, pagesize) != pagesize) | |
5324 | exit(1); | |
5325 | close(fd); | |
5326 | ||
5327 | /* | |
5328 | * Next, try to mmap the file at a fixed address which | |
5329 | * already has something else allocated at it. If we can, | |
5330 | * also make sure that we see the same garbage. | |
5331 | */ | |
5332 | fd = open("conftestmmap", O_RDWR); | |
5333 | if (fd < 0) | |
5334 | exit(1); | |
5335 | data2 = malloc(2 * pagesize); | |
5336 | if (!data2) | |
5337 | exit(1); | |
5338 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5339 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5340 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5341 | exit(1); | |
5342 | for (i = 0; i < pagesize; ++i) | |
5343 | if (*(data + i) != *(data2 + i)) | |
5344 | exit(1); | |
5345 | ||
5346 | /* | |
5347 | * Finally, make sure that changes to the mapped area | |
5348 | * do not percolate back to the file as seen by read(). | |
5349 | * (This is a bug on some variants of i386 svr4.0.) | |
5350 | */ | |
5351 | for (i = 0; i < pagesize; ++i) | |
5352 | *(data2 + i) = *(data2 + i) + 1; | |
5353 | data3 = malloc(pagesize); | |
5354 | if (!data3) | |
5355 | exit(1); | |
5356 | if (read(fd, data3, pagesize) != pagesize) | |
5357 | exit(1); | |
5358 | for (i = 0; i < pagesize; ++i) | |
5359 | if (*(data + i) != *(data3 + i)) | |
5360 | exit(1); | |
5361 | close(fd); | |
5362 | unlink("conftestmmap"); | |
5363 | exit(0); | |
5364 | } | |
5365 | ||
5366 | EOF | |
95ca63c4 | 5367 | if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5368 | then |
5369 | ac_cv_func_mmap_fixed_mapped=yes | |
5370 | else | |
5371 | echo "configure: failed program was:" >&5 | |
5372 | cat conftest.$ac_ext >&5 | |
5373 | rm -fr conftest* | |
5374 | ac_cv_func_mmap_fixed_mapped=no | |
5375 | fi | |
5376 | rm -fr conftest* | |
5377 | fi | |
5378 | ||
5379 | fi | |
5380 | ||
5381 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
5382 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5383 | cat >> confdefs.h <<\EOF | |
5384 | #define HAVE_MMAP 1 | |
5385 | EOF | |
5386 | ||
5387 | fi | |
5388 | ||
5389 | ||
5390 | ||
5391 | ||
5392 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5393 | case ${host_os} in | |
5394 | hpux*) | |
5395 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
95ca63c4 | 5396 | echo "configure:5397: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
5397 | if test -f /usr/include/dce/cma_config.h ; then |
5398 | if test "$GCC" = "yes" ; then | |
5399 | echo "$ac_t""yes" 1>&6 | |
5400 | cat >> confdefs.h <<\EOF | |
5401 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
5402 | EOF | |
5403 | ||
5404 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" | |
5405 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" | |
5406 | else | |
5407 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
5408 | fi | |
5409 | else | |
5410 | echo "$ac_t""no" 1>&6 | |
5411 | fi | |
5412 | ;; | |
5413 | solaris*) | |
5414 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
95ca63c4 | 5415 | echo "configure:5416: checking for Solaris thread debugging library" >&5 |
c906108c SS |
5416 | if test -f /usr/lib/libthread_db.so.1 ; then |
5417 | echo "$ac_t""yes" 1>&6 | |
5418 | cat >> confdefs.h <<\EOF | |
5419 | #define HAVE_THREAD_DB_LIB 1 | |
5420 | EOF | |
5421 | ||
5422 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
5423 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" | |
5424 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
95ca63c4 | 5425 | echo "configure:5426: checking for dlopen in -ldl" >&5 |
c906108c SS |
5426 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
5427 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5428 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5429 | else | |
5430 | ac_save_LIBS="$LIBS" | |
5431 | LIBS="-ldl $LIBS" | |
5432 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5433 | #line 5434 "configure" |
c906108c SS |
5434 | #include "confdefs.h" |
5435 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5436 | /* We use char because int might match the return type of a gcc2 | |
5437 | builtin and then its argument prototype would still apply. */ | |
5438 | char dlopen(); | |
5439 | ||
5440 | int main() { | |
5441 | dlopen() | |
5442 | ; return 0; } | |
5443 | EOF | |
95ca63c4 | 5444 | if { (eval echo configure:5445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5445 | rm -rf conftest* |
5446 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5447 | else | |
5448 | echo "configure: failed program was:" >&5 | |
5449 | cat conftest.$ac_ext >&5 | |
5450 | rm -rf conftest* | |
5451 | eval "ac_cv_lib_$ac_lib_var=no" | |
5452 | fi | |
5453 | rm -f conftest* | |
5454 | LIBS="$ac_save_LIBS" | |
5455 | ||
5456 | fi | |
5457 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5458 | echo "$ac_t""yes" 1>&6 | |
5459 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5460 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5461 | cat >> confdefs.h <<EOF | |
5462 | #define $ac_tr_lib 1 | |
5463 | EOF | |
5464 | ||
5465 | LIBS="-ldl $LIBS" | |
5466 | ||
5467 | else | |
5468 | echo "$ac_t""no" 1>&6 | |
5469 | fi | |
5470 | ||
5471 | if test "$GCC" = "yes" ; then | |
5472 | # The GNU linker requires the -export-dynamic option to make | |
5473 | # all symbols visible in the dynamic symbol table. | |
5474 | hold_ldflags=$LDFLAGS | |
5475 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
95ca63c4 | 5476 | echo "configure:5477: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
5477 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
5478 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5479 | #line 5480 "configure" |
c906108c SS |
5480 | #include "confdefs.h" |
5481 | ||
5482 | int main() { | |
5483 | int i; | |
5484 | ; return 0; } | |
5485 | EOF | |
95ca63c4 | 5486 | if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5487 | rm -rf conftest* |
5488 | found=yes | |
5489 | else | |
5490 | echo "configure: failed program was:" >&5 | |
5491 | cat conftest.$ac_ext >&5 | |
5492 | rm -rf conftest* | |
5493 | found=no | |
5494 | fi | |
5495 | rm -f conftest* | |
5496 | LDFLAGS=$hold_ldflags | |
5497 | echo "$ac_t""$found" 1>&6 | |
5498 | if test $found = yes; then | |
5499 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
5500 | fi | |
5501 | fi | |
5502 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
5503 | # at one point. | |
5504 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
95ca63c4 | 5505 | echo "configure:5506: checking if <proc_service.h> is old" >&5 |
c906108c SS |
5506 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
5507 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5508 | else | |
5509 | ||
5510 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5511 | #line 5512 "configure" |
c906108c SS |
5512 | #include "confdefs.h" |
5513 | ||
5514 | #include <proc_service.h> | |
5515 | ps_err_e ps_pdwrite | |
5516 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
5517 | ||
5518 | int main() { | |
5519 | ||
5520 | ; return 0; } | |
5521 | EOF | |
95ca63c4 | 5522 | if { (eval echo configure:5523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5523 | rm -rf conftest* |
5524 | gdb_cv_proc_service_is_old=no | |
5525 | else | |
5526 | echo "configure: failed program was:" >&5 | |
5527 | cat conftest.$ac_ext >&5 | |
5528 | rm -rf conftest* | |
5529 | gdb_cv_proc_service_is_old=yes | |
5530 | fi | |
5531 | rm -f conftest* | |
5532 | ||
5533 | fi | |
5534 | ||
5535 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
5536 | if test $gdb_cv_proc_service_is_old = yes; then | |
5537 | cat >> confdefs.h <<\EOF | |
5538 | #define PROC_SERVICE_IS_OLD 1 | |
5539 | EOF | |
5540 | ||
5541 | fi | |
5542 | else | |
5543 | echo "$ac_t""no" 1>&6 | |
5544 | fi | |
5545 | ;; | |
5546 | esac | |
5547 | ||
5548 | fi | |
5549 | ||
fb40c209 AC |
5550 | |
5551 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
5552 | if test "${enable_gdbmi+set}" = set; then | |
5553 | enableval="$enable_gdbmi" | |
5554 | ||
5555 | case "${enable_gdbmi}" in | |
5556 | yes | no) ;; | |
5557 | "") enable_gdbmi=yes ;; | |
5558 | *) | |
5559 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
5560 | ;; | |
5561 | esac | |
5562 | ||
5563 | fi | |
5564 | ||
5565 | case ${enable_gdbmi} in | |
5566 | "yes" ) | |
5567 | if test -d "${srcdir}/mi" ; then | |
5568 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
5569 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
5570 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)" | |
5571 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" | |
b0b1b869 | 5572 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
5573 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
5574 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
5575 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
5576 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
5577 | fi |
5578 | ;; | |
5579 | esac | |
c906108c SS |
5580 | |
5581 | # Check whether --enable-tui or --disable-tui was given. | |
5582 | if test "${enable_tui+set}" = set; then | |
5583 | enableval="$enable_tui" | |
5584 | ||
5585 | case "${enable_tui}" in | |
5586 | yes | no) ;; | |
5587 | "") enable_tui=yes ;; | |
5588 | *) | |
5589 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
5590 | ;; | |
5591 | esac | |
5592 | ||
5593 | fi | |
5594 | ||
5595 | case ${enable_tui} in | |
5596 | "yes" ) | |
ed952ac5 AC |
5597 | if test -d "${srcdir}/tui" ; then |
5598 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
5599 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
5600 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_TUI_SRCS)" | |
5601 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" | |
5602 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
5603 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
5604 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
5605 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
5606 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
5607 | fi | |
5608 | ;; | |
c906108c SS |
5609 | esac |
5610 | ||
c906108c SS |
5611 | # Check whether --enable-netrom or --disable-netrom was given. |
5612 | if test "${enable_netrom+set}" = set; then | |
5613 | enableval="$enable_netrom" | |
5614 | case "${enableval}" in | |
5615 | yes) enable_netrom=yes ;; | |
5616 | no) enable_netrom=no ;; | |
5617 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
5618 | esac | |
5619 | fi | |
5620 | ||
5621 | ||
5622 | if test "${enable_netrom}" = "yes"; then | |
5623 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" | |
5624 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" | |
5625 | fi | |
5626 | ||
1decb323 | 5627 | |
d8038014 AC |
5628 | # Don't add -Wall or -Wunused, they include -Wunused-parameter which |
5629 | # causes noise. | |
1decb323 | 5630 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
16cadf39 | 5631 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
5632 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
5633 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
5634 | # -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual | |
5635 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes | |
5636 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
5637 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
5638 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
5639 | if test "${enable_build_warnings+set}" = set; then | |
5640 | enableval="$enable_build_warnings" | |
1decb323 | 5641 | case "${enableval}" in |
c906108c SS |
5642 | yes) ;; |
5643 | no) build_warnings="-w";; | |
5644 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5645 | build_warnings="${build_warnings} ${t}";; | |
5646 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5647 | build_warnings="${t} ${build_warnings}";; | |
5648 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5649 | esac | |
d4f3574e | 5650 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 5651 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 5652 | fi |
1decb323 | 5653 | fi |
104c1213 JM |
5654 | WARN_CFLAGS="" |
5655 | WERROR_CFLAGS="" | |
c906108c SS |
5656 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
5657 | then | |
746a987d | 5658 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
95ca63c4 | 5659 | echo "configure:5660: checking compiler warning flags" >&5 |
746a987d AC |
5660 | # Separate out the -Werror flag as some files just cannot be |
5661 | # compiled with it enabled. | |
5662 | for w in ${build_warnings}; do | |
5663 | case $w in | |
5664 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
5665 | *) # Check that GCC accepts it | |
5666 | if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then | |
5667 | : | |
5668 | else | |
5669 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
5670 | fi | |
5671 | esac | |
5672 | done | |
5673 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
5674 | fi |
5675 | ||
5676 | ||
104c1213 | 5677 | |
c906108c SS |
5678 | MMALLOC_CFLAGS= |
5679 | MMALLOC= | |
5680 | ||
5681 | ||
5682 | ||
5683 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
5684 | if test "${with_mmalloc+set}" = set; then | |
5685 | withval="$with_mmalloc" | |
5686 | case "${withval}" in | |
5687 | yes) want_mmalloc=true ;; | |
5688 | no) want_mmalloc=false;; | |
5689 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
5690 | esac | |
5691 | else | |
5692 | want_mmalloc=false | |
5693 | fi | |
5694 | ||
5695 | if test x$want_mmalloc = xtrue; then | |
5696 | cat >> confdefs.h <<\EOF | |
5697 | #define USE_MMALLOC 1 | |
5698 | EOF | |
5699 | ||
5700 | cat >> confdefs.h <<\EOF | |
5701 | #define MMCHECK_FORCE 1 | |
5702 | EOF | |
5703 | ||
5704 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
5705 | MMALLOC='../mmalloc/libmmalloc.a' | |
5706 | fi | |
5707 | ||
88987551 L |
5708 | # Check whether --with-included-regex or --without-included-regex was given. |
5709 | if test "${with_included_regex+set}" = set; then | |
5710 | withval="$with_included_regex" | |
5711 | case "${withval}" in | |
5712 | yes) want_included_regex=true ;; | |
5713 | no) want_included_regex=false;; | |
5714 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
5715 | esac | |
5716 | else | |
5717 | want_included_regex=true | |
5718 | fi | |
5719 | ||
88987551 L |
5720 | if test $want_included_regex = false; then |
5721 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
95ca63c4 | 5722 | echo "configure:5723: checking for GNU regex" >&5 |
88987551 L |
5723 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
5724 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5725 | else | |
5726 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5727 | #line 5728 "configure" |
88987551 L |
5728 | #include "confdefs.h" |
5729 | #include <gnu-versions.h> | |
5730 | #include <sys/types.h> | |
5731 | #include <regex.h> | |
5732 | int main() { | |
5733 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
5734 | #error No valid GNU regex. | |
5735 | #endif | |
5736 | ||
5737 | ; return 0; } | |
5738 | EOF | |
95ca63c4 | 5739 | if { (eval echo configure:5740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
5740 | rm -rf conftest* |
5741 | gdb_cv_have_gnu_regex=yes | |
5742 | else | |
5743 | echo "configure: failed program was:" >&5 | |
5744 | cat conftest.$ac_ext >&5 | |
5745 | rm -rf conftest* | |
5746 | gdb_cv_have_gnu_regex=no | |
5747 | fi | |
5748 | rm -f conftest* | |
5749 | fi | |
5750 | ||
5751 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
5752 | if test $gdb_cv_have_gnu_regex = no; then |
5753 | want_included_regex=true | |
88987551 L |
5754 | fi |
5755 | fi | |
5756 | ||
e48f66e4 AC |
5757 | if test x${want_included_regex} = xtrue; then |
5758 | REGEX="gnu-regex.o" | |
5759 | cat >> confdefs.h <<\EOF | |
5760 | #define USE_INCLUDED_REGEX 1 | |
5761 | EOF | |
5762 | ||
5763 | fi | |
88987551 | 5764 | |
7a292a7a SS |
5765 | |
5766 | # In the Cygwin environment, we need some additional flags. | |
5767 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
95ca63c4 | 5768 | echo "configure:5769: checking for cygwin" >&5 |
7a292a7a SS |
5769 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
5770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5771 | else | |
5772 | cat > conftest.$ac_ext <<EOF | |
95ca63c4 | 5773 | #line 5774 "configure" |
7a292a7a SS |
5774 | #include "confdefs.h" |
5775 | ||
5776 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
5777 | lose | |
5778 | #endif | |
5779 | EOF | |
5780 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5781 | egrep "lose" >/dev/null 2>&1; then | |
5782 | rm -rf conftest* | |
5783 | gdb_cv_os_cygwin=yes | |
5784 | else | |
5785 | rm -rf conftest* | |
5786 | gdb_cv_os_cygwin=no | |
5787 | fi | |
5788 | rm -f conftest* | |
5789 | ||
5790 | fi | |
5791 | ||
5792 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
5793 | ||
b83266a0 SS |
5794 | if test x$gdb_host = xgo32; then |
5795 | TERM_LIB= | |
5796 | else | |
c906108c SS |
5797 | if test x$gdb_cv_os_cygwin = xyes; then |
5798 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
5799 | else | |
5800 | TERM_LIB= | |
5801 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
29fe111d | 5802 | echo "configure:5803: checking for tgetent in -lncurses" >&5 |
c906108c SS |
5803 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
5804 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5805 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5806 | else | |
5807 | ac_save_LIBS="$LIBS" | |
5808 | LIBS="-lncurses $LIBS" | |
5809 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 5810 | #line 5811 "configure" |
c906108c SS |
5811 | #include "confdefs.h" |
5812 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5813 | /* We use char because int might match the return type of a gcc2 | |
5814 | builtin and then its argument prototype would still apply. */ | |
5815 | char tgetent(); | |
5816 | ||
5817 | int main() { | |
5818 | tgetent() | |
5819 | ; return 0; } | |
5820 | EOF | |
29fe111d | 5821 | if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5822 | rm -rf conftest* |
5823 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5824 | else | |
5825 | echo "configure: failed program was:" >&5 | |
5826 | cat conftest.$ac_ext >&5 | |
5827 | rm -rf conftest* | |
5828 | eval "ac_cv_lib_$ac_lib_var=no" | |
5829 | fi | |
5830 | rm -f conftest* | |
5831 | LIBS="$ac_save_LIBS" | |
5832 | ||
5833 | fi | |
5834 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5835 | echo "$ac_t""yes" 1>&6 | |
5836 | TERM_LIB=-lncurses | |
5837 | else | |
5838 | echo "$ac_t""no" 1>&6 | |
5839 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
29fe111d | 5840 | echo "configure:5841: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
5841 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
5842 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5843 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5844 | else | |
5845 | ac_save_LIBS="$LIBS" | |
5846 | LIBS="-lHcurses $LIBS" | |
5847 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 5848 | #line 5849 "configure" |
c906108c SS |
5849 | #include "confdefs.h" |
5850 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5851 | /* We use char because int might match the return type of a gcc2 | |
5852 | builtin and then its argument prototype would still apply. */ | |
5853 | char tgetent(); | |
5854 | ||
5855 | int main() { | |
5856 | tgetent() | |
5857 | ; return 0; } | |
5858 | EOF | |
29fe111d | 5859 | if { (eval echo configure:5860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5860 | rm -rf conftest* |
5861 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5862 | else | |
5863 | echo "configure: failed program was:" >&5 | |
5864 | cat conftest.$ac_ext >&5 | |
5865 | rm -rf conftest* | |
5866 | eval "ac_cv_lib_$ac_lib_var=no" | |
5867 | fi | |
5868 | rm -f conftest* | |
5869 | LIBS="$ac_save_LIBS" | |
5870 | ||
5871 | fi | |
5872 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5873 | echo "$ac_t""yes" 1>&6 | |
5874 | TERM_LIB=-lHcurses | |
5875 | else | |
5876 | echo "$ac_t""no" 1>&6 | |
5877 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
29fe111d | 5878 | echo "configure:5879: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
5879 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
5880 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5881 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5882 | else | |
5883 | ac_save_LIBS="$LIBS" | |
5884 | LIBS="-ltermlib $LIBS" | |
5885 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 5886 | #line 5887 "configure" |
c906108c SS |
5887 | #include "confdefs.h" |
5888 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5889 | /* We use char because int might match the return type of a gcc2 | |
5890 | builtin and then its argument prototype would still apply. */ | |
5891 | char tgetent(); | |
5892 | ||
5893 | int main() { | |
5894 | tgetent() | |
5895 | ; return 0; } | |
5896 | EOF | |
29fe111d | 5897 | if { (eval echo configure:5898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5898 | rm -rf conftest* |
5899 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5900 | else | |
5901 | echo "configure: failed program was:" >&5 | |
5902 | cat conftest.$ac_ext >&5 | |
5903 | rm -rf conftest* | |
5904 | eval "ac_cv_lib_$ac_lib_var=no" | |
5905 | fi | |
5906 | rm -f conftest* | |
5907 | LIBS="$ac_save_LIBS" | |
5908 | ||
5909 | fi | |
5910 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5911 | echo "$ac_t""yes" 1>&6 | |
5912 | TERM_LIB=-ltermlib | |
5913 | else | |
5914 | echo "$ac_t""no" 1>&6 | |
5915 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
29fe111d | 5916 | echo "configure:5917: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
5917 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
5918 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5919 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5920 | else | |
5921 | ac_save_LIBS="$LIBS" | |
5922 | LIBS="-ltermcap $LIBS" | |
5923 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 5924 | #line 5925 "configure" |
c906108c SS |
5925 | #include "confdefs.h" |
5926 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5927 | /* We use char because int might match the return type of a gcc2 | |
5928 | builtin and then its argument prototype would still apply. */ | |
5929 | char tgetent(); | |
5930 | ||
5931 | int main() { | |
5932 | tgetent() | |
5933 | ; return 0; } | |
5934 | EOF | |
29fe111d | 5935 | if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5936 | rm -rf conftest* |
5937 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5938 | else | |
5939 | echo "configure: failed program was:" >&5 | |
5940 | cat conftest.$ac_ext >&5 | |
5941 | rm -rf conftest* | |
5942 | eval "ac_cv_lib_$ac_lib_var=no" | |
5943 | fi | |
5944 | rm -f conftest* | |
5945 | LIBS="$ac_save_LIBS" | |
5946 | ||
5947 | fi | |
5948 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5949 | echo "$ac_t""yes" 1>&6 | |
5950 | TERM_LIB=-ltermcap | |
5951 | else | |
5952 | echo "$ac_t""no" 1>&6 | |
5953 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
29fe111d | 5954 | echo "configure:5955: checking for tgetent in -lcurses" >&5 |
c906108c SS |
5955 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
5956 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5957 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5958 | else | |
5959 | ac_save_LIBS="$LIBS" | |
5960 | LIBS="-lcurses $LIBS" | |
5961 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 5962 | #line 5963 "configure" |
c906108c SS |
5963 | #include "confdefs.h" |
5964 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5965 | /* We use char because int might match the return type of a gcc2 | |
5966 | builtin and then its argument prototype would still apply. */ | |
5967 | char tgetent(); | |
5968 | ||
5969 | int main() { | |
5970 | tgetent() | |
5971 | ; return 0; } | |
5972 | EOF | |
29fe111d | 5973 | if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5974 | rm -rf conftest* |
5975 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5976 | else | |
5977 | echo "configure: failed program was:" >&5 | |
5978 | cat conftest.$ac_ext >&5 | |
5979 | rm -rf conftest* | |
5980 | eval "ac_cv_lib_$ac_lib_var=no" | |
5981 | fi | |
5982 | rm -f conftest* | |
5983 | LIBS="$ac_save_LIBS" | |
5984 | ||
5985 | fi | |
5986 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5987 | echo "$ac_t""yes" 1>&6 | |
5988 | TERM_LIB=-lcurses | |
5989 | else | |
5990 | echo "$ac_t""no" 1>&6 | |
5991 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
29fe111d | 5992 | echo "configure:5993: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
5993 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
5994 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5995 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5996 | else | |
5997 | ac_save_LIBS="$LIBS" | |
5998 | LIBS="-lterminfo $LIBS" | |
5999 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 6000 | #line 6001 "configure" |
c906108c SS |
6001 | #include "confdefs.h" |
6002 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6003 | /* We use char because int might match the return type of a gcc2 | |
6004 | builtin and then its argument prototype would still apply. */ | |
6005 | char tgetent(); | |
6006 | ||
6007 | int main() { | |
6008 | tgetent() | |
6009 | ; return 0; } | |
6010 | EOF | |
29fe111d | 6011 | if { (eval echo configure:6012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6012 | rm -rf conftest* |
6013 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6014 | else | |
6015 | echo "configure: failed program was:" >&5 | |
6016 | cat conftest.$ac_ext >&5 | |
6017 | rm -rf conftest* | |
6018 | eval "ac_cv_lib_$ac_lib_var=no" | |
6019 | fi | |
6020 | rm -f conftest* | |
6021 | LIBS="$ac_save_LIBS" | |
6022 | ||
6023 | fi | |
6024 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6025 | echo "$ac_t""yes" 1>&6 | |
6026 | TERM_LIB=-lterminfo | |
6027 | else | |
6028 | echo "$ac_t""no" 1>&6 | |
6029 | fi | |
6030 | ||
6031 | fi | |
6032 | ||
6033 | fi | |
6034 | ||
6035 | fi | |
6036 | ||
6037 | fi | |
6038 | ||
6039 | fi | |
6040 | ||
6041 | ||
6042 | if test "x$TERM_LIB" = x | |
6043 | then | |
6044 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
6045 | fi | |
6046 | fi | |
b83266a0 | 6047 | fi |
c906108c SS |
6048 | |
6049 | ||
cd0fc7c3 SS |
6050 | # libreadline needs libuser32.a in a cygwin environment |
6051 | WIN32LIBS= | |
6052 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
6053 | WIN32LIBS="-luser32" |
6054 | case "${target}" in | |
6055 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
6056 | ;; | |
6057 | esac | |
cd0fc7c3 | 6058 | fi |
c906108c | 6059 | |
7a292a7a | 6060 | |
3fc11d3e JM |
6061 | LIBGUI="../libgui/src/libgui.a" |
6062 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
6063 | ||
6064 | ||
7a292a7a | 6065 | |
8b93c638 JM |
6066 | # Check whether --with-cpu or --without-cpu was given. |
6067 | if test "${with_cpu+set}" = set; then | |
6068 | withval="$with_cpu" | |
6069 | case "${target}" in | |
6070 | powerpc-* | powerpcle-* ) | |
6071 | ## It would be nice to keep this table in sync with the one in | |
6072 | ## gcc/configure. | |
6073 | case "${with_cpu}" in | |
6074 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
6075 | | 604 | 750 ) | |
6076 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
6077 | ;; | |
6078 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
6079 | ## These are all RS6000 variants, as far as GDB is concerned. | |
6080 | with_cpu=rs6000 | |
6081 | ;; | |
6082 | 603e | ec603e ) | |
6083 | with_cpu=603 | |
6084 | ;; | |
6085 | 604e ) | |
6086 | with_cpu=604 | |
6087 | ;; | |
6088 | * ) | |
6089 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
6090 | with_cpu=ppc-uisa | |
6091 | ;; | |
6092 | esac | |
6093 | ;; | |
6094 | * ) | |
6095 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
6096 | ;; | |
6097 | esac | |
6098 | cat >> confdefs.h <<EOF | |
6099 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
6100 | EOF | |
6101 | ||
6102 | ||
6103 | fi | |
6104 | ||
6105 | ||
6106 | ||
3fc11d3e JM |
6107 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
6108 | if test "${enable_gdbtk+set}" = set; then | |
6109 | enableval="$enable_gdbtk" | |
6110 | case "${enableval}" in | |
6111 | yes) | |
6112 | case "$host" in | |
6113 | *go32*) | |
6114 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6115 | enable_gdbtk=no ;; | |
6116 | *windows*) | |
6117 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6118 | enable_gdbtk=no ;; | |
6119 | *) | |
6120 | enable_gdbtk=yes ;; | |
6121 | esac ;; | |
6122 | no) | |
6123 | enable_gdbtk=no ;; | |
6124 | *) | |
6125 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
6126 | esac | |
6127 | else | |
6128 | ||
6129 | # Default is on for everything but go32 and Cygwin | |
6130 | case "$host" in | |
6131 | *go32* | *windows*) | |
6132 | ;; | |
6133 | *) | |
379d6434 AC |
6134 | if test -d "${srcdir}/gdbtk" ; then |
6135 | enable_gdbtk=yes | |
6136 | fi | |
6137 | ;; | |
6138 | esac | |
3fc11d3e JM |
6139 | |
6140 | fi | |
6141 | ||
6142 | ||
6143 | WIN32LDAPP= | |
6144 | ||
6145 | ||
6146 | ||
6147 | configdir="unix" | |
6148 | ||
6149 | GDBTKLIBS= | |
6150 | if test "${enable_gdbtk}" = "yes"; then | |
6151 | ||
6152 | ||
6153 | # | |
6154 | # Ok, lets find the tcl configuration | |
6155 | # First, look for one uninstalled. | |
6156 | # the alternative search directory is invoked by --with-tclconfig | |
6157 | # | |
6158 | ||
6159 | if test x"${no_tcl}" = x ; then | |
6160 | # we reset no_tcl in case something fails here | |
6161 | no_tcl=true | |
6162 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
6163 | if test "${with_tclconfig+set}" = set; then | |
6164 | withval="$with_tclconfig" | |
6165 | with_tclconfig=${withval} | |
6166 | fi | |
6167 | ||
6168 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
29fe111d | 6169 | echo "configure:6170: checking for Tcl configuration" >&5 |
3fc11d3e JM |
6170 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
6171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6172 | else | |
6173 | ||
6174 | ||
6175 | # First check to see if --with-tclconfig was specified. | |
6176 | if test x"${with_tclconfig}" != x ; then | |
6177 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
6178 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
6179 | else | |
6180 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
6181 | fi | |
6182 | fi | |
6183 | ||
6184 | # then check for a private Tcl installation | |
6185 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6186 | for i in \ | |
6187 | ../tcl \ | |
6188 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
6189 | ../../tcl \ | |
6190 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
6191 | ../../../tcl \ | |
6192 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
6193 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6194 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6195 | break | |
6196 | fi | |
6197 | done | |
6198 | fi | |
6199 | # check in a few common install locations | |
6200 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6201 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6202 | if test -f "$i/tclConfig.sh" ; then | |
6203 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
6204 | break | |
6205 | fi | |
6206 | done | |
6207 | fi | |
6208 | # check in a few other private locations | |
6209 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6210 | for i in \ | |
6211 | ${srcdir}/../tcl \ | |
6212 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
6213 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6214 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6215 | break | |
6216 | fi | |
6217 | done | |
6218 | fi | |
6219 | ||
6220 | fi | |
6221 | ||
6222 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6223 | TCLCONFIG="# no Tcl configs found" | |
6224 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
6225 | else | |
6226 | no_tcl= | |
6227 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
6228 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
6229 | fi | |
6230 | fi | |
6231 | ||
6232 | if test -z "${no_tcl}"; then | |
6233 | ||
6234 | . $TCLCONFIG | |
6235 | ||
6236 | ||
6237 | ||
6238 | ||
6239 | ||
6240 | ||
6241 | ||
6242 | ||
6243 | ||
6244 | ||
6245 | ||
6246 | ||
6247 | ||
6248 | ||
6249 | ||
6250 | ||
6251 | ||
6252 | ||
6253 | ||
6254 | ||
6255 | ||
6256 | ||
6257 | ||
6258 | ||
6259 | ||
6260 | ||
6261 | # | |
6262 | # Ok, lets find the tk configuration | |
6263 | # First, look for one uninstalled. | |
6264 | # the alternative search directory is invoked by --with-tkconfig | |
6265 | # | |
6266 | ||
6267 | if test x"${no_tk}" = x ; then | |
6268 | # we reset no_tk in case something fails here | |
6269 | no_tk=true | |
6270 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
6271 | if test "${with_tkconfig+set}" = set; then | |
6272 | withval="$with_tkconfig" | |
6273 | with_tkconfig=${withval} | |
6274 | fi | |
6275 | ||
6276 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
29fe111d | 6277 | echo "configure:6278: checking for Tk configuration" >&5 |
3fc11d3e JM |
6278 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
6279 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6280 | else | |
6281 | ||
6282 | ||
6283 | # First check to see if --with-tkconfig was specified. | |
6284 | if test x"${with_tkconfig}" != x ; then | |
6285 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
6286 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
6287 | else | |
6288 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
6289 | fi | |
6290 | fi | |
6291 | ||
6292 | # then check for a private Tk library | |
6293 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6294 | for i in \ | |
6295 | ../tk \ | |
6296 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
6297 | ../../tk \ | |
6298 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
6299 | ../../../tk \ | |
6300 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
6301 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6302 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6303 | break | |
6304 | fi | |
6305 | done | |
6306 | fi | |
6307 | # check in a few common install locations | |
6308 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6309 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6310 | if test -f "$i/tkConfig.sh" ; then | |
6311 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
6312 | break | |
6313 | fi | |
6314 | done | |
6315 | fi | |
6316 | # check in a few other private locations | |
6317 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6318 | for i in \ | |
6319 | ${srcdir}/../tk \ | |
6320 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
6321 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6322 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6323 | break | |
6324 | fi | |
6325 | done | |
6326 | fi | |
6327 | ||
6328 | fi | |
6329 | ||
6330 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6331 | TKCONFIG="# no Tk configs found" | |
6332 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
6333 | else | |
6334 | no_tk= | |
6335 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
6336 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
6337 | fi | |
6338 | fi | |
6339 | ||
6340 | ||
6341 | ||
6342 | # If $no_tk is nonempty, then we can't do Tk, and there is no | |
6343 | # point to doing Tcl. | |
6344 | if test -z "${no_tk}"; then | |
6345 | ||
6346 | if test -f "$TKCONFIG" ; then | |
6347 | . $TKCONFIG | |
6348 | fi | |
6349 | ||
6350 | ||
6351 | ||
6352 | ||
6353 | ||
6354 | ||
6355 | ||
6356 | ||
6357 | ||
6358 | ||
6359 | ||
6360 | ||
6361 | ||
6362 | ||
6363 | # | |
6364 | # Ok, lets find the tcl source trees so we can use the headers | |
6365 | # Warning: transition of version 9 to 10 will break this algorithm | |
6366 | # because 10 sorts before 9. We also look for just tcl. We have to | |
6367 | # be careful that we don't match stuff like tclX by accident. | |
6368 | # the alternative search directory is involked by --with-tclinclude | |
6369 | # | |
6370 | ||
6371 | no_tcl=true | |
6372 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
29fe111d | 6373 | echo "configure:6374: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
6374 | # Check whether --with-tclinclude or --without-tclinclude was given. |
6375 | if test "${with_tclinclude+set}" = set; then | |
6376 | withval="$with_tclinclude" | |
6377 | with_tclinclude=${withval} | |
6378 | fi | |
6379 | ||
6380 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
6381 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6382 | else | |
6383 | ||
6384 | # first check to see if --with-tclinclude was specified | |
6385 | if test x"${with_tclinclude}" != x ; then | |
6386 | if test -f ${with_tclinclude}/tclInt.h ; then | |
6387 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
6388 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
6389 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
6390 | else | |
6391 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6392 | fi | |
6393 | fi | |
6394 | ||
6395 | # next check if it came with Tcl configuration file | |
6396 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6397 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
6398 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
6399 | fi | |
6400 | fi | |
6401 | ||
6402 | # next check in private source directory | |
6403 | # | |
6404 | # since ls returns lowest version numbers first, reverse its output | |
6405 | if test x"${ac_cv_c_tclh}" = x ; then | |
6406 | for i in \ | |
6407 | ${srcdir}/../tcl \ | |
6408 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
6409 | ${srcdir}/../../tcl \ | |
6410 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
6411 | ${srcdir}/../../../tcl \ | |
6412 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
6413 | if test -f $i/generic/tclInt.h ; then | |
6414 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6415 | break | |
6416 | fi | |
6417 | done | |
6418 | fi | |
6419 | # finally check in a few common install locations | |
6420 | # | |
6421 | # since ls returns lowest version numbers first, reverse its output | |
6422 | if test x"${ac_cv_c_tclh}" = x ; then | |
6423 | for i in \ | |
6424 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
6425 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
6426 | /usr/local/src/tcl \ | |
6427 | /usr/local/lib/tcl \ | |
6428 | ${prefix}/include ; do | |
6429 | if test -f $i/generic/tclInt.h ; then | |
6430 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6431 | break | |
6432 | fi | |
6433 | done | |
6434 | fi | |
6435 | # see if one is installed | |
6436 | if test x"${ac_cv_c_tclh}" = x ; then | |
6437 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
6438 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
29fe111d | 6439 | echo "configure:6440: checking for tclInt.h" >&5 |
3fc11d3e JM |
6440 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6441 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6442 | else | |
6443 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 6444 | #line 6445 "configure" |
3fc11d3e JM |
6445 | #include "confdefs.h" |
6446 | #include <tclInt.h> | |
6447 | EOF | |
6448 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
29fe111d | 6449 | { (eval echo configure:6450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6450 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6451 | if test -z "$ac_err"; then | |
6452 | rm -rf conftest* | |
6453 | eval "ac_cv_header_$ac_safe=yes" | |
6454 | else | |
6455 | echo "$ac_err" >&5 | |
6456 | echo "configure: failed program was:" >&5 | |
6457 | cat conftest.$ac_ext >&5 | |
6458 | rm -rf conftest* | |
6459 | eval "ac_cv_header_$ac_safe=no" | |
6460 | fi | |
6461 | rm -f conftest* | |
6462 | fi | |
6463 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6464 | echo "$ac_t""yes" 1>&6 | |
6465 | ac_cv_c_tclh=installed | |
6466 | else | |
6467 | echo "$ac_t""no" 1>&6 | |
6468 | ac_cv_c_tclh="" | |
6469 | fi | |
6470 | ||
6471 | fi | |
6472 | ||
6473 | fi | |
6474 | ||
6475 | if test x"${ac_cv_c_tclh}" = x ; then | |
6476 | TCLHDIR="# no Tcl private headers found" | |
6477 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
6478 | fi | |
6479 | if test x"${ac_cv_c_tclh}" != x ; then | |
6480 | no_tcl="" | |
6481 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
6482 | echo "$ac_t""is installed" 1>&6 | |
6483 | TCLHDIR="" | |
6484 | else | |
6485 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
6486 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
6487 | TCLHDIR="-I${ac_cv_c_tclh}" | |
6488 | fi | |
6489 | fi | |
6490 | ||
6491 | ||
6492 | ||
6493 | ||
6494 | # | |
6495 | # Ok, lets find the tk source trees so we can use the headers | |
6496 | # If the directory (presumably symlink) named "tk" exists, use that one | |
6497 | # in preference to any others. Same logic is used when choosing library | |
6498 | # and again with Tcl. The search order is the best place to look first, then in | |
6499 | # decreasing significance. The loop breaks if the trigger file is found. | |
6500 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
6501 | # directory. This converts the path from a relative to an absolute, so | |
6502 | # recursive cache variables for the path will work right. We check all | |
6503 | # the possible paths in one loop rather than many seperate loops to speed | |
6504 | # things up. | |
6505 | # the alternative search directory is involked by --with-tkinclude | |
6506 | # | |
6507 | no_tk=true | |
6508 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
29fe111d | 6509 | echo "configure:6510: checking for Tk private headers" >&5 |
3fc11d3e JM |
6510 | # Check whether --with-tkinclude or --without-tkinclude was given. |
6511 | if test "${with_tkinclude+set}" = set; then | |
6512 | withval="$with_tkinclude" | |
6513 | with_tkinclude=${withval} | |
6514 | fi | |
6515 | ||
6516 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
6517 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6518 | else | |
6519 | ||
6520 | # first check to see if --with-tkinclude was specified | |
6521 | if test x"${with_tkinclude}" != x ; then | |
6522 | if test -f ${with_tkinclude}/tk.h ; then | |
6523 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
6524 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
6525 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
6526 | else | |
6527 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6528 | fi | |
6529 | fi | |
6530 | ||
6531 | # next check if it came with Tk configuration file | |
6532 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6533 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
6534 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
6535 | fi | |
6536 | fi | |
6537 | ||
6538 | # next check in private source directory | |
6539 | # | |
6540 | # since ls returns lowest version numbers first, reverse its output | |
6541 | if test x"${ac_cv_c_tkh}" = x ; then | |
6542 | for i in \ | |
6543 | ${srcdir}/../tk \ | |
6544 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
6545 | ${srcdir}/../../tk \ | |
6546 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
6547 | ${srcdir}/../../../tk \ | |
6548 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
6549 | if test -f $i/generic/tk.h ; then | |
6550 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6551 | break | |
6552 | fi | |
6553 | done | |
6554 | fi | |
6555 | # finally check in a few common install locations | |
6556 | # | |
6557 | # since ls returns lowest version numbers first, reverse its output | |
6558 | if test x"${ac_cv_c_tkh}" = x ; then | |
6559 | for i in \ | |
6560 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
6561 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
6562 | /usr/local/src/tk \ | |
6563 | /usr/local/lib/tk \ | |
6564 | ${prefix}/include ; do | |
6565 | if test -f $i/generic/tk.h ; then | |
6566 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6567 | break | |
6568 | fi | |
6569 | done | |
6570 | fi | |
6571 | # see if one is installed | |
6572 | if test x"${ac_cv_c_tkh}" = x ; then | |
6573 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
6574 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
29fe111d | 6575 | echo "configure:6576: checking for tk.h" >&5 |
3fc11d3e JM |
6576 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6577 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6578 | else | |
6579 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 6580 | #line 6581 "configure" |
3fc11d3e JM |
6581 | #include "confdefs.h" |
6582 | #include <tk.h> | |
6583 | EOF | |
6584 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
29fe111d | 6585 | { (eval echo configure:6586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6586 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6587 | if test -z "$ac_err"; then | |
6588 | rm -rf conftest* | |
6589 | eval "ac_cv_header_$ac_safe=yes" | |
6590 | else | |
6591 | echo "$ac_err" >&5 | |
6592 | echo "configure: failed program was:" >&5 | |
6593 | cat conftest.$ac_ext >&5 | |
6594 | rm -rf conftest* | |
6595 | eval "ac_cv_header_$ac_safe=no" | |
6596 | fi | |
6597 | rm -f conftest* | |
6598 | fi | |
6599 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6600 | echo "$ac_t""yes" 1>&6 | |
6601 | ac_cv_c_tkh=installed | |
6602 | else | |
6603 | echo "$ac_t""no" 1>&6 | |
6604 | ac_cv_c_tkh="" | |
6605 | fi | |
6606 | ||
6607 | fi | |
6608 | ||
6609 | fi | |
6610 | ||
6611 | if test x"${ac_cv_c_tkh}" != x ; then | |
6612 | no_tk="" | |
6613 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
6614 | echo "$ac_t""is installed" 1>&6 | |
6615 | TKHDIR="" | |
6616 | else | |
6617 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
6618 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
6619 | TKHDIR="-I${ac_cv_c_tkh}" | |
6620 | fi | |
6621 | else | |
6622 | TKHDIR="# no Tk directory found" | |
6623 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
6624 | no_tk=true | |
6625 | fi | |
6626 | ||
6627 | ||
6628 | ||
6629 | ||
6630 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
29fe111d | 6631 | echo "configure:6632: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6632 | if test x"${ac_cv_c_itclh}" = x ; then |
6633 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
6634 | if test -f $i/generic/itcl.h ; then | |
6635 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
6636 | break | |
6637 | fi | |
6638 | done | |
6639 | fi | |
6640 | if test x"${ac_cv_c_itclh}" = x ; then | |
6641 | ITCLHDIR="# no Itcl private headers found" | |
6642 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
6643 | fi | |
6644 | if test x"${ac_cv_c_itclh}" != x ; then | |
6645 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
6646 | fi | |
6647 | # should always be here | |
6648 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
6649 | ||
6650 | #AC_SUBST(ITCLLIB) | |
6651 | ||
6652 | ||
6653 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
29fe111d | 6654 | echo "configure:6655: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6655 | if test x"${ac_cv_c_itkh}" = x ; then |
6656 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
6657 | if test -f $i/generic/itk.h ; then | |
6658 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
6659 | break | |
6660 | fi | |
6661 | done | |
6662 | fi | |
6663 | if test x"${ac_cv_c_itkh}" = x ; then | |
6664 | ITKHDIR="# no Itk private headers found" | |
6665 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
6666 | fi | |
6667 | if test x"${ac_cv_c_itkh}" != x ; then | |
6668 | ITKHDIR="-I${ac_cv_c_itkh}" | |
6669 | fi | |
6670 | # should always be here | |
6671 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
6672 | ||
6673 | #AC_SUBST(ITKLIB) | |
6674 | ||
6675 | ||
6676 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
29fe111d | 6677 | echo "configure:6678: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6678 | if test x"${ac_cv_c_tixh}" = x ; then |
6679 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
6680 | if test -f $i/generic/tix.h ; then | |
6681 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
6682 | break | |
6683 | fi | |
6684 | done | |
6685 | fi | |
6686 | if test x"${ac_cv_c_tixh}" = x ; then | |
6687 | TIXHDIR="# no Tix private headers found" | |
6688 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
6689 | fi | |
6690 | if test x"${ac_cv_c_tixh}" != x ; then | |
6691 | TIXHDIR="-I${ac_cv_c_tixh}" | |
6692 | fi | |
6693 | ||
6694 | ||
6695 | ||
6696 | # now look for Itcl library stuff | |
6697 | ||
6698 | ||
6699 | # | |
6700 | # Ok, lets find the itcl configuration | |
6701 | # First, look for one uninstalled. | |
6702 | # the alternative search directory is invoked by --with-itclconfig | |
6703 | # | |
6704 | ||
6705 | if test x"${no_itcl}" = x ; then | |
6706 | # we reset no_itcl in case something fails here | |
6707 | no_itcl=true | |
6708 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
6709 | if test "${with_itclconfig+set}" = set; then | |
6710 | withval="$with_itclconfig" | |
6711 | with_itclconfig=${withval} | |
6712 | fi | |
6713 | ||
6714 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
29fe111d | 6715 | echo "configure:6716: checking for Itcl configuration" >&5 |
3fc11d3e JM |
6716 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
6717 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6718 | else | |
6719 | ||
6720 | ||
6721 | # First check to see if --with-itclconfig was specified. | |
6722 | if test x"${with_itclconfig}" != x ; then | |
6723 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
6724 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
6725 | else | |
6726 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
6727 | fi | |
6728 | fi | |
6729 | ||
6730 | # then check for a private Itcl library | |
6731 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6732 | for i in \ | |
6733 | ../itcl/itcl \ | |
6734 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
6735 | ../../itcl \ | |
6736 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
6737 | ../../../itcl \ | |
6738 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6739 | if test -f "$i/itclConfig.sh" ; then | |
6740 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6741 | break | |
6742 | fi | |
6743 | done | |
6744 | fi | |
6745 | # check in a few common install locations | |
6746 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6747 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6748 | if test -f "$i/itclConfig.sh" ; then | |
6749 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6750 | break | |
6751 | fi | |
6752 | done | |
6753 | fi | |
6754 | # check in a few other private locations | |
6755 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6756 | for i in \ | |
6757 | ${srcdir}/../itcl/itcl \ | |
6758 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6759 | if test -f "$i/itclConfig.sh" ; then | |
6760 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6761 | break | |
6762 | fi | |
6763 | done | |
6764 | fi | |
6765 | ||
6766 | fi | |
6767 | ||
6768 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6769 | ITCLCONFIG="# no Itcl configs found" | |
6770 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
6771 | else | |
6772 | no_itcl= | |
6773 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
6774 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
6775 | fi | |
6776 | fi | |
6777 | ||
6778 | if test -z "${no_itcl}"; then | |
6779 | ||
6780 | if test -f "$ITCLCONFIG" ; then | |
6781 | . $ITCLCONFIG | |
6782 | fi | |
6783 | ||
6784 | ||
6785 | ||
6786 | ||
6787 | ||
6788 | ||
6789 | ||
6790 | ||
6791 | ||
6792 | ||
6793 | ||
6794 | case "${host}" in | |
6795 | *-*-cygwin*) | |
6796 | itcldir=../itcl/itcl/win/ | |
6797 | ;; | |
6798 | *) | |
6799 | itcldir=../itcl/itcl/unix/ | |
6800 | ;; | |
6801 | esac | |
6802 | ||
6803 | ||
6804 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
6805 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
6806 | fi | |
6807 | ||
6808 | ||
6809 | # now look for Itk library stuff | |
6810 | ||
6811 | # | |
6812 | # Ok, lets find the itk configuration | |
6813 | # First, look for one uninstalled. | |
6814 | # the alternative search directory is invoked by --with-itkconfig | |
6815 | # | |
6816 | ||
6817 | if test x"${no_itk}" = x ; then | |
6818 | # we reset no_itk in case something fails here | |
6819 | no_itk=true | |
6820 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
6821 | if test "${with_itkconfig+set}" = set; then | |
6822 | withval="$with_itkconfig" | |
6823 | with_itkconfig=${withval} | |
6824 | fi | |
6825 | ||
6826 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
29fe111d | 6827 | echo "configure:6828: checking for Itk configuration" >&5 |
3fc11d3e JM |
6828 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
6829 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6830 | else | |
6831 | ||
6832 | ||
6833 | # First check to see if --with-itkconfig was specified. | |
6834 | if test x"${with_itkconfig}" != x ; then | |
6835 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
6836 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
6837 | else | |
6838 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
6839 | fi | |
6840 | fi | |
6841 | ||
6842 | # then check for a private Itk library | |
6843 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6844 | for i in \ | |
6845 | ../itcl/itk \ | |
6846 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
6847 | ../../itk \ | |
6848 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
6849 | ../../../itk \ | |
6850 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
6851 | if test -f "$i/itkConfig.sh" ; then | |
6852 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6853 | break | |
6854 | fi | |
6855 | done | |
6856 | fi | |
6857 | # check in a few common install locations | |
6858 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6859 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6860 | if test -f "$i/itkConfig.sh" ; then | |
6861 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6862 | break | |
6863 | fi | |
6864 | done | |
6865 | fi | |
6866 | # check in a few other private locations | |
6867 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6868 | for i in \ | |
6869 | ${srcdir}/../itcl/itk \ | |
6870 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
6871 | if test -f "$i/itkConfig.sh" ; then | |
6872 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6873 | break | |
6874 | fi | |
6875 | done | |
6876 | fi | |
6877 | ||
6878 | fi | |
6879 | ||
6880 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6881 | ITKCONFIG="# no Itk configs found" | |
6882 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
6883 | else | |
6884 | no_itk= | |
6885 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
6886 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
6887 | fi | |
6888 | fi | |
6889 | ||
6890 | ||
6891 | if test -z "${no_itcl}"; then | |
6892 | ||
6893 | if test -f "$ITKCONFIG" ; then | |
6894 | . $ITKCONFIG | |
6895 | fi | |
6896 | ||
6897 | ||
6898 | ||
6899 | ||
6900 | ||
6901 | ||
6902 | ||
6903 | ||
6904 | ||
6905 | ||
6906 | ||
6907 | ||
6908 | case "${host}" in | |
6909 | *-*-cygwin*) | |
6910 | itkdir=../itcl/itk/win/ | |
6911 | ;; | |
6912 | *) | |
6913 | itkdir=../itcl/itk/unix/ | |
6914 | ;; | |
6915 | esac | |
6916 | ||
6917 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
6918 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
6919 | fi | |
6920 | ||
6921 | # now look for Tix library stuff | |
6922 | ||
6923 | # | |
6924 | # Ok, lets find the tix configuration | |
6925 | # First, look for one uninstalled. | |
6926 | # the alternative search directory is invoked by --with-itkconfig | |
6927 | # | |
6928 | ||
6929 | if test x"${no_tix}" = x ; then | |
6930 | # we reset no_tix in case something fails here | |
6931 | no_tix=true | |
6932 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
6933 | if test "${with_tixconfig+set}" = set; then | |
6934 | withval="$with_tixconfig" | |
6935 | with_tixconfig=${withval} | |
6936 | fi | |
6937 | ||
6938 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
29fe111d | 6939 | echo "configure:6940: checking for Tix configuration" >&5 |
3fc11d3e JM |
6940 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
6941 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6942 | else | |
6943 | ||
6944 | ||
6945 | # First check to see if --with-tixconfig was specified. | |
6946 | if test x"${with_tixconfig}" != x ; then | |
6947 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
6948 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
6949 | else | |
6950 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
6951 | fi | |
6952 | fi | |
6953 | ||
6954 | # then check for a private Tix library | |
6955 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6956 | for i in \ | |
6957 | ../tix \ | |
6958 | `ls -dr ../tix 2>/dev/null` \ | |
6959 | ../../tix \ | |
6960 | `ls -dr ../../tix 2>/dev/null` \ | |
6961 | ../../../tix \ | |
6962 | `ls -dr ../../../tix 2>/dev/null` ; do | |
6963 | echo "**** Looking at $i - with ${configdir}" | |
6964 | if test -f "$i/tixConfig.sh" ; then | |
6965 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6966 | break | |
6967 | fi | |
6968 | done | |
6969 | fi | |
6970 | # check in a few common install locations | |
6971 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6972 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6973 | echo "**** Looking at $i" | |
6974 | if test -f "$i/tixConfig.sh" ; then | |
6975 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6976 | break | |
6977 | fi | |
6978 | done | |
6979 | fi | |
6980 | # check in a few other private locations | |
6981 | echo "**** Other private locations" | |
6982 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6983 | for i in \ | |
6984 | ${srcdir}/../tix \ | |
6985 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
6986 | echo "**** Looking at $i - with ${configdir}" | |
6987 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
6988 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
6989 | break | |
6990 | fi | |
6991 | done | |
6992 | fi | |
6993 | ||
6994 | fi | |
6995 | ||
6996 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6997 | TIXCONFIG="# no Tix configs found" | |
6998 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
6999 | else | |
7000 | no_tix= | |
7001 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
7002 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
7003 | fi | |
7004 | fi | |
7005 | ||
7006 | ||
7007 | if test -z "${no_tix}"; then | |
7008 | ||
7009 | if test -f "$TIXCONFIG" ; then | |
7010 | . $TIXCONFIG | |
7011 | fi | |
7012 | ||
7013 | ||
7014 | ||
7015 | ||
7016 | ||
7017 | ||
7018 | ||
7019 | ||
7020 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
7021 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
7022 | fi | |
7023 | ||
3fc11d3e JM |
7024 | ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK" |
7025 | # Tcl/Tk 8.1 require -fwritable strings. I don't | |
7026 | # know whether 8.2 will or not, but I bet it will. | |
7027 | # I don't have to worry about 7.x since we don't support it. | |
7028 | GDBTK_CFLAGS="" | |
7029 | if test "$GCC" = "yes"; then | |
7030 | if test "$TCL_VERSION" != "8.0" ; then | |
7031 | GDBTK_CFLAGS="-fwritable-strings" | |
7032 | fi | |
7033 | fi | |
7034 | ||
7035 | # Include some libraries that Tcl and Tk want. | |
7036 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
7037 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
7038 | # Yes, the ordering seems wrong here. But it isn't. | |
7039 | # TK_LIBS is the list of libraries that need to be linked | |
7040 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
7041 | # were in LIBS then any link tests after this point would | |
7042 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
7043 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
d45b9300 FN |
7044 | 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" |
7045 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o" | |
7046 | 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 AC |
7047 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
7048 | CONFIG_CLEAN="${CONFIG_ALL} \$(SUBDIR_GDBTK_CLEAN)" | |
e56ac5c3 AC |
7049 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
7050 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
7051 | |
7052 | if test x$gdb_cv_os_cygwin = xyes; then | |
7053 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
7054 | WIN32LDAPP="-Wl,--subsystem,console" | |
7055 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
7056 | fi | |
7057 | fi | |
7058 | fi | |
7059 | fi | |
7060 | ||
7061 | ||
7062 | ||
7063 | ||
7064 | ||
7065 | ||
7066 | ||
7067 | ||
7068 | ||
7069 | ||
7070 | ||
7071 | ||
7072 | ||
c906108c SS |
7073 | # If we find X, set shell vars x_includes and x_libraries to the |
7074 | # paths, otherwise set no_x=yes. | |
7075 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
7076 | # --without-x overrides everything else, but does not touch the cache. | |
7077 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
29fe111d | 7078 | echo "configure:7079: checking for X" >&5 |
c906108c SS |
7079 | |
7080 | # Check whether --with-x or --without-x was given. | |
7081 | if test "${with_x+set}" = set; then | |
7082 | withval="$with_x" | |
7083 | : | |
7084 | fi | |
7085 | ||
7086 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
7087 | if test "x$with_x" = xno; then | |
7088 | # The user explicitly disabled X. | |
7089 | have_x=disabled | |
7090 | else | |
7091 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
7092 | # Both variables are already set. | |
7093 | have_x=yes | |
7094 | else | |
7095 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
7096 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7097 | else | |
7098 | # One or both of the vars are not set, and there is no cached value. | |
7099 | ac_x_includes=NO ac_x_libraries=NO | |
7100 | rm -fr conftestdir | |
7101 | if mkdir conftestdir; then | |
7102 | cd conftestdir | |
7103 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
7104 | cat > Imakefile <<'EOF' | |
7105 | acfindx: | |
7106 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
7107 | EOF | |
7108 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
7109 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
7110 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
7111 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
7112 | for ac_extension in a so sl; do | |
7113 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
7114 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
7115 | ac_im_usrlibdir=$ac_im_libdir; break | |
7116 | fi | |
7117 | done | |
7118 | # Screen out bogus values from the imake configuration. They are | |
7119 | # bogus both because they are the default anyway, and because | |
7120 | # using them would break gcc on systems where it needs fixed includes. | |
7121 | case "$ac_im_incroot" in | |
7122 | /usr/include) ;; | |
7123 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
7124 | esac | |
7125 | case "$ac_im_usrlibdir" in | |
7126 | /usr/lib | /lib) ;; | |
7127 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
7128 | esac | |
7129 | fi | |
7130 | cd .. | |
7131 | rm -fr conftestdir | |
7132 | fi | |
7133 | ||
7134 | if test "$ac_x_includes" = NO; then | |
7135 | # Guess where to find include files, by looking for this one X11 .h file. | |
7136 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
7137 | ||
7138 | # First, try using that file with no special directory specified. | |
7139 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 7140 | #line 7141 "configure" |
c906108c SS |
7141 | #include "confdefs.h" |
7142 | #include <$x_direct_test_include> | |
7143 | EOF | |
7144 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
29fe111d | 7145 | { (eval echo configure:7146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
7146 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7147 | if test -z "$ac_err"; then | |
7148 | rm -rf conftest* | |
7149 | # We can compile using X headers with no special include directory. | |
7150 | ac_x_includes= | |
7151 | else | |
7152 | echo "$ac_err" >&5 | |
7153 | echo "configure: failed program was:" >&5 | |
7154 | cat conftest.$ac_ext >&5 | |
7155 | rm -rf conftest* | |
7156 | # Look for the header file in a standard set of common directories. | |
7157 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7158 | for ac_dir in \ | |
7159 | /usr/X11/include \ | |
7160 | /usr/X11R6/include \ | |
7161 | /usr/X11R5/include \ | |
7162 | /usr/X11R4/include \ | |
7163 | \ | |
7164 | /usr/include/X11 \ | |
7165 | /usr/include/X11R6 \ | |
7166 | /usr/include/X11R5 \ | |
7167 | /usr/include/X11R4 \ | |
7168 | \ | |
7169 | /usr/local/X11/include \ | |
7170 | /usr/local/X11R6/include \ | |
7171 | /usr/local/X11R5/include \ | |
7172 | /usr/local/X11R4/include \ | |
7173 | \ | |
7174 | /usr/local/include/X11 \ | |
7175 | /usr/local/include/X11R6 \ | |
7176 | /usr/local/include/X11R5 \ | |
7177 | /usr/local/include/X11R4 \ | |
7178 | \ | |
7179 | /usr/X386/include \ | |
7180 | /usr/x386/include \ | |
7181 | /usr/XFree86/include/X11 \ | |
7182 | \ | |
7183 | /usr/include \ | |
7184 | /usr/local/include \ | |
7185 | /usr/unsupported/include \ | |
7186 | /usr/athena/include \ | |
7187 | /usr/local/x11r5/include \ | |
7188 | /usr/lpp/Xamples/include \ | |
7189 | \ | |
7190 | /usr/openwin/include \ | |
7191 | /usr/openwin/share/include \ | |
7192 | ; \ | |
7193 | do | |
7194 | if test -r "$ac_dir/$x_direct_test_include"; then | |
7195 | ac_x_includes=$ac_dir | |
7196 | break | |
7197 | fi | |
7198 | done | |
7199 | fi | |
7200 | rm -f conftest* | |
7201 | fi # $ac_x_includes = NO | |
7202 | ||
7203 | if test "$ac_x_libraries" = NO; then | |
7204 | # Check for the libraries. | |
7205 | ||
7206 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
7207 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
7208 | ||
7209 | # See if we find them without any special options. | |
7210 | # Don't add to $LIBS permanently. | |
7211 | ac_save_LIBS="$LIBS" | |
7212 | LIBS="-l$x_direct_test_library $LIBS" | |
7213 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 7214 | #line 7215 "configure" |
c906108c SS |
7215 | #include "confdefs.h" |
7216 | ||
7217 | int main() { | |
7218 | ${x_direct_test_function}() | |
7219 | ; return 0; } | |
7220 | EOF | |
29fe111d | 7221 | if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7222 | rm -rf conftest* |
7223 | LIBS="$ac_save_LIBS" | |
7224 | # We can link X programs with no special library path. | |
7225 | ac_x_libraries= | |
7226 | else | |
7227 | echo "configure: failed program was:" >&5 | |
7228 | cat conftest.$ac_ext >&5 | |
7229 | rm -rf conftest* | |
7230 | LIBS="$ac_save_LIBS" | |
7231 | # First see if replacing the include by lib works. | |
7232 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7233 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
7234 | /usr/X11/lib \ | |
7235 | /usr/X11R6/lib \ | |
7236 | /usr/X11R5/lib \ | |
7237 | /usr/X11R4/lib \ | |
7238 | \ | |
7239 | /usr/lib/X11 \ | |
7240 | /usr/lib/X11R6 \ | |
7241 | /usr/lib/X11R5 \ | |
7242 | /usr/lib/X11R4 \ | |
7243 | \ | |
7244 | /usr/local/X11/lib \ | |
7245 | /usr/local/X11R6/lib \ | |
7246 | /usr/local/X11R5/lib \ | |
7247 | /usr/local/X11R4/lib \ | |
7248 | \ | |
7249 | /usr/local/lib/X11 \ | |
7250 | /usr/local/lib/X11R6 \ | |
7251 | /usr/local/lib/X11R5 \ | |
7252 | /usr/local/lib/X11R4 \ | |
7253 | \ | |
7254 | /usr/X386/lib \ | |
7255 | /usr/x386/lib \ | |
7256 | /usr/XFree86/lib/X11 \ | |
7257 | \ | |
7258 | /usr/lib \ | |
7259 | /usr/local/lib \ | |
7260 | /usr/unsupported/lib \ | |
7261 | /usr/athena/lib \ | |
7262 | /usr/local/x11r5/lib \ | |
7263 | /usr/lpp/Xamples/lib \ | |
7264 | /lib/usr/lib/X11 \ | |
7265 | \ | |
7266 | /usr/openwin/lib \ | |
7267 | /usr/openwin/share/lib \ | |
7268 | ; \ | |
7269 | do | |
7270 | for ac_extension in a so sl; do | |
7271 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
7272 | ac_x_libraries=$ac_dir | |
7273 | break 2 | |
7274 | fi | |
7275 | done | |
7276 | done | |
7277 | fi | |
7278 | rm -f conftest* | |
7279 | fi # $ac_x_libraries = NO | |
7280 | ||
7281 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
7282 | # Didn't find X anywhere. Cache the known absence of X. | |
7283 | ac_cv_have_x="have_x=no" | |
7284 | else | |
7285 | # Record where we found X for the cache. | |
7286 | ac_cv_have_x="have_x=yes \ | |
7287 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
7288 | fi | |
7289 | fi | |
7290 | fi | |
7291 | eval "$ac_cv_have_x" | |
7292 | fi # $with_x != no | |
7293 | ||
7294 | if test "$have_x" != yes; then | |
7295 | echo "$ac_t""$have_x" 1>&6 | |
7296 | no_x=yes | |
7297 | else | |
7298 | # If each of the values was on the command line, it overrides each guess. | |
7299 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
7300 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
7301 | # Update the cache value to reflect the command line values. | |
7302 | ac_cv_have_x="have_x=yes \ | |
7303 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
7304 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
7305 | fi | |
7306 | ||
7307 | ||
7a292a7a SS |
7308 | |
7309 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
7310 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
7311 | # This code just checks for a few cases where we'd like to ignore those | |
7312 | # definitions, even when they're present in the '.mt' file. These cases | |
7313 | # are when --disable-sim is specified, or if the simulator directory is | |
7314 | # not part of the soruce tree. | |
7315 | # | |
7316 | # Check whether --enable-sim or --disable-sim was given. | |
7317 | if test "${enable_sim+set}" = set; then | |
7318 | enableval="$enable_sim" | |
7319 | echo "enable_sim = $enable_sim"; | |
7320 | echo "enableval = ${enableval}"; | |
7321 | case "${enableval}" in | |
7322 | yes) ignore_sim=false ;; | |
7323 | no) ignore_sim=true ;; | |
7324 | *) ignore_sim=false ;; | |
7325 | esac | |
7326 | else | |
7327 | ignore_sim=false | |
7328 | fi | |
7329 | ||
7330 | ||
7331 | if test ! -d "${srcdir}/../sim"; then | |
7332 | ignore_sim=true | |
7333 | fi | |
7334 | ||
7335 | if test "${ignore_sim}" = "true"; then | |
7336 | IGNORE_SIM="SIM=" | |
7337 | IGNORE_SIM_OBS="SIM_OBS=" | |
7338 | else | |
7339 | IGNORE_SIM="" | |
7340 | IGNORE_SIM_OBS="" | |
7341 | cat >> confdefs.h <<\EOF | |
7342 | #define WITH_SIM 1 | |
7343 | EOF | |
7344 | ||
7345 | fi | |
7346 | ||
7347 | ||
7348 | ||
c906108c SS |
7349 | |
7350 | ||
7351 | ||
7352 | ||
7353 | ||
7354 | ||
dfcd3bfb | 7355 | |
e56ac5c3 AC |
7356 | |
7357 | ||
b3a90332 AC |
7358 | |
7359 | ||
c906108c SS |
7360 | # Begin stuff to support --enable-shared |
7361 | # Check whether --enable-shared or --disable-shared was given. | |
7362 | if test "${enable_shared+set}" = set; then | |
7363 | enableval="$enable_shared" | |
7364 | case "${enableval}" in | |
7365 | yes) shared=true ;; | |
7366 | no) shared=false ;; | |
7367 | *) shared=true ;; | |
7368 | esac | |
7369 | fi | |
7370 | ||
7371 | HLDFLAGS= | |
7372 | HLDENV= | |
7373 | # If we have shared libraries, try to set rpath reasonably. | |
7374 | if test "${shared}" = "true"; then | |
7375 | case "${host}" in | |
7376 | *-*-hpux*) | |
7377 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
7378 | ;; | |
7379 | *-*-irix5* | *-*-irix6*) | |
7380 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
7381 | ;; | |
7382 | *-*-linux*aout*) | |
7383 | ;; | |
88987551 | 7384 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
7385 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
7386 | ;; | |
7387 | *-*-solaris*) | |
7388 | HLDFLAGS='-R $(libdir)' | |
7389 | ;; | |
7390 | *-*-sysv4*) | |
7391 | 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;' | |
7392 | ;; | |
7393 | esac | |
7394 | fi | |
7395 | ||
7396 | # On SunOS, if the linker supports the -rpath option, use it to | |
7397 | # prevent ../bfd and ../opcodes from being included in the run time | |
7398 | # search path. | |
7399 | case "${host}" in | |
7400 | *-*-sunos*) | |
7401 | echo 'main () { }' > conftest.c | |
7402 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
7403 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
7404 | : | |
7405 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
7406 | : | |
7407 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
7408 | : | |
7409 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
7410 | : | |
7411 | elif test "${shared}" = "true"; then | |
7412 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
7413 | else | |
7414 | HLDFLAGS='-Wl,-rpath=' | |
7415 | fi | |
7416 | rm -f conftest.t conftest.c conftest | |
7417 | ;; | |
7418 | esac | |
7419 | ||
7420 | ||
7421 | # End stuff to support --enable-shared | |
7422 | ||
7423 | # target_subdir is used by the testsuite to find the target libraries. | |
7424 | target_subdir= | |
7425 | if test "${host}" != "${target}"; then | |
7426 | target_subdir="${target_alias}/" | |
7427 | fi | |
7428 | ||
7429 | ||
7430 | frags= | |
7431 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
7432 | if test ! -f ${host_makefile_frag}; then | |
7433 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
7434 | fi | |
7435 | frags="$frags $host_makefile_frag" | |
7436 | ||
7437 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
7438 | if test ! -f ${target_makefile_frag}; then | |
7439 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
7440 | fi | |
7441 | frags="$frags $target_makefile_frag" | |
7442 | ||
7443 | ||
7444 | ||
7445 | ||
7446 | ||
7447 | hostfile=`sed -n ' | |
7448 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7449 | ' ${host_makefile_frag}` | |
7450 | ||
7451 | targetfile=`sed -n ' | |
7452 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7453 | ' ${target_makefile_frag}` | |
7454 | ||
7455 | # these really aren't orthogonal true/false values of the same condition, | |
7456 | # but shells are slow enough that I like to reuse the test conditions | |
7457 | # whenever possible | |
7458 | if test "${target}" = "${host}"; then | |
7459 | nativefile=`sed -n ' | |
7460 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7461 | ' ${host_makefile_frag}` | |
7462 | # else | |
7463 | # GDBserver is only useful in a "native" enviroment | |
7464 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
7465 | fi | |
7466 | ||
7467 | ||
96baa820 JM |
7468 | SUBDIRS="doc testsuite nlm" |
7469 | if test "${enable_multi_ice}" = "yes"; then | |
7470 | SUBDIRS="${SUBDIRS} multi-ice" | |
7471 | fi | |
7472 | ||
7473 | ||
7474 | ||
c906108c SS |
7475 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
7476 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
7477 | # corresponding links. But we have to remove the xm.h files and tm.h | |
7478 | # files anyway, e.g. when switching from "configure host" to | |
7479 | # "configure none". | |
7480 | ||
7481 | files= | |
7482 | links= | |
7483 | rm -f xm.h | |
7484 | if test "${hostfile}" != ""; then | |
7485 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
7486 | links="${links} xm.h" | |
7487 | fi | |
7488 | rm -f tm.h | |
7489 | if test "${targetfile}" != ""; then | |
7490 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
7491 | links="${links} tm.h" | |
7492 | fi | |
7493 | rm -f nm.h | |
7494 | if test "${nativefile}" != ""; then | |
7495 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
7496 | links="${links} nm.h" | |
7497 | else | |
7498 | # A cross-only configuration. | |
7499 | files="${files} config/nm-empty.h" | |
7500 | links="${links} nm.h" | |
7501 | fi | |
3fc11d3e | 7502 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
29fe111d | 7503 | echo "configure:7504: checking whether ln -s works" >&5 |
3fc11d3e JM |
7504 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
7505 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7506 | else | |
7507 | rm -f conftestdata | |
7508 | if ln -s X conftestdata 2>/dev/null | |
7509 | then | |
7510 | rm -f conftestdata | |
7511 | ac_cv_prog_LN_S="ln -s" | |
7512 | else | |
7513 | ac_cv_prog_LN_S=ln | |
7514 | fi | |
7515 | fi | |
7516 | LN_S="$ac_cv_prog_LN_S" | |
7517 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
7518 | echo "$ac_t""yes" 1>&6 | |
7519 | else | |
7520 | echo "$ac_t""no" 1>&6 | |
7521 | fi | |
7522 | ||
c906108c SS |
7523 | |
7524 | ||
7525 | ||
7526 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
29fe111d | 7527 | echo "configure:7528: checking for Cygwin environment" >&5 |
c906108c SS |
7528 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
7529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7530 | else | |
7531 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 7532 | #line 7533 "configure" |
c906108c SS |
7533 | #include "confdefs.h" |
7534 | ||
7535 | int main() { | |
7536 | ||
7537 | #ifndef __CYGWIN__ | |
7538 | #define __CYGWIN__ __CYGWIN32__ | |
7539 | #endif | |
7540 | return __CYGWIN__; | |
7541 | ; return 0; } | |
7542 | EOF | |
29fe111d | 7543 | if { (eval echo configure:7544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7544 | rm -rf conftest* |
7545 | ac_cv_cygwin=yes | |
7546 | else | |
7547 | echo "configure: failed program was:" >&5 | |
7548 | cat conftest.$ac_ext >&5 | |
7549 | rm -rf conftest* | |
7550 | ac_cv_cygwin=no | |
7551 | fi | |
7552 | rm -f conftest* | |
7553 | rm -f conftest* | |
7554 | fi | |
7555 | ||
7556 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
7557 | CYGWIN= | |
7558 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
7559 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
29fe111d | 7560 | echo "configure:7561: checking for mingw32 environment" >&5 |
c906108c SS |
7561 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
7562 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7563 | else | |
7564 | cat > conftest.$ac_ext <<EOF | |
29fe111d | 7565 | #line 7566 "configure" |
c906108c SS |
7566 | #include "confdefs.h" |
7567 | ||
7568 | int main() { | |
7569 | return __MINGW32__; | |
7570 | ; return 0; } | |
7571 | EOF | |
29fe111d | 7572 | if { (eval echo configure:7573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7573 | rm -rf conftest* |
7574 | ac_cv_mingw32=yes | |
7575 | else | |
7576 | echo "configure: failed program was:" >&5 | |
7577 | cat conftest.$ac_ext >&5 | |
7578 | rm -rf conftest* | |
7579 | ac_cv_mingw32=no | |
7580 | fi | |
7581 | rm -f conftest* | |
7582 | rm -f conftest* | |
7583 | fi | |
7584 | ||
7585 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
7586 | MINGW32= | |
7587 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
7588 | ||
7589 | ||
7590 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
29fe111d | 7591 | echo "configure:7592: checking for executable suffix" >&5 |
c906108c SS |
7592 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
7593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7594 | else | |
7595 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
7596 | ac_cv_exeext=.exe | |
7597 | else | |
7598 | rm -f conftest* | |
7599 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
7600 | ac_cv_exeext= | |
29fe111d | 7601 | if { (eval echo configure:7602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
7602 | for file in conftest.*; do |
7603 | case $file in | |
2894793a | 7604 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
7605 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
7606 | esac | |
7607 | done | |
7608 | else | |
7609 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
7610 | fi | |
7611 | rm -f conftest* | |
7612 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
7613 | fi | |
7614 | fi | |
7615 | ||
7616 | EXEEXT="" | |
7617 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
7618 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
7619 | ac_exeext=$EXEEXT | |
7620 | ||
7621 | ||
7622 | subdirs="$configdirs" | |
7623 | ||
7624 | trap '' 1 2 15 | |
7625 | cat > confcache <<\EOF | |
7626 | # This file is a shell script that caches the results of configure | |
7627 | # tests run on this system so they can be shared between configure | |
7628 | # scripts and configure runs. It is not useful on other systems. | |
7629 | # If it contains results you don't want to keep, you may remove or edit it. | |
7630 | # | |
7631 | # By default, configure uses ./config.cache as the cache file, | |
7632 | # creating it if it does not exist already. You can give configure | |
7633 | # the --cache-file=FILE option to use a different cache file; that is | |
7634 | # what configure does when it calls configure scripts in | |
7635 | # subdirectories, so they share the cache. | |
7636 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7637 | # config.status only pays attention to the cache file if you give it the | |
7638 | # --recheck option to rerun configure. | |
7639 | # | |
7640 | EOF | |
7641 | # The following way of writing the cache mishandles newlines in values, | |
7642 | # but we know of no workaround that is simple, portable, and efficient. | |
7643 | # So, don't put newlines in cache variables' values. | |
7644 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7645 | # and sets the high bit in the cache file unless we assign to the vars. | |
7646 | (set) 2>&1 | | |
7647 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
7648 | *ac_space=\ *) | |
7649 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7650 | # turns \\\\ into \\, and sed turns \\ into \). | |
7651 | sed -n \ | |
7652 | -e "s/'/'\\\\''/g" \ | |
7653 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7654 | ;; | |
7655 | *) | |
7656 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7657 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7658 | ;; | |
7659 | esac >> confcache | |
7660 | if cmp -s $cache_file confcache; then | |
7661 | : | |
7662 | else | |
7663 | if test -w $cache_file; then | |
7664 | echo "updating cache $cache_file" | |
7665 | cat confcache > $cache_file | |
7666 | else | |
7667 | echo "not updating unwritable cache $cache_file" | |
7668 | fi | |
7669 | fi | |
7670 | rm -f confcache | |
7671 | ||
7672 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7673 | ||
7674 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7675 | # Let make expand exec_prefix. | |
7676 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7677 | ||
7678 | # Any assignment to VPATH causes Sun make to only execute | |
7679 | # the first set of double-colon rules, so remove it if not needed. | |
7680 | # If there is a colon in the path, we need to keep it. | |
7681 | if test "x$srcdir" = x.; then | |
7682 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7683 | fi | |
7684 | ||
7685 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7686 | ||
7687 | DEFS=-DHAVE_CONFIG_H | |
7688 | ||
7689 | # Without the "./", some shells look in PATH for config.status. | |
7690 | : ${CONFIG_STATUS=./config.status} | |
7691 | ||
7692 | echo creating $CONFIG_STATUS | |
7693 | rm -f $CONFIG_STATUS | |
7694 | cat > $CONFIG_STATUS <<EOF | |
7695 | #! /bin/sh | |
7696 | # Generated automatically by configure. | |
7697 | # Run this file to recreate the current configuration. | |
7698 | # This directory was configured as follows, | |
7699 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7700 | # | |
7701 | # $0 $ac_configure_args | |
7702 | # | |
7703 | # Compiler output produced by configure, useful for debugging | |
7704 | # configure, is in ./config.log if it exists. | |
7705 | ||
7706 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
7707 | for ac_option | |
7708 | do | |
7709 | case "\$ac_option" in | |
7710 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7711 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7712 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7713 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
7714 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
7715 | exit 0 ;; | |
7716 | -help | --help | --hel | --he | --h) | |
7717 | echo "\$ac_cs_usage"; exit 0 ;; | |
7718 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
7719 | esac | |
7720 | done | |
7721 | ||
7722 | ac_given_srcdir=$srcdir | |
7723 | ac_given_INSTALL="$INSTALL" | |
7724 | ||
ed952ac5 | 7725 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
7726 | EOF |
7727 | cat >> $CONFIG_STATUS <<EOF | |
7728 | ||
7729 | # Protect against being on the right side of a sed subst in config.status. | |
7730 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7731 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7732 | $ac_vpsub | |
7733 | $extrasub | |
7734 | s%@SHELL@%$SHELL%g | |
7735 | s%@CFLAGS@%$CFLAGS%g | |
7736 | s%@CPPFLAGS@%$CPPFLAGS%g | |
7737 | s%@CXXFLAGS@%$CXXFLAGS%g | |
7738 | s%@FFLAGS@%$FFLAGS%g | |
7739 | s%@DEFS@%$DEFS%g | |
7740 | s%@LDFLAGS@%$LDFLAGS%g | |
7741 | s%@LIBS@%$LIBS%g | |
7742 | s%@exec_prefix@%$exec_prefix%g | |
7743 | s%@prefix@%$prefix%g | |
7744 | s%@program_transform_name@%$program_transform_name%g | |
7745 | s%@bindir@%$bindir%g | |
7746 | s%@sbindir@%$sbindir%g | |
7747 | s%@libexecdir@%$libexecdir%g | |
7748 | s%@datadir@%$datadir%g | |
7749 | s%@sysconfdir@%$sysconfdir%g | |
7750 | s%@sharedstatedir@%$sharedstatedir%g | |
7751 | s%@localstatedir@%$localstatedir%g | |
7752 | s%@libdir@%$libdir%g | |
7753 | s%@includedir@%$includedir%g | |
7754 | s%@oldincludedir@%$oldincludedir%g | |
7755 | s%@infodir@%$infodir%g | |
7756 | s%@mandir@%$mandir%g | |
413ccac7 AC |
7757 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
7758 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
7759 | s%@MAINT@%$MAINT%g | |
c906108c SS |
7760 | s%@CC@%$CC%g |
7761 | s%@CPP@%$CPP%g | |
7762 | s%@host@%$host%g | |
7763 | s%@host_alias@%$host_alias%g | |
7764 | s%@host_cpu@%$host_cpu%g | |
7765 | s%@host_vendor@%$host_vendor%g | |
7766 | s%@host_os@%$host_os%g | |
7767 | s%@target@%$target%g | |
7768 | s%@target_alias@%$target_alias%g | |
7769 | s%@target_cpu@%$target_cpu%g | |
7770 | s%@target_vendor@%$target_vendor%g | |
7771 | s%@target_os@%$target_os%g | |
7772 | s%@build@%$build%g | |
7773 | s%@build_alias@%$build_alias%g | |
7774 | s%@build_cpu@%$build_cpu%g | |
7775 | s%@build_vendor@%$build_vendor%g | |
7776 | s%@build_os@%$build_os%g | |
7777 | s%@SET_MAKE@%$SET_MAKE%g | |
7778 | s%@RANLIB@%$RANLIB%g | |
7779 | s%@ALLOCA@%$ALLOCA%g | |
7780 | s%@USE_NLS@%$USE_NLS%g | |
7781 | s%@MSGFMT@%$MSGFMT%g | |
7782 | s%@GMSGFMT@%$GMSGFMT%g | |
7783 | s%@XGETTEXT@%$XGETTEXT%g | |
7784 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
7785 | s%@CATALOGS@%$CATALOGS%g | |
7786 | s%@CATOBJEXT@%$CATOBJEXT%g | |
7787 | s%@DATADIRNAME@%$DATADIRNAME%g | |
7788 | s%@GMOFILES@%$GMOFILES%g | |
7789 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
7790 | s%@INTLDEPS@%$INTLDEPS%g | |
7791 | s%@INTLLIBS@%$INTLLIBS%g | |
7792 | s%@INTLOBJS@%$INTLOBJS%g | |
7793 | s%@POFILES@%$POFILES%g | |
7794 | s%@POSUB@%$POSUB%g | |
7795 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
7796 | s%@GT_NO@%$GT_NO%g | |
7797 | s%@GT_YES@%$GT_YES%g | |
7798 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
7799 | s%@l@%$l%g | |
7a292a7a | 7800 | s%@AWK@%$AWK%g |
c906108c SS |
7801 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
7802 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
7803 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
7804 | s%@AR@%$AR%g | |
95ca63c4 CF |
7805 | s%@DLLTOOL@%$DLLTOOL%g |
7806 | s%@WINDRES@%$WINDRES%g | |
c906108c | 7807 | s%@YACC@%$YACC%g |
75c6e08a | 7808 | s%@MIG@%$MIG%g |
c906108c | 7809 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
c906108c | 7810 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 7811 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
7812 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
7813 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 7814 | s%@REGEX@%$REGEX%g |
c906108c | 7815 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 7816 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
7817 | s%@LIBGUI@%$LIBGUI%g |
7818 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
7819 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
7820 | s%@TCL_VERSION@%$TCL_VERSION%g | |
7821 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
7822 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
7823 | s%@TCL_CC@%$TCL_CC%g | |
7824 | s%@TCL_DEFS@%$TCL_DEFS%g | |
7825 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
7826 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
7827 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
7828 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
7829 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
7830 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
7831 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
7832 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
7833 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
7834 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
7835 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
7836 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
7837 | s%@TK_VERSION@%$TK_VERSION%g | |
7838 | s%@TK_DEFS@%$TK_DEFS%g | |
7839 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
7840 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
7841 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
7842 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
7843 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
7844 | s%@TCLHDIR@%$TCLHDIR%g | |
7845 | s%@TKHDIR@%$TKHDIR%g | |
7846 | s%@ITCLHDIR@%$ITCLHDIR%g | |
7847 | s%@ITKHDIR@%$ITKHDIR%g | |
7848 | s%@TIXHDIR@%$TIXHDIR%g | |
7849 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
7850 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
7851 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
7852 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
7853 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
7854 | s%@ITK_VERSION@%$ITK_VERSION%g | |
7855 | s%@ITK_DEFS@%$ITK_DEFS%g | |
7856 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
7857 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
7858 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7859 | s%@TIX_VERSION@%$TIX_VERSION%g | |
7860 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
7861 | s%@X_CFLAGS@%$X_CFLAGS%g |
7862 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
7863 | s%@X_LIBS@%$X_LIBS%g | |
7864 | s%@ITCLLIB@%$ITCLLIB%g | |
7865 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
7866 | s%@ITKLIB@%$ITKLIB%g | |
7867 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7868 | s%@TIXLIB@%$TIXLIB%g | |
7869 | s%@TIX_DEPS@%$TIX_DEPS%g | |
7870 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
7871 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
7872 | s%@IGNORE_SIM@%$IGNORE_SIM%g | |
7873 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
7874 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
7875 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
7876 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
7877 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 7878 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
7879 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
7880 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
7881 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
7882 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
7883 | s%@HLDFLAGS@%$HLDFLAGS%g |
7884 | s%@HLDENV@%$HLDENV%g | |
7885 | s%@target_subdir@%$target_subdir%g | |
7886 | /@host_makefile_frag@/r $host_makefile_frag | |
7887 | s%@host_makefile_frag@%%g | |
7888 | /@target_makefile_frag@/r $target_makefile_frag | |
7889 | s%@target_makefile_frag@%%g | |
7890 | s%@frags@%$frags%g | |
96baa820 | 7891 | s%@SUBDIRS@%$SUBDIRS%g |
7a292a7a | 7892 | s%@LN_S@%$LN_S%g |
c906108c SS |
7893 | s%@EXEEXT@%$EXEEXT%g |
7894 | s%@subdirs@%$subdirs%g | |
7895 | ||
7896 | CEOF | |
7897 | EOF | |
7898 | ||
7899 | cat >> $CONFIG_STATUS <<\EOF | |
7900 | ||
7901 | # Split the substitutions into bite-sized pieces for seds with | |
7902 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
7903 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
7904 | ac_file=1 # Number of current file. | |
7905 | ac_beg=1 # First line for current file. | |
7906 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
7907 | ac_more_lines=: | |
7908 | ac_sed_cmds="" | |
7909 | while $ac_more_lines; do | |
7910 | if test $ac_beg -gt 1; then | |
7911 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
7912 | else | |
7913 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
7914 | fi | |
7915 | if test ! -s conftest.s$ac_file; then | |
7916 | ac_more_lines=false | |
7917 | rm -f conftest.s$ac_file | |
7918 | else | |
7919 | if test -z "$ac_sed_cmds"; then | |
7920 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
7921 | else | |
7922 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
7923 | fi | |
7924 | ac_file=`expr $ac_file + 1` | |
7925 | ac_beg=$ac_end | |
7926 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
7927 | fi | |
7928 | done | |
7929 | if test -z "$ac_sed_cmds"; then | |
7930 | ac_sed_cmds=cat | |
7931 | fi | |
7932 | EOF | |
7933 | ||
7934 | cat >> $CONFIG_STATUS <<EOF | |
7935 | ||
ed952ac5 | 7936 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
7937 | EOF |
7938 | cat >> $CONFIG_STATUS <<\EOF | |
7939 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
7940 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
7941 | case "$ac_file" in | |
7942 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7943 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7944 | *) ac_file_in="${ac_file}.in" ;; | |
7945 | esac | |
7946 | ||
7947 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
7948 | ||
7949 | # Remove last slash and all that follows it. Not all systems have dirname. | |
7950 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7951 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7952 | # The file is in a subdirectory. | |
7953 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
7954 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
7955 | # A "../" for each directory in $ac_dir_suffix. | |
7956 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
7957 | else | |
7958 | ac_dir_suffix= ac_dots= | |
7959 | fi | |
7960 | ||
7961 | case "$ac_given_srcdir" in | |
7962 | .) srcdir=. | |
7963 | if test -z "$ac_dots"; then top_srcdir=. | |
7964 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
7965 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
7966 | *) # Relative path. | |
7967 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
7968 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
7969 | esac | |
7970 | ||
7971 | case "$ac_given_INSTALL" in | |
7972 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
7973 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
7974 | esac | |
7975 | ||
7976 | echo creating "$ac_file" | |
7977 | rm -f "$ac_file" | |
7978 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
7979 | case "$ac_file" in | |
7980 | *Makefile*) ac_comsub="1i\\ | |
7981 | # $configure_input" ;; | |
7982 | *) ac_comsub= ;; | |
7983 | esac | |
7984 | ||
7985 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
7986 | sed -e "$ac_comsub | |
7987 | s%@configure_input@%$configure_input%g | |
7988 | s%@srcdir@%$srcdir%g | |
7989 | s%@top_srcdir@%$top_srcdir%g | |
7990 | s%@INSTALL@%$INSTALL%g | |
7991 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
7992 | fi; done | |
7993 | rm -f conftest.s* | |
7994 | ||
7995 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
7996 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
7997 | # | |
7998 | # ac_d sets the value in "#define NAME VALUE" lines. | |
7999 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8000 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8001 | ac_dC='\3' | |
8002 | ac_dD='%g' | |
8003 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8004 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8005 | ac_uB='\([ ]\)%\1#\2define\3' | |
8006 | ac_uC=' ' | |
8007 | ac_uD='\4%g' | |
8008 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8009 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8010 | ac_eB='$%\1#\2define\3' | |
8011 | ac_eC=' ' | |
8012 | ac_eD='%g' | |
8013 | ||
8014 | if test "${CONFIG_HEADERS+set}" != set; then | |
8015 | EOF | |
8016 | cat >> $CONFIG_STATUS <<EOF | |
8017 | CONFIG_HEADERS="config.h:config.in" | |
8018 | EOF | |
8019 | cat >> $CONFIG_STATUS <<\EOF | |
8020 | fi | |
8021 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8022 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8023 | case "$ac_file" in | |
8024 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8025 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8026 | *) ac_file_in="${ac_file}.in" ;; | |
8027 | esac | |
8028 | ||
8029 | echo creating $ac_file | |
8030 | ||
8031 | rm -f conftest.frag conftest.in conftest.out | |
8032 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8033 | cat $ac_file_inputs > conftest.in | |
8034 | ||
8035 | EOF | |
8036 | ||
8037 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8038 | # the proper values into config.h.in to produce config.h. And first: | |
8039 | # Protect against being on the right side of a sed subst in config.status. | |
8040 | # Protect against being in an unquoted here document in config.status. | |
8041 | rm -f conftest.vals | |
8042 | cat > conftest.hdr <<\EOF | |
8043 | s/[\\&%]/\\&/g | |
8044 | s%[\\$`]%\\&%g | |
8045 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8046 | s%ac_d%ac_u%gp | |
8047 | s%ac_u%ac_e%gp | |
8048 | EOF | |
8049 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8050 | rm -f conftest.hdr | |
8051 | ||
8052 | # This sed command replaces #undef with comments. This is necessary, for | |
8053 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8054 | # on some systems where configure will not decide to define it. | |
8055 | cat >> conftest.vals <<\EOF | |
8056 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8057 | EOF | |
8058 | ||
8059 | # Break up conftest.vals because some shells have a limit on | |
8060 | # the size of here documents, and old seds have small limits too. | |
8061 | ||
8062 | rm -f conftest.tail | |
8063 | while : | |
8064 | do | |
8065 | ac_lines=`grep -c . conftest.vals` | |
8066 | # grep -c gives empty output for an empty file on some AIX systems. | |
8067 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8068 | # Write a limited-size here document to conftest.frag. | |
8069 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8070 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8071 | echo 'CEOF | |
8072 | sed -f conftest.frag conftest.in > conftest.out | |
8073 | rm -f conftest.in | |
8074 | mv conftest.out conftest.in | |
8075 | ' >> $CONFIG_STATUS | |
8076 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8077 | rm -f conftest.vals | |
8078 | mv conftest.tail conftest.vals | |
8079 | done | |
8080 | rm -f conftest.vals | |
8081 | ||
8082 | cat >> $CONFIG_STATUS <<\EOF | |
8083 | rm -f conftest.frag conftest.h | |
8084 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8085 | cat conftest.in >> conftest.h | |
8086 | rm -f conftest.in | |
8087 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8088 | echo "$ac_file is unchanged" | |
8089 | rm -f conftest.h | |
8090 | else | |
8091 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8092 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8093 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8094 | # The file is in a subdirectory. | |
8095 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8096 | fi | |
8097 | rm -f $ac_file | |
8098 | mv conftest.h $ac_file | |
8099 | fi | |
8100 | fi; done | |
8101 | ||
8102 | EOF | |
8103 | ||
8104 | cat >> $CONFIG_STATUS <<EOF | |
8105 | ac_sources="$files" | |
8106 | ac_dests="$links" | |
8107 | EOF | |
8108 | ||
8109 | cat >> $CONFIG_STATUS <<\EOF | |
8110 | srcdir=$ac_given_srcdir | |
8111 | while test -n "$ac_sources"; do | |
8112 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
8113 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
8114 | ||
8115 | echo "linking $srcdir/$ac_source to $ac_dest" | |
8116 | ||
8117 | if test ! -r $srcdir/$ac_source; then | |
8118 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
8119 | fi | |
8120 | rm -f $ac_dest | |
8121 | ||
8122 | # Make relative symlinks. | |
8123 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8124 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
8125 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
8126 | # The dest file is in a subdirectory. | |
8127 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
8128 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
8129 | # A "../" for each directory in $ac_dest_dir_suffix. | |
8130 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
8131 | else | |
8132 | ac_dest_dir_suffix= ac_dots= | |
8133 | fi | |
8134 | ||
8135 | case "$srcdir" in | |
8136 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
8137 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
8138 | esac | |
8139 | ||
8140 | # Make a symlink if possible; otherwise try a hard link. | |
8141 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
8142 | ln $srcdir/$ac_source $ac_dest; then : | |
8143 | else | |
8144 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
8145 | fi | |
8146 | done | |
8147 | EOF | |
8148 | cat >> $CONFIG_STATUS <<EOF | |
8149 | ||
8150 | gdb_host_cpu=$gdb_host_cpu | |
8151 | gdb_target_cpu=$gdb_target_cpu | |
8152 | nativefile=$nativefile | |
8153 | ||
8154 | EOF | |
8155 | cat >> $CONFIG_STATUS <<\EOF | |
8156 | ||
8157 | if test "${nativefile}" = ""; then | |
8158 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ | |
8159 | < Makefile > Makefile.tem | |
8160 | mv -f Makefile.tem Makefile | |
8161 | fi | |
8162 | ||
8163 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
8164 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
8165 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
8166 | mv -f Makefile.tmp Makefile | |
8167 | ||
2acceee2 | 8168 | |
c906108c SS |
8169 | case x$CONFIG_HEADERS in |
8170 | xconfig.h:config.in) | |
8171 | echo > stamp-h ;; | |
8172 | esac | |
8173 | ||
8174 | exit 0 | |
8175 | EOF | |
8176 | chmod +x $CONFIG_STATUS | |
8177 | rm -fr confdefs* $ac_clean_files | |
8178 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8179 | ||
8180 | if test "$no_recursion" != yes; then | |
8181 | ||
8182 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
8183 | ac_sub_configure_args= | |
8184 | ac_prev= | |
8185 | for ac_arg in $ac_configure_args; do | |
8186 | if test -n "$ac_prev"; then | |
8187 | ac_prev= | |
8188 | continue | |
8189 | fi | |
8190 | case "$ac_arg" in | |
8191 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
8192 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
8193 | ac_prev=cache_file ;; | |
8194 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
8195 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
8196 | ;; | |
8197 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
8198 | ac_prev=srcdir ;; | |
8199 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
8200 | ;; | |
8201 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
8202 | esac | |
8203 | done | |
8204 | ||
8205 | for ac_config_dir in $configdirs; do | |
8206 | ||
8207 | # Do not complain, so a configure script can configure whichever | |
8208 | # parts of a large source tree are present. | |
8209 | if test ! -d $srcdir/$ac_config_dir; then | |
8210 | continue | |
8211 | fi | |
8212 | ||
8213 | echo configuring in $ac_config_dir | |
8214 | ||
8215 | case "$srcdir" in | |
8216 | .) ;; | |
8217 | *) | |
8218 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
8219 | else | |
8220 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
8221 | fi | |
8222 | ;; | |
8223 | esac | |
8224 | ||
8225 | ac_popdir=`pwd` | |
8226 | cd $ac_config_dir | |
8227 | ||
8228 | # A "../" for each directory in /$ac_config_dir. | |
8229 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
8230 | ||
8231 | case "$srcdir" in | |
8232 | .) # No --srcdir option. We are building in place. | |
8233 | ac_sub_srcdir=$srcdir ;; | |
8234 | /*) # Absolute path. | |
8235 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
8236 | *) # Relative path. | |
8237 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
8238 | esac | |
8239 | ||
8240 | # Check for guested configure; otherwise get Cygnus style configure. | |
8241 | if test -f $ac_sub_srcdir/configure; then | |
8242 | ac_sub_configure=$ac_sub_srcdir/configure | |
8243 | elif test -f $ac_sub_srcdir/configure.in; then | |
8244 | ac_sub_configure=$ac_configure | |
8245 | else | |
8246 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
8247 | ac_sub_configure= | |
8248 | fi | |
8249 | ||
8250 | # The recursion is here. | |
8251 | if test -n "$ac_sub_configure"; then | |
8252 | ||
8253 | # Make the cache file name correct relative to the subdirectory. | |
8254 | case "$cache_file" in | |
8255 | /*) ac_sub_cache_file=$cache_file ;; | |
8256 | *) # Relative path. | |
8257 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
8258 | esac | |
8259 | case "$ac_given_INSTALL" in | |
8260 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8261 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8262 | esac | |
8263 | ||
8264 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
8265 | # The eval makes quoting arguments work. | |
8266 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
8267 | then : | |
8268 | else | |
8269 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
8270 | fi | |
8271 | fi | |
8272 | ||
8273 | cd $ac_popdir | |
8274 | done | |
8275 | fi | |
8276 | ||
8277 | ||
8278 | exit 0 |