Commit | Line | Data |
---|---|---|
5436fc65 C |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4b23e55c | 4 | # Generated automatically using autoconf version 2.12.2 |
bc859e63 | 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
5436fc65 C |
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: | |
fcfc3c0c TT |
14 | ac_help="$ac_help |
15 | --disable-nls do not use Native Language Support" | |
16 | ac_help="$ac_help | |
17 | --with-included-gettext use the GNU gettext library included here" | |
460845ab DT |
18 | ac_help="$ac_help |
19 | --enable-tui Enable full-screen terminal user interface" | |
5436fc65 | 20 | ac_help="$ac_help |
d951f9e4 | 21 | --enable-netrom Enable NetROM support" |
0728afad | 22 | ac_help="$ac_help |
d951f9e4 | 23 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" |
ba68ad57 JM |
24 | ac_help="$ac_help |
25 | --with-mmalloc Use memory mapped malloc package" | |
287026b7 | 26 | ac_help="$ac_help |
d951f9e4 | 27 | --enable-carp Configure alternative readaptive paradigm " |
287026b7 AC |
28 | ac_help="$ac_help |
29 | --enable-targets alternative target configurations" | |
2476848a MH |
30 | ac_help="$ac_help |
31 | --enable-ide Enable IDE support" | |
c076f1ed | 32 | ac_help="$ac_help |
ba68ad57 | 33 | --with-foundry-libs=DIR Use the Foundry SDK in DIR" |
5436fc65 | 34 | ac_help="$ac_help |
ba68ad57 | 35 | --enable-gdbtk Enable GDBTK GUI front end" |
5436fc65 | 36 | ac_help="$ac_help |
ba68ad57 | 37 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" |
4e327047 | 38 | ac_help="$ac_help |
ba68ad57 | 39 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" |
4e327047 | 40 | ac_help="$ac_help |
ba68ad57 | 41 | --with-tclinclude=DIR Directory where tcl private headers are" |
4e327047 | 42 | ac_help="$ac_help |
ba68ad57 | 43 | --with-tkinclude=DIR Directory where tk private headers are" |
b236defa FCE |
44 | ac_help="$ac_help |
45 | --with-x use the X Window System" | |
46 | ac_help="$ac_help | |
ba68ad57 | 47 | --with-sim-gpu2=DIR Use GPU2 library under given DIR" |
75a55dc3 | 48 | ac_help="$ac_help |
ba68ad57 | 49 | --with-sim-funit=DIR Use target FP lib under given DIR" |
1d5eb137 | 50 | ac_help="$ac_help |
ba68ad57 | 51 | --enable-shared Use shared libraries" |
5436fc65 C |
52 | |
53 | # Initialize some variables set by options. | |
54 | # The variables have the same names as the options, with | |
55 | # dashes changed to underlines. | |
56 | build=NONE | |
57 | cache_file=./config.cache | |
58 | exec_prefix=NONE | |
59 | host=NONE | |
60 | no_create= | |
61 | nonopt=NONE | |
62 | no_recursion= | |
63 | prefix=NONE | |
64 | program_prefix=NONE | |
65 | program_suffix=NONE | |
66 | program_transform_name=s,x,x, | |
67 | silent= | |
68 | site= | |
69 | srcdir= | |
70 | target=NONE | |
71 | verbose= | |
72 | x_includes=NONE | |
73 | x_libraries=NONE | |
1a7b4b7c DE |
74 | bindir='${exec_prefix}/bin' |
75 | sbindir='${exec_prefix}/sbin' | |
76 | libexecdir='${exec_prefix}/libexec' | |
77 | datadir='${prefix}/share' | |
78 | sysconfdir='${prefix}/etc' | |
79 | sharedstatedir='${prefix}/com' | |
80 | localstatedir='${prefix}/var' | |
81 | libdir='${exec_prefix}/lib' | |
82 | includedir='${prefix}/include' | |
83 | oldincludedir='/usr/include' | |
84 | infodir='${prefix}/info' | |
85 | mandir='${prefix}/man' | |
5436fc65 C |
86 | |
87 | # Initialize some other variables. | |
88 | subdirs= | |
1a7b4b7c | 89 | MFLAGS= MAKEFLAGS= |
4b23e55c | 90 | SHELL=${CONFIG_SHELL-/bin/sh} |
bfde4a67 SG |
91 | # Maximum number of lines to put in a shell here document. |
92 | ac_max_here_lines=12 | |
5436fc65 C |
93 | |
94 | ac_prev= | |
95 | for ac_option | |
96 | do | |
97 | ||
98 | # If the previous option needs an argument, assign it. | |
99 | if test -n "$ac_prev"; then | |
100 | eval "$ac_prev=\$ac_option" | |
101 | ac_prev= | |
102 | continue | |
103 | fi | |
104 | ||
105 | case "$ac_option" in | |
106 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
107 | *) ac_optarg= ;; | |
108 | esac | |
109 | ||
110 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
111 | ||
112 | case "$ac_option" in | |
113 | ||
1a7b4b7c DE |
114 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
115 | ac_prev=bindir ;; | |
116 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
117 | bindir="$ac_optarg" ;; | |
118 | ||
119 | -build | --build | --buil | --bui | --bu) | |
5436fc65 | 120 | ac_prev=build ;; |
1a7b4b7c | 121 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
5436fc65 C |
122 | build="$ac_optarg" ;; |
123 | ||
124 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
125 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
126 | ac_prev=cache_file ;; | |
127 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
128 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
129 | cache_file="$ac_optarg" ;; | |
130 | ||
1a7b4b7c DE |
131 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
132 | ac_prev=datadir ;; | |
133 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
134 | | --da=*) | |
135 | datadir="$ac_optarg" ;; | |
136 | ||
5436fc65 C |
137 | -disable-* | --disable-*) |
138 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
139 | # Reject names that are not valid shell variable names. | |
140 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
141 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
142 | fi | |
143 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
144 | eval "enable_${ac_feature}=no" ;; | |
145 | ||
146 | -enable-* | --enable-*) | |
147 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
148 | # Reject names that are not valid shell variable names. | |
149 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
150 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
151 | fi | |
152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
153 | case "$ac_option" in | |
154 | *=*) ;; | |
155 | *) ac_optarg=yes ;; | |
156 | esac | |
157 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
158 | ||
159 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
160 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
161 | | --exec | --exe | --ex) | |
162 | ac_prev=exec_prefix ;; | |
163 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
164 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
165 | | --exec=* | --exe=* | --ex=*) | |
166 | exec_prefix="$ac_optarg" ;; | |
167 | ||
168 | -gas | --gas | --ga | --g) | |
169 | # Obsolete; use --with-gas. | |
170 | with_gas=yes ;; | |
171 | ||
172 | -help | --help | --hel | --he) | |
173 | # Omit some internal or obsolete options to make the list less imposing. | |
174 | # This message is too long to be a string in the A/UX 3.1 sh. | |
175 | cat << EOF | |
176 | Usage: configure [options] [host] | |
177 | Options: [defaults in brackets after descriptions] | |
178 | Configuration: | |
179 | --cache-file=FILE cache test results in FILE | |
180 | --help print this message | |
181 | --no-create do not create output files | |
182 | --quiet, --silent do not print \`checking...' messages | |
183 | --version print the version of autoconf that created configure | |
184 | Directory and file names: | |
185 | --prefix=PREFIX install architecture-independent files in PREFIX | |
186 | [$ac_default_prefix] | |
1a7b4b7c | 187 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5436fc65 | 188 | [same as prefix] |
1a7b4b7c DE |
189 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
190 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
191 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
192 | --datadir=DIR read-only architecture-independent data in DIR | |
193 | [PREFIX/share] | |
194 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
195 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
196 | [PREFIX/com] | |
197 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
198 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
199 | --includedir=DIR C header files in DIR [PREFIX/include] | |
200 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
201 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
202 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
5436fc65 C |
203 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
204 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
205 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1a7b4b7c DE |
206 | --program-transform-name=PROGRAM |
207 | run sed PROGRAM on installed program names | |
208 | EOF | |
209 | cat << EOF | |
5436fc65 C |
210 | Host type: |
211 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
212 | --host=HOST configure for HOST [guessed] | |
213 | --target=TARGET configure for TARGET [TARGET=HOST] | |
214 | Features and packages: | |
215 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
216 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
217 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
218 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
219 | --x-includes=DIR X include files are in DIR | |
220 | --x-libraries=DIR X library files are in DIR | |
5436fc65 | 221 | EOF |
1a7b4b7c DE |
222 | if test -n "$ac_help"; then |
223 | echo "--enable and --with options recognized:$ac_help" | |
224 | fi | |
5436fc65 C |
225 | exit 0 ;; |
226 | ||
227 | -host | --host | --hos | --ho) | |
228 | ac_prev=host ;; | |
229 | -host=* | --host=* | --hos=* | --ho=*) | |
230 | host="$ac_optarg" ;; | |
231 | ||
1a7b4b7c DE |
232 | -includedir | --includedir | --includedi | --included | --include \ |
233 | | --includ | --inclu | --incl | --inc) | |
234 | ac_prev=includedir ;; | |
235 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
236 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
237 | includedir="$ac_optarg" ;; | |
238 | ||
239 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
240 | ac_prev=infodir ;; | |
241 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
242 | infodir="$ac_optarg" ;; | |
243 | ||
244 | -libdir | --libdir | --libdi | --libd) | |
245 | ac_prev=libdir ;; | |
246 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
247 | libdir="$ac_optarg" ;; | |
248 | ||
249 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
250 | | --libexe | --libex | --libe) | |
251 | ac_prev=libexecdir ;; | |
252 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
253 | | --libexe=* | --libex=* | --libe=*) | |
254 | libexecdir="$ac_optarg" ;; | |
255 | ||
256 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
257 | | --localstate | --localstat | --localsta | --localst \ | |
258 | | --locals | --local | --loca | --loc | --lo) | |
259 | ac_prev=localstatedir ;; | |
260 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
261 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
262 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
263 | localstatedir="$ac_optarg" ;; | |
264 | ||
265 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
266 | ac_prev=mandir ;; | |
267 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
268 | mandir="$ac_optarg" ;; | |
269 | ||
5436fc65 C |
270 | -nfp | --nfp | --nf) |
271 | # Obsolete; use --without-fp. | |
272 | with_fp=no ;; | |
273 | ||
274 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
275 | | --no-cr | --no-c) | |
276 | no_create=yes ;; | |
277 | ||
278 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
279 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
280 | no_recursion=yes ;; | |
281 | ||
1a7b4b7c DE |
282 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
283 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
284 | | --oldin | --oldi | --old | --ol | --o) | |
285 | ac_prev=oldincludedir ;; | |
286 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
287 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
288 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
289 | oldincludedir="$ac_optarg" ;; | |
290 | ||
5436fc65 C |
291 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
292 | ac_prev=prefix ;; | |
293 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
294 | prefix="$ac_optarg" ;; | |
295 | ||
296 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
297 | | --program-pre | --program-pr | --program-p) | |
298 | ac_prev=program_prefix ;; | |
299 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
300 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
301 | program_prefix="$ac_optarg" ;; | |
302 | ||
303 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
304 | | --program-suf | --program-su | --program-s) | |
305 | ac_prev=program_suffix ;; | |
306 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
307 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
308 | program_suffix="$ac_optarg" ;; | |
309 | ||
310 | -program-transform-name | --program-transform-name \ | |
311 | | --program-transform-nam | --program-transform-na \ | |
312 | | --program-transform-n | --program-transform- \ | |
313 | | --program-transform | --program-transfor \ | |
314 | | --program-transfo | --program-transf \ | |
315 | | --program-trans | --program-tran \ | |
316 | | --progr-tra | --program-tr | --program-t) | |
317 | ac_prev=program_transform_name ;; | |
318 | -program-transform-name=* | --program-transform-name=* \ | |
319 | | --program-transform-nam=* | --program-transform-na=* \ | |
320 | | --program-transform-n=* | --program-transform-=* \ | |
321 | | --program-transform=* | --program-transfor=* \ | |
322 | | --program-transfo=* | --program-transf=* \ | |
323 | | --program-trans=* | --program-tran=* \ | |
324 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
325 | program_transform_name="$ac_optarg" ;; | |
326 | ||
327 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
328 | | -silent | --silent | --silen | --sile | --sil) | |
329 | silent=yes ;; | |
330 | ||
1a7b4b7c DE |
331 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
332 | ac_prev=sbindir ;; | |
333 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
334 | | --sbi=* | --sb=*) | |
335 | sbindir="$ac_optarg" ;; | |
336 | ||
337 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
338 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
339 | | --sharedst | --shareds | --shared | --share | --shar \ | |
340 | | --sha | --sh) | |
341 | ac_prev=sharedstatedir ;; | |
342 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
343 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
344 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
345 | | --sha=* | --sh=*) | |
346 | sharedstatedir="$ac_optarg" ;; | |
347 | ||
5436fc65 C |
348 | -site | --site | --sit) |
349 | ac_prev=site ;; | |
350 | -site=* | --site=* | --sit=*) | |
351 | site="$ac_optarg" ;; | |
352 | ||
353 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
354 | ac_prev=srcdir ;; | |
355 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
356 | srcdir="$ac_optarg" ;; | |
357 | ||
1a7b4b7c DE |
358 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
359 | | --syscon | --sysco | --sysc | --sys | --sy) | |
360 | ac_prev=sysconfdir ;; | |
361 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
362 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
363 | sysconfdir="$ac_optarg" ;; | |
364 | ||
5436fc65 C |
365 | -target | --target | --targe | --targ | --tar | --ta | --t) |
366 | ac_prev=target ;; | |
367 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
368 | target="$ac_optarg" ;; | |
369 | ||
370 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
371 | verbose=yes ;; | |
372 | ||
373 | -version | --version | --versio | --versi | --vers) | |
4b23e55c | 374 | echo "configure generated by autoconf version 2.12.2" |
5436fc65 C |
375 | exit 0 ;; |
376 | ||
377 | -with-* | --with-*) | |
378 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
379 | # Reject names that are not valid shell variable names. | |
380 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
381 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
382 | fi | |
383 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
384 | case "$ac_option" in | |
385 | *=*) ;; | |
386 | *) ac_optarg=yes ;; | |
387 | esac | |
388 | eval "with_${ac_package}='$ac_optarg'" ;; | |
389 | ||
390 | -without-* | --without-*) | |
391 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
392 | # Reject names that are not valid shell variable names. | |
393 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
394 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
395 | fi | |
396 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
397 | eval "with_${ac_package}=no" ;; | |
398 | ||
399 | --x) | |
400 | # Obsolete; use --with-x. | |
401 | with_x=yes ;; | |
402 | ||
403 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
404 | | --x-incl | --x-inc | --x-in | --x-i) | |
405 | ac_prev=x_includes ;; | |
406 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
407 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
408 | x_includes="$ac_optarg" ;; | |
409 | ||
410 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
411 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
412 | ac_prev=x_libraries ;; | |
413 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
414 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
415 | x_libraries="$ac_optarg" ;; | |
416 | ||
417 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
418 | ;; | |
419 | ||
1a7b4b7c | 420 | *) |
5436fc65 C |
421 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
422 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
423 | fi | |
424 | if test "x$nonopt" != xNONE; then | |
425 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
426 | fi | |
427 | nonopt="$ac_option" | |
428 | ;; | |
429 | ||
430 | esac | |
431 | done | |
432 | ||
433 | if test -n "$ac_prev"; then | |
434 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
435 | fi | |
436 | ||
437 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
438 | ||
439 | # File descriptor usage: | |
440 | # 0 standard input | |
441 | # 1 file creation | |
442 | # 2 errors and warnings | |
443 | # 3 some systems may open it to /dev/tty | |
444 | # 4 used on the Kubota Titan | |
445 | # 6 checking for... messages and results | |
446 | # 5 compiler messages saved in config.log | |
447 | if test "$silent" = yes; then | |
448 | exec 6>/dev/null | |
449 | else | |
450 | exec 6>&1 | |
451 | fi | |
452 | exec 5>./config.log | |
453 | ||
454 | echo "\ | |
455 | This file contains any messages produced by compilers while | |
456 | running configure, to aid debugging if configure makes a mistake. | |
457 | " 1>&5 | |
458 | ||
459 | # Strip out --no-create and --no-recursion so they do not pile up. | |
460 | # Also quote any args containing shell metacharacters. | |
461 | ac_configure_args= | |
462 | for ac_arg | |
463 | do | |
464 | case "$ac_arg" in | |
465 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
466 | | --no-cr | --no-c) ;; | |
467 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
468 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
469 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
470 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
471 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
472 | esac | |
473 | done | |
474 | ||
475 | # NLS nuisances. | |
bfde4a67 SG |
476 | # Only set these to C if already set. These must not be set unconditionally |
477 | # because not all systems understand e.g. LANG=C (notably SCO). | |
478 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
479 | # Non-C LC_CTYPE values break the ctype check. | |
ef6c51d1 | 480 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
bfde4a67 SG |
481 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
482 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
483 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
5436fc65 C |
484 | |
485 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
486 | rm -rf conftest* confdefs.h | |
487 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
488 | echo > confdefs.h | |
489 | ||
490 | # A filename unique to this package, relative to the directory that | |
491 | # configure is in, which we can look for to find out if srcdir is correct. | |
492 | ac_unique_file=main.c | |
493 | ||
494 | # Find the source files, if location was not specified. | |
495 | if test -z "$srcdir"; then | |
496 | ac_srcdir_defaulted=yes | |
497 | # Try the directory containing this script, then its parent. | |
498 | ac_prog=$0 | |
499 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
500 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
501 | srcdir=$ac_confdir | |
502 | if test ! -r $srcdir/$ac_unique_file; then | |
503 | srcdir=.. | |
504 | fi | |
505 | else | |
506 | ac_srcdir_defaulted=no | |
507 | fi | |
508 | if test ! -r $srcdir/$ac_unique_file; then | |
509 | if test "$ac_srcdir_defaulted" = yes; then | |
510 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
511 | else | |
512 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
513 | fi | |
514 | fi | |
515 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
516 | ||
517 | # Prefer explicitly selected file to automatically selected ones. | |
518 | if test -z "$CONFIG_SITE"; then | |
519 | if test "x$prefix" != xNONE; then | |
520 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
521 | else | |
522 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
523 | fi | |
524 | fi | |
525 | for ac_site_file in $CONFIG_SITE; do | |
526 | if test -r "$ac_site_file"; then | |
527 | echo "loading site script $ac_site_file" | |
528 | . "$ac_site_file" | |
529 | fi | |
530 | done | |
531 | ||
532 | if test -r "$cache_file"; then | |
533 | echo "loading cache $cache_file" | |
534 | . $cache_file | |
535 | else | |
536 | echo "creating cache $cache_file" | |
537 | > $cache_file | |
538 | fi | |
539 | ||
540 | ac_ext=c | |
541 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3dedc867 | 542 | ac_cpp='$CPP $CPPFLAGS' |
1a7b4b7c | 543 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
4b23e55c | 544 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
bfde4a67 | 545 | cross_compiling=$ac_cv_prog_cc_cross |
5436fc65 | 546 | |
4b23e55c JM |
547 | ac_exeext= |
548 | ac_objext=o | |
5436fc65 C |
549 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
550 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
551 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
552 | ac_n= ac_c=' | |
553 | ' ac_t=' ' | |
554 | else | |
555 | ac_n=-n ac_c= ac_t= | |
556 | fi | |
557 | else | |
558 | ac_n= ac_c='\c' ac_t= | |
559 | fi | |
560 | ||
561 | ||
562 | ||
db210d08 | 563 | |
5436fc65 C |
564 | # Extract the first word of "gcc", so it can be a program name with args. |
565 | set dummy gcc; ac_word=$2 | |
566 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 567 | echo "configure:568: checking for $ac_word" >&5 |
5436fc65 C |
568 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
569 | echo $ac_n "(cached) $ac_c" 1>&6 | |
570 | else | |
571 | if test -n "$CC"; then | |
572 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
573 | else | |
4b23e55c | 574 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 575 | for ac_dir in $PATH; do |
5436fc65 C |
576 | test -z "$ac_dir" && ac_dir=. |
577 | if test -f $ac_dir/$ac_word; then | |
578 | ac_cv_prog_CC="gcc" | |
579 | break | |
580 | fi | |
581 | done | |
582 | IFS="$ac_save_ifs" | |
5436fc65 C |
583 | fi |
584 | fi | |
585 | CC="$ac_cv_prog_CC" | |
586 | if test -n "$CC"; then | |
587 | echo "$ac_t""$CC" 1>&6 | |
588 | else | |
589 | echo "$ac_t""no" 1>&6 | |
590 | fi | |
591 | ||
1a7b4b7c DE |
592 | if test -z "$CC"; then |
593 | # Extract the first word of "cc", so it can be a program name with args. | |
594 | set dummy cc; ac_word=$2 | |
595 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 596 | echo "configure:597: checking for $ac_word" >&5 |
1a7b4b7c DE |
597 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
598 | echo $ac_n "(cached) $ac_c" 1>&6 | |
599 | else | |
600 | if test -n "$CC"; then | |
601 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
602 | else | |
4b23e55c | 603 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1a7b4b7c | 604 | ac_prog_rejected=no |
d836385e | 605 | for ac_dir in $PATH; do |
1a7b4b7c DE |
606 | test -z "$ac_dir" && ac_dir=. |
607 | if test -f $ac_dir/$ac_word; then | |
608 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
609 | ac_prog_rejected=yes | |
610 | continue | |
611 | fi | |
612 | ac_cv_prog_CC="cc" | |
613 | break | |
614 | fi | |
615 | done | |
616 | IFS="$ac_save_ifs" | |
617 | if test $ac_prog_rejected = yes; then | |
618 | # We found a bogon in the path, so make sure we never use it. | |
619 | set dummy $ac_cv_prog_CC | |
620 | shift | |
621 | if test $# -gt 0; then | |
622 | # We chose a different compiler from the bogus one. | |
623 | # However, it has the same basename, so the bogon will be chosen | |
624 | # first if we set CC to just the basename; use the full file name. | |
625 | shift | |
626 | set dummy "$ac_dir/$ac_word" "$@" | |
627 | shift | |
628 | ac_cv_prog_CC="$@" | |
629 | fi | |
630 | fi | |
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 | ||
4b23e55c JM |
640 | if test -z "$CC"; then |
641 | case "`uname -s`" in | |
642 | *win32* | *WIN32*) | |
643 | # Extract the first word of "cl", so it can be a program name with args. | |
644 | set dummy cl; ac_word=$2 | |
645 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 646 | echo "configure:647: checking for $ac_word" >&5 |
4b23e55c JM |
647 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
648 | echo $ac_n "(cached) $ac_c" 1>&6 | |
649 | else | |
650 | if test -n "$CC"; then | |
651 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
652 | else | |
653 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
d836385e | 654 | for ac_dir in $PATH; do |
4b23e55c JM |
655 | test -z "$ac_dir" && ac_dir=. |
656 | if test -f $ac_dir/$ac_word; then | |
657 | ac_cv_prog_CC="cl" | |
658 | break | |
659 | fi | |
660 | done | |
661 | IFS="$ac_save_ifs" | |
662 | fi | |
663 | fi | |
664 | CC="$ac_cv_prog_CC" | |
665 | if test -n "$CC"; then | |
666 | echo "$ac_t""$CC" 1>&6 | |
667 | else | |
668 | echo "$ac_t""no" 1>&6 | |
669 | fi | |
670 | ;; | |
671 | esac | |
672 | fi | |
1a7b4b7c DE |
673 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
674 | fi | |
5436fc65 | 675 | |
bfde4a67 | 676 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
460845ab | 677 | echo "configure:678: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
bfde4a67 SG |
678 | |
679 | ac_ext=c | |
680 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
681 | ac_cpp='$CPP $CPPFLAGS' | |
682 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
4b23e55c | 683 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
bfde4a67 SG |
684 | cross_compiling=$ac_cv_prog_cc_cross |
685 | ||
d836385e | 686 | cat > conftest.$ac_ext <<EOF |
460845ab | 687 | #line 688 "configure" |
bfde4a67 SG |
688 | #include "confdefs.h" |
689 | main(){return(0);} | |
690 | EOF | |
460845ab | 691 | if { (eval echo configure:692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
bfde4a67 SG |
692 | ac_cv_prog_cc_works=yes |
693 | # If we can't run a trivial program, we are probably using a cross compiler. | |
694 | if (./conftest; exit) 2>/dev/null; then | |
695 | ac_cv_prog_cc_cross=no | |
696 | else | |
697 | ac_cv_prog_cc_cross=yes | |
698 | fi | |
699 | else | |
700 | echo "configure: failed program was:" >&5 | |
701 | cat conftest.$ac_ext >&5 | |
702 | ac_cv_prog_cc_works=no | |
703 | fi | |
704 | rm -fr conftest* | |
705 | ||
706 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
707 | if test $ac_cv_prog_cc_works = no; then | |
708 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
709 | fi | |
710 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
460845ab | 711 | echo "configure:712: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
bfde4a67 SG |
712 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
713 | cross_compiling=$ac_cv_prog_cc_cross | |
714 | ||
5436fc65 | 715 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
460845ab | 716 | echo "configure:717: checking whether we are using GNU C" >&5 |
5436fc65 C |
717 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
718 | echo $ac_n "(cached) $ac_c" 1>&6 | |
719 | else | |
720 | cat > conftest.c <<EOF | |
721 | #ifdef __GNUC__ | |
722 | yes; | |
723 | #endif | |
724 | EOF | |
460845ab | 725 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
5436fc65 C |
726 | ac_cv_prog_gcc=yes |
727 | else | |
728 | ac_cv_prog_gcc=no | |
729 | fi | |
730 | fi | |
1a7b4b7c | 731 | |
5436fc65 | 732 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
bfde4a67 | 733 | |
5436fc65 C |
734 | if test $ac_cv_prog_gcc = yes; then |
735 | GCC=yes | |
4b23e55c JM |
736 | else |
737 | GCC= | |
738 | fi | |
739 | ||
740 | ac_test_CFLAGS="${CFLAGS+set}" | |
741 | ac_save_CFLAGS="$CFLAGS" | |
742 | CFLAGS= | |
743 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
460845ab | 744 | echo "configure:745: checking whether ${CC-cc} accepts -g" >&5 |
bfde4a67 | 745 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
5436fc65 C |
746 | echo $ac_n "(cached) $ac_c" 1>&6 |
747 | else | |
748 | echo 'void f(){}' > conftest.c | |
749 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
bfde4a67 | 750 | ac_cv_prog_cc_g=yes |
5436fc65 | 751 | else |
bfde4a67 | 752 | ac_cv_prog_cc_g=no |
5436fc65 C |
753 | fi |
754 | rm -f conftest* | |
755 | ||
756 | fi | |
1a7b4b7c | 757 | |
bfde4a67 | 758 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
4b23e55c JM |
759 | if test "$ac_test_CFLAGS" = set; then |
760 | CFLAGS="$ac_save_CFLAGS" | |
761 | elif test $ac_cv_prog_cc_g = yes; then | |
762 | if test "$GCC" = yes; then | |
bfde4a67 SG |
763 | CFLAGS="-g -O2" |
764 | else | |
4b23e55c | 765 | CFLAGS="-g" |
6ee3e5d6 | 766 | fi |
ba68ad57 | 767 | else |
4b23e55c JM |
768 | if test "$GCC" = yes; then |
769 | CFLAGS="-O2" | |
770 | else | |
771 | CFLAGS= | |
772 | fi | |
5436fc65 C |
773 | fi |
774 | ||
775 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
460845ab | 776 | echo "configure:777: checking how to run the C preprocessor" >&5 |
5436fc65 C |
777 | # On Suns, sometimes $CPP names a directory. |
778 | if test -n "$CPP" && test -d "$CPP"; then | |
779 | CPP= | |
780 | fi | |
781 | if test -z "$CPP"; then | |
782 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
783 | echo $ac_n "(cached) $ac_c" 1>&6 | |
784 | else | |
785 | # This must be in double quotes, not single quotes, because CPP may get | |
786 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
787 | CPP="${CC-cc} -E" | |
788 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
789 | # not just through cpp. | |
790 | cat > conftest.$ac_ext <<EOF | |
460845ab | 791 | #line 792 "configure" |
5436fc65 C |
792 | #include "confdefs.h" |
793 | #include <assert.h> | |
794 | Syntax Error | |
795 | EOF | |
1a7b4b7c | 796 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
460845ab | 797 | { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 798 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
799 | if test -z "$ac_err"; then |
800 | : | |
801 | else | |
802 | echo "$ac_err" >&5 | |
bfde4a67 SG |
803 | echo "configure: failed program was:" >&5 |
804 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
805 | rm -rf conftest* |
806 | CPP="${CC-cc} -E -traditional-cpp" | |
807 | cat > conftest.$ac_ext <<EOF | |
460845ab | 808 | #line 809 "configure" |
4b23e55c JM |
809 | #include "confdefs.h" |
810 | #include <assert.h> | |
811 | Syntax Error | |
812 | EOF | |
813 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 814 | { (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c JM |
815 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
816 | if test -z "$ac_err"; then | |
817 | : | |
818 | else | |
819 | echo "$ac_err" >&5 | |
820 | echo "configure: failed program was:" >&5 | |
821 | cat conftest.$ac_ext >&5 | |
822 | rm -rf conftest* | |
823 | CPP="${CC-cc} -nologo -E" | |
824 | cat > conftest.$ac_ext <<EOF | |
460845ab | 825 | #line 826 "configure" |
eac4afd1 JM |
826 | #include "confdefs.h" |
827 | #include <assert.h> | |
828 | Syntax Error | |
829 | EOF | |
830 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 831 | { (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 832 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
833 | if test -z "$ac_err"; then |
834 | : | |
835 | else | |
836 | echo "$ac_err" >&5 | |
bfde4a67 SG |
837 | echo "configure: failed program was:" >&5 |
838 | cat conftest.$ac_ext >&5 | |
5436fc65 | 839 | rm -rf conftest* |
fcfc3c0c TT |
840 | CPP=/lib/cpp |
841 | fi | |
842 | rm -f conftest* | |
843 | fi | |
4b23e55c JM |
844 | rm -f conftest* |
845 | fi | |
fcfc3c0c TT |
846 | rm -f conftest* |
847 | ac_cv_prog_CPP="$CPP" | |
848 | fi | |
849 | CPP="$ac_cv_prog_CPP" | |
850 | else | |
851 | ac_cv_prog_CPP="$CPP" | |
852 | fi | |
853 | echo "$ac_t""$CPP" 1>&6 | |
854 | ||
855 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
460845ab | 856 | echo "configure:857: checking for AIX" >&5 |
fcfc3c0c | 857 | cat > conftest.$ac_ext <<EOF |
460845ab | 858 | #line 859 "configure" |
fcfc3c0c TT |
859 | #include "confdefs.h" |
860 | #ifdef _AIX | |
861 | yes | |
862 | #endif | |
863 | ||
864 | EOF | |
865 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
866 | egrep "yes" >/dev/null 2>&1; then | |
867 | rm -rf conftest* | |
868 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
869 | #define _ALL_SOURCE 1 | |
870 | EOF | |
871 | ||
872 | else | |
873 | rm -rf conftest* | |
874 | echo "$ac_t""no" 1>&6 | |
875 | fi | |
876 | rm -f conftest* | |
877 | ||
878 | ||
fcfc3c0c | 879 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
460845ab | 880 | echo "configure:881: checking for POSIXized ISC" >&5 |
fcfc3c0c TT |
881 | if test -d /etc/conf/kconfig.d && |
882 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
883 | then | |
884 | echo "$ac_t""yes" 1>&6 | |
885 | ISC=yes # If later tests want to check for ISC. | |
886 | cat >> confdefs.h <<\EOF | |
887 | #define _POSIX_SOURCE 1 | |
888 | EOF | |
889 | ||
890 | if test "$GCC" = yes; then | |
891 | CC="$CC -posix" | |
892 | else | |
893 | CC="$CC -Xp" | |
894 | fi | |
895 | else | |
896 | echo "$ac_t""no" 1>&6 | |
897 | ISC= | |
898 | fi | |
899 | ||
460845ab | 900 | AM_PROG_CC_STDC |
fcfc3c0c | 901 | |
fcfc3c0c TT |
902 | ac_aux_dir= |
903 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
904 | if test -f $ac_dir/install-sh; then | |
905 | ac_aux_dir=$ac_dir | |
906 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
907 | break | |
908 | elif test -f $ac_dir/install.sh; then | |
909 | ac_aux_dir=$ac_dir | |
910 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
911 | break | |
912 | fi | |
913 | done | |
914 | if test -z "$ac_aux_dir"; then | |
915 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
916 | fi | |
917 | ac_config_guess=$ac_aux_dir/config.guess | |
918 | ac_config_sub=$ac_aux_dir/config.sub | |
919 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
920 | ||
921 | ||
922 | # Do some error checking and defaulting for the host and target type. | |
923 | # The inputs are: | |
924 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
925 | # | |
926 | # The rules are: | |
927 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
928 | # same time. | |
929 | # 2. Host defaults to nonopt. | |
930 | # 3. If nonopt is not specified, then host defaults to the current host, | |
931 | # as determined by config.guess. | |
932 | # 4. Target and build default to nonopt. | |
933 | # 5. If nonopt is not specified, then target and build default to host. | |
934 | ||
935 | # The aliases save the names the user supplied, while $host etc. | |
936 | # will get canonicalized. | |
937 | case $host---$target---$nonopt in | |
938 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
939 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
940 | esac | |
941 | ||
942 | ||
943 | # Make sure we can run config.sub. | |
4b23e55c | 944 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
fcfc3c0c TT |
945 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
946 | fi | |
947 | ||
948 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
460845ab | 949 | echo "configure:950: checking host system type" >&5 |
fcfc3c0c TT |
950 | |
951 | host_alias=$host | |
952 | case "$host_alias" in | |
953 | NONE) | |
954 | case $nonopt in | |
955 | NONE) | |
4b23e55c | 956 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
fcfc3c0c TT |
957 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
958 | fi ;; | |
959 | *) host_alias=$nonopt ;; | |
960 | esac ;; | |
961 | esac | |
962 | ||
4b23e55c | 963 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
fcfc3c0c TT |
964 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
965 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
966 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
967 | echo "$ac_t""$host" 1>&6 | |
968 | ||
969 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
460845ab | 970 | echo "configure:971: checking target system type" >&5 |
fcfc3c0c TT |
971 | |
972 | target_alias=$target | |
973 | case "$target_alias" in | |
974 | NONE) | |
975 | case $nonopt in | |
976 | NONE) target_alias=$host_alias ;; | |
977 | *) target_alias=$nonopt ;; | |
978 | esac ;; | |
979 | esac | |
980 | ||
4b23e55c | 981 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
fcfc3c0c TT |
982 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
983 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
984 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
985 | echo "$ac_t""$target" 1>&6 | |
986 | ||
987 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
460845ab | 988 | echo "configure:989: checking build system type" >&5 |
fcfc3c0c TT |
989 | |
990 | build_alias=$build | |
991 | case "$build_alias" in | |
992 | NONE) | |
993 | case $nonopt in | |
994 | NONE) build_alias=$host_alias ;; | |
995 | *) build_alias=$nonopt ;; | |
996 | esac ;; | |
997 | esac | |
998 | ||
4b23e55c | 999 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
fcfc3c0c TT |
1000 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1001 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1002 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1003 | echo "$ac_t""$build" 1>&6 | |
1004 | ||
1005 | test "$host_alias" != "$target_alias" && | |
1006 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1007 | NONENONEs,x,x, && | |
1008 | program_prefix=${target_alias}- | |
1009 | ||
1010 | ||
1011 | ALL_LINGUAS= | |
1012 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
460845ab | 1013 | echo "configure:1014: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
fcfc3c0c TT |
1014 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1015 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1016 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1017 | else | |
1018 | cat > conftestmake <<\EOF | |
1019 | all: | |
1020 | @echo 'ac_maketemp="${MAKE}"' | |
1021 | EOF | |
1022 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1023 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1024 | if test -n "$ac_maketemp"; then | |
1025 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1026 | else | |
1027 | eval ac_cv_prog_make_${ac_make}_set=no | |
1028 | fi | |
1029 | rm -f conftestmake | |
1030 | fi | |
1031 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1032 | echo "$ac_t""yes" 1>&6 | |
1033 | SET_MAKE= | |
1034 | else | |
1035 | echo "$ac_t""no" 1>&6 | |
1036 | SET_MAKE="MAKE=${MAKE-make}" | |
1037 | fi | |
1038 | ||
1039 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1040 | set dummy ranlib; ac_word=$2 | |
1041 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 1042 | echo "configure:1043: checking for $ac_word" >&5 |
fcfc3c0c TT |
1043 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1044 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1045 | else | |
1046 | if test -n "$RANLIB"; then | |
1047 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1048 | else | |
4b23e55c | 1049 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 1050 | for ac_dir in $PATH; do |
fcfc3c0c TT |
1051 | test -z "$ac_dir" && ac_dir=. |
1052 | if test -f $ac_dir/$ac_word; then | |
1053 | ac_cv_prog_RANLIB="ranlib" | |
1054 | break | |
1055 | fi | |
1056 | done | |
1057 | IFS="$ac_save_ifs" | |
1058 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1059 | fi | |
1060 | fi | |
1061 | RANLIB="$ac_cv_prog_RANLIB" | |
1062 | if test -n "$RANLIB"; then | |
1063 | echo "$ac_t""$RANLIB" 1>&6 | |
1064 | else | |
1065 | echo "$ac_t""no" 1>&6 | |
1066 | fi | |
1067 | ||
1068 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
460845ab | 1069 | echo "configure:1070: checking for ANSI C header files" >&5 |
fcfc3c0c TT |
1070 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1071 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1072 | else | |
1073 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1074 | #line 1075 "configure" |
fcfc3c0c TT |
1075 | #include "confdefs.h" |
1076 | #include <stdlib.h> | |
1077 | #include <stdarg.h> | |
1078 | #include <string.h> | |
1079 | #include <float.h> | |
1080 | EOF | |
1081 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 1082 | { (eval echo configure:1083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 1083 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
1084 | if test -z "$ac_err"; then |
1085 | rm -rf conftest* | |
1086 | ac_cv_header_stdc=yes | |
1087 | else | |
1088 | echo "$ac_err" >&5 | |
1089 | echo "configure: failed program was:" >&5 | |
1090 | cat conftest.$ac_ext >&5 | |
1091 | rm -rf conftest* | |
1092 | ac_cv_header_stdc=no | |
1093 | fi | |
1094 | rm -f conftest* | |
1095 | ||
1096 | if test $ac_cv_header_stdc = yes; then | |
1097 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1098 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1099 | #line 1100 "configure" |
fcfc3c0c TT |
1100 | #include "confdefs.h" |
1101 | #include <string.h> | |
1102 | EOF | |
1103 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1104 | egrep "memchr" >/dev/null 2>&1; then | |
1105 | : | |
1106 | else | |
1107 | rm -rf conftest* | |
1108 | ac_cv_header_stdc=no | |
1109 | fi | |
1110 | rm -f conftest* | |
1111 | ||
1112 | fi | |
1113 | ||
1114 | if test $ac_cv_header_stdc = yes; then | |
1115 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1116 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1117 | #line 1118 "configure" |
fcfc3c0c TT |
1118 | #include "confdefs.h" |
1119 | #include <stdlib.h> | |
1120 | EOF | |
1121 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1122 | egrep "free" >/dev/null 2>&1; then | |
1123 | : | |
1124 | else | |
1125 | rm -rf conftest* | |
1126 | ac_cv_header_stdc=no | |
1127 | fi | |
1128 | rm -f conftest* | |
1129 | ||
1130 | fi | |
1131 | ||
1132 | if test $ac_cv_header_stdc = yes; then | |
1133 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1134 | if test "$cross_compiling" = yes; then | |
1135 | : | |
1136 | else | |
1137 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1138 | #line 1139 "configure" |
fcfc3c0c TT |
1139 | #include "confdefs.h" |
1140 | #include <ctype.h> | |
1141 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1142 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1143 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1144 | int main () { int i; for (i = 0; i < 256; i++) | |
1145 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1146 | exit (0); } | |
1147 | ||
1148 | EOF | |
460845ab | 1149 | if { (eval echo configure:1150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
1150 | then |
1151 | : | |
1152 | else | |
1153 | echo "configure: failed program was:" >&5 | |
1154 | cat conftest.$ac_ext >&5 | |
1155 | rm -fr conftest* | |
1156 | ac_cv_header_stdc=no | |
1157 | fi | |
1158 | rm -fr conftest* | |
1159 | fi | |
1160 | ||
1161 | fi | |
1162 | fi | |
1163 | ||
1164 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1165 | if test $ac_cv_header_stdc = yes; then | |
1166 | cat >> confdefs.h <<\EOF | |
1167 | #define STDC_HEADERS 1 | |
1168 | EOF | |
1169 | ||
1170 | fi | |
1171 | ||
1172 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
460845ab | 1173 | echo "configure:1174: checking for working const" >&5 |
fcfc3c0c TT |
1174 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1176 | else | |
1177 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1178 | #line 1179 "configure" |
fcfc3c0c TT |
1179 | #include "confdefs.h" |
1180 | ||
1181 | int main() { | |
1182 | ||
1183 | /* Ultrix mips cc rejects this. */ | |
1184 | typedef int charset[2]; const charset x; | |
1185 | /* SunOS 4.1.1 cc rejects this. */ | |
1186 | char const *const *ccp; | |
1187 | char **p; | |
1188 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1189 | struct point {int x, y;}; | |
1190 | static struct point const zero = {0,0}; | |
1191 | /* AIX XL C 1.02.0.0 rejects this. | |
1192 | It does not let you subtract one const X* pointer from another in an arm | |
1193 | of an if-expression whose if-part is not a constant expression */ | |
1194 | const char *g = "string"; | |
1195 | ccp = &g + (g ? g-g : 0); | |
1196 | /* HPUX 7.0 cc rejects these. */ | |
1197 | ++ccp; | |
1198 | p = (char**) ccp; | |
1199 | ccp = (char const *const *) p; | |
1200 | { /* SCO 3.2v4 cc rejects this. */ | |
1201 | char *t; | |
1202 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1203 | ||
1204 | *t++ = 0; | |
1205 | } | |
1206 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1207 | int x[] = {25, 17}; | |
1208 | const int *foo = &x[0]; | |
1209 | ++foo; | |
1210 | } | |
1211 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1212 | typedef const int *iptr; | |
1213 | iptr p = 0; | |
1214 | ++p; | |
1215 | } | |
1216 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1217 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1218 | struct s { int j; const int *ap[3]; }; | |
1219 | struct s *b; b->j = 5; | |
1220 | } | |
1221 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1222 | const int foo = 10; | |
1223 | } | |
1224 | ||
1225 | ; return 0; } | |
1226 | EOF | |
460845ab | 1227 | if { (eval echo configure:1228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
fcfc3c0c TT |
1228 | rm -rf conftest* |
1229 | ac_cv_c_const=yes | |
1230 | else | |
1231 | echo "configure: failed program was:" >&5 | |
1232 | cat conftest.$ac_ext >&5 | |
1233 | rm -rf conftest* | |
1234 | ac_cv_c_const=no | |
1235 | fi | |
1236 | rm -f conftest* | |
1237 | fi | |
1238 | ||
1239 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1240 | if test $ac_cv_c_const = no; then | |
1241 | cat >> confdefs.h <<\EOF | |
1242 | #define const | |
1243 | EOF | |
1244 | ||
1245 | fi | |
1246 | ||
1247 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
460845ab | 1248 | echo "configure:1249: checking for inline" >&5 |
fcfc3c0c TT |
1249 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1250 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1251 | else | |
1252 | ac_cv_c_inline=no | |
1253 | for ac_kw in inline __inline__ __inline; do | |
1254 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1255 | #line 1256 "configure" |
fcfc3c0c TT |
1256 | #include "confdefs.h" |
1257 | ||
1258 | int main() { | |
1259 | } $ac_kw foo() { | |
1260 | ; return 0; } | |
1261 | EOF | |
460845ab | 1262 | if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
fcfc3c0c TT |
1263 | rm -rf conftest* |
1264 | ac_cv_c_inline=$ac_kw; break | |
1265 | else | |
1266 | echo "configure: failed program was:" >&5 | |
1267 | cat conftest.$ac_ext >&5 | |
1268 | fi | |
1269 | rm -f conftest* | |
1270 | done | |
1271 | ||
1272 | fi | |
1273 | ||
1274 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1275 | case "$ac_cv_c_inline" in | |
1276 | inline | yes) ;; | |
1277 | no) cat >> confdefs.h <<\EOF | |
1278 | #define inline | |
1279 | EOF | |
1280 | ;; | |
1281 | *) cat >> confdefs.h <<EOF | |
1282 | #define inline $ac_cv_c_inline | |
1283 | EOF | |
1284 | ;; | |
1285 | esac | |
1286 | ||
1287 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
460845ab | 1288 | echo "configure:1289: checking for off_t" >&5 |
fcfc3c0c TT |
1289 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1290 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1291 | else | |
1292 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1293 | #line 1294 "configure" |
fcfc3c0c TT |
1294 | #include "confdefs.h" |
1295 | #include <sys/types.h> | |
1296 | #if STDC_HEADERS | |
1297 | #include <stdlib.h> | |
1298 | #include <stddef.h> | |
1299 | #endif | |
1300 | EOF | |
1301 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
d836385e | 1302 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
fcfc3c0c TT |
1303 | rm -rf conftest* |
1304 | ac_cv_type_off_t=yes | |
1305 | else | |
1306 | rm -rf conftest* | |
1307 | ac_cv_type_off_t=no | |
1308 | fi | |
1309 | rm -f conftest* | |
1310 | ||
1311 | fi | |
1312 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1313 | if test $ac_cv_type_off_t = no; then | |
1314 | cat >> confdefs.h <<\EOF | |
1315 | #define off_t long | |
1316 | EOF | |
1317 | ||
1318 | fi | |
1319 | ||
1320 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
460845ab | 1321 | echo "configure:1322: checking for size_t" >&5 |
fcfc3c0c TT |
1322 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1323 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1324 | else | |
1325 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1326 | #line 1327 "configure" |
fcfc3c0c TT |
1327 | #include "confdefs.h" |
1328 | #include <sys/types.h> | |
1329 | #if STDC_HEADERS | |
1330 | #include <stdlib.h> | |
1331 | #include <stddef.h> | |
1332 | #endif | |
1333 | EOF | |
1334 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
d836385e | 1335 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
fcfc3c0c TT |
1336 | rm -rf conftest* |
1337 | ac_cv_type_size_t=yes | |
1338 | else | |
1339 | rm -rf conftest* | |
1340 | ac_cv_type_size_t=no | |
1341 | fi | |
1342 | rm -f conftest* | |
1343 | ||
1344 | fi | |
1345 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1346 | if test $ac_cv_type_size_t = no; then | |
1347 | cat >> confdefs.h <<\EOF | |
1348 | #define size_t unsigned | |
1349 | EOF | |
1350 | ||
1351 | fi | |
1352 | ||
1353 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1354 | # for constant arguments. Useless! | |
1355 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
460845ab | 1356 | echo "configure:1357: checking for working alloca.h" >&5 |
fcfc3c0c TT |
1357 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1358 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1359 | else | |
1360 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1361 | #line 1362 "configure" |
fcfc3c0c TT |
1362 | #include "confdefs.h" |
1363 | #include <alloca.h> | |
1364 | int main() { | |
1365 | char *p = alloca(2 * sizeof(int)); | |
1366 | ; return 0; } | |
1367 | EOF | |
460845ab | 1368 | if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1369 | rm -rf conftest* |
1370 | ac_cv_header_alloca_h=yes | |
1371 | else | |
1372 | echo "configure: failed program was:" >&5 | |
1373 | cat conftest.$ac_ext >&5 | |
1374 | rm -rf conftest* | |
1375 | ac_cv_header_alloca_h=no | |
1376 | fi | |
1377 | rm -f conftest* | |
1378 | fi | |
1379 | ||
1380 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1381 | if test $ac_cv_header_alloca_h = yes; then | |
1382 | cat >> confdefs.h <<\EOF | |
1383 | #define HAVE_ALLOCA_H 1 | |
1384 | EOF | |
1385 | ||
1386 | fi | |
1387 | ||
1388 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
460845ab | 1389 | echo "configure:1390: checking for alloca" >&5 |
fcfc3c0c TT |
1390 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1392 | else | |
1393 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1394 | #line 1395 "configure" |
fcfc3c0c TT |
1395 | #include "confdefs.h" |
1396 | ||
1397 | #ifdef __GNUC__ | |
1398 | # define alloca __builtin_alloca | |
1399 | #else | |
4b23e55c JM |
1400 | # ifdef _MSC_VER |
1401 | # include <malloc.h> | |
1402 | # define alloca _alloca | |
fcfc3c0c | 1403 | # else |
4b23e55c JM |
1404 | # if HAVE_ALLOCA_H |
1405 | # include <alloca.h> | |
ba68ad57 | 1406 | # else |
4b23e55c JM |
1407 | # ifdef _AIX |
1408 | #pragma alloca | |
1409 | # else | |
1410 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
fcfc3c0c | 1411 | char *alloca (); |
4b23e55c | 1412 | # endif |
fcfc3c0c TT |
1413 | # endif |
1414 | # endif | |
1415 | # endif | |
1416 | #endif | |
1417 | ||
1418 | int main() { | |
1419 | char *p = (char *) alloca(1); | |
1420 | ; return 0; } | |
1421 | EOF | |
460845ab | 1422 | if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1423 | rm -rf conftest* |
1424 | ac_cv_func_alloca_works=yes | |
1425 | else | |
1426 | echo "configure: failed program was:" >&5 | |
1427 | cat conftest.$ac_ext >&5 | |
1428 | rm -rf conftest* | |
1429 | ac_cv_func_alloca_works=no | |
1430 | fi | |
1431 | rm -f conftest* | |
1432 | fi | |
1433 | ||
1434 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1435 | if test $ac_cv_func_alloca_works = yes; then | |
1436 | cat >> confdefs.h <<\EOF | |
1437 | #define HAVE_ALLOCA 1 | |
1438 | EOF | |
1439 | ||
1440 | fi | |
1441 | ||
1442 | if test $ac_cv_func_alloca_works = no; then | |
1443 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1444 | # that cause trouble. Some versions do not even contain alloca or | |
1445 | # contain a buggy version. If you still want to use their alloca, | |
1446 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4b23e55c | 1447 | ALLOCA=alloca.${ac_objext} |
fcfc3c0c TT |
1448 | cat >> confdefs.h <<\EOF |
1449 | #define C_ALLOCA 1 | |
1450 | EOF | |
1451 | ||
1452 | ||
1453 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
460845ab | 1454 | echo "configure:1455: checking whether alloca needs Cray hooks" >&5 |
fcfc3c0c TT |
1455 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1456 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1457 | else | |
1458 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1459 | #line 1460 "configure" |
fcfc3c0c TT |
1460 | #include "confdefs.h" |
1461 | #if defined(CRAY) && ! defined(CRAY2) | |
1462 | webecray | |
1463 | #else | |
1464 | wenotbecray | |
1465 | #endif | |
1466 | ||
1467 | EOF | |
1468 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1469 | egrep "webecray" >/dev/null 2>&1; then | |
1470 | rm -rf conftest* | |
1471 | ac_cv_os_cray=yes | |
1472 | else | |
1473 | rm -rf conftest* | |
1474 | ac_cv_os_cray=no | |
1475 | fi | |
1476 | rm -f conftest* | |
1477 | ||
1478 | fi | |
1479 | ||
1480 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1481 | if test $ac_cv_os_cray = yes; then | |
1482 | for ac_func in _getb67 GETB67 getb67; do | |
1483 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 1484 | echo "configure:1485: checking for $ac_func" >&5 |
fcfc3c0c TT |
1485 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1486 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1487 | else | |
1488 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1489 | #line 1490 "configure" |
fcfc3c0c TT |
1490 | #include "confdefs.h" |
1491 | /* System header to define __stub macros and hopefully few prototypes, | |
1492 | which can conflict with char $ac_func(); below. */ | |
1493 | #include <assert.h> | |
1494 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1495 | /* We use char because int might match the return type of a gcc2 | |
1496 | builtin and then its argument prototype would still apply. */ | |
1497 | char $ac_func(); | |
1498 | ||
1499 | int main() { | |
1500 | ||
1501 | /* The GNU C library defines this for functions which it implements | |
1502 | to always fail with ENOSYS. Some functions are actually named | |
1503 | something starting with __ and the normal name is an alias. */ | |
1504 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1505 | choke me | |
1506 | #else | |
1507 | $ac_func(); | |
1508 | #endif | |
1509 | ||
1510 | ; return 0; } | |
1511 | EOF | |
460845ab | 1512 | if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1513 | rm -rf conftest* |
1514 | eval "ac_cv_func_$ac_func=yes" | |
1515 | else | |
1516 | echo "configure: failed program was:" >&5 | |
1517 | cat conftest.$ac_ext >&5 | |
1518 | rm -rf conftest* | |
1519 | eval "ac_cv_func_$ac_func=no" | |
1520 | fi | |
1521 | rm -f conftest* | |
1522 | fi | |
1523 | ||
1524 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1525 | echo "$ac_t""yes" 1>&6 | |
1526 | cat >> confdefs.h <<EOF | |
1527 | #define CRAY_STACKSEG_END $ac_func | |
1528 | EOF | |
1529 | ||
1530 | break | |
1531 | else | |
1532 | echo "$ac_t""no" 1>&6 | |
1533 | fi | |
1534 | ||
1535 | done | |
1536 | fi | |
1537 | ||
1538 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
460845ab | 1539 | echo "configure:1540: checking stack direction for C alloca" >&5 |
fcfc3c0c TT |
1540 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1541 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1542 | else | |
1543 | if test "$cross_compiling" = yes; then | |
1544 | ac_cv_c_stack_direction=0 | |
1545 | else | |
1546 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1547 | #line 1548 "configure" |
fcfc3c0c TT |
1548 | #include "confdefs.h" |
1549 | find_stack_direction () | |
1550 | { | |
1551 | static char *addr = 0; | |
1552 | auto char dummy; | |
1553 | if (addr == 0) | |
1554 | { | |
1555 | addr = &dummy; | |
1556 | return find_stack_direction (); | |
1557 | } | |
1558 | else | |
1559 | return (&dummy > addr) ? 1 : -1; | |
1560 | } | |
1561 | main () | |
1562 | { | |
1563 | exit (find_stack_direction() < 0); | |
1564 | } | |
1565 | EOF | |
460845ab | 1566 | if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
1567 | then |
1568 | ac_cv_c_stack_direction=1 | |
1569 | else | |
1570 | echo "configure: failed program was:" >&5 | |
1571 | cat conftest.$ac_ext >&5 | |
1572 | rm -fr conftest* | |
1573 | ac_cv_c_stack_direction=-1 | |
1574 | fi | |
1575 | rm -fr conftest* | |
1576 | fi | |
1577 | ||
1578 | fi | |
1579 | ||
1580 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1581 | cat >> confdefs.h <<EOF | |
1582 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1583 | EOF | |
1584 | ||
1585 | fi | |
1586 | ||
1587 | for ac_hdr in unistd.h | |
1588 | do | |
1589 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1590 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
460845ab | 1591 | echo "configure:1592: checking for $ac_hdr" >&5 |
fcfc3c0c TT |
1592 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1594 | else | |
1595 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1596 | #line 1597 "configure" |
fcfc3c0c TT |
1597 | #include "confdefs.h" |
1598 | #include <$ac_hdr> | |
1599 | EOF | |
1600 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 1601 | { (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 1602 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
1603 | if test -z "$ac_err"; then |
1604 | rm -rf conftest* | |
1605 | eval "ac_cv_header_$ac_safe=yes" | |
1606 | else | |
1607 | echo "$ac_err" >&5 | |
1608 | echo "configure: failed program was:" >&5 | |
1609 | cat conftest.$ac_ext >&5 | |
1610 | rm -rf conftest* | |
1611 | eval "ac_cv_header_$ac_safe=no" | |
1612 | fi | |
1613 | rm -f conftest* | |
1614 | fi | |
1615 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1616 | echo "$ac_t""yes" 1>&6 | |
1617 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1618 | cat >> confdefs.h <<EOF | |
1619 | #define $ac_tr_hdr 1 | |
1620 | EOF | |
1621 | ||
1622 | else | |
1623 | echo "$ac_t""no" 1>&6 | |
1624 | fi | |
1625 | done | |
1626 | ||
1627 | for ac_func in getpagesize | |
1628 | do | |
1629 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 1630 | echo "configure:1631: checking for $ac_func" >&5 |
fcfc3c0c TT |
1631 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1632 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1633 | else | |
1634 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1635 | #line 1636 "configure" |
fcfc3c0c TT |
1636 | #include "confdefs.h" |
1637 | /* System header to define __stub macros and hopefully few prototypes, | |
1638 | which can conflict with char $ac_func(); below. */ | |
1639 | #include <assert.h> | |
1640 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1641 | /* We use char because int might match the return type of a gcc2 | |
1642 | builtin and then its argument prototype would still apply. */ | |
1643 | char $ac_func(); | |
1644 | ||
1645 | int main() { | |
1646 | ||
1647 | /* The GNU C library defines this for functions which it implements | |
1648 | to always fail with ENOSYS. Some functions are actually named | |
1649 | something starting with __ and the normal name is an alias. */ | |
1650 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1651 | choke me | |
1652 | #else | |
1653 | $ac_func(); | |
1654 | #endif | |
1655 | ||
1656 | ; return 0; } | |
1657 | EOF | |
460845ab | 1658 | if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1659 | rm -rf conftest* |
1660 | eval "ac_cv_func_$ac_func=yes" | |
1661 | else | |
1662 | echo "configure: failed program was:" >&5 | |
1663 | cat conftest.$ac_ext >&5 | |
1664 | rm -rf conftest* | |
1665 | eval "ac_cv_func_$ac_func=no" | |
1666 | fi | |
1667 | rm -f conftest* | |
1668 | fi | |
1669 | ||
1670 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1671 | echo "$ac_t""yes" 1>&6 | |
1672 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1673 | cat >> confdefs.h <<EOF | |
1674 | #define $ac_tr_func 1 | |
1675 | EOF | |
1676 | ||
1677 | else | |
1678 | echo "$ac_t""no" 1>&6 | |
1679 | fi | |
1680 | done | |
1681 | ||
1682 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
460845ab | 1683 | echo "configure:1684: checking for working mmap" >&5 |
fcfc3c0c TT |
1684 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1685 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1686 | else | |
1687 | if test "$cross_compiling" = yes; then | |
1688 | ac_cv_func_mmap_fixed_mapped=no | |
1689 | else | |
1690 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1691 | #line 1692 "configure" |
fcfc3c0c TT |
1692 | #include "confdefs.h" |
1693 | ||
1694 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1695 | Here is a matrix of mmap possibilities: | |
1696 | mmap private not fixed | |
1697 | mmap private fixed at somewhere currently unmapped | |
1698 | mmap private fixed at somewhere already mapped | |
1699 | mmap shared not fixed | |
1700 | mmap shared fixed at somewhere currently unmapped | |
1701 | mmap shared fixed at somewhere already mapped | |
1702 | For private mappings, we should verify that changes cannot be read() | |
1703 | back from the file, nor mmap's back from the file at a different | |
1704 | address. (There have been systems where private was not correctly | |
1705 | implemented like the infamous i386 svr4.0, and systems where the | |
1706 | VM page cache was not coherent with the filesystem buffer cache | |
1707 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1708 | For shared mappings, we should conversely verify that changes get | |
1709 | propogated back to all the places they're supposed to be. | |
1710 | ||
1711 | Grep wants private fixed already mapped. | |
1712 | The main things grep needs to know about mmap are: | |
1713 | * does it exist and is it safe to write into the mmap'd area | |
1714 | * how to use it (BSD variants) */ | |
1715 | #include <sys/types.h> | |
1716 | #include <fcntl.h> | |
1717 | #include <sys/mman.h> | |
1718 | ||
1719 | /* This mess was copied from the GNU getpagesize.h. */ | |
1720 | #ifndef HAVE_GETPAGESIZE | |
1721 | # ifdef HAVE_UNISTD_H | |
1722 | # include <unistd.h> | |
1723 | # endif | |
1724 | ||
1725 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1726 | # ifndef HAVE_SYS_PARAM_H | |
1727 | # define HAVE_SYS_PARAM_H 1 | |
1728 | # endif | |
1729 | ||
1730 | # ifdef _SC_PAGESIZE | |
1731 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1732 | # else /* no _SC_PAGESIZE */ | |
1733 | # ifdef HAVE_SYS_PARAM_H | |
1734 | # include <sys/param.h> | |
1735 | # ifdef EXEC_PAGESIZE | |
1736 | # define getpagesize() EXEC_PAGESIZE | |
1737 | # else /* no EXEC_PAGESIZE */ | |
1738 | # ifdef NBPG | |
1739 | # define getpagesize() NBPG * CLSIZE | |
1740 | # ifndef CLSIZE | |
1741 | # define CLSIZE 1 | |
1742 | # endif /* no CLSIZE */ | |
1743 | # else /* no NBPG */ | |
1744 | # ifdef NBPC | |
1745 | # define getpagesize() NBPC | |
1746 | # else /* no NBPC */ | |
1747 | # ifdef PAGESIZE | |
1748 | # define getpagesize() PAGESIZE | |
1749 | # endif /* PAGESIZE */ | |
1750 | # endif /* no NBPC */ | |
1751 | # endif /* no NBPG */ | |
1752 | # endif /* no EXEC_PAGESIZE */ | |
1753 | # else /* no HAVE_SYS_PARAM_H */ | |
1754 | # define getpagesize() 8192 /* punt totally */ | |
1755 | # endif /* no HAVE_SYS_PARAM_H */ | |
1756 | # endif /* no _SC_PAGESIZE */ | |
1757 | ||
1758 | #endif /* no HAVE_GETPAGESIZE */ | |
1759 | ||
1760 | #ifdef __cplusplus | |
1761 | extern "C" { void *malloc(unsigned); } | |
1762 | #else | |
1763 | char *malloc(); | |
1764 | #endif | |
1765 | ||
1766 | int | |
1767 | main() | |
1768 | { | |
1769 | char *data, *data2, *data3; | |
1770 | int i, pagesize; | |
1771 | int fd; | |
1772 | ||
1773 | pagesize = getpagesize(); | |
1774 | ||
1775 | /* | |
1776 | * First, make a file with some known garbage in it. | |
1777 | */ | |
1778 | data = malloc(pagesize); | |
1779 | if (!data) | |
1780 | exit(1); | |
1781 | for (i = 0; i < pagesize; ++i) | |
1782 | *(data + i) = rand(); | |
1783 | umask(0); | |
1784 | fd = creat("conftestmmap", 0600); | |
1785 | if (fd < 0) | |
1786 | exit(1); | |
1787 | if (write(fd, data, pagesize) != pagesize) | |
1788 | exit(1); | |
1789 | close(fd); | |
1790 | ||
1791 | /* | |
1792 | * Next, try to mmap the file at a fixed address which | |
1793 | * already has something else allocated at it. If we can, | |
1794 | * also make sure that we see the same garbage. | |
1795 | */ | |
1796 | fd = open("conftestmmap", O_RDWR); | |
1797 | if (fd < 0) | |
1798 | exit(1); | |
1799 | data2 = malloc(2 * pagesize); | |
1800 | if (!data2) | |
1801 | exit(1); | |
1802 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1803 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1804 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1805 | exit(1); | |
1806 | for (i = 0; i < pagesize; ++i) | |
1807 | if (*(data + i) != *(data2 + i)) | |
1808 | exit(1); | |
1809 | ||
1810 | /* | |
1811 | * Finally, make sure that changes to the mapped area | |
1812 | * do not percolate back to the file as seen by read(). | |
1813 | * (This is a bug on some variants of i386 svr4.0.) | |
1814 | */ | |
1815 | for (i = 0; i < pagesize; ++i) | |
1816 | *(data2 + i) = *(data2 + i) + 1; | |
1817 | data3 = malloc(pagesize); | |
1818 | if (!data3) | |
1819 | exit(1); | |
1820 | if (read(fd, data3, pagesize) != pagesize) | |
1821 | exit(1); | |
1822 | for (i = 0; i < pagesize; ++i) | |
1823 | if (*(data + i) != *(data3 + i)) | |
1824 | exit(1); | |
1825 | close(fd); | |
1826 | unlink("conftestmmap"); | |
1827 | exit(0); | |
1828 | } | |
1829 | ||
1830 | EOF | |
460845ab | 1831 | if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
1832 | then |
1833 | ac_cv_func_mmap_fixed_mapped=yes | |
1834 | else | |
1835 | echo "configure: failed program was:" >&5 | |
1836 | cat conftest.$ac_ext >&5 | |
1837 | rm -fr conftest* | |
1838 | ac_cv_func_mmap_fixed_mapped=no | |
1839 | fi | |
1840 | rm -fr conftest* | |
1841 | fi | |
1842 | ||
1843 | fi | |
1844 | ||
1845 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1846 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1847 | cat >> confdefs.h <<\EOF | |
1848 | #define HAVE_MMAP 1 | |
1849 | EOF | |
1850 | ||
1851 | fi | |
1852 | ||
1853 | ||
1854 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1855 | unistd.h values.h sys/param.h | |
1856 | do | |
1857 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1858 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
460845ab | 1859 | echo "configure:1860: checking for $ac_hdr" >&5 |
fcfc3c0c TT |
1860 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1861 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1862 | else | |
1863 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1864 | #line 1865 "configure" |
fcfc3c0c TT |
1865 | #include "confdefs.h" |
1866 | #include <$ac_hdr> | |
1867 | EOF | |
1868 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 1869 | { (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 1870 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
1871 | if test -z "$ac_err"; then |
1872 | rm -rf conftest* | |
1873 | eval "ac_cv_header_$ac_safe=yes" | |
1874 | else | |
1875 | echo "$ac_err" >&5 | |
1876 | echo "configure: failed program was:" >&5 | |
1877 | cat conftest.$ac_ext >&5 | |
1878 | rm -rf conftest* | |
1879 | eval "ac_cv_header_$ac_safe=no" | |
1880 | fi | |
1881 | rm -f conftest* | |
1882 | fi | |
1883 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1884 | echo "$ac_t""yes" 1>&6 | |
1885 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1886 | cat >> confdefs.h <<EOF | |
1887 | #define $ac_tr_hdr 1 | |
1888 | EOF | |
1889 | ||
1890 | else | |
1891 | echo "$ac_t""no" 1>&6 | |
1892 | fi | |
1893 | done | |
1894 | ||
1895 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
1896 | __argz_count __argz_stringify __argz_next | |
1897 | do | |
1898 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 1899 | echo "configure:1900: checking for $ac_func" >&5 |
fcfc3c0c TT |
1900 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1901 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1902 | else | |
1903 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1904 | #line 1905 "configure" |
fcfc3c0c TT |
1905 | #include "confdefs.h" |
1906 | /* System header to define __stub macros and hopefully few prototypes, | |
1907 | which can conflict with char $ac_func(); below. */ | |
1908 | #include <assert.h> | |
1909 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1910 | /* We use char because int might match the return type of a gcc2 | |
1911 | builtin and then its argument prototype would still apply. */ | |
1912 | char $ac_func(); | |
1913 | ||
1914 | int main() { | |
1915 | ||
1916 | /* The GNU C library defines this for functions which it implements | |
1917 | to always fail with ENOSYS. Some functions are actually named | |
1918 | something starting with __ and the normal name is an alias. */ | |
1919 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1920 | choke me | |
1921 | #else | |
1922 | $ac_func(); | |
1923 | #endif | |
1924 | ||
1925 | ; return 0; } | |
1926 | EOF | |
460845ab | 1927 | if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1928 | rm -rf conftest* |
1929 | eval "ac_cv_func_$ac_func=yes" | |
1930 | else | |
1931 | echo "configure: failed program was:" >&5 | |
1932 | cat conftest.$ac_ext >&5 | |
1933 | rm -rf conftest* | |
1934 | eval "ac_cv_func_$ac_func=no" | |
1935 | fi | |
1936 | rm -f conftest* | |
1937 | fi | |
1938 | ||
1939 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1940 | echo "$ac_t""yes" 1>&6 | |
1941 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1942 | cat >> confdefs.h <<EOF | |
1943 | #define $ac_tr_func 1 | |
1944 | EOF | |
1945 | ||
1946 | else | |
1947 | echo "$ac_t""no" 1>&6 | |
1948 | fi | |
1949 | done | |
1950 | ||
1951 | ||
1952 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
1953 | for ac_func in stpcpy | |
1954 | do | |
1955 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 1956 | echo "configure:1957: checking for $ac_func" >&5 |
fcfc3c0c TT |
1957 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1958 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1959 | else | |
1960 | cat > conftest.$ac_ext <<EOF | |
460845ab | 1961 | #line 1962 "configure" |
fcfc3c0c TT |
1962 | #include "confdefs.h" |
1963 | /* System header to define __stub macros and hopefully few prototypes, | |
1964 | which can conflict with char $ac_func(); below. */ | |
1965 | #include <assert.h> | |
1966 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1967 | /* We use char because int might match the return type of a gcc2 | |
1968 | builtin and then its argument prototype would still apply. */ | |
1969 | char $ac_func(); | |
1970 | ||
1971 | int main() { | |
1972 | ||
1973 | /* The GNU C library defines this for functions which it implements | |
1974 | to always fail with ENOSYS. Some functions are actually named | |
1975 | something starting with __ and the normal name is an alias. */ | |
1976 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1977 | choke me | |
1978 | #else | |
1979 | $ac_func(); | |
1980 | #endif | |
1981 | ||
1982 | ; return 0; } | |
1983 | EOF | |
460845ab | 1984 | if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1985 | rm -rf conftest* |
1986 | eval "ac_cv_func_$ac_func=yes" | |
1987 | else | |
1988 | echo "configure: failed program was:" >&5 | |
1989 | cat conftest.$ac_ext >&5 | |
1990 | rm -rf conftest* | |
1991 | eval "ac_cv_func_$ac_func=no" | |
1992 | fi | |
1993 | rm -f conftest* | |
1994 | fi | |
1995 | ||
1996 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1997 | echo "$ac_t""yes" 1>&6 | |
1998 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1999 | cat >> confdefs.h <<EOF | |
2000 | #define $ac_tr_func 1 | |
2001 | EOF | |
2002 | ||
2003 | else | |
2004 | echo "$ac_t""no" 1>&6 | |
2005 | fi | |
2006 | done | |
2007 | ||
2008 | fi | |
2009 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2010 | cat >> confdefs.h <<\EOF | |
2011 | #define HAVE_STPCPY 1 | |
2012 | EOF | |
2013 | ||
2014 | fi | |
2015 | ||
2016 | if test $ac_cv_header_locale_h = yes; then | |
2017 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
460845ab | 2018 | echo "configure:2019: checking for LC_MESSAGES" >&5 |
fcfc3c0c TT |
2019 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2020 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2021 | else | |
2022 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2023 | #line 2024 "configure" |
fcfc3c0c TT |
2024 | #include "confdefs.h" |
2025 | #include <locale.h> | |
2026 | int main() { | |
2027 | return LC_MESSAGES | |
2028 | ; return 0; } | |
2029 | EOF | |
460845ab | 2030 | if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2031 | rm -rf conftest* |
2032 | am_cv_val_LC_MESSAGES=yes | |
2033 | else | |
2034 | echo "configure: failed program was:" >&5 | |
2035 | cat conftest.$ac_ext >&5 | |
2036 | rm -rf conftest* | |
2037 | am_cv_val_LC_MESSAGES=no | |
2038 | fi | |
2039 | rm -f conftest* | |
2040 | fi | |
2041 | ||
2042 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2043 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2044 | cat >> confdefs.h <<\EOF | |
2045 | #define HAVE_LC_MESSAGES 1 | |
2046 | EOF | |
2047 | ||
2048 | fi | |
2049 | fi | |
2050 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
460845ab | 2051 | echo "configure:2052: checking whether NLS is requested" >&5 |
fcfc3c0c TT |
2052 | # Check whether --enable-nls or --disable-nls was given. |
2053 | if test "${enable_nls+set}" = set; then | |
2054 | enableval="$enable_nls" | |
2055 | USE_NLS=$enableval | |
2056 | else | |
2057 | USE_NLS=yes | |
2058 | fi | |
2059 | ||
2060 | echo "$ac_t""$USE_NLS" 1>&6 | |
2061 | ||
2062 | ||
2063 | USE_INCLUDED_LIBINTL=no | |
2064 | ||
2065 | if test "$USE_NLS" = "yes"; then | |
2066 | cat >> confdefs.h <<\EOF | |
2067 | #define ENABLE_NLS 1 | |
2068 | EOF | |
2069 | ||
2070 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
460845ab | 2071 | echo "configure:2072: checking whether included gettext is requested" >&5 |
fcfc3c0c TT |
2072 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2073 | if test "${with_included_gettext+set}" = set; then | |
2074 | withval="$with_included_gettext" | |
2075 | nls_cv_force_use_gnu_gettext=$withval | |
2076 | else | |
2077 | nls_cv_force_use_gnu_gettext=no | |
2078 | fi | |
2079 | ||
2080 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2081 | ||
2082 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2083 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2084 | nls_cv_header_intl= | |
2085 | nls_cv_header_libgt= | |
2086 | CATOBJEXT=NONE | |
2087 | ||
2088 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2089 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
460845ab | 2090 | echo "configure:2091: checking for libintl.h" >&5 |
fcfc3c0c TT |
2091 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2092 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2093 | else | |
2094 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2095 | #line 2096 "configure" |
fcfc3c0c TT |
2096 | #include "confdefs.h" |
2097 | #include <libintl.h> | |
2098 | EOF | |
2099 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 2100 | { (eval echo configure:2101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 2101 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
2102 | if test -z "$ac_err"; then |
2103 | rm -rf conftest* | |
2104 | eval "ac_cv_header_$ac_safe=yes" | |
2105 | else | |
2106 | echo "$ac_err" >&5 | |
2107 | echo "configure: failed program was:" >&5 | |
2108 | cat conftest.$ac_ext >&5 | |
2109 | rm -rf conftest* | |
2110 | eval "ac_cv_header_$ac_safe=no" | |
2111 | fi | |
2112 | rm -f conftest* | |
2113 | fi | |
2114 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2115 | echo "$ac_t""yes" 1>&6 | |
2116 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
460845ab | 2117 | echo "configure:2118: checking for gettext in libc" >&5 |
fcfc3c0c TT |
2118 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2120 | else | |
2121 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2122 | #line 2123 "configure" |
fcfc3c0c TT |
2123 | #include "confdefs.h" |
2124 | #include <libintl.h> | |
2125 | int main() { | |
2126 | return (int) gettext ("") | |
2127 | ; return 0; } | |
2128 | EOF | |
460845ab | 2129 | if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2130 | rm -rf conftest* |
2131 | gt_cv_func_gettext_libc=yes | |
2132 | else | |
2133 | echo "configure: failed program was:" >&5 | |
2134 | cat conftest.$ac_ext >&5 | |
2135 | rm -rf conftest* | |
2136 | gt_cv_func_gettext_libc=no | |
2137 | fi | |
2138 | rm -f conftest* | |
2139 | fi | |
2140 | ||
2141 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2142 | ||
2143 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2144 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
460845ab | 2145 | echo "configure:2146: checking for bindtextdomain in -lintl" >&5 |
fcfc3c0c TT |
2146 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2147 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2148 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2149 | else | |
2150 | ac_save_LIBS="$LIBS" | |
2151 | LIBS="-lintl $LIBS" | |
2152 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2153 | #line 2154 "configure" |
fcfc3c0c TT |
2154 | #include "confdefs.h" |
2155 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2156 | /* We use char because int might match the return type of a gcc2 | |
2157 | builtin and then its argument prototype would still apply. */ | |
2158 | char bindtextdomain(); | |
2159 | ||
2160 | int main() { | |
2161 | bindtextdomain() | |
2162 | ; return 0; } | |
2163 | EOF | |
460845ab | 2164 | if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2165 | rm -rf conftest* |
2166 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2167 | else | |
2168 | echo "configure: failed program was:" >&5 | |
2169 | cat conftest.$ac_ext >&5 | |
2170 | rm -rf conftest* | |
2171 | eval "ac_cv_lib_$ac_lib_var=no" | |
2172 | fi | |
2173 | rm -f conftest* | |
2174 | LIBS="$ac_save_LIBS" | |
2175 | ||
2176 | fi | |
2177 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2178 | echo "$ac_t""yes" 1>&6 | |
2179 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
460845ab | 2180 | echo "configure:2181: checking for gettext in libintl" >&5 |
fcfc3c0c TT |
2181 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2182 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2183 | else | |
2184 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2185 | #line 2186 "configure" |
fcfc3c0c TT |
2186 | #include "confdefs.h" |
2187 | ||
2188 | int main() { | |
2189 | return (int) gettext ("") | |
2190 | ; return 0; } | |
2191 | EOF | |
460845ab | 2192 | if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2193 | rm -rf conftest* |
2194 | gt_cv_func_gettext_libintl=yes | |
2195 | else | |
2196 | echo "configure: failed program was:" >&5 | |
2197 | cat conftest.$ac_ext >&5 | |
2198 | rm -rf conftest* | |
2199 | gt_cv_func_gettext_libintl=no | |
2200 | fi | |
2201 | rm -f conftest* | |
2202 | fi | |
2203 | ||
2204 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2205 | else | |
2206 | echo "$ac_t""no" 1>&6 | |
2207 | fi | |
2208 | ||
2209 | fi | |
2210 | ||
2211 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2212 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2213 | cat >> confdefs.h <<\EOF | |
2214 | #define HAVE_GETTEXT 1 | |
2215 | EOF | |
2216 | ||
2217 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2218 | set dummy msgfmt; ac_word=$2 | |
2219 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2220 | echo "configure:2221: checking for $ac_word" >&5 |
fcfc3c0c TT |
2221 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2223 | else | |
2224 | case "$MSGFMT" in | |
2225 | /*) | |
2226 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2227 | ;; | |
2228 | *) | |
2229 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2230 | for ac_dir in $PATH; do | |
2231 | test -z "$ac_dir" && ac_dir=. | |
2232 | if test -f $ac_dir/$ac_word; then | |
2233 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2234 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2235 | break | |
2236 | fi | |
2237 | fi | |
2238 | done | |
2239 | IFS="$ac_save_ifs" | |
2240 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2241 | ;; | |
2242 | esac | |
2243 | fi | |
2244 | MSGFMT="$ac_cv_path_MSGFMT" | |
2245 | if test -n "$MSGFMT"; then | |
2246 | echo "$ac_t""$MSGFMT" 1>&6 | |
2247 | else | |
2248 | echo "$ac_t""no" 1>&6 | |
2249 | fi | |
2250 | if test "$MSGFMT" != "no"; then | |
2251 | for ac_func in dcgettext | |
2252 | do | |
2253 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 2254 | echo "configure:2255: checking for $ac_func" >&5 |
fcfc3c0c TT |
2255 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2256 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2257 | else | |
2258 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2259 | #line 2260 "configure" |
fcfc3c0c TT |
2260 | #include "confdefs.h" |
2261 | /* System header to define __stub macros and hopefully few prototypes, | |
2262 | which can conflict with char $ac_func(); below. */ | |
2263 | #include <assert.h> | |
2264 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2265 | /* We use char because int might match the return type of a gcc2 | |
2266 | builtin and then its argument prototype would still apply. */ | |
2267 | char $ac_func(); | |
2268 | ||
2269 | int main() { | |
2270 | ||
2271 | /* The GNU C library defines this for functions which it implements | |
2272 | to always fail with ENOSYS. Some functions are actually named | |
2273 | something starting with __ and the normal name is an alias. */ | |
2274 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2275 | choke me | |
2276 | #else | |
2277 | $ac_func(); | |
2278 | #endif | |
2279 | ||
2280 | ; return 0; } | |
2281 | EOF | |
460845ab | 2282 | if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2283 | rm -rf conftest* |
2284 | eval "ac_cv_func_$ac_func=yes" | |
2285 | else | |
2286 | echo "configure: failed program was:" >&5 | |
2287 | cat conftest.$ac_ext >&5 | |
2288 | rm -rf conftest* | |
2289 | eval "ac_cv_func_$ac_func=no" | |
2290 | fi | |
2291 | rm -f conftest* | |
2292 | fi | |
2293 | ||
2294 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2295 | echo "$ac_t""yes" 1>&6 | |
2296 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2297 | cat >> confdefs.h <<EOF | |
2298 | #define $ac_tr_func 1 | |
2299 | EOF | |
2300 | ||
2301 | else | |
2302 | echo "$ac_t""no" 1>&6 | |
2303 | fi | |
2304 | done | |
2305 | ||
2306 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2307 | set dummy gmsgfmt; ac_word=$2 | |
2308 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2309 | echo "configure:2310: checking for $ac_word" >&5 |
fcfc3c0c TT |
2310 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2311 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2312 | else | |
2313 | case "$GMSGFMT" in | |
2314 | /*) | |
2315 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2316 | ;; | |
4b23e55c JM |
2317 | ?:/*) |
2318 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2319 | ;; | |
fcfc3c0c | 2320 | *) |
4b23e55c | 2321 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 2322 | for ac_dir in $PATH; do |
fcfc3c0c TT |
2323 | test -z "$ac_dir" && ac_dir=. |
2324 | if test -f $ac_dir/$ac_word; then | |
2325 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2326 | break | |
2327 | fi | |
2328 | done | |
2329 | IFS="$ac_save_ifs" | |
2330 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2331 | ;; | |
2332 | esac | |
2333 | fi | |
2334 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2335 | if test -n "$GMSGFMT"; then | |
2336 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2337 | else | |
2338 | echo "$ac_t""no" 1>&6 | |
2339 | fi | |
2340 | ||
2341 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2342 | set dummy xgettext; ac_word=$2 | |
2343 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2344 | echo "configure:2345: checking for $ac_word" >&5 |
fcfc3c0c TT |
2345 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2346 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2347 | else | |
2348 | case "$XGETTEXT" in | |
2349 | /*) | |
2350 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2351 | ;; | |
2352 | *) | |
2353 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2354 | for ac_dir in $PATH; do | |
2355 | test -z "$ac_dir" && ac_dir=. | |
2356 | if test -f $ac_dir/$ac_word; then | |
2357 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2358 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2359 | break | |
2360 | fi | |
2361 | fi | |
2362 | done | |
2363 | IFS="$ac_save_ifs" | |
2364 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2365 | ;; | |
2366 | esac | |
2367 | fi | |
2368 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2369 | if test -n "$XGETTEXT"; then | |
2370 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2371 | else | |
2372 | echo "$ac_t""no" 1>&6 | |
2373 | fi | |
2374 | ||
2375 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2376 | #line 2377 "configure" |
fcfc3c0c TT |
2377 | #include "confdefs.h" |
2378 | ||
2379 | int main() { | |
2380 | extern int _nl_msg_cat_cntr; | |
2381 | return _nl_msg_cat_cntr | |
2382 | ; return 0; } | |
2383 | EOF | |
460845ab | 2384 | if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2385 | rm -rf conftest* |
2386 | CATOBJEXT=.gmo | |
2387 | DATADIRNAME=share | |
2388 | else | |
2389 | echo "configure: failed program was:" >&5 | |
2390 | cat conftest.$ac_ext >&5 | |
2391 | rm -rf conftest* | |
2392 | CATOBJEXT=.mo | |
2393 | DATADIRNAME=lib | |
5436fc65 C |
2394 | fi |
2395 | rm -f conftest* | |
fcfc3c0c TT |
2396 | INSTOBJEXT=.mo |
2397 | fi | |
2398 | fi | |
2399 | ||
2400 | else | |
2401 | echo "$ac_t""no" 1>&6 | |
5436fc65 | 2402 | fi |
fcfc3c0c TT |
2403 | |
2404 | ||
2405 | ||
2406 | if test "$CATOBJEXT" = "NONE"; then | |
2407 | nls_cv_use_gnu_gettext=yes | |
2408 | fi | |
2409 | fi | |
2410 | ||
2411 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2412 | INTLOBJS="\$(GETTOBJS)" | |
2413 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2414 | set dummy msgfmt; ac_word=$2 | |
2415 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2416 | echo "configure:2417: checking for $ac_word" >&5 |
fcfc3c0c TT |
2417 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2418 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2419 | else | |
2420 | case "$MSGFMT" in | |
2421 | /*) | |
2422 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2423 | ;; | |
2424 | *) | |
2425 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2426 | for ac_dir in $PATH; do | |
2427 | test -z "$ac_dir" && ac_dir=. | |
2428 | if test -f $ac_dir/$ac_word; then | |
2429 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2430 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2431 | break | |
2432 | fi | |
2433 | fi | |
2434 | done | |
2435 | IFS="$ac_save_ifs" | |
2436 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2437 | ;; | |
2438 | esac | |
5436fc65 | 2439 | fi |
fcfc3c0c TT |
2440 | MSGFMT="$ac_cv_path_MSGFMT" |
2441 | if test -n "$MSGFMT"; then | |
2442 | echo "$ac_t""$MSGFMT" 1>&6 | |
dedcc91d | 2443 | else |
fcfc3c0c | 2444 | echo "$ac_t""no" 1>&6 |
5436fc65 | 2445 | fi |
5436fc65 | 2446 | |
fcfc3c0c TT |
2447 | # Extract the first word of "gmsgfmt", so it can be a program name with args. |
2448 | set dummy gmsgfmt; ac_word=$2 | |
2449 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2450 | echo "configure:2451: checking for $ac_word" >&5 |
fcfc3c0c TT |
2451 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2452 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2453 | else | |
2454 | case "$GMSGFMT" in | |
2455 | /*) | |
2456 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2457 | ;; | |
4b23e55c JM |
2458 | ?:/*) |
2459 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2460 | ;; | |
fcfc3c0c | 2461 | *) |
4b23e55c | 2462 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 2463 | for ac_dir in $PATH; do |
fcfc3c0c TT |
2464 | test -z "$ac_dir" && ac_dir=. |
2465 | if test -f $ac_dir/$ac_word; then | |
2466 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2467 | break | |
2468 | fi | |
2469 | done | |
2470 | IFS="$ac_save_ifs" | |
2471 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2472 | ;; | |
2473 | esac | |
2474 | fi | |
2475 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2476 | if test -n "$GMSGFMT"; then | |
2477 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2478 | else | |
2479 | echo "$ac_t""no" 1>&6 | |
2480 | fi | |
5436fc65 | 2481 | |
fcfc3c0c TT |
2482 | # Extract the first word of "xgettext", so it can be a program name with args. |
2483 | set dummy xgettext; ac_word=$2 | |
2484 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2485 | echo "configure:2486: checking for $ac_word" >&5 |
fcfc3c0c TT |
2486 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2487 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2488 | else | |
2489 | case "$XGETTEXT" in | |
2490 | /*) | |
2491 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2492 | ;; | |
2493 | *) | |
2494 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2495 | for ac_dir in $PATH; do | |
2496 | test -z "$ac_dir" && ac_dir=. | |
2497 | if test -f $ac_dir/$ac_word; then | |
2498 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2499 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2500 | break | |
2501 | fi | |
2502 | fi | |
2503 | done | |
2504 | IFS="$ac_save_ifs" | |
2505 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2506 | ;; | |
2507 | esac | |
2508 | fi | |
2509 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2510 | if test -n "$XGETTEXT"; then | |
2511 | echo "$ac_t""$XGETTEXT" 1>&6 | |
5436fc65 | 2512 | else |
5436fc65 C |
2513 | echo "$ac_t""no" 1>&6 |
2514 | fi | |
5436fc65 | 2515 | |
fcfc3c0c TT |
2516 | |
2517 | USE_INCLUDED_LIBINTL=yes | |
2518 | CATOBJEXT=.gmo | |
2519 | INSTOBJEXT=.mo | |
2520 | DATADIRNAME=share | |
2521 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2522 | INTLLIBS=$INTLDEPS | |
2523 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2524 | nls_cv_header_intl=libintl.h | |
2525 | nls_cv_header_libgt=libgettext.h | |
2526 | fi | |
5436fc65 | 2527 | |
fcfc3c0c TT |
2528 | if test "$XGETTEXT" != ":"; then |
2529 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2530 | : ; | |
2531 | else | |
2532 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2533 | XGETTEXT=":" | |
2534 | fi | |
2535 | fi | |
2536 | ||
2537 | # We need to process the po/ directory. | |
2538 | POSUB=po | |
2539 | else | |
2540 | DATADIRNAME=share | |
2541 | nls_cv_header_intl=libintl.h | |
2542 | nls_cv_header_libgt=libgettext.h | |
2543 | fi | |
2544 | ||
2545 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2546 | # because some of the sources are only built for this goal. | |
2547 | if test "$PACKAGE" = gettext; then | |
2548 | USE_NLS=yes | |
2549 | USE_INCLUDED_LIBINTL=yes | |
2550 | fi | |
2551 | ||
2552 | for lang in $ALL_LINGUAS; do | |
2553 | GMOFILES="$GMOFILES $lang.gmo" | |
2554 | POFILES="$POFILES $lang.po" | |
2555 | done | |
2556 | ||
2557 | ||
2558 | ||
2559 | ||
2560 | ||
2561 | ||
2562 | ||
2563 | ||
2564 | ||
2565 | ||
2566 | ||
2567 | ||
2568 | ||
2569 | ||
2570 | if test "x$CATOBJEXT" != "x"; then | |
2571 | if test "x$ALL_LINGUAS" = "x"; then | |
2572 | LINGUAS= | |
2573 | else | |
2574 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
460845ab | 2575 | echo "configure:2576: checking for catalogs to be installed" >&5 |
fcfc3c0c TT |
2576 | NEW_LINGUAS= |
2577 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2578 | case "$ALL_LINGUAS" in | |
2579 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2580 | esac | |
2581 | done | |
2582 | LINGUAS=$NEW_LINGUAS | |
2583 | echo "$ac_t""$LINGUAS" 1>&6 | |
2584 | fi | |
2585 | ||
2586 | if test -n "$LINGUAS"; then | |
2587 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2588 | fi | |
2589 | fi | |
2590 | ||
2591 | if test $ac_cv_header_locale_h = yes; then | |
2592 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2593 | else | |
2594 | INCLUDE_LOCALE_H="\ | |
2595 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2596 | fi | |
2597 | ||
2598 | ||
2599 | if test -f $srcdir/po2tbl.sed.in; then | |
2600 | if test "$CATOBJEXT" = ".cat"; then | |
2601 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2602 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
460845ab | 2603 | echo "configure:2604: checking for linux/version.h" >&5 |
5436fc65 C |
2604 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2606 | else | |
2607 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2608 | #line 2609 "configure" |
5436fc65 | 2609 | #include "confdefs.h" |
fcfc3c0c | 2610 | #include <linux/version.h> |
5436fc65 | 2611 | EOF |
1a7b4b7c | 2612 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
460845ab | 2613 | { (eval echo configure:2614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 2614 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
2615 | if test -z "$ac_err"; then |
2616 | rm -rf conftest* | |
2617 | eval "ac_cv_header_$ac_safe=yes" | |
2618 | else | |
2619 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2620 | echo "configure: failed program was:" >&5 |
2621 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2622 | rm -rf conftest* |
2623 | eval "ac_cv_header_$ac_safe=no" | |
2624 | fi | |
2625 | rm -f conftest* | |
2626 | fi | |
2627 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2628 | echo "$ac_t""yes" 1>&6 | |
fcfc3c0c | 2629 | msgformat=linux |
5436fc65 C |
2630 | else |
2631 | echo "$ac_t""no" 1>&6 | |
fcfc3c0c | 2632 | msgformat=xopen |
0579b53d GN |
2633 | fi |
2634 | ||
0579b53d | 2635 | |
fcfc3c0c TT |
2636 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed |
2637 | fi | |
2638 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2639 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2640 | fi | |
2641 | ||
2642 | if test "$PACKAGE" = "gettext"; then | |
2643 | GT_NO="#NO#" | |
2644 | GT_YES= | |
2645 | else | |
2646 | GT_NO= | |
2647 | GT_YES="#YES#" | |
2648 | fi | |
2649 | ||
2650 | ||
0579b53d | 2651 | |
fcfc3c0c TT |
2652 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" |
2653 | ||
0579b53d | 2654 | |
fcfc3c0c TT |
2655 | l= |
2656 | ||
0579b53d | 2657 | |
fcfc3c0c TT |
2658 | if test -d $srcdir/po; then |
2659 | test -d po || mkdir po | |
2660 | if test "x$srcdir" != "x."; then | |
2661 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2662 | posrcprefix="$srcdir/" | |
2663 | else | |
2664 | posrcprefix="../$srcdir/" | |
2665 | fi | |
2666 | else | |
2667 | posrcprefix="../" | |
2668 | fi | |
2669 | rm -f po/POTFILES | |
2670 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2671 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2672 | fi | |
2673 | ||
0579b53d | 2674 | |
bfde4a67 SG |
2675 | |
2676 | CONFIG_OBS= | |
018d76dd | 2677 | CONFIG_DEPS= |
c7bb1531 | 2678 | CONFIG_SRCS= |
bfde4a67 SG |
2679 | |
2680 | configdirs="doc testsuite" | |
2681 | ||
2682 | ||
2683 | . ${srcdir}/configure.host | |
2684 | ||
2685 | . ${srcdir}/configure.tgt | |
2686 | ||
2687 | ||
5436fc65 C |
2688 | # Find a good install program. We prefer a C program (faster), |
2689 | # so one script is as good as another. But avoid the broken or | |
2690 | # incompatible versions: | |
2691 | # SysV /etc/install, /usr/sbin/install | |
2692 | # SunOS /usr/etc/install | |
2693 | # IRIX /sbin/install | |
2694 | # AIX /bin/install | |
4b23e55c | 2695 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
5436fc65 C |
2696 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
2697 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2698 | # ./install, which can be erroneously created by make from ./install.sh. | |
2699 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
460845ab | 2700 | echo "configure:2701: checking for a BSD compatible install" >&5 |
5436fc65 C |
2701 | if test -z "$INSTALL"; then |
2702 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2703 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2704 | else | |
4b23e55c | 2705 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
5436fc65 C |
2706 | for ac_dir in $PATH; do |
2707 | # Account for people who put trailing slashes in PATH elements. | |
2708 | case "$ac_dir/" in | |
2709 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2710 | *) | |
2711 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4b23e55c JM |
2712 | # Don't use installbsd from OSF since it installs stuff as root |
2713 | # by default. | |
2714 | for ac_prog in ginstall scoinst install; do | |
5436fc65 C |
2715 | if test -f $ac_dir/$ac_prog; then |
2716 | if test $ac_prog = install && | |
2717 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2718 | # AIX install. It has an incompatible calling convention. | |
5436fc65 C |
2719 | : |
2720 | else | |
2721 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2722 | break 2 | |
2723 | fi | |
2724 | fi | |
2725 | done | |
2726 | ;; | |
2727 | esac | |
2728 | done | |
bfde4a67 | 2729 | IFS="$ac_save_IFS" |
1a7b4b7c | 2730 | |
5436fc65 | 2731 | fi |
1a7b4b7c DE |
2732 | if test "${ac_cv_path_install+set}" = set; then |
2733 | INSTALL="$ac_cv_path_install" | |
2734 | else | |
2735 | # As a last resort, use the slow shell script. We don't cache a | |
2736 | # path for INSTALL within a source directory, because that will | |
2737 | # break other packages using the cache if that directory is | |
2738 | # removed, or if the path is relative. | |
2739 | INSTALL="$ac_install_sh" | |
2740 | fi | |
5436fc65 C |
2741 | fi |
2742 | echo "$ac_t""$INSTALL" 1>&6 | |
2743 | ||
2744 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2745 | # It thinks the first close brace ends the variable substitution. | |
2746 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2747 | ||
2748 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2749 | ||
d8efbc66 FF |
2750 | if test $host != $build; then |
2751 | ac_tool_prefix=${host_alias}- | |
2752 | else | |
2753 | ac_tool_prefix= | |
2754 | fi | |
2755 | ||
2756 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2757 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2758 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2759 | echo "configure:2760: checking for $ac_word" >&5 |
d8efbc66 FF |
2760 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2761 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2762 | else | |
2763 | if test -n "$AR"; then | |
2764 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2765 | else | |
4b23e55c | 2766 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 2767 | for ac_dir in $PATH; do |
d8efbc66 FF |
2768 | test -z "$ac_dir" && ac_dir=. |
2769 | if test -f $ac_dir/$ac_word; then | |
2770 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2771 | break | |
2772 | fi | |
2773 | done | |
2774 | IFS="$ac_save_ifs" | |
2775 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2776 | fi | |
2777 | fi | |
2778 | AR="$ac_cv_prog_AR" | |
2779 | if test -n "$AR"; then | |
2780 | echo "$ac_t""$AR" 1>&6 | |
2781 | else | |
2782 | echo "$ac_t""no" 1>&6 | |
2783 | fi | |
2784 | ||
2785 | ||
2786 | ||
2787 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2788 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2789 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2790 | echo "configure:2791: checking for $ac_word" >&5 |
d8efbc66 FF |
2791 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2792 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2793 | else | |
2794 | if test -n "$RANLIB"; then | |
2795 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2796 | else | |
4b23e55c | 2797 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 2798 | for ac_dir in $PATH; do |
d8efbc66 FF |
2799 | test -z "$ac_dir" && ac_dir=. |
2800 | if test -f $ac_dir/$ac_word; then | |
2801 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
2802 | break | |
2803 | fi | |
2804 | done | |
2805 | IFS="$ac_save_ifs" | |
2806 | fi | |
2807 | fi | |
2808 | RANLIB="$ac_cv_prog_RANLIB" | |
2809 | if test -n "$RANLIB"; then | |
2810 | echo "$ac_t""$RANLIB" 1>&6 | |
2811 | else | |
2812 | echo "$ac_t""no" 1>&6 | |
2813 | fi | |
2814 | ||
2815 | ||
2816 | if test -z "$ac_cv_prog_RANLIB"; then | |
2817 | if test -n "$ac_tool_prefix"; then | |
2818 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5436fc65 C |
2819 | set dummy ranlib; ac_word=$2 |
2820 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2821 | echo "configure:2822: checking for $ac_word" >&5 |
5436fc65 C |
2822 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2823 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2824 | else | |
2825 | if test -n "$RANLIB"; then | |
2826 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2827 | else | |
4b23e55c | 2828 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 2829 | for ac_dir in $PATH; do |
5436fc65 C |
2830 | test -z "$ac_dir" && ac_dir=. |
2831 | if test -f $ac_dir/$ac_word; then | |
2832 | ac_cv_prog_RANLIB="ranlib" | |
2833 | break | |
2834 | fi | |
2835 | done | |
2836 | IFS="$ac_save_ifs" | |
2837 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2838 | fi | |
2839 | fi | |
2840 | RANLIB="$ac_cv_prog_RANLIB" | |
2841 | if test -n "$RANLIB"; then | |
2842 | echo "$ac_t""$RANLIB" 1>&6 | |
2843 | else | |
2844 | echo "$ac_t""no" 1>&6 | |
2845 | fi | |
2846 | ||
d8efbc66 FF |
2847 | else |
2848 | RANLIB=":" | |
2849 | fi | |
2850 | fi | |
2851 | ||
204c8825 FF |
2852 | for ac_prog in 'bison -y' byacc |
2853 | do | |
2854 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2855 | set dummy $ac_prog; ac_word=$2 | |
2856 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
460845ab | 2857 | echo "configure:2858: checking for $ac_word" >&5 |
204c8825 FF |
2858 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
2859 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2860 | else | |
2861 | if test -n "$YACC"; then | |
2862 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
2863 | else | |
4b23e55c | 2864 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d836385e | 2865 | for ac_dir in $PATH; do |
204c8825 FF |
2866 | test -z "$ac_dir" && ac_dir=. |
2867 | if test -f $ac_dir/$ac_word; then | |
2868 | ac_cv_prog_YACC="$ac_prog" | |
2869 | break | |
2870 | fi | |
2871 | done | |
2872 | IFS="$ac_save_ifs" | |
2873 | fi | |
2874 | fi | |
2875 | YACC="$ac_cv_prog_YACC" | |
2876 | if test -n "$YACC"; then | |
2877 | echo "$ac_t""$YACC" 1>&6 | |
2878 | else | |
2879 | echo "$ac_t""no" 1>&6 | |
2880 | fi | |
2881 | ||
2882 | test -n "$YACC" && break | |
2883 | done | |
2884 | test -n "$YACC" || YACC="yacc" | |
2885 | ||
5436fc65 | 2886 | |
5436fc65 C |
2887 | if test "$program_transform_name" = s,x,x,; then |
2888 | program_transform_name= | |
2889 | else | |
1a7b4b7c DE |
2890 | # Double any \ or $. echo might interpret backslashes. |
2891 | cat <<\EOF_SED > conftestsed | |
2892 | s,\\,\\\\,g; s,\$,$$,g | |
2893 | EOF_SED | |
5436fc65 C |
2894 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
2895 | rm -f conftestsed | |
2896 | fi | |
2897 | test "$program_prefix" != NONE && | |
2898 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2899 | # Use a double $ so make ignores it. | |
2900 | test "$program_suffix" != NONE && | |
2901 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2902 | ||
2903 | # sed with no file args requires a program. | |
2904 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2905 | ||
2906 | ||
c14cabba | 2907 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
460845ab | 2908 | echo "configure:2909: checking return type of signal handlers" >&5 |
c14cabba AC |
2909 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
2910 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2911 | else | |
2912 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2913 | #line 2914 "configure" |
c14cabba AC |
2914 | #include "confdefs.h" |
2915 | #include <sys/types.h> | |
2916 | #include <signal.h> | |
2917 | #ifdef signal | |
2918 | #undef signal | |
2919 | #endif | |
2920 | #ifdef __cplusplus | |
2921 | extern "C" void (*signal (int, void (*)(int)))(int); | |
2922 | #else | |
2923 | void (*signal ()) (); | |
2924 | #endif | |
2925 | ||
2926 | int main() { | |
2927 | int i; | |
2928 | ; return 0; } | |
2929 | EOF | |
460845ab | 2930 | if { (eval echo configure:2931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c14cabba AC |
2931 | rm -rf conftest* |
2932 | ac_cv_type_signal=void | |
2933 | else | |
2934 | echo "configure: failed program was:" >&5 | |
2935 | cat conftest.$ac_ext >&5 | |
2936 | rm -rf conftest* | |
2937 | ac_cv_type_signal=int | |
2938 | fi | |
2939 | rm -f conftest* | |
2940 | fi | |
2941 | ||
2942 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
2943 | cat >> confdefs.h <<EOF | |
2944 | #define RETSIGTYPE $ac_cv_type_signal | |
2945 | EOF | |
2946 | ||
2947 | ||
2948 | ||
2b576293 | 2949 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
460845ab | 2950 | echo "configure:2951: checking for ANSI C header files" >&5 |
2b576293 C |
2951 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2952 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2953 | else | |
2954 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2955 | #line 2956 "configure" |
2b576293 C |
2956 | #include "confdefs.h" |
2957 | #include <stdlib.h> | |
2958 | #include <stdarg.h> | |
2959 | #include <string.h> | |
2960 | #include <float.h> | |
2961 | EOF | |
1a7b4b7c | 2962 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
460845ab | 2963 | { (eval echo configure:2964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 2964 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2b576293 C |
2965 | if test -z "$ac_err"; then |
2966 | rm -rf conftest* | |
2967 | ac_cv_header_stdc=yes | |
2968 | else | |
2969 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2970 | echo "configure: failed program was:" >&5 |
2971 | cat conftest.$ac_ext >&5 | |
2b576293 C |
2972 | rm -rf conftest* |
2973 | ac_cv_header_stdc=no | |
2974 | fi | |
2975 | rm -f conftest* | |
2976 | ||
2977 | if test $ac_cv_header_stdc = yes; then | |
2978 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2979 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2980 | #line 2981 "configure" |
2b576293 C |
2981 | #include "confdefs.h" |
2982 | #include <string.h> | |
2983 | EOF | |
2984 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2985 | egrep "memchr" >/dev/null 2>&1; then | |
2986 | : | |
2987 | else | |
2988 | rm -rf conftest* | |
2989 | ac_cv_header_stdc=no | |
2990 | fi | |
2991 | rm -f conftest* | |
2992 | ||
2993 | fi | |
2994 | ||
2995 | if test $ac_cv_header_stdc = yes; then | |
2996 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2997 | cat > conftest.$ac_ext <<EOF | |
460845ab | 2998 | #line 2999 "configure" |
2b576293 C |
2999 | #include "confdefs.h" |
3000 | #include <stdlib.h> | |
3001 | EOF | |
3002 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3003 | egrep "free" >/dev/null 2>&1; then | |
3004 | : | |
3005 | else | |
3006 | rm -rf conftest* | |
3007 | ac_cv_header_stdc=no | |
3008 | fi | |
3009 | rm -f conftest* | |
3010 | ||
3011 | fi | |
3012 | ||
3013 | if test $ac_cv_header_stdc = yes; then | |
3014 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3015 | if test "$cross_compiling" = yes; then | |
1a7b4b7c | 3016 | : |
2b576293 | 3017 | else |
bfde4a67 | 3018 | cat > conftest.$ac_ext <<EOF |
460845ab | 3019 | #line 3020 "configure" |
2b576293 C |
3020 | #include "confdefs.h" |
3021 | #include <ctype.h> | |
3022 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3023 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3024 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3025 | int main () { int i; for (i = 0; i < 256; i++) | |
3026 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3027 | exit (0); } | |
3028 | ||
3029 | EOF | |
460845ab | 3030 | if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 3031 | then |
2b576293 C |
3032 | : |
3033 | else | |
bfde4a67 SG |
3034 | echo "configure: failed program was:" >&5 |
3035 | cat conftest.$ac_ext >&5 | |
3036 | rm -fr conftest* | |
2b576293 C |
3037 | ac_cv_header_stdc=no |
3038 | fi | |
ef6c51d1 | 3039 | rm -fr conftest* |
bfde4a67 SG |
3040 | fi |
3041 | ||
2b576293 C |
3042 | fi |
3043 | fi | |
1a7b4b7c | 3044 | |
2b576293 C |
3045 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
3046 | if test $ac_cv_header_stdc = yes; then | |
3047 | cat >> confdefs.h <<\EOF | |
3048 | #define STDC_HEADERS 1 | |
3049 | EOF | |
3050 | ||
3051 | fi | |
3052 | ||
b0f33a03 | 3053 | for ac_hdr in ctype.h curses.h endian.h libintl.h link.h \ |
4ff3dfab | 3054 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
b0f33a03 | 3055 | string.h sys/procfs.h sys/ptrace.h sys/reg.h \ |
4ff3dfab | 3056 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
1dee2761 | 3057 | wchar.h wctype.h asm/debugreg.h |
1a494973 | 3058 | do |
bfde4a67 | 3059 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
1a494973 | 3060 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
460845ab | 3061 | echo "configure:3062: checking for $ac_hdr" >&5 |
1a494973 C |
3062 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3063 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3064 | else | |
3065 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3066 | #line 3067 "configure" |
1a494973 C |
3067 | #include "confdefs.h" |
3068 | #include <$ac_hdr> | |
3069 | EOF | |
1a7b4b7c | 3070 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
460845ab | 3071 | { (eval echo configure:3072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 3072 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1a494973 C |
3073 | if test -z "$ac_err"; then |
3074 | rm -rf conftest* | |
3075 | eval "ac_cv_header_$ac_safe=yes" | |
3076 | else | |
3077 | echo "$ac_err" >&5 | |
bfde4a67 SG |
3078 | echo "configure: failed program was:" >&5 |
3079 | cat conftest.$ac_ext >&5 | |
1a494973 C |
3080 | rm -rf conftest* |
3081 | eval "ac_cv_header_$ac_safe=no" | |
3082 | fi | |
3083 | rm -f conftest* | |
3084 | fi | |
3085 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3086 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 | 3087 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
1a494973 C |
3088 | cat >> confdefs.h <<EOF |
3089 | #define $ac_tr_hdr 1 | |
3090 | EOF | |
3091 | ||
3092 | else | |
3093 | echo "$ac_t""no" 1>&6 | |
3094 | fi | |
3095 | done | |
3096 | ||
eac4afd1 | 3097 | |
2b576293 | 3098 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
460845ab | 3099 | echo "configure:3100: checking whether stat file-mode macros are broken" >&5 |
2b576293 C |
3100 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3101 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3102 | else | |
3103 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3104 | #line 3105 "configure" |
2b576293 C |
3105 | #include "confdefs.h" |
3106 | #include <sys/types.h> | |
3107 | #include <sys/stat.h> | |
3108 | ||
3109 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3110 | # if S_ISBLK (S_IFDIR) | |
3111 | You lose. | |
3112 | # endif | |
3113 | #endif | |
3114 | ||
3115 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3116 | # if S_ISBLK (S_IFCHR) | |
3117 | You lose. | |
3118 | # endif | |
3119 | #endif | |
3120 | ||
3121 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3122 | # if S_ISLNK (S_IFREG) | |
3123 | You lose. | |
3124 | # endif | |
3125 | #endif | |
3126 | ||
3127 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3128 | # if S_ISSOCK (S_IFREG) | |
3129 | You lose. | |
3130 | # endif | |
3131 | #endif | |
3132 | ||
3133 | EOF | |
3134 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3135 | egrep "You lose" >/dev/null 2>&1; then | |
3136 | rm -rf conftest* | |
3137 | ac_cv_header_stat_broken=yes | |
3138 | else | |
3139 | rm -rf conftest* | |
3140 | ac_cv_header_stat_broken=no | |
3141 | fi | |
3142 | rm -f conftest* | |
3143 | ||
3144 | fi | |
1a7b4b7c | 3145 | |
2b576293 C |
3146 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 |
3147 | if test $ac_cv_header_stat_broken = yes; then | |
3148 | cat >> confdefs.h <<\EOF | |
3149 | #define STAT_MACROS_BROKEN 1 | |
3150 | EOF | |
3151 | ||
3152 | fi | |
3153 | ||
3154 | ||
8501c742 | 3155 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
460845ab | 3156 | echo "configure:3157: checking for working const" >&5 |
8501c742 SG |
3157 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3159 | else | |
3160 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3161 | #line 3162 "configure" |
8501c742 SG |
3162 | #include "confdefs.h" |
3163 | ||
bfde4a67 | 3164 | int main() { |
8501c742 SG |
3165 | |
3166 | /* Ultrix mips cc rejects this. */ | |
3167 | typedef int charset[2]; const charset x; | |
3168 | /* SunOS 4.1.1 cc rejects this. */ | |
3169 | char const *const *ccp; | |
3170 | char **p; | |
3171 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3172 | struct point {int x, y;}; | |
3173 | static struct point const zero = {0,0}; | |
3174 | /* AIX XL C 1.02.0.0 rejects this. | |
3175 | It does not let you subtract one const X* pointer from another in an arm | |
3176 | of an if-expression whose if-part is not a constant expression */ | |
3177 | const char *g = "string"; | |
3178 | ccp = &g + (g ? g-g : 0); | |
3179 | /* HPUX 7.0 cc rejects these. */ | |
3180 | ++ccp; | |
3181 | p = (char**) ccp; | |
3182 | ccp = (char const *const *) p; | |
3183 | { /* SCO 3.2v4 cc rejects this. */ | |
3184 | char *t; | |
3185 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3186 | ||
3187 | *t++ = 0; | |
3188 | } | |
3189 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3190 | int x[] = {25, 17}; | |
3191 | const int *foo = &x[0]; | |
3192 | ++foo; | |
3193 | } | |
3194 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3195 | typedef const int *iptr; | |
3196 | iptr p = 0; | |
3197 | ++p; | |
3198 | } | |
3199 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3200 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3201 | struct s { int j; const int *ap[3]; }; | |
3202 | struct s *b; b->j = 5; | |
3203 | } | |
3204 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3205 | const int foo = 10; | |
3206 | } | |
3207 | ||
3208 | ; return 0; } | |
3209 | EOF | |
460845ab | 3210 | if { (eval echo configure:3211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
8501c742 SG |
3211 | rm -rf conftest* |
3212 | ac_cv_c_const=yes | |
3213 | else | |
bfde4a67 SG |
3214 | echo "configure: failed program was:" >&5 |
3215 | cat conftest.$ac_ext >&5 | |
8501c742 SG |
3216 | rm -rf conftest* |
3217 | ac_cv_c_const=no | |
3218 | fi | |
3219 | rm -f conftest* | |
8501c742 SG |
3220 | fi |
3221 | ||
3222 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3223 | if test $ac_cv_c_const = no; then | |
3224 | cat >> confdefs.h <<\EOF | |
3225 | #define const | |
3226 | EOF | |
3227 | ||
3228 | fi | |
3229 | ||
3230 | ||
b0f33a03 | 3231 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc |
72ae15f6 FF |
3232 | do |
3233 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 3234 | echo "configure:3235: checking for $ac_func" >&5 |
72ae15f6 FF |
3235 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3236 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3237 | else | |
3238 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3239 | #line 3240 "configure" |
72ae15f6 FF |
3240 | #include "confdefs.h" |
3241 | /* System header to define __stub macros and hopefully few prototypes, | |
3242 | which can conflict with char $ac_func(); below. */ | |
3243 | #include <assert.h> | |
3244 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
3245 | /* We use char because int might match the return type of a gcc2 |
3246 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c | 3247 | char $ac_func(); |
72ae15f6 | 3248 | |
bfde4a67 | 3249 | int main() { |
72ae15f6 FF |
3250 | |
3251 | /* The GNU C library defines this for functions which it implements | |
3252 | to always fail with ENOSYS. Some functions are actually named | |
3253 | something starting with __ and the normal name is an alias. */ | |
3254 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3255 | choke me | |
3256 | #else | |
3257 | $ac_func(); | |
3258 | #endif | |
3259 | ||
3260 | ; return 0; } | |
3261 | EOF | |
460845ab | 3262 | if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
72ae15f6 FF |
3263 | rm -rf conftest* |
3264 | eval "ac_cv_func_$ac_func=yes" | |
3265 | else | |
bfde4a67 SG |
3266 | echo "configure: failed program was:" >&5 |
3267 | cat conftest.$ac_ext >&5 | |
72ae15f6 FF |
3268 | rm -rf conftest* |
3269 | eval "ac_cv_func_$ac_func=no" | |
3270 | fi | |
3271 | rm -f conftest* | |
ef6c51d1 | 3272 | fi |
bfde4a67 | 3273 | |
72ae15f6 FF |
3274 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3275 | echo "$ac_t""yes" 1>&6 | |
1a7b4b7c | 3276 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
72ae15f6 FF |
3277 | cat >> confdefs.h <<EOF |
3278 | #define $ac_tr_func 1 | |
3279 | EOF | |
3280 | ||
3281 | else | |
3282 | echo "$ac_t""no" 1>&6 | |
3283 | fi | |
3284 | done | |
3285 | ||
0aa3233e ILT |
3286 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
3287 | # for constant arguments. Useless! | |
3288 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
460845ab | 3289 | echo "configure:3290: checking for working alloca.h" >&5 |
0aa3233e ILT |
3290 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3291 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3292 | else | |
3293 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3294 | #line 3295 "configure" |
0aa3233e ILT |
3295 | #include "confdefs.h" |
3296 | #include <alloca.h> | |
3297 | int main() { | |
3298 | char *p = alloca(2 * sizeof(int)); | |
3299 | ; return 0; } | |
3300 | EOF | |
460845ab | 3301 | if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3302 | rm -rf conftest* |
3303 | ac_cv_header_alloca_h=yes | |
3304 | else | |
3305 | echo "configure: failed program was:" >&5 | |
3306 | cat conftest.$ac_ext >&5 | |
3307 | rm -rf conftest* | |
3308 | ac_cv_header_alloca_h=no | |
3309 | fi | |
3310 | rm -f conftest* | |
3311 | fi | |
3312 | ||
3313 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3314 | if test $ac_cv_header_alloca_h = yes; then | |
3315 | cat >> confdefs.h <<\EOF | |
3316 | #define HAVE_ALLOCA_H 1 | |
3317 | EOF | |
3318 | ||
3319 | fi | |
3320 | ||
3321 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
460845ab | 3322 | echo "configure:3323: checking for alloca" >&5 |
0aa3233e ILT |
3323 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3324 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3325 | else | |
3326 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3327 | #line 3328 "configure" |
0aa3233e ILT |
3328 | #include "confdefs.h" |
3329 | ||
3330 | #ifdef __GNUC__ | |
3331 | # define alloca __builtin_alloca | |
3332 | #else | |
4b23e55c JM |
3333 | # ifdef _MSC_VER |
3334 | # include <malloc.h> | |
3335 | # define alloca _alloca | |
0aa3233e | 3336 | # else |
4b23e55c JM |
3337 | # if HAVE_ALLOCA_H |
3338 | # include <alloca.h> | |
ba68ad57 | 3339 | # else |
4b23e55c JM |
3340 | # ifdef _AIX |
3341 | #pragma alloca | |
3342 | # else | |
3343 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
0aa3233e | 3344 | char *alloca (); |
4b23e55c | 3345 | # endif |
0aa3233e ILT |
3346 | # endif |
3347 | # endif | |
3348 | # endif | |
3349 | #endif | |
3350 | ||
3351 | int main() { | |
3352 | char *p = (char *) alloca(1); | |
3353 | ; return 0; } | |
3354 | EOF | |
460845ab | 3355 | if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3356 | rm -rf conftest* |
3357 | ac_cv_func_alloca_works=yes | |
3358 | else | |
3359 | echo "configure: failed program was:" >&5 | |
3360 | cat conftest.$ac_ext >&5 | |
3361 | rm -rf conftest* | |
3362 | ac_cv_func_alloca_works=no | |
3363 | fi | |
3364 | rm -f conftest* | |
3365 | fi | |
3366 | ||
3367 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3368 | if test $ac_cv_func_alloca_works = yes; then | |
3369 | cat >> confdefs.h <<\EOF | |
3370 | #define HAVE_ALLOCA 1 | |
3371 | EOF | |
3372 | ||
3373 | fi | |
3374 | ||
3375 | if test $ac_cv_func_alloca_works = no; then | |
3376 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3377 | # that cause trouble. Some versions do not even contain alloca or | |
3378 | # contain a buggy version. If you still want to use their alloca, | |
3379 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4b23e55c | 3380 | ALLOCA=alloca.${ac_objext} |
0aa3233e ILT |
3381 | cat >> confdefs.h <<\EOF |
3382 | #define C_ALLOCA 1 | |
3383 | EOF | |
3384 | ||
3385 | ||
3386 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
460845ab | 3387 | echo "configure:3388: checking whether alloca needs Cray hooks" >&5 |
0aa3233e ILT |
3388 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3389 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3390 | else | |
3391 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3392 | #line 3393 "configure" |
0aa3233e ILT |
3393 | #include "confdefs.h" |
3394 | #if defined(CRAY) && ! defined(CRAY2) | |
3395 | webecray | |
3396 | #else | |
3397 | wenotbecray | |
3398 | #endif | |
3399 | ||
3400 | EOF | |
3401 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3402 | egrep "webecray" >/dev/null 2>&1; then | |
3403 | rm -rf conftest* | |
3404 | ac_cv_os_cray=yes | |
3405 | else | |
3406 | rm -rf conftest* | |
3407 | ac_cv_os_cray=no | |
3408 | fi | |
3409 | rm -f conftest* | |
3410 | ||
3411 | fi | |
3412 | ||
3413 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3414 | if test $ac_cv_os_cray = yes; then | |
3415 | for ac_func in _getb67 GETB67 getb67; do | |
3416 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 3417 | echo "configure:3418: checking for $ac_func" >&5 |
0aa3233e ILT |
3418 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3419 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3420 | else | |
3421 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3422 | #line 3423 "configure" |
0aa3233e ILT |
3423 | #include "confdefs.h" |
3424 | /* System header to define __stub macros and hopefully few prototypes, | |
3425 | which can conflict with char $ac_func(); below. */ | |
3426 | #include <assert.h> | |
3427 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3428 | /* We use char because int might match the return type of a gcc2 | |
3429 | builtin and then its argument prototype would still apply. */ | |
3430 | char $ac_func(); | |
3431 | ||
3432 | int main() { | |
3433 | ||
3434 | /* The GNU C library defines this for functions which it implements | |
3435 | to always fail with ENOSYS. Some functions are actually named | |
3436 | something starting with __ and the normal name is an alias. */ | |
3437 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3438 | choke me | |
3439 | #else | |
3440 | $ac_func(); | |
3441 | #endif | |
3442 | ||
3443 | ; return 0; } | |
3444 | EOF | |
460845ab | 3445 | if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3446 | rm -rf conftest* |
3447 | eval "ac_cv_func_$ac_func=yes" | |
3448 | else | |
3449 | echo "configure: failed program was:" >&5 | |
3450 | cat conftest.$ac_ext >&5 | |
3451 | rm -rf conftest* | |
3452 | eval "ac_cv_func_$ac_func=no" | |
3453 | fi | |
3454 | rm -f conftest* | |
3455 | fi | |
3456 | ||
3457 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3458 | echo "$ac_t""yes" 1>&6 | |
3459 | cat >> confdefs.h <<EOF | |
3460 | #define CRAY_STACKSEG_END $ac_func | |
3461 | EOF | |
3462 | ||
3463 | break | |
3464 | else | |
3465 | echo "$ac_t""no" 1>&6 | |
3466 | fi | |
3467 | ||
3468 | done | |
3469 | fi | |
3470 | ||
3471 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
460845ab | 3472 | echo "configure:3473: checking stack direction for C alloca" >&5 |
0aa3233e ILT |
3473 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3475 | else | |
3476 | if test "$cross_compiling" = yes; then | |
3477 | ac_cv_c_stack_direction=0 | |
3478 | else | |
3479 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3480 | #line 3481 "configure" |
0aa3233e ILT |
3481 | #include "confdefs.h" |
3482 | find_stack_direction () | |
3483 | { | |
3484 | static char *addr = 0; | |
3485 | auto char dummy; | |
3486 | if (addr == 0) | |
3487 | { | |
3488 | addr = &dummy; | |
3489 | return find_stack_direction (); | |
3490 | } | |
3491 | else | |
3492 | return (&dummy > addr) ? 1 : -1; | |
3493 | } | |
3494 | main () | |
3495 | { | |
3496 | exit (find_stack_direction() < 0); | |
3497 | } | |
3498 | EOF | |
460845ab | 3499 | if { (eval echo configure:3500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0aa3233e ILT |
3500 | then |
3501 | ac_cv_c_stack_direction=1 | |
3502 | else | |
3503 | echo "configure: failed program was:" >&5 | |
3504 | cat conftest.$ac_ext >&5 | |
3505 | rm -fr conftest* | |
3506 | ac_cv_c_stack_direction=-1 | |
3507 | fi | |
3508 | rm -fr conftest* | |
3509 | fi | |
3510 | ||
3511 | fi | |
3512 | ||
3513 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3514 | cat >> confdefs.h <<EOF | |
3515 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3516 | EOF | |
3517 | ||
3518 | fi | |
3519 | ||
72ae15f6 | 3520 | |
87feff9d | 3521 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
460845ab | 3522 | echo "configure:3523: checking whether malloc must be declared" >&5 |
87feff9d JM |
3523 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3524 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3525 | else | |
3526 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3527 | #line 3528 "configure" |
87feff9d JM |
3528 | #include "confdefs.h" |
3529 | ||
3530 | #include <stdio.h> | |
3531 | #ifdef HAVE_STRING_H | |
3532 | #include <string.h> | |
3533 | #else | |
3534 | #ifdef HAVE_STRINGS_H | |
3535 | #include <strings.h> | |
3536 | #endif | |
3537 | #endif | |
3538 | #ifdef HAVE_STDLIB_H | |
3539 | #include <stdlib.h> | |
3540 | #endif | |
3541 | #ifdef HAVE_UNISTD_H | |
3542 | #include <unistd.h> | |
3543 | #endif | |
3544 | int main() { | |
3545 | char *(*pfn) = (char *(*)) malloc | |
3546 | ; return 0; } | |
3547 | EOF | |
460845ab | 3548 | if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
3549 | rm -rf conftest* |
3550 | bfd_cv_decl_needed_malloc=no | |
3551 | else | |
3552 | echo "configure: failed program was:" >&5 | |
3553 | cat conftest.$ac_ext >&5 | |
3554 | rm -rf conftest* | |
3555 | bfd_cv_decl_needed_malloc=yes | |
3556 | fi | |
3557 | rm -f conftest* | |
3558 | fi | |
3559 | ||
3560 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
3561 | if test $bfd_cv_decl_needed_malloc = yes; then | |
3562 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3563 | cat >> confdefs.h <<EOF | |
3564 | #define $bfd_tr_decl 1 | |
3565 | EOF | |
3566 | ||
3567 | fi | |
3568 | ||
3569 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
460845ab | 3570 | echo "configure:3571: checking whether realloc must be declared" >&5 |
87feff9d JM |
3571 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3572 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3573 | else | |
3574 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3575 | #line 3576 "configure" |
87feff9d JM |
3576 | #include "confdefs.h" |
3577 | ||
3578 | #include <stdio.h> | |
3579 | #ifdef HAVE_STRING_H | |
3580 | #include <string.h> | |
3581 | #else | |
3582 | #ifdef HAVE_STRINGS_H | |
3583 | #include <strings.h> | |
3584 | #endif | |
3585 | #endif | |
3586 | #ifdef HAVE_STDLIB_H | |
3587 | #include <stdlib.h> | |
3588 | #endif | |
3589 | #ifdef HAVE_UNISTD_H | |
3590 | #include <unistd.h> | |
3591 | #endif | |
3592 | int main() { | |
3593 | char *(*pfn) = (char *(*)) realloc | |
3594 | ; return 0; } | |
3595 | EOF | |
460845ab | 3596 | if { (eval echo configure:3597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
3597 | rm -rf conftest* |
3598 | bfd_cv_decl_needed_realloc=no | |
3599 | else | |
3600 | echo "configure: failed program was:" >&5 | |
3601 | cat conftest.$ac_ext >&5 | |
3602 | rm -rf conftest* | |
3603 | bfd_cv_decl_needed_realloc=yes | |
3604 | fi | |
3605 | rm -f conftest* | |
3606 | fi | |
3607 | ||
3608 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
3609 | if test $bfd_cv_decl_needed_realloc = yes; then | |
3610 | bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3611 | cat >> confdefs.h <<EOF | |
3612 | #define $bfd_tr_decl 1 | |
3613 | EOF | |
3614 | ||
3615 | fi | |
3616 | ||
3617 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
460845ab | 3618 | echo "configure:3619: checking whether free must be declared" >&5 |
87feff9d JM |
3619 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
3620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3621 | else | |
3622 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3623 | #line 3624 "configure" |
87feff9d JM |
3624 | #include "confdefs.h" |
3625 | ||
3626 | #include <stdio.h> | |
3627 | #ifdef HAVE_STRING_H | |
3628 | #include <string.h> | |
3629 | #else | |
3630 | #ifdef HAVE_STRINGS_H | |
3631 | #include <strings.h> | |
3632 | #endif | |
3633 | #endif | |
3634 | #ifdef HAVE_STDLIB_H | |
3635 | #include <stdlib.h> | |
3636 | #endif | |
3637 | #ifdef HAVE_UNISTD_H | |
3638 | #include <unistd.h> | |
3639 | #endif | |
3640 | int main() { | |
3641 | char *(*pfn) = (char *(*)) free | |
3642 | ; return 0; } | |
3643 | EOF | |
460845ab | 3644 | if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
3645 | rm -rf conftest* |
3646 | bfd_cv_decl_needed_free=no | |
3647 | else | |
3648 | echo "configure: failed program was:" >&5 | |
3649 | cat conftest.$ac_ext >&5 | |
3650 | rm -rf conftest* | |
3651 | bfd_cv_decl_needed_free=yes | |
3652 | fi | |
3653 | rm -f conftest* | |
3654 | fi | |
3655 | ||
3656 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
3657 | if test $bfd_cv_decl_needed_free = yes; then | |
3658 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3659 | cat >> confdefs.h <<EOF | |
3660 | #define $bfd_tr_decl 1 | |
3661 | EOF | |
3662 | ||
3663 | fi | |
3664 | ||
3665 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
460845ab | 3666 | echo "configure:3667: checking whether strerror must be declared" >&5 |
87feff9d JM |
3667 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
3668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3669 | else | |
3670 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3671 | #line 3672 "configure" |
87feff9d JM |
3672 | #include "confdefs.h" |
3673 | ||
3674 | #include <stdio.h> | |
3675 | #ifdef HAVE_STRING_H | |
3676 | #include <string.h> | |
3677 | #else | |
3678 | #ifdef HAVE_STRINGS_H | |
3679 | #include <strings.h> | |
3680 | #endif | |
3681 | #endif | |
3682 | #ifdef HAVE_STDLIB_H | |
3683 | #include <stdlib.h> | |
3684 | #endif | |
3685 | #ifdef HAVE_UNISTD_H | |
3686 | #include <unistd.h> | |
3687 | #endif | |
3688 | int main() { | |
3689 | char *(*pfn) = (char *(*)) strerror | |
3690 | ; return 0; } | |
3691 | EOF | |
460845ab | 3692 | if { (eval echo configure:3693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
3693 | rm -rf conftest* |
3694 | bfd_cv_decl_needed_strerror=no | |
3695 | else | |
3696 | echo "configure: failed program was:" >&5 | |
3697 | cat conftest.$ac_ext >&5 | |
3698 | rm -rf conftest* | |
3699 | bfd_cv_decl_needed_strerror=yes | |
3700 | fi | |
3701 | rm -f conftest* | |
3702 | fi | |
3703 | ||
3704 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
3705 | if test $bfd_cv_decl_needed_strerror = yes; then | |
3706 | bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3707 | cat >> confdefs.h <<EOF | |
3708 | #define $bfd_tr_decl 1 | |
3709 | EOF | |
3710 | ||
3711 | fi | |
3712 | ||
3713 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
460845ab | 3714 | echo "configure:3715: checking whether strdup must be declared" >&5 |
87feff9d JM |
3715 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3716 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3717 | else | |
3718 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3719 | #line 3720 "configure" |
87feff9d JM |
3720 | #include "confdefs.h" |
3721 | ||
3722 | #include <stdio.h> | |
3723 | #ifdef HAVE_STRING_H | |
3724 | #include <string.h> | |
3725 | #else | |
3726 | #ifdef HAVE_STRINGS_H | |
3727 | #include <strings.h> | |
3728 | #endif | |
3729 | #endif | |
3730 | #ifdef HAVE_STDLIB_H | |
3731 | #include <stdlib.h> | |
3732 | #endif | |
3733 | #ifdef HAVE_UNISTD_H | |
3734 | #include <unistd.h> | |
3735 | #endif | |
3736 | int main() { | |
3737 | char *(*pfn) = (char *(*)) strdup | |
3738 | ; return 0; } | |
3739 | EOF | |
460845ab | 3740 | if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
3741 | rm -rf conftest* |
3742 | bfd_cv_decl_needed_strdup=no | |
3743 | else | |
3744 | echo "configure: failed program was:" >&5 | |
3745 | cat conftest.$ac_ext >&5 | |
3746 | rm -rf conftest* | |
3747 | bfd_cv_decl_needed_strdup=yes | |
3748 | fi | |
3749 | rm -f conftest* | |
3750 | fi | |
3751 | ||
3752 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
3753 | if test $bfd_cv_decl_needed_strdup = yes; then | |
3754 | bfd_tr_decl=NEED_DECLARATION_`echo strdup | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3755 | cat >> confdefs.h <<EOF | |
3756 | #define $bfd_tr_decl 1 | |
3757 | EOF | |
3758 | ||
3759 | fi | |
3760 | ||
3761 | ||
75a55dc3 | 3762 | # If we are configured native on GNU/Linux, work around problems with sys/procfs.h |
0d4c1152 FF |
3763 | if test "${target}" = "${host}"; then |
3764 | case "${host}" in | |
0728afad | 3765 | i[3456]86-*-linux*) |
0d4c1152 | 3766 | cat >> confdefs.h <<\EOF |
0728afad | 3767 | #define START_INFERIOR_TRAPS_EXPECTED 2 |
0d4c1152 FF |
3768 | EOF |
3769 | ||
3770 | cat >> confdefs.h <<\EOF | |
3771 | #define sys_quotactl 1 | |
3772 | EOF | |
3773 | ||
3774 | ;; | |
3775 | esac | |
3776 | fi | |
3777 | ||
4708ac65 | 3778 | echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 |
460845ab | 3779 | echo "configure:3780: checking for gregset_t type" >&5 |
07b77f5c | 3780 | if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then |
4708ac65 FF |
3781 | echo $ac_n "(cached) $ac_c" 1>&6 |
3782 | else | |
3783 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3784 | #line 3785 "configure" |
4708ac65 FF |
3785 | #include "confdefs.h" |
3786 | #include <sys/procfs.h> | |
bfde4a67 | 3787 | int main() { |
4708ac65 FF |
3788 | gregset_t *gregsetp = 0 |
3789 | ; return 0; } | |
3790 | EOF | |
460845ab | 3791 | if { (eval echo configure:3792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4708ac65 | 3792 | rm -rf conftest* |
07b77f5c | 3793 | gdb_cv_have_gregset_t=yes |
4708ac65 | 3794 | else |
bfde4a67 SG |
3795 | echo "configure: failed program was:" >&5 |
3796 | cat conftest.$ac_ext >&5 | |
4708ac65 | 3797 | rm -rf conftest* |
07b77f5c | 3798 | gdb_cv_have_gregset_t=no |
4708ac65 FF |
3799 | fi |
3800 | rm -f conftest* | |
4708ac65 FF |
3801 | fi |
3802 | ||
07b77f5c FF |
3803 | echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6 |
3804 | if test $gdb_cv_have_gregset_t = yes; then | |
4708ac65 FF |
3805 | cat >> confdefs.h <<\EOF |
3806 | #define HAVE_GREGSET_T 1 | |
3807 | EOF | |
3808 | ||
3809 | fi | |
3810 | ||
3811 | echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6 | |
460845ab | 3812 | echo "configure:3813: checking for fpregset_t type" >&5 |
07b77f5c | 3813 | if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then |
4708ac65 FF |
3814 | echo $ac_n "(cached) $ac_c" 1>&6 |
3815 | else | |
3816 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3817 | #line 3818 "configure" |
4708ac65 FF |
3818 | #include "confdefs.h" |
3819 | #include <sys/procfs.h> | |
bfde4a67 | 3820 | int main() { |
4708ac65 FF |
3821 | fpregset_t *fpregsetp = 0 |
3822 | ; return 0; } | |
3823 | EOF | |
460845ab | 3824 | if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4708ac65 | 3825 | rm -rf conftest* |
07b77f5c | 3826 | gdb_cv_have_fpregset_t=yes |
4708ac65 | 3827 | else |
bfde4a67 SG |
3828 | echo "configure: failed program was:" >&5 |
3829 | cat conftest.$ac_ext >&5 | |
4708ac65 | 3830 | rm -rf conftest* |
07b77f5c | 3831 | gdb_cv_have_fpregset_t=no |
4708ac65 FF |
3832 | fi |
3833 | rm -f conftest* | |
4708ac65 FF |
3834 | fi |
3835 | ||
07b77f5c FF |
3836 | echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6 |
3837 | if test $gdb_cv_have_fpregset_t = yes; then | |
4708ac65 FF |
3838 | cat >> confdefs.h <<\EOF |
3839 | #define HAVE_FPREGSET_T 1 | |
3840 | EOF | |
3841 | ||
3842 | fi | |
3843 | ||
bfde4a67 | 3844 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
460845ab | 3845 | echo "configure:3846: checking for main in -lm" >&5 |
bfde4a67 | 3846 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
ef6c51d1 SG |
3847 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
3848 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3849 | else | |
3850 | ac_save_LIBS="$LIBS" | |
3851 | LIBS="-lm $LIBS" | |
3852 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3853 | #line 3854 "configure" |
ef6c51d1 SG |
3854 | #include "confdefs.h" |
3855 | ||
bfde4a67 | 3856 | int main() { |
ef6c51d1 SG |
3857 | main() |
3858 | ; return 0; } | |
3859 | EOF | |
460845ab | 3860 | if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ef6c51d1 SG |
3861 | rm -rf conftest* |
3862 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3863 | else | |
bfde4a67 SG |
3864 | echo "configure: failed program was:" >&5 |
3865 | cat conftest.$ac_ext >&5 | |
ef6c51d1 SG |
3866 | rm -rf conftest* |
3867 | eval "ac_cv_lib_$ac_lib_var=no" | |
3868 | fi | |
3869 | rm -f conftest* | |
3870 | LIBS="$ac_save_LIBS" | |
3871 | ||
3872 | fi | |
3873 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3874 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
3875 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
3876 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
ef6c51d1 SG |
3877 | cat >> confdefs.h <<EOF |
3878 | #define $ac_tr_lib 1 | |
3879 | EOF | |
3880 | ||
3881 | LIBS="-lm $LIBS" | |
3882 | ||
3883 | else | |
3884 | echo "$ac_t""no" 1>&6 | |
3885 | fi | |
3886 | ||
3887 | ||
879c0417 | 3888 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 |
460845ab | 3889 | echo "configure:3890: checking for wctype in -lc" >&5 |
879c0417 JM |
3890 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
3891 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3892 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3893 | else | |
3894 | ac_save_LIBS="$LIBS" | |
3895 | LIBS="-lc $LIBS" | |
3896 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3897 | #line 3898 "configure" |
879c0417 JM |
3898 | #include "confdefs.h" |
3899 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3900 | /* We use char because int might match the return type of a gcc2 | |
3901 | builtin and then its argument prototype would still apply. */ | |
3902 | char wctype(); | |
3903 | ||
3904 | int main() { | |
3905 | wctype() | |
3906 | ; return 0; } | |
3907 | EOF | |
460845ab | 3908 | if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
879c0417 JM |
3909 | rm -rf conftest* |
3910 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3911 | else | |
3912 | echo "configure: failed program was:" >&5 | |
3913 | cat conftest.$ac_ext >&5 | |
3914 | rm -rf conftest* | |
3915 | eval "ac_cv_lib_$ac_lib_var=no" | |
3916 | fi | |
3917 | rm -f conftest* | |
3918 | LIBS="$ac_save_LIBS" | |
3919 | ||
3920 | fi | |
3921 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3922 | echo "$ac_t""yes" 1>&6 | |
3923 | : | |
3924 | else | |
3925 | echo "$ac_t""no" 1>&6 | |
3926 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
460845ab | 3927 | echo "configure:3928: checking for wctype in -lw" >&5 |
879c0417 JM |
3928 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3929 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3931 | else | |
3932 | ac_save_LIBS="$LIBS" | |
3933 | LIBS="-lw $LIBS" | |
3934 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3935 | #line 3936 "configure" |
879c0417 JM |
3936 | #include "confdefs.h" |
3937 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3938 | /* We use char because int might match the return type of a gcc2 | |
3939 | builtin and then its argument prototype would still apply. */ | |
3940 | char wctype(); | |
3941 | ||
3942 | int main() { | |
3943 | wctype() | |
3944 | ; return 0; } | |
3945 | EOF | |
460845ab | 3946 | if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
879c0417 JM |
3947 | rm -rf conftest* |
3948 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3949 | else | |
3950 | echo "configure: failed program was:" >&5 | |
3951 | cat conftest.$ac_ext >&5 | |
3952 | rm -rf conftest* | |
3953 | eval "ac_cv_lib_$ac_lib_var=no" | |
3954 | fi | |
3955 | rm -f conftest* | |
3956 | LIBS="$ac_save_LIBS" | |
3957 | ||
3958 | fi | |
3959 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3960 | echo "$ac_t""yes" 1>&6 | |
3961 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
3962 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3963 | cat >> confdefs.h <<EOF | |
3964 | #define $ac_tr_lib 1 | |
3965 | EOF | |
3966 | ||
3967 | LIBS="-lw $LIBS" | |
3968 | ||
3969 | else | |
3970 | echo "$ac_t""no" 1>&6 | |
3971 | fi | |
3972 | ||
3973 | fi | |
3974 | ||
3975 | ||
adcb1e06 JM |
3976 | TERM_LIB= |
3977 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
460845ab | 3978 | echo "configure:3979: checking for tgetent in -lncurses" >&5 |
adcb1e06 JM |
3979 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
3980 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3981 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3982 | else | |
3983 | ac_save_LIBS="$LIBS" | |
3984 | LIBS="-lncurses $LIBS" | |
3985 | cat > conftest.$ac_ext <<EOF | |
460845ab | 3986 | #line 3987 "configure" |
adcb1e06 JM |
3987 | #include "confdefs.h" |
3988 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3989 | /* We use char because int might match the return type of a gcc2 | |
3990 | builtin and then its argument prototype would still apply. */ | |
3991 | char tgetent(); | |
3992 | ||
3993 | int main() { | |
3994 | tgetent() | |
3995 | ; return 0; } | |
3996 | EOF | |
460845ab | 3997 | if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
adcb1e06 JM |
3998 | rm -rf conftest* |
3999 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4000 | else | |
4001 | echo "configure: failed program was:" >&5 | |
4002 | cat conftest.$ac_ext >&5 | |
4003 | rm -rf conftest* | |
4004 | eval "ac_cv_lib_$ac_lib_var=no" | |
4005 | fi | |
4006 | rm -f conftest* | |
4007 | LIBS="$ac_save_LIBS" | |
4008 | ||
4009 | fi | |
4010 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4011 | echo "$ac_t""yes" 1>&6 | |
4012 | TERM_LIB=-lncurses | |
4013 | else | |
4014 | echo "$ac_t""no" 1>&6 | |
4015 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
460845ab | 4016 | echo "configure:4017: checking for tgetent in -ltermlib" >&5 |
adcb1e06 JM |
4017 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
4018 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4019 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4020 | else | |
4021 | ac_save_LIBS="$LIBS" | |
4022 | LIBS="-ltermlib $LIBS" | |
4023 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4024 | #line 4025 "configure" |
adcb1e06 JM |
4025 | #include "confdefs.h" |
4026 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4027 | /* We use char because int might match the return type of a gcc2 | |
4028 | builtin and then its argument prototype would still apply. */ | |
4029 | char tgetent(); | |
4030 | ||
4031 | int main() { | |
4032 | tgetent() | |
4033 | ; return 0; } | |
4034 | EOF | |
460845ab | 4035 | if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
adcb1e06 JM |
4036 | rm -rf conftest* |
4037 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4038 | else | |
4039 | echo "configure: failed program was:" >&5 | |
4040 | cat conftest.$ac_ext >&5 | |
4041 | rm -rf conftest* | |
4042 | eval "ac_cv_lib_$ac_lib_var=no" | |
4043 | fi | |
4044 | rm -f conftest* | |
4045 | LIBS="$ac_save_LIBS" | |
4046 | ||
4047 | fi | |
4048 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4049 | echo "$ac_t""yes" 1>&6 | |
4050 | TERM_LIB=-ltermlib | |
4051 | else | |
4052 | echo "$ac_t""no" 1>&6 | |
4053 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
460845ab | 4054 | echo "configure:4055: checking for tgetent in -ltermcap" >&5 |
adcb1e06 JM |
4055 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
4056 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4057 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4058 | else | |
4059 | ac_save_LIBS="$LIBS" | |
4060 | LIBS="-ltermcap $LIBS" | |
4061 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4062 | #line 4063 "configure" |
adcb1e06 JM |
4063 | #include "confdefs.h" |
4064 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4065 | /* We use char because int might match the return type of a gcc2 | |
4066 | builtin and then its argument prototype would still apply. */ | |
4067 | char tgetent(); | |
4068 | ||
4069 | int main() { | |
4070 | tgetent() | |
4071 | ; return 0; } | |
4072 | EOF | |
460845ab | 4073 | if { (eval echo configure:4074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
adcb1e06 JM |
4074 | rm -rf conftest* |
4075 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4076 | else | |
4077 | echo "configure: failed program was:" >&5 | |
4078 | cat conftest.$ac_ext >&5 | |
4079 | rm -rf conftest* | |
4080 | eval "ac_cv_lib_$ac_lib_var=no" | |
4081 | fi | |
4082 | rm -f conftest* | |
4083 | LIBS="$ac_save_LIBS" | |
4084 | ||
4085 | fi | |
4086 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4087 | echo "$ac_t""yes" 1>&6 | |
4088 | TERM_LIB=-ltermcap | |
4089 | else | |
4090 | echo "$ac_t""no" 1>&6 | |
4091 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
460845ab | 4092 | echo "configure:4093: checking for tgetent in -lcurses" >&5 |
adcb1e06 JM |
4093 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
4094 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4095 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4096 | else | |
4097 | ac_save_LIBS="$LIBS" | |
4098 | LIBS="-lcurses $LIBS" | |
4099 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4100 | #line 4101 "configure" |
adcb1e06 JM |
4101 | #include "confdefs.h" |
4102 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4103 | /* We use char because int might match the return type of a gcc2 | |
4104 | builtin and then its argument prototype would still apply. */ | |
4105 | char tgetent(); | |
4106 | ||
4107 | int main() { | |
4108 | tgetent() | |
4109 | ; return 0; } | |
4110 | EOF | |
460845ab | 4111 | if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
adcb1e06 JM |
4112 | rm -rf conftest* |
4113 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4114 | else | |
4115 | echo "configure: failed program was:" >&5 | |
4116 | cat conftest.$ac_ext >&5 | |
4117 | rm -rf conftest* | |
4118 | eval "ac_cv_lib_$ac_lib_var=no" | |
4119 | fi | |
4120 | rm -f conftest* | |
4121 | LIBS="$ac_save_LIBS" | |
4122 | ||
4123 | fi | |
4124 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4125 | echo "$ac_t""yes" 1>&6 | |
4126 | TERM_LIB=-lcurses | |
4127 | else | |
4128 | echo "$ac_t""no" 1>&6 | |
4129 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
460845ab | 4130 | echo "configure:4131: checking for tgetent in -lterminfo" >&5 |
adcb1e06 JM |
4131 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
4132 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4134 | else | |
4135 | ac_save_LIBS="$LIBS" | |
4136 | LIBS="-lterminfo $LIBS" | |
4137 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4138 | #line 4139 "configure" |
adcb1e06 JM |
4139 | #include "confdefs.h" |
4140 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4141 | /* We use char because int might match the return type of a gcc2 | |
4142 | builtin and then its argument prototype would still apply. */ | |
4143 | char tgetent(); | |
4144 | ||
4145 | int main() { | |
4146 | tgetent() | |
4147 | ; return 0; } | |
4148 | EOF | |
460845ab | 4149 | if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
adcb1e06 JM |
4150 | rm -rf conftest* |
4151 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4152 | else | |
4153 | echo "configure: failed program was:" >&5 | |
4154 | cat conftest.$ac_ext >&5 | |
4155 | rm -rf conftest* | |
4156 | eval "ac_cv_lib_$ac_lib_var=no" | |
4157 | fi | |
4158 | rm -f conftest* | |
4159 | LIBS="$ac_save_LIBS" | |
4160 | ||
4161 | fi | |
4162 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4163 | echo "$ac_t""yes" 1>&6 | |
4164 | TERM_LIB=-lterminfo | |
4165 | else | |
4166 | echo "$ac_t""no" 1>&6 | |
4167 | fi | |
4168 | ||
4169 | fi | |
4170 | ||
4171 | fi | |
4172 | ||
4173 | fi | |
4174 | ||
4175 | fi | |
4176 | ||
4177 | ||
4178 | if test "x$TERM_LIB" = x | |
4179 | then | |
4180 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
4181 | fi | |
4182 | ||
4183 | ||
4184 | ||
aa220473 | 4185 | |
3f550b59 | 4186 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
460845ab | 4187 | echo "configure:4188: checking for long long support in compiler" >&5 |
3f550b59 FF |
4188 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
4189 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4190 | else | |
4191 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4192 | #line 4193 "configure" |
3f550b59 FF |
4193 | #include "confdefs.h" |
4194 | ||
bfde4a67 | 4195 | int main() { |
80f600a4 | 4196 | |
d538f9cf FF |
4197 | extern long long foo; |
4198 | switch (foo & 2) { case 0: return 1; } | |
4199 | ||
3f550b59 FF |
4200 | ; return 0; } |
4201 | EOF | |
460845ab | 4202 | if { (eval echo configure:4203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f550b59 FF |
4203 | rm -rf conftest* |
4204 | gdb_cv_c_long_long=yes | |
4205 | else | |
bfde4a67 SG |
4206 | echo "configure: failed program was:" >&5 |
4207 | cat conftest.$ac_ext >&5 | |
3f550b59 FF |
4208 | rm -rf conftest* |
4209 | gdb_cv_c_long_long=no | |
4210 | fi | |
4211 | rm -f conftest* | |
3f550b59 FF |
4212 | fi |
4213 | ||
4214 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
4215 | if test $gdb_cv_c_long_long = yes; then | |
4216 | cat >> confdefs.h <<\EOF | |
4217 | #define CC_HAS_LONG_LONG 1 | |
4218 | EOF | |
4219 | ||
4220 | fi | |
4221 | ||
4222 | ||
4223 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
460845ab | 4224 | echo "configure:4225: checking for long long support in printf" >&5 |
3f550b59 FF |
4225 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
4226 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4227 | else | |
4228 | if test "$cross_compiling" = yes; then | |
4229 | gdb_cv_printf_has_long_long=no | |
4230 | else | |
bfde4a67 | 4231 | cat > conftest.$ac_ext <<EOF |
460845ab | 4232 | #line 4233 "configure" |
3f550b59 FF |
4233 | #include "confdefs.h" |
4234 | ||
4235 | int main () { | |
f7b8c9ce AC |
4236 | char buf[32]; |
4237 | long long l = 0; | |
4238 | l = (l << 16) + 0x0123; | |
4239 | l = (l << 16) + 0x4567; | |
4240 | l = (l << 16) + 0x89ab; | |
4241 | l = (l << 16) + 0xcdef; | |
4242 | sprintf (buf, "0x%016llx", l); | |
4243 | return (strcmp ("0x0123456789abcdef", buf)); | |
3f550b59 FF |
4244 | } |
4245 | EOF | |
460845ab | 4246 | if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 4247 | then |
3f550b59 FF |
4248 | gdb_cv_printf_has_long_long=yes |
4249 | else | |
bfde4a67 SG |
4250 | echo "configure: failed program was:" >&5 |
4251 | cat conftest.$ac_ext >&5 | |
4252 | rm -fr conftest* | |
3f550b59 FF |
4253 | gdb_cv_printf_has_long_long=no |
4254 | fi | |
ef6c51d1 | 4255 | rm -fr conftest* |
8b701284 ILT |
4256 | fi |
4257 | ||
bfde4a67 SG |
4258 | fi |
4259 | ||
3f550b59 FF |
4260 | if test $gdb_cv_printf_has_long_long = yes; then |
4261 | cat >> confdefs.h <<\EOF | |
4262 | #define PRINTF_HAS_LONG_LONG 1 | |
4263 | EOF | |
4264 | ||
4265 | fi | |
4266 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
4267 | ||
4268 | ||
07b77f5c | 4269 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 |
460845ab | 4270 | echo "configure:4271: checking for long double support in compiler" >&5 |
aa220473 SG |
4271 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
4272 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4273 | else | |
4274 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4275 | #line 4276 "configure" |
aa220473 SG |
4276 | #include "confdefs.h" |
4277 | ||
bfde4a67 | 4278 | int main() { |
aa220473 SG |
4279 | long double foo; |
4280 | ; return 0; } | |
4281 | EOF | |
460845ab | 4282 | if { (eval echo configure:4283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
aa220473 SG |
4283 | rm -rf conftest* |
4284 | ac_cv_c_long_double=yes | |
4285 | else | |
bfde4a67 SG |
4286 | echo "configure: failed program was:" >&5 |
4287 | cat conftest.$ac_ext >&5 | |
aa220473 SG |
4288 | rm -rf conftest* |
4289 | ac_cv_c_long_double=no | |
4290 | fi | |
4291 | rm -f conftest* | |
aa220473 SG |
4292 | fi |
4293 | ||
4294 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
4295 | if test $ac_cv_c_long_double = yes; then | |
4296 | cat >> confdefs.h <<\EOF | |
4297 | #define HAVE_LONG_DOUBLE 1 | |
4298 | EOF | |
4299 | ||
4300 | fi | |
4301 | ||
07b77f5c FF |
4302 | |
4303 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
460845ab | 4304 | echo "configure:4305: checking for long double support in printf" >&5 |
07b77f5c FF |
4305 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
4306 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4307 | else | |
4308 | if test "$cross_compiling" = yes; then | |
4309 | gdb_cv_printf_has_long_double=no | |
4310 | else | |
bfde4a67 | 4311 | cat > conftest.$ac_ext <<EOF |
460845ab | 4312 | #line 4313 "configure" |
07b77f5c FF |
4313 | #include "confdefs.h" |
4314 | ||
4315 | int main () { | |
4316 | char buf[16]; | |
4317 | long double f = 3.141592653; | |
4318 | sprintf (buf, "%Lg", f); | |
4319 | return (strncmp ("3.14159", buf, 7)); | |
4320 | } | |
4321 | EOF | |
460845ab | 4322 | if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 4323 | then |
07b77f5c FF |
4324 | gdb_cv_printf_has_long_double=yes |
4325 | else | |
bfde4a67 SG |
4326 | echo "configure: failed program was:" >&5 |
4327 | cat conftest.$ac_ext >&5 | |
4328 | rm -fr conftest* | |
07b77f5c FF |
4329 | gdb_cv_printf_has_long_double=no |
4330 | fi | |
ef6c51d1 | 4331 | rm -fr conftest* |
8b701284 ILT |
4332 | fi |
4333 | ||
bfde4a67 SG |
4334 | fi |
4335 | ||
07b77f5c FF |
4336 | if test $gdb_cv_printf_has_long_double = yes; then |
4337 | cat >> confdefs.h <<\EOF | |
4338 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
4339 | EOF | |
4340 | ||
4341 | fi | |
4342 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
4343 | ||
f7b8c9ce AC |
4344 | |
4345 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
460845ab | 4346 | echo "configure:4347: checking for long double support in scanf" >&5 |
f7b8c9ce AC |
4347 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
4348 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4349 | else | |
4350 | if test "$cross_compiling" = yes; then | |
4351 | gdb_cv_scanf_has_long_double=no | |
4352 | else | |
4353 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4354 | #line 4355 "configure" |
f7b8c9ce AC |
4355 | #include "confdefs.h" |
4356 | ||
4357 | int main () { | |
4358 | char *buf = "3.141592653"; | |
4359 | long double f = 0; | |
4360 | sscanf (buf, "%Lg", &f); | |
4361 | return !(f > 3.14159 && f < 3.14160); | |
4362 | } | |
4363 | EOF | |
460845ab | 4364 | if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
f7b8c9ce AC |
4365 | then |
4366 | gdb_cv_scanf_has_long_double=yes | |
4367 | else | |
4368 | echo "configure: failed program was:" >&5 | |
4369 | cat conftest.$ac_ext >&5 | |
4370 | rm -fr conftest* | |
4371 | gdb_cv_scanf_has_long_double=no | |
4372 | fi | |
4373 | rm -fr conftest* | |
4374 | fi | |
4375 | ||
4376 | fi | |
4377 | ||
4378 | if test $gdb_cv_scanf_has_long_double = yes; then | |
4379 | cat >> confdefs.h <<\EOF | |
4380 | #define SCANF_HAS_LONG_DOUBLE 1 | |
4381 | EOF | |
4382 | ||
4383 | fi | |
4384 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
4385 | ||
bfde4a67 SG |
4386 | for ac_hdr in unistd.h |
4387 | do | |
4388 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4389 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
460845ab | 4390 | echo "configure:4391: checking for $ac_hdr" >&5 |
bfde4a67 SG |
4391 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4392 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4393 | else | |
4394 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4395 | #line 4396 "configure" |
bfde4a67 SG |
4396 | #include "confdefs.h" |
4397 | #include <$ac_hdr> | |
4398 | EOF | |
4399 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 4400 | { (eval echo configure:4401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 4401 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
bfde4a67 SG |
4402 | if test -z "$ac_err"; then |
4403 | rm -rf conftest* | |
4404 | eval "ac_cv_header_$ac_safe=yes" | |
4405 | else | |
4406 | echo "$ac_err" >&5 | |
4407 | echo "configure: failed program was:" >&5 | |
4408 | cat conftest.$ac_ext >&5 | |
4409 | rm -rf conftest* | |
4410 | eval "ac_cv_header_$ac_safe=no" | |
4411 | fi | |
4412 | rm -f conftest* | |
4413 | fi | |
4414 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4415 | echo "$ac_t""yes" 1>&6 | |
4416 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4417 | cat >> confdefs.h <<EOF | |
4418 | #define $ac_tr_hdr 1 | |
4419 | EOF | |
4420 | ||
4421 | else | |
4422 | echo "$ac_t""no" 1>&6 | |
4423 | fi | |
4424 | done | |
4425 | ||
4426 | for ac_func in getpagesize | |
1a7b4b7c DE |
4427 | do |
4428 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
460845ab | 4429 | echo "configure:4430: checking for $ac_func" >&5 |
1a7b4b7c DE |
4430 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4431 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4432 | else | |
4433 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4434 | #line 4435 "configure" |
1a7b4b7c DE |
4435 | #include "confdefs.h" |
4436 | /* System header to define __stub macros and hopefully few prototypes, | |
4437 | which can conflict with char $ac_func(); below. */ | |
4438 | #include <assert.h> | |
4439 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
4440 | /* We use char because int might match the return type of a gcc2 |
4441 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c DE |
4442 | char $ac_func(); |
4443 | ||
bfde4a67 | 4444 | int main() { |
1a7b4b7c DE |
4445 | |
4446 | /* The GNU C library defines this for functions which it implements | |
4447 | to always fail with ENOSYS. Some functions are actually named | |
4448 | something starting with __ and the normal name is an alias. */ | |
4449 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4450 | choke me | |
4451 | #else | |
4452 | $ac_func(); | |
4453 | #endif | |
4454 | ||
4455 | ; return 0; } | |
4456 | EOF | |
460845ab | 4457 | if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1a7b4b7c DE |
4458 | rm -rf conftest* |
4459 | eval "ac_cv_func_$ac_func=yes" | |
4460 | else | |
bfde4a67 SG |
4461 | echo "configure: failed program was:" >&5 |
4462 | cat conftest.$ac_ext >&5 | |
1a7b4b7c DE |
4463 | rm -rf conftest* |
4464 | eval "ac_cv_func_$ac_func=no" | |
4465 | fi | |
4466 | rm -f conftest* | |
ef6c51d1 | 4467 | fi |
bfde4a67 | 4468 | |
1a7b4b7c DE |
4469 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4470 | echo "$ac_t""yes" 1>&6 | |
4471 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4472 | cat >> confdefs.h <<EOF | |
4473 | #define $ac_tr_func 1 | |
4474 | EOF | |
4475 | ||
4476 | else | |
4477 | echo "$ac_t""no" 1>&6 | |
4478 | fi | |
4479 | done | |
4480 | ||
2b576293 | 4481 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
460845ab | 4482 | echo "configure:4483: checking for working mmap" >&5 |
bfde4a67 | 4483 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2b576293 C |
4484 | echo $ac_n "(cached) $ac_c" 1>&6 |
4485 | else | |
4486 | if test "$cross_compiling" = yes; then | |
bfde4a67 | 4487 | ac_cv_func_mmap_fixed_mapped=no |
2b576293 | 4488 | else |
bfde4a67 | 4489 | cat > conftest.$ac_ext <<EOF |
460845ab | 4490 | #line 4491 "configure" |
2b576293 C |
4491 | #include "confdefs.h" |
4492 | ||
bfde4a67 SG |
4493 | /* Thanks to Mike Haertel and Jim Avera for this test. |
4494 | Here is a matrix of mmap possibilities: | |
4495 | mmap private not fixed | |
4496 | mmap private fixed at somewhere currently unmapped | |
4497 | mmap private fixed at somewhere already mapped | |
4498 | mmap shared not fixed | |
4499 | mmap shared fixed at somewhere currently unmapped | |
4500 | mmap shared fixed at somewhere already mapped | |
4501 | For private mappings, we should verify that changes cannot be read() | |
4502 | back from the file, nor mmap's back from the file at a different | |
4503 | address. (There have been systems where private was not correctly | |
4504 | implemented like the infamous i386 svr4.0, and systems where the | |
4505 | VM page cache was not coherent with the filesystem buffer cache | |
4506 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
4507 | For shared mappings, we should conversely verify that changes get | |
4508 | propogated back to all the places they're supposed to be. | |
4509 | ||
4510 | Grep wants private fixed already mapped. | |
4511 | The main things grep needs to know about mmap are: | |
4512 | * does it exist and is it safe to write into the mmap'd area | |
4513 | * how to use it (BSD variants) */ | |
2b576293 C |
4514 | #include <sys/types.h> |
4515 | #include <fcntl.h> | |
4516 | #include <sys/mman.h> | |
4517 | ||
bfde4a67 | 4518 | /* This mess was copied from the GNU getpagesize.h. */ |
2b576293 | 4519 | #ifndef HAVE_GETPAGESIZE |
bfde4a67 SG |
4520 | # ifdef HAVE_UNISTD_H |
4521 | # include <unistd.h> | |
8b701284 ILT |
4522 | # endif |
4523 | ||
bfde4a67 SG |
4524 | /* Assume that all systems that can run configure have sys/param.h. */ |
4525 | # ifndef HAVE_SYS_PARAM_H | |
4526 | # define HAVE_SYS_PARAM_H 1 | |
4527 | # endif | |
4528 | ||
4529 | # ifdef _SC_PAGESIZE | |
4530 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
4531 | # else /* no _SC_PAGESIZE */ | |
4532 | # ifdef HAVE_SYS_PARAM_H | |
4533 | # include <sys/param.h> | |
4534 | # ifdef EXEC_PAGESIZE | |
4535 | # define getpagesize() EXEC_PAGESIZE | |
4536 | # else /* no EXEC_PAGESIZE */ | |
4537 | # ifdef NBPG | |
4538 | # define getpagesize() NBPG * CLSIZE | |
4539 | # ifndef CLSIZE | |
4540 | # define CLSIZE 1 | |
4541 | # endif /* no CLSIZE */ | |
4542 | # else /* no NBPG */ | |
4543 | # ifdef NBPC | |
4544 | # define getpagesize() NBPC | |
4545 | # else /* no NBPC */ | |
4546 | # ifdef PAGESIZE | |
4547 | # define getpagesize() PAGESIZE | |
4548 | # endif /* PAGESIZE */ | |
4549 | # endif /* no NBPC */ | |
4550 | # endif /* no NBPG */ | |
4551 | # endif /* no EXEC_PAGESIZE */ | |
4552 | # else /* no HAVE_SYS_PARAM_H */ | |
4553 | # define getpagesize() 8192 /* punt totally */ | |
4554 | # endif /* no HAVE_SYS_PARAM_H */ | |
4555 | # endif /* no _SC_PAGESIZE */ | |
4556 | ||
4557 | #endif /* no HAVE_GETPAGESIZE */ | |
2b576293 C |
4558 | |
4559 | #ifdef __cplusplus | |
bfde4a67 | 4560 | extern "C" { void *malloc(unsigned); } |
2b576293 | 4561 | #else |
bfde4a67 | 4562 | char *malloc(); |
2b576293 C |
4563 | #endif |
4564 | ||
4565 | int | |
4566 | main() | |
4567 | { | |
bfde4a67 SG |
4568 | char *data, *data2, *data3; |
4569 | int i, pagesize; | |
4570 | int fd; | |
4571 | ||
4572 | pagesize = getpagesize(); | |
4573 | ||
4574 | /* | |
4575 | * First, make a file with some known garbage in it. | |
4576 | */ | |
4577 | data = malloc(pagesize); | |
4578 | if (!data) | |
4579 | exit(1); | |
4580 | for (i = 0; i < pagesize; ++i) | |
4581 | *(data + i) = rand(); | |
4582 | umask(0); | |
4583 | fd = creat("conftestmmap", 0600); | |
4584 | if (fd < 0) | |
4585 | exit(1); | |
4586 | if (write(fd, data, pagesize) != pagesize) | |
4587 | exit(1); | |
4588 | close(fd); | |
4589 | ||
4590 | /* | |
4591 | * Next, try to mmap the file at a fixed address which | |
4592 | * already has something else allocated at it. If we can, | |
4593 | * also make sure that we see the same garbage. | |
4594 | */ | |
4595 | fd = open("conftestmmap", O_RDWR); | |
4596 | if (fd < 0) | |
4597 | exit(1); | |
4598 | data2 = malloc(2 * pagesize); | |
4599 | if (!data2) | |
4600 | exit(1); | |
4601 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
4602 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
4603 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
4604 | exit(1); | |
4605 | for (i = 0; i < pagesize; ++i) | |
4606 | if (*(data + i) != *(data2 + i)) | |
4607 | exit(1); | |
4608 | ||
4609 | /* | |
4610 | * Finally, make sure that changes to the mapped area | |
4611 | * do not percolate back to the file as seen by read(). | |
4612 | * (This is a bug on some variants of i386 svr4.0.) | |
4613 | */ | |
4614 | for (i = 0; i < pagesize; ++i) | |
4615 | *(data2 + i) = *(data2 + i) + 1; | |
4616 | data3 = malloc(pagesize); | |
4617 | if (!data3) | |
4618 | exit(1); | |
4619 | if (read(fd, data3, pagesize) != pagesize) | |
4620 | exit(1); | |
4621 | for (i = 0; i < pagesize; ++i) | |
4622 | if (*(data + i) != *(data3 + i)) | |
4623 | exit(1); | |
4624 | close(fd); | |
4625 | unlink("conftestmmap"); | |
4626 | exit(0); | |
2b576293 C |
4627 | } |
4628 | ||
4629 | EOF | |
460845ab | 4630 | if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 SG |
4631 | then |
4632 | ac_cv_func_mmap_fixed_mapped=yes | |
2b576293 | 4633 | else |
bfde4a67 SG |
4634 | echo "configure: failed program was:" >&5 |
4635 | cat conftest.$ac_ext >&5 | |
4636 | rm -fr conftest* | |
4637 | ac_cv_func_mmap_fixed_mapped=no | |
2b576293 | 4638 | fi |
ef6c51d1 | 4639 | rm -fr conftest* |
8b701284 ILT |
4640 | fi |
4641 | ||
bfde4a67 SG |
4642 | fi |
4643 | ||
4644 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
4645 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2b576293 C |
4646 | cat >> confdefs.h <<\EOF |
4647 | #define HAVE_MMAP 1 | |
4648 | EOF | |
4649 | ||
4650 | fi | |
4651 | ||
5436fc65 | 4652 | |
47ef0da5 | 4653 | |
89e673a4 SG |
4654 | |
4655 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
4b95e9a1 JM |
4656 | case ${host_os} in |
4657 | hpux*) | |
4658 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
460845ab | 4659 | echo "configure:4660: checking for HPUX/OSF thread support" >&5 |
4b95e9a1 JM |
4660 | if test -f /usr/include/dce/cma_config.h ; then |
4661 | if test "$GCC" = "yes" ; then | |
4662 | echo "$ac_t""yes" 1>&6 | |
4663 | cat >> confdefs.h <<\EOF | |
5d394f70 SG |
4664 | #define HAVE_HPUX_THREAD_SUPPORT 1 |
4665 | EOF | |
4666 | ||
4b95e9a1 | 4667 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" |
c7bb1531 | 4668 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
4b95e9a1 JM |
4669 | else |
4670 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
4671 | fi | |
4672 | else | |
4673 | echo "$ac_t""no" 1>&6 | |
4674 | fi | |
4675 | ;; | |
4676 | solaris*) | |
4677 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
460845ab | 4678 | echo "configure:4679: checking for Solaris thread debugging library" >&5 |
4b95e9a1 JM |
4679 | if test -f /usr/lib/libthread_db.so.1 ; then |
4680 | echo "$ac_t""yes" 1>&6 | |
4681 | cat >> confdefs.h <<\EOF | |
6c310da8 SG |
4682 | #define HAVE_THREAD_DB_LIB 1 |
4683 | EOF | |
4684 | ||
4b95e9a1 | 4685 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c7bb1531 | 4686 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
4b95e9a1 | 4687 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
460845ab | 4688 | echo "configure:4689: checking for dlopen in -ldl" >&5 |
bfde4a67 | 4689 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
95b47547 SG |
4690 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
4691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4692 | else | |
4693 | ac_save_LIBS="$LIBS" | |
4694 | LIBS="-ldl $LIBS" | |
4695 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4696 | #line 4697 "configure" |
95b47547 SG |
4697 | #include "confdefs.h" |
4698 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4699 | /* We use char because int might match the return type of a gcc2 | |
4700 | builtin and then its argument prototype would still apply. */ | |
4701 | char dlopen(); | |
4702 | ||
bfde4a67 | 4703 | int main() { |
95b47547 SG |
4704 | dlopen() |
4705 | ; return 0; } | |
4706 | EOF | |
460845ab | 4707 | if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
95b47547 SG |
4708 | rm -rf conftest* |
4709 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4710 | else | |
bfde4a67 SG |
4711 | echo "configure: failed program was:" >&5 |
4712 | cat conftest.$ac_ext >&5 | |
95b47547 SG |
4713 | rm -rf conftest* |
4714 | eval "ac_cv_lib_$ac_lib_var=no" | |
4715 | fi | |
4716 | rm -f conftest* | |
4717 | LIBS="$ac_save_LIBS" | |
4718 | ||
4719 | fi | |
4720 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4721 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
4722 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
4723 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
95b47547 SG |
4724 | cat >> confdefs.h <<EOF |
4725 | #define $ac_tr_lib 1 | |
4726 | EOF | |
4727 | ||
4728 | LIBS="-ldl $LIBS" | |
4729 | ||
4730 | else | |
4731 | echo "$ac_t""no" 1>&6 | |
4732 | fi | |
4733 | ||
4b95e9a1 JM |
4734 | if test "$GCC" = "yes" ; then |
4735 | # The GNU linker requires the -export-dynamic option to make | |
4736 | # all symbols visible in the dynamic symbol table. | |
4737 | hold_ldflags=$LDFLAGS | |
4738 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
460845ab | 4739 | echo "configure:4740: checking for the ld -export-dynamic flag" >&5 |
4b95e9a1 JM |
4740 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
4741 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4742 | #line 4743 "configure" |
4b95e9a1 JM |
4743 | #include "confdefs.h" |
4744 | ||
4745 | int main() { | |
4746 | int i; | |
4747 | ; return 0; } | |
4748 | EOF | |
460845ab | 4749 | if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4b95e9a1 JM |
4750 | rm -rf conftest* |
4751 | found=yes | |
4752 | else | |
4753 | echo "configure: failed program was:" >&5 | |
4754 | cat conftest.$ac_ext >&5 | |
4755 | rm -rf conftest* | |
4756 | found=no | |
4757 | fi | |
4758 | rm -f conftest* | |
4759 | LDFLAGS=$hold_ldflags | |
4760 | echo "$ac_t""$found" 1>&6 | |
4761 | if test $found = yes; then | |
4762 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
4763 | fi | |
4764 | fi | |
37f58dce FL |
4765 | # Sun randomly tweaked the prototypes in <proc_service.h> |
4766 | # at one point. | |
4767 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
460845ab | 4768 | echo "configure:4769: checking if <proc_service.h> is old" >&5 |
37f58dce FL |
4769 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
4770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4771 | else | |
4772 | ||
4773 | cat > conftest.$ac_ext <<EOF | |
460845ab | 4774 | #line 4775 "configure" |
37f58dce FL |
4775 | #include "confdefs.h" |
4776 | ||
4777 | #include <proc_service.h> | |
4778 | ps_err_e ps_pdwrite | |
4779 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
4780 | ||
4781 | int main() { | |
4782 | ||
4783 | ; return 0; } | |
4784 | EOF | |
460845ab | 4785 | if { (eval echo configure:4786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
37f58dce FL |
4786 | rm -rf conftest* |
4787 | gdb_cv_proc_service_is_old=no | |
4788 | else | |
4789 | echo "configure: failed program was:" >&5 | |
4790 | cat conftest.$ac_ext >&5 | |
4791 | rm -rf conftest* | |
4792 | gdb_cv_proc_service_is_old=yes | |
4793 | fi | |
4794 | rm -f conftest* | |
4795 | ||
4796 | fi | |
4797 | ||
4798 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
4799 | if test $gdb_cv_proc_service_is_old = yes; then | |
4800 | cat >> confdefs.h <<\EOF | |
4801 | #define PROC_SERVICE_IS_OLD 1 | |
4802 | EOF | |
4803 | ||
4804 | fi | |
4b95e9a1 JM |
4805 | else |
4806 | echo "$ac_t""no" 1>&6 | |
4807 | fi | |
4808 | ;; | |
4809 | esac | |
4810 | ||
89e673a4 | 4811 | fi |
47ef0da5 | 4812 | |
5436fc65 | 4813 | ENABLE_CFLAGS= |
5436fc65 | 4814 | |
460845ab DT |
4815 | # Check whether --enable-tui or --disable-tui was given. |
4816 | if test "${enable_tui+set}" = set; then | |
4817 | enableval="$enable_tui" | |
4818 | ||
4819 | case "${enable_tui}" in | |
4820 | yes | no) ;; | |
4821 | "") enable_tui=yes ;; | |
4822 | *) | |
4823 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
4824 | ;; | |
4825 | esac | |
4826 | ||
4827 | fi | |
4828 | ||
4829 | case ${enable_tui} in | |
4830 | "yes" ) | |
4831 | cat >> confdefs.h <<\EOF | |
4832 | #define TUI 1 | |
4833 | EOF | |
4834 | ||
4835 | BUILD_TUI=all-tui | |
4836 | TUI_LIBRARY=tui/libtui.a | |
4837 | ;; | |
4838 | * ) | |
4839 | BUILD_TUI= | |
4840 | TUI_LIBRARY= | |
4841 | ;; | |
4842 | esac | |
4843 | ||
4844 | ||
4845 | ||
5436fc65 | 4846 | # Check whether --enable-netrom or --disable-netrom was given. |
1a7b4b7c DE |
4847 | if test "${enable_netrom+set}" = set; then |
4848 | enableval="$enable_netrom" | |
5436fc65 C |
4849 | case "${enableval}" in |
4850 | yes) enable_netrom=yes ;; | |
4851 | no) enable_netrom=no ;; | |
4852 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
4853 | esac | |
4854 | fi | |
4855 | ||
4856 | ||
4857 | if test "${enable_netrom}" = "yes"; then | |
6c310da8 | 4858 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" |
c7bb1531 | 4859 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" |
5436fc65 C |
4860 | fi |
4861 | ||
b9a9cde4 AC |
4862 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
4863 | if test "${enable_build_warnings+set}" = set; then | |
4864 | enableval="$enable_build_warnings" | |
4865 | build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" | |
4866 | case "${enableval}" in | |
4867 | yes) ;; | |
4868 | no) build_warnings="-w";; | |
c8623080 AC |
4869 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` |
4870 | build_warnings="${build_warnings} ${t}";; | |
4871 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
4872 | build_warnings="${t} ${build_warnings}";; | |
4873 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
ba68ad57 | 4874 | esac |
b9a9cde4 AC |
4875 | else |
4876 | build_warnings="" | |
ba68ad57 JM |
4877 | fi |
4878 | ||
b9a9cde4 | 4879 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
ba68ad57 | 4880 | then |
b9a9cde4 | 4881 | WARN_CFLAGS="${build_warnings}" |
ba68ad57 JM |
4882 | else |
4883 | WARN_CFLAGS="" | |
4884 | fi | |
4885 | ||
4886 | ||
0728afad FF |
4887 | MMALLOC_CFLAGS= |
4888 | MMALLOC= | |
4889 | ||
4890 | ||
4891 | ||
4892 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
4893 | if test "${with_mmalloc+set}" = set; then | |
4894 | withval="$with_mmalloc" | |
4895 | case "${withval}" in | |
4896 | yes) want_mmalloc=true ;; | |
4897 | no) want_mmalloc=false;; | |
4898 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
4899 | esac | |
4900 | else | |
4901 | want_mmalloc=false | |
4902 | fi | |
4903 | ||
4904 | if test x$want_mmalloc = xtrue; then | |
4905 | cat >> confdefs.h <<\EOF | |
4906 | #define USE_MMALLOC 1 | |
4907 | EOF | |
4908 | ||
4909 | cat >> confdefs.h <<\EOF | |
dd600735 | 4910 | #define MMCHECK_FORCE 1 |
0728afad FF |
4911 | EOF |
4912 | ||
4913 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
4914 | MMALLOC='../mmalloc/libmmalloc.a' | |
4915 | fi | |
4916 | ||
287026b7 AC |
4917 | # start-sanitize-carp |
4918 | # The below takes an educated guess at the targets that | |
4919 | # should be built. It is an interum version that provides | |
4920 | # significant backward compatibility. | |
4921 | ||
4922 | # Check whether --enable-carp or --disable-carp was given. | |
4923 | if test "${enable_carp+set}" = set; then | |
4924 | enableval="$enable_carp" | |
4925 | case "${enableval}" in | |
4926 | yes) enable_carp=yes ;; | |
4927 | no) enable_carp=no ;; | |
4928 | *) { echo "configure: error: bad value ${enableval} for carp option" 1>&2; exit 1; } ;; | |
4929 | esac | |
4930 | else | |
4931 | enable_carp=no | |
4932 | fi | |
4933 | ||
4934 | # Check whether --enable-targets or --disable-targets was given. | |
4935 | if test "${enable_targets+set}" = set; then | |
4936 | enableval="$enable_targets" | |
4937 | case "${enableval}" in | |
4938 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
4939 | ;; | |
4940 | no) enable_targets= ;; | |
4941 | *) enable_targets="$enableval" ;; | |
4942 | esac | |
4943 | fi | |
4944 | ||
4945 | # Canonicalize the secondary target names. | |
4946 | all_targets=false | |
4947 | if test -n "$enable_targets" ; then | |
4948 | if test "$enable_targets" = all ; then | |
4949 | all_targets=true | |
4950 | else | |
4951 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
4952 | do | |
4953 | result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null` | |
4954 | if test -n "$result" ; then | |
4955 | canon_targets="$canon_targets $result" | |
4956 | fi | |
4957 | done | |
4958 | fi | |
4959 | fi | |
4960 | ||
4961 | # Convert the target names into GDB [*]-tdep.c names | |
4962 | selarchs= | |
4963 | for targ in $target $canon_targets | |
4964 | do | |
4965 | if test "x$targ" = "xall" ; then | |
4966 | all_targets=true | |
4967 | else | |
b0f33a03 | 4968 | t_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
287026b7 | 4969 | t_vendor=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` |
b0f33a03 | 4970 | t_os=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` |
287026b7 AC |
4971 | mt=` |
4972 | target=$targ | |
4973 | target_cpu=$t_cpu | |
4974 | target_vendor=$t_vendor | |
4975 | target_os=$t_os | |
4976 | . ${srcdir}/configure.tgt | |
4977 | echo ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt` | |
4978 | if test -r ${mt} ; then | |
4979 | # This gets confused over .mt files that have multiple -tdep.o | |
4980 | tdep=`sed -n ' | |
4981 | s/^.*[ =]\([^ ]*\)-tdep.o.*/\1/p | |
4982 | ' $mt` | |
4983 | selarchs="$selarchs $tdep" | |
4984 | fi | |
4985 | fi | |
4986 | done | |
4987 | ||
4988 | # We don't do any links based on the target system, just makefile config. | |
4989 | ||
4990 | if test x${all_targets} = xfalse ; then | |
4991 | ||
4992 | # Target architecture .o files. | |
4993 | ta= | |
4994 | ||
4995 | for arch in $selarchs | |
4996 | do | |
4997 | archdefs="$archdefs -DARCH_$arch" | |
4998 | ta="$ta ${arch}-tdep.o" | |
4999 | # Special cases | |
5000 | case "$arch" in | |
b0f33a03 | 5001 | dvp) ta="$ta mips-tdep.o dvp-tdep.o" ;; |
287026b7 AC |
5002 | esac |
5003 | done | |
5004 | ||
5005 | # Weed out duplicate .o files. | |
5006 | f="" | |
5007 | for i in $ta ; do | |
5008 | case " $f " in | |
b0f33a03 JM |
5009 | *" $i "*) ;; |
5010 | *) f="$f $i" ;; | |
287026b7 AC |
5011 | esac |
5012 | done | |
5013 | ta="$f" | |
5014 | ||
5015 | # And duplicate -D flags. | |
5016 | f="" | |
5017 | for i in $archdefs ; do | |
5018 | case " $f " in | |
b0f33a03 JM |
5019 | *" $i "*) ;; |
5020 | *) f="$f $i" ;; | |
287026b7 AC |
5021 | esac |
5022 | done | |
5023 | archdefs="$f" | |
5024 | ||
5025 | MACHINE_OBS="$ta" | |
5026 | ||
5027 | else # all_targets is true | |
5028 | archdefs=-DARCH_all | |
5029 | MACHINE_OBS='$(ALL_MACHINES)' | |
5030 | fi | |
5031 | ||
5032 | if test "${enable_carp}" = yes ; then | |
5033 | gdb_target=carp | |
5034 | gdb_target_cpu=carp | |
5035 | else | |
5036 | MACHINE_OBS="# $MACHINE_OBS" | |
5037 | fi | |
5038 | ||
5039 | ||
5040 | # end-sanitize-carp | |
5436fc65 | 5041 | # start-sanitize-gdbtk |
fa41e1a3 | 5042 | # start-sanitize-ide |
2476848a MH |
5043 | ENABLE_IDE= |
5044 | # Check whether --enable-ide or --disable-ide was given. | |
5045 | if test "${enable_ide+set}" = set; then | |
5046 | enableval="$enable_ide" | |
5047 | : | |
5048 | fi | |
5049 | ||
5050 | if test "$enable_ide" = yes; then | |
5051 | enable_ide=yes | |
5052 | ENABLE_IDE=1 | |
5053 | else | |
5054 | enable_ide=no | |
5055 | fi | |
5056 | ||
5057 | ||
c076f1ed DM |
5058 | # Check whether --with-foundry-libs or --without-foundry-libs was given. |
5059 | if test "${with_foundry_libs+set}" = set; then | |
5060 | withval="$with_foundry_libs" | |
5061 | FOUNDRY_LIB_BASE=${withval} | |
5062 | fi | |
5063 | ||
5064 | ||
5065 | ||
5066 | # | |
5067 | # This is the Foundry SDK | |
5068 | # | |
5069 | # These variables are used to determine where the Foundry libs and | |
5070 | # header files are located. | |
5071 | # | |
5072 | if test "$FOUNDRY_LIB_BASE" != ""; then | |
5073 | LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a" | |
5074 | GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include" | |
5075 | if test x$enable_ide = xyes; then | |
5076 | IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE" | |
5077 | IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu" | |
5078 | else | |
5079 | IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include" | |
5080 | fi | |
5081 | LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a" | |
5082 | LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a" | |
5083 | IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a" | |
5084 | else | |
44ffbd6e | 5085 | # end-sanitize-ide |
c076f1ed DM |
5086 | LIBGUI="../libgui/src/libgui.a" |
5087 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
44ffbd6e | 5088 | # start-sanitize-ide |
c076f1ed DM |
5089 | if test x$enable_ide = xyes; then |
5090 | IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop" | |
5091 | IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu" | |
5092 | else | |
5093 | IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src" | |
5094 | fi | |
5095 | LIBIDETCL="../libidetcl/src/libidetcl.a" | |
5096 | LIBIDE="../libide/src/libide.a" | |
5097 | IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a" | |
5098 | fi | |
5099 | ||
44ffbd6e | 5100 | # end-sanitize-ide |
c076f1ed DM |
5101 | |
5102 | ||
44ffbd6e JI |
5103 | # start-sanitize-ide |
5104 | ||
c076f1ed DM |
5105 | |
5106 | ||
5107 | ||
5108 | ||
fa41e1a3 | 5109 | # end-sanitize-ide |
c076f1ed | 5110 | |
5436fc65 C |
5111 | ENABLE_GDBTK= |
5112 | ||
5113 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
1a7b4b7c DE |
5114 | if test "${enable_gdbtk+set}" = set; then |
5115 | enableval="$enable_gdbtk" | |
5436fc65 | 5116 | case "${enableval}" in |
0fe1522a SG |
5117 | yes) |
5118 | case "$host" in | |
5119 | *go32*) | |
5120 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
5121 | enable_gdbtk=no ;; | |
8a19b35a | 5122 | *windows*) |
b613bfbf GN |
5123 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 |
5124 | enable_gdbtk=no ;; | |
0fe1522a SG |
5125 | *) |
5126 | enable_gdbtk=yes ;; | |
5127 | esac ;; | |
5128 | no) | |
5129 | enable_gdbtk=no ;; | |
5130 | *) | |
5131 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
5436fc65 | 5132 | esac |
0fe1522a SG |
5133 | else |
5134 | ||
b93f016b | 5135 | # Default is on for everything but go32 and Cygwin |
0fe1522a | 5136 | case "$host" in |
8a19b35a | 5137 | *go32* | *windows*) |
b613bfbf | 5138 | ;; |
0fe1522a SG |
5139 | *) |
5140 | enable_gdbtk=yes ;; | |
5141 | esac | |
5142 | ||
5436fc65 C |
5143 | fi |
5144 | ||
5145 | ||
b93f016b | 5146 | # In the Cygwin environment, we need some additional flags. |
d836385e | 5147 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 |
460845ab | 5148 | echo "configure:5149: checking for cygwin" >&5 |
d836385e | 5149 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
9b119644 ILT |
5150 | echo $ac_n "(cached) $ac_c" 1>&6 |
5151 | else | |
5152 | cat > conftest.$ac_ext <<EOF | |
460845ab | 5153 | #line 5154 "configure" |
9b119644 ILT |
5154 | #include "confdefs.h" |
5155 | ||
94a91918 | 5156 | #ifdef __CYGWIN32__ |
9b119644 ILT |
5157 | lose |
5158 | #endif | |
5159 | EOF | |
5160 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5161 | egrep "lose" >/dev/null 2>&1; then | |
5162 | rm -rf conftest* | |
d836385e | 5163 | gdb_cv_os_cygwin=yes |
9b119644 ILT |
5164 | else |
5165 | rm -rf conftest* | |
d836385e | 5166 | gdb_cv_os_cygwin=no |
9b119644 ILT |
5167 | fi |
5168 | rm -f conftest* | |
5169 | ||
5170 | fi | |
5171 | ||
d836385e | 5172 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 |
9b119644 ILT |
5173 | |
5174 | WIN32LIBS= | |
5175 | WIN32LDAPP= | |
5176 | ||
5177 | ||
5178 | ||
b0f33a03 | 5179 | DLLTOOL=${DLLTOOL-dlltool} |
929db6e5 EZ |
5180 | WINDRES=${WINDRES-windres} |
5181 | ||
5182 | ||
b0f33a03 | 5183 | |
d836385e | 5184 | if test x$gdb_cv_os_cygwin = xyes; then |
9b119644 ILT |
5185 | if test x$enable_ide = xyes; then |
5186 | WIN32LIBS="-ladvapi32" | |
5187 | fi | |
5188 | fi | |
5189 | ||
5190 | configdir="unix" | |
8a19b35a | 5191 | |
b177bf84 | 5192 | GDBTKLIBS= |
5436fc65 | 5193 | if test "${enable_gdbtk}" = "yes"; then |
0fe1522a | 5194 | |
047465fd TT |
5195 | |
5196 | # | |
5197 | # Ok, lets find the tcl configuration | |
5198 | # First, look for one uninstalled. | |
5199 | # the alternative search directory is invoked by --with-tclconfig | |
5200 | # | |
5436fc65 | 5201 | |
047465fd TT |
5202 | if test x"${no_tcl}" = x ; then |
5203 | # we reset no_tcl in case something fails here | |
5204 | no_tcl=true | |
5205 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
5206 | if test "${with_tclconfig+set}" = set; then | |
5207 | withval="$with_tclconfig" | |
5208 | with_tclconfig=${withval} | |
5436fc65 C |
5209 | fi |
5210 | ||
047465fd | 5211 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 |
460845ab | 5212 | echo "configure:5213: checking for Tcl configuration" >&5 |
047465fd | 5213 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
5436fc65 C |
5214 | echo $ac_n "(cached) $ac_c" 1>&6 |
5215 | else | |
047465fd | 5216 | |
1a7b4b7c | 5217 | |
047465fd TT |
5218 | # First check to see if --with-tclconfig was specified. |
5219 | if test x"${with_tclconfig}" != x ; then | |
5220 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
5221 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
5222 | else | |
5223 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 5224 | fi |
047465fd | 5225 | fi |
5436fc65 | 5226 | |
047465fd TT |
5227 | # then check for a private Tcl installation |
5228 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5229 | for i in \ | |
5230 | ../tcl \ | |
5231 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
5232 | ../../tcl \ | |
5233 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
5234 | ../../../tcl \ | |
5235 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5236 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
5237 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5238 | break |
5239 | fi | |
5240 | done | |
5241 | fi | |
5242 | # check in a few common install locations | |
5243 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5244 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
5245 | if test -f "$i/tclConfig.sh" ; then | |
5246 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
5247 | break | |
5248 | fi | |
5249 | done | |
5250 | fi | |
5251 | # check in a few other private locations | |
5252 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5253 | for i in \ | |
5254 | ${srcdir}/../tcl \ | |
5255 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5256 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
5257 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5258 | break |
5259 | fi | |
5260 | done | |
5261 | fi | |
5262 | ||
5436fc65 | 5263 | fi |
1a7b4b7c | 5264 | |
047465fd TT |
5265 | if test x"${ac_cv_c_tclconfig}" = x ; then |
5266 | TCLCONFIG="# no Tcl configs found" | |
5267 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
5268 | else | |
5269 | no_tcl= | |
5270 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
5271 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
5436fc65 | 5272 | fi |
5436fc65 C |
5273 | fi |
5274 | ||
0cf433d9 ILT |
5275 | if test -z "${no_tcl}"; then |
5276 | ||
047465fd | 5277 | . $TCLCONFIG |
5436fc65 | 5278 | |
047465fd TT |
5279 | |
5280 | ||
5281 | ||
5282 | ||
5283 | ||
5436fc65 | 5284 | |
5436fc65 | 5285 | |
5436fc65 | 5286 | |
5436fc65 | 5287 | |
047465fd TT |
5288 | |
5289 | ||
5290 | ||
5291 | ||
5292 | ||
5293 | ||
5294 | ||
5295 | ||
5296 | ||
5297 | ||
5298 | ||
5299 | ||
5436fc65 | 5300 | |
5436fc65 | 5301 | |
5436fc65 | 5302 | |
0cf433d9 | 5303 | |
047465fd TT |
5304 | # |
5305 | # Ok, lets find the tk configuration | |
5306 | # First, look for one uninstalled. | |
5307 | # the alternative search directory is invoked by --with-tkconfig | |
5308 | # | |
5436fc65 | 5309 | |
047465fd TT |
5310 | if test x"${no_tk}" = x ; then |
5311 | # we reset no_tk in case something fails here | |
5312 | no_tk=true | |
5313 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
5314 | if test "${with_tkconfig+set}" = set; then | |
5315 | withval="$with_tkconfig" | |
5316 | with_tkconfig=${withval} | |
5436fc65 C |
5317 | fi |
5318 | ||
047465fd | 5319 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 |
460845ab | 5320 | echo "configure:5321: checking for Tk configuration" >&5 |
047465fd | 5321 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
5436fc65 C |
5322 | echo $ac_n "(cached) $ac_c" 1>&6 |
5323 | else | |
047465fd | 5324 | |
5436fc65 | 5325 | |
047465fd TT |
5326 | # First check to see if --with-tkconfig was specified. |
5327 | if test x"${with_tkconfig}" != x ; then | |
5328 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
5329 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
5330 | else | |
5331 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 5332 | fi |
047465fd | 5333 | fi |
5436fc65 | 5334 | |
047465fd TT |
5335 | # then check for a private Tk library |
5336 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5337 | for i in \ | |
5338 | ../tk \ | |
5339 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
5340 | ../../tk \ | |
5341 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
5342 | ../../../tk \ | |
5343 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5344 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
5345 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5346 | break |
5347 | fi | |
5348 | done | |
5349 | fi | |
5350 | # check in a few common install locations | |
5351 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5352 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
5353 | if test -f "$i/tkConfig.sh" ; then | |
5354 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
5355 | break | |
5356 | fi | |
5357 | done | |
5358 | fi | |
5359 | # check in a few other private locations | |
5360 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5361 | for i in \ | |
5362 | ${srcdir}/../tk \ | |
5363 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5364 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
5365 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5366 | break |
5367 | fi | |
5368 | done | |
5369 | fi | |
5370 | ||
5436fc65 | 5371 | fi |
5436fc65 | 5372 | |
047465fd TT |
5373 | if test x"${ac_cv_c_tkconfig}" = x ; then |
5374 | TKCONFIG="# no Tk configs found" | |
5375 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
5376 | else | |
5377 | no_tk= | |
5378 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
5379 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
5380 | fi | |
5436fc65 C |
5381 | fi |
5382 | ||
5383 | ||
5436fc65 | 5384 | |
0cf433d9 ILT |
5385 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
5386 | # point to doing Tcl. | |
5387 | if test -z "${no_tk}"; then | |
5388 | ||
047465fd TT |
5389 | if test -f "$TKCONFIG" ; then |
5390 | . $TKCONFIG | |
5391 | fi | |
5436fc65 | 5392 | |
047465fd TT |
5393 | |
5394 | ||
5436fc65 | 5395 | |
047465fd | 5396 | |
5436fc65 C |
5397 | |
5398 | ||
a2b63bbd | 5399 | |
047465fd TT |
5400 | |
5401 | ||
5402 | ||
9b119644 | 5403 | |
047465fd | 5404 | |
0cf433d9 | 5405 | |
5436fc65 | 5406 | # |
4e327047 TT |
5407 | # Ok, lets find the tcl source trees so we can use the headers |
5408 | # Warning: transition of version 9 to 10 will break this algorithm | |
5409 | # because 10 sorts before 9. We also look for just tcl. We have to | |
5410 | # be careful that we don't match stuff like tclX by accident. | |
5411 | # the alternative search directory is involked by --with-tclinclude | |
5436fc65 | 5412 | # |
8a19b35a | 5413 | |
4e327047 | 5414 | no_tcl=true |
8a19b35a | 5415 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 |
460845ab | 5416 | echo "configure:5417: checking for Tcl private headers. dir=${configdir}" >&5 |
4e327047 | 5417 | # Check whether --with-tclinclude or --without-tclinclude was given. |
1a7b4b7c DE |
5418 | if test "${with_tclinclude+set}" = set; then |
5419 | withval="$with_tclinclude" | |
4e327047 TT |
5420 | with_tclinclude=${withval} |
5421 | fi | |
5422 | ||
5423 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
5424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5425 | else | |
5426 | ||
5427 | # first check to see if --with-tclinclude was specified | |
5428 | if test x"${with_tclinclude}" != x ; then | |
5429 | if test -f ${with_tclinclude}/tclInt.h ; then | |
5430 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
047465fd TT |
5431 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then |
5432 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
5436fc65 | 5433 | else |
4e327047 TT |
5434 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
5435 | fi | |
5436 | fi | |
047465fd TT |
5437 | |
5438 | # next check if it came with Tcl configuration file | |
5439 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5440 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
5441 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
5442 | fi | |
5443 | fi | |
5444 | ||
4e327047 TT |
5445 | # next check in private source directory |
5446 | # | |
5447 | # since ls returns lowest version numbers first, reverse its output | |
5448 | if test x"${ac_cv_c_tclh}" = x ; then | |
5449 | for i in \ | |
5450 | ${srcdir}/../tcl \ | |
047465fd | 5451 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 5452 | ${srcdir}/../../tcl \ |
047465fd | 5453 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 5454 | ${srcdir}/../../../tcl \ |
047465fd | 5455 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do |
4e327047 | 5456 | if test -f $i/generic/tclInt.h ; then |
047465fd | 5457 | ac_cv_c_tclh=`(cd $i/generic; pwd)` |
1a7b4b7c | 5458 | break |
4e327047 TT |
5459 | fi |
5460 | done | |
5461 | fi | |
5462 | # finally check in a few common install locations | |
5463 | # | |
5464 | # since ls returns lowest version numbers first, reverse its output | |
5465 | if test x"${ac_cv_c_tclh}" = x ; then | |
5466 | for i in \ | |
047465fd TT |
5467 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ |
5468 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
4e327047 TT |
5469 | /usr/local/src/tcl \ |
5470 | /usr/local/lib/tcl \ | |
5471 | ${prefix}/include ; do | |
047465fd TT |
5472 | if test -f $i/generic/tclInt.h ; then |
5473 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5474 | break |
5475 | fi | |
5476 | done | |
5477 | fi | |
5478 | # see if one is installed | |
5479 | if test x"${ac_cv_c_tclh}" = x ; then | |
bfde4a67 | 5480 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` |
4e327047 | 5481 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 |
460845ab | 5482 | echo "configure:5483: checking for tclInt.h" >&5 |
5436fc65 C |
5483 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5485 | else | |
5486 | cat > conftest.$ac_ext <<EOF | |
460845ab | 5487 | #line 5488 "configure" |
5436fc65 | 5488 | #include "confdefs.h" |
4e327047 | 5489 | #include <tclInt.h> |
5436fc65 | 5490 | EOF |
1a7b4b7c | 5491 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
460845ab | 5492 | { (eval echo configure:5493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 5493 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
5494 | if test -z "$ac_err"; then |
5495 | rm -rf conftest* | |
5496 | eval "ac_cv_header_$ac_safe=yes" | |
5497 | else | |
5498 | echo "$ac_err" >&5 | |
bfde4a67 SG |
5499 | echo "configure: failed program was:" >&5 |
5500 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
5501 | rm -rf conftest* |
5502 | eval "ac_cv_header_$ac_safe=no" | |
5503 | fi | |
5504 | rm -f conftest* | |
5505 | fi | |
5506 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5507 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 5508 | ac_cv_c_tclh=installed |
5436fc65 C |
5509 | else |
5510 | echo "$ac_t""no" 1>&6 | |
4e327047 | 5511 | ac_cv_c_tclh="" |
5436fc65 C |
5512 | fi |
5513 | ||
4e327047 TT |
5514 | fi |
5515 | ||
5516 | fi | |
5517 | ||
5518 | if test x"${ac_cv_c_tclh}" = x ; then | |
5519 | TCLHDIR="# no Tcl private headers found" | |
5520 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
5521 | fi | |
5522 | if test x"${ac_cv_c_tclh}" != x ; then | |
5523 | no_tcl="" | |
1a7b4b7c | 5524 | if test x"${ac_cv_c_tclh}" = x"installed" ; then |
4e327047 TT |
5525 | echo "$ac_t""is installed" 1>&6 |
5526 | TCLHDIR="" | |
5527 | else | |
5528 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
5529 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
5530 | TCLHDIR="-I${ac_cv_c_tclh}" | |
5436fc65 | 5531 | fi |
5436fc65 | 5532 | fi |
4e327047 | 5533 | |
4e327047 | 5534 | |
5436fc65 | 5535 | |
0cf433d9 | 5536 | |
5436fc65 | 5537 | # |
4e327047 TT |
5538 | # Ok, lets find the tk source trees so we can use the headers |
5539 | # If the directory (presumably symlink) named "tk" exists, use that one | |
5540 | # in preference to any others. Same logic is used when choosing library | |
5541 | # and again with Tcl. The search order is the best place to look first, then in | |
5542 | # decreasing significance. The loop breaks if the trigger file is found. | |
5543 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
5544 | # directory. This converts the path from a relative to an absolute, so | |
5545 | # recursive cache variables for the path will work right. We check all | |
5546 | # the possible paths in one loop rather than many seperate loops to speed | |
5547 | # things up. | |
047465fd | 5548 | # the alternative search directory is involked by --with-tkinclude |
5436fc65 | 5549 | # |
047465fd | 5550 | no_tk=true |
4e327047 | 5551 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 |
460845ab | 5552 | echo "configure:5553: checking for Tk private headers" >&5 |
4e327047 | 5553 | # Check whether --with-tkinclude or --without-tkinclude was given. |
1a7b4b7c DE |
5554 | if test "${with_tkinclude+set}" = set; then |
5555 | withval="$with_tkinclude" | |
4e327047 TT |
5556 | with_tkinclude=${withval} |
5557 | fi | |
5558 | ||
4e327047 TT |
5559 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then |
5560 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5561 | else | |
5562 | ||
5563 | # first check to see if --with-tkinclude was specified | |
5564 | if test x"${with_tkinclude}" != x ; then | |
5565 | if test -f ${with_tkinclude}/tk.h ; then | |
5566 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
047465fd TT |
5567 | elif test -f ${with_tkinclude}/generic/tk.h ; then |
5568 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
5436fc65 | 5569 | else |
4e327047 TT |
5570 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
5571 | fi | |
5572 | fi | |
047465fd TT |
5573 | |
5574 | # next check if it came with Tk configuration file | |
5575 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5576 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
5577 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
5578 | fi | |
5579 | fi | |
5580 | ||
4e327047 TT |
5581 | # next check in private source directory |
5582 | # | |
047465fd | 5583 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
5584 | if test x"${ac_cv_c_tkh}" = x ; then |
5585 | for i in \ | |
5586 | ${srcdir}/../tk \ | |
047465fd | 5587 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ |
4e327047 | 5588 | ${srcdir}/../../tk \ |
047465fd | 5589 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ |
4e327047 | 5590 | ${srcdir}/../../../tk \ |
047465fd TT |
5591 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do |
5592 | if test -f $i/generic/tk.h ; then | |
5593 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5594 | break |
5595 | fi | |
4e327047 TT |
5596 | done |
5597 | fi | |
5598 | # finally check in a few common install locations | |
5599 | # | |
047465fd | 5600 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
5601 | if test x"${ac_cv_c_tkh}" = x ; then |
5602 | for i in \ | |
047465fd TT |
5603 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ |
5604 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
4e327047 TT |
5605 | /usr/local/src/tk \ |
5606 | /usr/local/lib/tk \ | |
5607 | ${prefix}/include ; do | |
047465fd TT |
5608 | if test -f $i/generic/tk.h ; then |
5609 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5610 | break |
5611 | fi | |
5612 | done | |
5613 | fi | |
5614 | # see if one is installed | |
5615 | if test x"${ac_cv_c_tkh}" = x ; then | |
bfde4a67 | 5616 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` |
4e327047 | 5617 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 |
460845ab | 5618 | echo "configure:5619: checking for tk.h" >&5 |
5436fc65 C |
5619 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5621 | else | |
5622 | cat > conftest.$ac_ext <<EOF | |
460845ab | 5623 | #line 5624 "configure" |
5436fc65 | 5624 | #include "confdefs.h" |
4e327047 | 5625 | #include <tk.h> |
5436fc65 | 5626 | EOF |
1a7b4b7c | 5627 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
460845ab | 5628 | { (eval echo configure:5629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 5629 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
5630 | if test -z "$ac_err"; then |
5631 | rm -rf conftest* | |
5632 | eval "ac_cv_header_$ac_safe=yes" | |
5633 | else | |
5634 | echo "$ac_err" >&5 | |
bfde4a67 SG |
5635 | echo "configure: failed program was:" >&5 |
5636 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
5637 | rm -rf conftest* |
5638 | eval "ac_cv_header_$ac_safe=no" | |
5639 | fi | |
5640 | rm -f conftest* | |
5641 | fi | |
5642 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5643 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 5644 | ac_cv_c_tkh=installed |
5436fc65 C |
5645 | else |
5646 | echo "$ac_t""no" 1>&6 | |
047465fd | 5647 | ac_cv_c_tkh="" |
5436fc65 C |
5648 | fi |
5649 | ||
4e327047 TT |
5650 | fi |
5651 | ||
5652 | fi | |
5653 | ||
5654 | if test x"${ac_cv_c_tkh}" != x ; then | |
5655 | no_tk="" | |
5656 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
5657 | echo "$ac_t""is installed" 1>&6 | |
5658 | TKHDIR="" | |
5659 | else | |
047465fd | 5660 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 |
4e327047 TT |
5661 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. |
5662 | TKHDIR="-I${ac_cv_c_tkh}" | |
5436fc65 C |
5663 | fi |
5664 | else | |
4e327047 TT |
5665 | TKHDIR="# no Tk directory found" |
5666 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
5667 | no_tk=true | |
5436fc65 C |
5668 | fi |
5669 | ||
5436fc65 C |
5670 | |
5671 | ||
2476848a MH |
5672 | |
5673 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
460845ab | 5674 | echo "configure:5675: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
5675 | if test x"${ac_cv_c_itclh}" = x ; then |
5676 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do | |
5677 | if test -f $i/src/itcl.h ; then | |
5678 | ac_cv_c_itclh=`(cd $i/src; pwd)` | |
5679 | break | |
5680 | fi | |
5681 | done | |
5682 | fi | |
5683 | if test x"${ac_cv_c_itclh}" = x ; then | |
5684 | ITCLHDIR="# no Itcl private headers found" | |
5685 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
5686 | fi | |
5687 | if test x"${ac_cv_c_itclh}" != x ; then | |
5688 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
5689 | fi | |
5690 | # should always be here | |
5691 | ITCLLIB="../itcl/src/libitcl.a" | |
5692 | ||
5693 | ||
5694 | ||
5695 | ||
5696 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
460845ab | 5697 | echo "configure:5698: checking for Tix private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
5698 | if test x"${ac_cv_c_tixh}" = x ; then |
5699 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
5700 | if test -f $i/generic/tix.h ; then | |
5701 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
5702 | break | |
5703 | fi | |
5704 | done | |
5705 | fi | |
5706 | if test x"${ac_cv_c_tixh}" = x ; then | |
5707 | TIXHDIR="# no Tix private headers found" | |
5708 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
5709 | fi | |
5710 | if test x"${ac_cv_c_tixh}" != x ; then | |
5711 | TIXHDIR="-I${ac_cv_c_tixh}" | |
5712 | fi | |
2476848a MH |
5713 | |
5714 | ||
5715 | ||
6bc5b2fa | 5716 | # now look for tix library stuff |
1154b47a | 5717 | TIXVERSION=4.1.8.0 |
6bc5b2fa MH |
5718 | . ${ac_cv_c_tclconfig}/tclConfig.sh |
5719 | case "${host}" in | |
b93f016b | 5720 | *-*-cygwin*) |
f1f6dd9c | 5721 | tixdir=../tix/win/tcl8.0 |
6bc5b2fa MH |
5722 | ;; |
5723 | *) | |
1154b47a | 5724 | tixdir=../tix/unix/tk8.0 |
6bc5b2fa MH |
5725 | ;; |
5726 | esac | |
bb3d9f43 KS |
5727 | if test "${TCL_SHARED_BUILD}" = "1"; then |
5728 | TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}" | |
11f91b2b KS |
5729 | |
5730 | # Can't win them all: SunOS 4 (others?) appends a version | |
5731 | # number after the ".so" | |
5732 | case "${host}" in | |
5733 | *-*-sunos4*) | |
5734 | TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;; | |
5735 | esac | |
5736 | ||
bb3d9f43 KS |
5737 | else |
5738 | TIX_LIB_EXT=".a" | |
5739 | fi | |
11f91b2b | 5740 | |
6bc5b2fa MH |
5741 | if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then |
5742 | TIXLIB="-L${tixdir} -ltix${TIXVERSION}" | |
bb3d9f43 | 5743 | TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}" |
6bc5b2fa MH |
5744 | else |
5745 | TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`" | |
bb3d9f43 | 5746 | TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}" |
6bc5b2fa | 5747 | fi |
5436fc65 | 5748 | |
0cf433d9 | 5749 | ENABLE_GDBTK=1 |
509b70ac | 5750 | ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK" |
5436fc65 | 5751 | |
6c310da8 | 5752 | # Include some libraries that Tcl and Tk want. |
2476848a | 5753 | if test "${enable_ide}" = "yes"; then |
8b5befef ILT |
5754 | TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
5755 | CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 5756 | else |
dafec9dd ILT |
5757 | TCL_LIBS='$(LIBGUI) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
5758 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 5759 | fi |
46964086 TT |
5760 | # Yes, the ordering seems wrong here. But it isn't. |
5761 | # TK_LIBS is the list of libraries that need to be linked | |
b177bf84 TT |
5762 | # after Tcl/Tk. Note that this isn't put into LIBS. If it |
5763 | # were in LIBS then any link tests after this point would | |
5764 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
5765 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
f3b86a30 | 5766 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o" |
9b119644 | 5767 | |
d836385e | 5768 | if test x$gdb_cv_os_cygwin = xyes; then |
018d76dd | 5769 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32" |
47792960 | 5770 | WIN32LDAPP="-Wl,--subsystem,console" |
929db6e5 | 5771 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" |
9b119644 | 5772 | fi |
0cf433d9 | 5773 | fi |
1a57cd09 | 5774 | fi |
a2b63bbd | 5775 | fi |
66efdff9 | 5776 | |
66efdff9 | 5777 | |
5436fc65 | 5778 | |
66efdff9 JM |
5779 | |
5780 | ||
6bc5b2fa | 5781 | |
018d76dd | 5782 | |
b177bf84 | 5783 | |
5436fc65 C |
5784 | # end-sanitize-gdbtk |
5785 | ||
b236defa FCE |
5786 | # If we find X, set shell vars x_includes and x_libraries to the |
5787 | # paths, otherwise set no_x=yes. | |
5788 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
5789 | # --without-x overrides everything else, but does not touch the cache. | |
5790 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
460845ab | 5791 | echo "configure:5792: checking for X" >&5 |
b236defa FCE |
5792 | |
5793 | # Check whether --with-x or --without-x was given. | |
5794 | if test "${with_x+set}" = set; then | |
5795 | withval="$with_x" | |
5796 | : | |
5797 | fi | |
5798 | ||
5799 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
5800 | if test "x$with_x" = xno; then | |
5801 | # The user explicitly disabled X. | |
5802 | have_x=disabled | |
5803 | else | |
5804 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
5805 | # Both variables are already set. | |
5806 | have_x=yes | |
5807 | else | |
5808 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
5809 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5810 | else | |
5811 | # One or both of the vars are not set, and there is no cached value. | |
5812 | ac_x_includes=NO ac_x_libraries=NO | |
5813 | rm -fr conftestdir | |
5814 | if mkdir conftestdir; then | |
5815 | cd conftestdir | |
5816 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
5817 | cat > Imakefile <<'EOF' | |
5818 | acfindx: | |
5819 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
5820 | EOF | |
5821 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
5822 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
5823 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
5824 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
5825 | for ac_extension in a so sl; do | |
5826 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
5827 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
5828 | ac_im_usrlibdir=$ac_im_libdir; break | |
5829 | fi | |
5830 | done | |
5831 | # Screen out bogus values from the imake configuration. They are | |
5832 | # bogus both because they are the default anyway, and because | |
5833 | # using them would break gcc on systems where it needs fixed includes. | |
5834 | case "$ac_im_incroot" in | |
5835 | /usr/include) ;; | |
5836 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
5837 | esac | |
5838 | case "$ac_im_usrlibdir" in | |
5839 | /usr/lib | /lib) ;; | |
5840 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
5841 | esac | |
5842 | fi | |
5843 | cd .. | |
5844 | rm -fr conftestdir | |
5845 | fi | |
5846 | ||
5847 | if test "$ac_x_includes" = NO; then | |
5848 | # Guess where to find include files, by looking for this one X11 .h file. | |
5849 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
5850 | ||
5851 | # First, try using that file with no special directory specified. | |
5852 | cat > conftest.$ac_ext <<EOF | |
460845ab | 5853 | #line 5854 "configure" |
b236defa FCE |
5854 | #include "confdefs.h" |
5855 | #include <$x_direct_test_include> | |
5856 | EOF | |
5857 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
460845ab | 5858 | { (eval echo configure:5859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 5859 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
b236defa FCE |
5860 | if test -z "$ac_err"; then |
5861 | rm -rf conftest* | |
5862 | # We can compile using X headers with no special include directory. | |
5863 | ac_x_includes= | |
5864 | else | |
5865 | echo "$ac_err" >&5 | |
5866 | echo "configure: failed program was:" >&5 | |
5867 | cat conftest.$ac_ext >&5 | |
5868 | rm -rf conftest* | |
5869 | # Look for the header file in a standard set of common directories. | |
5870 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
5871 | for ac_dir in \ | |
5872 | /usr/X11/include \ | |
5873 | /usr/X11R6/include \ | |
5874 | /usr/X11R5/include \ | |
5875 | /usr/X11R4/include \ | |
5876 | \ | |
5877 | /usr/include/X11 \ | |
5878 | /usr/include/X11R6 \ | |
5879 | /usr/include/X11R5 \ | |
5880 | /usr/include/X11R4 \ | |
5881 | \ | |
5882 | /usr/local/X11/include \ | |
5883 | /usr/local/X11R6/include \ | |
5884 | /usr/local/X11R5/include \ | |
5885 | /usr/local/X11R4/include \ | |
5886 | \ | |
5887 | /usr/local/include/X11 \ | |
5888 | /usr/local/include/X11R6 \ | |
5889 | /usr/local/include/X11R5 \ | |
5890 | /usr/local/include/X11R4 \ | |
5891 | \ | |
5892 | /usr/X386/include \ | |
5893 | /usr/x386/include \ | |
5894 | /usr/XFree86/include/X11 \ | |
5895 | \ | |
5896 | /usr/include \ | |
5897 | /usr/local/include \ | |
5898 | /usr/unsupported/include \ | |
5899 | /usr/athena/include \ | |
5900 | /usr/local/x11r5/include \ | |
5901 | /usr/lpp/Xamples/include \ | |
5902 | \ | |
5903 | /usr/openwin/include \ | |
5904 | /usr/openwin/share/include \ | |
5905 | ; \ | |
5906 | do | |
5907 | if test -r "$ac_dir/$x_direct_test_include"; then | |
5908 | ac_x_includes=$ac_dir | |
5909 | break | |
5910 | fi | |
5911 | done | |
5912 | fi | |
5913 | rm -f conftest* | |
5914 | fi # $ac_x_includes = NO | |
5915 | ||
5916 | if test "$ac_x_libraries" = NO; then | |
5917 | # Check for the libraries. | |
5918 | ||
5919 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
5920 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
5921 | ||
5922 | # See if we find them without any special options. | |
5923 | # Don't add to $LIBS permanently. | |
5924 | ac_save_LIBS="$LIBS" | |
5925 | LIBS="-l$x_direct_test_library $LIBS" | |
5926 | cat > conftest.$ac_ext <<EOF | |
460845ab | 5927 | #line 5928 "configure" |
b236defa FCE |
5928 | #include "confdefs.h" |
5929 | ||
5930 | int main() { | |
5931 | ${x_direct_test_function}() | |
5932 | ; return 0; } | |
5933 | EOF | |
460845ab | 5934 | if { (eval echo configure:5935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b236defa FCE |
5935 | rm -rf conftest* |
5936 | LIBS="$ac_save_LIBS" | |
5937 | # We can link X programs with no special library path. | |
5938 | ac_x_libraries= | |
5939 | else | |
5940 | echo "configure: failed program was:" >&5 | |
5941 | cat conftest.$ac_ext >&5 | |
5942 | rm -rf conftest* | |
5943 | LIBS="$ac_save_LIBS" | |
5944 | # First see if replacing the include by lib works. | |
5945 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
5946 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
5947 | /usr/X11/lib \ | |
5948 | /usr/X11R6/lib \ | |
5949 | /usr/X11R5/lib \ | |
5950 | /usr/X11R4/lib \ | |
5951 | \ | |
5952 | /usr/lib/X11 \ | |
5953 | /usr/lib/X11R6 \ | |
5954 | /usr/lib/X11R5 \ | |
5955 | /usr/lib/X11R4 \ | |
5956 | \ | |
5957 | /usr/local/X11/lib \ | |
5958 | /usr/local/X11R6/lib \ | |
5959 | /usr/local/X11R5/lib \ | |
5960 | /usr/local/X11R4/lib \ | |
5961 | \ | |
5962 | /usr/local/lib/X11 \ | |
5963 | /usr/local/lib/X11R6 \ | |
5964 | /usr/local/lib/X11R5 \ | |
5965 | /usr/local/lib/X11R4 \ | |
5966 | \ | |
5967 | /usr/X386/lib \ | |
5968 | /usr/x386/lib \ | |
5969 | /usr/XFree86/lib/X11 \ | |
5970 | \ | |
5971 | /usr/lib \ | |
5972 | /usr/local/lib \ | |
5973 | /usr/unsupported/lib \ | |
5974 | /usr/athena/lib \ | |
5975 | /usr/local/x11r5/lib \ | |
5976 | /usr/lpp/Xamples/lib \ | |
5977 | /lib/usr/lib/X11 \ | |
5978 | \ | |
5979 | /usr/openwin/lib \ | |
5980 | /usr/openwin/share/lib \ | |
5981 | ; \ | |
5982 | do | |
5983 | for ac_extension in a so sl; do | |
5984 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
5985 | ac_x_libraries=$ac_dir | |
5986 | break 2 | |
5987 | fi | |
5988 | done | |
5989 | done | |
5990 | fi | |
5991 | rm -f conftest* | |
5992 | fi # $ac_x_libraries = NO | |
5993 | ||
5994 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
5995 | # Didn't find X anywhere. Cache the known absence of X. | |
5996 | ac_cv_have_x="have_x=no" | |
5997 | else | |
5998 | # Record where we found X for the cache. | |
5999 | ac_cv_have_x="have_x=yes \ | |
6000 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
6001 | fi | |
6002 | fi | |
6003 | fi | |
6004 | eval "$ac_cv_have_x" | |
6005 | fi # $with_x != no | |
6006 | ||
6007 | if test "$have_x" != yes; then | |
6008 | echo "$ac_t""$have_x" 1>&6 | |
6009 | no_x=yes | |
6010 | else | |
6011 | # If each of the values was on the command line, it overrides each guess. | |
6012 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
6013 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
6014 | # Update the cache value to reflect the command line values. | |
6015 | ac_cv_have_x="have_x=yes \ | |
6016 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
6017 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
6018 | fi | |
6019 | ||
6020 | # start-sanitize-sky | |
6021 | # Enable GPU2 library for MIPS simulator | |
6022 | # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given. | |
6023 | if test "${with_sim_gpu2+set}" = set; then | |
6024 | withval="$with_sim_gpu2" | |
bd5eafcd | 6025 | case "${target}" in |
af3711e6 | 6026 | mips*-sky*-*) |
bd5eafcd FCE |
6027 | if test -d "${withval}" |
6028 | then | |
852b7d11 JM |
6029 | if test x${x_libraries} != x |
6030 | then | |
6031 | LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext -lm" | |
6032 | else | |
6033 | LIBS="${LIBS} -L${withval}/lib -lgpu2 -lX11 -lXext -lm" | |
6034 | fi | |
bd5eafcd FCE |
6035 | else |
6036 | echo "configure: warning: Directory ${withval} does not exist." 1>&2 | |
6037 | fi ;; | |
6038 | *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2 | |
6039 | esac | |
b236defa | 6040 | fi |
75a55dc3 JM |
6041 | |
6042 | # Enable target accurate FP library | |
6043 | # Check whether --with-sim-funit or --without-sim-funit was given. | |
6044 | if test "${with_sim_funit+set}" = set; then | |
6045 | withval="$with_sim_funit" | |
6046 | case "${target}" in | |
af3711e6 | 6047 | mips*-sky*-*) |
75a55dc3 JM |
6048 | if test -d "${withval}" |
6049 | then | |
6050 | LIBS="${LIBS} -L${withval}/lib -lfunit" | |
6051 | else | |
6052 | echo "configure: warning: Directory ${withval} does not exist." 1>&2 | |
6053 | fi ;; | |
6054 | *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2 | |
6055 | esac | |
6056 | fi | |
b236defa FCE |
6057 | # end-sanitize-sky |
6058 | ||
5436fc65 C |
6059 | |
6060 | ||
6061 | ||
6062 | ||
018d76dd | 6063 | |
c7bb1531 | 6064 | |
1d5eb137 FF |
6065 | # Begin stuff to support --enable-shared |
6066 | # Check whether --enable-shared or --disable-shared was given. | |
6067 | if test "${enable_shared+set}" = set; then | |
6068 | enableval="$enable_shared" | |
6069 | case "${enableval}" in | |
6070 | yes) shared=true ;; | |
6071 | no) shared=false ;; | |
6072 | *) shared=true ;; | |
6073 | esac | |
6074 | fi | |
6075 | ||
6076 | HLDFLAGS= | |
6077 | HLDENV= | |
6078 | # If we have shared libraries, try to set rpath reasonably. | |
6079 | if test "${shared}" = "true"; then | |
6080 | case "${host}" in | |
6081 | *-*-hpux*) | |
6082 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
6083 | ;; | |
6084 | *-*-irix5* | *-*-irix6*) | |
6085 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
6086 | ;; | |
6087 | *-*-linux*aout*) | |
6088 | ;; | |
8ddf07a2 | 6089 | *-*-linux* | *-pc-linux-gnu) |
1d5eb137 FF |
6090 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
6091 | ;; | |
6092 | *-*-solaris*) | |
6093 | HLDFLAGS='-R $(libdir)' | |
6094 | ;; | |
6095 | *-*-sysv4*) | |
6096 | 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;' | |
6097 | ;; | |
6098 | esac | |
6099 | fi | |
6100 | ||
6101 | # On SunOS, if the linker supports the -rpath option, use it to | |
6102 | # prevent ../bfd and ../opcodes from being included in the run time | |
6103 | # search path. | |
6104 | case "${host}" in | |
6105 | *-*-sunos*) | |
6106 | echo 'main () { }' > conftest.c | |
6107 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
6108 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
6109 | : | |
6110 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
6111 | : | |
6112 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
6113 | : | |
074d813d PS |
6114 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then |
6115 | : | |
1d5eb137 FF |
6116 | elif test "${shared}" = "true"; then |
6117 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
6118 | else | |
6119 | HLDFLAGS='-Wl,-rpath=' | |
6120 | fi | |
6121 | rm -f conftest.t conftest.c conftest | |
6122 | ;; | |
6123 | esac | |
6124 | ||
6125 | ||
6126 | # End stuff to support --enable-shared | |
6127 | ||
7c40dd08 DE |
6128 | # target_subdir is used by the testsuite to find the target libraries. |
6129 | target_subdir= | |
6130 | if test "${host}" != "${target}"; then | |
6131 | target_subdir="${target_alias}/" | |
6132 | fi | |
6133 | ||
5436fc65 | 6134 | |
5f107900 | 6135 | frags= |
5436fc65 C |
6136 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
6137 | if test ! -f ${host_makefile_frag}; then | |
6138 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
6139 | fi | |
5f107900 | 6140 | frags="$frags $host_makefile_frag" |
5436fc65 C |
6141 | |
6142 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
6143 | if test ! -f ${target_makefile_frag}; then | |
6144 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
6145 | fi | |
5f107900 | 6146 | frags="$frags $target_makefile_frag" |
5436fc65 C |
6147 | |
6148 | ||
6149 | ||
6150 | ||
6151 | ||
094fd4ae C |
6152 | hostfile=`sed -n ' |
6153 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
6154 | ' ${host_makefile_frag}` | |
5436fc65 | 6155 | |
094fd4ae C |
6156 | targetfile=`sed -n ' |
6157 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
6158 | ' ${target_makefile_frag}` | |
5436fc65 C |
6159 | |
6160 | # these really aren't orthogonal true/false values of the same condition, | |
6161 | # but shells are slow enough that I like to reuse the test conditions | |
6162 | # whenever possible | |
6163 | if test "${target}" = "${host}"; then | |
094fd4ae C |
6164 | nativefile=`sed -n ' |
6165 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
6166 | ' ${host_makefile_frag}` | |
33ef0f93 | 6167 | # else |
5436fc65 | 6168 | # GDBserver is only useful in a "native" enviroment |
33ef0f93 | 6169 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` |
5436fc65 C |
6170 | fi |
6171 | ||
094fd4ae | 6172 | |
5436fc65 C |
6173 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
6174 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
6175 | # corresponding links. But we have to remove the xm.h files and tm.h | |
6176 | # files anyway, e.g. when switching from "configure host" to | |
6177 | # "configure none". | |
6178 | ||
6179 | files= | |
6180 | links= | |
6181 | rm -f xm.h | |
6182 | if test "${hostfile}" != ""; then | |
6183 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
6184 | links="${links} xm.h" | |
6185 | fi | |
6186 | rm -f tm.h | |
6187 | if test "${targetfile}" != ""; then | |
6188 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
6189 | links="${links} tm.h" | |
6190 | fi | |
6191 | rm -f nm.h | |
6192 | if test "${nativefile}" != ""; then | |
6193 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
6194 | links="${links} nm.h" | |
6195 | else | |
6196 | # A cross-only configuration. | |
6197 | files="${files} config/nm-empty.h" | |
6198 | links="${links} nm.h" | |
6199 | fi | |
6200 | # start-sanitize-gdbtk | |
99174711 | 6201 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
460845ab | 6202 | echo "configure:6203: checking whether ln -s works" >&5 |
99174711 JM |
6203 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
6204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6205 | else | |
6206 | rm -f conftestdata | |
6207 | if ln -s X conftestdata 2>/dev/null | |
6208 | then | |
6209 | rm -f conftestdata | |
6210 | ac_cv_prog_LN_S="ln -s" | |
6211 | else | |
6212 | ac_cv_prog_LN_S=ln | |
6213 | fi | |
6214 | fi | |
6215 | LN_S="$ac_cv_prog_LN_S" | |
6216 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
6217 | echo "$ac_t""yes" 1>&6 | |
6218 | else | |
6219 | echo "$ac_t""no" 1>&6 | |
6220 | fi | |
5436fc65 C |
6221 | |
6222 | # Make it possible to use the GUI without doing a full install | |
454e0c7d AC |
6223 | if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl2 ; then |
6224 | if test "$LN_S" = "ln -s" -a ! -f gdbtcl2 ; then | |
6225 | echo linking $srcdir/gdbtcl2 to gdbtcl2 | |
6226 | $LN_S $srcdir/gdbtcl2 gdbtcl2 | |
99174711 | 6227 | else |
454e0c7d | 6228 | echo Warning: Unable to link $srcdir/gdbtcl2 to gdbtcl2. You will need to do a |
99174711 JM |
6229 | echo " " make install before you are able to run the GUI. |
6230 | fi | |
5436fc65 C |
6231 | fi |
6232 | # end-sanitize-gdbtk | |
6233 | ||
6234 | ||
6235 | ||
d836385e | 6236 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
460845ab | 6237 | echo "configure:6238: checking for Cygwin environment" >&5 |
d836385e | 6238 | if eval "test \"`echo '$''{'am_cv_cygwin'+set}'`\" = set"; then |
3fbb8cde ILT |
6239 | echo $ac_n "(cached) $ac_c" 1>&6 |
6240 | else | |
6241 | cat > conftest.$ac_ext <<EOF | |
460845ab | 6242 | #line 6243 "configure" |
3fbb8cde ILT |
6243 | #include "confdefs.h" |
6244 | ||
6245 | int main() { | |
94a91918 | 6246 | return __CYGWIN32__; |
3fbb8cde ILT |
6247 | ; return 0; } |
6248 | EOF | |
460845ab | 6249 | if { (eval echo configure:6250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3fbb8cde | 6250 | rm -rf conftest* |
d836385e | 6251 | am_cv_cygwin=yes |
3fbb8cde ILT |
6252 | else |
6253 | echo "configure: failed program was:" >&5 | |
6254 | cat conftest.$ac_ext >&5 | |
6255 | rm -rf conftest* | |
d836385e | 6256 | am_cv_cygwin=no |
3fbb8cde ILT |
6257 | fi |
6258 | rm -f conftest* | |
6259 | rm -f conftest* | |
6260 | fi | |
6261 | ||
d836385e GN |
6262 | echo "$ac_t""$am_cv_cygwin" 1>&6 |
6263 | CYGWIN= | |
6264 | test "$am_cv_cygwin" = yes && CYGWIN=yes | |
6265 | echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 | |
460845ab | 6266 | echo "configure:6267: checking for Mingw32 environment" >&5 |
d836385e | 6267 | if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then |
b2b1c5da MM |
6268 | echo $ac_n "(cached) $ac_c" 1>&6 |
6269 | else | |
6270 | cat > conftest.$ac_ext <<EOF | |
460845ab | 6271 | #line 6272 "configure" |
b2b1c5da MM |
6272 | #include "confdefs.h" |
6273 | ||
6274 | int main() { | |
6275 | return __MINGW32__; | |
6276 | ; return 0; } | |
6277 | EOF | |
460845ab | 6278 | if { (eval echo configure:6279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2b1c5da | 6279 | rm -rf conftest* |
d836385e | 6280 | am_cv_mingw32=yes |
b2b1c5da MM |
6281 | else |
6282 | echo "configure: failed program was:" >&5 | |
6283 | cat conftest.$ac_ext >&5 | |
6284 | rm -rf conftest* | |
d836385e | 6285 | am_cv_mingw32=no |
b2b1c5da MM |
6286 | fi |
6287 | rm -f conftest* | |
6288 | rm -f conftest* | |
6289 | fi | |
6290 | ||
d836385e | 6291 | echo "$ac_t""$am_cv_mingw32" 1>&6 |
b2b1c5da | 6292 | MINGW32= |
d836385e | 6293 | test "$am_cv_mingw32" = yes && MINGW32=yes |
b2b1c5da | 6294 | |
98fa4ade GN |
6295 | |
6296 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
460845ab | 6297 | echo "configure:6298: checking for executable suffix" >&5 |
d836385e | 6298 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
98fa4ade GN |
6299 | echo $ac_n "(cached) $ac_c" 1>&6 |
6300 | else | |
d836385e GN |
6301 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
6302 | am_cv_exeext=.exe | |
6303 | else | |
6304 | cat > am_c_test.c << 'EOF' | |
6305 | int main() { | |
6306 | /* Nothing needed here */ | |
6307 | } | |
6308 | EOF | |
6309 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
6310 | am_cv_exeext= | |
6311 | for file in am_c_test.*; do | |
6312 | case $file in | |
6313 | *.c) ;; | |
6314 | *.o) ;; | |
6315 | *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; | |
6316 | esac | |
6317 | done | |
6318 | rm -f am_c_test* | |
98fa4ade | 6319 | fi |
9c1fb2a7 | 6320 | |
d836385e GN |
6321 | test x"${am_cv_exeext}" = x && am_cv_exeext=no |
6322 | fi | |
98fa4ade | 6323 | EXEEXT="" |
d836385e GN |
6324 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} |
6325 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
98fa4ade GN |
6326 | |
6327 | ||
5436fc65 C |
6328 | subdirs="$configdirs" |
6329 | ||
6330 | trap '' 1 2 15 | |
6331 | cat > confcache <<\EOF | |
6332 | # This file is a shell script that caches the results of configure | |
6333 | # tests run on this system so they can be shared between configure | |
6334 | # scripts and configure runs. It is not useful on other systems. | |
6335 | # If it contains results you don't want to keep, you may remove or edit it. | |
6336 | # | |
6337 | # By default, configure uses ./config.cache as the cache file, | |
6338 | # creating it if it does not exist already. You can give configure | |
6339 | # the --cache-file=FILE option to use a different cache file; that is | |
6340 | # what configure does when it calls configure scripts in | |
6341 | # subdirectories, so they share the cache. | |
6342 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
6343 | # config.status only pays attention to the cache file if you give it the | |
6344 | # --recheck option to rerun configure. | |
6345 | # | |
6346 | EOF | |
bfde4a67 SG |
6347 | # The following way of writing the cache mishandles newlines in values, |
6348 | # but we know of no workaround that is simple, portable, and efficient. | |
6349 | # So, don't put newlines in cache variables' values. | |
5436fc65 C |
6350 | # Ultrix sh set writes to stderr and can't be redirected directly, |
6351 | # and sets the high bit in the cache file unless we assign to the vars. | |
6352 | (set) 2>&1 | | |
d836385e | 6353 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
bfde4a67 SG |
6354 | *ac_space=\ *) |
6355 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
6356 | # turns \\\\ into \\, and sed turns \\ into \). | |
6357 | sed -n \ | |
6358 | -e "s/'/'\\\\''/g" \ | |
6359 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
6360 | ;; | |
6361 | *) | |
6362 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
6363 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
6364 | ;; | |
6365 | esac >> confcache | |
5436fc65 C |
6366 | if cmp -s $cache_file confcache; then |
6367 | : | |
6368 | else | |
6369 | if test -w $cache_file; then | |
6370 | echo "updating cache $cache_file" | |
6371 | cat confcache > $cache_file | |
6372 | else | |
6373 | echo "not updating unwritable cache $cache_file" | |
6374 | fi | |
6375 | fi | |
6376 | rm -f confcache | |
6377 | ||
6378 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
6379 | ||
6380 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
6381 | # Let make expand exec_prefix. | |
6382 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6383 | ||
6384 | # Any assignment to VPATH causes Sun make to only execute | |
6385 | # the first set of double-colon rules, so remove it if not needed. | |
6386 | # If there is a colon in the path, we need to keep it. | |
6387 | if test "x$srcdir" = x.; then | |
6388 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
6389 | fi | |
6390 | ||
6391 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
6392 | ||
db210d08 | 6393 | DEFS=-DHAVE_CONFIG_H |
5436fc65 C |
6394 | |
6395 | # Without the "./", some shells look in PATH for config.status. | |
6396 | : ${CONFIG_STATUS=./config.status} | |
6397 | ||
6398 | echo creating $CONFIG_STATUS | |
6399 | rm -f $CONFIG_STATUS | |
6400 | cat > $CONFIG_STATUS <<EOF | |
6401 | #! /bin/sh | |
6402 | # Generated automatically by configure. | |
6403 | # Run this file to recreate the current configuration. | |
6404 | # This directory was configured as follows, | |
6405 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
6406 | # | |
6407 | # $0 $ac_configure_args | |
6408 | # | |
6409 | # Compiler output produced by configure, useful for debugging | |
6410 | # configure, is in ./config.log if it exists. | |
6411 | ||
6412 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
6413 | for ac_option | |
6414 | do | |
6415 | case "\$ac_option" in | |
6416 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
6417 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
6418 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
6419 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
4b23e55c | 6420 | echo "$CONFIG_STATUS generated by autoconf version 2.12.2" |
5436fc65 C |
6421 | exit 0 ;; |
6422 | -help | --help | --hel | --he | --h) | |
6423 | echo "\$ac_cs_usage"; exit 0 ;; | |
6424 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
6425 | esac | |
6426 | done | |
6427 | ||
6428 | ac_given_srcdir=$srcdir | |
6429 | ac_given_INSTALL="$INSTALL" | |
6430 | ||
460845ab | 6431 | trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1a7b4b7c DE |
6432 | EOF |
6433 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 6434 | |
1a7b4b7c DE |
6435 | # Protect against being on the right side of a sed subst in config.status. |
6436 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
6437 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
5436fc65 C |
6438 | $ac_vpsub |
6439 | $extrasub | |
4b23e55c | 6440 | s%@SHELL@%$SHELL%g |
5436fc65 C |
6441 | s%@CFLAGS@%$CFLAGS%g |
6442 | s%@CPPFLAGS@%$CPPFLAGS%g | |
6443 | s%@CXXFLAGS@%$CXXFLAGS%g | |
6444 | s%@DEFS@%$DEFS%g | |
6445 | s%@LDFLAGS@%$LDFLAGS%g | |
6446 | s%@LIBS@%$LIBS%g | |
6447 | s%@exec_prefix@%$exec_prefix%g | |
6448 | s%@prefix@%$prefix%g | |
6449 | s%@program_transform_name@%$program_transform_name%g | |
1a7b4b7c DE |
6450 | s%@bindir@%$bindir%g |
6451 | s%@sbindir@%$sbindir%g | |
6452 | s%@libexecdir@%$libexecdir%g | |
6453 | s%@datadir@%$datadir%g | |
6454 | s%@sysconfdir@%$sysconfdir%g | |
6455 | s%@sharedstatedir@%$sharedstatedir%g | |
6456 | s%@localstatedir@%$localstatedir%g | |
6457 | s%@libdir@%$libdir%g | |
6458 | s%@includedir@%$includedir%g | |
6459 | s%@oldincludedir@%$oldincludedir%g | |
6460 | s%@infodir@%$infodir%g | |
6461 | s%@mandir@%$mandir%g | |
5436fc65 C |
6462 | s%@CC@%$CC%g |
6463 | s%@CPP@%$CPP%g | |
5436fc65 C |
6464 | s%@host@%$host%g |
6465 | s%@host_alias@%$host_alias%g | |
6466 | s%@host_cpu@%$host_cpu%g | |
6467 | s%@host_vendor@%$host_vendor%g | |
6468 | s%@host_os@%$host_os%g | |
0579b53d GN |
6469 | s%@target@%$target%g |
6470 | s%@target_alias@%$target_alias%g | |
6471 | s%@target_cpu@%$target_cpu%g | |
6472 | s%@target_vendor@%$target_vendor%g | |
6473 | s%@target_os@%$target_os%g | |
5436fc65 C |
6474 | s%@build@%$build%g |
6475 | s%@build_alias@%$build_alias%g | |
6476 | s%@build_cpu@%$build_cpu%g | |
6477 | s%@build_vendor@%$build_vendor%g | |
6478 | s%@build_os@%$build_os%g | |
fcfc3c0c TT |
6479 | s%@SET_MAKE@%$SET_MAKE%g |
6480 | s%@RANLIB@%$RANLIB%g | |
6481 | s%@ALLOCA@%$ALLOCA%g | |
6482 | s%@USE_NLS@%$USE_NLS%g | |
6483 | s%@MSGFMT@%$MSGFMT%g | |
6484 | s%@GMSGFMT@%$GMSGFMT%g | |
6485 | s%@XGETTEXT@%$XGETTEXT%g | |
6486 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
6487 | s%@CATALOGS@%$CATALOGS%g | |
6488 | s%@CATOBJEXT@%$CATOBJEXT%g | |
6489 | s%@DATADIRNAME@%$DATADIRNAME%g | |
6490 | s%@GMOFILES@%$GMOFILES%g | |
6491 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
6492 | s%@INTLDEPS@%$INTLDEPS%g | |
6493 | s%@INTLLIBS@%$INTLLIBS%g | |
6494 | s%@INTLOBJS@%$INTLOBJS%g | |
6495 | s%@POFILES@%$POFILES%g | |
6496 | s%@POSUB@%$POSUB%g | |
6497 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
6498 | s%@GT_NO@%$GT_NO%g | |
6499 | s%@GT_YES@%$GT_YES%g | |
6500 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
6501 | s%@l@%$l%g | |
0579b53d GN |
6502 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
6503 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
d8efbc66 | 6504 | s%@AR@%$AR%g |
d8efbc66 | 6505 | s%@YACC@%$YACC%g |
adcb1e06 | 6506 | s%@TERM_LIB@%$TERM_LIB%g |
4915acad | 6507 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
460845ab DT |
6508 | s%@BUILD_TUI@%$BUILD_TUI%g |
6509 | s%@TUI_LIBRARY@%$TUI_LIBRARY%g | |
ba68ad57 | 6510 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
0728afad FF |
6511 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
6512 | s%@MMALLOC@%$MMALLOC%g | |
287026b7 | 6513 | s%@MACHINE_OBS@%$MACHINE_OBS%g |
2476848a | 6514 | s%@ENABLE_IDE@%$ENABLE_IDE%g |
c076f1ed DM |
6515 | s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g |
6516 | s%@LIBGUI@%$LIBGUI%g | |
6517 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
6518 | s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g | |
6519 | s%@IDE_X@%$IDE_X%g | |
6520 | s%@LIBIDETCL@%$LIBIDETCL%g | |
6521 | s%@LIBIDE@%$LIBIDE%g | |
6522 | s%@IDE_DEPS@%$IDE_DEPS%g | |
9b119644 ILT |
6523 | s%@WIN32LIBS@%$WIN32LIBS%g |
6524 | s%@WIN32LDAPP@%$WIN32LDAPP%g | |
b0f33a03 | 6525 | s%@DLLTOOL@%$DLLTOOL%g |
929db6e5 | 6526 | s%@WINDRES@%$WINDRES%g |
047465fd TT |
6527 | s%@TCL_VERSION@%$TCL_VERSION%g |
6528 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
6529 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
6530 | s%@TCL_CC@%$TCL_CC%g | |
6531 | s%@TCL_DEFS@%$TCL_DEFS%g | |
6532 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
6533 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
6534 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
6535 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
6536 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
6537 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
6538 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
6539 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
6540 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
6541 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
6542 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
6543 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
6544 | s%@TK_VERSION@%$TK_VERSION%g | |
6545 | s%@TK_DEFS@%$TK_DEFS%g | |
9b119644 | 6546 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g |
047465fd TT |
6547 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g |
6548 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
6549 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
6550 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
5436fc65 | 6551 | s%@TCLHDIR@%$TCLHDIR%g |
4e327047 | 6552 | s%@TKHDIR@%$TKHDIR%g |
2476848a MH |
6553 | s%@ITCLHDIR@%$ITCLHDIR%g |
6554 | s%@ITCLLIB@%$ITCLLIB%g | |
6555 | s%@TIXHDIR@%$TIXHDIR%g | |
5436fc65 | 6556 | s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g |
047465fd | 6557 | s%@X_CFLAGS@%$X_CFLAGS%g |
a2b63bbd | 6558 | s%@X_LDFLAGS@%$X_LDFLAGS%g |
047465fd | 6559 | s%@X_LIBS@%$X_LIBS%g |
6bc5b2fa | 6560 | s%@TIXLIB@%$TIXLIB%g |
018d76dd | 6561 | s%@TIX_DEPS@%$TIX_DEPS%g |
b177bf84 | 6562 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
5436fc65 | 6563 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
6c310da8 | 6564 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
018d76dd | 6565 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
c7bb1531 | 6566 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g |
1d5eb137 FF |
6567 | s%@HLDFLAGS@%$HLDFLAGS%g |
6568 | s%@HLDENV@%$HLDENV%g | |
7c40dd08 | 6569 | s%@target_subdir@%$target_subdir%g |
5436fc65 C |
6570 | /@host_makefile_frag@/r $host_makefile_frag |
6571 | s%@host_makefile_frag@%%g | |
6572 | /@target_makefile_frag@/r $target_makefile_frag | |
6573 | s%@target_makefile_frag@%%g | |
5f107900 | 6574 | s%@frags@%$frags%g |
99174711 | 6575 | s%@LN_S@%$LN_S%g |
3fbb8cde | 6576 | s%@EXEEXT@%$EXEEXT%g |
5436fc65 C |
6577 | s%@subdirs@%$subdirs%g |
6578 | ||
6579 | CEOF | |
6580 | EOF | |
bfde4a67 SG |
6581 | |
6582 | cat >> $CONFIG_STATUS <<\EOF | |
6583 | ||
6584 | # Split the substitutions into bite-sized pieces for seds with | |
6585 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
6586 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
6587 | ac_file=1 # Number of current file. | |
6588 | ac_beg=1 # First line for current file. | |
6589 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
6590 | ac_more_lines=: | |
6591 | ac_sed_cmds="" | |
6592 | while $ac_more_lines; do | |
6593 | if test $ac_beg -gt 1; then | |
6594 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
6595 | else | |
6596 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
6597 | fi | |
6598 | if test ! -s conftest.s$ac_file; then | |
6599 | ac_more_lines=false | |
6600 | rm -f conftest.s$ac_file | |
6601 | else | |
6602 | if test -z "$ac_sed_cmds"; then | |
6603 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
6604 | else | |
6605 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
6606 | fi | |
6607 | ac_file=`expr $ac_file + 1` | |
6608 | ac_beg=$ac_end | |
6609 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
6610 | fi | |
6611 | done | |
6612 | if test -z "$ac_sed_cmds"; then | |
6613 | ac_sed_cmds=cat | |
6614 | fi | |
6615 | EOF | |
6616 | ||
5436fc65 C |
6617 | cat >> $CONFIG_STATUS <<EOF |
6618 | ||
460845ab | 6619 | CONFIG_FILES=\${CONFIG_FILES-"Makefile tui/Makefile .gdbinit:gdbinit.in"} |
5436fc65 C |
6620 | EOF |
6621 | cat >> $CONFIG_STATUS <<\EOF | |
6622 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
bfde4a67 | 6623 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
5436fc65 | 6624 | case "$ac_file" in |
bfde4a67 | 6625 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
5436fc65 C |
6626 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
6627 | *) ac_file_in="${ac_file}.in" ;; | |
6628 | esac | |
6629 | ||
bfde4a67 | 6630 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
5436fc65 C |
6631 | |
6632 | # Remove last slash and all that follows it. Not all systems have dirname. | |
6633 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
6634 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
6635 | # The file is in a subdirectory. | |
6636 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
6637 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
6638 | # A "../" for each directory in $ac_dir_suffix. | |
6639 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
6640 | else | |
6641 | ac_dir_suffix= ac_dots= | |
6642 | fi | |
6643 | ||
6644 | case "$ac_given_srcdir" in | |
6645 | .) srcdir=. | |
6646 | if test -z "$ac_dots"; then top_srcdir=. | |
6647 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
6648 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
6649 | *) # Relative path. | |
6650 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
6651 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
6652 | esac | |
6653 | ||
6654 | case "$ac_given_INSTALL" in | |
6655 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
6656 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
6657 | esac | |
bfde4a67 | 6658 | |
5436fc65 C |
6659 | echo creating "$ac_file" |
6660 | rm -f "$ac_file" | |
6661 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
6662 | case "$ac_file" in | |
6663 | *Makefile*) ac_comsub="1i\\ | |
6664 | # $configure_input" ;; | |
6665 | *) ac_comsub= ;; | |
6666 | esac | |
bfde4a67 SG |
6667 | |
6668 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5436fc65 C |
6669 | sed -e "$ac_comsub |
6670 | s%@configure_input@%$configure_input%g | |
6671 | s%@srcdir@%$srcdir%g | |
6672 | s%@top_srcdir@%$top_srcdir%g | |
6673 | s%@INSTALL@%$INSTALL%g | |
bfde4a67 | 6674 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
5436fc65 | 6675 | fi; done |
bfde4a67 | 6676 | rm -f conftest.s* |
5436fc65 | 6677 | |
db210d08 FF |
6678 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
6679 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
6680 | # | |
6681 | # ac_d sets the value in "#define NAME VALUE" lines. | |
6682 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
6683 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
6684 | ac_dC='\3' | |
6685 | ac_dD='%g' | |
6686 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
6687 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6688 | ac_uB='\([ ]\)%\1#\2define\3' | |
6689 | ac_uC=' ' | |
6690 | ac_uD='\4%g' | |
6691 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
6692 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6693 | ac_eB='$%\1#\2define\3' | |
6694 | ac_eC=' ' | |
6695 | ac_eD='%g' | |
6696 | ||
bfde4a67 SG |
6697 | if test "${CONFIG_HEADERS+set}" != set; then |
6698 | EOF | |
6699 | cat >> $CONFIG_STATUS <<EOF | |
6700 | CONFIG_HEADERS="config.h:config.in" | |
6701 | EOF | |
6702 | cat >> $CONFIG_STATUS <<\EOF | |
6703 | fi | |
db210d08 | 6704 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
bfde4a67 | 6705 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
db210d08 | 6706 | case "$ac_file" in |
bfde4a67 | 6707 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
db210d08 FF |
6708 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
6709 | *) ac_file_in="${ac_file}.in" ;; | |
6710 | esac | |
6711 | ||
6712 | echo creating $ac_file | |
6713 | ||
6714 | rm -f conftest.frag conftest.in conftest.out | |
bfde4a67 SG |
6715 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
6716 | cat $ac_file_inputs > conftest.in | |
db210d08 FF |
6717 | |
6718 | EOF | |
6719 | ||
6720 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
6721 | # the proper values into config.h.in to produce config.h. And first: | |
1a7b4b7c | 6722 | # Protect against being on the right side of a sed subst in config.status. |
db210d08 FF |
6723 | # Protect against being in an unquoted here document in config.status. |
6724 | rm -f conftest.vals | |
6725 | cat > conftest.hdr <<\EOF | |
6726 | s/[\\&%]/\\&/g | |
6727 | s%[\\$`]%\\&%g | |
bc859e63 | 6728 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
db210d08 FF |
6729 | s%ac_d%ac_u%gp |
6730 | s%ac_u%ac_e%gp | |
6731 | EOF | |
6732 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
6733 | rm -f conftest.hdr | |
6734 | ||
6735 | # This sed command replaces #undef with comments. This is necessary, for | |
6736 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
6737 | # on some systems where configure will not decide to define it. | |
6738 | cat >> conftest.vals <<\EOF | |
6739 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
6740 | EOF | |
6741 | ||
6742 | # Break up conftest.vals because some shells have a limit on | |
6743 | # the size of here documents, and old seds have small limits too. | |
db210d08 FF |
6744 | |
6745 | rm -f conftest.tail | |
6746 | while : | |
6747 | do | |
6748 | ac_lines=`grep -c . conftest.vals` | |
6749 | # grep -c gives empty output for an empty file on some AIX systems. | |
6750 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
6751 | # Write a limited-size here document to conftest.frag. | |
6752 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
6753 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
6754 | echo 'CEOF | |
6755 | sed -f conftest.frag conftest.in > conftest.out | |
6756 | rm -f conftest.in | |
6757 | mv conftest.out conftest.in | |
6758 | ' >> $CONFIG_STATUS | |
6759 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
6760 | rm -f conftest.vals | |
6761 | mv conftest.tail conftest.vals | |
6762 | done | |
6763 | rm -f conftest.vals | |
6764 | ||
6765 | cat >> $CONFIG_STATUS <<\EOF | |
6766 | rm -f conftest.frag conftest.h | |
6767 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
6768 | cat conftest.in >> conftest.h | |
6769 | rm -f conftest.in | |
6770 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
6771 | echo "$ac_file is unchanged" | |
6772 | rm -f conftest.h | |
6773 | else | |
bc859e63 SG |
6774 | # Remove last slash and all that follows it. Not all systems have dirname. |
6775 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
6776 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
6777 | # The file is in a subdirectory. | |
6778 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
6779 | fi | |
db210d08 FF |
6780 | rm -f $ac_file |
6781 | mv conftest.h $ac_file | |
6782 | fi | |
6783 | fi; done | |
6784 | ||
5436fc65 C |
6785 | EOF |
6786 | ||
6787 | cat >> $CONFIG_STATUS <<EOF | |
6788 | ac_sources="$files" | |
6789 | ac_dests="$links" | |
6790 | EOF | |
6791 | ||
6792 | cat >> $CONFIG_STATUS <<\EOF | |
6793 | srcdir=$ac_given_srcdir | |
6794 | while test -n "$ac_sources"; do | |
6795 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
6796 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
6797 | ||
6798 | echo "linking $srcdir/$ac_source to $ac_dest" | |
6799 | ||
6800 | if test ! -r $srcdir/$ac_source; then | |
6801 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
6802 | fi | |
6803 | rm -f $ac_dest | |
6804 | ||
6805 | # Make relative symlinks. | |
6806 | # Remove last slash and all that follows it. Not all systems have dirname. | |
6807 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
6808 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
6809 | # The dest file is in a subdirectory. | |
6810 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
6811 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
6812 | # A "../" for each directory in $ac_dest_dir_suffix. | |
6813 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
6814 | else | |
6815 | ac_dest_dir_suffix= ac_dots= | |
6816 | fi | |
6817 | ||
6818 | case "$srcdir" in | |
6819 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
6820 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
6821 | esac | |
6822 | ||
6823 | # Make a symlink if possible; otherwise try a hard link. | |
6824 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
6825 | ln $srcdir/$ac_source $ac_dest; then : | |
6826 | else | |
6827 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
6828 | fi | |
6829 | done | |
0a5a1821 C |
6830 | EOF |
6831 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 6832 | |
0a5a1821 C |
6833 | gdb_host_cpu=$gdb_host_cpu |
6834 | gdb_target_cpu=$gdb_target_cpu | |
6835 | nativefile=$nativefile | |
6836 | ||
6837 | EOF | |
6838 | cat >> $CONFIG_STATUS <<\EOF | |
5436fc65 C |
6839 | |
6840 | if test "${nativefile}" = ""; then | |
7bd1f0c5 | 6841 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ |
5436fc65 C |
6842 | < Makefile > Makefile.tem |
6843 | mv -f Makefile.tem Makefile | |
6844 | fi | |
6845 | ||
6846 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
6847 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
6848 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
6849 | mv -f Makefile.tmp Makefile | |
6850 | ||
31520669 | 6851 | case x$CONFIG_HEADERS in |
18ea4416 | 6852 | xconfig.h:config.in) |
31520669 FF |
6853 | echo > stamp-h ;; |
6854 | esac | |
6855 | ||
5436fc65 C |
6856 | exit 0 |
6857 | EOF | |
6858 | chmod +x $CONFIG_STATUS | |
6859 | rm -fr confdefs* $ac_clean_files | |
6860 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
6861 | ||
6862 | if test "$no_recursion" != yes; then | |
6863 | ||
6864 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
6865 | ac_sub_configure_args= | |
6866 | ac_prev= | |
6867 | for ac_arg in $ac_configure_args; do | |
6868 | if test -n "$ac_prev"; then | |
6869 | ac_prev= | |
6870 | continue | |
6871 | fi | |
6872 | case "$ac_arg" in | |
6873 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6874 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6875 | ac_prev=cache_file ;; | |
6876 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6877 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
6878 | ;; | |
6879 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6880 | ac_prev=srcdir ;; | |
6881 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6882 | ;; | |
6883 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
6884 | esac | |
6885 | done | |
6886 | ||
6887 | for ac_config_dir in $configdirs; do | |
6888 | ||
6889 | # Do not complain, so a configure script can configure whichever | |
6890 | # parts of a large source tree are present. | |
6891 | if test ! -d $srcdir/$ac_config_dir; then | |
6892 | continue | |
6893 | fi | |
6894 | ||
6895 | echo configuring in $ac_config_dir | |
6896 | ||
6897 | case "$srcdir" in | |
6898 | .) ;; | |
6899 | *) | |
6900 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
6901 | else | |
6902 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
6903 | fi | |
6904 | ;; | |
6905 | esac | |
6906 | ||
6907 | ac_popdir=`pwd` | |
6908 | cd $ac_config_dir | |
6909 | ||
bfde4a67 SG |
6910 | # A "../" for each directory in /$ac_config_dir. |
6911 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
6912 | ||
5436fc65 C |
6913 | case "$srcdir" in |
6914 | .) # No --srcdir option. We are building in place. | |
6915 | ac_sub_srcdir=$srcdir ;; | |
6916 | /*) # Absolute path. | |
6917 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
6918 | *) # Relative path. | |
bfde4a67 | 6919 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
5436fc65 C |
6920 | esac |
6921 | ||
6922 | # Check for guested configure; otherwise get Cygnus style configure. | |
6923 | if test -f $ac_sub_srcdir/configure; then | |
6924 | ac_sub_configure=$ac_sub_srcdir/configure | |
6925 | elif test -f $ac_sub_srcdir/configure.in; then | |
6926 | ac_sub_configure=$ac_configure | |
6927 | else | |
6928 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
6929 | ac_sub_configure= | |
6930 | fi | |
6931 | ||
6932 | # The recursion is here. | |
6933 | if test -n "$ac_sub_configure"; then | |
6934 | ||
6935 | # Make the cache file name correct relative to the subdirectory. | |
5436fc65 C |
6936 | case "$cache_file" in |
6937 | /*) ac_sub_cache_file=$cache_file ;; | |
6938 | *) # Relative path. | |
6939 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
6940 | esac | |
6941 | case "$ac_given_INSTALL" in | |
6942 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
6943 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
6944 | esac | |
6945 | ||
6946 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
6947 | # The eval makes quoting arguments work. | |
6948 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
6949 | then : | |
6950 | else | |
6951 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
6952 | fi | |
6953 | fi | |
6954 | ||
6955 | cd $ac_popdir | |
6956 | done | |
6957 | fi | |
6958 | ||
5e711e7f PS |
6959 | |
6960 | exit 0 |