added macros: %check_def(), %def_with(), %def_without(), %def_enable(), %def_disable()

This commit is contained in:
Дмитрий Левин 2002-03-31 12:05:59 +00:00
parent b4067d4032
commit 7dbde57e64

View File

@ -948,5 +948,20 @@ done \
# Useful ifdef() macro.
%ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
# Check whether both _with_%{1} and _without_%{1} are defined.
%check_def() %{expand:%%{?_with_%{1}: %%{?_without_%{1}: %%{error: both _with_%{1} and _without_%{1} are defined}}}}
# Set default with_%{1} value.
%def_with() %{expand:%%{!?_with_%{1}: %%{!?_without_%{1}: %%global _with_%{1} --with-%{1}}}}
# Set default without_%{1} value.
%def_without() %{expand:%%{!?_with_%{1}: %%{!?_without_%{1}: %%global _without_%{1} --without-%{1}}}}
# Set default enable_%{1} value.
%def_enable() %{expand:%%{!?_enable_%{1}: %%{!?_enableout_%{1}: %%global _enable_%{1} --enable-%{1}}}}
# Set default disable_%{1} value.
%def_disable() %{expand:%%{!?_with_%{1}: %%{!?_disable_%{1}: %%global _disable_%{1} --disable-%{1}}}}
# \endverbatim
#*/