X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a3f130cbbd100c4bf662bfa0756e3d677be3632c..d160ca225cd39f7e187bf1b07d96eab5f2901292:/projects/stargazer/build diff --git a/projects/stargazer/build b/projects/stargazer/build index 80d17d00..638ed3ef 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -391,6 +391,19 @@ else fi fi +printf "Checking for -lpcap... " +printf "#include \nint main() { return 0; }\n" > build_check.c +$CC $CFLAGS $LDFLAGS build_check.c -lpcap -o fake > /dev/null 2> /dev/null +if [ $? != 0 ] +then + CHECK_PCAP=no + printf "no\n" +else + CHECK_PCAP=yes + printf "yes\n" +fi +rm -f fake + printf "Checking for -lnfnetlink... " printf "#include \n#include \n#include \nint main() { return 0; }\n" > build_check.c $CC $CFLAGS $LDFLAGS build_check.c -lnfnetlink -o fake > /dev/null 2> /dev/null @@ -474,6 +487,12 @@ then configuration/rpcconfig" fi +if [ "$CHECK_PCAP" = "yes" ] +then + PLUGINS="$PLUGINS + capture/pcap" +fi + if [ "$CHECK_NFNETLINK" = "yes" -a "$CHECK_NFQ" = "yes" ] then PLUGINS="$PLUGINS @@ -515,6 +534,7 @@ then printf "XMLRPC_CFLAGS=$XMLRPC_CFLAGS\n" >> $CONFFILE printf "XMLRPC_LDFLAGS=$XMLRPC_LDFLAGS\n" >> $CONFFILE fi +printf "CHECK_PCAP=$CHECK_PCAP\n" >> $CONFFILE printf "CHECK_NFNETLINK=$CHECK_NFNETLINK\n" >> $CONFFILE if [ "$CHECK_NFNETLINK" = "yes" ] then