File: ignore-unknown-configure-options.patch

package info (click to toggle)
iptables-netflow 2.6-7.2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,632 kB
  • sloc: ansic: 6,831; sh: 896; ruby: 619; makefile: 239
file content (42 lines) | stat: -rw-r--r-- 1,465 bytes parent folder | download | duplicates (2)
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
Description: Warn about unknown configure options instead of bailing out
 Avoids "Invalid option: --build=x86_64-linux-gnu" build error.
 .
 Additionally make it understand some configure options passed by
 debhelper by default, namely --prefix, --libdir and --includedir.
Author: Axel Beckert <abe@debian.org>
Forwarded: no
Bug: https://github.com/aabc/ipt-netflow/issues/134

--- a/configure
+++ b/configure
@@ -326,11 +326,14 @@ do
   esac
 
   case "$ac_option" in
+    --prefix=*) prefix="$ac_optarg" ;;
     --ipt-bin=*) IPTBIN="$ac_optarg" ;;
     --ipt-lib=*) IPTLIB="$ac_optarg" ;;
+    --libdir=*) IPTLIB="$ac_optarg/xtables" ;;
     --ipt-src=*) IPTSRC="$ac_optarg" ;;
     --ipt-ver=*) IPTVER="$ac_optarg" ;;
     --ipt-inc=*) IPTINC="-I$ac_optarg" ;;
+    --includedir=*) IPTINC="-I$ac_optarg" ;;
     --kver=*)  KVERSION="$ac_optarg" ;;
     --kdir=*)      KDIR="$ac_optarg" ;;
     --enable-nat*)   KOPTS="$KOPTS -DENABLE_NAT" ;;
@@ -353,11 +356,14 @@ do
     --make) echo called from make; CARGS=`echo $CARGS | sed s/--make//g` ;;
     -Werror) KOPTS="$KOPTS -Werror" ;;
     --help|-h) show_help ;;
-    -*) echo Invalid option: $ac_option; exit 1 ;;
+    -*) echo WARNING: Ignoring unknown option: $ac_option ;;
 #    *) ni="$ni $ac_option" ;;
   esac
 done
 
+eval "IPTLIB=$IPTLIB"
+eval "IPTINC=$IPTINC"
+
 if [ "$ENABLE_PROMISC" = 1 ]; then KOPTS="$KOPTS -DENABLE_PROMISC"; fi
 if [ "$PROMISC_MPLS" = 1 ]; then
   KOPTS="$KOPTS -DPROMISC_MPLS"