# HG changeset patch # User dbateman # Date 1188605296 0 # Node ID a052825889a075a955399922283f9847c211f494 # Parent 364765c1764885ca32f3c142cf223863535ed28d [project @ 2007-09-01 00:08:16 by dbateman] diff -r 364765c17648 -r a052825889a0 ChangeLog --- 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 + + * configure.in: AC_SUBST and check the variable TEXINFO_QHULL. + * Makeconf.in: Use it. + 2007-08-24 David Bateman * configure.in: Extra Qhull bits. diff -r 364765c17648 -r a052825889a0 Makeconf.in --- 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 diff -r 364765c17648 -r a052825889a0 configure.in --- 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 diff -r 364765c17648 -r a052825889a0 doc/ChangeLog --- 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 + + * 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 * interpreter/nonlin.txi: Extended the example. diff -r 364765c17648 -r a052825889a0 doc/conf.texi.in --- 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% diff -r 364765c17648 -r a052825889a0 doc/interpreter/geometry.txi --- 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 diff -r 364765c17648 -r a052825889a0 doc/interpreter/geometryimages.m --- 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