[Openvas-commits] r2806 - trunk/openvas-client

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Mar 16 22:17:52 CET 2009


Author: jan
Date: 2009-03-16 22:17:50 +0100 (Mon, 16 Mar 2009)
New Revision: 2806

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/configure
   trunk/openvas-client/configure.in
   trunk/openvas-client/nessus.tmpl.in
Log:
Adding some patches by Marcus Brinkmann towards a crosscompiling
OpenVAS-Client based on mingw.

* configure.in: Added handling of RANLIB, added "mingw32" as further
host. Added configure check to avoid regexp
checking (--enable-internal-regex).

* configure: updated.

* nessus.tmpl.in: Added handling of RANLIB.



Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-03-16 19:21:54 UTC (rev 2805)
+++ trunk/openvas-client/ChangeLog	2009-03-16 21:17:50 UTC (rev 2806)
@@ -1,3 +1,16 @@
+2009-03-16  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
+	Adding some patches by Marcus Brinkmann towards a crosscompiling
+	OpenVAS-Client based on mingw.
+
+	* configure.in: Added handling of RANLIB, added "mingw32" as further
+	host. Added configure check to avoid regexp
+	checking (--enable-internal-regex).
+
+	* configure: updated.
+
+	* nessus.tmpl.in: Added handling of RANLIB.
+
 2009-03-16  Michael Wiegand <michael.wiegand at intevation.de>
 
 	* nessus/OpenVAS-Client.desktop: Added to category Network as suggested

Modified: trunk/openvas-client/configure
===================================================================
--- trunk/openvas-client/configure	2009-03-16 19:21:54 UTC (rev 2805)
+++ trunk/openvas-client/configure	2009-03-16 21:17:50 UTC (rev 2806)
@@ -671,6 +671,7 @@
 INSTALL_PROGRAM
 INSTALL_SCRIPT
 INSTALL_DATA
+RANLIB
 CPP
 GREP
 EGREP
@@ -1315,6 +1316,7 @@
   --enable-release	  set the compiler flags to -O6
   --enable-debug	  set the compiler flags to -g
   --enable-gtk                 build with GTK
+  --enable-internal-regex  use internal regex
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -2930,6 +2932,102 @@
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; 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_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+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_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; 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_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+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_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
 INSTALL_DIR="$INSTALL -d"
 
 test -n "$GCC" && CWALL="-Wall"
@@ -2939,6 +3037,16 @@
 test "x$enable_client" = "x" && enable_client="yes"
 
 
+case "${host}" in
+    *-mingw32*)
+      CFLAGS="$CFLAGS -mms-bitfields"
+      LDFLAGS="$LDFLAGS -mwindows"
+
+    ;;
+esac
+
+
+
 nessus_lib=-lnessus
 
 XPATH="$DESTDIR$prefix/bin:$PATH"
@@ -8715,21 +8823,29 @@
 fi
 
 
