X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7da963e5f936a329b63c308e4031b59390f42a92..acf8e7bd8d54416959762cc916cda6ecaa1160b0:/projects/stargazer/build diff --git a/projects/stargazer/build b/projects/stargazer/build index 83f62b46..f8fb7363 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -27,7 +27,8 @@ OWNER=root OS=unknown sys=`uname -s` -release=`uname -r | cut -b1` +release=`uname -r` +major=`printf "%s" "$release" | cut -d. -f1` BUILD_DIR=`pwd` CONFFILE="../../Makefile.conf" VAR_DIR="./inst/var/stargazer" @@ -54,14 +55,13 @@ LDFLAGS="$LDFLAGS -L/usr/local/lib" if [ "$sys" = "Linux" ] then OS=linux - release="" ETC_DIR="./inst/linux/etc/stargazer" MAKE="make" fi if [ "$sys" = "FreeBSD" ] then - case $release in + case $major in 4) OS=bsd;; 5) OS=bsd5;; 6) OS=bsd5;; @@ -346,7 +346,7 @@ else fi printf "Checking for -lnfnetlink... " -printf "#include \nint main() { return 0; }\n" > build_check.c +printf "#include \n#include \n#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 @@ -359,7 +359,7 @@ fi rm -f fake printf "Checking for -lnetfilter_queue... " -printf "#include \nint main() { return 0; }\n" > build_check.c +printf "#include \n#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