Mercurial > hg > octave-jordi
diff libinterp/dldfcn/__osmesa_print__.cc @ 20095:bb59bdbdb8ac
Fix compilation error when building with OSMesa but without gl2ps (bug #44870)
* __osmesa_print__.cc (F__osmesa_print__): Add #ifdef HAVE_GL2PS_H block
around section that requires gl2ps. Add HAVE_GL2PS_H to %!tests.
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Sun, 19 Apr 2015 10:13:04 -0400 |
parents | f1b67f6e6e45 |
children | f90c8372b7ba |
line wrap: on
line diff
--- a/libinterp/dldfcn/__osmesa_print__.cc +++ b/libinterp/dldfcn/__osmesa_print__.cc @@ -176,6 +176,9 @@ if (nargin == 3) { // use gl2ps +#ifndef HAVE_GL2PS_H + gripe_disabled_feature ("__osmesa_print__", "gl2ps"); +#else std::string file = args(1).string_value (); std::string term = args(2).string_value (); @@ -215,6 +218,7 @@ error ("__osmesa_print__: Couldn't create file \"%s\"", file.c_str ()); } } +#endif } else { @@ -261,7 +265,7 @@ ## This is not critical, since this facility will mostly be used in ## the future for generating the images in Octave's own documentation. ## For the moment, disable these tests on PC's and Macs. -%!testif HAVE_OSMESA +%!testif HAVE_OSMESA, HAVE_GL2PS_H %! if (isunix ()) %! h = figure ("visible", "off"); %! fn = tempname (); @@ -276,7 +280,7 @@ %! assert (img_fp, [52942515; 54167797; 56158178], -0.05); %! endif -%!testif HAVE_OSMESA +%!testif HAVE_OSMESA, HAVE_GL2PS_H %! if (isunix ()) %! h = figure ("visible", "off"); %! fn = tempname ();