mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
FIX BUG-2123306 - Added support for optional compiling of NetSSL and Data, including control of which data components (ODBC, MySQL, SQLite)
Added --help configuration additions FIX MinGW build support for Data component Corrected link order of Poco components for data samples resulting in unresolved symbol errors
This commit is contained in:
parent
6ca0056f79
commit
0f2fa0aae6
@ -12,6 +12,6 @@ objects = Binding
|
||||
|
||||
target = Binding
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation PocoData PocoSQLite
|
||||
target_libs = PocoSQLite PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -12,6 +12,6 @@ objects = RecordSet
|
||||
|
||||
target = RecordSet
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation PocoData PocoSQLite
|
||||
target_libs = PocoSQLite PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -12,6 +12,6 @@ objects = RowFormatter
|
||||
|
||||
target = RowFormatter
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation PocoData PocoSQLite
|
||||
target_libs = PocoSQLite PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -12,6 +12,6 @@ objects = Tuple
|
||||
|
||||
target = Tuple
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation PocoData PocoSQLite
|
||||
target_libs = PocoSQLite PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -12,6 +12,6 @@ objects = TypeHandler
|
||||
|
||||
target = TypeHandler
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation PocoData PocoSQLite
|
||||
target_libs = PocoSQLite PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
110
Makefile
110
Makefile
@ -15,37 +15,42 @@ ifndef POCO_PREFIX
|
||||
export POCO_PREFIX=/usr/local
|
||||
endif
|
||||
|
||||
.PHONY: all libexecs cppunit tests samples install
|
||||
ifndef POCO_BUILD
|
||||
export POCO_BUILD=$(POCO_BASE)
|
||||
endif
|
||||
|
||||
.PHONY: all libexecs cppunit tests samples clean distclean install
|
||||
|
||||
all: libexecs tests samples
|
||||
|
||||
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
|
||||
COMPONENTS = Foundation XML Util Net NetSSL_OpenSSL
|
||||
COMPONENTS = Foundation XML Util Net NetSSL_OpenSSL Data Data/SQLite Data/ODBC
|
||||
|
||||
cppunit:
|
||||
$(MAKE) -C $(POCO_BASE)/CppUnit
|
||||
|
||||
install: libexecs
|
||||
mkdir -p $(INSTALLDIR)/include/Poco
|
||||
mkdir -p $(INSTALLDIR)/lib
|
||||
mkdir -p $(INSTALLDIR)/bin
|
||||
install -d $(INSTALLDIR)/include/Poco
|
||||
install -d $(INSTALLDIR)/lib
|
||||
install -d $(INSTALLDIR)/bin
|
||||
for comp in $(COMPONENTS) ; do \
|
||||
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
|
||||
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
|
||||
fi ; \
|
||||
if [ -d "$(POCO_BASE)/$$comp/bin" ] ; then \
|
||||
find $(POCO_BASE)/$$comp/bin -perm -700 -type f -exec cp -Rf {} $(INSTALLDIR)/bin \; ; \
|
||||
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
|
||||
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec install {} $(INSTALLDIR)/bin \; ; \
|
||||
fi ; \
|
||||
done
|
||||
find $(POCO_BASE)/lib -name "libPoco*" -exec cp -Rf {} $(INSTALLDIR)/lib \;
|
||||
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec install {} $(INSTALLDIR)/lib \;
|
||||
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
|
||||
|
||||
.PHONY: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec
|
||||
.PHONY: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests
|
||||
.PHONY: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples
|
||||
.PHONY: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
|
||||
.PHONY: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
|
||||
.PHONY: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
|
||||
|
||||
libexecs: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec
|
||||
tests: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests
|
||||
samples: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples
|
||||
libexecs: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
|
||||
tests: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
|
||||
samples: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
|
||||
|
||||
Foundation-libexec:
|
||||
$(MAKE) -C $(POCO_BASE)/Foundation
|
||||
@ -83,6 +88,7 @@ Net-tests: Net-libexec cppunit
|
||||
Net-samples: Net-libexec Foundation-libexec XML-libexec Util-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Net/samples
|
||||
|
||||
ifeq ($(POCO_NETSSL_SUPPORT),enable)
|
||||
NetSSL_OpenSSL-libexec: Foundation-libexec Net-libexec Util-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL
|
||||
|
||||
@ -91,3 +97,79 @@ NetSSL_OpenSSL-tests: NetSSL_OpenSSL-libexec cppunit
|
||||
|
||||
NetSSL_OpenSSL-samples: NetSSL_OpenSSL-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/samples
|
||||
else
|
||||
#no NetSSL support
|
||||
endif
|
||||
|
||||
ifeq ($(POCO_DATA_SUPPORT),enable)
|
||||
Data-libexec: Foundation-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Data
|
||||
|
||||
Data-tests: Data-libexec cppunit
|
||||
$(MAKE) -C $(POCO_BASE)/Data/testsuite
|
||||
|
||||
Data-samples: Data-libexec Data-libexec Data/SQLite-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Data/samples
|
||||
|
||||
ifeq ($(POCO_DATA_SQLITE_SUPPORT), enable)
|
||||
Data/SQLite-libexec: Foundation-libexec Data-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Data/SQLite
|
||||
|
||||
Data/SQLite-tests: Data/SQLite-libexec cppunit
|
||||
$(MAKE) -C $(POCO_BASE)/Data/SQLite/testsuite
|
||||
else
|
||||
#no SQLite support
|
||||
endif
|
||||
|
||||
ifeq ($(POCO_DATA_ODBC_SUPPORT), enable)
|
||||
Data/ODBC-libexec: Foundation-libexec Data-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Data/ODBC
|
||||
|
||||
Data/ODBC-tests: Data/ODBC-libexec cppunit
|
||||
$(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite
|
||||
else
|
||||
#no ODBC support
|
||||
endif
|
||||
|
||||
ifeq ($(POCO_DATA_MYSQL_SUPPORT), enable)
|
||||
Data/MySQL-libexec: Foundation-libexec Data-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Data/MySQL
|
||||
|
||||
Data/MySQL-tests: Data/ODBC-libexec cppunit
|
||||
$(MAKE) -C $(POCO_BASE)/Data/MySQL/testsuite
|
||||
else
|
||||
#no MySQL support
|
||||
endif
|
||||
else
|
||||
#no Data support
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(POCO_BASE)/Foundation clean
|
||||
$(MAKE) -C $(POCO_BASE)/Foundation/testsuite clean
|
||||
$(MAKE) -C $(POCO_BASE)/Foundation/samples clean
|
||||
$(MAKE) -C $(POCO_BASE)/XML clean
|
||||
$(MAKE) -C $(POCO_BASE)/XML/testsuite clean
|
||||
$(MAKE) -C $(POCO_BASE)/XML/samples clean
|
||||
$(MAKE) -C $(POCO_BASE)/Util clean
|
||||
$(MAKE) -C $(POCO_BASE)/Util/testsuite clean
|
||||
$(MAKE) -C $(POCO_BASE)/Util/samples clean
|
||||
$(MAKE) -C $(POCO_BASE)/Net clean
|
||||
$(MAKE) -C $(POCO_BASE)/Net/testsuite clean
|
||||
$(MAKE) -C $(POCO_BASE)/Net/samples clean
|
||||
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL clean
|
||||
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/testsuite clean
|
||||
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/samples clean
|
||||
$(MAKE) -C $(POCO_BASE)/Data clean
|
||||
$(MAKE) -C $(POCO_BASE)/Data/testsuite clean
|
||||
$(MAKE) -C $(POCO_BASE)/Data/samples clean
|
||||
$(MAKE) -C $(POCO_BASE)/Data/SQLite clean
|
||||
$(MAKE) -C $(POCO_BASE)/Data/SQLite/testsuite clean
|
||||
$(MAKE) -C $(POCO_BASE)/Data/ODBC clean
|
||||
$(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite clean
|
||||
|
||||
distclean:
|
||||
rm -rf $(POCO_BUILD)/lib
|
||||
find $(POCO_BUILD) -name obj -type d -print0 | xargs -0 rm -rf
|
||||
find $(POCO_BUILD) -name .dep -type d -print0 | xargs -0 rm -rf
|
||||
find $(POCO_BUILD) -name bin -type d -print0 | xargs -0 rm -rf
|
||||
|
@ -66,7 +66,7 @@ RELEASEOPT_LINK = -O2
|
||||
#
|
||||
# System Specific Flags
|
||||
#
|
||||
SYSFLAGS = -mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED -I/usr/local/include -I/usr/include
|
||||
SYSFLAGS = -mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED -I/usr/local/include -I/usr/include
|
||||
|
||||
#
|
||||
# System Specific Libraries
|
||||
|
53
configure
vendored
53
configure
vendored
@ -53,6 +53,21 @@ Options:
|
||||
Useful if your C++ compiler has incomplete floating-point support
|
||||
(such as uclibc-based systems).
|
||||
|
||||
--disable-NetSSL
|
||||
Do not build NetSSL support
|
||||
|
||||
--disable-Data
|
||||
Do not build Data support
|
||||
|
||||
--disable-ODBC
|
||||
Do not build Data/ODBC support
|
||||
|
||||
--disable-SQLite
|
||||
Do not build Data/SQLite support
|
||||
|
||||
--disable-MySQL
|
||||
Do not build Data/MySQL support
|
||||
|
||||
ENDHELP
|
||||
}
|
||||
# save cwd
|
||||
@ -65,6 +80,11 @@ cd $build
|
||||
tests="tests"
|
||||
samples="samples"
|
||||
flags=""
|
||||
poco_netssl_support="enable"
|
||||
poco_data_support="enable"
|
||||
poco_data_odbc_support="enable"
|
||||
poco_data_sqlite_support="enable"
|
||||
poco_data_mysql_support="enable"
|
||||
# parse arguments
|
||||
while [ "$1" != "" ] ; do
|
||||
val=`expr $1 : '--config=\(.*\)'`
|
||||
@ -98,6 +118,29 @@ while [ "$1" != "" ] ; do
|
||||
flags="$flags -DPOCO_NO_FPENVIRONMENT"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-NetSSL" ] ; then
|
||||
poco_netssl_support="disable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-Data" ] ; then
|
||||
poco_data_support="disable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-ODBC" ] ; then
|
||||
poco_data_odbc_support="disable"
|
||||
poco_data_support="enable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-SQLite" ] ; then
|
||||
poco_data_sqlite_support="disable"
|
||||
poco_data_support="enable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-MySQL" ] ; then
|
||||
poco_data_mysql_support="disable"
|
||||
poco_data_support="enable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--help" ] ; then
|
||||
showhelp
|
||||
exit 0
|
||||
@ -147,6 +190,11 @@ echo "POCO_BASE = $base" >>$build/config.make
|
||||
echo "POCO_BUILD = $build" >>$build/config.make
|
||||
echo "POCO_PREFIX = $prefix" >>$build/config.make
|
||||
echo "POCO_FLAGS = $flags" >>$build/config.make
|
||||
echo "POCO_NETSSL_SUPPORT = $poco_netssl_support" >>$build/config.make
|
||||
echo "POCO_DATA_SUPPORT = $poco_data_support" >>$build/config.make
|
||||
echo "POCO_DATA_ODBC_SUPPORT = $poco_data_odbc_support" >>$build/config.make
|
||||
echo "POCO_DATA_SQLITE_SUPPORT = $poco_data_sqlite_support" >>$build/config.make
|
||||
echo "POCO_DATA_MYSQL_SUPPORT = $poco_data_mysql_support" >>$build/config.make
|
||||
if [ "$stdcxx_base" != "" ] ; then
|
||||
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
|
||||
fi
|
||||
@ -156,6 +204,11 @@ echo "export POCO_BASE" >>$build/config.make
|
||||
echo "export POCO_BUILD" >>$build/config.make
|
||||
echo "export POCO_PREFIX" >>$build/config.make
|
||||
echo "export POCO_FLAGS" >>$build/config.make
|
||||
echo "export POCO_NETSSL_SUPPORT = $poco_netssl_support" >>$build/config.make
|
||||
echo "export POCO_DATA_SUPPORT = $poco_data_support" >>$build/config.make
|
||||
echo "export POCO_DATA_ODBC_SUPPORT = $poco_data_odbc_support" >>$build/config.make
|
||||
echo "export POCO_DATA_SQLITE_SUPPORT = $poco_data_sqlite_support" >>$build/config.make
|
||||
echo "export POCO_DATA_MYSQL_SUPPORT = $poco_data_mysql_support" >>$build/config.make
|
||||
if [ "$stdcxx_base" != "" ] ; then
|
||||
echo "export STDCXX_BASE" >>$build/config.make
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user