5
# $Id: //poco/1.2/dist/configure#7 $
7
# Configuration script for POCO.
10
# configure [<options>...]
13
# --config=<config_name>
14
# Use the given build configuration
15
# See $POCO_BASE/build/config for possible configs
17
# --prefix=<install_prefix>
18
# Use the given install directory for make install.
19
# Default is /usr/local
22
# Do not build testsuites.
25
# Do not build samples.
28
# Compile with -DPOCO_NO_WSTRING.
31
# Compile with -DPOCO_NO_FPENVIRONMENT
36
# get directory where we are located
45
while [ "$1" != "" ] ; do
46
val=`expr $1 : '--config=\(.*\)'`
47
if [ "$val" != "" ] ; then
51
val=`expr $1 : '--prefix=\(.*\)'`
52
if [ "$val" != "" ] ; then
56
if [ "$1" = "--no-samples" ] ; then
60
if [ "$1" = "--no-tests" ] ; then
64
if [ "$1" = "--no-wstring" ] ; then
65
flags="$flags -DPOCO_NO_WSTRING"
68
if [ "$1" = "--no-fpenvironment" ] ; then
69
flags="$flags -DPOCO_NO_FPENVIRONMENT"
75
if [ "$config" = "" ] ; then
77
cyg=`expr $config : '\(CYGWIN\).*'`
78
if [ "$cyg" = "CYGWIN" ] ; then
83
if [ ! -f "$base/build/config/$config" ] ; then
84
echo "Unknown configuration: $config"
85
echo "Please use the --config option to specify another build configuration"
89
if [ "$prefix" = "" ] ; then
93
# copy Makefile to build dir
94
if [ "$base" != "$build" ] ; then
95
cp $base/Makefile $build
99
echo '# config.make generated by configure script' >$build/config.make
100
echo "POCO_CONFIG = $config" >>$build/config.make
101
echo "POCO_BASE = $base" >>$build/config.make
102
echo "POCO_BUILD = $build" >>$build/config.make
103
echo "POCO_PREFIX = $prefix" >>$build/config.make
104
echo "POCO_FLAGS = $flags" >>$build/config.make
106
echo "export POCO_CONFIG" >>$build/config.make
107
echo "export POCO_BASE" >>$build/config.make
108
echo "export POCO_BUILD" >>$build/config.make
109
echo "export POCO_PREFIX" >>$build/config.make
110
echo "export POCO_FLAGS" >>$build/config.make
112
echo ".PHONY: poco" >>$build/config.make
113
echo "poco: libexecs $tests $samples" >>$build/config.make
115
echo "Configured for $config"