[sr-dev] git:5.1:547f3dfa: Merge pull request #1925 from sergey-safarov/pg_make

GitHub noreply at github.com
Wed Apr 10 10:54:45 CEST 2019


Module: kamailio
Branch: 5.1
Commit: 547f3dfaa6536f0e768b89844aa287d8de478b77
URL: https://github.com/kamailio/kamailio/commit/547f3dfaa6536f0e768b89844aa287d8de478b77

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2019-04-10T10:54:40+02:00

Merge pull request #1925 from sergey-safarov/pg_make

[5.1] Fixed packaging in opensuse/tumbleweed

---

Modified: src/modules/db_postgres/Makefile

---

Diff:  https://github.com/kamailio/kamailio/commit/547f3dfaa6536f0e768b89844aa287d8de478b77.diff
Patch: https://github.com/kamailio/kamailio/commit/547f3dfaa6536f0e768b89844aa287d8de478b77.patch

---

diff --git a/src/modules/db_postgres/Makefile b/src/modules/db_postgres/Makefile
index d780467f27..26a76d8ebc 100644
--- a/src/modules/db_postgres/Makefile
+++ b/src/modules/db_postgres/Makefile
@@ -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
@@ -27,6 +40,8 @@ else
 		-L$(LOCALBASE)/lib/pgsql -lpq
 endif
 
+endif
+
 #DEFS += -DPG_TEST
 DEFS += -DSER_MOD_INTERFACE
 




More information about the sr-dev mailing list