Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
96baa820 JM |
21 | ac_help="$ac_help |
22 | --enable-multi-ice Build the multi-ice-gdb-server" | |
fb40c209 AC |
23 | ac_help="$ac_help |
24 | --enable-gdbmi Enable GDB-MI interface" | |
c906108c SS |
25 | ac_help="$ac_help |
26 | --enable-tui Enable full-screen terminal user interface" | |
27 | ac_help="$ac_help | |
28 | --enable-netrom Enable NetROM support" | |
29 | ac_help="$ac_help | |
30 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
31 | ac_help="$ac_help | |
32 | --with-mmalloc Use memory mapped malloc package" | |
88987551 L |
33 | ac_help="$ac_help |
34 | --with-included-regex Use included regex" | |
7a292a7a SS |
35 | ac_help="$ac_help |
36 | --with-cpu=CPU Set the default CPU variant to debug" | |
37 | ac_help="$ac_help | |
38 | --enable-gdbtk Enable GDBTK GUI front end" | |
39 | ac_help="$ac_help | |
40 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
41 | ac_help="$ac_help | |
42 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
43 | ac_help="$ac_help | |
44 | --with-tclinclude=DIR Directory where tcl private headers are" | |
45 | ac_help="$ac_help | |
46 | --with-tkinclude=DIR Directory where tk private headers are" | |
47 | ac_help="$ac_help | |
48 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
51 | ac_help="$ac_help | |
52 | --with-tixconfig Directory containing tix configuration (tixConfig.sh)" | |
c906108c SS |
53 | ac_help="$ac_help |
54 | --with-x use the X Window System" | |
7a292a7a SS |
55 | ac_help="$ac_help |
56 | --enable-sim Link gdb with simulator" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --enable-shared Use shared libraries" | |
59 | ||
60 | # Initialize some variables set by options. | |
61 | # The variables have the same names as the options, with | |
62 | # dashes changed to underlines. | |
63 | build=NONE | |
64 | cache_file=./config.cache | |
65 | exec_prefix=NONE | |
66 | host=NONE | |
67 | no_create= | |
68 | nonopt=NONE | |
69 | no_recursion= | |
70 | prefix=NONE | |
71 | program_prefix=NONE | |
72 | program_suffix=NONE | |
73 | program_transform_name=s,x,x, | |
74 | silent= | |
75 | site= | |
76 | srcdir= | |
77 | target=NONE | |
78 | verbose= | |
79 | x_includes=NONE | |
80 | x_libraries=NONE | |
81 | bindir='${exec_prefix}/bin' | |
82 | sbindir='${exec_prefix}/sbin' | |
83 | libexecdir='${exec_prefix}/libexec' | |
84 | datadir='${prefix}/share' | |
85 | sysconfdir='${prefix}/etc' | |
86 | sharedstatedir='${prefix}/com' | |
87 | localstatedir='${prefix}/var' | |
88 | libdir='${exec_prefix}/lib' | |
89 | includedir='${prefix}/include' | |
90 | oldincludedir='/usr/include' | |
91 | infodir='${prefix}/info' | |
92 | mandir='${prefix}/man' | |
93 | ||
94 | # Initialize some other variables. | |
95 | subdirs= | |
96 | MFLAGS= MAKEFLAGS= | |
97 | SHELL=${CONFIG_SHELL-/bin/sh} | |
98 | # Maximum number of lines to put in a shell here document. | |
99 | ac_max_here_lines=12 | |
100 | ||
101 | ac_prev= | |
102 | for ac_option | |
103 | do | |
104 | ||
105 | # If the previous option needs an argument, assign it. | |
106 | if test -n "$ac_prev"; then | |
107 | eval "$ac_prev=\$ac_option" | |
108 | ac_prev= | |
109 | continue | |
110 | fi | |
111 | ||
112 | case "$ac_option" in | |
113 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
114 | *) ac_optarg= ;; | |
115 | esac | |
116 | ||
117 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
118 | ||
119 | case "$ac_option" in | |
120 | ||
121 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
122 | ac_prev=bindir ;; | |
123 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
124 | bindir="$ac_optarg" ;; | |
125 | ||
126 | -build | --build | --buil | --bui | --bu) | |
127 | ac_prev=build ;; | |
128 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
129 | build="$ac_optarg" ;; | |
130 | ||
131 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
132 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
133 | ac_prev=cache_file ;; | |
134 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
135 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
136 | cache_file="$ac_optarg" ;; | |
137 | ||
138 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
139 | ac_prev=datadir ;; | |
140 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
141 | | --da=*) | |
142 | datadir="$ac_optarg" ;; | |
143 | ||
144 | -disable-* | --disable-*) | |
145 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
146 | # Reject names that are not valid shell variable names. | |
147 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
148 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
149 | fi | |
150 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
151 | eval "enable_${ac_feature}=no" ;; | |
152 | ||
153 | -enable-* | --enable-*) | |
154 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
155 | # Reject names that are not valid shell variable names. | |
156 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
157 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
158 | fi | |
159 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
160 | case "$ac_option" in | |
161 | *=*) ;; | |
162 | *) ac_optarg=yes ;; | |
163 | esac | |
164 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
165 | ||
166 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
167 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
168 | | --exec | --exe | --ex) | |
169 | ac_prev=exec_prefix ;; | |
170 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
171 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
172 | | --exec=* | --exe=* | --ex=*) | |
173 | exec_prefix="$ac_optarg" ;; | |
174 | ||
175 | -gas | --gas | --ga | --g) | |
176 | # Obsolete; use --with-gas. | |
177 | with_gas=yes ;; | |
178 | ||
179 | -help | --help | --hel | --he) | |
180 | # Omit some internal or obsolete options to make the list less imposing. | |
181 | # This message is too long to be a string in the A/UX 3.1 sh. | |
182 | cat << EOF | |
183 | Usage: configure [options] [host] | |
184 | Options: [defaults in brackets after descriptions] | |
185 | Configuration: | |
186 | --cache-file=FILE cache test results in FILE | |
187 | --help print this message | |
188 | --no-create do not create output files | |
189 | --quiet, --silent do not print \`checking...' messages | |
190 | --version print the version of autoconf that created configure | |
191 | Directory and file names: | |
192 | --prefix=PREFIX install architecture-independent files in PREFIX | |
193 | [$ac_default_prefix] | |
194 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
195 | [same as prefix] | |
196 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
197 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
198 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
199 | --datadir=DIR read-only architecture-independent data in DIR | |
200 | [PREFIX/share] | |
201 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
202 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
203 | [PREFIX/com] | |
204 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
205 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
206 | --includedir=DIR C header files in DIR [PREFIX/include] | |
207 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
208 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
209 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
210 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
211 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
212 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
213 | --program-transform-name=PROGRAM | |
214 | run sed PROGRAM on installed program names | |
215 | EOF | |
216 | cat << EOF | |
217 | Host type: | |
218 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
219 | --host=HOST configure for HOST [guessed] | |
220 | --target=TARGET configure for TARGET [TARGET=HOST] | |
221 | Features and packages: | |
222 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
223 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
224 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
225 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
226 | --x-includes=DIR X include files are in DIR | |
227 | --x-libraries=DIR X library files are in DIR | |
228 | EOF | |
229 | if test -n "$ac_help"; then | |
230 | echo "--enable and --with options recognized:$ac_help" | |
231 | fi | |
232 | exit 0 ;; | |
233 | ||
234 | -host | --host | --hos | --ho) | |
235 | ac_prev=host ;; | |
236 | -host=* | --host=* | --hos=* | --ho=*) | |
237 | host="$ac_optarg" ;; | |
238 | ||
239 | -includedir | --includedir | --includedi | --included | --include \ | |
240 | | --includ | --inclu | --incl | --inc) | |
241 | ac_prev=includedir ;; | |
242 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
243 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
244 | includedir="$ac_optarg" ;; | |
245 | ||
246 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
247 | ac_prev=infodir ;; | |
248 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
249 | infodir="$ac_optarg" ;; | |
250 | ||
251 | -libdir | --libdir | --libdi | --libd) | |
252 | ac_prev=libdir ;; | |
253 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
254 | libdir="$ac_optarg" ;; | |
255 | ||
256 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
257 | | --libexe | --libex | --libe) | |
258 | ac_prev=libexecdir ;; | |
259 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
260 | | --libexe=* | --libex=* | --libe=*) | |
261 | libexecdir="$ac_optarg" ;; | |
262 | ||
263 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
264 | | --localstate | --localstat | --localsta | --localst \ | |
265 | | --locals | --local | --loca | --loc | --lo) | |
266 | ac_prev=localstatedir ;; | |
267 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
268 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
269 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
270 | localstatedir="$ac_optarg" ;; | |
271 | ||
272 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
273 | ac_prev=mandir ;; | |
274 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
275 | mandir="$ac_optarg" ;; | |
276 | ||
277 | -nfp | --nfp | --nf) | |
278 | # Obsolete; use --without-fp. | |
279 | with_fp=no ;; | |
280 | ||
281 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
282 | | --no-cr | --no-c) | |
283 | no_create=yes ;; | |
284 | ||
285 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
286 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
287 | no_recursion=yes ;; | |
288 | ||
289 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
290 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
291 | | --oldin | --oldi | --old | --ol | --o) | |
292 | ac_prev=oldincludedir ;; | |
293 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
294 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
295 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
296 | oldincludedir="$ac_optarg" ;; | |
297 | ||
298 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
299 | ac_prev=prefix ;; | |
300 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
301 | prefix="$ac_optarg" ;; | |
302 | ||
303 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
304 | | --program-pre | --program-pr | --program-p) | |
305 | ac_prev=program_prefix ;; | |
306 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
307 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
308 | program_prefix="$ac_optarg" ;; | |
309 | ||
310 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
311 | | --program-suf | --program-su | --program-s) | |
312 | ac_prev=program_suffix ;; | |
313 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
314 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
315 | program_suffix="$ac_optarg" ;; | |
316 | ||
317 | -program-transform-name | --program-transform-name \ | |
318 | | --program-transform-nam | --program-transform-na \ | |
319 | | --program-transform-n | --program-transform- \ | |
320 | | --program-transform | --program-transfor \ | |
321 | | --program-transfo | --program-transf \ | |
322 | | --program-trans | --program-tran \ | |
323 | | --progr-tra | --program-tr | --program-t) | |
324 | ac_prev=program_transform_name ;; | |
325 | -program-transform-name=* | --program-transform-name=* \ | |
326 | | --program-transform-nam=* | --program-transform-na=* \ | |
327 | | --program-transform-n=* | --program-transform-=* \ | |
328 | | --program-transform=* | --program-transfor=* \ | |
329 | | --program-transfo=* | --program-transf=* \ | |
330 | | --program-trans=* | --program-tran=* \ | |
331 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
332 | program_transform_name="$ac_optarg" ;; | |
333 | ||
334 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
335 | | -silent | --silent | --silen | --sile | --sil) | |
336 | silent=yes ;; | |
337 | ||
338 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
339 | ac_prev=sbindir ;; | |
340 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
341 | | --sbi=* | --sb=*) | |
342 | sbindir="$ac_optarg" ;; | |
343 | ||
344 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
345 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
346 | | --sharedst | --shareds | --shared | --share | --shar \ | |
347 | | --sha | --sh) | |
348 | ac_prev=sharedstatedir ;; | |
349 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
350 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
351 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
352 | | --sha=* | --sh=*) | |
353 | sharedstatedir="$ac_optarg" ;; | |
354 | ||
355 | -site | --site | --sit) | |
356 | ac_prev=site ;; | |
357 | -site=* | --site=* | --sit=*) | |
358 | site="$ac_optarg" ;; | |
359 | ||
360 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
361 | ac_prev=srcdir ;; | |
362 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
363 | srcdir="$ac_optarg" ;; | |
364 | ||
365 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
366 | | --syscon | --sysco | --sysc | --sys | --sy) | |
367 | ac_prev=sysconfdir ;; | |
368 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
369 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
370 | sysconfdir="$ac_optarg" ;; | |
371 | ||
372 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
373 | ac_prev=target ;; | |
374 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
375 | target="$ac_optarg" ;; | |
376 | ||
377 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
378 | verbose=yes ;; | |
379 | ||
380 | -version | --version | --versio | --versi | --vers) | |
381 | echo "configure generated by autoconf version 2.13" | |
382 | exit 0 ;; | |
383 | ||
384 | -with-* | --with-*) | |
385 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
386 | # Reject names that are not valid shell variable names. | |
387 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
388 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
389 | fi | |
390 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
391 | case "$ac_option" in | |
392 | *=*) ;; | |
393 | *) ac_optarg=yes ;; | |
394 | esac | |
395 | eval "with_${ac_package}='$ac_optarg'" ;; | |
396 | ||
397 | -without-* | --without-*) | |
398 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
399 | # Reject names that are not valid shell variable names. | |
400 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
401 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
402 | fi | |
403 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
404 | eval "with_${ac_package}=no" ;; | |
405 | ||
406 | --x) | |
407 | # Obsolete; use --with-x. | |
408 | with_x=yes ;; | |
409 | ||
410 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
411 | | --x-incl | --x-inc | --x-in | --x-i) | |
412 | ac_prev=x_includes ;; | |
413 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
414 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
415 | x_includes="$ac_optarg" ;; | |
416 | ||
417 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
418 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
419 | ac_prev=x_libraries ;; | |
420 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
421 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
422 | x_libraries="$ac_optarg" ;; | |
423 | ||
424 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
425 | ;; | |
426 | ||
427 | *) | |
428 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
429 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
430 | fi | |
431 | if test "x$nonopt" != xNONE; then | |
432 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
433 | fi | |
434 | nonopt="$ac_option" | |
435 | ;; | |
436 | ||
437 | esac | |
438 | done | |
439 | ||
440 | if test -n "$ac_prev"; then | |
441 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
442 | fi | |
443 | ||
444 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
445 | ||
446 | # File descriptor usage: | |
447 | # 0 standard input | |
448 | # 1 file creation | |
449 | # 2 errors and warnings | |
450 | # 3 some systems may open it to /dev/tty | |
451 | # 4 used on the Kubota Titan | |
452 | # 6 checking for... messages and results | |
453 | # 5 compiler messages saved in config.log | |
454 | if test "$silent" = yes; then | |
455 | exec 6>/dev/null | |
456 | else | |
457 | exec 6>&1 | |
458 | fi | |
459 | exec 5>./config.log | |
460 | ||
461 | echo "\ | |
462 | This file contains any messages produced by compilers while | |
463 | running configure, to aid debugging if configure makes a mistake. | |
464 | " 1>&5 | |
465 | ||
466 | # Strip out --no-create and --no-recursion so they do not pile up. | |
467 | # Also quote any args containing shell metacharacters. | |
468 | ac_configure_args= | |
469 | for ac_arg | |
470 | do | |
471 | case "$ac_arg" in | |
472 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
473 | | --no-cr | --no-c) ;; | |
474 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
475 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
476 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
477 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
478 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
479 | esac | |
480 | done | |
481 | ||
482 | # NLS nuisances. | |
483 | # Only set these to C if already set. These must not be set unconditionally | |
484 | # because not all systems understand e.g. LANG=C (notably SCO). | |
485 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
486 | # Non-C LC_CTYPE values break the ctype check. | |
487 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
488 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
489 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
490 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
491 | ||
492 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
493 | rm -rf conftest* confdefs.h | |
494 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
495 | echo > confdefs.h | |
496 | ||
497 | # A filename unique to this package, relative to the directory that | |
498 | # configure is in, which we can look for to find out if srcdir is correct. | |
499 | ac_unique_file=main.c | |
500 | ||
501 | # Find the source files, if location was not specified. | |
502 | if test -z "$srcdir"; then | |
503 | ac_srcdir_defaulted=yes | |
504 | # Try the directory containing this script, then its parent. | |
505 | ac_prog=$0 | |
506 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
507 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
508 | srcdir=$ac_confdir | |
509 | if test ! -r $srcdir/$ac_unique_file; then | |
510 | srcdir=.. | |
511 | fi | |
512 | else | |
513 | ac_srcdir_defaulted=no | |
514 | fi | |
515 | if test ! -r $srcdir/$ac_unique_file; then | |
516 | if test "$ac_srcdir_defaulted" = yes; then | |
517 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
518 | else | |
519 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
520 | fi | |
521 | fi | |
522 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
523 | ||
524 | # Prefer explicitly selected file to automatically selected ones. | |
422ea4b8 MK |
525 | if test -z "$CONFIG_SITE"; then |
526 | if test "x$prefix" != xNONE; then | |
527 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
528 | else | |
529 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
c906108c SS |
530 | fi |
531 | fi | |
532 | for ac_site_file in $CONFIG_SITE; do | |
533 | if test -r "$ac_site_file"; then | |
534 | echo "loading site script $ac_site_file" | |
535 | . "$ac_site_file" | |
536 | fi | |
537 | done | |
538 | ||
539 | if test -r "$cache_file"; then | |
540 | echo "loading cache $cache_file" | |
541 | . $cache_file | |
542 | else | |
543 | echo "creating cache $cache_file" | |
544 | > $cache_file | |
545 | fi | |
546 | ||
547 | ac_ext=c | |
548 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
549 | ac_cpp='$CPP $CPPFLAGS' | |
550 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
551 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
552 | cross_compiling=$ac_cv_prog_cc_cross | |
553 | ||
554 | ac_exeext= | |
555 | ac_objext=o | |
556 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
557 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
558 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
559 | ac_n= ac_c=' | |
560 | ' ac_t=' ' | |
561 | else | |
562 | ac_n=-n ac_c= ac_t= | |
563 | fi | |
564 | else | |
565 | ac_n= ac_c='\c' ac_t= | |
566 | fi | |
567 | ||
568 | ||
569 | ||
413ccac7 | 570 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
422ea4b8 | 571 | echo "configure:572: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
572 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
573 | if test "${enable_maintainer_mode+set}" = set; then | |
574 | enableval="$enable_maintainer_mode" | |
575 | USE_MAINTAINER_MODE=$enableval | |
576 | else | |
577 | USE_MAINTAINER_MODE=no | |
578 | fi | |
579 | ||
580 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
581 | ||
582 | ||
583 | if test $USE_MAINTAINER_MODE = yes; then | |
584 | MAINTAINER_MODE_TRUE= | |
585 | MAINTAINER_MODE_FALSE='#' | |
586 | else | |
587 | MAINTAINER_MODE_TRUE='#' | |
588 | MAINTAINER_MODE_FALSE= | |
589 | fi | |
590 | MAINT=$MAINTAINER_MODE_TRUE | |
591 | ||
592 | ||
c906108c SS |
593 | |
594 | # Extract the first word of "gcc", so it can be a program name with args. | |
595 | set dummy gcc; ac_word=$2 | |
596 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 597 | echo "configure:598: checking for $ac_word" >&5 |
c906108c SS |
598 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
599 | echo $ac_n "(cached) $ac_c" 1>&6 | |
600 | else | |
601 | if test -n "$CC"; then | |
602 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
603 | else | |
604 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
605 | ac_dummy="$PATH" | |
606 | for ac_dir in $ac_dummy; do | |
607 | test -z "$ac_dir" && ac_dir=. | |
608 | if test -f $ac_dir/$ac_word; then | |
609 | ac_cv_prog_CC="gcc" | |
610 | break | |
611 | fi | |
612 | done | |
613 | IFS="$ac_save_ifs" | |
614 | fi | |
615 | fi | |
616 | CC="$ac_cv_prog_CC" | |
617 | if test -n "$CC"; then | |
618 | echo "$ac_t""$CC" 1>&6 | |
619 | else | |
620 | echo "$ac_t""no" 1>&6 | |
621 | fi | |
622 | ||
623 | if test -z "$CC"; then | |
624 | # Extract the first word of "cc", so it can be a program name with args. | |
625 | set dummy cc; ac_word=$2 | |
626 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 627 | echo "configure:628: checking for $ac_word" >&5 |
c906108c SS |
628 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
630 | else | |
631 | if test -n "$CC"; then | |
632 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
633 | else | |
634 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
635 | ac_prog_rejected=no | |
636 | ac_dummy="$PATH" | |
637 | for ac_dir in $ac_dummy; do | |
638 | test -z "$ac_dir" && ac_dir=. | |
639 | if test -f $ac_dir/$ac_word; then | |
640 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
641 | ac_prog_rejected=yes | |
642 | continue | |
643 | fi | |
644 | ac_cv_prog_CC="cc" | |
645 | break | |
646 | fi | |
647 | done | |
648 | IFS="$ac_save_ifs" | |
649 | if test $ac_prog_rejected = yes; then | |
650 | # We found a bogon in the path, so make sure we never use it. | |
651 | set dummy $ac_cv_prog_CC | |
652 | shift | |
653 | if test $# -gt 0; then | |
654 | # We chose a different compiler from the bogus one. | |
655 | # However, it has the same basename, so the bogon will be chosen | |
656 | # first if we set CC to just the basename; use the full file name. | |
657 | shift | |
658 | set dummy "$ac_dir/$ac_word" "$@" | |
659 | shift | |
660 | ac_cv_prog_CC="$@" | |
661 | fi | |
662 | fi | |
663 | fi | |
664 | fi | |
665 | CC="$ac_cv_prog_CC" | |
666 | if test -n "$CC"; then | |
667 | echo "$ac_t""$CC" 1>&6 | |
668 | else | |
669 | echo "$ac_t""no" 1>&6 | |
670 | fi | |
671 | ||
672 | if test -z "$CC"; then | |
673 | case "`uname -s`" in | |
674 | *win32* | *WIN32*) | |
675 | # Extract the first word of "cl", so it can be a program name with args. | |
676 | set dummy cl; ac_word=$2 | |
677 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 678 | echo "configure:679: checking for $ac_word" >&5 |
c906108c SS |
679 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
681 | else | |
682 | if test -n "$CC"; then | |
683 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
684 | else | |
685 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
686 | ac_dummy="$PATH" | |
687 | for ac_dir in $ac_dummy; do | |
688 | test -z "$ac_dir" && ac_dir=. | |
689 | if test -f $ac_dir/$ac_word; then | |
690 | ac_cv_prog_CC="cl" | |
691 | break | |
692 | fi | |
693 | done | |
694 | IFS="$ac_save_ifs" | |
695 | fi | |
696 | fi | |
697 | CC="$ac_cv_prog_CC" | |
698 | if test -n "$CC"; then | |
699 | echo "$ac_t""$CC" 1>&6 | |
700 | else | |
701 | echo "$ac_t""no" 1>&6 | |
702 | fi | |
703 | ;; | |
704 | esac | |
705 | fi | |
706 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
707 | fi | |
708 | ||
709 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
422ea4b8 | 710 | echo "configure:711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
711 | |
712 | ac_ext=c | |
713 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
714 | ac_cpp='$CPP $CPPFLAGS' | |
715 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
716 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
717 | cross_compiling=$ac_cv_prog_cc_cross | |
718 | ||
719 | cat > conftest.$ac_ext << EOF | |
720 | ||
422ea4b8 | 721 | #line 722 "configure" |
c906108c SS |
722 | #include "confdefs.h" |
723 | ||
724 | main(){return(0);} | |
725 | EOF | |
422ea4b8 | 726 | if { (eval echo configure:727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
727 | ac_cv_prog_cc_works=yes |
728 | # If we can't run a trivial program, we are probably using a cross compiler. | |
729 | if (./conftest; exit) 2>/dev/null; then | |
730 | ac_cv_prog_cc_cross=no | |
731 | else | |
732 | ac_cv_prog_cc_cross=yes | |
733 | fi | |
734 | else | |
735 | echo "configure: failed program was:" >&5 | |
736 | cat conftest.$ac_ext >&5 | |
737 | ac_cv_prog_cc_works=no | |
738 | fi | |
739 | rm -fr conftest* | |
740 | ac_ext=c | |
741 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
742 | ac_cpp='$CPP $CPPFLAGS' | |
743 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
744 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
745 | cross_compiling=$ac_cv_prog_cc_cross | |
746 | ||
747 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
748 | if test $ac_cv_prog_cc_works = no; then | |
749 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
750 | fi | |
751 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
422ea4b8 | 752 | echo "configure:753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
753 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
754 | cross_compiling=$ac_cv_prog_cc_cross | |
755 | ||
756 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
422ea4b8 | 757 | echo "configure:758: checking whether we are using GNU C" >&5 |
c906108c SS |
758 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
760 | else | |
761 | cat > conftest.c <<EOF | |
762 | #ifdef __GNUC__ | |
763 | yes; | |
764 | #endif | |
765 | EOF | |
422ea4b8 | 766 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
767 | ac_cv_prog_gcc=yes |
768 | else | |
769 | ac_cv_prog_gcc=no | |
770 | fi | |
771 | fi | |
772 | ||
773 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
774 | ||
775 | if test $ac_cv_prog_gcc = yes; then | |
776 | GCC=yes | |
777 | else | |
778 | GCC= | |
779 | fi | |
780 | ||
781 | ac_test_CFLAGS="${CFLAGS+set}" | |
782 | ac_save_CFLAGS="$CFLAGS" | |
783 | CFLAGS= | |
784 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
422ea4b8 | 785 | echo "configure:786: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
786 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
787 | echo $ac_n "(cached) $ac_c" 1>&6 | |
788 | else | |
789 | echo 'void f(){}' > conftest.c | |
790 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
791 | ac_cv_prog_cc_g=yes | |
792 | else | |
793 | ac_cv_prog_cc_g=no | |
794 | fi | |
795 | rm -f conftest* | |
796 | ||
797 | fi | |
798 | ||
799 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
800 | if test "$ac_test_CFLAGS" = set; then | |
801 | CFLAGS="$ac_save_CFLAGS" | |
802 | elif test $ac_cv_prog_cc_g = yes; then | |
803 | if test "$GCC" = yes; then | |
804 | CFLAGS="-g -O2" | |
805 | else | |
806 | CFLAGS="-g" | |
807 | fi | |
808 | else | |
809 | if test "$GCC" = yes; then | |
810 | CFLAGS="-O2" | |
811 | else | |
812 | CFLAGS= | |
813 | fi | |
814 | fi | |
815 | ||
816 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
422ea4b8 | 817 | echo "configure:818: checking how to run the C preprocessor" >&5 |
c906108c SS |
818 | # On Suns, sometimes $CPP names a directory. |
819 | if test -n "$CPP" && test -d "$CPP"; then | |
820 | CPP= | |
821 | fi | |
822 | if test -z "$CPP"; then | |
823 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
824 | echo $ac_n "(cached) $ac_c" 1>&6 | |
825 | else | |
826 | # This must be in double quotes, not single quotes, because CPP may get | |
827 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
828 | CPP="${CC-cc} -E" | |
829 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
830 | # not just through cpp. | |
831 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 832 | #line 833 "configure" |
c906108c SS |
833 | #include "confdefs.h" |
834 | #include <assert.h> | |
835 | Syntax Error | |
836 | EOF | |
837 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 838 | { (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
839 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
840 | if test -z "$ac_err"; then | |
841 | : | |
842 | else | |
843 | echo "$ac_err" >&5 | |
844 | echo "configure: failed program was:" >&5 | |
845 | cat conftest.$ac_ext >&5 | |
846 | rm -rf conftest* | |
847 | CPP="${CC-cc} -E -traditional-cpp" | |
848 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 849 | #line 850 "configure" |
c906108c SS |
850 | #include "confdefs.h" |
851 | #include <assert.h> | |
852 | Syntax Error | |
853 | EOF | |
854 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 855 | { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
856 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
857 | if test -z "$ac_err"; then | |
858 | : | |
859 | else | |
860 | echo "$ac_err" >&5 | |
861 | echo "configure: failed program was:" >&5 | |
862 | cat conftest.$ac_ext >&5 | |
863 | rm -rf conftest* | |
864 | CPP="${CC-cc} -nologo -E" | |
865 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 866 | #line 867 "configure" |
c906108c SS |
867 | #include "confdefs.h" |
868 | #include <assert.h> | |
869 | Syntax Error | |
870 | EOF | |
871 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 872 | { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
873 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
874 | if test -z "$ac_err"; then | |
875 | : | |
876 | else | |
877 | echo "$ac_err" >&5 | |
878 | echo "configure: failed program was:" >&5 | |
879 | cat conftest.$ac_ext >&5 | |
880 | rm -rf conftest* | |
881 | CPP=/lib/cpp | |
882 | fi | |
883 | rm -f conftest* | |
884 | fi | |
885 | rm -f conftest* | |
886 | fi | |
887 | rm -f conftest* | |
888 | ac_cv_prog_CPP="$CPP" | |
889 | fi | |
890 | CPP="$ac_cv_prog_CPP" | |
891 | else | |
892 | ac_cv_prog_CPP="$CPP" | |
893 | fi | |
894 | echo "$ac_t""$CPP" 1>&6 | |
895 | ||
896 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
422ea4b8 | 897 | echo "configure:898: checking for AIX" >&5 |
c906108c | 898 | cat > conftest.$ac_ext <<EOF |
422ea4b8 | 899 | #line 900 "configure" |
c906108c SS |
900 | #include "confdefs.h" |
901 | #ifdef _AIX | |
902 | yes | |
903 | #endif | |
904 | ||
905 | EOF | |
906 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
907 | egrep "yes" >/dev/null 2>&1; then | |
908 | rm -rf conftest* | |
909 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
910 | #define _ALL_SOURCE 1 | |
911 | EOF | |
912 | ||
913 | else | |
914 | rm -rf conftest* | |
915 | echo "$ac_t""no" 1>&6 | |
916 | fi | |
917 | rm -f conftest* | |
918 | ||
919 | ||
920 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
422ea4b8 | 921 | echo "configure:922: checking for POSIXized ISC" >&5 |
c906108c SS |
922 | if test -d /etc/conf/kconfig.d && |
923 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
924 | then | |
925 | echo "$ac_t""yes" 1>&6 | |
926 | ISC=yes # If later tests want to check for ISC. | |
927 | cat >> confdefs.h <<\EOF | |
928 | #define _POSIX_SOURCE 1 | |
929 | EOF | |
930 | ||
931 | if test "$GCC" = yes; then | |
932 | CC="$CC -posix" | |
933 | else | |
934 | CC="$CC -Xp" | |
935 | fi | |
936 | else | |
937 | echo "$ac_t""no" 1>&6 | |
938 | ISC= | |
939 | fi | |
940 | ||
941 | ||
942 | ||
943 | ||
944 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
422ea4b8 | 945 | echo "configure:946: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
946 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
947 | echo $ac_n "(cached) $ac_c" 1>&6 | |
948 | else | |
949 | am_cv_prog_cc_stdc=no | |
950 | ac_save_CC="$CC" | |
951 | # Don't try gcc -ansi; that turns off useful extensions and | |
952 | # breaks some systems' header files. | |
953 | # AIX -qlanglvl=ansi | |
954 | # Ultrix and OSF/1 -std1 | |
955 | # HP-UX -Aa -D_HPUX_SOURCE | |
956 | # SVR4 -Xc -D__EXTENSIONS__ | |
957 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
958 | do | |
959 | CC="$ac_save_CC $ac_arg" | |
960 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 961 | #line 962 "configure" |
c906108c SS |
962 | #include "confdefs.h" |
963 | #include <stdarg.h> | |
964 | #include <stdio.h> | |
965 | #include <sys/types.h> | |
966 | #include <sys/stat.h> | |
967 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
968 | struct buf { int x; }; | |
969 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
970 | static char *e (p, i) | |
971 | char **p; | |
972 | int i; | |
973 | { | |
974 | return p[i]; | |
975 | } | |
976 | static char *f (char * (*g) (char **, int), char **p, ...) | |
977 | { | |
978 | char *s; | |
979 | va_list v; | |
980 | va_start (v,p); | |
981 | s = g (p, va_arg (v,int)); | |
982 | va_end (v); | |
983 | return s; | |
984 | } | |
985 | int test (int i, double x); | |
986 | struct s1 {int (*f) (int a);}; | |
987 | struct s2 {int (*f) (double a);}; | |
988 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
989 | int argc; | |
990 | char **argv; | |
991 | ||
992 | int main() { | |
993 | ||
994 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
995 | ||
996 | ; return 0; } | |
997 | EOF | |
422ea4b8 | 998 | if { (eval echo configure:999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
999 | rm -rf conftest* |
1000 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1001 | else | |
1002 | echo "configure: failed program was:" >&5 | |
1003 | cat conftest.$ac_ext >&5 | |
1004 | fi | |
1005 | rm -f conftest* | |
1006 | done | |
1007 | CC="$ac_save_CC" | |
1008 | ||
1009 | fi | |
1010 | ||
1011 | if test -z "$am_cv_prog_cc_stdc"; then | |
1012 | echo "$ac_t""none needed" 1>&6 | |
1013 | else | |
1014 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1015 | fi | |
1016 | case "x$am_cv_prog_cc_stdc" in | |
1017 | x|xno) ;; | |
1018 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1019 | esac | |
1020 | ||
1021 | ||
1022 | ac_aux_dir= | |
1023 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1024 | if test -f $ac_dir/install-sh; then | |
1025 | ac_aux_dir=$ac_dir | |
1026 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1027 | break | |
1028 | elif test -f $ac_dir/install.sh; then | |
1029 | ac_aux_dir=$ac_dir | |
1030 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1031 | break | |
1032 | fi | |
1033 | done | |
1034 | if test -z "$ac_aux_dir"; then | |
1035 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1036 | fi | |
1037 | ac_config_guess=$ac_aux_dir/config.guess | |
1038 | ac_config_sub=$ac_aux_dir/config.sub | |
1039 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1040 | ||
1041 | ||
1042 | # Do some error checking and defaulting for the host and target type. | |
1043 | # The inputs are: | |
1044 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1045 | # | |
1046 | # The rules are: | |
1047 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1048 | # same time. | |
1049 | # 2. Host defaults to nonopt. | |
1050 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1051 | # as determined by config.guess. | |
1052 | # 4. Target and build default to nonopt. | |
1053 | # 5. If nonopt is not specified, then target and build default to host. | |
1054 | ||
1055 | # The aliases save the names the user supplied, while $host etc. | |
1056 | # will get canonicalized. | |
1057 | case $host---$target---$nonopt in | |
1058 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1059 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1060 | esac | |
1061 | ||
1062 | ||
1063 | # Make sure we can run config.sub. | |
1064 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1065 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1066 | fi | |
1067 | ||
1068 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
422ea4b8 | 1069 | echo "configure:1070: checking host system type" >&5 |
c906108c SS |
1070 | |
1071 | host_alias=$host | |
1072 | case "$host_alias" in | |
1073 | NONE) | |
1074 | case $nonopt in | |
1075 | NONE) | |
1076 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1077 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1078 | fi ;; | |
1079 | *) host_alias=$nonopt ;; | |
1080 | esac ;; | |
1081 | esac | |
1082 | ||
1083 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1084 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1085 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1086 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1087 | echo "$ac_t""$host" 1>&6 | |
1088 | ||
1089 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
422ea4b8 | 1090 | echo "configure:1091: checking target system type" >&5 |
c906108c SS |
1091 | |
1092 | target_alias=$target | |
1093 | case "$target_alias" in | |
1094 | NONE) | |
1095 | case $nonopt in | |
1096 | NONE) target_alias=$host_alias ;; | |
1097 | *) target_alias=$nonopt ;; | |
1098 | esac ;; | |
1099 | esac | |
1100 | ||
1101 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1102 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1103 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1104 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1105 | echo "$ac_t""$target" 1>&6 | |
1106 | ||
1107 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
422ea4b8 | 1108 | echo "configure:1109: checking build system type" >&5 |
c906108c SS |
1109 | |
1110 | build_alias=$build | |
1111 | case "$build_alias" in | |
1112 | NONE) | |
1113 | case $nonopt in | |
1114 | NONE) build_alias=$host_alias ;; | |
1115 | *) build_alias=$nonopt ;; | |
1116 | esac ;; | |
1117 | esac | |
1118 | ||
1119 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1120 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1121 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1122 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1123 | echo "$ac_t""$build" 1>&6 | |
1124 | ||
1125 | test "$host_alias" != "$target_alias" && | |
1126 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1127 | NONENONEs,x,x, && | |
1128 | program_prefix=${target_alias}- | |
1129 | ||
1130 | ||
1131 | ALL_LINGUAS= | |
1132 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
422ea4b8 | 1133 | echo "configure:1134: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1134 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1135 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1136 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1137 | else | |
1138 | cat > conftestmake <<\EOF | |
1139 | all: | |
1140 | @echo 'ac_maketemp="${MAKE}"' | |
1141 | EOF | |
1142 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1143 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1144 | if test -n "$ac_maketemp"; then | |
1145 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1146 | else | |
1147 | eval ac_cv_prog_make_${ac_make}_set=no | |
1148 | fi | |
1149 | rm -f conftestmake | |
1150 | fi | |
1151 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1152 | echo "$ac_t""yes" 1>&6 | |
1153 | SET_MAKE= | |
1154 | else | |
1155 | echo "$ac_t""no" 1>&6 | |
1156 | SET_MAKE="MAKE=${MAKE-make}" | |
1157 | fi | |
1158 | ||
1159 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1160 | set dummy ranlib; ac_word=$2 | |
1161 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 1162 | echo "configure:1163: checking for $ac_word" >&5 |
c906108c SS |
1163 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1165 | else | |
1166 | if test -n "$RANLIB"; then | |
1167 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1168 | else | |
1169 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1170 | ac_dummy="$PATH" | |
1171 | for ac_dir in $ac_dummy; do | |
1172 | test -z "$ac_dir" && ac_dir=. | |
1173 | if test -f $ac_dir/$ac_word; then | |
1174 | ac_cv_prog_RANLIB="ranlib" | |
1175 | break | |
1176 | fi | |
1177 | done | |
1178 | IFS="$ac_save_ifs" | |
1179 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1180 | fi | |
1181 | fi | |
1182 | RANLIB="$ac_cv_prog_RANLIB" | |
1183 | if test -n "$RANLIB"; then | |
1184 | echo "$ac_t""$RANLIB" 1>&6 | |
1185 | else | |
1186 | echo "$ac_t""no" 1>&6 | |
1187 | fi | |
1188 | ||
1189 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
422ea4b8 | 1190 | echo "configure:1191: checking for ANSI C header files" >&5 |
c906108c SS |
1191 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1193 | else | |
1194 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1195 | #line 1196 "configure" |
c906108c SS |
1196 | #include "confdefs.h" |
1197 | #include <stdlib.h> | |
1198 | #include <stdarg.h> | |
1199 | #include <string.h> | |
1200 | #include <float.h> | |
1201 | EOF | |
1202 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 1203 | { (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1204 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1205 | if test -z "$ac_err"; then | |
1206 | rm -rf conftest* | |
1207 | ac_cv_header_stdc=yes | |
1208 | else | |
1209 | echo "$ac_err" >&5 | |
1210 | echo "configure: failed program was:" >&5 | |
1211 | cat conftest.$ac_ext >&5 | |
1212 | rm -rf conftest* | |
1213 | ac_cv_header_stdc=no | |
1214 | fi | |
1215 | rm -f conftest* | |
1216 | ||
1217 | if test $ac_cv_header_stdc = yes; then | |
1218 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1219 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1220 | #line 1221 "configure" |
c906108c SS |
1221 | #include "confdefs.h" |
1222 | #include <string.h> | |
1223 | EOF | |
1224 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1225 | egrep "memchr" >/dev/null 2>&1; then | |
1226 | : | |
1227 | else | |
1228 | rm -rf conftest* | |
1229 | ac_cv_header_stdc=no | |
1230 | fi | |
1231 | rm -f conftest* | |
1232 | ||
1233 | fi | |
1234 | ||
1235 | if test $ac_cv_header_stdc = yes; then | |
1236 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1237 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1238 | #line 1239 "configure" |
c906108c SS |
1239 | #include "confdefs.h" |
1240 | #include <stdlib.h> | |
1241 | EOF | |
1242 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1243 | egrep "free" >/dev/null 2>&1; then | |
1244 | : | |
1245 | else | |
1246 | rm -rf conftest* | |
1247 | ac_cv_header_stdc=no | |
1248 | fi | |
1249 | rm -f conftest* | |
1250 | ||
1251 | fi | |
1252 | ||
1253 | if test $ac_cv_header_stdc = yes; then | |
1254 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1255 | if test "$cross_compiling" = yes; then | |
1256 | : | |
1257 | else | |
1258 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1259 | #line 1260 "configure" |
c906108c SS |
1260 | #include "confdefs.h" |
1261 | #include <ctype.h> | |
1262 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1263 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1264 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1265 | int main () { int i; for (i = 0; i < 256; i++) | |
1266 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1267 | exit (0); } | |
1268 | ||
1269 | EOF | |
422ea4b8 | 1270 | if { (eval echo configure:1271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1271 | then |
1272 | : | |
1273 | else | |
1274 | echo "configure: failed program was:" >&5 | |
1275 | cat conftest.$ac_ext >&5 | |
1276 | rm -fr conftest* | |
1277 | ac_cv_header_stdc=no | |
1278 | fi | |
1279 | rm -fr conftest* | |
1280 | fi | |
1281 | ||
1282 | fi | |
1283 | fi | |
1284 | ||
1285 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1286 | if test $ac_cv_header_stdc = yes; then | |
1287 | cat >> confdefs.h <<\EOF | |
1288 | #define STDC_HEADERS 1 | |
1289 | EOF | |
1290 | ||
1291 | fi | |
1292 | ||
1293 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
422ea4b8 | 1294 | echo "configure:1295: checking for working const" >&5 |
c906108c SS |
1295 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1296 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1297 | else | |
1298 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1299 | #line 1300 "configure" |
c906108c SS |
1300 | #include "confdefs.h" |
1301 | ||
1302 | int main() { | |
1303 | ||
1304 | /* Ultrix mips cc rejects this. */ | |
1305 | typedef int charset[2]; const charset x; | |
1306 | /* SunOS 4.1.1 cc rejects this. */ | |
1307 | char const *const *ccp; | |
1308 | char **p; | |
1309 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1310 | struct point {int x, y;}; | |
1311 | static struct point const zero = {0,0}; | |
1312 | /* AIX XL C 1.02.0.0 rejects this. | |
1313 | It does not let you subtract one const X* pointer from another in an arm | |
1314 | of an if-expression whose if-part is not a constant expression */ | |
1315 | const char *g = "string"; | |
1316 | ccp = &g + (g ? g-g : 0); | |
1317 | /* HPUX 7.0 cc rejects these. */ | |
1318 | ++ccp; | |
1319 | p = (char**) ccp; | |
1320 | ccp = (char const *const *) p; | |
1321 | { /* SCO 3.2v4 cc rejects this. */ | |
1322 | char *t; | |
1323 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1324 | ||
1325 | *t++ = 0; | |
1326 | } | |
1327 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1328 | int x[] = {25, 17}; | |
1329 | const int *foo = &x[0]; | |
1330 | ++foo; | |
1331 | } | |
1332 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1333 | typedef const int *iptr; | |
1334 | iptr p = 0; | |
1335 | ++p; | |
1336 | } | |
1337 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1338 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1339 | struct s { int j; const int *ap[3]; }; | |
1340 | struct s *b; b->j = 5; | |
1341 | } | |
1342 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1343 | const int foo = 10; | |
1344 | } | |
1345 | ||
1346 | ; return 0; } | |
1347 | EOF | |
422ea4b8 | 1348 | if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1349 | rm -rf conftest* |
1350 | ac_cv_c_const=yes | |
1351 | else | |
1352 | echo "configure: failed program was:" >&5 | |
1353 | cat conftest.$ac_ext >&5 | |
1354 | rm -rf conftest* | |
1355 | ac_cv_c_const=no | |
1356 | fi | |
1357 | rm -f conftest* | |
1358 | fi | |
1359 | ||
1360 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1361 | if test $ac_cv_c_const = no; then | |
1362 | cat >> confdefs.h <<\EOF | |
1363 | #define const | |
1364 | EOF | |
1365 | ||
1366 | fi | |
1367 | ||
1368 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
422ea4b8 | 1369 | echo "configure:1370: checking for inline" >&5 |
c906108c SS |
1370 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1371 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1372 | else | |
1373 | ac_cv_c_inline=no | |
1374 | for ac_kw in inline __inline__ __inline; do | |
1375 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1376 | #line 1377 "configure" |
c906108c SS |
1377 | #include "confdefs.h" |
1378 | ||
1379 | int main() { | |
1380 | } $ac_kw foo() { | |
1381 | ; return 0; } | |
1382 | EOF | |
422ea4b8 | 1383 | if { (eval echo configure:1384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1384 | rm -rf conftest* |
1385 | ac_cv_c_inline=$ac_kw; break | |
1386 | else | |
1387 | echo "configure: failed program was:" >&5 | |
1388 | cat conftest.$ac_ext >&5 | |
1389 | fi | |
1390 | rm -f conftest* | |
1391 | done | |
1392 | ||
1393 | fi | |
1394 | ||
1395 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1396 | case "$ac_cv_c_inline" in | |
1397 | inline | yes) ;; | |
1398 | no) cat >> confdefs.h <<\EOF | |
1399 | #define inline | |
1400 | EOF | |
1401 | ;; | |
1402 | *) cat >> confdefs.h <<EOF | |
1403 | #define inline $ac_cv_c_inline | |
1404 | EOF | |
1405 | ;; | |
1406 | esac | |
1407 | ||
1408 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
422ea4b8 | 1409 | echo "configure:1410: checking for off_t" >&5 |
c906108c SS |
1410 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1411 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1412 | else | |
1413 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1414 | #line 1415 "configure" |
c906108c SS |
1415 | #include "confdefs.h" |
1416 | #include <sys/types.h> | |
1417 | #if STDC_HEADERS | |
1418 | #include <stdlib.h> | |
1419 | #include <stddef.h> | |
1420 | #endif | |
1421 | EOF | |
1422 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1423 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1424 | rm -rf conftest* | |
1425 | ac_cv_type_off_t=yes | |
1426 | else | |
1427 | rm -rf conftest* | |
1428 | ac_cv_type_off_t=no | |
1429 | fi | |
1430 | rm -f conftest* | |
1431 | ||
1432 | fi | |
1433 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1434 | if test $ac_cv_type_off_t = no; then | |
1435 | cat >> confdefs.h <<\EOF | |
1436 | #define off_t long | |
1437 | EOF | |
1438 | ||
1439 | fi | |
1440 | ||
1441 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
422ea4b8 | 1442 | echo "configure:1443: checking for size_t" >&5 |
c906108c SS |
1443 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1445 | else | |
1446 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1447 | #line 1448 "configure" |
c906108c SS |
1448 | #include "confdefs.h" |
1449 | #include <sys/types.h> | |
1450 | #if STDC_HEADERS | |
1451 | #include <stdlib.h> | |
1452 | #include <stddef.h> | |
1453 | #endif | |
1454 | EOF | |
1455 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1456 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1457 | rm -rf conftest* | |
1458 | ac_cv_type_size_t=yes | |
1459 | else | |
1460 | rm -rf conftest* | |
1461 | ac_cv_type_size_t=no | |
1462 | fi | |
1463 | rm -f conftest* | |
1464 | ||
1465 | fi | |
1466 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1467 | if test $ac_cv_type_size_t = no; then | |
1468 | cat >> confdefs.h <<\EOF | |
1469 | #define size_t unsigned | |
1470 | EOF | |
1471 | ||
1472 | fi | |
1473 | ||
1474 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1475 | # for constant arguments. Useless! | |
1476 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
422ea4b8 | 1477 | echo "configure:1478: checking for working alloca.h" >&5 |
c906108c SS |
1478 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1480 | else | |
1481 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1482 | #line 1483 "configure" |
c906108c SS |
1483 | #include "confdefs.h" |
1484 | #include <alloca.h> | |
1485 | int main() { | |
1486 | char *p = alloca(2 * sizeof(int)); | |
1487 | ; return 0; } | |
1488 | EOF | |
422ea4b8 | 1489 | if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1490 | rm -rf conftest* |
1491 | ac_cv_header_alloca_h=yes | |
1492 | else | |
1493 | echo "configure: failed program was:" >&5 | |
1494 | cat conftest.$ac_ext >&5 | |
1495 | rm -rf conftest* | |
1496 | ac_cv_header_alloca_h=no | |
1497 | fi | |
1498 | rm -f conftest* | |
1499 | fi | |
1500 | ||
1501 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1502 | if test $ac_cv_header_alloca_h = yes; then | |
1503 | cat >> confdefs.h <<\EOF | |
1504 | #define HAVE_ALLOCA_H 1 | |
1505 | EOF | |
1506 | ||
1507 | fi | |
1508 | ||
1509 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
422ea4b8 | 1510 | echo "configure:1511: checking for alloca" >&5 |
c906108c SS |
1511 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1512 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1513 | else | |
1514 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1515 | #line 1516 "configure" |
c906108c SS |
1516 | #include "confdefs.h" |
1517 | ||
1518 | #ifdef __GNUC__ | |
1519 | # define alloca __builtin_alloca | |
1520 | #else | |
1521 | # ifdef _MSC_VER | |
1522 | # include <malloc.h> | |
1523 | # define alloca _alloca | |
1524 | # else | |
1525 | # if HAVE_ALLOCA_H | |
1526 | # include <alloca.h> | |
1527 | # else | |
1528 | # ifdef _AIX | |
1529 | #pragma alloca | |
1530 | # else | |
1531 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1532 | char *alloca (); | |
1533 | # endif | |
1534 | # endif | |
1535 | # endif | |
1536 | # endif | |
1537 | #endif | |
1538 | ||
1539 | int main() { | |
1540 | char *p = (char *) alloca(1); | |
1541 | ; return 0; } | |
1542 | EOF | |
422ea4b8 | 1543 | if { (eval echo configure:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1544 | rm -rf conftest* |
1545 | ac_cv_func_alloca_works=yes | |
1546 | else | |
1547 | echo "configure: failed program was:" >&5 | |
1548 | cat conftest.$ac_ext >&5 | |
1549 | rm -rf conftest* | |
1550 | ac_cv_func_alloca_works=no | |
1551 | fi | |
1552 | rm -f conftest* | |
1553 | fi | |
1554 | ||
1555 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1556 | if test $ac_cv_func_alloca_works = yes; then | |
1557 | cat >> confdefs.h <<\EOF | |
1558 | #define HAVE_ALLOCA 1 | |
1559 | EOF | |
1560 | ||
1561 | fi | |
1562 | ||
1563 | if test $ac_cv_func_alloca_works = no; then | |
1564 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1565 | # that cause trouble. Some versions do not even contain alloca or | |
1566 | # contain a buggy version. If you still want to use their alloca, | |
1567 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1568 | ALLOCA=alloca.${ac_objext} | |
1569 | cat >> confdefs.h <<\EOF | |
1570 | #define C_ALLOCA 1 | |
1571 | EOF | |
1572 | ||
1573 | ||
1574 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
422ea4b8 | 1575 | echo "configure:1576: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1576 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1577 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1578 | else | |
1579 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1580 | #line 1581 "configure" |
c906108c SS |
1581 | #include "confdefs.h" |
1582 | #if defined(CRAY) && ! defined(CRAY2) | |
1583 | webecray | |
1584 | #else | |
1585 | wenotbecray | |
1586 | #endif | |
1587 | ||
1588 | EOF | |
1589 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1590 | egrep "webecray" >/dev/null 2>&1; then | |
1591 | rm -rf conftest* | |
1592 | ac_cv_os_cray=yes | |
1593 | else | |
1594 | rm -rf conftest* | |
1595 | ac_cv_os_cray=no | |
1596 | fi | |
1597 | rm -f conftest* | |
1598 | ||
1599 | fi | |
1600 | ||
1601 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1602 | if test $ac_cv_os_cray = yes; then | |
1603 | for ac_func in _getb67 GETB67 getb67; do | |
1604 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 1605 | echo "configure:1606: checking for $ac_func" >&5 |
c906108c SS |
1606 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1607 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1608 | else | |
1609 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1610 | #line 1611 "configure" |
c906108c SS |
1611 | #include "confdefs.h" |
1612 | /* System header to define __stub macros and hopefully few prototypes, | |
1613 | which can conflict with char $ac_func(); below. */ | |
1614 | #include <assert.h> | |
1615 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1616 | /* We use char because int might match the return type of a gcc2 | |
1617 | builtin and then its argument prototype would still apply. */ | |
1618 | char $ac_func(); | |
1619 | ||
1620 | int main() { | |
1621 | ||
1622 | /* The GNU C library defines this for functions which it implements | |
1623 | to always fail with ENOSYS. Some functions are actually named | |
1624 | something starting with __ and the normal name is an alias. */ | |
1625 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1626 | choke me | |
1627 | #else | |
1628 | $ac_func(); | |
1629 | #endif | |
1630 | ||
1631 | ; return 0; } | |
1632 | EOF | |
422ea4b8 | 1633 | if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1634 | rm -rf conftest* |
1635 | eval "ac_cv_func_$ac_func=yes" | |
1636 | else | |
1637 | echo "configure: failed program was:" >&5 | |
1638 | cat conftest.$ac_ext >&5 | |
1639 | rm -rf conftest* | |
1640 | eval "ac_cv_func_$ac_func=no" | |
1641 | fi | |
1642 | rm -f conftest* | |
1643 | fi | |
1644 | ||
1645 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1646 | echo "$ac_t""yes" 1>&6 | |
1647 | cat >> confdefs.h <<EOF | |
1648 | #define CRAY_STACKSEG_END $ac_func | |
1649 | EOF | |
1650 | ||
1651 | break | |
1652 | else | |
1653 | echo "$ac_t""no" 1>&6 | |
1654 | fi | |
1655 | ||
1656 | done | |
1657 | fi | |
1658 | ||
1659 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
422ea4b8 | 1660 | echo "configure:1661: checking stack direction for C alloca" >&5 |
c906108c SS |
1661 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1662 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1663 | else | |
1664 | if test "$cross_compiling" = yes; then | |
1665 | ac_cv_c_stack_direction=0 | |
1666 | else | |
1667 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1668 | #line 1669 "configure" |
c906108c SS |
1669 | #include "confdefs.h" |
1670 | find_stack_direction () | |
1671 | { | |
1672 | static char *addr = 0; | |
1673 | auto char dummy; | |
1674 | if (addr == 0) | |
1675 | { | |
1676 | addr = &dummy; | |
1677 | return find_stack_direction (); | |
1678 | } | |
1679 | else | |
1680 | return (&dummy > addr) ? 1 : -1; | |
1681 | } | |
1682 | main () | |
1683 | { | |
1684 | exit (find_stack_direction() < 0); | |
1685 | } | |
1686 | EOF | |
422ea4b8 | 1687 | if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1688 | then |
1689 | ac_cv_c_stack_direction=1 | |
1690 | else | |
1691 | echo "configure: failed program was:" >&5 | |
1692 | cat conftest.$ac_ext >&5 | |
1693 | rm -fr conftest* | |
1694 | ac_cv_c_stack_direction=-1 | |
1695 | fi | |
1696 | rm -fr conftest* | |
1697 | fi | |
1698 | ||
1699 | fi | |
1700 | ||
1701 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1702 | cat >> confdefs.h <<EOF | |
1703 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1704 | EOF | |
1705 | ||
1706 | fi | |
1707 | ||
1708 | for ac_hdr in unistd.h | |
1709 | do | |
1710 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1711 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
422ea4b8 | 1712 | echo "configure:1713: checking for $ac_hdr" >&5 |
c906108c SS |
1713 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1714 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1715 | else | |
1716 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1717 | #line 1718 "configure" |
c906108c SS |
1718 | #include "confdefs.h" |
1719 | #include <$ac_hdr> | |
1720 | EOF | |
1721 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 1722 | { (eval echo configure:1723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1723 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1724 | if test -z "$ac_err"; then | |
1725 | rm -rf conftest* | |
1726 | eval "ac_cv_header_$ac_safe=yes" | |
1727 | else | |
1728 | echo "$ac_err" >&5 | |
1729 | echo "configure: failed program was:" >&5 | |
1730 | cat conftest.$ac_ext >&5 | |
1731 | rm -rf conftest* | |
1732 | eval "ac_cv_header_$ac_safe=no" | |
1733 | fi | |
1734 | rm -f conftest* | |
1735 | fi | |
1736 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1737 | echo "$ac_t""yes" 1>&6 | |
1738 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1739 | cat >> confdefs.h <<EOF | |
1740 | #define $ac_tr_hdr 1 | |
1741 | EOF | |
1742 | ||
1743 | else | |
1744 | echo "$ac_t""no" 1>&6 | |
1745 | fi | |
1746 | done | |
1747 | ||
1748 | for ac_func in getpagesize | |
1749 | do | |
1750 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 1751 | echo "configure:1752: checking for $ac_func" >&5 |
c906108c SS |
1752 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1753 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1754 | else | |
1755 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1756 | #line 1757 "configure" |
c906108c SS |
1757 | #include "confdefs.h" |
1758 | /* System header to define __stub macros and hopefully few prototypes, | |
1759 | which can conflict with char $ac_func(); below. */ | |
1760 | #include <assert.h> | |
1761 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1762 | /* We use char because int might match the return type of a gcc2 | |
1763 | builtin and then its argument prototype would still apply. */ | |
1764 | char $ac_func(); | |
1765 | ||
1766 | int main() { | |
1767 | ||
1768 | /* The GNU C library defines this for functions which it implements | |
1769 | to always fail with ENOSYS. Some functions are actually named | |
1770 | something starting with __ and the normal name is an alias. */ | |
1771 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1772 | choke me | |
1773 | #else | |
1774 | $ac_func(); | |
1775 | #endif | |
1776 | ||
1777 | ; return 0; } | |
1778 | EOF | |
422ea4b8 | 1779 | if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1780 | rm -rf conftest* |
1781 | eval "ac_cv_func_$ac_func=yes" | |
1782 | else | |
1783 | echo "configure: failed program was:" >&5 | |
1784 | cat conftest.$ac_ext >&5 | |
1785 | rm -rf conftest* | |
1786 | eval "ac_cv_func_$ac_func=no" | |
1787 | fi | |
1788 | rm -f conftest* | |
1789 | fi | |
1790 | ||
1791 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1792 | echo "$ac_t""yes" 1>&6 | |
1793 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1794 | cat >> confdefs.h <<EOF | |
1795 | #define $ac_tr_func 1 | |
1796 | EOF | |
1797 | ||
1798 | else | |
1799 | echo "$ac_t""no" 1>&6 | |
1800 | fi | |
1801 | done | |
1802 | ||
1803 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
422ea4b8 | 1804 | echo "configure:1805: checking for working mmap" >&5 |
c906108c SS |
1805 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1807 | else | |
1808 | if test "$cross_compiling" = yes; then | |
1809 | ac_cv_func_mmap_fixed_mapped=no | |
1810 | else | |
1811 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1812 | #line 1813 "configure" |
c906108c SS |
1813 | #include "confdefs.h" |
1814 | ||
1815 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1816 | Here is a matrix of mmap possibilities: | |
1817 | mmap private not fixed | |
1818 | mmap private fixed at somewhere currently unmapped | |
1819 | mmap private fixed at somewhere already mapped | |
1820 | mmap shared not fixed | |
1821 | mmap shared fixed at somewhere currently unmapped | |
1822 | mmap shared fixed at somewhere already mapped | |
1823 | For private mappings, we should verify that changes cannot be read() | |
1824 | back from the file, nor mmap's back from the file at a different | |
1825 | address. (There have been systems where private was not correctly | |
1826 | implemented like the infamous i386 svr4.0, and systems where the | |
1827 | VM page cache was not coherent with the filesystem buffer cache | |
1828 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1829 | For shared mappings, we should conversely verify that changes get | |
1830 | propogated back to all the places they're supposed to be. | |
1831 | ||
1832 | Grep wants private fixed already mapped. | |
1833 | The main things grep needs to know about mmap are: | |
1834 | * does it exist and is it safe to write into the mmap'd area | |
1835 | * how to use it (BSD variants) */ | |
1836 | #include <sys/types.h> | |
1837 | #include <fcntl.h> | |
1838 | #include <sys/mman.h> | |
1839 | ||
1840 | /* This mess was copied from the GNU getpagesize.h. */ | |
1841 | #ifndef HAVE_GETPAGESIZE | |
1842 | # ifdef HAVE_UNISTD_H | |
1843 | # include <unistd.h> | |
1844 | # endif | |
1845 | ||
1846 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1847 | # ifndef HAVE_SYS_PARAM_H | |
1848 | # define HAVE_SYS_PARAM_H 1 | |
1849 | # endif | |
1850 | ||
1851 | # ifdef _SC_PAGESIZE | |
1852 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1853 | # else /* no _SC_PAGESIZE */ | |
1854 | # ifdef HAVE_SYS_PARAM_H | |
1855 | # include <sys/param.h> | |
1856 | # ifdef EXEC_PAGESIZE | |
1857 | # define getpagesize() EXEC_PAGESIZE | |
1858 | # else /* no EXEC_PAGESIZE */ | |
1859 | # ifdef NBPG | |
1860 | # define getpagesize() NBPG * CLSIZE | |
1861 | # ifndef CLSIZE | |
1862 | # define CLSIZE 1 | |
1863 | # endif /* no CLSIZE */ | |
1864 | # else /* no NBPG */ | |
1865 | # ifdef NBPC | |
1866 | # define getpagesize() NBPC | |
1867 | # else /* no NBPC */ | |
1868 | # ifdef PAGESIZE | |
1869 | # define getpagesize() PAGESIZE | |
1870 | # endif /* PAGESIZE */ | |
1871 | # endif /* no NBPC */ | |
1872 | # endif /* no NBPG */ | |
1873 | # endif /* no EXEC_PAGESIZE */ | |
1874 | # else /* no HAVE_SYS_PARAM_H */ | |
1875 | # define getpagesize() 8192 /* punt totally */ | |
1876 | # endif /* no HAVE_SYS_PARAM_H */ | |
1877 | # endif /* no _SC_PAGESIZE */ | |
1878 | ||
1879 | #endif /* no HAVE_GETPAGESIZE */ | |
1880 | ||
1881 | #ifdef __cplusplus | |
1882 | extern "C" { void *malloc(unsigned); } | |
1883 | #else | |
1884 | char *malloc(); | |
1885 | #endif | |
1886 | ||
1887 | int | |
1888 | main() | |
1889 | { | |
1890 | char *data, *data2, *data3; | |
1891 | int i, pagesize; | |
1892 | int fd; | |
1893 | ||
1894 | pagesize = getpagesize(); | |
1895 | ||
1896 | /* | |
1897 | * First, make a file with some known garbage in it. | |
1898 | */ | |
1899 | data = malloc(pagesize); | |
1900 | if (!data) | |
1901 | exit(1); | |
1902 | for (i = 0; i < pagesize; ++i) | |
1903 | *(data + i) = rand(); | |
1904 | umask(0); | |
1905 | fd = creat("conftestmmap", 0600); | |
1906 | if (fd < 0) | |
1907 | exit(1); | |
1908 | if (write(fd, data, pagesize) != pagesize) | |
1909 | exit(1); | |
1910 | close(fd); | |
1911 | ||
1912 | /* | |
1913 | * Next, try to mmap the file at a fixed address which | |
1914 | * already has something else allocated at it. If we can, | |
1915 | * also make sure that we see the same garbage. | |
1916 | */ | |
1917 | fd = open("conftestmmap", O_RDWR); | |
1918 | if (fd < 0) | |
1919 | exit(1); | |
1920 | data2 = malloc(2 * pagesize); | |
1921 | if (!data2) | |
1922 | exit(1); | |
1923 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1924 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1925 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1926 | exit(1); | |
1927 | for (i = 0; i < pagesize; ++i) | |
1928 | if (*(data + i) != *(data2 + i)) | |
1929 | exit(1); | |
1930 | ||
1931 | /* | |
1932 | * Finally, make sure that changes to the mapped area | |
1933 | * do not percolate back to the file as seen by read(). | |
1934 | * (This is a bug on some variants of i386 svr4.0.) | |
1935 | */ | |
1936 | for (i = 0; i < pagesize; ++i) | |
1937 | *(data2 + i) = *(data2 + i) + 1; | |
1938 | data3 = malloc(pagesize); | |
1939 | if (!data3) | |
1940 | exit(1); | |
1941 | if (read(fd, data3, pagesize) != pagesize) | |
1942 | exit(1); | |
1943 | for (i = 0; i < pagesize; ++i) | |
1944 | if (*(data + i) != *(data3 + i)) | |
1945 | exit(1); | |
1946 | close(fd); | |
1947 | unlink("conftestmmap"); | |
1948 | exit(0); | |
1949 | } | |
1950 | ||
1951 | EOF | |
422ea4b8 | 1952 | if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1953 | then |
1954 | ac_cv_func_mmap_fixed_mapped=yes | |
1955 | else | |
1956 | echo "configure: failed program was:" >&5 | |
1957 | cat conftest.$ac_ext >&5 | |
1958 | rm -fr conftest* | |
1959 | ac_cv_func_mmap_fixed_mapped=no | |
1960 | fi | |
1961 | rm -fr conftest* | |
1962 | fi | |
1963 | ||
1964 | fi | |
1965 | ||
1966 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1967 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1968 | cat >> confdefs.h <<\EOF | |
1969 | #define HAVE_MMAP 1 | |
1970 | EOF | |
1971 | ||
1972 | fi | |
1973 | ||
1974 | ||
1975 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1976 | unistd.h values.h sys/param.h | |
1977 | do | |
1978 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1979 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
422ea4b8 | 1980 | echo "configure:1981: checking for $ac_hdr" >&5 |
c906108c SS |
1981 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1982 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1983 | else | |
1984 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 1985 | #line 1986 "configure" |
c906108c SS |
1986 | #include "confdefs.h" |
1987 | #include <$ac_hdr> | |
1988 | EOF | |
1989 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 1990 | { (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1991 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1992 | if test -z "$ac_err"; then | |
1993 | rm -rf conftest* | |
1994 | eval "ac_cv_header_$ac_safe=yes" | |
1995 | else | |
1996 | echo "$ac_err" >&5 | |
1997 | echo "configure: failed program was:" >&5 | |
1998 | cat conftest.$ac_ext >&5 | |
1999 | rm -rf conftest* | |
2000 | eval "ac_cv_header_$ac_safe=no" | |
2001 | fi | |
2002 | rm -f conftest* | |
2003 | fi | |
2004 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2005 | echo "$ac_t""yes" 1>&6 | |
2006 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2007 | cat >> confdefs.h <<EOF | |
2008 | #define $ac_tr_hdr 1 | |
2009 | EOF | |
2010 | ||
2011 | else | |
2012 | echo "$ac_t""no" 1>&6 | |
2013 | fi | |
2014 | done | |
2015 | ||
2016 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2017 | __argz_count __argz_stringify __argz_next | |
2018 | do | |
2019 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 2020 | echo "configure:2021: checking for $ac_func" >&5 |
c906108c SS |
2021 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2022 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2023 | else | |
2024 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2025 | #line 2026 "configure" |
c906108c SS |
2026 | #include "confdefs.h" |
2027 | /* System header to define __stub macros and hopefully few prototypes, | |
2028 | which can conflict with char $ac_func(); below. */ | |
2029 | #include <assert.h> | |
2030 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2031 | /* We use char because int might match the return type of a gcc2 | |
2032 | builtin and then its argument prototype would still apply. */ | |
2033 | char $ac_func(); | |
2034 | ||
2035 | int main() { | |
2036 | ||
2037 | /* The GNU C library defines this for functions which it implements | |
2038 | to always fail with ENOSYS. Some functions are actually named | |
2039 | something starting with __ and the normal name is an alias. */ | |
2040 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2041 | choke me | |
2042 | #else | |
2043 | $ac_func(); | |
2044 | #endif | |
2045 | ||
2046 | ; return 0; } | |
2047 | EOF | |
422ea4b8 | 2048 | if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2049 | rm -rf conftest* |
2050 | eval "ac_cv_func_$ac_func=yes" | |
2051 | else | |
2052 | echo "configure: failed program was:" >&5 | |
2053 | cat conftest.$ac_ext >&5 | |
2054 | rm -rf conftest* | |
2055 | eval "ac_cv_func_$ac_func=no" | |
2056 | fi | |
2057 | rm -f conftest* | |
2058 | fi | |
2059 | ||
2060 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2061 | echo "$ac_t""yes" 1>&6 | |
2062 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2063 | cat >> confdefs.h <<EOF | |
2064 | #define $ac_tr_func 1 | |
2065 | EOF | |
2066 | ||
2067 | else | |
2068 | echo "$ac_t""no" 1>&6 | |
2069 | fi | |
2070 | done | |
2071 | ||
2072 | ||
2073 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2074 | for ac_func in stpcpy | |
2075 | do | |
2076 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 2077 | echo "configure:2078: checking for $ac_func" >&5 |
c906108c SS |
2078 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2079 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2080 | else | |
2081 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2082 | #line 2083 "configure" |
c906108c SS |
2083 | #include "confdefs.h" |
2084 | /* System header to define __stub macros and hopefully few prototypes, | |
2085 | which can conflict with char $ac_func(); below. */ | |
2086 | #include <assert.h> | |
2087 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2088 | /* We use char because int might match the return type of a gcc2 | |
2089 | builtin and then its argument prototype would still apply. */ | |
2090 | char $ac_func(); | |
2091 | ||
2092 | int main() { | |
2093 | ||
2094 | /* The GNU C library defines this for functions which it implements | |
2095 | to always fail with ENOSYS. Some functions are actually named | |
2096 | something starting with __ and the normal name is an alias. */ | |
2097 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2098 | choke me | |
2099 | #else | |
2100 | $ac_func(); | |
2101 | #endif | |
2102 | ||
2103 | ; return 0; } | |
2104 | EOF | |
422ea4b8 | 2105 | if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2106 | rm -rf conftest* |
2107 | eval "ac_cv_func_$ac_func=yes" | |
2108 | else | |
2109 | echo "configure: failed program was:" >&5 | |
2110 | cat conftest.$ac_ext >&5 | |
2111 | rm -rf conftest* | |
2112 | eval "ac_cv_func_$ac_func=no" | |
2113 | fi | |
2114 | rm -f conftest* | |
2115 | fi | |
2116 | ||
2117 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2118 | echo "$ac_t""yes" 1>&6 | |
2119 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2120 | cat >> confdefs.h <<EOF | |
2121 | #define $ac_tr_func 1 | |
2122 | EOF | |
2123 | ||
2124 | else | |
2125 | echo "$ac_t""no" 1>&6 | |
2126 | fi | |
2127 | done | |
2128 | ||
2129 | fi | |
2130 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2131 | cat >> confdefs.h <<\EOF | |
2132 | #define HAVE_STPCPY 1 | |
2133 | EOF | |
2134 | ||
2135 | fi | |
2136 | ||
2137 | if test $ac_cv_header_locale_h = yes; then | |
2138 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
422ea4b8 | 2139 | echo "configure:2140: checking for LC_MESSAGES" >&5 |
c906108c SS |
2140 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2141 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2142 | else | |
2143 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2144 | #line 2145 "configure" |
c906108c SS |
2145 | #include "confdefs.h" |
2146 | #include <locale.h> | |
2147 | int main() { | |
2148 | return LC_MESSAGES | |
2149 | ; return 0; } | |
2150 | EOF | |
422ea4b8 | 2151 | if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2152 | rm -rf conftest* |
2153 | am_cv_val_LC_MESSAGES=yes | |
2154 | else | |
2155 | echo "configure: failed program was:" >&5 | |
2156 | cat conftest.$ac_ext >&5 | |
2157 | rm -rf conftest* | |
2158 | am_cv_val_LC_MESSAGES=no | |
2159 | fi | |
2160 | rm -f conftest* | |
2161 | fi | |
2162 | ||
2163 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2164 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2165 | cat >> confdefs.h <<\EOF | |
2166 | #define HAVE_LC_MESSAGES 1 | |
2167 | EOF | |
2168 | ||
2169 | fi | |
2170 | fi | |
2171 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
422ea4b8 | 2172 | echo "configure:2173: checking whether NLS is requested" >&5 |
c906108c SS |
2173 | # Check whether --enable-nls or --disable-nls was given. |
2174 | if test "${enable_nls+set}" = set; then | |
2175 | enableval="$enable_nls" | |
2176 | USE_NLS=$enableval | |
2177 | else | |
2178 | USE_NLS=yes | |
2179 | fi | |
2180 | ||
2181 | echo "$ac_t""$USE_NLS" 1>&6 | |
2182 | ||
2183 | ||
2184 | USE_INCLUDED_LIBINTL=no | |
2185 | ||
2186 | if test "$USE_NLS" = "yes"; then | |
2187 | cat >> confdefs.h <<\EOF | |
2188 | #define ENABLE_NLS 1 | |
2189 | EOF | |
2190 | ||
2191 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
422ea4b8 | 2192 | echo "configure:2193: checking whether included gettext is requested" >&5 |
c906108c SS |
2193 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2194 | if test "${with_included_gettext+set}" = set; then | |
2195 | withval="$with_included_gettext" | |
2196 | nls_cv_force_use_gnu_gettext=$withval | |
2197 | else | |
2198 | nls_cv_force_use_gnu_gettext=no | |
2199 | fi | |
2200 | ||
2201 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2202 | ||
2203 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2204 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2205 | nls_cv_header_intl= | |
2206 | nls_cv_header_libgt= | |
2207 | CATOBJEXT=NONE | |
2208 | ||
2209 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2210 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
422ea4b8 | 2211 | echo "configure:2212: checking for libintl.h" >&5 |
c906108c SS |
2212 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2214 | else | |
2215 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2216 | #line 2217 "configure" |
c906108c SS |
2217 | #include "confdefs.h" |
2218 | #include <libintl.h> | |
2219 | EOF | |
2220 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 2221 | { (eval echo configure:2222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2222 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2223 | if test -z "$ac_err"; then | |
2224 | rm -rf conftest* | |
2225 | eval "ac_cv_header_$ac_safe=yes" | |
2226 | else | |
2227 | echo "$ac_err" >&5 | |
2228 | echo "configure: failed program was:" >&5 | |
2229 | cat conftest.$ac_ext >&5 | |
2230 | rm -rf conftest* | |
2231 | eval "ac_cv_header_$ac_safe=no" | |
2232 | fi | |
2233 | rm -f conftest* | |
2234 | fi | |
2235 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2236 | echo "$ac_t""yes" 1>&6 | |
2237 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
422ea4b8 | 2238 | echo "configure:2239: checking for gettext in libc" >&5 |
c906108c SS |
2239 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2240 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2241 | else | |
2242 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2243 | #line 2244 "configure" |
c906108c SS |
2244 | #include "confdefs.h" |
2245 | #include <libintl.h> | |
2246 | int main() { | |
2247 | return (int) gettext ("") | |
2248 | ; return 0; } | |
2249 | EOF | |
422ea4b8 | 2250 | if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2251 | rm -rf conftest* |
2252 | gt_cv_func_gettext_libc=yes | |
2253 | else | |
2254 | echo "configure: failed program was:" >&5 | |
2255 | cat conftest.$ac_ext >&5 | |
2256 | rm -rf conftest* | |
2257 | gt_cv_func_gettext_libc=no | |
2258 | fi | |
2259 | rm -f conftest* | |
2260 | fi | |
2261 | ||
2262 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2263 | ||
2264 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2265 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
422ea4b8 | 2266 | echo "configure:2267: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2267 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2268 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2270 | else | |
2271 | ac_save_LIBS="$LIBS" | |
2272 | LIBS="-lintl $LIBS" | |
2273 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2274 | #line 2275 "configure" |
c906108c SS |
2275 | #include "confdefs.h" |
2276 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2277 | /* We use char because int might match the return type of a gcc2 | |
2278 | builtin and then its argument prototype would still apply. */ | |
2279 | char bindtextdomain(); | |
2280 | ||
2281 | int main() { | |
2282 | bindtextdomain() | |
2283 | ; return 0; } | |
2284 | EOF | |
422ea4b8 | 2285 | if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2286 | rm -rf conftest* |
2287 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2288 | else | |
2289 | echo "configure: failed program was:" >&5 | |
2290 | cat conftest.$ac_ext >&5 | |
2291 | rm -rf conftest* | |
2292 | eval "ac_cv_lib_$ac_lib_var=no" | |
2293 | fi | |
2294 | rm -f conftest* | |
2295 | LIBS="$ac_save_LIBS" | |
2296 | ||
2297 | fi | |
2298 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2299 | echo "$ac_t""yes" 1>&6 | |
2300 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
422ea4b8 | 2301 | echo "configure:2302: checking for gettext in libintl" >&5 |
c906108c SS |
2302 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2304 | else | |
2305 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2306 | #line 2307 "configure" |
c906108c SS |
2307 | #include "confdefs.h" |
2308 | ||
2309 | int main() { | |
2310 | return (int) gettext ("") | |
2311 | ; return 0; } | |
2312 | EOF | |
422ea4b8 | 2313 | if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2314 | rm -rf conftest* |
2315 | gt_cv_func_gettext_libintl=yes | |
2316 | else | |
2317 | echo "configure: failed program was:" >&5 | |
2318 | cat conftest.$ac_ext >&5 | |
2319 | rm -rf conftest* | |
2320 | gt_cv_func_gettext_libintl=no | |
2321 | fi | |
2322 | rm -f conftest* | |
2323 | fi | |
2324 | ||
2325 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2326 | else | |
2327 | echo "$ac_t""no" 1>&6 | |
2328 | fi | |
2329 | ||
2330 | fi | |
2331 | ||
2332 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2333 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2334 | cat >> confdefs.h <<\EOF | |
2335 | #define HAVE_GETTEXT 1 | |
2336 | EOF | |
2337 | ||
2338 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2339 | set dummy msgfmt; ac_word=$2 | |
2340 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2341 | echo "configure:2342: checking for $ac_word" >&5 |
c906108c SS |
2342 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2344 | else | |
2345 | case "$MSGFMT" in | |
2346 | /*) | |
2347 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2348 | ;; | |
2349 | *) | |
2350 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2351 | for ac_dir in $PATH; do | |
2352 | test -z "$ac_dir" && ac_dir=. | |
2353 | if test -f $ac_dir/$ac_word; then | |
2354 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2355 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2356 | break | |
2357 | fi | |
2358 | fi | |
2359 | done | |
2360 | IFS="$ac_save_ifs" | |
2361 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2362 | ;; | |
2363 | esac | |
2364 | fi | |
2365 | MSGFMT="$ac_cv_path_MSGFMT" | |
2366 | if test -n "$MSGFMT"; then | |
2367 | echo "$ac_t""$MSGFMT" 1>&6 | |
2368 | else | |
2369 | echo "$ac_t""no" 1>&6 | |
2370 | fi | |
2371 | if test "$MSGFMT" != "no"; then | |
2372 | for ac_func in dcgettext | |
2373 | do | |
2374 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 2375 | echo "configure:2376: checking for $ac_func" >&5 |
c906108c SS |
2376 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2377 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2378 | else | |
2379 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2380 | #line 2381 "configure" |
c906108c SS |
2381 | #include "confdefs.h" |
2382 | /* System header to define __stub macros and hopefully few prototypes, | |
2383 | which can conflict with char $ac_func(); below. */ | |
2384 | #include <assert.h> | |
2385 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2386 | /* We use char because int might match the return type of a gcc2 | |
2387 | builtin and then its argument prototype would still apply. */ | |
2388 | char $ac_func(); | |
2389 | ||
2390 | int main() { | |
2391 | ||
2392 | /* The GNU C library defines this for functions which it implements | |
2393 | to always fail with ENOSYS. Some functions are actually named | |
2394 | something starting with __ and the normal name is an alias. */ | |
2395 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2396 | choke me | |
2397 | #else | |
2398 | $ac_func(); | |
2399 | #endif | |
2400 | ||
2401 | ; return 0; } | |
2402 | EOF | |
422ea4b8 | 2403 | if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2404 | rm -rf conftest* |
2405 | eval "ac_cv_func_$ac_func=yes" | |
2406 | else | |
2407 | echo "configure: failed program was:" >&5 | |
2408 | cat conftest.$ac_ext >&5 | |
2409 | rm -rf conftest* | |
2410 | eval "ac_cv_func_$ac_func=no" | |
2411 | fi | |
2412 | rm -f conftest* | |
2413 | fi | |
2414 | ||
2415 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2416 | echo "$ac_t""yes" 1>&6 | |
2417 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2418 | cat >> confdefs.h <<EOF | |
2419 | #define $ac_tr_func 1 | |
2420 | EOF | |
2421 | ||
2422 | else | |
2423 | echo "$ac_t""no" 1>&6 | |
2424 | fi | |
2425 | done | |
2426 | ||
2427 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2428 | set dummy gmsgfmt; ac_word=$2 | |
2429 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2430 | echo "configure:2431: checking for $ac_word" >&5 |
c906108c SS |
2431 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2432 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2433 | else | |
2434 | case "$GMSGFMT" in | |
2435 | /*) | |
2436 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2437 | ;; | |
2438 | ?:/*) | |
2439 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2440 | ;; | |
2441 | *) | |
2442 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2443 | ac_dummy="$PATH" | |
2444 | for ac_dir in $ac_dummy; do | |
2445 | test -z "$ac_dir" && ac_dir=. | |
2446 | if test -f $ac_dir/$ac_word; then | |
2447 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2448 | break | |
2449 | fi | |
2450 | done | |
2451 | IFS="$ac_save_ifs" | |
2452 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2453 | ;; | |
2454 | esac | |
2455 | fi | |
2456 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2457 | if test -n "$GMSGFMT"; then | |
2458 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2459 | else | |
2460 | echo "$ac_t""no" 1>&6 | |
2461 | fi | |
2462 | ||
2463 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2464 | set dummy xgettext; ac_word=$2 | |
2465 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2466 | echo "configure:2467: checking for $ac_word" >&5 |
c906108c SS |
2467 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2469 | else | |
2470 | case "$XGETTEXT" in | |
2471 | /*) | |
2472 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2473 | ;; | |
2474 | *) | |
2475 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2476 | for ac_dir in $PATH; do | |
2477 | test -z "$ac_dir" && ac_dir=. | |
2478 | if test -f $ac_dir/$ac_word; then | |
2479 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2480 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2481 | break | |
2482 | fi | |
2483 | fi | |
2484 | done | |
2485 | IFS="$ac_save_ifs" | |
2486 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2487 | ;; | |
2488 | esac | |
2489 | fi | |
2490 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2491 | if test -n "$XGETTEXT"; then | |
2492 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2493 | else | |
2494 | echo "$ac_t""no" 1>&6 | |
2495 | fi | |
2496 | ||
2497 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2498 | #line 2499 "configure" |
c906108c SS |
2499 | #include "confdefs.h" |
2500 | ||
2501 | int main() { | |
2502 | extern int _nl_msg_cat_cntr; | |
2503 | return _nl_msg_cat_cntr | |
2504 | ; return 0; } | |
2505 | EOF | |
422ea4b8 | 2506 | if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2507 | rm -rf conftest* |
2508 | CATOBJEXT=.gmo | |
2509 | DATADIRNAME=share | |
2510 | else | |
2511 | echo "configure: failed program was:" >&5 | |
2512 | cat conftest.$ac_ext >&5 | |
2513 | rm -rf conftest* | |
2514 | CATOBJEXT=.mo | |
2515 | DATADIRNAME=lib | |
2516 | fi | |
2517 | rm -f conftest* | |
2518 | INSTOBJEXT=.mo | |
2519 | fi | |
2520 | fi | |
2521 | ||
2522 | else | |
2523 | echo "$ac_t""no" 1>&6 | |
2524 | fi | |
2525 | ||
2526 | ||
2527 | ||
2528 | if test "$CATOBJEXT" = "NONE"; then | |
2529 | nls_cv_use_gnu_gettext=yes | |
2530 | fi | |
2531 | fi | |
2532 | ||
2533 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2534 | INTLOBJS="\$(GETTOBJS)" | |
2535 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2536 | set dummy msgfmt; ac_word=$2 | |
2537 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2538 | echo "configure:2539: checking for $ac_word" >&5 |
c906108c SS |
2539 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2540 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2541 | else | |
2542 | case "$MSGFMT" in | |
2543 | /*) | |
2544 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2545 | ;; | |
2546 | *) | |
2547 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2548 | for ac_dir in $PATH; do | |
2549 | test -z "$ac_dir" && ac_dir=. | |
2550 | if test -f $ac_dir/$ac_word; then | |
2551 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2552 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2553 | break | |
2554 | fi | |
2555 | fi | |
2556 | done | |
2557 | IFS="$ac_save_ifs" | |
2558 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2559 | ;; | |
2560 | esac | |
2561 | fi | |
2562 | MSGFMT="$ac_cv_path_MSGFMT" | |
2563 | if test -n "$MSGFMT"; then | |
2564 | echo "$ac_t""$MSGFMT" 1>&6 | |
2565 | else | |
2566 | echo "$ac_t""no" 1>&6 | |
2567 | fi | |
2568 | ||
2569 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2570 | set dummy gmsgfmt; ac_word=$2 | |
2571 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2572 | echo "configure:2573: checking for $ac_word" >&5 |
c906108c SS |
2573 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2574 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2575 | else | |
2576 | case "$GMSGFMT" in | |
2577 | /*) | |
2578 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2579 | ;; | |
2580 | ?:/*) | |
2581 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2582 | ;; | |
2583 | *) | |
2584 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2585 | ac_dummy="$PATH" | |
2586 | for ac_dir in $ac_dummy; do | |
2587 | test -z "$ac_dir" && ac_dir=. | |
2588 | if test -f $ac_dir/$ac_word; then | |
2589 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2590 | break | |
2591 | fi | |
2592 | done | |
2593 | IFS="$ac_save_ifs" | |
2594 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2595 | ;; | |
2596 | esac | |
2597 | fi | |
2598 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2599 | if test -n "$GMSGFMT"; then | |
2600 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2601 | else | |
2602 | echo "$ac_t""no" 1>&6 | |
2603 | fi | |
2604 | ||
2605 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2606 | set dummy xgettext; ac_word=$2 | |
2607 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2608 | echo "configure:2609: checking for $ac_word" >&5 |
c906108c SS |
2609 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2611 | else | |
2612 | case "$XGETTEXT" in | |
2613 | /*) | |
2614 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2615 | ;; | |
2616 | *) | |
2617 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2618 | for ac_dir in $PATH; do | |
2619 | test -z "$ac_dir" && ac_dir=. | |
2620 | if test -f $ac_dir/$ac_word; then | |
2621 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2622 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2623 | break | |
2624 | fi | |
2625 | fi | |
2626 | done | |
2627 | IFS="$ac_save_ifs" | |
2628 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2629 | ;; | |
2630 | esac | |
2631 | fi | |
2632 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2633 | if test -n "$XGETTEXT"; then | |
2634 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2635 | else | |
2636 | echo "$ac_t""no" 1>&6 | |
2637 | fi | |
2638 | ||
2639 | ||
2640 | USE_INCLUDED_LIBINTL=yes | |
2641 | CATOBJEXT=.gmo | |
2642 | INSTOBJEXT=.mo | |
2643 | DATADIRNAME=share | |
2644 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2645 | INTLLIBS=$INTLDEPS | |
2646 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2647 | nls_cv_header_intl=libintl.h | |
2648 | nls_cv_header_libgt=libgettext.h | |
2649 | fi | |
2650 | ||
2651 | if test "$XGETTEXT" != ":"; then | |
2652 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2653 | : ; | |
2654 | else | |
2655 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2656 | XGETTEXT=":" | |
2657 | fi | |
2658 | fi | |
2659 | ||
2660 | # We need to process the po/ directory. | |
2661 | POSUB=po | |
2662 | else | |
2663 | DATADIRNAME=share | |
2664 | nls_cv_header_intl=libintl.h | |
2665 | nls_cv_header_libgt=libgettext.h | |
2666 | fi | |
2667 | ||
2668 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2669 | # because some of the sources are only built for this goal. | |
2670 | if test "$PACKAGE" = gettext; then | |
2671 | USE_NLS=yes | |
2672 | USE_INCLUDED_LIBINTL=yes | |
2673 | fi | |
2674 | ||
2675 | for lang in $ALL_LINGUAS; do | |
2676 | GMOFILES="$GMOFILES $lang.gmo" | |
2677 | POFILES="$POFILES $lang.po" | |
2678 | done | |
2679 | ||
2680 | ||
2681 | ||
2682 | ||
2683 | ||
2684 | ||
2685 | ||
2686 | ||
2687 | ||
2688 | ||
2689 | ||
2690 | ||
2691 | ||
2692 | ||
2693 | if test "x$CATOBJEXT" != "x"; then | |
2694 | if test "x$ALL_LINGUAS" = "x"; then | |
2695 | LINGUAS= | |
2696 | else | |
2697 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
422ea4b8 | 2698 | echo "configure:2699: checking for catalogs to be installed" >&5 |
c906108c SS |
2699 | NEW_LINGUAS= |
2700 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2701 | case "$ALL_LINGUAS" in | |
2702 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2703 | esac | |
2704 | done | |
2705 | LINGUAS=$NEW_LINGUAS | |
2706 | echo "$ac_t""$LINGUAS" 1>&6 | |
2707 | fi | |
2708 | ||
2709 | if test -n "$LINGUAS"; then | |
2710 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2711 | fi | |
2712 | fi | |
2713 | ||
2714 | if test $ac_cv_header_locale_h = yes; then | |
2715 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2716 | else | |
2717 | INCLUDE_LOCALE_H="\ | |
2718 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2719 | fi | |
2720 | ||
2721 | ||
2722 | if test -f $srcdir/po2tbl.sed.in; then | |
2723 | if test "$CATOBJEXT" = ".cat"; then | |
2724 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2725 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
422ea4b8 | 2726 | echo "configure:2727: checking for linux/version.h" >&5 |
c906108c SS |
2727 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2728 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2729 | else | |
2730 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 2731 | #line 2732 "configure" |
c906108c SS |
2732 | #include "confdefs.h" |
2733 | #include <linux/version.h> | |
2734 | EOF | |
2735 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 2736 | { (eval echo configure:2737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2737 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2738 | if test -z "$ac_err"; then | |
2739 | rm -rf conftest* | |
2740 | eval "ac_cv_header_$ac_safe=yes" | |
2741 | else | |
2742 | echo "$ac_err" >&5 | |
2743 | echo "configure: failed program was:" >&5 | |
2744 | cat conftest.$ac_ext >&5 | |
2745 | rm -rf conftest* | |
2746 | eval "ac_cv_header_$ac_safe=no" | |
2747 | fi | |
2748 | rm -f conftest* | |
2749 | fi | |
2750 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2751 | echo "$ac_t""yes" 1>&6 | |
2752 | msgformat=linux | |
2753 | else | |
2754 | echo "$ac_t""no" 1>&6 | |
2755 | msgformat=xopen | |
2756 | fi | |
2757 | ||
2758 | ||
2759 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2760 | fi | |
2761 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2762 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2763 | fi | |
2764 | ||
2765 | if test "$PACKAGE" = "gettext"; then | |
2766 | GT_NO="#NO#" | |
2767 | GT_YES= | |
2768 | else | |
2769 | GT_NO= | |
2770 | GT_YES="#YES#" | |
2771 | fi | |
2772 | ||
2773 | ||
2774 | ||
2775 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2776 | ||
2777 | ||
2778 | l= | |
2779 | ||
2780 | ||
2781 | if test -d $srcdir/po; then | |
2782 | test -d po || mkdir po | |
2783 | if test "x$srcdir" != "x."; then | |
2784 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2785 | posrcprefix="$srcdir/" | |
2786 | else | |
2787 | posrcprefix="../$srcdir/" | |
2788 | fi | |
2789 | else | |
2790 | posrcprefix="../" | |
2791 | fi | |
2792 | rm -f po/POTFILES | |
2793 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2794 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2795 | fi | |
2796 | ||
2797 | ||
2798 | ||
2799 | CONFIG_OBS= | |
2800 | CONFIG_DEPS= | |
2801 | CONFIG_SRCS= | |
fb40c209 AC |
2802 | CONFIG_INITS= |
2803 | ENABLE_CFLAGS= | |
b3a90332 AC |
2804 | CONFIG_ALL= |
2805 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2806 | CONFIG_INSTALL= |
2807 | CONFIG_UNINSTALL= | |
c906108c SS |
2808 | |
2809 | configdirs="doc testsuite" | |
2810 | ||
96baa820 JM |
2811 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2812 | if test "${enable_multi_ice+set}" = set; then | |
2813 | enableval="$enable_multi_ice" | |
2814 | case "${enableval}" in | |
2815 | yes ) enable_multi_ice="yes" ;; | |
2816 | no) enable_multi_ice="no" ;; | |
2817 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2818 | esac | |
2819 | ||
2820 | fi | |
2821 | ||
2822 | ||
2823 | if test "${enable_multi_ice}" = "yes"; then | |
2824 | configdirs="${configdirs} multi-ice" | |
2825 | fi | |
2826 | ||
c906108c SS |
2827 | |
2828 | . ${srcdir}/configure.host | |
2829 | ||
2830 | . ${srcdir}/configure.tgt | |
2831 | ||
2832 | ||
0d06e24b | 2833 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2834 | do |
2835 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2836 | set dummy $ac_prog; ac_word=$2 | |
2837 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2838 | echo "configure:2839: checking for $ac_word" >&5 |
7a292a7a SS |
2839 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2840 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2841 | else | |
2842 | if test -n "$AWK"; then | |
2843 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2844 | else | |
2845 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2846 | ac_dummy="$PATH" | |
2847 | for ac_dir in $ac_dummy; do | |
2848 | test -z "$ac_dir" && ac_dir=. | |
2849 | if test -f $ac_dir/$ac_word; then | |
2850 | ac_cv_prog_AWK="$ac_prog" | |
2851 | break | |
2852 | fi | |
2853 | done | |
2854 | IFS="$ac_save_ifs" | |
2855 | fi | |
2856 | fi | |
2857 | AWK="$ac_cv_prog_AWK" | |
2858 | if test -n "$AWK"; then | |
2859 | echo "$ac_t""$AWK" 1>&6 | |
2860 | else | |
2861 | echo "$ac_t""no" 1>&6 | |
2862 | fi | |
2863 | ||
2864 | test -n "$AWK" && break | |
2865 | done | |
2866 | ||
c906108c SS |
2867 | # Find a good install program. We prefer a C program (faster), |
2868 | # so one script is as good as another. But avoid the broken or | |
2869 | # incompatible versions: | |
2870 | # SysV /etc/install, /usr/sbin/install | |
2871 | # SunOS /usr/etc/install | |
2872 | # IRIX /sbin/install | |
2873 | # AIX /bin/install | |
2874 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2875 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2876 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2877 | # ./install, which can be erroneously created by make from ./install.sh. | |
2878 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
422ea4b8 | 2879 | echo "configure:2880: checking for a BSD compatible install" >&5 |
c906108c SS |
2880 | if test -z "$INSTALL"; then |
2881 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2882 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2883 | else | |
2884 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2885 | for ac_dir in $PATH; do | |
2886 | # Account for people who put trailing slashes in PATH elements. | |
2887 | case "$ac_dir/" in | |
2888 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2889 | *) | |
2890 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2891 | # Don't use installbsd from OSF since it installs stuff as root | |
2892 | # by default. | |
2893 | for ac_prog in ginstall scoinst install; do | |
2894 | if test -f $ac_dir/$ac_prog; then | |
2895 | if test $ac_prog = install && | |
2896 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2897 | # AIX install. It has an incompatible calling convention. | |
2898 | : | |
2899 | else | |
2900 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2901 | break 2 | |
2902 | fi | |
2903 | fi | |
2904 | done | |
2905 | ;; | |
2906 | esac | |
2907 | done | |
2908 | IFS="$ac_save_IFS" | |
2909 | ||
2910 | fi | |
2911 | if test "${ac_cv_path_install+set}" = set; then | |
2912 | INSTALL="$ac_cv_path_install" | |
2913 | else | |
2914 | # As a last resort, use the slow shell script. We don't cache a | |
2915 | # path for INSTALL within a source directory, because that will | |
2916 | # break other packages using the cache if that directory is | |
2917 | # removed, or if the path is relative. | |
2918 | INSTALL="$ac_install_sh" | |
2919 | fi | |
2920 | fi | |
2921 | echo "$ac_t""$INSTALL" 1>&6 | |
2922 | ||
2923 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2924 | # It thinks the first close brace ends the variable substitution. | |
2925 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2926 | ||
2927 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2928 | ||
2929 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2930 | ||
2931 | if test $host != $build; then | |
2932 | ac_tool_prefix=${host_alias}- | |
2933 | else | |
2934 | ac_tool_prefix= | |
2935 | fi | |
2936 | ||
2937 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2938 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2939 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2940 | echo "configure:2941: checking for $ac_word" >&5 |
c906108c SS |
2941 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2943 | else | |
2944 | if test -n "$AR"; then | |
2945 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2946 | else | |
2947 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2948 | ac_dummy="$PATH" | |
2949 | for ac_dir in $ac_dummy; do | |
2950 | test -z "$ac_dir" && ac_dir=. | |
2951 | if test -f $ac_dir/$ac_word; then | |
2952 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2953 | break | |
2954 | fi | |
2955 | done | |
2956 | IFS="$ac_save_ifs" | |
2957 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2958 | fi | |
2959 | fi | |
2960 | AR="$ac_cv_prog_AR" | |
2961 | if test -n "$AR"; then | |
2962 | echo "$ac_t""$AR" 1>&6 | |
2963 | else | |
2964 | echo "$ac_t""no" 1>&6 | |
2965 | fi | |
2966 | ||
2967 | ||
2968 | ||
2969 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2970 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2971 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 2972 | echo "configure:2973: checking for $ac_word" >&5 |
c906108c SS |
2973 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2974 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2975 | else | |
2976 | if test -n "$RANLIB"; then | |
2977 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2978 | else | |
2979 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2980 | ac_dummy="$PATH" | |
2981 | for ac_dir in $ac_dummy; do | |
2982 | test -z "$ac_dir" && ac_dir=. | |
2983 | if test -f $ac_dir/$ac_word; then | |
2984 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
2985 | break | |
2986 | fi | |
2987 | done | |
2988 | IFS="$ac_save_ifs" | |
2989 | fi | |
2990 | fi | |
2991 | RANLIB="$ac_cv_prog_RANLIB" | |
2992 | if test -n "$RANLIB"; then | |
2993 | echo "$ac_t""$RANLIB" 1>&6 | |
2994 | else | |
2995 | echo "$ac_t""no" 1>&6 | |
2996 | fi | |
2997 | ||
2998 | ||
2999 | if test -z "$ac_cv_prog_RANLIB"; then | |
3000 | if test -n "$ac_tool_prefix"; then | |
3001 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3002 | set dummy ranlib; ac_word=$2 | |
3003 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 3004 | echo "configure:3005: checking for $ac_word" >&5 |
c906108c SS |
3005 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3007 | else | |
3008 | if test -n "$RANLIB"; then | |
3009 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3010 | else | |
3011 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3012 | ac_dummy="$PATH" | |
3013 | for ac_dir in $ac_dummy; do | |
3014 | test -z "$ac_dir" && ac_dir=. | |
3015 | if test -f $ac_dir/$ac_word; then | |
3016 | ac_cv_prog_RANLIB="ranlib" | |
3017 | break | |
3018 | fi | |
3019 | done | |
3020 | IFS="$ac_save_ifs" | |
3021 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3022 | fi | |
3023 | fi | |
3024 | RANLIB="$ac_cv_prog_RANLIB" | |
3025 | if test -n "$RANLIB"; then | |
3026 | echo "$ac_t""$RANLIB" 1>&6 | |
3027 | else | |
3028 | echo "$ac_t""no" 1>&6 | |
3029 | fi | |
3030 | ||
3031 | else | |
3032 | RANLIB=":" | |
3033 | fi | |
3034 | fi | |
3035 | ||
95ca63c4 CF |
3036 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3037 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3038 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 3039 | echo "configure:3040: checking for $ac_word" >&5 |
95ca63c4 CF |
3040 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3041 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3042 | else | |
3043 | if test -n "$DLLTOOL"; then | |
3044 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3045 | else | |
3046 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3047 | ac_dummy="$PATH" | |
3048 | for ac_dir in $ac_dummy; do | |
3049 | test -z "$ac_dir" && ac_dir=. | |
3050 | if test -f $ac_dir/$ac_word; then | |
3051 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3052 | break | |
3053 | fi | |
3054 | done | |
3055 | IFS="$ac_save_ifs" | |
3056 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3057 | fi | |
3058 | fi | |
3059 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3060 | if test -n "$DLLTOOL"; then | |
3061 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3062 | else | |
3063 | echo "$ac_t""no" 1>&6 | |
3064 | fi | |
3065 | ||
3066 | ||
3067 | ||
3068 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3069 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3070 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 3071 | echo "configure:3072: checking for $ac_word" >&5 |
95ca63c4 CF |
3072 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3074 | else | |
3075 | if test -n "$WINDRES"; then | |
3076 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3077 | else | |
3078 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3079 | ac_dummy="$PATH" | |
3080 | for ac_dir in $ac_dummy; do | |
3081 | test -z "$ac_dir" && ac_dir=. | |
3082 | if test -f $ac_dir/$ac_word; then | |
3083 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3084 | break | |
3085 | fi | |
3086 | done | |
3087 | IFS="$ac_save_ifs" | |
3088 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3089 | fi | |
3090 | fi | |
3091 | WINDRES="$ac_cv_prog_WINDRES" | |
3092 | if test -n "$WINDRES"; then | |
3093 | echo "$ac_t""$WINDRES" 1>&6 | |
3094 | else | |
3095 | echo "$ac_t""no" 1>&6 | |
3096 | fi | |
3097 | ||
3098 | ||
3099 | ||
c906108c SS |
3100 | for ac_prog in 'bison -y' byacc |
3101 | do | |
3102 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3103 | set dummy $ac_prog; ac_word=$2 | |
3104 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 3105 | echo "configure:3106: checking for $ac_word" >&5 |
c906108c SS |
3106 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3108 | else | |
3109 | if test -n "$YACC"; then | |
3110 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3111 | else | |
3112 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3113 | ac_dummy="$PATH" | |
3114 | for ac_dir in $ac_dummy; do | |
3115 | test -z "$ac_dir" && ac_dir=. | |
3116 | if test -f $ac_dir/$ac_word; then | |
3117 | ac_cv_prog_YACC="$ac_prog" | |
3118 | break | |
3119 | fi | |
3120 | done | |
3121 | IFS="$ac_save_ifs" | |
3122 | fi | |
3123 | fi | |
3124 | YACC="$ac_cv_prog_YACC" | |
3125 | if test -n "$YACC"; then | |
3126 | echo "$ac_t""$YACC" 1>&6 | |
3127 | else | |
3128 | echo "$ac_t""no" 1>&6 | |
3129 | fi | |
3130 | ||
3131 | test -n "$YACC" && break | |
3132 | done | |
3133 | test -n "$YACC" || YACC="yacc" | |
3134 | ||
3135 | ||
75c6e08a MK |
3136 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3137 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3138 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
422ea4b8 | 3139 | echo "configure:3140: checking for $ac_word" >&5 |
75c6e08a MK |
3140 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3141 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3142 | else | |
3143 | if test -n "$MIG"; then | |
3144 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3145 | else | |
3146 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3147 | ac_dummy="$PATH" | |
3148 | for ac_dir in $ac_dummy; do | |
3149 | test -z "$ac_dir" && ac_dir=. | |
3150 | if test -f $ac_dir/$ac_word; then | |
3151 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3152 | break | |
3153 | fi | |
3154 | done | |
3155 | IFS="$ac_save_ifs" | |
3156 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3157 | fi | |
3158 | fi | |
3159 | MIG="$ac_cv_prog_MIG" | |
3160 | if test -n "$MIG"; then | |
3161 | echo "$ac_t""$MIG" 1>&6 | |
3162 | else | |
3163 | echo "$ac_t""no" 1>&6 | |
3164 | fi | |
3165 | ||
3166 | ||
3167 | ||
3168 | ||
c906108c SS |
3169 | if test "$program_transform_name" = s,x,x,; then |
3170 | program_transform_name= | |
3171 | else | |
3172 | # Double any \ or $. echo might interpret backslashes. | |
3173 | cat <<\EOF_SED > conftestsed | |
3174 | s,\\,\\\\,g; s,\$,$$,g | |
3175 | EOF_SED | |
3176 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3177 | rm -f conftestsed | |
3178 | fi | |
3179 | test "$program_prefix" != NONE && | |
3180 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3181 | # Use a double $ so make ignores it. | |
3182 | test "$program_suffix" != NONE && | |
3183 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3184 | ||
3185 | # sed with no file args requires a program. | |
3186 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3187 | ||
3188 | ||
3189 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
422ea4b8 | 3190 | echo "configure:3191: checking return type of signal handlers" >&5 |
c906108c SS |
3191 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3193 | else | |
3194 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3195 | #line 3196 "configure" |
c906108c SS |
3196 | #include "confdefs.h" |
3197 | #include <sys/types.h> | |
3198 | #include <signal.h> | |
3199 | #ifdef signal | |
3200 | #undef signal | |
3201 | #endif | |
3202 | #ifdef __cplusplus | |
3203 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3204 | #else | |
3205 | void (*signal ()) (); | |
3206 | #endif | |
3207 | ||
3208 | int main() { | |
3209 | int i; | |
3210 | ; return 0; } | |
3211 | EOF | |
422ea4b8 | 3212 | if { (eval echo configure:3213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3213 | rm -rf conftest* |
3214 | ac_cv_type_signal=void | |
3215 | else | |
3216 | echo "configure: failed program was:" >&5 | |
3217 | cat conftest.$ac_ext >&5 | |
3218 | rm -rf conftest* | |
3219 | ac_cv_type_signal=int | |
3220 | fi | |
3221 | rm -f conftest* | |
3222 | fi | |
3223 | ||
3224 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3225 | cat >> confdefs.h <<EOF | |
3226 | #define RETSIGTYPE $ac_cv_type_signal | |
3227 | EOF | |
3228 | ||
3229 | ||
3230 | ||
3231 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
422ea4b8 | 3232 | echo "configure:3233: checking for ANSI C header files" >&5 |
c906108c SS |
3233 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3235 | else | |
3236 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3237 | #line 3238 "configure" |
c906108c SS |
3238 | #include "confdefs.h" |
3239 | #include <stdlib.h> | |
3240 | #include <stdarg.h> | |
3241 | #include <string.h> | |
3242 | #include <float.h> | |
3243 | EOF | |
3244 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 3245 | { (eval echo configure:3246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3246 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3247 | if test -z "$ac_err"; then | |
3248 | rm -rf conftest* | |
3249 | ac_cv_header_stdc=yes | |
3250 | else | |
3251 | echo "$ac_err" >&5 | |
3252 | echo "configure: failed program was:" >&5 | |
3253 | cat conftest.$ac_ext >&5 | |
3254 | rm -rf conftest* | |
3255 | ac_cv_header_stdc=no | |
3256 | fi | |
3257 | rm -f conftest* | |
3258 | ||
3259 | if test $ac_cv_header_stdc = yes; then | |
3260 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3261 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3262 | #line 3263 "configure" |
c906108c SS |
3263 | #include "confdefs.h" |
3264 | #include <string.h> | |
3265 | EOF | |
3266 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3267 | egrep "memchr" >/dev/null 2>&1; then | |
3268 | : | |
3269 | else | |
3270 | rm -rf conftest* | |
3271 | ac_cv_header_stdc=no | |
3272 | fi | |
3273 | rm -f conftest* | |
3274 | ||
3275 | fi | |
3276 | ||
3277 | if test $ac_cv_header_stdc = yes; then | |
3278 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3279 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3280 | #line 3281 "configure" |
c906108c SS |
3281 | #include "confdefs.h" |
3282 | #include <stdlib.h> | |
3283 | EOF | |
3284 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3285 | egrep "free" >/dev/null 2>&1; then | |
3286 | : | |
3287 | else | |
3288 | rm -rf conftest* | |
3289 | ac_cv_header_stdc=no | |
3290 | fi | |
3291 | rm -f conftest* | |
3292 | ||
3293 | fi | |
3294 | ||
3295 | if test $ac_cv_header_stdc = yes; then | |
3296 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3297 | if test "$cross_compiling" = yes; then | |
3298 | : | |
3299 | else | |
3300 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3301 | #line 3302 "configure" |
c906108c SS |
3302 | #include "confdefs.h" |
3303 | #include <ctype.h> | |
3304 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3305 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3306 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3307 | int main () { int i; for (i = 0; i < 256; i++) | |
3308 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3309 | exit (0); } | |
3310 | ||
3311 | EOF | |
422ea4b8 | 3312 | if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3313 | then |
3314 | : | |
3315 | else | |
3316 | echo "configure: failed program was:" >&5 | |
3317 | cat conftest.$ac_ext >&5 | |
3318 | rm -fr conftest* | |
3319 | ac_cv_header_stdc=no | |
3320 | fi | |
3321 | rm -fr conftest* | |
3322 | fi | |
3323 | ||
3324 | fi | |
3325 | fi | |
3326 | ||
3327 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3328 | if test $ac_cv_header_stdc = yes; then | |
3329 | cat >> confdefs.h <<\EOF | |
3330 | #define STDC_HEADERS 1 | |
3331 | EOF | |
3332 | ||
3333 | fi | |
3334 | ||
3335 | ||
6abadcf8 ND |
3336 | |
3337 | case $host_os in solaris2.7) case "$GCC" in yes) | |
3338 | cat >> confdefs.h <<\EOF | |
3339 | #define _MSE_INT_H 1 | |
3340 | EOF | |
3341 | ||
3342 | esac; esac | |
3343 | ||
2894793a | 3344 | for ac_hdr in ctype.h endian.h link.h thread_db.h proc_service.h \ |
c906108c | 3345 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3346 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3347 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3348 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
4b14d3e4 | 3349 | time.h sys/ioctl.h sys/user.h \ |
2894793a AC |
3350 | dirent.h sys/ndir.h sys/dir.h ndir.h \ |
3351 | curses.h ncurses.h | |
c906108c SS |
3352 | do |
3353 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3354 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
422ea4b8 | 3355 | echo "configure:3356: checking for $ac_hdr" >&5 |
c906108c SS |
3356 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3357 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3358 | else | |
3359 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3360 | #line 3361 "configure" |
c906108c SS |
3361 | #include "confdefs.h" |
3362 | #include <$ac_hdr> | |
3363 | EOF | |
3364 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 3365 | { (eval echo configure:3366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3366 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3367 | if test -z "$ac_err"; then | |
3368 | rm -rf conftest* | |
3369 | eval "ac_cv_header_$ac_safe=yes" | |
3370 | else | |
3371 | echo "$ac_err" >&5 | |
3372 | echo "configure: failed program was:" >&5 | |
3373 | cat conftest.$ac_ext >&5 | |
3374 | rm -rf conftest* | |
3375 | eval "ac_cv_header_$ac_safe=no" | |
3376 | fi | |
3377 | rm -f conftest* | |
3378 | fi | |
3379 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3380 | echo "$ac_t""yes" 1>&6 | |
3381 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3382 | cat >> confdefs.h <<EOF | |
3383 | #define $ac_tr_hdr 1 | |
3384 | EOF | |
3385 | ||
3386 | else | |
3387 | echo "$ac_t""no" 1>&6 | |
3388 | fi | |
3389 | done | |
3390 | ||
3391 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
422ea4b8 | 3392 | echo "configure:3393: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3393 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3395 | else | |
3396 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3397 | #line 3398 "configure" |
c906108c SS |
3398 | #include "confdefs.h" |
3399 | #include <sys/types.h> | |
3400 | #include <sys/stat.h> | |
3401 | ||
3402 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3403 | # if S_ISBLK (S_IFDIR) | |
3404 | You lose. | |
3405 | # endif | |
3406 | #endif | |
3407 | ||
3408 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3409 | # if S_ISBLK (S_IFCHR) | |
3410 | You lose. | |
3411 | # endif | |
3412 | #endif | |
3413 | ||
3414 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3415 | # if S_ISLNK (S_IFREG) | |
3416 | You lose. | |
3417 | # endif | |
3418 | #endif | |
3419 | ||
3420 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3421 | # if S_ISSOCK (S_IFREG) | |
3422 | You lose. | |
3423 | # endif | |
3424 | #endif | |
3425 | ||
3426 | EOF | |
3427 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3428 | egrep "You lose" >/dev/null 2>&1; then | |
3429 | rm -rf conftest* | |
3430 | ac_cv_header_stat_broken=yes | |
3431 | else | |
3432 | rm -rf conftest* | |
3433 | ac_cv_header_stat_broken=no | |
3434 | fi | |
3435 | rm -f conftest* | |
3436 | ||
3437 | fi | |
3438 | ||
3439 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3440 | if test $ac_cv_header_stat_broken = yes; then | |
3441 | cat >> confdefs.h <<\EOF | |
3442 | #define STAT_MACROS_BROKEN 1 | |
3443 | EOF | |
3444 | ||
3445 | fi | |
3446 | ||
3447 | ||
3448 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
422ea4b8 | 3449 | echo "configure:3450: checking for working const" >&5 |
c906108c SS |
3450 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3452 | else | |
3453 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3454 | #line 3455 "configure" |
c906108c SS |
3455 | #include "confdefs.h" |
3456 | ||
3457 | int main() { | |
3458 | ||
3459 | /* Ultrix mips cc rejects this. */ | |
3460 | typedef int charset[2]; const charset x; | |
3461 | /* SunOS 4.1.1 cc rejects this. */ | |
3462 | char const *const *ccp; | |
3463 | char **p; | |
3464 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3465 | struct point {int x, y;}; | |
3466 | static struct point const zero = {0,0}; | |
3467 | /* AIX XL C 1.02.0.0 rejects this. | |
3468 | It does not let you subtract one const X* pointer from another in an arm | |
3469 | of an if-expression whose if-part is not a constant expression */ | |
3470 | const char *g = "string"; | |
3471 | ccp = &g + (g ? g-g : 0); | |
3472 | /* HPUX 7.0 cc rejects these. */ | |
3473 | ++ccp; | |
3474 | p = (char**) ccp; | |
3475 | ccp = (char const *const *) p; | |
3476 | { /* SCO 3.2v4 cc rejects this. */ | |
3477 | char *t; | |
3478 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3479 | ||
3480 | *t++ = 0; | |
3481 | } | |
3482 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3483 | int x[] = {25, 17}; | |
3484 | const int *foo = &x[0]; | |
3485 | ++foo; | |
3486 | } | |
3487 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3488 | typedef const int *iptr; | |
3489 | iptr p = 0; | |
3490 | ++p; | |
3491 | } | |
3492 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3493 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3494 | struct s { int j; const int *ap[3]; }; | |
3495 | struct s *b; b->j = 5; | |
3496 | } | |
3497 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3498 | const int foo = 10; | |
3499 | } | |
3500 | ||
3501 | ; return 0; } | |
3502 | EOF | |
422ea4b8 | 3503 | if { (eval echo configure:3504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3504 | rm -rf conftest* |
3505 | ac_cv_c_const=yes | |
3506 | else | |
3507 | echo "configure: failed program was:" >&5 | |
3508 | cat conftest.$ac_ext >&5 | |
3509 | rm -rf conftest* | |
3510 | ac_cv_c_const=no | |
3511 | fi | |
3512 | rm -f conftest* | |
3513 | fi | |
3514 | ||
3515 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3516 | if test $ac_cv_c_const = no; then | |
3517 | cat >> confdefs.h <<\EOF | |
3518 | #define const | |
3519 | EOF | |
3520 | ||
3521 | fi | |
3522 | ||
3523 | ||
2acceee2 | 3524 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask |
c906108c SS |
3525 | do |
3526 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 3527 | echo "configure:3528: checking for $ac_func" >&5 |
c906108c SS |
3528 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3530 | else | |
3531 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3532 | #line 3533 "configure" |
c906108c SS |
3533 | #include "confdefs.h" |
3534 | /* System header to define __stub macros and hopefully few prototypes, | |
3535 | which can conflict with char $ac_func(); below. */ | |
3536 | #include <assert.h> | |
3537 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3538 | /* We use char because int might match the return type of a gcc2 | |
3539 | builtin and then its argument prototype would still apply. */ | |
3540 | char $ac_func(); | |
3541 | ||
3542 | int main() { | |
3543 | ||
3544 | /* The GNU C library defines this for functions which it implements | |
3545 | to always fail with ENOSYS. Some functions are actually named | |
3546 | something starting with __ and the normal name is an alias. */ | |
3547 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3548 | choke me | |
3549 | #else | |
3550 | $ac_func(); | |
3551 | #endif | |
3552 | ||
3553 | ; return 0; } | |
3554 | EOF | |
422ea4b8 | 3555 | if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3556 | rm -rf conftest* |
3557 | eval "ac_cv_func_$ac_func=yes" | |
3558 | else | |
3559 | echo "configure: failed program was:" >&5 | |
3560 | cat conftest.$ac_ext >&5 | |
3561 | rm -rf conftest* | |
3562 | eval "ac_cv_func_$ac_func=no" | |
3563 | fi | |
3564 | rm -f conftest* | |
3565 | fi | |
3566 | ||
3567 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3568 | echo "$ac_t""yes" 1>&6 | |
3569 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3570 | cat >> confdefs.h <<EOF | |
3571 | #define $ac_tr_func 1 | |
3572 | EOF | |
3573 | ||
3574 | else | |
3575 | echo "$ac_t""no" 1>&6 | |
3576 | fi | |
3577 | done | |
3578 | ||
3579 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3580 | # for constant arguments. Useless! | |
3581 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
422ea4b8 | 3582 | echo "configure:3583: checking for working alloca.h" >&5 |
c906108c SS |
3583 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3585 | else | |
3586 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3587 | #line 3588 "configure" |
c906108c SS |
3588 | #include "confdefs.h" |
3589 | #include <alloca.h> | |
3590 | int main() { | |
3591 | char *p = alloca(2 * sizeof(int)); | |
3592 | ; return 0; } | |
3593 | EOF | |
422ea4b8 | 3594 | if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3595 | rm -rf conftest* |
3596 | ac_cv_header_alloca_h=yes | |
3597 | else | |
3598 | echo "configure: failed program was:" >&5 | |
3599 | cat conftest.$ac_ext >&5 | |
3600 | rm -rf conftest* | |
3601 | ac_cv_header_alloca_h=no | |
3602 | fi | |
3603 | rm -f conftest* | |
3604 | fi | |
3605 | ||
3606 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3607 | if test $ac_cv_header_alloca_h = yes; then | |
3608 | cat >> confdefs.h <<\EOF | |
3609 | #define HAVE_ALLOCA_H 1 | |
3610 | EOF | |
3611 | ||
3612 | fi | |
3613 | ||
3614 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
422ea4b8 | 3615 | echo "configure:3616: checking for alloca" >&5 |
c906108c SS |
3616 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3618 | else | |
3619 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3620 | #line 3621 "configure" |
c906108c SS |
3621 | #include "confdefs.h" |
3622 | ||
3623 | #ifdef __GNUC__ | |
3624 | # define alloca __builtin_alloca | |
3625 | #else | |
3626 | # ifdef _MSC_VER | |
3627 | # include <malloc.h> | |
3628 | # define alloca _alloca | |
3629 | # else | |
3630 | # if HAVE_ALLOCA_H | |
3631 | # include <alloca.h> | |
3632 | # else | |
3633 | # ifdef _AIX | |
3634 | #pragma alloca | |
3635 | # else | |
3636 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3637 | char *alloca (); | |
3638 | # endif | |
3639 | # endif | |
3640 | # endif | |
3641 | # endif | |
3642 | #endif | |
3643 | ||
3644 | int main() { | |
3645 | char *p = (char *) alloca(1); | |
3646 | ; return 0; } | |
3647 | EOF | |
422ea4b8 | 3648 | if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3649 | rm -rf conftest* |
3650 | ac_cv_func_alloca_works=yes | |
3651 | else | |
3652 | echo "configure: failed program was:" >&5 | |
3653 | cat conftest.$ac_ext >&5 | |
3654 | rm -rf conftest* | |
3655 | ac_cv_func_alloca_works=no | |
3656 | fi | |
3657 | rm -f conftest* | |
3658 | fi | |
3659 | ||
3660 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3661 | if test $ac_cv_func_alloca_works = yes; then | |
3662 | cat >> confdefs.h <<\EOF | |
3663 | #define HAVE_ALLOCA 1 | |
3664 | EOF | |
3665 | ||
3666 | fi | |
3667 | ||
3668 | if test $ac_cv_func_alloca_works = no; then | |
3669 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3670 | # that cause trouble. Some versions do not even contain alloca or | |
3671 | # contain a buggy version. If you still want to use their alloca, | |
3672 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3673 | ALLOCA=alloca.${ac_objext} | |
3674 | cat >> confdefs.h <<\EOF | |
3675 | #define C_ALLOCA 1 | |
3676 | EOF | |
3677 | ||
3678 | ||
3679 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
422ea4b8 | 3680 | echo "configure:3681: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
3681 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3682 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3683 | else | |
3684 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3685 | #line 3686 "configure" |
c906108c SS |
3686 | #include "confdefs.h" |
3687 | #if defined(CRAY) && ! defined(CRAY2) | |
3688 | webecray | |
3689 | #else | |
3690 | wenotbecray | |
3691 | #endif | |
3692 | ||
3693 | EOF | |
3694 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3695 | egrep "webecray" >/dev/null 2>&1; then | |
3696 | rm -rf conftest* | |
3697 | ac_cv_os_cray=yes | |
3698 | else | |
3699 | rm -rf conftest* | |
3700 | ac_cv_os_cray=no | |
3701 | fi | |
3702 | rm -f conftest* | |
3703 | ||
3704 | fi | |
3705 | ||
3706 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3707 | if test $ac_cv_os_cray = yes; then | |
3708 | for ac_func in _getb67 GETB67 getb67; do | |
3709 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 3710 | echo "configure:3711: checking for $ac_func" >&5 |
c906108c SS |
3711 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3712 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3713 | else | |
3714 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3715 | #line 3716 "configure" |
c906108c SS |
3716 | #include "confdefs.h" |
3717 | /* System header to define __stub macros and hopefully few prototypes, | |
3718 | which can conflict with char $ac_func(); below. */ | |
3719 | #include <assert.h> | |
3720 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3721 | /* We use char because int might match the return type of a gcc2 | |
3722 | builtin and then its argument prototype would still apply. */ | |
3723 | char $ac_func(); | |
3724 | ||
3725 | int main() { | |
3726 | ||
3727 | /* The GNU C library defines this for functions which it implements | |
3728 | to always fail with ENOSYS. Some functions are actually named | |
3729 | something starting with __ and the normal name is an alias. */ | |
3730 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3731 | choke me | |
3732 | #else | |
3733 | $ac_func(); | |
3734 | #endif | |
3735 | ||
3736 | ; return 0; } | |
3737 | EOF | |
422ea4b8 | 3738 | if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3739 | rm -rf conftest* |
3740 | eval "ac_cv_func_$ac_func=yes" | |
3741 | else | |
3742 | echo "configure: failed program was:" >&5 | |
3743 | cat conftest.$ac_ext >&5 | |
3744 | rm -rf conftest* | |
3745 | eval "ac_cv_func_$ac_func=no" | |
3746 | fi | |
3747 | rm -f conftest* | |
3748 | fi | |
3749 | ||
3750 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3751 | echo "$ac_t""yes" 1>&6 | |
3752 | cat >> confdefs.h <<EOF | |
3753 | #define CRAY_STACKSEG_END $ac_func | |
3754 | EOF | |
3755 | ||
3756 | break | |
3757 | else | |
3758 | echo "$ac_t""no" 1>&6 | |
3759 | fi | |
3760 | ||
3761 | done | |
3762 | fi | |
3763 | ||
3764 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
422ea4b8 | 3765 | echo "configure:3766: checking stack direction for C alloca" >&5 |
c906108c SS |
3766 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3767 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3768 | else | |
3769 | if test "$cross_compiling" = yes; then | |
3770 | ac_cv_c_stack_direction=0 | |
3771 | else | |
3772 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3773 | #line 3774 "configure" |
c906108c SS |
3774 | #include "confdefs.h" |
3775 | find_stack_direction () | |
3776 | { | |
3777 | static char *addr = 0; | |
3778 | auto char dummy; | |
3779 | if (addr == 0) | |
3780 | { | |
3781 | addr = &dummy; | |
3782 | return find_stack_direction (); | |
3783 | } | |
3784 | else | |
3785 | return (&dummy > addr) ? 1 : -1; | |
3786 | } | |
3787 | main () | |
3788 | { | |
3789 | exit (find_stack_direction() < 0); | |
3790 | } | |
3791 | EOF | |
422ea4b8 | 3792 | if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3793 | then |
3794 | ac_cv_c_stack_direction=1 | |
3795 | else | |
3796 | echo "configure: failed program was:" >&5 | |
3797 | cat conftest.$ac_ext >&5 | |
3798 | rm -fr conftest* | |
3799 | ac_cv_c_stack_direction=-1 | |
3800 | fi | |
3801 | rm -fr conftest* | |
3802 | fi | |
3803 | ||
3804 | fi | |
3805 | ||
3806 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3807 | cat >> confdefs.h <<EOF | |
3808 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3809 | EOF | |
3810 | ||
3811 | fi | |
3812 | ||
3813 | ||
7dfa765c MK |
3814 | # See if machine/reg.h supports the %fs and %gs i386 segment registers. |
3815 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
3816 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
422ea4b8 MK |
3817 | echo "configure:3818: checking for r_fs in struct reg" >&5 |
3818 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then | |
7dfa765c MK |
3819 | echo $ac_n "(cached) $ac_c" 1>&6 |
3820 | else | |
3821 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3822 | #line 3823 "configure" |
7dfa765c MK |
3823 | #include "confdefs.h" |
3824 | #include <machine/reg.h> | |
3825 | int main() { | |
3826 | struct reg r; r.r_fs; | |
3827 | ; return 0; } | |
3828 | EOF | |
422ea4b8 | 3829 | if { (eval echo configure:3830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3830 | rm -rf conftest* |
422ea4b8 | 3831 | gdb_cv_struct_reg_r_fs=yes |
7dfa765c MK |
3832 | else |
3833 | echo "configure: failed program was:" >&5 | |
3834 | cat conftest.$ac_ext >&5 | |
3835 | rm -rf conftest* | |
422ea4b8 | 3836 | gdb_cv_struct_reg_r_fs=no |
7dfa765c MK |
3837 | fi |
3838 | rm -f conftest* | |
3839 | fi | |
3840 | ||
422ea4b8 MK |
3841 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
3842 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7dfa765c | 3843 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3844 | #define HAVE_STRUCT_REG_R_FS 1 |
7dfa765c MK |
3845 | EOF |
3846 | ||
3847 | fi | |
3848 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
422ea4b8 MK |
3849 | echo "configure:3850: checking for r_gs in struct reg" >&5 |
3850 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then | |
7dfa765c MK |
3851 | echo $ac_n "(cached) $ac_c" 1>&6 |
3852 | else | |
3853 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3854 | #line 3855 "configure" |
7dfa765c MK |
3855 | #include "confdefs.h" |
3856 | #include <machine/reg.h> | |
3857 | int main() { | |
3858 | struct reg r; r.r_gs; | |
3859 | ; return 0; } | |
3860 | EOF | |
422ea4b8 | 3861 | if { (eval echo configure:3862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3862 | rm -rf conftest* |
422ea4b8 | 3863 | gdb_cv_struct_reg_r_gs=yes |
7dfa765c MK |
3864 | else |
3865 | echo "configure: failed program was:" >&5 | |
3866 | cat conftest.$ac_ext >&5 | |
3867 | rm -rf conftest* | |
422ea4b8 | 3868 | gdb_cv_struct_reg_r_gs=no |
7dfa765c MK |
3869 | fi |
3870 | rm -f conftest* | |
3871 | fi | |
3872 | ||
422ea4b8 MK |
3873 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
3874 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7dfa765c | 3875 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3876 | #define HAVE_STRUCT_REG_R_GS 1 |
7dfa765c MK |
3877 | EOF |
3878 | ||
3879 | fi | |
3880 | ||
64bb1671 | 3881 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 |
422ea4b8 | 3882 | echo "configure:3883: checking for PTRACE_GETREGS" >&5 |
64bb1671 MK |
3883 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
3884 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3885 | else | |
3886 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3887 | #line 3888 "configure" |
64bb1671 MK |
3888 | #include "confdefs.h" |
3889 | #include <sys/ptrace.h> | |
3890 | int main() { | |
3891 | PTRACE_GETREGS; | |
3892 | ; return 0; } | |
3893 | EOF | |
422ea4b8 | 3894 | if { (eval echo configure:3895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
64bb1671 MK |
3895 | rm -rf conftest* |
3896 | gdb_cv_have_ptrace_getregs=yes | |
3897 | else | |
3898 | echo "configure: failed program was:" >&5 | |
3899 | cat conftest.$ac_ext >&5 | |
3900 | rm -rf conftest* | |
3901 | gdb_cv_have_ptrace_getregs=no | |
3902 | fi | |
3903 | rm -f conftest* | |
3904 | fi | |
3905 | ||
4397a6ab | 3906 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
64bb1671 MK |
3907 | if test $gdb_cv_have_ptrace_getregs = yes; then |
3908 | cat >> confdefs.h <<\EOF | |
3909 | #define HAVE_PTRACE_GETREGS 1 | |
3910 | EOF | |
3911 | ||
3912 | fi | |
3913 | ||
5c44784c | 3914 | echo $ac_n "checking for PTRACE_GETXFPREGS""... $ac_c" 1>&6 |
422ea4b8 | 3915 | echo "configure:3916: checking for PTRACE_GETXFPREGS" >&5 |
5c44784c JM |
3916 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getxfpregs'+set}'`\" = set"; then |
3917 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3918 | else | |
3919 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3920 | #line 3921 "configure" |
5c44784c JM |
3921 | #include "confdefs.h" |
3922 | #include <sys/ptrace.h> | |
3923 | int main() { | |
3924 | PTRACE_GETXFPREGS; | |
3925 | ; return 0; } | |
3926 | EOF | |
422ea4b8 | 3927 | if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c JM |
3928 | rm -rf conftest* |
3929 | gdb_cv_have_ptrace_getxfpregs=yes | |
3930 | else | |
3931 | echo "configure: failed program was:" >&5 | |
3932 | cat conftest.$ac_ext >&5 | |
3933 | rm -rf conftest* | |
3934 | gdb_cv_have_ptrace_getxfpregs=no | |
3935 | fi | |
3936 | rm -f conftest* | |
3937 | fi | |
3938 | ||
3939 | echo "$ac_t""$gdb_cv_have_ptrace_getxfpregs" 1>&6 | |
3940 | if test $gdb_cv_have_ptrace_getxfpregs = yes; then | |
3941 | cat >> confdefs.h <<\EOF | |
3942 | #define HAVE_PTRACE_GETXFPREGS 1 | |
3943 | EOF | |
3944 | ||
3945 | fi | |
3946 | ||
7be570e7 | 3947 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
422ea4b8 | 3948 | echo "configure:3949: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
3949 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
3950 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3951 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3952 | else | |
3953 | ac_save_LIBS="$LIBS" | |
3954 | LIBS="-lsocket $LIBS" | |
3955 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 3956 | #line 3957 "configure" |
7be570e7 JM |
3957 | #include "confdefs.h" |
3958 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3959 | /* We use char because int might match the return type of a gcc2 | |
3960 | builtin and then its argument prototype would still apply. */ | |
3961 | char socketpair(); | |
3962 | ||
3963 | int main() { | |
3964 | socketpair() | |
3965 | ; return 0; } | |
3966 | EOF | |
422ea4b8 | 3967 | if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
3968 | rm -rf conftest* |
3969 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3970 | else | |
3971 | echo "configure: failed program was:" >&5 | |
3972 | cat conftest.$ac_ext >&5 | |
3973 | rm -rf conftest* | |
3974 | eval "ac_cv_lib_$ac_lib_var=no" | |
3975 | fi | |
3976 | rm -f conftest* | |
3977 | LIBS="$ac_save_LIBS" | |
3978 | ||
3979 | fi | |
3980 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3981 | echo "$ac_t""yes" 1>&6 | |
3982 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3983 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3984 | cat >> confdefs.h <<EOF | |
3985 | #define $ac_tr_lib 1 | |
3986 | EOF | |
3987 | ||
3988 | LIBS="-lsocket $LIBS" | |
3989 | ||
3990 | else | |
3991 | echo "$ac_t""no" 1>&6 | |
3992 | fi | |
3993 | ||
3994 | for ac_func in socketpair | |
3995 | do | |
3996 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 3997 | echo "configure:3998: checking for $ac_func" >&5 |
7be570e7 JM |
3998 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3999 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4000 | else | |
4001 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4002 | #line 4003 "configure" |
7be570e7 JM |
4003 | #include "confdefs.h" |
4004 | /* System header to define __stub macros and hopefully few prototypes, | |
4005 | which can conflict with char $ac_func(); below. */ | |
4006 | #include <assert.h> | |
4007 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4008 | /* We use char because int might match the return type of a gcc2 | |
4009 | builtin and then its argument prototype would still apply. */ | |
4010 | char $ac_func(); | |
4011 | ||
4012 | int main() { | |
4013 | ||
4014 | /* The GNU C library defines this for functions which it implements | |
4015 | to always fail with ENOSYS. Some functions are actually named | |
4016 | something starting with __ and the normal name is an alias. */ | |
4017 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4018 | choke me | |
4019 | #else | |
4020 | $ac_func(); | |
4021 | #endif | |
4022 | ||
4023 | ; return 0; } | |
4024 | EOF | |
422ea4b8 | 4025 | if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4026 | rm -rf conftest* |
4027 | eval "ac_cv_func_$ac_func=yes" | |
4028 | else | |
4029 | echo "configure: failed program was:" >&5 | |
4030 | cat conftest.$ac_ext >&5 | |
4031 | rm -rf conftest* | |
4032 | eval "ac_cv_func_$ac_func=no" | |
4033 | fi | |
4034 | rm -f conftest* | |
4035 | fi | |
4036 | ||
4037 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4038 | echo "$ac_t""yes" 1>&6 | |
4039 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4040 | cat >> confdefs.h <<EOF | |
4041 | #define $ac_tr_func 1 | |
4042 | EOF | |
4043 | ||
4044 | else | |
4045 | echo "$ac_t""no" 1>&6 | |
4046 | fi | |
4047 | done | |
4048 | ||
4049 | ||
4050 | ||
c906108c | 4051 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
422ea4b8 | 4052 | echo "configure:4053: checking whether malloc must be declared" >&5 |
c906108c SS |
4053 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4054 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4055 | else | |
4056 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4057 | #line 4058 "configure" |
c906108c SS |
4058 | #include "confdefs.h" |
4059 | ||
4060 | #include <stdio.h> | |
4061 | #ifdef HAVE_STRING_H | |
4062 | #include <string.h> | |
4063 | #else | |
4064 | #ifdef HAVE_STRINGS_H | |
4065 | #include <strings.h> | |
4066 | #endif | |
4067 | #endif | |
4068 | #ifdef HAVE_STDLIB_H | |
4069 | #include <stdlib.h> | |
4070 | #endif | |
4071 | #ifdef HAVE_UNISTD_H | |
4072 | #include <unistd.h> | |
4073 | #endif | |
4074 | int main() { | |
4075 | char *(*pfn) = (char *(*)) malloc | |
4076 | ; return 0; } | |
4077 | EOF | |
422ea4b8 | 4078 | if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4079 | rm -rf conftest* |
4080 | bfd_cv_decl_needed_malloc=no | |
4081 | else | |
4082 | echo "configure: failed program was:" >&5 | |
4083 | cat conftest.$ac_ext >&5 | |
4084 | rm -rf conftest* | |
4085 | bfd_cv_decl_needed_malloc=yes | |
4086 | fi | |
4087 | rm -f conftest* | |
4088 | fi | |
4089 | ||
4090 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4091 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4092 | cat >> confdefs.h <<\EOF | |
4093 | #define NEED_DECLARATION_MALLOC 1 | |
4094 | EOF | |
4095 | ||
4096 | fi | |
4097 | ||
4098 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
422ea4b8 | 4099 | echo "configure:4100: checking whether realloc must be declared" >&5 |
c906108c SS |
4100 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4101 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4102 | else | |
4103 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4104 | #line 4105 "configure" |
c906108c SS |
4105 | #include "confdefs.h" |
4106 | ||
4107 | #include <stdio.h> | |
4108 | #ifdef HAVE_STRING_H | |
4109 | #include <string.h> | |
4110 | #else | |
4111 | #ifdef HAVE_STRINGS_H | |
4112 | #include <strings.h> | |
4113 | #endif | |
4114 | #endif | |
4115 | #ifdef HAVE_STDLIB_H | |
4116 | #include <stdlib.h> | |
4117 | #endif | |
4118 | #ifdef HAVE_UNISTD_H | |
4119 | #include <unistd.h> | |
4120 | #endif | |
4121 | int main() { | |
4122 | char *(*pfn) = (char *(*)) realloc | |
4123 | ; return 0; } | |
4124 | EOF | |
422ea4b8 | 4125 | if { (eval echo configure:4126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4126 | rm -rf conftest* |
4127 | bfd_cv_decl_needed_realloc=no | |
4128 | else | |
4129 | echo "configure: failed program was:" >&5 | |
4130 | cat conftest.$ac_ext >&5 | |
4131 | rm -rf conftest* | |
4132 | bfd_cv_decl_needed_realloc=yes | |
4133 | fi | |
4134 | rm -f conftest* | |
4135 | fi | |
4136 | ||
4137 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4138 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4139 | cat >> confdefs.h <<\EOF | |
4140 | #define NEED_DECLARATION_REALLOC 1 | |
4141 | EOF | |
4142 | ||
4143 | fi | |
4144 | ||
4145 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
422ea4b8 | 4146 | echo "configure:4147: checking whether free must be declared" >&5 |
c906108c SS |
4147 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4148 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4149 | else | |
4150 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4151 | #line 4152 "configure" |
c906108c SS |
4152 | #include "confdefs.h" |
4153 | ||
4154 | #include <stdio.h> | |
4155 | #ifdef HAVE_STRING_H | |
4156 | #include <string.h> | |
4157 | #else | |
4158 | #ifdef HAVE_STRINGS_H | |
4159 | #include <strings.h> | |
4160 | #endif | |
4161 | #endif | |
4162 | #ifdef HAVE_STDLIB_H | |
4163 | #include <stdlib.h> | |
4164 | #endif | |
4165 | #ifdef HAVE_UNISTD_H | |
4166 | #include <unistd.h> | |
4167 | #endif | |
4168 | int main() { | |
4169 | char *(*pfn) = (char *(*)) free | |
4170 | ; return 0; } | |
4171 | EOF | |
422ea4b8 | 4172 | if { (eval echo configure:4173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4173 | rm -rf conftest* |
4174 | bfd_cv_decl_needed_free=no | |
4175 | else | |
4176 | echo "configure: failed program was:" >&5 | |
4177 | cat conftest.$ac_ext >&5 | |
4178 | rm -rf conftest* | |
4179 | bfd_cv_decl_needed_free=yes | |
4180 | fi | |
4181 | rm -f conftest* | |
4182 | fi | |
4183 | ||
4184 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4185 | if test $bfd_cv_decl_needed_free = yes; then | |
4186 | cat >> confdefs.h <<\EOF | |
4187 | #define NEED_DECLARATION_FREE 1 | |
4188 | EOF | |
4189 | ||
4190 | fi | |
4191 | ||
4192 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
422ea4b8 | 4193 | echo "configure:4194: checking whether strerror must be declared" >&5 |
c906108c SS |
4194 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4195 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4196 | else | |
4197 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4198 | #line 4199 "configure" |
c906108c SS |
4199 | #include "confdefs.h" |
4200 | ||
4201 | #include <stdio.h> | |
4202 | #ifdef HAVE_STRING_H | |
4203 | #include <string.h> | |
4204 | #else | |
4205 | #ifdef HAVE_STRINGS_H | |
4206 | #include <strings.h> | |
4207 | #endif | |
4208 | #endif | |
4209 | #ifdef HAVE_STDLIB_H | |
4210 | #include <stdlib.h> | |
4211 | #endif | |
4212 | #ifdef HAVE_UNISTD_H | |
4213 | #include <unistd.h> | |
4214 | #endif | |
4215 | int main() { | |
4216 | char *(*pfn) = (char *(*)) strerror | |
4217 | ; return 0; } | |
4218 | EOF | |
422ea4b8 | 4219 | if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4220 | rm -rf conftest* |
4221 | bfd_cv_decl_needed_strerror=no | |
4222 | else | |
4223 | echo "configure: failed program was:" >&5 | |
4224 | cat conftest.$ac_ext >&5 | |
4225 | rm -rf conftest* | |
4226 | bfd_cv_decl_needed_strerror=yes | |
4227 | fi | |
4228 | rm -f conftest* | |
4229 | fi | |
4230 | ||
4231 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4232 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4233 | cat >> confdefs.h <<\EOF | |
4234 | #define NEED_DECLARATION_STRERROR 1 | |
4235 | EOF | |
4236 | ||
4237 | fi | |
4238 | ||
4239 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
422ea4b8 | 4240 | echo "configure:4241: checking whether strdup must be declared" >&5 |
c906108c SS |
4241 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4242 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4243 | else | |
4244 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4245 | #line 4246 "configure" |
c906108c SS |
4246 | #include "confdefs.h" |
4247 | ||
4248 | #include <stdio.h> | |
4249 | #ifdef HAVE_STRING_H | |
4250 | #include <string.h> | |
4251 | #else | |
4252 | #ifdef HAVE_STRINGS_H | |
4253 | #include <strings.h> | |
4254 | #endif | |
4255 | #endif | |
4256 | #ifdef HAVE_STDLIB_H | |
4257 | #include <stdlib.h> | |
4258 | #endif | |
4259 | #ifdef HAVE_UNISTD_H | |
4260 | #include <unistd.h> | |
4261 | #endif | |
4262 | int main() { | |
4263 | char *(*pfn) = (char *(*)) strdup | |
4264 | ; return 0; } | |
4265 | EOF | |
422ea4b8 | 4266 | if { (eval echo configure:4267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4267 | rm -rf conftest* |
4268 | bfd_cv_decl_needed_strdup=no | |
4269 | else | |
4270 | echo "configure: failed program was:" >&5 | |
4271 | cat conftest.$ac_ext >&5 | |
4272 | rm -rf conftest* | |
4273 | bfd_cv_decl_needed_strdup=yes | |
4274 | fi | |
4275 | rm -f conftest* | |
4276 | fi | |
4277 | ||
4278 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4279 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4280 | cat >> confdefs.h <<\EOF | |
4281 | #define NEED_DECLARATION_STRDUP 1 | |
4282 | EOF | |
4283 | ||
4284 | fi | |
4285 | ||
b83266a0 | 4286 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
422ea4b8 | 4287 | echo "configure:4288: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4288 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4289 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4290 | else | |
4291 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4292 | #line 4293 "configure" |
b83266a0 SS |
4293 | #include "confdefs.h" |
4294 | ||
4295 | #include <stdio.h> | |
4296 | #ifdef HAVE_STRING_H | |
4297 | #include <string.h> | |
4298 | #else | |
4299 | #ifdef HAVE_STRINGS_H | |
4300 | #include <strings.h> | |
4301 | #endif | |
4302 | #endif | |
4303 | #ifdef HAVE_STDLIB_H | |
4304 | #include <stdlib.h> | |
4305 | #endif | |
4306 | #ifdef HAVE_UNISTD_H | |
4307 | #include <unistd.h> | |
4308 | #endif | |
4309 | int main() { | |
4310 | char *(*pfn) = (char *(*)) strstr | |
4311 | ; return 0; } | |
4312 | EOF | |
422ea4b8 | 4313 | if { (eval echo configure:4314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4314 | rm -rf conftest* |
4315 | bfd_cv_decl_needed_strstr=no | |
4316 | else | |
4317 | echo "configure: failed program was:" >&5 | |
4318 | cat conftest.$ac_ext >&5 | |
4319 | rm -rf conftest* | |
4320 | bfd_cv_decl_needed_strstr=yes | |
4321 | fi | |
4322 | rm -f conftest* | |
4323 | fi | |
4324 | ||
4325 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4326 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4327 | cat >> confdefs.h <<\EOF | |
4328 | #define NEED_DECLARATION_STRSTR 1 | |
4329 | EOF | |
4330 | ||
4331 | fi | |
4332 | ||
c906108c SS |
4333 | |
4334 | ||
4335 | # The following save_state_t checkery is only necessary for HPUX | |
4336 | # versions earlier than 10.20. When those fade from memory, this | |
4337 | # could be expunged. --jsm 1999-03-22 | |
4338 | ||
4339 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
422ea4b8 | 4340 | echo "configure:4341: checking for HPUX save_state structure" >&5 |
c906108c | 4341 | cat > conftest.$ac_ext <<EOF |
422ea4b8 | 4342 | #line 4343 "configure" |
c906108c SS |
4343 | #include "confdefs.h" |
4344 | #include <machine/save_state.h> | |
4345 | EOF | |
4346 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4347 | egrep "save_state_t" >/dev/null 2>&1; then | |
4348 | rm -rf conftest* | |
4349 | gdb_cv_hpux_savestate=yes | |
4350 | else | |
4351 | rm -rf conftest* | |
4352 | gdb_cv_hpux_savestate=no | |
4353 | fi | |
4354 | rm -f conftest* | |
4355 | ||
4356 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4357 | #line 4358 "configure" |
c906108c SS |
4358 | #include "confdefs.h" |
4359 | #include <machine/save_state.h> | |
4360 | EOF | |
4361 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4362 | egrep "ss_wide" >/dev/null 2>&1; then | |
4363 | rm -rf conftest* | |
4364 | gdb_cv_hpux_sswide=yes | |
4365 | else | |
4366 | rm -rf conftest* | |
4367 | gdb_cv_hpux_sswide=no | |
4368 | fi | |
4369 | rm -f conftest* | |
4370 | ||
4371 | if test $gdb_cv_hpux_savestate = yes | |
4372 | then | |
4373 | cat >> confdefs.h <<\EOF | |
4374 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4375 | EOF | |
4376 | ||
4377 | fi | |
4378 | if test $gdb_cv_hpux_sswide = yes | |
4379 | then | |
4380 | cat >> confdefs.h <<\EOF | |
4381 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4382 | EOF | |
4383 | ||
4384 | fi | |
4385 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4386 | ||
4387 | ||
4388 | # If we are configured native on GNU/Linux, work around problems with | |
4389 | # sys/procfs.h | |
c3f6f71d | 4390 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4391 | |
4392 | if test "${target}" = "${host}"; then | |
4393 | case "${host}" in | |
4394 | i[3456]86-*-linux*) | |
4395 | cat >> confdefs.h <<\EOF | |
4396 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4397 | EOF | |
4398 | ||
4399 | cat >> confdefs.h <<\EOF | |
4400 | #define sys_quotactl 1 | |
4401 | EOF | |
4402 | ||
4403 | ;; | |
c5394b80 | 4404 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4405 | cat >> confdefs.h <<\EOF |
4406 | #define NEW_PROC_API 1 | |
c906108c SS |
4407 | EOF |
4408 | ||
c3f6f71d | 4409 | ;; |
3423db82 | 4410 | *-*-solaris2.[678]) |
c3f6f71d JM |
4411 | cat >> confdefs.h <<\EOF |
4412 | #define NEW_PROC_API 1 | |
4413 | EOF | |
4414 | ||
4415 | ;; | |
4416 | esac | |
c906108c SS |
4417 | fi |
4418 | ||
4419 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4420 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
422ea4b8 | 4421 | echo "configure:4422: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4422 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4423 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4424 | else | |
4425 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4426 | #line 4427 "configure" |
c906108c SS |
4427 | #include "confdefs.h" |
4428 | #include <sys/procfs.h> | |
4429 | int main() { | |
4430 | pstatus_t avar | |
4431 | ; return 0; } | |
4432 | EOF | |
422ea4b8 | 4433 | if { (eval echo configure:4434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4434 | rm -rf conftest* |
4435 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
4436 | else | |
4437 | echo "configure: failed program was:" >&5 | |
4438 | cat conftest.$ac_ext >&5 | |
4439 | rm -rf conftest* | |
4440 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
4441 | ||
4442 | fi | |
4443 | rm -f conftest* | |
4444 | fi | |
4445 | ||
4446 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
4447 | cat >> confdefs.h <<\EOF | |
4448 | #define HAVE_PSTATUS_T 1 | |
4449 | EOF | |
4450 | ||
4451 | fi | |
4452 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
4453 | ||
4454 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
422ea4b8 | 4455 | echo "configure:4456: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
4456 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
4457 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4458 | else | |
4459 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4460 | #line 4461 "configure" |
c906108c SS |
4461 | #include "confdefs.h" |
4462 | #include <sys/procfs.h> | |
4463 | int main() { | |
4464 | prrun_t avar | |
4465 | ; return 0; } | |
4466 | EOF | |
422ea4b8 | 4467 | if { (eval echo configure:4468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4468 | rm -rf conftest* |
4469 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
4470 | else | |
4471 | echo "configure: failed program was:" >&5 | |
4472 | cat conftest.$ac_ext >&5 | |
4473 | rm -rf conftest* | |
4474 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
4475 | ||
4476 | fi | |
4477 | rm -f conftest* | |
4478 | fi | |
4479 | ||
4480 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
4481 | cat >> confdefs.h <<\EOF | |
4482 | #define HAVE_PRRUN_T 1 | |
4483 | EOF | |
4484 | ||
4485 | fi | |
4486 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
4487 | ||
4488 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
422ea4b8 | 4489 | echo "configure:4490: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
4490 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
4491 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4492 | else | |
4493 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4494 | #line 4495 "configure" |
c906108c SS |
4495 | #include "confdefs.h" |
4496 | #include <sys/procfs.h> | |
4497 | int main() { | |
4498 | gregset_t avar | |
4499 | ; return 0; } | |
4500 | EOF | |
422ea4b8 | 4501 | if { (eval echo configure:4502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4502 | rm -rf conftest* |
4503 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
4504 | else | |
4505 | echo "configure: failed program was:" >&5 | |
4506 | cat conftest.$ac_ext >&5 | |
4507 | rm -rf conftest* | |
4508 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
4509 | ||
4510 | fi | |
4511 | rm -f conftest* | |
4512 | fi | |
4513 | ||
4514 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
4515 | cat >> confdefs.h <<\EOF | |
4516 | #define HAVE_GREGSET_T 1 | |
4517 | EOF | |
4518 | ||
4519 | fi | |
4520 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
4521 | ||
4522 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
422ea4b8 | 4523 | echo "configure:4524: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
4524 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
4525 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4526 | else | |
4527 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4528 | #line 4529 "configure" |
c906108c SS |
4529 | #include "confdefs.h" |
4530 | #include <sys/procfs.h> | |
4531 | int main() { | |
4532 | fpregset_t avar | |
4533 | ; return 0; } | |
4534 | EOF | |
422ea4b8 | 4535 | if { (eval echo configure:4536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4536 | rm -rf conftest* |
4537 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
4538 | else | |
4539 | echo "configure: failed program was:" >&5 | |
4540 | cat conftest.$ac_ext >&5 | |
4541 | rm -rf conftest* | |
4542 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
4543 | ||
4544 | fi | |
4545 | rm -f conftest* | |
4546 | fi | |
4547 | ||
4548 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
4549 | cat >> confdefs.h <<\EOF | |
4550 | #define HAVE_FPREGSET_T 1 | |
4551 | EOF | |
4552 | ||
4553 | fi | |
4554 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
4555 | ||
3862412b | 4556 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
422ea4b8 | 4557 | echo "configure:4558: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
4558 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
4559 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4560 | else | |
4561 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4562 | #line 4563 "configure" |
3862412b MK |
4563 | #include "confdefs.h" |
4564 | #include <sys/procfs.h> | |
4565 | int main() { | |
4566 | prgregset_t avar | |
4567 | ; return 0; } | |
4568 | EOF | |
422ea4b8 | 4569 | if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4570 | rm -rf conftest* |
4571 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
4572 | else | |
4573 | echo "configure: failed program was:" >&5 | |
4574 | cat conftest.$ac_ext >&5 | |
4575 | rm -rf conftest* | |
4576 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
4577 | ||
4578 | fi | |
4579 | rm -f conftest* | |
4580 | fi | |
4581 | ||
4582 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
4583 | cat >> confdefs.h <<\EOF | |
4584 | #define HAVE_PRGREGSET_T 1 | |
4585 | EOF | |
4586 | ||
4587 | fi | |
4588 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
4589 | ||
4590 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
422ea4b8 | 4591 | echo "configure:4592: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
4592 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
4593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4594 | else | |
4595 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4596 | #line 4597 "configure" |
3862412b MK |
4597 | #include "confdefs.h" |
4598 | #include <sys/procfs.h> | |
4599 | int main() { | |
4600 | prfpregset_t avar | |
4601 | ; return 0; } | |
4602 | EOF | |
422ea4b8 | 4603 | if { (eval echo configure:4604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4604 | rm -rf conftest* |
4605 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
4606 | else | |
4607 | echo "configure: failed program was:" >&5 | |
4608 | cat conftest.$ac_ext >&5 | |
4609 | rm -rf conftest* | |
4610 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
4611 | ||
4612 | fi | |
4613 | rm -f conftest* | |
4614 | fi | |
4615 | ||
4616 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
4617 | cat >> confdefs.h <<\EOF | |
4618 | #define HAVE_PRFPREGSET_T 1 | |
4619 | EOF | |
4620 | ||
4621 | fi | |
4622 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
4623 | ||
4624 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 | |
422ea4b8 | 4625 | echo "configure:4626: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
4626 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
4627 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4628 | else | |
4629 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4630 | #line 4631 "configure" |
3862412b MK |
4631 | #include "confdefs.h" |
4632 | #include <sys/procfs.h> | |
4633 | int main() { | |
4634 | lwpid_t avar | |
4635 | ; return 0; } | |
4636 | EOF | |
422ea4b8 | 4637 | if { (eval echo configure:4638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4638 | rm -rf conftest* |
4639 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
4640 | else | |
4641 | echo "configure: failed program was:" >&5 | |
4642 | cat conftest.$ac_ext >&5 | |
4643 | rm -rf conftest* | |
4644 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
4645 | ||
4646 | fi | |
4647 | rm -f conftest* | |
4648 | fi | |
4649 | ||
4650 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
4651 | cat >> confdefs.h <<\EOF | |
4652 | #define HAVE_LWPID_T 1 | |
4653 | EOF | |
4654 | ||
4655 | fi | |
4656 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
4657 | ||
4658 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
422ea4b8 | 4659 | echo "configure:4660: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
4660 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
4661 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4662 | else | |
4663 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4664 | #line 4665 "configure" |
3862412b MK |
4665 | #include "confdefs.h" |
4666 | #include <sys/procfs.h> | |
4667 | int main() { | |
4668 | psaddr_t avar | |
4669 | ; return 0; } | |
4670 | EOF | |
422ea4b8 | 4671 | if { (eval echo configure:4672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4672 | rm -rf conftest* |
4673 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
4674 | else | |
4675 | echo "configure: failed program was:" >&5 | |
4676 | cat conftest.$ac_ext >&5 | |
4677 | rm -rf conftest* | |
4678 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
4679 | ||
4680 | fi | |
4681 | rm -f conftest* | |
4682 | fi | |
4683 | ||
4684 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
4685 | cat >> confdefs.h <<\EOF | |
4686 | #define HAVE_PSADDR_T 1 | |
4687 | EOF | |
4688 | ||
4689 | fi | |
4690 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
4691 | ||
c906108c SS |
4692 | |
4693 | ||
746a987d | 4694 | |
d84dd0c5 MK |
4695 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
4696 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
422ea4b8 | 4697 | echo "configure:4698: checking whether prfpregset_t type is broken" >&5 |
d84dd0c5 MK |
4698 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
4699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4700 | else | |
4701 | if test "$cross_compiling" = yes; then | |
4702 | gdb_cv_prfpregset_t_broken=yes | |
4703 | else | |
4704 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4705 | #line 4706 "configure" |
d84dd0c5 MK |
4706 | #include "confdefs.h" |
4707 | #include <sys/procfs.h> | |
4708 | int main () | |
4709 | { | |
4710 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
4711 | return 1; | |
4712 | return 0; | |
4713 | } | |
4714 | EOF | |
422ea4b8 | 4715 | if { (eval echo configure:4716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
d84dd0c5 MK |
4716 | then |
4717 | gdb_cv_prfpregset_t_broken=no | |
4718 | else | |
4719 | echo "configure: failed program was:" >&5 | |
4720 | cat conftest.$ac_ext >&5 | |
4721 | rm -fr conftest* | |
4722 | gdb_cv_prfpregset_t_broken=yes | |
4723 | fi | |
4724 | rm -fr conftest* | |
4725 | fi | |
4726 | ||
4727 | fi | |
4728 | ||
4729 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 | |
4730 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
4731 | cat >> confdefs.h <<\EOF | |
4732 | #define PRFPREGSET_T_BROKEN 1 | |
4733 | EOF | |
4734 | ||
4735 | fi | |
4736 | fi | |
4737 | ||
4738 | ||
c906108c | 4739 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 |
422ea4b8 | 4740 | echo "configure:4741: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
4741 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
4742 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4743 | else | |
4744 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4745 | #line 4746 "configure" |
c906108c SS |
4746 | #include "confdefs.h" |
4747 | #include <unistd.h> | |
4748 | #include <sys/types.h> | |
4749 | #include <sys/procfs.h> | |
4750 | ||
4751 | int main() { | |
4752 | ||
4753 | int dummy;; | |
4754 | dummy = ioctl(0, PIOCSET, &dummy); | |
4755 | ||
4756 | ; return 0; } | |
4757 | EOF | |
422ea4b8 | 4758 | if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4759 | rm -rf conftest* |
4760 | gdb_cv_have_procfs_piocset=yes | |
4761 | else | |
4762 | echo "configure: failed program was:" >&5 | |
4763 | cat conftest.$ac_ext >&5 | |
4764 | rm -rf conftest* | |
4765 | gdb_cv_have_procfs_piocset=no | |
4766 | fi | |
4767 | rm -f conftest* | |
4768 | fi | |
4769 | ||
4770 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
4771 | if test $gdb_cv_have_procfs_piocset = yes; then | |
4772 | cat >> confdefs.h <<\EOF | |
4773 | #define HAVE_PROCFS_PIOCSET 1 | |
4774 | EOF | |
4775 | ||
4776 | fi | |
4777 | fi | |
4778 | ||
4779 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
422ea4b8 | 4780 | echo "configure:4781: checking for main in -lm" >&5 |
c906108c SS |
4781 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
4782 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4783 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4784 | else | |
4785 | ac_save_LIBS="$LIBS" | |
4786 | LIBS="-lm $LIBS" | |
4787 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4788 | #line 4789 "configure" |
c906108c SS |
4789 | #include "confdefs.h" |
4790 | ||
4791 | int main() { | |
4792 | main() | |
4793 | ; return 0; } | |
4794 | EOF | |
422ea4b8 | 4795 | if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4796 | rm -rf conftest* |
4797 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4798 | else | |
4799 | echo "configure: failed program was:" >&5 | |
4800 | cat conftest.$ac_ext >&5 | |
4801 | rm -rf conftest* | |
4802 | eval "ac_cv_lib_$ac_lib_var=no" | |
4803 | fi | |
4804 | rm -f conftest* | |
4805 | LIBS="$ac_save_LIBS" | |
4806 | ||
4807 | fi | |
4808 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4809 | echo "$ac_t""yes" 1>&6 | |
4810 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4811 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4812 | cat >> confdefs.h <<EOF | |
4813 | #define $ac_tr_lib 1 | |
4814 | EOF | |
4815 | ||
4816 | LIBS="-lm $LIBS" | |
4817 | ||
4818 | else | |
4819 | echo "$ac_t""no" 1>&6 | |
4820 | fi | |
4821 | ||
4822 | ||
4823 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
422ea4b8 | 4824 | echo "configure:4825: checking for wctype in -lc" >&5 |
c906108c SS |
4825 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
4826 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4828 | else | |
4829 | ac_save_LIBS="$LIBS" | |
4830 | LIBS="-lc $LIBS" | |
4831 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4832 | #line 4833 "configure" |
c906108c SS |
4833 | #include "confdefs.h" |
4834 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4835 | /* We use char because int might match the return type of a gcc2 | |
4836 | builtin and then its argument prototype would still apply. */ | |
4837 | char wctype(); | |
4838 | ||
4839 | int main() { | |
4840 | wctype() | |
4841 | ; return 0; } | |
4842 | EOF | |
422ea4b8 | 4843 | if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4844 | rm -rf conftest* |
4845 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4846 | else | |
4847 | echo "configure: failed program was:" >&5 | |
4848 | cat conftest.$ac_ext >&5 | |
4849 | rm -rf conftest* | |
4850 | eval "ac_cv_lib_$ac_lib_var=no" | |
4851 | fi | |
4852 | rm -f conftest* | |
4853 | LIBS="$ac_save_LIBS" | |
4854 | ||
4855 | fi | |
4856 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4857 | echo "$ac_t""yes" 1>&6 | |
4858 | : | |
4859 | else | |
4860 | echo "$ac_t""no" 1>&6 | |
4861 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
422ea4b8 | 4862 | echo "configure:4863: checking for wctype in -lw" >&5 |
c906108c SS |
4863 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
4864 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4866 | else | |
4867 | ac_save_LIBS="$LIBS" | |
4868 | LIBS="-lw $LIBS" | |
4869 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4870 | #line 4871 "configure" |
c906108c SS |
4871 | #include "confdefs.h" |
4872 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4873 | /* We use char because int might match the return type of a gcc2 | |
4874 | builtin and then its argument prototype would still apply. */ | |
4875 | char wctype(); | |
4876 | ||
4877 | int main() { | |
4878 | wctype() | |
4879 | ; return 0; } | |
4880 | EOF | |
422ea4b8 | 4881 | if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4882 | rm -rf conftest* |
4883 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4884 | else | |
4885 | echo "configure: failed program was:" >&5 | |
4886 | cat conftest.$ac_ext >&5 | |
4887 | rm -rf conftest* | |
4888 | eval "ac_cv_lib_$ac_lib_var=no" | |
4889 | fi | |
4890 | rm -f conftest* | |
4891 | LIBS="$ac_save_LIBS" | |
4892 | ||
4893 | fi | |
4894 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4895 | echo "$ac_t""yes" 1>&6 | |
4896 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
4897 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4898 | cat >> confdefs.h <<EOF | |
4899 | #define $ac_tr_lib 1 | |
4900 | EOF | |
4901 | ||
4902 | LIBS="-lw $LIBS" | |
4903 | ||
4904 | else | |
4905 | echo "$ac_t""no" 1>&6 | |
4906 | fi | |
4907 | ||
4908 | fi | |
4909 | ||
4910 | ||
4911 | ||
4912 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
422ea4b8 | 4913 | echo "configure:4914: checking for long long support in compiler" >&5 |
c906108c SS |
4914 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
4915 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4916 | else | |
4917 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4918 | #line 4919 "configure" |
c906108c SS |
4919 | #include "confdefs.h" |
4920 | ||
4921 | int main() { | |
4922 | ||
4923 | extern long long foo; | |
4924 | switch (foo & 2) { case 0: return 1; } | |
4925 | ||
4926 | ; return 0; } | |
4927 | EOF | |
422ea4b8 | 4928 | if { (eval echo configure:4929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4929 | rm -rf conftest* |
4930 | gdb_cv_c_long_long=yes | |
4931 | else | |
4932 | echo "configure: failed program was:" >&5 | |
4933 | cat conftest.$ac_ext >&5 | |
4934 | rm -rf conftest* | |
4935 | gdb_cv_c_long_long=no | |
4936 | fi | |
4937 | rm -f conftest* | |
4938 | fi | |
4939 | ||
4940 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
4941 | if test $gdb_cv_c_long_long = yes; then | |
4942 | cat >> confdefs.h <<\EOF | |
4943 | #define CC_HAS_LONG_LONG 1 | |
4944 | EOF | |
4945 | ||
4946 | fi | |
4947 | ||
4948 | ||
4949 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
422ea4b8 | 4950 | echo "configure:4951: checking for long long support in printf" >&5 |
c906108c SS |
4951 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
4952 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4953 | else | |
4954 | if test "$cross_compiling" = yes; then | |
4955 | gdb_cv_printf_has_long_long=no | |
4956 | else | |
4957 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 4958 | #line 4959 "configure" |
c906108c SS |
4959 | #include "confdefs.h" |
4960 | ||
4961 | int main () { | |
4962 | char buf[32]; | |
4963 | long long l = 0; | |
4964 | l = (l << 16) + 0x0123; | |
4965 | l = (l << 16) + 0x4567; | |
4966 | l = (l << 16) + 0x89ab; | |
4967 | l = (l << 16) + 0xcdef; | |
4968 | sprintf (buf, "0x%016llx", l); | |
4969 | return (strcmp ("0x0123456789abcdef", buf)); | |
4970 | } | |
4971 | EOF | |
422ea4b8 | 4972 | if { (eval echo configure:4973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
4973 | then |
4974 | gdb_cv_printf_has_long_long=yes | |
4975 | else | |
4976 | echo "configure: failed program was:" >&5 | |
4977 | cat conftest.$ac_ext >&5 | |
4978 | rm -fr conftest* | |
4979 | gdb_cv_printf_has_long_long=no | |
4980 | fi | |
4981 | rm -fr conftest* | |
4982 | fi | |
4983 | ||
4984 | fi | |
4985 | ||
4986 | if test $gdb_cv_printf_has_long_long = yes; then | |
4987 | cat >> confdefs.h <<\EOF | |
4988 | #define PRINTF_HAS_LONG_LONG 1 | |
4989 | EOF | |
4990 | ||
4991 | fi | |
4992 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
4993 | ||
4994 | ||
4995 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
422ea4b8 | 4996 | echo "configure:4997: checking for long double support in compiler" >&5 |
c906108c SS |
4997 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
4998 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4999 | else | |
5000 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5001 | #line 5002 "configure" |
c906108c SS |
5002 | #include "confdefs.h" |
5003 | ||
5004 | int main() { | |
5005 | long double foo; | |
5006 | ; return 0; } | |
5007 | EOF | |
422ea4b8 | 5008 | if { (eval echo configure:5009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5009 | rm -rf conftest* |
5010 | ac_cv_c_long_double=yes | |
5011 | else | |
5012 | echo "configure: failed program was:" >&5 | |
5013 | cat conftest.$ac_ext >&5 | |
5014 | rm -rf conftest* | |
5015 | ac_cv_c_long_double=no | |
5016 | fi | |
5017 | rm -f conftest* | |
5018 | fi | |
5019 | ||
5020 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
5021 | if test $ac_cv_c_long_double = yes; then | |
5022 | cat >> confdefs.h <<\EOF | |
5023 | #define HAVE_LONG_DOUBLE 1 | |
5024 | EOF | |
5025 | ||
5026 | fi | |
5027 | ||
5028 | ||
5029 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
422ea4b8 | 5030 | echo "configure:5031: checking for long double support in printf" >&5 |
c906108c SS |
5031 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
5032 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5033 | else | |
5034 | if test "$cross_compiling" = yes; then | |
5035 | gdb_cv_printf_has_long_double=no | |
5036 | else | |
5037 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5038 | #line 5039 "configure" |
c906108c SS |
5039 | #include "confdefs.h" |
5040 | ||
5041 | int main () { | |
5042 | char buf[16]; | |
5043 | long double f = 3.141592653; | |
5044 | sprintf (buf, "%Lg", f); | |
5045 | return (strncmp ("3.14159", buf, 7)); | |
5046 | } | |
5047 | EOF | |
422ea4b8 | 5048 | if { (eval echo configure:5049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5049 | then |
5050 | gdb_cv_printf_has_long_double=yes | |
5051 | else | |
5052 | echo "configure: failed program was:" >&5 | |
5053 | cat conftest.$ac_ext >&5 | |
5054 | rm -fr conftest* | |
5055 | gdb_cv_printf_has_long_double=no | |
5056 | fi | |
5057 | rm -fr conftest* | |
5058 | fi | |
5059 | ||
5060 | fi | |
5061 | ||
5062 | if test $gdb_cv_printf_has_long_double = yes; then | |
5063 | cat >> confdefs.h <<\EOF | |
5064 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
5065 | EOF | |
5066 | ||
5067 | fi | |
5068 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
5069 | ||
5070 | ||
5071 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
422ea4b8 | 5072 | echo "configure:5073: checking for long double support in scanf" >&5 |
c906108c SS |
5073 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
5074 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5075 | else | |
5076 | if test "$cross_compiling" = yes; then | |
5077 | gdb_cv_scanf_has_long_double=no | |
5078 | else | |
5079 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5080 | #line 5081 "configure" |
c906108c SS |
5081 | #include "confdefs.h" |
5082 | ||
5083 | int main () { | |
5084 | char *buf = "3.141592653"; | |
5085 | long double f = 0; | |
5086 | sscanf (buf, "%Lg", &f); | |
5087 | return !(f > 3.14159 && f < 3.14160); | |
5088 | } | |
5089 | EOF | |
422ea4b8 | 5090 | if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5091 | then |
5092 | gdb_cv_scanf_has_long_double=yes | |
5093 | else | |
5094 | echo "configure: failed program was:" >&5 | |
5095 | cat conftest.$ac_ext >&5 | |
5096 | rm -fr conftest* | |
5097 | gdb_cv_scanf_has_long_double=no | |
5098 | fi | |
5099 | rm -fr conftest* | |
5100 | fi | |
5101 | ||
5102 | fi | |
5103 | ||
5104 | if test $gdb_cv_scanf_has_long_double = yes; then | |
5105 | cat >> confdefs.h <<\EOF | |
5106 | #define SCANF_HAS_LONG_DOUBLE 1 | |
5107 | EOF | |
5108 | ||
5109 | fi | |
5110 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
5111 | ||
5112 | for ac_hdr in unistd.h | |
5113 | do | |
5114 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5115 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
422ea4b8 | 5116 | echo "configure:5117: checking for $ac_hdr" >&5 |
c906108c SS |
5117 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5119 | else | |
5120 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5121 | #line 5122 "configure" |
c906108c SS |
5122 | #include "confdefs.h" |
5123 | #include <$ac_hdr> | |
5124 | EOF | |
5125 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 5126 | { (eval echo configure:5127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5127 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5128 | if test -z "$ac_err"; then | |
5129 | rm -rf conftest* | |
5130 | eval "ac_cv_header_$ac_safe=yes" | |
5131 | else | |
5132 | echo "$ac_err" >&5 | |
5133 | echo "configure: failed program was:" >&5 | |
5134 | cat conftest.$ac_ext >&5 | |
5135 | rm -rf conftest* | |
5136 | eval "ac_cv_header_$ac_safe=no" | |
5137 | fi | |
5138 | rm -f conftest* | |
5139 | fi | |
5140 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5141 | echo "$ac_t""yes" 1>&6 | |
5142 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5143 | cat >> confdefs.h <<EOF | |
5144 | #define $ac_tr_hdr 1 | |
5145 | EOF | |
5146 | ||
5147 | else | |
5148 | echo "$ac_t""no" 1>&6 | |
5149 | fi | |
5150 | done | |
5151 | ||
5152 | for ac_func in getpagesize | |
5153 | do | |
5154 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
422ea4b8 | 5155 | echo "configure:5156: checking for $ac_func" >&5 |
c906108c SS |
5156 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5157 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5158 | else | |
5159 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5160 | #line 5161 "configure" |
c906108c SS |
5161 | #include "confdefs.h" |
5162 | /* System header to define __stub macros and hopefully few prototypes, | |
5163 | which can conflict with char $ac_func(); below. */ | |
5164 | #include <assert.h> | |
5165 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5166 | /* We use char because int might match the return type of a gcc2 | |
5167 | builtin and then its argument prototype would still apply. */ | |
5168 | char $ac_func(); | |
5169 | ||
5170 | int main() { | |
5171 | ||
5172 | /* The GNU C library defines this for functions which it implements | |
5173 | to always fail with ENOSYS. Some functions are actually named | |
5174 | something starting with __ and the normal name is an alias. */ | |
5175 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5176 | choke me | |
5177 | #else | |
5178 | $ac_func(); | |
5179 | #endif | |
5180 | ||
5181 | ; return 0; } | |
5182 | EOF | |
422ea4b8 | 5183 | if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5184 | rm -rf conftest* |
5185 | eval "ac_cv_func_$ac_func=yes" | |
5186 | else | |
5187 | echo "configure: failed program was:" >&5 | |
5188 | cat conftest.$ac_ext >&5 | |
5189 | rm -rf conftest* | |
5190 | eval "ac_cv_func_$ac_func=no" | |
5191 | fi | |
5192 | rm -f conftest* | |
5193 | fi | |
5194 | ||
5195 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5196 | echo "$ac_t""yes" 1>&6 | |
5197 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5198 | cat >> confdefs.h <<EOF | |
5199 | #define $ac_tr_func 1 | |
5200 | EOF | |
5201 | ||
5202 | else | |
5203 | echo "$ac_t""no" 1>&6 | |
5204 | fi | |
5205 | done | |
5206 | ||
5207 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
422ea4b8 | 5208 | echo "configure:5209: checking for working mmap" >&5 |
c906108c SS |
5209 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5211 | else | |
5212 | if test "$cross_compiling" = yes; then | |
5213 | ac_cv_func_mmap_fixed_mapped=no | |
5214 | else | |
5215 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5216 | #line 5217 "configure" |
c906108c SS |
5217 | #include "confdefs.h" |
5218 | ||
5219 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5220 | Here is a matrix of mmap possibilities: | |
5221 | mmap private not fixed | |
5222 | mmap private fixed at somewhere currently unmapped | |
5223 | mmap private fixed at somewhere already mapped | |
5224 | mmap shared not fixed | |
5225 | mmap shared fixed at somewhere currently unmapped | |
5226 | mmap shared fixed at somewhere already mapped | |
5227 | For private mappings, we should verify that changes cannot be read() | |
5228 | back from the file, nor mmap's back from the file at a different | |
5229 | address. (There have been systems where private was not correctly | |
5230 | implemented like the infamous i386 svr4.0, and systems where the | |
5231 | VM page cache was not coherent with the filesystem buffer cache | |
5232 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5233 | For shared mappings, we should conversely verify that changes get | |
5234 | propogated back to all the places they're supposed to be. | |
5235 | ||
5236 | Grep wants private fixed already mapped. | |
5237 | The main things grep needs to know about mmap are: | |
5238 | * does it exist and is it safe to write into the mmap'd area | |
5239 | * how to use it (BSD variants) */ | |
5240 | #include <sys/types.h> | |
5241 | #include <fcntl.h> | |
5242 | #include <sys/mman.h> | |
5243 | ||
5244 | /* This mess was copied from the GNU getpagesize.h. */ | |
5245 | #ifndef HAVE_GETPAGESIZE | |
5246 | # ifdef HAVE_UNISTD_H | |
5247 | # include <unistd.h> | |
5248 | # endif | |
5249 | ||
5250 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5251 | # ifndef HAVE_SYS_PARAM_H | |
5252 | # define HAVE_SYS_PARAM_H 1 | |
5253 | # endif | |
5254 | ||
5255 | # ifdef _SC_PAGESIZE | |
5256 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5257 | # else /* no _SC_PAGESIZE */ | |
5258 | # ifdef HAVE_SYS_PARAM_H | |
5259 | # include <sys/param.h> | |
5260 | # ifdef EXEC_PAGESIZE | |
5261 | # define getpagesize() EXEC_PAGESIZE | |
5262 | # else /* no EXEC_PAGESIZE */ | |
5263 | # ifdef NBPG | |
5264 | # define getpagesize() NBPG * CLSIZE | |
5265 | # ifndef CLSIZE | |
5266 | # define CLSIZE 1 | |
5267 | # endif /* no CLSIZE */ | |
5268 | # else /* no NBPG */ | |
5269 | # ifdef NBPC | |
5270 | # define getpagesize() NBPC | |
5271 | # else /* no NBPC */ | |
5272 | # ifdef PAGESIZE | |
5273 | # define getpagesize() PAGESIZE | |
5274 | # endif /* PAGESIZE */ | |
5275 | # endif /* no NBPC */ | |
5276 | # endif /* no NBPG */ | |
5277 | # endif /* no EXEC_PAGESIZE */ | |
5278 | # else /* no HAVE_SYS_PARAM_H */ | |
5279 | # define getpagesize() 8192 /* punt totally */ | |
5280 | # endif /* no HAVE_SYS_PARAM_H */ | |
5281 | # endif /* no _SC_PAGESIZE */ | |
5282 | ||
5283 | #endif /* no HAVE_GETPAGESIZE */ | |
5284 | ||
5285 | #ifdef __cplusplus | |
5286 | extern "C" { void *malloc(unsigned); } | |
5287 | #else | |
5288 | char *malloc(); | |
5289 | #endif | |
5290 | ||
5291 | int | |
5292 | main() | |
5293 | { | |
5294 | char *data, *data2, *data3; | |
5295 | int i, pagesize; | |
5296 | int fd; | |
5297 | ||
5298 | pagesize = getpagesize(); | |
5299 | ||
5300 | /* | |
5301 | * First, make a file with some known garbage in it. | |
5302 | */ | |
5303 | data = malloc(pagesize); | |
5304 | if (!data) | |
5305 | exit(1); | |
5306 | for (i = 0; i < pagesize; ++i) | |
5307 | *(data + i) = rand(); | |
5308 | umask(0); | |
5309 | fd = creat("conftestmmap", 0600); | |
5310 | if (fd < 0) | |
5311 | exit(1); | |
5312 | if (write(fd, data, pagesize) != pagesize) | |
5313 | exit(1); | |
5314 | close(fd); | |
5315 | ||
5316 | /* | |
5317 | * Next, try to mmap the file at a fixed address which | |
5318 | * already has something else allocated at it. If we can, | |
5319 | * also make sure that we see the same garbage. | |
5320 | */ | |
5321 | fd = open("conftestmmap", O_RDWR); | |
5322 | if (fd < 0) | |
5323 | exit(1); | |
5324 | data2 = malloc(2 * pagesize); | |
5325 | if (!data2) | |
5326 | exit(1); | |
5327 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5328 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5329 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5330 | exit(1); | |
5331 | for (i = 0; i < pagesize; ++i) | |
5332 | if (*(data + i) != *(data2 + i)) | |
5333 | exit(1); | |
5334 | ||
5335 | /* | |
5336 | * Finally, make sure that changes to the mapped area | |
5337 | * do not percolate back to the file as seen by read(). | |
5338 | * (This is a bug on some variants of i386 svr4.0.) | |
5339 | */ | |
5340 | for (i = 0; i < pagesize; ++i) | |
5341 | *(data2 + i) = *(data2 + i) + 1; | |
5342 | data3 = malloc(pagesize); | |
5343 | if (!data3) | |
5344 | exit(1); | |
5345 | if (read(fd, data3, pagesize) != pagesize) | |
5346 | exit(1); | |
5347 | for (i = 0; i < pagesize; ++i) | |
5348 | if (*(data + i) != *(data3 + i)) | |
5349 | exit(1); | |
5350 | close(fd); | |
5351 | unlink("conftestmmap"); | |
5352 | exit(0); | |
5353 | } | |
5354 | ||
5355 | EOF | |
422ea4b8 | 5356 | if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5357 | then |
5358 | ac_cv_func_mmap_fixed_mapped=yes | |
5359 | else | |
5360 | echo "configure: failed program was:" >&5 | |
5361 | cat conftest.$ac_ext >&5 | |
5362 | rm -fr conftest* | |
5363 | ac_cv_func_mmap_fixed_mapped=no | |
5364 | fi | |
5365 | rm -fr conftest* | |
5366 | fi | |
5367 | ||
5368 | fi | |
5369 | ||
5370 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
5371 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5372 | cat >> confdefs.h <<\EOF | |
5373 | #define HAVE_MMAP 1 | |
5374 | EOF | |
5375 | ||
5376 | fi | |
5377 | ||
5378 | ||
5379 | ||
5380 | ||
5381 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5382 | case ${host_os} in | |
5383 | hpux*) | |
5384 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
422ea4b8 | 5385 | echo "configure:5386: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
5386 | if test -f /usr/include/dce/cma_config.h ; then |
5387 | if test "$GCC" = "yes" ; then | |
5388 | echo "$ac_t""yes" 1>&6 | |
5389 | cat >> confdefs.h <<\EOF | |
5390 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
5391 | EOF | |
5392 | ||
5393 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" | |
5394 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" | |
5395 | else | |
5396 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
5397 | fi | |
5398 | else | |
5399 | echo "$ac_t""no" 1>&6 | |
5400 | fi | |
5401 | ;; | |
5402 | solaris*) | |
5403 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
422ea4b8 | 5404 | echo "configure:5405: checking for Solaris thread debugging library" >&5 |
c906108c SS |
5405 | if test -f /usr/lib/libthread_db.so.1 ; then |
5406 | echo "$ac_t""yes" 1>&6 | |
5407 | cat >> confdefs.h <<\EOF | |
5408 | #define HAVE_THREAD_DB_LIB 1 | |
5409 | EOF | |
5410 | ||
5411 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
5412 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" | |
5413 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
422ea4b8 | 5414 | echo "configure:5415: checking for dlopen in -ldl" >&5 |
c906108c SS |
5415 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
5416 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5417 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5418 | else | |
5419 | ac_save_LIBS="$LIBS" | |
5420 | LIBS="-ldl $LIBS" | |
5421 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5422 | #line 5423 "configure" |
c906108c SS |
5423 | #include "confdefs.h" |
5424 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5425 | /* We use char because int might match the return type of a gcc2 | |
5426 | builtin and then its argument prototype would still apply. */ | |
5427 | char dlopen(); | |
5428 | ||
5429 | int main() { | |
5430 | dlopen() | |
5431 | ; return 0; } | |
5432 | EOF | |
422ea4b8 | 5433 | if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5434 | rm -rf conftest* |
5435 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5436 | else | |
5437 | echo "configure: failed program was:" >&5 | |
5438 | cat conftest.$ac_ext >&5 | |
5439 | rm -rf conftest* | |
5440 | eval "ac_cv_lib_$ac_lib_var=no" | |
5441 | fi | |
5442 | rm -f conftest* | |
5443 | LIBS="$ac_save_LIBS" | |
5444 | ||
5445 | fi | |
5446 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5447 | echo "$ac_t""yes" 1>&6 | |
5448 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5449 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5450 | cat >> confdefs.h <<EOF | |
5451 | #define $ac_tr_lib 1 | |
5452 | EOF | |
5453 | ||
5454 | LIBS="-ldl $LIBS" | |
5455 | ||
5456 | else | |
5457 | echo "$ac_t""no" 1>&6 | |
5458 | fi | |
5459 | ||
5460 | if test "$GCC" = "yes" ; then | |
5461 | # The GNU linker requires the -export-dynamic option to make | |
5462 | # all symbols visible in the dynamic symbol table. | |
5463 | hold_ldflags=$LDFLAGS | |
5464 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
422ea4b8 | 5465 | echo "configure:5466: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
5466 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
5467 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5468 | #line 5469 "configure" |
c906108c SS |
5469 | #include "confdefs.h" |
5470 | ||
5471 | int main() { | |
5472 | int i; | |
5473 | ; return 0; } | |
5474 | EOF | |
422ea4b8 | 5475 | if { (eval echo configure:5476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5476 | rm -rf conftest* |
5477 | found=yes | |
5478 | else | |
5479 | echo "configure: failed program was:" >&5 | |
5480 | cat conftest.$ac_ext >&5 | |
5481 | rm -rf conftest* | |
5482 | found=no | |
5483 | fi | |
5484 | rm -f conftest* | |
5485 | LDFLAGS=$hold_ldflags | |
5486 | echo "$ac_t""$found" 1>&6 | |
5487 | if test $found = yes; then | |
5488 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
5489 | fi | |
5490 | fi | |
5491 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
5492 | # at one point. | |
5493 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
422ea4b8 | 5494 | echo "configure:5495: checking if <proc_service.h> is old" >&5 |
c906108c SS |
5495 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
5496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5497 | else | |
5498 | ||
5499 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5500 | #line 5501 "configure" |
c906108c SS |
5501 | #include "confdefs.h" |
5502 | ||
5503 | #include <proc_service.h> | |
5504 | ps_err_e ps_pdwrite | |
5505 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
5506 | ||
5507 | int main() { | |
5508 | ||
5509 | ; return 0; } | |
5510 | EOF | |
422ea4b8 | 5511 | if { (eval echo configure:5512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5512 | rm -rf conftest* |
5513 | gdb_cv_proc_service_is_old=no | |
5514 | else | |
5515 | echo "configure: failed program was:" >&5 | |
5516 | cat conftest.$ac_ext >&5 | |
5517 | rm -rf conftest* | |
5518 | gdb_cv_proc_service_is_old=yes | |
5519 | fi | |
5520 | rm -f conftest* | |
5521 | ||
5522 | fi | |
5523 | ||
5524 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
5525 | if test $gdb_cv_proc_service_is_old = yes; then | |
5526 | cat >> confdefs.h <<\EOF | |
5527 | #define PROC_SERVICE_IS_OLD 1 | |
5528 | EOF | |
5529 | ||
5530 | fi | |
5531 | else | |
5532 | echo "$ac_t""no" 1>&6 | |
5533 | fi | |
5534 | ;; | |
5535 | esac | |
5536 | ||
5537 | fi | |
5538 | ||
fb40c209 AC |
5539 | |
5540 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
5541 | if test "${enable_gdbmi+set}" = set; then | |
5542 | enableval="$enable_gdbmi" | |
5543 | ||
5544 | case "${enable_gdbmi}" in | |
5545 | yes | no) ;; | |
5546 | "") enable_gdbmi=yes ;; | |
5547 | *) | |
5548 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
5549 | ;; | |
5550 | esac | |
5551 | ||
5552 | fi | |
5553 | ||
5554 | case ${enable_gdbmi} in | |
5555 | "yes" ) | |
5556 | if test -d "${srcdir}/mi" ; then | |
5557 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
5558 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
5559 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)" | |
5560 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" | |
b0b1b869 | 5561 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
5562 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
5563 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
5564 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
5565 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
5566 | fi |
5567 | ;; | |
5568 | esac | |
c906108c SS |
5569 | |
5570 | # Check whether --enable-tui or --disable-tui was given. | |
5571 | if test "${enable_tui+set}" = set; then | |
5572 | enableval="$enable_tui" | |
5573 | ||
5574 | case "${enable_tui}" in | |
5575 | yes | no) ;; | |
5576 | "") enable_tui=yes ;; | |
5577 | *) | |
5578 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
5579 | ;; | |
5580 | esac | |
5581 | ||
5582 | fi | |
5583 | ||
5584 | case ${enable_tui} in | |
5585 | "yes" ) | |
ed952ac5 AC |
5586 | if test -d "${srcdir}/tui" ; then |
5587 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
5588 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
5589 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_TUI_SRCS)" | |
5590 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" | |
5591 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
5592 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
5593 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
5594 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
5595 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
5596 | fi | |
5597 | ;; | |
c906108c SS |
5598 | esac |
5599 | ||
c906108c SS |
5600 | # Check whether --enable-netrom or --disable-netrom was given. |
5601 | if test "${enable_netrom+set}" = set; then | |
5602 | enableval="$enable_netrom" | |
5603 | case "${enableval}" in | |
5604 | yes) enable_netrom=yes ;; | |
5605 | no) enable_netrom=no ;; | |
5606 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
5607 | esac | |
5608 | fi | |
5609 | ||
5610 | ||
5611 | if test "${enable_netrom}" = "yes"; then | |
5612 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" | |
5613 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" | |
5614 | fi | |
5615 | ||
1decb323 | 5616 | |
d8038014 AC |
5617 | # Don't add -Wall or -Wunused, they include -Wunused-parameter which |
5618 | # causes noise. | |
1decb323 | 5619 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
16cadf39 | 5620 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
5621 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
5622 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
5623 | # -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual | |
5624 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes | |
5625 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
5626 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
5627 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
5628 | if test "${enable_build_warnings+set}" = set; then | |
5629 | enableval="$enable_build_warnings" | |
1decb323 | 5630 | case "${enableval}" in |
c906108c SS |
5631 | yes) ;; |
5632 | no) build_warnings="-w";; | |
5633 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5634 | build_warnings="${build_warnings} ${t}";; | |
5635 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5636 | build_warnings="${t} ${build_warnings}";; | |
5637 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5638 | esac | |
d4f3574e | 5639 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 5640 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 5641 | fi |
1decb323 | 5642 | fi |
104c1213 JM |
5643 | WARN_CFLAGS="" |
5644 | WERROR_CFLAGS="" | |
c906108c SS |
5645 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
5646 | then | |
746a987d | 5647 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
422ea4b8 | 5648 | echo "configure:5649: checking compiler warning flags" >&5 |
746a987d AC |
5649 | # Separate out the -Werror flag as some files just cannot be |
5650 | # compiled with it enabled. | |
5651 | for w in ${build_warnings}; do | |
5652 | case $w in | |
5653 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
5654 | *) # Check that GCC accepts it | |
5655 | if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then | |
5656 | : | |
5657 | else | |
5658 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
5659 | fi | |
5660 | esac | |
5661 | done | |
5662 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
5663 | fi |
5664 | ||
5665 | ||
104c1213 | 5666 | |
c906108c SS |
5667 | MMALLOC_CFLAGS= |
5668 | MMALLOC= | |
5669 | ||
5670 | ||
5671 | ||
5672 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
5673 | if test "${with_mmalloc+set}" = set; then | |
5674 | withval="$with_mmalloc" | |
5675 | case "${withval}" in | |
5676 | yes) want_mmalloc=true ;; | |
5677 | no) want_mmalloc=false;; | |
5678 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
5679 | esac | |
5680 | else | |
5681 | want_mmalloc=false | |
5682 | fi | |
5683 | ||
5684 | if test x$want_mmalloc = xtrue; then | |
5685 | cat >> confdefs.h <<\EOF | |
5686 | #define USE_MMALLOC 1 | |
5687 | EOF | |
5688 | ||
5689 | cat >> confdefs.h <<\EOF | |
5690 | #define MMCHECK_FORCE 1 | |
5691 | EOF | |
5692 | ||
5693 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
5694 | MMALLOC='../mmalloc/libmmalloc.a' | |
5695 | fi | |
5696 | ||
88987551 L |
5697 | # Check whether --with-included-regex or --without-included-regex was given. |
5698 | if test "${with_included_regex+set}" = set; then | |
5699 | withval="$with_included_regex" | |
5700 | case "${withval}" in | |
5701 | yes) want_included_regex=true ;; | |
5702 | no) want_included_regex=false;; | |
5703 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
5704 | esac | |
5705 | else | |
5706 | want_included_regex=true | |
5707 | fi | |
5708 | ||
88987551 L |
5709 | if test $want_included_regex = false; then |
5710 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
422ea4b8 | 5711 | echo "configure:5712: checking for GNU regex" >&5 |
88987551 L |
5712 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
5713 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5714 | else | |
5715 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5716 | #line 5717 "configure" |
88987551 L |
5717 | #include "confdefs.h" |
5718 | #include <gnu-versions.h> | |
5719 | #include <sys/types.h> | |
5720 | #include <regex.h> | |
5721 | int main() { | |
5722 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
5723 | #error No valid GNU regex. | |
5724 | #endif | |
5725 | ||
5726 | ; return 0; } | |
5727 | EOF | |
422ea4b8 | 5728 | if { (eval echo configure:5729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
5729 | rm -rf conftest* |
5730 | gdb_cv_have_gnu_regex=yes | |
5731 | else | |
5732 | echo "configure: failed program was:" >&5 | |
5733 | cat conftest.$ac_ext >&5 | |
5734 | rm -rf conftest* | |
5735 | gdb_cv_have_gnu_regex=no | |
5736 | fi | |
5737 | rm -f conftest* | |
5738 | fi | |
5739 | ||
5740 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
5741 | if test $gdb_cv_have_gnu_regex = no; then |
5742 | want_included_regex=true | |
88987551 L |
5743 | fi |
5744 | fi | |
5745 | ||
e48f66e4 AC |
5746 | if test x${want_included_regex} = xtrue; then |
5747 | REGEX="gnu-regex.o" | |
5748 | cat >> confdefs.h <<\EOF | |
5749 | #define USE_INCLUDED_REGEX 1 | |
5750 | EOF | |
5751 | ||
5752 | fi | |
88987551 | 5753 | |
7a292a7a SS |
5754 | |
5755 | # In the Cygwin environment, we need some additional flags. | |
5756 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
422ea4b8 | 5757 | echo "configure:5758: checking for cygwin" >&5 |
7a292a7a SS |
5758 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
5759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5760 | else | |
5761 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5762 | #line 5763 "configure" |
7a292a7a SS |
5763 | #include "confdefs.h" |
5764 | ||
5765 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
5766 | lose | |
5767 | #endif | |
5768 | EOF | |
5769 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5770 | egrep "lose" >/dev/null 2>&1; then | |
5771 | rm -rf conftest* | |
5772 | gdb_cv_os_cygwin=yes | |
5773 | else | |
5774 | rm -rf conftest* | |
5775 | gdb_cv_os_cygwin=no | |
5776 | fi | |
5777 | rm -f conftest* | |
5778 | ||
5779 | fi | |
5780 | ||
5781 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
5782 | ||
b83266a0 SS |
5783 | if test x$gdb_host = xgo32; then |
5784 | TERM_LIB= | |
5785 | else | |
c906108c SS |
5786 | if test x$gdb_cv_os_cygwin = xyes; then |
5787 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
5788 | else | |
5789 | TERM_LIB= | |
5790 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
422ea4b8 | 5791 | echo "configure:5792: checking for tgetent in -lncurses" >&5 |
c906108c SS |
5792 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
5793 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5794 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5795 | else | |
5796 | ac_save_LIBS="$LIBS" | |
5797 | LIBS="-lncurses $LIBS" | |
5798 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5799 | #line 5800 "configure" |
c906108c SS |
5800 | #include "confdefs.h" |
5801 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5802 | /* We use char because int might match the return type of a gcc2 | |
5803 | builtin and then its argument prototype would still apply. */ | |
5804 | char tgetent(); | |
5805 | ||
5806 | int main() { | |
5807 | tgetent() | |
5808 | ; return 0; } | |
5809 | EOF | |
422ea4b8 | 5810 | if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5811 | rm -rf conftest* |
5812 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5813 | else | |
5814 | echo "configure: failed program was:" >&5 | |
5815 | cat conftest.$ac_ext >&5 | |
5816 | rm -rf conftest* | |
5817 | eval "ac_cv_lib_$ac_lib_var=no" | |
5818 | fi | |
5819 | rm -f conftest* | |
5820 | LIBS="$ac_save_LIBS" | |
5821 | ||
5822 | fi | |
5823 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5824 | echo "$ac_t""yes" 1>&6 | |
5825 | TERM_LIB=-lncurses | |
5826 | else | |
5827 | echo "$ac_t""no" 1>&6 | |
5828 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
422ea4b8 | 5829 | echo "configure:5830: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
5830 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
5831 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5832 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5833 | else | |
5834 | ac_save_LIBS="$LIBS" | |
5835 | LIBS="-lHcurses $LIBS" | |
5836 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5837 | #line 5838 "configure" |
c906108c SS |
5838 | #include "confdefs.h" |
5839 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5840 | /* We use char because int might match the return type of a gcc2 | |
5841 | builtin and then its argument prototype would still apply. */ | |
5842 | char tgetent(); | |
5843 | ||
5844 | int main() { | |
5845 | tgetent() | |
5846 | ; return 0; } | |
5847 | EOF | |
422ea4b8 | 5848 | if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5849 | rm -rf conftest* |
5850 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5851 | else | |
5852 | echo "configure: failed program was:" >&5 | |
5853 | cat conftest.$ac_ext >&5 | |
5854 | rm -rf conftest* | |
5855 | eval "ac_cv_lib_$ac_lib_var=no" | |
5856 | fi | |
5857 | rm -f conftest* | |
5858 | LIBS="$ac_save_LIBS" | |
5859 | ||
5860 | fi | |
5861 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5862 | echo "$ac_t""yes" 1>&6 | |
5863 | TERM_LIB=-lHcurses | |
5864 | else | |
5865 | echo "$ac_t""no" 1>&6 | |
5866 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
422ea4b8 | 5867 | echo "configure:5868: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
5868 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
5869 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5870 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5871 | else | |
5872 | ac_save_LIBS="$LIBS" | |
5873 | LIBS="-ltermlib $LIBS" | |
5874 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5875 | #line 5876 "configure" |
c906108c SS |
5876 | #include "confdefs.h" |
5877 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5878 | /* We use char because int might match the return type of a gcc2 | |
5879 | builtin and then its argument prototype would still apply. */ | |
5880 | char tgetent(); | |
5881 | ||
5882 | int main() { | |
5883 | tgetent() | |
5884 | ; return 0; } | |
5885 | EOF | |
422ea4b8 | 5886 | if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5887 | rm -rf conftest* |
5888 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5889 | else | |
5890 | echo "configure: failed program was:" >&5 | |
5891 | cat conftest.$ac_ext >&5 | |
5892 | rm -rf conftest* | |
5893 | eval "ac_cv_lib_$ac_lib_var=no" | |
5894 | fi | |
5895 | rm -f conftest* | |
5896 | LIBS="$ac_save_LIBS" | |
5897 | ||
5898 | fi | |
5899 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5900 | echo "$ac_t""yes" 1>&6 | |
5901 | TERM_LIB=-ltermlib | |
5902 | else | |
5903 | echo "$ac_t""no" 1>&6 | |
5904 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
422ea4b8 | 5905 | echo "configure:5906: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
5906 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
5907 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5908 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5909 | else | |
5910 | ac_save_LIBS="$LIBS" | |
5911 | LIBS="-ltermcap $LIBS" | |
5912 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5913 | #line 5914 "configure" |
c906108c SS |
5914 | #include "confdefs.h" |
5915 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5916 | /* We use char because int might match the return type of a gcc2 | |
5917 | builtin and then its argument prototype would still apply. */ | |
5918 | char tgetent(); | |
5919 | ||
5920 | int main() { | |
5921 | tgetent() | |
5922 | ; return 0; } | |
5923 | EOF | |
422ea4b8 | 5924 | if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5925 | rm -rf conftest* |
5926 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5927 | else | |
5928 | echo "configure: failed program was:" >&5 | |
5929 | cat conftest.$ac_ext >&5 | |
5930 | rm -rf conftest* | |
5931 | eval "ac_cv_lib_$ac_lib_var=no" | |
5932 | fi | |
5933 | rm -f conftest* | |
5934 | LIBS="$ac_save_LIBS" | |
5935 | ||
5936 | fi | |
5937 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5938 | echo "$ac_t""yes" 1>&6 | |
5939 | TERM_LIB=-ltermcap | |
5940 | else | |
5941 | echo "$ac_t""no" 1>&6 | |
5942 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
422ea4b8 | 5943 | echo "configure:5944: checking for tgetent in -lcurses" >&5 |
c906108c SS |
5944 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
5945 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5946 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5947 | else | |
5948 | ac_save_LIBS="$LIBS" | |
5949 | LIBS="-lcurses $LIBS" | |
5950 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5951 | #line 5952 "configure" |
c906108c SS |
5952 | #include "confdefs.h" |
5953 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5954 | /* We use char because int might match the return type of a gcc2 | |
5955 | builtin and then its argument prototype would still apply. */ | |
5956 | char tgetent(); | |
5957 | ||
5958 | int main() { | |
5959 | tgetent() | |
5960 | ; return 0; } | |
5961 | EOF | |
422ea4b8 | 5962 | if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5963 | rm -rf conftest* |
5964 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5965 | else | |
5966 | echo "configure: failed program was:" >&5 | |
5967 | cat conftest.$ac_ext >&5 | |
5968 | rm -rf conftest* | |
5969 | eval "ac_cv_lib_$ac_lib_var=no" | |
5970 | fi | |
5971 | rm -f conftest* | |
5972 | LIBS="$ac_save_LIBS" | |
5973 | ||
5974 | fi | |
5975 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5976 | echo "$ac_t""yes" 1>&6 | |
5977 | TERM_LIB=-lcurses | |
5978 | else | |
5979 | echo "$ac_t""no" 1>&6 | |
5980 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
422ea4b8 | 5981 | echo "configure:5982: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
5982 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
5983 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5984 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5985 | else | |
5986 | ac_save_LIBS="$LIBS" | |
5987 | LIBS="-lterminfo $LIBS" | |
5988 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 5989 | #line 5990 "configure" |
c906108c SS |
5990 | #include "confdefs.h" |
5991 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5992 | /* We use char because int might match the return type of a gcc2 | |
5993 | builtin and then its argument prototype would still apply. */ | |
5994 | char tgetent(); | |
5995 | ||
5996 | int main() { | |
5997 | tgetent() | |
5998 | ; return 0; } | |
5999 | EOF | |
422ea4b8 | 6000 | if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6001 | rm -rf conftest* |
6002 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6003 | else | |
6004 | echo "configure: failed program was:" >&5 | |
6005 | cat conftest.$ac_ext >&5 | |
6006 | rm -rf conftest* | |
6007 | eval "ac_cv_lib_$ac_lib_var=no" | |
6008 | fi | |
6009 | rm -f conftest* | |
6010 | LIBS="$ac_save_LIBS" | |
6011 | ||
6012 | fi | |
6013 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6014 | echo "$ac_t""yes" 1>&6 | |
6015 | TERM_LIB=-lterminfo | |
6016 | else | |
6017 | echo "$ac_t""no" 1>&6 | |
6018 | fi | |
6019 | ||
6020 | fi | |
6021 | ||
6022 | fi | |
6023 | ||
6024 | fi | |
6025 | ||
6026 | fi | |
6027 | ||
6028 | fi | |
6029 | ||
6030 | ||
6031 | if test "x$TERM_LIB" = x | |
6032 | then | |
6033 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
6034 | fi | |
6035 | fi | |
b83266a0 | 6036 | fi |
c906108c SS |
6037 | |
6038 | ||
cd0fc7c3 SS |
6039 | # libreadline needs libuser32.a in a cygwin environment |
6040 | WIN32LIBS= | |
6041 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
6042 | WIN32LIBS="-luser32" |
6043 | case "${target}" in | |
6044 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
6045 | ;; | |
6046 | esac | |
cd0fc7c3 | 6047 | fi |
c906108c | 6048 | |
7a292a7a | 6049 | |
3fc11d3e JM |
6050 | LIBGUI="../libgui/src/libgui.a" |
6051 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
6052 | ||
6053 | ||
7a292a7a | 6054 | |
8b93c638 JM |
6055 | # Check whether --with-cpu or --without-cpu was given. |
6056 | if test "${with_cpu+set}" = set; then | |
6057 | withval="$with_cpu" | |
6058 | case "${target}" in | |
6059 | powerpc-* | powerpcle-* ) | |
6060 | ## It would be nice to keep this table in sync with the one in | |
6061 | ## gcc/configure. | |
6062 | case "${with_cpu}" in | |
6063 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
6064 | | 604 | 750 ) | |
6065 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
6066 | ;; | |
6067 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
6068 | ## These are all RS6000 variants, as far as GDB is concerned. | |
6069 | with_cpu=rs6000 | |
6070 | ;; | |
6071 | 603e | ec603e ) | |
6072 | with_cpu=603 | |
6073 | ;; | |
6074 | 604e ) | |
6075 | with_cpu=604 | |
6076 | ;; | |
6077 | * ) | |
6078 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
6079 | with_cpu=ppc-uisa | |
6080 | ;; | |
6081 | esac | |
6082 | ;; | |
6083 | * ) | |
6084 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
6085 | ;; | |
6086 | esac | |
6087 | cat >> confdefs.h <<EOF | |
6088 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
6089 | EOF | |
6090 | ||
6091 | ||
6092 | fi | |
6093 | ||
6094 | ||
6095 | ||
3fc11d3e JM |
6096 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
6097 | if test "${enable_gdbtk+set}" = set; then | |
6098 | enableval="$enable_gdbtk" | |
6099 | case "${enableval}" in | |
6100 | yes) | |
6101 | case "$host" in | |
6102 | *go32*) | |
6103 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6104 | enable_gdbtk=no ;; | |
6105 | *windows*) | |
6106 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6107 | enable_gdbtk=no ;; | |
6108 | *) | |
6109 | enable_gdbtk=yes ;; | |
6110 | esac ;; | |
6111 | no) | |
6112 | enable_gdbtk=no ;; | |
6113 | *) | |
6114 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
6115 | esac | |
6116 | else | |
6117 | ||
6118 | # Default is on for everything but go32 and Cygwin | |
6119 | case "$host" in | |
6120 | *go32* | *windows*) | |
6121 | ;; | |
6122 | *) | |
379d6434 AC |
6123 | if test -d "${srcdir}/gdbtk" ; then |
6124 | enable_gdbtk=yes | |
6125 | fi | |
6126 | ;; | |
6127 | esac | |
3fc11d3e JM |
6128 | |
6129 | fi | |
6130 | ||
6131 | ||
6132 | WIN32LDAPP= | |
6133 | ||
6134 | ||
6135 | ||
6136 | configdir="unix" | |
6137 | ||
6138 | GDBTKLIBS= | |
6139 | if test "${enable_gdbtk}" = "yes"; then | |
6140 | ||
6141 | ||
6142 | # | |
6143 | # Ok, lets find the tcl configuration | |
6144 | # First, look for one uninstalled. | |
6145 | # the alternative search directory is invoked by --with-tclconfig | |
6146 | # | |
6147 | ||
6148 | if test x"${no_tcl}" = x ; then | |
6149 | # we reset no_tcl in case something fails here | |
6150 | no_tcl=true | |
6151 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
6152 | if test "${with_tclconfig+set}" = set; then | |
6153 | withval="$with_tclconfig" | |
6154 | with_tclconfig=${withval} | |
6155 | fi | |
6156 | ||
6157 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
422ea4b8 | 6158 | echo "configure:6159: checking for Tcl configuration" >&5 |
3fc11d3e JM |
6159 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
6160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6161 | else | |
6162 | ||
6163 | ||
6164 | # First check to see if --with-tclconfig was specified. | |
6165 | if test x"${with_tclconfig}" != x ; then | |
6166 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
6167 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
6168 | else | |
6169 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
6170 | fi | |
6171 | fi | |
6172 | ||
6173 | # then check for a private Tcl installation | |
6174 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6175 | for i in \ | |
6176 | ../tcl \ | |
6177 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
6178 | ../../tcl \ | |
6179 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
6180 | ../../../tcl \ | |
6181 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
6182 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6183 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6184 | break | |
6185 | fi | |
6186 | done | |
6187 | fi | |
6188 | # check in a few common install locations | |
6189 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6190 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6191 | if test -f "$i/tclConfig.sh" ; then | |
6192 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
6193 | break | |
6194 | fi | |
6195 | done | |
6196 | fi | |
6197 | # check in a few other private locations | |
6198 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6199 | for i in \ | |
6200 | ${srcdir}/../tcl \ | |
6201 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
6202 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6203 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6204 | break | |
6205 | fi | |
6206 | done | |
6207 | fi | |
6208 | ||
6209 | fi | |
6210 | ||
6211 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6212 | TCLCONFIG="# no Tcl configs found" | |
6213 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
6214 | else | |
6215 | no_tcl= | |
6216 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
6217 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
6218 | fi | |
6219 | fi | |
6220 | ||
6221 | if test -z "${no_tcl}"; then | |
6222 | ||
6223 | . $TCLCONFIG | |
6224 | ||
6225 | ||
6226 | ||
6227 | ||
6228 | ||
6229 | ||
6230 | ||
6231 | ||
6232 | ||
6233 | ||
6234 | ||
6235 | ||
6236 | ||
6237 | ||
6238 | ||
6239 | ||
6240 | ||
6241 | ||
6242 | ||
6243 | ||
6244 | ||
6245 | ||
6246 | ||
6247 | ||
6248 | ||
6249 | ||
6250 | # | |
6251 | # Ok, lets find the tk configuration | |
6252 | # First, look for one uninstalled. | |
6253 | # the alternative search directory is invoked by --with-tkconfig | |
6254 | # | |
6255 | ||
6256 | if test x"${no_tk}" = x ; then | |
6257 | # we reset no_tk in case something fails here | |
6258 | no_tk=true | |
6259 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
6260 | if test "${with_tkconfig+set}" = set; then | |
6261 | withval="$with_tkconfig" | |
6262 | with_tkconfig=${withval} | |
6263 | fi | |
6264 | ||
6265 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
422ea4b8 | 6266 | echo "configure:6267: checking for Tk configuration" >&5 |
3fc11d3e JM |
6267 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
6268 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6269 | else | |
6270 | ||
6271 | ||
6272 | # First check to see if --with-tkconfig was specified. | |
6273 | if test x"${with_tkconfig}" != x ; then | |
6274 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
6275 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
6276 | else | |
6277 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
6278 | fi | |
6279 | fi | |
6280 | ||
6281 | # then check for a private Tk library | |
6282 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6283 | for i in \ | |
6284 | ../tk \ | |
6285 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
6286 | ../../tk \ | |
6287 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
6288 | ../../../tk \ | |
6289 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
6290 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6291 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6292 | break | |
6293 | fi | |
6294 | done | |
6295 | fi | |
6296 | # check in a few common install locations | |
6297 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6298 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6299 | if test -f "$i/tkConfig.sh" ; then | |
6300 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
6301 | break | |
6302 | fi | |
6303 | done | |
6304 | fi | |
6305 | # check in a few other private locations | |
6306 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6307 | for i in \ | |
6308 | ${srcdir}/../tk \ | |
6309 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
6310 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6311 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6312 | break | |
6313 | fi | |
6314 | done | |
6315 | fi | |
6316 | ||
6317 | fi | |
6318 | ||
6319 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6320 | TKCONFIG="# no Tk configs found" | |
6321 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
6322 | else | |
6323 | no_tk= | |
6324 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
6325 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
6326 | fi | |
6327 | fi | |
6328 | ||
6329 | ||
6330 | ||
6331 | # If $no_tk is nonempty, then we can't do Tk, and there is no | |
6332 | # point to doing Tcl. | |
6333 | if test -z "${no_tk}"; then | |
6334 | ||
6335 | if test -f "$TKCONFIG" ; then | |
6336 | . $TKCONFIG | |
6337 | fi | |
6338 | ||
6339 | ||
6340 | ||
6341 | ||
6342 | ||
6343 | ||
6344 | ||
6345 | ||
6346 | ||
6347 | ||
6348 | ||
6349 | ||
6350 | ||
6351 | ||
6352 | # | |
6353 | # Ok, lets find the tcl source trees so we can use the headers | |
6354 | # Warning: transition of version 9 to 10 will break this algorithm | |
6355 | # because 10 sorts before 9. We also look for just tcl. We have to | |
6356 | # be careful that we don't match stuff like tclX by accident. | |
6357 | # the alternative search directory is involked by --with-tclinclude | |
6358 | # | |
6359 | ||
6360 | no_tcl=true | |
6361 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
422ea4b8 | 6362 | echo "configure:6363: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
6363 | # Check whether --with-tclinclude or --without-tclinclude was given. |
6364 | if test "${with_tclinclude+set}" = set; then | |
6365 | withval="$with_tclinclude" | |
6366 | with_tclinclude=${withval} | |
6367 | fi | |
6368 | ||
6369 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
6370 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6371 | else | |
6372 | ||
6373 | # first check to see if --with-tclinclude was specified | |
6374 | if test x"${with_tclinclude}" != x ; then | |
6375 | if test -f ${with_tclinclude}/tclInt.h ; then | |
6376 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
6377 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
6378 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
6379 | else | |
6380 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6381 | fi | |
6382 | fi | |
6383 | ||
6384 | # next check if it came with Tcl configuration file | |
6385 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6386 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
6387 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
6388 | fi | |
6389 | fi | |
6390 | ||
6391 | # next check in private source directory | |
6392 | # | |
6393 | # since ls returns lowest version numbers first, reverse its output | |
6394 | if test x"${ac_cv_c_tclh}" = x ; then | |
6395 | for i in \ | |
6396 | ${srcdir}/../tcl \ | |
6397 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
6398 | ${srcdir}/../../tcl \ | |
6399 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
6400 | ${srcdir}/../../../tcl \ | |
6401 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
6402 | if test -f $i/generic/tclInt.h ; then | |
6403 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6404 | break | |
6405 | fi | |
6406 | done | |
6407 | fi | |
6408 | # finally check in a few common install locations | |
6409 | # | |
6410 | # since ls returns lowest version numbers first, reverse its output | |
6411 | if test x"${ac_cv_c_tclh}" = x ; then | |
6412 | for i in \ | |
6413 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
6414 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
6415 | /usr/local/src/tcl \ | |
6416 | /usr/local/lib/tcl \ | |
6417 | ${prefix}/include ; do | |
6418 | if test -f $i/generic/tclInt.h ; then | |
6419 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6420 | break | |
6421 | fi | |
6422 | done | |
6423 | fi | |
6424 | # see if one is installed | |
6425 | if test x"${ac_cv_c_tclh}" = x ; then | |
6426 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
6427 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
422ea4b8 | 6428 | echo "configure:6429: checking for tclInt.h" >&5 |
3fc11d3e JM |
6429 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6430 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6431 | else | |
6432 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 6433 | #line 6434 "configure" |
3fc11d3e JM |
6434 | #include "confdefs.h" |
6435 | #include <tclInt.h> | |
6436 | EOF | |
6437 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 6438 | { (eval echo configure:6439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6439 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6440 | if test -z "$ac_err"; then | |
6441 | rm -rf conftest* | |
6442 | eval "ac_cv_header_$ac_safe=yes" | |
6443 | else | |
6444 | echo "$ac_err" >&5 | |
6445 | echo "configure: failed program was:" >&5 | |
6446 | cat conftest.$ac_ext >&5 | |
6447 | rm -rf conftest* | |
6448 | eval "ac_cv_header_$ac_safe=no" | |
6449 | fi | |
6450 | rm -f conftest* | |
6451 | fi | |
6452 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6453 | echo "$ac_t""yes" 1>&6 | |
6454 | ac_cv_c_tclh=installed | |
6455 | else | |
6456 | echo "$ac_t""no" 1>&6 | |
6457 | ac_cv_c_tclh="" | |
6458 | fi | |
6459 | ||
6460 | fi | |
6461 | ||
6462 | fi | |
6463 | ||
6464 | if test x"${ac_cv_c_tclh}" = x ; then | |
6465 | TCLHDIR="# no Tcl private headers found" | |
6466 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
6467 | fi | |
6468 | if test x"${ac_cv_c_tclh}" != x ; then | |
6469 | no_tcl="" | |
6470 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
6471 | echo "$ac_t""is installed" 1>&6 | |
6472 | TCLHDIR="" | |
6473 | else | |
6474 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
6475 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
6476 | TCLHDIR="-I${ac_cv_c_tclh}" | |
6477 | fi | |
6478 | fi | |
6479 | ||
6480 | ||
6481 | ||
6482 | ||
6483 | # | |
6484 | # Ok, lets find the tk source trees so we can use the headers | |
6485 | # If the directory (presumably symlink) named "tk" exists, use that one | |
6486 | # in preference to any others. Same logic is used when choosing library | |
6487 | # and again with Tcl. The search order is the best place to look first, then in | |
6488 | # decreasing significance. The loop breaks if the trigger file is found. | |
6489 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
6490 | # directory. This converts the path from a relative to an absolute, so | |
6491 | # recursive cache variables for the path will work right. We check all | |
6492 | # the possible paths in one loop rather than many seperate loops to speed | |
6493 | # things up. | |
6494 | # the alternative search directory is involked by --with-tkinclude | |
6495 | # | |
6496 | no_tk=true | |
6497 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
422ea4b8 | 6498 | echo "configure:6499: checking for Tk private headers" >&5 |
3fc11d3e JM |
6499 | # Check whether --with-tkinclude or --without-tkinclude was given. |
6500 | if test "${with_tkinclude+set}" = set; then | |
6501 | withval="$with_tkinclude" | |
6502 | with_tkinclude=${withval} | |
6503 | fi | |
6504 | ||
6505 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
6506 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6507 | else | |
6508 | ||
6509 | # first check to see if --with-tkinclude was specified | |
6510 | if test x"${with_tkinclude}" != x ; then | |
6511 | if test -f ${with_tkinclude}/tk.h ; then | |
6512 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
6513 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
6514 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
6515 | else | |
6516 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6517 | fi | |
6518 | fi | |
6519 | ||
6520 | # next check if it came with Tk configuration file | |
6521 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6522 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
6523 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
6524 | fi | |
6525 | fi | |
6526 | ||
6527 | # next check in private source directory | |
6528 | # | |
6529 | # since ls returns lowest version numbers first, reverse its output | |
6530 | if test x"${ac_cv_c_tkh}" = x ; then | |
6531 | for i in \ | |
6532 | ${srcdir}/../tk \ | |
6533 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
6534 | ${srcdir}/../../tk \ | |
6535 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
6536 | ${srcdir}/../../../tk \ | |
6537 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
6538 | if test -f $i/generic/tk.h ; then | |
6539 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6540 | break | |
6541 | fi | |
6542 | done | |
6543 | fi | |
6544 | # finally check in a few common install locations | |
6545 | # | |
6546 | # since ls returns lowest version numbers first, reverse its output | |
6547 | if test x"${ac_cv_c_tkh}" = x ; then | |
6548 | for i in \ | |
6549 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
6550 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
6551 | /usr/local/src/tk \ | |
6552 | /usr/local/lib/tk \ | |
6553 | ${prefix}/include ; do | |
6554 | if test -f $i/generic/tk.h ; then | |
6555 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6556 | break | |
6557 | fi | |
6558 | done | |
6559 | fi | |
6560 | # see if one is installed | |
6561 | if test x"${ac_cv_c_tkh}" = x ; then | |
6562 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
6563 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
422ea4b8 | 6564 | echo "configure:6565: checking for tk.h" >&5 |
3fc11d3e JM |
6565 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6566 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6567 | else | |
6568 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 6569 | #line 6570 "configure" |
3fc11d3e JM |
6570 | #include "confdefs.h" |
6571 | #include <tk.h> | |
6572 | EOF | |
6573 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 6574 | { (eval echo configure:6575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6575 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6576 | if test -z "$ac_err"; then | |
6577 | rm -rf conftest* | |
6578 | eval "ac_cv_header_$ac_safe=yes" | |
6579 | else | |
6580 | echo "$ac_err" >&5 | |
6581 | echo "configure: failed program was:" >&5 | |
6582 | cat conftest.$ac_ext >&5 | |
6583 | rm -rf conftest* | |
6584 | eval "ac_cv_header_$ac_safe=no" | |
6585 | fi | |
6586 | rm -f conftest* | |
6587 | fi | |
6588 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6589 | echo "$ac_t""yes" 1>&6 | |
6590 | ac_cv_c_tkh=installed | |
6591 | else | |
6592 | echo "$ac_t""no" 1>&6 | |
6593 | ac_cv_c_tkh="" | |
6594 | fi | |
6595 | ||
6596 | fi | |
6597 | ||
6598 | fi | |
6599 | ||
6600 | if test x"${ac_cv_c_tkh}" != x ; then | |
6601 | no_tk="" | |
6602 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
6603 | echo "$ac_t""is installed" 1>&6 | |
6604 | TKHDIR="" | |
6605 | else | |
6606 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
6607 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
6608 | TKHDIR="-I${ac_cv_c_tkh}" | |
6609 | fi | |
6610 | else | |
6611 | TKHDIR="# no Tk directory found" | |
6612 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
6613 | no_tk=true | |
6614 | fi | |
6615 | ||
6616 | ||
6617 | ||
6618 | ||
6619 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
422ea4b8 | 6620 | echo "configure:6621: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6621 | if test x"${ac_cv_c_itclh}" = x ; then |
6622 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
6623 | if test -f $i/generic/itcl.h ; then | |
6624 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
6625 | break | |
6626 | fi | |
6627 | done | |
6628 | fi | |
6629 | if test x"${ac_cv_c_itclh}" = x ; then | |
6630 | ITCLHDIR="# no Itcl private headers found" | |
6631 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
6632 | fi | |
6633 | if test x"${ac_cv_c_itclh}" != x ; then | |
6634 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
6635 | fi | |
6636 | # should always be here | |
6637 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
6638 | ||
6639 | #AC_SUBST(ITCLLIB) | |
6640 | ||
6641 | ||
6642 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
422ea4b8 | 6643 | echo "configure:6644: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6644 | if test x"${ac_cv_c_itkh}" = x ; then |
6645 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
6646 | if test -f $i/generic/itk.h ; then | |
6647 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
6648 | break | |
6649 | fi | |
6650 | done | |
6651 | fi | |
6652 | if test x"${ac_cv_c_itkh}" = x ; then | |
6653 | ITKHDIR="# no Itk private headers found" | |
6654 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
6655 | fi | |
6656 | if test x"${ac_cv_c_itkh}" != x ; then | |
6657 | ITKHDIR="-I${ac_cv_c_itkh}" | |
6658 | fi | |
6659 | # should always be here | |
6660 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
6661 | ||
6662 | #AC_SUBST(ITKLIB) | |
6663 | ||
6664 | ||
6665 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
422ea4b8 | 6666 | echo "configure:6667: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6667 | if test x"${ac_cv_c_tixh}" = x ; then |
6668 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
6669 | if test -f $i/generic/tix.h ; then | |
6670 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
6671 | break | |
6672 | fi | |
6673 | done | |
6674 | fi | |
6675 | if test x"${ac_cv_c_tixh}" = x ; then | |
6676 | TIXHDIR="# no Tix private headers found" | |
6677 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
6678 | fi | |
6679 | if test x"${ac_cv_c_tixh}" != x ; then | |
6680 | TIXHDIR="-I${ac_cv_c_tixh}" | |
6681 | fi | |
6682 | ||
6683 | ||
6684 | ||
6685 | # now look for Itcl library stuff | |
6686 | ||
6687 | ||
6688 | # | |
6689 | # Ok, lets find the itcl configuration | |
6690 | # First, look for one uninstalled. | |
6691 | # the alternative search directory is invoked by --with-itclconfig | |
6692 | # | |
6693 | ||
6694 | if test x"${no_itcl}" = x ; then | |
6695 | # we reset no_itcl in case something fails here | |
6696 | no_itcl=true | |
6697 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
6698 | if test "${with_itclconfig+set}" = set; then | |
6699 | withval="$with_itclconfig" | |
6700 | with_itclconfig=${withval} | |
6701 | fi | |
6702 | ||
6703 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
422ea4b8 | 6704 | echo "configure:6705: checking for Itcl configuration" >&5 |
3fc11d3e JM |
6705 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
6706 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6707 | else | |
6708 | ||
6709 | ||
6710 | # First check to see if --with-itclconfig was specified. | |
6711 | if test x"${with_itclconfig}" != x ; then | |
6712 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
6713 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
6714 | else | |
6715 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
6716 | fi | |
6717 | fi | |
6718 | ||
6719 | # then check for a private Itcl library | |
6720 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6721 | for i in \ | |
6722 | ../itcl/itcl \ | |
6723 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
6724 | ../../itcl \ | |
6725 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
6726 | ../../../itcl \ | |
6727 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6728 | if test -f "$i/itclConfig.sh" ; then | |
6729 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6730 | break | |
6731 | fi | |
6732 | done | |
6733 | fi | |
6734 | # check in a few common install locations | |
6735 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6736 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6737 | if test -f "$i/itclConfig.sh" ; then | |
6738 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6739 | break | |
6740 | fi | |
6741 | done | |
6742 | fi | |
6743 | # check in a few other private locations | |
6744 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6745 | for i in \ | |
6746 | ${srcdir}/../itcl/itcl \ | |
6747 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 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 | ||
6755 | fi | |
6756 | ||
6757 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6758 | ITCLCONFIG="# no Itcl configs found" | |
6759 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
6760 | else | |
6761 | no_itcl= | |
6762 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
6763 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
6764 | fi | |
6765 | fi | |
6766 | ||
6767 | if test -z "${no_itcl}"; then | |
6768 | ||
6769 | if test -f "$ITCLCONFIG" ; then | |
6770 | . $ITCLCONFIG | |
6771 | fi | |
6772 | ||
6773 | ||
6774 | ||
6775 | ||
6776 | ||
6777 | ||
6778 | ||
6779 | ||
6780 | ||
6781 | ||
6782 | ||
6783 | case "${host}" in | |
6784 | *-*-cygwin*) | |
6785 | itcldir=../itcl/itcl/win/ | |
6786 | ;; | |
6787 | *) | |
6788 | itcldir=../itcl/itcl/unix/ | |
6789 | ;; | |
6790 | esac | |
6791 | ||
6792 | ||
6793 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
6794 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
6795 | fi | |
6796 | ||
6797 | ||
6798 | # now look for Itk library stuff | |
6799 | ||
6800 | # | |
6801 | # Ok, lets find the itk configuration | |
6802 | # First, look for one uninstalled. | |
6803 | # the alternative search directory is invoked by --with-itkconfig | |
6804 | # | |
6805 | ||
6806 | if test x"${no_itk}" = x ; then | |
6807 | # we reset no_itk in case something fails here | |
6808 | no_itk=true | |
6809 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
6810 | if test "${with_itkconfig+set}" = set; then | |
6811 | withval="$with_itkconfig" | |
6812 | with_itkconfig=${withval} | |
6813 | fi | |
6814 | ||
6815 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
422ea4b8 | 6816 | echo "configure:6817: checking for Itk configuration" >&5 |
3fc11d3e JM |
6817 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
6818 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6819 | else | |
6820 | ||
6821 | ||
6822 | # First check to see if --with-itkconfig was specified. | |
6823 | if test x"${with_itkconfig}" != x ; then | |
6824 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
6825 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
6826 | else | |
6827 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
6828 | fi | |
6829 | fi | |
6830 | ||
6831 | # then check for a private Itk library | |
6832 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6833 | for i in \ | |
6834 | ../itcl/itk \ | |
6835 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
6836 | ../../itk \ | |
6837 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
6838 | ../../../itk \ | |
6839 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
6840 | if test -f "$i/itkConfig.sh" ; then | |
6841 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6842 | break | |
6843 | fi | |
6844 | done | |
6845 | fi | |
6846 | # check in a few common install locations | |
6847 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6848 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6849 | if test -f "$i/itkConfig.sh" ; then | |
6850 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6851 | break | |
6852 | fi | |
6853 | done | |
6854 | fi | |
6855 | # check in a few other private locations | |
6856 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6857 | for i in \ | |
6858 | ${srcdir}/../itcl/itk \ | |
6859 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 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 | ||
6867 | fi | |
6868 | ||
6869 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6870 | ITKCONFIG="# no Itk configs found" | |
6871 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
6872 | else | |
6873 | no_itk= | |
6874 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
6875 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
6876 | fi | |
6877 | fi | |
6878 | ||
6879 | ||
6880 | if test -z "${no_itcl}"; then | |
6881 | ||
6882 | if test -f "$ITKCONFIG" ; then | |
6883 | . $ITKCONFIG | |
6884 | fi | |
6885 | ||
6886 | ||
6887 | ||
6888 | ||
6889 | ||
6890 | ||
6891 | ||
6892 | ||
6893 | ||
6894 | ||
6895 | ||
6896 | ||
6897 | case "${host}" in | |
6898 | *-*-cygwin*) | |
6899 | itkdir=../itcl/itk/win/ | |
6900 | ;; | |
6901 | *) | |
6902 | itkdir=../itcl/itk/unix/ | |
6903 | ;; | |
6904 | esac | |
6905 | ||
6906 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
6907 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
6908 | fi | |
6909 | ||
6910 | # now look for Tix library stuff | |
6911 | ||
6912 | # | |
6913 | # Ok, lets find the tix configuration | |
6914 | # First, look for one uninstalled. | |
6915 | # the alternative search directory is invoked by --with-itkconfig | |
6916 | # | |
6917 | ||
6918 | if test x"${no_tix}" = x ; then | |
6919 | # we reset no_tix in case something fails here | |
6920 | no_tix=true | |
6921 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
6922 | if test "${with_tixconfig+set}" = set; then | |
6923 | withval="$with_tixconfig" | |
6924 | with_tixconfig=${withval} | |
6925 | fi | |
6926 | ||
6927 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
422ea4b8 | 6928 | echo "configure:6929: checking for Tix configuration" >&5 |
3fc11d3e JM |
6929 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
6930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6931 | else | |
6932 | ||
6933 | ||
6934 | # First check to see if --with-tixconfig was specified. | |
6935 | if test x"${with_tixconfig}" != x ; then | |
6936 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
6937 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
6938 | else | |
6939 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
6940 | fi | |
6941 | fi | |
6942 | ||
6943 | # then check for a private Tix library | |
6944 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6945 | for i in \ | |
6946 | ../tix \ | |
6947 | `ls -dr ../tix 2>/dev/null` \ | |
6948 | ../../tix \ | |
6949 | `ls -dr ../../tix 2>/dev/null` \ | |
6950 | ../../../tix \ | |
6951 | `ls -dr ../../../tix 2>/dev/null` ; do | |
6952 | echo "**** Looking at $i - with ${configdir}" | |
6953 | if test -f "$i/tixConfig.sh" ; then | |
6954 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6955 | break | |
6956 | fi | |
6957 | done | |
6958 | fi | |
6959 | # check in a few common install locations | |
6960 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6961 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6962 | echo "**** Looking at $i" | |
6963 | if test -f "$i/tixConfig.sh" ; then | |
6964 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6965 | break | |
6966 | fi | |
6967 | done | |
6968 | fi | |
6969 | # check in a few other private locations | |
6970 | echo "**** Other private locations" | |
6971 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6972 | for i in \ | |
6973 | ${srcdir}/../tix \ | |
6974 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
6975 | echo "**** Looking at $i - with ${configdir}" | |
6976 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
6977 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
6978 | break | |
6979 | fi | |
6980 | done | |
6981 | fi | |
6982 | ||
6983 | fi | |
6984 | ||
6985 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6986 | TIXCONFIG="# no Tix configs found" | |
6987 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
6988 | else | |
6989 | no_tix= | |
6990 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
6991 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
6992 | fi | |
6993 | fi | |
6994 | ||
6995 | ||
6996 | if test -z "${no_tix}"; then | |
6997 | ||
6998 | if test -f "$TIXCONFIG" ; then | |
6999 | . $TIXCONFIG | |
7000 | fi | |
7001 | ||
7002 | ||
7003 | ||
7004 | ||
7005 | ||
7006 | ||
7007 | ||
7008 | ||
7009 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
7010 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
7011 | fi | |
7012 | ||
3fc11d3e JM |
7013 | ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK" |
7014 | # Tcl/Tk 8.1 require -fwritable strings. I don't | |
7015 | # know whether 8.2 will or not, but I bet it will. | |
7016 | # I don't have to worry about 7.x since we don't support it. | |
7017 | GDBTK_CFLAGS="" | |
7018 | if test "$GCC" = "yes"; then | |
7019 | if test "$TCL_VERSION" != "8.0" ; then | |
7020 | GDBTK_CFLAGS="-fwritable-strings" | |
7021 | fi | |
7022 | fi | |
7023 | ||
7024 | # Include some libraries that Tcl and Tk want. | |
7025 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
7026 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
7027 | # Yes, the ordering seems wrong here. But it isn't. | |
7028 | # TK_LIBS is the list of libraries that need to be linked | |
7029 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
7030 | # were in LIBS then any link tests after this point would | |
7031 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
7032 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
d45b9300 FN |
7033 | 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" |
7034 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o" | |
7035 | 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 |
7036 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
7037 | CONFIG_CLEAN="${CONFIG_ALL} \$(SUBDIR_GDBTK_CLEAN)" | |
e56ac5c3 AC |
7038 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
7039 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
7040 | |
7041 | if test x$gdb_cv_os_cygwin = xyes; then | |
7042 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
7043 | WIN32LDAPP="-Wl,--subsystem,console" | |
7044 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
7045 | fi | |
7046 | fi | |
7047 | fi | |
7048 | fi | |
7049 | ||
7050 | ||
7051 | ||
7052 | ||
7053 | ||
7054 | ||
7055 | ||
7056 | ||
7057 | ||
7058 | ||
7059 | ||
7060 | ||
7061 | ||
c906108c SS |
7062 | # If we find X, set shell vars x_includes and x_libraries to the |
7063 | # paths, otherwise set no_x=yes. | |
7064 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
7065 | # --without-x overrides everything else, but does not touch the cache. | |
7066 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
422ea4b8 | 7067 | echo "configure:7068: checking for X" >&5 |
c906108c SS |
7068 | |
7069 | # Check whether --with-x or --without-x was given. | |
7070 | if test "${with_x+set}" = set; then | |
7071 | withval="$with_x" | |
7072 | : | |
7073 | fi | |
7074 | ||
7075 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
7076 | if test "x$with_x" = xno; then | |
7077 | # The user explicitly disabled X. | |
7078 | have_x=disabled | |
7079 | else | |
7080 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
7081 | # Both variables are already set. | |
7082 | have_x=yes | |
7083 | else | |
7084 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
7085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7086 | else | |
7087 | # One or both of the vars are not set, and there is no cached value. | |
7088 | ac_x_includes=NO ac_x_libraries=NO | |
7089 | rm -fr conftestdir | |
7090 | if mkdir conftestdir; then | |
7091 | cd conftestdir | |
7092 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
7093 | cat > Imakefile <<'EOF' | |
7094 | acfindx: | |
7095 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
7096 | EOF | |
7097 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
7098 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
7099 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
7100 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
7101 | for ac_extension in a so sl; do | |
7102 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
7103 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
7104 | ac_im_usrlibdir=$ac_im_libdir; break | |
7105 | fi | |
7106 | done | |
7107 | # Screen out bogus values from the imake configuration. They are | |
7108 | # bogus both because they are the default anyway, and because | |
7109 | # using them would break gcc on systems where it needs fixed includes. | |
7110 | case "$ac_im_incroot" in | |
7111 | /usr/include) ;; | |
7112 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
7113 | esac | |
7114 | case "$ac_im_usrlibdir" in | |
7115 | /usr/lib | /lib) ;; | |
7116 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
7117 | esac | |
7118 | fi | |
7119 | cd .. | |
7120 | rm -fr conftestdir | |
7121 | fi | |
7122 | ||
7123 | if test "$ac_x_includes" = NO; then | |
7124 | # Guess where to find include files, by looking for this one X11 .h file. | |
7125 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
7126 | ||
7127 | # First, try using that file with no special directory specified. | |
7128 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 7129 | #line 7130 "configure" |
c906108c SS |
7130 | #include "confdefs.h" |
7131 | #include <$x_direct_test_include> | |
7132 | EOF | |
7133 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
422ea4b8 | 7134 | { (eval echo configure:7135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
7135 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7136 | if test -z "$ac_err"; then | |
7137 | rm -rf conftest* | |
7138 | # We can compile using X headers with no special include directory. | |
7139 | ac_x_includes= | |
7140 | else | |
7141 | echo "$ac_err" >&5 | |
7142 | echo "configure: failed program was:" >&5 | |
7143 | cat conftest.$ac_ext >&5 | |
7144 | rm -rf conftest* | |
7145 | # Look for the header file in a standard set of common directories. | |
7146 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7147 | for ac_dir in \ | |
7148 | /usr/X11/include \ | |
7149 | /usr/X11R6/include \ | |
7150 | /usr/X11R5/include \ | |
7151 | /usr/X11R4/include \ | |
7152 | \ | |
7153 | /usr/include/X11 \ | |
7154 | /usr/include/X11R6 \ | |
7155 | /usr/include/X11R5 \ | |
7156 | /usr/include/X11R4 \ | |
7157 | \ | |
7158 | /usr/local/X11/include \ | |
7159 | /usr/local/X11R6/include \ | |
7160 | /usr/local/X11R5/include \ | |
7161 | /usr/local/X11R4/include \ | |
7162 | \ | |
7163 | /usr/local/include/X11 \ | |
7164 | /usr/local/include/X11R6 \ | |
7165 | /usr/local/include/X11R5 \ | |
7166 | /usr/local/include/X11R4 \ | |
7167 | \ | |
7168 | /usr/X386/include \ | |
7169 | /usr/x386/include \ | |
7170 | /usr/XFree86/include/X11 \ | |
7171 | \ | |
7172 | /usr/include \ | |
7173 | /usr/local/include \ | |
7174 | /usr/unsupported/include \ | |
7175 | /usr/athena/include \ | |
7176 | /usr/local/x11r5/include \ | |
7177 | /usr/lpp/Xamples/include \ | |
7178 | \ | |
7179 | /usr/openwin/include \ | |
7180 | /usr/openwin/share/include \ | |
7181 | ; \ | |
7182 | do | |
7183 | if test -r "$ac_dir/$x_direct_test_include"; then | |
7184 | ac_x_includes=$ac_dir | |
7185 | break | |
7186 | fi | |
7187 | done | |
7188 | fi | |
7189 | rm -f conftest* | |
7190 | fi # $ac_x_includes = NO | |
7191 | ||
7192 | if test "$ac_x_libraries" = NO; then | |
7193 | # Check for the libraries. | |
7194 | ||
7195 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
7196 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
7197 | ||
7198 | # See if we find them without any special options. | |
7199 | # Don't add to $LIBS permanently. | |
7200 | ac_save_LIBS="$LIBS" | |
7201 | LIBS="-l$x_direct_test_library $LIBS" | |
7202 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 7203 | #line 7204 "configure" |
c906108c SS |
7204 | #include "confdefs.h" |
7205 | ||
7206 | int main() { | |
7207 | ${x_direct_test_function}() | |
7208 | ; return 0; } | |
7209 | EOF | |
422ea4b8 | 7210 | if { (eval echo configure:7211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7211 | rm -rf conftest* |
7212 | LIBS="$ac_save_LIBS" | |
7213 | # We can link X programs with no special library path. | |
7214 | ac_x_libraries= | |
7215 | else | |
7216 | echo "configure: failed program was:" >&5 | |
7217 | cat conftest.$ac_ext >&5 | |
7218 | rm -rf conftest* | |
7219 | LIBS="$ac_save_LIBS" | |
7220 | # First see if replacing the include by lib works. | |
7221 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7222 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
7223 | /usr/X11/lib \ | |
7224 | /usr/X11R6/lib \ | |
7225 | /usr/X11R5/lib \ | |
7226 | /usr/X11R4/lib \ | |
7227 | \ | |
7228 | /usr/lib/X11 \ | |
7229 | /usr/lib/X11R6 \ | |
7230 | /usr/lib/X11R5 \ | |
7231 | /usr/lib/X11R4 \ | |
7232 | \ | |
7233 | /usr/local/X11/lib \ | |
7234 | /usr/local/X11R6/lib \ | |
7235 | /usr/local/X11R5/lib \ | |
7236 | /usr/local/X11R4/lib \ | |
7237 | \ | |
7238 | /usr/local/lib/X11 \ | |
7239 | /usr/local/lib/X11R6 \ | |
7240 | /usr/local/lib/X11R5 \ | |
7241 | /usr/local/lib/X11R4 \ | |
7242 | \ | |
7243 | /usr/X386/lib \ | |
7244 | /usr/x386/lib \ | |
7245 | /usr/XFree86/lib/X11 \ | |
7246 | \ | |
7247 | /usr/lib \ | |
7248 | /usr/local/lib \ | |
7249 | /usr/unsupported/lib \ | |
7250 | /usr/athena/lib \ | |
7251 | /usr/local/x11r5/lib \ | |
7252 | /usr/lpp/Xamples/lib \ | |
7253 | /lib/usr/lib/X11 \ | |
7254 | \ | |
7255 | /usr/openwin/lib \ | |
7256 | /usr/openwin/share/lib \ | |
7257 | ; \ | |
7258 | do | |
7259 | for ac_extension in a so sl; do | |
7260 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
7261 | ac_x_libraries=$ac_dir | |
7262 | break 2 | |
7263 | fi | |
7264 | done | |
7265 | done | |
7266 | fi | |
7267 | rm -f conftest* | |
7268 | fi # $ac_x_libraries = NO | |
7269 | ||
7270 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
7271 | # Didn't find X anywhere. Cache the known absence of X. | |
7272 | ac_cv_have_x="have_x=no" | |
7273 | else | |
7274 | # Record where we found X for the cache. | |
7275 | ac_cv_have_x="have_x=yes \ | |
7276 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
7277 | fi | |
7278 | fi | |
7279 | fi | |
7280 | eval "$ac_cv_have_x" | |
7281 | fi # $with_x != no | |
7282 | ||
7283 | if test "$have_x" != yes; then | |
7284 | echo "$ac_t""$have_x" 1>&6 | |
7285 | no_x=yes | |
7286 | else | |
7287 | # If each of the values was on the command line, it overrides each guess. | |
7288 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
7289 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
7290 | # Update the cache value to reflect the command line values. | |
7291 | ac_cv_have_x="have_x=yes \ | |
7292 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
7293 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
7294 | fi | |
7295 | ||
7296 | ||
7a292a7a SS |
7297 | |
7298 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
7299 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
7300 | # This code just checks for a few cases where we'd like to ignore those | |
7301 | # definitions, even when they're present in the '.mt' file. These cases | |
7302 | # are when --disable-sim is specified, or if the simulator directory is | |
7303 | # not part of the soruce tree. | |
7304 | # | |
7305 | # Check whether --enable-sim or --disable-sim was given. | |
7306 | if test "${enable_sim+set}" = set; then | |
7307 | enableval="$enable_sim" | |
7308 | echo "enable_sim = $enable_sim"; | |
7309 | echo "enableval = ${enableval}"; | |
7310 | case "${enableval}" in | |
7311 | yes) ignore_sim=false ;; | |
7312 | no) ignore_sim=true ;; | |
7313 | *) ignore_sim=false ;; | |
7314 | esac | |
7315 | else | |
7316 | ignore_sim=false | |
7317 | fi | |
7318 | ||
7319 | ||
7320 | if test ! -d "${srcdir}/../sim"; then | |
7321 | ignore_sim=true | |
7322 | fi | |
7323 | ||
7324 | if test "${ignore_sim}" = "true"; then | |
7325 | IGNORE_SIM="SIM=" | |
7326 | IGNORE_SIM_OBS="SIM_OBS=" | |
7327 | else | |
7328 | IGNORE_SIM="" | |
7329 | IGNORE_SIM_OBS="" | |
7330 | cat >> confdefs.h <<\EOF | |
7331 | #define WITH_SIM 1 | |
7332 | EOF | |
7333 | ||
7334 | fi | |
7335 | ||
7336 | ||
7337 | ||
c906108c SS |
7338 | |
7339 | ||
7340 | ||
7341 | ||
7342 | ||
7343 | ||
dfcd3bfb | 7344 | |
e56ac5c3 AC |
7345 | |
7346 | ||
b3a90332 AC |
7347 | |
7348 | ||
c906108c SS |
7349 | # Begin stuff to support --enable-shared |
7350 | # Check whether --enable-shared or --disable-shared was given. | |
7351 | if test "${enable_shared+set}" = set; then | |
7352 | enableval="$enable_shared" | |
7353 | case "${enableval}" in | |
7354 | yes) shared=true ;; | |
7355 | no) shared=false ;; | |
7356 | *) shared=true ;; | |
7357 | esac | |
7358 | fi | |
7359 | ||
7360 | HLDFLAGS= | |
7361 | HLDENV= | |
7362 | # If we have shared libraries, try to set rpath reasonably. | |
7363 | if test "${shared}" = "true"; then | |
7364 | case "${host}" in | |
7365 | *-*-hpux*) | |
7366 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
7367 | ;; | |
7368 | *-*-irix5* | *-*-irix6*) | |
7369 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
7370 | ;; | |
7371 | *-*-linux*aout*) | |
7372 | ;; | |
88987551 | 7373 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
7374 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
7375 | ;; | |
7376 | *-*-solaris*) | |
7377 | HLDFLAGS='-R $(libdir)' | |
7378 | ;; | |
7379 | *-*-sysv4*) | |
7380 | 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;' | |
7381 | ;; | |
7382 | esac | |
7383 | fi | |
7384 | ||
7385 | # On SunOS, if the linker supports the -rpath option, use it to | |
7386 | # prevent ../bfd and ../opcodes from being included in the run time | |
7387 | # search path. | |
7388 | case "${host}" in | |
7389 | *-*-sunos*) | |
7390 | echo 'main () { }' > conftest.c | |
7391 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
7392 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
7393 | : | |
7394 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
7395 | : | |
7396 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
7397 | : | |
7398 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
7399 | : | |
7400 | elif test "${shared}" = "true"; then | |
7401 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
7402 | else | |
7403 | HLDFLAGS='-Wl,-rpath=' | |
7404 | fi | |
7405 | rm -f conftest.t conftest.c conftest | |
7406 | ;; | |
7407 | esac | |
7408 | ||
7409 | ||
7410 | # End stuff to support --enable-shared | |
7411 | ||
7412 | # target_subdir is used by the testsuite to find the target libraries. | |
7413 | target_subdir= | |
7414 | if test "${host}" != "${target}"; then | |
7415 | target_subdir="${target_alias}/" | |
7416 | fi | |
7417 | ||
7418 | ||
7419 | frags= | |
7420 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
7421 | if test ! -f ${host_makefile_frag}; then | |
7422 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
7423 | fi | |
7424 | frags="$frags $host_makefile_frag" | |
7425 | ||
7426 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
7427 | if test ! -f ${target_makefile_frag}; then | |
7428 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
7429 | fi | |
7430 | frags="$frags $target_makefile_frag" | |
7431 | ||
7432 | ||
7433 | ||
7434 | ||
7435 | ||
7436 | hostfile=`sed -n ' | |
7437 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7438 | ' ${host_makefile_frag}` | |
7439 | ||
7440 | targetfile=`sed -n ' | |
7441 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7442 | ' ${target_makefile_frag}` | |
7443 | ||
7444 | # these really aren't orthogonal true/false values of the same condition, | |
7445 | # but shells are slow enough that I like to reuse the test conditions | |
7446 | # whenever possible | |
7447 | if test "${target}" = "${host}"; then | |
7448 | nativefile=`sed -n ' | |
7449 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7450 | ' ${host_makefile_frag}` | |
7451 | # else | |
7452 | # GDBserver is only useful in a "native" enviroment | |
7453 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
7454 | fi | |
7455 | ||
7456 | ||
96baa820 JM |
7457 | SUBDIRS="doc testsuite nlm" |
7458 | if test "${enable_multi_ice}" = "yes"; then | |
7459 | SUBDIRS="${SUBDIRS} multi-ice" | |
7460 | fi | |
7461 | ||
7462 | ||
7463 | ||
c906108c SS |
7464 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
7465 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
7466 | # corresponding links. But we have to remove the xm.h files and tm.h | |
7467 | # files anyway, e.g. when switching from "configure host" to | |
7468 | # "configure none". | |
7469 | ||
7470 | files= | |
7471 | links= | |
7472 | rm -f xm.h | |
7473 | if test "${hostfile}" != ""; then | |
7474 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
7475 | links="${links} xm.h" | |
7476 | fi | |
7477 | rm -f tm.h | |
7478 | if test "${targetfile}" != ""; then | |
7479 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
7480 | links="${links} tm.h" | |
7481 | fi | |
7482 | rm -f nm.h | |
7483 | if test "${nativefile}" != ""; then | |
7484 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
7485 | links="${links} nm.h" | |
7486 | else | |
7487 | # A cross-only configuration. | |
7488 | files="${files} config/nm-empty.h" | |
7489 | links="${links} nm.h" | |
7490 | fi | |
3fc11d3e | 7491 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
422ea4b8 | 7492 | echo "configure:7493: checking whether ln -s works" >&5 |
3fc11d3e JM |
7493 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
7494 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7495 | else | |
7496 | rm -f conftestdata | |
7497 | if ln -s X conftestdata 2>/dev/null | |
7498 | then | |
7499 | rm -f conftestdata | |
7500 | ac_cv_prog_LN_S="ln -s" | |
7501 | else | |
7502 | ac_cv_prog_LN_S=ln | |
7503 | fi | |
7504 | fi | |
7505 | LN_S="$ac_cv_prog_LN_S" | |
7506 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
7507 | echo "$ac_t""yes" 1>&6 | |
7508 | else | |
7509 | echo "$ac_t""no" 1>&6 | |
7510 | fi | |
7511 | ||
c906108c SS |
7512 | |
7513 | ||
7514 | ||
7515 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
422ea4b8 | 7516 | echo "configure:7517: checking for Cygwin environment" >&5 |
c906108c SS |
7517 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
7518 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7519 | else | |
7520 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 7521 | #line 7522 "configure" |
c906108c SS |
7522 | #include "confdefs.h" |
7523 | ||
7524 | int main() { | |
7525 | ||
7526 | #ifndef __CYGWIN__ | |
7527 | #define __CYGWIN__ __CYGWIN32__ | |
7528 | #endif | |
7529 | return __CYGWIN__; | |
7530 | ; return 0; } | |
7531 | EOF | |
422ea4b8 | 7532 | if { (eval echo configure:7533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7533 | rm -rf conftest* |
7534 | ac_cv_cygwin=yes | |
7535 | else | |
7536 | echo "configure: failed program was:" >&5 | |
7537 | cat conftest.$ac_ext >&5 | |
7538 | rm -rf conftest* | |
7539 | ac_cv_cygwin=no | |
7540 | fi | |
7541 | rm -f conftest* | |
7542 | rm -f conftest* | |
7543 | fi | |
7544 | ||
7545 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
7546 | CYGWIN= | |
7547 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
7548 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
422ea4b8 | 7549 | echo "configure:7550: checking for mingw32 environment" >&5 |
c906108c SS |
7550 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
7551 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7552 | else | |
7553 | cat > conftest.$ac_ext <<EOF | |
422ea4b8 | 7554 | #line 7555 "configure" |
c906108c SS |
7555 | #include "confdefs.h" |
7556 | ||
7557 | int main() { | |
7558 | return __MINGW32__; | |
7559 | ; return 0; } | |
7560 | EOF | |
422ea4b8 | 7561 | if { (eval echo configure:7562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7562 | rm -rf conftest* |
7563 | ac_cv_mingw32=yes | |
7564 | else | |
7565 | echo "configure: failed program was:" >&5 | |
7566 | cat conftest.$ac_ext >&5 | |
7567 | rm -rf conftest* | |
7568 | ac_cv_mingw32=no | |
7569 | fi | |
7570 | rm -f conftest* | |
7571 | rm -f conftest* | |
7572 | fi | |
7573 | ||
7574 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
7575 | MINGW32= | |
7576 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
7577 | ||
7578 | ||
7579 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
422ea4b8 | 7580 | echo "configure:7581: checking for executable suffix" >&5 |
c906108c SS |
7581 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
7582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7583 | else | |
7584 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
7585 | ac_cv_exeext=.exe | |
7586 | else | |
7587 | rm -f conftest* | |
7588 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
7589 | ac_cv_exeext= | |
422ea4b8 | 7590 | if { (eval echo configure:7591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
7591 | for file in conftest.*; do |
7592 | case $file in | |
422ea4b8 | 7593 | *.c | *.o | *.obj) ;; |
c906108c SS |
7594 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
7595 | esac | |
7596 | done | |
7597 | else | |
7598 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
7599 | fi | |
7600 | rm -f conftest* | |
7601 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
7602 | fi | |
7603 | fi | |
7604 | ||
7605 | EXEEXT="" | |
7606 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
7607 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
7608 | ac_exeext=$EXEEXT | |
7609 | ||
7610 | ||
7611 | subdirs="$configdirs" | |
7612 | ||
7613 | trap '' 1 2 15 | |
7614 | cat > confcache <<\EOF | |
7615 | # This file is a shell script that caches the results of configure | |
7616 | # tests run on this system so they can be shared between configure | |
7617 | # scripts and configure runs. It is not useful on other systems. | |
7618 | # If it contains results you don't want to keep, you may remove or edit it. | |
7619 | # | |
7620 | # By default, configure uses ./config.cache as the cache file, | |
7621 | # creating it if it does not exist already. You can give configure | |
7622 | # the --cache-file=FILE option to use a different cache file; that is | |
7623 | # what configure does when it calls configure scripts in | |
7624 | # subdirectories, so they share the cache. | |
7625 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7626 | # config.status only pays attention to the cache file if you give it the | |
7627 | # --recheck option to rerun configure. | |
7628 | # | |
7629 | EOF | |
7630 | # The following way of writing the cache mishandles newlines in values, | |
7631 | # but we know of no workaround that is simple, portable, and efficient. | |
7632 | # So, don't put newlines in cache variables' values. | |
7633 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7634 | # and sets the high bit in the cache file unless we assign to the vars. | |
7635 | (set) 2>&1 | | |
7636 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
7637 | *ac_space=\ *) | |
7638 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7639 | # turns \\\\ into \\, and sed turns \\ into \). | |
7640 | sed -n \ | |
7641 | -e "s/'/'\\\\''/g" \ | |
7642 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7643 | ;; | |
7644 | *) | |
7645 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7646 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7647 | ;; | |
7648 | esac >> confcache | |
7649 | if cmp -s $cache_file confcache; then | |
7650 | : | |
7651 | else | |
7652 | if test -w $cache_file; then | |
7653 | echo "updating cache $cache_file" | |
7654 | cat confcache > $cache_file | |
7655 | else | |
7656 | echo "not updating unwritable cache $cache_file" | |
7657 | fi | |
7658 | fi | |
7659 | rm -f confcache | |
7660 | ||
7661 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7662 | ||
7663 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7664 | # Let make expand exec_prefix. | |
7665 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7666 | ||
7667 | # Any assignment to VPATH causes Sun make to only execute | |
7668 | # the first set of double-colon rules, so remove it if not needed. | |
7669 | # If there is a colon in the path, we need to keep it. | |
7670 | if test "x$srcdir" = x.; then | |
7671 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7672 | fi | |
7673 | ||
7674 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7675 | ||
7676 | DEFS=-DHAVE_CONFIG_H | |
7677 | ||
7678 | # Without the "./", some shells look in PATH for config.status. | |
7679 | : ${CONFIG_STATUS=./config.status} | |
7680 | ||
7681 | echo creating $CONFIG_STATUS | |
7682 | rm -f $CONFIG_STATUS | |
7683 | cat > $CONFIG_STATUS <<EOF | |
7684 | #! /bin/sh | |
7685 | # Generated automatically by configure. | |
7686 | # Run this file to recreate the current configuration. | |
7687 | # This directory was configured as follows, | |
7688 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7689 | # | |
7690 | # $0 $ac_configure_args | |
7691 | # | |
7692 | # Compiler output produced by configure, useful for debugging | |
7693 | # configure, is in ./config.log if it exists. | |
7694 | ||
7695 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
7696 | for ac_option | |
7697 | do | |
7698 | case "\$ac_option" in | |
7699 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7700 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7701 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7702 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
7703 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
7704 | exit 0 ;; | |
7705 | -help | --help | --hel | --he | --h) | |
7706 | echo "\$ac_cs_usage"; exit 0 ;; | |
7707 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
7708 | esac | |
7709 | done | |
7710 | ||
7711 | ac_given_srcdir=$srcdir | |
7712 | ac_given_INSTALL="$INSTALL" | |
7713 | ||
ed952ac5 | 7714 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
7715 | EOF |
7716 | cat >> $CONFIG_STATUS <<EOF | |
7717 | ||
7718 | # Protect against being on the right side of a sed subst in config.status. | |
7719 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7720 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7721 | $ac_vpsub | |
7722 | $extrasub | |
7723 | s%@SHELL@%$SHELL%g | |
7724 | s%@CFLAGS@%$CFLAGS%g | |
7725 | s%@CPPFLAGS@%$CPPFLAGS%g | |
7726 | s%@CXXFLAGS@%$CXXFLAGS%g | |
7727 | s%@FFLAGS@%$FFLAGS%g | |
7728 | s%@DEFS@%$DEFS%g | |
7729 | s%@LDFLAGS@%$LDFLAGS%g | |
7730 | s%@LIBS@%$LIBS%g | |
7731 | s%@exec_prefix@%$exec_prefix%g | |
7732 | s%@prefix@%$prefix%g | |
7733 | s%@program_transform_name@%$program_transform_name%g | |
7734 | s%@bindir@%$bindir%g | |
7735 | s%@sbindir@%$sbindir%g | |
7736 | s%@libexecdir@%$libexecdir%g | |
7737 | s%@datadir@%$datadir%g | |
7738 | s%@sysconfdir@%$sysconfdir%g | |
7739 | s%@sharedstatedir@%$sharedstatedir%g | |
7740 | s%@localstatedir@%$localstatedir%g | |
7741 | s%@libdir@%$libdir%g | |
7742 | s%@includedir@%$includedir%g | |
7743 | s%@oldincludedir@%$oldincludedir%g | |
7744 | s%@infodir@%$infodir%g | |
7745 | s%@mandir@%$mandir%g | |
413ccac7 AC |
7746 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
7747 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
7748 | s%@MAINT@%$MAINT%g | |
c906108c SS |
7749 | s%@CC@%$CC%g |
7750 | s%@CPP@%$CPP%g | |
7751 | s%@host@%$host%g | |
7752 | s%@host_alias@%$host_alias%g | |
7753 | s%@host_cpu@%$host_cpu%g | |
7754 | s%@host_vendor@%$host_vendor%g | |
7755 | s%@host_os@%$host_os%g | |
7756 | s%@target@%$target%g | |
7757 | s%@target_alias@%$target_alias%g | |
7758 | s%@target_cpu@%$target_cpu%g | |
7759 | s%@target_vendor@%$target_vendor%g | |
7760 | s%@target_os@%$target_os%g | |
7761 | s%@build@%$build%g | |
7762 | s%@build_alias@%$build_alias%g | |
7763 | s%@build_cpu@%$build_cpu%g | |
7764 | s%@build_vendor@%$build_vendor%g | |
7765 | s%@build_os@%$build_os%g | |
7766 | s%@SET_MAKE@%$SET_MAKE%g | |
7767 | s%@RANLIB@%$RANLIB%g | |
7768 | s%@ALLOCA@%$ALLOCA%g | |
7769 | s%@USE_NLS@%$USE_NLS%g | |
7770 | s%@MSGFMT@%$MSGFMT%g | |
7771 | s%@GMSGFMT@%$GMSGFMT%g | |
7772 | s%@XGETTEXT@%$XGETTEXT%g | |
7773 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
7774 | s%@CATALOGS@%$CATALOGS%g | |
7775 | s%@CATOBJEXT@%$CATOBJEXT%g | |
7776 | s%@DATADIRNAME@%$DATADIRNAME%g | |
7777 | s%@GMOFILES@%$GMOFILES%g | |
7778 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
7779 | s%@INTLDEPS@%$INTLDEPS%g | |
7780 | s%@INTLLIBS@%$INTLLIBS%g | |
7781 | s%@INTLOBJS@%$INTLOBJS%g | |
7782 | s%@POFILES@%$POFILES%g | |
7783 | s%@POSUB@%$POSUB%g | |
7784 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
7785 | s%@GT_NO@%$GT_NO%g | |
7786 | s%@GT_YES@%$GT_YES%g | |
7787 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
7788 | s%@l@%$l%g | |
7a292a7a | 7789 | s%@AWK@%$AWK%g |
c906108c SS |
7790 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
7791 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
7792 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
7793 | s%@AR@%$AR%g | |
95ca63c4 CF |
7794 | s%@DLLTOOL@%$DLLTOOL%g |
7795 | s%@WINDRES@%$WINDRES%g | |
c906108c | 7796 | s%@YACC@%$YACC%g |
75c6e08a | 7797 | s%@MIG@%$MIG%g |
c906108c | 7798 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
c906108c | 7799 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 7800 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
7801 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
7802 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 7803 | s%@REGEX@%$REGEX%g |
c906108c | 7804 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 7805 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
7806 | s%@LIBGUI@%$LIBGUI%g |
7807 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
7808 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
7809 | s%@TCL_VERSION@%$TCL_VERSION%g | |
7810 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
7811 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
7812 | s%@TCL_CC@%$TCL_CC%g | |
7813 | s%@TCL_DEFS@%$TCL_DEFS%g | |
7814 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
7815 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
7816 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
7817 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
7818 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
7819 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
7820 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
7821 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
7822 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
7823 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
7824 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
7825 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
7826 | s%@TK_VERSION@%$TK_VERSION%g | |
7827 | s%@TK_DEFS@%$TK_DEFS%g | |
7828 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
7829 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
7830 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
7831 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
7832 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
7833 | s%@TCLHDIR@%$TCLHDIR%g | |
7834 | s%@TKHDIR@%$TKHDIR%g | |
7835 | s%@ITCLHDIR@%$ITCLHDIR%g | |
7836 | s%@ITKHDIR@%$ITKHDIR%g | |
7837 | s%@TIXHDIR@%$TIXHDIR%g | |
7838 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
7839 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
7840 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
7841 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
7842 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
7843 | s%@ITK_VERSION@%$ITK_VERSION%g | |
7844 | s%@ITK_DEFS@%$ITK_DEFS%g | |
7845 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
7846 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
7847 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7848 | s%@TIX_VERSION@%$TIX_VERSION%g | |
7849 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
7850 | s%@X_CFLAGS@%$X_CFLAGS%g |
7851 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
7852 | s%@X_LIBS@%$X_LIBS%g | |
7853 | s%@ITCLLIB@%$ITCLLIB%g | |
7854 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
7855 | s%@ITKLIB@%$ITKLIB%g | |
7856 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7857 | s%@TIXLIB@%$TIXLIB%g | |
7858 | s%@TIX_DEPS@%$TIX_DEPS%g | |
7859 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
7860 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
7861 | s%@IGNORE_SIM@%$IGNORE_SIM%g | |
7862 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
7863 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
7864 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
7865 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
7866 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 7867 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
7868 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
7869 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
7870 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
7871 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
7872 | s%@HLDFLAGS@%$HLDFLAGS%g |
7873 | s%@HLDENV@%$HLDENV%g | |
7874 | s%@target_subdir@%$target_subdir%g | |
7875 | /@host_makefile_frag@/r $host_makefile_frag | |
7876 | s%@host_makefile_frag@%%g | |
7877 | /@target_makefile_frag@/r $target_makefile_frag | |
7878 | s%@target_makefile_frag@%%g | |
7879 | s%@frags@%$frags%g | |
96baa820 | 7880 | s%@SUBDIRS@%$SUBDIRS%g |
7a292a7a | 7881 | s%@LN_S@%$LN_S%g |
c906108c SS |
7882 | s%@EXEEXT@%$EXEEXT%g |
7883 | s%@subdirs@%$subdirs%g | |
7884 | ||
7885 | CEOF | |
7886 | EOF | |
7887 | ||
7888 | cat >> $CONFIG_STATUS <<\EOF | |
7889 | ||
7890 | # Split the substitutions into bite-sized pieces for seds with | |
7891 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
7892 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
7893 | ac_file=1 # Number of current file. | |
7894 | ac_beg=1 # First line for current file. | |
7895 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
7896 | ac_more_lines=: | |
7897 | ac_sed_cmds="" | |
7898 | while $ac_more_lines; do | |
7899 | if test $ac_beg -gt 1; then | |
7900 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
7901 | else | |
7902 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
7903 | fi | |
7904 | if test ! -s conftest.s$ac_file; then | |
7905 | ac_more_lines=false | |
7906 | rm -f conftest.s$ac_file | |
7907 | else | |
7908 | if test -z "$ac_sed_cmds"; then | |
7909 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
7910 | else | |
7911 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
7912 | fi | |
7913 | ac_file=`expr $ac_file + 1` | |
7914 | ac_beg=$ac_end | |
7915 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
7916 | fi | |
7917 | done | |
7918 | if test -z "$ac_sed_cmds"; then | |
7919 | ac_sed_cmds=cat | |
7920 | fi | |
7921 | EOF | |
7922 | ||
7923 | cat >> $CONFIG_STATUS <<EOF | |
7924 | ||
ed952ac5 | 7925 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
7926 | EOF |
7927 | cat >> $CONFIG_STATUS <<\EOF | |
7928 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
7929 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
7930 | case "$ac_file" in | |
7931 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7932 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7933 | *) ac_file_in="${ac_file}.in" ;; | |
7934 | esac | |
7935 | ||
7936 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
7937 | ||
7938 | # Remove last slash and all that follows it. Not all systems have dirname. | |
7939 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7940 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7941 | # The file is in a subdirectory. | |
7942 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
7943 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
7944 | # A "../" for each directory in $ac_dir_suffix. | |
7945 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
7946 | else | |
7947 | ac_dir_suffix= ac_dots= | |
7948 | fi | |
7949 | ||
7950 | case "$ac_given_srcdir" in | |
7951 | .) srcdir=. | |
7952 | if test -z "$ac_dots"; then top_srcdir=. | |
7953 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
7954 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
7955 | *) # Relative path. | |
7956 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
7957 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
7958 | esac | |
7959 | ||
7960 | case "$ac_given_INSTALL" in | |
7961 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
7962 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
7963 | esac | |
7964 | ||
7965 | echo creating "$ac_file" | |
7966 | rm -f "$ac_file" | |
7967 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
7968 | case "$ac_file" in | |
7969 | *Makefile*) ac_comsub="1i\\ | |
7970 | # $configure_input" ;; | |
7971 | *) ac_comsub= ;; | |
7972 | esac | |
7973 | ||
7974 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
7975 | sed -e "$ac_comsub | |
7976 | s%@configure_input@%$configure_input%g | |
7977 | s%@srcdir@%$srcdir%g | |
7978 | s%@top_srcdir@%$top_srcdir%g | |
7979 | s%@INSTALL@%$INSTALL%g | |
7980 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
7981 | fi; done | |
7982 | rm -f conftest.s* | |
7983 | ||
7984 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
7985 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
7986 | # | |
7987 | # ac_d sets the value in "#define NAME VALUE" lines. | |
7988 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
7989 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
7990 | ac_dC='\3' | |
7991 | ac_dD='%g' | |
7992 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
7993 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7994 | ac_uB='\([ ]\)%\1#\2define\3' | |
7995 | ac_uC=' ' | |
7996 | ac_uD='\4%g' | |
7997 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
7998 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7999 | ac_eB='$%\1#\2define\3' | |
8000 | ac_eC=' ' | |
8001 | ac_eD='%g' | |
8002 | ||
8003 | if test "${CONFIG_HEADERS+set}" != set; then | |
8004 | EOF | |
8005 | cat >> $CONFIG_STATUS <<EOF | |
8006 | CONFIG_HEADERS="config.h:config.in" | |
8007 | EOF | |
8008 | cat >> $CONFIG_STATUS <<\EOF | |
8009 | fi | |
8010 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8011 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8012 | case "$ac_file" in | |
8013 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8014 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8015 | *) ac_file_in="${ac_file}.in" ;; | |
8016 | esac | |
8017 | ||
8018 | echo creating $ac_file | |
8019 | ||
8020 | rm -f conftest.frag conftest.in conftest.out | |
8021 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8022 | cat $ac_file_inputs > conftest.in | |
8023 | ||
8024 | EOF | |
8025 | ||
8026 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8027 | # the proper values into config.h.in to produce config.h. And first: | |
8028 | # Protect against being on the right side of a sed subst in config.status. | |
8029 | # Protect against being in an unquoted here document in config.status. | |
8030 | rm -f conftest.vals | |
8031 | cat > conftest.hdr <<\EOF | |
8032 | s/[\\&%]/\\&/g | |
8033 | s%[\\$`]%\\&%g | |
8034 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8035 | s%ac_d%ac_u%gp | |
8036 | s%ac_u%ac_e%gp | |
8037 | EOF | |
8038 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8039 | rm -f conftest.hdr | |
8040 | ||
8041 | # This sed command replaces #undef with comments. This is necessary, for | |
8042 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8043 | # on some systems where configure will not decide to define it. | |
8044 | cat >> conftest.vals <<\EOF | |
8045 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8046 | EOF | |
8047 | ||
8048 | # Break up conftest.vals because some shells have a limit on | |
8049 | # the size of here documents, and old seds have small limits too. | |
8050 | ||
8051 | rm -f conftest.tail | |
8052 | while : | |
8053 | do | |
8054 | ac_lines=`grep -c . conftest.vals` | |
8055 | # grep -c gives empty output for an empty file on some AIX systems. | |
8056 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8057 | # Write a limited-size here document to conftest.frag. | |
8058 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8059 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8060 | echo 'CEOF | |
8061 | sed -f conftest.frag conftest.in > conftest.out | |
8062 | rm -f conftest.in | |
8063 | mv conftest.out conftest.in | |
8064 | ' >> $CONFIG_STATUS | |
8065 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8066 | rm -f conftest.vals | |
8067 | mv conftest.tail conftest.vals | |
8068 | done | |
8069 | rm -f conftest.vals | |
8070 | ||
8071 | cat >> $CONFIG_STATUS <<\EOF | |
8072 | rm -f conftest.frag conftest.h | |
8073 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8074 | cat conftest.in >> conftest.h | |
8075 | rm -f conftest.in | |
8076 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8077 | echo "$ac_file is unchanged" | |
8078 | rm -f conftest.h | |
8079 | else | |
8080 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8081 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8082 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8083 | # The file is in a subdirectory. | |
8084 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8085 | fi | |
8086 | rm -f $ac_file | |
8087 | mv conftest.h $ac_file | |
8088 | fi | |
8089 | fi; done | |
8090 | ||
8091 | EOF | |
8092 | ||
8093 | cat >> $CONFIG_STATUS <<EOF | |
8094 | ac_sources="$files" | |
8095 | ac_dests="$links" | |
8096 | EOF | |
8097 | ||
8098 | cat >> $CONFIG_STATUS <<\EOF | |
8099 | srcdir=$ac_given_srcdir | |
8100 | while test -n "$ac_sources"; do | |
8101 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
8102 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
8103 | ||
8104 | echo "linking $srcdir/$ac_source to $ac_dest" | |
8105 | ||
8106 | if test ! -r $srcdir/$ac_source; then | |
8107 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
8108 | fi | |
8109 | rm -f $ac_dest | |
8110 | ||
8111 | # Make relative symlinks. | |
8112 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8113 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
8114 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
8115 | # The dest file is in a subdirectory. | |
8116 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
8117 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
8118 | # A "../" for each directory in $ac_dest_dir_suffix. | |
8119 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
8120 | else | |
8121 | ac_dest_dir_suffix= ac_dots= | |
8122 | fi | |
8123 | ||
8124 | case "$srcdir" in | |
8125 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
8126 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
8127 | esac | |
8128 | ||
8129 | # Make a symlink if possible; otherwise try a hard link. | |
8130 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
8131 | ln $srcdir/$ac_source $ac_dest; then : | |
8132 | else | |
8133 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
8134 | fi | |
8135 | done | |
8136 | EOF | |
8137 | cat >> $CONFIG_STATUS <<EOF | |
8138 | ||
8139 | gdb_host_cpu=$gdb_host_cpu | |
8140 | gdb_target_cpu=$gdb_target_cpu | |
8141 | nativefile=$nativefile | |
8142 | ||
8143 | EOF | |
8144 | cat >> $CONFIG_STATUS <<\EOF | |
8145 | ||
8146 | if test "${nativefile}" = ""; then | |
8147 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ | |
8148 | < Makefile > Makefile.tem | |
8149 | mv -f Makefile.tem Makefile | |
8150 | fi | |
8151 | ||
8152 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
8153 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
8154 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
8155 | mv -f Makefile.tmp Makefile | |
8156 | ||
2acceee2 | 8157 | |
c906108c SS |
8158 | case x$CONFIG_HEADERS in |
8159 | xconfig.h:config.in) | |
8160 | echo > stamp-h ;; | |
8161 | esac | |
8162 | ||
8163 | exit 0 | |
8164 | EOF | |
8165 | chmod +x $CONFIG_STATUS | |
8166 | rm -fr confdefs* $ac_clean_files | |
8167 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8168 | ||
8169 | if test "$no_recursion" != yes; then | |
8170 | ||
8171 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
8172 | ac_sub_configure_args= | |
8173 | ac_prev= | |
8174 | for ac_arg in $ac_configure_args; do | |
8175 | if test -n "$ac_prev"; then | |
8176 | ac_prev= | |
8177 | continue | |
8178 | fi | |
8179 | case "$ac_arg" in | |
8180 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
8181 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
8182 | ac_prev=cache_file ;; | |
8183 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
8184 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
8185 | ;; | |
8186 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
8187 | ac_prev=srcdir ;; | |
8188 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
8189 | ;; | |
8190 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
8191 | esac | |
8192 | done | |
8193 | ||
8194 | for ac_config_dir in $configdirs; do | |
8195 | ||
8196 | # Do not complain, so a configure script can configure whichever | |
8197 | # parts of a large source tree are present. | |
8198 | if test ! -d $srcdir/$ac_config_dir; then | |
8199 | continue | |
8200 | fi | |
8201 | ||
8202 | echo configuring in $ac_config_dir | |
8203 | ||
8204 | case "$srcdir" in | |
8205 | .) ;; | |
8206 | *) | |
8207 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
8208 | else | |
8209 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
8210 | fi | |
8211 | ;; | |
8212 | esac | |
8213 | ||
8214 | ac_popdir=`pwd` | |
8215 | cd $ac_config_dir | |
8216 | ||
8217 | # A "../" for each directory in /$ac_config_dir. | |
8218 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
8219 | ||
8220 | case "$srcdir" in | |
8221 | .) # No --srcdir option. We are building in place. | |
8222 | ac_sub_srcdir=$srcdir ;; | |
8223 | /*) # Absolute path. | |
8224 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
8225 | *) # Relative path. | |
8226 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
8227 | esac | |
8228 | ||
8229 | # Check for guested configure; otherwise get Cygnus style configure. | |
8230 | if test -f $ac_sub_srcdir/configure; then | |
8231 | ac_sub_configure=$ac_sub_srcdir/configure | |
8232 | elif test -f $ac_sub_srcdir/configure.in; then | |
8233 | ac_sub_configure=$ac_configure | |
8234 | else | |
8235 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
8236 | ac_sub_configure= | |
8237 | fi | |
8238 | ||
8239 | # The recursion is here. | |
8240 | if test -n "$ac_sub_configure"; then | |
8241 | ||
8242 | # Make the cache file name correct relative to the subdirectory. | |
8243 | case "$cache_file" in | |
8244 | /*) ac_sub_cache_file=$cache_file ;; | |
8245 | *) # Relative path. | |
8246 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
8247 | esac | |
8248 | case "$ac_given_INSTALL" in | |
8249 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8250 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8251 | esac | |
8252 | ||
8253 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
8254 | # The eval makes quoting arguments work. | |
8255 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
8256 | then : | |
8257 | else | |
8258 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
8259 | fi | |
8260 | fi | |
8261 | ||
8262 | cd $ac_popdir | |
8263 | done | |
8264 | fi | |
8265 | ||
8266 | ||
8267 | exit 0 |