diff --git a/Data/PostgreSQL/Makefile b/Data/PostgreSQL/Makefile index 8e95b8f42..518325476 100644 --- a/Data/PostgreSQL/Makefile +++ b/Data/PostgreSQL/Makefile @@ -6,9 +6,38 @@ include $(POCO_BASE)/build/rules/global -INCLUDE += -I/usr/include/postgresql -I/usr/local/include/postgresql -I/usr/local/postgresql/include -I/opt/postgresql/include +ifeq (0, $(shell test -e /usr/include/postgresql; echo $$?)) +INCLUDE += -I/usr/include/postgresql +endif +ifeq (0, $(shell test -e /usr/local/include/postgresql; echo $$?)) +INCLUDE += -I/usr/local/include/postgresql +endif +ifeq (0, $(shell test -e /usr/local/postgresql/include; echo $$?)) +INCLUDE += -I/usr/local/postgresql/include +endif +ifeq (0, $(shell test -e /opt/postgresql/include; echo $$?)) +INCLUDE += -I/opt/postgresql/include +endif +ifeq (0, $(shell test -e /usr/local/opt/libpq/include; echo $$?)) +INCLUDE += -I/usr/local/opt/libpq/include +endif -SYSLIBS += -L/usr/lib$(LIB64SUFFIX)/postgresql -L/usr/local/lib$(LIB64SUFFIX)/postgresql -L/usr/local/postgresql/lib$(LIB64SUFFIX) -L/opt/postgresql/lib$(LIB64SUFFIX) -lpq +ifeq (0, $(shell test -e /usr/lib$(LIB64SUFFIX)/postgresql; echo $$?)) +SYSLIBS += -L/usr/lib$(LIB64SUFFIX)/postgresql +endif +ifeq (0, $(shell test -e /usr/local/lib$(LIB64SUFFIX)/postgresql; echo $$?)) +SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/postgresql +endif +ifeq (0, $(shell test -e /usr/local/postgresql/lib$(LIB64SUFFIX); echo $$?)) +SYSLIBS += -L/usr/local/postgresql/lib$(LIB64SUFFIX) +endif +ifeq (0, $(shell test -e /opt/postgresql/lib$(LIB64SUFFIX); echo $$?)) +SYSLIBS += -L/opt/postgresql/lib$(LIB64SUFFIX) +endif +ifeq (0, $(shell test -e /opt/postgresql/lib$(LIB64SUFFIX); echo $$?)) +SYSLIBS += -L/opt/postgresql/lib$(LIB64SUFFIX) +endif +SYSLIBS += -lpq objects = Extractor Binder SessionImpl Connector \ PostgreSQLStatementImpl PostgreSQLException \ diff --git a/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Binder.h b/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Binder.h index 3ad3fcc91..6b3aa966a 100644 --- a/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Binder.h +++ b/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Binder.h @@ -213,11 +213,11 @@ public: virtual void bind(std::size_t pos, const std::list