Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
96baa820 JM |
21 | ac_help="$ac_help |
22 | --enable-multi-ice Build the multi-ice-gdb-server" | |
d318976c FN |
23 | ac_help="$ac_help |
24 | --enable-gdbcli Enable GDB-CLI interface" | |
fb40c209 AC |
25 | ac_help="$ac_help |
26 | --enable-gdbmi Enable GDB-MI interface" | |
b4df4f68 FN |
27 | ac_help="$ac_help |
28 | --with-uiout Use new uiout functions intead of *printf's" | |
c906108c SS |
29 | ac_help="$ac_help |
30 | --enable-tui Enable full-screen terminal user interface" | |
31 | ac_help="$ac_help | |
32 | --enable-netrom Enable NetROM support" | |
33 | ac_help="$ac_help | |
34 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
35 | ac_help="$ac_help |
36 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
37 | ac_help="$ac_help |
38 | --with-mmalloc Use memory mapped malloc package" | |
88987551 L |
39 | ac_help="$ac_help |
40 | --with-included-regex Use included regex" | |
7a292a7a SS |
41 | ac_help="$ac_help |
42 | --with-cpu=CPU Set the default CPU variant to debug" | |
43 | ac_help="$ac_help | |
44 | --enable-gdbtk Enable GDBTK GUI front end" | |
45 | ac_help="$ac_help | |
46 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
47 | ac_help="$ac_help | |
48 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-tclinclude=DIR Directory where tcl private headers are" | |
51 | ac_help="$ac_help | |
52 | --with-tkinclude=DIR Directory where tk private headers are" | |
53 | ac_help="$ac_help | |
54 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
55 | ac_help="$ac_help | |
56 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
57 | ac_help="$ac_help | |
58 | --with-tixconfig Directory containing tix configuration (tixConfig.sh)" | |
c906108c SS |
59 | ac_help="$ac_help |
60 | --with-x use the X Window System" | |
7a292a7a SS |
61 | ac_help="$ac_help |
62 | --enable-sim Link gdb with simulator" | |
c906108c SS |
63 | ac_help="$ac_help |
64 | --enable-shared Use shared libraries" | |
65 | ||
66 | # Initialize some variables set by options. | |
67 | # The variables have the same names as the options, with | |
68 | # dashes changed to underlines. | |
69 | build=NONE | |
70 | cache_file=./config.cache | |
71 | exec_prefix=NONE | |
72 | host=NONE | |
73 | no_create= | |
74 | nonopt=NONE | |
75 | no_recursion= | |
76 | prefix=NONE | |
77 | program_prefix=NONE | |
78 | program_suffix=NONE | |
79 | program_transform_name=s,x,x, | |
80 | silent= | |
81 | site= | |
3b851bce | 82 | sitefile= |
c906108c SS |
83 | srcdir= |
84 | target=NONE | |
85 | verbose= | |
86 | x_includes=NONE | |
87 | x_libraries=NONE | |
88 | bindir='${exec_prefix}/bin' | |
89 | sbindir='${exec_prefix}/sbin' | |
90 | libexecdir='${exec_prefix}/libexec' | |
91 | datadir='${prefix}/share' | |
92 | sysconfdir='${prefix}/etc' | |
93 | sharedstatedir='${prefix}/com' | |
94 | localstatedir='${prefix}/var' | |
95 | libdir='${exec_prefix}/lib' | |
96 | includedir='${prefix}/include' | |
97 | oldincludedir='/usr/include' | |
98 | infodir='${prefix}/info' | |
99 | mandir='${prefix}/man' | |
100 | ||
101 | # Initialize some other variables. | |
102 | subdirs= | |
103 | MFLAGS= MAKEFLAGS= | |
104 | SHELL=${CONFIG_SHELL-/bin/sh} | |
105 | # Maximum number of lines to put in a shell here document. | |
106 | ac_max_here_lines=12 | |
107 | ||
108 | ac_prev= | |
109 | for ac_option | |
110 | do | |
111 | ||
112 | # If the previous option needs an argument, assign it. | |
113 | if test -n "$ac_prev"; then | |
114 | eval "$ac_prev=\$ac_option" | |
115 | ac_prev= | |
116 | continue | |
117 | fi | |
118 | ||
119 | case "$ac_option" in | |
120 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
121 | *) ac_optarg= ;; | |
122 | esac | |
123 | ||
124 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
125 | ||
126 | case "$ac_option" in | |
127 | ||
128 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
129 | ac_prev=bindir ;; | |
130 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
131 | bindir="$ac_optarg" ;; | |
132 | ||
133 | -build | --build | --buil | --bui | --bu) | |
134 | ac_prev=build ;; | |
135 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
136 | build="$ac_optarg" ;; | |
137 | ||
138 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
139 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
140 | ac_prev=cache_file ;; | |
141 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
142 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
143 | cache_file="$ac_optarg" ;; | |
144 | ||
145 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
146 | ac_prev=datadir ;; | |
147 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
148 | | --da=*) | |
149 | datadir="$ac_optarg" ;; | |
150 | ||
151 | -disable-* | --disable-*) | |
152 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
153 | # Reject names that are not valid shell variable names. | |
154 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
155 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
156 | fi | |
157 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
158 | eval "enable_${ac_feature}=no" ;; | |
159 | ||
160 | -enable-* | --enable-*) | |
161 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
162 | # Reject names that are not valid shell variable names. | |
163 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
164 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
165 | fi | |
166 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
167 | case "$ac_option" in | |
168 | *=*) ;; | |
169 | *) ac_optarg=yes ;; | |
170 | esac | |
171 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
172 | ||
173 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
174 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
175 | | --exec | --exe | --ex) | |
176 | ac_prev=exec_prefix ;; | |
177 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
178 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
179 | | --exec=* | --exe=* | --ex=*) | |
180 | exec_prefix="$ac_optarg" ;; | |
181 | ||
182 | -gas | --gas | --ga | --g) | |
183 | # Obsolete; use --with-gas. | |
184 | with_gas=yes ;; | |
185 | ||
186 | -help | --help | --hel | --he) | |
187 | # Omit some internal or obsolete options to make the list less imposing. | |
188 | # This message is too long to be a string in the A/UX 3.1 sh. | |
189 | cat << EOF | |
190 | Usage: configure [options] [host] | |
191 | Options: [defaults in brackets after descriptions] | |
192 | Configuration: | |
193 | --cache-file=FILE cache test results in FILE | |
194 | --help print this message | |
195 | --no-create do not create output files | |
196 | --quiet, --silent do not print \`checking...' messages | |
3b851bce | 197 | --site-file=FILE use FILE as the site file |
c906108c SS |
198 | --version print the version of autoconf that created configure |
199 | Directory and file names: | |
200 | --prefix=PREFIX install architecture-independent files in PREFIX | |
201 | [$ac_default_prefix] | |
202 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
203 | [same as prefix] | |
204 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
205 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
206 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
207 | --datadir=DIR read-only architecture-independent data in DIR | |
208 | [PREFIX/share] | |
209 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
210 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
211 | [PREFIX/com] | |
212 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
213 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
214 | --includedir=DIR C header files in DIR [PREFIX/include] | |
215 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
216 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
217 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
218 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
219 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
220 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
221 | --program-transform-name=PROGRAM | |
222 | run sed PROGRAM on installed program names | |
223 | EOF | |
224 | cat << EOF | |
225 | Host type: | |
226 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
227 | --host=HOST configure for HOST [guessed] | |
228 | --target=TARGET configure for TARGET [TARGET=HOST] | |
229 | Features and packages: | |
230 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
231 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
232 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
233 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
234 | --x-includes=DIR X include files are in DIR | |
235 | --x-libraries=DIR X library files are in DIR | |
236 | EOF | |
237 | if test -n "$ac_help"; then | |
238 | echo "--enable and --with options recognized:$ac_help" | |
239 | fi | |
240 | exit 0 ;; | |
241 | ||
242 | -host | --host | --hos | --ho) | |
243 | ac_prev=host ;; | |
244 | -host=* | --host=* | --hos=* | --ho=*) | |
245 | host="$ac_optarg" ;; | |
246 | ||
247 | -includedir | --includedir | --includedi | --included | --include \ | |
248 | | --includ | --inclu | --incl | --inc) | |
249 | ac_prev=includedir ;; | |
250 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
251 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
252 | includedir="$ac_optarg" ;; | |
253 | ||
254 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
255 | ac_prev=infodir ;; | |
256 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
257 | infodir="$ac_optarg" ;; | |
258 | ||
259 | -libdir | --libdir | --libdi | --libd) | |
260 | ac_prev=libdir ;; | |
261 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
262 | libdir="$ac_optarg" ;; | |
263 | ||
264 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
265 | | --libexe | --libex | --libe) | |
266 | ac_prev=libexecdir ;; | |
267 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
268 | | --libexe=* | --libex=* | --libe=*) | |
269 | libexecdir="$ac_optarg" ;; | |
270 | ||
271 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
272 | | --localstate | --localstat | --localsta | --localst \ | |
273 | | --locals | --local | --loca | --loc | --lo) | |
274 | ac_prev=localstatedir ;; | |
275 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
276 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
277 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
278 | localstatedir="$ac_optarg" ;; | |
279 | ||
280 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
281 | ac_prev=mandir ;; | |
282 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
283 | mandir="$ac_optarg" ;; | |
284 | ||
285 | -nfp | --nfp | --nf) | |
286 | # Obsolete; use --without-fp. | |
287 | with_fp=no ;; | |
288 | ||
289 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
290 | | --no-cr | --no-c) | |
291 | no_create=yes ;; | |
292 | ||
293 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
294 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
295 | no_recursion=yes ;; | |
296 | ||
297 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
298 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
299 | | --oldin | --oldi | --old | --ol | --o) | |
300 | ac_prev=oldincludedir ;; | |
301 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
302 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
303 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
304 | oldincludedir="$ac_optarg" ;; | |
305 | ||
306 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
307 | ac_prev=prefix ;; | |
308 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
309 | prefix="$ac_optarg" ;; | |
310 | ||
311 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
312 | | --program-pre | --program-pr | --program-p) | |
313 | ac_prev=program_prefix ;; | |
314 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
315 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
316 | program_prefix="$ac_optarg" ;; | |
317 | ||
318 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
319 | | --program-suf | --program-su | --program-s) | |
320 | ac_prev=program_suffix ;; | |
321 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
322 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
323 | program_suffix="$ac_optarg" ;; | |
324 | ||
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 | ac_prev=program_transform_name ;; | |
333 | -program-transform-name=* | --program-transform-name=* \ | |
334 | | --program-transform-nam=* | --program-transform-na=* \ | |
335 | | --program-transform-n=* | --program-transform-=* \ | |
336 | | --program-transform=* | --program-transfor=* \ | |
337 | | --program-transfo=* | --program-transf=* \ | |
338 | | --program-trans=* | --program-tran=* \ | |
339 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
340 | program_transform_name="$ac_optarg" ;; | |
341 | ||
342 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
343 | | -silent | --silent | --silen | --sile | --sil) | |
344 | silent=yes ;; | |
345 | ||
346 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
347 | ac_prev=sbindir ;; | |
348 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
349 | | --sbi=* | --sb=*) | |
350 | sbindir="$ac_optarg" ;; | |
351 | ||
352 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
353 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
354 | | --sharedst | --shareds | --shared | --share | --shar \ | |
355 | | --sha | --sh) | |
356 | ac_prev=sharedstatedir ;; | |
357 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
358 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
359 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
360 | | --sha=* | --sh=*) | |
361 | sharedstatedir="$ac_optarg" ;; | |
362 | ||
363 | -site | --site | --sit) | |
364 | ac_prev=site ;; | |
365 | -site=* | --site=* | --sit=*) | |
366 | site="$ac_optarg" ;; | |
367 | ||
3b851bce AC |
368 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
369 | ac_prev=sitefile ;; | |
370 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
371 | sitefile="$ac_optarg" ;; | |
372 | ||
c906108c SS |
373 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
374 | ac_prev=srcdir ;; | |
375 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
376 | srcdir="$ac_optarg" ;; | |
377 | ||
378 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
379 | | --syscon | --sysco | --sysc | --sys | --sy) | |
380 | ac_prev=sysconfdir ;; | |
381 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
382 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
383 | sysconfdir="$ac_optarg" ;; | |
384 | ||
385 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
386 | ac_prev=target ;; | |
387 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
388 | target="$ac_optarg" ;; | |
389 | ||
390 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
391 | verbose=yes ;; | |
392 | ||
393 | -version | --version | --versio | --versi | --vers) | |
394 | echo "configure generated by autoconf version 2.13" | |
395 | exit 0 ;; | |
396 | ||
397 | -with-* | --with-*) | |
398 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
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 | case "$ac_option" in | |
405 | *=*) ;; | |
406 | *) ac_optarg=yes ;; | |
407 | esac | |
408 | eval "with_${ac_package}='$ac_optarg'" ;; | |
409 | ||
410 | -without-* | --without-*) | |
411 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
412 | # Reject names that are not valid shell variable names. | |
413 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
414 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
415 | fi | |
416 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
417 | eval "with_${ac_package}=no" ;; | |
418 | ||
419 | --x) | |
420 | # Obsolete; use --with-x. | |
421 | with_x=yes ;; | |
422 | ||
423 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
424 | | --x-incl | --x-inc | --x-in | --x-i) | |
425 | ac_prev=x_includes ;; | |
426 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
427 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
428 | x_includes="$ac_optarg" ;; | |
429 | ||
430 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
431 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
432 | ac_prev=x_libraries ;; | |
433 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
434 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
435 | x_libraries="$ac_optarg" ;; | |
436 | ||
437 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
438 | ;; | |
439 | ||
440 | *) | |
441 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
442 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
443 | fi | |
444 | if test "x$nonopt" != xNONE; then | |
445 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
446 | fi | |
447 | nonopt="$ac_option" | |
448 | ;; | |
449 | ||
450 | esac | |
451 | done | |
452 | ||
453 | if test -n "$ac_prev"; then | |
454 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
455 | fi | |
456 | ||
457 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
458 | ||
459 | # File descriptor usage: | |
460 | # 0 standard input | |
461 | # 1 file creation | |
462 | # 2 errors and warnings | |
463 | # 3 some systems may open it to /dev/tty | |
464 | # 4 used on the Kubota Titan | |
465 | # 6 checking for... messages and results | |
466 | # 5 compiler messages saved in config.log | |
467 | if test "$silent" = yes; then | |
468 | exec 6>/dev/null | |
469 | else | |
470 | exec 6>&1 | |
471 | fi | |
472 | exec 5>./config.log | |
473 | ||
474 | echo "\ | |
475 | This file contains any messages produced by compilers while | |
476 | running configure, to aid debugging if configure makes a mistake. | |
477 | " 1>&5 | |
478 | ||
479 | # Strip out --no-create and --no-recursion so they do not pile up. | |
480 | # Also quote any args containing shell metacharacters. | |
481 | ac_configure_args= | |
482 | for ac_arg | |
483 | do | |
484 | case "$ac_arg" in | |
485 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
486 | | --no-cr | --no-c) ;; | |
487 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
488 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
489 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
490 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
491 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
492 | esac | |
493 | done | |
494 | ||
495 | # NLS nuisances. | |
496 | # Only set these to C if already set. These must not be set unconditionally | |
497 | # because not all systems understand e.g. LANG=C (notably SCO). | |
498 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
499 | # Non-C LC_CTYPE values break the ctype check. | |
500 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
501 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
502 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
503 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
504 | ||
505 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
506 | rm -rf conftest* confdefs.h | |
507 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
508 | echo > confdefs.h | |
509 | ||
510 | # A filename unique to this package, relative to the directory that | |
511 | # configure is in, which we can look for to find out if srcdir is correct. | |
512 | ac_unique_file=main.c | |
513 | ||
514 | # Find the source files, if location was not specified. | |
515 | if test -z "$srcdir"; then | |
516 | ac_srcdir_defaulted=yes | |
517 | # Try the directory containing this script, then its parent. | |
518 | ac_prog=$0 | |
519 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
520 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
521 | srcdir=$ac_confdir | |
522 | if test ! -r $srcdir/$ac_unique_file; then | |
523 | srcdir=.. | |
524 | fi | |
525 | else | |
526 | ac_srcdir_defaulted=no | |
527 | fi | |
528 | if test ! -r $srcdir/$ac_unique_file; then | |
529 | if test "$ac_srcdir_defaulted" = yes; then | |
530 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
531 | else | |
532 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
533 | fi | |
534 | fi | |
535 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
536 | ||
537 | # Prefer explicitly selected file to automatically selected ones. | |
3b851bce AC |
538 | if test -z "$sitefile"; then |
539 | if test -z "$CONFIG_SITE"; then | |
540 | if test "x$prefix" != xNONE; then | |
541 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
542 | else | |
543 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
544 | fi | |
c906108c | 545 | fi |
3b851bce AC |
546 | else |
547 | CONFIG_SITE="$sitefile" | |
c906108c SS |
548 | fi |
549 | for ac_site_file in $CONFIG_SITE; do | |
550 | if test -r "$ac_site_file"; then | |
551 | echo "loading site script $ac_site_file" | |
552 | . "$ac_site_file" | |
553 | fi | |
554 | done | |
555 | ||
556 | if test -r "$cache_file"; then | |
557 | echo "loading cache $cache_file" | |
558 | . $cache_file | |
559 | else | |
560 | echo "creating cache $cache_file" | |
561 | > $cache_file | |
562 | fi | |
563 | ||
564 | ac_ext=c | |
565 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
566 | ac_cpp='$CPP $CPPFLAGS' | |
567 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
568 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
569 | cross_compiling=$ac_cv_prog_cc_cross | |
570 | ||
571 | ac_exeext= | |
572 | ac_objext=o | |
573 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
574 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
575 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
576 | ac_n= ac_c=' | |
577 | ' ac_t=' ' | |
578 | else | |
579 | ac_n=-n ac_c= ac_t= | |
580 | fi | |
581 | else | |
582 | ac_n= ac_c='\c' ac_t= | |
583 | fi | |
584 | ||
585 | ||
586 | ||
413ccac7 | 587 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
b4df4f68 | 588 | echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
589 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
590 | if test "${enable_maintainer_mode+set}" = set; then | |
591 | enableval="$enable_maintainer_mode" | |
592 | USE_MAINTAINER_MODE=$enableval | |
593 | else | |
594 | USE_MAINTAINER_MODE=no | |
595 | fi | |
596 | ||
597 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
598 | ||
599 | ||
600 | if test $USE_MAINTAINER_MODE = yes; then | |
601 | MAINTAINER_MODE_TRUE= | |
602 | MAINTAINER_MODE_FALSE='#' | |
603 | else | |
604 | MAINTAINER_MODE_TRUE='#' | |
605 | MAINTAINER_MODE_FALSE= | |
606 | fi | |
607 | MAINT=$MAINTAINER_MODE_TRUE | |
608 | ||
609 | ||
c906108c SS |
610 | |
611 | # Extract the first word of "gcc", so it can be a program name with args. | |
612 | set dummy gcc; ac_word=$2 | |
613 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 614 | echo "configure:615: checking for $ac_word" >&5 |
c906108c SS |
615 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
616 | echo $ac_n "(cached) $ac_c" 1>&6 | |
617 | else | |
618 | if test -n "$CC"; then | |
619 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
620 | else | |
621 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
622 | ac_dummy="$PATH" | |
623 | for ac_dir in $ac_dummy; do | |
624 | test -z "$ac_dir" && ac_dir=. | |
625 | if test -f $ac_dir/$ac_word; then | |
626 | ac_cv_prog_CC="gcc" | |
627 | break | |
628 | fi | |
629 | done | |
630 | IFS="$ac_save_ifs" | |
631 | fi | |
632 | fi | |
633 | CC="$ac_cv_prog_CC" | |
634 | if test -n "$CC"; then | |
635 | echo "$ac_t""$CC" 1>&6 | |
636 | else | |
637 | echo "$ac_t""no" 1>&6 | |
638 | fi | |
639 | ||
640 | if test -z "$CC"; then | |
641 | # Extract the first word of "cc", so it can be a program name with args. | |
642 | set dummy cc; ac_word=$2 | |
643 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 644 | echo "configure:645: checking for $ac_word" >&5 |
c906108c SS |
645 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
647 | else | |
648 | if test -n "$CC"; then | |
649 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
650 | else | |
651 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
652 | ac_prog_rejected=no | |
653 | ac_dummy="$PATH" | |
654 | for ac_dir in $ac_dummy; do | |
655 | test -z "$ac_dir" && ac_dir=. | |
656 | if test -f $ac_dir/$ac_word; then | |
657 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
658 | ac_prog_rejected=yes | |
659 | continue | |
660 | fi | |
661 | ac_cv_prog_CC="cc" | |
662 | break | |
663 | fi | |
664 | done | |
665 | IFS="$ac_save_ifs" | |
666 | if test $ac_prog_rejected = yes; then | |
667 | # We found a bogon in the path, so make sure we never use it. | |
668 | set dummy $ac_cv_prog_CC | |
669 | shift | |
670 | if test $# -gt 0; then | |
671 | # We chose a different compiler from the bogus one. | |
672 | # However, it has the same basename, so the bogon will be chosen | |
673 | # first if we set CC to just the basename; use the full file name. | |
674 | shift | |
675 | set dummy "$ac_dir/$ac_word" "$@" | |
676 | shift | |
677 | ac_cv_prog_CC="$@" | |
678 | fi | |
679 | fi | |
680 | fi | |
681 | fi | |
682 | CC="$ac_cv_prog_CC" | |
683 | if test -n "$CC"; then | |
684 | echo "$ac_t""$CC" 1>&6 | |
685 | else | |
686 | echo "$ac_t""no" 1>&6 | |
687 | fi | |
688 | ||
689 | if test -z "$CC"; then | |
690 | case "`uname -s`" in | |
691 | *win32* | *WIN32*) | |
692 | # Extract the first word of "cl", so it can be a program name with args. | |
693 | set dummy cl; ac_word=$2 | |
694 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 695 | echo "configure:696: checking for $ac_word" >&5 |
c906108c SS |
696 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
698 | else | |
699 | if test -n "$CC"; then | |
700 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
701 | else | |
702 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
703 | ac_dummy="$PATH" | |
704 | for ac_dir in $ac_dummy; do | |
705 | test -z "$ac_dir" && ac_dir=. | |
706 | if test -f $ac_dir/$ac_word; then | |
707 | ac_cv_prog_CC="cl" | |
708 | break | |
709 | fi | |
710 | done | |
711 | IFS="$ac_save_ifs" | |
712 | fi | |
713 | fi | |
714 | CC="$ac_cv_prog_CC" | |
715 | if test -n "$CC"; then | |
716 | echo "$ac_t""$CC" 1>&6 | |
717 | else | |
718 | echo "$ac_t""no" 1>&6 | |
719 | fi | |
720 | ;; | |
721 | esac | |
722 | fi | |
723 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
724 | fi | |
725 | ||
726 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
b4df4f68 | 727 | echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
728 | |
729 | ac_ext=c | |
730 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
731 | ac_cpp='$CPP $CPPFLAGS' | |
732 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
733 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
734 | cross_compiling=$ac_cv_prog_cc_cross | |
735 | ||
736 | cat > conftest.$ac_ext << EOF | |
737 | ||
b4df4f68 | 738 | #line 739 "configure" |
c906108c SS |
739 | #include "confdefs.h" |
740 | ||
741 | main(){return(0);} | |
742 | EOF | |
b4df4f68 | 743 | if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
744 | ac_cv_prog_cc_works=yes |
745 | # If we can't run a trivial program, we are probably using a cross compiler. | |
746 | if (./conftest; exit) 2>/dev/null; then | |
747 | ac_cv_prog_cc_cross=no | |
748 | else | |
749 | ac_cv_prog_cc_cross=yes | |
750 | fi | |
751 | else | |
752 | echo "configure: failed program was:" >&5 | |
753 | cat conftest.$ac_ext >&5 | |
754 | ac_cv_prog_cc_works=no | |
755 | fi | |
756 | rm -fr conftest* | |
757 | ac_ext=c | |
758 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
759 | ac_cpp='$CPP $CPPFLAGS' | |
760 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
761 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
762 | cross_compiling=$ac_cv_prog_cc_cross | |
763 | ||
764 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
765 | if test $ac_cv_prog_cc_works = no; then | |
766 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
767 | fi | |
768 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
b4df4f68 | 769 | echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
770 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
771 | cross_compiling=$ac_cv_prog_cc_cross | |
772 | ||
773 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
b4df4f68 | 774 | echo "configure:775: checking whether we are using GNU C" >&5 |
c906108c SS |
775 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
777 | else | |
778 | cat > conftest.c <<EOF | |
779 | #ifdef __GNUC__ | |
780 | yes; | |
781 | #endif | |
782 | EOF | |
b4df4f68 | 783 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
784 | ac_cv_prog_gcc=yes |
785 | else | |
786 | ac_cv_prog_gcc=no | |
787 | fi | |
788 | fi | |
789 | ||
790 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
791 | ||
792 | if test $ac_cv_prog_gcc = yes; then | |
793 | GCC=yes | |
794 | else | |
795 | GCC= | |
796 | fi | |
797 | ||
798 | ac_test_CFLAGS="${CFLAGS+set}" | |
799 | ac_save_CFLAGS="$CFLAGS" | |
800 | CFLAGS= | |
801 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
b4df4f68 | 802 | echo "configure:803: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
803 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
805 | else | |
806 | echo 'void f(){}' > conftest.c | |
807 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
808 | ac_cv_prog_cc_g=yes | |
809 | else | |
810 | ac_cv_prog_cc_g=no | |
811 | fi | |
812 | rm -f conftest* | |
813 | ||
814 | fi | |
815 | ||
816 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
817 | if test "$ac_test_CFLAGS" = set; then | |
818 | CFLAGS="$ac_save_CFLAGS" | |
819 | elif test $ac_cv_prog_cc_g = yes; then | |
820 | if test "$GCC" = yes; then | |
821 | CFLAGS="-g -O2" | |
822 | else | |
823 | CFLAGS="-g" | |
824 | fi | |
825 | else | |
826 | if test "$GCC" = yes; then | |
827 | CFLAGS="-O2" | |
828 | else | |
829 | CFLAGS= | |
830 | fi | |
831 | fi | |
832 | ||
833 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
b4df4f68 | 834 | echo "configure:835: checking how to run the C preprocessor" >&5 |
c906108c SS |
835 | # On Suns, sometimes $CPP names a directory. |
836 | if test -n "$CPP" && test -d "$CPP"; then | |
837 | CPP= | |
838 | fi | |
839 | if test -z "$CPP"; then | |
840 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
841 | echo $ac_n "(cached) $ac_c" 1>&6 | |
842 | else | |
843 | # This must be in double quotes, not single quotes, because CPP may get | |
844 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
845 | CPP="${CC-cc} -E" | |
846 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
847 | # not just through cpp. | |
848 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 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" | |
b4df4f68 | 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} -E -traditional-cpp" | |
865 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 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" | |
b4df4f68 | 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="${CC-cc} -nologo -E" | |
882 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 883 | #line 884 "configure" |
c906108c SS |
884 | #include "confdefs.h" |
885 | #include <assert.h> | |
886 | Syntax Error | |
887 | EOF | |
888 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 889 | { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
890 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
891 | if test -z "$ac_err"; then | |
892 | : | |
893 | else | |
894 | echo "$ac_err" >&5 | |
895 | echo "configure: failed program was:" >&5 | |
896 | cat conftest.$ac_ext >&5 | |
897 | rm -rf conftest* | |
898 | CPP=/lib/cpp | |
899 | fi | |
900 | rm -f conftest* | |
901 | fi | |
902 | rm -f conftest* | |
903 | fi | |
904 | rm -f conftest* | |
905 | ac_cv_prog_CPP="$CPP" | |
906 | fi | |
907 | CPP="$ac_cv_prog_CPP" | |
908 | else | |
909 | ac_cv_prog_CPP="$CPP" | |
910 | fi | |
911 | echo "$ac_t""$CPP" 1>&6 | |
912 | ||
913 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
b4df4f68 | 914 | echo "configure:915: checking for AIX" >&5 |
c906108c | 915 | cat > conftest.$ac_ext <<EOF |
b4df4f68 | 916 | #line 917 "configure" |
c906108c SS |
917 | #include "confdefs.h" |
918 | #ifdef _AIX | |
919 | yes | |
920 | #endif | |
921 | ||
922 | EOF | |
923 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
924 | egrep "yes" >/dev/null 2>&1; then | |
925 | rm -rf conftest* | |
926 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
927 | #define _ALL_SOURCE 1 | |
928 | EOF | |
929 | ||
930 | else | |
931 | rm -rf conftest* | |
932 | echo "$ac_t""no" 1>&6 | |
933 | fi | |
934 | rm -f conftest* | |
935 | ||
936 | ||
937 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
b4df4f68 | 938 | echo "configure:939: checking for POSIXized ISC" >&5 |
c906108c SS |
939 | if test -d /etc/conf/kconfig.d && |
940 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
941 | then | |
942 | echo "$ac_t""yes" 1>&6 | |
943 | ISC=yes # If later tests want to check for ISC. | |
944 | cat >> confdefs.h <<\EOF | |
945 | #define _POSIX_SOURCE 1 | |
946 | EOF | |
947 | ||
948 | if test "$GCC" = yes; then | |
949 | CC="$CC -posix" | |
950 | else | |
951 | CC="$CC -Xp" | |
952 | fi | |
953 | else | |
954 | echo "$ac_t""no" 1>&6 | |
955 | ISC= | |
956 | fi | |
957 | ||
958 | ||
959 | ||
960 | ||
961 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
b4df4f68 | 962 | echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
963 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
964 | echo $ac_n "(cached) $ac_c" 1>&6 | |
965 | else | |
966 | am_cv_prog_cc_stdc=no | |
967 | ac_save_CC="$CC" | |
968 | # Don't try gcc -ansi; that turns off useful extensions and | |
969 | # breaks some systems' header files. | |
970 | # AIX -qlanglvl=ansi | |
971 | # Ultrix and OSF/1 -std1 | |
972 | # HP-UX -Aa -D_HPUX_SOURCE | |
973 | # SVR4 -Xc -D__EXTENSIONS__ | |
974 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
975 | do | |
976 | CC="$ac_save_CC $ac_arg" | |
977 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 978 | #line 979 "configure" |
c906108c SS |
979 | #include "confdefs.h" |
980 | #include <stdarg.h> | |
981 | #include <stdio.h> | |
982 | #include <sys/types.h> | |
983 | #include <sys/stat.h> | |
984 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
985 | struct buf { int x; }; | |
986 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
987 | static char *e (p, i) | |
988 | char **p; | |
989 | int i; | |
990 | { | |
991 | return p[i]; | |
992 | } | |
993 | static char *f (char * (*g) (char **, int), char **p, ...) | |
994 | { | |
995 | char *s; | |
996 | va_list v; | |
997 | va_start (v,p); | |
998 | s = g (p, va_arg (v,int)); | |
999 | va_end (v); | |
1000 | return s; | |
1001 | } | |
1002 | int test (int i, double x); | |
1003 | struct s1 {int (*f) (int a);}; | |
1004 | struct s2 {int (*f) (double a);}; | |
1005 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1006 | int argc; | |
1007 | char **argv; | |
1008 | ||
1009 | int main() { | |
1010 | ||
1011 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1012 | ||
1013 | ; return 0; } | |
1014 | EOF | |
b4df4f68 | 1015 | if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1016 | rm -rf conftest* |
1017 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1018 | else | |
1019 | echo "configure: failed program was:" >&5 | |
1020 | cat conftest.$ac_ext >&5 | |
1021 | fi | |
1022 | rm -f conftest* | |
1023 | done | |
1024 | CC="$ac_save_CC" | |
1025 | ||
1026 | fi | |
1027 | ||
1028 | if test -z "$am_cv_prog_cc_stdc"; then | |
1029 | echo "$ac_t""none needed" 1>&6 | |
1030 | else | |
1031 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1032 | fi | |
1033 | case "x$am_cv_prog_cc_stdc" in | |
1034 | x|xno) ;; | |
1035 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1036 | esac | |
1037 | ||
1038 | ||
1039 | ac_aux_dir= | |
1040 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1041 | if test -f $ac_dir/install-sh; then | |
1042 | ac_aux_dir=$ac_dir | |
1043 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1044 | break | |
1045 | elif test -f $ac_dir/install.sh; then | |
1046 | ac_aux_dir=$ac_dir | |
1047 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1048 | break | |
1049 | fi | |
1050 | done | |
1051 | if test -z "$ac_aux_dir"; then | |
1052 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1053 | fi | |
1054 | ac_config_guess=$ac_aux_dir/config.guess | |
1055 | ac_config_sub=$ac_aux_dir/config.sub | |
1056 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1057 | ||
1058 | ||
1059 | # Do some error checking and defaulting for the host and target type. | |
1060 | # The inputs are: | |
1061 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1062 | # | |
1063 | # The rules are: | |
1064 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1065 | # same time. | |
1066 | # 2. Host defaults to nonopt. | |
1067 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1068 | # as determined by config.guess. | |
1069 | # 4. Target and build default to nonopt. | |
1070 | # 5. If nonopt is not specified, then target and build default to host. | |
1071 | ||
1072 | # The aliases save the names the user supplied, while $host etc. | |
1073 | # will get canonicalized. | |
1074 | case $host---$target---$nonopt in | |
1075 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1076 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1077 | esac | |
1078 | ||
1079 | ||
1080 | # Make sure we can run config.sub. | |
1081 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1082 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1083 | fi | |
1084 | ||
1085 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
b4df4f68 | 1086 | echo "configure:1087: checking host system type" >&5 |
c906108c SS |
1087 | |
1088 | host_alias=$host | |
1089 | case "$host_alias" in | |
1090 | NONE) | |
1091 | case $nonopt in | |
1092 | NONE) | |
1093 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1094 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1095 | fi ;; | |
1096 | *) host_alias=$nonopt ;; | |
1097 | esac ;; | |
1098 | esac | |
1099 | ||
1100 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1101 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1102 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1103 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1104 | echo "$ac_t""$host" 1>&6 | |
1105 | ||
1106 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
b4df4f68 | 1107 | echo "configure:1108: checking target system type" >&5 |
c906108c SS |
1108 | |
1109 | target_alias=$target | |
1110 | case "$target_alias" in | |
1111 | NONE) | |
1112 | case $nonopt in | |
1113 | NONE) target_alias=$host_alias ;; | |
1114 | *) target_alias=$nonopt ;; | |
1115 | esac ;; | |
1116 | esac | |
1117 | ||
1118 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1119 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1120 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1121 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1122 | echo "$ac_t""$target" 1>&6 | |
1123 | ||
1124 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
b4df4f68 | 1125 | echo "configure:1126: checking build system type" >&5 |
c906108c SS |
1126 | |
1127 | build_alias=$build | |
1128 | case "$build_alias" in | |
1129 | NONE) | |
1130 | case $nonopt in | |
1131 | NONE) build_alias=$host_alias ;; | |
1132 | *) build_alias=$nonopt ;; | |
1133 | esac ;; | |
1134 | esac | |
1135 | ||
1136 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1137 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1138 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1139 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1140 | echo "$ac_t""$build" 1>&6 | |
1141 | ||
1142 | test "$host_alias" != "$target_alias" && | |
1143 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1144 | NONENONEs,x,x, && | |
1145 | program_prefix=${target_alias}- | |
1146 | ||
1147 | ||
1148 | ALL_LINGUAS= | |
1149 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
b4df4f68 | 1150 | echo "configure:1151: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1151 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1152 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1153 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1154 | else | |
1155 | cat > conftestmake <<\EOF | |
1156 | all: | |
1157 | @echo 'ac_maketemp="${MAKE}"' | |
1158 | EOF | |
1159 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1160 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1161 | if test -n "$ac_maketemp"; then | |
1162 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1163 | else | |
1164 | eval ac_cv_prog_make_${ac_make}_set=no | |
1165 | fi | |
1166 | rm -f conftestmake | |
1167 | fi | |
1168 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1169 | echo "$ac_t""yes" 1>&6 | |
1170 | SET_MAKE= | |
1171 | else | |
1172 | echo "$ac_t""no" 1>&6 | |
1173 | SET_MAKE="MAKE=${MAKE-make}" | |
1174 | fi | |
1175 | ||
1176 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1177 | set dummy ranlib; ac_word=$2 | |
1178 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 1179 | echo "configure:1180: checking for $ac_word" >&5 |
c906108c SS |
1180 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1181 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1182 | else | |
1183 | if test -n "$RANLIB"; then | |
1184 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1185 | else | |
1186 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1187 | ac_dummy="$PATH" | |
1188 | for ac_dir in $ac_dummy; do | |
1189 | test -z "$ac_dir" && ac_dir=. | |
1190 | if test -f $ac_dir/$ac_word; then | |
1191 | ac_cv_prog_RANLIB="ranlib" | |
1192 | break | |
1193 | fi | |
1194 | done | |
1195 | IFS="$ac_save_ifs" | |
1196 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1197 | fi | |
1198 | fi | |
1199 | RANLIB="$ac_cv_prog_RANLIB" | |
1200 | if test -n "$RANLIB"; then | |
1201 | echo "$ac_t""$RANLIB" 1>&6 | |
1202 | else | |
1203 | echo "$ac_t""no" 1>&6 | |
1204 | fi | |
1205 | ||
1206 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
b4df4f68 | 1207 | echo "configure:1208: checking for ANSI C header files" >&5 |
c906108c SS |
1208 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1209 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1210 | else | |
1211 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1212 | #line 1213 "configure" |
c906108c SS |
1213 | #include "confdefs.h" |
1214 | #include <stdlib.h> | |
1215 | #include <stdarg.h> | |
1216 | #include <string.h> | |
1217 | #include <float.h> | |
1218 | EOF | |
1219 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 1220 | { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1221 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1222 | if test -z "$ac_err"; then | |
1223 | rm -rf conftest* | |
1224 | ac_cv_header_stdc=yes | |
1225 | else | |
1226 | echo "$ac_err" >&5 | |
1227 | echo "configure: failed program was:" >&5 | |
1228 | cat conftest.$ac_ext >&5 | |
1229 | rm -rf conftest* | |
1230 | ac_cv_header_stdc=no | |
1231 | fi | |
1232 | rm -f conftest* | |
1233 | ||
1234 | if test $ac_cv_header_stdc = yes; then | |
1235 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1236 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1237 | #line 1238 "configure" |
c906108c SS |
1238 | #include "confdefs.h" |
1239 | #include <string.h> | |
1240 | EOF | |
1241 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1242 | egrep "memchr" >/dev/null 2>&1; then | |
1243 | : | |
1244 | else | |
1245 | rm -rf conftest* | |
1246 | ac_cv_header_stdc=no | |
1247 | fi | |
1248 | rm -f conftest* | |
1249 | ||
1250 | fi | |
1251 | ||
1252 | if test $ac_cv_header_stdc = yes; then | |
1253 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1254 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1255 | #line 1256 "configure" |
c906108c SS |
1256 | #include "confdefs.h" |
1257 | #include <stdlib.h> | |
1258 | EOF | |
1259 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1260 | egrep "free" >/dev/null 2>&1; then | |
1261 | : | |
1262 | else | |
1263 | rm -rf conftest* | |
1264 | ac_cv_header_stdc=no | |
1265 | fi | |
1266 | rm -f conftest* | |
1267 | ||
1268 | fi | |
1269 | ||
1270 | if test $ac_cv_header_stdc = yes; then | |
1271 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1272 | if test "$cross_compiling" = yes; then | |
1273 | : | |
1274 | else | |
1275 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1276 | #line 1277 "configure" |
c906108c SS |
1277 | #include "confdefs.h" |
1278 | #include <ctype.h> | |
1279 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1280 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1281 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1282 | int main () { int i; for (i = 0; i < 256; i++) | |
1283 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1284 | exit (0); } | |
1285 | ||
1286 | EOF | |
b4df4f68 | 1287 | if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1288 | then |
1289 | : | |
1290 | else | |
1291 | echo "configure: failed program was:" >&5 | |
1292 | cat conftest.$ac_ext >&5 | |
1293 | rm -fr conftest* | |
1294 | ac_cv_header_stdc=no | |
1295 | fi | |
1296 | rm -fr conftest* | |
1297 | fi | |
1298 | ||
1299 | fi | |
1300 | fi | |
1301 | ||
1302 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1303 | if test $ac_cv_header_stdc = yes; then | |
1304 | cat >> confdefs.h <<\EOF | |
1305 | #define STDC_HEADERS 1 | |
1306 | EOF | |
1307 | ||
1308 | fi | |
1309 | ||
1310 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
b4df4f68 | 1311 | echo "configure:1312: checking for working const" >&5 |
c906108c SS |
1312 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1313 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1314 | else | |
1315 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1316 | #line 1317 "configure" |
c906108c SS |
1317 | #include "confdefs.h" |
1318 | ||
1319 | int main() { | |
1320 | ||
1321 | /* Ultrix mips cc rejects this. */ | |
1322 | typedef int charset[2]; const charset x; | |
1323 | /* SunOS 4.1.1 cc rejects this. */ | |
1324 | char const *const *ccp; | |
1325 | char **p; | |
1326 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1327 | struct point {int x, y;}; | |
1328 | static struct point const zero = {0,0}; | |
1329 | /* AIX XL C 1.02.0.0 rejects this. | |
1330 | It does not let you subtract one const X* pointer from another in an arm | |
1331 | of an if-expression whose if-part is not a constant expression */ | |
1332 | const char *g = "string"; | |
1333 | ccp = &g + (g ? g-g : 0); | |
1334 | /* HPUX 7.0 cc rejects these. */ | |
1335 | ++ccp; | |
1336 | p = (char**) ccp; | |
1337 | ccp = (char const *const *) p; | |
1338 | { /* SCO 3.2v4 cc rejects this. */ | |
1339 | char *t; | |
1340 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1341 | ||
1342 | *t++ = 0; | |
1343 | } | |
1344 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1345 | int x[] = {25, 17}; | |
1346 | const int *foo = &x[0]; | |
1347 | ++foo; | |
1348 | } | |
1349 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1350 | typedef const int *iptr; | |
1351 | iptr p = 0; | |
1352 | ++p; | |
1353 | } | |
1354 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1355 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1356 | struct s { int j; const int *ap[3]; }; | |
1357 | struct s *b; b->j = 5; | |
1358 | } | |
1359 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1360 | const int foo = 10; | |
1361 | } | |
1362 | ||
1363 | ; return 0; } | |
1364 | EOF | |
b4df4f68 | 1365 | if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1366 | rm -rf conftest* |
1367 | ac_cv_c_const=yes | |
1368 | else | |
1369 | echo "configure: failed program was:" >&5 | |
1370 | cat conftest.$ac_ext >&5 | |
1371 | rm -rf conftest* | |
1372 | ac_cv_c_const=no | |
1373 | fi | |
1374 | rm -f conftest* | |
1375 | fi | |
1376 | ||
1377 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1378 | if test $ac_cv_c_const = no; then | |
1379 | cat >> confdefs.h <<\EOF | |
1380 | #define const | |
1381 | EOF | |
1382 | ||
1383 | fi | |
1384 | ||
1385 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
b4df4f68 | 1386 | echo "configure:1387: checking for inline" >&5 |
c906108c SS |
1387 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1388 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1389 | else | |
1390 | ac_cv_c_inline=no | |
1391 | for ac_kw in inline __inline__ __inline; do | |
1392 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1393 | #line 1394 "configure" |
c906108c SS |
1394 | #include "confdefs.h" |
1395 | ||
1396 | int main() { | |
1397 | } $ac_kw foo() { | |
1398 | ; return 0; } | |
1399 | EOF | |
b4df4f68 | 1400 | if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1401 | rm -rf conftest* |
1402 | ac_cv_c_inline=$ac_kw; break | |
1403 | else | |
1404 | echo "configure: failed program was:" >&5 | |
1405 | cat conftest.$ac_ext >&5 | |
1406 | fi | |
1407 | rm -f conftest* | |
1408 | done | |
1409 | ||
1410 | fi | |
1411 | ||
1412 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1413 | case "$ac_cv_c_inline" in | |
1414 | inline | yes) ;; | |
1415 | no) cat >> confdefs.h <<\EOF | |
1416 | #define inline | |
1417 | EOF | |
1418 | ;; | |
1419 | *) cat >> confdefs.h <<EOF | |
1420 | #define inline $ac_cv_c_inline | |
1421 | EOF | |
1422 | ;; | |
1423 | esac | |
1424 | ||
1425 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
b4df4f68 | 1426 | echo "configure:1427: checking for off_t" >&5 |
c906108c SS |
1427 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1428 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1429 | else | |
1430 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1431 | #line 1432 "configure" |
c906108c SS |
1432 | #include "confdefs.h" |
1433 | #include <sys/types.h> | |
1434 | #if STDC_HEADERS | |
1435 | #include <stdlib.h> | |
1436 | #include <stddef.h> | |
1437 | #endif | |
1438 | EOF | |
1439 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1440 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1441 | rm -rf conftest* | |
1442 | ac_cv_type_off_t=yes | |
1443 | else | |
1444 | rm -rf conftest* | |
1445 | ac_cv_type_off_t=no | |
1446 | fi | |
1447 | rm -f conftest* | |
1448 | ||
1449 | fi | |
1450 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1451 | if test $ac_cv_type_off_t = no; then | |
1452 | cat >> confdefs.h <<\EOF | |
1453 | #define off_t long | |
1454 | EOF | |
1455 | ||
1456 | fi | |
1457 | ||
1458 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
b4df4f68 | 1459 | echo "configure:1460: checking for size_t" >&5 |
c906108c SS |
1460 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1461 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1462 | else | |
1463 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1464 | #line 1465 "configure" |
c906108c SS |
1465 | #include "confdefs.h" |
1466 | #include <sys/types.h> | |
1467 | #if STDC_HEADERS | |
1468 | #include <stdlib.h> | |
1469 | #include <stddef.h> | |
1470 | #endif | |
1471 | EOF | |
1472 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1473 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1474 | rm -rf conftest* | |
1475 | ac_cv_type_size_t=yes | |
1476 | else | |
1477 | rm -rf conftest* | |
1478 | ac_cv_type_size_t=no | |
1479 | fi | |
1480 | rm -f conftest* | |
1481 | ||
1482 | fi | |
1483 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1484 | if test $ac_cv_type_size_t = no; then | |
1485 | cat >> confdefs.h <<\EOF | |
1486 | #define size_t unsigned | |
1487 | EOF | |
1488 | ||
1489 | fi | |
1490 | ||
1491 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1492 | # for constant arguments. Useless! | |
1493 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
b4df4f68 | 1494 | echo "configure:1495: checking for working alloca.h" >&5 |
c906108c SS |
1495 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1497 | else | |
1498 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1499 | #line 1500 "configure" |
c906108c SS |
1500 | #include "confdefs.h" |
1501 | #include <alloca.h> | |
1502 | int main() { | |
1503 | char *p = alloca(2 * sizeof(int)); | |
1504 | ; return 0; } | |
1505 | EOF | |
b4df4f68 | 1506 | if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1507 | rm -rf conftest* |
1508 | ac_cv_header_alloca_h=yes | |
1509 | else | |
1510 | echo "configure: failed program was:" >&5 | |
1511 | cat conftest.$ac_ext >&5 | |
1512 | rm -rf conftest* | |
1513 | ac_cv_header_alloca_h=no | |
1514 | fi | |
1515 | rm -f conftest* | |
1516 | fi | |
1517 | ||
1518 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1519 | if test $ac_cv_header_alloca_h = yes; then | |
1520 | cat >> confdefs.h <<\EOF | |
1521 | #define HAVE_ALLOCA_H 1 | |
1522 | EOF | |
1523 | ||
1524 | fi | |
1525 | ||
1526 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
b4df4f68 | 1527 | echo "configure:1528: checking for alloca" >&5 |
c906108c SS |
1528 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1530 | else | |
1531 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1532 | #line 1533 "configure" |
c906108c SS |
1533 | #include "confdefs.h" |
1534 | ||
1535 | #ifdef __GNUC__ | |
1536 | # define alloca __builtin_alloca | |
1537 | #else | |
1538 | # ifdef _MSC_VER | |
1539 | # include <malloc.h> | |
1540 | # define alloca _alloca | |
1541 | # else | |
1542 | # if HAVE_ALLOCA_H | |
1543 | # include <alloca.h> | |
1544 | # else | |
1545 | # ifdef _AIX | |
1546 | #pragma alloca | |
1547 | # else | |
1548 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1549 | char *alloca (); | |
1550 | # endif | |
1551 | # endif | |
1552 | # endif | |
1553 | # endif | |
1554 | #endif | |
1555 | ||
1556 | int main() { | |
1557 | char *p = (char *) alloca(1); | |
1558 | ; return 0; } | |
1559 | EOF | |
b4df4f68 | 1560 | if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1561 | rm -rf conftest* |
1562 | ac_cv_func_alloca_works=yes | |
1563 | else | |
1564 | echo "configure: failed program was:" >&5 | |
1565 | cat conftest.$ac_ext >&5 | |
1566 | rm -rf conftest* | |
1567 | ac_cv_func_alloca_works=no | |
1568 | fi | |
1569 | rm -f conftest* | |
1570 | fi | |
1571 | ||
1572 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1573 | if test $ac_cv_func_alloca_works = yes; then | |
1574 | cat >> confdefs.h <<\EOF | |
1575 | #define HAVE_ALLOCA 1 | |
1576 | EOF | |
1577 | ||
1578 | fi | |
1579 | ||
1580 | if test $ac_cv_func_alloca_works = no; then | |
1581 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1582 | # that cause trouble. Some versions do not even contain alloca or | |
1583 | # contain a buggy version. If you still want to use their alloca, | |
1584 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1585 | ALLOCA=alloca.${ac_objext} | |
1586 | cat >> confdefs.h <<\EOF | |
1587 | #define C_ALLOCA 1 | |
1588 | EOF | |
1589 | ||
1590 | ||
1591 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
b4df4f68 | 1592 | echo "configure:1593: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1593 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1594 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1595 | else | |
1596 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1597 | #line 1598 "configure" |
c906108c SS |
1598 | #include "confdefs.h" |
1599 | #if defined(CRAY) && ! defined(CRAY2) | |
1600 | webecray | |
1601 | #else | |
1602 | wenotbecray | |
1603 | #endif | |
1604 | ||
1605 | EOF | |
1606 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1607 | egrep "webecray" >/dev/null 2>&1; then | |
1608 | rm -rf conftest* | |
1609 | ac_cv_os_cray=yes | |
1610 | else | |
1611 | rm -rf conftest* | |
1612 | ac_cv_os_cray=no | |
1613 | fi | |
1614 | rm -f conftest* | |
1615 | ||
1616 | fi | |
1617 | ||
1618 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1619 | if test $ac_cv_os_cray = yes; then | |
1620 | for ac_func in _getb67 GETB67 getb67; do | |
1621 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 1622 | echo "configure:1623: checking for $ac_func" >&5 |
c906108c SS |
1623 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1624 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1625 | else | |
1626 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1627 | #line 1628 "configure" |
c906108c SS |
1628 | #include "confdefs.h" |
1629 | /* System header to define __stub macros and hopefully few prototypes, | |
1630 | which can conflict with char $ac_func(); below. */ | |
1631 | #include <assert.h> | |
1632 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1633 | /* We use char because int might match the return type of a gcc2 | |
1634 | builtin and then its argument prototype would still apply. */ | |
1635 | char $ac_func(); | |
1636 | ||
1637 | int main() { | |
1638 | ||
1639 | /* The GNU C library defines this for functions which it implements | |
1640 | to always fail with ENOSYS. Some functions are actually named | |
1641 | something starting with __ and the normal name is an alias. */ | |
1642 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1643 | choke me | |
1644 | #else | |
1645 | $ac_func(); | |
1646 | #endif | |
1647 | ||
1648 | ; return 0; } | |
1649 | EOF | |
b4df4f68 | 1650 | if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1651 | rm -rf conftest* |
1652 | eval "ac_cv_func_$ac_func=yes" | |
1653 | else | |
1654 | echo "configure: failed program was:" >&5 | |
1655 | cat conftest.$ac_ext >&5 | |
1656 | rm -rf conftest* | |
1657 | eval "ac_cv_func_$ac_func=no" | |
1658 | fi | |
1659 | rm -f conftest* | |
1660 | fi | |
1661 | ||
1662 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1663 | echo "$ac_t""yes" 1>&6 | |
1664 | cat >> confdefs.h <<EOF | |
1665 | #define CRAY_STACKSEG_END $ac_func | |
1666 | EOF | |
1667 | ||
1668 | break | |
1669 | else | |
1670 | echo "$ac_t""no" 1>&6 | |
1671 | fi | |
1672 | ||
1673 | done | |
1674 | fi | |
1675 | ||
1676 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
b4df4f68 | 1677 | echo "configure:1678: checking stack direction for C alloca" >&5 |
c906108c SS |
1678 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1679 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1680 | else | |
1681 | if test "$cross_compiling" = yes; then | |
1682 | ac_cv_c_stack_direction=0 | |
1683 | else | |
1684 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1685 | #line 1686 "configure" |
c906108c SS |
1686 | #include "confdefs.h" |
1687 | find_stack_direction () | |
1688 | { | |
1689 | static char *addr = 0; | |
1690 | auto char dummy; | |
1691 | if (addr == 0) | |
1692 | { | |
1693 | addr = &dummy; | |
1694 | return find_stack_direction (); | |
1695 | } | |
1696 | else | |
1697 | return (&dummy > addr) ? 1 : -1; | |
1698 | } | |
1699 | main () | |
1700 | { | |
1701 | exit (find_stack_direction() < 0); | |
1702 | } | |
1703 | EOF | |
b4df4f68 | 1704 | if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1705 | then |
1706 | ac_cv_c_stack_direction=1 | |
1707 | else | |
1708 | echo "configure: failed program was:" >&5 | |
1709 | cat conftest.$ac_ext >&5 | |
1710 | rm -fr conftest* | |
1711 | ac_cv_c_stack_direction=-1 | |
1712 | fi | |
1713 | rm -fr conftest* | |
1714 | fi | |
1715 | ||
1716 | fi | |
1717 | ||
1718 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1719 | cat >> confdefs.h <<EOF | |
1720 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1721 | EOF | |
1722 | ||
1723 | fi | |
1724 | ||
1725 | for ac_hdr in unistd.h | |
1726 | do | |
1727 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1728 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b4df4f68 | 1729 | echo "configure:1730: checking for $ac_hdr" >&5 |
c906108c SS |
1730 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1731 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1732 | else | |
1733 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1734 | #line 1735 "configure" |
c906108c SS |
1735 | #include "confdefs.h" |
1736 | #include <$ac_hdr> | |
1737 | EOF | |
1738 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 1739 | { (eval echo configure:1740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1740 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1741 | if test -z "$ac_err"; then | |
1742 | rm -rf conftest* | |
1743 | eval "ac_cv_header_$ac_safe=yes" | |
1744 | else | |
1745 | echo "$ac_err" >&5 | |
1746 | echo "configure: failed program was:" >&5 | |
1747 | cat conftest.$ac_ext >&5 | |
1748 | rm -rf conftest* | |
1749 | eval "ac_cv_header_$ac_safe=no" | |
1750 | fi | |
1751 | rm -f conftest* | |
1752 | fi | |
1753 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1754 | echo "$ac_t""yes" 1>&6 | |
1755 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1756 | cat >> confdefs.h <<EOF | |
1757 | #define $ac_tr_hdr 1 | |
1758 | EOF | |
1759 | ||
1760 | else | |
1761 | echo "$ac_t""no" 1>&6 | |
1762 | fi | |
1763 | done | |
1764 | ||
1765 | for ac_func in getpagesize | |
1766 | do | |
1767 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 1768 | echo "configure:1769: checking for $ac_func" >&5 |
c906108c SS |
1769 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1771 | else | |
1772 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1773 | #line 1774 "configure" |
c906108c SS |
1774 | #include "confdefs.h" |
1775 | /* System header to define __stub macros and hopefully few prototypes, | |
1776 | which can conflict with char $ac_func(); below. */ | |
1777 | #include <assert.h> | |
1778 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1779 | /* We use char because int might match the return type of a gcc2 | |
1780 | builtin and then its argument prototype would still apply. */ | |
1781 | char $ac_func(); | |
1782 | ||
1783 | int main() { | |
1784 | ||
1785 | /* The GNU C library defines this for functions which it implements | |
1786 | to always fail with ENOSYS. Some functions are actually named | |
1787 | something starting with __ and the normal name is an alias. */ | |
1788 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1789 | choke me | |
1790 | #else | |
1791 | $ac_func(); | |
1792 | #endif | |
1793 | ||
1794 | ; return 0; } | |
1795 | EOF | |
b4df4f68 | 1796 | if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1797 | rm -rf conftest* |
1798 | eval "ac_cv_func_$ac_func=yes" | |
1799 | else | |
1800 | echo "configure: failed program was:" >&5 | |
1801 | cat conftest.$ac_ext >&5 | |
1802 | rm -rf conftest* | |
1803 | eval "ac_cv_func_$ac_func=no" | |
1804 | fi | |
1805 | rm -f conftest* | |
1806 | fi | |
1807 | ||
1808 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1809 | echo "$ac_t""yes" 1>&6 | |
1810 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1811 | cat >> confdefs.h <<EOF | |
1812 | #define $ac_tr_func 1 | |
1813 | EOF | |
1814 | ||
1815 | else | |
1816 | echo "$ac_t""no" 1>&6 | |
1817 | fi | |
1818 | done | |
1819 | ||
1820 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
b4df4f68 | 1821 | echo "configure:1822: checking for working mmap" >&5 |
c906108c SS |
1822 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1823 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1824 | else | |
1825 | if test "$cross_compiling" = yes; then | |
1826 | ac_cv_func_mmap_fixed_mapped=no | |
1827 | else | |
1828 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 1829 | #line 1830 "configure" |
c906108c SS |
1830 | #include "confdefs.h" |
1831 | ||
1832 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1833 | Here is a matrix of mmap possibilities: | |
1834 | mmap private not fixed | |
1835 | mmap private fixed at somewhere currently unmapped | |
1836 | mmap private fixed at somewhere already mapped | |
1837 | mmap shared not fixed | |
1838 | mmap shared fixed at somewhere currently unmapped | |
1839 | mmap shared fixed at somewhere already mapped | |
1840 | For private mappings, we should verify that changes cannot be read() | |
1841 | back from the file, nor mmap's back from the file at a different | |
1842 | address. (There have been systems where private was not correctly | |
1843 | implemented like the infamous i386 svr4.0, and systems where the | |
1844 | VM page cache was not coherent with the filesystem buffer cache | |
1845 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1846 | For shared mappings, we should conversely verify that changes get | |
1847 | propogated back to all the places they're supposed to be. | |
1848 | ||
1849 | Grep wants private fixed already mapped. | |
1850 | The main things grep needs to know about mmap are: | |
1851 | * does it exist and is it safe to write into the mmap'd area | |
1852 | * how to use it (BSD variants) */ | |
1853 | #include <sys/types.h> | |
1854 | #include <fcntl.h> | |
1855 | #include <sys/mman.h> | |
1856 | ||
1857 | /* This mess was copied from the GNU getpagesize.h. */ | |
1858 | #ifndef HAVE_GETPAGESIZE | |
1859 | # ifdef HAVE_UNISTD_H | |
1860 | # include <unistd.h> | |
1861 | # endif | |
1862 | ||
1863 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1864 | # ifndef HAVE_SYS_PARAM_H | |
1865 | # define HAVE_SYS_PARAM_H 1 | |
1866 | # endif | |
1867 | ||
1868 | # ifdef _SC_PAGESIZE | |
1869 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1870 | # else /* no _SC_PAGESIZE */ | |
1871 | # ifdef HAVE_SYS_PARAM_H | |
1872 | # include <sys/param.h> | |
1873 | # ifdef EXEC_PAGESIZE | |
1874 | # define getpagesize() EXEC_PAGESIZE | |
1875 | # else /* no EXEC_PAGESIZE */ | |
1876 | # ifdef NBPG | |
1877 | # define getpagesize() NBPG * CLSIZE | |
1878 | # ifndef CLSIZE | |
1879 | # define CLSIZE 1 | |
1880 | # endif /* no CLSIZE */ | |
1881 | # else /* no NBPG */ | |
1882 | # ifdef NBPC | |
1883 | # define getpagesize() NBPC | |
1884 | # else /* no NBPC */ | |
1885 | # ifdef PAGESIZE | |
1886 | # define getpagesize() PAGESIZE | |
1887 | # endif /* PAGESIZE */ | |
1888 | # endif /* no NBPC */ | |
1889 | # endif /* no NBPG */ | |
1890 | # endif /* no EXEC_PAGESIZE */ | |
1891 | # else /* no HAVE_SYS_PARAM_H */ | |
1892 | # define getpagesize() 8192 /* punt totally */ | |
1893 | # endif /* no HAVE_SYS_PARAM_H */ | |
1894 | # endif /* no _SC_PAGESIZE */ | |
1895 | ||
1896 | #endif /* no HAVE_GETPAGESIZE */ | |
1897 | ||
1898 | #ifdef __cplusplus | |
1899 | extern "C" { void *malloc(unsigned); } | |
1900 | #else | |
1901 | char *malloc(); | |
1902 | #endif | |
1903 | ||
1904 | int | |
1905 | main() | |
1906 | { | |
1907 | char *data, *data2, *data3; | |
1908 | int i, pagesize; | |
1909 | int fd; | |
1910 | ||
1911 | pagesize = getpagesize(); | |
1912 | ||
1913 | /* | |
1914 | * First, make a file with some known garbage in it. | |
1915 | */ | |
1916 | data = malloc(pagesize); | |
1917 | if (!data) | |
1918 | exit(1); | |
1919 | for (i = 0; i < pagesize; ++i) | |
1920 | *(data + i) = rand(); | |
1921 | umask(0); | |
1922 | fd = creat("conftestmmap", 0600); | |
1923 | if (fd < 0) | |
1924 | exit(1); | |
1925 | if (write(fd, data, pagesize) != pagesize) | |
1926 | exit(1); | |
1927 | close(fd); | |
1928 | ||
1929 | /* | |
1930 | * Next, try to mmap the file at a fixed address which | |
1931 | * already has something else allocated at it. If we can, | |
1932 | * also make sure that we see the same garbage. | |
1933 | */ | |
1934 | fd = open("conftestmmap", O_RDWR); | |
1935 | if (fd < 0) | |
1936 | exit(1); | |
1937 | data2 = malloc(2 * pagesize); | |
1938 | if (!data2) | |
1939 | exit(1); | |
1940 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1941 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1942 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1943 | exit(1); | |
1944 | for (i = 0; i < pagesize; ++i) | |
1945 | if (*(data + i) != *(data2 + i)) | |
1946 | exit(1); | |
1947 | ||
1948 | /* | |
1949 | * Finally, make sure that changes to the mapped area | |
1950 | * do not percolate back to the file as seen by read(). | |
1951 | * (This is a bug on some variants of i386 svr4.0.) | |
1952 | */ | |
1953 | for (i = 0; i < pagesize; ++i) | |
1954 | *(data2 + i) = *(data2 + i) + 1; | |
1955 | data3 = malloc(pagesize); | |
1956 | if (!data3) | |
1957 | exit(1); | |
1958 | if (read(fd, data3, pagesize) != pagesize) | |
1959 | exit(1); | |
1960 | for (i = 0; i < pagesize; ++i) | |
1961 | if (*(data + i) != *(data3 + i)) | |
1962 | exit(1); | |
1963 | close(fd); | |
1964 | unlink("conftestmmap"); | |
1965 | exit(0); | |
1966 | } | |
1967 | ||
1968 | EOF | |
b4df4f68 | 1969 | if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1970 | then |
1971 | ac_cv_func_mmap_fixed_mapped=yes | |
1972 | else | |
1973 | echo "configure: failed program was:" >&5 | |
1974 | cat conftest.$ac_ext >&5 | |
1975 | rm -fr conftest* | |
1976 | ac_cv_func_mmap_fixed_mapped=no | |
1977 | fi | |
1978 | rm -fr conftest* | |
1979 | fi | |
1980 | ||
1981 | fi | |
1982 | ||
1983 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1984 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1985 | cat >> confdefs.h <<\EOF | |
1986 | #define HAVE_MMAP 1 | |
1987 | EOF | |
1988 | ||
1989 | fi | |
1990 | ||
1991 | ||
1992 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1993 | unistd.h values.h sys/param.h | |
1994 | do | |
1995 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1996 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b4df4f68 | 1997 | echo "configure:1998: checking for $ac_hdr" >&5 |
c906108c SS |
1998 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1999 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2000 | else | |
2001 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2002 | #line 2003 "configure" |
c906108c SS |
2003 | #include "confdefs.h" |
2004 | #include <$ac_hdr> | |
2005 | EOF | |
2006 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 2007 | { (eval echo configure:2008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2008 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2009 | if test -z "$ac_err"; then | |
2010 | rm -rf conftest* | |
2011 | eval "ac_cv_header_$ac_safe=yes" | |
2012 | else | |
2013 | echo "$ac_err" >&5 | |
2014 | echo "configure: failed program was:" >&5 | |
2015 | cat conftest.$ac_ext >&5 | |
2016 | rm -rf conftest* | |
2017 | eval "ac_cv_header_$ac_safe=no" | |
2018 | fi | |
2019 | rm -f conftest* | |
2020 | fi | |
2021 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2022 | echo "$ac_t""yes" 1>&6 | |
2023 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2024 | cat >> confdefs.h <<EOF | |
2025 | #define $ac_tr_hdr 1 | |
2026 | EOF | |
2027 | ||
2028 | else | |
2029 | echo "$ac_t""no" 1>&6 | |
2030 | fi | |
2031 | done | |
2032 | ||
2033 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2034 | __argz_count __argz_stringify __argz_next | |
2035 | do | |
2036 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 2037 | echo "configure:2038: checking for $ac_func" >&5 |
c906108c SS |
2038 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2040 | else | |
2041 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2042 | #line 2043 "configure" |
c906108c SS |
2043 | #include "confdefs.h" |
2044 | /* System header to define __stub macros and hopefully few prototypes, | |
2045 | which can conflict with char $ac_func(); below. */ | |
2046 | #include <assert.h> | |
2047 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2048 | /* We use char because int might match the return type of a gcc2 | |
2049 | builtin and then its argument prototype would still apply. */ | |
2050 | char $ac_func(); | |
2051 | ||
2052 | int main() { | |
2053 | ||
2054 | /* The GNU C library defines this for functions which it implements | |
2055 | to always fail with ENOSYS. Some functions are actually named | |
2056 | something starting with __ and the normal name is an alias. */ | |
2057 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2058 | choke me | |
2059 | #else | |
2060 | $ac_func(); | |
2061 | #endif | |
2062 | ||
2063 | ; return 0; } | |
2064 | EOF | |
b4df4f68 | 2065 | if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2066 | rm -rf conftest* |
2067 | eval "ac_cv_func_$ac_func=yes" | |
2068 | else | |
2069 | echo "configure: failed program was:" >&5 | |
2070 | cat conftest.$ac_ext >&5 | |
2071 | rm -rf conftest* | |
2072 | eval "ac_cv_func_$ac_func=no" | |
2073 | fi | |
2074 | rm -f conftest* | |
2075 | fi | |
2076 | ||
2077 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2078 | echo "$ac_t""yes" 1>&6 | |
2079 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2080 | cat >> confdefs.h <<EOF | |
2081 | #define $ac_tr_func 1 | |
2082 | EOF | |
2083 | ||
2084 | else | |
2085 | echo "$ac_t""no" 1>&6 | |
2086 | fi | |
2087 | done | |
2088 | ||
2089 | ||
2090 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2091 | for ac_func in stpcpy | |
2092 | do | |
2093 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 2094 | echo "configure:2095: checking for $ac_func" >&5 |
c906108c SS |
2095 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2096 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2097 | else | |
2098 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2099 | #line 2100 "configure" |
c906108c SS |
2100 | #include "confdefs.h" |
2101 | /* System header to define __stub macros and hopefully few prototypes, | |
2102 | which can conflict with char $ac_func(); below. */ | |
2103 | #include <assert.h> | |
2104 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2105 | /* We use char because int might match the return type of a gcc2 | |
2106 | builtin and then its argument prototype would still apply. */ | |
2107 | char $ac_func(); | |
2108 | ||
2109 | int main() { | |
2110 | ||
2111 | /* The GNU C library defines this for functions which it implements | |
2112 | to always fail with ENOSYS. Some functions are actually named | |
2113 | something starting with __ and the normal name is an alias. */ | |
2114 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2115 | choke me | |
2116 | #else | |
2117 | $ac_func(); | |
2118 | #endif | |
2119 | ||
2120 | ; return 0; } | |
2121 | EOF | |
b4df4f68 | 2122 | if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2123 | rm -rf conftest* |
2124 | eval "ac_cv_func_$ac_func=yes" | |
2125 | else | |
2126 | echo "configure: failed program was:" >&5 | |
2127 | cat conftest.$ac_ext >&5 | |
2128 | rm -rf conftest* | |
2129 | eval "ac_cv_func_$ac_func=no" | |
2130 | fi | |
2131 | rm -f conftest* | |
2132 | fi | |
2133 | ||
2134 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2135 | echo "$ac_t""yes" 1>&6 | |
2136 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2137 | cat >> confdefs.h <<EOF | |
2138 | #define $ac_tr_func 1 | |
2139 | EOF | |
2140 | ||
2141 | else | |
2142 | echo "$ac_t""no" 1>&6 | |
2143 | fi | |
2144 | done | |
2145 | ||
2146 | fi | |
2147 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2148 | cat >> confdefs.h <<\EOF | |
2149 | #define HAVE_STPCPY 1 | |
2150 | EOF | |
2151 | ||
2152 | fi | |
2153 | ||
2154 | if test $ac_cv_header_locale_h = yes; then | |
2155 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
b4df4f68 | 2156 | echo "configure:2157: checking for LC_MESSAGES" >&5 |
c906108c SS |
2157 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2159 | else | |
2160 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2161 | #line 2162 "configure" |
c906108c SS |
2162 | #include "confdefs.h" |
2163 | #include <locale.h> | |
2164 | int main() { | |
2165 | return LC_MESSAGES | |
2166 | ; return 0; } | |
2167 | EOF | |
b4df4f68 | 2168 | if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2169 | rm -rf conftest* |
2170 | am_cv_val_LC_MESSAGES=yes | |
2171 | else | |
2172 | echo "configure: failed program was:" >&5 | |
2173 | cat conftest.$ac_ext >&5 | |
2174 | rm -rf conftest* | |
2175 | am_cv_val_LC_MESSAGES=no | |
2176 | fi | |
2177 | rm -f conftest* | |
2178 | fi | |
2179 | ||
2180 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2181 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2182 | cat >> confdefs.h <<\EOF | |
2183 | #define HAVE_LC_MESSAGES 1 | |
2184 | EOF | |
2185 | ||
2186 | fi | |
2187 | fi | |
2188 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
b4df4f68 | 2189 | echo "configure:2190: checking whether NLS is requested" >&5 |
c906108c SS |
2190 | # Check whether --enable-nls or --disable-nls was given. |
2191 | if test "${enable_nls+set}" = set; then | |
2192 | enableval="$enable_nls" | |
2193 | USE_NLS=$enableval | |
2194 | else | |
2195 | USE_NLS=yes | |
2196 | fi | |
2197 | ||
2198 | echo "$ac_t""$USE_NLS" 1>&6 | |
2199 | ||
2200 | ||
2201 | USE_INCLUDED_LIBINTL=no | |
2202 | ||
2203 | if test "$USE_NLS" = "yes"; then | |
2204 | cat >> confdefs.h <<\EOF | |
2205 | #define ENABLE_NLS 1 | |
2206 | EOF | |
2207 | ||
2208 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
b4df4f68 | 2209 | echo "configure:2210: checking whether included gettext is requested" >&5 |
c906108c SS |
2210 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2211 | if test "${with_included_gettext+set}" = set; then | |
2212 | withval="$with_included_gettext" | |
2213 | nls_cv_force_use_gnu_gettext=$withval | |
2214 | else | |
2215 | nls_cv_force_use_gnu_gettext=no | |
2216 | fi | |
2217 | ||
2218 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2219 | ||
2220 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2221 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2222 | nls_cv_header_intl= | |
2223 | nls_cv_header_libgt= | |
2224 | CATOBJEXT=NONE | |
2225 | ||
2226 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2227 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
b4df4f68 | 2228 | echo "configure:2229: checking for libintl.h" >&5 |
c906108c SS |
2229 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2231 | else | |
2232 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2233 | #line 2234 "configure" |
c906108c SS |
2234 | #include "confdefs.h" |
2235 | #include <libintl.h> | |
2236 | EOF | |
2237 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 2238 | { (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2239 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2240 | if test -z "$ac_err"; then | |
2241 | rm -rf conftest* | |
2242 | eval "ac_cv_header_$ac_safe=yes" | |
2243 | else | |
2244 | echo "$ac_err" >&5 | |
2245 | echo "configure: failed program was:" >&5 | |
2246 | cat conftest.$ac_ext >&5 | |
2247 | rm -rf conftest* | |
2248 | eval "ac_cv_header_$ac_safe=no" | |
2249 | fi | |
2250 | rm -f conftest* | |
2251 | fi | |
2252 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2253 | echo "$ac_t""yes" 1>&6 | |
2254 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
b4df4f68 | 2255 | echo "configure:2256: checking for gettext in libc" >&5 |
c906108c SS |
2256 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2257 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2258 | else | |
2259 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2260 | #line 2261 "configure" |
c906108c SS |
2261 | #include "confdefs.h" |
2262 | #include <libintl.h> | |
2263 | int main() { | |
2264 | return (int) gettext ("") | |
2265 | ; return 0; } | |
2266 | EOF | |
b4df4f68 | 2267 | if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2268 | rm -rf conftest* |
2269 | gt_cv_func_gettext_libc=yes | |
2270 | else | |
2271 | echo "configure: failed program was:" >&5 | |
2272 | cat conftest.$ac_ext >&5 | |
2273 | rm -rf conftest* | |
2274 | gt_cv_func_gettext_libc=no | |
2275 | fi | |
2276 | rm -f conftest* | |
2277 | fi | |
2278 | ||
2279 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2280 | ||
2281 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2282 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
b4df4f68 | 2283 | echo "configure:2284: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2284 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2285 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2286 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2287 | else | |
2288 | ac_save_LIBS="$LIBS" | |
2289 | LIBS="-lintl $LIBS" | |
2290 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2291 | #line 2292 "configure" |
c906108c SS |
2292 | #include "confdefs.h" |
2293 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2294 | /* We use char because int might match the return type of a gcc2 | |
2295 | builtin and then its argument prototype would still apply. */ | |
2296 | char bindtextdomain(); | |
2297 | ||
2298 | int main() { | |
2299 | bindtextdomain() | |
2300 | ; return 0; } | |
2301 | EOF | |
b4df4f68 | 2302 | if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2303 | rm -rf conftest* |
2304 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2305 | else | |
2306 | echo "configure: failed program was:" >&5 | |
2307 | cat conftest.$ac_ext >&5 | |
2308 | rm -rf conftest* | |
2309 | eval "ac_cv_lib_$ac_lib_var=no" | |
2310 | fi | |
2311 | rm -f conftest* | |
2312 | LIBS="$ac_save_LIBS" | |
2313 | ||
2314 | fi | |
2315 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2316 | echo "$ac_t""yes" 1>&6 | |
2317 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
b4df4f68 | 2318 | echo "configure:2319: checking for gettext in libintl" >&5 |
c906108c SS |
2319 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2320 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2321 | else | |
2322 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2323 | #line 2324 "configure" |
c906108c SS |
2324 | #include "confdefs.h" |
2325 | ||
2326 | int main() { | |
2327 | return (int) gettext ("") | |
2328 | ; return 0; } | |
2329 | EOF | |
b4df4f68 | 2330 | if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2331 | rm -rf conftest* |
2332 | gt_cv_func_gettext_libintl=yes | |
2333 | else | |
2334 | echo "configure: failed program was:" >&5 | |
2335 | cat conftest.$ac_ext >&5 | |
2336 | rm -rf conftest* | |
2337 | gt_cv_func_gettext_libintl=no | |
2338 | fi | |
2339 | rm -f conftest* | |
2340 | fi | |
2341 | ||
2342 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2343 | else | |
2344 | echo "$ac_t""no" 1>&6 | |
2345 | fi | |
2346 | ||
2347 | fi | |
2348 | ||
2349 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2350 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2351 | cat >> confdefs.h <<\EOF | |
2352 | #define HAVE_GETTEXT 1 | |
2353 | EOF | |
2354 | ||
2355 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2356 | set dummy msgfmt; ac_word=$2 | |
2357 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2358 | echo "configure:2359: checking for $ac_word" >&5 |
c906108c SS |
2359 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2360 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2361 | else | |
2362 | case "$MSGFMT" in | |
2363 | /*) | |
2364 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2365 | ;; | |
2366 | *) | |
2367 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2368 | for ac_dir in $PATH; do | |
2369 | test -z "$ac_dir" && ac_dir=. | |
2370 | if test -f $ac_dir/$ac_word; then | |
2371 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2372 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2373 | break | |
2374 | fi | |
2375 | fi | |
2376 | done | |
2377 | IFS="$ac_save_ifs" | |
2378 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2379 | ;; | |
2380 | esac | |
2381 | fi | |
2382 | MSGFMT="$ac_cv_path_MSGFMT" | |
2383 | if test -n "$MSGFMT"; then | |
2384 | echo "$ac_t""$MSGFMT" 1>&6 | |
2385 | else | |
2386 | echo "$ac_t""no" 1>&6 | |
2387 | fi | |
2388 | if test "$MSGFMT" != "no"; then | |
2389 | for ac_func in dcgettext | |
2390 | do | |
2391 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 2392 | echo "configure:2393: checking for $ac_func" >&5 |
c906108c SS |
2393 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2395 | else | |
2396 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2397 | #line 2398 "configure" |
c906108c SS |
2398 | #include "confdefs.h" |
2399 | /* System header to define __stub macros and hopefully few prototypes, | |
2400 | which can conflict with char $ac_func(); below. */ | |
2401 | #include <assert.h> | |
2402 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2403 | /* We use char because int might match the return type of a gcc2 | |
2404 | builtin and then its argument prototype would still apply. */ | |
2405 | char $ac_func(); | |
2406 | ||
2407 | int main() { | |
2408 | ||
2409 | /* The GNU C library defines this for functions which it implements | |
2410 | to always fail with ENOSYS. Some functions are actually named | |
2411 | something starting with __ and the normal name is an alias. */ | |
2412 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2413 | choke me | |
2414 | #else | |
2415 | $ac_func(); | |
2416 | #endif | |
2417 | ||
2418 | ; return 0; } | |
2419 | EOF | |
b4df4f68 | 2420 | if { (eval echo configure:2421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2421 | rm -rf conftest* |
2422 | eval "ac_cv_func_$ac_func=yes" | |
2423 | else | |
2424 | echo "configure: failed program was:" >&5 | |
2425 | cat conftest.$ac_ext >&5 | |
2426 | rm -rf conftest* | |
2427 | eval "ac_cv_func_$ac_func=no" | |
2428 | fi | |
2429 | rm -f conftest* | |
2430 | fi | |
2431 | ||
2432 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2433 | echo "$ac_t""yes" 1>&6 | |
2434 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2435 | cat >> confdefs.h <<EOF | |
2436 | #define $ac_tr_func 1 | |
2437 | EOF | |
2438 | ||
2439 | else | |
2440 | echo "$ac_t""no" 1>&6 | |
2441 | fi | |
2442 | done | |
2443 | ||
2444 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2445 | set dummy gmsgfmt; ac_word=$2 | |
2446 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2447 | echo "configure:2448: checking for $ac_word" >&5 |
c906108c SS |
2448 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2449 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2450 | else | |
2451 | case "$GMSGFMT" in | |
2452 | /*) | |
2453 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2454 | ;; | |
2455 | ?:/*) | |
2456 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2457 | ;; | |
2458 | *) | |
2459 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2460 | ac_dummy="$PATH" | |
2461 | for ac_dir in $ac_dummy; do | |
2462 | test -z "$ac_dir" && ac_dir=. | |
2463 | if test -f $ac_dir/$ac_word; then | |
2464 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2465 | break | |
2466 | fi | |
2467 | done | |
2468 | IFS="$ac_save_ifs" | |
2469 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2470 | ;; | |
2471 | esac | |
2472 | fi | |
2473 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2474 | if test -n "$GMSGFMT"; then | |
2475 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2476 | else | |
2477 | echo "$ac_t""no" 1>&6 | |
2478 | fi | |
2479 | ||
2480 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2481 | set dummy xgettext; ac_word=$2 | |
2482 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2483 | echo "configure:2484: checking for $ac_word" >&5 |
c906108c SS |
2484 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2485 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2486 | else | |
2487 | case "$XGETTEXT" in | |
2488 | /*) | |
2489 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2490 | ;; | |
2491 | *) | |
2492 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2493 | for ac_dir in $PATH; do | |
2494 | test -z "$ac_dir" && ac_dir=. | |
2495 | if test -f $ac_dir/$ac_word; then | |
2496 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2497 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2498 | break | |
2499 | fi | |
2500 | fi | |
2501 | done | |
2502 | IFS="$ac_save_ifs" | |
2503 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2504 | ;; | |
2505 | esac | |
2506 | fi | |
2507 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2508 | if test -n "$XGETTEXT"; then | |
2509 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2510 | else | |
2511 | echo "$ac_t""no" 1>&6 | |
2512 | fi | |
2513 | ||
2514 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2515 | #line 2516 "configure" |
c906108c SS |
2516 | #include "confdefs.h" |
2517 | ||
2518 | int main() { | |
2519 | extern int _nl_msg_cat_cntr; | |
2520 | return _nl_msg_cat_cntr | |
2521 | ; return 0; } | |
2522 | EOF | |
b4df4f68 | 2523 | if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2524 | rm -rf conftest* |
2525 | CATOBJEXT=.gmo | |
2526 | DATADIRNAME=share | |
2527 | else | |
2528 | echo "configure: failed program was:" >&5 | |
2529 | cat conftest.$ac_ext >&5 | |
2530 | rm -rf conftest* | |
2531 | CATOBJEXT=.mo | |
2532 | DATADIRNAME=lib | |
2533 | fi | |
2534 | rm -f conftest* | |
2535 | INSTOBJEXT=.mo | |
2536 | fi | |
2537 | fi | |
2538 | ||
2539 | else | |
2540 | echo "$ac_t""no" 1>&6 | |
2541 | fi | |
2542 | ||
2543 | ||
2544 | ||
2545 | if test "$CATOBJEXT" = "NONE"; then | |
2546 | nls_cv_use_gnu_gettext=yes | |
2547 | fi | |
2548 | fi | |
2549 | ||
2550 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2551 | INTLOBJS="\$(GETTOBJS)" | |
2552 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2553 | set dummy msgfmt; ac_word=$2 | |
2554 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2555 | echo "configure:2556: checking for $ac_word" >&5 |
c906108c SS |
2556 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2558 | else | |
2559 | case "$MSGFMT" in | |
2560 | /*) | |
2561 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2562 | ;; | |
2563 | *) | |
2564 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2565 | for ac_dir in $PATH; do | |
2566 | test -z "$ac_dir" && ac_dir=. | |
2567 | if test -f $ac_dir/$ac_word; then | |
2568 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2569 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2570 | break | |
2571 | fi | |
2572 | fi | |
2573 | done | |
2574 | IFS="$ac_save_ifs" | |
2575 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2576 | ;; | |
2577 | esac | |
2578 | fi | |
2579 | MSGFMT="$ac_cv_path_MSGFMT" | |
2580 | if test -n "$MSGFMT"; then | |
2581 | echo "$ac_t""$MSGFMT" 1>&6 | |
2582 | else | |
2583 | echo "$ac_t""no" 1>&6 | |
2584 | fi | |
2585 | ||
2586 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2587 | set dummy gmsgfmt; ac_word=$2 | |
2588 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2589 | echo "configure:2590: checking for $ac_word" >&5 |
c906108c SS |
2590 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2592 | else | |
2593 | case "$GMSGFMT" in | |
2594 | /*) | |
2595 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2596 | ;; | |
2597 | ?:/*) | |
2598 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2599 | ;; | |
2600 | *) | |
2601 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2602 | ac_dummy="$PATH" | |
2603 | for ac_dir in $ac_dummy; do | |
2604 | test -z "$ac_dir" && ac_dir=. | |
2605 | if test -f $ac_dir/$ac_word; then | |
2606 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2607 | break | |
2608 | fi | |
2609 | done | |
2610 | IFS="$ac_save_ifs" | |
2611 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2612 | ;; | |
2613 | esac | |
2614 | fi | |
2615 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2616 | if test -n "$GMSGFMT"; then | |
2617 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2618 | else | |
2619 | echo "$ac_t""no" 1>&6 | |
2620 | fi | |
2621 | ||
2622 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2623 | set dummy xgettext; ac_word=$2 | |
2624 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2625 | echo "configure:2626: checking for $ac_word" >&5 |
c906108c SS |
2626 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2627 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2628 | else | |
2629 | case "$XGETTEXT" in | |
2630 | /*) | |
2631 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2632 | ;; | |
2633 | *) | |
2634 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2635 | for ac_dir in $PATH; do | |
2636 | test -z "$ac_dir" && ac_dir=. | |
2637 | if test -f $ac_dir/$ac_word; then | |
2638 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2639 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2640 | break | |
2641 | fi | |
2642 | fi | |
2643 | done | |
2644 | IFS="$ac_save_ifs" | |
2645 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2646 | ;; | |
2647 | esac | |
2648 | fi | |
2649 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2650 | if test -n "$XGETTEXT"; then | |
2651 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2652 | else | |
2653 | echo "$ac_t""no" 1>&6 | |
2654 | fi | |
2655 | ||
2656 | ||
2657 | USE_INCLUDED_LIBINTL=yes | |
2658 | CATOBJEXT=.gmo | |
2659 | INSTOBJEXT=.mo | |
2660 | DATADIRNAME=share | |
2661 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2662 | INTLLIBS=$INTLDEPS | |
2663 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2664 | nls_cv_header_intl=libintl.h | |
2665 | nls_cv_header_libgt=libgettext.h | |
2666 | fi | |
2667 | ||
2668 | if test "$XGETTEXT" != ":"; then | |
2669 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2670 | : ; | |
2671 | else | |
2672 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2673 | XGETTEXT=":" | |
2674 | fi | |
2675 | fi | |
2676 | ||
2677 | # We need to process the po/ directory. | |
2678 | POSUB=po | |
2679 | else | |
2680 | DATADIRNAME=share | |
2681 | nls_cv_header_intl=libintl.h | |
2682 | nls_cv_header_libgt=libgettext.h | |
2683 | fi | |
2684 | ||
2685 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2686 | # because some of the sources are only built for this goal. | |
2687 | if test "$PACKAGE" = gettext; then | |
2688 | USE_NLS=yes | |
2689 | USE_INCLUDED_LIBINTL=yes | |
2690 | fi | |
2691 | ||
2692 | for lang in $ALL_LINGUAS; do | |
2693 | GMOFILES="$GMOFILES $lang.gmo" | |
2694 | POFILES="$POFILES $lang.po" | |
2695 | done | |
2696 | ||
2697 | ||
2698 | ||
2699 | ||
2700 | ||
2701 | ||
2702 | ||
2703 | ||
2704 | ||
2705 | ||
2706 | ||
2707 | ||
2708 | ||
2709 | ||
2710 | if test "x$CATOBJEXT" != "x"; then | |
2711 | if test "x$ALL_LINGUAS" = "x"; then | |
2712 | LINGUAS= | |
2713 | else | |
2714 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
b4df4f68 | 2715 | echo "configure:2716: checking for catalogs to be installed" >&5 |
c906108c SS |
2716 | NEW_LINGUAS= |
2717 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2718 | case "$ALL_LINGUAS" in | |
2719 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2720 | esac | |
2721 | done | |
2722 | LINGUAS=$NEW_LINGUAS | |
2723 | echo "$ac_t""$LINGUAS" 1>&6 | |
2724 | fi | |
2725 | ||
2726 | if test -n "$LINGUAS"; then | |
2727 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2728 | fi | |
2729 | fi | |
2730 | ||
2731 | if test $ac_cv_header_locale_h = yes; then | |
2732 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2733 | else | |
2734 | INCLUDE_LOCALE_H="\ | |
2735 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2736 | fi | |
2737 | ||
2738 | ||
2739 | if test -f $srcdir/po2tbl.sed.in; then | |
2740 | if test "$CATOBJEXT" = ".cat"; then | |
2741 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2742 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
b4df4f68 | 2743 | echo "configure:2744: checking for linux/version.h" >&5 |
c906108c SS |
2744 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2745 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2746 | else | |
2747 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 2748 | #line 2749 "configure" |
c906108c SS |
2749 | #include "confdefs.h" |
2750 | #include <linux/version.h> | |
2751 | EOF | |
2752 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 2753 | { (eval echo configure:2754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2754 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2755 | if test -z "$ac_err"; then | |
2756 | rm -rf conftest* | |
2757 | eval "ac_cv_header_$ac_safe=yes" | |
2758 | else | |
2759 | echo "$ac_err" >&5 | |
2760 | echo "configure: failed program was:" >&5 | |
2761 | cat conftest.$ac_ext >&5 | |
2762 | rm -rf conftest* | |
2763 | eval "ac_cv_header_$ac_safe=no" | |
2764 | fi | |
2765 | rm -f conftest* | |
2766 | fi | |
2767 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2768 | echo "$ac_t""yes" 1>&6 | |
2769 | msgformat=linux | |
2770 | else | |
2771 | echo "$ac_t""no" 1>&6 | |
2772 | msgformat=xopen | |
2773 | fi | |
2774 | ||
2775 | ||
2776 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2777 | fi | |
2778 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2779 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2780 | fi | |
2781 | ||
2782 | if test "$PACKAGE" = "gettext"; then | |
2783 | GT_NO="#NO#" | |
2784 | GT_YES= | |
2785 | else | |
2786 | GT_NO= | |
2787 | GT_YES="#YES#" | |
2788 | fi | |
2789 | ||
2790 | ||
2791 | ||
2792 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2793 | ||
2794 | ||
2795 | l= | |
2796 | ||
2797 | ||
2798 | if test -d $srcdir/po; then | |
2799 | test -d po || mkdir po | |
2800 | if test "x$srcdir" != "x."; then | |
2801 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2802 | posrcprefix="$srcdir/" | |
2803 | else | |
2804 | posrcprefix="../$srcdir/" | |
2805 | fi | |
2806 | else | |
2807 | posrcprefix="../" | |
2808 | fi | |
2809 | rm -f po/POTFILES | |
2810 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2811 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2812 | fi | |
2813 | ||
2814 | ||
2815 | ||
2816 | CONFIG_OBS= | |
66b965bb | 2817 | CONFIG_LIB_OBS= |
c906108c SS |
2818 | CONFIG_DEPS= |
2819 | CONFIG_SRCS= | |
fb40c209 AC |
2820 | CONFIG_INITS= |
2821 | ENABLE_CFLAGS= | |
b3a90332 AC |
2822 | CONFIG_ALL= |
2823 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2824 | CONFIG_INSTALL= |
2825 | CONFIG_UNINSTALL= | |
c906108c SS |
2826 | |
2827 | configdirs="doc testsuite" | |
2828 | ||
96baa820 JM |
2829 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2830 | if test "${enable_multi_ice+set}" = set; then | |
2831 | enableval="$enable_multi_ice" | |
2832 | case "${enableval}" in | |
2833 | yes ) enable_multi_ice="yes" ;; | |
2834 | no) enable_multi_ice="no" ;; | |
2835 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2836 | esac | |
2837 | ||
2838 | fi | |
2839 | ||
2840 | ||
2841 | if test "${enable_multi_ice}" = "yes"; then | |
2842 | configdirs="${configdirs} multi-ice" | |
2843 | fi | |
2844 | ||
c906108c SS |
2845 | |
2846 | . ${srcdir}/configure.host | |
2847 | ||
2848 | . ${srcdir}/configure.tgt | |
2849 | ||
1ba607ad AC |
2850 | targ=${target} ; . ${srcdir}/../bfd/config.bfd |
2851 | ||
2852 | ||
2853 | targ=${target} | |
2854 | . ${srcdir}/../bfd/config.bfd | |
5c8cc331 AC |
2855 | |
2856 | targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'` | |
2857 | ||
1ba607ad AC |
2858 | if test x"${targ_archs}" != x ; then |
2859 | cat >> confdefs.h <<EOF | |
2860 | #define DEFAULT_BFD_ARCH ${targ_archs} | |
2861 | EOF | |
2862 | ||
2863 | fi | |
2864 | if test x"${targ_defvec}" != x ; then | |
2865 | cat >> confdefs.h <<EOF | |
2866 | #define DEFAULT_BFD_VEC ${targ_defvec} | |
2867 | EOF | |
2868 | ||
2869 | fi | |
c906108c | 2870 | |
3b851bce | 2871 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2872 | do |
2873 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2874 | set dummy $ac_prog; ac_word=$2 | |
2875 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2876 | echo "configure:2877: checking for $ac_word" >&5 |
7a292a7a SS |
2877 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2878 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2879 | else | |
2880 | if test -n "$AWK"; then | |
2881 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2882 | else | |
2883 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2884 | ac_dummy="$PATH" | |
2885 | for ac_dir in $ac_dummy; do | |
2886 | test -z "$ac_dir" && ac_dir=. | |
2887 | if test -f $ac_dir/$ac_word; then | |
2888 | ac_cv_prog_AWK="$ac_prog" | |
2889 | break | |
2890 | fi | |
2891 | done | |
2892 | IFS="$ac_save_ifs" | |
2893 | fi | |
2894 | fi | |
2895 | AWK="$ac_cv_prog_AWK" | |
2896 | if test -n "$AWK"; then | |
2897 | echo "$ac_t""$AWK" 1>&6 | |
2898 | else | |
2899 | echo "$ac_t""no" 1>&6 | |
2900 | fi | |
2901 | ||
2902 | test -n "$AWK" && break | |
2903 | done | |
2904 | ||
c906108c SS |
2905 | # Find a good install program. We prefer a C program (faster), |
2906 | # so one script is as good as another. But avoid the broken or | |
2907 | # incompatible versions: | |
2908 | # SysV /etc/install, /usr/sbin/install | |
2909 | # SunOS /usr/etc/install | |
2910 | # IRIX /sbin/install | |
2911 | # AIX /bin/install | |
2912 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2913 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2914 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2915 | # ./install, which can be erroneously created by make from ./install.sh. | |
2916 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
b4df4f68 | 2917 | echo "configure:2918: checking for a BSD compatible install" >&5 |
c906108c SS |
2918 | if test -z "$INSTALL"; then |
2919 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2921 | else | |
2922 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2923 | for ac_dir in $PATH; do | |
2924 | # Account for people who put trailing slashes in PATH elements. | |
2925 | case "$ac_dir/" in | |
2926 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2927 | *) | |
2928 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2929 | # Don't use installbsd from OSF since it installs stuff as root | |
2930 | # by default. | |
2931 | for ac_prog in ginstall scoinst install; do | |
2932 | if test -f $ac_dir/$ac_prog; then | |
2933 | if test $ac_prog = install && | |
2934 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2935 | # AIX install. It has an incompatible calling convention. | |
2936 | : | |
2937 | else | |
2938 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2939 | break 2 | |
2940 | fi | |
2941 | fi | |
2942 | done | |
2943 | ;; | |
2944 | esac | |
2945 | done | |
2946 | IFS="$ac_save_IFS" | |
2947 | ||
2948 | fi | |
2949 | if test "${ac_cv_path_install+set}" = set; then | |
2950 | INSTALL="$ac_cv_path_install" | |
2951 | else | |
2952 | # As a last resort, use the slow shell script. We don't cache a | |
2953 | # path for INSTALL within a source directory, because that will | |
2954 | # break other packages using the cache if that directory is | |
2955 | # removed, or if the path is relative. | |
2956 | INSTALL="$ac_install_sh" | |
2957 | fi | |
2958 | fi | |
2959 | echo "$ac_t""$INSTALL" 1>&6 | |
2960 | ||
2961 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2962 | # It thinks the first close brace ends the variable substitution. | |
2963 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2964 | ||
2965 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2966 | ||
2967 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2968 | ||
2969 | if test $host != $build; then | |
2970 | ac_tool_prefix=${host_alias}- | |
2971 | else | |
2972 | ac_tool_prefix= | |
2973 | fi | |
2974 | ||
2975 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2976 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2977 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 2978 | echo "configure:2979: checking for $ac_word" >&5 |
c906108c SS |
2979 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2980 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2981 | else | |
2982 | if test -n "$AR"; then | |
2983 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2984 | else | |
2985 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2986 | ac_dummy="$PATH" | |
2987 | for ac_dir in $ac_dummy; do | |
2988 | test -z "$ac_dir" && ac_dir=. | |
2989 | if test -f $ac_dir/$ac_word; then | |
2990 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2991 | break | |
2992 | fi | |
2993 | done | |
2994 | IFS="$ac_save_ifs" | |
2995 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2996 | fi | |
2997 | fi | |
2998 | AR="$ac_cv_prog_AR" | |
2999 | if test -n "$AR"; then | |
3000 | echo "$ac_t""$AR" 1>&6 | |
3001 | else | |
3002 | echo "$ac_t""no" 1>&6 | |
3003 | fi | |
3004 | ||
3005 | ||
3006 | ||
3007 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
3008 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
3009 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 3010 | echo "configure:3011: checking for $ac_word" >&5 |
c906108c SS |
3011 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3012 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3013 | else | |
3014 | if test -n "$RANLIB"; then | |
3015 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3016 | else | |
3017 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3018 | ac_dummy="$PATH" | |
3019 | for ac_dir in $ac_dummy; do | |
3020 | test -z "$ac_dir" && ac_dir=. | |
3021 | if test -f $ac_dir/$ac_word; then | |
3022 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3023 | break | |
3024 | fi | |
3025 | done | |
3026 | IFS="$ac_save_ifs" | |
3027 | fi | |
3028 | fi | |
3029 | RANLIB="$ac_cv_prog_RANLIB" | |
3030 | if test -n "$RANLIB"; then | |
3031 | echo "$ac_t""$RANLIB" 1>&6 | |
3032 | else | |
3033 | echo "$ac_t""no" 1>&6 | |
3034 | fi | |
3035 | ||
3036 | ||
3037 | if test -z "$ac_cv_prog_RANLIB"; then | |
3038 | if test -n "$ac_tool_prefix"; then | |
3039 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3040 | set dummy ranlib; ac_word=$2 | |
3041 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 3042 | echo "configure:3043: checking for $ac_word" >&5 |
c906108c SS |
3043 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3044 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3045 | else | |
3046 | if test -n "$RANLIB"; then | |
3047 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3048 | else | |
3049 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3050 | ac_dummy="$PATH" | |
3051 | for ac_dir in $ac_dummy; do | |
3052 | test -z "$ac_dir" && ac_dir=. | |
3053 | if test -f $ac_dir/$ac_word; then | |
3054 | ac_cv_prog_RANLIB="ranlib" | |
3055 | break | |
3056 | fi | |
3057 | done | |
3058 | IFS="$ac_save_ifs" | |
3059 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3060 | fi | |
3061 | fi | |
3062 | RANLIB="$ac_cv_prog_RANLIB" | |
3063 | if test -n "$RANLIB"; then | |
3064 | echo "$ac_t""$RANLIB" 1>&6 | |
3065 | else | |
3066 | echo "$ac_t""no" 1>&6 | |
3067 | fi | |
3068 | ||
3069 | else | |
3070 | RANLIB=":" | |
3071 | fi | |
3072 | fi | |
3073 | ||
95ca63c4 CF |
3074 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3075 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3076 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 3077 | echo "configure:3078: checking for $ac_word" >&5 |
95ca63c4 CF |
3078 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3079 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3080 | else | |
3081 | if test -n "$DLLTOOL"; then | |
3082 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3083 | else | |
3084 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3085 | ac_dummy="$PATH" | |
3086 | for ac_dir in $ac_dummy; do | |
3087 | test -z "$ac_dir" && ac_dir=. | |
3088 | if test -f $ac_dir/$ac_word; then | |
3089 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3090 | break | |
3091 | fi | |
3092 | done | |
3093 | IFS="$ac_save_ifs" | |
3094 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3095 | fi | |
3096 | fi | |
3097 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3098 | if test -n "$DLLTOOL"; then | |
3099 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3100 | else | |
3101 | echo "$ac_t""no" 1>&6 | |
3102 | fi | |
3103 | ||
3104 | ||
3105 | ||
3106 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3107 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3108 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 3109 | echo "configure:3110: checking for $ac_word" >&5 |
95ca63c4 CF |
3110 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3111 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3112 | else | |
3113 | if test -n "$WINDRES"; then | |
3114 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3115 | else | |
3116 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3117 | ac_dummy="$PATH" | |
3118 | for ac_dir in $ac_dummy; do | |
3119 | test -z "$ac_dir" && ac_dir=. | |
3120 | if test -f $ac_dir/$ac_word; then | |
3121 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3122 | break | |
3123 | fi | |
3124 | done | |
3125 | IFS="$ac_save_ifs" | |
3126 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3127 | fi | |
3128 | fi | |
3129 | WINDRES="$ac_cv_prog_WINDRES" | |
3130 | if test -n "$WINDRES"; then | |
3131 | echo "$ac_t""$WINDRES" 1>&6 | |
3132 | else | |
3133 | echo "$ac_t""no" 1>&6 | |
3134 | fi | |
3135 | ||
3136 | ||
3137 | ||
c906108c SS |
3138 | for ac_prog in 'bison -y' byacc |
3139 | do | |
3140 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3141 | set dummy $ac_prog; ac_word=$2 | |
3142 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 3143 | echo "configure:3144: checking for $ac_word" >&5 |
c906108c SS |
3144 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3145 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3146 | else | |
3147 | if test -n "$YACC"; then | |
3148 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3149 | else | |
3150 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3151 | ac_dummy="$PATH" | |
3152 | for ac_dir in $ac_dummy; do | |
3153 | test -z "$ac_dir" && ac_dir=. | |
3154 | if test -f $ac_dir/$ac_word; then | |
3155 | ac_cv_prog_YACC="$ac_prog" | |
3156 | break | |
3157 | fi | |
3158 | done | |
3159 | IFS="$ac_save_ifs" | |
3160 | fi | |
3161 | fi | |
3162 | YACC="$ac_cv_prog_YACC" | |
3163 | if test -n "$YACC"; then | |
3164 | echo "$ac_t""$YACC" 1>&6 | |
3165 | else | |
3166 | echo "$ac_t""no" 1>&6 | |
3167 | fi | |
3168 | ||
3169 | test -n "$YACC" && break | |
3170 | done | |
3171 | test -n "$YACC" || YACC="yacc" | |
3172 | ||
3173 | ||
75c6e08a MK |
3174 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3175 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3176 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b4df4f68 | 3177 | echo "configure:3178: checking for $ac_word" >&5 |
75c6e08a MK |
3178 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3179 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3180 | else | |
3181 | if test -n "$MIG"; then | |
3182 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3183 | else | |
3184 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3185 | ac_dummy="$PATH" | |
3186 | for ac_dir in $ac_dummy; do | |
3187 | test -z "$ac_dir" && ac_dir=. | |
3188 | if test -f $ac_dir/$ac_word; then | |
3189 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3190 | break | |
3191 | fi | |
3192 | done | |
3193 | IFS="$ac_save_ifs" | |
3194 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3195 | fi | |
3196 | fi | |
3197 | MIG="$ac_cv_prog_MIG" | |
3198 | if test -n "$MIG"; then | |
3199 | echo "$ac_t""$MIG" 1>&6 | |
3200 | else | |
3201 | echo "$ac_t""no" 1>&6 | |
3202 | fi | |
3203 | ||
3204 | ||
3205 | ||
3206 | ||
c906108c SS |
3207 | if test "$program_transform_name" = s,x,x,; then |
3208 | program_transform_name= | |
3209 | else | |
3210 | # Double any \ or $. echo might interpret backslashes. | |
3211 | cat <<\EOF_SED > conftestsed | |
3212 | s,\\,\\\\,g; s,\$,$$,g | |
3213 | EOF_SED | |
3214 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3215 | rm -f conftestsed | |
3216 | fi | |
3217 | test "$program_prefix" != NONE && | |
3218 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3219 | # Use a double $ so make ignores it. | |
3220 | test "$program_suffix" != NONE && | |
3221 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3222 | ||
3223 | # sed with no file args requires a program. | |
3224 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3225 | ||
3226 | ||
3227 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
b4df4f68 | 3228 | echo "configure:3229: checking return type of signal handlers" >&5 |
c906108c SS |
3229 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3231 | else | |
3232 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3233 | #line 3234 "configure" |
c906108c SS |
3234 | #include "confdefs.h" |
3235 | #include <sys/types.h> | |
3236 | #include <signal.h> | |
3237 | #ifdef signal | |
3238 | #undef signal | |
3239 | #endif | |
3240 | #ifdef __cplusplus | |
3241 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3242 | #else | |
3243 | void (*signal ()) (); | |
3244 | #endif | |
3245 | ||
3246 | int main() { | |
3247 | int i; | |
3248 | ; return 0; } | |
3249 | EOF | |
b4df4f68 | 3250 | if { (eval echo configure:3251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3251 | rm -rf conftest* |
3252 | ac_cv_type_signal=void | |
3253 | else | |
3254 | echo "configure: failed program was:" >&5 | |
3255 | cat conftest.$ac_ext >&5 | |
3256 | rm -rf conftest* | |
3257 | ac_cv_type_signal=int | |
3258 | fi | |
3259 | rm -f conftest* | |
3260 | fi | |
3261 | ||
3262 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3263 | cat >> confdefs.h <<EOF | |
3264 | #define RETSIGTYPE $ac_cv_type_signal | |
3265 | EOF | |
3266 | ||
3267 | ||
3268 | ||
3269 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
b4df4f68 | 3270 | echo "configure:3271: checking for ANSI C header files" >&5 |
c906108c SS |
3271 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3272 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3273 | else | |
3274 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3275 | #line 3276 "configure" |
c906108c SS |
3276 | #include "confdefs.h" |
3277 | #include <stdlib.h> | |
3278 | #include <stdarg.h> | |
3279 | #include <string.h> | |
3280 | #include <float.h> | |
3281 | EOF | |
3282 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 3283 | { (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3284 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3285 | if test -z "$ac_err"; then | |
3286 | rm -rf conftest* | |
3287 | ac_cv_header_stdc=yes | |
3288 | else | |
3289 | echo "$ac_err" >&5 | |
3290 | echo "configure: failed program was:" >&5 | |
3291 | cat conftest.$ac_ext >&5 | |
3292 | rm -rf conftest* | |
3293 | ac_cv_header_stdc=no | |
3294 | fi | |
3295 | rm -f conftest* | |
3296 | ||
3297 | if test $ac_cv_header_stdc = yes; then | |
3298 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3299 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3300 | #line 3301 "configure" |
c906108c SS |
3301 | #include "confdefs.h" |
3302 | #include <string.h> | |
3303 | EOF | |
3304 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3305 | egrep "memchr" >/dev/null 2>&1; then | |
3306 | : | |
3307 | else | |
3308 | rm -rf conftest* | |
3309 | ac_cv_header_stdc=no | |
3310 | fi | |
3311 | rm -f conftest* | |
3312 | ||
3313 | fi | |
3314 | ||
3315 | if test $ac_cv_header_stdc = yes; then | |
3316 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3317 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3318 | #line 3319 "configure" |
c906108c SS |
3319 | #include "confdefs.h" |
3320 | #include <stdlib.h> | |
3321 | EOF | |
3322 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3323 | egrep "free" >/dev/null 2>&1; then | |
3324 | : | |
3325 | else | |
3326 | rm -rf conftest* | |
3327 | ac_cv_header_stdc=no | |
3328 | fi | |
3329 | rm -f conftest* | |
3330 | ||
3331 | fi | |
3332 | ||
3333 | if test $ac_cv_header_stdc = yes; then | |
3334 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3335 | if test "$cross_compiling" = yes; then | |
3336 | : | |
3337 | else | |
3338 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3339 | #line 3340 "configure" |
c906108c SS |
3340 | #include "confdefs.h" |
3341 | #include <ctype.h> | |
3342 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3343 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3344 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3345 | int main () { int i; for (i = 0; i < 256; i++) | |
3346 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3347 | exit (0); } | |
3348 | ||
3349 | EOF | |
b4df4f68 | 3350 | if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3351 | then |
3352 | : | |
3353 | else | |
3354 | echo "configure: failed program was:" >&5 | |
3355 | cat conftest.$ac_ext >&5 | |
3356 | rm -fr conftest* | |
3357 | ac_cv_header_stdc=no | |
3358 | fi | |
3359 | rm -fr conftest* | |
3360 | fi | |
3361 | ||
3362 | fi | |
3363 | fi | |
3364 | ||
3365 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3366 | if test $ac_cv_header_stdc = yes; then | |
3367 | cat >> confdefs.h <<\EOF | |
3368 | #define STDC_HEADERS 1 | |
3369 | EOF | |
3370 | ||
3371 | fi | |
3372 | ||
3373 | ||
6abadcf8 | 3374 | |
3e0bf9f1 | 3375 | case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes) |
6abadcf8 ND |
3376 | cat >> confdefs.h <<\EOF |
3377 | #define _MSE_INT_H 1 | |
3378 | EOF | |
3379 | ||
3380 | esac; esac | |
3381 | ||
2894793a | 3382 | for ac_hdr in ctype.h endian.h link.h thread_db.h proc_service.h \ |
c906108c | 3383 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3384 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3385 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3386 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
4b14d3e4 | 3387 | time.h sys/ioctl.h sys/user.h \ |
2894793a | 3388 | dirent.h sys/ndir.h sys/dir.h ndir.h \ |
409a3f64 AC |
3389 | curses.h ncurses.h \ |
3390 | poll.h sys/poll.h | |
c906108c SS |
3391 | do |
3392 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3393 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b4df4f68 | 3394 | echo "configure:3395: checking for $ac_hdr" >&5 |
c906108c SS |
3395 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3396 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3397 | else | |
3398 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3399 | #line 3400 "configure" |
c906108c SS |
3400 | #include "confdefs.h" |
3401 | #include <$ac_hdr> | |
3402 | EOF | |
3403 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 3404 | { (eval echo configure:3405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3405 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3406 | if test -z "$ac_err"; then | |
3407 | rm -rf conftest* | |
3408 | eval "ac_cv_header_$ac_safe=yes" | |
3409 | else | |
3410 | echo "$ac_err" >&5 | |
3411 | echo "configure: failed program was:" >&5 | |
3412 | cat conftest.$ac_ext >&5 | |
3413 | rm -rf conftest* | |
3414 | eval "ac_cv_header_$ac_safe=no" | |
3415 | fi | |
3416 | rm -f conftest* | |
3417 | fi | |
3418 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3419 | echo "$ac_t""yes" 1>&6 | |
3420 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3421 | cat >> confdefs.h <<EOF | |
3422 | #define $ac_tr_hdr 1 | |
3423 | EOF | |
3424 | ||
3425 | else | |
3426 | echo "$ac_t""no" 1>&6 | |
3427 | fi | |
3428 | done | |
3429 | ||
3430 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
b4df4f68 | 3431 | echo "configure:3432: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3432 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3434 | else | |
3435 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3436 | #line 3437 "configure" |
c906108c SS |
3437 | #include "confdefs.h" |
3438 | #include <sys/types.h> | |
3439 | #include <sys/stat.h> | |
3440 | ||
3441 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3442 | # if S_ISBLK (S_IFDIR) | |
3443 | You lose. | |
3444 | # endif | |
3445 | #endif | |
3446 | ||
3447 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3448 | # if S_ISBLK (S_IFCHR) | |
3449 | You lose. | |
3450 | # endif | |
3451 | #endif | |
3452 | ||
3453 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3454 | # if S_ISLNK (S_IFREG) | |
3455 | You lose. | |
3456 | # endif | |
3457 | #endif | |
3458 | ||
3459 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3460 | # if S_ISSOCK (S_IFREG) | |
3461 | You lose. | |
3462 | # endif | |
3463 | #endif | |
3464 | ||
3465 | EOF | |
3466 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3467 | egrep "You lose" >/dev/null 2>&1; then | |
3468 | rm -rf conftest* | |
3469 | ac_cv_header_stat_broken=yes | |
3470 | else | |
3471 | rm -rf conftest* | |
3472 | ac_cv_header_stat_broken=no | |
3473 | fi | |
3474 | rm -f conftest* | |
3475 | ||
3476 | fi | |
3477 | ||
3478 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3479 | if test $ac_cv_header_stat_broken = yes; then | |
3480 | cat >> confdefs.h <<\EOF | |
3481 | #define STAT_MACROS_BROKEN 1 | |
3482 | EOF | |
3483 | ||
3484 | fi | |
3485 | ||
3486 | ||
3487 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
b4df4f68 | 3488 | echo "configure:3489: checking for working const" >&5 |
c906108c SS |
3489 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3490 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3491 | else | |
3492 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3493 | #line 3494 "configure" |
c906108c SS |
3494 | #include "confdefs.h" |
3495 | ||
3496 | int main() { | |
3497 | ||
3498 | /* Ultrix mips cc rejects this. */ | |
3499 | typedef int charset[2]; const charset x; | |
3500 | /* SunOS 4.1.1 cc rejects this. */ | |
3501 | char const *const *ccp; | |
3502 | char **p; | |
3503 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3504 | struct point {int x, y;}; | |
3505 | static struct point const zero = {0,0}; | |
3506 | /* AIX XL C 1.02.0.0 rejects this. | |
3507 | It does not let you subtract one const X* pointer from another in an arm | |
3508 | of an if-expression whose if-part is not a constant expression */ | |
3509 | const char *g = "string"; | |
3510 | ccp = &g + (g ? g-g : 0); | |
3511 | /* HPUX 7.0 cc rejects these. */ | |
3512 | ++ccp; | |
3513 | p = (char**) ccp; | |
3514 | ccp = (char const *const *) p; | |
3515 | { /* SCO 3.2v4 cc rejects this. */ | |
3516 | char *t; | |
3517 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3518 | ||
3519 | *t++ = 0; | |
3520 | } | |
3521 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3522 | int x[] = {25, 17}; | |
3523 | const int *foo = &x[0]; | |
3524 | ++foo; | |
3525 | } | |
3526 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3527 | typedef const int *iptr; | |
3528 | iptr p = 0; | |
3529 | ++p; | |
3530 | } | |
3531 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3532 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3533 | struct s { int j; const int *ap[3]; }; | |
3534 | struct s *b; b->j = 5; | |
3535 | } | |
3536 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3537 | const int foo = 10; | |
3538 | } | |
3539 | ||
3540 | ; return 0; } | |
3541 | EOF | |
b4df4f68 | 3542 | if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3543 | rm -rf conftest* |
3544 | ac_cv_c_const=yes | |
3545 | else | |
3546 | echo "configure: failed program was:" >&5 | |
3547 | cat conftest.$ac_ext >&5 | |
3548 | rm -rf conftest* | |
3549 | ac_cv_c_const=no | |
3550 | fi | |
3551 | rm -f conftest* | |
3552 | fi | |
3553 | ||
3554 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3555 | if test $ac_cv_c_const = no; then | |
3556 | cat >> confdefs.h <<\EOF | |
3557 | #define const | |
3558 | EOF | |
3559 | ||
3560 | fi | |
3561 | ||
3562 | ||
818fa2bf | 3563 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask vfork |
c906108c SS |
3564 | do |
3565 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 3566 | echo "configure:3567: checking for $ac_func" >&5 |
c906108c SS |
3567 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3568 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3569 | else | |
3570 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3571 | #line 3572 "configure" |
c906108c SS |
3572 | #include "confdefs.h" |
3573 | /* System header to define __stub macros and hopefully few prototypes, | |
3574 | which can conflict with char $ac_func(); below. */ | |
3575 | #include <assert.h> | |
3576 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3577 | /* We use char because int might match the return type of a gcc2 | |
3578 | builtin and then its argument prototype would still apply. */ | |
3579 | char $ac_func(); | |
3580 | ||
3581 | int main() { | |
3582 | ||
3583 | /* The GNU C library defines this for functions which it implements | |
3584 | to always fail with ENOSYS. Some functions are actually named | |
3585 | something starting with __ and the normal name is an alias. */ | |
3586 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3587 | choke me | |
3588 | #else | |
3589 | $ac_func(); | |
3590 | #endif | |
3591 | ||
3592 | ; return 0; } | |
3593 | EOF | |
b4df4f68 | 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 | eval "ac_cv_func_$ac_func=yes" | |
3597 | else | |
3598 | echo "configure: failed program was:" >&5 | |
3599 | cat conftest.$ac_ext >&5 | |
3600 | rm -rf conftest* | |
3601 | eval "ac_cv_func_$ac_func=no" | |
3602 | fi | |
3603 | rm -f conftest* | |
3604 | fi | |
3605 | ||
3606 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3607 | echo "$ac_t""yes" 1>&6 | |
3608 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3609 | cat >> confdefs.h <<EOF | |
3610 | #define $ac_tr_func 1 | |
3611 | EOF | |
3612 | ||
3613 | else | |
3614 | echo "$ac_t""no" 1>&6 | |
3615 | fi | |
3616 | done | |
3617 | ||
3618 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3619 | # for constant arguments. Useless! | |
3620 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
b4df4f68 | 3621 | echo "configure:3622: checking for working alloca.h" >&5 |
c906108c SS |
3622 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3623 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3624 | else | |
3625 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3626 | #line 3627 "configure" |
c906108c SS |
3627 | #include "confdefs.h" |
3628 | #include <alloca.h> | |
3629 | int main() { | |
3630 | char *p = alloca(2 * sizeof(int)); | |
3631 | ; return 0; } | |
3632 | EOF | |
b4df4f68 | 3633 | if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3634 | rm -rf conftest* |
3635 | ac_cv_header_alloca_h=yes | |
3636 | else | |
3637 | echo "configure: failed program was:" >&5 | |
3638 | cat conftest.$ac_ext >&5 | |
3639 | rm -rf conftest* | |
3640 | ac_cv_header_alloca_h=no | |
3641 | fi | |
3642 | rm -f conftest* | |
3643 | fi | |
3644 | ||
3645 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3646 | if test $ac_cv_header_alloca_h = yes; then | |
3647 | cat >> confdefs.h <<\EOF | |
3648 | #define HAVE_ALLOCA_H 1 | |
3649 | EOF | |
3650 | ||
3651 | fi | |
3652 | ||
3653 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
b4df4f68 | 3654 | echo "configure:3655: checking for alloca" >&5 |
c906108c SS |
3655 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3656 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3657 | else | |
3658 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3659 | #line 3660 "configure" |
c906108c SS |
3660 | #include "confdefs.h" |
3661 | ||
3662 | #ifdef __GNUC__ | |
3663 | # define alloca __builtin_alloca | |
3664 | #else | |
3665 | # ifdef _MSC_VER | |
3666 | # include <malloc.h> | |
3667 | # define alloca _alloca | |
3668 | # else | |
3669 | # if HAVE_ALLOCA_H | |
3670 | # include <alloca.h> | |
3671 | # else | |
3672 | # ifdef _AIX | |
3673 | #pragma alloca | |
3674 | # else | |
3675 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3676 | char *alloca (); | |
3677 | # endif | |
3678 | # endif | |
3679 | # endif | |
3680 | # endif | |
3681 | #endif | |
3682 | ||
3683 | int main() { | |
3684 | char *p = (char *) alloca(1); | |
3685 | ; return 0; } | |
3686 | EOF | |
b4df4f68 | 3687 | if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3688 | rm -rf conftest* |
3689 | ac_cv_func_alloca_works=yes | |
3690 | else | |
3691 | echo "configure: failed program was:" >&5 | |
3692 | cat conftest.$ac_ext >&5 | |
3693 | rm -rf conftest* | |
3694 | ac_cv_func_alloca_works=no | |
3695 | fi | |
3696 | rm -f conftest* | |
3697 | fi | |
3698 | ||
3699 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3700 | if test $ac_cv_func_alloca_works = yes; then | |
3701 | cat >> confdefs.h <<\EOF | |
3702 | #define HAVE_ALLOCA 1 | |
3703 | EOF | |
3704 | ||
3705 | fi | |
3706 | ||
3707 | if test $ac_cv_func_alloca_works = no; then | |
3708 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3709 | # that cause trouble. Some versions do not even contain alloca or | |
3710 | # contain a buggy version. If you still want to use their alloca, | |
3711 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3712 | ALLOCA=alloca.${ac_objext} | |
3713 | cat >> confdefs.h <<\EOF | |
3714 | #define C_ALLOCA 1 | |
3715 | EOF | |
3716 | ||
3717 | ||
3718 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
b4df4f68 | 3719 | echo "configure:3720: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
3720 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3721 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3722 | else | |
3723 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3724 | #line 3725 "configure" |
c906108c SS |
3725 | #include "confdefs.h" |
3726 | #if defined(CRAY) && ! defined(CRAY2) | |
3727 | webecray | |
3728 | #else | |
3729 | wenotbecray | |
3730 | #endif | |
3731 | ||
3732 | EOF | |
3733 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3734 | egrep "webecray" >/dev/null 2>&1; then | |
3735 | rm -rf conftest* | |
3736 | ac_cv_os_cray=yes | |
3737 | else | |
3738 | rm -rf conftest* | |
3739 | ac_cv_os_cray=no | |
3740 | fi | |
3741 | rm -f conftest* | |
3742 | ||
3743 | fi | |
3744 | ||
3745 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3746 | if test $ac_cv_os_cray = yes; then | |
3747 | for ac_func in _getb67 GETB67 getb67; do | |
3748 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 3749 | echo "configure:3750: checking for $ac_func" >&5 |
c906108c SS |
3750 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3752 | else | |
3753 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3754 | #line 3755 "configure" |
c906108c SS |
3755 | #include "confdefs.h" |
3756 | /* System header to define __stub macros and hopefully few prototypes, | |
3757 | which can conflict with char $ac_func(); below. */ | |
3758 | #include <assert.h> | |
3759 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3760 | /* We use char because int might match the return type of a gcc2 | |
3761 | builtin and then its argument prototype would still apply. */ | |
3762 | char $ac_func(); | |
3763 | ||
3764 | int main() { | |
3765 | ||
3766 | /* The GNU C library defines this for functions which it implements | |
3767 | to always fail with ENOSYS. Some functions are actually named | |
3768 | something starting with __ and the normal name is an alias. */ | |
3769 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3770 | choke me | |
3771 | #else | |
3772 | $ac_func(); | |
3773 | #endif | |
3774 | ||
3775 | ; return 0; } | |
3776 | EOF | |
b4df4f68 | 3777 | if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3778 | rm -rf conftest* |
3779 | eval "ac_cv_func_$ac_func=yes" | |
3780 | else | |
3781 | echo "configure: failed program was:" >&5 | |
3782 | cat conftest.$ac_ext >&5 | |
3783 | rm -rf conftest* | |
3784 | eval "ac_cv_func_$ac_func=no" | |
3785 | fi | |
3786 | rm -f conftest* | |
3787 | fi | |
3788 | ||
3789 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3790 | echo "$ac_t""yes" 1>&6 | |
3791 | cat >> confdefs.h <<EOF | |
3792 | #define CRAY_STACKSEG_END $ac_func | |
3793 | EOF | |
3794 | ||
3795 | break | |
3796 | else | |
3797 | echo "$ac_t""no" 1>&6 | |
3798 | fi | |
3799 | ||
3800 | done | |
3801 | fi | |
3802 | ||
3803 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
b4df4f68 | 3804 | echo "configure:3805: checking stack direction for C alloca" >&5 |
c906108c SS |
3805 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3807 | else | |
3808 | if test "$cross_compiling" = yes; then | |
3809 | ac_cv_c_stack_direction=0 | |
3810 | else | |
3811 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3812 | #line 3813 "configure" |
c906108c SS |
3813 | #include "confdefs.h" |
3814 | find_stack_direction () | |
3815 | { | |
3816 | static char *addr = 0; | |
3817 | auto char dummy; | |
3818 | if (addr == 0) | |
3819 | { | |
3820 | addr = &dummy; | |
3821 | return find_stack_direction (); | |
3822 | } | |
3823 | else | |
3824 | return (&dummy > addr) ? 1 : -1; | |
3825 | } | |
3826 | main () | |
3827 | { | |
3828 | exit (find_stack_direction() < 0); | |
3829 | } | |
3830 | EOF | |
b4df4f68 | 3831 | if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3832 | then |
3833 | ac_cv_c_stack_direction=1 | |
3834 | else | |
3835 | echo "configure: failed program was:" >&5 | |
3836 | cat conftest.$ac_ext >&5 | |
3837 | rm -fr conftest* | |
3838 | ac_cv_c_stack_direction=-1 | |
3839 | fi | |
3840 | rm -fr conftest* | |
3841 | fi | |
3842 | ||
3843 | fi | |
3844 | ||
3845 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3846 | cat >> confdefs.h <<EOF | |
3847 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3848 | EOF | |
3849 | ||
3850 | fi | |
3851 | ||
3852 | ||
7dfa765c MK |
3853 | # See if machine/reg.h supports the %fs and %gs i386 segment registers. |
3854 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
3855 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
b4df4f68 | 3856 | echo "configure:3857: checking for r_fs in struct reg" >&5 |
422ea4b8 | 3857 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
7dfa765c MK |
3858 | echo $ac_n "(cached) $ac_c" 1>&6 |
3859 | else | |
3860 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3861 | #line 3862 "configure" |
7dfa765c MK |
3862 | #include "confdefs.h" |
3863 | #include <machine/reg.h> | |
3864 | int main() { | |
3865 | struct reg r; r.r_fs; | |
3866 | ; return 0; } | |
3867 | EOF | |
b4df4f68 | 3868 | if { (eval echo configure:3869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3869 | rm -rf conftest* |
422ea4b8 | 3870 | gdb_cv_struct_reg_r_fs=yes |
7dfa765c MK |
3871 | else |
3872 | echo "configure: failed program was:" >&5 | |
3873 | cat conftest.$ac_ext >&5 | |
3874 | rm -rf conftest* | |
422ea4b8 | 3875 | gdb_cv_struct_reg_r_fs=no |
7dfa765c MK |
3876 | fi |
3877 | rm -f conftest* | |
3878 | fi | |
3879 | ||
422ea4b8 MK |
3880 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
3881 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
7dfa765c | 3882 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3883 | #define HAVE_STRUCT_REG_R_FS 1 |
7dfa765c MK |
3884 | EOF |
3885 | ||
3886 | fi | |
3887 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
b4df4f68 | 3888 | echo "configure:3889: checking for r_gs in struct reg" >&5 |
422ea4b8 | 3889 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
7dfa765c MK |
3890 | echo $ac_n "(cached) $ac_c" 1>&6 |
3891 | else | |
3892 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3893 | #line 3894 "configure" |
7dfa765c MK |
3894 | #include "confdefs.h" |
3895 | #include <machine/reg.h> | |
3896 | int main() { | |
3897 | struct reg r; r.r_gs; | |
3898 | ; return 0; } | |
3899 | EOF | |
b4df4f68 | 3900 | if { (eval echo configure:3901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7dfa765c | 3901 | rm -rf conftest* |
422ea4b8 | 3902 | gdb_cv_struct_reg_r_gs=yes |
7dfa765c MK |
3903 | else |
3904 | echo "configure: failed program was:" >&5 | |
3905 | cat conftest.$ac_ext >&5 | |
3906 | rm -rf conftest* | |
422ea4b8 | 3907 | gdb_cv_struct_reg_r_gs=no |
7dfa765c MK |
3908 | fi |
3909 | rm -f conftest* | |
3910 | fi | |
3911 | ||
422ea4b8 MK |
3912 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
3913 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
7dfa765c | 3914 | cat >> confdefs.h <<\EOF |
422ea4b8 | 3915 | #define HAVE_STRUCT_REG_R_GS 1 |
7dfa765c MK |
3916 | EOF |
3917 | ||
3918 | fi | |
3919 | ||
64bb1671 | 3920 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 |
b4df4f68 | 3921 | echo "configure:3922: checking for PTRACE_GETREGS" >&5 |
64bb1671 MK |
3922 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
3923 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3924 | else | |
3925 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3926 | #line 3927 "configure" |
64bb1671 MK |
3927 | #include "confdefs.h" |
3928 | #include <sys/ptrace.h> | |
3929 | int main() { | |
3930 | PTRACE_GETREGS; | |
3931 | ; return 0; } | |
3932 | EOF | |
b4df4f68 | 3933 | if { (eval echo configure:3934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
64bb1671 MK |
3934 | rm -rf conftest* |
3935 | gdb_cv_have_ptrace_getregs=yes | |
3936 | else | |
3937 | echo "configure: failed program was:" >&5 | |
3938 | cat conftest.$ac_ext >&5 | |
3939 | rm -rf conftest* | |
3940 | gdb_cv_have_ptrace_getregs=no | |
3941 | fi | |
3942 | rm -f conftest* | |
3943 | fi | |
3944 | ||
4397a6ab | 3945 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
64bb1671 MK |
3946 | if test $gdb_cv_have_ptrace_getregs = yes; then |
3947 | cat >> confdefs.h <<\EOF | |
3948 | #define HAVE_PTRACE_GETREGS 1 | |
3949 | EOF | |
3950 | ||
3951 | fi | |
3952 | ||
6ce2ac0b | 3953 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 |
b4df4f68 | 3954 | echo "configure:3955: checking for PTRACE_GETFPXREGS" >&5 |
6ce2ac0b | 3955 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
5c44784c JM |
3956 | echo $ac_n "(cached) $ac_c" 1>&6 |
3957 | else | |
3958 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3959 | #line 3960 "configure" |
5c44784c JM |
3960 | #include "confdefs.h" |
3961 | #include <sys/ptrace.h> | |
3962 | int main() { | |
6ce2ac0b | 3963 | PTRACE_GETFPXREGS; |
5c44784c JM |
3964 | ; return 0; } |
3965 | EOF | |
b4df4f68 | 3966 | if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c | 3967 | rm -rf conftest* |
6ce2ac0b | 3968 | gdb_cv_have_ptrace_getfpxregs=yes |
5c44784c JM |
3969 | else |
3970 | echo "configure: failed program was:" >&5 | |
3971 | cat conftest.$ac_ext >&5 | |
3972 | rm -rf conftest* | |
6ce2ac0b | 3973 | gdb_cv_have_ptrace_getfpxregs=no |
5c44784c JM |
3974 | fi |
3975 | rm -f conftest* | |
3976 | fi | |
3977 | ||
6ce2ac0b MK |
3978 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
3979 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
5c44784c | 3980 | cat >> confdefs.h <<\EOF |
6ce2ac0b | 3981 | #define HAVE_PTRACE_GETFPXREGS 1 |
5c44784c JM |
3982 | EOF |
3983 | ||
3984 | fi | |
3985 | ||
7be570e7 | 3986 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
b4df4f68 | 3987 | echo "configure:3988: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
3988 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
3989 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3990 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3991 | else | |
3992 | ac_save_LIBS="$LIBS" | |
3993 | LIBS="-lsocket $LIBS" | |
3994 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 3995 | #line 3996 "configure" |
7be570e7 JM |
3996 | #include "confdefs.h" |
3997 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3998 | /* We use char because int might match the return type of a gcc2 | |
3999 | builtin and then its argument prototype would still apply. */ | |
4000 | char socketpair(); | |
4001 | ||
4002 | int main() { | |
4003 | socketpair() | |
4004 | ; return 0; } | |
4005 | EOF | |
b4df4f68 | 4006 | if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4007 | rm -rf conftest* |
4008 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4009 | else | |
4010 | echo "configure: failed program was:" >&5 | |
4011 | cat conftest.$ac_ext >&5 | |
4012 | rm -rf conftest* | |
4013 | eval "ac_cv_lib_$ac_lib_var=no" | |
4014 | fi | |
4015 | rm -f conftest* | |
4016 | LIBS="$ac_save_LIBS" | |
4017 | ||
4018 | fi | |
4019 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4020 | echo "$ac_t""yes" 1>&6 | |
4021 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4022 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4023 | cat >> confdefs.h <<EOF | |
4024 | #define $ac_tr_lib 1 | |
4025 | EOF | |
4026 | ||
4027 | LIBS="-lsocket $LIBS" | |
4028 | ||
4029 | else | |
4030 | echo "$ac_t""no" 1>&6 | |
4031 | fi | |
4032 | ||
4033 | for ac_func in socketpair | |
4034 | do | |
4035 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 4036 | echo "configure:4037: checking for $ac_func" >&5 |
7be570e7 JM |
4037 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4038 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4039 | else | |
4040 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4041 | #line 4042 "configure" |
7be570e7 JM |
4042 | #include "confdefs.h" |
4043 | /* System header to define __stub macros and hopefully few prototypes, | |
4044 | which can conflict with char $ac_func(); below. */ | |
4045 | #include <assert.h> | |
4046 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4047 | /* We use char because int might match the return type of a gcc2 | |
4048 | builtin and then its argument prototype would still apply. */ | |
4049 | char $ac_func(); | |
4050 | ||
4051 | int main() { | |
4052 | ||
4053 | /* The GNU C library defines this for functions which it implements | |
4054 | to always fail with ENOSYS. Some functions are actually named | |
4055 | something starting with __ and the normal name is an alias. */ | |
4056 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4057 | choke me | |
4058 | #else | |
4059 | $ac_func(); | |
4060 | #endif | |
4061 | ||
4062 | ; return 0; } | |
4063 | EOF | |
b4df4f68 | 4064 | if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
4065 | rm -rf conftest* |
4066 | eval "ac_cv_func_$ac_func=yes" | |
4067 | else | |
4068 | echo "configure: failed program was:" >&5 | |
4069 | cat conftest.$ac_ext >&5 | |
4070 | rm -rf conftest* | |
4071 | eval "ac_cv_func_$ac_func=no" | |
4072 | fi | |
4073 | rm -f conftest* | |
4074 | fi | |
4075 | ||
4076 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4077 | echo "$ac_t""yes" 1>&6 | |
4078 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4079 | cat >> confdefs.h <<EOF | |
4080 | #define $ac_tr_func 1 | |
4081 | EOF | |
4082 | ||
4083 | else | |
4084 | echo "$ac_t""no" 1>&6 | |
4085 | fi | |
4086 | done | |
4087 | ||
4088 | ||
4089 | ||
c906108c | 4090 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
b4df4f68 | 4091 | echo "configure:4092: checking whether malloc must be declared" >&5 |
c906108c SS |
4092 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4093 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4094 | else | |
4095 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4096 | #line 4097 "configure" |
c906108c SS |
4097 | #include "confdefs.h" |
4098 | ||
4099 | #include <stdio.h> | |
4100 | #ifdef HAVE_STRING_H | |
4101 | #include <string.h> | |
4102 | #else | |
4103 | #ifdef HAVE_STRINGS_H | |
4104 | #include <strings.h> | |
4105 | #endif | |
4106 | #endif | |
4107 | #ifdef HAVE_STDLIB_H | |
4108 | #include <stdlib.h> | |
4109 | #endif | |
4110 | #ifdef HAVE_UNISTD_H | |
4111 | #include <unistd.h> | |
4112 | #endif | |
4113 | int main() { | |
4114 | char *(*pfn) = (char *(*)) malloc | |
4115 | ; return 0; } | |
4116 | EOF | |
b4df4f68 | 4117 | if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4118 | rm -rf conftest* |
4119 | bfd_cv_decl_needed_malloc=no | |
4120 | else | |
4121 | echo "configure: failed program was:" >&5 | |
4122 | cat conftest.$ac_ext >&5 | |
4123 | rm -rf conftest* | |
4124 | bfd_cv_decl_needed_malloc=yes | |
4125 | fi | |
4126 | rm -f conftest* | |
4127 | fi | |
4128 | ||
4129 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4130 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4131 | cat >> confdefs.h <<\EOF | |
4132 | #define NEED_DECLARATION_MALLOC 1 | |
4133 | EOF | |
4134 | ||
4135 | fi | |
4136 | ||
4137 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
b4df4f68 | 4138 | echo "configure:4139: checking whether realloc must be declared" >&5 |
c906108c SS |
4139 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4140 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4141 | else | |
4142 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4143 | #line 4144 "configure" |
c906108c SS |
4144 | #include "confdefs.h" |
4145 | ||
4146 | #include <stdio.h> | |
4147 | #ifdef HAVE_STRING_H | |
4148 | #include <string.h> | |
4149 | #else | |
4150 | #ifdef HAVE_STRINGS_H | |
4151 | #include <strings.h> | |
4152 | #endif | |
4153 | #endif | |
4154 | #ifdef HAVE_STDLIB_H | |
4155 | #include <stdlib.h> | |
4156 | #endif | |
4157 | #ifdef HAVE_UNISTD_H | |
4158 | #include <unistd.h> | |
4159 | #endif | |
4160 | int main() { | |
4161 | char *(*pfn) = (char *(*)) realloc | |
4162 | ; return 0; } | |
4163 | EOF | |
b4df4f68 | 4164 | if { (eval echo configure:4165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4165 | rm -rf conftest* |
4166 | bfd_cv_decl_needed_realloc=no | |
4167 | else | |
4168 | echo "configure: failed program was:" >&5 | |
4169 | cat conftest.$ac_ext >&5 | |
4170 | rm -rf conftest* | |
4171 | bfd_cv_decl_needed_realloc=yes | |
4172 | fi | |
4173 | rm -f conftest* | |
4174 | fi | |
4175 | ||
4176 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4177 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4178 | cat >> confdefs.h <<\EOF | |
4179 | #define NEED_DECLARATION_REALLOC 1 | |
4180 | EOF | |
4181 | ||
4182 | fi | |
4183 | ||
4184 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
b4df4f68 | 4185 | echo "configure:4186: checking whether free must be declared" >&5 |
c906108c SS |
4186 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4187 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4188 | else | |
4189 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4190 | #line 4191 "configure" |
c906108c SS |
4191 | #include "confdefs.h" |
4192 | ||
4193 | #include <stdio.h> | |
4194 | #ifdef HAVE_STRING_H | |
4195 | #include <string.h> | |
4196 | #else | |
4197 | #ifdef HAVE_STRINGS_H | |
4198 | #include <strings.h> | |
4199 | #endif | |
4200 | #endif | |
4201 | #ifdef HAVE_STDLIB_H | |
4202 | #include <stdlib.h> | |
4203 | #endif | |
4204 | #ifdef HAVE_UNISTD_H | |
4205 | #include <unistd.h> | |
4206 | #endif | |
4207 | int main() { | |
4208 | char *(*pfn) = (char *(*)) free | |
4209 | ; return 0; } | |
4210 | EOF | |
b4df4f68 | 4211 | if { (eval echo configure:4212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4212 | rm -rf conftest* |
4213 | bfd_cv_decl_needed_free=no | |
4214 | else | |
4215 | echo "configure: failed program was:" >&5 | |
4216 | cat conftest.$ac_ext >&5 | |
4217 | rm -rf conftest* | |
4218 | bfd_cv_decl_needed_free=yes | |
4219 | fi | |
4220 | rm -f conftest* | |
4221 | fi | |
4222 | ||
4223 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4224 | if test $bfd_cv_decl_needed_free = yes; then | |
4225 | cat >> confdefs.h <<\EOF | |
4226 | #define NEED_DECLARATION_FREE 1 | |
4227 | EOF | |
4228 | ||
4229 | fi | |
4230 | ||
4231 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
b4df4f68 | 4232 | echo "configure:4233: checking whether strerror must be declared" >&5 |
c906108c SS |
4233 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4235 | else | |
4236 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4237 | #line 4238 "configure" |
c906108c SS |
4238 | #include "confdefs.h" |
4239 | ||
4240 | #include <stdio.h> | |
4241 | #ifdef HAVE_STRING_H | |
4242 | #include <string.h> | |
4243 | #else | |
4244 | #ifdef HAVE_STRINGS_H | |
4245 | #include <strings.h> | |
4246 | #endif | |
4247 | #endif | |
4248 | #ifdef HAVE_STDLIB_H | |
4249 | #include <stdlib.h> | |
4250 | #endif | |
4251 | #ifdef HAVE_UNISTD_H | |
4252 | #include <unistd.h> | |
4253 | #endif | |
4254 | int main() { | |
4255 | char *(*pfn) = (char *(*)) strerror | |
4256 | ; return 0; } | |
4257 | EOF | |
b4df4f68 | 4258 | if { (eval echo configure:4259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4259 | rm -rf conftest* |
4260 | bfd_cv_decl_needed_strerror=no | |
4261 | else | |
4262 | echo "configure: failed program was:" >&5 | |
4263 | cat conftest.$ac_ext >&5 | |
4264 | rm -rf conftest* | |
4265 | bfd_cv_decl_needed_strerror=yes | |
4266 | fi | |
4267 | rm -f conftest* | |
4268 | fi | |
4269 | ||
4270 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4271 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4272 | cat >> confdefs.h <<\EOF | |
4273 | #define NEED_DECLARATION_STRERROR 1 | |
4274 | EOF | |
4275 | ||
4276 | fi | |
4277 | ||
4278 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
b4df4f68 | 4279 | echo "configure:4280: checking whether strdup must be declared" >&5 |
c906108c SS |
4280 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4281 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4282 | else | |
4283 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4284 | #line 4285 "configure" |
c906108c SS |
4285 | #include "confdefs.h" |
4286 | ||
4287 | #include <stdio.h> | |
4288 | #ifdef HAVE_STRING_H | |
4289 | #include <string.h> | |
4290 | #else | |
4291 | #ifdef HAVE_STRINGS_H | |
4292 | #include <strings.h> | |
4293 | #endif | |
4294 | #endif | |
4295 | #ifdef HAVE_STDLIB_H | |
4296 | #include <stdlib.h> | |
4297 | #endif | |
4298 | #ifdef HAVE_UNISTD_H | |
4299 | #include <unistd.h> | |
4300 | #endif | |
4301 | int main() { | |
4302 | char *(*pfn) = (char *(*)) strdup | |
4303 | ; return 0; } | |
4304 | EOF | |
b4df4f68 | 4305 | if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4306 | rm -rf conftest* |
4307 | bfd_cv_decl_needed_strdup=no | |
4308 | else | |
4309 | echo "configure: failed program was:" >&5 | |
4310 | cat conftest.$ac_ext >&5 | |
4311 | rm -rf conftest* | |
4312 | bfd_cv_decl_needed_strdup=yes | |
4313 | fi | |
4314 | rm -f conftest* | |
4315 | fi | |
4316 | ||
4317 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4318 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4319 | cat >> confdefs.h <<\EOF | |
4320 | #define NEED_DECLARATION_STRDUP 1 | |
4321 | EOF | |
4322 | ||
4323 | fi | |
4324 | ||
b83266a0 | 4325 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
b4df4f68 | 4326 | echo "configure:4327: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4327 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4328 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4329 | else | |
4330 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4331 | #line 4332 "configure" |
b83266a0 SS |
4332 | #include "confdefs.h" |
4333 | ||
4334 | #include <stdio.h> | |
4335 | #ifdef HAVE_STRING_H | |
4336 | #include <string.h> | |
4337 | #else | |
4338 | #ifdef HAVE_STRINGS_H | |
4339 | #include <strings.h> | |
4340 | #endif | |
4341 | #endif | |
4342 | #ifdef HAVE_STDLIB_H | |
4343 | #include <stdlib.h> | |
4344 | #endif | |
4345 | #ifdef HAVE_UNISTD_H | |
4346 | #include <unistd.h> | |
4347 | #endif | |
4348 | int main() { | |
4349 | char *(*pfn) = (char *(*)) strstr | |
4350 | ; return 0; } | |
4351 | EOF | |
b4df4f68 | 4352 | if { (eval echo configure:4353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4353 | rm -rf conftest* |
4354 | bfd_cv_decl_needed_strstr=no | |
4355 | else | |
4356 | echo "configure: failed program was:" >&5 | |
4357 | cat conftest.$ac_ext >&5 | |
4358 | rm -rf conftest* | |
4359 | bfd_cv_decl_needed_strstr=yes | |
4360 | fi | |
4361 | rm -f conftest* | |
4362 | fi | |
4363 | ||
4364 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4365 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4366 | cat >> confdefs.h <<\EOF | |
4367 | #define NEED_DECLARATION_STRSTR 1 | |
4368 | EOF | |
4369 | ||
4370 | fi | |
4371 | ||
c906108c SS |
4372 | |
4373 | ||
4374 | # The following save_state_t checkery is only necessary for HPUX | |
4375 | # versions earlier than 10.20. When those fade from memory, this | |
4376 | # could be expunged. --jsm 1999-03-22 | |
4377 | ||
4378 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
b4df4f68 | 4379 | echo "configure:4380: checking for HPUX save_state structure" >&5 |
c906108c | 4380 | cat > conftest.$ac_ext <<EOF |
b4df4f68 | 4381 | #line 4382 "configure" |
c906108c SS |
4382 | #include "confdefs.h" |
4383 | #include <machine/save_state.h> | |
4384 | EOF | |
4385 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4386 | egrep "save_state_t" >/dev/null 2>&1; then | |
4387 | rm -rf conftest* | |
4388 | gdb_cv_hpux_savestate=yes | |
4389 | else | |
4390 | rm -rf conftest* | |
4391 | gdb_cv_hpux_savestate=no | |
4392 | fi | |
4393 | rm -f conftest* | |
4394 | ||
4395 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4396 | #line 4397 "configure" |
c906108c SS |
4397 | #include "confdefs.h" |
4398 | #include <machine/save_state.h> | |
4399 | EOF | |
4400 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4401 | egrep "ss_wide" >/dev/null 2>&1; then | |
4402 | rm -rf conftest* | |
4403 | gdb_cv_hpux_sswide=yes | |
4404 | else | |
4405 | rm -rf conftest* | |
4406 | gdb_cv_hpux_sswide=no | |
4407 | fi | |
4408 | rm -f conftest* | |
4409 | ||
4410 | if test $gdb_cv_hpux_savestate = yes | |
4411 | then | |
4412 | cat >> confdefs.h <<\EOF | |
4413 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4414 | EOF | |
4415 | ||
4416 | fi | |
4417 | if test $gdb_cv_hpux_sswide = yes | |
4418 | then | |
4419 | cat >> confdefs.h <<\EOF | |
4420 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4421 | EOF | |
4422 | ||
4423 | fi | |
4424 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4425 | ||
4426 | ||
4427 | # If we are configured native on GNU/Linux, work around problems with | |
4428 | # sys/procfs.h | |
c3f6f71d | 4429 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4430 | |
4431 | if test "${target}" = "${host}"; then | |
4432 | case "${host}" in | |
4433 | i[3456]86-*-linux*) | |
4434 | cat >> confdefs.h <<\EOF | |
4435 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4436 | EOF | |
4437 | ||
4438 | cat >> confdefs.h <<\EOF | |
4439 | #define sys_quotactl 1 | |
4440 | EOF | |
4441 | ||
4442 | ;; | |
c5394b80 | 4443 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4444 | cat >> confdefs.h <<\EOF |
4445 | #define NEW_PROC_API 1 | |
c906108c SS |
4446 | EOF |
4447 | ||
c3f6f71d | 4448 | ;; |
3423db82 | 4449 | *-*-solaris2.[678]) |
c3f6f71d JM |
4450 | cat >> confdefs.h <<\EOF |
4451 | #define NEW_PROC_API 1 | |
4452 | EOF | |
4453 | ||
4454 | ;; | |
4455 | esac | |
c906108c SS |
4456 | fi |
4457 | ||
4458 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4459 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
b4df4f68 | 4460 | echo "configure:4461: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4461 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4463 | else | |
4464 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4465 | #line 4466 "configure" |
c906108c | 4466 | #include "confdefs.h" |
e17bf198 AO |
4467 | |
4468 | #define _SYSCALL32 | |
c906108c SS |
4469 | #include <sys/procfs.h> |
4470 | int main() { | |
4471 | pstatus_t avar | |
4472 | ; return 0; } | |
4473 | EOF | |
b4df4f68 | 4474 | if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4475 | rm -rf conftest* |
4476 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
4477 | else | |
4478 | echo "configure: failed program was:" >&5 | |
4479 | cat conftest.$ac_ext >&5 | |
4480 | rm -rf conftest* | |
4481 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
4482 | ||
4483 | fi | |
4484 | rm -f conftest* | |
4485 | fi | |
4486 | ||
4487 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
4488 | cat >> confdefs.h <<\EOF | |
4489 | #define HAVE_PSTATUS_T 1 | |
4490 | EOF | |
4491 | ||
4492 | fi | |
4493 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
4494 | ||
4495 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
b4df4f68 | 4496 | echo "configure:4497: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
4497 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
4498 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4499 | else | |
4500 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4501 | #line 4502 "configure" |
c906108c | 4502 | #include "confdefs.h" |
e17bf198 AO |
4503 | |
4504 | #define _SYSCALL32 | |
c906108c SS |
4505 | #include <sys/procfs.h> |
4506 | int main() { | |
4507 | prrun_t avar | |
4508 | ; return 0; } | |
4509 | EOF | |
b4df4f68 | 4510 | if { (eval echo configure:4511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4511 | rm -rf conftest* |
4512 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
4513 | else | |
4514 | echo "configure: failed program was:" >&5 | |
4515 | cat conftest.$ac_ext >&5 | |
4516 | rm -rf conftest* | |
4517 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
4518 | ||
4519 | fi | |
4520 | rm -f conftest* | |
4521 | fi | |
4522 | ||
4523 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
4524 | cat >> confdefs.h <<\EOF | |
4525 | #define HAVE_PRRUN_T 1 | |
4526 | EOF | |
4527 | ||
4528 | fi | |
4529 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
4530 | ||
4531 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
b4df4f68 | 4532 | echo "configure:4533: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
4533 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
4534 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4535 | else | |
4536 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4537 | #line 4538 "configure" |
c906108c | 4538 | #include "confdefs.h" |
e17bf198 AO |
4539 | |
4540 | #define _SYSCALL32 | |
c906108c SS |
4541 | #include <sys/procfs.h> |
4542 | int main() { | |
4543 | gregset_t avar | |
4544 | ; return 0; } | |
4545 | EOF | |
b4df4f68 | 4546 | if { (eval echo configure:4547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4547 | rm -rf conftest* |
4548 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
4549 | else | |
4550 | echo "configure: failed program was:" >&5 | |
4551 | cat conftest.$ac_ext >&5 | |
4552 | rm -rf conftest* | |
4553 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
4554 | ||
4555 | fi | |
4556 | rm -f conftest* | |
4557 | fi | |
4558 | ||
4559 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
4560 | cat >> confdefs.h <<\EOF | |
4561 | #define HAVE_GREGSET_T 1 | |
4562 | EOF | |
4563 | ||
4564 | fi | |
4565 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
4566 | ||
4567 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
b4df4f68 | 4568 | echo "configure:4569: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
4569 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
4570 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4571 | else | |
4572 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4573 | #line 4574 "configure" |
c906108c | 4574 | #include "confdefs.h" |
e17bf198 AO |
4575 | |
4576 | #define _SYSCALL32 | |
c906108c SS |
4577 | #include <sys/procfs.h> |
4578 | int main() { | |
4579 | fpregset_t avar | |
4580 | ; return 0; } | |
4581 | EOF | |
b4df4f68 | 4582 | if { (eval echo configure:4583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4583 | rm -rf conftest* |
4584 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
4585 | else | |
4586 | echo "configure: failed program was:" >&5 | |
4587 | cat conftest.$ac_ext >&5 | |
4588 | rm -rf conftest* | |
4589 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
4590 | ||
4591 | fi | |
4592 | rm -f conftest* | |
4593 | fi | |
4594 | ||
4595 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
4596 | cat >> confdefs.h <<\EOF | |
4597 | #define HAVE_FPREGSET_T 1 | |
4598 | EOF | |
4599 | ||
4600 | fi | |
4601 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
4602 | ||
3862412b | 4603 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
b4df4f68 | 4604 | echo "configure:4605: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
4605 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
4606 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4607 | else | |
4608 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4609 | #line 4610 "configure" |
3862412b | 4610 | #include "confdefs.h" |
e17bf198 AO |
4611 | |
4612 | #define _SYSCALL32 | |
3862412b MK |
4613 | #include <sys/procfs.h> |
4614 | int main() { | |
4615 | prgregset_t avar | |
4616 | ; return 0; } | |
4617 | EOF | |
b4df4f68 | 4618 | if { (eval echo configure:4619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4619 | rm -rf conftest* |
4620 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
4621 | else | |
4622 | echo "configure: failed program was:" >&5 | |
4623 | cat conftest.$ac_ext >&5 | |
4624 | rm -rf conftest* | |
4625 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
4626 | ||
4627 | fi | |
4628 | rm -f conftest* | |
4629 | fi | |
4630 | ||
4631 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
4632 | cat >> confdefs.h <<\EOF | |
4633 | #define HAVE_PRGREGSET_T 1 | |
4634 | EOF | |
4635 | ||
4636 | fi | |
4637 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
4638 | ||
4639 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
b4df4f68 | 4640 | echo "configure:4641: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
4641 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
4642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4643 | else | |
4644 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4645 | #line 4646 "configure" |
3862412b | 4646 | #include "confdefs.h" |
e17bf198 AO |
4647 | |
4648 | #define _SYSCALL32 | |
3862412b MK |
4649 | #include <sys/procfs.h> |
4650 | int main() { | |
4651 | prfpregset_t avar | |
4652 | ; return 0; } | |
4653 | EOF | |
b4df4f68 | 4654 | if { (eval echo configure:4655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4655 | rm -rf conftest* |
4656 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
4657 | else | |
4658 | echo "configure: failed program was:" >&5 | |
4659 | cat conftest.$ac_ext >&5 | |
4660 | rm -rf conftest* | |
4661 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
4662 | ||
4663 | fi | |
4664 | rm -f conftest* | |
4665 | fi | |
4666 | ||
4667 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
4668 | cat >> confdefs.h <<\EOF | |
4669 | #define HAVE_PRFPREGSET_T 1 | |
4670 | EOF | |
4671 | ||
4672 | fi | |
4673 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
4674 | ||
451928c5 | 4675 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
b4df4f68 | 4676 | echo "configure:4677: checking for prgregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
4677 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
4678 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4679 | else | |
4680 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4681 | #line 4682 "configure" |
451928c5 | 4682 | #include "confdefs.h" |
e17bf198 AO |
4683 | |
4684 | #define _SYSCALL32 | |
451928c5 AC |
4685 | #include <sys/procfs.h> |
4686 | int main() { | |
4687 | prgregset32_t avar | |
4688 | ; return 0; } | |
4689 | EOF | |
b4df4f68 | 4690 | if { (eval echo configure:4691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
4691 | rm -rf conftest* |
4692 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
4693 | else | |
4694 | echo "configure: failed program was:" >&5 | |
4695 | cat conftest.$ac_ext >&5 | |
4696 | rm -rf conftest* | |
4697 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
4698 | ||
4699 | fi | |
4700 | rm -f conftest* | |
4701 | fi | |
4702 | ||
4703 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then | |
4704 | cat >> confdefs.h <<\EOF | |
4705 | #define HAVE_PRGREGSET32_T 1 | |
4706 | EOF | |
4707 | ||
4708 | fi | |
4709 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
4710 | ||
4711 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 | |
b4df4f68 | 4712 | echo "configure:4713: checking for prfpregset32_t in sys/procfs.h" >&5 |
451928c5 AC |
4713 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
4714 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4715 | else | |
4716 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4717 | #line 4718 "configure" |
451928c5 | 4718 | #include "confdefs.h" |
e17bf198 AO |
4719 | |
4720 | #define _SYSCALL32 | |
451928c5 AC |
4721 | #include <sys/procfs.h> |
4722 | int main() { | |
4723 | prfpregset32_t avar | |
4724 | ; return 0; } | |
4725 | EOF | |
b4df4f68 | 4726 | if { (eval echo configure:4727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 AC |
4727 | rm -rf conftest* |
4728 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes | |
4729 | else | |
4730 | echo "configure: failed program was:" >&5 | |
4731 | cat conftest.$ac_ext >&5 | |
4732 | rm -rf conftest* | |
4733 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no | |
4734 | ||
4735 | fi | |
4736 | rm -f conftest* | |
4737 | fi | |
4738 | ||
4739 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then | |
4740 | cat >> confdefs.h <<\EOF | |
4741 | #define HAVE_PRFPREGSET32_T 1 | |
4742 | EOF | |
4743 | ||
4744 | fi | |
4745 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
4746 | ||
3862412b | 4747 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
b4df4f68 | 4748 | echo "configure:4749: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
4749 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
4750 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4751 | else | |
4752 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4753 | #line 4754 "configure" |
3862412b | 4754 | #include "confdefs.h" |
e17bf198 AO |
4755 | |
4756 | #define _SYSCALL32 | |
3862412b MK |
4757 | #include <sys/procfs.h> |
4758 | int main() { | |
4759 | lwpid_t avar | |
4760 | ; return 0; } | |
4761 | EOF | |
b4df4f68 | 4762 | if { (eval echo configure:4763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4763 | rm -rf conftest* |
4764 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
4765 | else | |
4766 | echo "configure: failed program was:" >&5 | |
4767 | cat conftest.$ac_ext >&5 | |
4768 | rm -rf conftest* | |
4769 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
4770 | ||
4771 | fi | |
4772 | rm -f conftest* | |
4773 | fi | |
4774 | ||
4775 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
4776 | cat >> confdefs.h <<\EOF | |
4777 | #define HAVE_LWPID_T 1 | |
4778 | EOF | |
4779 | ||
4780 | fi | |
4781 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
4782 | ||
4783 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
b4df4f68 | 4784 | echo "configure:4785: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
4785 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
4786 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4787 | else | |
4788 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4789 | #line 4790 "configure" |
3862412b | 4790 | #include "confdefs.h" |
e17bf198 AO |
4791 | |
4792 | #define _SYSCALL32 | |
3862412b MK |
4793 | #include <sys/procfs.h> |
4794 | int main() { | |
4795 | psaddr_t avar | |
4796 | ; return 0; } | |
4797 | EOF | |
b4df4f68 | 4798 | if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4799 | rm -rf conftest* |
4800 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
4801 | else | |
4802 | echo "configure: failed program was:" >&5 | |
4803 | cat conftest.$ac_ext >&5 | |
4804 | rm -rf conftest* | |
4805 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
4806 | ||
4807 | fi | |
4808 | rm -f conftest* | |
4809 | fi | |
4810 | ||
4811 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
4812 | cat >> confdefs.h <<\EOF | |
4813 | #define HAVE_PSADDR_T 1 | |
4814 | EOF | |
4815 | ||
4816 | fi | |
4817 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
4818 | ||
c906108c | 4819 | |
451928c5 AC |
4820 | |
4821 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
b4df4f68 | 4822 | echo "configure:4823: checking for struct link_map32 in sys/link.h" >&5 |
451928c5 AC |
4823 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
4824 | echo $ac_n "(cached) $ac_c" 1>&6 | |
451928c5 AC |
4825 | else |
4826 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4827 | #line 4828 "configure" |
451928c5 AC |
4828 | #include "confdefs.h" |
4829 | #define _SYSCALL32 | |
2bba1017 KB |
4830 | #include <sys/link.h> |
4831 | int main() { | |
4832 | struct link_map32 l; | |
4833 | ; return 0; } | |
4834 | EOF | |
b4df4f68 | 4835 | if { (eval echo configure:4836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2bba1017 KB |
4836 | rm -rf conftest* |
4837 | gdb_cv_have_struct_link_map32=yes | |
451928c5 AC |
4838 | else |
4839 | echo "configure: failed program was:" >&5 | |
4840 | cat conftest.$ac_ext >&5 | |
2bba1017 KB |
4841 | rm -rf conftest* |
4842 | gdb_cv_have_struct_link_map32=no | |
451928c5 | 4843 | fi |
2bba1017 | 4844 | rm -f conftest* |
451928c5 AC |
4845 | fi |
4846 | ||
4847 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 | |
4848 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
4849 | cat >> confdefs.h <<\EOF | |
4850 | #define HAVE_STRUCT_LINK_MAP32 1 | |
4851 | EOF | |
4852 | ||
4853 | fi | |
4854 | ||
c906108c | 4855 | |
746a987d | 4856 | |
d84dd0c5 MK |
4857 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
4858 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
b4df4f68 | 4859 | echo "configure:4860: checking whether prfpregset_t type is broken" >&5 |
d84dd0c5 MK |
4860 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
4861 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4862 | else | |
4863 | if test "$cross_compiling" = yes; then | |
4864 | gdb_cv_prfpregset_t_broken=yes | |
4865 | else | |
4866 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4867 | #line 4868 "configure" |
d84dd0c5 MK |
4868 | #include "confdefs.h" |
4869 | #include <sys/procfs.h> | |
4870 | int main () | |
4871 | { | |
4872 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
4873 | return 1; | |
4874 | return 0; | |
4875 | } | |
4876 | EOF | |
b4df4f68 | 4877 | if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
d84dd0c5 MK |
4878 | then |
4879 | gdb_cv_prfpregset_t_broken=no | |
4880 | else | |
4881 | echo "configure: failed program was:" >&5 | |
4882 | cat conftest.$ac_ext >&5 | |
4883 | rm -fr conftest* | |
4884 | gdb_cv_prfpregset_t_broken=yes | |
4885 | fi | |
4886 | rm -fr conftest* | |
4887 | fi | |
4888 | ||
4889 | fi | |
4890 | ||
4891 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 | |
4892 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
4893 | cat >> confdefs.h <<\EOF | |
4894 | #define PRFPREGSET_T_BROKEN 1 | |
4895 | EOF | |
4896 | ||
4897 | fi | |
4898 | fi | |
4899 | ||
4900 | ||
c906108c | 4901 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 |
b4df4f68 | 4902 | echo "configure:4903: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
4903 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
4904 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4905 | else | |
4906 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4907 | #line 4908 "configure" |
c906108c SS |
4908 | #include "confdefs.h" |
4909 | #include <unistd.h> | |
4910 | #include <sys/types.h> | |
4911 | #include <sys/procfs.h> | |
4912 | ||
4913 | int main() { | |
4914 | ||
4915 | int dummy;; | |
4916 | dummy = ioctl(0, PIOCSET, &dummy); | |
4917 | ||
4918 | ; return 0; } | |
4919 | EOF | |
b4df4f68 | 4920 | if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4921 | rm -rf conftest* |
4922 | gdb_cv_have_procfs_piocset=yes | |
4923 | else | |
4924 | echo "configure: failed program was:" >&5 | |
4925 | cat conftest.$ac_ext >&5 | |
4926 | rm -rf conftest* | |
4927 | gdb_cv_have_procfs_piocset=no | |
4928 | fi | |
4929 | rm -f conftest* | |
4930 | fi | |
4931 | ||
4932 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
4933 | if test $gdb_cv_have_procfs_piocset = yes; then | |
4934 | cat >> confdefs.h <<\EOF | |
4935 | #define HAVE_PROCFS_PIOCSET 1 | |
4936 | EOF | |
4937 | ||
4938 | fi | |
4939 | fi | |
4940 | ||
4941 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
b4df4f68 | 4942 | echo "configure:4943: checking for main in -lm" >&5 |
c906108c SS |
4943 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
4944 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4945 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4946 | else | |
4947 | ac_save_LIBS="$LIBS" | |
4948 | LIBS="-lm $LIBS" | |
4949 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4950 | #line 4951 "configure" |
c906108c SS |
4951 | #include "confdefs.h" |
4952 | ||
4953 | int main() { | |
4954 | main() | |
4955 | ; return 0; } | |
4956 | EOF | |
b4df4f68 | 4957 | if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4958 | rm -rf conftest* |
4959 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4960 | else | |
4961 | echo "configure: failed program was:" >&5 | |
4962 | cat conftest.$ac_ext >&5 | |
4963 | rm -rf conftest* | |
4964 | eval "ac_cv_lib_$ac_lib_var=no" | |
4965 | fi | |
4966 | rm -f conftest* | |
4967 | LIBS="$ac_save_LIBS" | |
4968 | ||
4969 | fi | |
4970 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4971 | echo "$ac_t""yes" 1>&6 | |
4972 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4973 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4974 | cat >> confdefs.h <<EOF | |
4975 | #define $ac_tr_lib 1 | |
4976 | EOF | |
4977 | ||
4978 | LIBS="-lm $LIBS" | |
4979 | ||
4980 | else | |
4981 | echo "$ac_t""no" 1>&6 | |
4982 | fi | |
4983 | ||
4984 | ||
4985 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
b4df4f68 | 4986 | echo "configure:4987: checking for wctype in -lc" >&5 |
c906108c SS |
4987 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
4988 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4990 | else | |
4991 | ac_save_LIBS="$LIBS" | |
4992 | LIBS="-lc $LIBS" | |
4993 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 4994 | #line 4995 "configure" |
c906108c SS |
4995 | #include "confdefs.h" |
4996 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4997 | /* We use char because int might match the return type of a gcc2 | |
4998 | builtin and then its argument prototype would still apply. */ | |
4999 | char wctype(); | |
5000 | ||
5001 | int main() { | |
5002 | wctype() | |
5003 | ; return 0; } | |
5004 | EOF | |
b4df4f68 | 5005 | if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5006 | rm -rf conftest* |
5007 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5008 | else | |
5009 | echo "configure: failed program was:" >&5 | |
5010 | cat conftest.$ac_ext >&5 | |
5011 | rm -rf conftest* | |
5012 | eval "ac_cv_lib_$ac_lib_var=no" | |
5013 | fi | |
5014 | rm -f conftest* | |
5015 | LIBS="$ac_save_LIBS" | |
5016 | ||
5017 | fi | |
5018 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5019 | echo "$ac_t""yes" 1>&6 | |
5020 | : | |
5021 | else | |
5022 | echo "$ac_t""no" 1>&6 | |
5023 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
b4df4f68 | 5024 | echo "configure:5025: checking for wctype in -lw" >&5 |
c906108c SS |
5025 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
5026 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5027 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5028 | else | |
5029 | ac_save_LIBS="$LIBS" | |
5030 | LIBS="-lw $LIBS" | |
5031 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5032 | #line 5033 "configure" |
c906108c SS |
5033 | #include "confdefs.h" |
5034 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5035 | /* We use char because int might match the return type of a gcc2 | |
5036 | builtin and then its argument prototype would still apply. */ | |
5037 | char wctype(); | |
5038 | ||
5039 | int main() { | |
5040 | wctype() | |
5041 | ; return 0; } | |
5042 | EOF | |
b4df4f68 | 5043 | if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5044 | rm -rf conftest* |
5045 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5046 | else | |
5047 | echo "configure: failed program was:" >&5 | |
5048 | cat conftest.$ac_ext >&5 | |
5049 | rm -rf conftest* | |
5050 | eval "ac_cv_lib_$ac_lib_var=no" | |
5051 | fi | |
5052 | rm -f conftest* | |
5053 | LIBS="$ac_save_LIBS" | |
5054 | ||
5055 | fi | |
5056 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5057 | echo "$ac_t""yes" 1>&6 | |
5058 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
5059 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5060 | cat >> confdefs.h <<EOF | |
5061 | #define $ac_tr_lib 1 | |
5062 | EOF | |
5063 | ||
5064 | LIBS="-lw $LIBS" | |
5065 | ||
5066 | else | |
5067 | echo "$ac_t""no" 1>&6 | |
5068 | fi | |
5069 | ||
5070 | fi | |
5071 | ||
5072 | ||
5073 | ||
5074 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
b4df4f68 | 5075 | echo "configure:5076: checking for long long support in compiler" >&5 |
c906108c SS |
5076 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
5077 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5078 | else | |
5079 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5080 | #line 5081 "configure" |
c906108c SS |
5081 | #include "confdefs.h" |
5082 | ||
5083 | int main() { | |
5084 | ||
5085 | extern long long foo; | |
5086 | switch (foo & 2) { case 0: return 1; } | |
5087 | ||
5088 | ; return 0; } | |
5089 | EOF | |
b4df4f68 | 5090 | if { (eval echo configure:5091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5091 | rm -rf conftest* |
5092 | gdb_cv_c_long_long=yes | |
5093 | else | |
5094 | echo "configure: failed program was:" >&5 | |
5095 | cat conftest.$ac_ext >&5 | |
5096 | rm -rf conftest* | |
5097 | gdb_cv_c_long_long=no | |
5098 | fi | |
5099 | rm -f conftest* | |
5100 | fi | |
5101 | ||
5102 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
5103 | if test $gdb_cv_c_long_long = yes; then | |
5104 | cat >> confdefs.h <<\EOF | |
5105 | #define CC_HAS_LONG_LONG 1 | |
5106 | EOF | |
5107 | ||
5108 | fi | |
5109 | ||
5110 | ||
5111 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
b4df4f68 | 5112 | echo "configure:5113: checking for long long support in printf" >&5 |
c906108c SS |
5113 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
5114 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5115 | else | |
5116 | if test "$cross_compiling" = yes; then | |
5117 | gdb_cv_printf_has_long_long=no | |
5118 | else | |
5119 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5120 | #line 5121 "configure" |
c906108c SS |
5121 | #include "confdefs.h" |
5122 | ||
5123 | int main () { | |
5124 | char buf[32]; | |
5125 | long long l = 0; | |
5126 | l = (l << 16) + 0x0123; | |
5127 | l = (l << 16) + 0x4567; | |
5128 | l = (l << 16) + 0x89ab; | |
5129 | l = (l << 16) + 0xcdef; | |
5130 | sprintf (buf, "0x%016llx", l); | |
5131 | return (strcmp ("0x0123456789abcdef", buf)); | |
5132 | } | |
5133 | EOF | |
b4df4f68 | 5134 | if { (eval echo configure:5135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5135 | then |
5136 | gdb_cv_printf_has_long_long=yes | |
5137 | else | |
5138 | echo "configure: failed program was:" >&5 | |
5139 | cat conftest.$ac_ext >&5 | |
5140 | rm -fr conftest* | |
5141 | gdb_cv_printf_has_long_long=no | |
5142 | fi | |
5143 | rm -fr conftest* | |
5144 | fi | |
5145 | ||
5146 | fi | |
5147 | ||
5148 | if test $gdb_cv_printf_has_long_long = yes; then | |
5149 | cat >> confdefs.h <<\EOF | |
5150 | #define PRINTF_HAS_LONG_LONG 1 | |
5151 | EOF | |
5152 | ||
5153 | fi | |
5154 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
5155 | ||
5156 | ||
5157 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
b4df4f68 | 5158 | echo "configure:5159: checking for long double support in compiler" >&5 |
c906108c SS |
5159 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
5160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5161 | else | |
5162 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5163 | #line 5164 "configure" |
c906108c SS |
5164 | #include "confdefs.h" |
5165 | ||
5166 | int main() { | |
5167 | long double foo; | |
5168 | ; return 0; } | |
5169 | EOF | |
b4df4f68 | 5170 | if { (eval echo configure:5171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5171 | rm -rf conftest* |
5172 | ac_cv_c_long_double=yes | |
5173 | else | |
5174 | echo "configure: failed program was:" >&5 | |
5175 | cat conftest.$ac_ext >&5 | |
5176 | rm -rf conftest* | |
5177 | ac_cv_c_long_double=no | |
5178 | fi | |
5179 | rm -f conftest* | |
5180 | fi | |
5181 | ||
5182 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
5183 | if test $ac_cv_c_long_double = yes; then | |
5184 | cat >> confdefs.h <<\EOF | |
5185 | #define HAVE_LONG_DOUBLE 1 | |
5186 | EOF | |
5187 | ||
5188 | fi | |
5189 | ||
5190 | ||
5191 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
b4df4f68 | 5192 | echo "configure:5193: checking for long double support in printf" >&5 |
c906108c SS |
5193 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
5194 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5195 | else | |
5196 | if test "$cross_compiling" = yes; then | |
5197 | gdb_cv_printf_has_long_double=no | |
5198 | else | |
5199 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5200 | #line 5201 "configure" |
c906108c SS |
5201 | #include "confdefs.h" |
5202 | ||
5203 | int main () { | |
5204 | char buf[16]; | |
5205 | long double f = 3.141592653; | |
5206 | sprintf (buf, "%Lg", f); | |
5207 | return (strncmp ("3.14159", buf, 7)); | |
5208 | } | |
5209 | EOF | |
b4df4f68 | 5210 | if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5211 | then |
5212 | gdb_cv_printf_has_long_double=yes | |
5213 | else | |
5214 | echo "configure: failed program was:" >&5 | |
5215 | cat conftest.$ac_ext >&5 | |
5216 | rm -fr conftest* | |
5217 | gdb_cv_printf_has_long_double=no | |
5218 | fi | |
5219 | rm -fr conftest* | |
5220 | fi | |
5221 | ||
5222 | fi | |
5223 | ||
5224 | if test $gdb_cv_printf_has_long_double = yes; then | |
5225 | cat >> confdefs.h <<\EOF | |
5226 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
5227 | EOF | |
5228 | ||
5229 | fi | |
5230 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
5231 | ||
5232 | ||
5233 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
b4df4f68 | 5234 | echo "configure:5235: checking for long double support in scanf" >&5 |
c906108c SS |
5235 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
5236 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5237 | else | |
5238 | if test "$cross_compiling" = yes; then | |
5239 | gdb_cv_scanf_has_long_double=no | |
5240 | else | |
5241 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5242 | #line 5243 "configure" |
c906108c SS |
5243 | #include "confdefs.h" |
5244 | ||
5245 | int main () { | |
5246 | char *buf = "3.141592653"; | |
5247 | long double f = 0; | |
5248 | sscanf (buf, "%Lg", &f); | |
5249 | return !(f > 3.14159 && f < 3.14160); | |
5250 | } | |
5251 | EOF | |
b4df4f68 | 5252 | if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5253 | then |
5254 | gdb_cv_scanf_has_long_double=yes | |
5255 | else | |
5256 | echo "configure: failed program was:" >&5 | |
5257 | cat conftest.$ac_ext >&5 | |
5258 | rm -fr conftest* | |
5259 | gdb_cv_scanf_has_long_double=no | |
5260 | fi | |
5261 | rm -fr conftest* | |
5262 | fi | |
5263 | ||
5264 | fi | |
5265 | ||
5266 | if test $gdb_cv_scanf_has_long_double = yes; then | |
5267 | cat >> confdefs.h <<\EOF | |
5268 | #define SCANF_HAS_LONG_DOUBLE 1 | |
5269 | EOF | |
5270 | ||
5271 | fi | |
5272 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
5273 | ||
5274 | for ac_hdr in unistd.h | |
5275 | do | |
5276 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5277 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b4df4f68 | 5278 | echo "configure:5279: checking for $ac_hdr" >&5 |
c906108c SS |
5279 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5281 | else | |
5282 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5283 | #line 5284 "configure" |
c906108c SS |
5284 | #include "confdefs.h" |
5285 | #include <$ac_hdr> | |
5286 | EOF | |
5287 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 5288 | { (eval echo configure:5289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5289 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5290 | if test -z "$ac_err"; then | |
5291 | rm -rf conftest* | |
5292 | eval "ac_cv_header_$ac_safe=yes" | |
5293 | else | |
5294 | echo "$ac_err" >&5 | |
5295 | echo "configure: failed program was:" >&5 | |
5296 | cat conftest.$ac_ext >&5 | |
5297 | rm -rf conftest* | |
5298 | eval "ac_cv_header_$ac_safe=no" | |
5299 | fi | |
5300 | rm -f conftest* | |
5301 | fi | |
5302 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5303 | echo "$ac_t""yes" 1>&6 | |
5304 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5305 | cat >> confdefs.h <<EOF | |
5306 | #define $ac_tr_hdr 1 | |
5307 | EOF | |
5308 | ||
5309 | else | |
5310 | echo "$ac_t""no" 1>&6 | |
5311 | fi | |
5312 | done | |
5313 | ||
5314 | for ac_func in getpagesize | |
5315 | do | |
5316 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b4df4f68 | 5317 | echo "configure:5318: checking for $ac_func" >&5 |
c906108c SS |
5318 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5319 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5320 | else | |
5321 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5322 | #line 5323 "configure" |
c906108c SS |
5323 | #include "confdefs.h" |
5324 | /* System header to define __stub macros and hopefully few prototypes, | |
5325 | which can conflict with char $ac_func(); below. */ | |
5326 | #include <assert.h> | |
5327 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5328 | /* We use char because int might match the return type of a gcc2 | |
5329 | builtin and then its argument prototype would still apply. */ | |
5330 | char $ac_func(); | |
5331 | ||
5332 | int main() { | |
5333 | ||
5334 | /* The GNU C library defines this for functions which it implements | |
5335 | to always fail with ENOSYS. Some functions are actually named | |
5336 | something starting with __ and the normal name is an alias. */ | |
5337 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5338 | choke me | |
5339 | #else | |
5340 | $ac_func(); | |
5341 | #endif | |
5342 | ||
5343 | ; return 0; } | |
5344 | EOF | |
b4df4f68 | 5345 | if { (eval echo configure:5346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5346 | rm -rf conftest* |
5347 | eval "ac_cv_func_$ac_func=yes" | |
5348 | else | |
5349 | echo "configure: failed program was:" >&5 | |
5350 | cat conftest.$ac_ext >&5 | |
5351 | rm -rf conftest* | |
5352 | eval "ac_cv_func_$ac_func=no" | |
5353 | fi | |
5354 | rm -f conftest* | |
5355 | fi | |
5356 | ||
5357 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5358 | echo "$ac_t""yes" 1>&6 | |
5359 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5360 | cat >> confdefs.h <<EOF | |
5361 | #define $ac_tr_func 1 | |
5362 | EOF | |
5363 | ||
5364 | else | |
5365 | echo "$ac_t""no" 1>&6 | |
5366 | fi | |
5367 | done | |
5368 | ||
5369 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
b4df4f68 | 5370 | echo "configure:5371: checking for working mmap" >&5 |
c906108c SS |
5371 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5373 | else | |
5374 | if test "$cross_compiling" = yes; then | |
5375 | ac_cv_func_mmap_fixed_mapped=no | |
5376 | else | |
5377 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5378 | #line 5379 "configure" |
c906108c SS |
5379 | #include "confdefs.h" |
5380 | ||
5381 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5382 | Here is a matrix of mmap possibilities: | |
5383 | mmap private not fixed | |
5384 | mmap private fixed at somewhere currently unmapped | |
5385 | mmap private fixed at somewhere already mapped | |
5386 | mmap shared not fixed | |
5387 | mmap shared fixed at somewhere currently unmapped | |
5388 | mmap shared fixed at somewhere already mapped | |
5389 | For private mappings, we should verify that changes cannot be read() | |
5390 | back from the file, nor mmap's back from the file at a different | |
5391 | address. (There have been systems where private was not correctly | |
5392 | implemented like the infamous i386 svr4.0, and systems where the | |
5393 | VM page cache was not coherent with the filesystem buffer cache | |
5394 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5395 | For shared mappings, we should conversely verify that changes get | |
5396 | propogated back to all the places they're supposed to be. | |
5397 | ||
5398 | Grep wants private fixed already mapped. | |
5399 | The main things grep needs to know about mmap are: | |
5400 | * does it exist and is it safe to write into the mmap'd area | |
5401 | * how to use it (BSD variants) */ | |
5402 | #include <sys/types.h> | |
5403 | #include <fcntl.h> | |
5404 | #include <sys/mman.h> | |
5405 | ||
5406 | /* This mess was copied from the GNU getpagesize.h. */ | |
5407 | #ifndef HAVE_GETPAGESIZE | |
5408 | # ifdef HAVE_UNISTD_H | |
5409 | # include <unistd.h> | |
5410 | # endif | |
5411 | ||
5412 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5413 | # ifndef HAVE_SYS_PARAM_H | |
5414 | # define HAVE_SYS_PARAM_H 1 | |
5415 | # endif | |
5416 | ||
5417 | # ifdef _SC_PAGESIZE | |
5418 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5419 | # else /* no _SC_PAGESIZE */ | |
5420 | # ifdef HAVE_SYS_PARAM_H | |
5421 | # include <sys/param.h> | |
5422 | # ifdef EXEC_PAGESIZE | |
5423 | # define getpagesize() EXEC_PAGESIZE | |
5424 | # else /* no EXEC_PAGESIZE */ | |
5425 | # ifdef NBPG | |
5426 | # define getpagesize() NBPG * CLSIZE | |
5427 | # ifndef CLSIZE | |
5428 | # define CLSIZE 1 | |
5429 | # endif /* no CLSIZE */ | |
5430 | # else /* no NBPG */ | |
5431 | # ifdef NBPC | |
5432 | # define getpagesize() NBPC | |
5433 | # else /* no NBPC */ | |
5434 | # ifdef PAGESIZE | |
5435 | # define getpagesize() PAGESIZE | |
5436 | # endif /* PAGESIZE */ | |
5437 | # endif /* no NBPC */ | |
5438 | # endif /* no NBPG */ | |
5439 | # endif /* no EXEC_PAGESIZE */ | |
5440 | # else /* no HAVE_SYS_PARAM_H */ | |
5441 | # define getpagesize() 8192 /* punt totally */ | |
5442 | # endif /* no HAVE_SYS_PARAM_H */ | |
5443 | # endif /* no _SC_PAGESIZE */ | |
5444 | ||
5445 | #endif /* no HAVE_GETPAGESIZE */ | |
5446 | ||
5447 | #ifdef __cplusplus | |
5448 | extern "C" { void *malloc(unsigned); } | |
5449 | #else | |
5450 | char *malloc(); | |
5451 | #endif | |
5452 | ||
5453 | int | |
5454 | main() | |
5455 | { | |
5456 | char *data, *data2, *data3; | |
5457 | int i, pagesize; | |
5458 | int fd; | |
5459 | ||
5460 | pagesize = getpagesize(); | |
5461 | ||
5462 | /* | |
5463 | * First, make a file with some known garbage in it. | |
5464 | */ | |
5465 | data = malloc(pagesize); | |
5466 | if (!data) | |
5467 | exit(1); | |
5468 | for (i = 0; i < pagesize; ++i) | |
5469 | *(data + i) = rand(); | |
5470 | umask(0); | |
5471 | fd = creat("conftestmmap", 0600); | |
5472 | if (fd < 0) | |
5473 | exit(1); | |
5474 | if (write(fd, data, pagesize) != pagesize) | |
5475 | exit(1); | |
5476 | close(fd); | |
5477 | ||
5478 | /* | |
5479 | * Next, try to mmap the file at a fixed address which | |
5480 | * already has something else allocated at it. If we can, | |
5481 | * also make sure that we see the same garbage. | |
5482 | */ | |
5483 | fd = open("conftestmmap", O_RDWR); | |
5484 | if (fd < 0) | |
5485 | exit(1); | |
5486 | data2 = malloc(2 * pagesize); | |
5487 | if (!data2) | |
5488 | exit(1); | |
5489 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5490 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5491 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5492 | exit(1); | |
5493 | for (i = 0; i < pagesize; ++i) | |
5494 | if (*(data + i) != *(data2 + i)) | |
5495 | exit(1); | |
5496 | ||
5497 | /* | |
5498 | * Finally, make sure that changes to the mapped area | |
5499 | * do not percolate back to the file as seen by read(). | |
5500 | * (This is a bug on some variants of i386 svr4.0.) | |
5501 | */ | |
5502 | for (i = 0; i < pagesize; ++i) | |
5503 | *(data2 + i) = *(data2 + i) + 1; | |
5504 | data3 = malloc(pagesize); | |
5505 | if (!data3) | |
5506 | exit(1); | |
5507 | if (read(fd, data3, pagesize) != pagesize) | |
5508 | exit(1); | |
5509 | for (i = 0; i < pagesize; ++i) | |
5510 | if (*(data + i) != *(data3 + i)) | |
5511 | exit(1); | |
5512 | close(fd); | |
5513 | unlink("conftestmmap"); | |
5514 | exit(0); | |
5515 | } | |
5516 | ||
5517 | EOF | |
b4df4f68 | 5518 | if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5519 | then |
5520 | ac_cv_func_mmap_fixed_mapped=yes | |
5521 | else | |
5522 | echo "configure: failed program was:" >&5 | |
5523 | cat conftest.$ac_ext >&5 | |
5524 | rm -fr conftest* | |
5525 | ac_cv_func_mmap_fixed_mapped=no | |
5526 | fi | |
5527 | rm -fr conftest* | |
5528 | fi | |
5529 | ||
5530 | fi | |
5531 | ||
5532 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
5533 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5534 | cat >> confdefs.h <<\EOF | |
5535 | #define HAVE_MMAP 1 | |
5536 | EOF | |
5537 | ||
5538 | fi | |
5539 | ||
5540 | ||
5541 | ||
5542 | ||
5543 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5544 | case ${host_os} in | |
5545 | hpux*) | |
5546 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
b4df4f68 | 5547 | echo "configure:5548: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
5548 | if test -f /usr/include/dce/cma_config.h ; then |
5549 | if test "$GCC" = "yes" ; then | |
5550 | echo "$ac_t""yes" 1>&6 | |
5551 | cat >> confdefs.h <<\EOF | |
5552 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
5553 | EOF | |
5554 | ||
66b965bb | 5555 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
5556 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
5557 | else | |
5558 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
5559 | fi | |
5560 | else | |
5561 | echo "$ac_t""no" 1>&6 | |
5562 | fi | |
5563 | ;; | |
5564 | solaris*) | |
5565 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
b4df4f68 | 5566 | echo "configure:5567: checking for Solaris thread debugging library" >&5 |
c906108c SS |
5567 | if test -f /usr/lib/libthread_db.so.1 ; then |
5568 | echo "$ac_t""yes" 1>&6 | |
5569 | cat >> confdefs.h <<\EOF | |
5570 | #define HAVE_THREAD_DB_LIB 1 | |
5571 | EOF | |
5572 | ||
66b965bb | 5573 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
5574 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
5575 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
b4df4f68 | 5576 | echo "configure:5577: checking for dlopen in -ldl" >&5 |
c906108c SS |
5577 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
5578 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5579 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5580 | else | |
5581 | ac_save_LIBS="$LIBS" | |
5582 | LIBS="-ldl $LIBS" | |
5583 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5584 | #line 5585 "configure" |
c906108c SS |
5585 | #include "confdefs.h" |
5586 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5587 | /* We use char because int might match the return type of a gcc2 | |
5588 | builtin and then its argument prototype would still apply. */ | |
5589 | char dlopen(); | |
5590 | ||
5591 | int main() { | |
5592 | dlopen() | |
5593 | ; return 0; } | |
5594 | EOF | |
b4df4f68 | 5595 | if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5596 | rm -rf conftest* |
5597 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5598 | else | |
5599 | echo "configure: failed program was:" >&5 | |
5600 | cat conftest.$ac_ext >&5 | |
5601 | rm -rf conftest* | |
5602 | eval "ac_cv_lib_$ac_lib_var=no" | |
5603 | fi | |
5604 | rm -f conftest* | |
5605 | LIBS="$ac_save_LIBS" | |
5606 | ||
5607 | fi | |
5608 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5609 | echo "$ac_t""yes" 1>&6 | |
5610 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5611 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5612 | cat >> confdefs.h <<EOF | |
5613 | #define $ac_tr_lib 1 | |
5614 | EOF | |
5615 | ||
5616 | LIBS="-ldl $LIBS" | |
5617 | ||
5618 | else | |
5619 | echo "$ac_t""no" 1>&6 | |
5620 | fi | |
5621 | ||
5622 | if test "$GCC" = "yes" ; then | |
5623 | # The GNU linker requires the -export-dynamic option to make | |
5624 | # all symbols visible in the dynamic symbol table. | |
5625 | hold_ldflags=$LDFLAGS | |
5626 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
b4df4f68 | 5627 | echo "configure:5628: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
5628 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
5629 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5630 | #line 5631 "configure" |
c906108c SS |
5631 | #include "confdefs.h" |
5632 | ||
5633 | int main() { | |
5634 | int i; | |
5635 | ; return 0; } | |
5636 | EOF | |
b4df4f68 | 5637 | if { (eval echo configure:5638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5638 | rm -rf conftest* |
5639 | found=yes | |
5640 | else | |
5641 | echo "configure: failed program was:" >&5 | |
5642 | cat conftest.$ac_ext >&5 | |
5643 | rm -rf conftest* | |
5644 | found=no | |
5645 | fi | |
5646 | rm -f conftest* | |
5647 | LDFLAGS=$hold_ldflags | |
5648 | echo "$ac_t""$found" 1>&6 | |
5649 | if test $found = yes; then | |
5650 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
5651 | fi | |
5652 | fi | |
5653 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
5654 | # at one point. | |
5655 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
b4df4f68 | 5656 | echo "configure:5657: checking if <proc_service.h> is old" >&5 |
c906108c SS |
5657 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
5658 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5659 | else | |
5660 | ||
5661 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5662 | #line 5663 "configure" |
c906108c SS |
5663 | #include "confdefs.h" |
5664 | ||
5665 | #include <proc_service.h> | |
5666 | ps_err_e ps_pdwrite | |
5667 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
5668 | ||
5669 | int main() { | |
5670 | ||
5671 | ; return 0; } | |
5672 | EOF | |
b4df4f68 | 5673 | if { (eval echo configure:5674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5674 | rm -rf conftest* |
5675 | gdb_cv_proc_service_is_old=no | |
5676 | else | |
5677 | echo "configure: failed program was:" >&5 | |
5678 | cat conftest.$ac_ext >&5 | |
5679 | rm -rf conftest* | |
5680 | gdb_cv_proc_service_is_old=yes | |
5681 | fi | |
5682 | rm -f conftest* | |
5683 | ||
5684 | fi | |
5685 | ||
5686 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
5687 | if test $gdb_cv_proc_service_is_old = yes; then | |
5688 | cat >> confdefs.h <<\EOF | |
5689 | #define PROC_SERVICE_IS_OLD 1 | |
5690 | EOF | |
5691 | ||
5692 | fi | |
5693 | else | |
5694 | echo "$ac_t""no" 1>&6 | |
5695 | fi | |
5696 | ;; | |
5697 | esac | |
5698 | ||
5699 | fi | |
5700 | ||
fb40c209 | 5701 | |
d318976c FN |
5702 | # Check whether --enable-gdbcli or --disable-gdbcli was given. |
5703 | if test "${enable_gdbcli+set}" = set; then | |
5704 | enableval="$enable_gdbcli" | |
5705 | ||
6bad8db2 FN |
5706 | case "${enableval}" in |
5707 | yes) enable_gdbcli=yes ;; | |
5708 | "") enable_gdbcli=yes ;; | |
d318976c FN |
5709 | no) |
5710 | { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; } | |
5711 | ;; | |
5712 | *) | |
6bad8db2 | 5713 | { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; } |
d318976c FN |
5714 | ;; |
5715 | esac | |
5716 | ||
5717 | else | |
5718 | enable_gdbcli=yes | |
5719 | fi | |
5720 | ||
5721 | case ${enable_gdbcli} in | |
5722 | "yes" ) | |
6bad8db2 | 5723 | if test -d "${srcdir}/cli" ; then |
d318976c FN |
5724 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)" |
5725 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)" | |
486697a0 | 5726 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)" |
d318976c FN |
5727 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)" |
5728 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)" | |
5729 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)" | |
5730 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)" | |
5731 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)" | |
5732 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)" | |
5733 | fi | |
5734 | ;; | |
5735 | esac | |
5736 | ||
5737 | ||
fb40c209 AC |
5738 | # Check whether --enable-gdbmi or --disable-gdbmi was given. |
5739 | if test "${enable_gdbmi+set}" = set; then | |
5740 | enableval="$enable_gdbmi" | |
5741 | ||
5742 | case "${enable_gdbmi}" in | |
5743 | yes | no) ;; | |
5744 | "") enable_gdbmi=yes ;; | |
5745 | *) | |
5746 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
5747 | ;; | |
5748 | esac | |
5749 | ||
5750 | fi | |
5751 | ||
5752 | case ${enable_gdbmi} in | |
5753 | "yes" ) | |
5754 | if test -d "${srcdir}/mi" ; then | |
5755 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
5756 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
486697a0 | 5757 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)" |
fb40c209 | 5758 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" |
b0b1b869 | 5759 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
5760 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
5761 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
5762 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
5763 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
5764 | fi |
5765 | ;; | |
5766 | esac | |
c906108c | 5767 | |
b4df4f68 FN |
5768 | # Configure UI_OUT by default (before 5.2 it can be disabled) |
5769 | # It must be configured if gdbmi is configured | |
5770 | ||
5771 | UIOUT_CFLAGS= | |
5772 | ||
5773 | ||
5774 | # Check whether --with-uiout or --without-uiout was given. | |
5775 | if test "${with_uiout+set}" = set; then | |
5776 | withval="$with_uiout" | |
5777 | case "${withval}" in | |
5778 | yes) want_uiout=true ;; | |
5779 | no) if test $enable_gdbmi = yes; then | |
5780 | { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; } | |
5781 | else | |
5782 | want_uiout=false | |
5783 | fi ;; | |
5784 | *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;; | |
5785 | esac | |
5786 | else | |
5787 | want_uiout=true | |
5788 | fi | |
5789 | ||
5790 | if test $want_uiout = true; then | |
5791 | UIOUT_CFLAGS="-DUI_OUT=1" | |
5792 | fi | |
5793 | ||
c906108c SS |
5794 | # Check whether --enable-tui or --disable-tui was given. |
5795 | if test "${enable_tui+set}" = set; then | |
5796 | enableval="$enable_tui" | |
5797 | ||
5798 | case "${enable_tui}" in | |
5799 | yes | no) ;; | |
5800 | "") enable_tui=yes ;; | |
5801 | *) | |
5802 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
5803 | ;; | |
5804 | esac | |
5805 | ||
5806 | fi | |
5807 | ||
5808 | case ${enable_tui} in | |
5809 | "yes" ) | |
ed952ac5 AC |
5810 | if test -d "${srcdir}/tui" ; then |
5811 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
5812 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
486697a0 | 5813 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)" |
ed952ac5 AC |
5814 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" |
5815 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
5816 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
5817 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
5818 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
5819 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
5820 | fi | |
5821 | ;; | |
c906108c SS |
5822 | esac |
5823 | ||
c906108c SS |
5824 | # Check whether --enable-netrom or --disable-netrom was given. |
5825 | if test "${enable_netrom+set}" = set; then | |
5826 | enableval="$enable_netrom" | |
5827 | case "${enableval}" in | |
5828 | yes) enable_netrom=yes ;; | |
5829 | no) enable_netrom=no ;; | |
5830 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
5831 | esac | |
5832 | fi | |
5833 | ||
5834 | ||
5835 | if test "${enable_netrom}" = "yes"; then | |
66b965bb | 5836 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" |
c906108c SS |
5837 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" |
5838 | fi | |
5839 | ||
1decb323 | 5840 | |
3b851bce AC |
5841 | # NOTE: Don't add -Wall or -Wunused, they both include |
5842 | # -Wunused-parameter which reports bogus warnings. | |
5843 | # NOTE: If you add to this list, remember to update | |
5844 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 5845 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
16cadf39 | 5846 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
5847 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
5848 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
5849 | # -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual | |
5850 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes | |
5851 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
5852 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
5853 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
5854 | if test "${enable_build_warnings+set}" = set; then | |
5855 | enableval="$enable_build_warnings" | |
1decb323 | 5856 | case "${enableval}" in |
c906108c SS |
5857 | yes) ;; |
5858 | no) build_warnings="-w";; | |
5859 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5860 | build_warnings="${build_warnings} ${t}";; | |
5861 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5862 | build_warnings="${t} ${build_warnings}";; | |
5863 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5864 | esac | |
d4f3574e | 5865 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 5866 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 5867 | fi |
1decb323 | 5868 | fi |
3b851bce AC |
5869 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
5870 | if test "${enable_gdb_build_warnings+set}" = set; then | |
5871 | enableval="$enable_gdb_build_warnings" | |
5872 | case "${enableval}" in | |
5873 | yes) ;; | |
5874 | no) build_warnings="-w";; | |
5875 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5876 | build_warnings="${build_warnings} ${t}";; | |
5877 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5878 | build_warnings="${t} ${build_warnings}";; | |
5879 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5880 | esac | |
5881 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
5882 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
5883 | fi | |
5884 | fi | |
104c1213 JM |
5885 | WARN_CFLAGS="" |
5886 | WERROR_CFLAGS="" | |
c906108c SS |
5887 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
5888 | then | |
746a987d | 5889 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
b4df4f68 | 5890 | echo "configure:5891: checking compiler warning flags" >&5 |
746a987d AC |
5891 | # Separate out the -Werror flag as some files just cannot be |
5892 | # compiled with it enabled. | |
5893 | for w in ${build_warnings}; do | |
5894 | case $w in | |
5895 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
5896 | *) # Check that GCC accepts it | |
5897 | if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then | |
5898 | : | |
5899 | else | |
5900 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
5901 | fi | |
5902 | esac | |
5903 | done | |
5904 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
5905 | fi |
5906 | ||
5907 | ||
104c1213 | 5908 | |
c906108c SS |
5909 | MMALLOC_CFLAGS= |
5910 | MMALLOC= | |
5911 | ||
5912 | ||
5913 | ||
5914 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
5915 | if test "${with_mmalloc+set}" = set; then | |
5916 | withval="$with_mmalloc" | |
5917 | case "${withval}" in | |
5918 | yes) want_mmalloc=true ;; | |
5919 | no) want_mmalloc=false;; | |
5920 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
5921 | esac | |
5922 | else | |
5923 | want_mmalloc=false | |
5924 | fi | |
5925 | ||
5926 | if test x$want_mmalloc = xtrue; then | |
5927 | cat >> confdefs.h <<\EOF | |
5928 | #define USE_MMALLOC 1 | |
5929 | EOF | |
5930 | ||
5931 | cat >> confdefs.h <<\EOF | |
5932 | #define MMCHECK_FORCE 1 | |
5933 | EOF | |
5934 | ||
5935 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
5936 | MMALLOC='../mmalloc/libmmalloc.a' | |
5937 | fi | |
5938 | ||
88987551 L |
5939 | # Check whether --with-included-regex or --without-included-regex was given. |
5940 | if test "${with_included_regex+set}" = set; then | |
5941 | withval="$with_included_regex" | |
5942 | case "${withval}" in | |
5943 | yes) want_included_regex=true ;; | |
5944 | no) want_included_regex=false;; | |
5945 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
5946 | esac | |
5947 | else | |
5948 | want_included_regex=true | |
5949 | fi | |
5950 | ||
88987551 L |
5951 | if test $want_included_regex = false; then |
5952 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
b4df4f68 | 5953 | echo "configure:5954: checking for GNU regex" >&5 |
88987551 L |
5954 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
5955 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5956 | else | |
5957 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 5958 | #line 5959 "configure" |
88987551 L |
5959 | #include "confdefs.h" |
5960 | #include <gnu-versions.h> | |
5961 | #include <sys/types.h> | |
5962 | #include <regex.h> | |
5963 | int main() { | |
5964 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
5965 | #error No valid GNU regex. | |
5966 | #endif | |
5967 | ||
5968 | ; return 0; } | |
5969 | EOF | |
b4df4f68 | 5970 | if { (eval echo configure:5971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
5971 | rm -rf conftest* |
5972 | gdb_cv_have_gnu_regex=yes | |
5973 | else | |
5974 | echo "configure: failed program was:" >&5 | |
5975 | cat conftest.$ac_ext >&5 | |
5976 | rm -rf conftest* | |
5977 | gdb_cv_have_gnu_regex=no | |
5978 | fi | |
5979 | rm -f conftest* | |
5980 | fi | |
5981 | ||
5982 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
5983 | if test $gdb_cv_have_gnu_regex = no; then |
5984 | want_included_regex=true | |
88987551 L |
5985 | fi |
5986 | fi | |
5987 | ||
e48f66e4 AC |
5988 | if test x${want_included_regex} = xtrue; then |
5989 | REGEX="gnu-regex.o" | |
5990 | cat >> confdefs.h <<\EOF | |
5991 | #define USE_INCLUDED_REGEX 1 | |
5992 | EOF | |
5993 | ||
5994 | fi | |
88987551 | 5995 | |
7a292a7a SS |
5996 | |
5997 | # In the Cygwin environment, we need some additional flags. | |
5998 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
b4df4f68 | 5999 | echo "configure:6000: checking for cygwin" >&5 |
7a292a7a SS |
6000 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
6001 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6002 | else | |
6003 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6004 | #line 6005 "configure" |
7a292a7a SS |
6005 | #include "confdefs.h" |
6006 | ||
6007 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
6008 | lose | |
6009 | #endif | |
6010 | EOF | |
6011 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6012 | egrep "lose" >/dev/null 2>&1; then | |
6013 | rm -rf conftest* | |
6014 | gdb_cv_os_cygwin=yes | |
6015 | else | |
6016 | rm -rf conftest* | |
6017 | gdb_cv_os_cygwin=no | |
6018 | fi | |
6019 | rm -f conftest* | |
6020 | ||
6021 | fi | |
6022 | ||
6023 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
6024 | ||
aff38e61 AC |
6025 | |
6026 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
6027 | case ${host} in | |
95cbc983 AC |
6028 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
6029 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
6030 | esac |
6031 | ||
6032 | ||
6033 | ||
b83266a0 SS |
6034 | if test x$gdb_host = xgo32; then |
6035 | TERM_LIB= | |
6036 | else | |
c906108c SS |
6037 | if test x$gdb_cv_os_cygwin = xyes; then |
6038 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
6039 | else | |
6040 | TERM_LIB= | |
6041 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
b4df4f68 | 6042 | echo "configure:6043: checking for tgetent in -lncurses" >&5 |
c906108c SS |
6043 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
6044 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6045 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6046 | else | |
6047 | ac_save_LIBS="$LIBS" | |
6048 | LIBS="-lncurses $LIBS" | |
6049 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6050 | #line 6051 "configure" |
c906108c SS |
6051 | #include "confdefs.h" |
6052 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6053 | /* We use char because int might match the return type of a gcc2 | |
6054 | builtin and then its argument prototype would still apply. */ | |
6055 | char tgetent(); | |
6056 | ||
6057 | int main() { | |
6058 | tgetent() | |
6059 | ; return 0; } | |
6060 | EOF | |
b4df4f68 | 6061 | if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6062 | rm -rf conftest* |
6063 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6064 | else | |
6065 | echo "configure: failed program was:" >&5 | |
6066 | cat conftest.$ac_ext >&5 | |
6067 | rm -rf conftest* | |
6068 | eval "ac_cv_lib_$ac_lib_var=no" | |
6069 | fi | |
6070 | rm -f conftest* | |
6071 | LIBS="$ac_save_LIBS" | |
6072 | ||
6073 | fi | |
6074 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6075 | echo "$ac_t""yes" 1>&6 | |
6076 | TERM_LIB=-lncurses | |
6077 | else | |
6078 | echo "$ac_t""no" 1>&6 | |
6079 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
b4df4f68 | 6080 | echo "configure:6081: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
6081 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
6082 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6083 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6084 | else | |
6085 | ac_save_LIBS="$LIBS" | |
6086 | LIBS="-lHcurses $LIBS" | |
6087 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6088 | #line 6089 "configure" |
c906108c SS |
6089 | #include "confdefs.h" |
6090 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6091 | /* We use char because int might match the return type of a gcc2 | |
6092 | builtin and then its argument prototype would still apply. */ | |
6093 | char tgetent(); | |
6094 | ||
6095 | int main() { | |
6096 | tgetent() | |
6097 | ; return 0; } | |
6098 | EOF | |
b4df4f68 | 6099 | if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6100 | rm -rf conftest* |
6101 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6102 | else | |
6103 | echo "configure: failed program was:" >&5 | |
6104 | cat conftest.$ac_ext >&5 | |
6105 | rm -rf conftest* | |
6106 | eval "ac_cv_lib_$ac_lib_var=no" | |
6107 | fi | |
6108 | rm -f conftest* | |
6109 | LIBS="$ac_save_LIBS" | |
6110 | ||
6111 | fi | |
6112 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6113 | echo "$ac_t""yes" 1>&6 | |
6114 | TERM_LIB=-lHcurses | |
6115 | else | |
6116 | echo "$ac_t""no" 1>&6 | |
6117 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
b4df4f68 | 6118 | echo "configure:6119: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
6119 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
6120 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6121 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6122 | else | |
6123 | ac_save_LIBS="$LIBS" | |
6124 | LIBS="-ltermlib $LIBS" | |
6125 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6126 | #line 6127 "configure" |
c906108c SS |
6127 | #include "confdefs.h" |
6128 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6129 | /* We use char because int might match the return type of a gcc2 | |
6130 | builtin and then its argument prototype would still apply. */ | |
6131 | char tgetent(); | |
6132 | ||
6133 | int main() { | |
6134 | tgetent() | |
6135 | ; return 0; } | |
6136 | EOF | |
b4df4f68 | 6137 | if { (eval echo configure:6138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6138 | rm -rf conftest* |
6139 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6140 | else | |
6141 | echo "configure: failed program was:" >&5 | |
6142 | cat conftest.$ac_ext >&5 | |
6143 | rm -rf conftest* | |
6144 | eval "ac_cv_lib_$ac_lib_var=no" | |
6145 | fi | |
6146 | rm -f conftest* | |
6147 | LIBS="$ac_save_LIBS" | |
6148 | ||
6149 | fi | |
6150 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6151 | echo "$ac_t""yes" 1>&6 | |
6152 | TERM_LIB=-ltermlib | |
6153 | else | |
6154 | echo "$ac_t""no" 1>&6 | |
6155 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
b4df4f68 | 6156 | echo "configure:6157: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
6157 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
6158 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6159 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6160 | else | |
6161 | ac_save_LIBS="$LIBS" | |
6162 | LIBS="-ltermcap $LIBS" | |
6163 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6164 | #line 6165 "configure" |
c906108c SS |
6165 | #include "confdefs.h" |
6166 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6167 | /* We use char because int might match the return type of a gcc2 | |
6168 | builtin and then its argument prototype would still apply. */ | |
6169 | char tgetent(); | |
6170 | ||
6171 | int main() { | |
6172 | tgetent() | |
6173 | ; return 0; } | |
6174 | EOF | |
b4df4f68 | 6175 | if { (eval echo configure:6176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6176 | rm -rf conftest* |
6177 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6178 | else | |
6179 | echo "configure: failed program was:" >&5 | |
6180 | cat conftest.$ac_ext >&5 | |
6181 | rm -rf conftest* | |
6182 | eval "ac_cv_lib_$ac_lib_var=no" | |
6183 | fi | |
6184 | rm -f conftest* | |
6185 | LIBS="$ac_save_LIBS" | |
6186 | ||
6187 | fi | |
6188 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6189 | echo "$ac_t""yes" 1>&6 | |
6190 | TERM_LIB=-ltermcap | |
6191 | else | |
6192 | echo "$ac_t""no" 1>&6 | |
6193 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
b4df4f68 | 6194 | echo "configure:6195: checking for tgetent in -lcurses" >&5 |
c906108c SS |
6195 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
6196 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6197 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6198 | else | |
6199 | ac_save_LIBS="$LIBS" | |
6200 | LIBS="-lcurses $LIBS" | |
6201 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6202 | #line 6203 "configure" |
c906108c SS |
6203 | #include "confdefs.h" |
6204 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6205 | /* We use char because int might match the return type of a gcc2 | |
6206 | builtin and then its argument prototype would still apply. */ | |
6207 | char tgetent(); | |
6208 | ||
6209 | int main() { | |
6210 | tgetent() | |
6211 | ; return 0; } | |
6212 | EOF | |
b4df4f68 | 6213 | if { (eval echo configure:6214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6214 | rm -rf conftest* |
6215 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6216 | else | |
6217 | echo "configure: failed program was:" >&5 | |
6218 | cat conftest.$ac_ext >&5 | |
6219 | rm -rf conftest* | |
6220 | eval "ac_cv_lib_$ac_lib_var=no" | |
6221 | fi | |
6222 | rm -f conftest* | |
6223 | LIBS="$ac_save_LIBS" | |
6224 | ||
6225 | fi | |
6226 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6227 | echo "$ac_t""yes" 1>&6 | |
6228 | TERM_LIB=-lcurses | |
6229 | else | |
6230 | echo "$ac_t""no" 1>&6 | |
6231 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
b4df4f68 | 6232 | echo "configure:6233: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
6233 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
6234 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6236 | else | |
6237 | ac_save_LIBS="$LIBS" | |
6238 | LIBS="-lterminfo $LIBS" | |
6239 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6240 | #line 6241 "configure" |
c906108c SS |
6241 | #include "confdefs.h" |
6242 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6243 | /* We use char because int might match the return type of a gcc2 | |
6244 | builtin and then its argument prototype would still apply. */ | |
6245 | char tgetent(); | |
6246 | ||
6247 | int main() { | |
6248 | tgetent() | |
6249 | ; return 0; } | |
6250 | EOF | |
b4df4f68 | 6251 | if { (eval echo configure:6252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6252 | rm -rf conftest* |
6253 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6254 | else | |
6255 | echo "configure: failed program was:" >&5 | |
6256 | cat conftest.$ac_ext >&5 | |
6257 | rm -rf conftest* | |
6258 | eval "ac_cv_lib_$ac_lib_var=no" | |
6259 | fi | |
6260 | rm -f conftest* | |
6261 | LIBS="$ac_save_LIBS" | |
6262 | ||
6263 | fi | |
6264 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6265 | echo "$ac_t""yes" 1>&6 | |
6266 | TERM_LIB=-lterminfo | |
6267 | else | |
6268 | echo "$ac_t""no" 1>&6 | |
6269 | fi | |
6270 | ||
6271 | fi | |
6272 | ||
6273 | fi | |
6274 | ||
6275 | fi | |
6276 | ||
6277 | fi | |
6278 | ||
6279 | fi | |
6280 | ||
6281 | ||
6282 | if test "x$TERM_LIB" = x | |
6283 | then | |
6284 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
6285 | fi | |
6286 | fi | |
b83266a0 | 6287 | fi |
c906108c SS |
6288 | |
6289 | ||
cd0fc7c3 SS |
6290 | # libreadline needs libuser32.a in a cygwin environment |
6291 | WIN32LIBS= | |
6292 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
6293 | WIN32LIBS="-luser32" |
6294 | case "${target}" in | |
6295 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
6296 | ;; | |
6297 | esac | |
cd0fc7c3 | 6298 | fi |
c906108c | 6299 | |
7a292a7a | 6300 | |
3fc11d3e JM |
6301 | LIBGUI="../libgui/src/libgui.a" |
6302 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
6303 | ||
6304 | ||
7a292a7a | 6305 | |
8b93c638 JM |
6306 | # Check whether --with-cpu or --without-cpu was given. |
6307 | if test "${with_cpu+set}" = set; then | |
6308 | withval="$with_cpu" | |
6309 | case "${target}" in | |
6310 | powerpc-* | powerpcle-* ) | |
6311 | ## It would be nice to keep this table in sync with the one in | |
6312 | ## gcc/configure. | |
6313 | case "${with_cpu}" in | |
6314 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
6315 | | 604 | 750 ) | |
6316 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
6317 | ;; | |
6318 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
6319 | ## These are all RS6000 variants, as far as GDB is concerned. | |
6320 | with_cpu=rs6000 | |
6321 | ;; | |
6322 | 603e | ec603e ) | |
6323 | with_cpu=603 | |
6324 | ;; | |
6325 | 604e ) | |
6326 | with_cpu=604 | |
6327 | ;; | |
6328 | * ) | |
6329 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
6330 | with_cpu=ppc-uisa | |
6331 | ;; | |
6332 | esac | |
6333 | ;; | |
6334 | * ) | |
6335 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
6336 | ;; | |
6337 | esac | |
6338 | cat >> confdefs.h <<EOF | |
6339 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
6340 | EOF | |
6341 | ||
6342 | ||
6343 | fi | |
6344 | ||
6345 | ||
6346 | ||
3fc11d3e JM |
6347 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
6348 | if test "${enable_gdbtk+set}" = set; then | |
6349 | enableval="$enable_gdbtk" | |
6350 | case "${enableval}" in | |
6351 | yes) | |
6352 | case "$host" in | |
6353 | *go32*) | |
6354 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6355 | enable_gdbtk=no ;; | |
6356 | *windows*) | |
6357 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
6358 | enable_gdbtk=no ;; | |
6359 | *) | |
6360 | enable_gdbtk=yes ;; | |
6361 | esac ;; | |
6362 | no) | |
6363 | enable_gdbtk=no ;; | |
6364 | *) | |
6365 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
6366 | esac | |
6367 | else | |
6368 | ||
6369 | # Default is on for everything but go32 and Cygwin | |
6370 | case "$host" in | |
6371 | *go32* | *windows*) | |
6372 | ;; | |
6373 | *) | |
379d6434 AC |
6374 | if test -d "${srcdir}/gdbtk" ; then |
6375 | enable_gdbtk=yes | |
6376 | fi | |
6377 | ;; | |
6378 | esac | |
3fc11d3e JM |
6379 | |
6380 | fi | |
6381 | ||
6382 | ||
6383 | WIN32LDAPP= | |
6384 | ||
6385 | ||
6386 | ||
6387 | configdir="unix" | |
6388 | ||
6389 | GDBTKLIBS= | |
6390 | if test "${enable_gdbtk}" = "yes"; then | |
6391 | ||
6392 | ||
6393 | # | |
6394 | # Ok, lets find the tcl configuration | |
6395 | # First, look for one uninstalled. | |
6396 | # the alternative search directory is invoked by --with-tclconfig | |
6397 | # | |
6398 | ||
6399 | if test x"${no_tcl}" = x ; then | |
6400 | # we reset no_tcl in case something fails here | |
6401 | no_tcl=true | |
6402 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
6403 | if test "${with_tclconfig+set}" = set; then | |
6404 | withval="$with_tclconfig" | |
6405 | with_tclconfig=${withval} | |
6406 | fi | |
6407 | ||
6408 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
b4df4f68 | 6409 | echo "configure:6410: checking for Tcl configuration" >&5 |
3fc11d3e JM |
6410 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
6411 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6412 | else | |
6413 | ||
6414 | ||
6415 | # First check to see if --with-tclconfig was specified. | |
6416 | if test x"${with_tclconfig}" != x ; then | |
6417 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
6418 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
6419 | else | |
6420 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
6421 | fi | |
6422 | fi | |
6423 | ||
6424 | # then check for a private Tcl installation | |
6425 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6426 | for i in \ | |
6427 | ../tcl \ | |
6428 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
6429 | ../../tcl \ | |
6430 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
6431 | ../../../tcl \ | |
6432 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
6433 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6434 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6435 | break | |
6436 | fi | |
6437 | done | |
6438 | fi | |
6439 | # check in a few common install locations | |
6440 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6441 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6442 | if test -f "$i/tclConfig.sh" ; then | |
6443 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
6444 | break | |
6445 | fi | |
6446 | done | |
6447 | fi | |
6448 | # check in a few other private locations | |
6449 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6450 | for i in \ | |
6451 | ${srcdir}/../tcl \ | |
6452 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
6453 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
6454 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
6455 | break | |
6456 | fi | |
6457 | done | |
6458 | fi | |
6459 | ||
6460 | fi | |
6461 | ||
6462 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6463 | TCLCONFIG="# no Tcl configs found" | |
6464 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
6465 | else | |
6466 | no_tcl= | |
6467 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
6468 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
6469 | fi | |
6470 | fi | |
6471 | ||
6472 | if test -z "${no_tcl}"; then | |
6473 | ||
6474 | . $TCLCONFIG | |
6475 | ||
6476 | ||
6477 | ||
6478 | ||
6479 | ||
6480 | ||
6481 | ||
6482 | ||
6483 | ||
6484 | ||
6485 | ||
6486 | ||
6487 | ||
6488 | ||
6489 | ||
6490 | ||
6491 | ||
6492 | ||
6493 | ||
6494 | ||
6495 | ||
6496 | ||
6497 | ||
6498 | ||
6499 | ||
6500 | ||
6501 | # | |
6502 | # Ok, lets find the tk configuration | |
6503 | # First, look for one uninstalled. | |
6504 | # the alternative search directory is invoked by --with-tkconfig | |
6505 | # | |
6506 | ||
6507 | if test x"${no_tk}" = x ; then | |
6508 | # we reset no_tk in case something fails here | |
6509 | no_tk=true | |
6510 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
6511 | if test "${with_tkconfig+set}" = set; then | |
6512 | withval="$with_tkconfig" | |
6513 | with_tkconfig=${withval} | |
6514 | fi | |
6515 | ||
6516 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
b4df4f68 | 6517 | echo "configure:6518: checking for Tk configuration" >&5 |
3fc11d3e JM |
6518 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
6519 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6520 | else | |
6521 | ||
6522 | ||
6523 | # First check to see if --with-tkconfig was specified. | |
6524 | if test x"${with_tkconfig}" != x ; then | |
6525 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
6526 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
6527 | else | |
6528 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
6529 | fi | |
6530 | fi | |
6531 | ||
6532 | # then check for a private Tk library | |
6533 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6534 | for i in \ | |
6535 | ../tk \ | |
6536 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
6537 | ../../tk \ | |
6538 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
6539 | ../../../tk \ | |
6540 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
6541 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6542 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6543 | break | |
6544 | fi | |
6545 | done | |
6546 | fi | |
6547 | # check in a few common install locations | |
6548 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6549 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6550 | if test -f "$i/tkConfig.sh" ; then | |
6551 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
6552 | break | |
6553 | fi | |
6554 | done | |
6555 | fi | |
6556 | # check in a few other private locations | |
6557 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6558 | for i in \ | |
6559 | ${srcdir}/../tk \ | |
6560 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
6561 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6562 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6563 | break | |
6564 | fi | |
6565 | done | |
6566 | fi | |
6567 | ||
6568 | fi | |
6569 | ||
6570 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6571 | TKCONFIG="# no Tk configs found" | |
6572 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
6573 | else | |
6574 | no_tk= | |
6575 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
6576 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
6577 | fi | |
6578 | fi | |
6579 | ||
6580 | ||
6581 | ||
6582 | # If $no_tk is nonempty, then we can't do Tk, and there is no | |
6583 | # point to doing Tcl. | |
6584 | if test -z "${no_tk}"; then | |
6585 | ||
6586 | if test -f "$TKCONFIG" ; then | |
6587 | . $TKCONFIG | |
6588 | fi | |
6589 | ||
6590 | ||
6591 | ||
6592 | ||
6593 | ||
6594 | ||
6595 | ||
6596 | ||
6597 | ||
6598 | ||
6599 | ||
6600 | ||
6601 | ||
6602 | ||
6603 | # | |
6604 | # Ok, lets find the tcl source trees so we can use the headers | |
6605 | # Warning: transition of version 9 to 10 will break this algorithm | |
6606 | # because 10 sorts before 9. We also look for just tcl. We have to | |
6607 | # be careful that we don't match stuff like tclX by accident. | |
6608 | # the alternative search directory is involked by --with-tclinclude | |
6609 | # | |
6610 | ||
6611 | no_tcl=true | |
6612 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
b4df4f68 | 6613 | echo "configure:6614: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
6614 | # Check whether --with-tclinclude or --without-tclinclude was given. |
6615 | if test "${with_tclinclude+set}" = set; then | |
6616 | withval="$with_tclinclude" | |
6617 | with_tclinclude=${withval} | |
6618 | fi | |
6619 | ||
6620 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
6621 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6622 | else | |
6623 | ||
6624 | # first check to see if --with-tclinclude was specified | |
6625 | if test x"${with_tclinclude}" != x ; then | |
6626 | if test -f ${with_tclinclude}/tclInt.h ; then | |
6627 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
6628 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
6629 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
6630 | else | |
6631 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6632 | fi | |
6633 | fi | |
6634 | ||
6635 | # next check if it came with Tcl configuration file | |
6636 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6637 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
6638 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
6639 | fi | |
6640 | fi | |
6641 | ||
6642 | # next check in private source directory | |
6643 | # | |
6644 | # since ls returns lowest version numbers first, reverse its output | |
6645 | if test x"${ac_cv_c_tclh}" = x ; then | |
6646 | for i in \ | |
6647 | ${srcdir}/../tcl \ | |
6648 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
6649 | ${srcdir}/../../tcl \ | |
6650 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
6651 | ${srcdir}/../../../tcl \ | |
6652 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
6653 | if test -f $i/generic/tclInt.h ; then | |
6654 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6655 | break | |
6656 | fi | |
6657 | done | |
6658 | fi | |
6659 | # finally check in a few common install locations | |
6660 | # | |
6661 | # since ls returns lowest version numbers first, reverse its output | |
6662 | if test x"${ac_cv_c_tclh}" = x ; then | |
6663 | for i in \ | |
6664 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
6665 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
6666 | /usr/local/src/tcl \ | |
6667 | /usr/local/lib/tcl \ | |
6668 | ${prefix}/include ; do | |
6669 | if test -f $i/generic/tclInt.h ; then | |
6670 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6671 | break | |
6672 | fi | |
6673 | done | |
6674 | fi | |
6675 | # see if one is installed | |
6676 | if test x"${ac_cv_c_tclh}" = x ; then | |
6677 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
6678 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
b4df4f68 | 6679 | echo "configure:6680: checking for tclInt.h" >&5 |
3fc11d3e JM |
6680 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6681 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6682 | else | |
6683 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6684 | #line 6685 "configure" |
3fc11d3e JM |
6685 | #include "confdefs.h" |
6686 | #include <tclInt.h> | |
6687 | EOF | |
6688 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 6689 | { (eval echo configure:6690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6690 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6691 | if test -z "$ac_err"; then | |
6692 | rm -rf conftest* | |
6693 | eval "ac_cv_header_$ac_safe=yes" | |
6694 | else | |
6695 | echo "$ac_err" >&5 | |
6696 | echo "configure: failed program was:" >&5 | |
6697 | cat conftest.$ac_ext >&5 | |
6698 | rm -rf conftest* | |
6699 | eval "ac_cv_header_$ac_safe=no" | |
6700 | fi | |
6701 | rm -f conftest* | |
6702 | fi | |
6703 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6704 | echo "$ac_t""yes" 1>&6 | |
6705 | ac_cv_c_tclh=installed | |
6706 | else | |
6707 | echo "$ac_t""no" 1>&6 | |
6708 | ac_cv_c_tclh="" | |
6709 | fi | |
6710 | ||
6711 | fi | |
6712 | ||
6713 | fi | |
6714 | ||
6715 | if test x"${ac_cv_c_tclh}" = x ; then | |
6716 | TCLHDIR="# no Tcl private headers found" | |
6717 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
6718 | fi | |
6719 | if test x"${ac_cv_c_tclh}" != x ; then | |
6720 | no_tcl="" | |
6721 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
6722 | echo "$ac_t""is installed" 1>&6 | |
6723 | TCLHDIR="" | |
6724 | else | |
6725 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
6726 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
6727 | TCLHDIR="-I${ac_cv_c_tclh}" | |
6728 | fi | |
6729 | fi | |
6730 | ||
6731 | ||
6732 | ||
6733 | ||
6734 | # | |
6735 | # Ok, lets find the tk source trees so we can use the headers | |
6736 | # If the directory (presumably symlink) named "tk" exists, use that one | |
6737 | # in preference to any others. Same logic is used when choosing library | |
6738 | # and again with Tcl. The search order is the best place to look first, then in | |
6739 | # decreasing significance. The loop breaks if the trigger file is found. | |
6740 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
6741 | # directory. This converts the path from a relative to an absolute, so | |
6742 | # recursive cache variables for the path will work right. We check all | |
6743 | # the possible paths in one loop rather than many seperate loops to speed | |
6744 | # things up. | |
6745 | # the alternative search directory is involked by --with-tkinclude | |
6746 | # | |
6747 | no_tk=true | |
6748 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
b4df4f68 | 6749 | echo "configure:6750: checking for Tk private headers" >&5 |
3fc11d3e JM |
6750 | # Check whether --with-tkinclude or --without-tkinclude was given. |
6751 | if test "${with_tkinclude+set}" = set; then | |
6752 | withval="$with_tkinclude" | |
6753 | with_tkinclude=${withval} | |
6754 | fi | |
6755 | ||
6756 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
6757 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6758 | else | |
6759 | ||
6760 | # first check to see if --with-tkinclude was specified | |
6761 | if test x"${with_tkinclude}" != x ; then | |
6762 | if test -f ${with_tkinclude}/tk.h ; then | |
6763 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
6764 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
6765 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
6766 | else | |
6767 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6768 | fi | |
6769 | fi | |
6770 | ||
6771 | # next check if it came with Tk configuration file | |
6772 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6773 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
6774 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
6775 | fi | |
6776 | fi | |
6777 | ||
6778 | # next check in private source directory | |
6779 | # | |
6780 | # since ls returns lowest version numbers first, reverse its output | |
6781 | if test x"${ac_cv_c_tkh}" = x ; then | |
6782 | for i in \ | |
6783 | ${srcdir}/../tk \ | |
6784 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
6785 | ${srcdir}/../../tk \ | |
6786 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
6787 | ${srcdir}/../../../tk \ | |
6788 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
6789 | if test -f $i/generic/tk.h ; then | |
6790 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6791 | break | |
6792 | fi | |
6793 | done | |
6794 | fi | |
6795 | # finally check in a few common install locations | |
6796 | # | |
6797 | # since ls returns lowest version numbers first, reverse its output | |
6798 | if test x"${ac_cv_c_tkh}" = x ; then | |
6799 | for i in \ | |
6800 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
6801 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
6802 | /usr/local/src/tk \ | |
6803 | /usr/local/lib/tk \ | |
6804 | ${prefix}/include ; do | |
6805 | if test -f $i/generic/tk.h ; then | |
6806 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6807 | break | |
6808 | fi | |
6809 | done | |
6810 | fi | |
6811 | # see if one is installed | |
6812 | if test x"${ac_cv_c_tkh}" = x ; then | |
6813 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
6814 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
b4df4f68 | 6815 | echo "configure:6816: checking for tk.h" >&5 |
3fc11d3e JM |
6816 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6818 | else | |
6819 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 6820 | #line 6821 "configure" |
3fc11d3e JM |
6821 | #include "confdefs.h" |
6822 | #include <tk.h> | |
6823 | EOF | |
6824 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 6825 | { (eval echo configure:6826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6826 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6827 | if test -z "$ac_err"; then | |
6828 | rm -rf conftest* | |
6829 | eval "ac_cv_header_$ac_safe=yes" | |
6830 | else | |
6831 | echo "$ac_err" >&5 | |
6832 | echo "configure: failed program was:" >&5 | |
6833 | cat conftest.$ac_ext >&5 | |
6834 | rm -rf conftest* | |
6835 | eval "ac_cv_header_$ac_safe=no" | |
6836 | fi | |
6837 | rm -f conftest* | |
6838 | fi | |
6839 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6840 | echo "$ac_t""yes" 1>&6 | |
6841 | ac_cv_c_tkh=installed | |
6842 | else | |
6843 | echo "$ac_t""no" 1>&6 | |
6844 | ac_cv_c_tkh="" | |
6845 | fi | |
6846 | ||
6847 | fi | |
6848 | ||
6849 | fi | |
6850 | ||
6851 | if test x"${ac_cv_c_tkh}" != x ; then | |
6852 | no_tk="" | |
6853 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
6854 | echo "$ac_t""is installed" 1>&6 | |
6855 | TKHDIR="" | |
6856 | else | |
6857 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
6858 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
6859 | TKHDIR="-I${ac_cv_c_tkh}" | |
6860 | fi | |
6861 | else | |
6862 | TKHDIR="# no Tk directory found" | |
6863 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
6864 | no_tk=true | |
6865 | fi | |
6866 | ||
6867 | ||
6868 | ||
6869 | ||
6870 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b4df4f68 | 6871 | echo "configure:6872: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6872 | if test x"${ac_cv_c_itclh}" = x ; then |
6873 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
6874 | if test -f $i/generic/itcl.h ; then | |
6875 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
6876 | break | |
6877 | fi | |
6878 | done | |
6879 | fi | |
6880 | if test x"${ac_cv_c_itclh}" = x ; then | |
6881 | ITCLHDIR="# no Itcl private headers found" | |
6882 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
6883 | fi | |
6884 | if test x"${ac_cv_c_itclh}" != x ; then | |
6885 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
6886 | fi | |
6887 | # should always be here | |
6888 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
6889 | ||
6890 | #AC_SUBST(ITCLLIB) | |
6891 | ||
6892 | ||
6893 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b4df4f68 | 6894 | echo "configure:6895: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6895 | if test x"${ac_cv_c_itkh}" = x ; then |
6896 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
6897 | if test -f $i/generic/itk.h ; then | |
6898 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
6899 | break | |
6900 | fi | |
6901 | done | |
6902 | fi | |
6903 | if test x"${ac_cv_c_itkh}" = x ; then | |
6904 | ITKHDIR="# no Itk private headers found" | |
6905 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
6906 | fi | |
6907 | if test x"${ac_cv_c_itkh}" != x ; then | |
6908 | ITKHDIR="-I${ac_cv_c_itkh}" | |
6909 | fi | |
6910 | # should always be here | |
6911 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
6912 | ||
6913 | #AC_SUBST(ITKLIB) | |
6914 | ||
6915 | ||
6916 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b4df4f68 | 6917 | echo "configure:6918: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6918 | if test x"${ac_cv_c_tixh}" = x ; then |
6919 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
6920 | if test -f $i/generic/tix.h ; then | |
6921 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
6922 | break | |
6923 | fi | |
6924 | done | |
6925 | fi | |
6926 | if test x"${ac_cv_c_tixh}" = x ; then | |
6927 | TIXHDIR="# no Tix private headers found" | |
6928 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
6929 | fi | |
6930 | if test x"${ac_cv_c_tixh}" != x ; then | |
6931 | TIXHDIR="-I${ac_cv_c_tixh}" | |
6932 | fi | |
6933 | ||
6934 | ||
6935 | ||
6936 | # now look for Itcl library stuff | |
6937 | ||
6938 | ||
6939 | # | |
6940 | # Ok, lets find the itcl configuration | |
6941 | # First, look for one uninstalled. | |
6942 | # the alternative search directory is invoked by --with-itclconfig | |
6943 | # | |
6944 | ||
6945 | if test x"${no_itcl}" = x ; then | |
6946 | # we reset no_itcl in case something fails here | |
6947 | no_itcl=true | |
6948 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
6949 | if test "${with_itclconfig+set}" = set; then | |
6950 | withval="$with_itclconfig" | |
6951 | with_itclconfig=${withval} | |
6952 | fi | |
6953 | ||
6954 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
b4df4f68 | 6955 | echo "configure:6956: checking for Itcl configuration" >&5 |
3fc11d3e JM |
6956 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
6957 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6958 | else | |
6959 | ||
6960 | ||
6961 | # First check to see if --with-itclconfig was specified. | |
6962 | if test x"${with_itclconfig}" != x ; then | |
6963 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
6964 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
6965 | else | |
6966 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
6967 | fi | |
6968 | fi | |
6969 | ||
6970 | # then check for a private Itcl library | |
6971 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6972 | for i in \ | |
6973 | ../itcl/itcl \ | |
6974 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
6975 | ../../itcl \ | |
6976 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
6977 | ../../../itcl \ | |
6978 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6979 | if test -f "$i/itclConfig.sh" ; then | |
6980 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6981 | break | |
6982 | fi | |
6983 | done | |
6984 | fi | |
6985 | # check in a few common install locations | |
6986 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6987 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6988 | if test -f "$i/itclConfig.sh" ; then | |
6989 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6990 | break | |
6991 | fi | |
6992 | done | |
6993 | fi | |
6994 | # check in a few other private locations | |
6995 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6996 | for i in \ | |
6997 | ${srcdir}/../itcl/itcl \ | |
6998 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6999 | if test -f "$i/itclConfig.sh" ; then | |
7000 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
7001 | break | |
7002 | fi | |
7003 | done | |
7004 | fi | |
7005 | ||
7006 | fi | |
7007 | ||
7008 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
7009 | ITCLCONFIG="# no Itcl configs found" | |
7010 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
7011 | else | |
7012 | no_itcl= | |
7013 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
7014 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
7015 | fi | |
7016 | fi | |
7017 | ||
7018 | if test -z "${no_itcl}"; then | |
7019 | ||
7020 | if test -f "$ITCLCONFIG" ; then | |
7021 | . $ITCLCONFIG | |
7022 | fi | |
7023 | ||
7024 | ||
7025 | ||
7026 | ||
7027 | ||
7028 | ||
7029 | ||
7030 | ||
7031 | ||
7032 | ||
7033 | ||
7034 | case "${host}" in | |
7035 | *-*-cygwin*) | |
7036 | itcldir=../itcl/itcl/win/ | |
7037 | ;; | |
7038 | *) | |
7039 | itcldir=../itcl/itcl/unix/ | |
7040 | ;; | |
7041 | esac | |
7042 | ||
7043 | ||
7044 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
7045 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
7046 | fi | |
7047 | ||
7048 | ||
7049 | # now look for Itk library stuff | |
7050 | ||
7051 | # | |
7052 | # Ok, lets find the itk configuration | |
7053 | # First, look for one uninstalled. | |
7054 | # the alternative search directory is invoked by --with-itkconfig | |
7055 | # | |
7056 | ||
7057 | if test x"${no_itk}" = x ; then | |
7058 | # we reset no_itk in case something fails here | |
7059 | no_itk=true | |
7060 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
7061 | if test "${with_itkconfig+set}" = set; then | |
7062 | withval="$with_itkconfig" | |
7063 | with_itkconfig=${withval} | |
7064 | fi | |
7065 | ||
7066 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
b4df4f68 | 7067 | echo "configure:7068: checking for Itk configuration" >&5 |
3fc11d3e JM |
7068 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
7069 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7070 | else | |
7071 | ||
7072 | ||
7073 | # First check to see if --with-itkconfig was specified. | |
7074 | if test x"${with_itkconfig}" != x ; then | |
7075 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
7076 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
7077 | else | |
7078 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
7079 | fi | |
7080 | fi | |
7081 | ||
7082 | # then check for a private Itk library | |
7083 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7084 | for i in \ | |
7085 | ../itcl/itk \ | |
7086 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
7087 | ../../itk \ | |
7088 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
7089 | ../../../itk \ | |
7090 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
7091 | if test -f "$i/itkConfig.sh" ; then | |
7092 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7093 | break | |
7094 | fi | |
7095 | done | |
7096 | fi | |
7097 | # check in a few common install locations | |
7098 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7099 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7100 | if test -f "$i/itkConfig.sh" ; then | |
7101 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7102 | break | |
7103 | fi | |
7104 | done | |
7105 | fi | |
7106 | # check in a few other private locations | |
7107 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7108 | for i in \ | |
7109 | ${srcdir}/../itcl/itk \ | |
7110 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
7111 | if test -f "$i/itkConfig.sh" ; then | |
7112 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
7113 | break | |
7114 | fi | |
7115 | done | |
7116 | fi | |
7117 | ||
7118 | fi | |
7119 | ||
7120 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
7121 | ITKCONFIG="# no Itk configs found" | |
7122 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
7123 | else | |
7124 | no_itk= | |
7125 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
7126 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
7127 | fi | |
7128 | fi | |
7129 | ||
7130 | ||
7131 | if test -z "${no_itcl}"; then | |
7132 | ||
7133 | if test -f "$ITKCONFIG" ; then | |
7134 | . $ITKCONFIG | |
7135 | fi | |
7136 | ||
7137 | ||
7138 | ||
7139 | ||
7140 | ||
7141 | ||
7142 | ||
7143 | ||
7144 | ||
7145 | ||
7146 | ||
7147 | ||
7148 | case "${host}" in | |
7149 | *-*-cygwin*) | |
7150 | itkdir=../itcl/itk/win/ | |
7151 | ;; | |
7152 | *) | |
7153 | itkdir=../itcl/itk/unix/ | |
7154 | ;; | |
7155 | esac | |
7156 | ||
7157 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
7158 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
7159 | fi | |
7160 | ||
7161 | # now look for Tix library stuff | |
7162 | ||
7163 | # | |
7164 | # Ok, lets find the tix configuration | |
7165 | # First, look for one uninstalled. | |
7166 | # the alternative search directory is invoked by --with-itkconfig | |
7167 | # | |
7168 | ||
7169 | if test x"${no_tix}" = x ; then | |
7170 | # we reset no_tix in case something fails here | |
7171 | no_tix=true | |
7172 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
7173 | if test "${with_tixconfig+set}" = set; then | |
7174 | withval="$with_tixconfig" | |
7175 | with_tixconfig=${withval} | |
7176 | fi | |
7177 | ||
7178 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
b4df4f68 | 7179 | echo "configure:7180: checking for Tix configuration" >&5 |
3fc11d3e JM |
7180 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
7181 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7182 | else | |
7183 | ||
7184 | ||
7185 | # First check to see if --with-tixconfig was specified. | |
7186 | if test x"${with_tixconfig}" != x ; then | |
7187 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
7188 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
7189 | else | |
7190 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
7191 | fi | |
7192 | fi | |
7193 | ||
7194 | # then check for a private Tix library | |
7195 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7196 | for i in \ | |
7197 | ../tix \ | |
7198 | `ls -dr ../tix 2>/dev/null` \ | |
7199 | ../../tix \ | |
7200 | `ls -dr ../../tix 2>/dev/null` \ | |
7201 | ../../../tix \ | |
7202 | `ls -dr ../../../tix 2>/dev/null` ; do | |
7203 | echo "**** Looking at $i - with ${configdir}" | |
7204 | if test -f "$i/tixConfig.sh" ; then | |
7205 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
7206 | break | |
7207 | fi | |
7208 | done | |
7209 | fi | |
7210 | # check in a few common install locations | |
7211 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7212 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
7213 | echo "**** Looking at $i" | |
7214 | if test -f "$i/tixConfig.sh" ; then | |
7215 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
7216 | break | |
7217 | fi | |
7218 | done | |
7219 | fi | |
7220 | # check in a few other private locations | |
7221 | echo "**** Other private locations" | |
7222 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7223 | for i in \ | |
7224 | ${srcdir}/../tix \ | |
7225 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
7226 | echo "**** Looking at $i - with ${configdir}" | |
7227 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
7228 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
7229 | break | |
7230 | fi | |
7231 | done | |
7232 | fi | |
7233 | ||
7234 | fi | |
7235 | ||
7236 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
7237 | TIXCONFIG="# no Tix configs found" | |
7238 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
7239 | else | |
7240 | no_tix= | |
7241 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
7242 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
7243 | fi | |
7244 | fi | |
7245 | ||
7246 | ||
7247 | if test -z "${no_tix}"; then | |
7248 | ||
7249 | if test -f "$TIXCONFIG" ; then | |
7250 | . $TIXCONFIG | |
7251 | fi | |
7252 | ||
7253 | ||
7254 | ||
7255 | ||
7256 | ||
7257 | ||
7258 | ||
7259 | ||
7260 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
7261 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
7262 | fi | |
7263 | ||
4226a5a5 | 7264 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
7265 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
7266 | # know whether 8.2 will or not, but I bet it will. | |
7267 | # I don't have to worry about 7.x since we don't support it. | |
7268 | GDBTK_CFLAGS="" | |
7269 | if test "$GCC" = "yes"; then | |
7270 | if test "$TCL_VERSION" != "8.0" ; then | |
7271 | GDBTK_CFLAGS="-fwritable-strings" | |
7272 | fi | |
7273 | fi | |
7274 | ||
7275 | # Include some libraries that Tcl and Tk want. | |
7276 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
3fc11d3e JM |
7277 | # Yes, the ordering seems wrong here. But it isn't. |
7278 | # TK_LIBS is the list of libraries that need to be linked | |
7279 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
7280 | # were in LIBS then any link tests after this point would | |
7281 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
7282 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
7283 | |
7284 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
7285 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
7286 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
7287 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 7288 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 7289 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
7290 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
7291 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
7292 | |
7293 | if test x$gdb_cv_os_cygwin = xyes; then | |
7294 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
7295 | WIN32LDAPP="-Wl,--subsystem,console" | |
7296 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
7297 | fi | |
7298 | fi | |
7299 | fi | |
7300 | fi | |
7301 | ||
7302 | ||
7303 | ||
7304 | ||
7305 | ||
7306 | ||
7307 | ||
7308 | ||
7309 | ||
7310 | ||
7311 | ||
7312 | ||
7313 | ||
c906108c SS |
7314 | # If we find X, set shell vars x_includes and x_libraries to the |
7315 | # paths, otherwise set no_x=yes. | |
7316 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
7317 | # --without-x overrides everything else, but does not touch the cache. | |
7318 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
b4df4f68 | 7319 | echo "configure:7320: checking for X" >&5 |
c906108c SS |
7320 | |
7321 | # Check whether --with-x or --without-x was given. | |
7322 | if test "${with_x+set}" = set; then | |
7323 | withval="$with_x" | |
7324 | : | |
7325 | fi | |
7326 | ||
7327 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
7328 | if test "x$with_x" = xno; then | |
7329 | # The user explicitly disabled X. | |
7330 | have_x=disabled | |
7331 | else | |
7332 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
7333 | # Both variables are already set. | |
7334 | have_x=yes | |
7335 | else | |
7336 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
7337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7338 | else | |
7339 | # One or both of the vars are not set, and there is no cached value. | |
7340 | ac_x_includes=NO ac_x_libraries=NO | |
7341 | rm -fr conftestdir | |
7342 | if mkdir conftestdir; then | |
7343 | cd conftestdir | |
7344 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
7345 | cat > Imakefile <<'EOF' | |
7346 | acfindx: | |
7347 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
7348 | EOF | |
7349 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
7350 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
7351 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
7352 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
7353 | for ac_extension in a so sl; do | |
7354 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
7355 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
7356 | ac_im_usrlibdir=$ac_im_libdir; break | |
7357 | fi | |
7358 | done | |
7359 | # Screen out bogus values from the imake configuration. They are | |
7360 | # bogus both because they are the default anyway, and because | |
7361 | # using them would break gcc on systems where it needs fixed includes. | |
7362 | case "$ac_im_incroot" in | |
7363 | /usr/include) ;; | |
7364 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
7365 | esac | |
7366 | case "$ac_im_usrlibdir" in | |
7367 | /usr/lib | /lib) ;; | |
7368 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
7369 | esac | |
7370 | fi | |
7371 | cd .. | |
7372 | rm -fr conftestdir | |
7373 | fi | |
7374 | ||
7375 | if test "$ac_x_includes" = NO; then | |
7376 | # Guess where to find include files, by looking for this one X11 .h file. | |
7377 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
7378 | ||
7379 | # First, try using that file with no special directory specified. | |
7380 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 7381 | #line 7382 "configure" |
c906108c SS |
7382 | #include "confdefs.h" |
7383 | #include <$x_direct_test_include> | |
7384 | EOF | |
7385 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b4df4f68 | 7386 | { (eval echo configure:7387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
7387 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7388 | if test -z "$ac_err"; then | |
7389 | rm -rf conftest* | |
7390 | # We can compile using X headers with no special include directory. | |
7391 | ac_x_includes= | |
7392 | else | |
7393 | echo "$ac_err" >&5 | |
7394 | echo "configure: failed program was:" >&5 | |
7395 | cat conftest.$ac_ext >&5 | |
7396 | rm -rf conftest* | |
7397 | # Look for the header file in a standard set of common directories. | |
7398 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7399 | for ac_dir in \ | |
7400 | /usr/X11/include \ | |
7401 | /usr/X11R6/include \ | |
7402 | /usr/X11R5/include \ | |
7403 | /usr/X11R4/include \ | |
7404 | \ | |
7405 | /usr/include/X11 \ | |
7406 | /usr/include/X11R6 \ | |
7407 | /usr/include/X11R5 \ | |
7408 | /usr/include/X11R4 \ | |
7409 | \ | |
7410 | /usr/local/X11/include \ | |
7411 | /usr/local/X11R6/include \ | |
7412 | /usr/local/X11R5/include \ | |
7413 | /usr/local/X11R4/include \ | |
7414 | \ | |
7415 | /usr/local/include/X11 \ | |
7416 | /usr/local/include/X11R6 \ | |
7417 | /usr/local/include/X11R5 \ | |
7418 | /usr/local/include/X11R4 \ | |
7419 | \ | |
7420 | /usr/X386/include \ | |
7421 | /usr/x386/include \ | |
7422 | /usr/XFree86/include/X11 \ | |
7423 | \ | |
7424 | /usr/include \ | |
7425 | /usr/local/include \ | |
7426 | /usr/unsupported/include \ | |
7427 | /usr/athena/include \ | |
7428 | /usr/local/x11r5/include \ | |
7429 | /usr/lpp/Xamples/include \ | |
7430 | \ | |
7431 | /usr/openwin/include \ | |
7432 | /usr/openwin/share/include \ | |
7433 | ; \ | |
7434 | do | |
7435 | if test -r "$ac_dir/$x_direct_test_include"; then | |
7436 | ac_x_includes=$ac_dir | |
7437 | break | |
7438 | fi | |
7439 | done | |
7440 | fi | |
7441 | rm -f conftest* | |
7442 | fi # $ac_x_includes = NO | |
7443 | ||
7444 | if test "$ac_x_libraries" = NO; then | |
7445 | # Check for the libraries. | |
7446 | ||
7447 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
7448 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
7449 | ||
7450 | # See if we find them without any special options. | |
7451 | # Don't add to $LIBS permanently. | |
7452 | ac_save_LIBS="$LIBS" | |
7453 | LIBS="-l$x_direct_test_library $LIBS" | |
7454 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 7455 | #line 7456 "configure" |
c906108c SS |
7456 | #include "confdefs.h" |
7457 | ||
7458 | int main() { | |
7459 | ${x_direct_test_function}() | |
7460 | ; return 0; } | |
7461 | EOF | |
b4df4f68 | 7462 | if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7463 | rm -rf conftest* |
7464 | LIBS="$ac_save_LIBS" | |
7465 | # We can link X programs with no special library path. | |
7466 | ac_x_libraries= | |
7467 | else | |
7468 | echo "configure: failed program was:" >&5 | |
7469 | cat conftest.$ac_ext >&5 | |
7470 | rm -rf conftest* | |
7471 | LIBS="$ac_save_LIBS" | |
7472 | # First see if replacing the include by lib works. | |
7473 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
7474 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
7475 | /usr/X11/lib \ | |
7476 | /usr/X11R6/lib \ | |
7477 | /usr/X11R5/lib \ | |
7478 | /usr/X11R4/lib \ | |
7479 | \ | |
7480 | /usr/lib/X11 \ | |
7481 | /usr/lib/X11R6 \ | |
7482 | /usr/lib/X11R5 \ | |
7483 | /usr/lib/X11R4 \ | |
7484 | \ | |
7485 | /usr/local/X11/lib \ | |
7486 | /usr/local/X11R6/lib \ | |
7487 | /usr/local/X11R5/lib \ | |
7488 | /usr/local/X11R4/lib \ | |
7489 | \ | |
7490 | /usr/local/lib/X11 \ | |
7491 | /usr/local/lib/X11R6 \ | |
7492 | /usr/local/lib/X11R5 \ | |
7493 | /usr/local/lib/X11R4 \ | |
7494 | \ | |
7495 | /usr/X386/lib \ | |
7496 | /usr/x386/lib \ | |
7497 | /usr/XFree86/lib/X11 \ | |
7498 | \ | |
7499 | /usr/lib \ | |
7500 | /usr/local/lib \ | |
7501 | /usr/unsupported/lib \ | |
7502 | /usr/athena/lib \ | |
7503 | /usr/local/x11r5/lib \ | |
7504 | /usr/lpp/Xamples/lib \ | |
7505 | /lib/usr/lib/X11 \ | |
7506 | \ | |
7507 | /usr/openwin/lib \ | |
7508 | /usr/openwin/share/lib \ | |
7509 | ; \ | |
7510 | do | |
7511 | for ac_extension in a so sl; do | |
7512 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
7513 | ac_x_libraries=$ac_dir | |
7514 | break 2 | |
7515 | fi | |
7516 | done | |
7517 | done | |
7518 | fi | |
7519 | rm -f conftest* | |
7520 | fi # $ac_x_libraries = NO | |
7521 | ||
7522 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
7523 | # Didn't find X anywhere. Cache the known absence of X. | |
7524 | ac_cv_have_x="have_x=no" | |
7525 | else | |
7526 | # Record where we found X for the cache. | |
7527 | ac_cv_have_x="have_x=yes \ | |
7528 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
7529 | fi | |
7530 | fi | |
7531 | fi | |
7532 | eval "$ac_cv_have_x" | |
7533 | fi # $with_x != no | |
7534 | ||
7535 | if test "$have_x" != yes; then | |
7536 | echo "$ac_t""$have_x" 1>&6 | |
7537 | no_x=yes | |
7538 | else | |
7539 | # If each of the values was on the command line, it overrides each guess. | |
7540 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
7541 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
7542 | # Update the cache value to reflect the command line values. | |
7543 | ac_cv_have_x="have_x=yes \ | |
7544 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
7545 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
7546 | fi | |
7547 | ||
7548 | ||
7a292a7a SS |
7549 | |
7550 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
7551 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
7552 | # This code just checks for a few cases where we'd like to ignore those | |
7553 | # definitions, even when they're present in the '.mt' file. These cases | |
7554 | # are when --disable-sim is specified, or if the simulator directory is | |
7555 | # not part of the soruce tree. | |
7556 | # | |
7557 | # Check whether --enable-sim or --disable-sim was given. | |
7558 | if test "${enable_sim+set}" = set; then | |
7559 | enableval="$enable_sim" | |
7560 | echo "enable_sim = $enable_sim"; | |
7561 | echo "enableval = ${enableval}"; | |
7562 | case "${enableval}" in | |
7563 | yes) ignore_sim=false ;; | |
7564 | no) ignore_sim=true ;; | |
7565 | *) ignore_sim=false ;; | |
7566 | esac | |
7567 | else | |
7568 | ignore_sim=false | |
7569 | fi | |
7570 | ||
7571 | ||
7572 | if test ! -d "${srcdir}/../sim"; then | |
7573 | ignore_sim=true | |
7574 | fi | |
7575 | ||
7576 | if test "${ignore_sim}" = "true"; then | |
7577 | IGNORE_SIM="SIM=" | |
7578 | IGNORE_SIM_OBS="SIM_OBS=" | |
7579 | else | |
7580 | IGNORE_SIM="" | |
7581 | IGNORE_SIM_OBS="" | |
7582 | cat >> confdefs.h <<\EOF | |
7583 | #define WITH_SIM 1 | |
7584 | EOF | |
7585 | ||
7586 | fi | |
7587 | ||
7588 | ||
7589 | ||
c906108c SS |
7590 | |
7591 | ||
7592 | ||
7593 | ||
7594 | ||
7595 | ||
dfcd3bfb | 7596 | |
e56ac5c3 AC |
7597 | |
7598 | ||
b3a90332 AC |
7599 | |
7600 | ||
b46cd165 | 7601 | |
c906108c SS |
7602 | # Begin stuff to support --enable-shared |
7603 | # Check whether --enable-shared or --disable-shared was given. | |
7604 | if test "${enable_shared+set}" = set; then | |
7605 | enableval="$enable_shared" | |
7606 | case "${enableval}" in | |
7607 | yes) shared=true ;; | |
7608 | no) shared=false ;; | |
7609 | *) shared=true ;; | |
7610 | esac | |
7611 | fi | |
7612 | ||
7613 | HLDFLAGS= | |
7614 | HLDENV= | |
7615 | # If we have shared libraries, try to set rpath reasonably. | |
7616 | if test "${shared}" = "true"; then | |
7617 | case "${host}" in | |
7618 | *-*-hpux*) | |
7619 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
7620 | ;; | |
7621 | *-*-irix5* | *-*-irix6*) | |
7622 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
7623 | ;; | |
7624 | *-*-linux*aout*) | |
7625 | ;; | |
88987551 | 7626 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
7627 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
7628 | ;; | |
7629 | *-*-solaris*) | |
7630 | HLDFLAGS='-R $(libdir)' | |
7631 | ;; | |
7632 | *-*-sysv4*) | |
7633 | 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;' | |
7634 | ;; | |
7635 | esac | |
7636 | fi | |
7637 | ||
7638 | # On SunOS, if the linker supports the -rpath option, use it to | |
7639 | # prevent ../bfd and ../opcodes from being included in the run time | |
7640 | # search path. | |
7641 | case "${host}" in | |
7642 | *-*-sunos*) | |
7643 | echo 'main () { }' > conftest.c | |
7644 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
7645 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
7646 | : | |
7647 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
7648 | : | |
7649 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
7650 | : | |
7651 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
7652 | : | |
7653 | elif test "${shared}" = "true"; then | |
7654 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
7655 | else | |
7656 | HLDFLAGS='-Wl,-rpath=' | |
7657 | fi | |
7658 | rm -f conftest.t conftest.c conftest | |
7659 | ;; | |
7660 | esac | |
7661 | ||
7662 | ||
7663 | # End stuff to support --enable-shared | |
7664 | ||
7665 | # target_subdir is used by the testsuite to find the target libraries. | |
7666 | target_subdir= | |
7667 | if test "${host}" != "${target}"; then | |
7668 | target_subdir="${target_alias}/" | |
7669 | fi | |
7670 | ||
7671 | ||
7672 | frags= | |
7673 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
7674 | if test ! -f ${host_makefile_frag}; then | |
7675 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
7676 | fi | |
7677 | frags="$frags $host_makefile_frag" | |
7678 | ||
7679 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
7680 | if test ! -f ${target_makefile_frag}; then | |
7681 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
7682 | fi | |
7683 | frags="$frags $target_makefile_frag" | |
7684 | ||
7685 | ||
7686 | ||
7687 | ||
7688 | ||
7689 | hostfile=`sed -n ' | |
7690 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7691 | ' ${host_makefile_frag}` | |
7692 | ||
7693 | targetfile=`sed -n ' | |
7694 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7695 | ' ${target_makefile_frag}` | |
7696 | ||
6166d547 AC |
7697 | GDB_MULTI_ARCH=`sed -n ' |
7698 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
7699 | ' ${target_makefile_frag}` | |
7700 | ||
c906108c SS |
7701 | # these really aren't orthogonal true/false values of the same condition, |
7702 | # but shells are slow enough that I like to reuse the test conditions | |
7703 | # whenever possible | |
7704 | if test "${target}" = "${host}"; then | |
7705 | nativefile=`sed -n ' | |
7706 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7707 | ' ${host_makefile_frag}` | |
7708 | # else | |
7709 | # GDBserver is only useful in a "native" enviroment | |
7710 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
7711 | fi | |
7712 | ||
7713 | ||
6166d547 AC |
7714 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
7715 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
7716 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
7717 | # will be the default. | |
7718 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
7719 | case "${gdb_multi_arch}" in | |
7720 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
7721 | no ) GDB_MULTI_ARCH=0 ;; | |
7722 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
7723 | esac | |
7724 | fi | |
7725 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
7726 | cat >> confdefs.h <<EOF | |
7727 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
7728 | EOF | |
7729 | ||
7730 | fi | |
7731 | # Warn the user when they use an old pratice | |
7732 | case "${GDB_MULTI_ARCH}" in | |
7733 | "" ) ;; | |
7734 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
7735 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
7736 | GDB_MULTI_ARCH_PURE ) | |
7737 | if test x"${targetfile}" != x ; then | |
7738 | echo "configure: warning: "GDB: Ingoring TM_FILE in ${target_makefile_frag}"" 1>&2 | |
5a2402b8 | 7739 | targetfile="" |
6166d547 AC |
7740 | fi ;; |
7741 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
7742 | esac | |
7743 | ||
7744 | ||
96baa820 JM |
7745 | SUBDIRS="doc testsuite nlm" |
7746 | if test "${enable_multi_ice}" = "yes"; then | |
7747 | SUBDIRS="${SUBDIRS} multi-ice" | |
7748 | fi | |
7749 | ||
7750 | ||
7751 | ||
c906108c | 7752 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
7753 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
7754 | # version. | |
c906108c SS |
7755 | |
7756 | files= | |
7757 | links= | |
5a2402b8 | 7758 | |
c906108c | 7759 | rm -f xm.h |
5a2402b8 | 7760 | xm_h="" |
c906108c | 7761 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
7762 | xm_h=xm.h |
7763 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
7764 | files="${files} ${GDB_XM_FILE}" | |
7765 | links="${links} xm.h" | |
7766 | cat >> confdefs.h <<EOF | |
7767 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
7768 | EOF | |
7769 | ||
c906108c | 7770 | fi |
5a2402b8 AC |
7771 | |
7772 | ||
c906108c | 7773 | rm -f tm.h |
5a2402b8 | 7774 | tm_h="" |
c906108c | 7775 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
7776 | tm_h=tm.h |
7777 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
7778 | files="${files} ${GDB_TM_FILE}" | |
7779 | links="${links} tm.h" | |
7780 | cat >> confdefs.h <<EOF | |
7781 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
7782 | EOF | |
7783 | ||
c906108c | 7784 | fi |
5a2402b8 AC |
7785 | |
7786 | ||
c906108c | 7787 | rm -f nm.h |
5a2402b8 | 7788 | nm_h="" |
c906108c | 7789 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
7790 | nm_h=nm.h |
7791 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
7792 | files="${files} ${GDB_NM_FILE}" | |
7793 | links="${links} nm.h" | |
7794 | cat >> confdefs.h <<EOF | |
7795 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
7796 | EOF | |
7797 | ||
c906108c | 7798 | fi |
5a2402b8 AC |
7799 | |
7800 | ||
3fc11d3e | 7801 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
b4df4f68 | 7802 | echo "configure:7803: checking whether ln -s works" >&5 |
3fc11d3e JM |
7803 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
7804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7805 | else | |
7806 | rm -f conftestdata | |
7807 | if ln -s X conftestdata 2>/dev/null | |
7808 | then | |
7809 | rm -f conftestdata | |
7810 | ac_cv_prog_LN_S="ln -s" | |
7811 | else | |
7812 | ac_cv_prog_LN_S=ln | |
7813 | fi | |
7814 | fi | |
7815 | LN_S="$ac_cv_prog_LN_S" | |
7816 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
7817 | echo "$ac_t""yes" 1>&6 | |
7818 | else | |
7819 | echo "$ac_t""no" 1>&6 | |
7820 | fi | |
7821 | ||
c906108c SS |
7822 | |
7823 | ||
7824 | ||
7825 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
b4df4f68 | 7826 | echo "configure:7827: checking for Cygwin environment" >&5 |
c906108c SS |
7827 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
7828 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7829 | else | |
7830 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 7831 | #line 7832 "configure" |
c906108c SS |
7832 | #include "confdefs.h" |
7833 | ||
7834 | int main() { | |
7835 | ||
7836 | #ifndef __CYGWIN__ | |
7837 | #define __CYGWIN__ __CYGWIN32__ | |
7838 | #endif | |
7839 | return __CYGWIN__; | |
7840 | ; return 0; } | |
7841 | EOF | |
b4df4f68 | 7842 | if { (eval echo configure:7843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7843 | rm -rf conftest* |
7844 | ac_cv_cygwin=yes | |
7845 | else | |
7846 | echo "configure: failed program was:" >&5 | |
7847 | cat conftest.$ac_ext >&5 | |
7848 | rm -rf conftest* | |
7849 | ac_cv_cygwin=no | |
7850 | fi | |
7851 | rm -f conftest* | |
7852 | rm -f conftest* | |
7853 | fi | |
7854 | ||
7855 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
7856 | CYGWIN= | |
7857 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
7858 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
b4df4f68 | 7859 | echo "configure:7860: checking for mingw32 environment" >&5 |
c906108c SS |
7860 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
7861 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7862 | else | |
7863 | cat > conftest.$ac_ext <<EOF | |
b4df4f68 | 7864 | #line 7865 "configure" |
c906108c SS |
7865 | #include "confdefs.h" |
7866 | ||
7867 | int main() { | |
7868 | return __MINGW32__; | |
7869 | ; return 0; } | |
7870 | EOF | |
b4df4f68 | 7871 | if { (eval echo configure:7872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7872 | rm -rf conftest* |
7873 | ac_cv_mingw32=yes | |
7874 | else | |
7875 | echo "configure: failed program was:" >&5 | |
7876 | cat conftest.$ac_ext >&5 | |
7877 | rm -rf conftest* | |
7878 | ac_cv_mingw32=no | |
7879 | fi | |
7880 | rm -f conftest* | |
7881 | rm -f conftest* | |
7882 | fi | |
7883 | ||
7884 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
7885 | MINGW32= | |
7886 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
7887 | ||
7888 | ||
7889 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
b4df4f68 | 7890 | echo "configure:7891: checking for executable suffix" >&5 |
c906108c SS |
7891 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
7892 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7893 | else | |
7894 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
7895 | ac_cv_exeext=.exe | |
7896 | else | |
7897 | rm -f conftest* | |
7898 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
7899 | ac_cv_exeext= | |
b4df4f68 | 7900 | if { (eval echo configure:7901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
7901 | for file in conftest.*; do |
7902 | case $file in | |
3b851bce | 7903 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
7904 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
7905 | esac | |
7906 | done | |
7907 | else | |
7908 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
7909 | fi | |
7910 | rm -f conftest* | |
7911 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
7912 | fi | |
7913 | fi | |
7914 | ||
7915 | EXEEXT="" | |
7916 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
7917 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
7918 | ac_exeext=$EXEEXT | |
7919 | ||
7920 | ||
7921 | subdirs="$configdirs" | |
7922 | ||
7923 | trap '' 1 2 15 | |
7924 | cat > confcache <<\EOF | |
7925 | # This file is a shell script that caches the results of configure | |
7926 | # tests run on this system so they can be shared between configure | |
7927 | # scripts and configure runs. It is not useful on other systems. | |
7928 | # If it contains results you don't want to keep, you may remove or edit it. | |
7929 | # | |
7930 | # By default, configure uses ./config.cache as the cache file, | |
7931 | # creating it if it does not exist already. You can give configure | |
7932 | # the --cache-file=FILE option to use a different cache file; that is | |
7933 | # what configure does when it calls configure scripts in | |
7934 | # subdirectories, so they share the cache. | |
7935 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7936 | # config.status only pays attention to the cache file if you give it the | |
7937 | # --recheck option to rerun configure. | |
7938 | # | |
7939 | EOF | |
7940 | # The following way of writing the cache mishandles newlines in values, | |
7941 | # but we know of no workaround that is simple, portable, and efficient. | |
7942 | # So, don't put newlines in cache variables' values. | |
7943 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7944 | # and sets the high bit in the cache file unless we assign to the vars. | |
7945 | (set) 2>&1 | | |
7946 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
7947 | *ac_space=\ *) | |
7948 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7949 | # turns \\\\ into \\, and sed turns \\ into \). | |
7950 | sed -n \ | |
7951 | -e "s/'/'\\\\''/g" \ | |
7952 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7953 | ;; | |
7954 | *) | |
7955 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7956 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7957 | ;; | |
7958 | esac >> confcache | |
7959 | if cmp -s $cache_file confcache; then | |
7960 | : | |
7961 | else | |
7962 | if test -w $cache_file; then | |
7963 | echo "updating cache $cache_file" | |
7964 | cat confcache > $cache_file | |
7965 | else | |
7966 | echo "not updating unwritable cache $cache_file" | |
7967 | fi | |
7968 | fi | |
7969 | rm -f confcache | |
7970 | ||
7971 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7972 | ||
7973 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7974 | # Let make expand exec_prefix. | |
7975 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7976 | ||
7977 | # Any assignment to VPATH causes Sun make to only execute | |
7978 | # the first set of double-colon rules, so remove it if not needed. | |
7979 | # If there is a colon in the path, we need to keep it. | |
7980 | if test "x$srcdir" = x.; then | |
7981 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7982 | fi | |
7983 | ||
7984 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7985 | ||
7986 | DEFS=-DHAVE_CONFIG_H | |
7987 | ||
7988 | # Without the "./", some shells look in PATH for config.status. | |
7989 | : ${CONFIG_STATUS=./config.status} | |
7990 | ||
7991 | echo creating $CONFIG_STATUS | |
7992 | rm -f $CONFIG_STATUS | |
7993 | cat > $CONFIG_STATUS <<EOF | |
7994 | #! /bin/sh | |
7995 | # Generated automatically by configure. | |
7996 | # Run this file to recreate the current configuration. | |
7997 | # This directory was configured as follows, | |
7998 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7999 | # | |
8000 | # $0 $ac_configure_args | |
8001 | # | |
8002 | # Compiler output produced by configure, useful for debugging | |
8003 | # configure, is in ./config.log if it exists. | |
8004 | ||
8005 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
8006 | for ac_option | |
8007 | do | |
8008 | case "\$ac_option" in | |
8009 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8010 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8011 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8012 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
8013 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
8014 | exit 0 ;; | |
8015 | -help | --help | --hel | --he | --h) | |
8016 | echo "\$ac_cs_usage"; exit 0 ;; | |
8017 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8018 | esac | |
8019 | done | |
8020 | ||
8021 | ac_given_srcdir=$srcdir | |
8022 | ac_given_INSTALL="$INSTALL" | |
8023 | ||
ed952ac5 | 8024 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
8025 | EOF |
8026 | cat >> $CONFIG_STATUS <<EOF | |
8027 | ||
8028 | # Protect against being on the right side of a sed subst in config.status. | |
8029 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8030 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8031 | $ac_vpsub | |
8032 | $extrasub | |
8033 | s%@SHELL@%$SHELL%g | |
8034 | s%@CFLAGS@%$CFLAGS%g | |
8035 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8036 | s%@CXXFLAGS@%$CXXFLAGS%g | |
8037 | s%@FFLAGS@%$FFLAGS%g | |
8038 | s%@DEFS@%$DEFS%g | |
8039 | s%@LDFLAGS@%$LDFLAGS%g | |
8040 | s%@LIBS@%$LIBS%g | |
8041 | s%@exec_prefix@%$exec_prefix%g | |
8042 | s%@prefix@%$prefix%g | |
8043 | s%@program_transform_name@%$program_transform_name%g | |
8044 | s%@bindir@%$bindir%g | |
8045 | s%@sbindir@%$sbindir%g | |
8046 | s%@libexecdir@%$libexecdir%g | |
8047 | s%@datadir@%$datadir%g | |
8048 | s%@sysconfdir@%$sysconfdir%g | |
8049 | s%@sharedstatedir@%$sharedstatedir%g | |
8050 | s%@localstatedir@%$localstatedir%g | |
8051 | s%@libdir@%$libdir%g | |
8052 | s%@includedir@%$includedir%g | |
8053 | s%@oldincludedir@%$oldincludedir%g | |
8054 | s%@infodir@%$infodir%g | |
8055 | s%@mandir@%$mandir%g | |
413ccac7 AC |
8056 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
8057 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
8058 | s%@MAINT@%$MAINT%g | |
c906108c SS |
8059 | s%@CC@%$CC%g |
8060 | s%@CPP@%$CPP%g | |
8061 | s%@host@%$host%g | |
8062 | s%@host_alias@%$host_alias%g | |
8063 | s%@host_cpu@%$host_cpu%g | |
8064 | s%@host_vendor@%$host_vendor%g | |
8065 | s%@host_os@%$host_os%g | |
8066 | s%@target@%$target%g | |
8067 | s%@target_alias@%$target_alias%g | |
8068 | s%@target_cpu@%$target_cpu%g | |
8069 | s%@target_vendor@%$target_vendor%g | |
8070 | s%@target_os@%$target_os%g | |
8071 | s%@build@%$build%g | |
8072 | s%@build_alias@%$build_alias%g | |
8073 | s%@build_cpu@%$build_cpu%g | |
8074 | s%@build_vendor@%$build_vendor%g | |
8075 | s%@build_os@%$build_os%g | |
8076 | s%@SET_MAKE@%$SET_MAKE%g | |
8077 | s%@RANLIB@%$RANLIB%g | |
8078 | s%@ALLOCA@%$ALLOCA%g | |
8079 | s%@USE_NLS@%$USE_NLS%g | |
8080 | s%@MSGFMT@%$MSGFMT%g | |
8081 | s%@GMSGFMT@%$GMSGFMT%g | |
8082 | s%@XGETTEXT@%$XGETTEXT%g | |
8083 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
8084 | s%@CATALOGS@%$CATALOGS%g | |
8085 | s%@CATOBJEXT@%$CATOBJEXT%g | |
8086 | s%@DATADIRNAME@%$DATADIRNAME%g | |
8087 | s%@GMOFILES@%$GMOFILES%g | |
8088 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8089 | s%@INTLDEPS@%$INTLDEPS%g | |
8090 | s%@INTLLIBS@%$INTLLIBS%g | |
8091 | s%@INTLOBJS@%$INTLOBJS%g | |
8092 | s%@POFILES@%$POFILES%g | |
8093 | s%@POSUB@%$POSUB%g | |
8094 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
8095 | s%@GT_NO@%$GT_NO%g | |
8096 | s%@GT_YES@%$GT_YES%g | |
8097 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
8098 | s%@l@%$l%g | |
7a292a7a | 8099 | s%@AWK@%$AWK%g |
c906108c SS |
8100 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
8101 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
8102 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8103 | s%@AR@%$AR%g | |
95ca63c4 CF |
8104 | s%@DLLTOOL@%$DLLTOOL%g |
8105 | s%@WINDRES@%$WINDRES%g | |
c906108c | 8106 | s%@YACC@%$YACC%g |
75c6e08a | 8107 | s%@MIG@%$MIG%g |
c906108c | 8108 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
b4df4f68 | 8109 | s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g |
c906108c | 8110 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 8111 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
8112 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
8113 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 8114 | s%@REGEX@%$REGEX%g |
aff38e61 | 8115 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
c906108c | 8116 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 8117 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
8118 | s%@LIBGUI@%$LIBGUI%g |
8119 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
8120 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
8121 | s%@TCL_VERSION@%$TCL_VERSION%g | |
8122 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
8123 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
8124 | s%@TCL_CC@%$TCL_CC%g | |
8125 | s%@TCL_DEFS@%$TCL_DEFS%g | |
8126 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
8127 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
8128 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
8129 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
8130 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
8131 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
8132 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
8133 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
8134 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
8135 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
8136 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
8137 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
8138 | s%@TK_VERSION@%$TK_VERSION%g | |
8139 | s%@TK_DEFS@%$TK_DEFS%g | |
8140 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
8141 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
8142 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
8143 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
8144 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
8145 | s%@TCLHDIR@%$TCLHDIR%g | |
8146 | s%@TKHDIR@%$TKHDIR%g | |
8147 | s%@ITCLHDIR@%$ITCLHDIR%g | |
8148 | s%@ITKHDIR@%$ITKHDIR%g | |
8149 | s%@TIXHDIR@%$TIXHDIR%g | |
8150 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
8151 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
8152 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
8153 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
8154 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
8155 | s%@ITK_VERSION@%$ITK_VERSION%g | |
8156 | s%@ITK_DEFS@%$ITK_DEFS%g | |
8157 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
8158 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
8159 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
8160 | s%@TIX_VERSION@%$TIX_VERSION%g | |
8161 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
8162 | s%@X_CFLAGS@%$X_CFLAGS%g |
8163 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
8164 | s%@X_LIBS@%$X_LIBS%g | |
8165 | s%@ITCLLIB@%$ITCLLIB%g | |
8166 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
8167 | s%@ITKLIB@%$ITKLIB%g | |
8168 | s%@ITK_DEPS@%$ITK_DEPS%g | |
8169 | s%@TIXLIB@%$TIXLIB%g | |
8170 | s%@TIX_DEPS@%$TIX_DEPS%g | |
8171 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
8172 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
8173 | s%@IGNORE_SIM@%$IGNORE_SIM%g | |
8174 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
8175 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
8176 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 8177 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
8178 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
8179 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 8180 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
8181 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
8182 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
8183 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
8184 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
8185 | s%@HLDFLAGS@%$HLDFLAGS%g |
8186 | s%@HLDENV@%$HLDENV%g | |
8187 | s%@target_subdir@%$target_subdir%g | |
8188 | /@host_makefile_frag@/r $host_makefile_frag | |
8189 | s%@host_makefile_frag@%%g | |
8190 | /@target_makefile_frag@/r $target_makefile_frag | |
8191 | s%@target_makefile_frag@%%g | |
8192 | s%@frags@%$frags%g | |
96baa820 | 8193 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
8194 | s%@xm_h@%$xm_h%g |
8195 | s%@tm_h@%$tm_h%g | |
8196 | s%@nm_h@%$nm_h%g | |
7a292a7a | 8197 | s%@LN_S@%$LN_S%g |
c906108c SS |
8198 | s%@EXEEXT@%$EXEEXT%g |
8199 | s%@subdirs@%$subdirs%g | |
8200 | ||
8201 | CEOF | |
8202 | EOF | |
8203 | ||
8204 | cat >> $CONFIG_STATUS <<\EOF | |
8205 | ||
8206 | # Split the substitutions into bite-sized pieces for seds with | |
8207 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8208 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8209 | ac_file=1 # Number of current file. | |
8210 | ac_beg=1 # First line for current file. | |
8211 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8212 | ac_more_lines=: | |
8213 | ac_sed_cmds="" | |
8214 | while $ac_more_lines; do | |
8215 | if test $ac_beg -gt 1; then | |
8216 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8217 | else | |
8218 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8219 | fi | |
8220 | if test ! -s conftest.s$ac_file; then | |
8221 | ac_more_lines=false | |
8222 | rm -f conftest.s$ac_file | |
8223 | else | |
8224 | if test -z "$ac_sed_cmds"; then | |
8225 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8226 | else | |
8227 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8228 | fi | |
8229 | ac_file=`expr $ac_file + 1` | |
8230 | ac_beg=$ac_end | |
8231 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8232 | fi | |
8233 | done | |
8234 | if test -z "$ac_sed_cmds"; then | |
8235 | ac_sed_cmds=cat | |
8236 | fi | |
8237 | EOF | |
8238 | ||
8239 | cat >> $CONFIG_STATUS <<EOF | |
8240 | ||
ed952ac5 | 8241 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
8242 | EOF |
8243 | cat >> $CONFIG_STATUS <<\EOF | |
8244 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8245 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8246 | case "$ac_file" in | |
8247 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8248 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8249 | *) ac_file_in="${ac_file}.in" ;; | |
8250 | esac | |
8251 | ||
8252 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8253 | ||
8254 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8255 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8256 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8257 | # The file is in a subdirectory. | |
8258 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8259 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8260 | # A "../" for each directory in $ac_dir_suffix. | |
8261 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8262 | else | |
8263 | ac_dir_suffix= ac_dots= | |
8264 | fi | |
8265 | ||
8266 | case "$ac_given_srcdir" in | |
8267 | .) srcdir=. | |
8268 | if test -z "$ac_dots"; then top_srcdir=. | |
8269 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8270 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8271 | *) # Relative path. | |
8272 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8273 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8274 | esac | |
8275 | ||
8276 | case "$ac_given_INSTALL" in | |
8277 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8278 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8279 | esac | |
8280 | ||
8281 | echo creating "$ac_file" | |
8282 | rm -f "$ac_file" | |
8283 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8284 | case "$ac_file" in | |
8285 | *Makefile*) ac_comsub="1i\\ | |
8286 | # $configure_input" ;; | |
8287 | *) ac_comsub= ;; | |
8288 | esac | |
8289 | ||
8290 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8291 | sed -e "$ac_comsub | |
8292 | s%@configure_input@%$configure_input%g | |
8293 | s%@srcdir@%$srcdir%g | |
8294 | s%@top_srcdir@%$top_srcdir%g | |
8295 | s%@INSTALL@%$INSTALL%g | |
8296 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
8297 | fi; done | |
8298 | rm -f conftest.s* | |
8299 | ||
8300 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8301 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8302 | # | |
8303 | # ac_d sets the value in "#define NAME VALUE" lines. | |
8304 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8305 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8306 | ac_dC='\3' | |
8307 | ac_dD='%g' | |
8308 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8309 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8310 | ac_uB='\([ ]\)%\1#\2define\3' | |
8311 | ac_uC=' ' | |
8312 | ac_uD='\4%g' | |
8313 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8314 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8315 | ac_eB='$%\1#\2define\3' | |
8316 | ac_eC=' ' | |
8317 | ac_eD='%g' | |
8318 | ||
8319 | if test "${CONFIG_HEADERS+set}" != set; then | |
8320 | EOF | |
8321 | cat >> $CONFIG_STATUS <<EOF | |
8322 | CONFIG_HEADERS="config.h:config.in" | |
8323 | EOF | |
8324 | cat >> $CONFIG_STATUS <<\EOF | |
8325 | fi | |
8326 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8327 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8328 | case "$ac_file" in | |
8329 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8330 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8331 | *) ac_file_in="${ac_file}.in" ;; | |
8332 | esac | |
8333 | ||
8334 | echo creating $ac_file | |
8335 | ||
8336 | rm -f conftest.frag conftest.in conftest.out | |
8337 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8338 | cat $ac_file_inputs > conftest.in | |
8339 | ||
8340 | EOF | |
8341 | ||
8342 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8343 | # the proper values into config.h.in to produce config.h. And first: | |
8344 | # Protect against being on the right side of a sed subst in config.status. | |
8345 | # Protect against being in an unquoted here document in config.status. | |
8346 | rm -f conftest.vals | |
8347 | cat > conftest.hdr <<\EOF | |
8348 | s/[\\&%]/\\&/g | |
8349 | s%[\\$`]%\\&%g | |
8350 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8351 | s%ac_d%ac_u%gp | |
8352 | s%ac_u%ac_e%gp | |
8353 | EOF | |
8354 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8355 | rm -f conftest.hdr | |
8356 | ||
8357 | # This sed command replaces #undef with comments. This is necessary, for | |
8358 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8359 | # on some systems where configure will not decide to define it. | |
8360 | cat >> conftest.vals <<\EOF | |
8361 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8362 | EOF | |
8363 | ||
8364 | # Break up conftest.vals because some shells have a limit on | |
8365 | # the size of here documents, and old seds have small limits too. | |
8366 | ||
8367 | rm -f conftest.tail | |
8368 | while : | |
8369 | do | |
8370 | ac_lines=`grep -c . conftest.vals` | |
8371 | # grep -c gives empty output for an empty file on some AIX systems. | |
8372 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8373 | # Write a limited-size here document to conftest.frag. | |
8374 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8375 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8376 | echo 'CEOF | |
8377 | sed -f conftest.frag conftest.in > conftest.out | |
8378 | rm -f conftest.in | |
8379 | mv conftest.out conftest.in | |
8380 | ' >> $CONFIG_STATUS | |
8381 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8382 | rm -f conftest.vals | |
8383 | mv conftest.tail conftest.vals | |
8384 | done | |
8385 | rm -f conftest.vals | |
8386 | ||
8387 | cat >> $CONFIG_STATUS <<\EOF | |
8388 | rm -f conftest.frag conftest.h | |
8389 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8390 | cat conftest.in >> conftest.h | |
8391 | rm -f conftest.in | |
8392 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8393 | echo "$ac_file is unchanged" | |
8394 | rm -f conftest.h | |
8395 | else | |
8396 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8397 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8398 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8399 | # The file is in a subdirectory. | |
8400 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8401 | fi | |
8402 | rm -f $ac_file | |
8403 | mv conftest.h $ac_file | |
8404 | fi | |
8405 | fi; done | |
8406 | ||
8407 | EOF | |
8408 | ||
8409 | cat >> $CONFIG_STATUS <<EOF | |
8410 | ac_sources="$files" | |
8411 | ac_dests="$links" | |
8412 | EOF | |
8413 | ||
8414 | cat >> $CONFIG_STATUS <<\EOF | |
8415 | srcdir=$ac_given_srcdir | |
8416 | while test -n "$ac_sources"; do | |
8417 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
8418 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
8419 | ||
8420 | echo "linking $srcdir/$ac_source to $ac_dest" | |
8421 | ||
8422 | if test ! -r $srcdir/$ac_source; then | |
8423 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
8424 | fi | |
8425 | rm -f $ac_dest | |
8426 | ||
8427 | # Make relative symlinks. | |
8428 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8429 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
8430 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
8431 | # The dest file is in a subdirectory. | |
8432 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
8433 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
8434 | # A "../" for each directory in $ac_dest_dir_suffix. | |
8435 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
8436 | else | |
8437 | ac_dest_dir_suffix= ac_dots= | |
8438 | fi | |
8439 | ||
8440 | case "$srcdir" in | |
8441 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
8442 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
8443 | esac | |
8444 | ||
8445 | # Make a symlink if possible; otherwise try a hard link. | |
8446 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
8447 | ln $srcdir/$ac_source $ac_dest; then : | |
8448 | else | |
8449 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
8450 | fi | |
8451 | done | |
8452 | EOF | |
8453 | cat >> $CONFIG_STATUS <<EOF | |
8454 | ||
8455 | gdb_host_cpu=$gdb_host_cpu | |
8456 | gdb_target_cpu=$gdb_target_cpu | |
8457 | nativefile=$nativefile | |
8458 | ||
8459 | EOF | |
8460 | cat >> $CONFIG_STATUS <<\EOF | |
8461 | ||
8462 | if test "${nativefile}" = ""; then | |
8463 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ | |
8464 | < Makefile > Makefile.tem | |
8465 | mv -f Makefile.tem Makefile | |
8466 | fi | |
8467 | ||
8468 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
8469 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
8470 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
8471 | mv -f Makefile.tmp Makefile | |
8472 | ||
2acceee2 | 8473 | |
c906108c SS |
8474 | case x$CONFIG_HEADERS in |
8475 | xconfig.h:config.in) | |
8476 | echo > stamp-h ;; | |
8477 | esac | |
8478 | ||
8479 | exit 0 | |
8480 | EOF | |
8481 | chmod +x $CONFIG_STATUS | |
8482 | rm -fr confdefs* $ac_clean_files | |
8483 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8484 | ||
8485 | if test "$no_recursion" != yes; then | |
8486 | ||
8487 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
8488 | ac_sub_configure_args= | |
8489 | ac_prev= | |
8490 | for ac_arg in $ac_configure_args; do | |
8491 | if test -n "$ac_prev"; then | |
8492 | ac_prev= | |
8493 | continue | |
8494 | fi | |
8495 | case "$ac_arg" in | |
8496 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
8497 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
8498 | ac_prev=cache_file ;; | |
8499 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
8500 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
8501 | ;; | |
8502 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
8503 | ac_prev=srcdir ;; | |
8504 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
8505 | ;; | |
8506 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
8507 | esac | |
8508 | done | |
8509 | ||
8510 | for ac_config_dir in $configdirs; do | |
8511 | ||
8512 | # Do not complain, so a configure script can configure whichever | |
8513 | # parts of a large source tree are present. | |
8514 | if test ! -d $srcdir/$ac_config_dir; then | |
8515 | continue | |
8516 | fi | |
8517 | ||
8518 | echo configuring in $ac_config_dir | |
8519 | ||
8520 | case "$srcdir" in | |
8521 | .) ;; | |
8522 | *) | |
8523 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
8524 | else | |
8525 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
8526 | fi | |
8527 | ;; | |
8528 | esac | |
8529 | ||
8530 | ac_popdir=`pwd` | |
8531 | cd $ac_config_dir | |
8532 | ||
8533 | # A "../" for each directory in /$ac_config_dir. | |
8534 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
8535 | ||
8536 | case "$srcdir" in | |
8537 | .) # No --srcdir option. We are building in place. | |
8538 | ac_sub_srcdir=$srcdir ;; | |
8539 | /*) # Absolute path. | |
8540 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
8541 | *) # Relative path. | |
8542 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
8543 | esac | |
8544 | ||
8545 | # Check for guested configure; otherwise get Cygnus style configure. | |
8546 | if test -f $ac_sub_srcdir/configure; then | |
8547 | ac_sub_configure=$ac_sub_srcdir/configure | |
8548 | elif test -f $ac_sub_srcdir/configure.in; then | |
8549 | ac_sub_configure=$ac_configure | |
8550 | else | |
8551 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
8552 | ac_sub_configure= | |
8553 | fi | |
8554 | ||
8555 | # The recursion is here. | |
8556 | if test -n "$ac_sub_configure"; then | |
8557 | ||
8558 | # Make the cache file name correct relative to the subdirectory. | |
8559 | case "$cache_file" in | |
8560 | /*) ac_sub_cache_file=$cache_file ;; | |
8561 | *) # Relative path. | |
8562 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
8563 | esac | |
8564 | case "$ac_given_INSTALL" in | |
8565 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
8566 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
8567 | esac | |
8568 | ||
8569 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
8570 | # The eval makes quoting arguments work. | |
8571 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
8572 | then : | |
8573 | else | |
8574 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
8575 | fi | |
8576 | fi | |
8577 | ||
8578 | cd $ac_popdir | |
8579 | done | |
8580 | fi | |
8581 | ||
8582 | ||
8583 | exit 0 |