X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d614b065a35df8f3adaa4a4afc0d7a6cb02eef97..f19bef8a44d3e9e02cc3d4069a3b0dd2169af094:/projects/stargazer/build diff --git a/projects/stargazer/build b/projects/stargazer/build index 637dc739..a83ab8fe 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -59,7 +59,7 @@ MIN_XMLRPCC_VERSION="1.06.27" XMLRPC_FEATURES="c++2 abyss-server" -if [ -z $1 ] +if [ -z "$1" ] then DEFS="$DEFS -DNDEBUG" MAKEOPTS="-j1" @@ -112,13 +112,12 @@ echo "########################################################################## 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" @@ -159,9 +158,38 @@ else SHELL="/usr/local/bin/bash" fi +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 "$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!" @@ -184,7 +212,7 @@ rm -f fake 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 @@ -196,7 +224,7 @@ fi 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 @@ -213,7 +241,7 @@ if [ $? != 0 ] 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 @@ -254,7 +282,7 @@ if [ $? != 0 ] 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 @@ -293,7 +321,7 @@ if [ $? != 0 ] 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