echo " Building STG 2.4 for $sys $release"
echo "#############################################################################"
-STG_LIBS="stg_logger.lib
- stg_locker.lib
+STG_LIBS="logger.lib
+ locker.lib
crypto.lib
common.lib
- script_executer.lib
+ scriptexecuter.lib
conffiles.lib
- hostallow.lib
pinger.lib
dotconfpp.lib"
SHELL="/usr/local/bin/bash"
fi
+echo -n "Checking CC... "
+$CC --version > /dev/null 2> /dev/null
+if [ $? != 0 ]
+then
+ echo "FAIL!"
+ echo "$CC not found"
+ exit;
+fi
+echo "found"
+echo -n "Checking CXX... "
+$CXX --version > /dev/null 2> /dev/null
+if [ $? != 0 ]
+then
+ echo "FAIL!"
+ 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 $CXXFLAGS $LDFLAGS build_check.c -o fake
if [ $? != 0 ]
then
echo "FAIL!"
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 $CXXFLAGS $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 $CXXFLAGS $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 $CXXFLAGS $LDFLAGS build_check.c -lmysqlclient_r $LIB_THREAD -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_MYSQLCLIENT=no
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 $CXXFLAGS $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 $CXXFLAGS $LDFLAGS build_check.c -lxmlrpc $LIB_THREAD -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_XMLRPC=no