[pacman-dev] [PATCH] fix automake conditional for java bindings

Jürgen Hötzel juergen at hoetzel.info
Wed Dec 20 13:29:05 EST 2006


Hi,

I work on Lua bindings and found this problem. Patch enclosed:

Don't build java bindings when swig is NOT installed.

Jürgen

-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/configure.ac,v
retrieving revision 1.18
diff -u -p -r1.18 configure.ac
--- configure.ac	19 Dec 2006 07:49:51 -0000	1.18
+++ configure.ac	20 Dec 2006 18:19:25 -0000
@@ -261,8 +261,7 @@ AC_MSG_CHECKING(if Java bindings should 
 if test x$wantjava = xyes ; then
  	AC_CHECK_PROGS([SWIG], [swig])
  	AC_CHECK_PROGS([JAVAC], [javac])
- 	AM_CONDITIONAL(HAS_JAVA, test $SWIG)
- 	AM_CONDITIONAL(HAS_JAVA, test $JAVAC)
+ 	AM_CONDITIONAL(HAS_JAVA, test $JAVAC -a $SWIG)
  	if test $JAVAC ; then
  		if test $SWIG ; then
  			AC_DEFINE([HAS_JAVA], [TRUE], [Enabled Java Support (javac=ok swig=ok)])
@@ -285,7 +284,7 @@ if test x$wantjava = xyes ; then
  		fi
  	fi
 else
-    AM_CONDITIONAL(HAS_JAVA, test $JAVAC)
+    AM_CONDITIONAL(HAS_JAVA, test $JAVAC -a $SWIG)
     AC_DEFINE([HAS_JAVA], [FALSE], [Not specified at configure line])
     AC_MSG_RESULT(not requested by configure)
     JAVASTATUS="no, disabled by configure"


More information about the pacman-dev mailing list