[bind10-dev] configure select components for building/installing

Jeremy C. Reed jreed at isc.org
Thu Sep 13 13:39:18 UTC 2012


We discussed a few times about allowing custom builds of the source tree 
so we don't build and install everything.  For example, an admin could 
choose to install a small selection of features or everything.

Here is my proposed installation documentation addition (based on the 
apache httpd way) as a proposal:

  	``You can specify which features to provide in the BIND 
10 installation by enabling and disabling components. BIND 10 includes 
various components by default. Additional components are enabled using 
the --enable-component configure options, with "component" is the name 
of the feature. Similarly, some components may be disabled with the 
--disable-component options. The option --enable-all may be used to 
select all BIND 10 components for installation. Also the 
--enable-components option may be used to list (separated by spaces) 
each feature. Note that these configure switches do not enable/disable 
components for run-time, but are for selecting what software is (or is 
not) generated and installed.

	``For example, the DHCP components can be selected to be built 
and installed with "./configure --enable-dhcp".''

(It and ./configure --help will both also document what is included or 
not included by default.)

Now for the implementation:

  AC_ARG_ENABLE(components,
  APACHE_HELP_STRING(--enable-components=FEATURES-LIST,Space-separated 
list of components to enable | "all"),[
    for i in $enableval; do
      if test "$i" = "all" ; then
        components_selection=$i
      else
        eval "enable_$i=yes"
      fi
    done
  ])
])

 AC_ARG_ENABLE(dhcp,
 APACHE_HELP_STRING(--enable-dhcp,Build and install the DHCP 
components), [enable_dhcp=yes,enable_libdhcp=yes])

 AM_CONDITIONAL(ENABLE_DHCP, test x$enable_dhcp != xno)
 AM_CONDITIONAL(ENABLE_LIBDHCP, test x$enable_libdhcp != xno)

The feature selections would be included in the config.report.

Then src/bin/Makefile.am's could have like:

if ENABLE_DHCP
SUBDIRS += dhcp4 dhcp6
endif

or for src/lib/Makefile.am:

if ENABLE_LIBDHCP
SUBDIRS += dhcp
endif

Very simple.

(The apache way is overly complex for our needs since has new macros to 
cover static versus shared and is reused for over 25 modules.)

We also discussed about how to split it up. (I couldn't find our 
previous ideas.) Here are my suggestions:

--enable-resolver
--enable-auth		# maybe this should be dnsauth?
			# also implies zonemgr, xfrin, xfrout, ddns
--enable-dhcpv4
--enable-dhcpv6
--enable-stats-httpd
--enable-libdns++
--enable=libdhcp++

Always built and installed are logging library, bind10 (boss), cfgmgr, 
cmdctl, stats (even though is not ran by default), sockcreator, and 
msgq.  But should consider that these could be removed too. In 
particular, one may want libdns++ (and its dependencies 
libb10-cryptolink and libb10-util and libb10-exceptions) and nothing 
else.

(Reminds me we should remove the "b10" from library names that aren't 
specific to BIND 10 that we want wide use.)

We could do ddns and xfrin and xfrout individually but it would be a 
rare case where someone would want them individually and they are small 
and are disabled by default anyways.

Note that at this time, auth, dhcp's, and resolver, and now stats (I 
think) are not ran by default.

Share your comments!


More information about the bind10-dev mailing list