[openwsman/f14/master] Fixed the acinclude.m4 to check the swig version properly
Praveen K Paladugu
praveenp at fedoraproject.org
Mon Aug 2 17:25:43 UTC 2010
commit 0834d4af5e8b03dcee2e4ae54a9f00b95d56ba58
Author: Praveen K Paladugu <praveenp at praveenp-dell.us.dell.com>
Date: Mon Aug 2 12:26:08 2010 -0500
Fixed the acinclude.m4 to check the swig version properly
openwsman-swig-ver-check.patch | 82 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
---
diff --git a/openwsman-swig-ver-check.patch b/openwsman-swig-ver-check.patch
new file mode 100644
index 0000000..cf0a339
--- /dev/null
+++ b/openwsman-swig-ver-check.patch
@@ -0,0 +1,82 @@
+diff -up ./acinclude.m4.old ./acinclude.m4
+--- ./acinclude.m4.old 2010-08-02 12:13:27.135937703 -0500
++++ ./acinclude.m4 2010-08-02 12:15:07.896938631 -0500
+@@ -157,6 +157,20 @@ AC_SUBST(SFCC_LDFLAGS)
+ # may extend this special exception to the GPL to apply to your
+ # modified version as well.
+
++AC_DEFUN([SWIG_VERSION_GOOD],[
++ AC_MSG_NOTICE([SWIG executable is '$SWIG'])
++ SWIG_LIB=`$SWIG -swiglib`
++ AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
++ SWIG_VERSION=`echo $(( $available_major * 100 * 100 + $available_minor * 100 + $available_patch ))`
++ AC_MSG_NOTICE([SWIG version is '$SWIG_VERSION'])
++ # AM_CONDITIONAL(SWIG_NEW_OPTIONS, test "$SWIG_VERSION" \> 10331)
++])
++
++AC_DEFUN([SWIG_VERSION_BAD],[
++ AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
++ SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
++])
++
+ AC_DEFUN([AC_PROG_SWIG],[
+ AC_PATH_PROG([SWIG],[swig])
+ if test -z "$SWIG" ; then
+@@ -199,19 +213,44 @@ AC_DEFUN([AC_PROG_SWIG],[
+ if test -z "$available_patch" ; then
+ [available_patch=0]
+ fi
+- if test $available_major -ne $required_major \
+- -o $available_minor -ne $required_minor \
+- -o $available_patch -lt $required_patch ; then
+- AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
+- SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+- else
+- AC_MSG_NOTICE([SWIG executable is '$SWIG'])
+- SWIG_LIB=`$SWIG -swiglib`
+- AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
+- SWIG_VERSION=`echo $(( $available_major * 100 * 100 + $available_minor * 100 + $available_patch ))`
+- AC_MSG_NOTICE([SWIG version is '$SWIG_VERSION'])
+- # AM_CONDITIONAL(SWIG_NEW_OPTIONS, test "$SWIG_VERSION" \> 10331)
+- fi
++
++
++
++ if test $available_major -gt $required_major; then
++ # the available major is greater than required major --GOOD
++ SWIG_VERSION_GOOD()
++
++ elif test $available_major -lt $required_major ; then
++ # the avialable major is less than required major -- BAD
++ SWIG_VERSION_BAD()
++ else
++ # the available and require major are equal check the minor and patch versions.
++
++ if test $available_minor -gt $required_minor ; then
++ # GOOD
++ SWIG_VERSION_GOOD()
++ elif test $avaialble_minor -lt $required_minor ; then
++ # BAD
++ SWIG_VERSION_BAD()
++ else
++ # the minor version are also equal
++
++ if test $available_patch -gt $required_patch ; then
++ # GOOD
++ SWIG_VERSION_GOOD()
++ elif test $available_minor -lt $required_minor ; then
++ # BAD
++ SWIG_VERSION_BAD()
++ else
++ # all the available major, minor and patch levels are the same as the required -- GOOD
++ SWIG_VERSION_GOOD()
++ fi
++ fi
++ fi
++
++
++
++
+ else
+ AC_MSG_WARN([cannot determine SWIG version])
+ SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
More information about the scm-commits
mailing list