Re: /trunk/mail/configure & JAF

Chris Burdess <[email protected]> Tue, 21 Jan 2014 19:11:13 +0000
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
On 21/01/14 18:50, Conrad T. Pino wrote:
> configure scripts fails to recognize when JAF is provided by the JDK/JRE.
> 
> The JAF 1.1.1 page cited below states Java SE 6 includes JAF.
> 
> What is involved in revision configure script to probe the JDK/JRE?

We'll need to update m4/gnumail_with_activation_jar.m4 to try creating
and compiling a test java program that imports and uses a JAF class.

My m4 is pretty sketchy but you should be able to do something like:

AC_REQUIRE([AC_PROG_JAVAC])
dnl Test if JAF is present in the classpath
cat << \EOF > jaftest.java
import javax.activation.DataHandler;
public class jaftest {
public static void main(String[] args) {
Class t = DataHandler.class;
}
}
EOF
if AC_TRY_COMMAND($JAVAC $JAVACFLAGS jaftest.java) && test -f
jaftest.class; then
	found_activation_jar=true
else
	... check for the jar file
fi