# HG changeset patch # User Andreas Weber # Date 1429452784 14400 # Node ID bb59bdbdb8acdefbe8030bd502ff5b53688e410b # Parent c164cfc24bdd5a29bd07bfcbeb7f0d4e01d0f738 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. diff -r c164cfc24bdd -r bb59bdbdb8ac libinterp/dldfcn/__osmesa_print__.cc --- a/libinterp/dldfcn/__osmesa_print__.cc Sun Apr 19 09:54:54 2015 -0400 +++ b/libinterp/dldfcn/__osmesa_print__.cc Sun Apr 19 10:13:04 2015 -0400 @@ -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 ();