[cp-patches] cleanup hardcoded Xlibs

Andreas Tobler toa at pop.agri.ch
Thu Jun 1 22:12:27 UTC 2006


Hello all,

this patch makes some X11 libs dependent on configury. And removes 
hardcoded Makefile.am entries.

Ok?

Thanks,

Andreas


2006-06-02  Andreas Tobler  <a.tobler at schweiz.ch>

	* configure.ac: Add -lX11 and -lXtst to XTEST_LIBS.
	(XTEST_LIBS): New, substitute.
	* native/jni/gtk-peer/Makefile.am (AM_LDFLAGS): Add XTEST_LIBS.
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.154
diff -u -r1.154 configure.ac
--- configure.ac	31 May 2006 20:29:41 -0000	1.154
+++ configure.ac	1 Jun 2006 22:07:44 -0000
@@ -400,9 +400,11 @@
         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}])
+    AC_CHECK_LIB([Xtst], [XTestQueryExtension],
+    		 [XTEST_LIBS="$XTEST_LIBS -lX11 -lXtst"],
+		 [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
+		 [${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)
     PKG_CHECK_MODULES(PANGOFT2, pangoft2)
@@ -419,6 +421,7 @@
     AC_SUBST(FREETYPE2_CFLAGS)
     AC_SUBST(PANGOFT2_LIBS)
     AC_SUBST(PANGOFT2_CFLAGS)
+    AC_SUBST(XTEST_LIBS)
   fi
 
   dnl Check for AWT related Qt4
Index: native/jni/gtk-peer/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/Makefile.am,v
retrieving revision 1.41
diff -u -r1.41 Makefile.am
--- native/jni/gtk-peer/Makefile.am	30 May 2006 14:27:20 -0000	1.41
+++ native/jni/gtk-peer/Makefile.am	1 Jun 2006 22:07:44 -0000
@@ -50,7 +50,7 @@
 		       $(top_builddir)/native/jni/classpath/jcl.lo
 
 AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @FREETYPE2_LIBS@ \
-             @PANGOFT2_LIBS@ @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ -lX11 -lXtst
+             @PANGOFT2_LIBS@ @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ @XTEST_LIBS@
 AM_CPPFLAGS = @CLASSPATH_INCLUDES@
 
 # Just the WARNING_CFLAGS. We cannot use the strict flags since the gtk


More information about the Classpath-patches mailing list