File ca-support-newer-oprofile.patch of Package CodeAnalyst

From: Tony Jones <tonyj@suse.de>
Subject: support newer version of oprofile
Upstream: no

Passes compile only.  Not runtime testing (with new versions of oprofile) has
been performed.

---
 m4/checkoprofileconfig.m4 |   20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

--- a/m4/checkoprofileconfig.m4
+++ b/m4/checkoprofileconfig.m4
@@ -14,12 +14,10 @@ AC_DEFUN([CHECK_OPROFILE_VERSION],
 	OP_VERSION_BASE=`echo $OP_VERSION | \
 		sed 's/\(^@<:@0-9@:>@*.@<:@0-9@:>@*.@<:@0-9@:>@*\).*/\1/'`
 
-	if test "$OP_VERSION_BASE" != "0.9.3" ; then
-	if test "$OP_VERSION_BASE" != "0.9.4" ; then
-	if test "$OP_VERSION_BASE" != "0.9.5" ; then
-	if test "$OP_VERSION_BASE" != "0.9.6" ; then
-		AC_MSG_ERROR([Oprofile version $OP_VERSION is not supported.])
-	fi fi fi fi
+	case "$OP_VERSION_BASE" in
+		0.9.[[3-8]]) :;;
+		*) AC_MSG_ERROR([Oprofile version $OP_VERSION is not supported.]);;
+	esac
 
 	dnl Convert version number to a value comparable by preprocessor 
 	AC_DEFINE_UNQUOTED(OP_VERSION_BASE, 0x`echo $OP_VERSION_BASE | sed 's/\./0/g'`, [Oprofile version])
@@ -49,12 +47,10 @@ AC_DEFUN([CHECK_OPROFILE_CONFIG],
         OP_VERSION_BASE=`echo $OP_VERSION | \
                 sed 's/\(^@<:@0-9@:>@*.@<:@0-9@:>@*.@<:@0-9@:>@*\).*/\1/'`
 
-        if test "$OP_VERSION_BASE" != "0.9.3" ; then
-        if test "$OP_VERSION_BASE" != "0.9.4" ; then
-        if test "$OP_VERSION_BASE" != "0.9.5" ; then
-        if test "$OP_VERSION_BASE" != "0.9.6" ; then
-                AC_MSG_ERROR([Oprofile version $OP_VERSION is not supported.])
-        fi fi fi fi
+	case "$OP_VERSION_BASE" in
+		0.9.[[3-8]]) :;;
+		*) AC_MSG_ERROR([Oprofile version $OP_VERSION is not supported.]);;
+	esac
 
         dnl Convert version number to a value comparable by preprocessor 
         AC_DEFINE_UNQUOTED(OP_VERSION_BASE, 0x`echo $OP_VERSION_BASE | sed 's/\./0/g'`, [Oprofile version])
openSUSE Build Service is sponsored by