Note we have postgresql-94-pg_config.h in 9.4, and pg_config.h in 9.6.
I suspect this was an unintended change. I can't see where it came from in any recent commits, which is a bit surprising.
There's
Source5: %{sname}-%{pgmajorversion}-pg_config.h
in the redhat master packages for postgresql, but that's fine/normal. Changes in 3a4b12670 on May 10 added unified Makefile for PostgreSQL 9.4, which seems to have changed
Source5: pg_config.h
to Source5: %{sname}-%{pgmajorversion}-pg_config.h
and I'm guessing the problem got introduced there somehow.
I suspect the issue is that the 9.4 spec rpm/redhat/9.4/postgresql/master/postgresql-9.4.spec has