[Openvas-commits] r422 - trunk/openvas-libnasl

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 9 00:21:49 CEST 2007


Author: jan
Date: 2007-10-09 00:21:48 +0200 (Tue, 09 Oct 2007)
New Revision: 422

Modified:
   trunk/openvas-libnasl/ChangeLog
   trunk/openvas-libnasl/configure
   trunk/openvas-libnasl/configure.in
Log:
* configure.in: Added sanity check for minimum version of
openvas-libraries. Which is set to 0.9.2 because a newly
installed header file of openvas-libraries is needed.

* configure: updated.


Modified: trunk/openvas-libnasl/ChangeLog
===================================================================
--- trunk/openvas-libnasl/ChangeLog	2007-10-08 21:12:22 UTC (rev 421)
+++ trunk/openvas-libnasl/ChangeLog	2007-10-08 22:21:48 UTC (rev 422)
@@ -1,3 +1,11 @@
+2007-10-09  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
+	* configure.in: Added sanity check for minimum version of
+	openvas-libraries. Which is set to 0.9.2 because a newly
+	installed header file of openvas-libraries is needed.
+
+	* configure: updated.
+
 2007-10-08  Bernhard Herzog  <bh at intevation.de>
 
 	* nasl/nasl.c: #include "hosts_gatherer.h" and remove the

Modified: trunk/openvas-libnasl/configure
===================================================================
--- trunk/openvas-libnasl/configure	2007-10-08 21:12:22 UTC (rev 421)
+++ trunk/openvas-libnasl/configure	2007-10-08 22:21:48 UTC (rev 422)
@@ -8128,6 +8128,7 @@
 
 
 
+NEED_OPENVASLIBS_VERSION=0.9.2
 
 # Extract the first word of "libopenvas-config", so it can be a program name with args.
 set dummy libopenvas-config; ac_word=$2
@@ -8182,7 +8183,48 @@
 \"See http://www.openvas.org/\"" >&2;}
    { (exit 1); exit 1; }; }
 
+OPENVASLIBS_VERSION=`$LIBOPENVASCONFIG --version`
 
+OPENVASLIBS_MAJOR=`echo $OPENVASLIBS_VERSION | \
+               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
+OPENVASLIBS_MINOR=`echo $OPENVASLIBS_VERSION | \
+               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
+OPENVASLIBS_PATCH=`echo $OPENVASLIBS_VERSION | \
+               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
+REQ_OPENVASLIBS_MAJOR=`echo $NEED_OPENVASLIBS_VERSION | \
+               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
+REQ_OPENVASLIBS_MINOR=`echo $NEED_OPENVASLIBS_VERSION | \
+               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
+REQ_OPENVASLIBS_PATCH=`echo $NEED_OPENVASLIBS_VERSION | \
+               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
+
+
+ok=no
+if test "$OPENVASLIBS_MAJOR" -gt "$REQ_OPENVASLIBS_MAJOR"; then
+  ok=yes
+else
+  if test "$OPENVASLIBS_MAJOR" -eq "$REQ_OPENVASLIBS_MAJOR"; then
+    if test "$OPENVASLIBS_MINOR" -gt "$REQ_OPENVASLIBS_MINOR"; then
+      ok=yes
+    else
+      if test "$OPENVASLIBS_MINOR" -eq "$REQ_OPENVASLIBS_MINOR"; then
+        if test "$OPENVASLIBS_PATCH" -ge "$REQ_OPENVASLIBS_PATCH"; then
+          ok=yes
+        fi
+      fi
+    fi
+  fi
+fi
+if test $ok = no; then
+{ { echo "$as_me:$LINENO: error: openvas-libraries $OPENVASLIBS_VERSION too old.
+Minimum required is $NEED_OPENVASLIBS_VERSION .
+" >&5
+echo "$as_me: error: openvas-libraries $OPENVASLIBS_VERSION too old.
+Minimum required is $NEED_OPENVASLIBS_VERSION .
+" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 XFLAGS="$CFLAGS"
 CPPFLAGS=`$LIBOPENVASCONFIG --cflags`
 CPPFLAGS="$XFLAGS"

Modified: trunk/openvas-libnasl/configure.in
===================================================================
--- trunk/openvas-libnasl/configure.in	2007-10-08 21:12:22 UTC (rev 421)
+++ trunk/openvas-libnasl/configure.in	2007-10-08 22:21:48 UTC (rev 422)
@@ -103,6 +103,7 @@
 
 
 
+NEED_OPENVASLIBS_VERSION=0.9.2
 
 AC_PATH_PROG(LIBOPENVASCONFIG, libopenvas-config)
 
@@ -112,7 +113,45 @@
 "compile openvas-libnasl."
 "See http://www.openvas.org/")
 
+OPENVASLIBS_VERSION=`$LIBOPENVASCONFIG --version`
 
+OPENVASLIBS_MAJOR=`echo $OPENVASLIBS_VERSION | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+OPENVASLIBS_MINOR=`echo $OPENVASLIBS_VERSION | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+OPENVASLIBS_PATCH=`echo $OPENVASLIBS_VERSION | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+REQ_OPENVASLIBS_MAJOR=`echo $NEED_OPENVASLIBS_VERSION | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+REQ_OPENVASLIBS_MINOR=`echo $NEED_OPENVASLIBS_VERSION | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+REQ_OPENVASLIBS_PATCH=`echo $NEED_OPENVASLIBS_VERSION | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+
+
+ok=no
+if test "$OPENVASLIBS_MAJOR" -gt "$REQ_OPENVASLIBS_MAJOR"; then
+  ok=yes
+else
+  if test "$OPENVASLIBS_MAJOR" -eq "$REQ_OPENVASLIBS_MAJOR"; then
+    if test "$OPENVASLIBS_MINOR" -gt "$REQ_OPENVASLIBS_MINOR"; then
+      ok=yes
+    else
+      if test "$OPENVASLIBS_MINOR" -eq "$REQ_OPENVASLIBS_MINOR"; then
+        if test "$OPENVASLIBS_PATCH" -ge "$REQ_OPENVASLIBS_PATCH"; then
+          ok=yes
+        fi
+      fi
+    fi
+  fi
+fi
+if test $ok = no; then
+AC_ERROR(
+openvas-libraries $OPENVASLIBS_VERSION too old.
+Minimum required is $NEED_OPENVASLIBS_VERSION .
+)
+fi
+
 XFLAGS="$CFLAGS"
 CPPFLAGS=`$LIBOPENVASCONFIG --cflags`
 CPPFLAGS="$XFLAGS"



More information about the Openvas-commits mailing list