diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | HACKING | 4 | ||||
-rw-r--r-- | acinclude.m4 | 30 | ||||
-rw-r--r-- | configure.in | 229 |
4 files changed, 142 insertions, 130 deletions
@@ -1,3 +1,12 @@ +2004-01-18 Michael Koch <konqueror@gmx.de> + + * HACKING: Updated autoconf and automake prerequisite descriptions. + * acinclude.m4 (CLASSPATH_ENABLE_GJDOC): Use AS_HELP_STRING, + fix quotation. + * configure.in: Rewrote AC_ARG_ENABLE usage to use AC_HELP_STRING and + to use a correct quotation. Use pkgconfig to search for glib, gtk and + libart. Ported AC_OUTPUT() to new AC_CONFIG_FILES()/AC_OUTPUT. + 2004-01-16 Tom Tromey <tromey@redhat.com> * java/awt/Container.java: Typo and indentation fixes. @@ -12,9 +12,9 @@ For any build environment involving native libraries, these new versions of autoconf, automake, and libtool are required. - GNU autoconf 2.53 - (2.57 also works) + (2.59 also works) - GNU automake 1.6 - (1.7 also works) + (1.7 and 1.8 also works) - GNU libtool 1.4.2 (1.4.3 and 1.5a also work) diff --git a/acinclude.m4 b/acinclude.m4 index 749d7963c..0145aaf1d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -565,21 +565,21 @@ dnl is in your PATH dnl ----------------------------------------------------------- AC_DEFUN([CLASSPATH_ENABLE_GJDOC], [ - AC_ARG_ENABLE(gjdoc, - [ --enable-gjdoc enable API doc. generation [default=no]], - [ - case "${enableval}" in - yes) ENABLE_GJDOC=yes ;; - no) ENABLE_GJDOC=no ;; - *) ENABLE_GJDOC=yes ;; - esac - if test "x${ENABLE_GJDOC}" = xyes; then - AC_PATH_PROG(GJDOC, gjdoc) - AC_PATH_PROG(XMLCATALOG, xmlcatalog) - AC_PATH_PROG(XSLTPROC, xsltproc) - fi - ], - [ENABLE_GJDOC=no]) + AC_ARG_ENABLE([gjdoc], + [AS_HELP_STRING([--enable-gjdoc],[enable API doc. generation [default=no]])], + [ + case "${enableval}" in + yes) ENABLE_GJDOC=yes ;; + no) ENABLE_GJDOC=no ;; + *) ENABLE_GJDOC=yes ;; + esac + if test "x${ENABLE_GJDOC}" = xyes; then + AC_PATH_PROG(GJDOC, gjdoc) + AC_PATH_PROG(XMLCATALOG, xmlcatalog) + AC_PATH_PROG(XSLTPROC, xsltproc) + fi + ], + [ENABLE_GJDOC=no]) AM_CONDITIONAL(CREATE_API_DOCS, test "x${ENABLE_GJDOC}" = xyes) ]) diff --git a/configure.in b/configure.in index 974962b27..64bd87575 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Turning off cache for debug reasons dnl define([AC_CACHE_LOAD], )dnl dnl define([AC_CACHE_SAVE], )dnl -AC_INIT([GNU Classpath], [0.07+cvs], [classpath@gnu.org], [classpath]) +AC_INIT([GNU Classpath],[0.07+cvs],[classpath@gnu.org],[classpath]) AC_CONFIG_SRCDIR(java/lang/System.java) AC_CANONICAL_TARGET @@ -14,66 +14,65 @@ dnl We will not track/change lib version until we reach version 1.0 dnl at which time we'll have to be more anal about such things AC_SUBST(LIBVERSION, "0:0:0") -AM_INIT_AUTOMAKE - -AM_CONFIG_HEADER(include/config.h) - +AC_PREREQ(2.53) +AM_INIT_AUTOMAKE(1.6.0) +AC_CONFIG_HEADERS([include/config.h]) AC_PREFIX_DEFAULT(/usr/local/classpath) dnl required if SUBDIRS is used AC_PROG_MAKE_SET -AC_ARG_ENABLE(java, -[ --enable-java compile Java source [default=yes]], -[case "${enableval}" in - yes) COMPILE_JAVA=yes ;; - no) COMPILE_JAVA=no ;; - *) COMPILE_JAVA=yes ;; -esac], -[COMPILE_JAVA=yes]) - -AC_ARG_ENABLE(jni, -[ --enable-jni compile JNI source [default=yes]], -[case "${enableval}" in - yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;; - no) COMPILE_JNI=no ;; - *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;; -esac], -[COMPILE_JNI=yes]) - -AC_ARG_ENABLE(cni, -[ --enable-cni compile CNI source [default=no]], -[case "${enableval}" in - yes) COMPILE_CNI=yes; COMPILE_JAVA=yes ;; - no) COMPILE_CNI=no ;; - *) COMPILE_CNI=yes; COMPILE_JAVA=yes ;; -esac], -[COMPILE_CNI=no]) +AC_ARG_ENABLE([java], + [AS_HELP_STRING(--enable-java,compile Java source [default=yes])], + [case "${enableval}" in + yes) COMPILE_JAVA=yes ;; + no) COMPILE_JAVA=no ;; + *) COMPILE_JAVA=yes ;; + esac], + [COMPILE_JAVA=yes]) + +AC_ARG_ENABLE([jni], + [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])], + [case "${enableval}" in + yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;; + no) COMPILE_JNI=no ;; + *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;; + esac], + [COMPILE_JNI=yes]) + +AC_ARG_ENABLE([cni], + [AS_HELP_STRING(--enable-cni,compile CNI source [default=no])], + [case "${enableval}" in + yes) COMPILE_CNI=yes; COMPILE_JAVA=yes ;; + no) COMPILE_CNI=no ;; + *) COMPILE_CNI=yes; COMPILE_JAVA=yes ;; + esac], + [COMPILE_CNI=no]) dnl ----------------------------------------------------------- dnl GTK native peer dnl ----------------------------------------------------------- -AC_ARG_ENABLE(gtk-peer, -[ --enable-gtk-peer compile GTK native peers [default=yes]], -[case "${enableval}" in - yes) COMPILE_GTK_PEER=yes ;; - no) COMPILE_GTK_PEER=no ;; - *) COMPILE_GTK_PEER=yes ;; -esac], -[COMPILE_GTK_PEER=yes]) +AC_ARG_ENABLE([gtk-peer], + [AS_HELP_STRING(--enable-gtk-peer,compile GTK native peers [default=yes])], + [case "${enableval}" in + yes) COMPILE_GTK_PEER=yes ;; + no) COMPILE_GTK_PEER=no ;; + *) COMPILE_GTK_PEER=yes ;; + esac], + [COMPILE_GTK_PEER=yes]) AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes) AM_CONDITIONAL(CREATE_CNI_LIBRARIES, test "x${COMPILE_CNI}" = xyes) AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes) -AC_ARG_ENABLE(regen-headers, -[ --enable-regen-headers automatically regenerate JNI headers [default=no]], -[case "${enableval}" in - yes) REGENERATE_JNI_HEADERS=yes ;; - no) REGENERATE_JNI_HEADERS=no ;; - *) REGENERATE_JNI_HEADERS=no ;; -esac], -[REGENERATE_JNI_HEADERS=no]) +AC_ARG_ENABLE([regen-headers], + [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])], + [case "${enableval}" in + yes) REGENERATE_JNI_HEADERS=yes ;; + no) REGENERATE_JNI_HEADERS=no ;; + *) REGENERATE_JNI_HEADERS=no ;; + esac], + [REGENERATE_JNI_HEADERS=no]) AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes) @@ -81,15 +80,13 @@ AC_PROG_LN_S AC_PROG_INSTALL dnl Checks for programs. - AC_PREREQ(2.52) - - dnl AC_PROG_CXX - dnl Initialize libtool - AC_DISABLE_STATIC - AC_PROG_LIBTOOL - dnl AC_PROG_AWK - AC_PROG_CC - AC_PROG_CPP +dnl AC_PROG_CXX +dnl Initialize libtool +AC_DISABLE_STATIC +AC_PROG_LIBTOOL +dnl AC_PROG_AWK +AC_PROG_CC +AC_PROG_CPP if test "x${COMPILE_JNI}" = xyes; then AC_HEADER_STDC @@ -125,17 +122,13 @@ if test "x${COMPILE_JNI}" = xyes; then dnl Check for AWT related glib/gtk/libart_lgpl if test "x${COMPILE_GTK_PEER}" = xyes; then - m4_pattern_allow([AM_PATH_GTK_2_0]) - m4_pattern_allow([AM_PATH_GLIB_2_0]) - m4_ifdef([AM_PATH_GTK_2_0], - [AM_PATH_GTK_2_0(2.2.0,,exit 1)], - [AC_MSG_ERROR([No AM_PATH_GTK_2_0 macro found: use --disable-gtk-peer])]) - m4_ifdef([AM_PATH_GTK_2_0], - [AM_PATH_GLIB_2_0(2.2.0,,exit 1,gthread)], - [AC_MSG_ERROR([No AM_PATH_GLIB_2_0 macro found: use --disable-gtk-peer])]) - dnl XXX Fix me when libart.m4 has the compile test fixed! - dnl enable_libarttest=no - AM_PATH_LIBART(2.1.0,,exit 1) + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.2) + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + + PKG_CHECK_MODULES(LIBART, libart-2.0) + AC_SUBST(LIBART_CFLAGS) + AC_SUBST(LIBART_LIBS) fi fi @@ -161,7 +154,14 @@ if test "x${COMPILE_JNI}" = xyes; then target_os=linux-gnu AC_MSG_WARN("no, using x86-linux-gnu") fi - AC_LINK_FILES(include/jni_md-${target_cpu}-${target_os}.h, include/jni_md.h) + ac_sources="include/jni_md-${target_cpu}-${target_os}.h" +ac_dests="include/jni_md.h" +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" +done +AC_CONFIG_LINKS([$ac_config_links_1]) fi CLASSPATH_FIND_JAVA @@ -181,17 +181,17 @@ dnl these statements should be optimized out of the bytecode dnl produced by an optimizing Java compiler and not hinder dnl performance because debugging is turned off by default. dnl ----------------------------------------------------------- -AC_ARG_ENABLE(debug, -[ --enable-debug enable runtime debugging code], -[case "${enableval}" in - yes) - LIBDEBUG="true" - AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled]) - ;; - no) LIBDEBUG="false" ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; -esac], -[LIBDEBUG="false"]) +AC_ARG_ENABLE([debug], + [AS_HELP_STRING(--enable-debug,enable runtime debugging code)], + [case "${enableval}" in + yes) + LIBDEBUG="true" + AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled]) + ;; + no) LIBDEBUG="false" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; + esac], + [LIBDEBUG="false"]) AC_SUBST(LIBDEBUG) dnl ----------------------------------------------------------- @@ -202,21 +202,21 @@ dnl calls at compile time. By default most people will not dnl want to disable this, but some VMs (gcj) don't need or want dnl them. dnl ----------------------------------------------------------- -AC_ARG_ENABLE(load-library, -[ --enable-load-library enable to use JNI native methods [default=yes] - (disabled automatically using --enable-cni)], -[case "${enableval}" in - yes) INIT_LOAD_LIBRARY="true" ;; - no) INIT_LOAD_LIBRARY="false" ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;; -esac], -[ - if test "x${COMPILE_CNI}" = xyes; then - INIT_LOAD_LIBRARY="false" - else - INIT_LOAD_LIBRARY="true" - fi -]) +AC_ARG_ENABLE([load-library], + [AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes] + (disabled automatically using --enable-cni))], + [case "${enableval}" in + yes) INIT_LOAD_LIBRARY="true" ;; + no) INIT_LOAD_LIBRARY="false" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;; + esac], + [ + if test "x${COMPILE_CNI}" = xyes; then + INIT_LOAD_LIBRARY="false" + else + INIT_LOAD_LIBRARY="true" + fi + ]) AC_SUBST(INIT_LOAD_LIBRARY) dnl ----------------------------------------------------------- @@ -242,7 +242,14 @@ dnl Create a link to the VM specific files we're compiling with if test "x${JVM_REFERENCE}" = x; then JVM_REFERENCE=reference fi -AC_LINK_FILES(vm/$JVM_REFERENCE, vm/current) +ac_sources="vm/$JVM_REFERENCE" +ac_dests="vm/current" +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + ac_config_links_2="$ac_config_links_2 $ac_dest:$ac_source" +done +AC_CONFIG_LINKS([$ac_config_links_2]) dnl avoiding automake complaints REMOVE="" @@ -265,24 +272,21 @@ CLASSPATH_ENABLE_GJDOC dnl ----------------------------------------------------------- dnl ----------------------------------------------------------- -AC_ARG_ENABLE(portable-native-sync, -[ --enable-portable-native-sync synchronize VM threads portably], -[case "${enableval}" in - yes) - AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define to 1 if you want to synchronize VM threads portably]) - ;; - - no) ;; - - *) - AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync) - ;; -esac], -[]) - +AC_ARG_ENABLE([portable-native-sync], + [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)], + [case "${enableval}" in + yes) + AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define to 1 if you want to synchronize VM threads portably]) + ;; + no) ;; + *) + AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync) + ;; + esac], + []) dnl ----------------------------------------------------------- -AC_OUTPUT(Makefile +AC_CONFIG_FILES(Makefile doc/Makefile doc/api/Makefile external/Makefile @@ -443,5 +447,4 @@ lib/gen-classlist.sh lib/gen_nio.sh, [ chmod 755 lib/gen-classlist.sh ]) - - +AC_OUTPUT |