summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2019-02-12 18:57:59 -0800
committerRatan Gupta <ratagupt@linux.vnet.ibm.com>2019-02-28 06:59:08 +0000
commit639cfe1f509657547d594b4d38bb215b85110c50 (patch)
tree004aa65acf726f7bda3fbbb314df4ea2a8a6c249
parent26c0dc42bdd81cb3033e040e0b68b2caf41d6c44 (diff)
downloadphosphor-networkd-639cfe1f509657547d594b4d38bb215b85110c50.tar.gz
phosphor-networkd-639cfe1f509657547d594b4d38bb215b85110c50.zip
configure: Simplify link local autoconfiguration
We should either define a variable or not based on the truth value of the configure flag. This change removes the AC_ARG_VAR that is duplicating the functionality of the AC_ARG_ENABLE. Change-Id: Ia77a1a7b5535418a268a3dd2d08ed488b8c6ae18 Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r--configure.ac17
1 files changed, 8 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 1d698ac..bea6f98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,16 +95,15 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"],
)
# If set, auto-configure a link-local address on the NIC.
-AC_ARG_ENABLE([link-local-autoconfiguration],
- AS_HELP_STRING([--disable-link-local-autoconfiguration], [Disable link-local IP address autoconfiguration])
-)
-
-AC_ARG_VAR(LINK_LOCAL_AUTOCONFIGURATION, [Enable link-local address autoconfiguration])
-
-AS_IF([test "x$enable_link_local_autoconfiguration" != "xno"],
- [LINK_LOCAL_AUTOCONFIGURATION="yes"]
- AC_DEFINE_UNQUOTED([LINK_LOCAL_AUTOCONFIGURATION], ["$LINK_LOCAL_AUTOCONFIGURATION"], [Enable link-local IP address autoconfiguration])
+AC_ARG_ENABLE(
+ [link-local-autoconfiguration],
+ AS_HELP_STRING([--disable-link-local-autoconfiguration], [Disable link-local IP address autoconfiguration]),
+ [],
+ [enable_link_local_autoconfiguration="yes"]
)
+if test "x$enable_link_local_autoconfiguration" = "xyes"; then
+ AC_DEFINE([LINK_LOCAL_AUTOCONFIGURATION], [1], [Enable link-local IP address autoconfiguration])
+fi
AC_ARG_VAR(DNS_ENTRY_FILE, [File having DNS entries supplied by DHCP])
AS_IF([test "x$DNS_ENTRY_FILE" == "x"], [DNS_ENTRY_FILE="/run/systemd/netif/state"])
OpenPOWER on IntegriCloud