Mercurial > octave-nkf
diff libinterp/octave-value/ov-fcn-handle.cc @ 16170:2a4f83826024
new way to test for features in Octave scripts
* __have_feature__.m: New file.
* test.m, geometryimages.m, sparseimages.m: Use it. Delete tests for
testif and xfail.
* config-features.sh: New file.
* libinterp/Makefile.am (EXTRA_DIST): Include config-features.sh in
the list.
(oct-conf-features.h): New target.
(BUILT_NODISTFILES, nodist_liboctinterp_la_SOURCES): Include
oct-conf-features.h in the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 02 Mar 2013 07:41:50 -0500 |
parents | 859c8bf6d134 |
children | 302157614308 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-fcn-handle.cc Fri Mar 01 14:06:02 2013 -0800 +++ b/libinterp/octave-value/ov-fcn-handle.cc Sat Mar 02 07:41:50 2013 -0500 @@ -1304,7 +1304,8 @@ %! hdld2 = hdld; %! hbi2 = hbi; %! modes = {"-text", "-binary"}; -%! if (!isempty (findstr (octave_config_info ("DEFS"), "HAVE_HDF5"))) +%! if (isfield (octave_config_info, "HAVE_HDF5") +%! && octave_config_info ("HAVE_HDF5")) %! modes(end+1) = "-hdf5"; %! endif %! for i = 1:numel (modes) @@ -1356,7 +1357,8 @@ %! hdld2 = hdld; %! hbi2 = hbi; %! modes = {"-text", "-binary"}; -%! if (!isempty (findstr (octave_config_info ("DEFS"), "HAVE_HDF5"))) +%! if (isfield (octave_config_info, "HAVE_HDF5") +%! && octave_config_info ("HAVE_HDF5")) %! modes(end+1) = "-hdf5"; %! endif %! for i = 1:numel (modes)