From: Jelte Jansen Date: Thu, 15 Dec 2005 14:31:05 +0000 (+0000) Subject: changed no lib pcap error to warning, ldns-dpa will now only print a "no pcap" messag... X-Git-Tag: release-1.1.0~507 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bb137a94cfb4eb86907b99d181f046b03a7e27b;p=thirdparty%2Fldns.git changed no lib pcap error to warning, ldns-dpa will now only print a "no pcap" message when built on a system without libpcap --- diff --git a/examples/configure.ac b/examples/configure.ac index 9c0280a6..d9c7536a 100644 --- a/examples/configure.ac +++ b/examples/configure.ac @@ -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.)]) ] ) diff --git a/examples/ldns-dpa.c b/examples/ldns-dpa.c index e76389db..fb73266e 100644 --- a/examples/ldns-dpa.c +++ b/examples/ldns-dpa.c @@ -5,6 +5,8 @@ #include #include +#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