summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-03-31 19:45:17 +0100
committerRoy Marples <roy@marples.name>2020-03-31 19:45:17 +0100
commitbbf2c290fbf303b684eb1366cfb61d0a48e8e40c (patch)
tree60b7b3aa33562bce9317d294b3964d83dcaca802 /configure
parent645d14292178c4f6a6f7d359ff8eeb87998f7a35 (diff)
downloaddhcpcd-bbf2c290fbf303b684eb1366cfb61d0a48e8e40c.tar.xz
linux: the default hostname is (none)
It's blank for the BSD's. Respect this when relinquishing the hostname.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index 838c7222..a8932d33 100755
--- a/configure
+++ b/configure
@@ -87,6 +87,7 @@ for x do
PKG_CONFIG) PKG_CONFIG=$var;;
--with-hook) HOOKSCRIPTS="$HOOKSCRIPTS${HOOKSCRIPTS:+ }$var";;
--with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var; HOOKSET=true;;
+ --with-default-hostname) _DEFAULT_HOSTNAME=$var;;
--build) BUILD=$var;;
--host) HOST=$var; HOSTCC=$var-;;
--target) TARGET=$var;;
@@ -494,6 +495,16 @@ solaris*|sunos*)
;;
esac
+if [ -n "${_DEFAULT_HOSTNAME+x}" ]; then
+ DEFAULT_HOSTNAME="${_DEFAULT_HOSTNAME}"
+else
+ case "$OS" in
+ *|linux*) DEFAULT_HOSTNAME="(none)";;
+ *) DEFAULT_HOSTNAME="";;
+ esac
+fi
+echo "DEFAULT_HOSTNAME= $DEFAULT_HOSTNAME" >>$CONFIG_MK
+
if [ -z "$INET" -o "$INET" = yes ]; then
echo "Enabling INET support"
echo "CPPFLAGS+= -DINET" >>$CONFIG_MK