]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
changed no lib pcap error to warning, ldns-dpa will now only print a "no pcap" messag...
authorJelte Jansen <jeltejan@NLnetLabs.nl>
Thu, 15 Dec 2005 14:31:05 +0000 (14:31 +0000)
committerJelte Jansen <jeltejan@NLnetLabs.nl>
Thu, 15 Dec 2005 14:31:05 +0000 (14:31 +0000)
examples/configure.ac
examples/ldns-dpa.c

index 9c0280a6ed83082f05b8e8bb18c054c5427223df..d9c7536aae310f3c4c7306a62bbc72b3d0518e6f 100644 (file)
@@ -45,7 +45,7 @@ AC_CHECK_HEADER(ldns/dns.h,,  [
 )
 
 AC_CHECK_LIB(pcap, pcap_open_offline,, [
-       AC_MSG_ERROR([Can't find pcap library (needed for dpa)])
+       AC_MSG_WARN([Can't find pcap library (needed for ldns-dpa, will not build dpa now.)])
        ]
 )
 
index e76389db855186c794bfccf1e2b5421008e81f70..fb73266e603574aa05538c99c68ad6cf15581b5b 100644 (file)
@@ -5,6 +5,8 @@
 #include <netinet/ip6.h>
 #include <errno.h>
 
+#ifdef HAVE_LIBPCAP
+
 int verbosity = 1;
 
 #define ETHER_HEADER_LENGTH 14
@@ -2647,5 +2649,11 @@ int main(int argc, char *argv[]) {
        return status;
 }
 
+#else
+int main() {
+       fprintf(stderr, "ldns-dpa was not built because there is no pcap library on this system, or i couldn't find it. Please install pcap and rebuild.\n");
+       return 1;
+}
+#endif