X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d8c45ce015fe9354a9293802405b2da0bff2399e..54a10a471694273384a0d07a8888c2d40a9daa0b:/projects/stargazer/build diff --git a/projects/stargazer/build b/projects/stargazer/build index a695ed0d..48da041a 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -92,7 +92,6 @@ printf " Building STG 2.4 for $sys $release\n" printf "#############################################################################\n" STG_LIBS="logger.lib - locker.lib crypto.lib common.lib scriptexecuter.lib @@ -197,8 +196,8 @@ fi rm -f fake printf "Checking for -lexpat... " -printf "int main() { return 0; }\n" > build_check.c -$CC $CFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null +printf "#include \nint main() { return 0; }\n" > build_check.c +$CXX $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_EXPAT=no @@ -210,7 +209,8 @@ fi rm -f fake printf "Checking for -lfbclient... " -$CC $CFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null +printf "int main() { return 0; }\n" > build_check.c +$CXX $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_FBCLIENT=no @@ -222,12 +222,13 @@ fi rm -f fake printf "Checking for mysql_config... " +printf "#include \nint main() { return 0; }\n" > build_check.c MYSQL_VERSION=`mysql_config --version 2> /dev/null` if [ $? != 0 ] then printf "no\n"; printf "Checking for -lmysqlclient... " - $CC $CFLAGS $LDFLAGS build_check.c -lmysqlclient_r $LIB_THREAD -o fake > /dev/null 2> /dev/null + $CXX $CXXFLAGS $LDFLAGS build_check.c -lmysqlclient_r $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_MYSQLCLIENT=no @@ -261,12 +262,13 @@ else fi printf "Checking for pg_config... " +printf "#include \nint main() { return 0; }\n" > build_check.c PG_VERSION=`pg_config --version 2> /dev/null` if [ $? != 0 ] then printf "no\n"; printf "Checking for -lpq... " - $CC $CFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null + $CXX $CXXFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_PQ=no @@ -300,12 +302,13 @@ else fi printf "Checking for xmlrpc-c-config... " +printf "#include \nint main() { return 0; }\n" > build_check.c XMLRPCC_VERSION=`xmlrpc-c-config $XMLRPC_FEATURES --version 2> /dev/null` if [ $? != 0 ] then printf "no\n"; printf "Checking for -lxmlrpc... " - $CC $CFLAGS $LDFLAGS build_check.c -lxmlrpc $LIB_THREAD -o fake > /dev/null 2> /dev/null + $CXX $CXXFLAGS $LDFLAGS build_check.c -lxmlrpc $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_XMLRPC=no @@ -343,7 +346,8 @@ else fi printf "Checking for -lpcap... " -$CC $CFLAGS $LDFLAGS build_check.c -lpcap -o fake > /dev/null 2> /dev/null +printf "#include \nint main() { return 0; }\n" > build_check.c +$CXX $CXXFLAGS $LDFLAGS build_check.c -lpcap -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_PCAP=no @@ -354,8 +358,9 @@ else fi rm -f fake -printf "Checking for -lnfnetlink " -$CC $CFLAGS $LDFLAGS build_check.c -lnfnetlink -o fake > /dev/null 2> /dev/null +printf "Checking for -lnfnetlink... " +printf "#include \nint main() { return 0; }\n" > build_check.c +$CXX $CXXFLAGS $LDFLAGS build_check.c -lnfnetlink -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_NFNETLINK=no @@ -366,8 +371,9 @@ else fi rm -f fake -printf "Checking for -lnetfilter_queue " -$CC $CFLAGS $LDFLAGS build_check.c -lnetfilter_queue -o fake > /dev/null 2> /dev/null +printf "Checking for -lnetfilter_queue... " +printf "#include \nint main() { return 0; }\n" > build_check.c +$CXX $CXXFLAGS $LDFLAGS build_check.c -lnetfilter_queue -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_NFQ=no @@ -384,7 +390,7 @@ then printf "#include \n" > build_check.c printf "#include \n" >> build_check.c printf "int main() { return 0; }\n" >> build_check.c - $CC $CFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null + $CXX $CXXFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_IP_QUEUE_H=no @@ -403,7 +409,7 @@ rm -f build_check.c if [ "$CHECK_EXPAT" != "yes" ] then - printf "-lexpat not found!\n" + printf -- "-lexpat not found!\n" exit 1 fi @@ -465,7 +471,7 @@ printf "CHECK_PCAP=$CHECK_PCAP\n" >> $CONFFILE printf "CHECK_NFNETLINK=$CHECK_NFNETLINK\n" >> $CONFFILE printf "CHECK_NFQ=$CHECK_NFQ\n" >> $CONFFILE printf "DEFS=$DEFS\n" >> $CONFFILE -printf "NFQ_LIBS=$NFQ_LIBS" >> $CONFFILE +printf "NFQ_LIBS=$NFQ_LIBS\n" >> $CONFFILE printf "STG_LIBS=" >> $CONFFILE for lib in $STG_LIBS do