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