[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Check swig version >= 1.3.10

From: Scott Lamb <slamb_at_slamb.org>
Date: 2002-07-18 00:46:01 CEST

Check for swig version >= 1.3.10 in configure.in, to match the
requirement stated in subversion/bindings/swig/README.

(Is it acceptable to use awk in configure.in? I saw no other uses of it,
but couldn't think of another easy, relatively portable way to extract
swig's version number. And it would have saved me some frustration to
not attempt to use swig with an outdated version.)

Index: ./configure.in
===================================================================
--- ./configure.in
+++ ./configure.in Wed Jul 17 17:28:13 2002
@@ -294,7 +294,24 @@
 dnl try to find "swig" to build the SWIG bindings
 AC_PATH_PROG(SWIG, swig, none)
 if test "$SWIG" != "none"; then
- if test "$PYTHON" != "none"; then
+
+ AC_MSG_CHECKING([if swig version >= 1.3.10])
+ [if $SWIG -version 2>&1 | awk \
+ 'BEGIN { retval = 1 } \
+ { \
+ if (match($0, "Version ([0-9]+)\.([0-9]+)\.?([0-9]*)",v) \
+ && (v[1] > 1 \
+ || (v[1] = 1 && v[2] > 3) \
+ || (v[1] = 1 && v[2] = 3 && v[3] >= 10))) \
+ retval = 0 \
+ } \
+ END { exit retval }'; then
+ SWIG_SUITABLE=yes
+ else
+ SWIG_SUITABLE=no
+ fi]
+ AC_MSG_RESULT([$SWIG_SUITABLE])
+ if test "$PYTHON" != "none" -a "$SWIG_SUITABLE" = "yes"; then
     SWIG_BUILD_RULES="$SWIG_BUILD_RULES swig-py-lib"
     SWIG_INSTALL_RULES="$SWIG_INSTALL_RULES install-swig-py-lib"

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 18 00:46:01 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.