Makefile.am, [...] (AM_CFLAGS): Add @EXTRA_CFLAGS@.
[gcc.git] / libjava / classpath / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl -----------------------------------------------------------
4 dnl Turning off cache for debug reasons
5 dnl -----------------------------------------------------------
6 dnl define([AC_CACHE_LOAD], )dnl
7 dnl define([AC_CACHE_SAVE], )dnl
8
9 AC_INIT([GNU Classpath],[0.96-pre],[classpath@gnu.org],[classpath])
10 AC_CONFIG_SRCDIR(java/lang/System.java)
11
12 dnl GCJ LOCAL
13 AC_CONFIG_AUX_DIR(../..)
14 dnl END GCJ LOCAL
15
16 AC_CANONICAL_TARGET
17
18 dnl GCJ LOCAL
19 AC_ARG_ENABLE(java-maintainer-mode,
20 AS_HELP_STRING([--enable-java-maintainer-mode],
21 [allow rebuilding of .class and .h files]))
22 AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
23 dnl END GCJ LOCAL
24
25 dnl GCJ LOCAL
26 # We would like to our source tree to be readonly. However when releases or
27 # pre-releases are generated, the man pages need to be included as they are
28 # converted from the texi files via perl which we don't require end users to
29 # have installed.
30 # Therefore we have --enable-generated-files-in-srcdir to do just that.
31
32 AC_MSG_CHECKING([whether to place generated files in the source directory])
33 dnl generated-files-in-srcdir is disabled by default
34 AC_ARG_ENABLE(generated-files-in-srcdir,
35 [ --enable-generated-files-in-srcdir
36 put copies of generated files in source dir
37 intended for creating source tarballs for users
38 without texinfo, perl, bison or flex.],
39 generated_files_in_srcdir=$enableval,
40 generated_files_in_srcdir=no)
41
42 AC_MSG_RESULT($generated_files_in_srcdir)
43 AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes)
44 dnl END GCJ LOCAL
45
46 # Find the rest of the source tree framework.
47 AM_ENABLE_MULTILIB(, ../..)
48
49 dnl -----------------------------------------------------------
50 dnl Fold all IA-32 CPU architectures into "x86"
51 dnl -----------------------------------------------------------
52 if expr ${target_cpu} : '.*86' > /dev/null; then target_cpu=x86; fi
53
54 dnl -----------------------------------------------------------
55 dnl We will not track/change lib version until we reach version 1.0
56 dnl at which time we'll have to be more anal about such things
57 dnl -----------------------------------------------------------
58 AC_SUBST(LIBVERSION, "0:0:0")
59 case "$host_os" in
60 darwin*)
61 cp_module=""
62 ;;
63 *)
64 cp_module="-module"
65 ;;
66 esac
67
68 CLASSPATH_MODULE="${cp_module} -version-info ${LIBVERSION} -no-undefined"
69 AC_SUBST(CLASSPATH_MODULE)
70
71 CLASSPATH_CONVENIENCE="-no-undefined"
72 AC_SUBST(CLASSPATH_CONVENIENCE)
73
74 AC_PREREQ(2.59)
75 AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar -Wno-portability])
76 AC_CONFIG_HEADERS([include/config.h])
77 AC_PREFIX_DEFAULT(/usr/local/classpath)
78
79 dnl GCC LOCAL
80 GCC_NO_EXECUTABLES
81
82 dnl -----------------------------------------------------------
83 dnl Enable collections.jar (disabled by default)
84 dnl -----------------------------------------------------------
85 AC_ARG_ENABLE([collections],
86 [AS_HELP_STRING(--enable-collections,create collections.jar [default=no])],
87 [case x"${enableval}" in
88 xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
89 xno) COMPILE_COLLECTIONS=no ;;
90 x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
91 *) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;;
92 esac],
93 [COMPILE_COLLECTIONS=no])
94 AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)
95
96 dnl -----------------------------------------------------------
97 dnl Enable JNI libraries (enabled by default)
98 dnl -----------------------------------------------------------
99 AC_ARG_ENABLE([jni],
100 [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])],
101 [case "${enableval}" in
102 yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
103 no) COMPILE_JNI=no ;;
104 *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
105 esac],
106 [COMPILE_JNI=yes])
107 AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes)
108
109 dnl -----------------------------------------------------------
110 dnl Enable core JNI libraries (enabled by default)
111 dnl -----------------------------------------------------------
112 AC_ARG_ENABLE([core-jni],
113 [AS_HELP_STRING(--enable-core-jni,
114 compile JNI sources for core [default=yes])],
115 [case "${enableval}" in
116 yes) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
117 no) COMPILE_CORE_JNI=no ;;
118 *) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
119 esac],
120 [COMPILE_CORE_JNI=yes])
121 AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
122
123 dnl -----------------------------------------------------------
124 dnl Default Preference Backend
125 dnl -----------------------------------------------------------
126 AC_ARG_ENABLE([default-preferences-peer],
127 [AS_HELP_STRING([--enable-default-preferences-peer@<:@=peer type or class name@:>@],
128 [specify one of: "gconf" [default] for a GConf based backend, "file" for a file based one, "memory" for a transient one, or a fully qualified class name implementing java.util.prefs.PreferencesFactory])],
129 [case "${enableval}" in
130 file) DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory ;;
131 gconf|yes|true) DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory ;;
132 memory) DEFAULT_PREFS_PEER=gnu.java.util.prefs.MemoryBasedFactory ;;
133 no|false) AC_MSG_ERROR(bad value '${enableval}' for --enable-default-preferences-peer) ;;
134 *) DEFAULT_PREFS_PEER=${enableval} ;;
135 esac],
136 [DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory])
137 dnl AC_SUBST(DEFAULT_PREFS_PEER)
138
139 dnl -----------------------------------------------------------
140 dnl GConf native peer (enabled by default)
141 dnl -----------------------------------------------------------
142 AC_ARG_ENABLE([gconf-peer],
143 [AS_HELP_STRING(--disable-gconf-peer,compile GConf native peers (disabled by --disable-jni) [default=yes])],
144 [case "${enableval}" in
145 yes) COMPILE_GCONF_PEER=yes ;;
146 no) COMPILE_GCONF_PEER=no ;;
147 *) COMPILE_GCONF_PEER=yes ;;
148 esac],
149 [COMPILE_GCONF_PEER=yes])
150 AM_CONDITIONAL(CREATE_GCONF_PEER_LIBRARIES, test "x${COMPILE_GCONF_PEER}" = xyes)
151
152 dnl -----------------------------------------------------------
153 dnl GConf native peer error checking
154 dnl -----------------------------------------------------------
155 AC_ARG_ENABLE([gconf-peers],,AC_MSG_ERROR([No --enable-gconf-peers (or --disable-gconf-peers) option; you want --enable-gconf-peer]))
156
157 dnl ------------------------------------------------------------
158 dnl GStreamer based sound provider backend (disabled by default)
159 dnl ------------------------------------------------------------
160 AC_ARG_ENABLE([gstreamer-peer],
161 [AS_HELP_STRING(--enable-gstreamer-peer,compile GStreamer native peers (disabled by --disable-jni) [default=no])],
162 [case "${enableval}" in
163 yes) COMPILE_GSTREAMER_PEER=yes ;;
164 no) COMPILE_GSTREAMER_PEER=no ;;
165 *) COMPILE_GSTREAMER_PEER=default ;;
166 esac],
167 [COMPILE_GSTREAMER_PEER=default])
168 AM_CONDITIONAL(CREATE_GSTREAMER_PEER_LIBRARIES, test "x${COMPILE_GSTREAMER_PEER}" = xyes)
169
170 dnl -----------------------------------------------------------
171 dnl GStreamer native peer error checking
172 dnl -----------------------------------------------------------
173 AC_ARG_ENABLE([gstreamer-peers],,AC_MSG_ERROR([No --enable-gstreamer-peers (or --disable-gstreamer-peers) option; you want --enable-gstreamer-peer]))
174
175 dnl ------------------------------------------------------------
176 dnl Whether to compile with -Werror or not (disabled by default)
177 dnl ------------------------------------------------------------
178 AC_ARG_ENABLE([Werror],
179 [AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])],
180 [case "${enableval}" in
181 yes) ENABLE_WERROR=yes ;;
182 no) ENABLE_WERROR=no ;;
183 *) ENABLE_WERROR=default ;;
184 esac],
185 [ENABLE_WERROR=default])
186
187 dnl -----------------------------------------------------------
188 dnl Default AWT toolkit
189 dnl -----------------------------------------------------------
190 AC_ARG_ENABLE(default-toolkit,
191 AS_HELP_STRING([--enable-default-toolkit],
192 [fully qualified class name of default AWT toolkit]))
193 default_toolkit=$enable_default_toolkit
194 if test "$default_toolkit" = ""; then
195 default_toolkit=gnu.java.awt.peer.gtk.GtkToolkit
196 fi
197 AC_SUBST(default_toolkit)
198
199 dnl -----------------------------------------------------------
200 dnl Native libxml/xslt library (disabled by default)
201 dnl -----------------------------------------------------------
202 AC_ARG_ENABLE([xmlj],
203 [AS_HELP_STRING(--enable-xmlj,compile native libxml/xslt library [default=no])],
204 [case "${enableval}" in
205 yes) COMPILE_XMLJ=yes ;;
206 no) COMPILE_XMLJ=no ;;
207 *) COMPILE_XMLJ=no ;;
208 esac],
209 [COMPILE_XMLJ=no])
210 AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)
211
212 dnl -----------------------------------------------------------
213 dnl ALSA code (enabled by default)
214 dnl -----------------------------------------------------------
215 AC_ARG_ENABLE([alsa],
216 [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])],
217 [case "${enableval}" in
218 yes) COMPILE_ALSA=yes ;;
219 no) COMPILE_ALSA=no ;;
220 *) COMPILE_ALSA=yes ;;
221 esac],
222 [AC_CHECK_HEADERS([alsa/asoundlib.h],
223 [AC_CHECK_LIB([asound], [snd_seq_open], COMPILE_ALSA=yes,COMPILE_ALSA=no)],
224 COMPILE_ALSA=no)])
225 AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)
226
227 dnl -----------------------------------------------------------
228 dnl DSSI code (enabled by default)
229 dnl -----------------------------------------------------------
230 AC_ARG_ENABLE([dssi],
231 [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])],
232 [case "${enableval}" in
233 yes) COMPILE_DSSI=yes ;;
234 no) COMPILE_DSSI=no ;;
235 *) COMPILE_DSSI=yes ;;
236 esac],
237 [COMPILE_DSSI=no
238 AC_CHECK_HEADERS([dssi.h], [
239 AC_CHECK_HEADERS([jack/jack.h],COMPILE_DSSI=yes)])])
240 AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)
241
242 dnl -----------------------------------------------------------
243 dnl GTK native peer (enabled by default)
244 dnl -----------------------------------------------------------
245 AC_ARG_ENABLE([gtk-peer],
246 [AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers (disabled by --disable-jni) [default=yes])],
247 [case "${enableval}" in
248 yes) COMPILE_GTK_PEER=yes ;;
249 no) COMPILE_GTK_PEER=no ;;
250 *) COMPILE_GTK_PEER=yes ;;
251 esac],
252 [COMPILE_GTK_PEER=yes])
253 AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes)
254
255 dnl -----------------------------------------------------------
256 dnl GTK native peer error checking
257 dnl -----------------------------------------------------------
258 AC_ARG_ENABLE([gtk-peers],,AC_MSG_ERROR([No --enable-gtk-peers (or --disable-gtk-peers) option; you want --enable-gtk-peer]))
259
260 dnl -----------------------------------------------------------
261 dnl Qt native peer (disabled by default)
262 dnl -----------------------------------------------------------
263 AC_ARG_ENABLE([qt-peer],
264 [AS_HELP_STRING(--enable-qt-peer,compile Qt4 native peers (disabled by --disable-jni) [default=no])],
265 [case "${enableval}" in
266 yes) COMPILE_QT_PEER=yes ;;
267 no) COMPILE_QT_PEER=no ;;
268 *) COMPILE_QT_PEER=yes ;;
269 esac],
270 [COMPILE_QT_PEER=no])
271 AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
272
273 dnl -----------------------------------------------------------
274 dnl Plugin (enabled by default)
275 dnl -----------------------------------------------------------
276 AC_ARG_ENABLE([plugin],
277 [AS_HELP_STRING(--disable-plugin,compile gcjwebplugin (disabled by --disable-plugin) [default=yes])],
278 [case "${enableval}" in
279 yes) COMPILE_PLUGIN=yes ;;
280 no) COMPILE_PLUGIN=no ;;
281 *) COMPILE_PLUGIN=yes ;;
282 esac],
283 [COMPILE_PLUGIN=yes])
284 AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes)
285
286 dnl -----------------------------------------------------------
287 dnl GCJ LOCAL: Calculates and substitutes toolexeclibdir. $libdir is
288 dnl defined to the same value for all multilibs. We define toolexeclibdir
289 dnl so that we can refer to the multilib installation directories from
290 dnl classpath's build files.
291 dnl -----------------------------------------------------------
292 CLASSPATH_TOOLEXECLIBDIR
293
294 dnl -----------------------------------------------------------
295 dnl Sets the native libraries installation dir
296 dnl -----------------------------------------------------------
297 dnl GCJ LOCAL: default to ${toolexeclibdir}/gcj-${gcc_version}-${libgcj_soversion}
298 AC_ARG_WITH([native-libdir],
299 [AS_HELP_STRING(--with-native-libdir,sets the installation directory for native libraries [default='${libdir}/${PACKAGE}'])],
300 [
301 nativeexeclibdir=${withval}
302 ],
303 [
304 nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version`
305 ])
306
307 AC_SUBST(nativeexeclibdir)
308
309 dnl -----------------------------------------------------------
310 dnl Sets the Java library installation dir.
311 dnl -----------------------------------------------------------
312 AC_ARG_WITH([glibj-dir],
313 [AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])],
314 [
315 glibjdir=${withval}
316 ],
317 [
318 glibjdir='${datadir}/${PACKAGE}'
319 ])
320
321 AC_SUBST(glibjdir)
322
323 dnl -----------------------------------------------------------
324 dnl Sets the VM name for use in tool wrapper scripts
325 dnl -----------------------------------------------------------
326 AC_ARG_WITH([vm],
327 [AS_HELP_STRING(--with-vm,sets the VM binary name [default='${prefix}/bin/jamvm'])],
328 [
329 VM_BINARY=${withval}
330 ],
331 [
332 VM_BINARY='${prefix}/bin/jamvm'
333 ])
334
335 AC_SUBST(VM_BINARY)
336
337 dnl -----------------------------------------------------------
338 dnl Regenerate headers at build time (disabled by default)
339 dnl -----------------------------------------------------------
340 AC_ARG_ENABLE([regen-headers],
341 [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])],
342 [case "${enableval}" in
343 yes) REGENERATE_JNI_HEADERS=yes ;;
344 no) REGENERATE_JNI_HEADERS=no ;;
345 *) REGENERATE_JNI_HEADERS=no ;;
346 esac],
347 [REGENERATE_JNI_HEADERS=no])
348 AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
349
350 dnl -----------------------------------------------------------
351 dnl Enable tool wrapper binaries (disabled by default)
352 dnl -----------------------------------------------------------
353 AC_ARG_ENABLE([tool-wrappers],
354 [AS_HELP_STRING(--enable-tool-wrappers,create tool wrapper binaries [default=no])],
355 [case x"${enableval}" in
356 xyes)
357 COMPILE_WRAPPERS=yes;
358 AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
359 AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
360 ;;
361 xno) COMPILE_WRAPPERS=no ;;
362 x) COMPILE_WRAPPERS=yes ;;
363 *) COMPILE_WRAPPERS=yes ;;
364 esac],
365 [COMPILE_WRAPPERS=no])
366 AM_CONDITIONAL(CREATE_WRAPPERS, test "x${COMPILE_WRAPPERS}" = xyes)
367
368 AC_PROG_LN_S
369 AC_PROG_INSTALL
370
371 dnl -----------------------------------------------------------
372 dnl Checks for programs.
373 dnl -----------------------------------------------------------
374
375 dnl Initialize libtool
376 AC_DISABLE_STATIC
377 AC_PROG_LIBTOOL
378 AC_PROG_AWK
379 AC_PROG_CC
380 AM_PROG_CC_C_O
381 AC_PROG_CPP
382 AC_PROG_CXX
383
384 # Handle -Werror default case.
385 if test "$ENABLE_WERROR" = default; then
386 case "$host_os" in
387 *linux*)
388 if test "$GCC" = yes; then
389 ENABLE_WERROR=yes
390 fi
391 ;;
392 esac
393 fi
394
395 if test "x${COMPILE_COLLECTIONS}" = xyes; then
396 AC_PATH_PROG(PERL, [perl])
397 AC_SUBST(PERL)
398 AC_SUBST(COLLECTIONS_PREFIX)
399 AC_CONFIG_FILES([lib/mkcollections.pl])
400 AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
401 fi
402
403 if test "x${COMPILE_JNI}" = xyes; then
404 GCC_ATTRIBUTE_UNUSED
405
406 AC_HEADER_STDC
407
408 dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
409 dnl at least.
410 AC_COMPILE_CHECK_SIZEOF(void *)
411
412 dnl Checking for endianess.
413 AC_C_BIGENDIAN_CROSS
414
415 dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
416 dnl On that system, sys/ioctl.h will not include sys/filio.h unless
417 dnl BSD_COMP is defined; just including sys/filio.h is simpler.
418 dnl Check for crt_externs.h on Darwin.
419 AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
420 asm/ioctls.h \
421 inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
422 sys/time.h \
423 sys/select.h \
424 crt_externs.h \
425 fcntl.h \
426 sys/mman.h \
427 magic.h \
428 sys/event.h sys/epoll.h \
429 ifaddrs.h])
430
431 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
432 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
433 AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
434 AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
435
436 AC_SEARCH_LIBS([inet_pton],[nsl])
437 AC_CHECK_FUNCS([ftruncate fsync select \
438 gethostname socket strerror fork pipe execve open close \
439 lseek fstat read readv write writev htonl memset htons connect \
440 getsockname getpeername bind listen accept \
441 recvfrom send sendto setsockopt getsockopt time mktime \
442 gethostbyname_r localtime_r \
443 strerror_r \
444 fcntl \
445 mmap munmap mincore msync madvise getpagesize sysconf \
446 lstat readlink \
447 inet_aton inet_addr inet_pton \
448 getifaddrs kqueue kevent epoll_create \
449 readdir_r getloadavg])
450
451 LIBMAGIC=
452 AC_CHECK_LIB(magic, magic_open, LIBMAGIC=-lmagic)
453 AC_SUBST(LIBMAGIC)
454
455 AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
456 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct sockaddr_in6 addr6;]])],
457 [AC_DEFINE(HAVE_INET6, 1,
458 [Define if inet6 structures are defined in netinet/in.h.])
459 AC_MSG_RESULT(yes)],
460 [AC_MSG_RESULT(no)])
461
462 AC_HEADER_TIME
463 AC_STRUCT_TM
464 AC_STRUCT_TIMEZONE
465
466 AC_MSG_CHECKING([for tm_gmtoff in struct tm])
467 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],[[struct tm tim; tim.tm_gmtoff = 0;]])],
468 [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
469 AC_MSG_RESULT(yes)],
470 [AC_MSG_RESULT(no)
471 AC_MSG_CHECKING([for global timezone variable])
472 dnl FIXME: we don't want a link check here because that won't work
473 dnl when cross-compiling. So instead we make an assumption that
474 dnl the header file will mention timezone if it exists.
475 dnl Don't find the win32 function timezone
476 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
477 [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
478 AC_MSG_RESULT(yes)],
479 [AC_MSG_RESULT(no)
480 AC_MSG_CHECKING([for global _timezone variable])
481 dnl FIXME: As above, don't want link check
482 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
483 [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
484 [Define if your platform has the global _timezone variable.])
485 AC_MSG_RESULT(yes)],
486 [AC_MSG_RESULT(no)])])])
487
488 AC_C_CONST
489 AC_C_INLINE
490 AC_C_ATTRIBUTE
491 AX_FUNC_WHICH_GETHOSTBYNAME_R
492
493 dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV
494 AM_ICONV
495
496 dnl When using gcc we want warnings, lots of warnings :-)
497 if test "x${GCC}" = xyes; then
498 dnl We want ISO C90 ansi, but with longlong (jlong) support
499 dnl and modern POSIX and BSD C library functions/prototypes.
500
501 dnl Warning flags for (almost) everybody.
502 dnl Should probably be configurable
503 WARNING_CFLAGS='-W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
504 AC_SUBST(WARNING_CFLAGS)
505
506 dnl CFLAGS that are used for all native code. We want to compile
507 dnl everything with unwinder data so that backtrace() will always
508 dnl work.
509 EXTRA_CFLAGS='-fexceptions -fasynchronous-unwind-tables'
510 AC_SUBST(EXTRA_CFLAGS)
511
512 dnl Strict warning flags which not every module uses.
513 dnl Should probably be configurable.
514 STRICT_WARNING_CFLAGS='-Wstrict-prototypes -pedantic'
515 AC_SUBST(STRICT_WARNING_CFLAGS)
516
517 dnl Whether or not to add -Werror, also not used by all modueles.
518 dnl Can be configured by --disable-Werror
519 ERROR_CFLAGS=
520 if test "x${ENABLE_WERROR}" = xyes; then
521 ERROR_CFLAGS='-Werror'
522 fi
523 AC_SUBST(ERROR_CFLAGS)
524 fi
525
526 dnl Check for libxml and libxslt libraries (when xmlj is enabled).
527 if test "x${COMPILE_XMLJ}" = xyes; then
528 PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.6.8)
529 PKG_CHECK_MODULES(XSLT, libxslt >= 1.1.11)
530 AC_SUBST(XML_LIBS)
531 AC_SUBST(XML_CFLAGS)
532 AC_SUBST(XSLT_LIBS)
533 AC_SUBST(XSLT_CFLAGS)
534 fi
535
536 dnl Check for AWT related gthread/gtk
537 if test "x${COMPILE_GTK_PEER}" = xyes; then
538 AC_PATH_XTRA
539 if test "$no_x" = yes; then
540 AC_MSG_ERROR([GTK+ peers requested but no X library available])
541 fi
542 dnl We explicitly want the XTest Extension for Robot support.
543 AC_CHECK_LIB([Xtst], [XTestQueryExtension],
544 [XTEST_LIBS="$XTEST_LIBS -lX11 -lXtst"],
545 [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
546 [${X_LIBS}])
547
548 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
549 PKG_CHECK_MODULES(FREETYPE2, freetype2)
550 PKG_CHECK_MODULES(PANGOFT2, pangoft2)
551 PKG_CHECK_MODULES(CAIRO, cairo >= 1.1.8)
552 dnl Check if we can link against the XRender library and set
553 dnl HAVE_XRENDER accordingly.
554 AC_CHECK_LIB([Xrender], [XRenderQueryExtension],
555 [AC_DEFINE(HAVE_XRENDER, 1, [Define to 1 if you have libXrender.])[X_EXTRA_LIBS="$X_EXTRA_LIBS -lXrender"]],
556 [true],
557 [${X_LIBS}])
558
559 dnl Check if we can link against the XRandR library and set
560 dnl HAVE_XRANDR accordingly.
561 AC_CHECK_LIB([Xrandr], [XRRQueryExtension],
562 [AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have libXrandr.])[X_EXTRA_LIBS="$X_EXTRA_LIBS -lXrandr"]],
563 [true],
564 [${X_LIBS}])
565
566 AC_SUBST(GTK_CFLAGS)
567 AC_SUBST(GTK_LIBS)
568 AC_SUBST(FREETYPE2_LIBS)
569 AC_SUBST(FREETYPE2_CFLAGS)
570 AC_SUBST(PANGOFT2_LIBS)
571 AC_SUBST(PANGOFT2_CFLAGS)
572 AC_SUBST(XTEST_LIBS)
573 fi
574
575 dnl gconf-peer
576 if test "x${COMPILE_GCONF_PEER}" = xyes; then
577 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6.0)
578 AC_SUBST(GCONF_CFLAGS)
579 AC_SUBST(GCONF_LIBS)
580 dnl we also need gdk for locking
581 PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.8)
582 AC_SUBST(GDK_CFLAGS)
583 AC_SUBST(GDK_LIBS)
584 dnl check if the config value was given form the command line,
585 dnl if not, overwrite the default if we have the gconf backend
586 dnl compiled in
587 USE_GCONF_PREFS_PEER=$enable_default_preferences_peer
588 if test "$USE_GCONF_PREFS_PEER" = ""; then
589 DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory
590 fi
591 fi
592
593 dnl gstreamer-peer
594 if test "x${COMPILE_GSTREAMER_PEER}" = xyes; then
595 GST_MAJORMINOR=0.10
596 GST_REQUIRED=0.10.10
597
598 dnl gstreamer
599 PKG_CHECK_MODULES(GSTREAMER, gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED)
600 AC_SUBST(GSTREAMER_CFLAGS)
601 AC_SUBST(GSTREAMER_LIBS)
602
603 dnl gstreamer-base
604 PKG_CHECK_MODULES(GSTREAMER_BASE,
605 gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED)
606 AC_SUBST(GSTREAMER_BASE_CFLAGS)
607 AC_SUBST(GSTREAMER_BASE_LIBS)
608
609 dnl gstreamer-plugin-base
610 PKG_CHECK_MODULES(GSTREAMER_PLUGINS_BASE,
611 gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQUIRED)
612 AC_SUBST(GSTREAMER_PLUGINS_BASE_CFLAGS)
613 AC_SUBST(GSTREAMER_PLUGINS_BASE_LIBS)
614
615 GST_PLUGIN_LDFLAGS='-module -avoid-version -Wno-unused-parameter -no-undefined'
616 AC_SUBST(GST_PLUGIN_LDFLAGS)
617
618 dnl set the gstreamer based file reader, writer and mixer
619 GSTREAMER_FILE_READER=gnu.javax.sound.sampled.gstreamer.io.GstAudioFileReader
620 GSTREAMER_MIXER_PROVIDER=gnu.javax.sound.sampled.gstreamer.GStreamerMixerProvider
621 fi
622 dnl add the gstreamer resources
623 AC_SUBST(GSTREAMER_FILE_READER)
624 AC_SUBST(GSTREAMER_MIXER_PROVIDER)
625
626 dnl Check for AWT related Qt4
627 if test "x${COMPILE_QT_PEER}" = xyes; then
628 PKG_CHECK_MODULES(QT, QtCore QtGui >= 4.1.0, HAVE_QT4="yes", HAVE_QT4="no")
629 if test "x$HAVE_QT4" = "xyes"; then
630 dnl Check needed because in some cases the QtGui includedir
631 dnl doesn't contain the subsystem dir.
632 QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtGui`
633 EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
634 AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
635 AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
636 AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
637 QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
638 AC_MSG_WARN([QWidget not found])))
639 AC_CHECK_PROG(MOC, [moc], [moc])
640 AC_CHECK_PROG(MOC, [moc-qt4], [moc-qt4])
641 fi
642 if test "x$HAVE_QT4" = "xno"; then
643 AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
644 case "$host_os" in
645 darwin*)
646 AC_ARG_WITH([qt4dir],
647 [AS_HELP_STRING([--with-qt4dir=DIR],
648 [Qt4 installation directory used for OS-X.
649 For other systems use pkg-config.])],
650 [QT4DIR=$withval]
651 )
652 if test x"$QT4DIR" = x ; then
653 AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given])
654 fi
655 AC_MSG_RESULT([QT4DIR... $QT4DIR])
656 AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin)
657 if test x"$MOC" = x; then
658 AC_MSG_ERROR([*** This is not the right Qt installation])
659 fi
660 QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers"
661 QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers"
662 QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore"
663 QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui"
664 ;;
665 *)
666 AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version
667 of your installed Qt4 installation.])
668 ;;
669 esac
670 fi
671 AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
672 AC_SUBST(QT_CFLAGS)
673 AC_SUBST(QT_LIBS)
674 fi
675 dnl **********************************************************************
676 dnl Check for MSG_NOSIGNAL
677 dnl **********************************************************************
678 AC_MSG_CHECKING(for MSG_NOSIGNAL)
679 AC_TRY_COMPILE([#include <sys/socket.h>],
680 [ int f = MSG_NOSIGNAL; ],
681 [ AC_MSG_RESULT(yes)
682 AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,
683 [Define this symbol if you have MSG_NOSIGNAL]) ],
684 [ AC_MSG_RESULT(no)]
685 )
686 dnl **********************************************************************
687 dnl Check for SO_NOSIGPIPE (Darwin equivalent for MSG_NOSIGNAL)
688 dnl **********************************************************************
689 AC_MSG_CHECKING(for SO_NOSIGPIPE )
690 AC_TRY_COMPILE([#include <sys/socket.h>],
691 [ int f = SO_NOSIGPIPE; ],
692 [ AC_MSG_RESULT(yes)
693 AC_DEFINE(HAVE_SO_NOSIGPIPE, 1,
694 [Define this symbol if you have SO_NOSIGPIPE]) ],
695 [ AC_MSG_RESULT(no)]
696 )
697 dnl **********************************************************************
698 dnl Check for MSG_WAITALL
699 dnl **********************************************************************
700 AC_MSG_CHECKING(for MSG_WAITALL)
701 AC_TRY_COMPILE([#include <sys/socket.h>],
702 [ int f = MSG_WAITALL; ],
703 [ AC_MSG_RESULT(yes)
704 AC_DEFINE(HAVE_MSG_WAITALL, 1,
705 [Define this symbol if you have MSG_WAITALL]) ],
706 [ AC_MSG_RESULT(no)]
707 )
708
709 dnl Check for plugin support headers and libraries.
710 if test "x${COMPILE_PLUGIN}" = xyes; then
711 PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
712 if test "x${MOZILLA_FOUND}" = xno; then
713 PKG_CHECK_MODULES(MOZILLA, firefox-plugin firefox-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
714 fi
715 if test "x${MOZILLA_FOUND}" = xno; then
716 PKG_CHECK_MODULES(MOZILLA, xulrunner-plugin xulrunner-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
717 fi
718 if test "x${MOZILLA_FOUND}" = xno; then
719 PKG_CHECK_MODULES(MOZILLA, mozilla-firefox-plugin mozilla-firefox-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
720 fi
721 if test "x${MOZILLA_FOUND}" = xno; then
722 PKG_CHECK_MODULES(MOZILLA, seamonkey-plugin seamonkey-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
723 fi
724 if test "x${MOZILLA_FOUND}" = xno; then
725 PKG_CHECK_MODULES(MOZILLA, iceape-plugin iceape-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
726 fi
727 if test "x${MOZILLA_FOUND}" = xno; then
728 AC_MSG_ERROR([Couldn't find plugin support headers and libraries, try --disable-plugin])
729 fi
730
731 PKG_CHECK_MODULES(GLIB, glib-2.0)
732 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
733
734 AC_SUBST(MOZILLA_CFLAGS)
735 AC_SUBST(MOZILLA_LIBS)
736 AC_SUBST(GLIB_CFLAGS)
737 AC_SUBST(GLIB_LIBS)
738 AC_SUBST(GTK_CFLAGS)
739 AC_SUBST(GTK_LIBS)
740
741 AC_SUBST(PLUGIN_DIR, $HOME/.mozilla/plugins/)
742 fi
743 fi
744
745 if test "x${REGENERATE_JNI_HEADERS}" = xyes; then
746 CLASSPATH_WITH_JAVAH
747 fi
748
749 dnl -----------------------------------------------------------
750 dnl Add the include files for the native abstraction layer.
751 dnl Used by AM_CPPFLAGS in the different modules.
752 dnl -----------------------------------------------------------
753 CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/jni/native-lib"
754 AC_SUBST(CLASSPATH_INCLUDES)
755
756 dnl -----------------------------------------------------------
757 if test "x${COMPILE_JNI}" = xyes; then
758 AC_MSG_CHECKING(jni_md.h support)
759 if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then
760 AC_MSG_RESULT(yes)
761 else
762 target_cpu=x86
763 target_os=linux-gnu
764 AC_MSG_WARN(no, using x86-linux-gnu)
765 fi
766 ac_sources="include/jni_md-${target_cpu}-${target_os}.h"
767 ac_dests="include/jni_md.h"
768 while test -n "$ac_sources"; do
769 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
770 set $ac_sources; ac_source=$1; shift; ac_sources=$*
771 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
772 done
773 AC_CONFIG_LINKS([$ac_config_links_1])
774 fi
775
776 CLASSPATH_FIND_JAVAC
777
778 CLASSPATH_WITH_CLASSLIB
779
780 dnl -----------------------------------------------------------
781 dnl Initialize maintainer mode
782 dnl -----------------------------------------------------------
783 AM_MAINTAINER_MODE
784
785 dnl -----------------------------------------------------------
786 dnl Enable debugging statements at compile time. By default
787 dnl these statements should be optimized out of the bytecode
788 dnl produced by an optimizing Java compiler and not hinder
789 dnl performance because debugging is turned off by default.
790 dnl -----------------------------------------------------------
791 AC_ARG_ENABLE([debug],
792 [AS_HELP_STRING(--enable-debug,enable runtime debugging code)],
793 [case "${enableval}" in
794 yes)
795 LIBDEBUG="true"
796 AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled])
797 ;;
798 no) LIBDEBUG="false" ;;
799 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
800 esac],
801 [LIBDEBUG="false"])
802 AC_SUBST(LIBDEBUG)
803
804 dnl -----------------------------------------------------------
805 dnl Enable execution of all static initializer loadLibrary()
806 dnl calls at compile time. By default most people will not
807 dnl want to disable this, but some VMs (gcj) don't need or want
808 dnl them.
809 dnl -----------------------------------------------------------
810 AC_ARG_ENABLE([load-library],
811 [AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes])],
812 [case "${enableval}" in
813 yes) INIT_LOAD_LIBRARY="true" ;;
814 no) INIT_LOAD_LIBRARY="false" ;;
815 *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
816 esac],
817 [INIT_LOAD_LIBRARY="true"])
818 AC_SUBST(INIT_LOAD_LIBRARY)
819
820
821 dnl -----------------------------------------------------------
822 dnl Specify the jar file containing the Eclipse Java Compiler. If
823 dnl this option is not specified then the com.sun.tools.javac
824 dnl implementation will not be included in tools.zip.
825 dnl -----------------------------------------------------------
826 dnl GCJ LOCAL: default to $multi_basedir/ecj.jar
827 dnl In the default case where $multi_basedir/ecj.jar is found
828 dnl $(jardir)/ecj.jar will not expand properly in GNU Classpath's
829 dnl gnu/classpath/Configuration.java. That is OK though since libjava's
830 dnl gnu/classpath/Configuration.java overrides GNU Classpath's and
831 dnl ECJ_JAR_FILE will be properly expanded in libjava's
832 dnl gnu/classpath/natConfiguration.cc.
833 AC_ARG_WITH([ecj-jar],
834 [AS_HELP_STRING([--with-ecj-jar=ABS.PATH],
835 [specify jar file containing the Eclipse Java Compiler])],
836 [ECJ_JAR=$withval],
837 [if test -f $multi_basedir/ecj.jar; then
838 ECJ_JAR='$(jardir)/ecj.jar'
839 fi])
840 AC_SUBST(ECJ_JAR)
841
842 dnl -----------------------------------------------------------
843 dnl Should the VM explicitly run class initialization subfunctions for
844 dnl java.lang.System? (default is false -- the subfunctions will be run
845 dnl automatically by the class initializer)
846 dnl -----------------------------------------------------------
847 AC_ARG_ENABLE([java-lang-system-explicit-initialization],
848 [AS_HELP_STRING(--enable-java-lang-system-explicit-initialization,will the VM explicitly invoke java.lang.System's static initialization methods [default=no])],
849 [case "${enableval}" in
850 yes|true) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="true" ;;
851 no|false) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false" ;;
852 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java-lang-system-explicit-initialization) ;;
853 esac],
854 [JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false"])
855 AC_SUBST(JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION)
856
857
858 dnl -----------------------------------------------------------
859 dnl avoiding automake complaints
860 dnl -----------------------------------------------------------
861 REMOVE=""
862 AC_SUBST(REMOVE)
863
864 dnl -----------------------------------------------------------
865 dnl This is probably useless.
866 dnl -----------------------------------------------------------
867 AC_PATH_PROG(MKDIR, mkdir)
868 AC_PATH_PROG(CP, cp)
869 AC_PATH_PROG(DATE, date)
870
871 dnl -----------------------------------------------------------
872 dnl According to the GNU coding guide, we shouldn't require find,
873 dnl and zip, however GNU provides both so it should be okay
874 dnl -----------------------------------------------------------
875 AC_PATH_PROG(FIND, find)
876
877 dnl -----------------------------------------------------------
878 dnl Specify what to install (install only glibj.zip by default)
879 dnl -----------------------------------------------------------
880 CLASSPATH_WITH_GLIBJ
881
882 dnl -----------------------------------------------------------
883 dnl Enable API documentation generation (disabled by default)
884 dnl -----------------------------------------------------------
885 CLASSPATH_WITH_GJDOC
886
887 dnl -----------------------------------------------------------
888 dnl Whether to use jay to regenerate parsers.
889 dnl -----------------------------------------------------------
890 REGEN_WITH_JAY
891
892 dnl -----------------------------------------------------------
893 dnl This sets the build-time default, which can now be overridden
894 dnl by setting the system property gnu.classpath.awt.gtk.portable.native.sync
895 dnl to "true" or "false".
896 dnl -----------------------------------------------------------
897 AC_ARG_ENABLE([portable-native-sync],
898 [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)],
899 [case "${enableval}" in
900 yes)
901 AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define if you want to synchronize VM threads portably by default; undef otherwise])
902 ;;
903 no) ;;
904 *)
905 AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync)
906 ;;
907 esac],
908 [])
909
910 AX_CREATE_STDINT_H([include/config-int.h])
911
912 dnl -----------------------------------------------------------------------
913 dnl Support for using a prebuilt class library
914 dnl -----------------------------------------------------------------------
915 AC_ARG_WITH([glibj_zip],
916 AS_HELP_STRING([--with-glibj-zip=ABS.PATH],
917 [use prebuilt glibj.zip class library]))
918
919 case "$with_glibj_zip" in
920 "")
921 use_glibj_zip=false
922 ;;
923 "no" )
924 use_glibj_zip=false
925 ;;
926 "yes")
927 AC_MSG_ERROR([Please suply an absolute path to a prebuilt glibj.zip])
928 ;;
929 *)
930 use_glibj_zip=true
931 PATH_TO_GLIBJ_ZIP=$with_glibj_zip
932 ;;
933 esac;
934
935 AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue)
936 AC_SUBST(PATH_TO_GLIBJ_ZIP)
937
938 dnl -----------------------------------------------------------
939 dnl Build with Escher based X peers.
940 dnl -----------------------------------------------------------
941 AC_ARG_WITH([escher],
942 AS_HELP_STRING([--with-escher=ABS.PATH],
943 [specify path to escher dir or JAR for X peers]))
944 case "$with_escher" in
945 "")
946 use_escher=false
947 ;;
948 "no")
949 use_escher=false
950 ;;
951 "yes")
952 AC_MSG_ERROR([Please supply an absolute path to Escher library])
953 ;;
954 *)
955 use_escher=true
956 PATH_TO_ESCHER=$with_escher
957 ;;
958 esac
959
960 AM_CONDITIONAL(USE_ESCHER, test x$use_escher = xtrue)
961 AC_SUBST(PATH_TO_ESCHER)
962
963 dnl -----------------------------------------------------------
964 dnl Check if local socket support should be included.
965 dnl -----------------------------------------------------------
966 AC_ARG_ENABLE([local-sockets],
967 [AS_HELP_STRING(--enable-local-sockets,enables local (AF_LOCAL) socket API [default: no])],
968 [case "${enableval}" in
969 yes)
970 ENABLE_LOCAL_SOCKETS=yes
971 ;;
972 *)
973 ENABLE_LOCAL_SOCKETS=no
974 ;;
975 esac],
976 [])
977 if test "x$ENABLE_LOCAL_SOCKETS" = "xyes"
978 then
979 AC_CHECK_HEADER([sys/un.h])
980 AC_CHECK_FUNCS([read write bind listen accept shutdown], [],
981 AC_MSG_ERROR([networking support not available]))
982 AC_DEFINE(ENABLE_LOCAL_SOCKETS, [1], [Define to enable support for local sockets.])
983 fi
984 AM_CONDITIONAL(ENABLE_LOCAL_SOCKETS, test "x$ENABLE_LOCAL_SOCKETS" = "xyes")
985
986 dnl -----------------------------------------------------------
987 dnl Add the default preference peer
988 dnl -----------------------------------------------------------
989 AC_SUBST(DEFAULT_PREFS_PEER)
990
991 dnl -----------------------------------------------------------
992 dnl output files
993 dnl -----------------------------------------------------------
994 AC_CONFIG_FILES([Makefile
995 doc/Makefile
996 doc/api/Makefile
997 external/Makefile
998 external/sax/Makefile
999 external/w3c_dom/Makefile
1000 external/relaxngDatatype/Makefile
1001 external/jsr166/Makefile
1002 gnu/classpath/Configuration.java
1003 gnu/java/security/Configuration.java
1004 include/Makefile
1005 native/Makefile
1006 native/fdlibm/Makefile
1007 native/jawt/Makefile
1008 native/jni/Makefile
1009 native/jni/classpath/Makefile
1010 native/jni/java-io/Makefile
1011 native/jni/java-lang/Makefile
1012 native/jni/java-net/Makefile
1013 native/jni/java-nio/Makefile
1014 native/jni/java-util/Makefile
1015 native/jni/gtk-peer/Makefile
1016 native/jni/gconf-peer/Makefile
1017 native/jni/gstreamer-peer/Makefile
1018 native/jni/qt-peer/Makefile
1019 native/jni/xmlj/Makefile
1020 native/jni/midi-alsa/Makefile
1021 native/jni/midi-dssi/Makefile
1022 native/jni/native-lib/Makefile
1023 native/plugin/Makefile
1024 resource/Makefile
1025 resource/META-INF/services/java.util.prefs.PreferencesFactory
1026 resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader
1027 resource/META-INF/services/javax.sound.sampled.spi.MixerProvider
1028 scripts/Makefile
1029 scripts/classpath.spec
1030 lib/Makefile
1031 lib/gen-classlist.sh
1032 lib/copy-vmresources.sh
1033 tools/Makefile
1034 examples/Makefile
1035 examples/Makefile.jawt
1036 examples/Makefile.java2d])
1037
1038 if test "x${COMPILE_WRAPPERS}" = xno
1039 then
1040 AC_CONFIG_FILES([tools/gappletviewer
1041 tools/gjarsigner
1042 tools/gkeytool
1043 tools/gjar
1044 tools/gnative2ascii
1045 tools/gserialver
1046 tools/grmiregistry
1047 tools/gtnameserv
1048 tools/gorbd
1049 tools/grmid
1050 tools/grmic
1051 tools/gjavah])
1052 AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
1053 AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
1054 AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
1055 AC_CONFIG_COMMANDS([gjar],[chmod 755 tools/gjar])
1056 AC_CONFIG_COMMANDS([gnative2ascii],[chmod 755 tools/gnative2ascii])
1057 AC_CONFIG_COMMANDS([gserialver],[chmod 755 tools/gserialver])
1058 AC_CONFIG_COMMANDS([grmiregistry],[chmod 755 tools/grmiregistry])
1059 AC_CONFIG_COMMANDS([gtnameserv],[chmod 755 tools/gtnameserv])
1060 AC_CONFIG_COMMANDS([gorbd],[chmod 755 tools/gorbd])
1061 AC_CONFIG_COMMANDS([grmid],[chmod 755 tools/grmid])
1062 AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic])
1063 AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah])
1064 fi
1065
1066 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
1067 AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])
1068 AC_OUTPUT
1069
1070 # Create standard.omit based on decisions we just made.
1071 cat ${srcdir}/lib/standard.omit.in > lib/standard.omit
1072 if test x$use_escher != xtrue; then
1073 echo gnu/java/awt/peer/x/.*java$ >> lib/standard.omit
1074 fi