diff options
Diffstat (limited to 'libjava/classpath/configure.ac')
-rw-r--r-- | libjava/classpath/configure.ac | 167 |
1 files changed, 130 insertions, 37 deletions
diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac index 8a39cb037db..d13526b5b9b 100644 --- a/libjava/classpath/configure.ac +++ b/libjava/classpath/configure.ac @@ -6,7 +6,7 @@ dnl ----------------------------------------------------------- dnl define([AC_CACHE_LOAD], )dnl dnl define([AC_CACHE_SAVE], )dnl -AC_INIT([GNU Classpath],[0.18],[classpath@gnu.org],[classpath]) +AC_INIT([GNU Classpath],[0.20-pre],[classpath@gnu.org],[classpath]) AC_CONFIG_SRCDIR(java/lang/System.java) AC_CANONICAL_TARGET @@ -65,15 +65,15 @@ AC_ARG_ENABLE([core-jni], [COMPILE_CORE_JNI=yes]) AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes) -dnl ----------------------------------------------------------- -dnl Whether to compile with -Werror or not (enabled by default) -dnl ----------------------------------------------------------- +dnl ------------------------------------------------------------ +dnl Whether to compile with -Werror or not (disabled by default) +dnl ------------------------------------------------------------ AC_ARG_ENABLE([Werror], - [AS_HELP_STRING(--disable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])], + [AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])], [case "${enableval}" in yes) ENABLE_WERROR=yes ;; no) ENABLE_WERROR=no ;; - *) ENABLE_WERROR=yes ;; + *) ENABLE_WERROR=no ;; esac], [ENABLE_WERROR=no]) @@ -103,6 +103,32 @@ AC_ARG_ENABLE([xmlj], AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes) dnl ----------------------------------------------------------- +dnl ALSA code (enabled by default) +dnl ----------------------------------------------------------- +AC_ARG_ENABLE([alsa], + [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])], + [case "${enableval}" in + yes) COMPILE_ALSA=yes ;; + no) COMPILE_ALSA=no ;; + *) COMPILE_ALSA=yes ;; + esac], + [AC_CHECK_HEADERS([alsa/asoundlib.h],COMPILE_ALSA=yes,COMPILE_ALSA=no)]) +AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes) + +dnl ----------------------------------------------------------- +dnl DSSI code (enabled by default) +dnl ----------------------------------------------------------- +AC_ARG_ENABLE([dssi], + [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])], + [case "${enableval}" in + yes) COMPILE_DSSI=yes ;; + no) COMPILE_DSSI=no ;; + *) COMPILE_DSSI=yes ;; + esac], + [AC_CHECK_HEADERS([dssi.h],COMPILE_DSSI=yes,COMPILE_DSSI=no)]) +AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes) + +dnl ----------------------------------------------------------- dnl GTK native peer (enabled by default) dnl ----------------------------------------------------------- AC_ARG_ENABLE([gtk-peer], @@ -150,6 +176,35 @@ AC_ARG_ENABLE([qt-peer], [COMPILE_QT_PEER=no]) AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes) + +dnl ----------------------------------------------------------- +dnl Sets the native libraries installation dir +dnl ----------------------------------------------------------- +AC_ARG_WITH([native-libdir], + [AS_HELP_STRING(--with-native-libdir,sets the installation directore for native libraries [default='${libdir}/${PACKAGE}'])], + [ + nativelibdir=${withval} + ], + [ + nativelibdir='${libdir}/${PACKAGE}' + ]) + +AC_SUBST(nativelibdir) + +dnl ----------------------------------------------------------- +dnl Sets the Java library installation dir. +dnl ----------------------------------------------------------- +AC_ARG_WITH([glibj-dir], + [AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])], + [ + glibjdir=${withval} + ], + [ + glibjdir='${datadir}/${PACKAGE}' + ]) + +AC_SUBST(glibjdir) + dnl ----------------------------------------------------------- dnl Regenerate headers at build time (disabled by default) dnl ----------------------------------------------------------- @@ -246,6 +301,7 @@ if test "x${COMPILE_JNI}" = xyes; then [AC_MSG_RESULT(no)])])]) AC_C_CONST + AC_C_ATTRIBUTE dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV AM_ICONV @@ -286,45 +342,78 @@ if test "x${COMPILE_JNI}" = xyes; then dnl Check for AWT related gthread/gtk if test "x${COMPILE_GTK_PEER}" = xyes; then - AC_PATH_XTRA - 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. - AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true], - [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])], - [${X_LIBS}]) - PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0) - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) + AC_PATH_XTRA + 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. + AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true], + [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])], + [${X_LIBS}]) + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0) + + if test "x${enable_gtk_cairo}" = xyes; then + PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0) + fi + + PKG_CHECK_MODULES(PANGOFT2, pangoft2) + + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + AC_SUBST(CAIRO_LIBS) + AC_SUBST(CAIRO_CFLAGS) + AC_SUBST(PANGOFT2_LIBS) + AC_SUBST(PANGOFT2_CFLAGS) fi dnl Check for AWT related Qt4 if test "x${COMPILE_QT_PEER}" = xyes; then - PKG_CHECK_MODULES(QT, QtGui >= 4.0.1) - dnl Check needed because in some cases the QtGui includedir - dnl doesn't contain the subsystem dir. - QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui) - EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt" - AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget], - AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]), - AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget], - QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR", - AC_MSG_WARN([QWidget not found]))) + PKG_CHECK_MODULES(QT, QtGui >= 4.0.1, HAVE_QT4="yes", HAVE_QT4="no") + if test "x$HAVE_QT4" = "xyes"; then + dnl Check needed because in some cases the QtGui includedir + dnl doesn't contain the subsystem dir. + QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui) + EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt" + AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget], + AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]), + AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget], + QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR", + AC_MSG_WARN([QWidget not found]))) + AC_CHECK_PROG(MOC, [moc], [moc]) + fi + if test "x$HAVE_QT4" = "xno"; then + AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config]) + case "$host_os" in + darwin*) + AC_ARG_WITH([qt4dir], + [AS_HELP_STRING([--with-qt4dir=DIR], + [Qt4 installation directory used for OS-X. + For other systems use pkg-config.])], + [QT4DIR=$withval] + ) + if test x"$QT4DIR" = x ; then + AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given]) + fi + AC_MSG_RESULT([QT4DIR... $QT4DIR]) + AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin) + if test x"$MOC" = x; then + AC_MSG_ERROR([*** This is not the right Qt installation]) + fi + QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers" + QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers" + QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore" + QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui" + ;; + *) + AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version + of your installed Qt4 installation.]) + ;; + esac + fi AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS]) - AC_CHECK_PROG(MOC, [moc], [moc]) AC_SUBST(QT_CFLAGS) AC_SUBST(QT_LIBS) fi - - if test "x${enable_gtk_cairo}" = xyes; then - PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0) - PKG_CHECK_MODULES(PANGOFT2, pangoft2) - fi - AC_SUBST(CAIRO_LIBS) - AC_SUBST(CAIRO_CFLAGS) - AC_SUBST(PANGOFT2_LIBS) - AC_SUBST(PANGOFT2_CFLAGS) fi CLASSPATH_WITH_JAVAH @@ -493,6 +582,8 @@ native/jni/java-util/Makefile native/jni/gtk-peer/Makefile native/jni/qt-peer/Makefile native/jni/xmlj/Makefile +native/jni/midi-alsa/Makefile +native/jni/midi-dssi/Makefile native/target/Makefile native/target/Linux/Makefile native/target/generic/Makefile @@ -501,7 +592,9 @@ scripts/Makefile scripts/classpath.spec lib/Makefile lib/gen-classlist.sh +lib/copy-vmresources.sh examples/Makefile examples/Makefile.jawt]) AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh]) +AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh]) AC_OUTPUT |