checkRequirementOfElk

PURPOSE ^

checking requriements of elk-library

SYNOPSIS ^

function requirementFulfilled = checkRequirementOfElk()

DESCRIPTION ^

 checking requriements of elk-library

 This function is called by configElk during setup.

 See also: configElk

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function requirementFulfilled = checkRequirementOfElk()
0002 % checking requriements of elk-library
0003 %
0004 % This function is called by configElk during setup.
0005 %
0006 % See also: configElk
0007 
0008 % The elk-library: convex geometry applied to crystallization modeling.
0009 %   Copyright (C) 2012 Alexander Reinhold
0010 %
0011 % This program is free software: you can redistribute it and/or modify it
0012 %   under the terms of the GNU General Public License as published by the
0013 %   Free Software Foundation, either version 3 of the License, or (at your
0014 %   option) any later version.
0015 %
0016 % This program is distributed in the hope that it will be useful, but
0017 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0018 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0019 %   General Public License for more details.
0020 %
0021 % You should have received a copy of the GNU General Public License along
0022 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0023 
0024 %% preset - all requirements met
0025 requirementFulfilled = 1;
0026 
0027 %% Computer system
0028 versionComputer = computer;
0029 switch lower(versionComputer)
0030     case 'glnxa64'
0031         disp('You are using 64bit Linux: elk-library was developed on that system.');
0032     otherwise
0033         warning('elk:setup', ...
0034             ['You are using ' versionComputer ...
0035              ': elk library is NOT testet on this system. \n' ...
0036              'If you experience problems, use a 64bit linux system']);
0037 end
0038 
0039 
0040 %% MATLAB Version
0041 versionMATLAB = version('-release');
0042 switch lower(versionMATLAB)
0043     case '2012a'
0044         disp('You are using MATLAB R2012a: elk-library was developed with that version.');
0045     otherwise
0046         warning('elk:setup', ...
0047             ['You are using MATLAB ' versionMATLAB ...
0048              ': elk-library is not tested with that version. \n' ...
0049              'If you experience problems, use MATLAB R2011b.']);
0050 end
0051 
0052 %% Compiler
0053 [statusCompiler, versionCompiler] = system('gcc-4.4 --version');
0054 versionCompiler = versionCompiler(1:(strfind(versionCompiler, 'Copyright') - 2));
0055 versionCompiler = versionCompiler((find(versionCompiler == ' ', 1, 'last') + 1):end);
0056 if statusCompiler > 0
0057     disp('Please install gcc-4.4! (version 4.4.7 preferred)');
0058     disp('Note that MATLAB often requires an old gcc version.');
0059     requirementFulfilled = 0;
0060 end
0061 switch versionCompiler
0062     case '4.4.7'
0063         disp('You have installed gcc 4.4.7: elk-library was developed with that version.');
0064         disp('Note that MATLAB often requires an old gcc version.');
0065     otherwise
0066         warning('elk:setup', ...
0067             ['You are using gcc ' versionCompiler ...
0068              ': elk-library is not tested with that version. \n' ...
0069              'If you experience problems, install gcc 4.4.7.']);
0070 end
0071 
0072 
0073 %% MDT (M development toolbox)
0074 % if exist('mdtVersion', 'file') && str2num(mdtVersion) >= 1
0075 %     disp(['You are using mdt version ' num2str(mdtVersion) '.']);
0076 % else
0077 %     disp('Please install mdt with a current version');
0078 %     requirementFulfilled = 0;
0079 % end

Generated on Sat 18-Jul-2015 16:45:31 by m2html © 2005