22#
33# configure
44#
5- # $Id: //poco/Main /dist/configure#8 $
5+ # $Id: //poco/1.3 /dist/configure#6 $
66#
77# Configuration script for POCO.
88#
9- # Usage:
10- # configure [<options>...]
11- #
12- # Specify --help to display supported options.
9+ # Invoke configure --help for help.
1310#
1411
15- showhelp ()
12+ showhelp ()
1613{
1714cat << ENDHELP
1815usage: configure {options}
@@ -53,66 +50,51 @@ Options:
5350 Useful if your C++ compiler has incomplete floating-point support
5451 (such as uclibc-based systems).
5552
56- --exclude-XML
57- Disable building of Poco::XML component support
58-
59- --exclude-Util
60- Disable building of Poco::Util component support
61-
62- --exclude-Net
63- Disable building of Poco::Net component support
64-
65- --exclude-NetSSL
66- Disable building of Poco::NetSSL component support
53+ --omit=<component>{,<component>}
54+ Do not build the specified component(s).
6755
68- --exclude-Data
69- Disable building of Poco::Data component support
70-
71- --exclude-ODBC
72- Disable building of Poco::Data::ODBC component support
73-
74- --exclude-SQLite
75- Disable building of Poco::Data::SQLite component support
76-
77- --exclude-MySQL
78- Disable building of Poco::Data::MySQL component support
79-
8056ENDHELP
8157}
58+
8259# save cwd
8360build=` pwd`
8461# get directory where we are located
8562cd ` dirname $0 `
8663base=` pwd`
8764cd $build
65+ if [ ` uname` = " QNX" ] ; then
66+ EXPR=expr
67+ NOTFOUND=0
68+ else
69+ EXPR=" expr --"
70+ NOTFOUND=" "
71+ fi
8872
8973tests=" tests"
9074samples=" samples"
9175flags=" "
92- poco_xml_support=" include"
93- poco_util_support=" include"
94- poco_net_support=" include"
95- poco_netssl_support=" include"
96- poco_data_support=" include"
97- poco_data_odbc_support=" include"
98- poco_data_sqlite_support=" include"
99- poco_data_mysql_support=" include"
76+ omit=" "
10077# parse arguments
10178while [ " $1 " != " " ] ; do
102- val=` expr $1 : ' --config=\(.*\)' `
103- if [ " $val " != " " ] ; then
79+ val=` $EXPR " $1 " : ' --config=\(.*\)' `
80+ if [ " $val " != " $NOTFOUND " ] ; then
10481 config=$val ;
10582 fi
10683
107- val=` expr $1 : ' --prefix=\(.*\)' `
108- if [ " $val " != " " ] ; then
84+ val=` $EXPR " $1 " : ' --prefix=\(.*\)' `
85+ if [ " $val " != " $NOTFOUND " ] ; then
10986 prefix=$val
11087 fi
111-
112- val=` expr $1 : ' --stdcxx-base=\(.*\)' `
113- if [ " $val " != " " ] ; then
88+
89+ val=` $EXPR $1 : ' --stdcxx-base=\(.*\)' `
90+ if [ " $val " != " $NOTFOUND " ] ; then
11491 stdcxx_base=$val
11592 fi
93+
94+ val=` $EXPR " $1 " : ' --omit=\(.*\)' `
95+ if [ " $val " != " $NOTFOUND " ] ; then
96+ omit=" $omit ` echo $val | tr ' ,;' ' ' ` "
97+ fi
11698
11799 if [ " $1 " = " --no-samples" ] ; then
118100 samples=" "
@@ -130,69 +112,35 @@ while [ "$1" != "" ] ; do
130112 flags=" $flags -DPOCO_NO_FPENVIRONMENT"
131113 fi
132114
133- if [ " $1 " = " --exclude-XML" ] ; then
134- poco_xml_support=" exclude"
135- fi
136-
137- if [ " $1 " = " --exclude-Util" ] ; then
138- poco_util_support=" exclude"
139- fi
140-
141- if [ " $1 " = " --exclude-Net" ] ; then
142- poco_net_support=" exclude"
143- fi
144-
145- if [ " $1 " = " --exclude-NetSSL" ] ; then
146- poco_netssl_support=" exclude"
147- fi
148-
149- if [ " $1 " = " --exclude-Data" ] ; then
150- poco_data_support=" exclude"
151- fi
152-
153- if [ " $1 " = " --exclude-ODBC" ] ; then
154- poco_data_odbc_support=" exclude"
155- fi
156-
157- if [ " $1 " = " --exclude-SQLite" ] ; then
158- poco_data_sqlite_support=" exclude"
159- fi
160-
161- if [ " $1 " = " --exclude-MySQL" ] ; then
162- poco_data_mysql_support=" exclude"
163- fi
164-
165115 if [ " $1 " = " --help" ] ; then
166116 showhelp
167117 exit 0
168118 fi
169-
119+
170120 shift
171121done
172122
173123# autodetect build environment
174124# ...special cases for CYGWIN or MinGW
175125if [ " $config " = " " ] ; then
176126 config=` uname`
177- cyg=` expr $config : ' \(CYGWIN\).*' `
127+ cyg=` $EXPR $config : ' \(CYGWIN\).*' `
178128 if [ " $cyg " = " CYGWIN" ] ; then
179129 config=CYGWIN
180130 else
181- ming=` expr $config : ' \(MINGW\).*' `
131+ ming=` $EXPR $config : ' \(MINGW\).*' `
182132 if [ " $ming " = " MINGW" ] ; then
183133 config=MinGW
184134 fi
185135 fi
186136fi
187137
188138if [ ! -f " $base /build/config/$config " ] ; then
189- echo " Unknown configuration: $config "
190- echo " Please use the --config=<config_name> option."
191- echo " The <config_name> can be one of the following:"
192- echo " "
193- echo " ` ls -C $base /build/config/` "
194- echo " "
195- exit 1
139+ echo " Unknown configuration: $config "
140+ echo " Please use the --config option to specify another build configuration"
141+ echo " The following configurations are available:"
142+ ls $base /build/config
143+ exit 1
196144fi
197145
198146if [ " $prefix " = " " ] ; then
@@ -211,14 +159,7 @@ echo "POCO_BASE = $base" >>$build/config.make
211159echo " POCO_BUILD = $build " >> $build /config.make
212160echo " POCO_PREFIX = $prefix " >> $build /config.make
213161echo " POCO_FLAGS = $flags " >> $build /config.make
214- echo " POCO_XML_SUPPORT = $poco_xml_support " >> $build /config.make
215- echo " POCO_NET_SUPPORT = $poco_net_support " >> $build /config.make
216- echo " POCO_UTIL_SUPPORT = $poco_util_support " >> $build /config.make
217- echo " POCO_NETSSL_SUPPORT = $poco_netssl_support " >> $build /config.make
218- echo " POCO_DATA_SUPPORT = $poco_data_support " >> $build /config.make
219- echo " POCO_DATA_ODBC_SUPPORT = $poco_data_odbc_support " >> $build /config.make
220- echo " POCO_DATA_SQLITE_SUPPORT = $poco_data_sqlite_support " >> $build /config.make
221- echo " POCO_DATA_MYSQL_SUPPORT = $poco_data_mysql_support " >> $build /config.make
162+ echo " OMIT = $omit " >> $build /config.make
222163if [ " $stdcxx_base " != " " ] ; then
223164 echo " STDCXX_BASE = $stdcxx_base " >> $build /config.make
224165fi
@@ -228,14 +169,6 @@ echo "export POCO_BASE" >>$build/config.make
228169echo " export POCO_BUILD" >> $build /config.make
229170echo " export POCO_PREFIX" >> $build /config.make
230171echo " export POCO_FLAGS" >> $build /config.make
231- echo " export POCO_XML_SUPPORT" >> $build /config.make
232- echo " export POCO_NET_SUPPORT" >> $build /config.make
233- echo " export POCO_UTIL_SUPPORT" >> $build /config.make
234- echo " export POCO_NETSSL_SUPPORT" >> $build /config.make
235- echo " export POCO_DATA_SUPPORT" >> $build /config.make
236- echo " export POCO_DATA_ODBC_SUPPORT" >> $build /config.make
237- echo " export POCO_DATA_SQLITE_SUPPORT" >> $build /config.make
238- echo " export POCO_DATA_MYSQL_SUPPORT" >> $build /config.make
239172if [ " $stdcxx_base " != " " ] ; then
240173 echo " export STDCXX_BASE" >> $build /config.make
241174fi
0 commit comments