Allow dhclient and ping to build WITHOUT_DYNAMICROOT

dhclient and ping normally use libcasper services.  These are not
available in statically-linked binaries, so when WITHOUT_DYNAMICROOT is
set disable libcasper use, as with rescue builds.  Also emit a warning
as it's undesirable to build this way.

Reported by:	Michael Dexter
Reviewed by:	rgrimes
Tested by:	Michael Dexter
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17074
This commit is contained in:
Ed Maste 2018-09-09 17:26:44 +00:00
parent 7a8d266139
commit 2c208ed867
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338543
2 changed files with 6 additions and 2 deletions

View File

@ -44,7 +44,9 @@ MAN= dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-options.5 \
dhclient-script.8 dhclient-script.8
LIBADD= util LIBADD= util
.if ${MK_CASPER} != "no" && !defined(RESCUE) .if ${MK_DYNAMICROOT} == "no"
.warning ${PROG} built without libcasper support
.elif ${MK_CASPER} != "no" && !defined(RESCUE)
LIBADD+= casper LIBADD+= casper
LIBADD+= cap_syslog LIBADD+= cap_syslog
CFLAGS+=-DWITH_CASPER CFLAGS+=-DWITH_CASPER

View File

@ -11,7 +11,9 @@ BINMODE=4555
WARNS?= 3 WARNS?= 3
LIBADD= m LIBADD= m
.if ${MK_CASPER} != "no" && !defined(RESCUE) .if ${MK_DYNAMICROOT} == "no"
.warning ${PROG} built without libcasper support
.elif ${MK_CASPER} != "no" && !defined(RESCUE)
LIBADD+= casper LIBADD+= casper
LIBADD+= cap_dns LIBADD+= cap_dns
CFLAGS+=-DWITH_CASPER CFLAGS+=-DWITH_CASPER