XMLRPC_FEATURES="c++2 abyss-server"
-if [ -z $1 ]
+if [ -z "$1" ]
then
DEFS="$DEFS -DNDEBUG"
MAKEOPTS="-j1"
then
DEFS="$DEFS -DDEBUG"
MAKEOPTS="-j1"
- CXXFLAGS="$CXXFLAGS -g3 -W -Wall"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
else
DEFS="$DEFS -DNDEBUG"
MAKEOPTS="-j1"
scriptexecuter.lib
conffiles.lib
pinger.lib
- dotconfpp.lib"
+ dotconfpp.lib
+ smux.lib"
PLUGINS="authorization/ao
authorization/inetaccess
other/ping
other/rscript
other/radius
+ other/smux
store/files
capture/cap_nf"
SHELL="/usr/local/bin/bash"
fi
-echo -n "Checking gcc... "
-gcc --version > /dev/null 2> /dev/null
+if [ -z "$CC" ]
+then
+ CC=gcc
+fi
+
+if [ -z "$CXX" ]
+then
+ CXX=g++
+fi
+
+echo -n "Checking CC... "
+$CC --version > /dev/null 2> /dev/null
if [ $? != 0 ]
then
echo "FAIL!"
- echo "gcc not found"
+ echo "$CC not found"
exit;
fi
echo "found"
-echo -n "Checking g++... "
-g++ --version > /dev/null 2> /dev/null
+echo -n "Checking CXX... "
+$CXX --version > /dev/null 2> /dev/null
if [ $? != 0 ]
then
echo "FAIL!"
- echo "g++ not found"
+ echo "$CXX not found"
exit;
fi
echo "found"
echo -n "Checking endianess... "
echo "int main() { int probe = 0x00000001; return *(char *)&probe; }" > build_check.c
-gcc $CXXFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null
+$CC $CFLAGS $LDFLAGS build_check.c -o fake
if [ $? != 0 ]
then
echo "FAIL!"
then
ARCH=le
CXXFLAGS="$CXXFLAGS -DARCH_LE"
+ CFLAGS="$CFLAGS -DARCH_LE"
echo "Little Endian"
else
ARCH=be
CXXFLAGS="$CXXFLAGS -DARCH_BE"
+ CFLAGS="$CFLAGS -DARCH_BE"
echo "Big Endian"
fi
fi
echo -n "Checking for -lexpat... "
echo "int main() { return 0; }" > build_check.c
-gcc $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null
+$CC $CFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_EXPAT=no
rm -f fake
echo -n "Checking for -lfbclient... "
-gcc $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
+$CC $CFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_FBCLIENT=no
then
echo "no";
echo -n "Checking for -lmysqlclient... "
- gcc $CXXFLAGS $LDFLAGS build_check.c -lmysqlclient_r $LIB_THREAD -o fake > /dev/null 2> /dev/null
+ $CC $CFLAGS $LDFLAGS build_check.c -lmysqlclient_r $LIB_THREAD -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_MYSQLCLIENT=no
CHECK_MYSQLCLIENT=no
echo "no"
else
- #CXXFLAGS="$CXXFLAGS $MYSQL_CFLAGS"
echo "[$MYSQL_CFLAGS]"
echo -n "Checking for mysql_config --libs_r... "
MYSQL_LDFLAGS=`mysql_config --libs_r 2> /dev/null`
echo "no"
else
CHECK_MYSQLCLIENT=yes
- #LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS"
echo "[$MYSQL_LDFLAGS]"
fi
fi
then
echo "no";
echo -n "Checking for -lpq... "
- gcc $CXXFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
+ $CC $CFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_PQ=no
then
echo "no";
echo -n "Checking for -lxmlrpc... "
- gcc $CXXFLAGS $LDFLAGS build_check.c -lxmlrpc $LIB_THREAD -o fake > /dev/null 2> /dev/null
+ $CC $CFLAGS $LDFLAGS build_check.c -lxmlrpc $LIB_THREAD -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_XMLRPC=no
echo "" >> $CONFFILE
echo "SHELL=$SHELL" >> $CONFFILE
echo "CXXFLAGS=$CXXFLAGS" >> $CONFFILE
+echo "CFLAGS=$CFLAGS" >> $CONFFILE
echo "LDFLAGS=$LDFLAGS" >> $CONFFILE
echo "LIB_THREAD=$LIB_THREAD" >> $CONFFILE
echo "PREFIX=$PREFIX" >> $CONFFILE