8 PREFIX_BIN
=${PREFIX}/bin
9 PREFIX_LIB
=${PREFIX}/lib
/tuxanci
10 PREFIX_DATA
=${PREFIX}/share
/tuxanci
11 PREFIX_DOC
=${PREFIX}/share
/doc
/tuxanci-
${VERSION}
13 PREFIX_LOCALE
=${PREFIX}/share
/locale
14 PREFIX_FONT
=${PREFIX_DATA}/font
24 # Predefined functions
27 echo "Supported options are:"
28 echo "--help print this help and exit"
29 echo "--prefix=<path> final path for the game [/usr/local]"
30 echo "--prefix-bin=<path> path for binaries [\$prefix/bin]"
31 echo "--prefix-lib=<path> path for the modules [\$prefix/lib/tuxanci]"
32 echo "--prefix-data=<path> data path [\$prefix/share/tuxanci]"
33 echo "--prefix-doc=<path> documentation path [\$prefix/share/doc/tuxanci-${VERSION}]"
34 echo "--prefix-conf=<path> configuration files path [/etc]"
35 echo "--prefix-locale=<path> locale path [\$prefix/share/locale]"
36 echo "--prefix-font=<path> fonts path [\$prefix/share/tuxanci/font]"
37 echo "--destdir=<path> useful option for packagers"
39 echo "--disable-debug enables optimization and quiet output [default: no]"
40 echo "--enable-server build server [default: no]"
41 echo "--enable-client build client [default: yes]"
42 echo "--enable-audio build with audio facility [default: yes]"
43 echo "--enable-opengl build with 3D acceleration [default: yes]"
45 echo "--without-gettext English only version"
50 [ "$2" ] && lib
="${lib} $2"
51 [ "$3" ] && lib
="${lib} $3"
52 if [ "`pkg-config --exists --print-errors "${lib}" | grep "No package
'$1' found
"`" != "" ]; then
54 echo "Error: Cannot find ${lib}"
68 v1
=`echo $1 | sed -e "s/\./ /g"`
69 v2
=`echo $2 | sed -e "s/\./ /g"`
72 j1
=`echo $v1 | awk '{ print $1 }'`
73 j2
=`echo $v2 | awk '{ print $1 }'`
74 if [ $j1 -lt $j2 ]; then
76 elif [ $j1 -gt $j2 ]; then
81 n1
=`echo $v1 | awk '{ print $2 }'`
82 n2
=`echo $v2 | awk '{ print $2 }'`
83 if [ $n1 -lt $n2 ]; then
85 elif [ $n1 -gt $n2 ]; then
90 p1
=`echo $v1 | awk '{ print $3 }'`
91 p2
=`echo $v2 | awk '{ print $3 }'`
92 if [ $p1 -lt $p2 ]; then
94 elif [ $p1 -gt $p2 ]; then
105 echo "==> Parsing options"
107 while [ $# -gt 0 ]; do
114 PREFIX
=`echo $1 | sed 's/--prefix=//'`
117 PREFIX_BIN
=`echo $1 | sed 's/--prefix-bin=//'`
120 PREFIX
=`echo $1 | sed 's/--prefix-data=//'`
123 PREFIX
=`echo $1 | sed 's/--prefix-doc=//'`
126 DESTDIR
=`echo $1 | sed 's/--destdir=//'`
135 echo "Error: unknown option $1"
144 # Check for dependencies
146 echo "==> Checking for dependencies for building"
149 printf "Checking for cmake >= 2.6.0... "
150 cmakebin
=`which cmake`
151 if [ "${cmakebin}" == "" ]; then
153 echo "Error: Cannot find cmake"
156 cmakeversion
=`${cmakebin} --version | sed -e "s/-patch//" | awk '{ print $3, $4 }' | sed -e "s/ /./"`
157 cmakestatus
=`cmpver "2.6.0" ${cmakeversion}`
158 if [ ${cmakestatus} == 1 ] ||
[ ${cmakestatus} == 0 ]; then
162 echo "Error: Cannot find cmake"
168 echo "==> Checking for dependencies for running"
171 if [ ${CLIENT} == true
]; then
172 printf "Checking for SDL... "
177 printf "Checking for libzip... "
181 #if [ ${GETTEXT} == true ]; then
182 #printf "Checking for gettext... "
187 echo "==> Creating Makefile"
189 echo "==> Configuring successfully finished!"