[pacman-dev] [PATCH] configure.ac: remove unnecessary swig-checks + quote possible unset variables in test

Jürgen Hötzel juergen at hoetzel.info
Fri Dec 22 08:46:31 EST 2006


Hi,

configure checked 3 times for swig. Only one check is required for all
swig-based bindings. path enclosed. 

Jürgen
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /home/cvs-pacman/pacman-lib/configure.ac,v
retrieving revision 1.19
diff -u -r1.19 configure.ac
--- configure.ac	21 Dec 2006 17:15:24 -0000	1.19
+++ configure.ac	22 Dec 2006 13:39:06 -0000
@@ -214,10 +214,12 @@
     DOXYSTATUS="no, disabled by configure"
 fi
 
+dnl Check for swig binary
+AC_CHECK_PROGS([SWIG], [swig])
+
 dnl Check for python support
 AC_MSG_CHECKING(if Python bindings should be generated)
 if test x$wantpython = xyes ; then
-    AC_CHECK_PROGS([SWIG], [swig])
     AM_CONDITIONAL(HAS_PYTHON, test $SWIG)
     if test $SWIG ; then
         AC_DEFINE([HAS_PYTHON], [TRUE], [Enabled Python Support])
@@ -238,7 +240,6 @@
 dnl Check for perl support
 AC_MSG_CHECKING(if Perl bindings should be generated)
 if test x$wantperl = xyes ; then
-    AC_CHECK_PROGS([SWIG], [swig])
     AM_CONDITIONAL(HAS_PERL, test $SWIG)
     if test $SWIG ; then
         AC_DEFINE([HAS_PERL], [TRUE], [Enabled Perl Support])
@@ -259,9 +260,8 @@
 dnl Check for java support
 AC_MSG_CHECKING(if Java bindings should be generated)
 if test x$wantjava = xyes ; then
- 	AC_CHECK_PROGS([SWIG], [swig])
  	AC_CHECK_PROGS([JAVAC], [javac])
- 	AM_CONDITIONAL(HAS_JAVA, test $JAVAC -a $SWIG)
+ 	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)])


More information about the pacman-dev mailing list