[PATCH] AC_LANG for Java

Mike Duigou <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
Hello all;

I've prepared a prospective patch for supporting Java with AC_LANG. I've modelled the patch on what I found in the Go and Erlang AC_LANG implementations. (BTW, the Go support needs updating. There are problems in the _AC_LANG_IO_PROGRAM due to symbol name changes).

The key things provided by java.m4 are:

AC_PROG_JAVA
AC_PROG_JAVAC
AC_LANG_COMPILER(Java)
AC_LANG_PROGRAM(Java)
AC_LANG_CALL(Java)
AC_LANG_FUNC_LINK_TRY(Java)
AC_LANG_BOOL_COMPILE_TRY(Java)
AC_LANG_INT_SAVE(java)
AC_LANG_PREPROC(Java)  # Throws an error


Internally 
_AC_LANG_IO_PROGRAM(Java)

There are probably many things wrong with my implementation at this point but the basic behaviour works the way a user would expect. The sparsely commented existing examples and limited documentation resulted in many bits of guesswork on my part. I'd be happy to take feedback on this patch or hand it off for sanitization by someone more familiar with autoconf scripting and AC_LANG implementations in particular. 

The necessary copyright assignment and contribution paperwork for this patch has been completed and verified.

Cheers,

Mike
java.m4 (application/octet-stream, 5.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.