function value = getCustomBuildConfigurationOption(h,cfgName,option,action)

% Copyright 2014 The MathWorks, Inc.

bc = h.getCustomBuildConfiguration( cfgName );
h.checkBuildToolsForGetSet( 'build', option );
obj = bc.getOption( option );
if nargin==3
value = obj.getValue();
elseif nargin==4
switch lower( action )
case { 'obj', 'object' }
value = obj;
case 'macro'
value = obj.getMacro();
otherwise
value = obj.getValue();
end
end
end