diff options
author | Thomas Haller <thaller@redhat.com> | 2016-10-14 11:00:16 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-10-27 11:28:01 +0200 |
commit | e9bf87805cf968ef4542fefb123384dbf4b5f98c (patch) | |
tree | 9b497a61ddffc0b903f95ba1dfca001380c26d06 /configure.ac | |
parent | d298b7c96d939b6c5cb7eddd7824e4f0cd695294 (diff) | |
download | NetworkManager-e9bf87805cf968ef4542fefb123384dbf4b5f98c.tar.gz |
dhcp: make default dhcp plugin configurable at compile-time
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 30364a4c0d..d589227430 100644 --- a/configure.ac +++ b/configure.ac @@ -808,6 +808,16 @@ else AC_DEFINE(WITH_DHCPCD, 0, [Define if you have dhcpcd]) fi +AC_ARG_WITH(config-dhcp-default, AS_HELP_STRING([--with-config-dhcp-default=dhclient|dhcpcd|internal], [Default configuration option for main.dhcp setting, used as fallback if the configuration option is unset]), [config_dhcp_default="$withval"], [config_dhcp_default=""]) +if test "$config_dhcp_default" = yes -o "$config_dhcp_default" = no; then + config_dhcp_default='' +fi +test -z "$config_dhcp_default" -a "$with_dhclient" != "no" && config_dhcp_default='dhclient' +test -z "$config_dhcp_default" -a "$with_dhcpcd" != "no" && config_dhcp_default='dhcpcd' +test -z "$config_dhcp_default" && config_dhcp_default='internal' +AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_DHCP, "$config_dhcp_default", [Default configuration option for main.dhcp setting]) +AC_SUBST(NM_CONFIG_DEFAULT_DHCP, $config_dhcp_default) + # resolvconf and netconfig support AC_ARG_WITH(resolvconf, AS_HELP_STRING([--with-resolvconf=yes|no|path], [Enable resolvconf support])) AC_ARG_WITH(netconfig, AS_HELP_STRING([--with-netconfig=yes|no], [Enable SUSE netconfig support])) @@ -1213,7 +1223,7 @@ echo " netconfig: ${with_netconfig}" echo " config-dns-rc-manager-default: ${config_dns_rc_manager_default}" echo -echo "DHCP clients:" +echo "DHCP clients (default $config_dhcp_default):" echo " dhclient: $with_dhclient" echo " dhcpcd: $with_dhcpcd" echo " dhcpcd-supports-ipv6: $with_dhcpcd_supports_ipv6" |