test/configure

changeset 47
78ee95836412
parent 34
4486849e6a6c
child 51
5c12e9e29733
equal deleted inserted replaced
46:096f3105b3b1 47:78ee95836412
29 fi 29 fi
30 touch "$TEMP_DIR/options" 30 touch "$TEMP_DIR/options"
31 touch "$TEMP_DIR/features" 31 touch "$TEMP_DIR/features"
32 32
33 # features 33 # features
34 FEATURE_PG=auto
34 35
35 # help text 36 # help text
36 printhelp() 37 printhelp()
37 { 38 {
38 echo "Usage: $0 [OPTIONS]..." 39 echo "Usage: $0 [OPTIONS]..."
55 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 56 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
56 --infodir=DIR info documentation [DATAROOTDIR/info] 57 --infodir=DIR info documentation [DATAROOTDIR/info]
57 --mandir=DIR man documentation [DATAROOTDIR/man] 58 --mandir=DIR man documentation [DATAROOTDIR/man]
58 59
59 Optional Features: 60 Optional Features:
60 --enable-pg 61 --disable-pg
61 62
62 __EOF__ 63 __EOF__
63 } 64 }
64 65
65 # 66 #
218 # Toolchain detection 219 # Toolchain detection
219 # this will insert make vars to config.mk 220 # this will insert make vars to config.mk
220 . make/toolchain.sh 221 . make/toolchain.sh
221 222
222 # add user specified flags to config.mk 223 # add user specified flags to config.mk
223 echo >> "$TEMP_DIR/config.mk" 224 echo "# project specific flags" >> "$TEMP_DIR/config.mk"
224 if [ -n "${ENV_CFLAGS}" ]; then 225 if [ -n "${ENV_CFLAGS}" ]; then
225 echo "CFLAGS += $ENV_CFLAGS" >> "$TEMP_DIR/config.mk" 226 echo "CFLAGS += $ENV_CFLAGS" >> "$TEMP_DIR/config.mk"
226 fi 227 fi
227 if [ -n "${ENV_CXXFLAGS}" ]; then 228 if [ -n "${ENV_CXXFLAGS}" ]; then
228 echo "CXXFLAGS += $ENV_CXXFLAGS" >> "$TEMP_DIR/config.mk" 229 echo "CXXFLAGS += $ENV_CXXFLAGS" >> "$TEMP_DIR/config.mk"
236 # 237 #
237 238
238 dependency_libpq() 239 dependency_libpq()
239 { 240 {
240 printf "checking for libpq... " 241 printf "checking for libpq... "
241 # dependency libpq 242 # dependency libpq
242 while true 243 while true
243 do 244 do
244 if [ -z "$PKG_CONFIG" ]; then 245 if [ -z "$PKG_CONFIG" ]; then
245 break 246 break
246 fi 247 fi
258 return 1 259 return 1
259 } 260 }
260 dependency_openssl() 261 dependency_openssl()
261 { 262 {
262 printf "checking for openssl... " 263 printf "checking for openssl... "
263 # dependency openssl 264 # dependency openssl
264 while true 265 while true
265 do 266 do
266 if [ -z "$PKG_CONFIG" ]; then 267 if [ -z "$PKG_CONFIG" ]; then
267 break 268 break
268 fi 269 fi
313 fi 314 fi
314 echo yes 315 echo yes
315 return 0 316 return 0
316 done 317 done
317 318
318 # dependency libxml2 319 # dependency libxml2
319 while true 320 while true
320 do 321 do
321 if [ -z "$PKG_CONFIG" ]; then 322 if [ -z "$PKG_CONFIG" ]; then
322 break 323 break
323 fi 324 fi
398 if [ $? -ne 0 ]; then 399 if [ $? -ne 0 ]; then
399 # "auto" features can fail and are just disabled in this case 400 # "auto" features can fail and are just disabled in this case
400 if [ "$FEATURE_PG" != "auto" ]; then 401 if [ "$FEATURE_PG" != "auto" ]; then
401 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " 402 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq "
402 ERROR=1 403 ERROR=1
404 else
405 unset FEATURE_PG
403 fi 406 fi
404 fi 407 fi
405 fi 408 fi
406 409
407 410
427 echo "configure finished" 430 echo "configure finished"
428 echo 431 echo
429 echo "Build Config:" 432 echo "Build Config:"
430 echo " PREFIX: $PREFIX" 433 echo " PREFIX: $PREFIX"
431 echo " TOOLCHAIN: $TOOLCHAIN_NAME" 434 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
435 echo "Features:"
436 if [ -n "$FEATURE_PG" ]; then
437 echo " pg: on"
438 else
439 echo " pg: off"
440 fi
432 echo 441 echo
433 cat "$TEMP_DIR/config.mk" "$TEMP_DIR/make.mk" > config.mk 442 cat "$TEMP_DIR/config.mk" "$TEMP_DIR/make.mk" > config.mk
434 rm -Rf "$TEMP_DIR" 443 rm -Rf "$TEMP_DIR"
435 444
436 445

mercurial