I want to propose next improve for macroses like %def_with, %def_enable, etc to using parameters %define def_with_param() %{expand:%%{!?_with_%{1}: %%{!?_without_%{1}: %%{?2: %%global _with_param_%{1} %{2}} %%global _with_%{1} --with-%{1}}}} %define subst_with_param() %{expand:%%{?_with_%{1}:%%{_with_%{1}}%%{?_with_param_%{1}:=%%{_with_param_%{1}}}}} %{expand:%%{?_without_%{1}:%%{_without_%{1}}%%{?_without_param_%{1}:=%%{_without_param_%{1}}}}} %define if_with_param() %if %{expand:%%{?_with_%{1}: %%{?2:%%(if [ "%%{_with_param_%{1}}" == "%{2}" ]; then echo 1; else echo 0; fi)}%%{!?2:1}}%%{!?_with_%{1}:0}} Steps to Reproduce: 1. %def_with debug yes 2. %if_with debug yes %endif 3. %configure %{subst_with debug} Actual Results: rpm -bE tes.spec: ......... ./configure --build=pentium4-alt-linux --host=pentium4-alt-linux \ --prefix=/usr \ --exec-prefix=/usr \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --sysconfdir=/etc \ --datadir=/usr/share \ --includedir=/usr/include \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --localstatedir=/var/lib \ --sharedstatedir=/usr/com \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --without-included-gettext --with-debug ......... Expected Results: rpm -bE tes.spec: ......... ./configure --build=pentium4-alt-linux --host=pentium4-alt-linux \ --prefix=/usr \ --exec-prefix=/usr \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --sysconfdir=/etc \ --datadir=/usr/share \ --includedir=/usr/include \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --localstatedir=/var/lib \ --sharedstatedir=/usr/com \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --without-included-gettext --with-debug=yes .........
*** Bug 6963 has been marked as a duplicate of this bug. ***