You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Scott Lamb <sl...@slamb.org> on 2002/07/17 22:46:01 UTC
[PATCH] Check swig version >= 1.3.10
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
Re: [PATCH] Check swig version >= 1.3.10
Posted by Branko Čibej <br...@xbc.nu>.
Scott Lamb wrote:
>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.)
>
Look at how we check for the neon version (build/buildcheck.sh,
ac-helpers/get-neon-ver.sh). Awk is overkill.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Check swig version >= 1.3.12
Posted by Greg Stein <gs...@lyra.org>.
Excellent patch. I like the new algorithm using "case".
Applied!
thx,
-g
On Thu, Jul 18, 2002 at 12:52:03PM -0500, Scott Lamb wrote:
> Require SWIG version 1.3.12.
>
> * subversion/bindings/swig/README: bump version from 1.3.10 to 1.3.12.
> * configure.in: enforce requirement.
>
> Index: ./configure.in
> ===================================================================
> --- ./configure.in
> +++ ./configure.in Thu Jul 18 12:46:01 2002
> @@ -294,7 +294,19 @@
> 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([swig version])
> + SWIG_VERSION="`$SWIG -version 2>&1 | sed -ne 's/^.*Version \(.*\)$/\1/p'`"
> + AC_MSG_RESULT([$SWIG_VERSION])
> + case $SWIG_VERSION in
> + [1.3.1[23]*])
> + SWIG_SUITABLE=yes
> + ;;
> + *)
> + SWIG_SUITABLE=no
> + AC_MSG_WARN([swig bindings require 1.3.12.])
> + ;;
> + esac
> + 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"
>
> Index: subversion/bindings/swig/README
> ===================================================================
> --- subversion/bindings/swig/README
> +++ subversion/bindings/swig/README Thu Jul 18 12:27:32 2002
> @@ -43,8 +43,8 @@
> (4) limited symbols/functionality exported via the _util module
>
>
> -NOTE: the bindings code is being developed using SWIG 1.3.10. Earlier
> -versions of SWIG will simple *not* work.
> +NOTE: the bindings code is being developed using SWIG 1.3.12. Earlier
> +versions of SWIG will simply *not* work.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] Check swig version >= 1.3.12
Posted by Scott Lamb <sl...@slamb.org>.
Require SWIG version 1.3.12.
* subversion/bindings/swig/README: bump version from 1.3.10 to 1.3.12.
* configure.in: enforce requirement.
Index: ./configure.in
===================================================================
--- ./configure.in
+++ ./configure.in Thu Jul 18 12:46:01 2002
@@ -294,7 +294,19 @@
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([swig version])
+ SWIG_VERSION="`$SWIG -version 2>&1 | sed -ne 's/^.*Version \(.*\)$/\1/p'`"
+ AC_MSG_RESULT([$SWIG_VERSION])
+ case $SWIG_VERSION in
+ [1.3.1[23]*])
+ SWIG_SUITABLE=yes
+ ;;
+ *)
+ SWIG_SUITABLE=no
+ AC_MSG_WARN([swig bindings require 1.3.12.])
+ ;;
+ esac
+ 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"
Index: subversion/bindings/swig/README
===================================================================
--- subversion/bindings/swig/README
+++ subversion/bindings/swig/README Thu Jul 18 12:27:32 2002
@@ -43,8 +43,8 @@
(4) limited symbols/functionality exported via the _util module
-NOTE: the bindings code is being developed using SWIG 1.3.10. Earlier
-versions of SWIG will simple *not* work.
+NOTE: the bindings code is being developed using SWIG 1.3.12. Earlier
+versions of SWIG will simply *not* work.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Check swig version >= 1.3.10
Posted by Greg Stein <gs...@lyra.org>.
On Wed, Jul 17, 2002 at 05:46:01PM -0500, Scott Lamb wrote:
> Check for swig version >= 1.3.10 in configure.in, to match the
> requirement stated in subversion/bindings/swig/README.
Heh. The README is wrong. We actually require 1.3.11, and I'd even prefer to
move that up to 1.3.12. I didn't do the latter because I felt that I'd need
the autoconf check before moving to something super-new.
So... with this check in hand, we should be able to require 1.3.12 :-)
> (Is it acceptable to use awk in configure.in? I saw no other uses of it,
Yes, it is fine, although 'sed' is even better. Combine sed to extract the
version string, and then with a code pattern like that in
build/buildcheck.sh, and you can avoid awk altogether.
> 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.)
Sorry 'bout that.
Can you reform the patch a bit for 1.3.12 checking and maybe try using
sed/sh to do the test? When you resubmit, please include a log message. See
the HACKING document for patch submission guides.
Thanks a bunch! I look forward to adding this test.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org