3 # Copyright 2009 Yorba Foundation
5 # This software is licensed under the GNU LGPL (version 2.1 or later).
6 # See the COPYING file in this distribution.
12 printf "\t./configure [OPTIONS]...\n"
15 printf "\t-h, --help\t\tPrint this help and exit.\n"
16 printf "\t--assume-pkgs\t\tTurn off package version checking.\n"
17 printf "\t--build=DIR\t\tBuild secondary files in DIR.\n"
18 printf "\t--debug | --release\tBuild executable for debugging or release.\n"
19 printf "\t\t\t\t[--release]\n"
20 printf "\t--define=SYMBOL\t\tDefine a symbol for the Vala compiler.\n"
25 printf "%s: Invalid argument %s\n" $0 $1
32 option=`echo $1 | sed 's/=.*//'`
33 if [ `echo $1 | grep '='` ]
35 value=`echo $1 | sed 's/.*=//'`
39 -h | --help) configure_help
43 --assume-pkgs) variables="${variables}ASSUME_PKGS=1\n"
46 --build) if [ ! $value ]
51 variables="${variables}BUILD_DIR=$value\n"
52 variables="${variables}MARINA_VAPI=../marina/$value/marina.vapi\n"
55 --debug) variables="${variables}BUILD_RELEASE=\nBUILD_DEBUG=1\n"
58 --release) variables="${variables}BUILD_DEBUG=\nBUILD_RELEASE=1\n"
61 --define) variables="${variables}USER_VALAFLAGS+=--define=$value\n"
70 variables="${variables}${option}=${value}\n"
80 echo -e -n $variables > $CONFIG_IN
82 echo "CONFIG_IN=../../${CONFIG_IN}" >> $CONFIG_IN
84 printf "Configured. Type 'make' to build\n"