diff --git a/Data/ODBC/Makefile b/Data/ODBC/Makefile index 0c9fcd4fd..6e63cc4b9 100644 --- a/Data/ODBC/Makefile +++ b/Data/ODBC/Makefile @@ -8,10 +8,12 @@ include $(POCO_BASE)/build/rules/global -ifeq ($(OSNAME),Darwin) +ifeq (0, $(shell test -e /usr/lib/libodbc.so; echo $$?)) +SYSLIBS += -lodbc -lodbcinst +else ifeq (0, $(shell test -e /usr/lib/libiodbc.so; echo $$?)) SYSLIBS += -liodbc -liodbcinst else -SYSLIBS += -lodbc -lodbcinst +$(error No ODBC library found. Please install unixODBC or iODBC and try again) endif objects = Binder ConnectionHandle DataTypes EnvironmentHandle \ diff --git a/Data/ODBC/testsuite/Makefile b/Data/ODBC/testsuite/Makefile index f3f3ed643..714c3d973 100644 --- a/Data/ODBC/testsuite/Makefile +++ b/Data/ODBC/testsuite/Makefile @@ -8,10 +8,12 @@ include $(POCO_BASE)/build/rules/global -ifeq ($(OSNAME),Darwin) +ifeq (0, $(shell test -e /usr/lib/libodbc.so; echo $$?)) +SYSLIBS += -lodbc -lodbcinst +else ifeq (0, $(shell test -e /usr/lib/libiodbc.so; echo $$?)) SYSLIBS += -liodbc -liodbcinst else -SYSLIBS += -lodbc -lodbcinst +$(error No ODBC library found. Please install unixODBC or iODBC and try again) endif objects = ODBCTestSuite Driver \