]> git.stg.codes - stg.git/blobdiff - projects/stargazer/build
Merge branch 'stg-2.409-radius'
[stg.git] / projects / stargazer / build
index a43e3e13d8c6331cc3f94aebe7a560e8a0afaf3b..b5e13df6aee5381b2ff25e1eaeb587b8e162843e 100755 (executable)
@@ -131,7 +131,6 @@ else
             then
                 DEFS="$DEFS -DDARWIN"
                 LIB_THREAD=-lpthread
             then
                 DEFS="$DEFS -DDARWIN"
                 LIB_THREAD=-lpthread
-                LIBICONV=""
             else
                 LIB_THREAD=-lc_r
             fi
             else
                 LIB_THREAD=-lc_r
             fi
@@ -390,6 +389,19 @@ else
     fi
 fi
 
     fi
 fi
 
+printf "Checking for -lpcap... "
+printf "#include <pcap.h>\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 <stdint.h>\n#include <netinet/in.h>\n#include <linux/netfilter.h>\nint main() { return 0; }\n" > build_check.c
 $CC $CFLAGS $LDFLAGS build_check.c -lnfnetlink -o fake > /dev/null 2> /dev/null
 printf "Checking for -lnfnetlink... "
 printf "#include <stdint.h>\n#include <netinet/in.h>\n#include <linux/netfilter.h>\nint main() { return 0; }\n" > build_check.c
 $CC $CFLAGS $LDFLAGS build_check.c -lnfnetlink -o fake > /dev/null 2> /dev/null
@@ -523,6 +535,12 @@ 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
 if [ "$CHECK_NFNETLINK" = "yes" -a "$CHECK_NFQ" = "yes" ]
 then
     PLUGINS="$PLUGINS
@@ -572,6 +590,7 @@ then
     printf "XMLRPC_CFLAGS=$XMLRPC_CFLAGS\n" >> $CONFFILE
     printf "XMLRPC_LDFLAGS=$XMLRPC_LDFLAGS\n" >> $CONFFILE
 fi
     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
 printf "CHECK_NFNETLINK=$CHECK_NFNETLINK\n" >> $CONFFILE
 if [ "$CHECK_NFNETLINK" = "yes" ]
 then