]>
Commit | Line | Data |
---|---|---|
ee9dd372 TT |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
a3ffcff3 | 4 | # Generated automatically using autoconf version 2.13 |
ee9dd372 TT |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
7941ceab | 15 | --with-target-subdir=SUBDIR |
ffccc6be | 16 | configuring in a subdirectory" |
ee9dd372 | 17 | ac_help="$ac_help |
7941ceab | 18 | --with-cross-host=HOST configuring with a cross compiler" |
9e7823cc L |
19 | ac_help="$ac_help |
20 | --with-newlib Configuring with newlib" | |
ee9dd372 | 21 | ac_help="$ac_help |
bc5afba4 | 22 | --enable-multilib build many library versions (default)" |
ee9dd372 TT |
23 | ac_help="$ac_help |
24 | --enable-maintainer-mode enable make rules and dependencies not useful | |
25 | (and sometimes confusing) to the casual installer" | |
a3ffcff3 TT |
26 | ac_help="$ac_help |
27 | --enable-shared[=PKGS] build shared libraries [default=yes]" | |
28 | ac_help="$ac_help | |
29 | --enable-static[=PKGS] build static libraries [default=yes]" | |
01b02b11 TT |
30 | ac_help="$ac_help |
31 | --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" | |
a3ffcff3 TT |
32 | ac_help="$ac_help |
33 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" | |
01b02b11 | 34 | ac_help="$ac_help |
7af85558 | 35 | --disable-libtool-lock avoid locking (might break parallel builds)" |
6d0860ee AO |
36 | ac_help="$ac_help |
37 | --with-pic try to use only PIC/non-PIC objects [default=use both]" | |
ffccc6be AG |
38 | ac_help="$ac_help |
39 | --disable-getenv-properties | |
40 | don't set system properties from GCJ_PROPERTIES" | |
3610e0d5 TT |
41 | ac_help="$ac_help |
42 | --enable-hash-synchronization | |
43 | Use global hash table for monitor locks" | |
ee9dd372 | 44 | ac_help="$ac_help |
7941ceab | 45 | --enable-libgcj-debug enable runtime debugging code" |
58eb6e7c | 46 | ac_help="$ac_help |
7941ceab | 47 | --enable-interpreter enable interpreter" |
3cf88fb4 | 48 | ac_help="$ac_help |
52a11cbf | 49 | --enable-sjlj-exceptions force use of builtin_setjmp for exceptions" |
4b68fe8a TT |
50 | ac_help="$ac_help |
51 | --disable-java-net disable java.net" | |
c8fb9813 AG |
52 | ac_help="$ac_help |
53 | --without-libffi don't use libffi" | |
54c2f04b AG |
54 | ac_help="$ac_help |
55 | --disable-jvmpi disable JVMPI support" | |
ee9dd372 | 56 | ac_help="$ac_help |
7941ceab | 57 | --with-ecos enable runtime eCos target support" |
f994389b | 58 | ac_help="$ac_help |
7941ceab | 59 | --with-system-zlib use installed libz" |
5aac1dac TT |
60 | ac_help="$ac_help |
61 | --with-x use the X Window System" | |
62 | ac_help="$ac_help | |
63 | --enable-java-awt list of AWT peer implementations to be built" | |
ee9dd372 | 64 | ac_help="$ac_help |
7941ceab | 65 | --enable-java-gc=TYPE choose garbage collector [boehm]" |
860a1536 TT |
66 | ac_help="$ac_help |
67 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
2622c79d | 68 | ac_help="$ac_help |
29e531ff | 69 | --disable-gtktest do not try to compile and run a test GTK+ program" |
5950e016 | 70 | ac_help="$ac_help |
29e531ff | 71 | --disable-glibtest do not try to compile and run a test GLIB program" |
5aac1dac TT |
72 | ac_help="$ac_help |
73 | --with-libart-prefix=PFX Prefix where LIBART is installed (optional)" | |
74 | ac_help="$ac_help | |
75 | --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)" | |
76 | ac_help="$ac_help | |
77 | --disable-libarttest Do not try to compile and run a test LIBART program" | |
ee9dd372 TT |
78 | |
79 | # Initialize some variables set by options. | |
80 | # The variables have the same names as the options, with | |
81 | # dashes changed to underlines. | |
82 | build=NONE | |
83 | cache_file=./config.cache | |
84 | exec_prefix=NONE | |
85 | host=NONE | |
86 | no_create= | |
87 | nonopt=NONE | |
88 | no_recursion= | |
89 | prefix=NONE | |
90 | program_prefix=NONE | |
91 | program_suffix=NONE | |
92 | program_transform_name=s,x,x, | |
93 | silent= | |
94 | site= | |
95 | srcdir= | |
96 | target=NONE | |
97 | verbose= | |
98 | x_includes=NONE | |
99 | x_libraries=NONE | |
100 | bindir='${exec_prefix}/bin' | |
101 | sbindir='${exec_prefix}/sbin' | |
102 | libexecdir='${exec_prefix}/libexec' | |
103 | datadir='${prefix}/share' | |
104 | sysconfdir='${prefix}/etc' | |
105 | sharedstatedir='${prefix}/com' | |
106 | localstatedir='${prefix}/var' | |
107 | libdir='${exec_prefix}/lib' | |
108 | includedir='${prefix}/include' | |
109 | oldincludedir='/usr/include' | |
110 | infodir='${prefix}/info' | |
111 | mandir='${prefix}/man' | |
112 | ||
113 | # Initialize some other variables. | |
114 | subdirs= | |
115 | MFLAGS= MAKEFLAGS= | |
116 | SHELL=${CONFIG_SHELL-/bin/sh} | |
117 | # Maximum number of lines to put in a shell here document. | |
118 | ac_max_here_lines=12 | |
119 | ||
120 | ac_prev= | |
121 | for ac_option | |
122 | do | |
123 | ||
124 | # If the previous option needs an argument, assign it. | |
125 | if test -n "$ac_prev"; then | |
126 | eval "$ac_prev=\$ac_option" | |
127 | ac_prev= | |
128 | continue | |
129 | fi | |
130 | ||
131 | case "$ac_option" in | |
132 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
133 | *) ac_optarg= ;; | |
134 | esac | |
135 | ||
136 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
137 | ||
138 | case "$ac_option" in | |
139 | ||
140 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
141 | ac_prev=bindir ;; | |
142 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
143 | bindir="$ac_optarg" ;; | |
144 | ||
145 | -build | --build | --buil | --bui | --bu) | |
146 | ac_prev=build ;; | |
147 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
148 | build="$ac_optarg" ;; | |
149 | ||
150 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
151 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
152 | ac_prev=cache_file ;; | |
153 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
154 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
155 | cache_file="$ac_optarg" ;; | |
156 | ||
157 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
158 | ac_prev=datadir ;; | |
159 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
160 | | --da=*) | |
161 | datadir="$ac_optarg" ;; | |
162 | ||
163 | -disable-* | --disable-*) | |
164 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
165 | # Reject names that are not valid shell variable names. | |
166 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
167 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
168 | fi | |
169 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
170 | eval "enable_${ac_feature}=no" ;; | |
171 | ||
172 | -enable-* | --enable-*) | |
173 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
174 | # Reject names that are not valid shell variable names. | |
175 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
176 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
177 | fi | |
178 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
179 | case "$ac_option" in | |
180 | *=*) ;; | |
181 | *) ac_optarg=yes ;; | |
182 | esac | |
183 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
184 | ||
185 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
186 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
187 | | --exec | --exe | --ex) | |
188 | ac_prev=exec_prefix ;; | |
189 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
190 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
191 | | --exec=* | --exe=* | --ex=*) | |
192 | exec_prefix="$ac_optarg" ;; | |
193 | ||
194 | -gas | --gas | --ga | --g) | |
195 | # Obsolete; use --with-gas. | |
196 | with_gas=yes ;; | |
197 | ||
198 | -help | --help | --hel | --he) | |
199 | # Omit some internal or obsolete options to make the list less imposing. | |
200 | # This message is too long to be a string in the A/UX 3.1 sh. | |
201 | cat << EOF | |
202 | Usage: configure [options] [host] | |
203 | Options: [defaults in brackets after descriptions] | |
204 | Configuration: | |
205 | --cache-file=FILE cache test results in FILE | |
206 | --help print this message | |
207 | --no-create do not create output files | |
208 | --quiet, --silent do not print \`checking...' messages | |
209 | --version print the version of autoconf that created configure | |
210 | Directory and file names: | |
211 | --prefix=PREFIX install architecture-independent files in PREFIX | |
212 | [$ac_default_prefix] | |
213 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
214 | [same as prefix] | |
215 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
216 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
217 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
218 | --datadir=DIR read-only architecture-independent data in DIR | |
219 | [PREFIX/share] | |
220 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
221 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
222 | [PREFIX/com] | |
223 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
224 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
225 | --includedir=DIR C header files in DIR [PREFIX/include] | |
226 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
227 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
228 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
229 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
230 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
231 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
232 | --program-transform-name=PROGRAM | |
233 | run sed PROGRAM on installed program names | |
234 | EOF | |
235 | cat << EOF | |
236 | Host type: | |
237 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
238 | --host=HOST configure for HOST [guessed] | |
239 | --target=TARGET configure for TARGET [TARGET=HOST] | |
240 | Features and packages: | |
241 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
242 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
243 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
244 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
245 | --x-includes=DIR X include files are in DIR | |
246 | --x-libraries=DIR X library files are in DIR | |
247 | EOF | |
248 | if test -n "$ac_help"; then | |
249 | echo "--enable and --with options recognized:$ac_help" | |
250 | fi | |
251 | exit 0 ;; | |
252 | ||
253 | -host | --host | --hos | --ho) | |
254 | ac_prev=host ;; | |
255 | -host=* | --host=* | --hos=* | --ho=*) | |
256 | host="$ac_optarg" ;; | |
257 | ||
258 | -includedir | --includedir | --includedi | --included | --include \ | |
259 | | --includ | --inclu | --incl | --inc) | |
260 | ac_prev=includedir ;; | |
261 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
262 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
263 | includedir="$ac_optarg" ;; | |
264 | ||
265 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
266 | ac_prev=infodir ;; | |
267 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
268 | infodir="$ac_optarg" ;; | |
269 | ||
270 | -libdir | --libdir | --libdi | --libd) | |
271 | ac_prev=libdir ;; | |
272 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
273 | libdir="$ac_optarg" ;; | |
274 | ||
275 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
276 | | --libexe | --libex | --libe) | |
277 | ac_prev=libexecdir ;; | |
278 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
279 | | --libexe=* | --libex=* | --libe=*) | |
280 | libexecdir="$ac_optarg" ;; | |
281 | ||
282 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
283 | | --localstate | --localstat | --localsta | --localst \ | |
284 | | --locals | --local | --loca | --loc | --lo) | |
285 | ac_prev=localstatedir ;; | |
286 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
287 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
288 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
289 | localstatedir="$ac_optarg" ;; | |
290 | ||
291 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
292 | ac_prev=mandir ;; | |
293 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
294 | mandir="$ac_optarg" ;; | |
295 | ||
296 | -nfp | --nfp | --nf) | |
297 | # Obsolete; use --without-fp. | |
298 | with_fp=no ;; | |
299 | ||
300 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
301 | | --no-cr | --no-c) | |
302 | no_create=yes ;; | |
303 | ||
304 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
305 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
306 | no_recursion=yes ;; | |
307 | ||
308 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
309 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
310 | | --oldin | --oldi | --old | --ol | --o) | |
311 | ac_prev=oldincludedir ;; | |
312 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
313 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
314 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
315 | oldincludedir="$ac_optarg" ;; | |
316 | ||
317 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
318 | ac_prev=prefix ;; | |
319 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
320 | prefix="$ac_optarg" ;; | |
321 | ||
322 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
323 | | --program-pre | --program-pr | --program-p) | |
324 | ac_prev=program_prefix ;; | |
325 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
326 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
327 | program_prefix="$ac_optarg" ;; | |
328 | ||
329 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
330 | | --program-suf | --program-su | --program-s) | |
331 | ac_prev=program_suffix ;; | |
332 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
333 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
334 | program_suffix="$ac_optarg" ;; | |
335 | ||
336 | -program-transform-name | --program-transform-name \ | |
337 | | --program-transform-nam | --program-transform-na \ | |
338 | | --program-transform-n | --program-transform- \ | |
339 | | --program-transform | --program-transfor \ | |
340 | | --program-transfo | --program-transf \ | |
341 | | --program-trans | --program-tran \ | |
342 | | --progr-tra | --program-tr | --program-t) | |
343 | ac_prev=program_transform_name ;; | |
344 | -program-transform-name=* | --program-transform-name=* \ | |
345 | | --program-transform-nam=* | --program-transform-na=* \ | |
346 | | --program-transform-n=* | --program-transform-=* \ | |
347 | | --program-transform=* | --program-transfor=* \ | |
348 | | --program-transfo=* | --program-transf=* \ | |
349 | | --program-trans=* | --program-tran=* \ | |
350 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
351 | program_transform_name="$ac_optarg" ;; | |
352 | ||
353 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
354 | | -silent | --silent | --silen | --sile | --sil) | |
355 | silent=yes ;; | |
356 | ||
357 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
358 | ac_prev=sbindir ;; | |
359 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
360 | | --sbi=* | --sb=*) | |
361 | sbindir="$ac_optarg" ;; | |
362 | ||
363 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
364 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
365 | | --sharedst | --shareds | --shared | --share | --shar \ | |
366 | | --sha | --sh) | |
367 | ac_prev=sharedstatedir ;; | |
368 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
369 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
370 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
371 | | --sha=* | --sh=*) | |
372 | sharedstatedir="$ac_optarg" ;; | |
373 | ||
374 | -site | --site | --sit) | |
375 | ac_prev=site ;; | |
376 | -site=* | --site=* | --sit=*) | |
377 | site="$ac_optarg" ;; | |
378 | ||
379 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
380 | ac_prev=srcdir ;; | |
381 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
382 | srcdir="$ac_optarg" ;; | |
383 | ||
384 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
385 | | --syscon | --sysco | --sysc | --sys | --sy) | |
386 | ac_prev=sysconfdir ;; | |
387 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
388 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
389 | sysconfdir="$ac_optarg" ;; | |
390 | ||
391 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
392 | ac_prev=target ;; | |
393 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
394 | target="$ac_optarg" ;; | |
395 | ||
396 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
397 | verbose=yes ;; | |
398 | ||
399 | -version | --version | --versio | --versi | --vers) | |
a3ffcff3 | 400 | echo "configure generated by autoconf version 2.13" |
ee9dd372 TT |
401 | exit 0 ;; |
402 | ||
403 | -with-* | --with-*) | |
404 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
405 | # Reject names that are not valid shell variable names. | |
406 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
407 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
408 | fi | |
409 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
410 | case "$ac_option" in | |
411 | *=*) ;; | |
412 | *) ac_optarg=yes ;; | |
413 | esac | |
414 | eval "with_${ac_package}='$ac_optarg'" ;; | |
415 | ||
416 | -without-* | --without-*) | |
417 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
418 | # Reject names that are not valid shell variable names. | |
419 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
420 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
421 | fi | |
422 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
423 | eval "with_${ac_package}=no" ;; | |
424 | ||
425 | --x) | |
426 | # Obsolete; use --with-x. | |
427 | with_x=yes ;; | |
428 | ||
429 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
430 | | --x-incl | --x-inc | --x-in | --x-i) | |
431 | ac_prev=x_includes ;; | |
432 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
433 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
434 | x_includes="$ac_optarg" ;; | |
435 | ||
436 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
437 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
438 | ac_prev=x_libraries ;; | |
439 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
440 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
441 | x_libraries="$ac_optarg" ;; | |
442 | ||
443 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
444 | ;; | |
445 | ||
446 | *) | |
447 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
448 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
449 | fi | |
450 | if test "x$nonopt" != xNONE; then | |
451 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
452 | fi | |
453 | nonopt="$ac_option" | |
454 | ;; | |
455 | ||
456 | esac | |
457 | done | |
458 | ||
459 | if test -n "$ac_prev"; then | |
460 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
461 | fi | |
462 | ||
463 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
464 | ||
465 | # File descriptor usage: | |
466 | # 0 standard input | |
467 | # 1 file creation | |
468 | # 2 errors and warnings | |
469 | # 3 some systems may open it to /dev/tty | |
470 | # 4 used on the Kubota Titan | |
471 | # 6 checking for... messages and results | |
472 | # 5 compiler messages saved in config.log | |
473 | if test "$silent" = yes; then | |
474 | exec 6>/dev/null | |
475 | else | |
476 | exec 6>&1 | |
477 | fi | |
478 | exec 5>./config.log | |
479 | ||
480 | echo "\ | |
481 | This file contains any messages produced by compilers while | |
482 | running configure, to aid debugging if configure makes a mistake. | |
483 | " 1>&5 | |
484 | ||
485 | # Strip out --no-create and --no-recursion so they do not pile up. | |
486 | # Also quote any args containing shell metacharacters. | |
487 | ac_configure_args= | |
488 | for ac_arg | |
489 | do | |
490 | case "$ac_arg" in | |
491 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
492 | | --no-cr | --no-c) ;; | |
493 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
494 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
495 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
496 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
497 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
498 | esac | |
499 | done | |
500 | ||
501 | # NLS nuisances. | |
502 | # Only set these to C if already set. These must not be set unconditionally | |
503 | # because not all systems understand e.g. LANG=C (notably SCO). | |
504 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
505 | # Non-C LC_CTYPE values break the ctype check. | |
506 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
507 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
508 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
509 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
510 | ||
511 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
512 | rm -rf conftest* confdefs.h | |
513 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
514 | echo > confdefs.h | |
515 | ||
516 | # A filename unique to this package, relative to the directory that | |
517 | # configure is in, which we can look for to find out if srcdir is correct. | |
518 | ac_unique_file=java/lang/System.java | |
519 | ||
520 | # Find the source files, if location was not specified. | |
521 | if test -z "$srcdir"; then | |
522 | ac_srcdir_defaulted=yes | |
523 | # Try the directory containing this script, then its parent. | |
524 | ac_prog=$0 | |
525 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
526 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
527 | srcdir=$ac_confdir | |
528 | if test ! -r $srcdir/$ac_unique_file; then | |
529 | srcdir=.. | |
530 | fi | |
531 | else | |
532 | ac_srcdir_defaulted=no | |
533 | fi | |
534 | if test ! -r $srcdir/$ac_unique_file; then | |
535 | if test "$ac_srcdir_defaulted" = yes; then | |
536 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
537 | else | |
538 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
539 | fi | |
540 | fi | |
541 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
542 | ||
543 | # Prefer explicitly selected file to automatically selected ones. | |
27a6ded9 MK |
544 | if test -z "$CONFIG_SITE"; then |
545 | if test "x$prefix" != xNONE; then | |
546 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
547 | else | |
548 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
ee9dd372 TT |
549 | fi |
550 | fi | |
551 | for ac_site_file in $CONFIG_SITE; do | |
552 | if test -r "$ac_site_file"; then | |
553 | echo "loading site script $ac_site_file" | |
554 | . "$ac_site_file" | |
555 | fi | |
556 | done | |
557 | ||
558 | if test -r "$cache_file"; then | |
559 | echo "loading cache $cache_file" | |
560 | . $cache_file | |
561 | else | |
562 | echo "creating cache $cache_file" | |
563 | > $cache_file | |
564 | fi | |
565 | ||
566 | ac_ext=c | |
567 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
568 | ac_cpp='$CPP $CPPFLAGS' | |
569 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
570 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
571 | cross_compiling=$ac_cv_prog_cc_cross | |
572 | ||
573 | ac_exeext= | |
574 | ac_objext=o | |
575 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
576 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
577 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
578 | ac_n= ac_c=' | |
579 | ' ac_t=' ' | |
580 | else | |
581 | ac_n=-n ac_c= ac_t= | |
582 | fi | |
583 | else | |
584 | ac_n= ac_c='\c' ac_t= | |
585 | fi | |
586 | ||
587 | ||
588 | ||
6706f116 AO |
589 | # This works around the fact that libtool configuration may change LD |
590 | # for this particular configuration, but some shells, instead of | |
591 | # keeping the changes in LD private, export them just because LD is | |
592 | # exported. | |
593 | ORIGINAL_LD_FOR_MULTILIBS=$LD | |
594 | ||
347b9364 | 595 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
27a6ded9 | 596 | echo "configure:597: checking whether ln -s works" >&5 |
347b9364 TT |
597 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
598 | echo $ac_n "(cached) $ac_c" 1>&6 | |
599 | else | |
600 | rm -f conftestdata | |
601 | if ln -s X conftestdata 2>/dev/null | |
602 | then | |
603 | rm -f conftestdata | |
604 | ac_cv_prog_LN_S="ln -s" | |
605 | else | |
606 | ac_cv_prog_LN_S=ln | |
607 | fi | |
608 | fi | |
609 | LN_S="$ac_cv_prog_LN_S" | |
610 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
611 | echo "$ac_t""yes" 1>&6 | |
612 | else | |
613 | echo "$ac_t""no" 1>&6 | |
614 | fi | |
615 | ||
ee9dd372 TT |
616 | |
617 | # Check whether --with-target-subdir or --without-target-subdir was given. | |
618 | if test "${with_target_subdir+set}" = set; then | |
619 | withval="$with_target_subdir" | |
620 | : | |
621 | fi | |
622 | ||
623 | # Check whether --with-cross-host or --without-cross-host was given. | |
624 | if test "${with_cross_host+set}" = set; then | |
625 | withval="$with_cross_host" | |
626 | : | |
627 | fi | |
628 | ||
629 | ||
9e7823cc L |
630 | # Check whether --with-newlib or --without-newlib was given. |
631 | if test "${with_newlib+set}" = set; then | |
632 | withval="$with_newlib" | |
633 | : | |
634 | fi | |
635 | ||
636 | ||
ee9dd372 TT |
637 | # Find a good install program. We prefer a C program (faster), |
638 | # so one script is as good as another. But avoid the broken or | |
639 | # incompatible versions: | |
640 | # SysV /etc/install, /usr/sbin/install | |
641 | # SunOS /usr/etc/install | |
642 | # IRIX /sbin/install | |
643 | # AIX /bin/install | |
644 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
645 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
646 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
647 | # ./install, which can be erroneously created by make from ./install.sh. | |
648 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
27a6ded9 | 649 | echo "configure:650: checking for a BSD compatible install" >&5 |
ee9dd372 TT |
650 | if test -z "$INSTALL"; then |
651 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
652 | echo $ac_n "(cached) $ac_c" 1>&6 | |
653 | else | |
654 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
655 | for ac_dir in $PATH; do | |
656 | # Account for people who put trailing slashes in PATH elements. | |
657 | case "$ac_dir/" in | |
658 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
659 | *) | |
660 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
661 | # Don't use installbsd from OSF since it installs stuff as root | |
662 | # by default. | |
663 | for ac_prog in ginstall scoinst install; do | |
664 | if test -f $ac_dir/$ac_prog; then | |
665 | if test $ac_prog = install && | |
666 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
667 | # AIX install. It has an incompatible calling convention. | |
668 | : | |
669 | else | |
670 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
671 | break 2 | |
672 | fi | |
673 | fi | |
674 | done | |
675 | ;; | |
676 | esac | |
677 | done | |
678 | IFS="$ac_save_IFS" | |
679 | ||
680 | fi | |
681 | if test "${ac_cv_path_install+set}" = set; then | |
682 | INSTALL="$ac_cv_path_install" | |
683 | else | |
684 | # As a last resort, use the slow shell script. We don't cache a | |
685 | # path for INSTALL within a source directory, because that will | |
686 | # break other packages using the cache if that directory is | |
687 | # removed, or if the path is relative. | |
688 | INSTALL="$ac_install_sh" | |
689 | fi | |
690 | fi | |
691 | echo "$ac_t""$INSTALL" 1>&6 | |
692 | ||
693 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
694 | # It thinks the first close brace ends the variable substitution. | |
695 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
696 | ||
a3ffcff3 TT |
697 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
698 | ||
ee9dd372 TT |
699 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
700 | ||
701 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 | |
27a6ded9 | 702 | echo "configure:703: checking whether build environment is sane" >&5 |
ee9dd372 TT |
703 | # Just in case |
704 | sleep 1 | |
9d577a61 | 705 | echo timestamp > conftestfile |
ee9dd372 TT |
706 | # Do `set' in a subshell so we don't clobber the current shell's |
707 | # arguments. Must try -L first in case configure is actually a | |
708 | # symlink; some systems play weird games with the mod time of symlinks | |
709 | # (eg FreeBSD returns the mod time of the symlink's containing | |
710 | # directory). | |
711 | if ( | |
9d577a61 | 712 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
ee9dd372 TT |
713 | if test "$*" = "X"; then |
714 | # -L didn't work. | |
9d577a61 | 715 | set X `ls -t $srcdir/configure conftestfile` |
ee9dd372 | 716 | fi |
9d577a61 TT |
717 | if test "$*" != "X $srcdir/configure conftestfile" \ |
718 | && test "$*" != "X conftestfile $srcdir/configure"; then | |
ee9dd372 TT |
719 | |
720 | # If neither matched, then we have a broken ls. This can happen | |
721 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
722 | # broken ls alias from the environment. This has actually | |
723 | # happened. Such a system could not be considered "sane". | |
724 | { echo "configure: error: ls -t appears to fail. Make sure there is not a broken | |
725 | alias in your environment" 1>&2; exit 1; } | |
726 | fi | |
727 | ||
9d577a61 | 728 | test "$2" = conftestfile |
ee9dd372 TT |
729 | ) |
730 | then | |
731 | # Ok. | |
732 | : | |
733 | else | |
734 | { echo "configure: error: newly created file is older than distributed files! | |
735 | Check your system clock" 1>&2; exit 1; } | |
736 | fi | |
9d577a61 | 737 | rm -f conftest* |
ee9dd372 TT |
738 | echo "$ac_t""yes" 1>&6 |
739 | if test "$program_transform_name" = s,x,x,; then | |
740 | program_transform_name= | |
741 | else | |
742 | # Double any \ or $. echo might interpret backslashes. | |
743 | cat <<\EOF_SED > conftestsed | |
744 | s,\\,\\\\,g; s,\$,$$,g | |
745 | EOF_SED | |
746 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
747 | rm -f conftestsed | |
748 | fi | |
749 | test "$program_prefix" != NONE && | |
750 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
751 | # Use a double $ so make ignores it. | |
752 | test "$program_suffix" != NONE && | |
753 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
754 | ||
755 | # sed with no file args requires a program. | |
756 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
757 | ||
758 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
27a6ded9 | 759 | echo "configure:760: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
ee9dd372 TT |
760 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
761 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
762 | echo $ac_n "(cached) $ac_c" 1>&6 | |
763 | else | |
764 | cat > conftestmake <<\EOF | |
765 | all: | |
766 | @echo 'ac_maketemp="${MAKE}"' | |
767 | EOF | |
768 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
769 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
770 | if test -n "$ac_maketemp"; then | |
771 | eval ac_cv_prog_make_${ac_make}_set=yes | |
772 | else | |
773 | eval ac_cv_prog_make_${ac_make}_set=no | |
774 | fi | |
775 | rm -f conftestmake | |
776 | fi | |
777 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
778 | echo "$ac_t""yes" 1>&6 | |
779 | SET_MAKE= | |
780 | else | |
781 | echo "$ac_t""no" 1>&6 | |
782 | SET_MAKE="MAKE=${MAKE-make}" | |
783 | fi | |
784 | ||
785 | if test $host != $build; then | |
786 | ac_tool_prefix=${host_alias}- | |
787 | else | |
788 | ac_tool_prefix= | |
789 | fi | |
790 | ||
a3ffcff3 | 791 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
27a6ded9 | 792 | echo "configure:793: checking for Cygwin environment" >&5 |
a3ffcff3 | 793 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
ee9dd372 TT |
794 | echo $ac_n "(cached) $ac_c" 1>&6 |
795 | else | |
796 | cat > conftest.$ac_ext <<EOF | |
27a6ded9 | 797 | #line 798 "configure" |
ee9dd372 TT |
798 | #include "confdefs.h" |
799 | ||
800 | int main() { | |
a3ffcff3 TT |
801 | |
802 | #ifndef __CYGWIN__ | |
803 | #define __CYGWIN__ __CYGWIN32__ | |
804 | #endif | |
805 | return __CYGWIN__; | |
ee9dd372 TT |
806 | ; return 0; } |
807 | EOF | |
27a6ded9 | 808 | if { (eval echo configure:809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ee9dd372 | 809 | rm -rf conftest* |
a3ffcff3 | 810 | ac_cv_cygwin=yes |
ee9dd372 TT |
811 | else |
812 | echo "configure: failed program was:" >&5 | |
813 | cat conftest.$ac_ext >&5 | |
814 | rm -rf conftest* | |
a3ffcff3 | 815 | ac_cv_cygwin=no |
ee9dd372 TT |
816 | fi |
817 | rm -f conftest* | |
818 | rm -f conftest* | |
819 | fi | |
820 | ||
a3ffcff3 TT |
821 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
822 | CYGWIN= | |
823 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
ee9dd372 | 824 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
27a6ded9 | 825 | echo "configure:826: checking for mingw32 environment" >&5 |
ee9dd372 TT |
826 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
828 | else | |
829 | cat > conftest.$ac_ext <<EOF | |
27a6ded9 | 830 | #line 831 "configure" |
ee9dd372 TT |
831 | #include "confdefs.h" |
832 | ||
833 | int main() { | |
834 | return __MINGW32__; | |
835 | ; return 0; } | |
836 | EOF | |
27a6ded9 | 837 | if { (eval echo configure:838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ee9dd372 TT |
838 | rm -rf conftest* |
839 | ac_cv_mingw32=yes | |
840 | else | |
841 | echo "configure: failed program was:" >&5 | |
842 | cat conftest.$ac_ext >&5 | |
843 | rm -rf conftest* | |
844 | ac_cv_mingw32=no | |
845 | fi | |
846 | rm -f conftest* | |
847 | rm -f conftest* | |
848 | fi | |
849 | ||
850 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
851 | MINGW32= | |
852 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
853 | ||
854 | # Check whether --enable-multilib or --disable-multilib was given. | |
855 | if test "${enable_multilib+set}" = set; then | |
856 | enableval="$enable_multilib" | |
857 | case "${enableval}" in | |
858 | yes) multilib=yes ;; | |
859 | no) multilib=no ;; | |
860 | *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;; | |
861 | esac | |
862 | else | |
863 | multilib=yes | |
864 | fi | |
865 | ||
866 | ||
fe3dac3d TT |
867 | # When building with srcdir == objdir, links to the source files will |
868 | # be created in directories within the target_subdir. We have to | |
869 | # adjust toplevel_srcdir accordingly, so that configure finds | |
870 | # install-sh and other auxiliary files that live in the top-level | |
871 | # source directory. | |
ee9dd372 | 872 | if test "${srcdir}" = "."; then |
fe3dac3d TT |
873 | if test -z "${with_target_subdir}"; then |
874 | toprel=".." | |
ee9dd372 | 875 | else |
fe3dac3d TT |
876 | if test "${with_target_subdir}" != "."; then |
877 | toprel="${with_multisrctop}../.." | |
878 | else | |
879 | toprel="${with_multisrctop}.." | |
880 | fi | |
ee9dd372 TT |
881 | fi |
882 | else | |
fe3dac3d | 883 | toprel=".." |
ee9dd372 TT |
884 | fi |
885 | ||
fe3dac3d TT |
886 | libgcj_basedir=$srcdir/$toprel/./libjava |
887 | ||
888 | ||
7f7ba9bf | 889 | ac_aux_dir= |
fe3dac3d | 890 | for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do |
7f7ba9bf TT |
891 | if test -f $ac_dir/install-sh; then |
892 | ac_aux_dir=$ac_dir | |
893 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
894 | break | |
895 | elif test -f $ac_dir/install.sh; then | |
896 | ac_aux_dir=$ac_dir | |
897 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
898 | break | |
899 | fi | |
900 | done | |
901 | if test -z "$ac_aux_dir"; then | |
fe3dac3d | 902 | { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; } |
7f7ba9bf TT |
903 | fi |
904 | ac_config_guess=$ac_aux_dir/config.guess | |
905 | ac_config_sub=$ac_aux_dir/config.sub | |
906 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
907 | ||
908 | if :; then :; else | |
909 | # This overrides the previous occurrence for automake, but not for | |
910 | # autoconf, which is exactly what we want. | |
911 | ac_aux_dir= | |
912 | for ac_dir in .. $srcdir/..; do | |
913 | if test -f $ac_dir/install-sh; then | |
914 | ac_aux_dir=$ac_dir | |
915 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
916 | break | |
917 | elif test -f $ac_dir/install.sh; then | |
918 | ac_aux_dir=$ac_dir | |
919 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
920 | break | |
921 | fi | |
922 | done | |
923 | if test -z "$ac_aux_dir"; then | |
924 | { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; } | |
925 | fi | |
926 | ac_config_guess=$ac_aux_dir/config.guess | |
927 | ac_config_sub=$ac_aux_dir/config.sub | |
928 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
929 | ||
930 | fi | |
931 | ||
fe3dac3d | 932 | # This works around an automake problem. |
1e6347d8 | 933 | mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs" |
fe3dac3d TT |
934 | |
935 | ||
7f7ba9bf TT |
936 | |
937 | # Do some error checking and defaulting for the host and target type. | |
938 | # The inputs are: | |
939 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
940 | # | |
941 | # The rules are: | |
942 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
943 | # same time. | |
944 | # 2. Host defaults to nonopt. | |
945 | # 3. If nonopt is not specified, then host defaults to the current host, | |
946 | # as determined by config.guess. | |
947 | # 4. Target and build default to nonopt. | |
948 | # 5. If nonopt is not specified, then target and build default to host. | |
949 | ||
950 | # The aliases save the names the user supplied, while $host etc. | |
951 | # will get canonicalized. | |
952 | case $host---$target---$nonopt in | |
953 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
954 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
955 | esac | |
ee9dd372 TT |
956 | |
957 | ||
958 | # Make sure we can run config.sub. | |
959 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
960 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
961 | fi | |
962 | ||
963 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
27a6ded9 | 964 | echo "configure:965: checking host system type" >&5 |
ee9dd372 TT |
965 | |
966 | host_alias=$host | |
967 | case "$host_alias" in | |
968 | NONE) | |
969 | case $nonopt in | |
970 | NONE) | |
971 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
972 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
973 | fi ;; | |
974 | *) host_alias=$nonopt ;; | |
975 | esac ;; | |
976 | esac | |
977 | ||
978 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
979 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
980 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
981 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
982 | echo "$ac_t""$host" 1>&6 | |
983 | ||
7f7ba9bf | 984 | echo $ac_n "checking target system type""... $ac_c" 1>&6 |
27a6ded9 | 985 | echo "configure:986: checking target system type" >&5 |
7f7ba9bf TT |
986 | |
987 | target_alias=$target | |
988 | case "$target_alias" in | |
989 | NONE) | |
990 | case $nonopt in | |
991 | NONE) target_alias=$host_alias ;; | |
992 | *) target_alias=$nonopt ;; | |
993 | esac ;; | |
994 | esac | |
995 | ||
996 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
997 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
998 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
999 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1000 | echo "$ac_t""$target" 1>&6 | |
1001 | ||
1002 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
27a6ded9 | 1003 | echo "configure:1004: checking build system type" >&5 |
7f7ba9bf TT |
1004 | |
1005 | build_alias=$build | |
1006 | case "$build_alias" in | |
1007 | NONE) | |
1008 | case $nonopt in | |
1009 | NONE) build_alias=$host_alias ;; | |
1010 | *) build_alias=$nonopt ;; | |
1011 | esac ;; | |
1012 | esac | |
1013 | ||
1014 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1015 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1016 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1017 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1018 | echo "$ac_t""$build" 1>&6 | |
1019 | ||
1020 | test "$host_alias" != "$target_alias" && | |
1021 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1022 | NONENONEs,x,x, && | |
1023 | program_prefix=${target_alias}- | |
1024 | ||
ee9dd372 | 1025 | |
ee9dd372 TT |
1026 | |
1027 | ||
54ce7452 | 1028 | |
ee9dd372 TT |
1029 | # Extract the first word of "gcc", so it can be a program name with args. |
1030 | set dummy gcc; ac_word=$2 | |
1031 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
27a6ded9 | 1032 | echo "configure:1033: checking for $ac_word" >&5 |
ee9dd372 TT |
1033 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1034 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1035 | else | |
1036 | if test -n "$CC"; then | |
1037 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1038 | else | |
1039 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
a3ffcff3 TT |
1040 | ac_dummy="$PATH" |
1041 | for ac_dir in $ac_dummy; do | |
ee9dd372 TT |
1042 | test -z "$ac_dir" && ac_dir=. |
1043 | if test -f $ac_dir/$ac_word; then | |
1044 | ac_cv_prog_CC="gcc" | |
1045 | break | |
1046 | fi | |
1047 | done | |
1048 | IFS="$ac_save_ifs" | |
1049 | fi | |
1050 | fi | |
1051 | CC="$ac_cv_prog_CC" | |
1052 | if test -n "$CC"; then | |
1053 | echo "$ac_t""$CC" 1>&6 | |
1054 | else | |
1055 | echo "$ac_t""no" 1>&6 | |
1056 | fi | |
1057 | ||
1058 | if test -z "$CC"; then | |
1059 | # Extract the first word of "cc", so it can be a program name with args. | |
1060 | set dummy cc; ac_word=$2 | |
1061 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
27a6ded9 | 1062 | echo "configure:1063: checking for $ac_word" >&5 |
ee9dd372 TT |
1063 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1064 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1065 | else | |
1066 | if test -n "$CC"; then | |
1067 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1068 | else | |
1069 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1070 | ac_prog_rejected=no | |
a3ffcff3 TT |
1071 | ac_dummy="$PATH" |
1072 | for ac_dir in $ac_dummy; do | |
ee9dd372 TT |
1073 | test -z "$ac_dir" && ac_dir=. |
1074 | if test -f $ac_dir/$ac_word; then | |
1075 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1076 | ac_prog_rejected=yes | |
1077 | continue | |
1078 | fi | |
1079 | ac_cv_prog_CC="cc" | |
1080 | break | |
1081 | fi | |
1082 | done | |
1083 | IFS="$ac_save_ifs" | |
1084 | if test $ac_prog_rejected = yes; then | |
1085 | # We found a bogon in the path, so make sure we never use it. | |
1086 | set dummy $ac_cv_prog_CC | |
1087 | shift | |
1088 | if test $# -gt 0; then | |
1089 | # We chose a different compiler from the bogus one. | |
1090 | # However, it has the same basename, so the bogon will be chosen | |
1091 | # first if we set CC to just the basename; use the full file name. | |
1092 | shift | |
1093 | set dummy "$ac_dir/$ac_word" "$@" | |
1094 | shift | |
1095 | ac_cv_prog_CC="$@" | |
1096 | fi | |
1097 | fi | |
1098 | fi | |
1099 | fi | |
1100 | CC="$ac_cv_prog_CC" | |
1101 | if test -n "$CC"; then | |
1102 | echo "$ac_t""$CC" 1>&6 | |
1103 | else | |
1104 | echo "$ac_t""no" 1>&6 | |
1105 | fi | |
1106 | ||
158a8e6b AO |
1107 | if test -z "$CC"; then |
1108 | case "`uname -s`" in | |
1109 | *win32* | *WIN32*) | |
1110 | # Extract the first word of "cl", so it can be a program name with args. | |
1111 | set dummy cl; ac_word=$2 | |
1112 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
27a6ded9 | 1113 | echo "configure:1114: checking for $ac_word" >&5 |
158a8e6b AO |
1114 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1115 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1116 | else | |
1117 | if test -n "$CC"; then | |
1118 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1119 | else | |
1120 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1121 | ac_dummy="$PATH" | |
1122 | for ac_dir in $ac_dummy; do | |
1123 | test -z "$ac_dir" && ac_dir=. | |
1124 | if test -f $ac_dir/$ac_word; then | |
1125 | ac_cv_prog_CC="cl" | |
1126 | break | |
1127 | fi | |
1128 | done | |
1129 | IFS="$ac_save_ifs" | |
1130 | fi | |
1131 | fi | |
1132 | CC="$ac_cv_prog_CC" | |
1133 | if test -n "$CC"; then | |
1134 | echo "$ac_t""$CC" 1>&6 | |
1135 | else | |
1136 | echo "$ac_t""no" 1>&6 | |
1137 | fi | |
1138 | ;; | |
1139 | esac | |
1140 | fi | |
ee9dd372 TT |
1141 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
1142 | fi | |
1143 | ||
158a8e6b | 1144 | |
ee9dd372 | 1145 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
27a6ded9 | 1146 | echo "configure:1147: checking whether we are using GNU C" >&5 |
ee9dd372 TT |
1147 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1148 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1149 | else | |
1150 | cat > conftest.c <<EOF | |
1151 | #ifdef __GNUC__ | |
1152 | yes; | |
1153 | #endif | |
1154 | EOF | |
27a6ded9 | 1155 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
ee9dd372 TT |
1156 | ac_cv_prog_gcc=yes |
1157 | else | |
1158 | ac_cv_prog_gcc=no | |
1159 | fi | |
1160 | fi | |
1161 | ||
1162 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1163 | ||
1164 | if test $ac_cv_prog_gcc = yes; then | |
1165 | GCC=yes | |
158a8e6b AO |
1166 | else |
1167 | GCC= | |
1168 | fi | |
1169 | ||
1170 | ac_test_CFLAGS="${CFLAGS+set}" | |
1171 | ac_save_CFLAGS="$CFLAGS" | |
1172 | CFLAGS= | |
1173 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
27a6ded9 | 1174 | echo "configure:1175: checking whether ${CC-cc} accepts -g" >&5 |
ee9dd372 TT |
1175 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1176 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1177 | else | |
1178 | echo 'void f(){}' > conftest.c | |
1179 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1180 | ac_cv_prog_cc_g=yes | |
1181 | else | |
1182 | ac_cv_prog_cc_g=no | |
1183 | fi | |
1184 | rm -f conftest* | |
1185 | ||
1186 | fi | |
1187 | ||
1188 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
158a8e6b AO |
1189 | if test "$ac_test_CFLAGS" = set; then |
1190 | CFLAGS="$ac_save_CFLAGS" | |
1191 | elif test $ac_cv_prog_cc_g = yes; then | |
1192 | if test "$GCC" = yes; then | |
ee9dd372 TT |
1193 | CFLAGS="-g -O2" |
1194 | else | |
158a8e6b | 1195 | CFLAGS="-g" |
ee9dd372 TT |
1196 | fi |
1197 | else | |
158a8e6b AO |
1198 | if test "$GCC" = yes; then |
1199 | CFLAGS="-O2" | |
1200 | else | |
1201 | CFLAGS= | |
1202 | fi | |
ee9dd372 TT |
1203 | fi |
1204 | ||
e2ea015c AG |
1205 | |
1206 | # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use | |
1207 | # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a | |
1208 | # different definition of CXX than other directories, since we don't | |
1209 | # depend on libstdc++-v3 having already been built. | |
1210 | ||
1211 | ||
1212 | ||
1213 | # Use glibjava_CXX so that we do not cause CXX to be cached with the | |
1214 | # flags that come in CXX while configuring libjava. They're different | |
1215 | # from those used for all other target libraries. If CXX is set in | |
1216 | # the environment, respect that here. | |
1217 | glibjava_CXX=$CXX | |
1218 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ | |
ee9dd372 TT |
1219 | do |
1220 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1221 | set dummy $ac_prog; ac_word=$2 | |
1222 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
27a6ded9 | 1223 | echo "configure:1224: checking for $ac_word" >&5 |
e2ea015c | 1224 | if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then |
ee9dd372 TT |
1225 | echo $ac_n "(cached) $ac_c" 1>&6 |
1226 | else | |
e2ea015c AG |
1227 | if test -n "$glibjava_CXX"; then |
1228 | ac_cv_prog_glibjava_CXX="$glibjava_CXX" # Let the user override the test. | |
ee9dd372 TT |
1229 | else |
1230 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
a3ffcff3 TT |
1231 | ac_dummy="$PATH" |
1232 | for ac_dir in $ac_dummy; do | |
ee9dd372 TT |
1233 | test -z "$ac_dir" && ac_dir=. |
1234 | if test -f $ac_dir/$ac_word; then | |
e2ea015c | 1235 | ac_cv_prog_glibjava_CXX="$ac_prog" |
ee9dd372 TT |
1236 | break |
1237 | fi | |
1238 | done | |
1239 | IFS="$ac_save_ifs" | |
1240 | fi | |
1241 | fi | |
e2ea015c AG |
1242 | glibjava_CXX="$ac_cv_prog_glibjava_CXX" |
1243 | if test -n "$glibjava_CXX"; then | |
1244 | echo "$ac_t""$glibjava_CXX" 1>&6 | |
ee9dd372 TT |
1245 | else |
1246 | echo "$ac_t""no" 1>&6 | |
1247 | fi | |
1248 | ||
e2ea015c | 1249 | test -n "$glibjava_CXX" && break |
ee9dd372 | 1250 | done |
e2ea015c | 1251 | test -n "$glibjava_CXX" || glibjava_CXX="gcc" |
ee9dd372 | 1252 | |
158a8e6b | 1253 | |
e2ea015c AG |
1254 | CXX=$glibjava_CXX |
1255 | test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } | |
ee9dd372 TT |
1256 | |
1257 | echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 | |
27a6ded9 | 1258 | echo "configure:1259: checking whether we are using GNU C++" >&5 |
ee9dd372 TT |
1259 | if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then |
1260 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1261 | else | |
1262 | cat > conftest.C <<EOF | |
1263 | #ifdef __GNUC__ | |
1264 | yes; | |
1265 | #endif | |
1266 | EOF | |
27a6ded9 | 1267 | if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
ee9dd372 TT |
1268 | ac_cv_prog_gxx=yes |
1269 | else | |
1270 | ac_cv_prog_gxx=no | |
1271 | fi | |
1272 | fi | |
1273 | ||
1274 | echo "$ac_t""$ac_cv_prog_gxx" 1>&6 | |
1275 | ||
1276 | if test $ac_cv_prog_gxx = yes; then | |
1277 | GXX=yes | |
e2ea015c AG |
1278 | ac_test_CXXFLAGS="${CXXFLAGS+set}" |
1279 | ac_save_CXXFLAGS="$CXXFLAGS" | |
1280 | CXXFLAGS= | |
1281 | echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 | |
27a6ded9 | 1282 | echo "configure:1283: checking whether ${CXX-g++} accepts -g" >&5 |
ee9dd372 TT |
1283 | if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then |
1284 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1285 | else | |
1286 | echo 'void f(){}' > conftest.cc | |
1287 | if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then | |
1288 | ac_cv_prog_cxx_g=yes | |
1289 | else | |
1290 | ac_cv_prog_cxx_g=no | |
1291 | fi | |
1292 | rm -f conftest* | |
1293 | ||
1294 | fi | |
1295 | ||
1296 | echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 | |
e2ea015c AG |
1297 | if test "$ac_test_CXXFLAGS" = set; then |
1298 | CXXFLAGS="$ac_save_CXXFLAGS" | |
1299 | elif test $ac_cv_prog_cxx_g = yes; then | |
ee9dd372 TT |
1300 | CXXFLAGS="-g -O2" |
1301 | else | |
45597167 | 1302 | CXXFLAGS="-O2" |
45597167 | 1303 | fi |
e2ea015c AG |
1304 | else |
1305 | GXX= | |
1306 | test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" | |
158a8e6b AO |
1307 | fi |
1308 | ||
1309 | ||
1310 | version=0.0.7 | |
1311 | ||
1312 | PACKAGE=libjava | |
9d577a61 | 1313 | |
158a8e6b | 1314 | VERSION=$version |
9d577a61 TT |
1315 | |
1316 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
1317 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } | |
1318 | fi | |
158a8e6b AO |
1319 | cat >> confdefs.h <<EOF |
1320 | #define PACKAGE "$PACKAGE" | |
1321 | EOF | |
1322 | ||
1323 | cat >> confdefs.h <<EOF | |
1324 | #define VERSION "$VERSION" | |
1325 | EOF | |
1326 | ||
1327 | ||
8107bcf9 | 1328 | |
9d577a61 TT |
1329 | missing_dir=`cd $ac_aux_dir && pwd` |
1330 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 | |
27a6ded9 | 1331 | echo "configure:1332: checking for working aclocal" >&5 |
9d577a61 TT |
1332 | # Run test in a subshell; some versions of sh will print an error if |
1333 | # an executable is not found, even if stderr is redirected. | |
1334 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1335 | if (aclocal --version) < /dev/null > /dev/null 2>&1; then | |
1336 | ACLOCAL=aclocal | |
1337 | echo "$ac_t""found" 1>&6 | |
ee9dd372 | 1338 | else |
9d577a61 TT |
1339 | ACLOCAL="$missing_dir/missing aclocal" |
1340 | echo "$ac_t""missing" 1>&6 | |
158a8e6b AO |
1341 | fi |
1342 | ||
9d577a61 | 1343 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 |
27a6ded9 | 1344 | echo "configure:1345: checking for working autoconf" >&5 |
9d577a61 TT |
1345 | # Run test in a subshell; some versions of sh will print an error if |
1346 | # an executable is not found, even if stderr is redirected. | |
1347 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1348 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
1349 | AUTOCONF=autoconf | |
1350 | echo "$ac_t""found" 1>&6 | |
1351 | else | |
1352 | AUTOCONF="$missing_dir/missing autoconf" | |
1353 | echo "$ac_t""missing" 1>&6 | |
158a8e6b AO |
1354 | fi |
1355 | ||
9d577a61 | 1356 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 |
27a6ded9 | 1357 | echo "configure:1358: checking for working automake" >&5 |
9d577a61 TT |
1358 | # Run test in a subshell; some versions of sh will print an error if |
1359 | # an executable is not found, even if stderr is redirected. | |
1360 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1361 | if (automake --version) < /dev/null > /dev/null 2>&1; then | |
1362 | AUTOMAKE=automake | |
1363 | echo "$ac_t""found" 1>&6 | |
158a8e6b | 1364 | else |
9d577a61 TT |
1365 | AUTOMAKE="$missing_dir/missing automake" |
1366 | echo "$ac_t""missing" 1>&6 | |
1367 | fi | |
158a8e6b | 1368 | |
9d577a61 | 1369 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 |
27a6ded9 | 1370 | echo "configure:1371: checking for working autoheader" >&5 |
9d577a61 TT |
1371 | # Run test in a subshell; some versions of sh will print an error if |
1372 | # an executable is not found, even if stderr is redirected. | |
1373 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1374 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
1375 | AUTOHEADER=autoheader | |
1376 | echo "$ac_t""found" 1>&6 | |
158a8e6b | 1377 | else |
9d577a61 TT |
1378 | AUTOHEADER="$missing_dir/missing autoheader" |
1379 | echo "$ac_t""missing" 1>&6 | |
8107bcf9 PB |
1380 | fi |
1381 | ||
9d577a61 | 1382 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 |
27a6ded9 | 1383 | echo "configure:1384: checking for working makeinfo" >&5 |
9d577a61 TT |
1384 | # Run test in a subshell; some versions of sh will print an error if |
1385 | # an executable is not found, even if stderr is redirected. | |
1386 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1387 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
1388 | MAKEINFO=makeinfo | |
1389 | echo "$ac_t""found" 1>&6 | |
1390 | else | |
1391 | MAKEINFO="$missing_dir/missing makeinfo" | |
1392 | echo "$ac_t""missing" 1>&6 | |
158a8e6b AO |
1393 | fi |
1394 | ||
1395 | ||
ee9dd372 | 1396 | |
ee9dd372 TT |
1397 | # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. |
1398 | set dummy ${ac_tool_prefix}as; ac_word=$2 | |
1399 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 1400 | echo "configure:1401: checking for $ac_word" >&5 |
ee9dd372 TT |
1401 | if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then |
1402 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1403 | else | |
1404 | if test -n "$AS"; then | |
1405 | ac_cv_prog_AS="$AS" # Let the user override the test. | |
1406 | else | |
1407 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
a3ffcff3 TT |
1408 | ac_dummy="$PATH" |
1409 | for ac_dir in $ac_dummy; do | |
ee9dd372 TT |
1410 | test -z "$ac_dir" && ac_dir=. |
1411 | if test -f $ac_dir/$ac_word; then | |
1412 | ac_cv_prog_AS="${ac_tool_prefix}as" | |
1413 | break | |
1414 | fi | |
1415 | done | |
1416 | IFS="$ac_save_ifs" | |
1417 | test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as" | |
1418 | fi | |
1419 | fi | |
1420 | AS="$ac_cv_prog_AS" | |
1421 | if test -n "$AS"; then | |
1422 | echo "$ac_t""$AS" 1>&6 | |
1423 | else | |
1424 | echo "$ac_t""no" 1>&6 | |
1425 | fi | |
1426 | ||
1427 | ||
1428 | ||
1429 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
1430 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
1431 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 1432 | echo "configure:1433: checking for $ac_word" >&5 |
ee9dd372 TT |
1433 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
1434 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1435 | else | |
1436 | if test -n "$AR"; then | |
1437 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1438 | else | |
1439 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
a3ffcff3 TT |
1440 | ac_dummy="$PATH" |
1441 | for ac_dir in $ac_dummy; do | |
ee9dd372 TT |
1442 | test -z "$ac_dir" && ac_dir=. |
1443 | if test -f $ac_dir/$ac_word; then | |
1444 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1445 | break | |
1446 | fi | |
1447 | done | |
1448 | IFS="$ac_save_ifs" | |
1449 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
1450 | fi | |
1451 | fi | |
1452 | AR="$ac_cv_prog_AR" | |
1453 | if test -n "$AR"; then | |
1454 | echo "$ac_t""$AR" 1>&6 | |
1455 | else | |
1456 | echo "$ac_t""no" 1>&6 | |
1457 | fi | |
1458 | ||
1459 | ||
1460 | ||
1461 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1462 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1463 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 1464 | echo "configure:1465: checking for $ac_word" >&5 |
ee9dd372 TT |
1465 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1466 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1467 | else | |
1468 | if test -n "$RANLIB"; then | |
1469 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1470 | else | |
1471 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
a3ffcff3 TT |
1472 | ac_dummy="$PATH" |
1473 | for ac_dir in $ac_dummy; do | |
ee9dd372 TT |
1474 | test -z "$ac_dir" && ac_dir=. |
1475 | if test -f $ac_dir/$ac_word; then | |
1476 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1477 | break | |
1478 | fi | |
1479 | done | |
1480 | IFS="$ac_save_ifs" | |
1481 | fi | |
1482 | fi | |
1483 | RANLIB="$ac_cv_prog_RANLIB" | |
1484 | if test -n "$RANLIB"; then | |
1485 | echo "$ac_t""$RANLIB" 1>&6 | |
1486 | else | |
1487 | echo "$ac_t""no" 1>&6 | |
1488 | fi | |
1489 | ||
1490 | ||
1491 | if test -z "$ac_cv_prog_RANLIB"; then | |
1492 | if test -n "$ac_tool_prefix"; then | |
1493 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1494 | set dummy ranlib; ac_word=$2 | |
1495 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 1496 | echo "configure:1497: checking for $ac_word" >&5 |
ee9dd372 TT |
1497 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1498 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1499 | else | |
1500 | if test -n "$RANLIB"; then | |
1501 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1502 | else | |
1503 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
a3ffcff3 TT |
1504 | ac_dummy="$PATH" |
1505 | for ac_dir in $ac_dummy; do | |
ee9dd372 TT |
1506 | test -z "$ac_dir" && ac_dir=. |
1507 | if test -f $ac_dir/$ac_word; then | |
1508 | ac_cv_prog_RANLIB="ranlib" | |
1509 | break | |
1510 | fi | |
1511 | done | |
1512 | IFS="$ac_save_ifs" | |
1513 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1514 | fi | |
1515 | fi | |
1516 | RANLIB="$ac_cv_prog_RANLIB" | |
1517 | if test -n "$RANLIB"; then | |
1518 | echo "$ac_t""$RANLIB" 1>&6 | |
1519 | else | |
1520 | echo "$ac_t""no" 1>&6 | |
1521 | fi | |
1522 | ||
1523 | else | |
1524 | RANLIB=":" | |
1525 | fi | |
1526 | fi | |
1527 | ||
1528 | ||
1529 | # Find a good install program. We prefer a C program (faster), | |
1530 | # so one script is as good as another. But avoid the broken or | |
1531 | # incompatible versions: | |
1532 | # SysV /etc/install, /usr/sbin/install | |
1533 | # SunOS /usr/etc/install | |
1534 | # IRIX /sbin/install | |
1535 | # AIX /bin/install | |
1536 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
1537 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
1538 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
1539 | # ./install, which can be erroneously created by make from ./install.sh. | |
1540 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
e7cca7f4 | 1541 | echo "configure:1542: checking for a BSD compatible install" >&5 |
ee9dd372 TT |
1542 | if test -z "$INSTALL"; then |
1543 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
1544 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1545 | else | |
1546 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
1547 | for ac_dir in $PATH; do | |
1548 | # Account for people who put trailing slashes in PATH elements. | |
1549 | case "$ac_dir/" in | |
1550 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
1551 | *) | |
1552 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
1553 | # Don't use installbsd from OSF since it installs stuff as root | |
1554 | # by default. | |
1555 | for ac_prog in ginstall scoinst install; do | |
1556 | if test -f $ac_dir/$ac_prog; then | |
1557 | if test $ac_prog = install && | |
1558 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
1559 | # AIX install. It has an incompatible calling convention. | |
1560 | : | |
1561 | else | |
1562 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
1563 | break 2 | |
1564 | fi | |
1565 | fi | |
1566 | done | |
1567 | ;; | |
1568 | esac | |
1569 | done | |
1570 | IFS="$ac_save_IFS" | |
1571 | ||
1572 | fi | |
1573 | if test "${ac_cv_path_install+set}" = set; then | |
1574 | INSTALL="$ac_cv_path_install" | |
1575 | else | |
1576 | # As a last resort, use the slow shell script. We don't cache a | |
1577 | # path for INSTALL within a source directory, because that will | |
1578 | # break other packages using the cache if that directory is | |
1579 | # removed, or if the path is relative. | |
1580 | INSTALL="$ac_install_sh" | |
1581 | fi | |
1582 | fi | |
1583 | echo "$ac_t""$INSTALL" 1>&6 | |
1584 | ||
1585 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
1586 | # It thinks the first close brace ends the variable substitution. | |
1587 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
1588 | ||
a3ffcff3 TT |
1589 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
1590 | ||
ee9dd372 TT |
1591 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
1592 | ||
1593 | ||
1594 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
e7cca7f4 | 1595 | echo "configure:1596: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
ee9dd372 TT |
1596 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
1597 | if test "${enable_maintainer_mode+set}" = set; then | |
1598 | enableval="$enable_maintainer_mode" | |
1599 | USE_MAINTAINER_MODE=$enableval | |
1600 | else | |
1601 | USE_MAINTAINER_MODE=no | |
1602 | fi | |
1603 | ||
1604 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
1605 | ||
1606 | ||
1607 | if test $USE_MAINTAINER_MODE = yes; then | |
1608 | MAINTAINER_MODE_TRUE= | |
1609 | MAINTAINER_MODE_FALSE='#' | |
1610 | else | |
1611 | MAINTAINER_MODE_TRUE='#' | |
1612 | MAINTAINER_MODE_FALSE= | |
1613 | fi | |
1614 | MAINT=$MAINTAINER_MODE_TRUE | |
1615 | ||
1616 | ||
1617 | ||
0659e0e3 | 1618 | |
ee9dd372 TT |
1619 | |
1620 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
e7cca7f4 | 1621 | echo "configure:1622: checking for executable suffix" >&5 |
ee9dd372 TT |
1622 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
1623 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1624 | else | |
a3ffcff3 | 1625 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
ee9dd372 TT |
1626 | ac_cv_exeext=.exe |
1627 | else | |
1628 | rm -f conftest* | |
1629 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
1630 | ac_cv_exeext= | |
e7cca7f4 | 1631 | if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
ee9dd372 TT |
1632 | for file in conftest.*; do |
1633 | case $file in | |
e7cca7f4 | 1634 | *.c | *.o | *.obj) ;; |
ee9dd372 TT |
1635 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
1636 | esac | |
1637 | done | |
1638 | else | |
1639 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
1640 | fi | |
1641 | rm -f conftest* | |
1642 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
1643 | fi | |
1644 | fi | |
1645 | ||
1646 | EXEEXT="" | |
1647 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
1648 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
1649 | ac_exeext=$EXEEXT | |
1650 | ||
ee9dd372 TT |
1651 | |
1652 | # configure.host sets the following important variables | |
1653 | # libgcj_cflags - host specific C compiler flags | |
1654 | # libgcj_cxxflags - host specific C++ compiler flags | |
1655 | # libgcj_javaflags - host specific Java compiler flags | |
1656 | ||
1657 | libgcj_cflags= | |
1658 | libgcj_cxxflags= | |
1659 | libgcj_javaflags= | |
1660 | ||
2ee7cd3e | 1661 | . ${srcdir}/configure.host |
ee9dd372 | 1662 | |
ee9dd372 TT |
1663 | LIBGCJ_CFLAGS="${libgcj_cflags}" |
1664 | LIBGCJ_CXXFLAGS="${libgcj_cxxflags}" | |
1665 | LIBGCJ_JAVAFLAGS="${libgcj_javaflags}" | |
1666 | ||
1667 | ||
1668 | ||
1669 | ||
1670 | ||
1671 | ||
9d577a61 | 1672 | |
ee9dd372 TT |
1673 | |
1674 | ||
d6f6aaf6 | 1675 | # Only use libltdl for non-newlib builds. |
2d29f3a1 | 1676 | if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then |
52a11cbf | 1677 | case $enable_ltdl_convenience in |
7af85558 TT |
1678 | no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;; |
1679 | "") enable_ltdl_convenience=yes | |
1680 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
1681 | esac | |
6d0860ee AO |
1682 | LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la |
1683 | INCLTDL='-I${top_srcdir}/''libltdl' | |
7af85558 TT |
1684 | |
1685 | ||
1686 | DIRLTDL=libltdl | |
1687 | cat >> confdefs.h <<\EOF | |
1688 | #define USE_LTDL 1 | |
1689 | EOF | |
1690 | ||
1691 | # Sigh. Libtool's macro doesn't do the right thing. | |
1692 | INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL" | |
7f7ba9bf | 1693 | # FIXME: this is a hack. |
1e6347d8 | 1694 | sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`" |
f1eba847 | 1695 | ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir" |
7af85558 TT |
1696 | fi |
1697 | ||
1698 | ||
1699 | ||
a3ffcff3 TT |
1700 | # Check whether --enable-shared or --disable-shared was given. |
1701 | if test "${enable_shared+set}" = set; then | |
1702 | enableval="$enable_shared" | |
1703 | p=${PACKAGE-default} | |
52a11cbf | 1704 | case $enableval in |
a3ffcff3 TT |
1705 | yes) enable_shared=yes ;; |
1706 | no) enable_shared=no ;; | |
1707 | *) | |
1708 | enable_shared=no | |
1709 | # Look at the argument we got. We use all the common list separators. | |
1710 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1711 | for pkg in $enableval; do | |
1712 | if test "X$pkg" = "X$p"; then | |
1713 | enable_shared=yes | |
1714 | fi | |
1715 | done | |
1716 | IFS="$ac_save_ifs" | |
1717 | ;; | |
1718 | esac | |
1719 | else | |
1720 | enable_shared=yes | |
1721 | fi | |
1722 | ||
1723 | # Check whether --enable-static or --disable-static was given. | |
1724 | if test "${enable_static+set}" = set; then | |
1725 | enableval="$enable_static" | |
1726 | p=${PACKAGE-default} | |
52a11cbf | 1727 | case $enableval in |
a3ffcff3 TT |
1728 | yes) enable_static=yes ;; |
1729 | no) enable_static=no ;; | |
1730 | *) | |
1731 | enable_static=no | |
1732 | # Look at the argument we got. We use all the common list separators. | |
1733 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1734 | for pkg in $enableval; do | |
1735 | if test "X$pkg" = "X$p"; then | |
1736 | enable_static=yes | |
1737 | fi | |
1738 | done | |
1739 | IFS="$ac_save_ifs" | |
1740 | ;; | |
1741 | esac | |
1742 | else | |
1743 | enable_static=yes | |
1744 | fi | |
1745 | ||
01b02b11 TT |
1746 | # Check whether --enable-fast-install or --disable-fast-install was given. |
1747 | if test "${enable_fast_install+set}" = set; then | |
1748 | enableval="$enable_fast_install" | |
1749 | p=${PACKAGE-default} | |
52a11cbf | 1750 | case $enableval in |
01b02b11 TT |
1751 | yes) enable_fast_install=yes ;; |
1752 | no) enable_fast_install=no ;; | |
1753 | *) | |
1754 | enable_fast_install=no | |
1755 | # Look at the argument we got. We use all the common list separators. | |
1756 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1757 | for pkg in $enableval; do | |
1758 | if test "X$pkg" = "X$p"; then | |
1759 | enable_fast_install=yes | |
1760 | fi | |
1761 | done | |
1762 | IFS="$ac_save_ifs" | |
1763 | ;; | |
1764 | esac | |
1765 | else | |
1766 | enable_fast_install=yes | |
1767 | fi | |
1768 | ||
a3ffcff3 TT |
1769 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1770 | if test "${with_gnu_ld+set}" = set; then | |
1771 | withval="$with_gnu_ld" | |
1772 | test "$withval" = no || with_gnu_ld=yes | |
1773 | else | |
1774 | with_gnu_ld=no | |
1775 | fi | |
1776 | ||
a3ffcff3 | 1777 | ac_prog=ld |
52a11cbf | 1778 | if test "$GCC" = yes; then |
a3ffcff3 TT |
1779 | # Check if gcc -print-prog-name=ld gives a path. |
1780 | echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 | |
e7cca7f4 | 1781 | echo "configure:1782: checking for ld used by GCC" >&5 |
6d0860ee AO |
1782 | case $host in |
1783 | *-*-mingw*) | |
1784 | # gcc leaves a trailing carriage return which upsets mingw | |
1785 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
1786 | *) | |
1787 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
1788 | esac | |
52a11cbf | 1789 | case $ac_prog in |
01b02b11 | 1790 | # Accept absolute paths. |
7af85558 | 1791 | [\\/]* | [A-Za-z]:[\\/]*) |
01b02b11 TT |
1792 | re_direlt='/[^/][^/]*/\.\./' |
1793 | # Canonicalize the path of ld | |
1794 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
1795 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
1796 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
1797 | done | |
1798 | test -z "$LD" && LD="$ac_prog" | |
1799 | ;; | |
a3ffcff3 TT |
1800 | "") |
1801 | # If it fails, then pretend we aren't using GCC. | |
1802 | ac_prog=ld | |
1803 | ;; | |
1804 | *) | |
1805 | # If it is relative, then search for the first ld in PATH. | |
1806 | with_gnu_ld=unknown | |
1807 | ;; | |
1808 | esac | |
1809 | elif test "$with_gnu_ld" = yes; then | |
1810 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 | |
e7cca7f4 | 1811 | echo "configure:1812: checking for GNU ld" >&5 |
a3ffcff3 TT |
1812 | else |
1813 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | |
e7cca7f4 | 1814 | echo "configure:1815: checking for non-GNU ld" >&5 |
a3ffcff3 | 1815 | fi |
52a11cbf | 1816 | if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then |
a3ffcff3 TT |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 |
1818 | else | |
1819 | if test -z "$LD"; then | |
7af85558 | 1820 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
a3ffcff3 TT |
1821 | for ac_dir in $PATH; do |
1822 | test -z "$ac_dir" && ac_dir=. | |
7af85558 | 1823 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
52a11cbf | 1824 | lt_cv_path_LD="$ac_dir/$ac_prog" |
a3ffcff3 TT |
1825 | # Check to see if the program is GNU ld. I'd rather use --version, |
1826 | # but apparently some GNU ld's only accept -v. | |
1827 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
52a11cbf | 1828 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
a3ffcff3 TT |
1829 | test "$with_gnu_ld" != no && break |
1830 | else | |
01b02b11 | 1831 | test "$with_gnu_ld" != yes && break |
a3ffcff3 TT |
1832 | fi |
1833 | fi | |
1834 | done | |
1835 | IFS="$ac_save_ifs" | |
1836 | else | |
52a11cbf | 1837 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
a3ffcff3 TT |
1838 | fi |
1839 | fi | |
1840 | ||
52a11cbf | 1841 | LD="$lt_cv_path_LD" |
a3ffcff3 TT |
1842 | if test -n "$LD"; then |
1843 | echo "$ac_t""$LD" 1>&6 | |
1844 | else | |
1845 | echo "$ac_t""no" 1>&6 | |
1846 | fi | |
1847 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } | |
a3ffcff3 | 1848 | echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 |
e7cca7f4 | 1849 | echo "configure:1850: checking if the linker ($LD) is GNU ld" >&5 |
52a11cbf | 1850 | if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then |
a3ffcff3 TT |
1851 | echo $ac_n "(cached) $ac_c" 1>&6 |
1852 | else | |
1853 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
1854 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
52a11cbf | 1855 | lt_cv_prog_gnu_ld=yes |
a3ffcff3 | 1856 | else |
52a11cbf | 1857 | lt_cv_prog_gnu_ld=no |
a3ffcff3 TT |
1858 | fi |
1859 | fi | |
1860 | ||
52a11cbf RH |
1861 | echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6 |
1862 | with_gnu_ld=$lt_cv_prog_gnu_ld | |
6d0860ee AO |
1863 | |
1864 | ||
1865 | echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 | |
e7cca7f4 | 1866 | echo "configure:1867: checking for $LD option to reload object files" >&5 |
6d0860ee AO |
1867 | if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then |
1868 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1869 | else | |
1870 | lt_cv_ld_reload_flag='-r' | |
1871 | fi | |
a3ffcff3 | 1872 | |
6d0860ee AO |
1873 | echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 |
1874 | reload_flag=$lt_cv_ld_reload_flag | |
1875 | test -n "$reload_flag" && reload_flag=" $reload_flag" | |
a3ffcff3 TT |
1876 | |
1877 | echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 | |
e7cca7f4 | 1878 | echo "configure:1879: checking for BSD-compatible nm" >&5 |
52a11cbf | 1879 | if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then |
a3ffcff3 TT |
1880 | echo $ac_n "(cached) $ac_c" 1>&6 |
1881 | else | |
1882 | if test -n "$NM"; then | |
1883 | # Let the user override the test. | |
52a11cbf | 1884 | lt_cv_path_NM="$NM" |
a3ffcff3 | 1885 | else |
7af85558 | 1886 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
01b02b11 | 1887 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
a3ffcff3 | 1888 | test -z "$ac_dir" && ac_dir=. |
6d0860ee AO |
1889 | tmp_nm=$ac_dir/${ac_tool_prefix}nm |
1890 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then | |
a3ffcff3 TT |
1891 | # Check to see if the nm accepts a BSD-compat flag. |
1892 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
1893 | # nm: unknown option "B" ignored | |
6d0860ee AO |
1894 | # Tru64's nm complains that /dev/null is an invalid object file |
1895 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then | |
52a11cbf | 1896 | lt_cv_path_NM="$tmp_nm -B" |
01b02b11 | 1897 | break |
6d0860ee | 1898 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
52a11cbf | 1899 | lt_cv_path_NM="$tmp_nm -p" |
01b02b11 | 1900 | break |
a3ffcff3 | 1901 | else |
52a11cbf | 1902 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
01b02b11 | 1903 | continue # so that we can try to find one that supports BSD flags |
a3ffcff3 | 1904 | fi |
a3ffcff3 TT |
1905 | fi |
1906 | done | |
1907 | IFS="$ac_save_ifs" | |
52a11cbf | 1908 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
a3ffcff3 TT |
1909 | fi |
1910 | fi | |
1911 | ||
52a11cbf | 1912 | NM="$lt_cv_path_NM" |
a3ffcff3 TT |
1913 | echo "$ac_t""$NM" 1>&6 |
1914 | ||
6d0860ee | 1915 | echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 |
e7cca7f4 | 1916 | echo "configure:1917: checking how to recognise dependant libraries" >&5 |
6d0860ee AO |
1917 | if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then |
1918 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1919 | else | |
5f527203 | 1920 | lt_cv_file_magic_cmd='$MAGIC_CMD' |
6d0860ee AO |
1921 | lt_cv_file_magic_test_file= |
1922 | lt_cv_deplibs_check_method='unknown' | |
1923 | # Need to set the preceding variable on all platforms that support | |
1924 | # interlibrary dependencies. | |
1925 | # 'none' -- dependencies not supported. | |
1926 | # `unknown' -- same as none, but documents that we really don't know. | |
1927 | # 'pass_all' -- all dependencies passed with no checks. | |
1928 | # 'test_compile' -- check by making test program. | |
1929 | # 'file_magic [regex]' -- check by looking for files in library path | |
1930 | # which responds to the $file_magic_cmd with a given egrep regex. | |
1931 | # If you have `file' or equivalent on your system and you're not sure | |
1932 | # whether `pass_all' will *always* work, you probably want this one. | |
1933 | ||
52a11cbf RH |
1934 | case $host_os in |
1935 | aix*) | |
6d0860ee AO |
1936 | lt_cv_deplibs_check_method=pass_all |
1937 | ;; | |
1938 | ||
1939 | beos*) | |
1940 | lt_cv_deplibs_check_method=pass_all | |
1941 | ;; | |
a3ffcff3 | 1942 | |
6d0860ee | 1943 | bsdi4*) |
52a11cbf RH |
1944 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' |
1945 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
6d0860ee AO |
1946 | lt_cv_file_magic_test_file=/shlib/libc.so |
1947 | ;; | |
1948 | ||
5f527203 | 1949 | cygwin* | mingw* |pw32*) |
6d0860ee | 1950 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
5f527203 | 1951 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
6d0860ee AO |
1952 | ;; |
1953 | ||
52a11cbf RH |
1954 | darwin* | rhapsody*) |
1955 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' | |
5ec89e89 AO |
1956 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
1957 | case "$host_os" in | |
1958 | rhapsody* | darwin1.012) | |
1959 | lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System' | |
1960 | ;; | |
1961 | *) # Darwin 1.3 on | |
1962 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' | |
1963 | ;; | |
1964 | esac | |
52a11cbf RH |
1965 | ;; |
1966 | ||
6d0860ee AO |
1967 | freebsd* ) |
1968 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
52a11cbf | 1969 | case $host_cpu in |
6d0860ee AO |
1970 | i*86 ) |
1971 | # Not sure whether the presence of OpenBSD here was a mistake. | |
1972 | # Let's accept both of them until this is cleared up. | |
52a11cbf RH |
1973 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' |
1974 | lt_cv_file_magic_cmd=/usr/bin/file | |
6d0860ee AO |
1975 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
1976 | ;; | |
1977 | esac | |
1978 | else | |
1979 | lt_cv_deplibs_check_method=pass_all | |
1980 | fi | |
1981 | ;; | |
1982 | ||
1983 | gnu*) | |
1984 | lt_cv_deplibs_check_method=pass_all | |
1985 | ;; | |
1986 | ||
52a11cbf | 1987 | hpux10.20*|hpux11*) |
f5cc59a7 AO |
1988 | case $host_cpu in |
1989 | hppa*) | |
1990 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' | |
1991 | lt_cv_file_magic_cmd=/usr/bin/file | |
1992 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
1993 | ;; | |
1994 | ia64*) | |
1995 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' | |
1996 | lt_cv_file_magic_cmd=/usr/bin/file | |
1997 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
1998 | ;; | |
1999 | esac | |
6d0860ee AO |
2000 | ;; |
2001 | ||
2002 | irix5* | irix6*) | |
52a11cbf | 2003 | case $host_os in |
6d0860ee AO |
2004 | irix5*) |
2005 | # this will be overridden with pass_all, but let us keep it just in case | |
2006 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" | |
2007 | ;; | |
2008 | *) | |
52a11cbf | 2009 | case $LD in |
6d0860ee AO |
2010 | *-32|*"-32 ") libmagic=32-bit;; |
2011 | *-n32|*"-n32 ") libmagic=N32;; | |
2012 | *-64|*"-64 ") libmagic=64-bit;; | |
2013 | *) libmagic=never-match;; | |
2014 | esac | |
2015 | # this will be overridden with pass_all, but let us keep it just in case | |
52a11cbf RH |
2016 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" |
2017 | ;; | |
6d0860ee AO |
2018 | esac |
2019 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` | |
2020 | lt_cv_deplibs_check_method=pass_all | |
2021 | ;; | |
2022 | ||
2023 | # This must be Linux ELF. | |
2024 | linux-gnu*) | |
52a11cbf | 2025 | case $host_cpu in |
b1e0a93e | 2026 | alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) |
6d0860ee AO |
2027 | lt_cv_deplibs_check_method=pass_all ;; |
2028 | *) | |
2029 | # glibc up to 2.1.1 does not perform some relocations on ARM | |
52a11cbf RH |
2030 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; |
2031 | esac | |
6d0860ee AO |
2032 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
2033 | ;; | |
2034 | ||
2035 | netbsd*) | |
52a11cbf | 2036 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
5ec89e89 | 2037 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' |
6d0860ee | 2038 | else |
5ec89e89 | 2039 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' |
6d0860ee | 2040 | fi |
52a11cbf RH |
2041 | ;; |
2042 | ||
2043 | newsos6) | |
2044 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' | |
2045 | lt_cv_file_magic_cmd=/usr/bin/file | |
2046 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
6d0860ee AO |
2047 | ;; |
2048 | ||
2049 | osf3* | osf4* | osf5*) | |
2050 | # this will be overridden with pass_all, but let us keep it just in case | |
2051 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' | |
2052 | lt_cv_file_magic_test_file=/shlib/libc.so | |
2053 | lt_cv_deplibs_check_method=pass_all | |
2054 | ;; | |
2055 | ||
2056 | sco3.2v5*) | |
2057 | lt_cv_deplibs_check_method=pass_all | |
2058 | ;; | |
2059 | ||
2060 | solaris*) | |
2061 | lt_cv_deplibs_check_method=pass_all | |
2062 | lt_cv_file_magic_test_file=/lib/libc.so | |
2063 | ;; | |
2064 | ||
3610e0d5 TT |
2065 | sysv5uw[78]* | sysv4*uw2*) |
2066 | lt_cv_deplibs_check_method=pass_all | |
2067 | ;; | |
2068 | ||
6d0860ee | 2069 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
52a11cbf | 2070 | case $host_vendor in |
6d0860ee AO |
2071 | ncr) |
2072 | lt_cv_deplibs_check_method=pass_all | |
2073 | ;; | |
2074 | motorola) | |
52a11cbf RH |
2075 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' |
2076 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
6d0860ee AO |
2077 | ;; |
2078 | esac | |
2079 | ;; | |
7af85558 TT |
2080 | esac |
2081 | ||
6d0860ee AO |
2082 | fi |
2083 | ||
2084 | echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 | |
2085 | file_magic_cmd=$lt_cv_file_magic_cmd | |
2086 | deplibs_check_method=$lt_cv_deplibs_check_method | |
2087 | ||
2088 | echo $ac_n "checking for object suffix""... $ac_c" 1>&6 | |
e7cca7f4 | 2089 | echo "configure:2090: checking for object suffix" >&5 |
6d0860ee AO |
2090 | if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then |
2091 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2092 | else | |
2093 | rm -f conftest* | |
2094 | echo 'int i = 1;' > conftest.$ac_ext | |
e7cca7f4 | 2095 | if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6d0860ee AO |
2096 | for ac_file in conftest.*; do |
2097 | case $ac_file in | |
2098 | *.c) ;; | |
2099 | *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; | |
2100 | esac | |
2101 | done | |
2102 | else | |
2103 | { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } | |
2104 | fi | |
2105 | rm -f conftest* | |
2106 | fi | |
2107 | ||
2108 | echo "$ac_t""$ac_cv_objext" 1>&6 | |
2109 | OBJEXT=$ac_cv_objext | |
2110 | ac_objext=$ac_cv_objext | |
2111 | ||
2112 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! | |
2113 | ||
2114 | # Only perform the check for file, if the check method requires it | |
52a11cbf | 2115 | case $deplibs_check_method in |
6d0860ee | 2116 | file_magic*) |
5f527203 | 2117 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
6d0860ee | 2118 | echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 |
e7cca7f4 | 2119 | echo "configure:2120: checking for ${ac_tool_prefix}file" >&5 |
5f527203 | 2120 | if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then |
6d0860ee AO |
2121 | echo $ac_n "(cached) $ac_c" 1>&6 |
2122 | else | |
52a11cbf | 2123 | case $MAGIC_CMD in |
6d0860ee | 2124 | /*) |
5f527203 | 2125 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
6d0860ee AO |
2126 | ;; |
2127 | ?:/*) | |
5f527203 | 2128 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
6d0860ee AO |
2129 | ;; |
2130 | *) | |
5f527203 | 2131 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
6d0860ee AO |
2132 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2133 | ac_dummy="/usr/bin:$PATH" | |
2134 | for ac_dir in $ac_dummy; do | |
2135 | test -z "$ac_dir" && ac_dir=. | |
2136 | if test -f $ac_dir/${ac_tool_prefix}file; then | |
5f527203 | 2137 | lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" |
6d0860ee | 2138 | if test -n "$file_magic_test_file"; then |
52a11cbf | 2139 | case $deplibs_check_method in |
6d0860ee AO |
2140 | "file_magic "*) |
2141 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
5f527203 | 2142 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
6d0860ee AO |
2143 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
2144 | egrep "$file_magic_regex" > /dev/null; then | |
2145 | : | |
2146 | else | |
2147 | cat <<EOF 1>&2 | |
2148 | ||
2149 | *** Warning: the command libtool uses to detect shared libraries, | |
2150 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
2151 | *** The result is that libtool may fail to recognize shared libraries | |
2152 | *** as such. This will affect the creation of libtool libraries that | |
2153 | *** depend on shared libraries, but programs linked with such libtool | |
2154 | *** libraries will work regardless of this problem. Nevertheless, you | |
2155 | *** may want to report the problem to your system manager and/or to | |
2156 | *** bug-libtool@gnu.org | |
2157 | ||
2158 | EOF | |
2159 | fi ;; | |
2160 | esac | |
2161 | fi | |
2162 | break | |
2163 | fi | |
2164 | done | |
2165 | IFS="$ac_save_ifs" | |
5f527203 | 2166 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
6d0860ee AO |
2167 | ;; |
2168 | esac | |
2169 | fi | |
2170 | ||
5f527203 AO |
2171 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
2172 | if test -n "$MAGIC_CMD"; then | |
2173 | echo "$ac_t""$MAGIC_CMD" 1>&6 | |
6d0860ee AO |
2174 | else |
2175 | echo "$ac_t""no" 1>&6 | |
2176 | fi | |
2177 | ||
5f527203 | 2178 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
6d0860ee AO |
2179 | if test -n "$ac_tool_prefix"; then |
2180 | echo $ac_n "checking for file""... $ac_c" 1>&6 | |
e7cca7f4 | 2181 | echo "configure:2182: checking for file" >&5 |
5f527203 | 2182 | if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then |
6d0860ee AO |
2183 | echo $ac_n "(cached) $ac_c" 1>&6 |
2184 | else | |
52a11cbf | 2185 | case $MAGIC_CMD in |
6d0860ee | 2186 | /*) |
5f527203 | 2187 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
6d0860ee AO |
2188 | ;; |
2189 | ?:/*) | |
5f527203 | 2190 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
6d0860ee AO |
2191 | ;; |
2192 | *) | |
5f527203 | 2193 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
6d0860ee AO |
2194 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2195 | ac_dummy="/usr/bin:$PATH" | |
2196 | for ac_dir in $ac_dummy; do | |
2197 | test -z "$ac_dir" && ac_dir=. | |
2198 | if test -f $ac_dir/file; then | |
5f527203 | 2199 | lt_cv_path_MAGIC_CMD="$ac_dir/file" |
6d0860ee | 2200 | if test -n "$file_magic_test_file"; then |
52a11cbf | 2201 | case $deplibs_check_method in |
6d0860ee AO |
2202 | "file_magic "*) |
2203 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
5f527203 | 2204 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
6d0860ee AO |
2205 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
2206 | egrep "$file_magic_regex" > /dev/null; then | |
2207 | : | |
2208 | else | |
2209 | cat <<EOF 1>&2 | |
2210 | ||
2211 | *** Warning: the command libtool uses to detect shared libraries, | |
2212 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
2213 | *** The result is that libtool may fail to recognize shared libraries | |
2214 | *** as such. This will affect the creation of libtool libraries that | |
2215 | *** depend on shared libraries, but programs linked with such libtool | |
2216 | *** libraries will work regardless of this problem. Nevertheless, you | |
2217 | *** may want to report the problem to your system manager and/or to | |
2218 | *** bug-libtool@gnu.org | |
2219 | ||
2220 | EOF | |
2221 | fi ;; | |
2222 | esac | |
2223 | fi | |
2224 | break | |
2225 | fi | |
2226 | done | |
2227 | IFS="$ac_save_ifs" | |
5f527203 | 2228 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
6d0860ee AO |
2229 | ;; |
2230 | esac | |
2231 | fi | |
2232 | ||
5f527203 AO |
2233 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
2234 | if test -n "$MAGIC_CMD"; then | |
2235 | echo "$ac_t""$MAGIC_CMD" 1>&6 | |
6d0860ee AO |
2236 | else |
2237 | echo "$ac_t""no" 1>&6 | |
2238 | fi | |
2239 | ||
2240 | else | |
5f527203 | 2241 | MAGIC_CMD=: |
6d0860ee AO |
2242 | fi |
2243 | fi | |
2244 | ||
2245 | fi | |
2246 | ;; | |
2247 | esac | |
2248 | ||
2249 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2250 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2251 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 2252 | echo "configure:2253: checking for $ac_word" >&5 |
6d0860ee AO |
2253 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2254 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2255 | else | |
2256 | if test -n "$RANLIB"; then | |
2257 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2258 | else | |
2259 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2260 | ac_dummy="$PATH" | |
2261 | for ac_dir in $ac_dummy; do | |
2262 | test -z "$ac_dir" && ac_dir=. | |
2263 | if test -f $ac_dir/$ac_word; then | |
2264 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
2265 | break | |
2266 | fi | |
2267 | done | |
2268 | IFS="$ac_save_ifs" | |
2269 | fi | |
2270 | fi | |
2271 | RANLIB="$ac_cv_prog_RANLIB" | |
2272 | if test -n "$RANLIB"; then | |
2273 | echo "$ac_t""$RANLIB" 1>&6 | |
2274 | else | |
2275 | echo "$ac_t""no" 1>&6 | |
2276 | fi | |
2277 | ||
2278 | ||
2279 | if test -z "$ac_cv_prog_RANLIB"; then | |
2280 | if test -n "$ac_tool_prefix"; then | |
2281 | # Extract the first word of "ranlib", so it can be a program name with args. | |
2282 | set dummy ranlib; ac_word=$2 | |
2283 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 2284 | echo "configure:2285: checking for $ac_word" >&5 |
6d0860ee AO |
2285 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2286 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2287 | else | |
2288 | if test -n "$RANLIB"; then | |
2289 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2290 | else | |
2291 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2292 | ac_dummy="$PATH" | |
2293 | for ac_dir in $ac_dummy; do | |
2294 | test -z "$ac_dir" && ac_dir=. | |
2295 | if test -f $ac_dir/$ac_word; then | |
2296 | ac_cv_prog_RANLIB="ranlib" | |
2297 | break | |
2298 | fi | |
2299 | done | |
2300 | IFS="$ac_save_ifs" | |
2301 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2302 | fi | |
2303 | fi | |
2304 | RANLIB="$ac_cv_prog_RANLIB" | |
2305 | if test -n "$RANLIB"; then | |
2306 | echo "$ac_t""$RANLIB" 1>&6 | |
2307 | else | |
2308 | echo "$ac_t""no" 1>&6 | |
2309 | fi | |
2310 | ||
2311 | else | |
2312 | RANLIB=":" | |
2313 | fi | |
2314 | fi | |
2315 | ||
2316 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
2317 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
2318 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 2319 | echo "configure:2320: checking for $ac_word" >&5 |
6d0860ee AO |
2320 | if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then |
2321 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2322 | else | |
2323 | if test -n "$STRIP"; then | |
2324 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2325 | else | |
2326 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2327 | ac_dummy="$PATH" | |
2328 | for ac_dir in $ac_dummy; do | |
2329 | test -z "$ac_dir" && ac_dir=. | |
2330 | if test -f $ac_dir/$ac_word; then | |
2331 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
2332 | break | |
2333 | fi | |
2334 | done | |
2335 | IFS="$ac_save_ifs" | |
2336 | fi | |
2337 | fi | |
2338 | STRIP="$ac_cv_prog_STRIP" | |
2339 | if test -n "$STRIP"; then | |
2340 | echo "$ac_t""$STRIP" 1>&6 | |
2341 | else | |
2342 | echo "$ac_t""no" 1>&6 | |
2343 | fi | |
2344 | ||
2345 | ||
2346 | if test -z "$ac_cv_prog_STRIP"; then | |
2347 | if test -n "$ac_tool_prefix"; then | |
2348 | # Extract the first word of "strip", so it can be a program name with args. | |
2349 | set dummy strip; ac_word=$2 | |
2350 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e7cca7f4 | 2351 | echo "configure:2352: checking for $ac_word" >&5 |
6d0860ee AO |
2352 | if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then |
2353 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2354 | else | |
2355 | if test -n "$STRIP"; then | |
2356 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2357 | else | |
2358 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2359 | ac_dummy="$PATH" | |
2360 | for ac_dir in $ac_dummy; do | |
2361 | test -z "$ac_dir" && ac_dir=. | |
2362 | if test -f $ac_dir/$ac_word; then | |
2363 | ac_cv_prog_STRIP="strip" | |
2364 | break | |
2365 | fi | |
2366 | done | |
2367 | IFS="$ac_save_ifs" | |
2368 | test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" | |
2369 | fi | |
2370 | fi | |
2371 | STRIP="$ac_cv_prog_STRIP" | |
2372 | if test -n "$STRIP"; then | |
2373 | echo "$ac_t""$STRIP" 1>&6 | |
2374 | else | |
2375 | echo "$ac_t""no" 1>&6 | |
2376 | fi | |
2377 | ||
2378 | else | |
2379 | STRIP=":" | |
2380 | fi | |
2381 | fi | |
2382 | ||
2383 | ||
a3ffcff3 | 2384 | # Check for any special flags to pass to ltconfig. |
01b02b11 | 2385 | libtool_flags="--cache-file=$cache_file" |
a3ffcff3 TT |
2386 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" |
2387 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
01b02b11 | 2388 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" |
52a11cbf RH |
2389 | test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc" |
2390 | test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
7af85558 TT |
2391 | libtool_flags="$libtool_flags --enable-dlopen" |
2392 | ||
2393 | # Check whether --enable-libtool-lock or --disable-libtool-lock was given. | |
2394 | if test "${enable_libtool_lock+set}" = set; then | |
2395 | enableval="$enable_libtool_lock" | |
2396 | : | |
2397 | fi | |
2398 | ||
2399 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" | |
2400 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" | |
a3ffcff3 | 2401 | |
6d0860ee AO |
2402 | # Check whether --with-pic or --without-pic was given. |
2403 | if test "${with_pic+set}" = set; then | |
2404 | withval="$with_pic" | |
2405 | pic_mode="$withval" | |
2406 | else | |
2407 | pic_mode=default | |
2408 | fi | |
2409 | ||
2410 | test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" | |
2411 | test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" | |
2412 | ||
a3ffcff3 TT |
2413 | # Some flags need to be propagated to the compiler or linker for good |
2414 | # libtool support. | |
52a11cbf | 2415 | case $host in |
a3ffcff3 TT |
2416 | *-*-irix6*) |
2417 | # Find out which ABI we are using. | |
e7cca7f4 AM |
2418 | echo '#line 2419 "configure"' > conftest.$ac_ext |
2419 | if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
3343fdd2 AO |
2420 | if test "$lt_cv_prog_gnu_ld" = yes; then |
2421 | case `/usr/bin/file conftest.$ac_objext` in | |
2422 | *32-bit*) | |
2423 | LD="${LD-ld} -melf32bsmip" | |
2424 | ;; | |
2425 | *N32*) | |
2426 | LD="${LD-ld} -melf32bmipn32" | |
2427 | ;; | |
2428 | *64-bit*) | |
2429 | LD="${LD-ld} -melf64bmip" | |
2430 | ;; | |
2431 | esac | |
2432 | else | |
52a11cbf | 2433 | case `/usr/bin/file conftest.$ac_objext` in |
a3ffcff3 TT |
2434 | *32-bit*) |
2435 | LD="${LD-ld} -32" | |
2436 | ;; | |
2437 | *N32*) | |
2438 | LD="${LD-ld} -n32" | |
2439 | ;; | |
2440 | *64-bit*) | |
2441 | LD="${LD-ld} -64" | |
2442 | ;; | |
2443 | esac | |
3343fdd2 | 2444 | fi |
a3ffcff3 TT |
2445 | fi |
2446 | rm -rf conftest* | |
2447 | ;; | |
2448 | ||
f5cc59a7 AO |
2449 | ia64-*-hpux*) |
2450 | # Find out which ABI we are using. | |
2451 | echo 'int i;' > conftest.$ac_ext | |
e7cca7f4 | 2452 | if { (eval echo configure:2453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
f5cc59a7 AO |
2453 | case "`/usr/bin/file conftest.o`" in |
2454 | *ELF-32*) | |
2455 | HPUX_IA64_MODE="32" | |
2456 | ;; | |
2457 | *ELF-64*) | |
2458 | HPUX_IA64_MODE="64" | |
2459 | ;; | |
2460 | esac | |
2461 | fi | |
2462 | rm -rf conftest* | |
2463 | ;; | |
2464 | ||
54d9d34a AJ |
2465 | x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) |
2466 | # Find out which ABI we are using. | |
2467 | echo 'int i;' > conftest.$ac_ext | |
e7cca7f4 | 2468 | if { (eval echo configure:2469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
54d9d34a AJ |
2469 | case "`/usr/bin/file conftest.o`" in |
2470 | *32-bit*) | |
2471 | case $host in | |
2472 | x86_64-*linux*) | |
2473 | LD="${LD-ld} -m elf_i386" | |
2474 | ;; | |
2475 | ppc64-*linux*) | |
2476 | LD="${LD-ld} -m elf32ppclinux" | |
2477 | ;; | |
2478 | s390x-*linux*) | |
2479 | LD="${LD-ld} -m elf_s390" | |
2480 | ;; | |
2481 | sparc64-*linux*) | |
2482 | LD="${LD-ld} -m elf32_sparc" | |
2483 | ;; | |
2484 | esac | |
2485 | ;; | |
2486 | *64-bit*) | |
2487 | case $host in | |
2488 | x86_64-*linux*) | |
2489 | LD="${LD-ld} -m elf_x86_64" | |
2490 | ;; | |
2491 | ppc*-*linux*|powerpc*-*linux*) | |
2492 | LD="${LD-ld} -m elf64ppc" | |
2493 | ;; | |
2494 | s390*-*linux*) | |
2495 | LD="${LD-ld} -m elf64_s390" | |
2496 | ;; | |
2497 | sparc*-*linux*) | |
2498 | LD="${LD-ld} -m elf64_sparc" | |
2499 | ;; | |
2500 | esac | |
2501 | ;; | |
2502 | esac | |
2503 | fi | |
2504 | rm -rf conftest* | |
2505 | ;; | |
2506 | ||
a3ffcff3 TT |
2507 | *-*-sco3.2v5*) |
2508 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
01b02b11 | 2509 | SAVE_CFLAGS="$CFLAGS" |
a3ffcff3 | 2510 | CFLAGS="$CFLAGS -belf" |
01b02b11 | 2511 | echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 |
e7cca7f4 | 2512 | echo "configure:2513: checking whether the C compiler needs -belf" >&5 |
01b02b11 TT |
2513 | if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then |
2514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2515 | else | |
6d0860ee AO |
2516 | |
2517 | ac_ext=c | |
2518 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2519 | ac_cpp='$CPP $CPPFLAGS' | |
2520 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2521 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2522 | cross_compiling=$ac_cv_prog_cc_cross | |
2523 | ||
2524 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 2525 | #line 2526 "configure" |
01b02b11 TT |
2526 | #include "confdefs.h" |
2527 | ||
2528 | int main() { | |
2529 | ||
2530 | ; return 0; } | |
2531 | EOF | |
e7cca7f4 | 2532 | if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
01b02b11 TT |
2533 | rm -rf conftest* |
2534 | lt_cv_cc_needs_belf=yes | |
2535 | else | |
2536 | echo "configure: failed program was:" >&5 | |
2537 | cat conftest.$ac_ext >&5 | |
2538 | rm -rf conftest* | |
2539 | lt_cv_cc_needs_belf=no | |
2540 | fi | |
2541 | rm -f conftest* | |
6d0860ee AO |
2542 | ac_ext=c |
2543 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2544 | ac_cpp='$CPP $CPPFLAGS' | |
2545 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2546 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2547 | cross_compiling=$ac_cv_prog_cc_cross | |
2548 | ||
01b02b11 TT |
2549 | fi |
2550 | ||
2551 | echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 | |
2552 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
2553 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
2554 | CFLAGS="$SAVE_CFLAGS" | |
2555 | fi | |
a3ffcff3 TT |
2556 | ;; |
2557 | ||
a3ffcff3 TT |
2558 | |
2559 | esac | |
2560 | ||
6d0860ee | 2561 | echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 |
e7cca7f4 | 2562 | echo "configure:2563: checking how to run the C++ preprocessor" >&5 |
6d0860ee AO |
2563 | if test -z "$CXXCPP"; then |
2564 | if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then | |
2565 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2566 | else | |
dbf45a01 | 2567 | ac_ext=C |
6d0860ee AO |
2568 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
2569 | ac_cpp='$CXXCPP $CPPFLAGS' | |
2570 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2571 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2572 | cross_compiling=$ac_cv_prog_cxx_cross | |
2573 | CXXCPP="${CXX-g++} -E" | |
2574 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 2575 | #line 2576 "configure" |
6d0860ee AO |
2576 | #include "confdefs.h" |
2577 | #include <stdlib.h> | |
2578 | EOF | |
2579 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7cca7f4 | 2580 | { (eval echo configure:2581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6d0860ee AO |
2581 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2582 | if test -z "$ac_err"; then | |
2583 | : | |
2584 | else | |
2585 | echo "$ac_err" >&5 | |
2586 | echo "configure: failed program was:" >&5 | |
2587 | cat conftest.$ac_ext >&5 | |
2588 | rm -rf conftest* | |
2589 | CXXCPP=/lib/cpp | |
2590 | fi | |
2591 | rm -f conftest* | |
2592 | ac_cv_prog_CXXCPP="$CXXCPP" | |
dbf45a01 | 2593 | ac_ext=c |
6d0860ee AO |
2594 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
2595 | ac_cpp='$CPP $CPPFLAGS' | |
2596 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2597 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2598 | cross_compiling=$ac_cv_prog_cc_cross | |
2599 | fi | |
2600 | fi | |
dbf45a01 | 2601 | CXXCPP="$ac_cv_prog_CXXCPP" |
6d0860ee AO |
2602 | echo "$ac_t""$CXXCPP" 1>&6 |
2603 | ||
01b02b11 TT |
2604 | |
2605 | # Save cache, so that ltconfig can load it | |
2606 | cat > confcache <<\EOF | |
2607 | # This file is a shell script that caches the results of configure | |
2608 | # tests run on this system so they can be shared between configure | |
2609 | # scripts and configure runs. It is not useful on other systems. | |
2610 | # If it contains results you don't want to keep, you may remove or edit it. | |
2611 | # | |
2612 | # By default, configure uses ./config.cache as the cache file, | |
2613 | # creating it if it does not exist already. You can give configure | |
2614 | # the --cache-file=FILE option to use a different cache file; that is | |
2615 | # what configure does when it calls configure scripts in | |
2616 | # subdirectories, so they share the cache. | |
2617 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
2618 | # config.status only pays attention to the cache file if you give it the | |
2619 | # --recheck option to rerun configure. | |
2620 | # | |
2621 | EOF | |
2622 | # The following way of writing the cache mishandles newlines in values, | |
2623 | # but we know of no workaround that is simple, portable, and efficient. | |
2624 | # So, don't put newlines in cache variables' values. | |
2625 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
2626 | # and sets the high bit in the cache file unless we assign to the vars. | |
2627 | (set) 2>&1 | | |
2628 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
2629 | *ac_space=\ *) | |
2630 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
2631 | # turns \\\\ into \\, and sed turns \\ into \). | |
2632 | sed -n \ | |
2633 | -e "s/'/'\\\\''/g" \ | |
2634 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
2635 | ;; | |
2636 | *) | |
2637 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
2638 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
2639 | ;; | |
2640 | esac >> confcache | |
2641 | if cmp -s $cache_file confcache; then | |
2642 | : | |
2643 | else | |
2644 | if test -w $cache_file; then | |
2645 | echo "updating cache $cache_file" | |
2646 | cat confcache > $cache_file | |
2647 | else | |
2648 | echo "not updating unwritable cache $cache_file" | |
2649 | fi | |
2650 | fi | |
2651 | rm -f confcache | |
2652 | ||
2653 | ||
a3ffcff3 | 2654 | # Actually configure libtool. ac_aux_dir is where install-sh is found. |
6d0860ee | 2655 | AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ |
5f527203 | 2656 | MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ |
6d0860ee AO |
2657 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ |
2658 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ | |
2659 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ | |
2660 | deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ | |
a3ffcff3 | 2661 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ |
6d0860ee | 2662 | $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ |
a3ffcff3 TT |
2663 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } |
2664 | ||
01b02b11 TT |
2665 | # Reload cache, that may have been modified by ltconfig |
2666 | if test -r "$cache_file"; then | |
2667 | echo "loading cache $cache_file" | |
2668 | . $cache_file | |
2669 | else | |
2670 | echo "creating cache $cache_file" | |
2671 | > $cache_file | |
2672 | fi | |
2673 | ||
2674 | ||
2675 | # This can be used to rebuild libtool when needed | |
6d0860ee | 2676 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" |
01b02b11 TT |
2677 | |
2678 | # Always use our own libtool. | |
2679 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
2680 | ||
a3ffcff3 TT |
2681 | # Redirect the config.log output again, so that the ltconfig log is not |
2682 | # clobbered by the next message. | |
2683 | exec 5>>./config.log | |
2684 | ||
6d0860ee AO |
2685 | |
2686 | ||
6d0860ee AO |
2687 | LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh" |
2688 | lt_save_CC="$CC" | |
2689 | lt_save_CFLAGS="$CFLAGS" | |
2690 | AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
52a11cbf | 2691 | MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ |
6d0860ee AO |
2692 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ |
2693 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ | |
2694 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ | |
2695 | deplibs_check_method="$deplibs_check_method" \ | |
2696 | file_magic_cmd="$file_magic_cmd" \ | |
2697 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ | |
2698 | --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \ | |
2699 | || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; } | |
2700 | CC="$lt_save_CC" | |
2701 | CFLAGS="$lt_save_CFLAGS" | |
2702 | ||
2703 | # Redirect the config.log output again, so that the ltconfig log is not | |
2704 | # clobbered by the next message. | |
2705 | exec 5>>./config.log | |
2706 | ||
6d0860ee AO |
2707 | |
2708 | ||
2709 | ||
2710 | ||
b4f3dc58 | 2711 | |
4f5a5d5c | 2712 | subdirs="$DIRLTDL" |
7af85558 | 2713 | |
a3ffcff3 | 2714 | |
ee9dd372 TT |
2715 | if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then |
2716 | COMPPATH=. | |
2717 | else | |
2718 | COMPPATH=.. | |
2719 | fi | |
2720 | ||
2721 | ||
2722 | ||
2723 | ||
2724 | if test -d $srcdir/testsuite; then | |
2725 | TESTSUBDIR_TRUE= | |
2726 | TESTSUBDIR_FALSE='#' | |
2727 | else | |
2728 | TESTSUBDIR_TRUE='#' | |
2729 | TESTSUBDIR_FALSE= | |
2730 | fi | |
2731 | ||
ffccc6be AG |
2732 | # Check whether --enable-getenv-properties or --disable-getenv-properties was given. |
2733 | if test "${enable_getenv_properties+set}" = set; then | |
2734 | enableval="$enable_getenv_properties" | |
2735 | : | |
2736 | fi | |
2737 | ||
2738 | ||
3610e0d5 | 2739 | if test -z "$enable_getenv_properties"; then |
ffccc6be AG |
2740 | enable_getenv_properties=${enable_getenv_properties_default-yes} |
2741 | fi | |
2742 | if test "$enable_getenv_properties" = no; then | |
2743 | cat >> confdefs.h <<\EOF | |
2744 | #define DISABLE_GETENV_PROPERTIES 1 | |
2745 | EOF | |
2746 | ||
2747 | fi | |
2748 | ||
b5ee195f AG |
2749 | if test -z "$enable_main_args"; then |
2750 | enable_main_args=${enable_main_args_default-yes} | |
2751 | fi | |
2752 | if test "$enable_main_args" = no; then | |
2753 | cat >> confdefs.h <<\EOF | |
2754 | #define DISABLE_MAIN_ARGS 1 | |
2755 | EOF | |
2756 | ||
2757 | fi | |
2758 | ||
3610e0d5 TT |
2759 | |
2760 | # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given. | |
2761 | if test "${enable_hash_synchronization+set}" = set; then | |
2762 | enableval="$enable_hash_synchronization" | |
2763 | : | |
2764 | fi | |
2765 | ||
2766 | ||
2767 | if test -z "$enable_hash_synchronization"; then | |
2768 | enable_hash_synchronization=$enable_hash_synchronization_default | |
2769 | fi | |
3610e0d5 | 2770 | |
45597167 BM |
2771 | if test "${slow_pthread_self}" = "yes"; then |
2772 | cat >> confdefs.h <<\EOF | |
2773 | #define SLOW_PTHREAD_SELF 1 | |
2774 | EOF | |
2775 | ||
2776 | fi | |
2777 | ||
3610e0d5 | 2778 | |
213858c0 BM |
2779 | LIBGCJDEBUG="false" |
2780 | ||
ee9dd372 TT |
2781 | # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given. |
2782 | if test "${enable_libgcj_debug+set}" = set; then | |
2783 | enableval="$enable_libgcj_debug" | |
2784 | if test "$enable_libgcj_debug" = yes; then | |
213858c0 | 2785 | cat >> confdefs.h <<\EOF |
ee9dd372 TT |
2786 | #define DEBUG 1 |
2787 | EOF | |
2788 | ||
213858c0 | 2789 | LIBGCJDEBUG="true" |
ee9dd372 TT |
2790 | fi |
2791 | fi | |
2792 | ||
2793 | ||
58eb6e7c AG |
2794 | # Check whether --enable-interpreter or --disable-interpreter was given. |
2795 | if test "${enable_interpreter+set}" = set; then | |
2796 | enableval="$enable_interpreter" | |
2797 | if test "$enable_interpreter" = yes; then | |
b11f6430 AG |
2798 | # This can also be set in configure.host. |
2799 | libgcj_interpreter=yes | |
f7ccaa38 BM |
2800 | elif test "$enable_interpreter" = no; then |
2801 | libgcj_interpreter=no | |
b11f6430 AG |
2802 | fi |
2803 | fi | |
2804 | ||
2805 | ||
2806 | if test "$libgcj_interpreter" = yes; then | |
2807 | cat >> confdefs.h <<\EOF | |
58eb6e7c AG |
2808 | #define INTERPRETER 1 |
2809 | EOF | |
2810 | ||
58eb6e7c | 2811 | fi |
b2ae5f70 TT |
2812 | INTERPRETER="$libgcj_interpreter" |
2813 | ||
58eb6e7c | 2814 | |
52a11cbf | 2815 | echo $ac_n "checking for exception model to use""... $ac_c" 1>&6 |
e7cca7f4 | 2816 | echo "configure:2817: checking for exception model to use" >&5 |
52a11cbf RH |
2817 | |
2818 | ac_ext=C | |
2819 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2820 | ac_cpp='$CXXCPP $CPPFLAGS' | |
2821 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2822 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2823 | cross_compiling=$ac_cv_prog_cxx_cross | |
2824 | ||
3cf88fb4 TT |
2825 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. |
2826 | if test "${enable_sjlj_exceptions+set}" = set; then | |
2827 | enableval="$enable_sjlj_exceptions" | |
52a11cbf RH |
2828 | : |
2829 | else | |
2830 | cat > conftest.$ac_ext << EOF | |
e7cca7f4 | 2831 | #line 2832 "configure" |
52a11cbf RH |
2832 | struct S { ~S(); }; |
2833 | void bar(); | |
2834 | void foo() | |
2835 | { | |
2836 | S s; | |
2837 | bar(); | |
2838 | } | |
2839 | EOF | |
2840 | old_CXXFLAGS="$CXXFLAGS" | |
2841 | CXXFLAGS=-S | |
e7cca7f4 | 2842 | if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
52a11cbf RH |
2843 | if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then |
2844 | enable_sjlj_exceptions=yes | |
2845 | elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then | |
2846 | enable_sjlj_exceptions=no | |
3cf88fb4 TT |
2847 | fi |
2848 | fi | |
52a11cbf RH |
2849 | CXXFLAGS="$old_CXXFLAGS" |
2850 | rm -f conftest* | |
2851 | fi | |
3cf88fb4 | 2852 | |
52a11cbf RH |
2853 | if test x$enable_sjlj_exceptions = xyes; then |
2854 | cat >> confdefs.h <<\EOF | |
3cf88fb4 TT |
2855 | #define SJLJ_EXCEPTIONS 1 |
2856 | EOF | |
2857 | ||
52a11cbf RH |
2858 | ac_exception_model_name=sjlj |
2859 | elif test x$enable_sjlj_exceptions = xno; then | |
2860 | ac_exception_model_name="call frame" | |
2861 | else | |
2862 | { echo "configure: error: unable to detect exception model" 1>&2; exit 1; } | |
3cf88fb4 | 2863 | fi |
52a11cbf RH |
2864 | ac_ext=c |
2865 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2866 | ac_cpp='$CPP $CPPFLAGS' | |
2867 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2868 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2869 | cross_compiling=$ac_cv_prog_cc_cross | |
2870 | ||
2871 | echo "$ac_t""$ac_exception_model_name" 1>&6 | |
3cf88fb4 | 2872 | |
605dc89b BM |
2873 | # If we are non using SJLJ exceptions, and this host does not have support |
2874 | # for unwinding from a signal handler, enable checked dereferences and divides. | |
2875 | if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then | |
2876 | CHECKREFSPEC=-fcheck-references | |
2877 | DIVIDESPEC=-fuse-divide-subroutine | |
2878 | EXCEPTIONSPEC= | |
2879 | fi | |
2880 | ||
4b68fe8a TT |
2881 | # Check whether --enable-java-net or --disable-java-net was given. |
2882 | if test "${enable_java_net+set}" = set; then | |
2883 | enableval="$enable_java_net" | |
2884 | : | |
2885 | fi | |
2886 | ||
2887 | ||
3610e0d5 | 2888 | if test -z "$enable_java_net"; then |
4b68fe8a TT |
2889 | enable_java_net=${enable_java_net_default-yes} |
2890 | fi | |
006d4a9b | 2891 | if test "$enable_java_net" = no; then |
4b68fe8a TT |
2892 | cat >> confdefs.h <<\EOF |
2893 | #define DISABLE_JAVA_NET 1 | |
2894 | EOF | |
2895 | ||
2896 | fi | |
2897 | ||
c8fb9813 AG |
2898 | # Check whether --with-libffi or --without-libffi was given. |
2899 | if test "${with_libffi+set}" = set; then | |
2900 | withval="$with_libffi" | |
2901 | : | |
2902 | else | |
2903 | with_libffi=${with_libffi_default-yes} | |
2904 | fi | |
2905 | ||
2906 | ||
2907 | LIBFFI= | |
2908 | LIBFFIINCS= | |
2909 | if test "$with_libffi" != no; then | |
2910 | cat >> confdefs.h <<\EOF | |
2911 | #define USE_LIBFFI 1 | |
2912 | EOF | |
2913 | ||
ce3b24a7 | 2914 | LIBFFI=../libffi/libffi_convenience.la |
a15e868a | 2915 | LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include' |
c8fb9813 AG |
2916 | fi |
2917 | ||
2918 | ||
2919 | ||
54c2f04b AG |
2920 | # Check whether --enable-jvmpi or --disable-jvmpi was given. |
2921 | if test "${enable_jvmpi+set}" = set; then | |
2922 | enableval="$enable_jvmpi" | |
2923 | : | |
2924 | fi | |
2925 | ||
2926 | ||
2927 | if test "$enable_jvmpi" != no; then | |
2928 | cat >> confdefs.h <<\EOF | |
2929 | #define ENABLE_JVMPI 1 | |
2930 | EOF | |
2931 | ||
2932 | fi | |
2933 | ||
b5ee195f | 2934 | TARGET_ECOS=${PROCESS-"no"} |
ee9dd372 TT |
2935 | # Check whether --with-ecos or --without-ecos was given. |
2936 | if test "${with_ecos+set}" = set; then | |
2937 | withval="$with_ecos" | |
2938 | TARGET_ECOS="$with_ecos" | |
2939 | ||
2940 | fi | |
2941 | ||
2942 | ||
65c9eafb | 2943 | PLATFORMOBJS= |
ee9dd372 | 2944 | case "$TARGET_ECOS" in |
54a190dd | 2945 | no) case "$host" in |
b8fe3c1e | 2946 | *mingw*) |
54a190dd | 2947 | PLATFORM=Win32 |
9b5f18b1 | 2948 | PLATFORMNET=Win32 |
65c9eafb BM |
2949 | PLATFORMOBJS=win32.lo |
2950 | PLATFORMH=win32.h | |
60c7f4ef TT |
2951 | |
2952 | echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6 | |
e7cca7f4 | 2953 | echo "configure:2954: checking whether 'ld' is at least 2.13" >&5 |
60c7f4ef TT |
2954 | LD_PROG=`$CC --print-prog-name=ld` |
2955 | LD_VERSION=`$LD_PROG --version` | |
2956 | LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4` | |
2957 | LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2` | |
2958 | if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then | |
2959 | LD_OK="ok" | |
2960 | else | |
2961 | if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then | |
2962 | LD_OK="ok" | |
2963 | fi | |
2964 | fi | |
2965 | if test "x$LD_OK" != x; then | |
2966 | echo "$ac_t""yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6 | |
2967 | else | |
2968 | echo "$ac_t""no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6 | |
2969 | echo "configure: warning: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." 1>&2 | |
2970 | cat >> confdefs.h <<\EOF | |
2971 | #define JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS 1 | |
2972 | EOF | |
2973 | ||
2974 | fi | |
54a190dd AM |
2975 | ;; |
2976 | *) | |
2977 | PLATFORM=Posix | |
9b5f18b1 | 2978 | PLATFORMNET=Posix |
65c9eafb BM |
2979 | PLATFORMOBJS=posix.lo |
2980 | PLATFORMH=posix.h | |
54a190dd AM |
2981 | ;; |
2982 | esac | |
ee9dd372 TT |
2983 | ;; |
2984 | *) | |
54a190dd | 2985 | PLATFORM=Ecos |
9b5f18b1 | 2986 | PLATFORMNET=NoNet |
ee9dd372 TT |
2987 | cat >> confdefs.h <<\EOF |
2988 | #define ECOS 1 | |
2989 | EOF | |
2990 | ||
65c9eafb BM |
2991 | PLATFORMOBJS=posix.lo |
2992 | PLATFORMH=posix.h | |
ee9dd372 TT |
2993 | ;; |
2994 | esac | |
2995 | ||
d7799ba1 AM |
2996 | |
2997 | ||
ee9dd372 | 2998 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
e7cca7f4 | 2999 | echo "configure:3000: checking how to run the C preprocessor" >&5 |
ee9dd372 TT |
3000 | # On Suns, sometimes $CPP names a directory. |
3001 | if test -n "$CPP" && test -d "$CPP"; then | |
3002 | CPP= | |
3003 | fi | |
3004 | if test -z "$CPP"; then | |
3005 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
3006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3007 | else | |
3008 | # This must be in double quotes, not single quotes, because CPP may get | |
3009 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
3010 | CPP="${CC-cc} -E" | |
3011 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3012 | # not just through cpp. | |
3013 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3014 | #line 3015 "configure" |
ee9dd372 TT |
3015 | #include "confdefs.h" |
3016 | #include <assert.h> | |
3017 | Syntax Error | |
3018 | EOF | |
3019 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7cca7f4 | 3020 | { (eval echo configure:3021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
ee9dd372 TT |
3021 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3022 | if test -z "$ac_err"; then | |
3023 | : | |
3024 | else | |
3025 | echo "$ac_err" >&5 | |
3026 | echo "configure: failed program was:" >&5 | |
3027 | cat conftest.$ac_ext >&5 | |
3028 | rm -rf conftest* | |
3029 | CPP="${CC-cc} -E -traditional-cpp" | |
3030 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3031 | #line 3032 "configure" |
ee9dd372 TT |
3032 | #include "confdefs.h" |
3033 | #include <assert.h> | |
3034 | Syntax Error | |
3035 | EOF | |
3036 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7cca7f4 | 3037 | { (eval echo configure:3038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
ee9dd372 TT |
3038 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3039 | if test -z "$ac_err"; then | |
3040 | : | |
3041 | else | |
3042 | echo "$ac_err" >&5 | |
3043 | echo "configure: failed program was:" >&5 | |
3044 | cat conftest.$ac_ext >&5 | |
3045 | rm -rf conftest* | |
3046 | CPP="${CC-cc} -nologo -E" | |
3047 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3048 | #line 3049 "configure" |
ee9dd372 TT |
3049 | #include "confdefs.h" |
3050 | #include <assert.h> | |
3051 | Syntax Error | |
3052 | EOF | |
3053 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7cca7f4 | 3054 | { (eval echo configure:3055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
ee9dd372 TT |
3055 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3056 | if test -z "$ac_err"; then | |
3057 | : | |
3058 | else | |
3059 | echo "$ac_err" >&5 | |
3060 | echo "configure: failed program was:" >&5 | |
3061 | cat conftest.$ac_ext >&5 | |
3062 | rm -rf conftest* | |
3063 | CPP=/lib/cpp | |
3064 | fi | |
3065 | rm -f conftest* | |
3066 | fi | |
3067 | rm -f conftest* | |
3068 | fi | |
3069 | rm -f conftest* | |
3070 | ac_cv_prog_CPP="$CPP" | |
3071 | fi | |
3072 | CPP="$ac_cv_prog_CPP" | |
3073 | else | |
3074 | ac_cv_prog_CPP="$CPP" | |
3075 | fi | |
3076 | echo "$ac_t""$CPP" 1>&6 | |
3077 | ||
3078 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3079 | #line 3080 "configure" |
ee9dd372 | 3080 | #include "confdefs.h" |
0d16618c | 3081 | #include <stdint.h> |
ee9dd372 TT |
3082 | EOF |
3083 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
0d16618c | 3084 | egrep "uint32_t" >/dev/null 2>&1; then |
ee9dd372 TT |
3085 | rm -rf conftest* |
3086 | cat >> confdefs.h <<\EOF | |
3087 | #define HAVE_INT32_DEFINED 1 | |
3088 | EOF | |
3089 | ||
3090 | fi | |
3091 | rm -f conftest* | |
3092 | ||
3093 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3094 | #line 3095 "configure" |
ee9dd372 | 3095 | #include "confdefs.h" |
0d16618c | 3096 | #include <inttypes.h> |
ee9dd372 TT |
3097 | EOF |
3098 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
0d16618c | 3099 | egrep "uint32_t" >/dev/null 2>&1; then |
ee9dd372 TT |
3100 | rm -rf conftest* |
3101 | cat >> confdefs.h <<\EOF | |
3102 | #define HAVE_INT32_DEFINED 1 | |
3103 | EOF | |
3104 | ||
3105 | fi | |
3106 | rm -f conftest* | |
3107 | ||
0d16618c | 3108 | cat > conftest.$ac_ext <<EOF |
e7cca7f4 | 3109 | #line 3110 "configure" |
0d16618c TT |
3110 | #include "confdefs.h" |
3111 | #include <sys/types.h> | |
3112 | EOF | |
3113 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3114 | egrep "u_int32_t" >/dev/null 2>&1; then | |
3115 | rm -rf conftest* | |
3116 | cat >> confdefs.h <<\EOF | |
3117 | #define HAVE_BSD_INT32_DEFINED 1 | |
3118 | EOF | |
3119 | ||
3120 | fi | |
3121 | rm -f conftest* | |
3122 | ||
3123 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3124 | #line 3125 "configure" |
0d16618c TT |
3125 | #include "confdefs.h" |
3126 | #include <sys/config.h> | |
3127 | EOF | |
3128 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3129 | egrep "u_int32_t" >/dev/null 2>&1; then | |
3130 | rm -rf conftest* | |
3131 | cat >> confdefs.h <<\EOF | |
3132 | #define HAVE_BSD_INT32_DEFINED 1 | |
3133 | EOF | |
3134 | ||
3135 | fi | |
3136 | rm -f conftest* | |
3137 | ||
3138 | ||
ee9dd372 TT |
3139 | |
3140 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3141 | #line 3142 "configure" |
ee9dd372 TT |
3142 | #include "confdefs.h" |
3143 | #include <time.h> | |
3144 | EOF | |
3145 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3146 | egrep "mktime" >/dev/null 2>&1; then | |
3147 | rm -rf conftest* | |
3148 | cat >> confdefs.h <<\EOF | |
3149 | #define HAVE_MKTIME 1 | |
3150 | EOF | |
3151 | ||
3152 | fi | |
3153 | rm -f conftest* | |
3154 | ||
3155 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3156 | #line 3157 "configure" |
ee9dd372 TT |
3157 | #include "confdefs.h" |
3158 | #include <time.h> | |
3159 | EOF | |
3160 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3161 | egrep "localtime" >/dev/null 2>&1; then | |
3162 | rm -rf conftest* | |
3163 | cat >> confdefs.h <<\EOF | |
3164 | #define HAVE_LOCALTIME 1 | |
3165 | EOF | |
3166 | ||
3167 | fi | |
3168 | rm -f conftest* | |
3169 | ||
3170 | ||
3171 | test -d java || mkdir java | |
3172 | test -d java/io || mkdir java/io | |
213858c0 | 3173 | test -d gnu || mkdir gnu |
ee9dd372 TT |
3174 | |
3175 | ||
8a434a36 | 3176 | |
42962a48 TT |
3177 | test -d java/lang || mkdir java/lang |
3178 | ||
3179 | ||
3180 | ||
9b5f18b1 MK |
3181 | test -d java/net || mkdir java/net |
3182 | ||
3183 | ||
3184 | ||
3185 | ||
3186 | ||
4a8e624f | 3187 | case "${host}" in |
b8fe3c1e | 3188 | *mingw*) |
4a8e624f AM |
3189 | SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32" |
3190 | ;; | |
3191 | *) | |
3192 | SYSTEMSPEC= | |
3193 | ;; | |
3194 | esac | |
f994389b TT |
3195 | |
3196 | ||
1e6347d8 | 3197 | LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs" |
0f9c645e AG |
3198 | |
3199 | ||
f994389b TT |
3200 | # Check whether --with-system-zlib or --without-system-zlib was given. |
3201 | if test "${with_system_zlib+set}" = set; then | |
3202 | withval="$with_system_zlib" | |
3203 | : | |
3204 | fi | |
3205 | ||
3206 | ZLIBSPEC= | |
3207 | ||
0f9c645e AG |
3208 | ZLIBTESTSPEC= |
3209 | ||
f994389b | 3210 | |
5aac1dac TT |
3211 | # If we find X, set shell vars x_includes and x_libraries to the |
3212 | # paths, otherwise set no_x=yes. | |
3213 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
3214 | # --without-x overrides everything else, but does not touch the cache. | |
3215 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
e7cca7f4 | 3216 | echo "configure:3217: checking for X" >&5 |
f994389b | 3217 | |
5aac1dac TT |
3218 | # Check whether --with-x or --without-x was given. |
3219 | if test "${with_x+set}" = set; then | |
3220 | withval="$with_x" | |
3221 | : | |
ee9dd372 TT |
3222 | fi |
3223 | ||
5aac1dac TT |
3224 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. |
3225 | if test "x$with_x" = xno; then | |
3226 | # The user explicitly disabled X. | |
3227 | have_x=disabled | |
3228 | else | |
3229 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
3230 | # Both variables are already set. | |
3231 | have_x=yes | |
3232 | else | |
3233 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
3234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3235 | else | |
3236 | # One or both of the vars are not set, and there is no cached value. | |
3237 | ac_x_includes=NO ac_x_libraries=NO | |
3238 | rm -fr conftestdir | |
3239 | if mkdir conftestdir; then | |
3240 | cd conftestdir | |
3241 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
3242 | cat > Imakefile <<'EOF' | |
3243 | acfindx: | |
3244 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
ee9dd372 | 3245 | EOF |
5aac1dac TT |
3246 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then |
3247 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
3248 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
3249 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
3250 | for ac_extension in a so sl; do | |
3251 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
3252 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
3253 | ac_im_usrlibdir=$ac_im_libdir; break | |
3254 | fi | |
3255 | done | |
3256 | # Screen out bogus values from the imake configuration. They are | |
3257 | # bogus both because they are the default anyway, and because | |
3258 | # using them would break gcc on systems where it needs fixed includes. | |
3259 | case "$ac_im_incroot" in | |
3260 | /usr/include) ;; | |
3261 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
3262 | esac | |
3263 | case "$ac_im_usrlibdir" in | |
3264 | /usr/lib | /lib) ;; | |
3265 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
3266 | esac | |
3267 | fi | |
3268 | cd .. | |
3269 | rm -fr conftestdir | |
3270 | fi | |
ee9dd372 | 3271 | |
5aac1dac TT |
3272 | if test "$ac_x_includes" = NO; then |
3273 | # Guess where to find include files, by looking for this one X11 .h file. | |
3274 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
ee9dd372 | 3275 | |
5aac1dac TT |
3276 | # First, try using that file with no special directory specified. |
3277 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3278 | #line 3279 "configure" |
5aac1dac TT |
3279 | #include "confdefs.h" |
3280 | #include <$x_direct_test_include> | |
3281 | EOF | |
3282 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e7cca7f4 | 3283 | { (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5aac1dac TT |
3284 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3285 | if test -z "$ac_err"; then | |
3286 | rm -rf conftest* | |
3287 | # We can compile using X headers with no special include directory. | |
3288 | ac_x_includes= | |
3289 | else | |
3290 | echo "$ac_err" >&5 | |
3291 | echo "configure: failed program was:" >&5 | |
3292 | cat conftest.$ac_ext >&5 | |
3293 | rm -rf conftest* | |
3294 | # Look for the header file in a standard set of common directories. | |
3295 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
3296 | for ac_dir in \ | |
3297 | /usr/X11/include \ | |
3298 | /usr/X11R6/include \ | |
3299 | /usr/X11R5/include \ | |
3300 | /usr/X11R4/include \ | |
3301 | \ | |
3302 | /usr/include/X11 \ | |
3303 | /usr/include/X11R6 \ | |
3304 | /usr/include/X11R5 \ | |
3305 | /usr/include/X11R4 \ | |
3306 | \ | |
3307 | /usr/local/X11/include \ | |
3308 | /usr/local/X11R6/include \ | |
3309 | /usr/local/X11R5/include \ | |
3310 | /usr/local/X11R4/include \ | |
3311 | \ | |
3312 | /usr/local/include/X11 \ | |
3313 | /usr/local/include/X11R6 \ | |
3314 | /usr/local/include/X11R5 \ | |
3315 | /usr/local/include/X11R4 \ | |
3316 | \ | |
3317 | /usr/X386/include \ | |
3318 | /usr/x386/include \ | |
3319 | /usr/XFree86/include/X11 \ | |
3320 | \ | |
3321 | /usr/include \ | |
3322 | /usr/local/include \ | |
3323 | /usr/unsupported/include \ | |
3324 | /usr/athena/include \ | |
3325 | /usr/local/x11r5/include \ | |
3326 | /usr/lpp/Xamples/include \ | |
3327 | \ | |
3328 | /usr/openwin/include \ | |
3329 | /usr/openwin/share/include \ | |
3330 | ; \ | |
3331 | do | |
3332 | if test -r "$ac_dir/$x_direct_test_include"; then | |
3333 | ac_x_includes=$ac_dir | |
3334 | break | |
3335 | fi | |
3336 | done | |
3337 | fi | |
3338 | rm -f conftest* | |
3339 | fi # $ac_x_includes = NO | |
ee9dd372 | 3340 | |
5aac1dac TT |
3341 | if test "$ac_x_libraries" = NO; then |
3342 | # Check for the libraries. | |
ee9dd372 | 3343 | |
5aac1dac TT |
3344 | test -z "$x_direct_test_library" && x_direct_test_library=Xt |
3345 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
ee9dd372 | 3346 | |
5aac1dac TT |
3347 | # See if we find them without any special options. |
3348 | # Don't add to $LIBS permanently. | |
3349 | ac_save_LIBS="$LIBS" | |
3350 | LIBS="-l$x_direct_test_library $LIBS" | |
3351 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3352 | #line 3353 "configure" |
5aac1dac | 3353 | #include "confdefs.h" |
ee9dd372 | 3354 | |
5aac1dac TT |
3355 | int main() { |
3356 | ${x_direct_test_function}() | |
3357 | ; return 0; } | |
3358 | EOF | |
e7cca7f4 | 3359 | if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
3360 | rm -rf conftest* |
3361 | LIBS="$ac_save_LIBS" | |
3362 | # We can link X programs with no special library path. | |
3363 | ac_x_libraries= | |
3364 | else | |
3365 | echo "configure: failed program was:" >&5 | |
3366 | cat conftest.$ac_ext >&5 | |
3367 | rm -rf conftest* | |
3368 | LIBS="$ac_save_LIBS" | |
3369 | # First see if replacing the include by lib works. | |
3370 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
3371 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
3372 | /usr/X11/lib \ | |
3373 | /usr/X11R6/lib \ | |
3374 | /usr/X11R5/lib \ | |
3375 | /usr/X11R4/lib \ | |
3376 | \ | |
3377 | /usr/lib/X11 \ | |
3378 | /usr/lib/X11R6 \ | |
3379 | /usr/lib/X11R5 \ | |
3380 | /usr/lib/X11R4 \ | |
3381 | \ | |
3382 | /usr/local/X11/lib \ | |
3383 | /usr/local/X11R6/lib \ | |
3384 | /usr/local/X11R5/lib \ | |
3385 | /usr/local/X11R4/lib \ | |
3386 | \ | |
3387 | /usr/local/lib/X11 \ | |
3388 | /usr/local/lib/X11R6 \ | |
3389 | /usr/local/lib/X11R5 \ | |
3390 | /usr/local/lib/X11R4 \ | |
3391 | \ | |
3392 | /usr/X386/lib \ | |
3393 | /usr/x386/lib \ | |
3394 | /usr/XFree86/lib/X11 \ | |
3395 | \ | |
3396 | /usr/lib \ | |
3397 | /usr/local/lib \ | |
3398 | /usr/unsupported/lib \ | |
3399 | /usr/athena/lib \ | |
3400 | /usr/local/x11r5/lib \ | |
3401 | /usr/lpp/Xamples/lib \ | |
3402 | /lib/usr/lib/X11 \ | |
3403 | \ | |
3404 | /usr/openwin/lib \ | |
3405 | /usr/openwin/share/lib \ | |
3406 | ; \ | |
3407 | do | |
3408 | for ac_extension in a so sl; do | |
3409 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
3410 | ac_x_libraries=$ac_dir | |
3411 | break 2 | |
3412 | fi | |
3413 | done | |
3414 | done | |
3415 | fi | |
3416 | rm -f conftest* | |
3417 | fi # $ac_x_libraries = NO | |
ee9dd372 | 3418 | |
5aac1dac TT |
3419 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then |
3420 | # Didn't find X anywhere. Cache the known absence of X. | |
3421 | ac_cv_have_x="have_x=no" | |
3422 | else | |
3423 | # Record where we found X for the cache. | |
3424 | ac_cv_have_x="have_x=yes \ | |
3425 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
3426 | fi | |
3427 | fi | |
3428 | fi | |
3429 | eval "$ac_cv_have_x" | |
3430 | fi # $with_x != no | |
ee9dd372 | 3431 | |
5aac1dac TT |
3432 | if test "$have_x" != yes; then |
3433 | echo "$ac_t""$have_x" 1>&6 | |
3434 | no_x=yes | |
3435 | else | |
3436 | # If each of the values was on the command line, it overrides each guess. | |
3437 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
3438 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
3439 | # Update the cache value to reflect the command line values. | |
3440 | ac_cv_have_x="have_x=yes \ | |
3441 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
3442 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
3443 | fi | |
f994389b | 3444 | |
5aac1dac TT |
3445 | if test "$no_x" = yes; then |
3446 | # Not all programs may use this symbol, but it does not hurt to define it. | |
3447 | cat >> confdefs.h <<\EOF | |
3448 | #define X_DISPLAY_MISSING 1 | |
ee9dd372 TT |
3449 | EOF |
3450 | ||
5aac1dac TT |
3451 | X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= |
3452 | else | |
3453 | if test -n "$x_includes"; then | |
3454 | X_CFLAGS="$X_CFLAGS -I$x_includes" | |
3455 | fi | |
ee9dd372 | 3456 | |
5aac1dac TT |
3457 | # It would also be nice to do this for all -L options, not just this one. |
3458 | if test -n "$x_libraries"; then | |
3459 | X_LIBS="$X_LIBS -L$x_libraries" | |
3460 | # For Solaris; some versions of Sun CC require a space after -R and | |
3461 | # others require no space. Words are not sufficient . . . . | |
3462 | case "`(uname -sr) 2>/dev/null`" in | |
3463 | "SunOS 5"*) | |
3464 | echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 | |
e7cca7f4 | 3465 | echo "configure:3466: checking whether -R must be followed by a space" >&5 |
5aac1dac TT |
3466 | ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" |
3467 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3468 | #line 3469 "configure" |
5aac1dac | 3469 | #include "confdefs.h" |
7f6e0fe6 | 3470 | |
5aac1dac | 3471 | int main() { |
7f6e0fe6 | 3472 | |
5aac1dac | 3473 | ; return 0; } |
7f6e0fe6 | 3474 | EOF |
e7cca7f4 | 3475 | if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
3476 | rm -rf conftest* |
3477 | ac_R_nospace=yes | |
3478 | else | |
3479 | echo "configure: failed program was:" >&5 | |
3480 | cat conftest.$ac_ext >&5 | |
3481 | rm -rf conftest* | |
3482 | ac_R_nospace=no | |
3483 | fi | |
3484 | rm -f conftest* | |
3485 | if test $ac_R_nospace = yes; then | |
3486 | echo "$ac_t""no" 1>&6 | |
3487 | X_LIBS="$X_LIBS -R$x_libraries" | |
3488 | else | |
3489 | LIBS="$ac_xsave_LIBS -R $x_libraries" | |
3490 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3491 | #line 3492 "configure" |
5aac1dac | 3492 | #include "confdefs.h" |
7f6e0fe6 | 3493 | |
5aac1dac | 3494 | int main() { |
ee9dd372 | 3495 | |
5aac1dac TT |
3496 | ; return 0; } |
3497 | EOF | |
e7cca7f4 | 3498 | if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
3499 | rm -rf conftest* |
3500 | ac_R_space=yes | |
3501 | else | |
3502 | echo "configure: failed program was:" >&5 | |
3503 | cat conftest.$ac_ext >&5 | |
3504 | rm -rf conftest* | |
3505 | ac_R_space=no | |
3506 | fi | |
3507 | rm -f conftest* | |
3508 | if test $ac_R_space = yes; then | |
3509 | echo "$ac_t""yes" 1>&6 | |
3510 | X_LIBS="$X_LIBS -R $x_libraries" | |
3511 | else | |
3512 | echo "$ac_t""neither works" 1>&6 | |
3513 | fi | |
3514 | fi | |
3515 | LIBS="$ac_xsave_LIBS" | |
3516 | esac | |
3517 | fi | |
ee9dd372 | 3518 | |
5aac1dac TT |
3519 | # Check for system-dependent libraries X programs must link with. |
3520 | # Do this before checking for the system-independent R6 libraries | |
3521 | # (-lICE), since we may need -lsocket or whatever for X linking. | |
ee9dd372 | 3522 | |
5aac1dac TT |
3523 | if test "$ISC" = yes; then |
3524 | X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" | |
3525 | else | |
3526 | # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X | |
3527 | # libraries were built with DECnet support. And karl@cs.umb.edu says | |
3528 | # the Alpha needs dnet_stub (dnet does not exist). | |
3529 | echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 | |
e7cca7f4 | 3530 | echo "configure:3531: checking for dnet_ntoa in -ldnet" >&5 |
5aac1dac TT |
3531 | ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` |
3532 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3533 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3534 | else | |
3535 | ac_save_LIBS="$LIBS" | |
3536 | LIBS="-ldnet $LIBS" | |
3537 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3538 | #line 3539 "configure" |
5aac1dac TT |
3539 | #include "confdefs.h" |
3540 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3541 | /* We use char because int might match the return type of a gcc2 | |
3542 | builtin and then its argument prototype would still apply. */ | |
3543 | char dnet_ntoa(); | |
ee9dd372 | 3544 | |
5aac1dac TT |
3545 | int main() { |
3546 | dnet_ntoa() | |
3547 | ; return 0; } | |
3548 | EOF | |
e7cca7f4 | 3549 | if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
3550 | rm -rf conftest* |
3551 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3552 | else | |
3553 | echo "configure: failed program was:" >&5 | |
3554 | cat conftest.$ac_ext >&5 | |
3555 | rm -rf conftest* | |
3556 | eval "ac_cv_lib_$ac_lib_var=no" | |
3557 | fi | |
3558 | rm -f conftest* | |
3559 | LIBS="$ac_save_LIBS" | |
45597167 | 3560 | |
5aac1dac TT |
3561 | fi |
3562 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3563 | echo "$ac_t""yes" 1>&6 | |
3564 | X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" | |
3565 | else | |
3566 | echo "$ac_t""no" 1>&6 | |
3567 | fi | |
45597167 | 3568 | |
5aac1dac TT |
3569 | if test $ac_cv_lib_dnet_dnet_ntoa = no; then |
3570 | echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 | |
e7cca7f4 | 3571 | echo "configure:3572: checking for dnet_ntoa in -ldnet_stub" >&5 |
5aac1dac TT |
3572 | ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` |
3573 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3574 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3575 | else | |
3576 | ac_save_LIBS="$LIBS" | |
3577 | LIBS="-ldnet_stub $LIBS" | |
3578 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3579 | #line 3580 "configure" |
5aac1dac TT |
3580 | #include "confdefs.h" |
3581 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3582 | /* We use char because int might match the return type of a gcc2 | |
3583 | builtin and then its argument prototype would still apply. */ | |
3584 | char dnet_ntoa(); | |
5c009209 | 3585 | |
5aac1dac TT |
3586 | int main() { |
3587 | dnet_ntoa() | |
3588 | ; return 0; } | |
cf6b8de4 | 3589 | EOF |
e7cca7f4 | 3590 | if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
3591 | rm -rf conftest* |
3592 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3593 | else | |
3594 | echo "configure: failed program was:" >&5 | |
3595 | cat conftest.$ac_ext >&5 | |
3596 | rm -rf conftest* | |
3597 | eval "ac_cv_lib_$ac_lib_var=no" | |
3598 | fi | |
3599 | rm -f conftest* | |
3600 | LIBS="$ac_save_LIBS" | |
cf6b8de4 | 3601 | |
5aac1dac TT |
3602 | fi |
3603 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3604 | echo "$ac_t""yes" 1>&6 | |
3605 | X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" | |
3606 | else | |
3607 | echo "$ac_t""no" 1>&6 | |
cf6b8de4 TT |
3608 | fi |
3609 | ||
5aac1dac | 3610 | fi |
cf6b8de4 | 3611 | |
5aac1dac TT |
3612 | # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, |
3613 | # to get the SysV transport functions. | |
3614 | # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) | |
3615 | # needs -lnsl. | |
3616 | # The nsl library prevents programs from opening the X display | |
3617 | # on Irix 5.2, according to dickey@clark.net. | |
3618 | echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 | |
e7cca7f4 | 3619 | echo "configure:3620: checking for gethostbyname" >&5 |
5aac1dac | 3620 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then |
ee9dd372 TT |
3621 | echo $ac_n "(cached) $ac_c" 1>&6 |
3622 | else | |
3623 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3624 | #line 3625 "configure" |
ee9dd372 TT |
3625 | #include "confdefs.h" |
3626 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 3627 | which can conflict with char gethostbyname(); below. */ |
ee9dd372 TT |
3628 | #include <assert.h> |
3629 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3630 | /* We use char because int might match the return type of a gcc2 | |
3631 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 3632 | char gethostbyname(); |
ee9dd372 TT |
3633 | |
3634 | int main() { | |
3635 | ||
3636 | /* The GNU C library defines this for functions which it implements | |
3637 | to always fail with ENOSYS. Some functions are actually named | |
3638 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 3639 | #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) |
ee9dd372 TT |
3640 | choke me |
3641 | #else | |
5aac1dac | 3642 | gethostbyname(); |
ee9dd372 TT |
3643 | #endif |
3644 | ||
3645 | ; return 0; } | |
3646 | EOF | |
e7cca7f4 | 3647 | if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 3648 | rm -rf conftest* |
5aac1dac | 3649 | eval "ac_cv_func_gethostbyname=yes" |
ee9dd372 TT |
3650 | else |
3651 | echo "configure: failed program was:" >&5 | |
3652 | cat conftest.$ac_ext >&5 | |
3653 | rm -rf conftest* | |
5aac1dac | 3654 | eval "ac_cv_func_gethostbyname=no" |
ee9dd372 TT |
3655 | fi |
3656 | rm -f conftest* | |
3657 | fi | |
3658 | ||
5aac1dac | 3659 | if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then |
ee9dd372 | 3660 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3661 | : |
ee9dd372 TT |
3662 | else |
3663 | echo "$ac_t""no" 1>&6 | |
3664 | fi | |
ee9dd372 | 3665 | |
5aac1dac TT |
3666 | if test $ac_cv_func_gethostbyname = no; then |
3667 | echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 | |
e7cca7f4 | 3668 | echo "configure:3669: checking for gethostbyname in -lnsl" >&5 |
5aac1dac TT |
3669 | ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` |
3670 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
fe5e3b97 TT |
3671 | echo $ac_n "(cached) $ac_c" 1>&6 |
3672 | else | |
5aac1dac TT |
3673 | ac_save_LIBS="$LIBS" |
3674 | LIBS="-lnsl $LIBS" | |
3675 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3676 | #line 3677 "configure" |
fe5e3b97 | 3677 | #include "confdefs.h" |
fe5e3b97 TT |
3678 | /* Override any gcc2 internal prototype to avoid an error. */ |
3679 | /* We use char because int might match the return type of a gcc2 | |
3680 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 3681 | char gethostbyname(); |
fe5e3b97 TT |
3682 | |
3683 | int main() { | |
5aac1dac | 3684 | gethostbyname() |
fe5e3b97 TT |
3685 | ; return 0; } |
3686 | EOF | |
e7cca7f4 | 3687 | if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fe5e3b97 | 3688 | rm -rf conftest* |
5aac1dac | 3689 | eval "ac_cv_lib_$ac_lib_var=yes" |
fe5e3b97 TT |
3690 | else |
3691 | echo "configure: failed program was:" >&5 | |
3692 | cat conftest.$ac_ext >&5 | |
3693 | rm -rf conftest* | |
5aac1dac | 3694 | eval "ac_cv_lib_$ac_lib_var=no" |
fe5e3b97 TT |
3695 | fi |
3696 | rm -f conftest* | |
5aac1dac | 3697 | LIBS="$ac_save_LIBS" |
fe5e3b97 | 3698 | |
5aac1dac TT |
3699 | fi |
3700 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
fe5e3b97 | 3701 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3702 | X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" |
fe5e3b97 TT |
3703 | else |
3704 | echo "$ac_t""no" 1>&6 | |
3705 | fi | |
fe5e3b97 | 3706 | |
5aac1dac TT |
3707 | fi |
3708 | ||
3709 | # lieder@skyler.mavd.honeywell.com says without -lsocket, | |
3710 | # socket/setsockopt and other routines are undefined under SCO ODT | |
3711 | # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary | |
3712 | # on later versions), says simon@lia.di.epfl.ch: it contains | |
3713 | # gethostby* variants that don't use the nameserver (or something). | |
3714 | # -lsocket must be given before -lnsl if both are needed. | |
3715 | # We assume that if connect needs -lnsl, so does gethostbyname. | |
3716 | echo $ac_n "checking for connect""... $ac_c" 1>&6 | |
e7cca7f4 | 3717 | echo "configure:3718: checking for connect" >&5 |
5aac1dac | 3718 | if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then |
ee9dd372 TT |
3719 | echo $ac_n "(cached) $ac_c" 1>&6 |
3720 | else | |
3721 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3722 | #line 3723 "configure" |
ee9dd372 TT |
3723 | #include "confdefs.h" |
3724 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 3725 | which can conflict with char connect(); below. */ |
ee9dd372 TT |
3726 | #include <assert.h> |
3727 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3728 | /* We use char because int might match the return type of a gcc2 | |
3729 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 3730 | char connect(); |
ee9dd372 TT |
3731 | |
3732 | int main() { | |
3733 | ||
3734 | /* The GNU C library defines this for functions which it implements | |
3735 | to always fail with ENOSYS. Some functions are actually named | |
3736 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 3737 | #if defined (__stub_connect) || defined (__stub___connect) |
ee9dd372 TT |
3738 | choke me |
3739 | #else | |
5aac1dac | 3740 | connect(); |
ee9dd372 TT |
3741 | #endif |
3742 | ||
3743 | ; return 0; } | |
3744 | EOF | |
e7cca7f4 | 3745 | if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 3746 | rm -rf conftest* |
5aac1dac | 3747 | eval "ac_cv_func_connect=yes" |
ee9dd372 TT |
3748 | else |
3749 | echo "configure: failed program was:" >&5 | |
3750 | cat conftest.$ac_ext >&5 | |
3751 | rm -rf conftest* | |
5aac1dac | 3752 | eval "ac_cv_func_connect=no" |
ee9dd372 TT |
3753 | fi |
3754 | rm -f conftest* | |
3755 | fi | |
3756 | ||
5aac1dac | 3757 | if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then |
ee9dd372 | 3758 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3759 | : |
ee9dd372 TT |
3760 | else |
3761 | echo "$ac_t""no" 1>&6 | |
3762 | fi | |
ee9dd372 | 3763 | |
5aac1dac TT |
3764 | if test $ac_cv_func_connect = no; then |
3765 | echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 | |
e7cca7f4 | 3766 | echo "configure:3767: checking for connect in -lsocket" >&5 |
5aac1dac TT |
3767 | ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` |
3768 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
ee9dd372 TT |
3769 | echo $ac_n "(cached) $ac_c" 1>&6 |
3770 | else | |
5aac1dac TT |
3771 | ac_save_LIBS="$LIBS" |
3772 | LIBS="-lsocket $X_EXTRA_LIBS $LIBS" | |
3773 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3774 | #line 3775 "configure" |
ee9dd372 | 3775 | #include "confdefs.h" |
ee9dd372 TT |
3776 | /* Override any gcc2 internal prototype to avoid an error. */ |
3777 | /* We use char because int might match the return type of a gcc2 | |
3778 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 3779 | char connect(); |
ee9dd372 TT |
3780 | |
3781 | int main() { | |
5aac1dac | 3782 | connect() |
ee9dd372 TT |
3783 | ; return 0; } |
3784 | EOF | |
e7cca7f4 | 3785 | if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 3786 | rm -rf conftest* |
5aac1dac | 3787 | eval "ac_cv_lib_$ac_lib_var=yes" |
ee9dd372 TT |
3788 | else |
3789 | echo "configure: failed program was:" >&5 | |
3790 | cat conftest.$ac_ext >&5 | |
3791 | rm -rf conftest* | |
5aac1dac | 3792 | eval "ac_cv_lib_$ac_lib_var=no" |
ee9dd372 TT |
3793 | fi |
3794 | rm -f conftest* | |
5aac1dac | 3795 | LIBS="$ac_save_LIBS" |
ee9dd372 | 3796 | |
5aac1dac TT |
3797 | fi |
3798 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
ee9dd372 | 3799 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3800 | X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" |
ee9dd372 TT |
3801 | else |
3802 | echo "$ac_t""no" 1>&6 | |
3803 | fi | |
ee9dd372 | 3804 | |
5aac1dac TT |
3805 | fi |
3806 | ||
3807 | # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. | |
3808 | echo $ac_n "checking for remove""... $ac_c" 1>&6 | |
e7cca7f4 | 3809 | echo "configure:3810: checking for remove" >&5 |
5aac1dac | 3810 | if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then |
ee9dd372 TT |
3811 | echo $ac_n "(cached) $ac_c" 1>&6 |
3812 | else | |
3813 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3814 | #line 3815 "configure" |
ee9dd372 TT |
3815 | #include "confdefs.h" |
3816 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 3817 | which can conflict with char remove(); below. */ |
ee9dd372 TT |
3818 | #include <assert.h> |
3819 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3820 | /* We use char because int might match the return type of a gcc2 | |
3821 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 3822 | char remove(); |
ee9dd372 TT |
3823 | |
3824 | int main() { | |
3825 | ||
3826 | /* The GNU C library defines this for functions which it implements | |
3827 | to always fail with ENOSYS. Some functions are actually named | |
3828 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 3829 | #if defined (__stub_remove) || defined (__stub___remove) |
ee9dd372 TT |
3830 | choke me |
3831 | #else | |
5aac1dac | 3832 | remove(); |
ee9dd372 TT |
3833 | #endif |
3834 | ||
3835 | ; return 0; } | |
3836 | EOF | |
e7cca7f4 | 3837 | if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 3838 | rm -rf conftest* |
5aac1dac | 3839 | eval "ac_cv_func_remove=yes" |
ee9dd372 TT |
3840 | else |
3841 | echo "configure: failed program was:" >&5 | |
3842 | cat conftest.$ac_ext >&5 | |
3843 | rm -rf conftest* | |
5aac1dac | 3844 | eval "ac_cv_func_remove=no" |
ee9dd372 TT |
3845 | fi |
3846 | rm -f conftest* | |
3847 | fi | |
3848 | ||
5aac1dac | 3849 | if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then |
ee9dd372 | 3850 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3851 | : |
ee9dd372 TT |
3852 | else |
3853 | echo "$ac_t""no" 1>&6 | |
3854 | fi | |
ee9dd372 | 3855 | |
5aac1dac TT |
3856 | if test $ac_cv_func_remove = no; then |
3857 | echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 | |
e7cca7f4 | 3858 | echo "configure:3859: checking for remove in -lposix" >&5 |
5aac1dac TT |
3859 | ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` |
3860 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
ee9dd372 TT |
3861 | echo $ac_n "(cached) $ac_c" 1>&6 |
3862 | else | |
5aac1dac TT |
3863 | ac_save_LIBS="$LIBS" |
3864 | LIBS="-lposix $LIBS" | |
3865 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3866 | #line 3867 "configure" |
ee9dd372 | 3867 | #include "confdefs.h" |
ee9dd372 TT |
3868 | /* Override any gcc2 internal prototype to avoid an error. */ |
3869 | /* We use char because int might match the return type of a gcc2 | |
3870 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 3871 | char remove(); |
ee9dd372 TT |
3872 | |
3873 | int main() { | |
5aac1dac | 3874 | remove() |
ee9dd372 TT |
3875 | ; return 0; } |
3876 | EOF | |
e7cca7f4 | 3877 | if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 3878 | rm -rf conftest* |
5aac1dac | 3879 | eval "ac_cv_lib_$ac_lib_var=yes" |
ee9dd372 TT |
3880 | else |
3881 | echo "configure: failed program was:" >&5 | |
3882 | cat conftest.$ac_ext >&5 | |
3883 | rm -rf conftest* | |
5aac1dac | 3884 | eval "ac_cv_lib_$ac_lib_var=no" |
ee9dd372 TT |
3885 | fi |
3886 | rm -f conftest* | |
5aac1dac | 3887 | LIBS="$ac_save_LIBS" |
ee9dd372 | 3888 | |
5aac1dac TT |
3889 | fi |
3890 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
ee9dd372 | 3891 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3892 | X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" |
ee9dd372 TT |
3893 | else |
3894 | echo "$ac_t""no" 1>&6 | |
3895 | fi | |
ee9dd372 | 3896 | |
5aac1dac TT |
3897 | fi |
3898 | ||
3899 | # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. | |
3900 | echo $ac_n "checking for shmat""... $ac_c" 1>&6 | |
e7cca7f4 | 3901 | echo "configure:3902: checking for shmat" >&5 |
5aac1dac | 3902 | if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then |
283a159f AH |
3903 | echo $ac_n "(cached) $ac_c" 1>&6 |
3904 | else | |
3905 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3906 | #line 3907 "configure" |
283a159f AH |
3907 | #include "confdefs.h" |
3908 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 3909 | which can conflict with char shmat(); below. */ |
283a159f AH |
3910 | #include <assert.h> |
3911 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3912 | /* We use char because int might match the return type of a gcc2 | |
3913 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 3914 | char shmat(); |
283a159f AH |
3915 | |
3916 | int main() { | |
3917 | ||
3918 | /* The GNU C library defines this for functions which it implements | |
3919 | to always fail with ENOSYS. Some functions are actually named | |
3920 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 3921 | #if defined (__stub_shmat) || defined (__stub___shmat) |
283a159f AH |
3922 | choke me |
3923 | #else | |
5aac1dac | 3924 | shmat(); |
283a159f AH |
3925 | #endif |
3926 | ||
3927 | ; return 0; } | |
3928 | EOF | |
e7cca7f4 | 3929 | if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
283a159f | 3930 | rm -rf conftest* |
5aac1dac | 3931 | eval "ac_cv_func_shmat=yes" |
283a159f AH |
3932 | else |
3933 | echo "configure: failed program was:" >&5 | |
3934 | cat conftest.$ac_ext >&5 | |
3935 | rm -rf conftest* | |
5aac1dac | 3936 | eval "ac_cv_func_shmat=no" |
283a159f AH |
3937 | fi |
3938 | rm -f conftest* | |
3939 | fi | |
3940 | ||
5aac1dac | 3941 | if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then |
283a159f | 3942 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3943 | : |
283a159f AH |
3944 | else |
3945 | echo "$ac_t""no" 1>&6 | |
3946 | fi | |
283a159f | 3947 | |
5aac1dac TT |
3948 | if test $ac_cv_func_shmat = no; then |
3949 | echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 | |
e7cca7f4 | 3950 | echo "configure:3951: checking for shmat in -lipc" >&5 |
5aac1dac TT |
3951 | ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` |
3952 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
283a159f AH |
3953 | echo $ac_n "(cached) $ac_c" 1>&6 |
3954 | else | |
5aac1dac TT |
3955 | ac_save_LIBS="$LIBS" |
3956 | LIBS="-lipc $LIBS" | |
3957 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 3958 | #line 3959 "configure" |
283a159f | 3959 | #include "confdefs.h" |
5aac1dac TT |
3960 | /* Override any gcc2 internal prototype to avoid an error. */ |
3961 | /* We use char because int might match the return type of a gcc2 | |
3962 | builtin and then its argument prototype would still apply. */ | |
3963 | char shmat(); | |
3964 | ||
3965 | int main() { | |
3966 | shmat() | |
3967 | ; return 0; } | |
283a159f | 3968 | EOF |
e7cca7f4 | 3969 | if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
283a159f | 3970 | rm -rf conftest* |
5aac1dac | 3971 | eval "ac_cv_lib_$ac_lib_var=yes" |
283a159f | 3972 | else |
283a159f AH |
3973 | echo "configure: failed program was:" >&5 |
3974 | cat conftest.$ac_ext >&5 | |
3975 | rm -rf conftest* | |
5aac1dac | 3976 | eval "ac_cv_lib_$ac_lib_var=no" |
283a159f AH |
3977 | fi |
3978 | rm -f conftest* | |
5aac1dac TT |
3979 | LIBS="$ac_save_LIBS" |
3980 | ||
283a159f | 3981 | fi |
5aac1dac | 3982 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
283a159f | 3983 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 3984 | X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" |
283a159f AH |
3985 | else |
3986 | echo "$ac_t""no" 1>&6 | |
3987 | fi | |
5aac1dac TT |
3988 | |
3989 | fi | |
3990 | fi | |
3991 | ||
3992 | # Check for libraries that X11R6 Xt/Xaw programs need. | |
3993 | ac_save_LDFLAGS="$LDFLAGS" | |
3994 | test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" | |
3995 | # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to | |
3996 | # check for ICE first), but we must link in the order -lSM -lICE or | |
3997 | # we get undefined symbols. So assume we have SM if we have ICE. | |
3998 | # These have to be linked with before -lX11, unlike the other | |
3999 | # libraries we check for below, so use a different variable. | |
4000 | # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. | |
4001 | echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 | |
e7cca7f4 | 4002 | echo "configure:4003: checking for IceConnectionNumber in -lICE" >&5 |
5aac1dac TT |
4003 | ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` |
4004 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
19367215 HB |
4005 | echo $ac_n "(cached) $ac_c" 1>&6 |
4006 | else | |
5aac1dac TT |
4007 | ac_save_LIBS="$LIBS" |
4008 | LIBS="-lICE $X_EXTRA_LIBS $LIBS" | |
4009 | cat > conftest.$ac_ext <<EOF | |
e7cca7f4 | 4010 | #line 4011 "configure" |
19367215 | 4011 | #include "confdefs.h" |
19367215 HB |
4012 | /* Override any gcc2 internal prototype to avoid an error. */ |
4013 | /* We use char because int might match the return type of a gcc2 | |
4014 | builtin and then its argument prototype would still apply. */ | |
5aac1dac TT |
4015 | char IceConnectionNumber(); |
4016 | ||
4017 | int main() { | |
4018 | IceConnectionNumber() | |
4019 | ; return 0; } | |
4020 | EOF | |
e7cca7f4 | 4021 | if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
4022 | rm -rf conftest* |
4023 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4024 | else | |
4025 | echo "configure: failed program was:" >&5 | |
4026 | cat conftest.$ac_ext >&5 | |
4027 | rm -rf conftest* | |
4028 | eval "ac_cv_lib_$ac_lib_var=no" | |
4029 | fi | |
4030 | rm -f conftest* | |
4031 | LIBS="$ac_save_LIBS" | |
4032 | ||
4033 | fi | |
4034 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4035 | echo "$ac_t""yes" 1>&6 | |
4036 | X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" | |
4037 | else | |
4038 | echo "$ac_t""no" 1>&6 | |
4039 | fi | |
4040 | ||
4041 | LDFLAGS="$ac_save_LDFLAGS" | |
4042 | ||
4043 | fi | |
4044 | ||
4045 | ||
4046 | # Check whether --enable-java-awt or --disable-java-awt was given. | |
4047 | if test "${enable_java_awt+set}" = set; then | |
4048 | enableval="$enable_java_awt" | |
4049 | : | |
4050 | fi | |
4051 | ||
4052 | ||
4053 | peerlibs="`echo ${enable_java_awt} | tr ',' ' '`" | |
4054 | use_xlib_awt="" | |
4055 | use_gtk_awt="" | |
4056 | # The default toolkit to use is the first one specified. | |
4057 | TOOLKIT= | |
4058 | ||
4059 | ||
4060 | for peer in $peerlibs ; do | |
4061 | case $peer in | |
4062 | xlib) | |
4063 | if test "$no_x" = yes; then | |
4064 | echo "*** xlib peers requested but no X library available" 1>&2 | |
4065 | exit 1 | |
4066 | else | |
4067 | use_xlib_awt="yes" | |
4068 | if test -z "$TOOLKIT"; then | |
9e8e1bec | 4069 | TOOLKIT=gnu.awt.xlib.XToolkit |
5aac1dac TT |
4070 | fi |
4071 | fi | |
4072 | ;; | |
4073 | gtk) | |
4074 | if test "$no_x" = yes; then | |
4075 | echo "*** xlib peers requested but no X library available" 1>&2 | |
4076 | exit 1 | |
4077 | else | |
4078 | use_gtk_awt=yes | |
4079 | if test -z "$TOOLKIT"; then | |
4080 | TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit | |
4081 | fi | |
4082 | test -d jniinclude || mkdir jniinclude | |
4083 | fi | |
4084 | ;; | |
4085 | no) | |
4086 | use_xlib_awt= | |
4087 | use_gtk_awt= | |
4088 | break | |
4089 | ;; | |
4090 | *) | |
4091 | echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2 | |
4092 | exit 1 | |
4093 | esac | |
4094 | done | |
4095 | ||
4096 | ||
4097 | ||
4098 | if test "$use_xlib_awt" = yes; then | |
4099 | XLIB_AWT_TRUE= | |
4100 | XLIB_AWT_FALSE='#' | |
4101 | else | |
4102 | XLIB_AWT_TRUE='#' | |
4103 | XLIB_AWT_FALSE= | |
4104 | fi | |
4105 | ||
4106 | ||
4107 | if test "$use_gtk_awt" = yes; then | |
4108 | GTK_AWT_TRUE= | |
4109 | GTK_AWT_FALSE='#' | |
4110 | else | |
4111 | GTK_AWT_TRUE='#' | |
4112 | GTK_AWT_FALSE= | |
4113 | fi | |
4114 | ||
4115 | ||
4116 | libsubdir=.libs | |
4117 | ||
4118 | echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6 | |
e7cca7f4 | 4119 | echo "configure:4120: checking for garbage collector to use" >&5 |
5aac1dac TT |
4120 | # Check whether --enable-java-gc or --disable-java-gc was given. |
4121 | if test "${enable_java_gc+set}" = set; then | |
4122 | enableval="$enable_java_gc" | |
4123 | ||
4124 | GC=$enableval | |
4125 | else | |
4126 | GC=boehm | |
4127 | fi | |
4128 | ||
4129 | GCLIBS= | |
4130 | GCINCS= | |
4131 | GCDEPS= | |
4132 | GCOBJS= | |
4133 | GCSPEC= | |
4134 | JC1GCSPEC= | |
4135 | GCTESTSPEC= | |
4136 | case "$GC" in | |
4137 | boehm) | |
4138 | echo "$ac_t""boehm" 1>&6 | |
4139 | GCLIBS=../boehm-gc/libgcjgc_convenience.la | |
5aac1dac TT |
4140 | JC1GCSPEC='-fuse-boehm-gc' |
4141 | GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs" | |
4142 | ||
7160c99d | 4143 | GCINCS="`cat ../boehm-gc/boehm-cflags`" |
5aac1dac TT |
4144 | GCOBJS=boehm.lo |
4145 | GCHDR=boehm-gc.h | |
4146 | cat >> confdefs.h <<\EOF | |
4147 | #define HAVE_BOEHM_GC 1 | |
4148 | EOF | |
4149 | ||
4150 | ;; | |
4151 | no) | |
4152 | echo "$ac_t""none" 1>&6 | |
4153 | GCOBJS=nogc.lo | |
4154 | GCHDR=no-gc.h | |
4155 | ;; | |
4156 | *) | |
4157 | { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; } | |
4158 | ;; | |
4159 | esac | |
4160 | ||
4161 | ||
4162 | ||
4163 | ||
4164 | ||
4165 | ||
4166 | ||
4167 | ||
4168 | ||
4169 | ||
4170 | echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 | |
7160c99d | 4171 | echo "configure:4172: checking for thread model used by GCC" >&5 |
5aac1dac TT |
4172 | THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` |
4173 | echo "$ac_t""$THREADS" 1>&6 | |
4174 | ||
4175 | case "$THREADS" in | |
4176 | no | none | single) | |
4177 | THREADS=none | |
4178 | ;; | |
4179 | posix | pthreads) | |
4180 | THREADS=posix | |
4181 | case "$host" in | |
4182 | *-*-linux*) | |
4183 | cat >> confdefs.h <<\EOF | |
4184 | #define LINUX_THREADS 1 | |
4185 | EOF | |
4186 | ||
4187 | ;; | |
4188 | esac | |
4189 | ;; | |
4190 | win32) | |
4191 | ;; | |
4192 | decosf1 | irix | mach | os2 | solaris | dce | vxworks) | |
4193 | { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; } | |
4194 | ;; | |
4195 | *) | |
4196 | { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; } | |
4197 | ;; | |
4198 | esac | |
4199 | ||
620a329b | 4200 | THREADCXXFLAGS= |
5aac1dac TT |
4201 | THREADLDFLAGS= |
4202 | THREADLIBS= | |
4203 | THREADINCS= | |
4204 | THREADDEPS= | |
4205 | THREADOBJS= | |
4206 | THREADH= | |
4207 | THREADSPEC= | |
4208 | case "$THREADS" in | |
4209 | posix) | |
4210 | case "$host" in | |
4211 | *-*-cygwin*) | |
4212 | # Don't set THREADLIBS here. Cygwin doesn't have -lpthread. | |
4213 | ;; | |
4214 | ||
4215 | *-*-freebsd[1234]*) | |
4216 | ||
4217 | # Before FreeBSD 5, it didn't have -lpthread (or any library which | |
4218 | # merely adds pthread_* functions) but it does have a -pthread switch | |
4219 | # which is required at link-time to select -lc_r *instead* of -lc. | |
4220 | THREADLDFLAGS=-pthread | |
4221 | # Don't set THREADSPEC here as might be expected since -pthread is | |
4222 | # not processed when found within a spec file, it must come from | |
4223 | # the command line. For now, the user must provide the -pthread | |
4224 | # switch to link code compiled with gcj. In future, consider adding | |
4225 | # support for weak references to pthread_* functions ala gthr.h API. | |
4226 | THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}' | |
4227 | ;; | |
4228 | *-*-freebsd*) | |
4229 | # FreeBSD 5 implements a model much closer to other modern UNIX | |
4230 | # which support threads. However, it still does not support | |
4231 | # -lpthread. | |
4232 | THREADLDFLAGS=-pthread | |
4233 | THREADSPEC=-lc_r | |
4234 | ;; | |
620a329b RS |
4235 | alpha*-dec-osf*) |
4236 | THREADCXXFLAGS=-pthread | |
4237 | # boehm-gc needs some functions from librt, so link that too. | |
4238 | THREADLIBS='-lpthread -lrt' | |
4239 | THREADSPEC='-lpthread -lrt' | |
4240 | ;; | |
5aac1dac TT |
4241 | *) |
4242 | THREADLIBS=-lpthread | |
4243 | THREADSPEC=-lpthread | |
4244 | ;; | |
4245 | esac | |
4246 | THREADOBJS=posix-threads.lo | |
4247 | THREADH=posix-threads.h | |
4248 | # MIT pthreads doesn't seem to have the mutexattr functions. | |
4249 | # But for now we don't check for it. We just assume you aren't | |
4250 | # using MIT pthreads. | |
4251 | cat >> confdefs.h <<\EOF | |
4252 | #define HAVE_PTHREAD_MUTEXATTR_INIT 1 | |
4253 | EOF | |
4254 | ||
4255 | ||
4256 | # If we're using the Boehm GC, then we happen to know that it | |
4257 | # defines _REENTRANT, so we don't bother. Eww. | |
4258 | if test "$GC" != boehm; then | |
4259 | cat >> confdefs.h <<\EOF | |
4260 | #define _REENTRANT 1 | |
4261 | EOF | |
4262 | ||
4263 | fi | |
4264 | cat >> confdefs.h <<\EOF | |
4265 | #define _POSIX_PTHREAD_SEMANTICS 1 | |
4266 | EOF | |
4267 | ||
4268 | ;; | |
4269 | ||
4270 | win32) | |
4271 | THREADOBJS=win32-threads.lo | |
4272 | THREADH=win32-threads.h | |
4273 | ;; | |
19367215 | 4274 | |
5aac1dac TT |
4275 | none) |
4276 | THREADOBJS=no-threads.lo | |
4277 | THREADH=no-threads.h | |
4278 | ;; | |
4279 | esac | |
19367215 | 4280 | |
19367215 | 4281 | |
19367215 | 4282 | |
19367215 | 4283 | |
e4261ef7 | 4284 | |
e4261ef7 | 4285 | |
19367215 HB |
4286 | |
4287 | ||
620a329b | 4288 | |
5aac1dac | 4289 | if test -d sysdep; then true; else mkdir sysdep; fi |
b9f243c2 | 4290 | |
b9f243c2 | 4291 | |
5aac1dac TT |
4292 | HASH_SYNC_SPEC= |
4293 | # Hash synchronization is only useful with posix threads right now. | |
4294 | if test "$enable_hash_synchronization" = yes && test "$THREADS" != "none"; then | |
4295 | HASH_SYNC_SPEC=-fhash-synchronization | |
4296 | cat >> confdefs.h <<\EOF | |
4297 | #define JV_HASH_SYNCHRONIZATION 1 | |
b9f243c2 AH |
4298 | EOF |
4299 | ||
b9f243c2 AH |
4300 | fi |
4301 | ||
283a159f | 4302 | |
5aac1dac TT |
4303 | |
4304 | ||
4305 | ||
4306 | if test "$GCC" = yes; then | |
4307 | USING_GCC_TRUE= | |
4308 | USING_GCC_FALSE='#' | |
283a159f | 4309 | else |
5aac1dac TT |
4310 | USING_GCC_TRUE='#' |
4311 | USING_GCC_FALSE= | |
283a159f | 4312 | fi |
283a159f | 4313 | |
5aac1dac TT |
4314 | CANADIAN=no |
4315 | NULL_TARGET=no | |
4316 | NATIVE=yes | |
283a159f | 4317 | |
5aac1dac TT |
4318 | # We're in the tree with gcc, and need to include some of its headers. |
4319 | GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc' | |
283a159f | 4320 | |
5aac1dac TT |
4321 | # Figure out where generated headers like libgcj-config.h get installed. |
4322 | gcc_version_trigger=${libgcj_basedir}/../gcc/version.c | |
4323 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` | |
4324 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` | |
6ab37e1e | 4325 | tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include |
5aac1dac TT |
4326 | |
4327 | ||
4328 | ||
4329 | if test "x${with_newlib}" = "xyes"; then | |
4330 | # We are being configured with a cross compiler. AC_REPLACE_FUNCS | |
4331 | # may not work correctly, because the compiler may not be able to | |
4332 | # link executables. | |
4333 | ||
4334 | # We assume newlib. This lets us hard-code the functions we know | |
4335 | # we'll have. | |
4336 | cat >> confdefs.h <<\EOF | |
4337 | #define HAVE_MEMMOVE 1 | |
9e7823cc L |
4338 | EOF |
4339 | ||
5aac1dac TT |
4340 | cat >> confdefs.h <<\EOF |
4341 | #define HAVE_MEMCPY 1 | |
4342 | EOF | |
ee9dd372 | 4343 | |
5aac1dac TT |
4344 | cat >> confdefs.h <<\EOF |
4345 | #define HAVE_STRERROR 1 | |
4346 | EOF | |
860a1536 | 4347 | |
5aac1dac TT |
4348 | cat >> confdefs.h <<\EOF |
4349 | #define HAVE_TIME 1 | |
4350 | EOF | |
860a1536 | 4351 | |
5aac1dac TT |
4352 | cat >> confdefs.h <<\EOF |
4353 | #define HAVE_GMTIME_R 1 | |
860a1536 | 4354 | EOF |
5aac1dac TT |
4355 | |
4356 | cat >> confdefs.h <<\EOF | |
4357 | #define HAVE_LOCALTIME_R 1 | |
860a1536 | 4358 | EOF |
860a1536 | 4359 | |
5aac1dac TT |
4360 | cat >> confdefs.h <<\EOF |
4361 | #define HAVE_PTHREAD_MUTEXATTR_INIT 1 | |
860a1536 TT |
4362 | EOF |
4363 | ||
5aac1dac TT |
4364 | cat >> confdefs.h <<\EOF |
4365 | #define HAVE_ALLOCA 1 | |
4366 | EOF | |
4367 | ||
4368 | ||
4369 | cat >> confdefs.h <<\EOF | |
4370 | #define NO_GETUID 1 | |
4371 | EOF | |
4372 | ||
9b5f18b1 | 4373 | PLATFORMNET=NoNet |
5aac1dac TT |
4374 | else |
4375 | for ac_func in strerror ioctl select fstat open fsync sleep opendir | |
4376 | do | |
4377 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 4378 | echo "configure:4379: checking for $ac_func" >&5 |
5aac1dac | 4379 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
860a1536 TT |
4380 | echo $ac_n "(cached) $ac_c" 1>&6 |
4381 | else | |
5aac1dac | 4382 | cat > conftest.$ac_ext <<EOF |
7160c99d | 4383 | #line 4384 "configure" |
860a1536 | 4384 | #include "confdefs.h" |
5aac1dac TT |
4385 | /* System header to define __stub macros and hopefully few prototypes, |
4386 | which can conflict with char $ac_func(); below. */ | |
4387 | #include <assert.h> | |
4388 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4389 | /* We use char because int might match the return type of a gcc2 | |
4390 | builtin and then its argument prototype would still apply. */ | |
4391 | char $ac_func(); | |
860a1536 | 4392 | |
5aac1dac TT |
4393 | int main() { |
4394 | ||
4395 | /* The GNU C library defines this for functions which it implements | |
4396 | to always fail with ENOSYS. Some functions are actually named | |
4397 | something starting with __ and the normal name is an alias. */ | |
4398 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4399 | choke me | |
860a1536 | 4400 | #else |
5aac1dac | 4401 | $ac_func(); |
860a1536 TT |
4402 | #endif |
4403 | ||
860a1536 TT |
4404 | ; return 0; } |
4405 | EOF | |
7160c99d | 4406 | if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
860a1536 | 4407 | rm -rf conftest* |
5aac1dac | 4408 | eval "ac_cv_func_$ac_func=yes" |
860a1536 TT |
4409 | else |
4410 | echo "configure: failed program was:" >&5 | |
4411 | cat conftest.$ac_ext >&5 | |
4412 | rm -rf conftest* | |
5aac1dac | 4413 | eval "ac_cv_func_$ac_func=no" |
860a1536 TT |
4414 | fi |
4415 | rm -f conftest* | |
860a1536 TT |
4416 | fi |
4417 | ||
5aac1dac TT |
4418 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4419 | echo "$ac_t""yes" 1>&6 | |
4420 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4421 | cat >> confdefs.h <<EOF | |
4422 | #define $ac_tr_func 1 | |
860a1536 | 4423 | EOF |
5aac1dac TT |
4424 | |
4425 | else | |
4426 | echo "$ac_t""no" 1>&6 | |
4427 | fi | |
4428 | done | |
860a1536 | 4429 | |
5aac1dac TT |
4430 | for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd |
4431 | do | |
4432 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 4433 | echo "configure:4434: checking for $ac_func" >&5 |
5aac1dac | 4434 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
999825b0 TT |
4435 | echo $ac_n "(cached) $ac_c" 1>&6 |
4436 | else | |
4437 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4438 | #line 4439 "configure" |
999825b0 | 4439 | #include "confdefs.h" |
5aac1dac TT |
4440 | /* System header to define __stub macros and hopefully few prototypes, |
4441 | which can conflict with char $ac_func(); below. */ | |
4442 | #include <assert.h> | |
4443 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4444 | /* We use char because int might match the return type of a gcc2 | |
4445 | builtin and then its argument prototype would still apply. */ | |
4446 | char $ac_func(); | |
4447 | ||
999825b0 | 4448 | int main() { |
5aac1dac TT |
4449 | |
4450 | /* The GNU C library defines this for functions which it implements | |
4451 | to always fail with ENOSYS. Some functions are actually named | |
4452 | something starting with __ and the normal name is an alias. */ | |
4453 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4454 | choke me | |
4455 | #else | |
4456 | $ac_func(); | |
4457 | #endif | |
4458 | ||
999825b0 TT |
4459 | ; return 0; } |
4460 | EOF | |
7160c99d | 4461 | if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
999825b0 | 4462 | rm -rf conftest* |
5aac1dac | 4463 | eval "ac_cv_func_$ac_func=yes" |
999825b0 TT |
4464 | else |
4465 | echo "configure: failed program was:" >&5 | |
4466 | cat conftest.$ac_ext >&5 | |
4467 | rm -rf conftest* | |
5aac1dac | 4468 | eval "ac_cv_func_$ac_func=no" |
999825b0 TT |
4469 | fi |
4470 | rm -f conftest* | |
4471 | fi | |
4472 | ||
5aac1dac TT |
4473 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4474 | echo "$ac_t""yes" 1>&6 | |
4475 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4476 | cat >> confdefs.h <<EOF | |
4477 | #define $ac_tr_func 1 | |
999825b0 | 4478 | EOF |
5aac1dac TT |
4479 | |
4480 | else | |
4481 | echo "$ac_t""no" 1>&6 | |
4482 | fi | |
4483 | done | |
999825b0 | 4484 | |
5aac1dac TT |
4485 | for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod |
4486 | do | |
4487 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 4488 | echo "configure:4489: checking for $ac_func" >&5 |
5aac1dac | 4489 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ebecd56d AT |
4490 | echo $ac_n "(cached) $ac_c" 1>&6 |
4491 | else | |
4492 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4493 | #line 4494 "configure" |
ebecd56d | 4494 | #include "confdefs.h" |
5aac1dac TT |
4495 | /* System header to define __stub macros and hopefully few prototypes, |
4496 | which can conflict with char $ac_func(); below. */ | |
4497 | #include <assert.h> | |
4498 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4499 | /* We use char because int might match the return type of a gcc2 | |
4500 | builtin and then its argument prototype would still apply. */ | |
4501 | char $ac_func(); | |
4502 | ||
ebecd56d | 4503 | int main() { |
5aac1dac TT |
4504 | |
4505 | /* The GNU C library defines this for functions which it implements | |
4506 | to always fail with ENOSYS. Some functions are actually named | |
4507 | something starting with __ and the normal name is an alias. */ | |
4508 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4509 | choke me | |
4510 | #else | |
4511 | $ac_func(); | |
4512 | #endif | |
4513 | ||
ebecd56d AT |
4514 | ; return 0; } |
4515 | EOF | |
7160c99d | 4516 | if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ebecd56d | 4517 | rm -rf conftest* |
5aac1dac | 4518 | eval "ac_cv_func_$ac_func=yes" |
ebecd56d AT |
4519 | else |
4520 | echo "configure: failed program was:" >&5 | |
4521 | cat conftest.$ac_ext >&5 | |
4522 | rm -rf conftest* | |
5aac1dac | 4523 | eval "ac_cv_func_$ac_func=no" |
ebecd56d AT |
4524 | fi |
4525 | rm -f conftest* | |
4526 | fi | |
4527 | ||
5aac1dac TT |
4528 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4529 | echo "$ac_t""yes" 1>&6 | |
4530 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4531 | cat >> confdefs.h <<EOF | |
4532 | #define $ac_tr_func 1 | |
ebecd56d | 4533 | EOF |
5aac1dac TT |
4534 | |
4535 | else | |
4536 | echo "$ac_t""no" 1>&6 | |
ebecd56d | 4537 | fi |
5aac1dac | 4538 | done |
ebecd56d | 4539 | |
5aac1dac TT |
4540 | for ac_func in nl_langinfo setlocale |
4541 | do | |
4542 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 4543 | echo "configure:4544: checking for $ac_func" >&5 |
5aac1dac | 4544 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ebecd56d AT |
4545 | echo $ac_n "(cached) $ac_c" 1>&6 |
4546 | else | |
4547 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4548 | #line 4549 "configure" |
ebecd56d | 4549 | #include "confdefs.h" |
5aac1dac TT |
4550 | /* System header to define __stub macros and hopefully few prototypes, |
4551 | which can conflict with char $ac_func(); below. */ | |
4552 | #include <assert.h> | |
4553 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4554 | /* We use char because int might match the return type of a gcc2 | |
4555 | builtin and then its argument prototype would still apply. */ | |
4556 | char $ac_func(); | |
4557 | ||
ebecd56d | 4558 | int main() { |
5aac1dac TT |
4559 | |
4560 | /* The GNU C library defines this for functions which it implements | |
4561 | to always fail with ENOSYS. Some functions are actually named | |
4562 | something starting with __ and the normal name is an alias. */ | |
4563 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4564 | choke me | |
4565 | #else | |
4566 | $ac_func(); | |
4567 | #endif | |
4568 | ||
ebecd56d AT |
4569 | ; return 0; } |
4570 | EOF | |
7160c99d | 4571 | if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ebecd56d | 4572 | rm -rf conftest* |
5aac1dac | 4573 | eval "ac_cv_func_$ac_func=yes" |
ebecd56d AT |
4574 | else |
4575 | echo "configure: failed program was:" >&5 | |
4576 | cat conftest.$ac_ext >&5 | |
4577 | rm -rf conftest* | |
5aac1dac | 4578 | eval "ac_cv_func_$ac_func=no" |
ebecd56d AT |
4579 | fi |
4580 | rm -f conftest* | |
4581 | fi | |
4582 | ||
5aac1dac TT |
4583 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4584 | echo "$ac_t""yes" 1>&6 | |
4585 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4586 | cat >> confdefs.h <<EOF | |
4587 | #define $ac_tr_func 1 | |
ebecd56d | 4588 | EOF |
5aac1dac | 4589 | |
ebecd56d | 4590 | else |
5aac1dac TT |
4591 | echo "$ac_t""no" 1>&6 |
4592 | fi | |
4593 | done | |
4594 | ||
4595 | for ac_func in inet_aton inet_addr | |
4596 | do | |
4597 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 4598 | echo "configure:4599: checking for $ac_func" >&5 |
5aac1dac | 4599 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ebecd56d AT |
4600 | echo $ac_n "(cached) $ac_c" 1>&6 |
4601 | else | |
4602 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4603 | #line 4604 "configure" |
ebecd56d | 4604 | #include "confdefs.h" |
5aac1dac TT |
4605 | /* System header to define __stub macros and hopefully few prototypes, |
4606 | which can conflict with char $ac_func(); below. */ | |
4607 | #include <assert.h> | |
4608 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4609 | /* We use char because int might match the return type of a gcc2 | |
4610 | builtin and then its argument prototype would still apply. */ | |
4611 | char $ac_func(); | |
4612 | ||
ebecd56d | 4613 | int main() { |
5aac1dac TT |
4614 | |
4615 | /* The GNU C library defines this for functions which it implements | |
4616 | to always fail with ENOSYS. Some functions are actually named | |
4617 | something starting with __ and the normal name is an alias. */ | |
4618 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4619 | choke me | |
4620 | #else | |
4621 | $ac_func(); | |
4622 | #endif | |
4623 | ||
ebecd56d AT |
4624 | ; return 0; } |
4625 | EOF | |
7160c99d | 4626 | if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ebecd56d | 4627 | rm -rf conftest* |
5aac1dac | 4628 | eval "ac_cv_func_$ac_func=yes" |
ebecd56d AT |
4629 | else |
4630 | echo "configure: failed program was:" >&5 | |
4631 | cat conftest.$ac_ext >&5 | |
4632 | rm -rf conftest* | |
5aac1dac | 4633 | eval "ac_cv_func_$ac_func=no" |
ebecd56d AT |
4634 | fi |
4635 | rm -f conftest* | |
4636 | fi | |
4637 | ||
5aac1dac TT |
4638 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4639 | echo "$ac_t""yes" 1>&6 | |
4640 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4641 | cat >> confdefs.h <<EOF | |
4642 | #define $ac_tr_func 1 | |
ebecd56d | 4643 | EOF |
5aac1dac TT |
4644 | break |
4645 | else | |
4646 | echo "$ac_t""no" 1>&6 | |
ebecd56d | 4647 | fi |
5aac1dac | 4648 | done |
ebecd56d | 4649 | |
5aac1dac | 4650 | for ac_func in inet_pton uname inet_ntoa |
ee9dd372 TT |
4651 | do |
4652 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 4653 | echo "configure:4654: checking for $ac_func" >&5 |
ee9dd372 TT |
4654 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4655 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4656 | else | |
4657 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4658 | #line 4659 "configure" |
ee9dd372 TT |
4659 | #include "confdefs.h" |
4660 | /* System header to define __stub macros and hopefully few prototypes, | |
4661 | which can conflict with char $ac_func(); below. */ | |
4662 | #include <assert.h> | |
4663 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4664 | /* We use char because int might match the return type of a gcc2 | |
4665 | builtin and then its argument prototype would still apply. */ | |
4666 | char $ac_func(); | |
4667 | ||
4668 | int main() { | |
4669 | ||
4670 | /* The GNU C library defines this for functions which it implements | |
4671 | to always fail with ENOSYS. Some functions are actually named | |
4672 | something starting with __ and the normal name is an alias. */ | |
4673 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4674 | choke me | |
4675 | #else | |
4676 | $ac_func(); | |
4677 | #endif | |
4678 | ||
4679 | ; return 0; } | |
4680 | EOF | |
7160c99d | 4681 | if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 TT |
4682 | rm -rf conftest* |
4683 | eval "ac_cv_func_$ac_func=yes" | |
4684 | else | |
4685 | echo "configure: failed program was:" >&5 | |
4686 | cat conftest.$ac_ext >&5 | |
4687 | rm -rf conftest* | |
4688 | eval "ac_cv_func_$ac_func=no" | |
4689 | fi | |
4690 | rm -f conftest* | |
4691 | fi | |
4692 | ||
4693 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4694 | echo "$ac_t""yes" 1>&6 | |
4695 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4696 | cat >> confdefs.h <<EOF | |
4697 | #define $ac_tr_func 1 | |
4698 | EOF | |
4699 | ||
5aac1dac TT |
4700 | else |
4701 | echo "$ac_t""no" 1>&6 | |
ee9dd372 | 4702 | fi |
5aac1dac | 4703 | done |
34c5c0e1 | 4704 | |
5aac1dac TT |
4705 | for ac_func in fork execvp pipe sigaction ftruncate |
4706 | do | |
4707 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 4708 | echo "configure:4709: checking for $ac_func" >&5 |
5aac1dac | 4709 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
34c5c0e1 AO |
4710 | echo $ac_n "(cached) $ac_c" 1>&6 |
4711 | else | |
5aac1dac | 4712 | cat > conftest.$ac_ext <<EOF |
7160c99d | 4713 | #line 4714 "configure" |
34c5c0e1 | 4714 | #include "confdefs.h" |
5aac1dac TT |
4715 | /* System header to define __stub macros and hopefully few prototypes, |
4716 | which can conflict with char $ac_func(); below. */ | |
4717 | #include <assert.h> | |
4718 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4719 | /* We use char because int might match the return type of a gcc2 | |
4720 | builtin and then its argument prototype would still apply. */ | |
4721 | char $ac_func(); | |
4722 | ||
34c5c0e1 | 4723 | int main() { |
5aac1dac TT |
4724 | |
4725 | /* The GNU C library defines this for functions which it implements | |
4726 | to always fail with ENOSYS. Some functions are actually named | |
4727 | something starting with __ and the normal name is an alias. */ | |
4728 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4729 | choke me | |
4730 | #else | |
4731 | $ac_func(); | |
4732 | #endif | |
4733 | ||
34c5c0e1 AO |
4734 | ; return 0; } |
4735 | EOF | |
7160c99d | 4736 | if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
34c5c0e1 | 4737 | rm -rf conftest* |
5aac1dac | 4738 | eval "ac_cv_func_$ac_func=yes" |
34c5c0e1 AO |
4739 | else |
4740 | echo "configure: failed program was:" >&5 | |
4741 | cat conftest.$ac_ext >&5 | |
4742 | rm -rf conftest* | |
5aac1dac | 4743 | eval "ac_cv_func_$ac_func=no" |
34c5c0e1 AO |
4744 | fi |
4745 | rm -f conftest* | |
34c5c0e1 AO |
4746 | fi |
4747 | ||
5aac1dac TT |
4748 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4749 | echo "$ac_t""yes" 1>&6 | |
4750 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4751 | cat >> confdefs.h <<EOF | |
4752 | #define $ac_tr_func 1 | |
34c5c0e1 | 4753 | EOF |
5aac1dac TT |
4754 | |
4755 | else | |
4756 | echo "$ac_t""no" 1>&6 | |
4757 | fi | |
4758 | done | |
34c5c0e1 | 4759 | |
5aac1dac TT |
4760 | for ac_hdr in execinfo.h unistd.h dlfcn.h |
4761 | do | |
4762 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4763 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
7160c99d | 4764 | echo "configure:4765: checking for $ac_hdr" >&5 |
5aac1dac | 4765 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
34c5c0e1 AO |
4766 | echo $ac_n "(cached) $ac_c" 1>&6 |
4767 | else | |
5aac1dac | 4768 | cat > conftest.$ac_ext <<EOF |
7160c99d | 4769 | #line 4770 "configure" |
34c5c0e1 | 4770 | #include "confdefs.h" |
5aac1dac | 4771 | #include <$ac_hdr> |
34c5c0e1 | 4772 | EOF |
5aac1dac | 4773 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
7160c99d | 4774 | { (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5aac1dac TT |
4775 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4776 | if test -z "$ac_err"; then | |
34c5c0e1 | 4777 | rm -rf conftest* |
5aac1dac | 4778 | eval "ac_cv_header_$ac_safe=yes" |
34c5c0e1 | 4779 | else |
5aac1dac | 4780 | echo "$ac_err" >&5 |
34c5c0e1 AO |
4781 | echo "configure: failed program was:" >&5 |
4782 | cat conftest.$ac_ext >&5 | |
4783 | rm -rf conftest* | |
5aac1dac | 4784 | eval "ac_cv_header_$ac_safe=no" |
34c5c0e1 AO |
4785 | fi |
4786 | rm -f conftest* | |
4787 | fi | |
5aac1dac TT |
4788 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4789 | echo "$ac_t""yes" 1>&6 | |
4790 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4791 | cat >> confdefs.h <<EOF | |
4792 | #define $ac_tr_hdr 1 | |
34c5c0e1 | 4793 | EOF |
5aac1dac | 4794 | |
ee9dd372 TT |
4795 | else |
4796 | echo "$ac_t""no" 1>&6 | |
4797 | fi | |
4798 | done | |
5aac1dac TT |
4799 | |
4800 | echo $ac_n "checking for backtrace""... $ac_c" 1>&6 | |
7160c99d | 4801 | echo "configure:4802: checking for backtrace" >&5 |
5aac1dac | 4802 | if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then |
ee9dd372 TT |
4803 | echo $ac_n "(cached) $ac_c" 1>&6 |
4804 | else | |
4805 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4806 | #line 4807 "configure" |
ee9dd372 TT |
4807 | #include "confdefs.h" |
4808 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 4809 | which can conflict with char backtrace(); below. */ |
ee9dd372 TT |
4810 | #include <assert.h> |
4811 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4812 | /* We use char because int might match the return type of a gcc2 | |
4813 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 4814 | char backtrace(); |
ee9dd372 TT |
4815 | |
4816 | int main() { | |
4817 | ||
4818 | /* The GNU C library defines this for functions which it implements | |
4819 | to always fail with ENOSYS. Some functions are actually named | |
4820 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 4821 | #if defined (__stub_backtrace) || defined (__stub___backtrace) |
ee9dd372 TT |
4822 | choke me |
4823 | #else | |
5aac1dac | 4824 | backtrace(); |
ee9dd372 TT |
4825 | #endif |
4826 | ||
4827 | ; return 0; } | |
4828 | EOF | |
7160c99d | 4829 | if { (eval echo configure:4830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 4830 | rm -rf conftest* |
5aac1dac | 4831 | eval "ac_cv_func_backtrace=yes" |
ee9dd372 TT |
4832 | else |
4833 | echo "configure: failed program was:" >&5 | |
4834 | cat conftest.$ac_ext >&5 | |
4835 | rm -rf conftest* | |
5aac1dac | 4836 | eval "ac_cv_func_backtrace=no" |
ee9dd372 TT |
4837 | fi |
4838 | rm -f conftest* | |
4839 | fi | |
4840 | ||
5aac1dac | 4841 | if eval "test \"`echo '$ac_cv_func_'backtrace`\" = yes"; then |
ee9dd372 | 4842 | echo "$ac_t""yes" 1>&6 |
ee9dd372 | 4843 | |
5aac1dac TT |
4844 | case "$host" in |
4845 | ia64-*-linux*) | |
4846 | # Has broken backtrace() | |
4847 | ;; | |
5aac1dac TT |
4848 | *) |
4849 | cat >> confdefs.h <<\EOF | |
4850 | #define HAVE_BACKTRACE 1 | |
ee9dd372 TT |
4851 | EOF |
4852 | ||
5aac1dac TT |
4853 | ;; |
4854 | esac | |
4855 | ||
ee9dd372 TT |
4856 | else |
4857 | echo "$ac_t""no" 1>&6 | |
ee9dd372 | 4858 | |
5aac1dac TT |
4859 | case "$host" in |
4860 | *mingw*) | |
4861 | # Has backtrace() defined in libgcj itself | |
4862 | cat >> confdefs.h <<\EOF | |
4863 | #define HAVE_BACKTRACE 1 | |
4864 | EOF | |
4865 | ||
4866 | ;; | |
4867 | esac | |
4868 | ||
da979152 | 4869 | fi |
da979152 | 4870 | |
ee9dd372 | 4871 | |
5aac1dac | 4872 | echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6 |
7160c99d | 4873 | echo "configure:4874: checking for dladdr in -ldl" >&5 |
5aac1dac TT |
4874 | ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'` |
4875 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
ee9dd372 TT |
4876 | echo $ac_n "(cached) $ac_c" 1>&6 |
4877 | else | |
5aac1dac TT |
4878 | ac_save_LIBS="$LIBS" |
4879 | LIBS="-ldl $LIBS" | |
4880 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4881 | #line 4882 "configure" |
5aac1dac | 4882 | #include "confdefs.h" |
ee9dd372 TT |
4883 | /* Override any gcc2 internal prototype to avoid an error. */ |
4884 | /* We use char because int might match the return type of a gcc2 | |
4885 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 4886 | char dladdr(); |
ee9dd372 TT |
4887 | |
4888 | int main() { | |
5aac1dac | 4889 | dladdr() |
ee9dd372 TT |
4890 | ; return 0; } |
4891 | EOF | |
7160c99d | 4892 | if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 4893 | rm -rf conftest* |
5aac1dac | 4894 | eval "ac_cv_lib_$ac_lib_var=yes" |
ee9dd372 TT |
4895 | else |
4896 | echo "configure: failed program was:" >&5 | |
4897 | cat conftest.$ac_ext >&5 | |
4898 | rm -rf conftest* | |
5aac1dac | 4899 | eval "ac_cv_lib_$ac_lib_var=no" |
ee9dd372 TT |
4900 | fi |
4901 | rm -f conftest* | |
5aac1dac | 4902 | LIBS="$ac_save_LIBS" |
ee9dd372 | 4903 | |
5aac1dac TT |
4904 | fi |
4905 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
ee9dd372 | 4906 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 4907 | |
ee9dd372 | 4908 | cat >> confdefs.h <<\EOF |
5aac1dac | 4909 | #define HAVE_DLADDR 1 |
ee9dd372 TT |
4910 | EOF |
4911 | ||
5aac1dac TT |
4912 | else |
4913 | echo "$ac_t""no" 1>&6 | |
4914 | fi | |
4915 | ||
4916 | if test x"$build" = x"$host"; then | |
4917 | for ac_file in /proc/self/exe | |
4918 | do | |
4919 | ||
4920 | ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` | |
4921 | echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 | |
7160c99d | 4922 | echo "configure:4923: checking for $ac_file" >&5 |
5aac1dac TT |
4923 | if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then |
4924 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4925 | else | |
4926 | if test "$cross_compiling" = yes; then | |
4927 | { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } | |
4928 | else | |
4929 | if test -r $ac_file; then | |
4930 | eval "ac_cv_file_$ac_safe=yes" | |
4931 | else | |
4932 | eval "ac_cv_file_$ac_safe=no" | |
4933 | fi | |
4934 | fi | |
4935 | fi | |
4936 | if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then | |
4937 | echo "$ac_t""yes" 1>&6 | |
4938 | ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4939 | cat >> confdefs.h <<EOF | |
4940 | #define $ac_tr_file 1 | |
ee9dd372 | 4941 | EOF |
5aac1dac | 4942 | |
ee9dd372 | 4943 | cat >> confdefs.h <<\EOF |
5aac1dac | 4944 | #define HAVE_PROC_SELF_EXE 1 |
ee9dd372 TT |
4945 | EOF |
4946 | ||
ee9dd372 TT |
4947 | else |
4948 | echo "$ac_t""no" 1>&6 | |
5aac1dac | 4949 | |
ee9dd372 TT |
4950 | fi |
4951 | done | |
4952 | ||
5aac1dac TT |
4953 | else |
4954 | case $host in | |
4955 | *-linux*) | |
4956 | cat >> confdefs.h <<\EOF | |
4957 | #define HAVE_PROC_SELF_EXE 1 | |
4958 | EOF | |
4959 | ||
4960 | ;; | |
4961 | esac | |
4962 | fi | |
ee9dd372 | 4963 | |
5aac1dac TT |
4964 | |
4965 | ||
4966 | am_cv_lib_iconv_ldpath= | |
4967 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
4968 | if test "${with_libiconv_prefix+set}" = set; then | |
4969 | withval="$with_libiconv_prefix" | |
4970 | ||
4971 | for dir in `echo "$withval" | tr : ' '`; do | |
4972 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
4973 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi | |
4974 | done | |
4975 | ||
4976 | fi | |
4977 | ||
4978 | ||
4979 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
7160c99d | 4980 | echo "configure:4981: checking for iconv" >&5 |
5aac1dac | 4981 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
ee9dd372 TT |
4982 | echo $ac_n "(cached) $ac_c" 1>&6 |
4983 | else | |
5aac1dac TT |
4984 | |
4985 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
4986 | am_cv_lib_iconv=no | |
4987 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 4988 | #line 4989 "configure" |
ee9dd372 | 4989 | #include "confdefs.h" |
5aac1dac TT |
4990 | #include <stdlib.h> |
4991 | #include <iconv.h> | |
ee9dd372 | 4992 | int main() { |
5aac1dac TT |
4993 | iconv_t cd = iconv_open("",""); |
4994 | iconv(cd,NULL,NULL,NULL,NULL); | |
4995 | iconv_close(cd); | |
ee9dd372 TT |
4996 | ; return 0; } |
4997 | EOF | |
7160c99d | 4998 | if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 4999 | rm -rf conftest* |
5aac1dac | 5000 | am_cv_func_iconv=yes |
ee9dd372 TT |
5001 | else |
5002 | echo "configure: failed program was:" >&5 | |
5003 | cat conftest.$ac_ext >&5 | |
ee9dd372 TT |
5004 | fi |
5005 | rm -f conftest* | |
5aac1dac TT |
5006 | if test "$am_cv_func_iconv" != yes; then |
5007 | am_save_LIBS="$LIBS" | |
5008 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" | |
5009 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5010 | #line 5011 "configure" |
5aac1dac TT |
5011 | #include "confdefs.h" |
5012 | #include <stdlib.h> | |
5013 | #include <iconv.h> | |
5014 | int main() { | |
5015 | iconv_t cd = iconv_open("",""); | |
5016 | iconv(cd,NULL,NULL,NULL,NULL); | |
5017 | iconv_close(cd); | |
5018 | ; return 0; } | |
ee9dd372 | 5019 | EOF |
7160c99d | 5020 | if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
5021 | rm -rf conftest* |
5022 | am_cv_lib_iconv=yes | |
5023 | am_cv_func_iconv=yes | |
ee9dd372 | 5024 | else |
5aac1dac TT |
5025 | echo "configure: failed program was:" >&5 |
5026 | cat conftest.$ac_ext >&5 | |
5027 | fi | |
5028 | rm -f conftest* | |
5029 | LIBS="$am_save_LIBS" | |
5030 | fi | |
5031 | ||
4b7f154f | 5032 | fi |
4b7f154f | 5033 | |
5aac1dac TT |
5034 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
5035 | if test "$am_cv_func_iconv" = yes; then | |
5036 | cat >> confdefs.h <<\EOF | |
5037 | #define HAVE_ICONV 1 | |
5038 | EOF | |
7339705d | 5039 | |
5aac1dac | 5040 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
7160c99d | 5041 | echo "configure:5042: checking for iconv declaration" >&5 |
5aac1dac | 5042 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4b7f154f TT |
5043 | echo $ac_n "(cached) $ac_c" 1>&6 |
5044 | else | |
5aac1dac TT |
5045 | |
5046 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5047 | #line 5048 "configure" |
4b7f154f | 5048 | #include "confdefs.h" |
4b7f154f | 5049 | |
5aac1dac TT |
5050 | #include <stdlib.h> |
5051 | #include <iconv.h> | |
5052 | extern | |
5053 | #ifdef __cplusplus | |
5054 | "C" | |
5055 | #endif | |
5056 | #if defined(__STDC__) || defined(__cplusplus) | |
5057 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4b7f154f | 5058 | #else |
5aac1dac | 5059 | size_t iconv(); |
4b7f154f TT |
5060 | #endif |
5061 | ||
5aac1dac TT |
5062 | int main() { |
5063 | ||
4b7f154f TT |
5064 | ; return 0; } |
5065 | EOF | |
7160c99d | 5066 | if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4b7f154f | 5067 | rm -rf conftest* |
5aac1dac | 5068 | am_cv_proto_iconv_arg1="" |
4b7f154f TT |
5069 | else |
5070 | echo "configure: failed program was:" >&5 | |
5071 | cat conftest.$ac_ext >&5 | |
5072 | rm -rf conftest* | |
5aac1dac | 5073 | am_cv_proto_iconv_arg1="const" |
4b7f154f TT |
5074 | fi |
5075 | rm -f conftest* | |
5aac1dac | 5076 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" |
4b7f154f TT |
5077 | fi |
5078 | ||
5aac1dac TT |
5079 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
5080 | echo "$ac_t""${ac_t:- | |
5081 | }$am_cv_proto_iconv" 1>&6 | |
5082 | cat >> confdefs.h <<EOF | |
5083 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
4b7f154f | 5084 | EOF |
4b7f154f | 5085 | |
5aac1dac TT |
5086 | fi |
5087 | LIBICONV= | |
5088 | if test "$am_cv_lib_iconv" = yes; then | |
5089 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" | |
5090 | fi | |
5091 | ||
5092 | ||
5093 | if test $ac_cv_header_locale_h = yes; then | |
5094 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
7160c99d | 5095 | echo "configure:5096: checking for LC_MESSAGES" >&5 |
5aac1dac TT |
5096 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
5097 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5098 | else | |
5099 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5100 | #line 5101 "configure" |
5aac1dac TT |
5101 | #include "confdefs.h" |
5102 | #include <locale.h> | |
4b7f154f | 5103 | int main() { |
5aac1dac | 5104 | return LC_MESSAGES |
4b7f154f TT |
5105 | ; return 0; } |
5106 | EOF | |
7160c99d | 5107 | if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4b7f154f | 5108 | rm -rf conftest* |
5aac1dac | 5109 | am_cv_val_LC_MESSAGES=yes |
4b7f154f TT |
5110 | else |
5111 | echo "configure: failed program was:" >&5 | |
5112 | cat conftest.$ac_ext >&5 | |
5113 | rm -rf conftest* | |
5aac1dac | 5114 | am_cv_val_LC_MESSAGES=no |
4b7f154f TT |
5115 | fi |
5116 | rm -f conftest* | |
4b7f154f | 5117 | fi |
4b7f154f | 5118 | |
5aac1dac TT |
5119 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 |
5120 | if test $am_cv_val_LC_MESSAGES = yes; then | |
5121 | cat >> confdefs.h <<\EOF | |
5122 | #define HAVE_LC_MESSAGES 1 | |
5123 | EOF | |
7339705d | 5124 | |
5aac1dac TT |
5125 | fi |
5126 | fi | |
5127 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 | |
7160c99d | 5128 | echo "configure:5129: checking whether struct tm is in sys/time.h or time.h" >&5 |
5aac1dac | 5129 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
7339705d TT |
5130 | echo $ac_n "(cached) $ac_c" 1>&6 |
5131 | else | |
5aac1dac | 5132 | cat > conftest.$ac_ext <<EOF |
7160c99d | 5133 | #line 5134 "configure" |
7339705d | 5134 | #include "confdefs.h" |
5aac1dac TT |
5135 | #include <sys/types.h> |
5136 | #include <time.h> | |
7339705d | 5137 | int main() { |
5aac1dac | 5138 | struct tm *tp; tp->tm_sec; |
7339705d TT |
5139 | ; return 0; } |
5140 | EOF | |
7160c99d | 5141 | if { (eval echo configure:5142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7339705d | 5142 | rm -rf conftest* |
5aac1dac | 5143 | ac_cv_struct_tm=time.h |
7339705d TT |
5144 | else |
5145 | echo "configure: failed program was:" >&5 | |
5146 | cat conftest.$ac_ext >&5 | |
5147 | rm -rf conftest* | |
5aac1dac | 5148 | ac_cv_struct_tm=sys/time.h |
7339705d TT |
5149 | fi |
5150 | rm -f conftest* | |
7339705d TT |
5151 | fi |
5152 | ||
5aac1dac TT |
5153 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
5154 | if test $ac_cv_struct_tm = sys/time.h; then | |
5155 | cat >> confdefs.h <<\EOF | |
5156 | #define TM_IN_SYS_TIME 1 | |
5157 | EOF | |
4b7f154f | 5158 | |
ee9dd372 | 5159 | fi |
ee9dd372 | 5160 | |
5aac1dac | 5161 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
7160c99d | 5162 | echo "configure:5163: checking for tm_zone in struct tm" >&5 |
5aac1dac TT |
5163 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
5164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5165 | else | |
5166 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5167 | #line 5168 "configure" |
bc5afba4 | 5168 | #include "confdefs.h" |
5aac1dac TT |
5169 | #include <sys/types.h> |
5170 | #include <$ac_cv_struct_tm> | |
bc5afba4 | 5171 | int main() { |
5aac1dac | 5172 | struct tm tm; tm.tm_zone; |
bc5afba4 TT |
5173 | ; return 0; } |
5174 | EOF | |
7160c99d | 5175 | if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bc5afba4 | 5176 | rm -rf conftest* |
5aac1dac | 5177 | ac_cv_struct_tm_zone=yes |
bc5afba4 TT |
5178 | else |
5179 | echo "configure: failed program was:" >&5 | |
5180 | cat conftest.$ac_ext >&5 | |
5181 | rm -rf conftest* | |
5aac1dac TT |
5182 | ac_cv_struct_tm_zone=no |
5183 | fi | |
5184 | rm -f conftest* | |
5185 | fi | |
5186 | ||
5187 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 | |
5188 | if test "$ac_cv_struct_tm_zone" = yes; then | |
5189 | cat >> confdefs.h <<\EOF | |
5190 | #define HAVE_TM_ZONE 1 | |
5191 | EOF | |
5192 | ||
5193 | else | |
5194 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 | |
7160c99d | 5195 | echo "configure:5196: checking for tzname" >&5 |
5aac1dac TT |
5196 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
5197 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5198 | else | |
5199 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5200 | #line 5201 "configure" |
bc5afba4 | 5201 | #include "confdefs.h" |
5aac1dac TT |
5202 | #include <time.h> |
5203 | #ifndef tzname /* For SGI. */ | |
5204 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ | |
5205 | #endif | |
bc5afba4 | 5206 | int main() { |
5aac1dac | 5207 | atoi(*tzname); |
bc5afba4 TT |
5208 | ; return 0; } |
5209 | EOF | |
7160c99d | 5210 | if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
bc5afba4 | 5211 | rm -rf conftest* |
5aac1dac | 5212 | ac_cv_var_tzname=yes |
bc5afba4 TT |
5213 | else |
5214 | echo "configure: failed program was:" >&5 | |
5215 | cat conftest.$ac_ext >&5 | |
5aac1dac TT |
5216 | rm -rf conftest* |
5217 | ac_cv_var_tzname=no | |
bc5afba4 TT |
5218 | fi |
5219 | rm -f conftest* | |
5220 | fi | |
ee9dd372 | 5221 | |
5aac1dac TT |
5222 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
5223 | if test $ac_cv_var_tzname = yes; then | |
5224 | cat >> confdefs.h <<\EOF | |
5225 | #define HAVE_TZNAME 1 | |
5226 | EOF | |
5227 | ||
5228 | fi | |
5229 | fi | |
5230 | ||
5231 | ||
5232 | for ac_func in gethostbyname_r | |
ee9dd372 TT |
5233 | do |
5234 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5235 | echo "configure:5236: checking for $ac_func" >&5 |
ee9dd372 TT |
5236 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5237 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5238 | else | |
5239 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5240 | #line 5241 "configure" |
ee9dd372 TT |
5241 | #include "confdefs.h" |
5242 | /* System header to define __stub macros and hopefully few prototypes, | |
5243 | which can conflict with char $ac_func(); below. */ | |
5244 | #include <assert.h> | |
5245 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5246 | /* We use char because int might match the return type of a gcc2 | |
5247 | builtin and then its argument prototype would still apply. */ | |
5248 | char $ac_func(); | |
5249 | ||
5250 | int main() { | |
5251 | ||
5252 | /* The GNU C library defines this for functions which it implements | |
5253 | to always fail with ENOSYS. Some functions are actually named | |
5254 | something starting with __ and the normal name is an alias. */ | |
5255 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5256 | choke me | |
5257 | #else | |
5258 | $ac_func(); | |
5259 | #endif | |
5260 | ||
5261 | ; return 0; } | |
5262 | EOF | |
7160c99d | 5263 | if { (eval echo configure:5264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 TT |
5264 | rm -rf conftest* |
5265 | eval "ac_cv_func_$ac_func=yes" | |
5266 | else | |
5267 | echo "configure: failed program was:" >&5 | |
5268 | cat conftest.$ac_ext >&5 | |
5269 | rm -rf conftest* | |
5270 | eval "ac_cv_func_$ac_func=no" | |
5271 | fi | |
5272 | rm -f conftest* | |
5273 | fi | |
5274 | ||
5275 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5276 | echo "$ac_t""yes" 1>&6 | |
5277 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5278 | cat >> confdefs.h <<EOF | |
5279 | #define $ac_tr_func 1 | |
5280 | EOF | |
5aac1dac TT |
5281 | |
5282 | cat >> confdefs.h <<\EOF | |
5283 | #define HAVE_GETHOSTBYNAME_R 1 | |
5284 | EOF | |
5285 | ||
5286 | # There are two different kinds of gethostbyname_r. | |
5287 | # We look for the one that returns `int'. | |
5288 | # Hopefully this check is robust enough. | |
5289 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5290 | #line 5291 "configure" |
5aac1dac TT |
5291 | #include "confdefs.h" |
5292 | #include <netdb.h> | |
5293 | EOF | |
5294 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5295 | egrep "int.*gethostbyname_r" >/dev/null 2>&1; then | |
5296 | rm -rf conftest* | |
5297 | ||
5298 | cat >> confdefs.h <<\EOF | |
5299 | #define GETHOSTBYNAME_R_RETURNS_INT 1 | |
5300 | EOF | |
5301 | ||
ee9dd372 | 5302 | fi |
5aac1dac | 5303 | rm -f conftest* |
ee9dd372 | 5304 | |
ee9dd372 | 5305 | |
5aac1dac TT |
5306 | case " $GCINCS " in |
5307 | *" -D_REENTRANT "*) ;; | |
5308 | *) | |
5309 | echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6 | |
7160c99d | 5310 | echo "configure:5311: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5 |
5aac1dac | 5311 | if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then |
ee9dd372 TT |
5312 | echo $ac_n "(cached) $ac_c" 1>&6 |
5313 | else | |
5aac1dac TT |
5314 | |
5315 | ac_ext=C | |
5316 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
5317 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5318 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
5319 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
5320 | cross_compiling=$ac_cv_prog_cxx_cross | |
5321 | ||
5322 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5323 | #line 5324 "configure" |
ee9dd372 | 5324 | #include "confdefs.h" |
5aac1dac TT |
5325 | #include <netdb.h> |
5326 | int main() { | |
5327 | gethostbyname_r("", 0, 0); | |
5328 | ; return 0; } | |
5329 | EOF | |
7160c99d | 5330 | if { (eval echo configure:5331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5aac1dac TT |
5331 | rm -rf conftest* |
5332 | libjava_cv_gethostbyname_r_needs_reentrant=no | |
5333 | else | |
5334 | echo "configure: failed program was:" >&5 | |
5335 | cat conftest.$ac_ext >&5 | |
5336 | rm -rf conftest* | |
5337 | CPPFLAGS_SAVE="$CPPFLAGS" | |
5338 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | |
5339 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5340 | #line 5341 "configure" |
5aac1dac TT |
5341 | #include "confdefs.h" |
5342 | #include <netdb.h> | |
5343 | int main() { | |
5344 | gethostbyname_r("", 0, 0); | |
5345 | ; return 0; } | |
5346 | EOF | |
7160c99d | 5347 | if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5aac1dac TT |
5348 | rm -rf conftest* |
5349 | libjava_cv_gethostbyname_r_needs_reentrant=yes | |
5350 | else | |
5351 | echo "configure: failed program was:" >&5 | |
5352 | cat conftest.$ac_ext >&5 | |
5353 | rm -rf conftest* | |
5354 | libjava_cv_gethostbyname_r_needs_reentrant=fail | |
5355 | fi | |
5356 | rm -f conftest* | |
5357 | CPPFLAGS="$CPPFLAGS_SAVE" | |
5358 | ||
5359 | fi | |
5360 | rm -f conftest* | |
5361 | ac_ext=c | |
5362 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
5363 | ac_cpp='$CPP $CPPFLAGS' | |
5364 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
5365 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
5366 | cross_compiling=$ac_cv_prog_cc_cross | |
5367 | ||
5368 | ||
5369 | fi | |
5370 | ||
5371 | echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6 | |
5372 | if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then | |
5373 | cat >> confdefs.h <<\EOF | |
5374 | #define _REENTRANT 1 | |
5375 | EOF | |
5376 | ||
5377 | fi | |
5378 | ;; | |
5379 | esac | |
ee9dd372 | 5380 | |
5aac1dac | 5381 | echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6 |
7160c99d | 5382 | echo "configure:5383: checking for struct hostent_data" >&5 |
5aac1dac TT |
5383 | if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then |
5384 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5385 | else | |
5386 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5387 | #line 5388 "configure" |
5aac1dac | 5388 | #include "confdefs.h" |
ee9dd372 | 5389 | |
5aac1dac TT |
5390 | #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT) |
5391 | # define _REENTRANT 1 | |
ee9dd372 | 5392 | #endif |
5aac1dac TT |
5393 | #include <netdb.h> |
5394 | int main() { | |
5395 | struct hostent_data data; | |
ee9dd372 TT |
5396 | ; return 0; } |
5397 | EOF | |
7160c99d | 5398 | if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ee9dd372 | 5399 | rm -rf conftest* |
5aac1dac | 5400 | libjava_cv_struct_hostent_data=yes |
ee9dd372 TT |
5401 | else |
5402 | echo "configure: failed program was:" >&5 | |
5403 | cat conftest.$ac_ext >&5 | |
5404 | rm -rf conftest* | |
5aac1dac | 5405 | libjava_cv_struct_hostent_data=no |
ee9dd372 TT |
5406 | fi |
5407 | rm -f conftest* | |
5408 | fi | |
5409 | ||
5aac1dac TT |
5410 | echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6 |
5411 | if test "x$libjava_cv_struct_hostent_data" = xyes; then | |
5412 | cat >> confdefs.h <<\EOF | |
5413 | #define HAVE_STRUCT_HOSTENT_DATA 1 | |
ee9dd372 | 5414 | EOF |
5aac1dac TT |
5415 | |
5416 | fi | |
5417 | ||
ee9dd372 TT |
5418 | else |
5419 | echo "$ac_t""no" 1>&6 | |
5420 | fi | |
5421 | done | |
5422 | ||
ee9dd372 | 5423 | |
5aac1dac TT |
5424 | # FIXME: libjava source code expects to find a prototype for |
5425 | # gethostbyaddr_r in netdb.h. The outer check ensures that | |
5426 | # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails | |
5427 | # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C | |
5428 | # linkage check is enough, yet C++ code requires proper prototypes.) | |
5429 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5430 | #line 5431 "configure" |
5aac1dac TT |
5431 | #include "confdefs.h" |
5432 | #include <netdb.h> | |
5433 | EOF | |
5434 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5435 | egrep "gethostbyaddr_r" >/dev/null 2>&1; then | |
5436 | rm -rf conftest* | |
5437 | ||
5438 | for ac_func in gethostbyaddr_r | |
ee9dd372 TT |
5439 | do |
5440 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5441 | echo "configure:5442: checking for $ac_func" >&5 |
ee9dd372 TT |
5442 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5443 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5444 | else | |
5445 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5446 | #line 5447 "configure" |
ee9dd372 TT |
5447 | #include "confdefs.h" |
5448 | /* System header to define __stub macros and hopefully few prototypes, | |
5449 | which can conflict with char $ac_func(); below. */ | |
5450 | #include <assert.h> | |
5451 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5452 | /* We use char because int might match the return type of a gcc2 | |
5453 | builtin and then its argument prototype would still apply. */ | |
5454 | char $ac_func(); | |
5455 | ||
5456 | int main() { | |
5457 | ||
5458 | /* The GNU C library defines this for functions which it implements | |
5459 | to always fail with ENOSYS. Some functions are actually named | |
5460 | something starting with __ and the normal name is an alias. */ | |
5461 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5462 | choke me | |
5463 | #else | |
5464 | $ac_func(); | |
5465 | #endif | |
5466 | ||
5467 | ; return 0; } | |
5468 | EOF | |
7160c99d | 5469 | if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 TT |
5470 | rm -rf conftest* |
5471 | eval "ac_cv_func_$ac_func=yes" | |
5472 | else | |
5473 | echo "configure: failed program was:" >&5 | |
5474 | cat conftest.$ac_ext >&5 | |
5475 | rm -rf conftest* | |
5476 | eval "ac_cv_func_$ac_func=no" | |
5477 | fi | |
5478 | rm -f conftest* | |
5479 | fi | |
5480 | ||
5481 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5482 | echo "$ac_t""yes" 1>&6 | |
5483 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5484 | cat >> confdefs.h <<EOF | |
5485 | #define $ac_tr_func 1 | |
5486 | EOF | |
5aac1dac TT |
5487 | |
5488 | cat >> confdefs.h <<\EOF | |
5489 | #define HAVE_GETHOSTBYADDR_R 1 | |
5490 | EOF | |
ee9dd372 | 5491 | |
5aac1dac TT |
5492 | # There are two different kinds of gethostbyaddr_r. |
5493 | # We look for the one that returns `int'. | |
5494 | # Hopefully this check is robust enough. | |
5495 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5496 | #line 5497 "configure" |
8107bcf9 | 5497 | #include "confdefs.h" |
5aac1dac | 5498 | #include <netdb.h> |
8107bcf9 | 5499 | EOF |
5aac1dac TT |
5500 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5501 | egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then | |
8107bcf9 | 5502 | rm -rf conftest* |
04942eac TT |
5503 | |
5504 | cat >> confdefs.h <<\EOF | |
5aac1dac | 5505 | #define GETHOSTBYADDR_R_RETURNS_INT 1 |
8107bcf9 PB |
5506 | EOF |
5507 | ||
5aac1dac TT |
5508 | fi |
5509 | rm -f conftest* | |
5510 | ||
8107bcf9 PB |
5511 | else |
5512 | echo "$ac_t""no" 1>&6 | |
5513 | fi | |
5aac1dac | 5514 | done |
8107bcf9 | 5515 | |
5aac1dac TT |
5516 | fi |
5517 | rm -f conftest* | |
8107bcf9 | 5518 | |
f994389b | 5519 | |
5aac1dac TT |
5520 | for ac_func in gethostname |
5521 | do | |
5522 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5523 | echo "configure:5524: checking for $ac_func" >&5 |
5aac1dac | 5524 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
f994389b TT |
5525 | echo $ac_n "(cached) $ac_c" 1>&6 |
5526 | else | |
5527 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5528 | #line 5529 "configure" |
f994389b TT |
5529 | #include "confdefs.h" |
5530 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 5531 | which can conflict with char $ac_func(); below. */ |
f994389b TT |
5532 | #include <assert.h> |
5533 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5534 | /* We use char because int might match the return type of a gcc2 | |
5535 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 5536 | char $ac_func(); |
f994389b TT |
5537 | |
5538 | int main() { | |
5539 | ||
5540 | /* The GNU C library defines this for functions which it implements | |
5541 | to always fail with ENOSYS. Some functions are actually named | |
5542 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 5543 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
f994389b TT |
5544 | choke me |
5545 | #else | |
5aac1dac | 5546 | $ac_func(); |
f994389b TT |
5547 | #endif |
5548 | ||
5549 | ; return 0; } | |
5550 | EOF | |
7160c99d | 5551 | if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f994389b | 5552 | rm -rf conftest* |
5aac1dac | 5553 | eval "ac_cv_func_$ac_func=yes" |
f994389b TT |
5554 | else |
5555 | echo "configure: failed program was:" >&5 | |
5556 | cat conftest.$ac_ext >&5 | |
5557 | rm -rf conftest* | |
5aac1dac | 5558 | eval "ac_cv_func_$ac_func=no" |
f994389b TT |
5559 | fi |
5560 | rm -f conftest* | |
5561 | fi | |
5562 | ||
5aac1dac | 5563 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
f994389b | 5564 | echo "$ac_t""yes" 1>&6 |
5aac1dac TT |
5565 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5566 | cat >> confdefs.h <<EOF | |
5567 | #define $ac_tr_func 1 | |
5568 | EOF | |
5569 | ||
5570 | cat >> confdefs.h <<\EOF | |
5571 | #define HAVE_GETHOSTNAME 1 | |
5572 | EOF | |
f994389b | 5573 | |
5aac1dac | 5574 | cat > conftest.$ac_ext <<EOF |
7160c99d | 5575 | #line 5576 "configure" |
f994389b | 5576 | #include "confdefs.h" |
5aac1dac | 5577 | #include <unistd.h> |
f994389b | 5578 | EOF |
5aac1dac TT |
5579 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5580 | egrep "gethostname" >/dev/null 2>&1; then | |
f994389b | 5581 | rm -rf conftest* |
5aac1dac TT |
5582 | |
5583 | cat >> confdefs.h <<\EOF | |
5584 | #define HAVE_GETHOSTNAME_DECL 1 | |
5585 | EOF | |
5586 | ||
f994389b TT |
5587 | fi |
5588 | rm -f conftest* | |
f994389b | 5589 | |
6b3517ea RO |
5590 | else |
5591 | echo "$ac_t""no" 1>&6 | |
5592 | fi | |
5593 | done | |
5594 | ||
5595 | ||
5596 | for ac_func in usleep | |
5597 | do | |
5598 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5599 | echo "configure:5600: checking for $ac_func" >&5 |
6b3517ea RO |
5600 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5601 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5602 | else | |
5603 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5604 | #line 5605 "configure" |
6b3517ea RO |
5605 | #include "confdefs.h" |
5606 | /* System header to define __stub macros and hopefully few prototypes, | |
5607 | which can conflict with char $ac_func(); below. */ | |
5608 | #include <assert.h> | |
5609 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5610 | /* We use char because int might match the return type of a gcc2 | |
5611 | builtin and then its argument prototype would still apply. */ | |
5612 | char $ac_func(); | |
5613 | ||
5614 | int main() { | |
5615 | ||
5616 | /* The GNU C library defines this for functions which it implements | |
5617 | to always fail with ENOSYS. Some functions are actually named | |
5618 | something starting with __ and the normal name is an alias. */ | |
5619 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5620 | choke me | |
5621 | #else | |
5622 | $ac_func(); | |
5623 | #endif | |
5624 | ||
5625 | ; return 0; } | |
5626 | EOF | |
7160c99d | 5627 | if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6b3517ea RO |
5628 | rm -rf conftest* |
5629 | eval "ac_cv_func_$ac_func=yes" | |
5630 | else | |
5631 | echo "configure: failed program was:" >&5 | |
5632 | cat conftest.$ac_ext >&5 | |
5633 | rm -rf conftest* | |
5634 | eval "ac_cv_func_$ac_func=no" | |
5635 | fi | |
5636 | rm -f conftest* | |
5637 | fi | |
5638 | ||
5639 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5640 | echo "$ac_t""yes" 1>&6 | |
5641 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5642 | cat >> confdefs.h <<EOF | |
5643 | #define $ac_tr_func 1 | |
5644 | EOF | |
5645 | ||
5646 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5647 | #line 5648 "configure" |
6b3517ea RO |
5648 | #include "confdefs.h" |
5649 | #include <unistd.h> | |
5650 | EOF | |
5651 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5652 | egrep "usleep" >/dev/null 2>&1; then | |
5653 | rm -rf conftest* | |
5654 | ||
5655 | cat >> confdefs.h <<\EOF | |
5656 | #define HAVE_USLEEP_DECL 1 | |
5657 | EOF | |
5658 | ||
5659 | fi | |
5660 | rm -f conftest* | |
5661 | ||
f994389b TT |
5662 | else |
5663 | echo "$ac_t""no" 1>&6 | |
f994389b | 5664 | fi |
5aac1dac | 5665 | done |
f994389b | 5666 | |
5aac1dac TT |
5667 | |
5668 | # Look for these functions in the thread library, but only bother | |
5669 | # if using POSIX threads. | |
5670 | if test "$THREADS" = posix; then | |
5671 | save_LIBS="$LIBS" | |
5672 | LIBS="$LIBS $THREADLIBS" | |
5673 | # Some POSIX thread systems don't have pthread_mutexattr_settype. | |
5674 | # E.g., Solaris. | |
5675 | for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np | |
5676 | do | |
5677 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5678 | echo "configure:5679: checking for $ac_func" >&5 |
5aac1dac | 5679 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
f994389b TT |
5680 | echo $ac_n "(cached) $ac_c" 1>&6 |
5681 | else | |
5682 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5683 | #line 5684 "configure" |
f994389b TT |
5684 | #include "confdefs.h" |
5685 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 5686 | which can conflict with char $ac_func(); below. */ |
f994389b TT |
5687 | #include <assert.h> |
5688 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5689 | /* We use char because int might match the return type of a gcc2 | |
5690 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 5691 | char $ac_func(); |
f994389b TT |
5692 | |
5693 | int main() { | |
5694 | ||
5695 | /* The GNU C library defines this for functions which it implements | |
5696 | to always fail with ENOSYS. Some functions are actually named | |
5697 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 5698 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
f994389b TT |
5699 | choke me |
5700 | #else | |
5aac1dac | 5701 | $ac_func(); |
f994389b TT |
5702 | #endif |
5703 | ||
5704 | ; return 0; } | |
5705 | EOF | |
7160c99d | 5706 | if { (eval echo configure:5707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f994389b | 5707 | rm -rf conftest* |
5aac1dac | 5708 | eval "ac_cv_func_$ac_func=yes" |
f994389b TT |
5709 | else |
5710 | echo "configure: failed program was:" >&5 | |
5711 | cat conftest.$ac_ext >&5 | |
5712 | rm -rf conftest* | |
5aac1dac | 5713 | eval "ac_cv_func_$ac_func=no" |
f994389b TT |
5714 | fi |
5715 | rm -f conftest* | |
5716 | fi | |
5717 | ||
5aac1dac | 5718 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
f994389b | 5719 | echo "$ac_t""yes" 1>&6 |
5aac1dac TT |
5720 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5721 | cat >> confdefs.h <<EOF | |
5722 | #define $ac_tr_func 1 | |
5723 | EOF | |
5724 | ||
f994389b | 5725 | else |
5aac1dac TT |
5726 | echo "$ac_t""no" 1>&6 |
5727 | fi | |
5728 | done | |
5729 | ||
5730 | ||
5731 | # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since | |
5732 | # Solaris 7 the name librt is preferred. | |
5733 | for ac_func in sched_yield | |
5734 | do | |
5735 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5736 | echo "configure:5737: checking for $ac_func" >&5 |
5aac1dac | 5737 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
f994389b TT |
5738 | echo $ac_n "(cached) $ac_c" 1>&6 |
5739 | else | |
5740 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5741 | #line 5742 "configure" |
f994389b TT |
5742 | #include "confdefs.h" |
5743 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 5744 | which can conflict with char $ac_func(); below. */ |
f994389b TT |
5745 | #include <assert.h> |
5746 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5747 | /* We use char because int might match the return type of a gcc2 | |
5748 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 5749 | char $ac_func(); |
f994389b TT |
5750 | |
5751 | int main() { | |
5752 | ||
5753 | /* The GNU C library defines this for functions which it implements | |
5754 | to always fail with ENOSYS. Some functions are actually named | |
5755 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 5756 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
f994389b TT |
5757 | choke me |
5758 | #else | |
5aac1dac | 5759 | $ac_func(); |
f994389b TT |
5760 | #endif |
5761 | ||
5762 | ; return 0; } | |
5763 | EOF | |
7160c99d | 5764 | if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f994389b | 5765 | rm -rf conftest* |
5aac1dac | 5766 | eval "ac_cv_func_$ac_func=yes" |
f994389b TT |
5767 | else |
5768 | echo "configure: failed program was:" >&5 | |
5769 | cat conftest.$ac_ext >&5 | |
5770 | rm -rf conftest* | |
5aac1dac | 5771 | eval "ac_cv_func_$ac_func=no" |
f994389b TT |
5772 | fi |
5773 | rm -f conftest* | |
5774 | fi | |
5775 | ||
5aac1dac | 5776 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
f994389b | 5777 | echo "$ac_t""yes" 1>&6 |
5aac1dac TT |
5778 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5779 | cat >> confdefs.h <<EOF | |
5780 | #define $ac_tr_func 1 | |
f994389b | 5781 | EOF |
5aac1dac | 5782 | |
f994389b TT |
5783 | else |
5784 | echo "$ac_t""no" 1>&6 | |
5aac1dac | 5785 | echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 |
7160c99d | 5786 | echo "configure:5787: checking for sched_yield in -lrt" >&5 |
5aac1dac | 5787 | ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'` |
f994389b TT |
5788 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
5789 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5790 | else | |
5791 | ac_save_LIBS="$LIBS" | |
5aac1dac | 5792 | LIBS="-lrt $LIBS" |
f994389b | 5793 | cat > conftest.$ac_ext <<EOF |
7160c99d | 5794 | #line 5795 "configure" |
f994389b TT |
5795 | #include "confdefs.h" |
5796 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5797 | /* We use char because int might match the return type of a gcc2 | |
5798 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 5799 | char sched_yield(); |
f994389b TT |
5800 | |
5801 | int main() { | |
5aac1dac | 5802 | sched_yield() |
f994389b TT |
5803 | ; return 0; } |
5804 | EOF | |
7160c99d | 5805 | if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f994389b TT |
5806 | rm -rf conftest* |
5807 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5808 | else | |
5809 | echo "configure: failed program was:" >&5 | |
5810 | cat conftest.$ac_ext >&5 | |
5811 | rm -rf conftest* | |
5812 | eval "ac_cv_lib_$ac_lib_var=no" | |
5813 | fi | |
5814 | rm -f conftest* | |
5815 | LIBS="$ac_save_LIBS" | |
5816 | ||
5817 | fi | |
5818 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5819 | echo "$ac_t""yes" 1>&6 | |
5aac1dac TT |
5820 | |
5821 | cat >> confdefs.h <<\EOF | |
5822 | #define HAVE_SCHED_YIELD 1 | |
5823 | EOF | |
5824 | ||
5825 | THREADLIBS="$THREADLIBS -lrt" | |
5826 | THREADSPEC="$THREADSPEC -lrt" | |
f994389b TT |
5827 | else |
5828 | echo "$ac_t""no" 1>&6 | |
f994389b | 5829 | |
5aac1dac | 5830 | echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 |
7160c99d | 5831 | echo "configure:5832: checking for sched_yield in -lposix4" >&5 |
5aac1dac | 5832 | ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` |
4b7f154f TT |
5833 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
5834 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5835 | else | |
5836 | ac_save_LIBS="$LIBS" | |
5aac1dac | 5837 | LIBS="-lposix4 $LIBS" |
4b7f154f | 5838 | cat > conftest.$ac_ext <<EOF |
7160c99d | 5839 | #line 5840 "configure" |
4b7f154f | 5840 | #include "confdefs.h" |
5aac1dac TT |
5841 | /* Override any gcc2 internal prototype to avoid an error. */ |
5842 | /* We use char because int might match the return type of a gcc2 | |
5843 | builtin and then its argument prototype would still apply. */ | |
5844 | char sched_yield(); | |
4b7f154f TT |
5845 | |
5846 | int main() { | |
5aac1dac | 5847 | sched_yield() |
4b7f154f TT |
5848 | ; return 0; } |
5849 | EOF | |
7160c99d | 5850 | if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4b7f154f TT |
5851 | rm -rf conftest* |
5852 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5853 | else | |
5854 | echo "configure: failed program was:" >&5 | |
5855 | cat conftest.$ac_ext >&5 | |
5856 | rm -rf conftest* | |
5857 | eval "ac_cv_lib_$ac_lib_var=no" | |
5858 | fi | |
5859 | rm -f conftest* | |
5860 | LIBS="$ac_save_LIBS" | |
5861 | ||
5862 | fi | |
5863 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5864 | echo "$ac_t""yes" 1>&6 | |
5aac1dac TT |
5865 | |
5866 | cat >> confdefs.h <<\EOF | |
5867 | #define HAVE_SCHED_YIELD 1 | |
5868 | EOF | |
5ec89e89 | 5869 | |
5aac1dac TT |
5870 | THREADLIBS="$THREADLIBS -lposix4" |
5871 | THREADSPEC="$THREADSPEC -lposix4" | |
58d2986d AO |
5872 | else |
5873 | echo "$ac_t""no" 1>&6 | |
5874 | fi | |
5875 | ||
58d2986d AO |
5876 | fi |
5877 | ||
58d2986d | 5878 | fi |
5aac1dac | 5879 | done |
58d2986d | 5880 | |
5aac1dac | 5881 | LIBS="$save_LIBS" |
58d2986d | 5882 | |
5aac1dac TT |
5883 | # We can save a little space at runtime if the mutex has m_count |
5884 | # or __m_count. This is a nice hack for Linux. | |
5885 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5886 | #line 5887 "configure" |
5aac1dac TT |
5887 | #include "confdefs.h" |
5888 | #include <pthread.h> | |
5889 | int main() { | |
58d2986d | 5890 | |
5aac1dac TT |
5891 | extern pthread_mutex_t *mutex; int q = mutex->m_count; |
5892 | ||
5893 | ; return 0; } | |
5894 | EOF | |
7160c99d | 5895 | if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5aac1dac TT |
5896 | rm -rf conftest* |
5897 | cat >> confdefs.h <<\EOF | |
5898 | #define PTHREAD_MUTEX_HAVE_M_COUNT 1 | |
5899 | EOF | |
58d2986d | 5900 | |
5aac1dac TT |
5901 | else |
5902 | echo "configure: failed program was:" >&5 | |
5903 | cat conftest.$ac_ext >&5 | |
5904 | rm -rf conftest* | |
5905 | ||
5906 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 5907 | #line 5908 "configure" |
5aac1dac TT |
5908 | #include "confdefs.h" |
5909 | #include <pthread.h> | |
5910 | int main() { | |
58d2986d | 5911 | |
5aac1dac TT |
5912 | extern pthread_mutex_t *mutex; int q = mutex->__m_count; |
5913 | ||
5914 | ; return 0; } | |
5915 | EOF | |
7160c99d | 5916 | if { (eval echo configure:5917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5aac1dac TT |
5917 | rm -rf conftest* |
5918 | cat >> confdefs.h <<\EOF | |
5919 | #define PTHREAD_MUTEX_HAVE___M_COUNT 1 | |
5920 | EOF | |
58d2986d | 5921 | |
5aac1dac TT |
5922 | else |
5923 | echo "configure: failed program was:" >&5 | |
5924 | cat conftest.$ac_ext >&5 | |
5925 | fi | |
5926 | rm -f conftest* | |
5927 | fi | |
5928 | rm -f conftest* | |
5929 | fi | |
5ec89e89 | 5930 | |
5aac1dac TT |
5931 | # We require a way to get the time. |
5932 | time_found=no | |
5933 | for ac_func in gettimeofday time ftime | |
5934 | do | |
5935 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5936 | echo "configure:5937: checking for $ac_func" >&5 |
5aac1dac | 5937 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
54c2f04b AG |
5938 | echo $ac_n "(cached) $ac_c" 1>&6 |
5939 | else | |
54c2f04b | 5940 | cat > conftest.$ac_ext <<EOF |
7160c99d | 5941 | #line 5942 "configure" |
b5ee195f | 5942 | #include "confdefs.h" |
5aac1dac TT |
5943 | /* System header to define __stub macros and hopefully few prototypes, |
5944 | which can conflict with char $ac_func(); below. */ | |
5945 | #include <assert.h> | |
5946 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5947 | /* We use char because int might match the return type of a gcc2 | |
5948 | builtin and then its argument prototype would still apply. */ | |
5949 | char $ac_func(); | |
b5ee195f AG |
5950 | |
5951 | int main() { | |
5aac1dac TT |
5952 | |
5953 | /* The GNU C library defines this for functions which it implements | |
5954 | to always fail with ENOSYS. Some functions are actually named | |
5955 | something starting with __ and the normal name is an alias. */ | |
5956 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5957 | choke me | |
5958 | #else | |
5959 | $ac_func(); | |
5960 | #endif | |
5961 | ||
b5ee195f | 5962 | ; return 0; } |
54c2f04b | 5963 | EOF |
7160c99d | 5964 | if { (eval echo configure:5965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b5ee195f | 5965 | rm -rf conftest* |
5aac1dac | 5966 | eval "ac_cv_func_$ac_func=yes" |
54c2f04b AG |
5967 | else |
5968 | echo "configure: failed program was:" >&5 | |
5969 | cat conftest.$ac_ext >&5 | |
5aac1dac TT |
5970 | rm -rf conftest* |
5971 | eval "ac_cv_func_$ac_func=no" | |
54c2f04b | 5972 | fi |
b5ee195f | 5973 | rm -f conftest* |
54c2f04b AG |
5974 | fi |
5975 | ||
5aac1dac TT |
5976 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
5977 | echo "$ac_t""yes" 1>&6 | |
5978 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5979 | cat >> confdefs.h <<EOF | |
5980 | #define $ac_tr_func 1 | |
54c2f04b | 5981 | EOF |
5aac1dac | 5982 | time_found=yes |
f994389b | 5983 | else |
5aac1dac | 5984 | echo "$ac_t""no" 1>&6 |
f994389b | 5985 | fi |
5aac1dac | 5986 | done |
f994389b | 5987 | |
5aac1dac TT |
5988 | if test "$time_found" = no; then |
5989 | { echo "configure: error: no function found to get the time" 1>&2; exit 1; } | |
5990 | fi | |
f994389b | 5991 | |
5aac1dac TT |
5992 | for ac_func in memmove |
5993 | do | |
5994 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 5995 | echo "configure:5996: checking for $ac_func" >&5 |
5aac1dac TT |
5996 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5997 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5998 | else | |
5999 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6000 | #line 6001 "configure" |
5aac1dac TT |
6001 | #include "confdefs.h" |
6002 | /* System header to define __stub macros and hopefully few prototypes, | |
6003 | which can conflict with char $ac_func(); below. */ | |
6004 | #include <assert.h> | |
6005 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6006 | /* We use char because int might match the return type of a gcc2 | |
6007 | builtin and then its argument prototype would still apply. */ | |
6008 | char $ac_func(); | |
f994389b | 6009 | |
5aac1dac | 6010 | int main() { |
ee9dd372 | 6011 | |
5aac1dac TT |
6012 | /* The GNU C library defines this for functions which it implements |
6013 | to always fail with ENOSYS. Some functions are actually named | |
6014 | something starting with __ and the normal name is an alias. */ | |
6015 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6016 | choke me | |
6017 | #else | |
6018 | $ac_func(); | |
6019 | #endif | |
ee9dd372 | 6020 | |
5aac1dac TT |
6021 | ; return 0; } |
6022 | EOF | |
7160c99d | 6023 | if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
6024 | rm -rf conftest* |
6025 | eval "ac_cv_func_$ac_func=yes" | |
ee9dd372 | 6026 | else |
5aac1dac TT |
6027 | echo "configure: failed program was:" >&5 |
6028 | cat conftest.$ac_ext >&5 | |
6029 | rm -rf conftest* | |
6030 | eval "ac_cv_func_$ac_func=no" | |
6031 | fi | |
6032 | rm -f conftest* | |
ee9dd372 TT |
6033 | fi |
6034 | ||
5aac1dac TT |
6035 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6036 | echo "$ac_t""yes" 1>&6 | |
6037 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6038 | cat >> confdefs.h <<EOF | |
6039 | #define $ac_tr_func 1 | |
6040 | EOF | |
6041 | ||
ee9dd372 | 6042 | else |
5aac1dac | 6043 | echo "$ac_t""no" 1>&6 |
ee9dd372 | 6044 | fi |
5aac1dac | 6045 | done |
ee9dd372 TT |
6046 | |
6047 | ||
5aac1dac TT |
6048 | # We require memcpy. |
6049 | memcpy_found=no | |
6050 | for ac_func in memcpy | |
6051 | do | |
6052 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 6053 | echo "configure:6054: checking for $ac_func" >&5 |
5aac1dac TT |
6054 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6055 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ee9dd372 | 6056 | else |
5aac1dac | 6057 | cat > conftest.$ac_ext <<EOF |
7160c99d | 6058 | #line 6059 "configure" |
5aac1dac TT |
6059 | #include "confdefs.h" |
6060 | /* System header to define __stub macros and hopefully few prototypes, | |
6061 | which can conflict with char $ac_func(); below. */ | |
6062 | #include <assert.h> | |
6063 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6064 | /* We use char because int might match the return type of a gcc2 | |
6065 | builtin and then its argument prototype would still apply. */ | |
6066 | char $ac_func(); | |
6067 | ||
6068 | int main() { | |
ee9dd372 | 6069 | |
5aac1dac TT |
6070 | /* The GNU C library defines this for functions which it implements |
6071 | to always fail with ENOSYS. Some functions are actually named | |
6072 | something starting with __ and the normal name is an alias. */ | |
6073 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6074 | choke me | |
6075 | #else | |
6076 | $ac_func(); | |
6077 | #endif | |
ee9dd372 | 6078 | |
5aac1dac TT |
6079 | ; return 0; } |
6080 | EOF | |
7160c99d | 6081 | if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
6082 | rm -rf conftest* |
6083 | eval "ac_cv_func_$ac_func=yes" | |
7013e7cd | 6084 | else |
5aac1dac TT |
6085 | echo "configure: failed program was:" >&5 |
6086 | cat conftest.$ac_ext >&5 | |
6087 | rm -rf conftest* | |
6088 | eval "ac_cv_func_$ac_func=no" | |
6089 | fi | |
6090 | rm -f conftest* | |
7013e7cd AG |
6091 | fi |
6092 | ||
5aac1dac TT |
6093 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6094 | echo "$ac_t""yes" 1>&6 | |
6095 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6096 | cat >> confdefs.h <<EOF | |
6097 | #define $ac_tr_func 1 | |
6098 | EOF | |
6099 | memcpy_found=yes | |
dbf45a01 | 6100 | else |
5aac1dac | 6101 | echo "$ac_t""no" 1>&6 |
dbf45a01 | 6102 | fi |
5aac1dac | 6103 | done |
dbf45a01 | 6104 | |
5aac1dac TT |
6105 | if test "$memcpy_found" = no; then |
6106 | { echo "configure: error: memcpy is required" 1>&2; exit 1; } | |
6107 | fi | |
dbf45a01 | 6108 | |
5aac1dac | 6109 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
7160c99d | 6110 | echo "configure:6111: checking for dlopen in -ldl" >&5 |
5aac1dac TT |
6111 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
6112 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6113 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6114 | else | |
6115 | ac_save_LIBS="$LIBS" | |
6116 | LIBS="-ldl $LIBS" | |
6117 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6118 | #line 6119 "configure" |
5aac1dac TT |
6119 | #include "confdefs.h" |
6120 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6121 | /* We use char because int might match the return type of a gcc2 | |
6122 | builtin and then its argument prototype would still apply. */ | |
6123 | char dlopen(); | |
dbf45a01 | 6124 | |
5aac1dac TT |
6125 | int main() { |
6126 | dlopen() | |
6127 | ; return 0; } | |
6128 | EOF | |
7160c99d | 6129 | if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
6130 | rm -rf conftest* |
6131 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6132 | else | |
6133 | echo "configure: failed program was:" >&5 | |
6134 | cat conftest.$ac_ext >&5 | |
6135 | rm -rf conftest* | |
6136 | eval "ac_cv_lib_$ac_lib_var=no" | |
6137 | fi | |
6138 | rm -f conftest* | |
6139 | LIBS="$ac_save_LIBS" | |
1b5a2139 | 6140 | |
5aac1dac TT |
6141 | fi |
6142 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6143 | echo "$ac_t""yes" 1>&6 | |
6144 | ||
6145 | cat >> confdefs.h <<\EOF | |
6146 | #define HAVE_DLOPEN 1 | |
6147 | EOF | |
1b5a2139 | 6148 | |
5aac1dac TT |
6149 | else |
6150 | echo "$ac_t""no" 1>&6 | |
6151 | fi | |
1b5a2139 | 6152 | |
1b5a2139 | 6153 | |
5aac1dac TT |
6154 | # Some library-finding code we stole from Tcl. |
6155 | #-------------------------------------------------------------------- | |
6156 | # Check for the existence of the -lsocket and -lnsl libraries. | |
6157 | # The order here is important, so that they end up in the right | |
6158 | # order in the command line generated by make. Here are some | |
6159 | # special considerations: | |
6160 | # 1. Use "connect" and "accept" to check for -lsocket, and | |
6161 | # "gethostbyname" to check for -lnsl. | |
6162 | # 2. Use each function name only once: can't redo a check because | |
6163 | # autoconf caches the results of the last check and won't redo it. | |
6164 | # 3. Use -lnsl and -lsocket only if they supply procedures that | |
6165 | # aren't already present in the normal libraries. This is because | |
6166 | # IRIX 5.2 has libraries, but they aren't needed and they're | |
6167 | # bogus: they goof up name resolution if used. | |
6168 | # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. | |
6169 | # To get around this problem, check for both libraries together | |
6170 | # if -lsocket doesn't work by itself. | |
6171 | #-------------------------------------------------------------------- | |
1b5a2139 | 6172 | |
5aac1dac | 6173 | echo $ac_n "checking for socket libraries""... $ac_c" 1>&6 |
7160c99d | 6174 | echo "configure:6175: checking for socket libraries" >&5 |
5aac1dac TT |
6175 | if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then |
6176 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6177 | else | |
6178 | gcj_cv_lib_sockets= | |
6179 | gcj_checkBoth=0 | |
6180 | unset ac_cv_func_connect | |
6181 | echo $ac_n "checking for connect""... $ac_c" 1>&6 | |
7160c99d | 6182 | echo "configure:6183: checking for connect" >&5 |
5aac1dac TT |
6183 | if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then |
6184 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6185 | else | |
6186 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6187 | #line 6188 "configure" |
7bee4c4c | 6188 | #include "confdefs.h" |
5aac1dac TT |
6189 | /* System header to define __stub macros and hopefully few prototypes, |
6190 | which can conflict with char connect(); below. */ | |
6191 | #include <assert.h> | |
6192 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6193 | /* We use char because int might match the return type of a gcc2 | |
6194 | builtin and then its argument prototype would still apply. */ | |
6195 | char connect(); | |
6196 | ||
7bee4c4c AG |
6197 | int main() { |
6198 | ||
5aac1dac TT |
6199 | /* The GNU C library defines this for functions which it implements |
6200 | to always fail with ENOSYS. Some functions are actually named | |
6201 | something starting with __ and the normal name is an alias. */ | |
6202 | #if defined (__stub_connect) || defined (__stub___connect) | |
6203 | choke me | |
6204 | #else | |
6205 | connect(); | |
6206 | #endif | |
6207 | ||
7bee4c4c AG |
6208 | ; return 0; } |
6209 | EOF | |
7160c99d | 6210 | if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7bee4c4c | 6211 | rm -rf conftest* |
5aac1dac | 6212 | eval "ac_cv_func_connect=yes" |
7bee4c4c AG |
6213 | else |
6214 | echo "configure: failed program was:" >&5 | |
6215 | cat conftest.$ac_ext >&5 | |
6216 | rm -rf conftest* | |
5aac1dac | 6217 | eval "ac_cv_func_connect=no" |
7bee4c4c AG |
6218 | fi |
6219 | rm -f conftest* | |
5aac1dac | 6220 | fi |
7bee4c4c | 6221 | |
5aac1dac TT |
6222 | if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then |
6223 | echo "$ac_t""yes" 1>&6 | |
6224 | gcj_checkSocket=0 | |
6225 | else | |
6226 | echo "$ac_t""no" 1>&6 | |
6227 | gcj_checkSocket=1 | |
6228 | fi | |
6229 | ||
6230 | if test "$gcj_checkSocket" = 1; then | |
6231 | unset ac_cv_func_connect | |
6232 | echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 | |
7160c99d | 6233 | echo "configure:6234: checking for main in -lsocket" >&5 |
5aac1dac TT |
6234 | ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` |
6235 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
ee9dd372 TT |
6236 | echo $ac_n "(cached) $ac_c" 1>&6 |
6237 | else | |
5aac1dac TT |
6238 | ac_save_LIBS="$LIBS" |
6239 | LIBS="-lsocket $LIBS" | |
6240 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6241 | #line 6242 "configure" |
ee9dd372 | 6242 | #include "confdefs.h" |
5aac1dac TT |
6243 | |
6244 | int main() { | |
6245 | main() | |
6246 | ; return 0; } | |
ee9dd372 | 6247 | EOF |
7160c99d | 6248 | if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 6249 | rm -rf conftest* |
5aac1dac | 6250 | eval "ac_cv_lib_$ac_lib_var=yes" |
ee9dd372 | 6251 | else |
ee9dd372 TT |
6252 | echo "configure: failed program was:" >&5 |
6253 | cat conftest.$ac_ext >&5 | |
6254 | rm -rf conftest* | |
5aac1dac | 6255 | eval "ac_cv_lib_$ac_lib_var=no" |
ee9dd372 TT |
6256 | fi |
6257 | rm -f conftest* | |
5aac1dac TT |
6258 | LIBS="$ac_save_LIBS" |
6259 | ||
ee9dd372 | 6260 | fi |
5aac1dac | 6261 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
ee9dd372 | 6262 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 6263 | gcj_cv_lib_sockets="-lsocket" |
ee9dd372 TT |
6264 | else |
6265 | echo "$ac_t""no" 1>&6 | |
5aac1dac | 6266 | gcj_checkBoth=1 |
ee9dd372 | 6267 | fi |
ee9dd372 | 6268 | |
5aac1dac TT |
6269 | fi |
6270 | if test "$gcj_checkBoth" = 1; then | |
6271 | gcj_oldLibs=$LIBS | |
6272 | LIBS="$LIBS -lsocket -lnsl" | |
6273 | unset ac_cv_func_accept | |
6274 | echo $ac_n "checking for accept""... $ac_c" 1>&6 | |
7160c99d | 6275 | echo "configure:6276: checking for accept" >&5 |
5aac1dac | 6276 | if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then |
ee9dd372 TT |
6277 | echo $ac_n "(cached) $ac_c" 1>&6 |
6278 | else | |
6279 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6280 | #line 6281 "configure" |
ee9dd372 | 6281 | #include "confdefs.h" |
5aac1dac TT |
6282 | /* System header to define __stub macros and hopefully few prototypes, |
6283 | which can conflict with char accept(); below. */ | |
6284 | #include <assert.h> | |
6285 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6286 | /* We use char because int might match the return type of a gcc2 | |
6287 | builtin and then its argument prototype would still apply. */ | |
6288 | char accept(); | |
6289 | ||
6290 | int main() { | |
6291 | ||
6292 | /* The GNU C library defines this for functions which it implements | |
6293 | to always fail with ENOSYS. Some functions are actually named | |
6294 | something starting with __ and the normal name is an alias. */ | |
6295 | #if defined (__stub_accept) || defined (__stub___accept) | |
6296 | choke me | |
6297 | #else | |
6298 | accept(); | |
6299 | #endif | |
6300 | ||
6301 | ; return 0; } | |
ee9dd372 | 6302 | EOF |
7160c99d | 6303 | if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 6304 | rm -rf conftest* |
5aac1dac | 6305 | eval "ac_cv_func_accept=yes" |
ee9dd372 | 6306 | else |
ee9dd372 TT |
6307 | echo "configure: failed program was:" >&5 |
6308 | cat conftest.$ac_ext >&5 | |
6309 | rm -rf conftest* | |
5aac1dac | 6310 | eval "ac_cv_func_accept=no" |
ee9dd372 TT |
6311 | fi |
6312 | rm -f conftest* | |
6313 | fi | |
5aac1dac TT |
6314 | |
6315 | if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then | |
ee9dd372 | 6316 | echo "$ac_t""yes" 1>&6 |
5aac1dac TT |
6317 | gcj_checkNsl=0 |
6318 | gcj_cv_lib_sockets="-lsocket -lnsl" | |
04942eac TT |
6319 | else |
6320 | echo "$ac_t""no" 1>&6 | |
6321 | fi | |
04942eac | 6322 | |
5aac1dac TT |
6323 | unset ac_cv_func_accept |
6324 | LIBS=$gcj_oldLibs | |
6325 | fi | |
6326 | unset ac_cv_func_gethostbyname | |
6327 | gcj_oldLibs=$LIBS | |
6328 | LIBS="$LIBS $gcj_cv_lib_sockets" | |
6329 | echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 | |
7160c99d | 6330 | echo "configure:6331: checking for gethostbyname" >&5 |
5aac1dac | 6331 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then |
04942eac TT |
6332 | echo $ac_n "(cached) $ac_c" 1>&6 |
6333 | else | |
6334 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6335 | #line 6336 "configure" |
04942eac | 6336 | #include "confdefs.h" |
5aac1dac TT |
6337 | /* System header to define __stub macros and hopefully few prototypes, |
6338 | which can conflict with char gethostbyname(); below. */ | |
6339 | #include <assert.h> | |
6340 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6341 | /* We use char because int might match the return type of a gcc2 | |
6342 | builtin and then its argument prototype would still apply. */ | |
6343 | char gethostbyname(); | |
6344 | ||
6345 | int main() { | |
6346 | ||
6347 | /* The GNU C library defines this for functions which it implements | |
6348 | to always fail with ENOSYS. Some functions are actually named | |
6349 | something starting with __ and the normal name is an alias. */ | |
6350 | #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) | |
6351 | choke me | |
6352 | #else | |
6353 | gethostbyname(); | |
6354 | #endif | |
6355 | ||
6356 | ; return 0; } | |
04942eac | 6357 | EOF |
7160c99d | 6358 | if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
04942eac | 6359 | rm -rf conftest* |
5aac1dac | 6360 | eval "ac_cv_func_gethostbyname=yes" |
04942eac | 6361 | else |
04942eac TT |
6362 | echo "configure: failed program was:" >&5 |
6363 | cat conftest.$ac_ext >&5 | |
6364 | rm -rf conftest* | |
5aac1dac | 6365 | eval "ac_cv_func_gethostbyname=no" |
04942eac TT |
6366 | fi |
6367 | rm -f conftest* | |
6368 | fi | |
04942eac | 6369 | |
5aac1dac TT |
6370 | if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then |
6371 | echo "$ac_t""yes" 1>&6 | |
6372 | : | |
ee9dd372 TT |
6373 | else |
6374 | echo "$ac_t""no" 1>&6 | |
5aac1dac | 6375 | echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 |
7160c99d | 6376 | echo "configure:6377: checking for main in -lnsl" >&5 |
5aac1dac TT |
6377 | ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` |
6378 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4048d336 AM |
6379 | echo $ac_n "(cached) $ac_c" 1>&6 |
6380 | else | |
5aac1dac TT |
6381 | ac_save_LIBS="$LIBS" |
6382 | LIBS="-lnsl $LIBS" | |
6383 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6384 | #line 6385 "configure" |
4048d336 | 6385 | #include "confdefs.h" |
5aac1dac | 6386 | |
4048d336 | 6387 | int main() { |
5aac1dac | 6388 | main() |
4048d336 AM |
6389 | ; return 0; } |
6390 | EOF | |
7160c99d | 6391 | if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4048d336 | 6392 | rm -rf conftest* |
5aac1dac | 6393 | eval "ac_cv_lib_$ac_lib_var=yes" |
4048d336 AM |
6394 | else |
6395 | echo "configure: failed program was:" >&5 | |
6396 | cat conftest.$ac_ext >&5 | |
6397 | rm -rf conftest* | |
5aac1dac | 6398 | eval "ac_cv_lib_$ac_lib_var=no" |
4048d336 AM |
6399 | fi |
6400 | rm -f conftest* | |
5aac1dac TT |
6401 | LIBS="$ac_save_LIBS" |
6402 | ||
6403 | fi | |
6404 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6405 | echo "$ac_t""yes" 1>&6 | |
6406 | gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl" | |
6407 | else | |
6408 | echo "$ac_t""no" 1>&6 | |
4048d336 AM |
6409 | fi |
6410 | ||
5aac1dac | 6411 | fi |
4048d336 | 6412 | |
5aac1dac TT |
6413 | unset ac_cv_func_gethostbyname |
6414 | LIBS=$gcj_oldLIBS | |
6415 | ||
4048d336 AM |
6416 | fi |
6417 | ||
5aac1dac TT |
6418 | echo "$ac_t""$gcj_cv_lib_sockets" 1>&6 |
6419 | SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets" | |
ee9dd372 | 6420 | |
5aac1dac TT |
6421 | if test "$with_system_zlib" = yes; then |
6422 | echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 | |
7160c99d | 6423 | echo "configure:6424: checking for deflate in -lz" >&5 |
5aac1dac TT |
6424 | ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` |
6425 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
a3e174ea AO |
6426 | echo $ac_n "(cached) $ac_c" 1>&6 |
6427 | else | |
5aac1dac TT |
6428 | ac_save_LIBS="$LIBS" |
6429 | LIBS="-lz $LIBS" | |
6430 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6431 | #line 6432 "configure" |
a3e174ea | 6432 | #include "confdefs.h" |
5aac1dac TT |
6433 | /* Override any gcc2 internal prototype to avoid an error. */ |
6434 | /* We use char because int might match the return type of a gcc2 | |
6435 | builtin and then its argument prototype would still apply. */ | |
6436 | char deflate(); | |
6437 | ||
6438 | int main() { | |
6439 | deflate() | |
6440 | ; return 0; } | |
a3e174ea | 6441 | EOF |
7160c99d | 6442 | if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
a3e174ea | 6443 | rm -rf conftest* |
5aac1dac | 6444 | eval "ac_cv_lib_$ac_lib_var=yes" |
a3e174ea | 6445 | else |
a3e174ea AO |
6446 | echo "configure: failed program was:" >&5 |
6447 | cat conftest.$ac_ext >&5 | |
6448 | rm -rf conftest* | |
5aac1dac | 6449 | eval "ac_cv_lib_$ac_lib_var=no" |
a3e174ea AO |
6450 | fi |
6451 | rm -f conftest* | |
5aac1dac | 6452 | LIBS="$ac_save_LIBS" |
a3e174ea | 6453 | |
5aac1dac TT |
6454 | fi |
6455 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6456 | echo "$ac_t""yes" 1>&6 | |
6457 | ZLIBSPEC=-lz | |
a3e174ea | 6458 | else |
5aac1dac TT |
6459 | echo "$ac_t""no" 1>&6 |
6460 | ZLIBSPEC= | |
a3e174ea | 6461 | fi |
a3e174ea | 6462 | |
5aac1dac TT |
6463 | fi |
6464 | ||
6465 | # Test for Gtk stuff, if asked for. | |
6466 | if test "$use_gtk_awt" = yes; then | |
29e531ff | 6467 | # Check whether --enable-gtktest or --disable-gtktest was given. |
5aac1dac TT |
6468 | if test "${enable_gtktest+set}" = set; then |
6469 | enableval="$enable_gtktest" | |
a3e174ea AO |
6470 | : |
6471 | else | |
5aac1dac | 6472 | enable_gtktest=yes |
a3e174ea | 6473 | fi |
a3e174ea | 6474 | |
5aac1dac | 6475 | |
29e531ff | 6476 | pkg_config_args=gtk+-2.0 |
5aac1dac TT |
6477 | for module in . |
6478 | do | |
6479 | case "$module" in | |
6480 | gthread) | |
29e531ff | 6481 | pkg_config_args="$pkg_config_args gthread-2.0" |
5aac1dac TT |
6482 | ;; |
6483 | esac | |
6484 | done | |
6485 | ||
29e531ff | 6486 | no_gtk="" |
5aac1dac | 6487 | |
29e531ff TF |
6488 | # Extract the first word of "pkg-config", so it can be a program name with args. |
6489 | set dummy pkg-config; ac_word=$2 | |
5aac1dac | 6490 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7160c99d | 6491 | echo "configure:6492: checking for $ac_word" >&5 |
29e531ff | 6492 | if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then |
5aac1dac TT |
6493 | echo $ac_n "(cached) $ac_c" 1>&6 |
6494 | else | |
29e531ff | 6495 | case "$PKG_CONFIG" in |
5aac1dac | 6496 | /*) |
29e531ff | 6497 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
5aac1dac TT |
6498 | ;; |
6499 | ?:/*) | |
29e531ff | 6500 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. |
5aac1dac TT |
6501 | ;; |
6502 | *) | |
6503 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
6504 | ac_dummy="$PATH" | |
6505 | for ac_dir in $ac_dummy; do | |
6506 | test -z "$ac_dir" && ac_dir=. | |
6507 | if test -f $ac_dir/$ac_word; then | |
29e531ff | 6508 | ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" |
5aac1dac TT |
6509 | break |
6510 | fi | |
6511 | done | |
6512 | IFS="$ac_save_ifs" | |
29e531ff | 6513 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
5aac1dac TT |
6514 | ;; |
6515 | esac | |
6516 | fi | |
29e531ff TF |
6517 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" |
6518 | if test -n "$PKG_CONFIG"; then | |
6519 | echo "$ac_t""$PKG_CONFIG" 1>&6 | |
5aac1dac TT |
6520 | else |
6521 | echo "$ac_t""no" 1>&6 | |
a3e174ea AO |
6522 | fi |
6523 | ||
29e531ff TF |
6524 | |
6525 | if test x$PKG_CONFIG != xno ; then | |
6526 | if pkg-config --atleast-pkgconfig-version 0.7 ; then | |
6527 | : | |
6528 | else | |
6529 | echo *** pkg-config too old; version 0.7 or better required. | |
6530 | no_gtk=yes | |
6531 | PKG_CONFIG=no | |
6532 | fi | |
5aac1dac | 6533 | else |
29e531ff TF |
6534 | no_gtk=yes |
6535 | fi | |
6536 | ||
6537 | min_gtk_version=2.0.0 | |
6538 | echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6 | |
7160c99d | 6539 | echo "configure:6540: checking for GTK+ - version >= $min_gtk_version" >&5 |
29e531ff TF |
6540 | |
6541 | if test x$PKG_CONFIG != xno ; then | |
6542 | ## don't try to run the test against uninstalled libtool libs | |
6543 | if $PKG_CONFIG --uninstalled $pkg_config_args; then | |
6544 | echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" | |
6545 | enable_gtktest=no | |
6546 | fi | |
6547 | ||
6548 | if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then | |
6549 | : | |
6550 | else | |
6551 | no_gtk=yes | |
6552 | fi | |
6553 | fi | |
6554 | ||
6555 | if test x"$no_gtk" = x ; then | |
6556 | GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` | |
6557 | GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` | |
6558 | gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ | |
5aac1dac | 6559 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` |
29e531ff | 6560 | gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ |
5aac1dac | 6561 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` |
29e531ff | 6562 | gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ |
5aac1dac TT |
6563 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` |
6564 | if test "x$enable_gtktest" = "xyes" ; then | |
6565 | ac_save_CFLAGS="$CFLAGS" | |
6566 | ac_save_LIBS="$LIBS" | |
6567 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
6568 | LIBS="$GTK_LIBS $LIBS" | |
6569 | rm -f conf.gtktest | |
6570 | if test "$cross_compiling" = yes; then | |
6571 | echo $ac_n "cross compiling; assumed OK... $ac_c" | |
a3e174ea AO |
6572 | else |
6573 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6574 | #line 6575 "configure" |
a3e174ea | 6575 | #include "confdefs.h" |
5aac1dac TT |
6576 | |
6577 | #include <gtk/gtk.h> | |
6578 | #include <stdio.h> | |
6579 | #include <stdlib.h> | |
6580 | ||
6581 | int | |
6582 | main () | |
6583 | { | |
6584 | int major, minor, micro; | |
6585 | char *tmp_version; | |
6586 | ||
6587 | system ("touch conf.gtktest"); | |
6588 | ||
6589 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
6590 | tmp_version = g_strdup("$min_gtk_version"); | |
6591 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
6592 | printf("%s, bad version string\n", "$min_gtk_version"); | |
6593 | exit(1); | |
6594 | } | |
6595 | ||
6596 | if ((gtk_major_version != $gtk_config_major_version) || | |
6597 | (gtk_minor_version != $gtk_config_minor_version) || | |
6598 | (gtk_micro_version != $gtk_config_micro_version)) | |
6599 | { | |
29e531ff | 6600 | printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", |
5aac1dac TT |
6601 | $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, |
6602 | gtk_major_version, gtk_minor_version, gtk_micro_version); | |
29e531ff | 6603 | printf ("*** was found! If pkg-config was correct, then it is best\n"); |
5aac1dac TT |
6604 | printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); |
6605 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | |
6606 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | |
6607 | printf("*** required on your system.\n"); | |
29e531ff TF |
6608 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); |
6609 | printf("*** to point to the correct configuration files\n"); | |
5aac1dac | 6610 | } |
5aac1dac TT |
6611 | else if ((gtk_major_version != GTK_MAJOR_VERSION) || |
6612 | (gtk_minor_version != GTK_MINOR_VERSION) || | |
6613 | (gtk_micro_version != GTK_MICRO_VERSION)) | |
6614 | { | |
6615 | printf("*** GTK+ header files (version %d.%d.%d) do not match\n", | |
6616 | GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); | |
6617 | printf("*** library (version %d.%d.%d)\n", | |
6618 | gtk_major_version, gtk_minor_version, gtk_micro_version); | |
6619 | } | |
5aac1dac TT |
6620 | else |
6621 | { | |
6622 | if ((gtk_major_version > major) || | |
6623 | ((gtk_major_version == major) && (gtk_minor_version > minor)) || | |
6624 | ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) | |
6625 | { | |
6626 | return 0; | |
6627 | } | |
6628 | else | |
6629 | { | |
6630 | printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", | |
6631 | gtk_major_version, gtk_minor_version, gtk_micro_version); | |
6632 | printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", | |
6633 | major, minor, micro); | |
6634 | printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); | |
6635 | printf("***\n"); | |
6636 | printf("*** If you have already installed a sufficiently new version, this error\n"); | |
29e531ff | 6637 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); |
5aac1dac | 6638 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); |
29e531ff TF |
6639 | printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); |
6640 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); | |
5aac1dac TT |
6641 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); |
6642 | printf("*** so that the correct libraries are found at run-time))\n"); | |
6643 | } | |
6644 | } | |
6645 | return 1; | |
6646 | } | |
a3e174ea AO |
6647 | |
6648 | EOF | |
7160c99d | 6649 | if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
a3e174ea AO |
6650 | then |
6651 | : | |
6652 | else | |
6653 | echo "configure: failed program was:" >&5 | |
6654 | cat conftest.$ac_ext >&5 | |
6655 | rm -fr conftest* | |
5aac1dac | 6656 | no_gtk=yes |
a3e174ea AO |
6657 | fi |
6658 | rm -fr conftest* | |
6659 | fi | |
6660 | ||
5aac1dac TT |
6661 | CFLAGS="$ac_save_CFLAGS" |
6662 | LIBS="$ac_save_LIBS" | |
6663 | fi | |
6664 | fi | |
6665 | if test "x$no_gtk" = x ; then | |
29e531ff | 6666 | echo "$ac_t""yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" 1>&6 |
5aac1dac TT |
6667 | : |
6668 | else | |
6669 | echo "$ac_t""no" 1>&6 | |
29e531ff TF |
6670 | if test "$PKG_CONFIG" = "no" ; then |
6671 | echo "*** A new enough version of pkg-config was not found." | |
6672 | echo "*** See http://pkgconfig.sourceforge.net" | |
5aac1dac TT |
6673 | else |
6674 | if test -f conf.gtktest ; then | |
6675 | : | |
6676 | else | |
29e531ff TF |
6677 | echo "*** Could not run GTK+ test program, checking why..." |
6678 | ac_save_CFLAGS="$CFLAGS" | |
6679 | ac_save_LIBS="$LIBS" | |
5aac1dac TT |
6680 | CFLAGS="$CFLAGS $GTK_CFLAGS" |
6681 | LIBS="$LIBS $GTK_LIBS" | |
6682 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6683 | #line 6684 "configure" |
5aac1dac | 6684 | #include "confdefs.h" |
a3e174ea | 6685 | |
5aac1dac TT |
6686 | #include <gtk/gtk.h> |
6687 | #include <stdio.h> | |
a3e174ea | 6688 | |
5aac1dac TT |
6689 | int main() { |
6690 | return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); | |
6691 | ; return 0; } | |
a3e174ea | 6692 | EOF |
7160c99d | 6693 | if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
6694 | rm -rf conftest* |
6695 | echo "*** The test program compiled, but did not run. This usually means" | |
29e531ff TF |
6696 | echo "*** that the run-time linker is not finding GTK+ or finding the wrong" |
6697 | echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" | |
5aac1dac TT |
6698 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
6699 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
6700 | echo "*** is required on your system" | |
6701 | echo "***" | |
6702 | echo "*** If you have an old version installed, it is best to remove it, although" | |
29e531ff | 6703 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" |
a3e174ea | 6704 | else |
5aac1dac TT |
6705 | echo "configure: failed program was:" >&5 |
6706 | cat conftest.$ac_ext >&5 | |
a3e174ea | 6707 | rm -rf conftest* |
5aac1dac | 6708 | echo "*** The test program failed to compile or link. See the file config.log for the" |
29e531ff | 6709 | echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." |
a3e174ea AO |
6710 | fi |
6711 | rm -f conftest* | |
5aac1dac TT |
6712 | CFLAGS="$ac_save_CFLAGS" |
6713 | LIBS="$ac_save_LIBS" | |
6714 | fi | |
6715 | fi | |
6716 | GTK_CFLAGS="" | |
6717 | GTK_LIBS="" | |
6718 | exit 1 | |
6719 | fi | |
6720 | ||
6721 | ||
6722 | rm -f conf.gtktest | |
a3e174ea | 6723 | |
29e531ff | 6724 | # Check whether --enable-glibtest or --disable-glibtest was given. |
5aac1dac TT |
6725 | if test "${enable_glibtest+set}" = set; then |
6726 | enableval="$enable_glibtest" | |
6727 | : | |
6728 | else | |
6729 | enable_glibtest=yes | |
a3e174ea AO |
6730 | fi |
6731 | ||
ccfe7e46 | 6732 | |
29e531ff | 6733 | pkg_config_args=glib-2.0 |
5aac1dac TT |
6734 | for module in . gthread |
6735 | do | |
6736 | case "$module" in | |
6737 | gmodule) | |
29e531ff TF |
6738 | pkg_config_args="$pkg_config_args gmodule-2.0" |
6739 | ;; | |
6740 | gobject) | |
6741 | pkg_config_args="$pkg_config_args gobject-2.0" | |
5aac1dac TT |
6742 | ;; |
6743 | gthread) | |
29e531ff | 6744 | pkg_config_args="$pkg_config_args gthread-2.0" |
5aac1dac TT |
6745 | ;; |
6746 | esac | |
6747 | done | |
6748 | ||
29e531ff TF |
6749 | # Extract the first word of "pkg-config", so it can be a program name with args. |
6750 | set dummy pkg-config; ac_word=$2 | |
5aac1dac | 6751 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7160c99d | 6752 | echo "configure:6753: checking for $ac_word" >&5 |
29e531ff | 6753 | if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then |
5aac1dac TT |
6754 | echo $ac_n "(cached) $ac_c" 1>&6 |
6755 | else | |
29e531ff | 6756 | case "$PKG_CONFIG" in |
5aac1dac | 6757 | /*) |
29e531ff | 6758 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
5aac1dac TT |
6759 | ;; |
6760 | ?:/*) | |
29e531ff | 6761 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. |
5aac1dac TT |
6762 | ;; |
6763 | *) | |
6764 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
6765 | ac_dummy="$PATH" | |
6766 | for ac_dir in $ac_dummy; do | |
6767 | test -z "$ac_dir" && ac_dir=. | |
6768 | if test -f $ac_dir/$ac_word; then | |
29e531ff | 6769 | ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" |
5aac1dac TT |
6770 | break |
6771 | fi | |
6772 | done | |
6773 | IFS="$ac_save_ifs" | |
29e531ff | 6774 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
5aac1dac TT |
6775 | ;; |
6776 | esac | |
6777 | fi | |
29e531ff TF |
6778 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" |
6779 | if test -n "$PKG_CONFIG"; then | |
6780 | echo "$ac_t""$PKG_CONFIG" 1>&6 | |
5aac1dac TT |
6781 | else |
6782 | echo "$ac_t""no" 1>&6 | |
6783 | fi | |
6784 | ||
29e531ff | 6785 | |
5aac1dac | 6786 | no_glib="" |
29e531ff TF |
6787 | |
6788 | if test x$PKG_CONFIG != xno ; then | |
6789 | if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then | |
6790 | : | |
6791 | else | |
6792 | echo *** pkg-config too old; version 0.7 or better required. | |
6793 | no_glib=yes | |
6794 | PKG_CONFIG=no | |
6795 | fi | |
5aac1dac | 6796 | else |
29e531ff TF |
6797 | no_glib=yes |
6798 | fi | |
6799 | ||
6800 | min_glib_version=2.0.0 | |
6801 | echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 | |
7160c99d | 6802 | echo "configure:6803: checking for GLIB - version >= $min_glib_version" >&5 |
29e531ff TF |
6803 | |
6804 | if test x$PKG_CONFIG != xno ; then | |
6805 | ## don't try to run the test against uninstalled libtool libs | |
6806 | if $PKG_CONFIG --uninstalled $pkg_config_args; then | |
6807 | echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" | |
6808 | enable_glibtest=no | |
6809 | fi | |
6810 | ||
6811 | if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then | |
6812 | : | |
6813 | else | |
6814 | no_glib=yes | |
6815 | fi | |
6816 | fi | |
6817 | ||
6818 | if test x"$no_glib" = x ; then | |
6819 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` | |
6820 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` | |
6821 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` | |
6822 | ||
6823 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` | |
6824 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` | |
6825 | glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ | |
5aac1dac | 6826 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` |
29e531ff | 6827 | glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
5aac1dac | 6828 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` |
29e531ff | 6829 | glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
5aac1dac TT |
6830 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` |
6831 | if test "x$enable_glibtest" = "xyes" ; then | |
6832 | ac_save_CFLAGS="$CFLAGS" | |
6833 | ac_save_LIBS="$LIBS" | |
6834 | CFLAGS="$CFLAGS $GLIB_CFLAGS" | |
6835 | LIBS="$GLIB_LIBS $LIBS" | |
6836 | rm -f conf.glibtest | |
6837 | if test "$cross_compiling" = yes; then | |
6838 | echo $ac_n "cross compiling; assumed OK... $ac_c" | |
6839 | else | |
6840 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6841 | #line 6842 "configure" |
a3e174ea | 6842 | #include "confdefs.h" |
5aac1dac TT |
6843 | |
6844 | #include <glib.h> | |
6845 | #include <stdio.h> | |
a3e174ea | 6846 | #include <stdlib.h> |
ccfe7e46 | 6847 | |
5aac1dac TT |
6848 | int |
6849 | main () | |
6850 | { | |
6851 | int major, minor, micro; | |
6852 | char *tmp_version; | |
6853 | ||
6854 | system ("touch conf.glibtest"); | |
6855 | ||
6856 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
6857 | tmp_version = g_strdup("$min_glib_version"); | |
6858 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
6859 | printf("%s, bad version string\n", "$min_glib_version"); | |
6860 | exit(1); | |
6861 | } | |
6862 | ||
6863 | if ((glib_major_version != $glib_config_major_version) || | |
6864 | (glib_minor_version != $glib_config_minor_version) || | |
6865 | (glib_micro_version != $glib_config_micro_version)) | |
6866 | { | |
29e531ff | 6867 | printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", |
5aac1dac TT |
6868 | $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, |
6869 | glib_major_version, glib_minor_version, glib_micro_version); | |
29e531ff TF |
6870 | printf ("*** was found! If pkg-config was correct, then it is best\n"); |
6871 | printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); | |
5aac1dac TT |
6872 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); |
6873 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | |
6874 | printf("*** required on your system.\n"); | |
29e531ff TF |
6875 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); |
6876 | printf("*** to point to the correct configuration files\n"); | |
5aac1dac TT |
6877 | } |
6878 | else if ((glib_major_version != GLIB_MAJOR_VERSION) || | |
6879 | (glib_minor_version != GLIB_MINOR_VERSION) || | |
6880 | (glib_micro_version != GLIB_MICRO_VERSION)) | |
6881 | { | |
6882 | printf("*** GLIB header files (version %d.%d.%d) do not match\n", | |
6883 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); | |
6884 | printf("*** library (version %d.%d.%d)\n", | |
6885 | glib_major_version, glib_minor_version, glib_micro_version); | |
6886 | } | |
6887 | else | |
6888 | { | |
6889 | if ((glib_major_version > major) || | |
6890 | ((glib_major_version == major) && (glib_minor_version > minor)) || | |
6891 | ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) | |
6892 | { | |
6893 | return 0; | |
6894 | } | |
6895 | else | |
6896 | { | |
6897 | printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", | |
6898 | glib_major_version, glib_minor_version, glib_micro_version); | |
6899 | printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", | |
6900 | major, minor, micro); | |
6901 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); | |
6902 | printf("***\n"); | |
6903 | printf("*** If you have already installed a sufficiently new version, this error\n"); | |
29e531ff | 6904 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); |
5aac1dac | 6905 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); |
29e531ff TF |
6906 | printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); |
6907 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); | |
5aac1dac TT |
6908 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); |
6909 | printf("*** so that the correct libraries are found at run-time))\n"); | |
6910 | } | |
6911 | } | |
6912 | return 1; | |
6913 | } | |
6914 | ||
6915 | EOF | |
7160c99d | 6916 | if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5aac1dac TT |
6917 | then |
6918 | : | |
a3e174ea | 6919 | else |
ccfe7e46 AO |
6920 | echo "configure: failed program was:" >&5 |
6921 | cat conftest.$ac_ext >&5 | |
5aac1dac TT |
6922 | rm -fr conftest* |
6923 | no_glib=yes | |
6924 | fi | |
6925 | rm -fr conftest* | |
a3e174ea | 6926 | fi |
a3e174ea | 6927 | |
5aac1dac TT |
6928 | CFLAGS="$ac_save_CFLAGS" |
6929 | LIBS="$ac_save_LIBS" | |
6930 | fi | |
6931 | fi | |
6932 | if test "x$no_glib" = x ; then | |
29e531ff | 6933 | echo "$ac_t""yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" 1>&6 |
5aac1dac TT |
6934 | : |
6935 | else | |
6936 | echo "$ac_t""no" 1>&6 | |
29e531ff TF |
6937 | if test "$PKG_CONFIG" = "no" ; then |
6938 | echo "*** A new enough version of pkg-config was not found." | |
6939 | echo "*** See http://www.freedesktop.org/software/pkgconfig/" | |
5aac1dac TT |
6940 | else |
6941 | if test -f conf.glibtest ; then | |
6942 | : | |
6943 | else | |
6944 | echo "*** Could not run GLIB test program, checking why..." | |
29e531ff TF |
6945 | ac_save_CFLAGS="$CFLAGS" |
6946 | ac_save_LIBS="$LIBS" | |
5aac1dac TT |
6947 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
6948 | LIBS="$LIBS $GLIB_LIBS" | |
6949 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 6950 | #line 6951 "configure" |
ccfe7e46 | 6951 | #include "confdefs.h" |
5aac1dac TT |
6952 | |
6953 | #include <glib.h> | |
6954 | #include <stdio.h> | |
6955 | ||
ccfe7e46 | 6956 | int main() { |
5aac1dac | 6957 | return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); |
ccfe7e46 AO |
6958 | ; return 0; } |
6959 | EOF | |
7160c99d | 6960 | if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5aac1dac TT |
6961 | rm -rf conftest* |
6962 | echo "*** The test program compiled, but did not run. This usually means" | |
6963 | echo "*** that the run-time linker is not finding GLIB or finding the wrong" | |
6964 | echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" | |
6965 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
6966 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
6967 | echo "*** is required on your system" | |
6968 | echo "***" | |
6969 | echo "*** If you have an old version installed, it is best to remove it, although" | |
29e531ff | 6970 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" |
ccfe7e46 AO |
6971 | else |
6972 | echo "configure: failed program was:" >&5 | |
6973 | cat conftest.$ac_ext >&5 | |
6974 | rm -rf conftest* | |
5aac1dac | 6975 | echo "*** The test program failed to compile or link. See the file config.log for the" |
29e531ff | 6976 | echo "*** exact error that occured. This usually means GLIB is incorrectly installed." |
a3e174ea | 6977 | fi |
ccfe7e46 | 6978 | rm -f conftest* |
5aac1dac TT |
6979 | CFLAGS="$ac_save_CFLAGS" |
6980 | LIBS="$ac_save_LIBS" | |
6981 | fi | |
6982 | fi | |
6983 | GLIB_CFLAGS="" | |
6984 | GLIB_LIBS="" | |
29e531ff TF |
6985 | GLIB_GENMARSHAL="" |
6986 | GOBJECT_QUERY="" | |
6987 | GLIB_MKENUMS="" | |
5aac1dac TT |
6988 | exit 1 |
6989 | fi | |
6990 | ||
6991 | ||
29e531ff TF |
6992 | |
6993 | ||
6994 | ||
5aac1dac | 6995 | rm -f conf.glibtest |
a3e174ea | 6996 | |
5aac1dac TT |
6997 | enable_libarttest=no |
6998 | # Check whether --with-libart-prefix or --without-libart-prefix was given. | |
6999 | if test "${with_libart_prefix+set}" = set; then | |
7000 | withval="$with_libart_prefix" | |
7001 | libart_prefix="$withval" | |
7002 | else | |
7003 | libart_prefix="" | |
7004 | fi | |
60a78ccf | 7005 | |
5aac1dac TT |
7006 | # Check whether --with-libart-exec-prefix or --without-libart-exec-prefix was given. |
7007 | if test "${with_libart_exec_prefix+set}" = set; then | |
7008 | withval="$with_libart_exec_prefix" | |
7009 | libart_exec_prefix="$withval" | |
7010 | else | |
7011 | libart_exec_prefix="" | |
7012 | fi | |
7013 | ||
7014 | # Check whether --enable-libarttest or --disable-libarttest was given. | |
7015 | if test "${enable_libarttest+set}" = set; then | |
7016 | enableval="$enable_libarttest" | |
7017 | : | |
7018 | else | |
7019 | enable_libarttest=yes | |
7020 | fi | |
7021 | ||
7022 | ||
7023 | if test x$libart_exec_prefix != x ; then | |
7024 | libart_args="$libart_args --exec-prefix=$libart_exec_prefix" | |
7025 | if test x${LIBART_CONFIG+set} != xset ; then | |
7026 | LIBART_CONFIG=$libart_exec_prefix/bin/libart-config | |
7027 | fi | |
7028 | fi | |
7029 | if test x$libart_prefix != x ; then | |
7030 | libart_args="$libart_args --prefix=$libart_prefix" | |
7031 | if test x${LIBART_CONFIG+set} != xset ; then | |
7032 | LIBART_CONFIG=$libart_prefix/bin/libart-config | |
7033 | fi | |
7034 | fi | |
7035 | ||
158aa0f7 MK |
7036 | # Extract the first word of "libart2-config", so it can be a program name with args. |
7037 | set dummy libart2-config; ac_word=$2 | |
5aac1dac | 7038 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7160c99d | 7039 | echo "configure:7040: checking for $ac_word" >&5 |
5aac1dac TT |
7040 | if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then |
7041 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7042 | else | |
7043 | case "$LIBART_CONFIG" in | |
7044 | /*) | |
7045 | ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path. | |
7046 | ;; | |
7047 | ?:/*) | |
7048 | ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path. | |
7049 | ;; | |
7050 | *) | |
7051 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
7052 | ac_dummy="$PATH" | |
7053 | for ac_dir in $ac_dummy; do | |
7054 | test -z "$ac_dir" && ac_dir=. | |
7055 | if test -f $ac_dir/$ac_word; then | |
7056 | ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word" | |
7057 | break | |
7058 | fi | |
7059 | done | |
7060 | IFS="$ac_save_ifs" | |
7061 | test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no" | |
7062 | ;; | |
7063 | esac | |
7064 | fi | |
7065 | LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG" | |
7066 | if test -n "$LIBART_CONFIG"; then | |
7067 | echo "$ac_t""$LIBART_CONFIG" 1>&6 | |
60a78ccf | 7068 | else |
60a78ccf RO |
7069 | echo "$ac_t""no" 1>&6 |
7070 | fi | |
60a78ccf | 7071 | |
158aa0f7 MK |
7072 | if test "$LIBART_CONFIG" = "no" ; then |
7073 | # Extract the first word of "libart-config", so it can be a program name with args. | |
7074 | set dummy libart-config; ac_word=$2 | |
7075 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
7160c99d | 7076 | echo "configure:7077: checking for $ac_word" >&5 |
158aa0f7 MK |
7077 | if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then |
7078 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7079 | else | |
7080 | case "$LIBART_CONFIG" in | |
7081 | /*) | |
7082 | ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path. | |
7083 | ;; | |
7084 | ?:/*) | |
7085 | ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path. | |
7086 | ;; | |
7087 | *) | |
7088 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
7089 | ac_dummy="$PATH" | |
7090 | for ac_dir in $ac_dummy; do | |
7091 | test -z "$ac_dir" && ac_dir=. | |
7092 | if test -f $ac_dir/$ac_word; then | |
7093 | ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word" | |
7094 | break | |
7095 | fi | |
7096 | done | |
7097 | IFS="$ac_save_ifs" | |
7098 | test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no" | |
7099 | ;; | |
7100 | esac | |
7101 | fi | |
7102 | LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG" | |
7103 | if test -n "$LIBART_CONFIG"; then | |
7104 | echo "$ac_t""$LIBART_CONFIG" 1>&6 | |
7105 | else | |
7106 | echo "$ac_t""no" 1>&6 | |
7107 | fi | |
7108 | ||
7109 | fi | |
5aac1dac TT |
7110 | min_libart_version=2.1.0 |
7111 | echo $ac_n "checking for LIBART - version >= $min_libart_version""... $ac_c" 1>&6 | |
7160c99d | 7112 | echo "configure:7113: checking for LIBART - version >= $min_libart_version" >&5 |
5aac1dac TT |
7113 | no_libart="" |
7114 | if test "$LIBART_CONFIG" = "no" ; then | |
7115 | no_libart=yes | |
7116 | else | |
7117 | LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags` | |
7118 | LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs` | |
7119 | ||
7120 | libart_major_version=`$LIBART_CONFIG $libart_args --version | \ | |
7121 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` | |
7122 | libart_minor_version=`$LIBART_CONFIG $libart_args --version | \ | |
7123 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` | |
7124 | libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \ | |
7125 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` | |
7126 | if test "x$enable_libarttest" = "xyes" ; then | |
7127 | ac_save_CFLAGS="$CFLAGS" | |
7128 | ac_save_LIBS="$LIBS" | |
7129 | CFLAGS="$CFLAGS $LIBART_CFLAGS" | |
7130 | LIBS="$LIBS $LIBART_LIBS" | |
7131 | rm -f conf.libarttest | |
7132 | if test "$cross_compiling" = yes; then | |
7133 | echo $ac_n "cross compiling; assumed OK... $ac_c" | |
7134 | else | |
7135 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7136 | #line 7137 "configure" |
ee9dd372 | 7137 | #include "confdefs.h" |
ee9dd372 | 7138 | |
5aac1dac TT |
7139 | #include <stdio.h> |
7140 | #include <stdlib.h> | |
7141 | #include <string.h> | |
7142 | #include <libart_lgpl/libart.h> | |
7143 | ||
7144 | char* | |
7145 | my_strdup (char *str) | |
7146 | { | |
7147 | char *new_str; | |
7148 | ||
7149 | if (str) | |
7150 | { | |
7151 | new_str = malloc ((strlen (str) + 1) * sizeof(char)); | |
7152 | strcpy (new_str, str); | |
7153 | } | |
7154 | else | |
7155 | new_str = NULL; | |
7156 | ||
7157 | return new_str; | |
7158 | } | |
7159 | ||
7160 | int main () | |
7161 | { | |
7162 | int major, minor, micro; | |
7163 | char *tmp_version; | |
7164 | ||
7165 | system ("touch conf.libarttest"); | |
7166 | ||
7167 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
7168 | tmp_version = my_strdup("$min_libart_version"); | |
7169 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
7170 | printf("%s, bad version string\n", "$min_libart_version"); | |
7171 | exit(1); | |
7172 | } | |
7173 | ||
7174 | if (($libart_major_version > major) || | |
7175 | (($libart_major_version == major) && ($libart_minor_version > minor)) || | |
7176 | (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro))) | |
7177 | { | |
7178 | return 0; | |
7179 | } | |
7180 | else | |
7181 | { | |
7182 | printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version); | |
7183 | printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro); | |
7184 | printf("*** best to upgrade to the required version.\n"); | |
7185 | printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n"); | |
7186 | printf("*** to point to the correct copy of libart-config, and remove the file\n"); | |
7187 | printf("*** config.cache before re-running configure\n"); | |
7188 | return 1; | |
7189 | } | |
7190 | } | |
7191 | ||
7192 | ||
7193 | EOF | |
7160c99d | 7194 | if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5aac1dac TT |
7195 | then |
7196 | : | |
ee9dd372 TT |
7197 | else |
7198 | echo "configure: failed program was:" >&5 | |
7199 | cat conftest.$ac_ext >&5 | |
5aac1dac TT |
7200 | rm -fr conftest* |
7201 | no_libart=yes | |
7202 | fi | |
7203 | rm -fr conftest* | |
ee9dd372 | 7204 | fi |
ee9dd372 | 7205 | |
5aac1dac TT |
7206 | CFLAGS="$ac_save_CFLAGS" |
7207 | LIBS="$ac_save_LIBS" | |
7208 | fi | |
7209 | fi | |
7210 | if test "x$no_libart" = x ; then | |
7211 | echo "$ac_t""yes" 1>&6 | |
7212 | : | |
7213 | else | |
7214 | echo "$ac_t""no" 1>&6 | |
7215 | if test "$LIBART_CONFIG" = "no" ; then | |
7216 | echo "*** The libart-config script installed by LIBART could not be found" | |
7217 | echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in" | |
7218 | echo "*** your path, or set the LIBART_CONFIG environment variable to the" | |
7219 | echo "*** full path to libart-config." | |
7220 | else | |
7221 | if test -f conf.libarttest ; then | |
7222 | : | |
7223 | else | |
7224 | echo "*** Could not run LIBART test program, checking why..." | |
7225 | CFLAGS="$CFLAGS $LIBART_CFLAGS" | |
7226 | LIBS="$LIBS $LIBART_LIBS" | |
7227 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7228 | #line 7229 "configure" |
ee9dd372 | 7229 | #include "confdefs.h" |
5aac1dac TT |
7230 | |
7231 | #include <stdio.h> | |
7232 | #include <libart_lgpl/libart.h> | |
7233 | ||
ee9dd372 | 7234 | int main() { |
5aac1dac | 7235 | return 0; |
ee9dd372 TT |
7236 | ; return 0; } |
7237 | EOF | |
7160c99d | 7238 | if { (eval echo configure:7239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 7239 | rm -rf conftest* |
5aac1dac TT |
7240 | echo "*** The test program compiled, but did not run. This usually means" |
7241 | echo "*** that the run-time linker is not finding LIBART or finding the wrong" | |
7242 | echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your" | |
7243 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
7244 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
7245 | echo "*** is required on your system" | |
7246 | echo "***" | |
7247 | echo "*** If you have an old version installed, it is best to remove it, although" | |
7248 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" | |
ee9dd372 TT |
7249 | else |
7250 | echo "configure: failed program was:" >&5 | |
7251 | cat conftest.$ac_ext >&5 | |
7252 | rm -rf conftest* | |
5aac1dac TT |
7253 | echo "*** The test program failed to compile or link. See the file config.log for the" |
7254 | echo "*** exact error that occured. This usually means LIBART was incorrectly installed" | |
7255 | echo "*** or that you have moved LIBART since it was installed. In the latter case, you" | |
7256 | echo "*** may want to edit the libart-config script: $LIBART_CONFIG" | |
ee9dd372 TT |
7257 | fi |
7258 | rm -f conftest* | |
5aac1dac TT |
7259 | CFLAGS="$ac_save_CFLAGS" |
7260 | LIBS="$ac_save_LIBS" | |
7261 | fi | |
7262 | fi | |
7263 | LIBART_CFLAGS="" | |
7264 | LIBART_LIBS="" | |
7265 | exit 1 | |
7266 | fi | |
7267 | ||
7268 | ||
7269 | rm -f conf.libarttest | |
ee9dd372 | 7270 | |
5aac1dac TT |
7271 | fi |
7272 | ||
7273 | # On Solaris, and maybe other architectures, the Boehm collector | |
7274 | # requires -ldl. | |
7275 | if test "$GC" = boehm; then | |
7276 | echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 | |
7160c99d | 7277 | echo "configure:7278: checking for main in -ldl" >&5 |
5aac1dac TT |
7278 | ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'` |
7279 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
7280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7281 | else | |
7282 | ac_save_LIBS="$LIBS" | |
7283 | LIBS="-ldl $LIBS" | |
ee9dd372 | 7284 | cat > conftest.$ac_ext <<EOF |
7160c99d | 7285 | #line 7286 "configure" |
ee9dd372 | 7286 | #include "confdefs.h" |
5aac1dac | 7287 | |
ee9dd372 | 7288 | int main() { |
5aac1dac | 7289 | main() |
ee9dd372 TT |
7290 | ; return 0; } |
7291 | EOF | |
7160c99d | 7292 | if { (eval echo configure:7293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ee9dd372 | 7293 | rm -rf conftest* |
5aac1dac | 7294 | eval "ac_cv_lib_$ac_lib_var=yes" |
ee9dd372 TT |
7295 | else |
7296 | echo "configure: failed program was:" >&5 | |
7297 | cat conftest.$ac_ext >&5 | |
7298 | rm -rf conftest* | |
5aac1dac TT |
7299 | eval "ac_cv_lib_$ac_lib_var=no" |
7300 | fi | |
7301 | rm -f conftest* | |
7302 | LIBS="$ac_save_LIBS" | |
7303 | ||
7304 | fi | |
7305 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
7306 | echo "$ac_t""yes" 1>&6 | |
7307 | SYSTEMSPEC="$SYSTEMSPEC -ldl" | |
7308 | else | |
ee9dd372 | 7309 | echo "$ac_t""no" 1>&6 |
5aac1dac | 7310 | fi |
ee9dd372 | 7311 | |
5aac1dac | 7312 | fi |
17fdfd9f | 7313 | fi |
5aac1dac | 7314 | |
17fdfd9f RE |
7315 | if test -z "${with_multisubdir}"; then |
7316 | builddotdot=. | |
7317 | else | |
5aac1dac | 7318 | |
17fdfd9f | 7319 | builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'` |
5aac1dac | 7320 | |
d6f6aaf6 ME |
7321 | fi |
7322 | ||
7323 | # Which gcj do we use? | |
7324 | which_gcj=default | |
7325 | built_gcc_dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`" | |
7326 | if test -n "${with_cross_host}"; then | |
7327 | # We are being configured with a cross compiler. We can't | |
7328 | # use ac_exeext, because that is for the target platform. | |
7329 | NATIVE=no | |
7330 | cross_host_exeext= | |
7331 | case "${with_cross_host}" in | |
7332 | *mingw* | *cygwin*) | |
7333 | cross_host_exeext=.exe | |
7334 | ;; | |
7335 | esac | |
7336 | if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then | |
e7cca7f4 | 7337 | if test x"$build_alias" = x"$with_cross_host"; then |
d6f6aaf6 ME |
7338 | # Ordinary cross (host!=target and host=build) |
7339 | which_gcj=built | |
7340 | else | |
7341 | # Canadian cross (host!=target and host!=build) | |
7342 | which_gcj=cross | |
7343 | fi | |
7344 | else | |
7345 | which_gcj=cross | |
7346 | fi | |
7347 | else | |
7348 | # We are being configured with a native or crossed-native compiler | |
7349 | if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then | |
7350 | if test x"$build" = x"$host"; then | |
7351 | # True native build (host=target and host=build) | |
7352 | which_gcj=built | |
7353 | else | |
7354 | # Crossed-native build (host=target and host!=build) | |
7355 | which_gcj=cross | |
7356 | fi | |
7357 | else | |
7358 | which_gcj=path | |
7359 | fi | |
7360 | fi | |
7361 | case "${which_gcj}" in | |
7362 | built) | |
7363 | GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/" | |
7364 | ;; | |
7365 | cross) | |
7366 | # See the comment in Makefile.am about CANADIAN being a misnomer | |
7367 | CANADIAN=yes | |
7368 | NULL_TARGET=no | |
7369 | if test "x${with_newlib}" = "xyes"; then | |
7370 | # FIXME (comment): Why is this needed? | |
7371 | GCC_UNWIND_INCLUDE= | |
7372 | GCJ="${target_alias}-gcj" | |
7373 | else | |
7374 | GCJ="${target_alias}-gcj -B`${PWDCMD-pwd}`/" | |
7375 | fi | |
7376 | ;; | |
7377 | path) | |
7378 | # See the comment in Makefile.am about CANADIAN being a misnomer | |
5aac1dac TT |
7379 | CANADIAN=yes |
7380 | NULL_TARGET=yes | |
7381 | GCJ="gcj -B`${PWDCMD-pwd}`/" | |
d6f6aaf6 ME |
7382 | ;; |
7383 | esac | |
5aac1dac TT |
7384 | |
7385 | # Create it, so that compile/link tests don't fail | |
7386 | test -f libgcj.spec || touch libgcj.spec | |
7387 | ||
7388 | # We must search the source tree for java.lang, since we still don't | |
7389 | # have libgcj.jar nor java/lang/*.class | |
7390 | GCJ_SAVE_CPPFLAGS=$CPPFLAGS | |
7391 | CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`" | |
7392 | ||
7393 | # Since some classes depend on this one, we need its source available | |
7394 | # before we can do any GCJ compilation test :-( | |
7395 | if test ! -f gnu/classpath/Configuration.java; then | |
7396 | test -d gnu || mkdir gnu | |
7397 | test -d gnu/classpath || mkdir gnu/classpath | |
7398 | sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \ | |
7399 | -e 's,@TOOLKIT@,$TOOLKIT,' \ | |
7400 | < $srcdir/gnu/classpath/Configuration.java.in \ | |
7401 | > gnu/classpath/Configuration.java | |
7402 | # We do not want to redirect the output of the grep below to /dev/null, | |
7403 | # but we add /dev/null to the input list so that grep will print the | |
7404 | # filename of Configuration.java in case it finds any matches. | |
7405 | if grep @ gnu/classpath/Configuration.java /dev/null; then | |
7406 | { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; } | |
7407 | fi | |
7408 | fi | |
7409 | ||
7410 | # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args. | |
7411 | set dummy ${ac_tool_prefix}gcj; ac_word=$2 | |
7412 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
7160c99d | 7413 | echo "configure:7414: checking for $ac_word" >&5 |
5aac1dac TT |
7414 | if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then |
7415 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7416 | else | |
7417 | if test -n "$GCJ"; then | |
7418 | ac_cv_prog_GCJ="$GCJ" # Let the user override the test. | |
7419 | else | |
7420 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
7421 | ac_dummy="$PATH" | |
7422 | for ac_dir in $ac_dummy; do | |
7423 | test -z "$ac_dir" && ac_dir=. | |
7424 | if test -f $ac_dir/$ac_word; then | |
7425 | ac_cv_prog_GCJ="${ac_tool_prefix}gcj" | |
7426 | break | |
7427 | fi | |
7428 | done | |
7429 | IFS="$ac_save_ifs" | |
7430 | fi | |
7431 | fi | |
7432 | GCJ="$ac_cv_prog_GCJ" | |
7433 | if test -n "$GCJ"; then | |
7434 | echo "$ac_t""$GCJ" 1>&6 | |
ee9dd372 | 7435 | else |
ee9dd372 | 7436 | echo "$ac_t""no" 1>&6 |
5aac1dac | 7437 | fi |
0659e0e3 | 7438 | |
5aac1dac TT |
7439 | |
7440 | if test -z "$ac_cv_prog_GCJ"; then | |
7441 | if test -n "$ac_tool_prefix"; then | |
7442 | # Extract the first word of "gcj", so it can be a program name with args. | |
7443 | set dummy gcj; ac_word=$2 | |
7444 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
7160c99d | 7445 | echo "configure:7446: checking for $ac_word" >&5 |
5aac1dac TT |
7446 | if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then |
7447 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7448 | else | |
7449 | if test -n "$GCJ"; then | |
7450 | ac_cv_prog_GCJ="$GCJ" # Let the user override the test. | |
7451 | else | |
7452 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
7453 | ac_dummy="$PATH" | |
7454 | for ac_dir in $ac_dummy; do | |
7455 | test -z "$ac_dir" && ac_dir=. | |
7456 | if test -f $ac_dir/$ac_word; then | |
7457 | ac_cv_prog_GCJ="gcj" | |
7458 | break | |
7459 | fi | |
7460 | done | |
7461 | IFS="$ac_save_ifs" | |
7462 | test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no" | |
7463 | fi | |
7464 | fi | |
7465 | GCJ="$ac_cv_prog_GCJ" | |
7466 | if test -n "$GCJ"; then | |
7467 | echo "$ac_t""$GCJ" 1>&6 | |
0659e0e3 | 7468 | else |
0659e0e3 DB |
7469 | echo "$ac_t""no" 1>&6 |
7470 | fi | |
5aac1dac TT |
7471 | |
7472 | else | |
7473 | GCJ="no" | |
ee9dd372 | 7474 | fi |
ee9dd372 | 7475 | fi |
ee9dd372 | 7476 | |
5aac1dac TT |
7477 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" |
7478 | ||
7479 | ||
7480 | ||
7481 | LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh" | |
7482 | lt_save_CC="$CC" | |
7483 | lt_save_CFLAGS="$CFLAGS" | |
7484 | AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
7485 | MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ | |
7486 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ | |
7487 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ | |
7488 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ | |
7489 | deplibs_check_method="$deplibs_check_method" \ | |
7490 | file_magic_cmd="$file_magic_cmd" \ | |
7491 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ | |
7492 | --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \ | |
7493 | || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; } | |
7494 | CC="$lt_save_CC" | |
7495 | CFLAGS="$lt_save_CFLAGS" | |
7496 | ||
7497 | # Redirect the config.log output again, so that the ltconfig log is not | |
7498 | # clobbered by the next message. | |
7499 | exec 5>>./config.log | |
7500 | ||
7501 | ||
7502 | ||
7503 | ||
7504 | CPPFLAGS=$GCJ_SAVE_CPPFLAGS | |
7505 | ||
7506 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 | |
7160c99d | 7507 | echo "configure:7508: checking size of void *" >&5 |
5aac1dac | 7508 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
ee9dd372 TT |
7509 | echo $ac_n "(cached) $ac_c" 1>&6 |
7510 | else | |
5aac1dac | 7511 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ee9dd372 | 7512 | cat > conftest.$ac_ext <<EOF |
7160c99d | 7513 | #line 7514 "configure" |
ee9dd372 | 7514 | #include "confdefs.h" |
5aac1dac TT |
7515 | #include "confdefs.h" |
7516 | #include <sys/types.h> | |
7517 | ||
7518 | ||
ee9dd372 | 7519 | int main() { |
5aac1dac | 7520 | switch (0) case 0: case (sizeof (void *) == $ac_size):; |
ee9dd372 TT |
7521 | ; return 0; } |
7522 | EOF | |
7160c99d | 7523 | if { (eval echo configure:7524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ee9dd372 | 7524 | rm -rf conftest* |
5aac1dac | 7525 | ac_cv_sizeof_void_p=$ac_size |
ee9dd372 TT |
7526 | else |
7527 | echo "configure: failed program was:" >&5 | |
7528 | cat conftest.$ac_ext >&5 | |
ee9dd372 TT |
7529 | fi |
7530 | rm -f conftest* | |
5aac1dac TT |
7531 | if test x$ac_cv_sizeof_void_p != x ; then break; fi |
7532 | done | |
7533 | ||
ee9dd372 TT |
7534 | fi |
7535 | ||
5aac1dac TT |
7536 | if test x$ac_cv_sizeof_void_p = x ; then |
7537 | { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; } | |
7538 | fi | |
7539 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 | |
7540 | cat >> confdefs.h <<EOF | |
7541 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
ee9dd372 TT |
7542 | EOF |
7543 | ||
5aac1dac TT |
7544 | |
7545 | ||
7546 | ZLIBS= | |
7547 | SYS_ZLIBS= | |
7548 | ZINCS= | |
7549 | ||
7550 | if test -z "$ZLIBSPEC"; then | |
7551 | # Use zlib from the GCC tree. | |
7552 | ZINCS='-I$(top_srcdir)/../zlib' | |
7553 | ZLIBS=../zlib/libzgcj_convenience.la | |
7554 | else | |
7555 | # System's zlib. | |
7556 | SYS_ZLIBS="$ZLIBSPEC" | |
ee9dd372 TT |
7557 | fi |
7558 | ||
5aac1dac TT |
7559 | |
7560 | ||
7561 | ||
7562 | ||
7563 | ||
7564 | ||
7565 | ||
7566 | ||
c4ebd83d | 7567 | |
5aac1dac TT |
7568 | if test "$CANADIAN" = yes; then |
7569 | CANADIAN_TRUE= | |
7570 | CANADIAN_FALSE='#' | |
ee9dd372 | 7571 | else |
5aac1dac TT |
7572 | CANADIAN_TRUE='#' |
7573 | CANADIAN_FALSE= | |
7574 | fi | |
ee9dd372 | 7575 | |
ee9dd372 | 7576 | |
5aac1dac TT |
7577 | if test "$NULL_TARGET" = yes; then |
7578 | NULL_TARGET_TRUE= | |
7579 | NULL_TARGET_FALSE='#' | |
ee9dd372 | 7580 | else |
5aac1dac TT |
7581 | NULL_TARGET_TRUE='#' |
7582 | NULL_TARGET_FALSE= | |
ee9dd372 | 7583 | fi |
5aac1dac TT |
7584 | |
7585 | ||
7586 | if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then | |
7587 | NATIVE_TRUE= | |
7588 | NATIVE_FALSE='#' | |
7589 | else | |
7590 | NATIVE_TRUE='#' | |
7591 | NATIVE_FALSE= | |
ee9dd372 TT |
7592 | fi |
7593 | ||
ee9dd372 | 7594 | |
5aac1dac TT |
7595 | if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then |
7596 | NEEDS_DATA_START_TRUE= | |
7597 | NEEDS_DATA_START_FALSE='#' | |
7598 | else | |
7599 | NEEDS_DATA_START_TRUE='#' | |
7600 | NEEDS_DATA_START_FALSE= | |
ee9dd372 TT |
7601 | fi |
7602 | ||
5aac1dac TT |
7603 | |
7604 | if test -n "$with_cross_host" && | |
7605 | test x"$with_cross_host" != x"no"; then | |
7606 | toolexecdir='$(exec_prefix)/$(target_alias)' | |
7607 | toolexecmainlibdir='$(toolexecdir)/lib' | |
7608 | else | |
7609 | toolexecdir='$(libdir)/gcc-lib/$(target_alias)' | |
7610 | toolexecmainlibdir='$(libdir)' | |
7611 | fi | |
ff8b9ca8 AS |
7612 | multi_os_directory=`$CC -print-multi-os-directory` |
7613 | case $multi_os_directory in | |
7614 | .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /. | |
7615 | *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;; | |
7616 | esac | |
5aac1dac TT |
7617 | |
7618 | ||
7619 | ||
7620 | ||
7621 | # Determine gcj version number. | |
7622 | ||
7623 | gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'` | |
7624 | ||
7625 | GCJVERSION=$gcjversion | |
7626 | ||
7627 | cat >> confdefs.h <<EOF | |
7628 | #define GCJVERSION "$GCJVERSION" | |
ee9dd372 TT |
7629 | EOF |
7630 | ||
7631 | ||
5aac1dac | 7632 | echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6 |
7160c99d | 7633 | echo "configure:7634: checking for g++ -ffloat-store bug" >&5 |
5aac1dac TT |
7634 | save_CFLAGS="$CFLAGS" |
7635 | CFLAGS="-x c++ -O2 -ffloat-store" | |
7636 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7637 | #line 7638 "configure" |
5aac1dac TT |
7638 | #include "confdefs.h" |
7639 | #include <math.h> | |
7640 | int main() { | |
ee9dd372 | 7641 | |
5aac1dac | 7642 | ; return 0; } |
ee9dd372 | 7643 | EOF |
7160c99d | 7644 | if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ee9dd372 | 7645 | rm -rf conftest* |
5aac1dac | 7646 | echo "$ac_t""no" 1>&6 |
ee9dd372 | 7647 | else |
5aac1dac TT |
7648 | echo "configure: failed program was:" >&5 |
7649 | cat conftest.$ac_ext >&5 | |
ee9dd372 | 7650 | rm -rf conftest* |
5aac1dac TT |
7651 | cat >> confdefs.h <<\EOF |
7652 | #define __NO_MATH_INLINES 1 | |
7653 | EOF | |
ee9dd372 | 7654 | |
5aac1dac | 7655 | echo "$ac_t""yes" 1>&6 |
ee9dd372 | 7656 | fi |
5aac1dac TT |
7657 | rm -f conftest* |
7658 | CFLAGS="$save_CFLAGS" | |
ee9dd372 | 7659 | |
5aac1dac TT |
7660 | for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h pwd.h sys/config.h stdint.h langinfo.h locale.h |
7661 | do | |
7662 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
7663 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
7160c99d | 7664 | echo "configure:7665: checking for $ac_hdr" >&5 |
5aac1dac | 7665 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
ee9dd372 TT |
7666 | echo $ac_n "(cached) $ac_c" 1>&6 |
7667 | else | |
7668 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7669 | #line 7670 "configure" |
ee9dd372 | 7670 | #include "confdefs.h" |
5aac1dac | 7671 | #include <$ac_hdr> |
ee9dd372 | 7672 | EOF |
5aac1dac | 7673 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
7160c99d | 7674 | { (eval echo configure:7675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5aac1dac TT |
7675 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7676 | if test -z "$ac_err"; then | |
ee9dd372 | 7677 | rm -rf conftest* |
5aac1dac | 7678 | eval "ac_cv_header_$ac_safe=yes" |
ee9dd372 | 7679 | else |
5aac1dac | 7680 | echo "$ac_err" >&5 |
ee9dd372 TT |
7681 | echo "configure: failed program was:" >&5 |
7682 | cat conftest.$ac_ext >&5 | |
7683 | rm -rf conftest* | |
5aac1dac | 7684 | eval "ac_cv_header_$ac_safe=no" |
ee9dd372 TT |
7685 | fi |
7686 | rm -f conftest* | |
7687 | fi | |
5aac1dac | 7688 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
ee9dd372 | 7689 | echo "$ac_t""yes" 1>&6 |
5aac1dac | 7690 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
ee9dd372 | 7691 | cat >> confdefs.h <<EOF |
5aac1dac | 7692 | #define $ac_tr_hdr 1 |
ee9dd372 | 7693 | EOF |
5aac1dac | 7694 | |
ee9dd372 TT |
7695 | else |
7696 | echo "$ac_t""no" 1>&6 | |
7697 | fi | |
ee9dd372 | 7698 | done |
ee9dd372 | 7699 | |
5aac1dac TT |
7700 | for ac_hdr in dirent.h |
7701 | do | |
7702 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
7703 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
7160c99d | 7704 | echo "configure:7705: checking for $ac_hdr" >&5 |
5aac1dac | 7705 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
ee9dd372 | 7706 | echo $ac_n "(cached) $ac_c" 1>&6 |
ee9dd372 TT |
7707 | else |
7708 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7709 | #line 7710 "configure" |
ee9dd372 | 7710 | #include "confdefs.h" |
5aac1dac | 7711 | #include <$ac_hdr> |
ee9dd372 | 7712 | EOF |
5aac1dac | 7713 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
7160c99d | 7714 | { (eval echo configure:7715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5aac1dac TT |
7715 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7716 | if test -z "$ac_err"; then | |
7717 | rm -rf conftest* | |
7718 | eval "ac_cv_header_$ac_safe=yes" | |
ee9dd372 | 7719 | else |
5aac1dac | 7720 | echo "$ac_err" >&5 |
ee9dd372 TT |
7721 | echo "configure: failed program was:" >&5 |
7722 | cat conftest.$ac_ext >&5 | |
5aac1dac TT |
7723 | rm -rf conftest* |
7724 | eval "ac_cv_header_$ac_safe=no" | |
ee9dd372 | 7725 | fi |
5aac1dac | 7726 | rm -f conftest* |
ee9dd372 | 7727 | fi |
5aac1dac TT |
7728 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
7729 | echo "$ac_t""yes" 1>&6 | |
7730 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
7731 | cat >> confdefs.h <<EOF | |
7732 | #define $ac_tr_hdr 1 | |
ee9dd372 | 7733 | EOF |
5aac1dac TT |
7734 | |
7735 | else | |
7736 | echo "$ac_t""no" 1>&6 | |
ee9dd372 | 7737 | fi |
5aac1dac | 7738 | done |
ee9dd372 | 7739 | |
5aac1dac | 7740 | for ac_hdr in inttypes.h |
ee9dd372 | 7741 | do |
5aac1dac TT |
7742 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
7743 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
7160c99d | 7744 | echo "configure:7745: checking for $ac_hdr" >&5 |
5aac1dac | 7745 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
ee9dd372 TT |
7746 | echo $ac_n "(cached) $ac_c" 1>&6 |
7747 | else | |
5aac1dac | 7748 | cat > conftest.$ac_ext <<EOF |
7160c99d | 7749 | #line 7750 "configure" |
5aac1dac TT |
7750 | #include "confdefs.h" |
7751 | #include <$ac_hdr> | |
7752 | EOF | |
7753 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7160c99d | 7754 | { (eval echo configure:7755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5aac1dac TT |
7755 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7756 | if test -z "$ac_err"; then | |
7757 | rm -rf conftest* | |
7758 | eval "ac_cv_header_$ac_safe=yes" | |
ee9dd372 | 7759 | else |
5aac1dac TT |
7760 | echo "$ac_err" >&5 |
7761 | echo "configure: failed program was:" >&5 | |
7762 | cat conftest.$ac_ext >&5 | |
7763 | rm -rf conftest* | |
7764 | eval "ac_cv_header_$ac_safe=no" | |
3cf88fb4 | 7765 | fi |
5aac1dac | 7766 | rm -f conftest* |
ee9dd372 | 7767 | fi |
5aac1dac TT |
7768 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
7769 | echo "$ac_t""yes" 1>&6 | |
7770 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
7771 | cat >> confdefs.h <<EOF | |
7772 | #define $ac_tr_hdr 1 | |
7773 | EOF | |
7774 | ||
7775 | cat >> confdefs.h <<\EOF | |
7776 | #define HAVE_INTTYPES_H 1 | |
7777 | EOF | |
7778 | ||
7779 | cat >> confdefs.h <<\EOF | |
7780 | #define JV_HAVE_INTTYPES_H 1 | |
7781 | EOF | |
ee9dd372 | 7782 | |
2622c79d | 7783 | |
2622c79d | 7784 | else |
5aac1dac TT |
7785 | echo "$ac_t""no" 1>&6 |
7786 | fi | |
7787 | done | |
7788 | ||
7789 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 | |
7160c99d | 7790 | echo "configure:7791: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
5aac1dac | 7791 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
2622c79d RR |
7792 | echo $ac_n "(cached) $ac_c" 1>&6 |
7793 | else | |
5aac1dac | 7794 | cat > conftest.$ac_ext <<EOF |
7160c99d | 7795 | #line 7796 "configure" |
5aac1dac TT |
7796 | #include "confdefs.h" |
7797 | #include <sys/types.h> | |
7798 | #include <sys/wait.h> | |
7799 | #ifndef WEXITSTATUS | |
7800 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
7801 | #endif | |
7802 | #ifndef WIFEXITED | |
7803 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
7804 | #endif | |
7805 | int main() { | |
7806 | int s; | |
7807 | wait (&s); | |
7808 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
7809 | ; return 0; } | |
2622c79d | 7810 | EOF |
7160c99d | 7811 | if { (eval echo configure:7812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5aac1dac TT |
7812 | rm -rf conftest* |
7813 | ac_cv_header_sys_wait_h=yes | |
7814 | else | |
7815 | echo "configure: failed program was:" >&5 | |
7816 | cat conftest.$ac_ext >&5 | |
7817 | rm -rf conftest* | |
7818 | ac_cv_header_sys_wait_h=no | |
7819 | fi | |
7820 | rm -f conftest* | |
2622c79d RR |
7821 | fi |
7822 | ||
5aac1dac TT |
7823 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 |
7824 | if test $ac_cv_header_sys_wait_h = yes; then | |
7825 | cat >> confdefs.h <<\EOF | |
7826 | #define HAVE_SYS_WAIT_H 1 | |
7827 | EOF | |
2622c79d | 7828 | |
5aac1dac TT |
7829 | fi |
7830 | ||
7831 | ||
7832 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
7160c99d | 7833 | echo "configure:7834: checking for ANSI C header files" >&5 |
5aac1dac TT |
7834 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
7835 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7836 | else | |
7837 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7838 | #line 7839 "configure" |
2622c79d | 7839 | #include "confdefs.h" |
5aac1dac TT |
7840 | #include <stdlib.h> |
7841 | #include <stdarg.h> | |
7842 | #include <string.h> | |
7843 | #include <float.h> | |
2622c79d RR |
7844 | EOF |
7845 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7160c99d | 7846 | { (eval echo configure:7847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2622c79d RR |
7847 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
7848 | if test -z "$ac_err"; then | |
7849 | rm -rf conftest* | |
5aac1dac | 7850 | ac_cv_header_stdc=yes |
2622c79d RR |
7851 | else |
7852 | echo "$ac_err" >&5 | |
7853 | echo "configure: failed program was:" >&5 | |
7854 | cat conftest.$ac_ext >&5 | |
7855 | rm -rf conftest* | |
5aac1dac | 7856 | ac_cv_header_stdc=no |
2622c79d RR |
7857 | fi |
7858 | rm -f conftest* | |
2622c79d | 7859 | |
5aac1dac TT |
7860 | if test $ac_cv_header_stdc = yes; then |
7861 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
7862 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7863 | #line 7864 "configure" |
5aac1dac TT |
7864 | #include "confdefs.h" |
7865 | #include <string.h> | |
7866 | EOF | |
7867 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7868 | egrep "memchr" >/dev/null 2>&1; then | |
7869 | : | |
7870 | else | |
7871 | rm -rf conftest* | |
7872 | ac_cv_header_stdc=no | |
7873 | fi | |
7874 | rm -f conftest* | |
2622c79d | 7875 | |
5aac1dac | 7876 | fi |
2622c79d | 7877 | |
5aac1dac TT |
7878 | if test $ac_cv_header_stdc = yes; then |
7879 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2622c79d | 7880 | cat > conftest.$ac_ext <<EOF |
7160c99d | 7881 | #line 7882 "configure" |
2622c79d | 7882 | #include "confdefs.h" |
5aac1dac | 7883 | #include <stdlib.h> |
2622c79d | 7884 | EOF |
5aac1dac TT |
7885 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
7886 | egrep "free" >/dev/null 2>&1; then | |
7887 | : | |
2622c79d | 7888 | else |
2622c79d | 7889 | rm -rf conftest* |
5aac1dac | 7890 | ac_cv_header_stdc=no |
2622c79d RR |
7891 | fi |
7892 | rm -f conftest* | |
2622c79d | 7893 | |
5aac1dac TT |
7894 | fi |
7895 | ||
7896 | if test $ac_cv_header_stdc = yes; then | |
7897 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
7898 | if test "$cross_compiling" = yes; then | |
7899 | : | |
7900 | else | |
7901 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7902 | #line 7903 "configure" |
5aac1dac TT |
7903 | #include "confdefs.h" |
7904 | #include <ctype.h> | |
7905 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7906 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7907 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
7908 | int main () { int i; for (i = 0; i < 256; i++) | |
7909 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
7910 | exit (0); } | |
7911 | ||
7912 | EOF | |
7160c99d | 7913 | if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5aac1dac TT |
7914 | then |
7915 | : | |
2622c79d | 7916 | else |
5aac1dac TT |
7917 | echo "configure: failed program was:" >&5 |
7918 | cat conftest.$ac_ext >&5 | |
7919 | rm -fr conftest* | |
7920 | ac_cv_header_stdc=no | |
2622c79d | 7921 | fi |
5aac1dac | 7922 | rm -fr conftest* |
2622c79d | 7923 | fi |
2622c79d | 7924 | |
5aac1dac | 7925 | fi |
2622c79d RR |
7926 | fi |
7927 | ||
5aac1dac TT |
7928 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
7929 | if test $ac_cv_header_stdc = yes; then | |
2622c79d | 7930 | cat >> confdefs.h <<\EOF |
5aac1dac | 7931 | #define STDC_HEADERS 1 |
2622c79d RR |
7932 | EOF |
7933 | ||
5aac1dac | 7934 | fi |
2622c79d | 7935 | |
5aac1dac | 7936 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
7160c99d | 7937 | echo "configure:7938: checking for ssize_t" >&5 |
5aac1dac TT |
7938 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
7939 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7940 | else | |
7941 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 7942 | #line 7943 "configure" |
2622c79d | 7943 | #include "confdefs.h" |
5aac1dac TT |
7944 | #include <sys/types.h> |
7945 | #if STDC_HEADERS | |
7946 | #include <stdlib.h> | |
7947 | #include <stddef.h> | |
7948 | #endif | |
2622c79d | 7949 | EOF |
5aac1dac TT |
7950 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
7951 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
2622c79d | 7952 | rm -rf conftest* |
5aac1dac | 7953 | ac_cv_type_ssize_t=yes |
2622c79d | 7954 | else |
2622c79d | 7955 | rm -rf conftest* |
5aac1dac | 7956 | ac_cv_type_ssize_t=no |
2622c79d RR |
7957 | fi |
7958 | rm -f conftest* | |
2622c79d | 7959 | |
5aac1dac TT |
7960 | fi |
7961 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 | |
7962 | if test $ac_cv_type_ssize_t = no; then | |
7963 | cat >> confdefs.h <<\EOF | |
7964 | #define ssize_t int | |
7965 | EOF | |
7966 | ||
7967 | fi | |
7968 | ||
2622c79d | 7969 | |
5aac1dac | 7970 | echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6 |
7160c99d | 7971 | echo "configure:7972: checking for in_addr_t" >&5 |
5aac1dac | 7972 | cat > conftest.$ac_ext <<EOF |
7160c99d | 7973 | #line 7974 "configure" |
5aac1dac TT |
7974 | #include "confdefs.h" |
7975 | #include <sys/types.h> | |
7976 | #if STDC_HEADERS | |
7977 | #include <stdlib.h> | |
7978 | #include <stddef.h> | |
7979 | #endif | |
7980 | #if HAVE_NETINET_IN_H | |
7981 | #include <netinet/in.h> | |
7982 | #endif | |
7983 | int main() { | |
7984 | in_addr_t foo; | |
2622c79d RR |
7985 | ; return 0; } |
7986 | EOF | |
7160c99d | 7987 | if { (eval echo configure:7988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2622c79d | 7988 | rm -rf conftest* |
5aac1dac TT |
7989 | cat >> confdefs.h <<\EOF |
7990 | #define HAVE_IN_ADDR_T 1 | |
7991 | EOF | |
7992 | ||
7993 | echo "$ac_t""yes" 1>&6 | |
2622c79d RR |
7994 | else |
7995 | echo "configure: failed program was:" >&5 | |
7996 | cat conftest.$ac_ext >&5 | |
7997 | rm -rf conftest* | |
5aac1dac | 7998 | echo "$ac_t""no" 1>&6 |
2622c79d RR |
7999 | fi |
8000 | rm -f conftest* | |
2622c79d | 8001 | |
5aac1dac | 8002 | echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6 |
7160c99d | 8003 | echo "configure:8004: checking whether struct ip_mreq is in netinet/in.h" >&5 |
2622c79d | 8004 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8005 | #line 8006 "configure" |
2622c79d | 8006 | #include "confdefs.h" |
5aac1dac | 8007 | #include <netinet/in.h> |
2622c79d | 8008 | int main() { |
5aac1dac | 8009 | struct ip_mreq mreq; |
2622c79d RR |
8010 | ; return 0; } |
8011 | EOF | |
7160c99d | 8012 | if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2622c79d | 8013 | rm -rf conftest* |
5aac1dac TT |
8014 | cat >> confdefs.h <<\EOF |
8015 | #define HAVE_STRUCT_IP_MREQ 1 | |
8016 | EOF | |
8017 | ||
8018 | echo "$ac_t""yes" 1>&6 | |
2622c79d RR |
8019 | else |
8020 | echo "configure: failed program was:" >&5 | |
8021 | cat conftest.$ac_ext >&5 | |
8022 | rm -rf conftest* | |
2622c79d RR |
8023 | echo "$ac_t""no" 1>&6 |
8024 | fi | |
5aac1dac | 8025 | rm -f conftest* |
2622c79d | 8026 | |
5aac1dac | 8027 | echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6 |
7160c99d | 8028 | echo "configure:8029: checking whether struct ipv6_mreq is in netinet/in.h" >&5 |
2622c79d | 8029 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8030 | #line 8031 "configure" |
2622c79d | 8031 | #include "confdefs.h" |
5aac1dac | 8032 | #include <netinet/in.h> |
2622c79d | 8033 | int main() { |
5aac1dac | 8034 | struct ipv6_mreq mreq6; |
2622c79d RR |
8035 | ; return 0; } |
8036 | EOF | |
7160c99d | 8037 | if { (eval echo configure:8038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2622c79d | 8038 | rm -rf conftest* |
5aac1dac TT |
8039 | cat >> confdefs.h <<\EOF |
8040 | #define HAVE_STRUCT_IPV6_MREQ 1 | |
8041 | EOF | |
8042 | ||
8043 | echo "$ac_t""yes" 1>&6 | |
2622c79d RR |
8044 | else |
8045 | echo "configure: failed program was:" >&5 | |
8046 | cat conftest.$ac_ext >&5 | |
8047 | rm -rf conftest* | |
2622c79d RR |
8048 | echo "$ac_t""no" 1>&6 |
8049 | fi | |
5aac1dac | 8050 | rm -f conftest* |
2622c79d | 8051 | |
5aac1dac | 8052 | echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6 |
7160c99d | 8053 | echo "configure:8054: checking whether struct sockaddr_in6 is in netinet/in.h" >&5 |
5aac1dac | 8054 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8055 | #line 8056 "configure" |
2622c79d | 8056 | #include "confdefs.h" |
5aac1dac | 8057 | #include <netinet/in.h> |
2622c79d | 8058 | int main() { |
5aac1dac | 8059 | struct sockaddr_in6 addr6; |
2622c79d RR |
8060 | ; return 0; } |
8061 | EOF | |
7160c99d | 8062 | if { (eval echo configure:8063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2622c79d | 8063 | rm -rf conftest* |
5aac1dac TT |
8064 | cat >> confdefs.h <<\EOF |
8065 | #define HAVE_INET6 1 | |
8066 | EOF | |
8067 | ||
8068 | echo "$ac_t""yes" 1>&6 | |
2622c79d RR |
8069 | else |
8070 | echo "configure: failed program was:" >&5 | |
8071 | cat conftest.$ac_ext >&5 | |
8072 | rm -rf conftest* | |
5aac1dac | 8073 | echo "$ac_t""no" 1>&6 |
2622c79d RR |
8074 | fi |
8075 | rm -f conftest* | |
2622c79d | 8076 | |
5aac1dac | 8077 | echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6 |
7160c99d | 8078 | echo "configure:8079: checking for socklen_t in sys/socket.h" >&5 |
5aac1dac | 8079 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8080 | #line 8081 "configure" |
5aac1dac TT |
8081 | #include "confdefs.h" |
8082 | #define _POSIX_PII_SOCKET | |
8083 | #include <sys/types.h> | |
8084 | #include <sys/socket.h> | |
8085 | int main() { | |
8086 | socklen_t x = 5; | |
8087 | ; return 0; } | |
8088 | EOF | |
7160c99d | 8089 | if { (eval echo configure:8090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5aac1dac TT |
8090 | rm -rf conftest* |
8091 | cat >> confdefs.h <<\EOF | |
8092 | #define HAVE_SOCKLEN_T 1 | |
8093 | EOF | |
8094 | ||
8095 | echo "$ac_t""yes" 1>&6 | |
2622c79d | 8096 | else |
5aac1dac TT |
8097 | echo "configure: failed program was:" >&5 |
8098 | cat conftest.$ac_ext >&5 | |
8099 | rm -rf conftest* | |
2622c79d RR |
8100 | echo "$ac_t""no" 1>&6 |
8101 | fi | |
5aac1dac | 8102 | rm -f conftest* |
2622c79d | 8103 | |
5aac1dac | 8104 | echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 |
7160c99d | 8105 | echo "configure:8106: checking for tm_gmtoff in struct tm" >&5 |
2622c79d | 8106 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8107 | #line 8108 "configure" |
2622c79d | 8108 | #include "confdefs.h" |
5aac1dac | 8109 | #include <time.h> |
2622c79d | 8110 | int main() { |
5aac1dac | 8111 | struct tm tim; tim.tm_gmtoff = 0; |
2622c79d RR |
8112 | ; return 0; } |
8113 | EOF | |
7160c99d | 8114 | if { (eval echo configure:8115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2622c79d | 8115 | rm -rf conftest* |
5aac1dac TT |
8116 | cat >> confdefs.h <<\EOF |
8117 | #define STRUCT_TM_HAS_GMTOFF 1 | |
8118 | EOF | |
8119 | ||
8120 | echo "$ac_t""yes" 1>&6 | |
2622c79d RR |
8121 | else |
8122 | echo "configure: failed program was:" >&5 | |
8123 | cat conftest.$ac_ext >&5 | |
8124 | rm -rf conftest* | |
2622c79d | 8125 | echo "$ac_t""no" 1>&6 |
5aac1dac | 8126 | echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6 |
7160c99d | 8127 | echo "configure:8128: checking for global timezone variable" >&5 |
5aac1dac | 8128 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8129 | #line 8130 "configure" |
5aac1dac TT |
8130 | #include "confdefs.h" |
8131 | #include <time.h> | |
8132 | int main() { | |
8133 | void i(){long z2 = 2*timezone;} | |
8134 | ; return 0; } | |
8135 | EOF | |
7160c99d | 8136 | if { (eval echo configure:8137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5aac1dac TT |
8137 | rm -rf conftest* |
8138 | cat >> confdefs.h <<\EOF | |
8139 | #define HAVE_TIMEZONE 1 | |
8140 | EOF | |
2622c79d | 8141 | |
5aac1dac | 8142 | echo "$ac_t""yes" 1>&6 |
2622c79d | 8143 | else |
5aac1dac TT |
8144 | echo "configure: failed program was:" >&5 |
8145 | cat conftest.$ac_ext >&5 | |
8146 | rm -rf conftest* | |
8147 | echo "$ac_t""no" 1>&6 | |
8148 | echo $ac_n "checking for global _timezone variable""... $ac_c" 1>&6 | |
7160c99d | 8149 | echo "configure:8150: checking for global _timezone variable" >&5 |
5aac1dac | 8150 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8151 | #line 8152 "configure" |
2622c79d | 8152 | #include "confdefs.h" |
5aac1dac | 8153 | #include <time.h> |
2622c79d | 8154 | int main() { |
5aac1dac | 8155 | long z2 = _timezone; |
2622c79d RR |
8156 | ; return 0; } |
8157 | EOF | |
7160c99d | 8158 | if { (eval echo configure:8159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2622c79d | 8159 | rm -rf conftest* |
5aac1dac TT |
8160 | cat >> confdefs.h <<\EOF |
8161 | #define HAVE_UNDERSCORE_TIMEZONE 1 | |
8162 | EOF | |
8163 | ||
8164 | echo "$ac_t""yes" 1>&6 | |
2622c79d RR |
8165 | else |
8166 | echo "configure: failed program was:" >&5 | |
8167 | cat conftest.$ac_ext >&5 | |
8168 | rm -rf conftest* | |
5aac1dac | 8169 | echo "$ac_t""no" 1>&6 |
2622c79d RR |
8170 | fi |
8171 | rm -f conftest* | |
8172 | fi | |
5aac1dac | 8173 | rm -f conftest* |
2622c79d | 8174 | fi |
5aac1dac | 8175 | rm -f conftest* |
2622c79d | 8176 | |
5aac1dac TT |
8177 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
8178 | # for constant arguments. Useless! | |
8179 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
7160c99d | 8180 | echo "configure:8181: checking for working alloca.h" >&5 |
5aac1dac | 8181 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
2622c79d RR |
8182 | echo $ac_n "(cached) $ac_c" 1>&6 |
8183 | else | |
5aac1dac | 8184 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8185 | #line 8186 "configure" |
2622c79d | 8186 | #include "confdefs.h" |
5aac1dac | 8187 | #include <alloca.h> |
2622c79d | 8188 | int main() { |
5aac1dac | 8189 | char *p = alloca(2 * sizeof(int)); |
2622c79d RR |
8190 | ; return 0; } |
8191 | EOF | |
7160c99d | 8192 | if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2622c79d | 8193 | rm -rf conftest* |
5aac1dac | 8194 | ac_cv_header_alloca_h=yes |
2622c79d RR |
8195 | else |
8196 | echo "configure: failed program was:" >&5 | |
8197 | cat conftest.$ac_ext >&5 | |
8198 | rm -rf conftest* | |
5aac1dac | 8199 | ac_cv_header_alloca_h=no |
2622c79d RR |
8200 | fi |
8201 | rm -f conftest* | |
2622c79d RR |
8202 | fi |
8203 | ||
5aac1dac TT |
8204 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 |
8205 | if test $ac_cv_header_alloca_h = yes; then | |
8206 | cat >> confdefs.h <<\EOF | |
8207 | #define HAVE_ALLOCA_H 1 | |
8208 | EOF | |
2622c79d | 8209 | |
5aac1dac TT |
8210 | fi |
8211 | ||
8212 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
7160c99d | 8213 | echo "configure:8214: checking for alloca" >&5 |
5aac1dac | 8214 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
2622c79d RR |
8215 | echo $ac_n "(cached) $ac_c" 1>&6 |
8216 | else | |
8217 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 8218 | #line 8219 "configure" |
2622c79d | 8219 | #include "confdefs.h" |
2622c79d | 8220 | |
5aac1dac TT |
8221 | #ifdef __GNUC__ |
8222 | # define alloca __builtin_alloca | |
2622c79d | 8223 | #else |
5aac1dac TT |
8224 | # ifdef _MSC_VER |
8225 | # include <malloc.h> | |
8226 | # define alloca _alloca | |
8227 | # else | |
8228 | # if HAVE_ALLOCA_H | |
8229 | # include <alloca.h> | |
8230 | # else | |
8231 | # ifdef _AIX | |
8232 | #pragma alloca | |
8233 | # else | |
8234 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
8235 | char *alloca (); | |
8236 | # endif | |
8237 | # endif | |
8238 | # endif | |
8239 | # endif | |
2622c79d RR |
8240 | #endif |
8241 | ||
5aac1dac TT |
8242 | int main() { |
8243 | char *p = (char *) alloca(1); | |
2622c79d RR |
8244 | ; return 0; } |
8245 | EOF | |
7160c99d | 8246 | if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2622c79d | 8247 | rm -rf conftest* |
5aac1dac | 8248 | ac_cv_func_alloca_works=yes |
2622c79d RR |
8249 | else |
8250 | echo "configure: failed program was:" >&5 | |
8251 | cat conftest.$ac_ext >&5 | |
8252 | rm -rf conftest* | |
5aac1dac | 8253 | ac_cv_func_alloca_works=no |
2622c79d RR |
8254 | fi |
8255 | rm -f conftest* | |
8256 | fi | |
8257 | ||
5aac1dac TT |
8258 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
8259 | if test $ac_cv_func_alloca_works = yes; then | |
8260 | cat >> confdefs.h <<\EOF | |
8261 | #define HAVE_ALLOCA 1 | |
8262 | EOF | |
8263 | ||
2622c79d RR |
8264 | fi |
8265 | ||
5aac1dac TT |
8266 | if test $ac_cv_func_alloca_works = no; then |
8267 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
8268 | # that cause trouble. Some versions do not even contain alloca or | |
8269 | # contain a buggy version. If you still want to use their alloca, | |
8270 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
8271 | ALLOCA=alloca.${ac_objext} | |
8272 | cat >> confdefs.h <<\EOF | |
8273 | #define C_ALLOCA 1 | |
8274 | EOF | |
8275 | ||
8276 | ||
8277 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
7160c99d | 8278 | echo "configure:8279: checking whether alloca needs Cray hooks" >&5 |
5aac1dac | 8279 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
2622c79d RR |
8280 | echo $ac_n "(cached) $ac_c" 1>&6 |
8281 | else | |
5aac1dac | 8282 | cat > conftest.$ac_ext <<EOF |
7160c99d | 8283 | #line 8284 "configure" |
2622c79d | 8284 | #include "confdefs.h" |
5aac1dac TT |
8285 | #if defined(CRAY) && ! defined(CRAY2) |
8286 | webecray | |
8287 | #else | |
8288 | wenotbecray | |
8289 | #endif | |
2622c79d | 8290 | |
2622c79d | 8291 | EOF |
5aac1dac TT |
8292 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8293 | egrep "webecray" >/dev/null 2>&1; then | |
2622c79d | 8294 | rm -rf conftest* |
5aac1dac | 8295 | ac_cv_os_cray=yes |
2622c79d | 8296 | else |
2622c79d | 8297 | rm -rf conftest* |
5aac1dac | 8298 | ac_cv_os_cray=no |
2622c79d RR |
8299 | fi |
8300 | rm -f conftest* | |
2622c79d | 8301 | |
2622c79d RR |
8302 | fi |
8303 | ||
5aac1dac TT |
8304 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
8305 | if test $ac_cv_os_cray = yes; then | |
8306 | for ac_func in _getb67 GETB67 getb67; do | |
8307 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 8308 | echo "configure:8309: checking for $ac_func" >&5 |
5aac1dac | 8309 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2622c79d RR |
8310 | echo $ac_n "(cached) $ac_c" 1>&6 |
8311 | else | |
8312 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 8313 | #line 8314 "configure" |
2622c79d RR |
8314 | #include "confdefs.h" |
8315 | /* System header to define __stub macros and hopefully few prototypes, | |
5aac1dac | 8316 | which can conflict with char $ac_func(); below. */ |
2622c79d RR |
8317 | #include <assert.h> |
8318 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8319 | /* We use char because int might match the return type of a gcc2 | |
8320 | builtin and then its argument prototype would still apply. */ | |
5aac1dac | 8321 | char $ac_func(); |
2622c79d RR |
8322 | |
8323 | int main() { | |
8324 | ||
8325 | /* The GNU C library defines this for functions which it implements | |
8326 | to always fail with ENOSYS. Some functions are actually named | |
8327 | something starting with __ and the normal name is an alias. */ | |
5aac1dac | 8328 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
2622c79d RR |
8329 | choke me |
8330 | #else | |
5aac1dac | 8331 | $ac_func(); |
2622c79d RR |
8332 | #endif |
8333 | ||
8334 | ; return 0; } | |
8335 | EOF | |
7160c99d | 8336 | if { (eval echo configure:8337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2622c79d | 8337 | rm -rf conftest* |
5aac1dac | 8338 | eval "ac_cv_func_$ac_func=yes" |
2622c79d RR |
8339 | else |
8340 | echo "configure: failed program was:" >&5 | |
8341 | cat conftest.$ac_ext >&5 | |
8342 | rm -rf conftest* | |
5aac1dac | 8343 | eval "ac_cv_func_$ac_func=no" |
2622c79d RR |
8344 | fi |
8345 | rm -f conftest* | |
8346 | fi | |
8347 | ||
5aac1dac | 8348 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2622c79d | 8349 | echo "$ac_t""yes" 1>&6 |
5aac1dac TT |
8350 | cat >> confdefs.h <<EOF |
8351 | #define CRAY_STACKSEG_END $ac_func | |
8352 | EOF | |
8353 | ||
8354 | break | |
2622c79d RR |
8355 | else |
8356 | echo "$ac_t""no" 1>&6 | |
8357 | fi | |
8358 | ||
5aac1dac TT |
8359 | done |
8360 | fi | |
8361 | ||
8362 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
7160c99d | 8363 | echo "configure:8364: checking stack direction for C alloca" >&5 |
5aac1dac | 8364 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
2622c79d RR |
8365 | echo $ac_n "(cached) $ac_c" 1>&6 |
8366 | else | |
5aac1dac TT |
8367 | if test "$cross_compiling" = yes; then |
8368 | ac_cv_c_stack_direction=0 | |
8369 | else | |
8370 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 8371 | #line 8372 "configure" |
2622c79d | 8372 | #include "confdefs.h" |
5aac1dac TT |
8373 | find_stack_direction () |
8374 | { | |
8375 | static char *addr = 0; | |
8376 | auto char dummy; | |
8377 | if (addr == 0) | |
8378 | { | |
8379 | addr = &dummy; | |
8380 | return find_stack_direction (); | |
8381 | } | |
8382 | else | |
8383 | return (&dummy > addr) ? 1 : -1; | |
8384 | } | |
8385 | main () | |
8386 | { | |
8387 | exit (find_stack_direction() < 0); | |
8388 | } | |
2622c79d | 8389 | EOF |
7160c99d | 8390 | if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5aac1dac TT |
8391 | then |
8392 | ac_cv_c_stack_direction=1 | |
2622c79d RR |
8393 | else |
8394 | echo "configure: failed program was:" >&5 | |
8395 | cat conftest.$ac_ext >&5 | |
5aac1dac TT |
8396 | rm -fr conftest* |
8397 | ac_cv_c_stack_direction=-1 | |
8398 | fi | |
8399 | rm -fr conftest* | |
2622c79d | 8400 | fi |
2622c79d RR |
8401 | |
8402 | fi | |
5aac1dac TT |
8403 | |
8404 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
8405 | cat >> confdefs.h <<EOF | |
8406 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
8407 | EOF | |
8408 | ||
2622c79d RR |
8409 | fi |
8410 | ||
7160c99d | 8411 | for ac_hdr in unistd.h |
c0daa902 MK |
8412 | do |
8413 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
8414 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
7160c99d | 8415 | echo "configure:8416: checking for $ac_hdr" >&5 |
c0daa902 MK |
8416 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
8417 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8418 | else | |
8419 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 8420 | #line 8421 "configure" |
c0daa902 MK |
8421 | #include "confdefs.h" |
8422 | #include <$ac_hdr> | |
8423 | EOF | |
8424 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7160c99d | 8425 | { (eval echo configure:8426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c0daa902 MK |
8426 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
8427 | if test -z "$ac_err"; then | |
8428 | rm -rf conftest* | |
8429 | eval "ac_cv_header_$ac_safe=yes" | |
8430 | else | |
8431 | echo "$ac_err" >&5 | |
8432 | echo "configure: failed program was:" >&5 | |
8433 | cat conftest.$ac_ext >&5 | |
8434 | rm -rf conftest* | |
8435 | eval "ac_cv_header_$ac_safe=no" | |
8436 | fi | |
8437 | rm -f conftest* | |
8438 | fi | |
8439 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
8440 | echo "$ac_t""yes" 1>&6 | |
8441 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
8442 | cat >> confdefs.h <<EOF | |
8443 | #define $ac_tr_hdr 1 | |
8444 | EOF | |
8445 | ||
8446 | else | |
8447 | echo "$ac_t""no" 1>&6 | |
8448 | fi | |
8449 | done | |
8450 | ||
8451 | for ac_func in getpagesize | |
8452 | do | |
8453 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7160c99d | 8454 | echo "configure:8455: checking for $ac_func" >&5 |
c0daa902 MK |
8455 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
8456 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8457 | else | |
8458 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 8459 | #line 8460 "configure" |
c0daa902 MK |
8460 | #include "confdefs.h" |
8461 | /* System header to define __stub macros and hopefully few prototypes, | |
8462 | which can conflict with char $ac_func(); below. */ | |
8463 | #include <assert.h> | |
8464 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8465 | /* We use char because int might match the return type of a gcc2 | |
8466 | builtin and then its argument prototype would still apply. */ | |
8467 | char $ac_func(); | |
8468 | ||
8469 | int main() { | |
8470 | ||
8471 | /* The GNU C library defines this for functions which it implements | |
8472 | to always fail with ENOSYS. Some functions are actually named | |
8473 | something starting with __ and the normal name is an alias. */ | |
8474 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
8475 | choke me | |
8476 | #else | |
8477 | $ac_func(); | |
8478 | #endif | |
8479 | ||
8480 | ; return 0; } | |
8481 | EOF | |
7160c99d | 8482 | if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c0daa902 MK |
8483 | rm -rf conftest* |
8484 | eval "ac_cv_func_$ac_func=yes" | |
8485 | else | |
8486 | echo "configure: failed program was:" >&5 | |
8487 | cat conftest.$ac_ext >&5 | |
8488 | rm -rf conftest* | |
8489 | eval "ac_cv_func_$ac_func=no" | |
8490 | fi | |
8491 | rm -f conftest* | |
8492 | fi | |
8493 | ||
8494 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
8495 | echo "$ac_t""yes" 1>&6 | |
8496 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
8497 | cat >> confdefs.h <<EOF | |
8498 | #define $ac_tr_func 1 | |
8499 | EOF | |
8500 | ||
8501 | else | |
8502 | echo "$ac_t""no" 1>&6 | |
8503 | fi | |
8504 | done | |
8505 | ||
8506 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
7160c99d | 8507 | echo "configure:8508: checking for working mmap" >&5 |
c0daa902 MK |
8508 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
8509 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8510 | else | |
8511 | if test "$cross_compiling" = yes; then | |
8512 | ac_cv_func_mmap_fixed_mapped=no | |
8513 | else | |
8514 | cat > conftest.$ac_ext <<EOF | |
7160c99d | 8515 | #line 8516 "configure" |
c0daa902 MK |
8516 | #include "confdefs.h" |
8517 | ||
8518 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
8519 | Here is a matrix of mmap possibilities: | |
8520 | mmap private not fixed | |
8521 | mmap private fixed at somewhere currently unmapped | |
8522 | mmap private fixed at somewhere already mapped | |
8523 | mmap shared not fixed | |
8524 | mmap shared fixed at somewhere currently unmapped | |
8525 | mmap shared fixed at somewhere already mapped | |
8526 | For private mappings, we should verify that changes cannot be read() | |
8527 | back from the file, nor mmap's back from the file at a different | |
8528 | address. (There have been systems where private was not correctly | |
8529 | implemented like the infamous i386 svr4.0, and systems where the | |
8530 | VM page cache was not coherent with the filesystem buffer cache | |
8531 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
8532 | For shared mappings, we should conversely verify that changes get | |
8533 | propogated back to all the places they're supposed to be. | |
8534 | ||
8535 | Grep wants private fixed already mapped. | |
8536 | The main things grep needs to know about mmap are: | |
8537 | * does it exist and is it safe to write into the mmap'd area | |
8538 | * how to use it (BSD variants) */ | |
8539 | #include <sys/types.h> | |
8540 | #include <fcntl.h> | |
8541 | #include <sys/mman.h> | |
8542 | ||
8543 | /* This mess was copied from the GNU getpagesize.h. */ | |
8544 | #ifndef HAVE_GETPAGESIZE | |
7160c99d RO |
8545 | # ifdef HAVE_UNISTD_H |
8546 | # include <unistd.h> | |
8547 | # endif | |
c0daa902 MK |
8548 | |
8549 | /* Assume that all systems that can run configure have sys/param.h. */ | |
8550 | # ifndef HAVE_SYS_PARAM_H | |
8551 | # define HAVE_SYS_PARAM_H 1 | |
8552 | # endif | |
8553 | ||
8554 | # ifdef _SC_PAGESIZE | |
8555 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
8556 | # else /* no _SC_PAGESIZE */ | |
8557 | # ifdef HAVE_SYS_PARAM_H | |
8558 | # include <sys/param.h> | |
8559 | # ifdef EXEC_PAGESIZE | |
8560 | # define getpagesize() EXEC_PAGESIZE | |
8561 | # else /* no EXEC_PAGESIZE */ | |
8562 | # ifdef NBPG | |
8563 | # define getpagesize() NBPG * CLSIZE | |
8564 | # ifndef CLSIZE | |
8565 | # define CLSIZE 1 | |
8566 | # endif /* no CLSIZE */ | |
8567 | # else /* no NBPG */ | |
8568 | # ifdef NBPC | |
8569 | # define getpagesize() NBPC | |
8570 | # else /* no NBPC */ | |
8571 | # ifdef PAGESIZE | |
8572 | # define getpagesize() PAGESIZE | |
8573 | # endif /* PAGESIZE */ | |
8574 | # endif /* no NBPC */ | |
8575 | # endif /* no NBPG */ | |
8576 | # endif /* no EXEC_PAGESIZE */ | |
8577 | # else /* no HAVE_SYS_PARAM_H */ | |
8578 | # define getpagesize() 8192 /* punt totally */ | |
8579 | # endif /* no HAVE_SYS_PARAM_H */ | |
8580 | # endif /* no _SC_PAGESIZE */ | |
8581 | ||
8582 | #endif /* no HAVE_GETPAGESIZE */ | |
8583 | ||
8584 | #ifdef __cplusplus | |
8585 | extern "C" { void *malloc(unsigned); } | |
8586 | #else | |
8587 | char *malloc(); | |
8588 | #endif | |
8589 | ||
8590 | int | |
8591 | main() | |
8592 | { | |
8593 | char *data, *data2, *data3; | |
8594 | int i, pagesize; | |
8595 | int fd; | |
8596 | ||
8597 | pagesize = getpagesize(); | |
8598 | ||
8599 | /* | |
8600 | * First, make a file with some known garbage in it. | |
8601 | */ | |
8602 | data = malloc(pagesize); | |
8603 | if (!data) | |
8604 | exit(1); | |
8605 | for (i = 0; i < pagesize; ++i) | |
8606 | *(data + i) = rand(); | |
8607 | umask(0); | |
8608 | fd = creat("conftestmmap", 0600); | |
8609 | if (fd < 0) | |
8610 | exit(1); | |
8611 | if (write(fd, data, pagesize) != pagesize) | |
8612 | exit(1); | |
8613 | close(fd); | |
8614 | ||
8615 | /* | |
8616 | * Next, try to mmap the file at a fixed address which | |
8617 | * already has something else allocated at it. If we can, | |
8618 | * also make sure that we see the same garbage. | |
8619 | */ | |
8620 | fd = open("conftestmmap", O_RDWR); | |
8621 | if (fd < 0) | |
8622 | exit(1); | |
8623 | data2 = malloc(2 * pagesize); | |
8624 | if (!data2) | |
8625 | exit(1); | |
8626 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
8627 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
8628 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
8629 | exit(1); | |
8630 | for (i = 0; i < pagesize; ++i) | |
8631 | if (*(data + i) != *(data2 + i)) | |
8632 | exit(1); | |
8633 | ||
8634 | /* | |
8635 | * Finally, make sure that changes to the mapped area | |
8636 | * do not percolate back to the file as seen by read(). | |
8637 | * (This is a bug on some variants of i386 svr4.0.) | |
8638 | */ | |
8639 | for (i = 0; i < pagesize; ++i) | |
8640 | *(data2 + i) = *(data2 + i) + 1; | |
8641 | data3 = malloc(pagesize); | |
8642 | if (!data3) | |
8643 | exit(1); | |
8644 | if (read(fd, data3, pagesize) != pagesize) | |
8645 | exit(1); | |
8646 | for (i = 0; i < pagesize; ++i) | |
8647 | if (*(data + i) != *(data3 + i)) | |
8648 | exit(1); | |
8649 | close(fd); | |
8650 | unlink("conftestmmap"); | |
8651 | exit(0); | |
8652 | } | |
8653 | ||
8654 | EOF | |
7160c99d | 8655 | if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c0daa902 MK |
8656 | then |
8657 | ac_cv_func_mmap_fixed_mapped=yes | |
8658 | else | |
8659 | echo "configure: failed program was:" >&5 | |
8660 | cat conftest.$ac_ext >&5 | |
8661 | rm -fr conftest* | |
8662 | ac_cv_func_mmap_fixed_mapped=no | |
8663 | fi | |
8664 | rm -fr conftest* | |
8665 | fi | |
8666 | ||
8667 | fi | |
8668 | ||
8669 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
8670 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
8671 | cat >> confdefs.h <<\EOF | |
8672 | #define HAVE_MMAP 1 | |
8673 | EOF | |
8674 | ||
8675 | fi | |
8676 | ||
2622c79d | 8677 | |
5aac1dac TT |
8678 | for ac_prog in perl |
8679 | do | |
8680 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8681 | set dummy $ac_prog; ac_word=$2 | |
8682 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
7160c99d | 8683 | echo "configure:8684: checking for $ac_word" >&5 |
5aac1dac | 8684 | if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then |
2622c79d RR |
8685 | echo $ac_n "(cached) $ac_c" 1>&6 |
8686 | else | |
5aac1dac TT |
8687 | if test -n "$PERL"; then |
8688 | ac_cv_prog_PERL="$PERL" # Let the user override the test. | |
2622c79d | 8689 | else |
5aac1dac TT |
8690 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
8691 | ac_dummy="$PATH" | |
8692 | for ac_dir in $ac_dummy; do | |
8693 | test -z "$ac_dir" && ac_dir=. | |
8694 | if test -f $ac_dir/$ac_word; then | |
8695 | ac_cv_prog_PERL="$ac_prog" | |
8696 | break | |
8697 | fi | |
8698 | done | |
8699 | IFS="$ac_save_ifs" | |
2622c79d | 8700 | fi |
2622c79d | 8701 | fi |
5aac1dac TT |
8702 | PERL="$ac_cv_prog_PERL" |
8703 | if test -n "$PERL"; then | |
8704 | echo "$ac_t""$PERL" 1>&6 | |
2622c79d RR |
8705 | else |
8706 | echo "$ac_t""no" 1>&6 | |
8707 | fi | |
8708 | ||
5aac1dac TT |
8709 | test -n "$PERL" && break |
8710 | done | |
8711 | test -n "$PERL" || PERL="false" | |
2622c79d | 8712 | |
2622c79d | 8713 | |
5aac1dac | 8714 | SYSDEP_SOURCES= |
2622c79d | 8715 | |
5aac1dac TT |
8716 | case "${host}" in |
8717 | i?86-*-linux*) | |
8718 | SIGNAL_HANDLER=include/i386-signal.h | |
8719 | ;; | |
8720 | sparc*-sun-solaris*) | |
8721 | SIGNAL_HANDLER=include/sparc-signal.h | |
8722 | ;; | |
8723 | # ia64-*) | |
8724 | # SYSDEP_SOURCES=sysdep/ia64.c | |
8725 | # test -d sysdep || mkdir sysdep | |
8726 | # ;; | |
8727 | ia64-*-linux*) | |
8728 | SIGNAL_HANDLER=include/dwarf2-signal.h | |
8729 | ;; | |
8730 | powerpc-*-linux*) | |
beea2324 | 8731 | SIGNAL_HANDLER=include/powerpc-signal.h |
5aac1dac TT |
8732 | ;; |
8733 | alpha*-*-linux*) | |
8734 | SIGNAL_HANDLER=include/dwarf2-signal.h | |
8735 | ;; | |
8736 | s390*-*-linux*) | |
8737 | SIGNAL_HANDLER=include/s390-signal.h | |
8738 | ;; | |
8739 | x86_64*-*-linux*) | |
8740 | SIGNAL_HANDLER=include/x86_64-signal.h | |
8741 | ;; | |
8742 | sparc*-*-linux*) | |
8743 | SIGNAL_HANDLER=include/dwarf2-signal.h | |
8744 | ;; | |
8745 | sh-*-linux* | sh[34]*-*-linux*) | |
8746 | SIGNAL_HANDLER=include/dwarf2-signal.h | |
8747 | ;; | |
8748 | *mingw*) | |
8749 | SIGNAL_HANDLER=include/win32-signal.h | |
8750 | ;; | |
8751 | *) | |
8752 | SIGNAL_HANDLER=include/default-signal.h | |
8753 | ;; | |
8754 | esac | |
2622c79d | 8755 | |
5aac1dac TT |
8756 | # If we're using sjlj exceptions, forget what we just learned. |
8757 | if test "$enable_sjlj_exceptions" = yes; then | |
8758 | SIGNAL_HANDLER=include/default-signal.h | |
8759 | fi | |
2622c79d | 8760 | |
4b445d7c AH |
8761 | # Define here any compiler flags that you need in order to make backtrace() work. |
8762 | BACKTRACESPEC= | |
8763 | case "${host}" in | |
8764 | x86_64*-*-linux*) | |
8765 | BACKTRACESPEC=-fno-omit-frame-pointer | |
8766 | ;; | |
8767 | esac | |
8768 | ||
8769 | ||
5950e016 | 8770 | |
5950e016 BM |
8771 | |
8772 | ||
8773 | ||
5aac1dac TT |
8774 | if test "${multilib}" = "yes"; then |
8775 | multilib_arg="--enable-multilib" | |
2622c79d | 8776 | else |
5aac1dac | 8777 | multilib_arg= |
2622c79d RR |
8778 | fi |
8779 | ||
5950e016 | 8780 | |
5950e016 | 8781 | |
1e6347d8 | 8782 | here=`${PWDCMD-pwd}` |
ee9dd372 TT |
8783 | |
8784 | ||
7e0c895f TT |
8785 | # We get this from the environment. |
8786 | ||
480222b5 | 8787 | |
ee9dd372 TT |
8788 | trap '' 1 2 15 |
8789 | cat > confcache <<\EOF | |
8790 | # This file is a shell script that caches the results of configure | |
8791 | # tests run on this system so they can be shared between configure | |
8792 | # scripts and configure runs. It is not useful on other systems. | |
8793 | # If it contains results you don't want to keep, you may remove or edit it. | |
8794 | # | |
8795 | # By default, configure uses ./config.cache as the cache file, | |
8796 | # creating it if it does not exist already. You can give configure | |
8797 | # the --cache-file=FILE option to use a different cache file; that is | |
8798 | # what configure does when it calls configure scripts in | |
8799 | # subdirectories, so they share the cache. | |
8800 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8801 | # config.status only pays attention to the cache file if you give it the | |
8802 | # --recheck option to rerun configure. | |
8803 | # | |
8804 | EOF | |
8805 | # The following way of writing the cache mishandles newlines in values, | |
8806 | # but we know of no workaround that is simple, portable, and efficient. | |
8807 | # So, don't put newlines in cache variables' values. | |
8808 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8809 | # and sets the high bit in the cache file unless we assign to the vars. | |
8810 | (set) 2>&1 | | |
a3ffcff3 | 8811 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
ee9dd372 TT |
8812 | *ac_space=\ *) |
8813 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8814 | # turns \\\\ into \\, and sed turns \\ into \). | |
8815 | sed -n \ | |
8816 | -e "s/'/'\\\\''/g" \ | |
8817 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8818 | ;; | |
8819 | *) | |
8820 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8821 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8822 | ;; | |
8823 | esac >> confcache | |
8824 | if cmp -s $cache_file confcache; then | |
8825 | : | |
8826 | else | |
8827 | if test -w $cache_file; then | |
8828 | echo "updating cache $cache_file" | |
8829 | cat confcache > $cache_file | |
8830 | else | |
8831 | echo "not updating unwritable cache $cache_file" | |
8832 | fi | |
8833 | fi | |
8834 | rm -f confcache | |
8835 | ||
8836 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
8837 | ||
8838 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
8839 | # Let make expand exec_prefix. | |
8840 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8841 | ||
8842 | # Any assignment to VPATH causes Sun make to only execute | |
8843 | # the first set of double-colon rules, so remove it if not needed. | |
8844 | # If there is a colon in the path, we need to keep it. | |
8845 | if test "x$srcdir" = x.; then | |
8846 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
8847 | fi | |
8848 | ||
8849 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
8850 | ||
8851 | DEFS=-DHAVE_CONFIG_H | |
8852 | ||
8853 | # Without the "./", some shells look in PATH for config.status. | |
8854 | : ${CONFIG_STATUS=./config.status} | |
8855 | ||
8856 | echo creating $CONFIG_STATUS | |
8857 | rm -f $CONFIG_STATUS | |
8858 | cat > $CONFIG_STATUS <<EOF | |
8859 | #! /bin/sh | |
8860 | # Generated automatically by configure. | |
8861 | # Run this file to recreate the current configuration. | |
8862 | # This directory was configured as follows, | |
8863 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
8864 | # | |
8865 | # $0 $ac_configure_args | |
8866 | # | |
8867 | # Compiler output produced by configure, useful for debugging | |
8868 | # configure, is in ./config.log if it exists. | |
8869 | ||
8870 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
8871 | for ac_option | |
8872 | do | |
8873 | case "\$ac_option" in | |
8874 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8875 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8876 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8877 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
a3ffcff3 | 8878 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
ee9dd372 TT |
8879 | exit 0 ;; |
8880 | -help | --help | --hel | --he | --h) | |
8881 | echo "\$ac_cs_usage"; exit 0 ;; | |
8882 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8883 | esac | |
8884 | done | |
8885 | ||
8886 | ac_given_srcdir=$srcdir | |
8887 | ac_given_INSTALL="$INSTALL" | |
8888 | ||
7fbbd122 | 8889 | trap 'rm -fr `echo "Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile include/config.h gcj/libgcj-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
ee9dd372 TT |
8890 | EOF |
8891 | cat >> $CONFIG_STATUS <<EOF | |
8892 | ||
8893 | # Protect against being on the right side of a sed subst in config.status. | |
8894 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8895 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8896 | $ac_vpsub | |
8897 | $extrasub | |
8898 | s%@SHELL@%$SHELL%g | |
8899 | s%@CFLAGS@%$CFLAGS%g | |
8900 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8901 | s%@CXXFLAGS@%$CXXFLAGS%g | |
a3ffcff3 | 8902 | s%@FFLAGS@%$FFLAGS%g |
ee9dd372 TT |
8903 | s%@DEFS@%$DEFS%g |
8904 | s%@LDFLAGS@%$LDFLAGS%g | |
8905 | s%@LIBS@%$LIBS%g | |
8906 | s%@exec_prefix@%$exec_prefix%g | |
8907 | s%@prefix@%$prefix%g | |
8908 | s%@program_transform_name@%$program_transform_name%g | |
8909 | s%@bindir@%$bindir%g | |
8910 | s%@sbindir@%$sbindir%g | |
8911 | s%@libexecdir@%$libexecdir%g | |
8912 | s%@datadir@%$datadir%g | |
8913 | s%@sysconfdir@%$sysconfdir%g | |
8914 | s%@sharedstatedir@%$sharedstatedir%g | |
8915 | s%@localstatedir@%$localstatedir%g | |
8916 | s%@libdir@%$libdir%g | |
8917 | s%@includedir@%$includedir%g | |
8918 | s%@oldincludedir@%$oldincludedir%g | |
8919 | s%@infodir@%$infodir%g | |
8920 | s%@mandir@%$mandir%g | |
7f7ba9bf TT |
8921 | s%@LN_S@%$LN_S%g |
8922 | s%@libgcj_basedir@%$libgcj_basedir%g | |
fe3dac3d | 8923 | s%@mkinstalldirs@%$mkinstalldirs%g |
ee9dd372 TT |
8924 | s%@host@%$host%g |
8925 | s%@host_alias@%$host_alias%g | |
8926 | s%@host_cpu@%$host_cpu%g | |
8927 | s%@host_vendor@%$host_vendor%g | |
8928 | s%@host_os@%$host_os%g | |
8929 | s%@target@%$target%g | |
8930 | s%@target_alias@%$target_alias%g | |
8931 | s%@target_cpu@%$target_cpu%g | |
8932 | s%@target_vendor@%$target_vendor%g | |
8933 | s%@target_os@%$target_os%g | |
8934 | s%@build@%$build%g | |
8935 | s%@build_alias@%$build_alias%g | |
8936 | s%@build_cpu@%$build_cpu%g | |
8937 | s%@build_vendor@%$build_vendor%g | |
8938 | s%@build_os@%$build_os%g | |
158a8e6b | 8939 | s%@CC@%$CC%g |
e2ea015c | 8940 | s%@glibjava_CXX@%$glibjava_CXX%g |
eae63c0a | 8941 | s%@CXX@%$CXX%g |
ee9dd372 | 8942 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
a3ffcff3 | 8943 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
ee9dd372 TT |
8944 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
8945 | s%@PACKAGE@%$PACKAGE%g | |
8946 | s%@VERSION@%$VERSION%g | |
8947 | s%@ACLOCAL@%$ACLOCAL%g | |
8948 | s%@AUTOCONF@%$AUTOCONF%g | |
8949 | s%@AUTOMAKE@%$AUTOMAKE%g | |
8950 | s%@AUTOHEADER@%$AUTOHEADER%g | |
8951 | s%@MAKEINFO@%$MAKEINFO%g | |
8952 | s%@SET_MAKE@%$SET_MAKE%g | |
ee9dd372 TT |
8953 | s%@AS@%$AS%g |
8954 | s%@AR@%$AR%g | |
8955 | s%@RANLIB@%$RANLIB%g | |
8956 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g | |
8957 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
8958 | s%@MAINT@%$MAINT%g | |
9d577a61 | 8959 | s%@EXEEXT@%$EXEEXT%g |
ee9dd372 TT |
8960 | s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g |
8961 | s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g | |
8962 | s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g | |
7af85558 TT |
8963 | s%@INCLTDL@%$INCLTDL%g |
8964 | s%@LIBLTDL@%$LIBLTDL%g | |
8965 | s%@DIRLTDL@%$DIRLTDL%g | |
9d577a61 | 8966 | s%@OBJEXT@%$OBJEXT%g |
6d0860ee | 8967 | s%@STRIP@%$STRIP%g |
01b02b11 | 8968 | s%@LIBTOOL@%$LIBTOOL%g |
6d0860ee | 8969 | s%@CXXCPP@%$CXXCPP%g |
7af85558 | 8970 | s%@subdirs@%$subdirs%g |
ee9dd372 TT |
8971 | s%@COMPPATH@%$COMPPATH%g |
8972 | s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g | |
8973 | s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g | |
213858c0 | 8974 | s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g |
b2ae5f70 | 8975 | s%@INTERPRETER@%$INTERPRETER%g |
c8fb9813 AG |
8976 | s%@LIBFFI@%$LIBFFI%g |
8977 | s%@LIBFFIINCS@%$LIBFFIINCS%g | |
65c9eafb | 8978 | s%@PLATFORMOBJS@%$PLATFORMOBJS%g |
ee9dd372 | 8979 | s%@CPP@%$CPP%g |
f994389b | 8980 | s%@SYSTEMSPEC@%$SYSTEMSPEC%g |
0f9c645e | 8981 | s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g |
f994389b | 8982 | s%@ZLIBSPEC@%$ZLIBSPEC%g |
0f9c645e | 8983 | s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g |
5aac1dac TT |
8984 | s%@X_CFLAGS@%$X_CFLAGS%g |
8985 | s%@X_PRE_LIBS@%$X_PRE_LIBS%g | |
8986 | s%@X_LIBS@%$X_LIBS%g | |
8987 | s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g | |
8988 | s%@TOOLKIT@%$TOOLKIT%g | |
8989 | s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g | |
8990 | s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g | |
8991 | s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g | |
8992 | s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g | |
ee9dd372 TT |
8993 | s%@GCLIBS@%$GCLIBS%g |
8994 | s%@GCINCS@%$GCINCS%g | |
8995 | s%@GCDEPS@%$GCDEPS%g | |
8996 | s%@GCOBJS@%$GCOBJS%g | |
f994389b | 8997 | s%@GCSPEC@%$GCSPEC%g |
bf3b8e42 | 8998 | s%@JC1GCSPEC@%$JC1GCSPEC%g |
0f9c645e | 8999 | s%@GCTESTSPEC@%$GCTESTSPEC%g |
ee9dd372 TT |
9000 | s%@THREADLIBS@%$THREADLIBS%g |
9001 | s%@THREADINCS@%$THREADINCS%g | |
9002 | s%@THREADDEPS@%$THREADDEPS%g | |
9003 | s%@THREADOBJS@%$THREADOBJS%g | |
f994389b | 9004 | s%@THREADSPEC@%$THREADSPEC%g |
5c009209 | 9005 | s%@THREADLDFLAGS@%$THREADLDFLAGS%g |
620a329b | 9006 | s%@THREADCXXFLAGS@%$THREADCXXFLAGS%g |
cf6b8de4 | 9007 | s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g |
ee9dd372 TT |
9008 | s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g |
9009 | s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g | |
e2ea015c | 9010 | s%@tool_include_dir@%$tool_include_dir%g |
395cb211 | 9011 | s%@gcc_version@%$gcc_version%g |
860a1536 | 9012 | s%@LIBICONV@%$LIBICONV%g |
29e531ff | 9013 | s%@PKG_CONFIG@%$PKG_CONFIG%g |
5aac1dac TT |
9014 | s%@GTK_CFLAGS@%$GTK_CFLAGS%g |
9015 | s%@GTK_LIBS@%$GTK_LIBS%g | |
5aac1dac TT |
9016 | s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g |
9017 | s%@GLIB_LIBS@%$GLIB_LIBS%g | |
29e531ff TF |
9018 | s%@GLIB_GENMARSHAL@%$GLIB_GENMARSHAL%g |
9019 | s%@GOBJECT_QUERY@%$GOBJECT_QUERY%g | |
9020 | s%@GLIB_MKENUMS@%$GLIB_MKENUMS%g | |
5aac1dac TT |
9021 | s%@LIBART_CONFIG@%$LIBART_CONFIG%g |
9022 | s%@LIBART_CFLAGS@%$LIBART_CFLAGS%g | |
9023 | s%@LIBART_LIBS@%$LIBART_LIBS%g | |
58d2986d AO |
9024 | s%@GCJ@%$GCJ%g |
9025 | s%@GCJFLAGS@%$GCJFLAGS%g | |
f994389b | 9026 | s%@ZLIBS@%$ZLIBS%g |
ce3b24a7 | 9027 | s%@SYS_ZLIBS@%$SYS_ZLIBS%g |
41e0e0cd | 9028 | s%@ZINCS@%$ZINCS%g |
67a60018 | 9029 | s%@DIVIDESPEC@%$DIVIDESPEC%g |
5cb27a46 | 9030 | s%@CHECKREFSPEC@%$CHECKREFSPEC%g |
e529c2c1 | 9031 | s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g |
c4ebd83d | 9032 | s%@IEEESPEC@%$IEEESPEC%g |
ee9dd372 TT |
9033 | s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g |
9034 | s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g | |
9035 | s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g | |
9036 | s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g | |
9037 | s%@NATIVE_TRUE@%$NATIVE_TRUE%g | |
9038 | s%@NATIVE_FALSE@%$NATIVE_FALSE%g | |
7013e7cd AG |
9039 | s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g |
9040 | s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g | |
52a11cbf | 9041 | s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g |
dbf45a01 AO |
9042 | s%@toolexecdir@%$toolexecdir%g |
9043 | s%@toolexecmainlibdir@%$toolexecmainlibdir%g | |
9044 | s%@toolexeclibdir@%$toolexeclibdir%g | |
1b5a2139 | 9045 | s%@GCJVERSION@%$GCJVERSION%g |
ee9dd372 TT |
9046 | s%@ALLOCA@%$ALLOCA%g |
9047 | s%@PERL@%$PERL%g | |
4b445d7c | 9048 | s%@BACKTRACESPEC@%$BACKTRACESPEC%g |
6c80c45e | 9049 | s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g |
ee9dd372 TT |
9050 | s%@here@%$here%g |
9051 | ||
9052 | CEOF | |
9053 | EOF | |
9054 | ||
9055 | cat >> $CONFIG_STATUS <<\EOF | |
9056 | ||
9057 | # Split the substitutions into bite-sized pieces for seds with | |
9058 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
27a6ded9 | 9059 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
ee9dd372 TT |
9060 | ac_file=1 # Number of current file. |
9061 | ac_beg=1 # First line for current file. | |
9062 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
9063 | ac_more_lines=: | |
9064 | ac_sed_cmds="" | |
9065 | while $ac_more_lines; do | |
9066 | if test $ac_beg -gt 1; then | |
9067 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
9068 | else | |
9069 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
9070 | fi | |
9071 | if test ! -s conftest.s$ac_file; then | |
9072 | ac_more_lines=false | |
9073 | rm -f conftest.s$ac_file | |
9074 | else | |
9075 | if test -z "$ac_sed_cmds"; then | |
9076 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
9077 | else | |
9078 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
9079 | fi | |
9080 | ac_file=`expr $ac_file + 1` | |
9081 | ac_beg=$ac_end | |
9082 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
9083 | fi | |
9084 | done | |
9085 | if test -z "$ac_sed_cmds"; then | |
9086 | ac_sed_cmds=cat | |
9087 | fi | |
9088 | EOF | |
9089 | ||
9090 | cat >> $CONFIG_STATUS <<EOF | |
9091 | ||
7fbbd122 | 9092 | CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"} |
ee9dd372 TT |
9093 | EOF |
9094 | cat >> $CONFIG_STATUS <<\EOF | |
9095 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
9096 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9097 | case "$ac_file" in | |
9098 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9099 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9100 | *) ac_file_in="${ac_file}.in" ;; | |
9101 | esac | |
9102 | ||
9103 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
9104 | ||
9105 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9106 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9107 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9108 | # The file is in a subdirectory. | |
9109 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9110 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
9111 | # A "../" for each directory in $ac_dir_suffix. | |
9112 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
9113 | else | |
9114 | ac_dir_suffix= ac_dots= | |
9115 | fi | |
9116 | ||
9117 | case "$ac_given_srcdir" in | |
9118 | .) srcdir=. | |
9119 | if test -z "$ac_dots"; then top_srcdir=. | |
9120 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
9121 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
9122 | *) # Relative path. | |
9123 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
9124 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9125 | esac | |
9126 | ||
9127 | case "$ac_given_INSTALL" in | |
9128 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
9129 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
9130 | esac | |
9131 | ||
9132 | echo creating "$ac_file" | |
9133 | rm -f "$ac_file" | |
9134 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9135 | case "$ac_file" in | |
9136 | *Makefile*) ac_comsub="1i\\ | |
9137 | # $configure_input" ;; | |
9138 | *) ac_comsub= ;; | |
9139 | esac | |
9140 | ||
9141 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9142 | sed -e "$ac_comsub | |
9143 | s%@configure_input@%$configure_input%g | |
9144 | s%@srcdir@%$srcdir%g | |
9145 | s%@top_srcdir@%$top_srcdir%g | |
9146 | s%@INSTALL@%$INSTALL%g | |
9147 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
9148 | fi; done | |
9149 | rm -f conftest.s* | |
9150 | ||
9151 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9152 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9153 | # | |
9154 | # ac_d sets the value in "#define NAME VALUE" lines. | |
9155 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
9156 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9157 | ac_dC='\3' | |
9158 | ac_dD='%g' | |
9159 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9160 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9161 | ac_uB='\([ ]\)%\1#\2define\3' | |
9162 | ac_uC=' ' | |
9163 | ac_uD='\4%g' | |
9164 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9165 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9166 | ac_eB='$%\1#\2define\3' | |
9167 | ac_eC=' ' | |
9168 | ac_eD='%g' | |
9169 | ||
9170 | if test "${CONFIG_HEADERS+set}" != set; then | |
9171 | EOF | |
9172 | cat >> $CONFIG_STATUS <<EOF | |
3610e0d5 | 9173 | CONFIG_HEADERS="include/config.h gcj/libgcj-config.h" |
ee9dd372 TT |
9174 | EOF |
9175 | cat >> $CONFIG_STATUS <<\EOF | |
9176 | fi | |
9177 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
9178 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9179 | case "$ac_file" in | |
9180 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9181 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9182 | *) ac_file_in="${ac_file}.in" ;; | |
9183 | esac | |
9184 | ||
9185 | echo creating $ac_file | |
9186 | ||
9187 | rm -f conftest.frag conftest.in conftest.out | |
9188 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9189 | cat $ac_file_inputs > conftest.in | |
9190 | ||
9191 | EOF | |
9192 | ||
9193 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9194 | # the proper values into config.h.in to produce config.h. And first: | |
9195 | # Protect against being on the right side of a sed subst in config.status. | |
9196 | # Protect against being in an unquoted here document in config.status. | |
9197 | rm -f conftest.vals | |
9198 | cat > conftest.hdr <<\EOF | |
9199 | s/[\\&%]/\\&/g | |
9200 | s%[\\$`]%\\&%g | |
9201 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9202 | s%ac_d%ac_u%gp | |
9203 | s%ac_u%ac_e%gp | |
9204 | EOF | |
9205 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9206 | rm -f conftest.hdr | |
9207 | ||
9208 | # This sed command replaces #undef with comments. This is necessary, for | |
9209 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9210 | # on some systems where configure will not decide to define it. | |
9211 | cat >> conftest.vals <<\EOF | |
9212 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9213 | EOF | |
9214 | ||
9215 | # Break up conftest.vals because some shells have a limit on | |
9216 | # the size of here documents, and old seds have small limits too. | |
9217 | ||
9218 | rm -f conftest.tail | |
9219 | while : | |
9220 | do | |
9221 | ac_lines=`grep -c . conftest.vals` | |
9222 | # grep -c gives empty output for an empty file on some AIX systems. | |
9223 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9224 | # Write a limited-size here document to conftest.frag. | |
9225 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9226 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
9227 | echo 'CEOF | |
9228 | sed -f conftest.frag conftest.in > conftest.out | |
9229 | rm -f conftest.in | |
9230 | mv conftest.out conftest.in | |
9231 | ' >> $CONFIG_STATUS | |
9232 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9233 | rm -f conftest.vals | |
9234 | mv conftest.tail conftest.vals | |
9235 | done | |
9236 | rm -f conftest.vals | |
9237 | ||
9238 | cat >> $CONFIG_STATUS <<\EOF | |
9239 | rm -f conftest.frag conftest.h | |
9240 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9241 | cat conftest.in >> conftest.h | |
9242 | rm -f conftest.in | |
9243 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9244 | echo "$ac_file is unchanged" | |
9245 | rm -f conftest.h | |
9246 | else | |
9247 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9248 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9249 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9250 | # The file is in a subdirectory. | |
9251 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9252 | fi | |
9253 | rm -f $ac_file | |
9254 | mv conftest.h $ac_file | |
9255 | fi | |
9256 | fi; done | |
9257 | ||
9258 | EOF | |
9259 | ||
9260 | cat >> $CONFIG_STATUS <<EOF | |
9b5f18b1 | 9261 | ac_sources="include/$PLATFORMH java/io/natFile${FILE-${PLATFORM}}.cc java/io/natFileDescriptor${FILE-${PLATFORM}}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc java/net/natInetAddress${PLATFORMNET}.cc java/net/natNetworkInterface${PLATFORMNET}.cc java/net/natPlainSocketImpl${PLATFORMNET}.cc java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER" |
71a15b15 | 9262 | ac_dests="include/platform.h java/io/natFile.cc java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc java/net/natInetAddress.cc java/net/natNetworkInterface.cc java/net/natPlainSocketImpl.cc java/net/natPlainDatagramSocketImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h" |
ee9dd372 TT |
9263 | EOF |
9264 | ||
9265 | cat >> $CONFIG_STATUS <<\EOF | |
9266 | srcdir=$ac_given_srcdir | |
9267 | while test -n "$ac_sources"; do | |
9268 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
9269 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
9270 | ||
9271 | echo "linking $srcdir/$ac_source to $ac_dest" | |
9272 | ||
9273 | if test ! -r $srcdir/$ac_source; then | |
9274 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
9275 | fi | |
9276 | rm -f $ac_dest | |
9277 | ||
9278 | # Make relative symlinks. | |
9279 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9280 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
9281 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
9282 | # The dest file is in a subdirectory. | |
9283 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
9284 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
9285 | # A "../" for each directory in $ac_dest_dir_suffix. | |
9286 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
9287 | else | |
9288 | ac_dest_dir_suffix= ac_dots= | |
9289 | fi | |
9290 | ||
9291 | case "$srcdir" in | |
9292 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
9293 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
9294 | esac | |
9295 | ||
9296 | # Make a symlink if possible; otherwise try a hard link. | |
9297 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
9298 | ln $srcdir/$ac_source $ac_dest; then : | |
9299 | else | |
9300 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
9301 | fi | |
9302 | done | |
9303 | EOF | |
9304 | cat >> $CONFIG_STATUS <<EOF | |
9d577a61 | 9305 | |
ee9dd372 TT |
9306 | srcdir=${srcdir} |
9307 | host=${host} | |
9308 | target=${target} | |
9309 | with_multisubdir=${with_multisubdir} | |
9310 | ac_configure_args="${multilib_arg} ${ac_configure_args}" | |
9311 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
9312 | libgcj_basedir=${libgcj_basedir} | |
9313 | CC="${CC}" | |
9314 | CXX="${CXX}" | |
3343fdd2 | 9315 | ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" |
ee9dd372 TT |
9316 | |
9317 | EOF | |
9318 | cat >> $CONFIG_STATUS <<\EOF | |
9d577a61 TT |
9319 | am_indx=1 |
9320 | for am_file in include/config.h gcj/libgcj-config.h; do | |
9321 | case " $CONFIG_HEADERS " in | |
9322 | *" $am_file "*) | |
9323 | echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx | |
9324 | ;; | |
3610e0d5 | 9325 | esac |
9d577a61 | 9326 | am_indx=`expr "$am_indx" + 1` |
3610e0d5 | 9327 | done |
eb019738 TT |
9328 | # Only add multilib support code if we just rebuilt top-level Makefile. |
9329 | case " $CONFIG_FILES " in | |
9330 | *" Makefile "*) | |
6706f116 | 9331 | LD="${ORIGINAL_LD_FOR_MULTILIBS}" |
eb019738 TT |
9332 | ac_file=Makefile . ${libgcj_basedir}/../config-ml.in |
9333 | ;; | |
9334 | esac | |
480222b5 TT |
9335 | |
9336 | # Make subdirectories and `.d' files. Look in both srcdir and | |
9337 | # builddir for the .java files. | |
1e6347d8 | 9338 | h=`${PWDCMD-pwd}` |
480222b5 | 9339 | : > deps.mk |
5aac1dac TT |
9340 | ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ; |
9341 | find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \ | |
480222b5 | 9342 | fgrep -v testsuite | \ |
5aac1dac | 9343 | sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \ |
480222b5 TT |
9344 | while read f; do |
9345 | echo "include $f" >> deps.mk | |
9346 | test -f $f || { | |
9347 | ||
9348 | d=`echo $f | sed -e 's,/[^/]*$,,'` | |
9349 | ||
9dd668d2 BM |
9350 | if test ! -d $d; then |
9351 | $libgcj_basedir/../mkinstalldirs $d | |
9352 | fi; | |
583e347f | 9353 | echo > $f |
480222b5 TT |
9354 | } |
9355 | done | |
9356 | ||
ee9dd372 TT |
9357 | exit 0 |
9358 | EOF | |
9359 | chmod +x $CONFIG_STATUS | |
9360 | rm -fr confdefs* $ac_clean_files | |
9361 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
9362 | ||
7af85558 TT |
9363 | if test "$no_recursion" != yes; then |
9364 | ||
9365 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
9366 | ac_sub_configure_args= | |
9367 | ac_prev= | |
9368 | for ac_arg in $ac_configure_args; do | |
9369 | if test -n "$ac_prev"; then | |
9370 | ac_prev= | |
9371 | continue | |
9372 | fi | |
9373 | case "$ac_arg" in | |
9374 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
9375 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
9376 | ac_prev=cache_file ;; | |
9377 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
9378 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
9379 | ;; | |
9380 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
9381 | ac_prev=srcdir ;; | |
9382 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
9383 | ;; | |
9384 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
9385 | esac | |
9386 | done | |
9387 | ||
4f5a5d5c | 9388 | for ac_config_dir in $DIRLTDL; do |
7af85558 TT |
9389 | |
9390 | # Do not complain, so a configure script can configure whichever | |
9391 | # parts of a large source tree are present. | |
9392 | if test ! -d $srcdir/$ac_config_dir; then | |
9393 | continue | |
9394 | fi | |
9395 | ||
9396 | echo configuring in $ac_config_dir | |
9397 | ||
9398 | case "$srcdir" in | |
9399 | .) ;; | |
9400 | *) | |
9401 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
9402 | else | |
1518ec60 | 9403 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } |
7af85558 TT |
9404 | fi |
9405 | ;; | |
9406 | esac | |
9407 | ||
1518ec60 | 9408 | ac_popdir=`pwd` |
7af85558 TT |
9409 | cd $ac_config_dir |
9410 | ||
9411 | # A "../" for each directory in /$ac_config_dir. | |
9412 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
9413 | ||
9414 | case "$srcdir" in | |
9415 | .) # No --srcdir option. We are building in place. | |
9416 | ac_sub_srcdir=$srcdir ;; | |
9417 | /*) # Absolute path. | |
9418 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
9419 | *) # Relative path. | |
9420 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
9421 | esac | |
9422 | ||
9423 | # Check for guested configure; otherwise get Cygnus style configure. | |
9424 | if test -f $ac_sub_srcdir/configure; then | |
9425 | ac_sub_configure=$ac_sub_srcdir/configure | |
9426 | elif test -f $ac_sub_srcdir/configure.in; then | |
9427 | ac_sub_configure=$ac_configure | |
9428 | else | |
9429 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
9430 | ac_sub_configure= | |
9431 | fi | |
9432 | ||
9433 | # The recursion is here. | |
9434 | if test -n "$ac_sub_configure"; then | |
9435 | ||
9436 | # Make the cache file name correct relative to the subdirectory. | |
9437 | case "$cache_file" in | |
9438 | /*) ac_sub_cache_file=$cache_file ;; | |
9439 | *) # Relative path. | |
9440 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
9441 | esac | |
9442 | case "$ac_given_INSTALL" in | |
9443 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
9444 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
9445 | esac | |
9446 | ||
9447 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
9448 | # The eval makes quoting arguments work. | |
9449 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
9450 | then : | |
9451 | else | |
9452 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
9453 | fi | |
9454 | fi | |
9455 | ||
9456 | cd $ac_popdir | |
9457 | done | |
9458 | fi | |
9459 |