]> git.stg.codes - stg.git/blobdiff - projects/stargazer/build
Fixed compilation issue.
[stg.git] / projects / stargazer / build
index ec14eaad5f18bcf60d79b4b7ab6e57a13af9a3f5..12ec9d23b896065584c3503ecdab2a04133af8af 100755 (executable)
@@ -342,6 +342,42 @@ else
     fi
 fi
 
     fi
 fi
 
+printf "Checking for -lpcap... "
+$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... "
+$CC $CFLAGS $LDFLAGS build_check.c -lnfnetlink -o fake > /dev/null 2> /dev/null
+if [ $? != 0 ]
+then
+    CHECK_NFNETLINK=no
+    printf "no\n"
+else
+    CHECK_NFNETLINK=yes
+    printf "yes\n"
+fi
+rm -f fake
+
+printf "Checking for -lnetfilter_queue... "
+$CC $CFLAGS $LDFLAGS build_check.c -lnetfilter_queue -o fake > /dev/null 2> /dev/null
+if [ $? != 0 ]
+then
+    CHECK_NFQ=no
+    printf "no\n"
+else
+    CHECK_NFQ=yes
+    printf "yes\n"
+fi
+rm -f fake
+
 if [ "$OS" = "linux" ]
 then
     printf "Checking for linux/netfilter_ipv4/ip_queue.h... "
 if [ "$OS" = "linux" ]
 then
     printf "Checking for linux/netfilter_ipv4/ip_queue.h... "
@@ -397,6 +433,19 @@ then
              configuration/rpcconfig"
 fi
 
              configuration/rpcconfig"
 fi
 
+if [ "$CHECK_PCAP" = "yes" ]
+then
+    PLUGINS="$PLUGINS
+             capture/pcap"
+fi
+
+if [ "$CHECK_NFNETLINK" = "yes" -a "$CHECK_NFQ" = "yes" ]
+then
+    PLUGINS="$PLUGINS
+             capture/nfqueue"
+    NFQ_LIBS="-lnfnetlink -lnetfilter_queue"
+fi
+
 printf "OS=$OS\n" > $CONFFILE
 printf "STG_TIME=yes\n" >> $CONFFILE
 printf "DEBUG=$DEBUG\n" >> $CONFFILE
 printf "OS=$OS\n" > $CONFFILE
 printf "STG_TIME=yes\n" >> $CONFFILE
 printf "DEBUG=$DEBUG\n" >> $CONFFILE
@@ -412,7 +461,11 @@ printf "CHECK_FBCLIENT=$CHECK_FBCLIENT\n" >> $CONFFILE
 printf "CHECK_MYSQLCLIENT=$CHECK_MYSQLCLIENT\n" >> $CONFFILE
 printf "CHECK_PQ=$CHECK_PQ\n" >> $CONFFILE
 printf "CHECK_XMLRPC=$CHECK_XMLRPC\n" >> $CONFFILE
 printf "CHECK_MYSQLCLIENT=$CHECK_MYSQLCLIENT\n" >> $CONFFILE
 printf "CHECK_PQ=$CHECK_PQ\n" >> $CONFFILE
 printf "CHECK_XMLRPC=$CHECK_XMLRPC\n" >> $CONFFILE
+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 "DEFS=$DEFS\n" >> $CONFFILE
+printf "NFQ_LIBS=$NFQ_LIBS\n" >> $CONFFILE
 printf "STG_LIBS=" >> $CONFFILE
 for lib in $STG_LIBS
 do
 printf "STG_LIBS=" >> $CONFFILE
 for lib in $STG_LIBS
 do