Autoconf problem when specifying --disable-tools
ingebot opened this issue · comments
Note: this issue was migrated automatically using bugzilla2github
Original bug ID: BZ#70660
From: @guillerodriguez
Reported version: 0.99
Comment author: @guillerodriguez
There seems to be some problem with the autoconf macros in classpath-0.99 which was not present in 0.98. Looks like passing --disable-tools to configure also disables the javac detection code, resulting in the following error:
$ ./configure --disable-tools
[...]
checking whether javac supports -J... ./configure: line 24943:
-J-Xmx768M: command not found
no
configure: error: conditional "GCJ_JAVAC" was never defined.
Usually this means the macro was only invoked conditionally
Note that this didn't happen in 0.98 (just re-checked) so it is probably due to autoconf changes between 0.98 and 0.99.
Comment author: @guillerodriguez
The problem was introduced by commit e6c6a02.
After the changes from that commit, the AC_PROG_JAVAC_WORKS macro in configure.ac is not expanded, since it is defined as a "one-shot" macro (with AC_DEFUN_ONCE) and used internally by AC_PROG_JAVA_WORKS which is expanded earlier.
When tools are disabled, AC_PROG_JAVA_WORKS does not run, thus JAVAC never gets defined.
Fixed in commit 04e621e.