From 16887252e5b09d4ecf606fc01e299ac41bd1f665 Mon Sep 17 00:00:00 2001 From: ellson Date: Sun, 27 Mar 2005 00:13:31 +0000 Subject: [PATCH] add version check for swig --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 4a806c493..140f18de1 100644 --- a/configure.ac +++ b/configure.ac @@ -216,6 +216,20 @@ dnl ----------------------------------- dnl check for SWIG - needed for script-language bindings AC_CHECK_PROG(SWIG,swig,swig) +if test "x$SWIG" != "x"; then + SWIG_VERSION=`swig -version 2>&1 | grep Version | cur -d ' ' -f 3` + SWIG_VERSION_MAJOR=`echo $SWIG_VERSION | cut -d '.' -f 1` + SWIG_VERSION_MINOR=`echo $SWIG_VERSION | cut -d '.' -f 2` + if $SWIG_VERSION_MAJOR < 2; then + if $SWIG_VERSION_MAJOR < 1; then + SWIG= + else + if $SWIG_VERSION_MINOR < 3; then + SWIG= + fi + fi + fi +fi AM_CONDITIONAL(WITH_SWIG, [test "x$SWIG" != "x"]) dnl ----------------------------------- -- 2.40.0