changeset 6855:a052825889a0

[project @ 2007-09-01 00:08:16 by dbateman]
author dbateman
date Sat, 01 Sep 2007 00:08:16 +0000
parents 364765c17648
children b39ecdddd77b
files ChangeLog Makeconf.in configure.in doc/ChangeLog doc/conf.texi.in doc/interpreter/geometry.txi doc/interpreter/geometryimages.m
diffstat 7 files changed, 61 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Sep 01 00:03:10 2007 +0000
+++ b/ChangeLog	Sat Sep 01 00:08:16 2007 +0000
@@ -1,3 +1,8 @@
+2007-09-01  David Bateman  <dbateman@free.fr>
+
+	* configure.in: AC_SUBST and check the variable TEXINFO_QHULL.
+	* Makeconf.in: Use it.
+
 2007-08-24  David Bateman  <dbateman@free.fr>
 
 	* configure.in: Extra Qhull bits.
--- a/Makeconf.in	Sat Sep 01 00:03:10 2007 +0000
+++ b/Makeconf.in	Sat Sep 01 00:08:16 2007 +0000
@@ -227,6 +227,7 @@
 TEXINFO_COLAMD = @TEXINFO_COLAMD@
 TEXINFO_CHOLMOD = @TEXINFO_CHOLMOD@
 TEXINFO_UMFPACK = @TEXINFO_UMFPACK@
+TEXINFO_QHULL = @TEXINFO_QHULL@
 
 # The arguments passed to configure.
 config_opts = @config_opts@
@@ -577,7 +578,8 @@
   -e "s|%OCTAVE_VERSION%|${version}|" \
   -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \
   -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \
-  -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" | \
+  -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" \
+  -e "s|%TEXINFO_QHULL%|${TEXINFO_QHULL}|" | \
   $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t
 $(simple-move-if-change-rule)
 endef
--- a/configure.in	Sat Sep 01 00:03:10 2007 +0000
+++ b/configure.in	Sat Sep 01 00:08:16 2007 +0000
@@ -29,7 +29,7 @@
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
 AC_INIT
-AC_REVISION($Revision: 1.572 $)
+AC_REVISION($Revision: 1.573 $)
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -437,11 +437,14 @@
 if test "$have_qhull" = yes; then
   AC_DEFINE(HAVE_QHULL, 1, [Define if the QHull library is used.])
   QHULL_LIBS="-lqhull"
+  TEXINFO_QHULL="@set HAVE_QHULL"
 else
   warn_qhull="Qhull library not found --- This will result in loss of functionality of some geometry functions."
   AC_MSG_WARN($warn_qhull)
 fi
 
+AC_SUBST(TEXINFO_QHULL)
+
 ### Check for pcre/regex library.
 AC_SUBST(REGEX_LIBS)
 WITH_PCRE_CONFIG=no
--- a/doc/ChangeLog	Sat Sep 01 00:03:10 2007 +0000
+++ b/doc/ChangeLog	Sat Sep 01 00:08:16 2007 +0000
@@ -1,3 +1,11 @@
+2007-09-01  David Bateman  <dbateman@free.fr>
+
+	* conf.texi.in: Substitute for the variable TEXINFO_QHULL
+	* interpreter/geometryimages.m: Check for the HAVE_QHULL build
+	flag before creating certain figures.
+	* interpreter/geometry.txi: Check whether TEXINFO_QHULL is set
+	before including certain figures.
+
 2007-08-31  Søren Hauberg  <hauberg@gmail.com>
 
         * interpreter/nonlin.txi: Extended the example.
--- a/doc/conf.texi.in	Sat Sep 01 00:03:10 2007 +0000
+++ b/doc/conf.texi.in	Sat Sep 01 00:08:16 2007 +0000
@@ -10,3 +10,4 @@
 %TEXINFO_COLAMD%
 %TEXINFO_CHOLMOD%
 %TEXINFO_UMFPACK%
