Mercurial > octave
comparison scripts/testfun/__have_feature__.m @ 21226:a55b8ece1ecd
reorganize octave_config_info again
* build-env-features.sh: Don't include ENABLE_ items in the output.
* toplev.cc (find_config_info): New static function.
(Foctave_config_info): Put Octave configuration info in the main
struct. Put the build system features and build environment info in
substructures. Allow searching of all elements by keyword.
* __have_feature__.m, doc/interpreter/testfun.txi:
Fix name of build features substructure element.
* geometryimages.m, interpimages.m, plotimages.m, sparseimages.m,
splineimages.m: Use __have_feature__ to check for OSMESA.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 08 Feb 2016 23:14:56 -0500 |
parents | 516bb87ea72e |
children | a66a737913b5 |
comparison
equal
deleted
inserted
replaced
21225:19a619ac9508 | 21226:a55b8ece1ecd |
---|---|
20 ## @deftypefn {} {} __have_feature__ (feature) | 20 ## @deftypefn {} {} __have_feature__ (feature) |
21 ## Undocumented internal function. | 21 ## Undocumented internal function. |
22 ## @end deftypefn | 22 ## @end deftypefn |
23 | 23 |
24 function retval = __have_feature__ (feature) | 24 function retval = __have_feature__ (feature) |
25 features = octave_config_info ("features"); | 25 features = octave_config_info ("build_features"); |
26 if (iscellstr (feature)) | 26 if (iscellstr (feature)) |
27 retval = (all (isfield (features, feature)) | 27 retval = (all (isfield (features, feature)) |
28 && cellfun (@(x) features.(x), feature)); | 28 && cellfun (@(x) features.(x), feature)); |
29 elseif (ischar (feature)) | 29 elseif (ischar (feature)) |
30 retval = isfield (features, feature) && features.(feature); | 30 retval = isfield (features, feature) && features.(feature); |