function [include, lib] = papiRoot

include = '';
lib = '';

here = fileparts(mfilename('fullpath'));
file = fullfile(here, 'derived', [computer('arch') '.txt']);

if isequal(exist(file, 'file'), 2)
    absRoot = strtrim(fileread(file));
    if contains(absRoot, '..')
        absRoot = cd(cd(fullfile(here, absRoot)));
    end
    include = fullfile(absRoot, 'include');
    lib = fullfile(absRoot, 'lib');
end
