aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2019-03-11 20:48:39 -0800
committerDavid M. Syzdek <david@syzdek.net>2019-03-11 20:48:39 -0800
commit0e9a9bf15758bf52e1e83c780b13ec77a8b74c58 (patch)
tree4c6b5c0be32fa9beeebcbcfa92d37e2583e4d763
parentb8b87cb5a1a100bd06779a4fc0ff95763de67792 (diff)
downloadbbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.tar.gz
bbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.tar.bz2
bbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.tar.xz
bbfw-0e9a9bf15758bf52e1e83c780b13ec77a8b74c58.zip
Adding ability to disable examples
-rw-r--r--Makefile.am18
-rw-r--r--acinclude.m427
-rw-r--r--configure.ac2
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 =
76bin_SCRIPTS = 76bin_SCRIPTS =
77pkgdata_DATA = 77pkgdata_DATA =
78sbin_SCRIPTS = src/bbfw 78sbin_SCRIPTS = src/bbfw
79firewallglobal_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
83firewall_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
127if ENABLE_EXAMPLES
128firewallglobal_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
132firewall_DATA = src/firewall.d/ipsets-example \
133 src/firewall.d/rules-example \
134 src/firewall.d/rules4-example \
135 src/firewall.d/rules6-example
136endif
135if ENABLE_SLACKWARE 137if ENABLE_SLACKWARE
136slackrcd_SCRIPTS = src/rc.firewall.new 138slackrcd_SCRIPTS = src/rc.firewall.new
137endif 139endif
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# -----------------------------------
36AC_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# -----------------------------------
35AC_DEFUN([AC_BBFW_SLACKWARE],[dnl 62AC_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
102AC_BBFW_EXAMPLES
102AC_BBFW_SLACKWARE 103AC_BBFW_SLACKWARE
103AC_BBFW_INITD 104AC_BBFW_INITD
104AC_BBFW_SYSTEMD 105AC_BBFW_SYSTEMD
@@ -116,6 +117,7 @@ AC_MSG_NOTICE([ Install:])
116AC_MSG_NOTICE([ Slackware Init Script: ${ENABLE_SLACKWARE}]) 117AC_MSG_NOTICE([ Slackware Init Script: ${ENABLE_SLACKWARE}])
117AC_MSG_NOTICE([ Init.d Scriptb: ${ENABLE_INITD}]) 118AC_MSG_NOTICE([ Init.d Scriptb: ${ENABLE_INITD}])
118AC_MSG_NOTICE([ System Unit: ${ENABLE_SYSTEMD}]) 119AC_MSG_NOTICE([ System Unit: ${ENABLE_SYSTEMD}])
120AC_MSG_NOTICE([ Example Files: ${ENABLE_EXAMPLES}])
119AC_MSG_NOTICE([ ]) 121AC_MSG_NOTICE([ ])
120AC_MSG_NOTICE([ Please send suggestions to: $PACKAGE_BUGREPORT]) 122AC_MSG_NOTICE([ Please send suggestions to: $PACKAGE_BUGREPORT])
121AC_MSG_NOTICE([ ]) 123AC_MSG_NOTICE([ ])