2009-05-04 20:59:01 -07:00
|
|
|
#!/bin/bash
|
2008-04-13 11:48:18 -07:00
|
|
|
|
|
|
|
source __BUILD_CONFIG
|
|
|
|
|
2008-04-17 08:02:53 -07:00
|
|
|
DEBUGFLAG="--disable-debug"
|
2008-04-20 12:24:02 -07:00
|
|
|
SPECIALFLAGS=""
|
2008-04-13 18:46:54 -07:00
|
|
|
|
2008-04-20 12:24:02 -07:00
|
|
|
for i in $@; do
|
2008-04-17 08:02:53 -07:00
|
|
|
if [[ "x$i" = "xdebug" ]] ; then
|
|
|
|
DEBUGFLAG="--enable-debug"
|
2008-04-17 08:48:41 -07:00
|
|
|
elif [[ "x$i" = "xdebug-relaxed" ]] ; then
|
|
|
|
DEBUGFLAG="--enable-debug=relaxed"
|
2008-04-17 08:02:53 -07:00
|
|
|
elif [[ "x$i" = "xinstaller" ]] ; then
|
2008-04-20 12:24:02 -07:00
|
|
|
SPECIALFLAGS="${SPECIALFLAGS}
|
2008-04-17 08:02:53 -07:00
|
|
|
--enable-data --enable-installer --with-installer-extdir=\"${PREFIX}\"
|
|
|
|
--with-installer-version=${INSTALLER_VERSION}"
|
2008-04-17 09:09:14 -07:00
|
|
|
elif [[ "x$i" = "x-j3" ]] ; then
|
|
|
|
MAKE_FLAGS="-j3"
|
2008-04-20 12:24:02 -07:00
|
|
|
else
|
|
|
|
CONF_EXTRA_FLAGS="${CONF_EXTRA_FLAGS}
|
|
|
|
${i}"
|
2008-04-17 07:32:48 -07:00
|
|
|
fi
|
2008-04-17 08:02:53 -07:00
|
|
|
done
|
|
|
|
|
2008-04-20 12:24:02 -07:00
|
|
|
CONF_EXTRA_FLAGS="${DEBUGFLAG}
|
|
|
|
${SPECIALFLAGS}
|
|
|
|
${CONF_EXTRA_FLAGS}"
|
2008-04-13 11:48:18 -07:00
|
|
|
|
2008-04-13 17:35:06 -07:00
|
|
|
# Move to the root directory
|
|
|
|
cd ..
|
|
|
|
|
2008-04-13 15:25:15 -07:00
|
|
|
./autogen.sh || exit 1
|
2008-04-13 18:46:54 -07:00
|
|
|
./configure --target=${CROSSCOMPILETARGET} --host=${CROSSCOMPILETARGET} --enable-static --disable-shared \
|
2008-04-13 11:48:18 -07:00
|
|
|
--prefix="${PREFIX}" \
|
|
|
|
${CONF_EXTRA_FLAGS} \
|
|
|
|
CFLAGS="${CFLAGS}" \
|
2009-05-03 08:00:18 -07:00
|
|
|
CXXFLAGS="${CXXFLAGS}" \
|
2008-04-13 11:48:18 -07:00
|
|
|
CPPFLAGS="${CPPFLAGS}" \
|
2008-04-13 15:50:43 -07:00
|
|
|
LDFLAGS="${LDFLAGS}" \
|
|
|
|
CC_FOR_BUILD="gcc" \
|
2008-04-13 16:00:40 -07:00
|
|
|
CXX_FOR_BUILD="g++" \
|
2009-05-03 08:00:18 -07:00
|
|
|
CFLAGS_FOR_BUILD=" " \
|
|
|
|
CXXFLAGS_FOR_BUILD=" " \
|
2008-04-13 16:53:30 -07:00
|
|
|
CPPFLAGS_FOR_BUILD=" " \
|
|
|
|
PKGCONFIG_PREFIX="${PREFIX}" || exit 1
|
2008-04-17 09:09:14 -07:00
|
|
|
make ${MAKE_FLAGS} || exit 1
|