GNOME Bugzilla – Bug 336149
configure doesn't respect --with-gcj-compile
Last modified: 2007-01-05 00:58:42 UTC
Please describe the problem: It seems that the java-gnome packages aren't building native libraries when --with-gcj-compile as expected. It is worth noting that --without-gcj-compile does not build native libraries as expected. This has been observed with: glib-java-0.2.3 cairo-java-1.0.2 libgtk-java-2.8.3 libgnome-java-2.12.1 libglade-java-2.12.2 libgconf-java-2.12.1 Steps to reproduce: 1. ./configure --with-gcj-compile 2. make 3. observe native library not getting compiled Actual results: Expected results: Does this happen every time? Other information:
Confirmed; I've seen this both in released code (going back several versions) and in my own copy current CVS. Downstream bug is http://bugs.gentoo.org/show_bug.cgi?id=125646 AfC
Well, I don't offhand know *why* this is a problem, but the source of the issue is something to do with glib-java's macros/jg_check_nativecompile.m4 It takes --without-gcj-compile and prevents the GCJ part of the build from executing. Good. If the option is absent, then th GCJ portsion runs. Great. But if --with-gcj-compile is present, then the GCJ portion DOES NOT run. WTF? AfC
I also noticed the same issue with --with-javadocs for some of the packages (at least with libgconf-java-2.12.1, maybe more).
Created attachment 62547 [details] [review] Patch to allow the enabling/disabling of native libraries from being built. This patch changes the macro slightly and also adds some help text after the configuartion has been completed so that the user knows what's going to be built.
The above probably isn't the best of ideas since it package maintainers would have to be aware of the new configure argument of --disable-gcj-compile instead of --without-gcj-compile. I also forgot to modify the patch to say the binary builds will be built (since --without got changed to --enable) as the help text.
I am no autotools expert, but I was under the impression that, properly done, enable|disable and with|without were to be synonymous and equally & automatically supported for a given option. Obviously that's not the case, but I wonder if that is because we're using the wrong macro construction, or becuase other projects that do a good job of this go to extra effort to achieve such a state if nirvana. I suspect a little of both. AfC
Alternate fix committed to CVS head, no argument changes are needed. default: builds native libraries --with-gcj-compile: builds native libraries --without-gcj-compile: does not build native libraries