dnl define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl
-AC_INIT([GNU Classpath],[0.96-pre],[classpath@gnu.org],[classpath])
+AC_INIT([GNU Classpath],[0.97.2],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java)
dnl GCJ LOCAL
dnl Regenerate headers at build time (disabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([regen-headers],
- [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])],
+ [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=yes if headers don't exist])],
[case "${enableval}" in
yes) REGENERATE_JNI_HEADERS=yes ;;
no) REGENERATE_JNI_HEADERS=no ;;
- *) REGENERATE_JNI_HEADERS=no ;;
+ *) REGENERATE_JNI_HEADERS=yes ;;
esac],
- [REGENERATE_JNI_HEADERS=no])
+ [if test -e include/java_lang_VMSystem.h; then
+ REGENERATE_JNI_HEADERS=no ;
+ else
+ REGENERATE_JNI_HEADERS=yes ;
+ fi])
AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
dnl -----------------------------------------------------------
dnl On that system, sys/ioctl.h will not include sys/filio.h unless
dnl BSD_COMP is defined; just including sys/filio.h is simpler.
dnl Check for crt_externs.h on Darwin.
+ dnl Check for netinet/in_systm.h, netinet/ip.h and net/if.h for Windows CE.
+ dnl Check for sys/loadavg.h for getloadavg() on Solaris 9.
AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
asm/ioctls.h \
inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
sys/mman.h \
magic.h \
sys/event.h sys/epoll.h \
- ifaddrs.h])
+ ifaddrs.h \
+ netinet/in_systm.h netinet/ip.h net/if.h \
+ sys/loadavg.h])
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
gethostbyname_r localtime_r \
strerror_r \
fcntl \
+ statvfs \
mmap munmap mincore msync madvise getpagesize sysconf \
lstat readlink \
inet_aton inet_addr inet_pton \
getifaddrs kqueue kevent epoll_create \
- readdir_r getloadavg])
+ getloadavg])
LIBMAGIC=
AC_CHECK_LIB(magic, magic_open, LIBMAGIC=-lmagic)
WARNING_CFLAGS='-W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
AC_SUBST(WARNING_CFLAGS)
+ dnl CFLAGS that are used for all native code. We want to compile
+ dnl everything with unwinder data so that backtrace() will always
+ dnl work.
+ EXTRA_CFLAGS='-fexceptions -fasynchronous-unwind-tables'
+ AC_SUBST(EXTRA_CFLAGS)
+
dnl Strict warning flags which not every module uses.
dnl Should probably be configurable.
STRICT_WARNING_CFLAGS='-Wstrict-prototypes -pedantic'
if test "$no_x" = yes; then
AC_MSG_ERROR([GTK+ peers requested but no X library available])
fi
- dnl We explicitly want the XTest Extension for Robot support.
+ dnl Check if we can link against the XTest library and set
+ dnl HAVE_XTEST accordingly.
AC_CHECK_LIB([Xtst], [XTestQueryExtension],
- [XTEST_LIBS="$XTEST_LIBS -lX11 -lXtst"],
- [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
- [${X_LIBS}])
+ [AC_DEFINE(HAVE_XTEST, 1, [Define to 1 if you have libXtst.])[XTEST_LIBS="$XTEST_LIBS -X11 -lXtst"]],
+ [true],
+ [${X_LIBS}])
+
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
PKG_CHECK_MODULES(FREETYPE2, freetype2)
dnl compiled in
USE_GCONF_PREFS_PEER=$enable_default_preferences_peer
if test "$USE_GCONF_PREFS_PEER" = ""; then
- DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory
+ DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory
fi
fi
GST_PLUGIN_LDFLAGS='-module -avoid-version -Wno-unused-parameter -no-undefined'
AC_SUBST(GST_PLUGIN_LDFLAGS)
+
+ PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.8)
+ AC_SUBST(GDK_CFLAGS)
+ AC_SUBST(GDK_LIBS)
dnl set the gstreamer based file reader, writer and mixer
GSTREAMER_FILE_READER=gnu.javax.sound.sampled.gstreamer.io.GstAudioFileReader
AC_CONFIG_LINKS([$ac_config_links_1])
fi
-CLASSPATH_FIND_JAVAC
-
CLASSPATH_WITH_CLASSLIB
dnl -----------------------------------------------------------
AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue)
AC_SUBST(PATH_TO_GLIBJ_ZIP)
+# Check for javac if we need to build either the class library,
+# the examples or the tools
+if test "x${use_glibj_zip}" = xfalse || \
+ test "x${EXAMPLESDIR}" != x || \
+ test "x${TOOLSDIR}" != x && \
+ test "x${build_class_files}" != xno; then
+ AC_PROG_JAVAC
+ CLASSPATH_JAVAC_MEM_CHECK
+fi
+
dnl -----------------------------------------------------------
dnl Build with Escher based X peers.
dnl -----------------------------------------------------------
lib/Makefile
lib/gen-classlist.sh
lib/copy-vmresources.sh
+scripts/check_jni_methods.sh
tools/Makefile
examples/Makefile
examples/Makefile.jawt
examples/Makefile.java2d])
-if test "x${COMPILE_WRAPPERS}" = xno
-then
-AC_CONFIG_FILES([tools/gappletviewer
+CLASSPATH_COND_IF([CREATE_WRAPPERS], [test "x${COMPILE_WRAPPERS}" = xyes], [],
+[AC_CONFIG_FILES([tools/gappletviewer
tools/gjarsigner
tools/gkeytool
tools/gjar
tools/grmid
tools/grmic
tools/gjavah])
+
AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
AC_CONFIG_COMMANDS([grmid],[chmod 755 tools/grmid])
AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic])
AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah])
-fi
+])
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])