OSDN Git Service

Another newlib fix.
[pf3gnuchains/gcc-fork.git] / libjava / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-target-subdir=SUBDIR
16                            configuring in a subdirectory"
17 ac_help="$ac_help
18   --with-cross-host=HOST  configuring with a cross compiler"
19 ac_help="$ac_help
20   --with-newlib           Configuring with newlib"
21 ac_help="$ac_help
22   --enable-multilib       build many library versions (default)"
23 ac_help="$ac_help
24   --enable-maintainer-mode enable make rules and dependencies not useful
25                           (and sometimes confusing) to the casual installer"
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]"
30 ac_help="$ac_help
31   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
32 ac_help="$ac_help
33   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
34 ac_help="$ac_help
35   --disable-libtool-lock  avoid locking (might break parallel builds)"
36 ac_help="$ac_help
37   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
38 ac_help="$ac_help
39   --disable-getenv-properties
40                           don't set system properties from GCJ_PROPERTIES"
41 ac_help="$ac_help
42   --enable-hash-synchronization
43                           use global hash table for monitor locks"
44 ac_help="$ac_help
45   --enable-libgcj-multifile
46                           allow compilation of several files at once"
47 ac_help="$ac_help
48   --enable-libgcj-debug   enable runtime debugging code"
49 ac_help="$ac_help
50   --enable-interpreter    enable interpreter"
51 ac_help="$ac_help
52   --enable-sjlj-exceptions  force use of builtin_setjmp for exceptions"
53 ac_help="$ac_help
54   --disable-java-net      disable java.net"
55 ac_help="$ac_help
56   --without-libffi        don't use libffi"
57 ac_help="$ac_help
58   --disable-jvmpi         disable JVMPI support"
59 ac_help="$ac_help
60   --with-ecos             enable runtime eCos target support"
61 ac_help="$ac_help
62   --with-system-zlib      use installed libz"
63 ac_help="$ac_help
64   --with-x                use the X Window System"
65 ac_help="$ac_help
66   --enable-java-awt       list of AWT peer implementations to be built"
67 ac_help="$ac_help
68   --enable-java-gc=TYPE   choose garbage collector [boehm]"
69 ac_help="$ac_help
70   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
71 ac_help="$ac_help
72   --disable-gtktest       do not try to compile and run a test GTK+ program"
73 ac_help="$ac_help
74   --disable-glibtest      do not try to compile and run a test GLIB program"
75 ac_help="$ac_help
76   --with-libart-prefix=PFX   Prefix where LIBART is installed (optional)"
77 ac_help="$ac_help
78   --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)"
79 ac_help="$ac_help
80   --disable-libarttest       Do not try to compile and run a test LIBART program"
81
82 # Initialize some variables set by options.
83 # The variables have the same names as the options, with
84 # dashes changed to underlines.
85 build=NONE
86 cache_file=./config.cache
87 exec_prefix=NONE
88 host=NONE
89 no_create=
90 nonopt=NONE
91 no_recursion=
92 prefix=NONE
93 program_prefix=NONE
94 program_suffix=NONE
95 program_transform_name=s,x,x,
96 silent=
97 site=
98 srcdir=
99 target=NONE
100 verbose=
101 x_includes=NONE
102 x_libraries=NONE
103 bindir='${exec_prefix}/bin'
104 sbindir='${exec_prefix}/sbin'
105 libexecdir='${exec_prefix}/libexec'
106 datadir='${prefix}/share'
107 sysconfdir='${prefix}/etc'
108 sharedstatedir='${prefix}/com'
109 localstatedir='${prefix}/var'
110 libdir='${exec_prefix}/lib'
111 includedir='${prefix}/include'
112 oldincludedir='/usr/include'
113 infodir='${prefix}/info'
114 mandir='${prefix}/man'
115
116 # Initialize some other variables.
117 subdirs=
118 MFLAGS= MAKEFLAGS=
119 SHELL=${CONFIG_SHELL-/bin/sh}
120 # Maximum number of lines to put in a shell here document.
121 ac_max_here_lines=12
122
123 ac_prev=
124 for ac_option
125 do
126
127   # If the previous option needs an argument, assign it.
128   if test -n "$ac_prev"; then
129     eval "$ac_prev=\$ac_option"
130     ac_prev=
131     continue
132   fi
133
134   case "$ac_option" in
135   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
136   *) ac_optarg= ;;
137   esac
138
139   # Accept the important Cygnus configure options, so we can diagnose typos.
140
141   case "$ac_option" in
142
143   -bindir | --bindir | --bindi | --bind | --bin | --bi)
144     ac_prev=bindir ;;
145   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
146     bindir="$ac_optarg" ;;
147
148   -build | --build | --buil | --bui | --bu)
149     ac_prev=build ;;
150   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
151     build="$ac_optarg" ;;
152
153   -cache-file | --cache-file | --cache-fil | --cache-fi \
154   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
155     ac_prev=cache_file ;;
156   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
157   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
158     cache_file="$ac_optarg" ;;
159
160   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
161     ac_prev=datadir ;;
162   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
163   | --da=*)
164     datadir="$ac_optarg" ;;
165
166   -disable-* | --disable-*)
167     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
168     # Reject names that are not valid shell variable names.
169     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
170       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
171     fi
172     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
173     eval "enable_${ac_feature}=no" ;;
174
175   -enable-* | --enable-*)
176     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
177     # Reject names that are not valid shell variable names.
178     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
179       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
180     fi
181     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
182     case "$ac_option" in
183       *=*) ;;
184       *) ac_optarg=yes ;;
185     esac
186     eval "enable_${ac_feature}='$ac_optarg'" ;;
187
188   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
189   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
190   | --exec | --exe | --ex)
191     ac_prev=exec_prefix ;;
192   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
193   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
194   | --exec=* | --exe=* | --ex=*)
195     exec_prefix="$ac_optarg" ;;
196
197   -gas | --gas | --ga | --g)
198     # Obsolete; use --with-gas.
199     with_gas=yes ;;
200
201   -help | --help | --hel | --he)
202     # Omit some internal or obsolete options to make the list less imposing.
203     # This message is too long to be a string in the A/UX 3.1 sh.
204     cat << EOF
205 Usage: configure [options] [host]
206 Options: [defaults in brackets after descriptions]
207 Configuration:
208   --cache-file=FILE       cache test results in FILE
209   --help                  print this message
210   --no-create             do not create output files
211   --quiet, --silent       do not print \`checking...' messages
212   --version               print the version of autoconf that created configure
213 Directory and file names:
214   --prefix=PREFIX         install architecture-independent files in PREFIX
215                           [$ac_default_prefix]
216   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
217                           [same as prefix]
218   --bindir=DIR            user executables in DIR [EPREFIX/bin]
219   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
220   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
221   --datadir=DIR           read-only architecture-independent data in DIR
222                           [PREFIX/share]
223   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
224   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
225                           [PREFIX/com]
226   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
227   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
228   --includedir=DIR        C header files in DIR [PREFIX/include]
229   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
230   --infodir=DIR           info documentation in DIR [PREFIX/info]
231   --mandir=DIR            man documentation in DIR [PREFIX/man]
232   --srcdir=DIR            find the sources in DIR [configure dir or ..]
233   --program-prefix=PREFIX prepend PREFIX to installed program names
234   --program-suffix=SUFFIX append SUFFIX to installed program names
235   --program-transform-name=PROGRAM
236                           run sed PROGRAM on installed program names
237 EOF
238     cat << EOF
239 Host type:
240   --build=BUILD           configure for building on BUILD [BUILD=HOST]
241   --host=HOST             configure for HOST [guessed]
242   --target=TARGET         configure for TARGET [TARGET=HOST]
243 Features and packages:
244   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
245   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
246   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
247   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
248   --x-includes=DIR        X include files are in DIR
249   --x-libraries=DIR       X library files are in DIR
250 EOF
251     if test -n "$ac_help"; then
252       echo "--enable and --with options recognized:$ac_help"
253     fi
254     exit 0 ;;
255
256   -host | --host | --hos | --ho)
257     ac_prev=host ;;
258   -host=* | --host=* | --hos=* | --ho=*)
259     host="$ac_optarg" ;;
260
261   -includedir | --includedir | --includedi | --included | --include \
262   | --includ | --inclu | --incl | --inc)
263     ac_prev=includedir ;;
264   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
265   | --includ=* | --inclu=* | --incl=* | --inc=*)
266     includedir="$ac_optarg" ;;
267
268   -infodir | --infodir | --infodi | --infod | --info | --inf)
269     ac_prev=infodir ;;
270   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
271     infodir="$ac_optarg" ;;
272
273   -libdir | --libdir | --libdi | --libd)
274     ac_prev=libdir ;;
275   -libdir=* | --libdir=* | --libdi=* | --libd=*)
276     libdir="$ac_optarg" ;;
277
278   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
279   | --libexe | --libex | --libe)
280     ac_prev=libexecdir ;;
281   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
282   | --libexe=* | --libex=* | --libe=*)
283     libexecdir="$ac_optarg" ;;
284
285   -localstatedir | --localstatedir | --localstatedi | --localstated \
286   | --localstate | --localstat | --localsta | --localst \
287   | --locals | --local | --loca | --loc | --lo)
288     ac_prev=localstatedir ;;
289   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
290   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
291   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
292     localstatedir="$ac_optarg" ;;
293
294   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
295     ac_prev=mandir ;;
296   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
297     mandir="$ac_optarg" ;;
298
299   -nfp | --nfp | --nf)
300     # Obsolete; use --without-fp.
301     with_fp=no ;;
302
303   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
304   | --no-cr | --no-c)
305     no_create=yes ;;
306
307   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
308   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
309     no_recursion=yes ;;
310
311   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
312   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
313   | --oldin | --oldi | --old | --ol | --o)
314     ac_prev=oldincludedir ;;
315   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
316   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
317   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
318     oldincludedir="$ac_optarg" ;;
319
320   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
321     ac_prev=prefix ;;
322   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
323     prefix="$ac_optarg" ;;
324
325   -program-prefix | --program-prefix | --program-prefi | --program-pref \
326   | --program-pre | --program-pr | --program-p)
327     ac_prev=program_prefix ;;
328   -program-prefix=* | --program-prefix=* | --program-prefi=* \
329   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
330     program_prefix="$ac_optarg" ;;
331
332   -program-suffix | --program-suffix | --program-suffi | --program-suff \
333   | --program-suf | --program-su | --program-s)
334     ac_prev=program_suffix ;;
335   -program-suffix=* | --program-suffix=* | --program-suffi=* \
336   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
337     program_suffix="$ac_optarg" ;;
338
339   -program-transform-name | --program-transform-name \
340   | --program-transform-nam | --program-transform-na \
341   | --program-transform-n | --program-transform- \
342   | --program-transform | --program-transfor \
343   | --program-transfo | --program-transf \
344   | --program-trans | --program-tran \
345   | --progr-tra | --program-tr | --program-t)
346     ac_prev=program_transform_name ;;
347   -program-transform-name=* | --program-transform-name=* \
348   | --program-transform-nam=* | --program-transform-na=* \
349   | --program-transform-n=* | --program-transform-=* \
350   | --program-transform=* | --program-transfor=* \
351   | --program-transfo=* | --program-transf=* \
352   | --program-trans=* | --program-tran=* \
353   | --progr-tra=* | --program-tr=* | --program-t=*)
354     program_transform_name="$ac_optarg" ;;
355
356   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
357   | -silent | --silent | --silen | --sile | --sil)
358     silent=yes ;;
359
360   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
361     ac_prev=sbindir ;;
362   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
363   | --sbi=* | --sb=*)
364     sbindir="$ac_optarg" ;;
365
366   -sharedstatedir | --sharedstatedir | --sharedstatedi \
367   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
368   | --sharedst | --shareds | --shared | --share | --shar \
369   | --sha | --sh)
370     ac_prev=sharedstatedir ;;
371   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
372   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
373   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
374   | --sha=* | --sh=*)
375     sharedstatedir="$ac_optarg" ;;
376
377   -site | --site | --sit)
378     ac_prev=site ;;
379   -site=* | --site=* | --sit=*)
380     site="$ac_optarg" ;;
381
382   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
383     ac_prev=srcdir ;;
384   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
385     srcdir="$ac_optarg" ;;
386
387   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
388   | --syscon | --sysco | --sysc | --sys | --sy)
389     ac_prev=sysconfdir ;;
390   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
391   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
392     sysconfdir="$ac_optarg" ;;
393
394   -target | --target | --targe | --targ | --tar | --ta | --t)
395     ac_prev=target ;;
396   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
397     target="$ac_optarg" ;;
398
399   -v | -verbose | --verbose | --verbos | --verbo | --verb)
400     verbose=yes ;;
401
402   -version | --version | --versio | --versi | --vers)
403     echo "configure generated by autoconf version 2.13"
404     exit 0 ;;
405
406   -with-* | --with-*)
407     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
408     # Reject names that are not valid shell variable names.
409     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
410       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411     fi
412     ac_package=`echo $ac_package| sed 's/-/_/g'`
413     case "$ac_option" in
414       *=*) ;;
415       *) ac_optarg=yes ;;
416     esac
417     eval "with_${ac_package}='$ac_optarg'" ;;
418
419   -without-* | --without-*)
420     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
423       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
424     fi
425     ac_package=`echo $ac_package| sed 's/-/_/g'`
426     eval "with_${ac_package}=no" ;;
427
428   --x)
429     # Obsolete; use --with-x.
430     with_x=yes ;;
431
432   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
433   | --x-incl | --x-inc | --x-in | --x-i)
434     ac_prev=x_includes ;;
435   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
436   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
437     x_includes="$ac_optarg" ;;
438
439   -x-libraries | --x-libraries | --x-librarie | --x-librari \
440   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
441     ac_prev=x_libraries ;;
442   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
443   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
444     x_libraries="$ac_optarg" ;;
445
446   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
447     ;;
448
449   *)
450     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
451       echo "configure: warning: $ac_option: invalid host type" 1>&2
452     fi
453     if test "x$nonopt" != xNONE; then
454       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
455     fi
456     nonopt="$ac_option"
457     ;;
458
459   esac
460 done
461
462 if test -n "$ac_prev"; then
463   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
464 fi
465
466 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
467
468 # File descriptor usage:
469 # 0 standard input
470 # 1 file creation
471 # 2 errors and warnings
472 # 3 some systems may open it to /dev/tty
473 # 4 used on the Kubota Titan
474 # 6 checking for... messages and results
475 # 5 compiler messages saved in config.log
476 if test "$silent" = yes; then
477   exec 6>/dev/null
478 else
479   exec 6>&1
480 fi
481 exec 5>./config.log
482
483 echo "\
484 This file contains any messages produced by compilers while
485 running configure, to aid debugging if configure makes a mistake.
486 " 1>&5
487
488 # Strip out --no-create and --no-recursion so they do not pile up.
489 # Also quote any args containing shell metacharacters.
490 ac_configure_args=
491 for ac_arg
492 do
493   case "$ac_arg" in
494   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
495   | --no-cr | --no-c) ;;
496   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
497   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
498   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
499   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
500   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
501   esac
502 done
503
504 # NLS nuisances.
505 # Only set these to C if already set.  These must not be set unconditionally
506 # because not all systems understand e.g. LANG=C (notably SCO).
507 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
508 # Non-C LC_CTYPE values break the ctype check.
509 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
510 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
511 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
512 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
513
514 # confdefs.h avoids OS command line length limits that DEFS can exceed.
515 rm -rf conftest* confdefs.h
516 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
517 echo > confdefs.h
518
519 # A filename unique to this package, relative to the directory that
520 # configure is in, which we can look for to find out if srcdir is correct.
521 ac_unique_file=java/lang/System.java
522
523 # Find the source files, if location was not specified.
524 if test -z "$srcdir"; then
525   ac_srcdir_defaulted=yes
526   # Try the directory containing this script, then its parent.
527   ac_prog=$0
528   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
529   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
530   srcdir=$ac_confdir
531   if test ! -r $srcdir/$ac_unique_file; then
532     srcdir=..
533   fi
534 else
535   ac_srcdir_defaulted=no
536 fi
537 if test ! -r $srcdir/$ac_unique_file; then
538   if test "$ac_srcdir_defaulted" = yes; then
539     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
540   else
541     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
542   fi
543 fi
544 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
545
546 # Prefer explicitly selected file to automatically selected ones.
547 if test -z "$CONFIG_SITE"; then
548   if test "x$prefix" != xNONE; then
549     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
550   else
551     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
552   fi
553 fi
554 for ac_site_file in $CONFIG_SITE; do
555   if test -r "$ac_site_file"; then
556     echo "loading site script $ac_site_file"
557     . "$ac_site_file"
558   fi
559 done
560
561 if test -r "$cache_file"; then
562   echo "loading cache $cache_file"
563   . $cache_file
564 else
565   echo "creating cache $cache_file"
566   > $cache_file
567 fi
568
569 ac_ext=c
570 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
571 ac_cpp='$CPP $CPPFLAGS'
572 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
573 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
574 cross_compiling=$ac_cv_prog_cc_cross
575
576 ac_exeext=
577 ac_objext=o
578 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
579   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
580   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
581     ac_n= ac_c='
582 ' ac_t='        '
583   else
584     ac_n=-n ac_c= ac_t=
585   fi
586 else
587   ac_n= ac_c='\c' ac_t=
588 fi
589
590
591
592 # This works around the fact that libtool configuration may change LD
593 # for this particular configuration, but some shells, instead of
594 # keeping the changes in LD private, export them just because LD is
595 # exported.
596 ORIGINAL_LD_FOR_MULTILIBS=$LD
597
598 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
599 echo "configure:600: checking whether ln -s works" >&5
600 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
601   echo $ac_n "(cached) $ac_c" 1>&6
602 else
603   rm -f conftestdata
604 if ln -s X conftestdata 2>/dev/null
605 then
606   rm -f conftestdata
607   ac_cv_prog_LN_S="ln -s"
608 else
609   ac_cv_prog_LN_S=ln
610 fi
611 fi
612 LN_S="$ac_cv_prog_LN_S"
613 if test "$ac_cv_prog_LN_S" = "ln -s"; then
614   echo "$ac_t""yes" 1>&6
615 else
616   echo "$ac_t""no" 1>&6
617 fi
618
619
620 # Check whether --with-target-subdir or --without-target-subdir was given.
621 if test "${with_target_subdir+set}" = set; then
622   withval="$with_target_subdir"
623   :
624 fi
625
626 # Check whether --with-cross-host or --without-cross-host was given.
627 if test "${with_cross_host+set}" = set; then
628   withval="$with_cross_host"
629   :
630 fi
631
632
633 # Check whether --with-newlib or --without-newlib was given.
634 if test "${with_newlib+set}" = set; then
635   withval="$with_newlib"
636   :
637 fi
638
639
640 # Find a good install program.  We prefer a C program (faster),
641 # so one script is as good as another.  But avoid the broken or
642 # incompatible versions:
643 # SysV /etc/install, /usr/sbin/install
644 # SunOS /usr/etc/install
645 # IRIX /sbin/install
646 # AIX /bin/install
647 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
648 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
649 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
650 # ./install, which can be erroneously created by make from ./install.sh.
651 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
652 echo "configure:653: checking for a BSD compatible install" >&5
653 if test -z "$INSTALL"; then
654 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
655   echo $ac_n "(cached) $ac_c" 1>&6
656 else
657     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
658   for ac_dir in $PATH; do
659     # Account for people who put trailing slashes in PATH elements.
660     case "$ac_dir/" in
661     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
662     *)
663       # OSF1 and SCO ODT 3.0 have their own names for install.
664       # Don't use installbsd from OSF since it installs stuff as root
665       # by default.
666       for ac_prog in ginstall scoinst install; do
667         if test -f $ac_dir/$ac_prog; then
668           if test $ac_prog = install &&
669             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
670             # AIX install.  It has an incompatible calling convention.
671             :
672           else
673             ac_cv_path_install="$ac_dir/$ac_prog -c"
674             break 2
675           fi
676         fi
677       done
678       ;;
679     esac
680   done
681   IFS="$ac_save_IFS"
682
683 fi
684   if test "${ac_cv_path_install+set}" = set; then
685     INSTALL="$ac_cv_path_install"
686   else
687     # As a last resort, use the slow shell script.  We don't cache a
688     # path for INSTALL within a source directory, because that will
689     # break other packages using the cache if that directory is
690     # removed, or if the path is relative.
691     INSTALL="$ac_install_sh"
692   fi
693 fi
694 echo "$ac_t""$INSTALL" 1>&6
695
696 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
697 # It thinks the first close brace ends the variable substitution.
698 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
699
700 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
701
702 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
703
704 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
705 echo "configure:706: checking whether build environment is sane" >&5
706 # Just in case
707 sleep 1
708 echo timestamp > conftestfile
709 # Do `set' in a subshell so we don't clobber the current shell's
710 # arguments.  Must try -L first in case configure is actually a
711 # symlink; some systems play weird games with the mod time of symlinks
712 # (eg FreeBSD returns the mod time of the symlink's containing
713 # directory).
714 if (
715    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
716    if test "$*" = "X"; then
717       # -L didn't work.
718       set X `ls -t $srcdir/configure conftestfile`
719    fi
720    if test "$*" != "X $srcdir/configure conftestfile" \
721       && test "$*" != "X conftestfile $srcdir/configure"; then
722
723       # If neither matched, then we have a broken ls.  This can happen
724       # if, for instance, CONFIG_SHELL is bash and it inherits a
725       # broken ls alias from the environment.  This has actually
726       # happened.  Such a system could not be considered "sane".
727       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
728 alias in your environment" 1>&2; exit 1; }
729    fi
730
731    test "$2" = conftestfile
732    )
733 then
734    # Ok.
735    :
736 else
737    { echo "configure: error: newly created file is older than distributed files!
738 Check your system clock" 1>&2; exit 1; }
739 fi
740 rm -f conftest*
741 echo "$ac_t""yes" 1>&6
742 if test "$program_transform_name" = s,x,x,; then
743   program_transform_name=
744 else
745   # Double any \ or $.  echo might interpret backslashes.
746   cat <<\EOF_SED > conftestsed
747 s,\\,\\\\,g; s,\$,$$,g
748 EOF_SED
749   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
750   rm -f conftestsed
751 fi
752 test "$program_prefix" != NONE &&
753   program_transform_name="s,^,${program_prefix},; $program_transform_name"
754 # Use a double $ so make ignores it.
755 test "$program_suffix" != NONE &&
756   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
757
758 # sed with no file args requires a program.
759 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
760
761 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
762 echo "configure:763: checking whether ${MAKE-make} sets \${MAKE}" >&5
763 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
764 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
765   echo $ac_n "(cached) $ac_c" 1>&6
766 else
767   cat > conftestmake <<\EOF
768 all:
769         @echo 'ac_maketemp="${MAKE}"'
770 EOF
771 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
772 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
773 if test -n "$ac_maketemp"; then
774   eval ac_cv_prog_make_${ac_make}_set=yes
775 else
776   eval ac_cv_prog_make_${ac_make}_set=no
777 fi
778 rm -f conftestmake
779 fi
780 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
781   echo "$ac_t""yes" 1>&6
782   SET_MAKE=
783 else
784   echo "$ac_t""no" 1>&6
785   SET_MAKE="MAKE=${MAKE-make}"
786 fi
787
788 if test $host != $build; then
789   ac_tool_prefix=${host_alias}-
790 else
791   ac_tool_prefix=
792 fi
793
794 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
795 echo "configure:796: checking for Cygwin environment" >&5
796 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
797   echo $ac_n "(cached) $ac_c" 1>&6
798 else
799   cat > conftest.$ac_ext <<EOF
800 #line 801 "configure"
801 #include "confdefs.h"
802
803 int main() {
804
805 #ifndef __CYGWIN__
806 #define __CYGWIN__ __CYGWIN32__
807 #endif
808 return __CYGWIN__;
809 ; return 0; }
810 EOF
811 if { (eval echo configure:812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
812   rm -rf conftest*
813   ac_cv_cygwin=yes
814 else
815   echo "configure: failed program was:" >&5
816   cat conftest.$ac_ext >&5
817   rm -rf conftest*
818   ac_cv_cygwin=no
819 fi
820 rm -f conftest*
821 rm -f conftest*
822 fi
823
824 echo "$ac_t""$ac_cv_cygwin" 1>&6
825 CYGWIN=
826 test "$ac_cv_cygwin" = yes && CYGWIN=yes
827 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
828 echo "configure:829: checking for mingw32 environment" >&5
829 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832   cat > conftest.$ac_ext <<EOF
833 #line 834 "configure"
834 #include "confdefs.h"
835
836 int main() {
837 return __MINGW32__;
838 ; return 0; }
839 EOF
840 if { (eval echo configure:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
841   rm -rf conftest*
842   ac_cv_mingw32=yes
843 else
844   echo "configure: failed program was:" >&5
845   cat conftest.$ac_ext >&5
846   rm -rf conftest*
847   ac_cv_mingw32=no
848 fi
849 rm -f conftest*
850 rm -f conftest*
851 fi
852
853 echo "$ac_t""$ac_cv_mingw32" 1>&6
854 MINGW32=
855 test "$ac_cv_mingw32" = yes && MINGW32=yes
856
857 # Check whether --enable-multilib or --disable-multilib was given.
858 if test "${enable_multilib+set}" = set; then
859   enableval="$enable_multilib"
860   case "${enableval}" in
861   yes) multilib=yes ;;
862   no)  multilib=no ;;
863   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
864  esac
865 else
866   multilib=yes
867 fi
868
869
870 # When building with srcdir == objdir, links to the source files will
871 # be created in directories within the target_subdir.  We have to
872 # adjust toplevel_srcdir accordingly, so that configure finds
873 # install-sh and other auxiliary files that live in the top-level
874 # source directory.
875 if test "${srcdir}" = "."; then
876   if test -z "${with_target_subdir}"; then
877     toprel=".."
878   else
879     if test "${with_target_subdir}" != "."; then
880       toprel="${with_multisrctop}../.."
881     else
882       toprel="${with_multisrctop}.."
883     fi
884   fi
885 else
886   toprel=".."
887 fi
888
889 libgcj_basedir=$srcdir/$toprel/./libjava
890
891
892 ac_aux_dir=
893 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
894   if test -f $ac_dir/install-sh; then
895     ac_aux_dir=$ac_dir
896     ac_install_sh="$ac_aux_dir/install-sh -c"
897     break
898   elif test -f $ac_dir/install.sh; then
899     ac_aux_dir=$ac_dir
900     ac_install_sh="$ac_aux_dir/install.sh -c"
901     break
902   fi
903 done
904 if test -z "$ac_aux_dir"; then
905   { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
906 fi
907 ac_config_guess=$ac_aux_dir/config.guess
908 ac_config_sub=$ac_aux_dir/config.sub
909 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
910
911 if :; then :; else
912   # This overrides the previous occurrence for automake, but not for
913   # autoconf, which is exactly what we want.
914   ac_aux_dir=
915 for ac_dir in .. $srcdir/..; do
916   if test -f $ac_dir/install-sh; then
917     ac_aux_dir=$ac_dir
918     ac_install_sh="$ac_aux_dir/install-sh -c"
919     break
920   elif test -f $ac_dir/install.sh; then
921     ac_aux_dir=$ac_dir
922     ac_install_sh="$ac_aux_dir/install.sh -c"
923     break
924   fi
925 done
926 if test -z "$ac_aux_dir"; then
927   { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
928 fi
929 ac_config_guess=$ac_aux_dir/config.guess
930 ac_config_sub=$ac_aux_dir/config.sub
931 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
932
933 fi
934
935 # This works around an automake problem.
936 mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
937
938
939
940 # Do some error checking and defaulting for the host and target type.
941 # The inputs are:
942 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
943 #
944 # The rules are:
945 # 1. You are not allowed to specify --host, --target, and nonopt at the
946 #    same time.
947 # 2. Host defaults to nonopt.
948 # 3. If nonopt is not specified, then host defaults to the current host,
949 #    as determined by config.guess.
950 # 4. Target and build default to nonopt.
951 # 5. If nonopt is not specified, then target and build default to host.
952
953 # The aliases save the names the user supplied, while $host etc.
954 # will get canonicalized.
955 case $host---$target---$nonopt in
956 NONE---*---* | *---NONE---* | *---*---NONE) ;;
957 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
958 esac
959
960
961 # Make sure we can run config.sub.
962 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
963 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
964 fi
965
966 echo $ac_n "checking host system type""... $ac_c" 1>&6
967 echo "configure:968: checking host system type" >&5
968
969 host_alias=$host
970 case "$host_alias" in
971 NONE)
972   case $nonopt in
973   NONE)
974     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
975     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
976     fi ;;
977   *) host_alias=$nonopt ;;
978   esac ;;
979 esac
980
981 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
982 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
983 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
984 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
985 echo "$ac_t""$host" 1>&6
986
987 echo $ac_n "checking target system type""... $ac_c" 1>&6
988 echo "configure:989: checking target system type" >&5
989
990 target_alias=$target
991 case "$target_alias" in
992 NONE)
993   case $nonopt in
994   NONE) target_alias=$host_alias ;;
995   *) target_alias=$nonopt ;;
996   esac ;;
997 esac
998
999 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1000 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1001 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1002 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1003 echo "$ac_t""$target" 1>&6
1004
1005 echo $ac_n "checking build system type""... $ac_c" 1>&6
1006 echo "configure:1007: checking build system type" >&5
1007
1008 build_alias=$build
1009 case "$build_alias" in
1010 NONE)
1011   case $nonopt in
1012   NONE) build_alias=$host_alias ;;
1013   *) build_alias=$nonopt ;;
1014   esac ;;
1015 esac
1016
1017 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1018 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1019 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1020 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1021 echo "$ac_t""$build" 1>&6
1022
1023 test "$host_alias" != "$target_alias" &&
1024   test "$program_prefix$program_suffix$program_transform_name" = \
1025     NONENONEs,x,x, &&
1026   program_prefix=${target_alias}-
1027
1028
1029
1030
1031
1032 # Extract the first word of "gcc", so it can be a program name with args.
1033 set dummy gcc; ac_word=$2
1034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1035 echo "configure:1036: checking for $ac_word" >&5
1036 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1037   echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039   if test -n "$CC"; then
1040   ac_cv_prog_CC="$CC" # Let the user override the test.
1041 else
1042   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1043   ac_dummy="$PATH"
1044   for ac_dir in $ac_dummy; do
1045     test -z "$ac_dir" && ac_dir=.
1046     if test -f $ac_dir/$ac_word; then
1047       ac_cv_prog_CC="gcc"
1048       break
1049     fi
1050   done
1051   IFS="$ac_save_ifs"
1052 fi
1053 fi
1054 CC="$ac_cv_prog_CC"
1055 if test -n "$CC"; then
1056   echo "$ac_t""$CC" 1>&6
1057 else
1058   echo "$ac_t""no" 1>&6
1059 fi
1060
1061 if test -z "$CC"; then
1062   # Extract the first word of "cc", so it can be a program name with args.
1063 set dummy cc; ac_word=$2
1064 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1065 echo "configure:1066: checking for $ac_word" >&5
1066 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1067   echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069   if test -n "$CC"; then
1070   ac_cv_prog_CC="$CC" # Let the user override the test.
1071 else
1072   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1073   ac_prog_rejected=no
1074   ac_dummy="$PATH"
1075   for ac_dir in $ac_dummy; do
1076     test -z "$ac_dir" && ac_dir=.
1077     if test -f $ac_dir/$ac_word; then
1078       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1079         ac_prog_rejected=yes
1080         continue
1081       fi
1082       ac_cv_prog_CC="cc"
1083       break
1084     fi
1085   done
1086   IFS="$ac_save_ifs"
1087 if test $ac_prog_rejected = yes; then
1088   # We found a bogon in the path, so make sure we never use it.
1089   set dummy $ac_cv_prog_CC
1090   shift
1091   if test $# -gt 0; then
1092     # We chose a different compiler from the bogus one.
1093     # However, it has the same basename, so the bogon will be chosen
1094     # first if we set CC to just the basename; use the full file name.
1095     shift
1096     set dummy "$ac_dir/$ac_word" "$@"
1097     shift
1098     ac_cv_prog_CC="$@"
1099   fi
1100 fi
1101 fi
1102 fi
1103 CC="$ac_cv_prog_CC"
1104 if test -n "$CC"; then
1105   echo "$ac_t""$CC" 1>&6
1106 else
1107   echo "$ac_t""no" 1>&6
1108 fi
1109
1110   if test -z "$CC"; then
1111     case "`uname -s`" in
1112     *win32* | *WIN32*)
1113       # Extract the first word of "cl", so it can be a program name with args.
1114 set dummy cl; ac_word=$2
1115 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1116 echo "configure:1117: checking for $ac_word" >&5
1117 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1118   echo $ac_n "(cached) $ac_c" 1>&6
1119 else
1120   if test -n "$CC"; then
1121   ac_cv_prog_CC="$CC" # Let the user override the test.
1122 else
1123   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1124   ac_dummy="$PATH"
1125   for ac_dir in $ac_dummy; do
1126     test -z "$ac_dir" && ac_dir=.
1127     if test -f $ac_dir/$ac_word; then
1128       ac_cv_prog_CC="cl"
1129       break
1130     fi
1131   done
1132   IFS="$ac_save_ifs"
1133 fi
1134 fi
1135 CC="$ac_cv_prog_CC"
1136 if test -n "$CC"; then
1137   echo "$ac_t""$CC" 1>&6
1138 else
1139   echo "$ac_t""no" 1>&6
1140 fi
1141  ;;
1142     esac
1143   fi
1144   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1145 fi
1146
1147
1148 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1149 echo "configure:1150: checking whether we are using GNU C" >&5
1150 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153   cat > conftest.c <<EOF
1154 #ifdef __GNUC__
1155   yes;
1156 #endif
1157 EOF
1158 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1159   ac_cv_prog_gcc=yes
1160 else
1161   ac_cv_prog_gcc=no
1162 fi
1163 fi
1164
1165 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1166
1167 if test $ac_cv_prog_gcc = yes; then
1168   GCC=yes
1169 else
1170   GCC=
1171 fi
1172
1173 ac_test_CFLAGS="${CFLAGS+set}"
1174 ac_save_CFLAGS="$CFLAGS"
1175 CFLAGS=
1176 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1177 echo "configure:1178: checking whether ${CC-cc} accepts -g" >&5
1178 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1179   echo $ac_n "(cached) $ac_c" 1>&6
1180 else
1181   echo 'void f(){}' > conftest.c
1182 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1183   ac_cv_prog_cc_g=yes
1184 else
1185   ac_cv_prog_cc_g=no
1186 fi
1187 rm -f conftest*
1188
1189 fi
1190
1191 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1192 if test "$ac_test_CFLAGS" = set; then
1193   CFLAGS="$ac_save_CFLAGS"
1194 elif test $ac_cv_prog_cc_g = yes; then
1195   if test "$GCC" = yes; then
1196     CFLAGS="-g -O2"
1197   else
1198     CFLAGS="-g"
1199   fi
1200 else
1201   if test "$GCC" = yes; then
1202     CFLAGS="-O2"
1203   else
1204     CFLAGS=
1205   fi
1206 fi
1207
1208
1209 # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
1210 # glibjava_CXX instead of glibcpp_CXX.  That's because we're passed a
1211 # different definition of CXX than other directories, since we don't
1212 # depend on libstdc++-v3 having already been built.
1213
1214
1215
1216 # Use glibjava_CXX so that we do not cause CXX to be cached with the
1217 # flags that come in CXX while configuring libjava.  They're different
1218 # from those used for all other target libraries.  If CXX is set in
1219 # the environment, respect that here.
1220 glibjava_CXX=$CXX
1221 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1222 do
1223 # Extract the first word of "$ac_prog", so it can be a program name with args.
1224 set dummy $ac_prog; ac_word=$2
1225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1226 echo "configure:1227: checking for $ac_word" >&5
1227 if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then
1228   echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230   if test -n "$glibjava_CXX"; then
1231   ac_cv_prog_glibjava_CXX="$glibjava_CXX" # Let the user override the test.
1232 else
1233   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1234   ac_dummy="$PATH"
1235   for ac_dir in $ac_dummy; do
1236     test -z "$ac_dir" && ac_dir=.
1237     if test -f $ac_dir/$ac_word; then
1238       ac_cv_prog_glibjava_CXX="$ac_prog"
1239       break
1240     fi
1241   done
1242   IFS="$ac_save_ifs"
1243 fi
1244 fi
1245 glibjava_CXX="$ac_cv_prog_glibjava_CXX"
1246 if test -n "$glibjava_CXX"; then
1247   echo "$ac_t""$glibjava_CXX" 1>&6
1248 else
1249   echo "$ac_t""no" 1>&6
1250 fi
1251
1252 test -n "$glibjava_CXX" && break
1253 done
1254 test -n "$glibjava_CXX" || glibjava_CXX="gcc"
1255
1256
1257 CXX=$glibjava_CXX
1258 test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1259
1260 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1261 echo "configure:1262: checking whether we are using GNU C++" >&5
1262 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1263   echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265   cat > conftest.C <<EOF
1266 #ifdef __GNUC__
1267   yes;
1268 #endif
1269 EOF
1270 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1271   ac_cv_prog_gxx=yes
1272 else
1273   ac_cv_prog_gxx=no
1274 fi
1275 fi
1276
1277 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1278
1279 if test $ac_cv_prog_gxx = yes; then
1280   GXX=yes
1281   ac_test_CXXFLAGS="${CXXFLAGS+set}"
1282   ac_save_CXXFLAGS="$CXXFLAGS"
1283   CXXFLAGS=
1284   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1285 echo "configure:1286: checking whether ${CXX-g++} accepts -g" >&5
1286 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1287   echo $ac_n "(cached) $ac_c" 1>&6
1288 else
1289   echo 'void f(){}' > conftest.cc
1290 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1291   ac_cv_prog_cxx_g=yes
1292 else
1293   ac_cv_prog_cxx_g=no
1294 fi
1295 rm -f conftest*
1296
1297 fi
1298
1299 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1300   if test "$ac_test_CXXFLAGS" = set; then
1301     CXXFLAGS="$ac_save_CXXFLAGS"
1302   elif test $ac_cv_prog_cxx_g = yes; then
1303     CXXFLAGS="-g -O2"
1304   else
1305     CXXFLAGS="-O2"
1306   fi
1307 else
1308   GXX=
1309   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1310 fi
1311
1312
1313 version=0.0.7
1314
1315 PACKAGE=libjava
1316
1317 VERSION=$version
1318
1319 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1320   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1321 fi
1322 cat >> confdefs.h <<EOF
1323 #define PACKAGE "$PACKAGE"
1324 EOF
1325
1326 cat >> confdefs.h <<EOF
1327 #define VERSION "$VERSION"
1328 EOF
1329
1330
1331
1332 missing_dir=`cd $ac_aux_dir && pwd`
1333 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1334 echo "configure:1335: checking for working aclocal" >&5
1335 # Run test in a subshell; some versions of sh will print an error if
1336 # an executable is not found, even if stderr is redirected.
1337 # Redirect stdin to placate older versions of autoconf.  Sigh.
1338 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1339    ACLOCAL=aclocal
1340    echo "$ac_t""found" 1>&6
1341 else
1342    ACLOCAL="$missing_dir/missing aclocal"
1343    echo "$ac_t""missing" 1>&6
1344 fi
1345
1346 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1347 echo "configure:1348: checking for working autoconf" >&5
1348 # Run test in a subshell; some versions of sh will print an error if
1349 # an executable is not found, even if stderr is redirected.
1350 # Redirect stdin to placate older versions of autoconf.  Sigh.
1351 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1352    AUTOCONF=autoconf
1353    echo "$ac_t""found" 1>&6
1354 else
1355    AUTOCONF="$missing_dir/missing autoconf"
1356    echo "$ac_t""missing" 1>&6
1357 fi
1358
1359 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1360 echo "configure:1361: checking for working automake" >&5
1361 # Run test in a subshell; some versions of sh will print an error if
1362 # an executable is not found, even if stderr is redirected.
1363 # Redirect stdin to placate older versions of autoconf.  Sigh.
1364 if (automake --version) < /dev/null > /dev/null 2>&1; then
1365    AUTOMAKE=automake
1366    echo "$ac_t""found" 1>&6
1367 else
1368    AUTOMAKE="$missing_dir/missing automake"
1369    echo "$ac_t""missing" 1>&6
1370 fi
1371
1372 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1373 echo "configure:1374: checking for working autoheader" >&5
1374 # Run test in a subshell; some versions of sh will print an error if
1375 # an executable is not found, even if stderr is redirected.
1376 # Redirect stdin to placate older versions of autoconf.  Sigh.
1377 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1378    AUTOHEADER=autoheader
1379    echo "$ac_t""found" 1>&6
1380 else
1381    AUTOHEADER="$missing_dir/missing autoheader"
1382    echo "$ac_t""missing" 1>&6
1383 fi
1384
1385 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1386 echo "configure:1387: checking for working makeinfo" >&5
1387 # Run test in a subshell; some versions of sh will print an error if
1388 # an executable is not found, even if stderr is redirected.
1389 # Redirect stdin to placate older versions of autoconf.  Sigh.
1390 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1391    MAKEINFO=makeinfo
1392    echo "$ac_t""found" 1>&6
1393 else
1394    MAKEINFO="$missing_dir/missing makeinfo"
1395    echo "$ac_t""missing" 1>&6
1396 fi
1397
1398
1399
1400 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1401 set dummy ${ac_tool_prefix}as; ac_word=$2
1402 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1403 echo "configure:1404: checking for $ac_word" >&5
1404 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1405   echo $ac_n "(cached) $ac_c" 1>&6
1406 else
1407   if test -n "$AS"; then
1408   ac_cv_prog_AS="$AS" # Let the user override the test.
1409 else
1410   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1411   ac_dummy="$PATH"
1412   for ac_dir in $ac_dummy; do
1413     test -z "$ac_dir" && ac_dir=.
1414     if test -f $ac_dir/$ac_word; then
1415       ac_cv_prog_AS="${ac_tool_prefix}as"
1416       break
1417     fi
1418   done
1419   IFS="$ac_save_ifs"
1420   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1421 fi
1422 fi
1423 AS="$ac_cv_prog_AS"
1424 if test -n "$AS"; then
1425   echo "$ac_t""$AS" 1>&6
1426 else
1427   echo "$ac_t""no" 1>&6
1428 fi
1429
1430
1431
1432 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1433 set dummy ${ac_tool_prefix}ar; ac_word=$2
1434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1435 echo "configure:1436: checking for $ac_word" >&5
1436 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1437   echo $ac_n "(cached) $ac_c" 1>&6
1438 else
1439   if test -n "$AR"; then
1440   ac_cv_prog_AR="$AR" # Let the user override the test.
1441 else
1442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1443   ac_dummy="$PATH"
1444   for ac_dir in $ac_dummy; do
1445     test -z "$ac_dir" && ac_dir=.
1446     if test -f $ac_dir/$ac_word; then
1447       ac_cv_prog_AR="${ac_tool_prefix}ar"
1448       break
1449     fi
1450   done
1451   IFS="$ac_save_ifs"
1452   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1453 fi
1454 fi
1455 AR="$ac_cv_prog_AR"
1456 if test -n "$AR"; then
1457   echo "$ac_t""$AR" 1>&6
1458 else
1459   echo "$ac_t""no" 1>&6
1460 fi
1461
1462
1463
1464 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1465 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1467 echo "configure:1468: checking for $ac_word" >&5
1468 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1469   echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471   if test -n "$RANLIB"; then
1472   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1473 else
1474   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1475   ac_dummy="$PATH"
1476   for ac_dir in $ac_dummy; do
1477     test -z "$ac_dir" && ac_dir=.
1478     if test -f $ac_dir/$ac_word; then
1479       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1480       break
1481     fi
1482   done
1483   IFS="$ac_save_ifs"
1484 fi
1485 fi
1486 RANLIB="$ac_cv_prog_RANLIB"
1487 if test -n "$RANLIB"; then
1488   echo "$ac_t""$RANLIB" 1>&6
1489 else
1490   echo "$ac_t""no" 1>&6
1491 fi
1492
1493
1494 if test -z "$ac_cv_prog_RANLIB"; then
1495 if test -n "$ac_tool_prefix"; then
1496   # Extract the first word of "ranlib", so it can be a program name with args.
1497 set dummy ranlib; ac_word=$2
1498 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1499 echo "configure:1500: checking for $ac_word" >&5
1500 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1501   echo $ac_n "(cached) $ac_c" 1>&6
1502 else
1503   if test -n "$RANLIB"; then
1504   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1505 else
1506   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1507   ac_dummy="$PATH"
1508   for ac_dir in $ac_dummy; do
1509     test -z "$ac_dir" && ac_dir=.
1510     if test -f $ac_dir/$ac_word; then
1511       ac_cv_prog_RANLIB="ranlib"
1512       break
1513     fi
1514   done
1515   IFS="$ac_save_ifs"
1516   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1517 fi
1518 fi
1519 RANLIB="$ac_cv_prog_RANLIB"
1520 if test -n "$RANLIB"; then
1521   echo "$ac_t""$RANLIB" 1>&6
1522 else
1523   echo "$ac_t""no" 1>&6
1524 fi
1525
1526 else
1527   RANLIB=":"
1528 fi
1529 fi
1530
1531
1532 # Find a good install program.  We prefer a C program (faster),
1533 # so one script is as good as another.  But avoid the broken or
1534 # incompatible versions:
1535 # SysV /etc/install, /usr/sbin/install
1536 # SunOS /usr/etc/install
1537 # IRIX /sbin/install
1538 # AIX /bin/install
1539 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1540 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1541 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1542 # ./install, which can be erroneously created by make from ./install.sh.
1543 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1544 echo "configure:1545: checking for a BSD compatible install" >&5
1545 if test -z "$INSTALL"; then
1546 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1547   echo $ac_n "(cached) $ac_c" 1>&6
1548 else
1549     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1550   for ac_dir in $PATH; do
1551     # Account for people who put trailing slashes in PATH elements.
1552     case "$ac_dir/" in
1553     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1554     *)
1555       # OSF1 and SCO ODT 3.0 have their own names for install.
1556       # Don't use installbsd from OSF since it installs stuff as root
1557       # by default.
1558       for ac_prog in ginstall scoinst install; do
1559         if test -f $ac_dir/$ac_prog; then
1560           if test $ac_prog = install &&
1561             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1562             # AIX install.  It has an incompatible calling convention.
1563             :
1564           else
1565             ac_cv_path_install="$ac_dir/$ac_prog -c"
1566             break 2
1567           fi
1568         fi
1569       done
1570       ;;
1571     esac
1572   done
1573   IFS="$ac_save_IFS"
1574
1575 fi
1576   if test "${ac_cv_path_install+set}" = set; then
1577     INSTALL="$ac_cv_path_install"
1578   else
1579     # As a last resort, use the slow shell script.  We don't cache a
1580     # path for INSTALL within a source directory, because that will
1581     # break other packages using the cache if that directory is
1582     # removed, or if the path is relative.
1583     INSTALL="$ac_install_sh"
1584   fi
1585 fi
1586 echo "$ac_t""$INSTALL" 1>&6
1587
1588 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1589 # It thinks the first close brace ends the variable substitution.
1590 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1591
1592 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1593
1594 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1595
1596
1597 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1598 echo "configure:1599: checking whether to enable maintainer-specific portions of Makefiles" >&5
1599     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1600 if test "${enable_maintainer_mode+set}" = set; then
1601   enableval="$enable_maintainer_mode"
1602   USE_MAINTAINER_MODE=$enableval
1603 else
1604   USE_MAINTAINER_MODE=no
1605 fi
1606
1607   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1608   
1609
1610 if test $USE_MAINTAINER_MODE = yes; then
1611   MAINTAINER_MODE_TRUE=
1612   MAINTAINER_MODE_FALSE='#'
1613 else
1614   MAINTAINER_MODE_TRUE='#'
1615   MAINTAINER_MODE_FALSE=
1616 fi
1617   MAINT=$MAINTAINER_MODE_TRUE
1618   
1619
1620
1621
1622
1623 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1624 echo "configure:1625: checking for executable suffix" >&5
1625 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1626   echo $ac_n "(cached) $ac_c" 1>&6
1627 else
1628   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1629   ac_cv_exeext=.exe
1630 else
1631   rm -f conftest*
1632   echo 'int main () { return 0; }' > conftest.$ac_ext
1633   ac_cv_exeext=
1634   if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1635     for file in conftest.*; do
1636       case $file in
1637       *.c | *.o | *.obj) ;;
1638       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1639       esac
1640     done
1641   else
1642     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1643   fi
1644   rm -f conftest*
1645   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1646 fi
1647 fi
1648
1649 EXEEXT=""
1650 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1651 echo "$ac_t""${ac_cv_exeext}" 1>&6
1652 ac_exeext=$EXEEXT
1653
1654
1655 # configure.host sets the following important variables
1656 #       libgcj_cflags    - host specific C compiler flags
1657 #       libgcj_cxxflags  - host specific C++ compiler flags
1658 #       libgcj_javaflags - host specific Java compiler flags
1659
1660 libgcj_cflags=
1661 libgcj_cxxflags=
1662 libgcj_javaflags=
1663
1664 . ${srcdir}/configure.host
1665
1666 LIBGCJ_CFLAGS="${libgcj_cflags}"
1667 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1668 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678 # Only use libltdl for non-newlib builds.
1679 if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
1680      case $enable_ltdl_convenience in
1681   no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1682   "") enable_ltdl_convenience=yes
1683       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1684   esac
1685   LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1686   INCLTDL='-I${top_srcdir}/''libltdl'
1687
1688    
1689    DIRLTDL=libltdl
1690    cat >> confdefs.h <<\EOF
1691 #define USE_LTDL 1
1692 EOF
1693
1694    # Sigh.  Libtool's macro doesn't do the right thing.
1695    INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1696    # FIXME: this is a hack.
1697    sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
1698    ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1699 fi
1700
1701
1702
1703 # Check whether --enable-shared or --disable-shared was given.
1704 if test "${enable_shared+set}" = set; then
1705   enableval="$enable_shared"
1706   p=${PACKAGE-default}
1707 case $enableval in
1708 yes) enable_shared=yes ;;
1709 no) enable_shared=no ;;
1710 *)
1711   enable_shared=no
1712   # Look at the argument we got.  We use all the common list separators.
1713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1714   for pkg in $enableval; do
1715     if test "X$pkg" = "X$p"; then
1716       enable_shared=yes
1717     fi
1718   done
1719   IFS="$ac_save_ifs"
1720   ;;
1721 esac
1722 else
1723   enable_shared=yes
1724 fi
1725
1726 # Check whether --enable-static or --disable-static was given.
1727 if test "${enable_static+set}" = set; then
1728   enableval="$enable_static"
1729   p=${PACKAGE-default}
1730 case $enableval in
1731 yes) enable_static=yes ;;
1732 no) enable_static=no ;;
1733 *)
1734   enable_static=no
1735   # Look at the argument we got.  We use all the common list separators.
1736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1737   for pkg in $enableval; do
1738     if test "X$pkg" = "X$p"; then
1739       enable_static=yes
1740     fi
1741   done
1742   IFS="$ac_save_ifs"
1743   ;;
1744 esac
1745 else
1746   enable_static=yes
1747 fi
1748
1749 # Check whether --enable-fast-install or --disable-fast-install was given.
1750 if test "${enable_fast_install+set}" = set; then
1751   enableval="$enable_fast_install"
1752   p=${PACKAGE-default}
1753 case $enableval in
1754 yes) enable_fast_install=yes ;;
1755 no) enable_fast_install=no ;;
1756 *)
1757   enable_fast_install=no
1758   # Look at the argument we got.  We use all the common list separators.
1759   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1760   for pkg in $enableval; do
1761     if test "X$pkg" = "X$p"; then
1762       enable_fast_install=yes
1763     fi
1764   done
1765   IFS="$ac_save_ifs"
1766   ;;
1767 esac
1768 else
1769   enable_fast_install=yes
1770 fi
1771
1772 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1773 if test "${with_gnu_ld+set}" = set; then
1774   withval="$with_gnu_ld"
1775   test "$withval" = no || with_gnu_ld=yes
1776 else
1777   with_gnu_ld=no
1778 fi
1779
1780 ac_prog=ld
1781 if test "$GCC" = yes; then
1782   # Check if gcc -print-prog-name=ld gives a path.
1783   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1784 echo "configure:1785: checking for ld used by GCC" >&5
1785   case $host in
1786   *-*-mingw*)
1787     # gcc leaves a trailing carriage return which upsets mingw
1788     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1789   *)
1790     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1791   esac
1792   case $ac_prog in
1793     # Accept absolute paths.
1794     [\\/]* | [A-Za-z]:[\\/]*)
1795       re_direlt='/[^/][^/]*/\.\./'
1796       # Canonicalize the path of ld
1797       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1798       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1799         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1800       done
1801       test -z "$LD" && LD="$ac_prog"
1802       ;;
1803   "")
1804     # If it fails, then pretend we aren't using GCC.
1805     ac_prog=ld
1806     ;;
1807   *)
1808     # If it is relative, then search for the first ld in PATH.
1809     with_gnu_ld=unknown
1810     ;;
1811   esac
1812 elif test "$with_gnu_ld" = yes; then
1813   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1814 echo "configure:1815: checking for GNU ld" >&5
1815 else
1816   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1817 echo "configure:1818: checking for non-GNU ld" >&5
1818 fi
1819 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1820   echo $ac_n "(cached) $ac_c" 1>&6
1821 else
1822   if test -z "$LD"; then
1823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1824   for ac_dir in $PATH; do
1825     test -z "$ac_dir" && ac_dir=.
1826     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1827       lt_cv_path_LD="$ac_dir/$ac_prog"
1828       # Check to see if the program is GNU ld.  I'd rather use --version,
1829       # but apparently some GNU ld's only accept -v.
1830       # Break only if it was the GNU/non-GNU ld that we prefer.
1831       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1832         test "$with_gnu_ld" != no && break
1833       else
1834         test "$with_gnu_ld" != yes && break
1835       fi
1836     fi
1837   done
1838   IFS="$ac_save_ifs"
1839 else
1840   lt_cv_path_LD="$LD" # Let the user override the test with a path.
1841 fi
1842 fi
1843
1844 LD="$lt_cv_path_LD"
1845 if test -n "$LD"; then
1846   echo "$ac_t""$LD" 1>&6
1847 else
1848   echo "$ac_t""no" 1>&6
1849 fi
1850 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1851 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1852 echo "configure:1853: checking if the linker ($LD) is GNU ld" >&5
1853 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1854   echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1857 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1858   lt_cv_prog_gnu_ld=yes
1859 else
1860   lt_cv_prog_gnu_ld=no
1861 fi
1862 fi
1863
1864 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1865 with_gnu_ld=$lt_cv_prog_gnu_ld
1866
1867
1868 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1869 echo "configure:1870: checking for $LD option to reload object files" >&5
1870 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1871   echo $ac_n "(cached) $ac_c" 1>&6
1872 else
1873   lt_cv_ld_reload_flag='-r'
1874 fi
1875
1876 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1877 reload_flag=$lt_cv_ld_reload_flag
1878 test -n "$reload_flag" && reload_flag=" $reload_flag"
1879
1880 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1881 echo "configure:1882: checking for BSD-compatible nm" >&5
1882 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1883   echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885   if test -n "$NM"; then
1886   # Let the user override the test.
1887   lt_cv_path_NM="$NM"
1888 else
1889   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1890   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1891     test -z "$ac_dir" && ac_dir=.
1892     tmp_nm=$ac_dir/${ac_tool_prefix}nm
1893     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1894       # Check to see if the nm accepts a BSD-compat flag.
1895       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1896       #   nm: unknown option "B" ignored
1897       # Tru64's nm complains that /dev/null is an invalid object file
1898       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1899         lt_cv_path_NM="$tmp_nm -B"
1900         break
1901       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1902         lt_cv_path_NM="$tmp_nm -p"
1903         break
1904       else
1905         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1906         continue # so that we can try to find one that supports BSD flags
1907       fi
1908     fi
1909   done
1910   IFS="$ac_save_ifs"
1911   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1912 fi
1913 fi
1914
1915 NM="$lt_cv_path_NM"
1916 echo "$ac_t""$NM" 1>&6
1917
1918 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1919 echo "configure:1920: checking how to recognise dependant libraries" >&5
1920 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1921   echo $ac_n "(cached) $ac_c" 1>&6
1922 else
1923   lt_cv_file_magic_cmd='$MAGIC_CMD'
1924 lt_cv_file_magic_test_file=
1925 lt_cv_deplibs_check_method='unknown'
1926 # Need to set the preceding variable on all platforms that support
1927 # interlibrary dependencies.
1928 # 'none' -- dependencies not supported.
1929 # `unknown' -- same as none, but documents that we really don't know.
1930 # 'pass_all' -- all dependencies passed with no checks.
1931 # 'test_compile' -- check by making test program.
1932 # 'file_magic [regex]' -- check by looking for files in library path
1933 # which responds to the $file_magic_cmd with a given egrep regex.
1934 # If you have `file' or equivalent on your system and you're not sure
1935 # whether `pass_all' will *always* work, you probably want this one.
1936
1937 case $host_os in
1938 aix*)
1939   lt_cv_deplibs_check_method=pass_all
1940   ;;
1941
1942 beos*)
1943   lt_cv_deplibs_check_method=pass_all
1944   ;;
1945
1946 bsdi4*)
1947   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1948   lt_cv_file_magic_cmd='/usr/bin/file -L'
1949   lt_cv_file_magic_test_file=/shlib/libc.so
1950   ;;
1951
1952 cygwin* | mingw* |pw32*)
1953   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1954   lt_cv_file_magic_cmd='$OBJDUMP -f'
1955   ;;
1956
1957 darwin* | rhapsody*)
1958   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1959   lt_cv_file_magic_cmd='/usr/bin/file -L'
1960   case "$host_os" in
1961   rhapsody* | darwin1.012)
1962     lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1963     ;;
1964   *) # Darwin 1.3 on
1965     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1966     ;;
1967   esac
1968   ;;
1969
1970 freebsd* )
1971   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1972     case $host_cpu in
1973     i*86 )
1974       # Not sure whether the presence of OpenBSD here was a mistake.
1975       # Let's accept both of them until this is cleared up.
1976       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1977       lt_cv_file_magic_cmd=/usr/bin/file
1978       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1979       ;;
1980     esac
1981   else
1982     lt_cv_deplibs_check_method=pass_all
1983   fi
1984   ;;
1985
1986 gnu*)
1987   lt_cv_deplibs_check_method=pass_all
1988   ;;
1989
1990 hpux10.20*|hpux11*)
1991   case $host_cpu in
1992   hppa*)
1993     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1994     lt_cv_file_magic_cmd=/usr/bin/file
1995     lt_cv_file_magic_test_file=/usr/lib/libc.sl
1996     ;;
1997   ia64*)
1998     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1999     lt_cv_file_magic_cmd=/usr/bin/file
2000     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2001     ;;
2002   esac
2003   ;;
2004
2005 irix5* | irix6*)
2006   case $host_os in
2007   irix5*)
2008     # this will be overridden with pass_all, but let us keep it just in case
2009     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2010     ;;
2011   *)
2012     case $LD in
2013     *-32|*"-32 ") libmagic=32-bit;;
2014     *-n32|*"-n32 ") libmagic=N32;;
2015     *-64|*"-64 ") libmagic=64-bit;;
2016     *) libmagic=never-match;;
2017     esac
2018     # this will be overridden with pass_all, but let us keep it just in case
2019     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2020     ;;
2021   esac
2022   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2023   lt_cv_deplibs_check_method=pass_all
2024   ;;
2025
2026 # This must be Linux ELF.
2027 linux-gnu*)
2028   case $host_cpu in
2029   alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2030     lt_cv_deplibs_check_method=pass_all ;;
2031   *)
2032     # glibc up to 2.1.1 does not perform some relocations on ARM
2033     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2034   esac
2035   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2036   ;;
2037
2038 netbsd*)
2039   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2040     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2041   else
2042     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2043   fi
2044   ;;
2045
2046 newsos6)
2047   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2048   lt_cv_file_magic_cmd=/usr/bin/file
2049   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2050   ;;
2051
2052 osf3* | osf4* | osf5*)
2053   # this will be overridden with pass_all, but let us keep it just in case
2054   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2055   lt_cv_file_magic_test_file=/shlib/libc.so
2056   lt_cv_deplibs_check_method=pass_all
2057   ;;
2058
2059 sco3.2v5*)
2060   lt_cv_deplibs_check_method=pass_all
2061   ;;
2062
2063 solaris*)
2064   lt_cv_deplibs_check_method=pass_all
2065   lt_cv_file_magic_test_file=/lib/libc.so
2066   ;;
2067
2068 sysv5uw[78]* | sysv4*uw2*)
2069   lt_cv_deplibs_check_method=pass_all
2070   ;;
2071
2072 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2073   case $host_vendor in
2074   ncr)
2075     lt_cv_deplibs_check_method=pass_all
2076     ;;
2077   motorola)
2078     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]'
2079     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2080     ;;
2081   esac
2082   ;;
2083 esac
2084
2085 fi
2086
2087 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2088 file_magic_cmd=$lt_cv_file_magic_cmd
2089 deplibs_check_method=$lt_cv_deplibs_check_method
2090
2091 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2092 echo "configure:2093: checking for object suffix" >&5
2093 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2094   echo $ac_n "(cached) $ac_c" 1>&6
2095 else
2096   rm -f conftest*
2097 echo 'int i = 1;' > conftest.$ac_ext
2098 if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2099   for ac_file in conftest.*; do
2100     case $ac_file in
2101     *.c) ;;
2102     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2103     esac
2104   done
2105 else
2106   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2107 fi
2108 rm -f conftest*
2109 fi
2110
2111 echo "$ac_t""$ac_cv_objext" 1>&6
2112 OBJEXT=$ac_cv_objext
2113 ac_objext=$ac_cv_objext
2114
2115 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2116
2117 # Only perform the check for file, if the check method requires it
2118 case $deplibs_check_method in
2119 file_magic*)
2120   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2121     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2122 echo "configure:2123: checking for ${ac_tool_prefix}file" >&5
2123 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   case $MAGIC_CMD in
2127   /*)
2128   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2129   ;;
2130   ?:/*)
2131   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2132   ;;
2133   *)
2134   ac_save_MAGIC_CMD="$MAGIC_CMD"
2135   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2136   ac_dummy="/usr/bin:$PATH"
2137   for ac_dir in $ac_dummy; do
2138     test -z "$ac_dir" && ac_dir=.
2139     if test -f $ac_dir/${ac_tool_prefix}file; then
2140       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2141       if test -n "$file_magic_test_file"; then
2142         case $deplibs_check_method in
2143         "file_magic "*)
2144           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2145           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2146           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2147             egrep "$file_magic_regex" > /dev/null; then
2148             :
2149           else
2150             cat <<EOF 1>&2
2151
2152 *** Warning: the command libtool uses to detect shared libraries,
2153 *** $file_magic_cmd, produces output that libtool cannot recognize.
2154 *** The result is that libtool may fail to recognize shared libraries
2155 *** as such.  This will affect the creation of libtool libraries that
2156 *** depend on shared libraries, but programs linked with such libtool
2157 *** libraries will work regardless of this problem.  Nevertheless, you
2158 *** may want to report the problem to your system manager and/or to
2159 *** bug-libtool@gnu.org
2160
2161 EOF
2162           fi ;;
2163         esac
2164       fi
2165       break
2166     fi
2167   done
2168   IFS="$ac_save_ifs"
2169   MAGIC_CMD="$ac_save_MAGIC_CMD"
2170   ;;
2171 esac
2172 fi
2173
2174 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2175 if test -n "$MAGIC_CMD"; then
2176   echo "$ac_t""$MAGIC_CMD" 1>&6
2177 else
2178   echo "$ac_t""no" 1>&6
2179 fi
2180
2181 if test -z "$lt_cv_path_MAGIC_CMD"; then
2182   if test -n "$ac_tool_prefix"; then
2183     echo $ac_n "checking for file""... $ac_c" 1>&6
2184 echo "configure:2185: checking for file" >&5
2185 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2186   echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188   case $MAGIC_CMD in
2189   /*)
2190   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2191   ;;
2192   ?:/*)
2193   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2194   ;;
2195   *)
2196   ac_save_MAGIC_CMD="$MAGIC_CMD"
2197   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2198   ac_dummy="/usr/bin:$PATH"
2199   for ac_dir in $ac_dummy; do
2200     test -z "$ac_dir" && ac_dir=.
2201     if test -f $ac_dir/file; then
2202       lt_cv_path_MAGIC_CMD="$ac_dir/file"
2203       if test -n "$file_magic_test_file"; then
2204         case $deplibs_check_method in
2205         "file_magic "*)
2206           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2207           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2208           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2209             egrep "$file_magic_regex" > /dev/null; then
2210             :
2211           else
2212             cat <<EOF 1>&2
2213
2214 *** Warning: the command libtool uses to detect shared libraries,
2215 *** $file_magic_cmd, produces output that libtool cannot recognize.
2216 *** The result is that libtool may fail to recognize shared libraries
2217 *** as such.  This will affect the creation of libtool libraries that
2218 *** depend on shared libraries, but programs linked with such libtool
2219 *** libraries will work regardless of this problem.  Nevertheless, you
2220 *** may want to report the problem to your system manager and/or to
2221 *** bug-libtool@gnu.org
2222
2223 EOF
2224           fi ;;
2225         esac
2226       fi
2227       break
2228     fi
2229   done
2230   IFS="$ac_save_ifs"
2231   MAGIC_CMD="$ac_save_MAGIC_CMD"
2232   ;;
2233 esac
2234 fi
2235
2236 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2237 if test -n "$MAGIC_CMD"; then
2238   echo "$ac_t""$MAGIC_CMD" 1>&6
2239 else
2240   echo "$ac_t""no" 1>&6
2241 fi
2242
2243   else
2244     MAGIC_CMD=:
2245   fi
2246 fi
2247
2248   fi
2249   ;;
2250 esac
2251
2252 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2253 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2255 echo "configure:2256: checking for $ac_word" >&5
2256 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2257   echo $ac_n "(cached) $ac_c" 1>&6
2258 else
2259   if test -n "$RANLIB"; then
2260   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2261 else
2262   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2263   ac_dummy="$PATH"
2264   for ac_dir in $ac_dummy; do
2265     test -z "$ac_dir" && ac_dir=.
2266     if test -f $ac_dir/$ac_word; then
2267       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2268       break
2269     fi
2270   done
2271   IFS="$ac_save_ifs"
2272 fi
2273 fi
2274 RANLIB="$ac_cv_prog_RANLIB"
2275 if test -n "$RANLIB"; then
2276   echo "$ac_t""$RANLIB" 1>&6
2277 else
2278   echo "$ac_t""no" 1>&6
2279 fi
2280
2281
2282 if test -z "$ac_cv_prog_RANLIB"; then
2283 if test -n "$ac_tool_prefix"; then
2284   # Extract the first word of "ranlib", so it can be a program name with args.
2285 set dummy ranlib; ac_word=$2
2286 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2287 echo "configure:2288: checking for $ac_word" >&5
2288 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2289   echo $ac_n "(cached) $ac_c" 1>&6
2290 else
2291   if test -n "$RANLIB"; then
2292   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2293 else
2294   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2295   ac_dummy="$PATH"
2296   for ac_dir in $ac_dummy; do
2297     test -z "$ac_dir" && ac_dir=.
2298     if test -f $ac_dir/$ac_word; then
2299       ac_cv_prog_RANLIB="ranlib"
2300       break
2301     fi
2302   done
2303   IFS="$ac_save_ifs"
2304   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2305 fi
2306 fi
2307 RANLIB="$ac_cv_prog_RANLIB"
2308 if test -n "$RANLIB"; then
2309   echo "$ac_t""$RANLIB" 1>&6
2310 else
2311   echo "$ac_t""no" 1>&6
2312 fi
2313
2314 else
2315   RANLIB=":"
2316 fi
2317 fi
2318
2319 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2320 set dummy ${ac_tool_prefix}strip; ac_word=$2
2321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2322 echo "configure:2323: checking for $ac_word" >&5
2323 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2324   echo $ac_n "(cached) $ac_c" 1>&6
2325 else
2326   if test -n "$STRIP"; then
2327   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2328 else
2329   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2330   ac_dummy="$PATH"
2331   for ac_dir in $ac_dummy; do
2332     test -z "$ac_dir" && ac_dir=.
2333     if test -f $ac_dir/$ac_word; then
2334       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2335       break
2336     fi
2337   done
2338   IFS="$ac_save_ifs"
2339 fi
2340 fi
2341 STRIP="$ac_cv_prog_STRIP"
2342 if test -n "$STRIP"; then
2343   echo "$ac_t""$STRIP" 1>&6
2344 else
2345   echo "$ac_t""no" 1>&6
2346 fi
2347
2348
2349 if test -z "$ac_cv_prog_STRIP"; then
2350 if test -n "$ac_tool_prefix"; then
2351   # Extract the first word of "strip", so it can be a program name with args.
2352 set dummy strip; ac_word=$2
2353 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2354 echo "configure:2355: checking for $ac_word" >&5
2355 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2356   echo $ac_n "(cached) $ac_c" 1>&6
2357 else
2358   if test -n "$STRIP"; then
2359   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2360 else
2361   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2362   ac_dummy="$PATH"
2363   for ac_dir in $ac_dummy; do
2364     test -z "$ac_dir" && ac_dir=.
2365     if test -f $ac_dir/$ac_word; then
2366       ac_cv_prog_STRIP="strip"
2367       break
2368     fi
2369   done
2370   IFS="$ac_save_ifs"
2371   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2372 fi
2373 fi
2374 STRIP="$ac_cv_prog_STRIP"
2375 if test -n "$STRIP"; then
2376   echo "$ac_t""$STRIP" 1>&6
2377 else
2378   echo "$ac_t""no" 1>&6
2379 fi
2380
2381 else
2382   STRIP=":"
2383 fi
2384 fi
2385
2386
2387 # Check for any special flags to pass to ltconfig.
2388 libtool_flags="--cache-file=$cache_file"
2389 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2390 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2391 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2392 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2393 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2394 libtool_flags="$libtool_flags --enable-dlopen"
2395
2396 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2397 if test "${enable_libtool_lock+set}" = set; then
2398   enableval="$enable_libtool_lock"
2399   :
2400 fi
2401
2402 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2403 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2404
2405 # Check whether --with-pic or --without-pic was given.
2406 if test "${with_pic+set}" = set; then
2407   withval="$with_pic"
2408   pic_mode="$withval"
2409 else
2410   pic_mode=default
2411 fi
2412
2413 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2414 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2415
2416 # Some flags need to be propagated to the compiler or linker for good
2417 # libtool support.
2418 case $host in
2419 *-*-irix6*)
2420   # Find out which ABI we are using.
2421   echo '#line 2422 "configure"' > conftest.$ac_ext
2422   if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2423    if test "$lt_cv_prog_gnu_ld" = yes; then
2424     case `/usr/bin/file conftest.$ac_objext` in
2425     *32-bit*)
2426       LD="${LD-ld} -melf32bsmip"
2427       ;;
2428     *N32*)
2429       LD="${LD-ld} -melf32bmipn32"
2430       ;;
2431     *64-bit*)
2432       LD="${LD-ld} -melf64bmip"
2433       ;;
2434     esac
2435    else
2436     case `/usr/bin/file conftest.$ac_objext` in
2437     *32-bit*)
2438       LD="${LD-ld} -32"
2439       ;;
2440     *N32*)
2441       LD="${LD-ld} -n32"
2442       ;;
2443     *64-bit*)
2444       LD="${LD-ld} -64"
2445       ;;
2446     esac
2447    fi
2448   fi
2449   rm -rf conftest*
2450   ;;
2451
2452 ia64-*-hpux*)
2453   # Find out which ABI we are using.
2454   echo 'int i;' > conftest.$ac_ext
2455   if { (eval echo configure:2456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2456     case "`/usr/bin/file conftest.o`" in
2457     *ELF-32*)
2458       HPUX_IA64_MODE="32"
2459       ;;
2460     *ELF-64*)
2461       HPUX_IA64_MODE="64"
2462       ;;
2463     esac
2464   fi
2465   rm -rf conftest*
2466   ;;
2467
2468 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2469   # Find out which ABI we are using.
2470   echo 'int i;' > conftest.$ac_ext
2471   if { (eval echo configure:2472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2472     case "`/usr/bin/file conftest.o`" in
2473     *32-bit*)
2474       case $host in
2475         x86_64-*linux*)
2476           LD="${LD-ld} -m elf_i386"
2477           ;;
2478         ppc64-*linux*|powerpc64-*linux*)
2479           LD="${LD-ld} -m elf32ppclinux"
2480           ;;
2481         s390x-*linux*)
2482           LD="${LD-ld} -m elf_s390"
2483           ;;
2484         sparc64-*linux*)
2485           LD="${LD-ld} -m elf32_sparc"
2486           ;;
2487       esac
2488       ;;
2489     *64-bit*)
2490       case $host in
2491         x86_64-*linux*)
2492           LD="${LD-ld} -m elf_x86_64"
2493           ;;
2494         ppc*-*linux*|powerpc*-*linux*)
2495           LD="${LD-ld} -m elf64ppc"
2496           ;;
2497         s390*-*linux*)
2498           LD="${LD-ld} -m elf64_s390"
2499           ;;
2500         sparc*-*linux*)
2501           LD="${LD-ld} -m elf64_sparc"
2502           ;;
2503       esac
2504       ;;
2505     esac
2506   fi
2507   rm -rf conftest*
2508   ;;
2509
2510 *-*-sco3.2v5*)
2511   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2512   SAVE_CFLAGS="$CFLAGS"
2513   CFLAGS="$CFLAGS -belf"
2514   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2515 echo "configure:2516: checking whether the C compiler needs -belf" >&5
2516 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   
2520      ac_ext=c
2521 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2522 ac_cpp='$CPP $CPPFLAGS'
2523 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2524 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2525 cross_compiling=$ac_cv_prog_cc_cross
2526
2527      cat > conftest.$ac_ext <<EOF
2528 #line 2529 "configure"
2529 #include "confdefs.h"
2530
2531 int main() {
2532
2533 ; return 0; }
2534 EOF
2535 if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2536   rm -rf conftest*
2537   lt_cv_cc_needs_belf=yes
2538 else
2539   echo "configure: failed program was:" >&5
2540   cat conftest.$ac_ext >&5
2541   rm -rf conftest*
2542   lt_cv_cc_needs_belf=no
2543 fi
2544 rm -f conftest*
2545      ac_ext=c
2546 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2547 ac_cpp='$CPP $CPPFLAGS'
2548 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2549 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2550 cross_compiling=$ac_cv_prog_cc_cross
2551
2552 fi
2553
2554 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2555   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2556     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2557     CFLAGS="$SAVE_CFLAGS"
2558   fi
2559   ;;
2560
2561
2562 esac
2563
2564 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2565 echo "configure:2566: checking how to run the C++ preprocessor" >&5
2566 if test -z "$CXXCPP"; then
2567 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2568   echo $ac_n "(cached) $ac_c" 1>&6
2569 else
2570   ac_ext=C
2571 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2572 ac_cpp='$CXXCPP $CPPFLAGS'
2573 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2574 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2575 cross_compiling=$ac_cv_prog_cxx_cross
2576   CXXCPP="${CXX-g++} -E"
2577   cat > conftest.$ac_ext <<EOF
2578 #line 2579 "configure"
2579 #include "confdefs.h"
2580 #include <stdlib.h>
2581 EOF
2582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2583 { (eval echo configure:2584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2585 if test -z "$ac_err"; then
2586   :
2587 else
2588   echo "$ac_err" >&5
2589   echo "configure: failed program was:" >&5
2590   cat conftest.$ac_ext >&5
2591   rm -rf conftest*
2592   CXXCPP=/lib/cpp
2593 fi
2594 rm -f conftest*
2595   ac_cv_prog_CXXCPP="$CXXCPP"
2596 ac_ext=c
2597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2598 ac_cpp='$CPP $CPPFLAGS'
2599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2601 cross_compiling=$ac_cv_prog_cc_cross
2602 fi
2603 fi
2604 CXXCPP="$ac_cv_prog_CXXCPP"
2605 echo "$ac_t""$CXXCPP" 1>&6
2606
2607
2608 # Save cache, so that ltconfig can load it
2609 cat > confcache <<\EOF
2610 # This file is a shell script that caches the results of configure
2611 # tests run on this system so they can be shared between configure
2612 # scripts and configure runs.  It is not useful on other systems.
2613 # If it contains results you don't want to keep, you may remove or edit it.
2614 #
2615 # By default, configure uses ./config.cache as the cache file,
2616 # creating it if it does not exist already.  You can give configure
2617 # the --cache-file=FILE option to use a different cache file; that is
2618 # what configure does when it calls configure scripts in
2619 # subdirectories, so they share the cache.
2620 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2621 # config.status only pays attention to the cache file if you give it the
2622 # --recheck option to rerun configure.
2623 #
2624 EOF
2625 # The following way of writing the cache mishandles newlines in values,
2626 # but we know of no workaround that is simple, portable, and efficient.
2627 # So, don't put newlines in cache variables' values.
2628 # Ultrix sh set writes to stderr and can't be redirected directly,
2629 # and sets the high bit in the cache file unless we assign to the vars.
2630 (set) 2>&1 |
2631   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2632   *ac_space=\ *)
2633     # `set' does not quote correctly, so add quotes (double-quote substitution
2634     # turns \\\\ into \\, and sed turns \\ into \).
2635     sed -n \
2636       -e "s/'/'\\\\''/g" \
2637       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2638     ;;
2639   *)
2640     # `set' quotes correctly as required by POSIX, so do not add quotes.
2641     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2642     ;;
2643   esac >> confcache
2644 if cmp -s $cache_file confcache; then
2645   :
2646 else
2647   if test -w $cache_file; then
2648     echo "updating cache $cache_file"
2649     cat confcache > $cache_file
2650   else
2651     echo "not updating unwritable cache $cache_file"
2652   fi
2653 fi
2654 rm -f confcache
2655
2656
2657 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2658 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2659 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2660 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2661 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2662 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2663 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2664 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2665 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2666 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2667
2668 # Reload cache, that may have been modified by ltconfig
2669 if test -r "$cache_file"; then
2670   echo "loading cache $cache_file"
2671   . $cache_file
2672 else
2673   echo "creating cache $cache_file"
2674   > $cache_file
2675 fi
2676
2677
2678 # This can be used to rebuild libtool when needed
2679 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2680
2681 # Always use our own libtool.
2682 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2683
2684 # Redirect the config.log output again, so that the ltconfig log is not
2685 # clobbered by the next message.
2686 exec 5>>./config.log
2687
2688
2689
2690 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2691 lt_save_CC="$CC"
2692 lt_save_CFLAGS="$CFLAGS"
2693 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2694 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2695 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2696 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2697 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2698 deplibs_check_method="$deplibs_check_method" \
2699 file_magic_cmd="$file_magic_cmd" \
2700 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2701 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2702 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2703 CC="$lt_save_CC"
2704 CFLAGS="$lt_save_CFLAGS"
2705
2706 # Redirect the config.log output again, so that the ltconfig log is not
2707 # clobbered by the next message.
2708 exec 5>>./config.log
2709
2710   
2711
2712   
2713          
2714          
2715 subdirs="$DIRLTDL"
2716
2717
2718 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2719    COMPPATH=.
2720 else
2721    COMPPATH=..
2722 fi
2723
2724
2725
2726
2727 if test -d $srcdir/testsuite; then
2728   TESTSUBDIR_TRUE=
2729   TESTSUBDIR_FALSE='#'
2730 else
2731   TESTSUBDIR_TRUE='#'
2732   TESTSUBDIR_FALSE=
2733 fi
2734
2735 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2736 if test "${enable_getenv_properties+set}" = set; then
2737   enableval="$enable_getenv_properties"
2738   :
2739 fi
2740
2741
2742 if test -z "$enable_getenv_properties"; then
2743    enable_getenv_properties=${enable_getenv_properties_default-yes}
2744 fi
2745 if test "$enable_getenv_properties" = no; then
2746    cat >> confdefs.h <<\EOF
2747 #define DISABLE_GETENV_PROPERTIES 1
2748 EOF
2749
2750 fi
2751
2752 if test -z "$enable_main_args"; then
2753    enable_main_args=${enable_main_args_default-yes}
2754 fi
2755 if test "$enable_main_args" = no; then
2756    cat >> confdefs.h <<\EOF
2757 #define DISABLE_MAIN_ARGS 1
2758 EOF
2759
2760 fi
2761
2762
2763 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2764 if test "${enable_hash_synchronization+set}" = set; then
2765   enableval="$enable_hash_synchronization"
2766   :
2767 fi
2768
2769
2770 if test -z "$enable_hash_synchronization"; then
2771    enable_hash_synchronization=$enable_hash_synchronization_default
2772 fi
2773
2774 # Do we allow intermodule optimizations (i.e. compiling many files at once)?
2775 # Check whether --enable-libgcj-multifile or --disable-libgcj-multifile was given.
2776 if test "${enable_libgcj_multifile+set}" = set; then
2777   enableval="$enable_libgcj_multifile"
2778   case "${enableval}" in
2779   yes) enable_libgcj_multifile=yes ;;
2780   no)  enable_libgcj_multifile=no ;;
2781   *) { echo "configure: error: bad value ${enableval} for --enable-libgcj-multifile" 1>&2; exit 1; } ;;
2782 esac
2783 else
2784   enable_libgcj_multifile=no
2785 fi
2786
2787
2788
2789 if test "$enable_libgcj_multifile" = yes; then
2790   ONESTEP_TRUE=
2791   ONESTEP_FALSE='#'
2792 else
2793   ONESTEP_TRUE='#'
2794   ONESTEP_FALSE=
2795 fi
2796
2797 if test "${slow_pthread_self}" = "yes"; then
2798   cat >> confdefs.h <<\EOF
2799 #define SLOW_PTHREAD_SELF 1
2800 EOF
2801
2802 fi
2803
2804
2805 LIBGCJDEBUG="false"
2806
2807 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2808 if test "${enable_libgcj_debug+set}" = set; then
2809   enableval="$enable_libgcj_debug"
2810   if test "$enable_libgcj_debug" = yes; then
2811     cat >> confdefs.h <<\EOF
2812 #define DEBUG 1
2813 EOF
2814
2815     LIBGCJDEBUG="true"
2816   fi
2817 fi
2818
2819
2820 # Check whether --enable-interpreter or --disable-interpreter was given.
2821 if test "${enable_interpreter+set}" = set; then
2822   enableval="$enable_interpreter"
2823   if test "$enable_interpreter" = yes; then
2824     # This can also be set in configure.host.
2825     libgcj_interpreter=yes
2826   elif test "$enable_interpreter" = no; then
2827     libgcj_interpreter=no
2828   fi
2829 fi
2830
2831
2832 if test "$libgcj_interpreter" = yes; then
2833    cat >> confdefs.h <<\EOF
2834 #define INTERPRETER 1
2835 EOF
2836
2837 fi
2838 INTERPRETER="$libgcj_interpreter"
2839
2840
2841 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2842 echo "configure:2843: checking for exception model to use" >&5
2843
2844 ac_ext=C
2845 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2846 ac_cpp='$CXXCPP $CPPFLAGS'
2847 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2848 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2849 cross_compiling=$ac_cv_prog_cxx_cross
2850
2851 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2852 if test "${enable_sjlj_exceptions+set}" = set; then
2853   enableval="$enable_sjlj_exceptions"
2854   :
2855 else
2856   cat > conftest.$ac_ext << EOF
2857 #line 2858 "configure"
2858 struct S { ~S(); };
2859 void bar();
2860 void foo()
2861 {
2862   S s;
2863   bar();
2864 }
2865 EOF
2866 old_CXXFLAGS="$CXXFLAGS"  
2867 CXXFLAGS=-S
2868 if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2869   if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2870     enable_sjlj_exceptions=yes
2871   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2872     enable_sjlj_exceptions=no
2873   fi
2874 fi
2875 CXXFLAGS="$old_CXXFLAGS"
2876 rm -f conftest*
2877 fi
2878
2879 if test x$enable_sjlj_exceptions = xyes; then
2880   cat >> confdefs.h <<\EOF
2881 #define SJLJ_EXCEPTIONS 1
2882 EOF
2883
2884   ac_exception_model_name=sjlj
2885 elif test x$enable_sjlj_exceptions = xno; then
2886   ac_exception_model_name="call frame"
2887 else
2888   { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2889 fi
2890 ac_ext=c
2891 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2892 ac_cpp='$CPP $CPPFLAGS'
2893 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2894 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2895 cross_compiling=$ac_cv_prog_cc_cross
2896
2897 echo "$ac_t""$ac_exception_model_name" 1>&6
2898
2899 # If we are non using SJLJ exceptions, and this host does not have support 
2900 # for unwinding from a signal handler, enable checked dereferences and divides.
2901 if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
2902   CHECKREFSPEC=-fcheck-references
2903   DIVIDESPEC=-fuse-divide-subroutine
2904   EXCEPTIONSPEC=
2905 fi
2906
2907 # Check whether --enable-java-net or --disable-java-net was given.
2908 if test "${enable_java_net+set}" = set; then
2909   enableval="$enable_java_net"
2910   :
2911 fi
2912
2913
2914 if test -z "$enable_java_net"; then
2915    enable_java_net=${enable_java_net_default-yes}
2916 fi
2917 if test "$enable_java_net" = no; then
2918    cat >> confdefs.h <<\EOF
2919 #define DISABLE_JAVA_NET 1
2920 EOF
2921
2922 fi
2923
2924 # Check whether --with-libffi or --without-libffi was given.
2925 if test "${with_libffi+set}" = set; then
2926   withval="$with_libffi"
2927   :
2928 else
2929   with_libffi=${with_libffi_default-yes}
2930 fi
2931
2932
2933 LIBFFI=
2934 LIBFFIINCS=
2935 if test "$with_libffi" != no; then
2936    cat >> confdefs.h <<\EOF
2937 #define USE_LIBFFI 1
2938 EOF
2939
2940    LIBFFI=../libffi/libffi_convenience.la
2941    LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
2942 fi
2943
2944
2945
2946 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2947 if test "${enable_jvmpi+set}" = set; then
2948   enableval="$enable_jvmpi"
2949   :
2950 fi
2951
2952
2953 if test "$enable_jvmpi" != no; then
2954     cat >> confdefs.h <<\EOF
2955 #define ENABLE_JVMPI 1
2956 EOF
2957
2958 fi
2959
2960 TARGET_ECOS=${PROCESS-"no"}
2961 # Check whether --with-ecos or --without-ecos was given.
2962 if test "${with_ecos+set}" = set; then
2963   withval="$with_ecos"
2964   TARGET_ECOS="$with_ecos"
2965
2966 fi
2967
2968
2969 PLATFORMOBJS=
2970 case "$TARGET_ECOS" in
2971    no) case "$host" in
2972       *mingw*)
2973             PLATFORM=Win32
2974             PLATFORMNET=Win32
2975             PLATFORMOBJS=win32.lo
2976             PLATFORMH=win32.h
2977         
2978 echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6
2979 echo "configure:2980: checking whether 'ld' is at least 2.13" >&5
2980 LD_PROG=`$CC --print-prog-name=ld`
2981 LD_VERSION=`$LD_PROG --version`
2982 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
2983 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
2984 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
2985   LD_OK="ok"
2986 else
2987   if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
2988     LD_OK="ok"
2989   fi
2990 fi
2991 if test "x$LD_OK" != x; then
2992   echo "$ac_t""yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
2993 else
2994   echo "$ac_t""no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
2995   echo "configure: warning: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." 1>&2
2996   cat >> confdefs.h <<\EOF
2997 #define JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS 1
2998 EOF
2999
3000 fi
3001       ;;
3002       *)
3003             PLATFORM=Posix
3004             PLATFORMNET=Posix
3005             PLATFORMOBJS=posix.lo
3006             PLATFORMH=posix.h
3007       ;;
3008       esac
3009       ;;
3010    *)
3011       PLATFORM=Ecos
3012       PLATFORMNET=NoNet
3013       cat >> confdefs.h <<\EOF
3014 #define ECOS 1
3015 EOF
3016
3017       PLATFORMOBJS=posix.lo
3018       PLATFORMH=posix.h
3019       ;;
3020 esac
3021
3022
3023
3024 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3025 echo "configure:3026: checking how to run the C preprocessor" >&5
3026 # On Suns, sometimes $CPP names a directory.
3027 if test -n "$CPP" && test -d "$CPP"; then
3028   CPP=
3029 fi
3030 if test -z "$CPP"; then
3031 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034     # This must be in double quotes, not single quotes, because CPP may get
3035   # substituted into the Makefile and "${CC-cc}" will confuse make.
3036   CPP="${CC-cc} -E"
3037   # On the NeXT, cc -E runs the code through the compiler's parser,
3038   # not just through cpp.
3039   cat > conftest.$ac_ext <<EOF
3040 #line 3041 "configure"
3041 #include "confdefs.h"
3042 #include <assert.h>
3043 Syntax Error
3044 EOF
3045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3046 { (eval echo configure:3047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3048 if test -z "$ac_err"; then
3049   :
3050 else
3051   echo "$ac_err" >&5
3052   echo "configure: failed program was:" >&5
3053   cat conftest.$ac_ext >&5
3054   rm -rf conftest*
3055   CPP="${CC-cc} -E -traditional-cpp"
3056   cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 #include <assert.h>
3060 Syntax Error
3061 EOF
3062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3063 { (eval echo configure:3064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3065 if test -z "$ac_err"; then
3066   :
3067 else
3068   echo "$ac_err" >&5
3069   echo "configure: failed program was:" >&5
3070   cat conftest.$ac_ext >&5
3071   rm -rf conftest*
3072   CPP="${CC-cc} -nologo -E"
3073   cat > conftest.$ac_ext <<EOF
3074 #line 3075 "configure"
3075 #include "confdefs.h"
3076 #include <assert.h>
3077 Syntax Error
3078 EOF
3079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3080 { (eval echo configure:3081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3082 if test -z "$ac_err"; then
3083   :
3084 else
3085   echo "$ac_err" >&5
3086   echo "configure: failed program was:" >&5
3087   cat conftest.$ac_ext >&5
3088   rm -rf conftest*
3089   CPP=/lib/cpp
3090 fi
3091 rm -f conftest*
3092 fi
3093 rm -f conftest*
3094 fi
3095 rm -f conftest*
3096   ac_cv_prog_CPP="$CPP"
3097 fi
3098   CPP="$ac_cv_prog_CPP"
3099 else
3100   ac_cv_prog_CPP="$CPP"
3101 fi
3102 echo "$ac_t""$CPP" 1>&6
3103
3104 cat > conftest.$ac_ext <<EOF
3105 #line 3106 "configure"
3106 #include "confdefs.h"
3107 #include <stdint.h>
3108 EOF
3109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3110   egrep "uint32_t" >/dev/null 2>&1; then
3111   rm -rf conftest*
3112   cat >> confdefs.h <<\EOF
3113 #define HAVE_INT32_DEFINED 1
3114 EOF
3115
3116 fi
3117 rm -f conftest*
3118
3119 cat > conftest.$ac_ext <<EOF
3120 #line 3121 "configure"
3121 #include "confdefs.h"
3122 #include <inttypes.h>
3123 EOF
3124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3125   egrep "uint32_t" >/dev/null 2>&1; then
3126   rm -rf conftest*
3127   cat >> confdefs.h <<\EOF
3128 #define HAVE_INT32_DEFINED 1
3129 EOF
3130
3131 fi
3132 rm -f conftest*
3133
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137 #include <sys/types.h>
3138 EOF
3139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3140   egrep "u_int32_t" >/dev/null 2>&1; then
3141   rm -rf conftest*
3142   cat >> confdefs.h <<\EOF
3143 #define HAVE_BSD_INT32_DEFINED 1
3144 EOF
3145
3146 fi
3147 rm -f conftest*
3148
3149 cat > conftest.$ac_ext <<EOF
3150 #line 3151 "configure"
3151 #include "confdefs.h"
3152 #include <sys/config.h>
3153 EOF
3154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3155   egrep "u_int32_t" >/dev/null 2>&1; then
3156   rm -rf conftest*
3157   cat >> confdefs.h <<\EOF
3158 #define HAVE_BSD_INT32_DEFINED 1
3159 EOF
3160
3161 fi
3162 rm -f conftest*
3163
3164
3165
3166 cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169 #include <time.h>
3170 EOF
3171 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3172   egrep "mktime" >/dev/null 2>&1; then
3173   rm -rf conftest*
3174   cat >> confdefs.h <<\EOF
3175 #define HAVE_MKTIME 1
3176 EOF
3177
3178 fi
3179 rm -f conftest*
3180
3181 cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184 #include <time.h>
3185 EOF
3186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3187   egrep "localtime" >/dev/null 2>&1; then
3188   rm -rf conftest*
3189   cat >> confdefs.h <<\EOF
3190 #define HAVE_LOCALTIME 1
3191 EOF
3192
3193 fi
3194 rm -f conftest*
3195
3196
3197 test -d java || mkdir java
3198 test -d java/io || mkdir java/io
3199 test -d gnu || mkdir gnu
3200
3201
3202
3203 test -d java/lang || mkdir java/lang
3204
3205
3206
3207 test -d java/net || mkdir java/net
3208
3209
3210
3211 test -d gnu/java || mkdir gnu/java
3212 test -d gnu/java/net || mkdir gnu/java/net
3213
3214
3215
3216 case "${host}" in
3217     *mingw*)
3218       SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
3219     ;;
3220     *)
3221       SYSTEMSPEC=
3222     ;;
3223 esac
3224
3225
3226 LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
3227
3228
3229 # Check whether --with-system-zlib or --without-system-zlib was given.
3230 if test "${with_system_zlib+set}" = set; then
3231   withval="$with_system_zlib"
3232   :
3233 fi
3234
3235 ZLIBSPEC=
3236
3237 ZLIBTESTSPEC=
3238
3239
3240 # If we find X, set shell vars x_includes and x_libraries to the
3241 # paths, otherwise set no_x=yes.
3242 # Uses ac_ vars as temps to allow command line to override cache and checks.
3243 # --without-x overrides everything else, but does not touch the cache.
3244 echo $ac_n "checking for X""... $ac_c" 1>&6
3245 echo "configure:3246: checking for X" >&5
3246
3247 # Check whether --with-x or --without-x was given.
3248 if test "${with_x+set}" = set; then
3249   withval="$with_x"
3250   :
3251 fi
3252
3253 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3254 if test "x$with_x" = xno; then
3255   # The user explicitly disabled X.
3256   have_x=disabled
3257 else
3258   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3259     # Both variables are already set.
3260     have_x=yes
3261   else
3262 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3263   echo $ac_n "(cached) $ac_c" 1>&6
3264 else
3265   # One or both of the vars are not set, and there is no cached value.
3266 ac_x_includes=NO ac_x_libraries=NO
3267 rm -fr conftestdir
3268 if mkdir conftestdir; then
3269   cd conftestdir
3270   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3271   cat > Imakefile <<'EOF'
3272 acfindx:
3273         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3274 EOF
3275   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3276     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3277     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3278     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3279     for ac_extension in a so sl; do
3280       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3281         test -f $ac_im_libdir/libX11.$ac_extension; then
3282         ac_im_usrlibdir=$ac_im_libdir; break
3283       fi
3284     done
3285     # Screen out bogus values from the imake configuration.  They are
3286     # bogus both because they are the default anyway, and because
3287     # using them would break gcc on systems where it needs fixed includes.
3288     case "$ac_im_incroot" in
3289         /usr/include) ;;
3290         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3291     esac
3292     case "$ac_im_usrlibdir" in
3293         /usr/lib | /lib) ;;
3294         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3295     esac
3296   fi
3297   cd ..
3298   rm -fr conftestdir
3299 fi
3300
3301 if test "$ac_x_includes" = NO; then
3302   # Guess where to find include files, by looking for this one X11 .h file.
3303   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3304
3305   # First, try using that file with no special directory specified.
3306 cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309 #include <$x_direct_test_include>
3310 EOF
3311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3312 { (eval echo configure:3313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3314 if test -z "$ac_err"; then
3315   rm -rf conftest*
3316   # We can compile using X headers with no special include directory.
3317 ac_x_includes=
3318 else
3319   echo "$ac_err" >&5
3320   echo "configure: failed program was:" >&5
3321   cat conftest.$ac_ext >&5
3322   rm -rf conftest*
3323   # Look for the header file in a standard set of common directories.
3324 # Check X11 before X11Rn because it is often a symlink to the current release.
3325   for ac_dir in               \
3326     /usr/X11/include          \
3327     /usr/X11R6/include        \
3328     /usr/X11R5/include        \
3329     /usr/X11R4/include        \
3330                               \
3331     /usr/include/X11          \
3332     /usr/include/X11R6        \
3333     /usr/include/X11R5        \
3334     /usr/include/X11R4        \
3335                               \
3336     /usr/local/X11/include    \
3337     /usr/local/X11R6/include  \
3338     /usr/local/X11R5/include  \
3339     /usr/local/X11R4/include  \
3340                               \
3341     /usr/local/include/X11    \
3342     /usr/local/include/X11R6  \
3343     /usr/local/include/X11R5  \
3344     /usr/local/include/X11R4  \
3345                               \
3346     /usr/X386/include         \
3347     /usr/x386/include         \
3348     /usr/XFree86/include/X11  \
3349                               \
3350     /usr/include              \
3351     /usr/local/include        \
3352     /usr/unsupported/include  \
3353     /usr/athena/include       \
3354     /usr/local/x11r5/include  \
3355     /usr/lpp/Xamples/include  \
3356                               \
3357     /usr/openwin/include      \
3358     /usr/openwin/share/include \
3359     ; \
3360   do
3361     if test -r "$ac_dir/$x_direct_test_include"; then
3362       ac_x_includes=$ac_dir
3363       break
3364     fi
3365   done
3366 fi
3367 rm -f conftest*
3368 fi # $ac_x_includes = NO
3369
3370 if test "$ac_x_libraries" = NO; then
3371   # Check for the libraries.
3372
3373   test -z "$x_direct_test_library" && x_direct_test_library=Xt
3374   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3375
3376   # See if we find them without any special options.
3377   # Don't add to $LIBS permanently.
3378   ac_save_LIBS="$LIBS"
3379   LIBS="-l$x_direct_test_library $LIBS"
3380 cat > conftest.$ac_ext <<EOF
3381 #line 3382 "configure"
3382 #include "confdefs.h"
3383
3384 int main() {
3385 ${x_direct_test_function}()
3386 ; return 0; }
3387 EOF
3388 if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3389   rm -rf conftest*
3390   LIBS="$ac_save_LIBS"
3391 # We can link X programs with no special library path.
3392 ac_x_libraries=
3393 else
3394   echo "configure: failed program was:" >&5
3395   cat conftest.$ac_ext >&5
3396   rm -rf conftest*
3397   LIBS="$ac_save_LIBS"
3398 # First see if replacing the include by lib works.
3399 # Check X11 before X11Rn because it is often a symlink to the current release.
3400 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3401     /usr/X11/lib          \
3402     /usr/X11R6/lib        \
3403     /usr/X11R5/lib        \
3404     /usr/X11R4/lib        \
3405                           \
3406     /usr/lib/X11          \
3407     /usr/lib/X11R6        \
3408     /usr/lib/X11R5        \
3409     /usr/lib/X11R4        \
3410                           \
3411     /usr/local/X11/lib    \
3412     /usr/local/X11R6/lib  \
3413     /usr/local/X11R5/lib  \
3414     /usr/local/X11R4/lib  \
3415                           \
3416     /usr/local/lib/X11    \
3417     /usr/local/lib/X11R6  \
3418     /usr/local/lib/X11R5  \
3419     /usr/local/lib/X11R4  \
3420                           \
3421     /usr/X386/lib         \
3422     /usr/x386/lib         \
3423     /usr/XFree86/lib/X11  \
3424                           \
3425     /usr/lib              \
3426     /usr/local/lib        \
3427     /usr/unsupported/lib  \
3428     /usr/athena/lib       \
3429     /usr/local/x11r5/lib  \
3430     /usr/lpp/Xamples/lib  \
3431     /lib/usr/lib/X11      \
3432                           \
3433     /usr/openwin/lib      \
3434     /usr/openwin/share/lib \
3435     ; \
3436 do
3437   for ac_extension in a so sl; do
3438     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3439       ac_x_libraries=$ac_dir
3440       break 2
3441     fi
3442   done
3443 done
3444 fi
3445 rm -f conftest*
3446 fi # $ac_x_libraries = NO
3447
3448 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3449   # Didn't find X anywhere.  Cache the known absence of X.
3450   ac_cv_have_x="have_x=no"
3451 else
3452   # Record where we found X for the cache.
3453   ac_cv_have_x="have_x=yes \
3454                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3455 fi
3456 fi
3457   fi
3458   eval "$ac_cv_have_x"
3459 fi # $with_x != no
3460
3461 if test "$have_x" != yes; then
3462   echo "$ac_t""$have_x" 1>&6
3463   no_x=yes
3464 else
3465   # If each of the values was on the command line, it overrides each guess.
3466   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3467   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3468   # Update the cache value to reflect the command line values.
3469   ac_cv_have_x="have_x=yes \
3470                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3471   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3472 fi
3473
3474 if test "$no_x" = yes; then
3475   # Not all programs may use this symbol, but it does not hurt to define it.
3476   cat >> confdefs.h <<\EOF
3477 #define X_DISPLAY_MISSING 1
3478 EOF
3479
3480   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3481 else
3482   if test -n "$x_includes"; then
3483     X_CFLAGS="$X_CFLAGS -I$x_includes"
3484   fi
3485
3486   # It would also be nice to do this for all -L options, not just this one.
3487   if test -n "$x_libraries"; then
3488     X_LIBS="$X_LIBS -L$x_libraries"
3489     # For Solaris; some versions of Sun CC require a space after -R and
3490     # others require no space.  Words are not sufficient . . . .
3491     case "`(uname -sr) 2>/dev/null`" in
3492     "SunOS 5"*)
3493       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3494 echo "configure:3495: checking whether -R must be followed by a space" >&5
3495       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3496       cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499
3500 int main() {
3501
3502 ; return 0; }
3503 EOF
3504 if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3505   rm -rf conftest*
3506   ac_R_nospace=yes
3507 else
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   rm -rf conftest*
3511   ac_R_nospace=no
3512 fi
3513 rm -f conftest*
3514       if test $ac_R_nospace = yes; then
3515         echo "$ac_t""no" 1>&6
3516         X_LIBS="$X_LIBS -R$x_libraries"
3517       else
3518         LIBS="$ac_xsave_LIBS -R $x_libraries"
3519         cat > conftest.$ac_ext <<EOF
3520 #line 3521 "configure"
3521 #include "confdefs.h"
3522
3523 int main() {
3524
3525 ; return 0; }
3526 EOF
3527 if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3528   rm -rf conftest*
3529   ac_R_space=yes
3530 else
3531   echo "configure: failed program was:" >&5
3532   cat conftest.$ac_ext >&5
3533   rm -rf conftest*
3534   ac_R_space=no
3535 fi
3536 rm -f conftest*
3537         if test $ac_R_space = yes; then
3538           echo "$ac_t""yes" 1>&6
3539           X_LIBS="$X_LIBS -R $x_libraries"
3540         else
3541           echo "$ac_t""neither works" 1>&6
3542         fi
3543       fi
3544       LIBS="$ac_xsave_LIBS"
3545     esac
3546   fi
3547
3548   # Check for system-dependent libraries X programs must link with.
3549   # Do this before checking for the system-independent R6 libraries
3550   # (-lICE), since we may need -lsocket or whatever for X linking.
3551
3552   if test "$ISC" = yes; then
3553     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3554   else
3555     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3556     # libraries were built with DECnet support.  And karl@cs.umb.edu says
3557     # the Alpha needs dnet_stub (dnet does not exist).
3558     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3559 echo "configure:3560: checking for dnet_ntoa in -ldnet" >&5
3560 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3561 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3562   echo $ac_n "(cached) $ac_c" 1>&6
3563 else
3564   ac_save_LIBS="$LIBS"
3565 LIBS="-ldnet  $LIBS"
3566 cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3569 /* Override any gcc2 internal prototype to avoid an error.  */
3570 /* We use char because int might match the return type of a gcc2
3571     builtin and then its argument prototype would still apply.  */
3572 char dnet_ntoa();
3573
3574 int main() {
3575 dnet_ntoa()
3576 ; return 0; }
3577 EOF
3578 if { (eval echo configure:3579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3579   rm -rf conftest*
3580   eval "ac_cv_lib_$ac_lib_var=yes"
3581 else
3582   echo "configure: failed program was:" >&5
3583   cat conftest.$ac_ext >&5
3584   rm -rf conftest*
3585   eval "ac_cv_lib_$ac_lib_var=no"
3586 fi
3587 rm -f conftest*
3588 LIBS="$ac_save_LIBS"
3589
3590 fi
3591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3592   echo "$ac_t""yes" 1>&6
3593   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3594 else
3595   echo "$ac_t""no" 1>&6
3596 fi
3597
3598     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3599       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3600 echo "configure:3601: checking for dnet_ntoa in -ldnet_stub" >&5
3601 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3603   echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605   ac_save_LIBS="$LIBS"
3606 LIBS="-ldnet_stub  $LIBS"
3607 cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 /* Override any gcc2 internal prototype to avoid an error.  */
3611 /* We use char because int might match the return type of a gcc2
3612     builtin and then its argument prototype would still apply.  */
3613 char dnet_ntoa();
3614
3615 int main() {
3616 dnet_ntoa()
3617 ; return 0; }
3618 EOF
3619 if { (eval echo configure:3620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3620   rm -rf conftest*
3621   eval "ac_cv_lib_$ac_lib_var=yes"
3622 else
3623   echo "configure: failed program was:" >&5
3624   cat conftest.$ac_ext >&5
3625   rm -rf conftest*
3626   eval "ac_cv_lib_$ac_lib_var=no"
3627 fi
3628 rm -f conftest*
3629 LIBS="$ac_save_LIBS"
3630
3631 fi
3632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3633   echo "$ac_t""yes" 1>&6
3634   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3635 else
3636   echo "$ac_t""no" 1>&6
3637 fi
3638
3639     fi
3640
3641     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3642     # to get the SysV transport functions.
3643     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3644     # needs -lnsl.
3645     # The nsl library prevents programs from opening the X display
3646     # on Irix 5.2, according to dickey@clark.net.
3647     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3648 echo "configure:3649: checking for gethostbyname" >&5
3649 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3650   echo $ac_n "(cached) $ac_c" 1>&6
3651 else
3652   cat > conftest.$ac_ext <<EOF
3653 #line 3654 "configure"
3654 #include "confdefs.h"
3655 /* System header to define __stub macros and hopefully few prototypes,
3656     which can conflict with char gethostbyname(); below.  */
3657 #include <assert.h>
3658 /* Override any gcc2 internal prototype to avoid an error.  */
3659 /* We use char because int might match the return type of a gcc2
3660     builtin and then its argument prototype would still apply.  */
3661 char gethostbyname();
3662
3663 int main() {
3664
3665 /* The GNU C library defines this for functions which it implements
3666     to always fail with ENOSYS.  Some functions are actually named
3667     something starting with __ and the normal name is an alias.  */
3668 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3669 choke me
3670 #else
3671 gethostbyname();
3672 #endif
3673
3674 ; return 0; }
3675 EOF
3676 if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3677   rm -rf conftest*
3678   eval "ac_cv_func_gethostbyname=yes"
3679 else
3680   echo "configure: failed program was:" >&5
3681   cat conftest.$ac_ext >&5
3682   rm -rf conftest*
3683   eval "ac_cv_func_gethostbyname=no"
3684 fi
3685 rm -f conftest*
3686 fi
3687
3688 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3689   echo "$ac_t""yes" 1>&6
3690   :
3691 else
3692   echo "$ac_t""no" 1>&6
3693 fi
3694
3695     if test $ac_cv_func_gethostbyname = no; then
3696       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3697 echo "configure:3698: checking for gethostbyname in -lnsl" >&5
3698 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3699 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3700   echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702   ac_save_LIBS="$LIBS"
3703 LIBS="-lnsl  $LIBS"
3704 cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 /* Override any gcc2 internal prototype to avoid an error.  */
3708 /* We use char because int might match the return type of a gcc2
3709     builtin and then its argument prototype would still apply.  */
3710 char gethostbyname();
3711
3712 int main() {
3713 gethostbyname()