diff options
| author | David M. Syzdek <david@syzdek.net> | 2019-03-11 20:48:39 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2019-03-11 20:48:39 -0800 |
| commit | 0e9a9bf15758bf52e1e83c780b13ec77a8b74c58 (patch) | |
| tree | 4c6b5c0be32fa9beeebcbcfa92d37e2583e4d763 | |
| parent | b8b87cb5a1a100bd06779a4fc0ff95763de67792 (diff) | |
| download | bbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.tar.gz bbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.tar.bz2 bbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.tar.xz bbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.zip | |
Adding ability to disable examples
| -rw-r--r-- | Makefile.am | 18 | ||||
| -rw-r--r-- | acinclude.m4 | 27 | ||||
| -rw-r--r-- | configure.ac | 2 |
3 files changed, 39 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index c19b3c6..09b45a8 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -76,14 +76,6 @@ bin_PROGRAMS = | |||
| 76 | bin_SCRIPTS = | 76 | bin_SCRIPTS = |
| 77 | pkgdata_DATA = | 77 | pkgdata_DATA = |
| 78 | sbin_SCRIPTS = src/bbfw | 78 | sbin_SCRIPTS = src/bbfw |
| 79 | firewallglobal_DATA = src/firewall.d/global.d/rules-example \ | ||
| 80 | src/firewall.d/global.d/rules4-example \ | ||
| 81 | src/firewall.d/global.d/rules6-example \ | ||
| 82 | src/firewall.d/global.d/ipsets-example | ||
| 83 | firewall_DATA = src/firewall.d/ipsets-example \ | ||
| 84 | src/firewall.d/rules-example \ | ||
| 85 | src/firewall.d/rules4-example \ | ||
| 86 | src/firewall.d/rules6-example | ||
| 87 | 79 | ||
| 88 | 80 | ||
| 89 | # lists | 81 | # lists |
| @@ -132,6 +124,16 @@ DISTCHECK_CONFIGURE_FLAGS = \ | |||
| 132 | 124 | ||
| 133 | 125 | ||
| 134 | # conditional targets for slackware | 126 | # conditional targets for slackware |
| 127 | if ENABLE_EXAMPLES | ||
| 128 | firewallglobal_DATA = src/firewall.d/global.d/rules-example \ | ||
| 129 | src/firewall.d/global.d/rules4-example \ | ||
| 130 | src/firewall.d/global.d/rules6-example \ | ||
| 131 | src/firewall.d/global.d/ipsets-example | ||
| 132 | firewall_DATA = src/firewall.d/ipsets-example \ | ||
| 133 | src/firewall.d/rules-example \ | ||
| 134 | src/firewall.d/rules4-example \ | ||
| 135 | src/firewall.d/rules6-example | ||
| 136 | endif | ||
| 135 | if ENABLE_SLACKWARE | 137 | if ENABLE_SLACKWARE |
| 136 | slackrcd_SCRIPTS = src/rc.firewall.new | 138 | slackrcd_SCRIPTS = src/rc.firewall.new |
| 137 | endif | 139 | endif |
diff --git a/acinclude.m4 b/acinclude.m4 index 06006bc..65200f0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 | |||
| @@ -30,6 +30,33 @@ | |||
| 30 | # acinclude.m4 - custom m4 macros used by configure.ac | 30 | # acinclude.m4 - custom m4 macros used by configure.ac |
| 31 | # | 31 | # |
| 32 | 32 | ||
| 33 | |||
| 34 | # AC_BBFW_EXAMPLES() | ||
| 35 | # ----------------------------------- | ||
| 36 | AC_DEFUN([AC_BBFW_EXAMPLES],[dnl | ||
| 37 | |||
| 38 | # display options | ||
| 39 | enableval="" | ||
| 40 | AC_ARG_ENABLE( | ||
| 41 | examples, | ||
| 42 | [AS_HELP_STRING([--disable-examples], [install example files [default=yes]])], | ||
| 43 | [ EEXAMPLES=$enableval ], | ||
| 44 | [ EEXAMPLES=$enableval ] | ||
| 45 | ) | ||
| 46 | |||
| 47 | # sets options | ||
| 48 | if test "x${EEXAMPLES}" == "xyes";then | ||
| 49 | ENABLE_EXAMPLES=yes | ||
| 50 | elif test "x${EEXAMPLES}" == "xno";then | ||
| 51 | ENABLE_EXAMPLES=no | ||
| 52 | else | ||
| 53 | ENABLE_EXAMPLES=yes | ||
| 54 | fi | ||
| 55 | |||
| 56 | AM_CONDITIONAL([ENABLE_EXAMPLES], [test "${ENABLE_EXAMPLES}" == "yes"]) | ||
| 57 | ])dnl | ||
| 58 | |||
| 59 | |||
| 33 | # AC_BBFW_SLACKWARE() | 60 | # AC_BBFW_SLACKWARE() |
| 34 | # ----------------------------------- | 61 | # ----------------------------------- |
| 35 | AC_DEFUN([AC_BBFW_SLACKWARE],[dnl | 62 | AC_DEFUN([AC_BBFW_SLACKWARE],[dnl |
diff --git a/configure.ac b/configure.ac index 1aaee07..93e79b8 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -99,6 +99,7 @@ AC_BINDLE_GIT_PACKAGE_VERSION([contrib/bindletools/build-aux/git-package-version | |||
| 99 | 99 | ||
| 100 | 100 | ||
| 101 | # custom configure options | 101 | # custom configure options |
| 102 | AC_BBFW_EXAMPLES | ||
| 102 | AC_BBFW_SLACKWARE | 103 | AC_BBFW_SLACKWARE |
| 103 | AC_BBFW_INITD | 104 | AC_BBFW_INITD |
| 104 | AC_BBFW_SYSTEMD | 105 | AC_BBFW_SYSTEMD |
| @@ -116,6 +117,7 @@ AC_MSG_NOTICE([ Install:]) | |||
| 116 | AC_MSG_NOTICE([ Slackware Init Script: ${ENABLE_SLACKWARE}]) | 117 | AC_MSG_NOTICE([ Slackware Init Script: ${ENABLE_SLACKWARE}]) |
| 117 | AC_MSG_NOTICE([ Init.d Scriptb: ${ENABLE_INITD}]) | 118 | AC_MSG_NOTICE([ Init.d Scriptb: ${ENABLE_INITD}]) |
| 118 | AC_MSG_NOTICE([ System Unit: ${ENABLE_SYSTEMD}]) | 119 | AC_MSG_NOTICE([ System Unit: ${ENABLE_SYSTEMD}]) |
| 120 | AC_MSG_NOTICE([ Example Files: ${ENABLE_EXAMPLES}]) | ||
| 119 | AC_MSG_NOTICE([ ]) | 121 | AC_MSG_NOTICE([ ]) |
| 120 | AC_MSG_NOTICE([ Please send suggestions to: $PACKAGE_BUGREPORT]) | 122 | AC_MSG_NOTICE([ Please send suggestions to: $PACKAGE_BUGREPORT]) |
| 121 | AC_MSG_NOTICE([ ]) | 123 | AC_MSG_NOTICE([ ]) |
