Skip to content

Commit

Permalink
Merge pull request #1925 from sergey-safarov/pg_make
Browse files Browse the repository at this point in the history
[5.1] Fixed packaging in opensuse/tumbleweed
  • Loading branch information
miconda committed Apr 10, 2019
2 parents 5e7201e + 631ea0b commit 547f3df
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/modules/db_postgres/Makefile
Expand Up @@ -9,6 +9,19 @@ NAME=db_postgres.so
# the autodetection
# CROSS_COMPILE=true

ifeq ($(CROSS_COMPILE),)
LIBPQ_BUILDER = $(shell \
if pkg-config --exists libpq; then \
echo 'pkg-config libpq'; \
fi)
ifneq ($(LIBPQ_BUILDER),)
DEFS += $(shell $(LIBPQ_BUILDER) --cflags)
LIBS += $(shell $(LIBPQ_BUILDER) --libs)
endif
endif

ifeq ($(LIBPQ_BUILDER),)

ifeq ($(CROSS_COMPILE),)
PGCFG=$(shell which pg_config)
endif
Expand All @@ -27,6 +40,8 @@ else
-L$(LOCALBASE)/lib/pgsql -lpq
endif

endif

#DEFS += -DPG_TEST
DEFS += -DSER_MOD_INTERFACE

Expand Down

0 comments on commit 547f3df

Please sign in to comment.