diff --git a/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec b/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec
index e4dd607..2260c27 100644
--- a/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec
+++ b/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec
@@ -5,6 +5,10 @@
 %global pgpackageversion 9.6
 %global pginstdir /usr/pgsql-%{pgpackageversion}
 
+# use IBM Advanced Toolchain per default
+%ifarch ppc64 ppc64le
+%{!?ibmpower:%global ibmpower 1}
+%endif
 
 %global beta 0
 %{?beta:%global __os_install_post /usr/lib/rpm/brp-compress}
@@ -54,7 +58,7 @@
 %{!?selinux:%global selinux 0}
 %else
 %{!?systemd_enabled:%global systemd_enabled 1}
-%ifarch ppc64 ppc64le
+%if %ibmpower
 %{!?sdt:%global sdt 0}
 %else
 %{!?sdt:%global sdt 1}
@@ -65,7 +69,7 @@
 %global _hardened_build 1
 %endif
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 # Define the AT version and path.
 %global atstring	at10.0
 %global atpath		/opt/%{atstring}
@@ -109,7 +113,7 @@ Patch6:		%{sname}-%{pgmajorversion}-perl-rpath.patch
 BuildRequires:	perl glibc-devel bison flex >= 2.5.31
 BuildRequires:	perl(ExtUtils::MakeMaker)
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 BuildRequires:	advance-toolchain-%{atstring}-devel
 %endif
 
@@ -142,7 +146,7 @@ BuildRequires:	zlib-devel >= 1.0.4
 %if %ssl
 # We depend un the SSL libraries provided by Advance Toolchain on PPC,
 # so use openssl-devel only on other platforms:
-%ifnarch ppc64 ppc64le
+%if 0%{?ibmpower}
 BuildRequires:	openssl-devel
 %endif
 %endif
@@ -229,7 +233,7 @@ Requires(postun):	%{_sbindir}/update-alternatives
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Provides:	postgresql
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -252,7 +256,7 @@ Summary:	The shared libraries required for any PostgreSQL clients
 Group:		Applications/Databases
 Provides:	postgresql-libs = %{pgpackageversion}
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -289,7 +293,7 @@ Requires:	/usr/sbin/useradd, /sbin/chkconfig
 %endif
 Provides:	postgresql-server
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -319,7 +323,7 @@ Requires:	%{name}%{?_isa} = %{version}-%{release}
 Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
 Provides:	postgresql-contrib
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -358,13 +362,13 @@ Summary:	The Perl procedural language for PostgreSQL
 Group:		Applications/Databases
 Requires:	%{name}-server%{?_isa} = %{version}-%{release}
 Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-%ifarch ppc ppc64
+%if %ibmpower
 BuildRequires:	perl-devel
 %endif
 Obsoletes:	postgresql%{pgmajorversion}-pl
 Provides:	postgresql-plperl
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -385,7 +389,7 @@ Requires:	%{name}-server%{?_isa} = %{version}-%{release}
 Obsoletes:	%{name}-pl
 Provides:	postgresql-plpython
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -406,7 +410,7 @@ Requires:	%{name}-server%{?_isa} = %{version}-%{release}
 Obsoletes:	%{name}-pl
 Provides:	postgresql-plpython3
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -428,7 +432,7 @@ Requires:	tcl
 Obsoletes:	%{name}-pl
 Provides:	postgresql-pltcl
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -447,7 +451,7 @@ Requires:	%{name}-server%{?_isa} = %{version}-%{release}
 Requires:	%{name}-devel%{?_isa} = %{version}-%{release}
 Provides:	postgresql-test
 
-%ifarch ppc64 ppc64le
+%if %ibmpower
 AutoReq:	0
 Requires:	advance-toolchain-%{atstring}-runtime
 %endif
@@ -482,7 +486,7 @@ benchmarks.
 %endif
 
 CFLAGS="${CFLAGS:-%optflags}"
-%ifarch ppc64 ppc64le
+%if %ibmpower
 	CFLAGS="${CFLAGS} $(echo %{__global_cflags} | sed 's/-O2/-O3/g') -m64 -mcpu=power8 -mtune=power8 -I%{atpath}/include"
 	CXXFLAGS="${CXXFLAGS} $(echo %{__global_cflags} | sed 's/-O2/-O3/g') -m64 -mcpu=power8 -mtune=power8 -I%{atpath}/include"
 	LDFLAGS="-L%{atpath}/%{_lib}"
@@ -571,7 +575,7 @@ export PYTHON=/usr/bin/python3
 %if %{systemd_enabled}
 	--with-systemd \
 %endif
-%ifarch ppc64 ppc64le
+%if %ibmpower
 	--with-includes=%{atpath}/include \
 	--with-libraries=%{atpath}/lib64 \
 %endif
@@ -662,7 +666,7 @@ unset PYTHON
 %if %{systemd_enabled}
 	--with-systemd \
 %endif
-%ifarch ppc64 ppc64le
+%if %ibmpower
 	--with-includes=%{atpath}/include \
 	--with-libraries=%{atpath}/lib64 \
 %endif
