aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ipt-netflow/kernel-vs-userspace.patch
blob: 8f9857fa8b6b0d6f2d45f373168771f40a3260cf (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff --git a/configure b/configure
index 3f10e2a..b43f024 100755
--- a/configure
+++ b/configure
@@ -256,6 +256,8 @@ do
     --ipt-inc=*) IPTINC="$ac_optarg" ;;
     --kver=*)  KVERSION="$ac_optarg" ;;
     --kdir=*)      KDIR="$ac_optarg" ;;
+    --disable-kernel) NOKERNEL=1;;
+    --disable-ipt) NOIPT=1;;
     --make) echo called from make ;;
     --help) show_help ;;
     -*) echo Invalid option: $ac_option; exit 1 ;;
@@ -353,22 +355,26 @@ kernel_check_config() {
   kconfig CONFIG_IP6_NF_IPTABLES	"ip6tables target"
 }
 
-kernel_find_version	#KVERSION
-test "$KLIBMOD" || KLIBMOD=$KVERSION
-echo "Kernel version: $KVERSION ($KHOW)"
-kernel_find_source	#KDIR
-echo "Kernel sources: $KDIR ($KSHOW)"
-kernel_check_consistency
-kernel_check_config
-
-test "$IPTBIN" || IPTBIN=`which iptables`
-
-iptables_find_version	#IPTVER
-iptables_try_pkgconfig	#try to configure from pkg-config
-iptables_find_src	#IPTSRC
-iptables_src_version	#check that IPTSRC match to IPTVER
-iptables_inc		#IPTINC
-iptables_modules	#IPTLIB
+if ! test "$NOKERNEL"; then
+	kernel_find_version	#KVERSION
+	test "$KLIBMOD" || KLIBMOD=$KVERSION
+	echo "Kernel version: $KVERSION ($KHOW)"
+	kernel_find_source	#KDIR
+	echo "Kernel sources: $KDIR ($KSHOW)"
+	kernel_check_consistency
+	kernel_check_config
+fi
+
+if ! test "$NOIPT"; then
+	test "$IPTBIN" || IPTBIN=`which iptables`
+
+	iptables_find_version	#IPTVER
+	iptables_try_pkgconfig	#try to configure from pkg-config
+	iptables_find_src	#IPTSRC
+	iptables_src_version	#check that IPTSRC match to IPTVER
+	iptables_inc		#IPTINC
+	iptables_modules	#IPTLIB
+fi
 
 REPLACE="\
 s!@KVERSION@!$KVERSION!;\