This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH/RFC: --enable-java-awt=gtk (was: Building the GTK peers...)


Laurent Bardet wrote:

This is a patch to allow the recognition of --enable-java-awt=gtk
configure option, and the build of gcj GTK-based AWT peers.
It follows the same scheme as gcj Xlib-base AWT peers, i.e. it builds
libgcjgtk.* libraries (was libgcjx.* for xlib).

Thanks. (In future, don't bother including the generated files - Makefile.in, configure, etc - with the patch.), just mention them in the changelog. Do you have a copyright assignment for GCC on file? If not, see http://gcc.gnu.org/contribute.html

I'm not entirely sure myself, but I think basically "aclocal" should be able to find the AM_PATH_GTK macro which GTK will install into your autoconf path somewhere into libjava's aclocal.m4. That macro then determines where GTK is located and what version it is. The best thing to do would be to look at some simple package that uses GTK and look at its configure.in.

- determination of required library for gtk :
 See line "## FIXME: determine which LIB and options are required
 with GTK" in libjava/Makefile.am. When I build an AWT application,
 I append -lgcjgtk -lgtk -lgdk -lglib -lgthread to LDFLAGS. One way
 would be to determine which library is necessary and resolve the
 external gtk symbol at libjava build time.

I think the way is simply to add `gtk-config --libs` to the link command, and also `gtk-config --cflags` to the compiler command for the .cc files.

regards

Bryce.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]