diff src/DLD-FUNCTIONS/convhulln.cc @ 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 cd550069240e
children 89f4d7e294cc
line wrap: on
line diff
--- 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);