Check for additional libraries with STATIC_CLASSPATH (not finished yet).
authortwisti <none@none>
Mon, 23 May 2005 15:23:15 +0000 (15:23 +0000)
committertwisti <none@none>
Mon, 23 May 2005 15:23:15 +0000 (15:23 +0000)
configure.in

index 6e2506762e92be30e9d8333c59e698e9782ceb66..d36348e2cb96a753565f1f846b17b5cd53f0bf01 100644 (file)
@@ -98,23 +98,6 @@ AC_DEFINE_UNQUOTED([CACAO_INSTALL_PREFIX], "${CACAO_INSTALL_PREFIX}", [Installat
 AC_SUBST(CACAO_INSTALL_PREFIX)
 
 
-AC_ARG_ENABLE([dynamicclasspath], [AS_HELP_STRING(--disable-dynamicclasspath, link classpath native code static even on platforms supporting dynamic loading)], [use_dynamicclasspath=$enableval], [use_dynamicclasspath=yes])
-dnl force static classpath linking ??
-AC_MSG_CHECKING(Link classpath static)
-if test "xno" == "x$use_dynamicclasspath"; then
-       STATIC_CLASSPATH="1"
-fi
-
-if test "$STATIC_CLASSPATH" == "1"; then
-       AC_MSG_RESULT(yes)
-       AM_CONDITIONAL([STATIC_CLASSPATH], [true])
-else
-       AC_MSG_RESULT(no)
-       AM_CONDITIONAL([STATIC_CLASSPATH], [false])
-fi
-AC_SUBST(STATIC_CLASSPATH)
-
-
 dnl Checks for programs.
 AC_PROG_CC
 AM_PROG_AS
@@ -358,25 +341,78 @@ else
 fi
 
 
+dnl check if classpath should be linked statically with CACAO
+AC_ARG_ENABLE([dynamicclasspath], [AS_HELP_STRING(--disable-dynamicclasspath, link classpath native code static even on platforms supporting dynamic loading)], [use_dynamicclasspath=$enableval], [use_dynamicclasspath=yes])
+
+AC_MSG_CHECKING(whether to link GNU classpath statically)
+if test x"$use_dynamicclasspath" = "xno"; then
+       STATIC_CLASSPATH="1"
+fi
+
+if test x"${STATIC_CLASSPATH}" = "x1"; then
+       AC_MSG_RESULT(yes)
+       AM_CONDITIONAL([STATIC_CLASSPATH], [true])
+else
+       AC_MSG_RESULT(no)
+       AM_CONDITIONAL([STATIC_CLASSPATH], [false])
+fi
+AC_SUBST(STATIC_CLASSPATH)
+
+
 dnl enable gtk peer
 AC_ARG_ENABLE([gtk-peer], [AS_HELP_STRING(--enable-gtk-peer,compile GTK native peers [[default=no]])])
 
-AC_MSG_CHECKING(whether to use gtk awt peers)
+AC_MSG_CHECKING(whether to use GTK awt peers)
 if test x"$enable_gtk_peer" = "xyes"; then
        AC_MSG_RESULT(yes)
        AC_DEFINE([USE_GTK], 1, [use gtk])
        AM_CONDITIONAL([USE_GTK_PEER], [true])
+       USE_GTK_PEER=yes
 else
        AC_MSG_RESULT(no)
        AM_CONDITIONAL([USE_GTK_PEER], [false])
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-gtk-peer"
+       USE_GTK_PEER=no
 fi
+AC_SUBST(USE_GTK_PEER)
 
 
-if test "x$STATIC_CLASSPATH" = "x1"; then
+dnl pass configure options to classpath
+if test x"${STATIC_CLASSPATH}" = "x1"; then
         AC_DEFINE([STATIC_CLASSPATH], 1, [use classpath statically linked])
        AM_CONDITIONAL([STATIC_CLASSPATH], [true])
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-static --disable-shared"
+
+
+       dnl check for some classpath related stuff when we link statically
+       AM_ICONV_LINK
+
+       dnl taken from GNU classpath configure.ac
+       if test x"${USE_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 libart-2.0 gdk-pixbuf-2.0)
+               AC_SUBST(GTK_CFLAGS)
+               AC_SUBST(GTK_LIBS)
+       fi
+       PKG_CHECK_MODULES(PANGOFT2, pangoft2)
+       AC_SUBST(CAIRO_LIBS)
+       AC_SUBST(CAIRO_CFLAGS)
+       AC_SUBST(PANGOFT2_LIBS)
+       AC_SUBST(PANGOFT2_CFLAGS)
+
+       PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.6.8)
+       PKG_CHECK_MODULES(XSLT, libxslt >= 1.1.11)
+       AC_SUBST(XML_LIBS)
+       AC_SUBST(XML_CFLAGS)
+       AC_SUBST(XSLT_LIBS)
+       AC_SUBST(XSLT_CFLAGS)
 else
        AM_CONDITIONAL([STATIC_CLASSPATH], [false])
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-static --enable-shared"