|
@@ -9,6 +9,19 @@ NAME=db_postgres.so
|
|
|
# the autodetection
|
|
|
# CROSS_COMPILE=true
|
|
|
|
|
|
+ifeq ($(CROSS_COMPILE),)
|
|
|
+LIBPQL_BUILDER = $(shell \
|
|
|
+ if pkg-config --exists libpq; then \
|
|
|
+ echo 'pkg-config libpq'; \
|
|
|
+ fi)
|
|
|
+ifneq ($(LIBPQ_BUILDER),)
|
|
|
+ DEFS += $(shell $(LIBPQL_BUILDER) --cflags)
|
|
|
+ LIBS += $(shell $(LIBPQL_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
|
|
|
+
|
|
|
SERLIBPATH=../../lib
|
|
|
SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
|
|
|
|