Author: jan
Date: 2007-11-23 23:19:16 +0100 (Fri, 23 Nov 2007)
New Revision: 550
Modified:
trunk/openvas-libnasl/ChangeLog
trunk/openvas-libnasl/configure
trunk/openvas-libnasl/configure.in
Log:
* configure.in: Added version check for gpgme.
Necessary for example if libgpgme6 instead of libgpgme11
is installed on a Debian system.
* configure: updated.
Modified: trunk/openvas-libnasl/ChangeLog
===================================================================
--- trunk/openvas-libnasl/ChangeLog 2007-11-15 23:05:21 UTC (rev 549)
+++ trunk/openvas-libnasl/ChangeLog 2007-11-23 22:19:16 UTC (rev 550)
@@ -1,3 +1,11 @@
+2007-11-22 Jan-Oliver Wagner <[EMAIL PROTECTED]>
+
+ * configure.in: Added version check for gpgme.
+ Necessary for example if libgpgme6 instead of libgpgme11
+ is installed on a Debian system.
+
+ * configure: updated.
+
2007-11-15 Jan-Oliver Wagner <[EMAIL PROTECTED]>
* nasl/preparse.c: naslparse should be put outside of the
Modified: trunk/openvas-libnasl/configure
===================================================================
--- trunk/openvas-libnasl/configure 2007-11-15 23:05:21 UTC (rev 549)
+++ trunk/openvas-libnasl/configure 2007-11-23 22:19:16 UTC (rev 550)
@@ -839,9 +839,9 @@
INSTALL_SCRIPT
INSTALL_DATA
LIBOPENVASCONFIG
+GPGME_CONFIG
BISON
ALLOCA
-GPGME_CONFIG
PWD
PWDD
INSTALL
@@ -8129,7 +8129,11 @@
NEED_OPENVASLIBS_VERSION=0.9.2
+NEED_GPGME_VERSION=1.1.5
+
+
+
# Extract the first word of "libopenvas-config", so it can be a program name
with args.
set dummy libopenvas-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -8232,7 +8236,106 @@
+# Extract the first word of "gpgme-config", so it can be a program name with
args.
+set dummy gpgme-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_GPGME_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GPGME_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GPGME_CONFIG="$GPGME_CONFIG" # Let the user override the test
with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x
"$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GPGME_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+ ;;
+esac
+fi
+GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG
+if test -n "$GPGME_CONFIG"; then
+ { echo "$as_me:$LINENO: result: $GPGME_CONFIG" >&5
+echo "${ECHO_T}$GPGME_CONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+test "x$GPGME_CONFIG" = x && { { echo "$as_me:$LINENO: error: \"\"
+\"\"
+\"*** gpgme is not installed ! You need to install it before you\"
+\"compile openvas-libnasl.\"
+\"See http://www.gnupg.org/(en)/related_software/gpgme/index.html\"" >&5
+echo "$as_me: error: \"\"
+\"\"
+\"*** gpgme is not installed ! You need to install it before you\"
+\"compile openvas-libnasl.\"
+\"See http://www.gnupg.org/(en)/related_software/gpgme/index.html\"" >&2;}
+ { (exit 1); exit 1; }; }
+
+GPGME_VERSION=`$GPGME_CONFIG --version`
+
+GPGME_MAJOR=`echo $GPGME_VERSION | \
+ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
+GPGME_MINOR=`echo $GPGME_VERSION | \
+ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
+GPGME_PATCH=`echo $GPGME_VERSION | \
+ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
+REQ_GPGME_MAJOR=`echo $NEED_GPGME_VERSION | \
+ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
+REQ_GPGME_MINOR=`echo $NEED_GPGME_VERSION | \
+ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
+REQ_GPGME_PATCH=`echo $NEED_GPGME_VERSION | \
+ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
+
+
+ok=no
+if test "$GPGME_MAJOR" -gt "$REQ_GPGME_MAJOR"; then
+ ok=yes
+else
+ if test "$GPGME_MAJOR" -eq "$REQ_GPGME_MAJOR"; then
+ if test "$GPGME_MINOR" -gt "$REQ_GPGME_MINOR"; then
+ ok=yes
+ else
+ if test "$GPGME_MINOR" -eq "$REQ_GPGME_MINOR"; then
+ if test "$GPGME_PATCH" -ge "$REQ_GPGME_PATCH"; then
+ ok=yes
+ fi
+ fi
+ fi
+ fi
+fi
+if test $ok = no; then
+{ { echo "$as_me:$LINENO: error: gpgme $GPGME_VERSION too old.
+Minimum required is $NEED_GPGME_VERSION .
+" >&5
+echo "$as_me: error: gpgme $GPGME_VERSION too old.
+Minimum required is $NEED_GPGME_VERSION .
+" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -14592,60 +14695,6 @@
-# Extract the first word of "gpgme-config", so it can be a program name with
args.
-set dummy gpgme-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_GPGME_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GPGME_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GPGME_CONFIG="$GPGME_CONFIG" # Let the user override the test
with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x
"$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_GPGME_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG
-if test -n "$GPGME_CONFIG"; then
- { echo "$as_me:$LINENO: result: $GPGME_CONFIG" >&5
-echo "${ECHO_T}$GPGME_CONFIG" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-test "x$GPGME_CONFIG" = x && { { echo "$as_me:$LINENO: error: \"\"
-\"\"
-\"*** GPGME is not installed ! You need to install it before you\"
-\"compile openvas-libnasl.\"
-\"See http://www.gnupg.org/(en)/related_software/gpgme/index.html\"" >&5
-echo "$as_me: error: \"\"
-\"\"
-\"*** GPGME is not installed ! You need to install it before you\"
-\"compile openvas-libnasl.\"
-\"See http://www.gnupg.org/(en)/related_software/gpgme/index.html\"" >&2;}
- { (exit 1); exit 1; }; }
-
-
-
case "$host" in
*-freebsd*|*-bsdi*|*-netbsd*|*-darwin*)
cat >>confdefs.h <<\_ACEOF
@@ -15495,9 +15544,9 @@
INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
INSTALL_DATA!$INSTALL_DATA$ac_delim
LIBOPENVASCONFIG!$LIBOPENVASCONFIG$ac_delim
+GPGME_CONFIG!$GPGME_CONFIG$ac_delim
BISON!$BISON$ac_delim
ALLOCA!$ALLOCA$ac_delim
-GPGME_CONFIG!$GPGME_CONFIG$ac_delim
PWD!$PWD$ac_delim
PWDD!$PWDD$ac_delim
INSTALL!$INSTALL$ac_delim
Modified: trunk/openvas-libnasl/configure.in
===================================================================
--- trunk/openvas-libnasl/configure.in 2007-11-15 23:05:21 UTC (rev 549)
+++ trunk/openvas-libnasl/configure.in 2007-11-23 22:19:16 UTC (rev 550)
@@ -104,7 +104,13 @@
NEED_OPENVASLIBS_VERSION=0.9.2
+NEED_GPGME_VERSION=1.1.5
+
+
+dnl Testing for presence and correct version of openvas-libraries:
+dnl --------------------------------------------------------------
+
AC_PATH_PROG(LIBOPENVASCONFIG, libopenvas-config)
test "x$LIBOPENVASCONFIG" = x && AC_ERROR(""
@@ -158,8 +164,61 @@
+dnl Testing for presence and correct version of gpgme:
+dnl --------------------------------------------------
+AC_PATH_PROG(GPGME_CONFIG, gpgme-config)
+test "x$GPGME_CONFIG" = x && AC_ERROR(""
+""
+"*** gpgme is not installed ! You need to install it before you"
+"compile openvas-libnasl."
+"See http://www.gnupg.org/(en)/related_software/gpgme/index.html")
+
+GPGME_VERSION=`$GPGME_CONFIG --version`
+
+GPGME_MAJOR=`echo $GPGME_VERSION | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+GPGME_MINOR=`echo $GPGME_VERSION | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+GPGME_PATCH=`echo $GPGME_VERSION | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+REQ_GPGME_MAJOR=`echo $NEED_GPGME_VERSION | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+REQ_GPGME_MINOR=`echo $NEED_GPGME_VERSION | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+REQ_GPGME_PATCH=`echo $NEED_GPGME_VERSION | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+
+
+ok=no
+if test "$GPGME_MAJOR" -gt "$REQ_GPGME_MAJOR"; then
+ ok=yes
+else
+ if test "$GPGME_MAJOR" -eq "$REQ_GPGME_MAJOR"; then
+ if test "$GPGME_MINOR" -gt "$REQ_GPGME_MINOR"; then
+ ok=yes
+ else
+ if test "$GPGME_MINOR" -eq "$REQ_GPGME_MINOR"; then
+ if test "$GPGME_PATCH" -ge "$REQ_GPGME_PATCH"; then
+ ok=yes
+ fi
+ fi
+ fi
+ fi
+fi
+if test $ok = no; then
+AC_ERROR(
+gpgme $GPGME_VERSION too old.
+Minimum required is $NEED_GPGME_VERSION .
+)
+fi
+
+
+
+
+
+
AC_PATH_PROG(BISON, bison)
test "x$BISON" = "x" && AC_ERROR(""
""
@@ -407,15 +466,6 @@
],
[AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_STRNDUP_ALREADY)],[AC_MSG_RESULT([no])])
-AC_PATH_PROG(GPGME_CONFIG, gpgme-config)
-test "x$GPGME_CONFIG" = x && AC_ERROR(""
-""
-"*** GPGME is not installed ! You need to install it before you"
-"compile openvas-libnasl."
-"See http://www.gnupg.org/(en)/related_software/gpgme/index.html")
-
-
-
case "$host" in
*-freebsd*|*-bsdi*|*-netbsd*|*-darwin*)
AC_DEFINE(BSD_BYTE_ORDERING)
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits