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