]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
pfring: workaround potential librt deps
authorEric Leblond <eric@regit.org>
Wed, 11 Dec 2013 09:25:39 +0000 (09:25 +0000)
committerVictor Julien <victor@inliniac.net>
Wed, 11 Dec 2013 10:46:10 +0000 (11:46 +0100)
It seems some version of pfring needs to be link with librt.

configure.ac

index 3556641573568b134c39b13dcf2e7a3fcb81aaca..0b29eeb277379d2793b8daca76c6d80fc7da9b84 100644 (file)
         LIBPFRING=""
         AC_CHECK_LIB(pfring, pfring_open,, LIBPFRING="no", [-lpcap])
         if test "$LIBPFRING" = "no"; then
-            if test "x$enable_pfring" = "xyes"; then
-            echo
-            echo "   ERROR! --enable-pfring was passed but the library was not found or version is >4, go get it"
-            echo "   from http://www.ntop.org/PF_RING.html"
-            echo
-            exit 1
+            LIBPFRING=""
+            AC_CHECK_LIB(pfring, pfring_stats,, LIBPFRING="no", [-lpcap -lrt])
+            if test "$LIBPFRING" = "no"; then
+                if test "x$enable_pfring" = "xyes"; then
+                echo
+                echo "   ERROR! --enable-pfring was passed but the library was not found or version is >4, go get it"
+                echo "   from http://www.ntop.org/PF_RING.html"
+                echo
+                exit 1
+                fi
+            else
+                LIBS="${LIBS} -lrt"
             fi
         fi