Kludge to remove -lpam from LIBS in Makefiles.

Per Issue #7 from armanddp, it seems the RHEL/CentOS packages
of Postgres are built against libpam, which shows up in
the LIBS reported by pg_config. We don't actually need to
link in libpam for pg_repack, so manually remove it from
our LIBS. This helps a little bit for building on
RHEL/CentOS, though the issue of libpgport.a missing
on that platform still looms.
This commit is contained in:
Josh Kupershmidt 2013-05-23 20:31:56 -04:00
parent 95ce24c2a0
commit 9c8d519415
2 changed files with 8 additions and 3 deletions

View File

@ -30,7 +30,9 @@ PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
# remove dependency to libxml2 and libxslt
# remove dependency on libxml2, libxslt, and libpam.
# XXX: find a better way to make sure we are linking with libraries
# from pg_config which we actually need.
LIBS := $(filter-out -lxml2, $(LIBS))
LIBS := $(filter-out -lxslt, $(LIBS))
LIBS := $(filter-out -lpam, $(LIBS))

View File

@ -35,9 +35,12 @@ USE_PGXS = 1
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
# remove dependency to libxml2 and libxslt
# remove dependency on libxml2, libxslt, and libpam.
# XXX: find a better way to make sure we are linking with libraries
# from pg_config which we actually need.
LIBS := $(filter-out -lxml2, $(LIBS))
LIBS := $(filter-out -lxslt, $(LIBS))
LIBS := $(filter-out -lpam, $(LIBS))
pg_repack.sql: pg_repack.sql.in
echo "BEGIN;\n" > $@; \