changeset 10474:b2143d97c002

Neither include qhull/qhull_a.h nor run tests unless we HAVE_QHULL.
author David Grundberg <davidg@cs.umu.se>
date Sun, 28 Mar 2010 19:07:48 +0200
parents 169be980faf9
children 739109ef88ee
files src/ChangeLog src/DLD-FUNCTIONS/convhulln.cc
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Mar 27 19:56:08 2010 -0400
+++ b/src/ChangeLog	Sun Mar 28 19:07:48 2010 +0200
@@ -1,3 +1,8 @@
+2010-03-28  David Grundberg  <davidg@cs.umu.se>
+
+	* DLD-FUNCTIONS/convhulln.cc [HAVE_QHULL]: Neither include
+	qhull/qhull_a.h nor run tests if unless we HAVE_QHULL.
+
 2010-03-26  Jaroslav Hajek  <highegg@gmail.com>
 
 	* variables.cc (maybe_missing_function_hook): Temporarily clear before
--- a/src/DLD-FUNCTIONS/convhulln.cc	Sat Mar 27 19:56:08 2010 -0400
+++ b/src/DLD-FUNCTIONS/convhulln.cc	Sun Mar 28 19:07:48 2010 +0200
@@ -41,13 +41,15 @@
 #include "oct-obj.h"
 #include "parse.h"
 
+#ifdef HAVE_QHULL
 extern "C" {
 #include <qhull/qhull_a.h>
 }
 
-#if defined (HAVE_QHULL) && defined (NEED_QHULL_VERSION)
+# ifdef NEED_QHULL_VERSION
 char qh_version[] = "convhulln.oct 2007-07-24";
-#endif
+# endif
+#endif /* HAVE_QHULL */
 
 DEFUN_DLD (convhulln, args, nargout,
   "-*- texinfo -*-\n\
@@ -232,11 +234,11 @@
 }
 
 /*
-%!test
+%!testif HAVE_QHULL
 %! cube = [0 0 0;1 0 0;1 1 0;0 1 0;0 0 1;1 0 1;1 1 1;0 1 1];
 %! [h, v] = convhulln(cube,'Pp');
 %! assert (v, 1.0, 1e6*eps);
-%!test
+%!testif HAVE_QHULL
 %! tetrahedron = [1 1 1;-1 -1 1;-1 1 -1;1 -1 -1];
 %! [h, v] = convhulln(tetrahedron,'Pp');
 %! assert (v, 8/3, 1e6*eps);