%ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
%ifndef() %if %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
+# Shorthand for %{defined with_...}
+%with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
+%without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
+
+# Shorthand for %if %{with ...}
+%ifwith() %if %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
+%ifwithout() %if %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
+
# Handle conditional builds. %bcond_with is for case when feature is
# default off and needs to be activated with --with ... command line
# switch. %bcond_without is for the dual case.