summaryrefslogtreecommitdiff
path: root/net/p5-Net-Pcap/patches/patch-Makefile.PL
blob: 7caf8b2498bb303bf5c7835956a0b865f940e8ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-Makefile.PL,v 1.2 2014/07/14 11:59:02 jperkin Exp $

Do not override CCFLAGS and LIBS.

--- Makefile.PL.orig	2007-12-23 23:06:15.000000000 +0000
+++ Makefile.PL
@@ -22,8 +22,8 @@ elsif ($^O eq 'cygwin') {
     cygwin_pcap_headers();
 }
 else {
-    $options{CCFLAGS} = '-Wall -Wwrite-strings' if $Config{ccname} eq 'gcc' and $] >= 5.006;
-    $options{LIBS}    = '-lpcap';
+    $options{CCFLAGS} = "$Config{ccflags} -Wall -Wwrite-strings" if $Config{ccname} eq 'gcc' and $] >= 5.006;
+    $options{LIBS}    = "$Config{libs} -lpcap";
 }
 
 for my $arg (@ARGV) {
@@ -530,7 +530,7 @@ sub have_functions {
     my @funcs = ();
     print "detecting available functions... ";
 
-    my @paths = DynaLoader::dl_findfile(qw(-lpcap));
+    my @paths = DynaLoader::dl_findfile(qw(-L@PCAP_LIBDIR@ -lpcap));
     my $libref = DynaLoader::dl_load_file($paths[0]);
 
     for my $func (@_) {