[Linux-ha-dev] SWIG?

David Lee t.d.lee at durham.ac.uk
Mon Feb 5 03:00:34 MST 2007


On Wed, 31 Jan 2007, Horms wrote:

> On Wed, Jan 31, 2007 at 12:10:58PM +0000, David Lee wrote:
> > [...]
> > For this particular bug, the fundamental question is "is SWIG now
> > absolutely compulsory?"  If so, then configure should scream to a halt if
> > swig is absent.  If not, then "lib/mgmt" needs to be able to do something
> > useful without swig (or should we even be building "lib/mgmt" in the first
> > place?).
>
> I suspect that this is more of an oversight that anything else.

Thanks for that confirmation, Horms.

Last week (in addition to a non-trivial "bootstrap myself into mercurial
from zero" exercise) I prepared a bugfix to handle the absence of 'swig',
with "desirable, but not compulsory" semantics.  Alas, my "hg push"
crashes in the depths of python.  Aaargh!  Too many alligators (to change
zoology) snapping at my heels.

The patch is attached.

It also adds checks for a few other dependencies that the ("desirable, but
not compulsory") mgmt and quorum daemons would require if they are to
build successfully.

Could someone check it and apply it, please?  Thanks.

(Do we still need the large block of (defunct?) dnl-commented SWIG-related
code in 'configure.in' at about line 2600?)



-- 

:  David Lee                                I.T. Service          :
:  Senior Systems Programmer                Computer Centre       :
:  UNIX Team Leader                         Durham University     :
:                                           South Road            :
:  http://www.dur.ac.uk/t.d.lee/            Durham DH1 3LE        :
:  Phone: +44 191 334 2752                  U.K.                  :
-------------- next part --------------
--- configure.in.orig	Fri Feb  2 10:23:01 2007
+++ configure.in	Mon Feb  5 09:50:34 2007
@@ -435,7 +435,7 @@
 AC_SUBST(STRINGSCMD)
 AC_PATH_PROGS(PERL, perl)
 AC_SUBST(PERL)
-AC_PATH_PROGS(SWIG, swig, [swig not found],)
+AC_PATH_PROGS(SWIG, swig)
 AC_SUBST(SWIG)
 AC_PATH_PROGS(EGREP, egrep)
 AC_SUBST(EGREP)
@@ -1568,7 +1568,7 @@
 	  enable_fatal_warnings=yes;
 	  enable_lrm=yes;
 	  enable_snmp_subagent=try;
-	  enable_swig=try;
+dnl	  enable_swig=try;
 	  enable_mgmt=try;
 	  enable_quorumd=try;
 	  enable_cim_provider=try;
@@ -2388,6 +2388,12 @@
 
 AC_MSG_NOTICE([whether to enable the Local Resource Manager... ${enable_lrm}])
 
+dnl ************************************************************************
+dnl management and quorum daemons.
+
+AC_CHECK_HEADER(gnutls/gnutls.h)
+AC_PATH_PROGS(LIBGNUTLS_CONFIG, libgnutls-config)
+
 dnl management tool configuration
 AC_ARG_ENABLE([mgmt],
 [  --enable-mgmt  Compile the management tool.  [default=try]],
@@ -2419,10 +2425,24 @@
 		MGMT_ENABLED=0
 	fi
 
-	AC_CHECK_HEADER(gnutls/gnutls.h)
 	if test "$ac_cv_header_gnutls_gnutls_h" = "no"; then
   		$MISSING_FN "gnutls/gnutls.h" \
-		  "The GUI managment module needs GNU/TLS"
+		  "The GUI managment module needs GNU/TLS header files"
+		enable_mgmt="no"
+		MGMT_ENABLED=0
+	fi
+
+	if test -z "$LIBGNUTLS_CONFIG"; then
+		$MISSING_FN "libgnutls-config" \
+		  "The GUI managment module needs libgnutls-config"
+		enable_mgmt="no"
+		MGMT_ENABLED=0
+	fi
+
+	if test -z "$SWIG"; then
+		$MISSING_FN "swig" \
+		  "The GUI managment module needs swig" \
+		  "You can get it from http://swig.org/"
 		enable_mgmt="no"
 		MGMT_ENABLED=0
 	fi
@@ -2469,10 +2489,16 @@
 		MISSING_FN="FatalMissingThing"
 	fi
 
-	AC_CHECK_HEADER(gnutls/gnutls.h)
 	if test "$ac_cv_header_gnutls_gnutls_h" = "no"; then
   		$MISSING_FN "gnutls/gnutls.h" \
-		  "The quorum server module needs GNU/TLS"
+		  "The quorum server module needs GNU/TLS header files"
+		enable_quorumd="no"
+		QUORUMD_ENABLED=0
+	fi
+
+	if test -z "$LIBGNUTLS_CONFIG"; then
+		$MISSING_FN "libgnutls-config" \
+		  "The quorum server module needs libgnutls-config"
 		enable_quorumd="no"
 		QUORUMD_ENABLED=0
 	fi


More information about the Linux-HA-Dev mailing list