summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2021-01-30 11:46:06 +0000
committerRoy Marples <roy@marples.name>2021-01-30 11:46:06 +0000
commitb29f653581bfd327a0a49c1015e8759dafc1cd1b (patch)
tree9894bad1cd7e7bc945e03de1c932672f9b158970 /configure
parent3848e7204f23bb78eb42dcde4898c70aca67d58d (diff)
downloaddhcpcd-b29f653581bfd327a0a49c1015e8759dafc1cd1b.tar.xz
import-src: adjust build target so all .in files are pre-built
While here, if we cannot find ypbind to work out how the hook script should be configured, guess according to OS.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure b/configure
index 07360a52..eceb4a98 100755
--- a/configure
+++ b/configure
@@ -1729,6 +1729,35 @@ if ! $HOOKSET; then
EGHOOKS="$EGHOOKS${EGHOOKS:+ }$YPHOOK"
else
echo "not found"
+ YPHOOK="50-ypbind"
+ case "$OS" in
+ linux*)
+ YPHOOK="50-yp.conf"
+ YPOS="Linux"
+ ;;
+ freebsd*|dragonfly*)
+ YPOS="FreeBSD"
+ echo "YPDOMAIN_DIR=" >>$CONFIG_MK
+ echo "YPDOMAIN_SUFFIX=" >>$CONFIG_MK
+ ;;
+ netbsd*)
+ YPOS="NetBSD"
+ echo "YPDOMAIN_DIR= /var/yp" >>$CONFIG_MK
+ echo "YPDOMAIN_SUFFIX=.ypservers" >>$CONFIG_MK
+ ;;
+ openbsd*)
+ YPOS="OpenBSD"
+ echo "YPDOMAIN_DIR= /etc/yp" >>$CONFIG_MK
+ echo "YPDOMAIN_SUFFIX=" >>$CONFIG_MK
+ ;;
+ *)
+ YPHOOK=
+ ;;
+ esac
+ if [ -n "$YPHOOK" ]; then
+ echo "Assuming ypbind is $YPOS"
+ EGHOOKS="$EGHOOKS${EGHOOKS:+ }$YPHOOK"
+ fi
fi
fi