+%TEXINFO_QHULL%
--- a/doc/interpreter/geometry.txi	Sat Sep 01 00:03:10 2007 +0000
+++ b/doc/interpreter/geometry.txi	Sat Sep 01 00:08:16 2007 +0000
@@ -62,6 +62,7 @@
 @end group
 @end example
 
+@ifset HAVE_QHULL
 @ifnotinfo
 @noindent
 The result of which can be seen in @ref{fig:delaunay}.
@@ -71,6 +72,7 @@
 @caption{Delaunay triangulation of a random set of points}
 @end float
 @end ifnotinfo
+@end ifset
 
 @menu
 * Plotting the Triangulation::
@@ -285,6 +287,7 @@
 @end group
 @end example
 
+@ifset HAVE_QHULL
 @ifnotinfo
 @noindent
 The result of which can be seen in @ref{fig:voronoi}. Note that the
@@ -297,6 +300,7 @@
 @caption{Delaunay triangulation and Voronoi diagram of a random set of points}
 @end float
 @end ifnotinfo
+@end ifset
 
 Additional information about the size of the facets of a Voronoi
 diagram, and which points of a set of points is in a polygon can be had
@@ -373,6 +377,7 @@
 @end group
 @end example
 
+@ifset HAVE_QHULL
 @ifnotinfo
 @noindent
 The output of the above can be seen in @ref{fig:convhull}.
@@ -382,6 +387,7 @@
 @caption{The convex hull of a simple set of points}
 @end float
 @end ifnotinfo
+@end ifset
 
 @node Interpolation on Scattered Data
 @section Interpolation on Scattered Data
@@ -415,6 +421,7 @@
 @end group
 @end example
 
+@ifset HAVE_QHULL
 @noindent
 that interpolates from a random scattering of points, to a uniform
 grid. 
@@ -426,3 +433,4 @@
 @caption{Interpolation from a scattered data to a regular grid}
 @end float
 @end ifnotinfo
+@end ifset
--- a/doc/interpreter/geometryimages.m	Sat Sep 01 00:03:10 2007 +0000
+++ b/doc/interpreter/geometryimages.m	Sat Sep 01 00:08:16 2007 +0000
@@ -1,6 +1,10 @@
 function geometryimages (nm, typ)
   bury_output ();
-  if (strcmp (nm, "voronoi"))
+  if (isempty (findstr (octave_config_info ("DEFS"), "HAVE_QHULL")) && ...
+      (strcmp (nm, "voronoi") || strcmp (nm, "griddata") || ...
+       strcmp (nm, "convhull") || strcmp (nm, "delaunay")))
+    sombreroimage (nm, typ);
+  elseif (strcmp (nm, "voronoi"))
     rand("state",9);
     x = rand(10,1);
     y = rand(10,1);
@@ -141,3 +145,30 @@
   f = figure (1);
   set (f, "visible", "off");
 endfunction
+
+function sombreroimage (nm, typ)
+  if (strcmp (typ, "txt"))
+    fid = fopen (sprintf ("%s.txt", nm), "wt");
+    fputs (fid, "+-----------------------------+\n");
+    fputs (fid, "| Image unavailable because   |\n");
+    fputs (fid, "| of a missing QHULL library. |\n");
+    fputs (fid, "+-----------------------------+\n");
+    fclose (fid);
+    return;
+  else ## if (!strcmp (typ, "txt"))
+
+    bury_output ();
+
+    x = y = linspace (-8, 8, 41)';
+    [xx, yy] = meshgrid (x, y);
+    r = sqrt (xx .^ 2 + yy .^ 2) + eps;
+    z = sin (r) ./ r;
+    unwind_protect
+      mesh (x, y, z);
+      title ("Sorry, graphics not available because octave was\\ncompiled without the QHULL library.");
+    unwind_protect_cleanup
+      print (strcat (nm, ".", typ), strcat ("-d", typ));
+      bury_output ();
+    end_unwind_protect
+  endif
+endfunction