mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-11 02:00:47 +02:00
Linux 64-bit and static build fixes (only Ubuntu build tested)
This commit is contained in:
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
SYSLIBS += -lssl -lcrypto
|
# Note: linking order is important, do not change it.
|
||||||
|
SYSLIBS += -lssl -lcrypto -lz -ldl
|
||||||
|
|
||||||
objects = genrsakey
|
objects = genrsakey
|
||||||
|
|
||||||
|
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
SYSLIBS += -lssl -lcrypto
|
# Note: linking order is important, do not change it.
|
||||||
|
SYSLIBS += -lssl -lcrypto -lz -ldl
|
||||||
|
|
||||||
objects = CryptoTestSuite Driver \
|
objects = CryptoTestSuite Driver \
|
||||||
CryptoTest RSATest
|
CryptoTest RSATest
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
SYSLIBS += -L/usr/local/lib/mysql -L/usr/lib/mysql -L/usr/mysql/lib/mysql
|
SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient
|
||||||
INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql/ -I/usr/mysql/include/mysql
|
INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql/ -I/usr/mysql/include/mysql
|
||||||
SYSFLAGS += -DTHREADSAFE -DNO_TCL
|
SYSFLAGS += -DTHREADSAFE -DNO_TCL
|
||||||
|
|
||||||
|
@@ -9,7 +9,9 @@
|
|||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
INCLUDE += -I./../include -I/usr/local/include/mysql -I/usr/include/mysql/ -I/usr/mysql/include/mysql
|
INCLUDE += -I./../include -I/usr/local/include/mysql -I/usr/include/mysql/ -I/usr/mysql/include/mysql
|
||||||
SYSLIBS += -L/usr/local/lib/mysql -L/usr/lib/mysql -L/usr/mysql/lib/mysql -lmysqlclient -lz
|
|
||||||
|
# Note: linking order is important, do not change it.
|
||||||
|
SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient -lz -lpthread -ldl
|
||||||
|
|
||||||
objects = MySQLTestSuite Driver MySQLTest SQLExecutor
|
objects = MySQLTestSuite Driver MySQLTest SQLExecutor
|
||||||
|
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
# adjust for the target system (usually '/usr/lib' or '/usr/local/lib')
|
# adjust for the target system (usually '/usr/lib' or '/usr/local/lib')
|
||||||
ODBCLIBDIR = /usr/lib
|
ODBCLIBDIR = /usr/lib$(LIB64SUFFIX)
|
||||||
|
|
||||||
INCLUDE += -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
|
INCLUDE += -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
|
||||||
SYSLIBS += -L/usr/local/lib/odbc -L/usr/lib/odbc -L/usr/lib -L/usr/local/lib
|
SYSLIBS += -L/usr/lib$(LIB64SUFFIX) -L/usr/local/lib$(LIB64SUFFIX) -L/usr/lib$(LIB64SUFFIX)/odbc -L/usr/local/lib$(LIB64SUFFIX)/odbc
|
||||||
|
|
||||||
ifeq ($(POCO_CONFIG),MinGW)
|
ifeq ($(POCO_CONFIG),MinGW)
|
||||||
# -DODBCVER=0x0300: SQLHandle declaration issue
|
# -DODBCVER=0x0300: SQLHandle declaration issue
|
||||||
|
@@ -14,6 +14,12 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
# adjust for the target system (usually '/usr/lib' or '/usr/local/lib')
|
||||||
|
ODBCLIBDIR = /usr/lib$(LIB64SUFFIX)
|
||||||
|
|
||||||
|
INCLUDE += -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
|
||||||
|
SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/odbc -L/usr/lib$(LIB64SUFFIX)/odbc -L/usr/lib$(LIB64SUFFIX) -L/usr/local/lib$(LIB64SUFFIX)
|
||||||
|
|
||||||
ifeq ($(POCO_CONFIG),MinGW)
|
ifeq ($(POCO_CONFIG),MinGW)
|
||||||
# Lack of unixODBC or iODBC is not an error for MinGW platform since it uses Windows odbc32.lib
|
# Lack of unixODBC or iODBC is not an error for MinGW platform since it uses Windows odbc32.lib
|
||||||
else
|
else
|
||||||
@@ -30,6 +36,12 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
###########################################################################################################
|
||||||
|
# Note: #
|
||||||
|
# Do not change linking order or move this line up, these libs have to be linked in this order and last. #
|
||||||
|
###########################################################################################################
|
||||||
|
SYSLIBS += -lltdl -ldl
|
||||||
|
|
||||||
objects = ODBCTestSuite Driver \
|
objects = ODBCTestSuite Driver \
|
||||||
ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \
|
ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \
|
||||||
ODBCSQLiteTest ODBCSQLServerTest ODBCTest SQLExecutor
|
ODBCSQLiteTest ODBCSQLServerTest ODBCTest SQLExecutor
|
||||||
|
@@ -12,6 +12,6 @@ objects = Driver JSONTest JSONTestSuite
|
|||||||
|
|
||||||
target = testrunner
|
target = testrunner
|
||||||
target_version = 1
|
target_version = 1
|
||||||
target_libs = PocoFoundation PocoJSON CppUnit
|
target_libs = PocoJSON PocoFoundation CppUnit
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/exec
|
include $(POCO_BASE)/build/rules/exec
|
||||||
|
13
Makefile
13
Makefile
@@ -19,6 +19,11 @@ ifndef POCO_BUILD
|
|||||||
export POCO_BUILD=$(POCO_BASE)
|
export POCO_BUILD=$(POCO_BASE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# if we've built both static and shared, install shared
|
||||||
|
ifeq ($(LINKMODE),BOTH)
|
||||||
|
SHAREDONLY='(' -name static -prune ')' -o
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: all libexecs cppunit tests samples clean distclean install
|
.PHONY: all libexecs cppunit tests samples clean distclean install
|
||||||
|
|
||||||
all: libexecs tests samples
|
all: libexecs tests samples
|
||||||
@@ -31,18 +36,18 @@ cppunit:
|
|||||||
|
|
||||||
install: libexecs
|
install: libexecs
|
||||||
mkdir -p $(INSTALLDIR)/include/Poco
|
mkdir -p $(INSTALLDIR)/include/Poco
|
||||||
mkdir -p $(INSTALLDIR)/lib
|
mkdir -p $(INSTALLDIR)/lib$(LIB64SUFFIX)
|
||||||
mkdir -p $(INSTALLDIR)/bin
|
mkdir -p $(INSTALLDIR)/bin
|
||||||
for comp in $(COMPONENTS) ; do \
|
for comp in $(COMPONENTS) ; do \
|
||||||
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
|
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
|
||||||
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
|
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
|
||||||
fi ; \
|
fi ; \
|
||||||
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
|
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
|
||||||
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
|
find $(POCO_BUILD)/$$comp/bin $(SHAREDONLY) '(' -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ')' ; \
|
||||||
fi ; \
|
fi ; \
|
||||||
done
|
done
|
||||||
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
|
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib$(LIB64SUFFIX) \;
|
||||||
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
|
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib$(LIB64SUFFIX) \;
|
||||||
|
|
||||||
libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec PDF-libexec CppParser-libexec
|
libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec PDF-libexec CppParser-libexec
|
||||||
tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests Zip-tests PDF-tests CppParser-tests
|
tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests Zip-tests PDF-tests CppParser-tests
|
||||||
|
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
SYSLIBS += -lssl -lcrypto
|
# Note: linking order is important, do not change it.
|
||||||
|
SYSLIBS += -lssl -lcrypto -lz -ldl
|
||||||
|
|
||||||
objects = HTTPSTimeServer
|
objects = HTTPSTimeServer
|
||||||
|
|
||||||
|
@@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
# Note: linking order is important, do not change it.
|
||||||
|
SYSLIBS += -lssl -lcrypto -lz -ldl
|
||||||
|
|
||||||
objects = Mail
|
objects = Mail
|
||||||
|
|
||||||
target = Mail
|
target = Mail
|
||||||
|
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
SYSLIBS += -lssl -lcrypto
|
# Note: linking order is important, do not change it.
|
||||||
|
SYSLIBS += -lssl -lcrypto -lz -ldl
|
||||||
|
|
||||||
objects = download
|
objects = download
|
||||||
|
|
||||||
|
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
SYSLIBS += -lssl -lcrypto
|
# Note: linking order is important, do not change it.
|
||||||
|
SYSLIBS += -lssl -lcrypto -lz -ldl
|
||||||
|
|
||||||
objects = NetSSLTestSuite Driver \
|
objects = NetSSLTestSuite Driver \
|
||||||
HTTPSClientSessionTest HTTPSClientTestSuite HTTPSServerTest HTTPSServerTestSuite \
|
HTTPSClientSessionTest HTTPSClientTestSuite HTTPSServerTest HTTPSServerTestSuite \
|
||||||
|
@@ -12,6 +12,6 @@ objects = Image
|
|||||||
|
|
||||||
target = Image
|
target = Image
|
||||||
target_version = 1
|
target_version = 1
|
||||||
target_libs = PocoFoundation PocoPDF
|
target_libs = PocoPDF PocoFoundation
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/exec
|
include $(POCO_BASE)/build/rules/exec
|
||||||
|
@@ -12,6 +12,6 @@ objects = Text
|
|||||||
|
|
||||||
target = Text
|
target = Text
|
||||||
target_version = 1
|
target_version = 1
|
||||||
target_libs = PocoFoundation PocoPDF
|
target_libs = PocoPDF PocoFoundation
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/exec
|
include $(POCO_BASE)/build/rules/exec
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
# Where to find the PageCompiler executable
|
# Where to find the PageCompiler executable
|
||||||
PAGECOMPILER = $(POCO_BASE)/PageCompiler/bin/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)/cpspc
|
PAGECOMPILER = $(POCO_BASE)/PageCompiler/bin/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)/cpspc$(OSARCH_POSTFIX)
|
||||||
|
|
||||||
objects = HTTPTimeServerApp TimeHandler
|
objects = HTTPTimeServerApp TimeHandler
|
||||||
|
|
||||||
|
@@ -21,6 +21,6 @@ objects = AbstractConfigurationTest ConfigurationTestSuite \
|
|||||||
|
|
||||||
target = testrunner
|
target = testrunner
|
||||||
target_version = 1
|
target_version = 1
|
||||||
target_libs = PocoJSON PocoUtil PocoXML PocoFoundation CppUnit
|
target_libs = PocoUtil PocoXML PocoJSON PocoFoundation CppUnit
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/exec
|
include $(POCO_BASE)/build/rules/exec
|
||||||
|
@@ -116,19 +116,6 @@ endif
|
|||||||
#
|
#
|
||||||
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
||||||
|
|
||||||
#
|
|
||||||
# Check if a 64bit build is requested
|
|
||||||
#
|
|
||||||
ifndef OSARCH_64BITS
|
|
||||||
OSARCH_64BITS = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(OSARCH_64BITS),1)
|
|
||||||
OSARCH_POSTFIX = 64
|
|
||||||
else
|
|
||||||
OSARCH_POSTFIX =
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Determine operating system
|
# Determine operating system
|
||||||
#
|
#
|
||||||
@@ -144,6 +131,37 @@ OSARCH := $(POCO_TARGET_OSARCH)
|
|||||||
endif
|
endif
|
||||||
HOSTNAME := $(shell hostname)
|
HOSTNAME := $(shell hostname)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if a 64bit build is requested
|
||||||
|
#
|
||||||
|
ifndef OSARCH_64BITS
|
||||||
|
OSARCH_64BITS = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OSARCH_64BITS),1)
|
||||||
|
OSARCH_POSTFIX = 64
|
||||||
|
else
|
||||||
|
OSARCH_POSTFIX =
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Detect distro
|
||||||
|
#
|
||||||
|
|
||||||
|
# Fedora, Redhat, Centos.
|
||||||
|
REDHATISH = $(if $(wildcard /etc/redhat-release /etc/centos-release /etc/fedora-release),1)
|
||||||
|
# Debian, Ubuntu
|
||||||
|
DEBIANISH = $(if $(wildcard /etc/debian_version),1)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Adjust suffix for 64-bit lib directory
|
||||||
|
#
|
||||||
|
ifneq ($(REDHATISH),)
|
||||||
|
LIB64SUFFIX = $(if $(filter $(OSARCH),x86_64 sparc64 ppc64),64,)
|
||||||
|
else ifneq ($(DEBIANISH),)
|
||||||
|
LIB64SUFFIX = $(if $(filter $(OSARCH),x86_64 sparc64 ppc64),/x86_64-linux-gnu,)
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Find out current component
|
# Find out current component
|
||||||
#
|
#
|
||||||
|
176
configure
vendored
176
configure
vendored
@@ -100,13 +100,6 @@ build=`pwd`
|
|||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
base=`pwd`
|
base=`pwd`
|
||||||
cd $build
|
cd $build
|
||||||
if [ `uname` = "QNX" ] ; then
|
|
||||||
EXPR=expr
|
|
||||||
NOTFOUND=0
|
|
||||||
else
|
|
||||||
EXPR="expr --"
|
|
||||||
NOTFOUND=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
tests="tests"
|
tests="tests"
|
||||||
samples="samples"
|
samples="samples"
|
||||||
@@ -118,104 +111,84 @@ unbundled=""
|
|||||||
static=""
|
static=""
|
||||||
shared=""
|
shared=""
|
||||||
# parse arguments
|
# parse arguments
|
||||||
while [ "$1" != "" ] ; do
|
while [ $# -ge 1 ]; do
|
||||||
val=`$EXPR "$1" : '--config=\(.*\)'`
|
case "$1" in
|
||||||
if [ "$val" != "$NOTFOUND" ] ; then
|
--config=*)
|
||||||
config=$val
|
config="${1:9}" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
val=`$EXPR "$1" : '--prefix=\(.*\)'`
|
--prefix=*)
|
||||||
if [ "$val" != "$NOTFOUND" ] ; then
|
prefix="${1:9}" ;;
|
||||||
prefix=$val
|
|
||||||
fi
|
|
||||||
|
|
||||||
val=`$EXPR $1 : '--stdcxx-base=\(.*\)'`
|
--stdcxx-base=*)
|
||||||
if [ "$val" != "$NOTFOUND" ] ; then
|
stdcxx_base="${1:14}" ;;
|
||||||
stdcxx_base=$val
|
|
||||||
fi
|
|
||||||
|
|
||||||
val=`$EXPR "$1" : '--omit=\(.*\)'`
|
--omit=*)
|
||||||
if [ "$val" != "$NOTFOUND" ] ; then
|
omit="`echo ${1:7} | tr ',;' ' '`" ;;
|
||||||
omit="$omit `echo $val | tr ',;' ' '`"
|
|
||||||
fi
|
|
||||||
|
|
||||||
val=`$EXPR "$1" : '--include-path=\(.*\)'`
|
--include-path=*)
|
||||||
if [ "$val" != "$NOTFOUND" ] ; then
|
includepath="`echo ${1:15} | tr ',;' ' '`" ;;
|
||||||
includepath="$includepath `echo $val | tr ',;' ' '`"
|
|
||||||
fi
|
|
||||||
|
|
||||||
val=`$EXPR "$1" : '--library-path=\(.*\)'`
|
--library-path=*)
|
||||||
if [ "$val" != "$NOTFOUND" ] ; then
|
librarypath="`echo ${1:15} | tr ',;' ' '`" ;;
|
||||||
librarypath="$librarypath `echo $val | tr ',;' ' '`"
|
|
||||||
fi
|
|
||||||
|
|
||||||
val=`$EXPR "$1" : '--cflags=\(.*\)'`
|
--cflags=*)
|
||||||
if [ "$val" != "$NOTFOUND" ] ; then
|
cflags="${1:9}" ;;
|
||||||
flags="$flags $val"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--no-samples" ] ; then
|
--no-samples)
|
||||||
samples=""
|
samples="" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--no-tests" ] ; then
|
--no-tests)
|
||||||
tests=""
|
tests="" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--no-wstring" ] ; then
|
--no-wstring)
|
||||||
flags="$flags -DPOCO_NO_WSTRING"
|
flags="$flags -DPOCO_NO_WSTRING" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--no-fpenvironment" ] ; then
|
--no-fpevnironment)
|
||||||
flags="$flags -DPOCO_NO_FPENVIRONMENT"
|
flags="$flags -DPOCO_NO_PFENVIRONMENT" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--no-sharedmemory" ] ; then
|
--no-sharedmemory)
|
||||||
flags="$flags -DPOCO_NO_SHAREDMEMORY"
|
flags="$flags -DPOCO_NO_SHAREDMEMORY" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--no-sharedlibs" ] ; then
|
--no-sharedlibs)
|
||||||
flags="$flags -DPOCO_NO_SHAREDLIBS"
|
flags="$flags -DPOCO_NO_SHAREDLIBS" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--poquito" ] ; then
|
--poquito)
|
||||||
flags="$flags -DPOCO_NO_FILECHANNEL -DPOCO_NO_SPLITTERCHANNEL -DPOCO_NO_SYSLOGCHANNEL -DPOCO_UTIL_NO_INIFILECONFIGURATION -DPOCO_UTIL_NO_XMLCONFIGURATION"
|
flags="$flags -DPOCO_NO_FILECHANNEL -DPOCO_NO_SPLITTERCHANNEL -DPOCO_NO_SYSLOGCHANNEL -DPOCO_UTIL_NO_INIFILECONFIGURATION -DPOCO_UTIL_NO_XMLCONFIGURATION" ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--unbundled" ] ; then
|
--unbundled)
|
||||||
flags="$flags -DPOCO_UNBUNDLED"
|
flags="$flags -DPOCO_UNBUNDLED"
|
||||||
unbundled=1
|
unbundled=1
|
||||||
fi
|
;;
|
||||||
|
|
||||||
if [ "$1" = "--static" ] ; then
|
--static)
|
||||||
static=1
|
static=1 ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--shared" ] ; then
|
--shared)
|
||||||
shared=1
|
shared=1 ;;
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "--help" ] ; then
|
--help)
|
||||||
showhelp
|
showhelp
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
showhelp
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# autodetect build environment
|
# autodetect build environment
|
||||||
# ...special cases for CYGWIN or MinGW
|
# ...special cases for CYGWIN or MinGW
|
||||||
if [ "$config" = "" ] ; then
|
if [ "$config" = "" ] ; then
|
||||||
config=`uname`
|
config=`uname`
|
||||||
cyg=`$EXPR $config : '\(CYGWIN\).*'`
|
case "$config" in
|
||||||
if [ "$cyg" = "CYGWIN" ] ; then
|
CYGWIN*)
|
||||||
config=CYGWIN
|
config=CYGWIN ;;
|
||||||
else
|
MINGW*)
|
||||||
ming=`$EXPR $config : '\(MINGW\).*'`
|
config=MinGW ;;
|
||||||
if [ "$ming" = "MINGW" ] ; then
|
esac
|
||||||
config=MinGW
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$base/build/config/$config" ] ; then
|
if [ ! -f "$base/build/config/$config" ] ; then
|
||||||
@@ -226,7 +199,7 @@ if [ ! -f "$base/build/config/$config" ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$prefix" = "" ] ; then
|
if [ -z "$prefix" ] ; then
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -240,11 +213,11 @@ if [ "$base" != "$build" ] ; then
|
|||||||
cp $base/Makefile $build
|
cp $base/Makefile $build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$static" != "" -a "$shared" != "" ] ; then
|
if [ -n "$static" -a -n "$shared" ] ; then
|
||||||
linkmode=BOTH
|
linkmode=BOTH
|
||||||
elif [ "$static" != "" ] ; then
|
elif [ -n "$static" ] ; then
|
||||||
linkmode=STATIC
|
linkmode=STATIC
|
||||||
elif [ "$shared" != "" ] ; then
|
elif [ -n "$shared" ] ; then
|
||||||
linkmode=SHARED
|
linkmode=SHARED
|
||||||
else
|
else
|
||||||
linkmode=""
|
linkmode=""
|
||||||
@@ -258,42 +231,49 @@ echo "POCO_BUILD = $build" >>$build/config.make
|
|||||||
echo "POCO_PREFIX = $prefix" >>$build/config.make
|
echo "POCO_PREFIX = $prefix" >>$build/config.make
|
||||||
echo "POCO_FLAGS = $flags" >>$build/config.make
|
echo "POCO_FLAGS = $flags" >>$build/config.make
|
||||||
echo "OMIT = $omit" >>$build/config.make
|
echo "OMIT = $omit" >>$build/config.make
|
||||||
if [ "$stdcxx_base" != "" ] ; then
|
if [ -n "$stdcxx_base" ] ; then
|
||||||
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
|
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$includepath" != "" ] ; then
|
if [ -n "$includepath" ] ; then
|
||||||
echo "POCO_ADD_INCLUDE = $includepath" >>$build/config.make
|
echo "POCO_ADD_INCLUDE = $includepath" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$librarypath" != "" ] ; then
|
if [ -n "$librarypath" ] ; then
|
||||||
echo "POCO_ADD_LIBRARY = $librarypath" >>$build/config.make
|
echo "POCO_ADD_LIBRARY = $librarypath" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$unbundled" != "" ] ; then
|
if [ -n "$unbundled" ] ; then
|
||||||
echo "POCO_UNBUNDLED = 1" >>$build/config.make
|
echo "POCO_UNBUNDLED = 1" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$linkmode" != "" ] ; then
|
if [ -n "$linkmode" ] ; then
|
||||||
echo "LINKMODE = $linkmode" >>$build/config.make
|
echo "LINKMODE = $linkmode" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
echo "export POCO_CONFIG" >>$build/config.make
|
|
||||||
echo "export POCO_BASE" >>$build/config.make
|
cat <<__EOF__ >>$build/config.make
|
||||||
echo "export POCO_BUILD" >>$build/config.make
|
export POCO_CONFIG
|
||||||
echo "export POCO_PREFIX" >>$build/config.make
|
export POCO_BASE
|
||||||
echo "export POCO_FLAGS" >>$build/config.make
|
export POCO_BUILD
|
||||||
if [ "$stdcxx_base" != "" ] ; then
|
export POCO_PREFIX
|
||||||
|
export POCO_FLAGS
|
||||||
|
__EOF__
|
||||||
|
|
||||||
|
if [ -n "$stdcxx_base" ] ; then
|
||||||
echo "export STDCXX_BASE" >>$build/config.make
|
echo "export STDCXX_BASE" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$includepath" != "" ] ; then
|
if [ -n "$includepath" ] ; then
|
||||||
echo "export POCO_ADD_INCLUDE" >>$build/config.make
|
echo "export POCO_ADD_INCLUDE" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$librarypath" != "" ] ; then
|
if [ -n "$librarypath" ] ; then
|
||||||
echo "export POCO_ADD_LIBRARY" >>$build/config.make
|
echo "export POCO_ADD_LIBRARY" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$unbundled" != "" ] ; then
|
if [ -n "$unbundled" ] ; then
|
||||||
echo "export POCO_UNBUNDLED" >>$build/config.make
|
echo "export POCO_UNBUNDLED" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
if [ "$linkmode" != "" ] ; then
|
if [ -n "$linkmode" ] ; then
|
||||||
echo "export LINKMODE" >>$build/config.make
|
echo "export LINKMODE" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
echo ".PHONY: poco" >>$build/config.make
|
|
||||||
echo "poco: libexecs $tests $samples" >>$build/config.make
|
cat <<__EOF__ >>$build/config.make
|
||||||
|
.PHONY: poco
|
||||||
|
poco: libexecs $tests $samples
|
||||||
|
__EOF__
|
||||||
|
|
||||||
echo "Configured for $config"
|
echo "Configured for $config"
|
||||||
|
Reference in New Issue
Block a user