-BROKEN_REGEXP=""
-#
-# RedHat 8.0 ships with a broken regexp library (Nessus bug#90)
-#
-test -f /etc/redhat-release &&
-{
- cat /etc/redhat-release | egrep "(8\.0|9)" >/dev/null && BROKEN_REGEXP=y
- }
+USE_INTERNAL_REGEX=maybe
+# Check whether --enable-internal-regex was given.
+if test "${enable_internal_regex+set}" = set; then
+  enableval=$enable_internal_regex; USE_INTERNAL_REGEX=yes
+fi
 
 
-test -z "$BROKEN_REGEXP" &&
+test -z "$BROKEN_REGEXP" -a "x$USE_INTERNAL_REGEX" = "xmaybe" &&
 {
-{ echo "$as_me:$LINENO: checking for a working regexp implementation" >&5
+  BROKEN_REGEXP=""
+  #
+  # RedHat 8.0 ships with a broken regexp library (Nessus bug#90)
+  #
+  test -f /etc/redhat-release &&
+  {
+    cat /etc/redhat-release | egrep "(8\.0|9)" >/dev/null && BROKEN_REGEXP=y
+  }
+
+  test -z "$BROKEN_REGEXP" &&
+  {
+  { echo "$as_me:$LINENO: checking for a working regexp implementation" >&5
 echo $ECHO_N "checking for a working regexp implementation... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then
   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&5
 echo "$as_me: error: cannot run test program while cross compiling
@@ -8791,10 +8907,7 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF
-#define HAVE_REGEX_SUPPORT 1
-_ACEOF
-
+echo "${ECHO_T}yes" >&6; };USE_INTERNAL_REGEX=no
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
@@ -8802,15 +8915,23 @@
 
 ( exit $ac_status )
 { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+echo "${ECHO_T}no" >&6; };USE_INTERNAL_REGEX=yes
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
+  }
 }
+test "x$USE_INTERNAL_REGEX" = "xno" &&
+{
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_REGEX_SUPPORT 1
+_ACEOF
 
+}
 
+
 { echo "$as_me:$LINENO: checking GNU gettext available" >&5
 echo $ECHO_N "checking GNU gettext available... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
@@ -11963,6 +12084,7 @@
 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
 INSTALL_DATA!$INSTALL_DATA$ac_delim
+RANLIB!$RANLIB$ac_delim
 CPP!$CPP$ac_delim
 GREP!$GREP$ac_delim
 EGREP!$EGREP$ac_delim
@@ -12003,7 +12125,6 @@
 man_nessus_1!$man_nessus_1$ac_delim
 dl_lib!$dl_lib$ac_delim
 gdc_lib!$gdc_lib$ac_delim
-client!$client$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -12045,6 +12166,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+client!$client$ac_delim
 client_install!$client_install$ac_delim
 ac_configure_args!$ac_configure_args$ac_delim
 ssl!$ssl$ac_delim
@@ -12055,7 +12177,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: trunk/openvas-client/configure.in
===================================================================
--- trunk/openvas-client/configure.in	2009-03-16 19:21:54 UTC (rev 2805)
+++ trunk/openvas-client/configure.in	2009-03-16 21:17:50 UTC (rev 2806)
@@ -39,6 +39,7 @@
 AC_PROG_CC
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
+AC_PROG_RANLIB
 INSTALL_DIR="$INSTALL -d"
 
 test -n "$GCC" && CWALL="-Wall"
@@ -48,6 +49,16 @@
 test "x$enable_client" = "x" && enable_client="yes"
 
 
+case "${host}" in
+    *-mingw32*)
+      CFLAGS="$CFLAGS -mms-bitfields"
+      LDFLAGS="$LDFLAGS -mwindows"
+
+    ;;
+esac
+
+
+
 nessus_lib=-lnessus
 
 dnl extending the search path for AC_PATH_PROG when searching for config scripts
@@ -283,20 +294,24 @@
 fi
 
 
-BROKEN_REGEXP=""
-#
-# RedHat 8.0 ships with a broken regexp library (Nessus bug#90)
-#
-test -f /etc/redhat-release && 
+USE_INTERNAL_REGEX=maybe
+AC_ARG_ENABLE([internal-regex], [  --enable-internal-regex  use internal regex], USE_INTERNAL_REGEX=yes)
+
+test -z "$BROKEN_REGEXP" -a "x$USE_INTERNAL_REGEX" = "xmaybe" &&
 {
- cat /etc/redhat-release | egrep "(8\.0|9)" >/dev/null && BROKEN_REGEXP=y
- }
+  BROKEN_REGEXP=""
+  #
+  # RedHat 8.0 ships with a broken regexp library (Nessus bug#90)
+  #
+  test -f /etc/redhat-release && 
+  {
+    cat /etc/redhat-release | egrep "(8\.0|9)" >/dev/null && BROKEN_REGEXP=y
+  }
  
-
-test -z "$BROKEN_REGEXP" &&
-{
-AC_MSG_CHECKING([for a working regexp implementation])
-AC_TRY_RUN([
+  test -z "$BROKEN_REGEXP" &&
+  {
+  AC_MSG_CHECKING([for a working regexp implementation])
+  AC_TRY_RUN([
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -322,8 +337,13 @@
   		strlen("i use nessus everyday"),
 		&regs);
 }
-], [AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_REGEX_SUPPORT)],[AC_MSG_RESULT([no])])
+], [AC_MSG_RESULT([yes]);USE_INTERNAL_REGEX=no],[AC_MSG_RESULT([no]);USE_INTERNAL_REGEX=yes])
+  }
 }
+test "x$USE_INTERNAL_REGEX" = "xno" &&
+{
+  AC_DEFINE(HAVE_REGEX_SUPPORT)
+}
 
 
 dnl I18N Test (GNU gettext)

Modified: trunk/openvas-client/nessus.tmpl.in
===================================================================
--- trunk/openvas-client/nessus.tmpl.in	2009-03-16 19:21:54 UTC (rev 2805)
+++ trunk/openvas-client/nessus.tmpl.in	2009-03-16 21:17:50 UTC (rev 2806)
@@ -102,6 +102,7 @@
 
 # Your C compiler
 CC=@CC@
+RANLIB=@RANLIB@
 GTKCONFIG_CFLAGS=@GTKCONFIG_CFLAGS@
 GTKCONFIG_LIBS=@GTKCONFIG_LIBS@
 GLIB_CFLAGS=@GLIB_CFLAGS@



More information about the Openvas-commits mailing list