From bf990821ffcb44aba4c82a476e0309b49837ebb7 Mon Sep 17 00:00:00 2001 From: Damien Stuart Date: Sun, 24 Feb 2013 18:09:13 -0500 Subject: [PATCH] Fixed broken configure options for forcing a particular firewall type and path. --- configure.ac | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 137d17c8..fe6c276f 100644 --- a/configure.ac +++ b/configure.ac @@ -417,7 +417,7 @@ dnl AS_IF([ test "x$withval" = xno ], [], AS_IF([ test "x$withval" = x -o "x$withval" = xyes ], [AC_MSG_ERROR([--with-iptables requires an argument specifying a path to iptables])], - [ IPTABLES_EXE=$withval ] + [ FORCE_IPTABLES_EXE=$withval ] ) ) ], @@ -435,7 +435,7 @@ dnl AS_IF([ test "x$withval" = xno ], [], AS_IF([ test "x$withval" = x -o "x$withval" = xyes ], [AC_MSG_ERROR([--with-ipfw requires an argument specifying a path to ipfw])], - [ IPFW_EXE=$withval ] + [ FORCE_IPFW_EXE=$withval ] ) ) ], @@ -453,7 +453,7 @@ dnl AS_IF([ test "x$withval" = xno ], [], AS_IF([ test "x$withval" = x -o "x$withval" = xyes ], [AC_MSG_ERROR([--with-pf requires an argument specifying a path to pf])], - [ PF_EXE=$withval ] + [ FORCE_PF_EXE=$withval ] ) ) ], @@ -471,7 +471,7 @@ dnl AS_IF([ test "x$withval" = xno ], [], AS_IF([ test "x$withval" = x -o "x$withval" = xyes ], [AC_MSG_ERROR([--with-ipf requires an argument specifying a path to ipf])], - [ IPF_EXE=$withval ] + [ FORCE_IPF_EXE=$withval ] ) ) ], @@ -480,6 +480,31 @@ dnl ] ) +dnl If a firewall was forced. set the appropriate _EXE var and clear the others. +dnl + AS_IF([test "x$FORCE_IPTABLES_EXE" != x], [ + IPTABLES_EXE="$FORCE_IPTABLES_EXE" + ],[ + AS_IF([test "x$FORCE_IPFW_EXE" != x], [ + IPFW_EXE="$FORCE_IPFW_EXE" + IPTABLES_EXE="" + ],[ + AS_IF([test "x$FORCE_PF_EXE" != x], [ + PF_EXE="$FORCE_PF_EXE" + IPFW_EXE="" + IPTABLES_EXE="" + ],[ + AS_IF([test "x$FORCE_IPF_EXE" != x], [ + IPF_EXE="$FORCE_IPF_EXE" + PF_EXE="" + IPFW_EXE="" + IPTABLES_EXE="" + ] + ] + ] + ] + )))) + dnl Determine which firewall exe we use (if we have one). dnl If iptables was found or specified, it wins, then we fallback to ipfw, dnl then pf, and otherwise we try ipf.