[Openvas-commits] r1113 - in trunk/openvas-client: . include nessus

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Aug 8 09:36:26 CEST 2008


Author: mwiegand
Date: 2008-08-08 09:36:23 +0200 (Fri, 08 Aug 2008)
New Revision: 1113

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/configure
   trunk/openvas-client/configure.in
   trunk/openvas-client/include/config.h.in
   trunk/openvas-client/nessus/cli.c
   trunk/openvas-client/nessus/html_graph_output.c
   trunk/openvas-client/nessus/nessus.c
   trunk/openvas-client/nessus/report_save.c
Log:
Removing gd and gdchart according to OpenVAS Change Request #14:
http://www.openvas.org/openvas-cr-14.html
Second part of patch.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/ChangeLog	2008-08-08 07:36:23 UTC (rev 1113)
@@ -1,3 +1,22 @@
+2008-08-08  Michael Wiegand <michael.wiegand at intevation.de>
+
+	Removing gd and gdchart according to OpenVAS Change Request #14:
+	http://www.openvas.org/openvas-cr-14.html
+	Second part of patch.
+
+	* nessus/html_graph_output.c, nessus/cli.c, nessus/report_save.c,
+	nessus/nessus.c: Changed conditional to NO_GDCHART to better adapt
+	to gdchart oddities.
+
+	* configure.in: Improved header check for headers needed by gdchart;
+	only set GDC_LIBS when _all_ headers are present.
+
+	* include/config.h.in: Changed conditional to NO_GDCHART; defining
+	HAVE_LIBFREETYPE as gdchart breaks compilation if it is not set
+	(see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=242936).
+
+	* configure: Updated.
+
 2008-08-06  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
 
 	Removing gd and gdchart according to OpenVAS Change Request #14:

Modified: trunk/openvas-client/configure
===================================================================
--- trunk/openvas-client/configure	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/configure	2008-08-08 07:36:23 UTC (rev 1113)
@@ -3745,8 +3745,20 @@
 
 done
 
+if test "$ac_cv_header_gdc_h" = "yes" && test "$ac_cv_header_gd_h" = "yes" && test "$ac_cv_header_png_h" = "yes"; then
+        gdc_lib="-lgd -lpng -lgdc"
+        cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBFREETYPE 1
+_ACEOF
 
+else
+        cat >>confdefs.h <<\_ACEOF
+#define NO_GDCHART 1
+_ACEOF
 
+fi
+
+
   succeeded=no
 
   if test -z "$PKG_CONFIG"; then

Modified: trunk/openvas-client/configure.in
===================================================================
--- trunk/openvas-client/configure.in	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/configure.in	2008-08-08 07:36:23 UTC (rev 1113)
@@ -75,6 +75,12 @@
 
 dnl GDChart
 AC_CHECK_HEADERS([gdc.h gd.h png.h])
+if test "$ac_cv_header_gdc_h" = "yes" && test "$ac_cv_header_gd_h" = "yes" && test "$ac_cv_header_png_h" = "yes"; then
+        gdc_lib="-lgd -lpng -lgdc"
+        AC_DEFINE(HAVE_LIBFREETYPE)
+else
+        AC_DEFINE(NO_GDCHART)
+fi
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 >=  2.2.0, HAVE_GLIB="yes", sweep_config_ok="no")
 AC_SUBST(GLIB_CFLAGS)

Modified: trunk/openvas-client/include/config.h.in
===================================================================
--- trunk/openvas-client/include/config.h.in	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/include/config.h.in	2008-08-08 07:36:23 UTC (rev 1113)
@@ -224,7 +224,8 @@
 #undef HAVE_SETPROCTITLE
 #undef HAVE__EXIT
 
-#undef HAVE_GDCHART
+#undef NO_GDCHART
+#undef HAVE_LIBFREETYPE
 
 #undef HAVE_PTY_H
 #undef HAVE_SYS_MMAN_H

Modified: trunk/openvas-client/nessus/cli.c
===================================================================
--- trunk/openvas-client/nessus/cli.c	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/nessus/cli.c	2008-08-08 07:36:23 UTC (rev 1113)
@@ -373,13 +373,13 @@
     return;
   }
 
-#ifdef HAVE_GDCHART
+#ifndef NO_GDCHART
  if(!strncmp(ftype, "html_pie", 8)||
      !strncmp(ftype, "html_graph", 10)) {
     args->output = arglist_to_html_graph;
     }
      else 
-#endif /* HAVE_GDCHART */
+#endif /* NO_GDCHART */
      if (!strncmp(ftype, "html", 4)) {
 	args->output = arglist_to_html;
      } else if (!strcmp(ftype, "latex") ||

Modified: trunk/openvas-client/nessus/html_graph_output.c
===================================================================
--- trunk/openvas-client/nessus/html_graph_output.c	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/nessus/html_graph_output.c	2008-08-08 07:36:23 UTC (rev 1113)
@@ -65,13 +65,13 @@
 
  -------------------------------------------------------------------*/	
 
-#ifdef HAVE_GDCHART
 
 #include <includes.h>
 #include "nessus_i18n.h"
-#include "gdc.h"
-#include "gdchart.h"
-#include "gdcpie.h"
+#ifndef NO_GDCHART
+#include <gdc.h>
+#include <gdchart.h>
+#include <gdcpie.h>
 #include "report.h"
 #include "report_utils.h"
 #include "error_dlg.h"
@@ -1369,4 +1369,4 @@
  return 0;
 }
 
-#endif /* HAVE_GDCHART */
+#endif /* NO_GDCHART */

Modified: trunk/openvas-client/nessus/nessus.c
===================================================================
--- trunk/openvas-client/nessus/nessus.c	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/nessus/nessus.c	2008-08-08 07:36:23 UTC (rev 1113)
@@ -788,7 +788,7 @@
         arglist_to_text(backend_convert(be), out_report);
       else if(!strcmp(type, "html"))
         arglist_to_html(backend_convert(be), out_report);
-#ifdef HAVE_GDCHART
+#ifndef NO_GDCHART
       else if(!strcmp(type, "html_pie") || !strcmp(type, "html_graph"))
         arglist_to_html_graph(backend_convert(be), out_report);
 #endif

Modified: trunk/openvas-client/nessus/report_save.c
===================================================================
--- trunk/openvas-client/nessus/report_save.c	2008-08-07 15:25:49 UTC (rev 1112)
+++ trunk/openvas-client/nessus/report_save.c	2008-08-08 07:36:23 UTC (rev 1113)
@@ -126,7 +126,7 @@
       hosts = backend_convert(be);
       arglist_to_text(hosts, fname);
       break;
-#ifdef HAVE_GDCHART
+#ifndef NO_GDCHART
     case SAVE_HTML_GRAPH:
       hosts = backend_convert(be);
       arglist_to_html_graph(hosts, fname);
@@ -231,7 +231,7 @@
   gtk_menu_append(GTK_MENU(menu), type);
   gtk_widget_show(type);
 
-#ifdef HAVE_GDCHART
+#ifndef NO_GDCHART
   type = gtk_menu_item_new_with_label(_("HTML with Pies and Graphs"));
   gtk_object_set_data(GTK_OBJECT(type), "type", (void *)SAVE_HTML_GRAPH);
   gtk_menu_append(GTK_MENU(menu), type);



More information about the Openvas-commits mailing list