15e84b765SWarner Losh# $FreeBSD$ 25e84b765SWarner Losh# 35e84b765SWarner Losh# Option file for FreeBSD /usr/src builds. 45e84b765SWarner Losh# 55e84b765SWarner Losh# Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf 65e84b765SWarner Losh# and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no} 75e84b765SWarner Losh# with sensible (usually) defaults. 85e84b765SWarner Losh# 95e84b765SWarner Losh# Makefiles must include bsd.opts.mk after defining specific MK_FOO options that 105e84b765SWarner Losh# are applicable for that Makefile (typically there are none, but sometimes there 115e84b765SWarner Losh# are exceptions). Recursive makes usually add MK_FOO=no for options that they wish 125e84b765SWarner Losh# to omit from that make. 135e84b765SWarner Losh# 141fc86460SWarner Losh# Makefiles must include bsd.mkopt.mk before they test the value of any MK_FOO 155e84b765SWarner Losh# variable. 165e84b765SWarner Losh# 17c6063d0dSWarner Losh# Makefiles may also assume that this file is included by src.opts.mk should it 185e84b765SWarner Losh# need variables defined there prior to the end of the Makefile where 195e84b765SWarner Losh# bsd.{subdir,lib.bin}.mk is traditionally included. 205e84b765SWarner Losh# 215e84b765SWarner Losh# The old-style YES_FOO and NO_FOO are being phased out. No new instances of them 225e84b765SWarner Losh# should be added. Old instances should be removed since they were just to 235e84b765SWarner Losh# bridge the gap between FreeBSD 4 and FreeBSD 5. 245e84b765SWarner Losh# 255e84b765SWarner Losh# Makefiles should never test WITH_FOO or WITHOUT_FOO directly (although an 265e84b765SWarner Losh# exception is made for _WITHOUT_SRCONF which turns off this mechanism 2722cac754SWarner Losh# completely inside bsd.*.mk files). 285e84b765SWarner Losh# 295e84b765SWarner Losh 305e84b765SWarner Losh.if !target(__<src.opts.mk>__) 315e84b765SWarner Losh__<src.opts.mk>__: 325e84b765SWarner Losh 33f9798cc7SWarner Losh.include <bsd.own.mk> 34f9798cc7SWarner Losh 355e84b765SWarner Losh# 365e84b765SWarner Losh# Define MK_* variables (which are either "yes" or "no") for users 375e84b765SWarner Losh# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the 385e84b765SWarner Losh# make(1) environment. 395e84b765SWarner Losh# These should be tested with `== "no"' or `!= "no"' in makefiles. 405e84b765SWarner Losh# The NO_* variables should only be set by makefiles for variables 415e84b765SWarner Losh# that haven't been converted over. 425e84b765SWarner Losh# 435e84b765SWarner Losh 44c1593b9eSWarner Losh# These options are used by the src builds. Those listed in 45c1593b9eSWarner Losh# __DEFAULT_YES_OPTIONS default to 'yes' and will build unless turned 46c1593b9eSWarner Losh# off. __DEFAULT_NO_OPTIONS will default to 'no' and won't build 47c1593b9eSWarner Losh# unless turned on. Any options listed in 'BROKEN_OPTIONS' will be 48c1593b9eSWarner Losh# hard-wired to 'no'. "Broken" here means not working or 49c1593b9eSWarner Losh# not-appropriate and/or not supported. It doesn't imply something is 50c1593b9eSWarner Losh# wrong with the code. There's not a single good word for this, so 51c1593b9eSWarner Losh# BROKEN was selected as the least imperfect one considered at the 52c1593b9eSWarner Losh# time. Options are added to BROKEN_OPTIONS list on a per-arch basis. 53c1593b9eSWarner Losh# At this time, there's no provision for mutually incompatible options. 545e84b765SWarner Losh 555e84b765SWarner Losh__DEFAULT_YES_OPTIONS = \ 565e84b765SWarner Losh ACCT \ 575e84b765SWarner Losh ACPI \ 585e84b765SWarner Losh AMD \ 595e84b765SWarner Losh APM \ 605e84b765SWarner Losh AT \ 615e84b765SWarner Losh ATM \ 625e84b765SWarner Losh AUDIT \ 635e84b765SWarner Losh AUTHPF \ 64b3590423SEnji Cooper AUTOFS \ 6502629e46SEnji Cooper BHYVE \ 665e84b765SWarner Losh BINUTILS \ 675e84b765SWarner Losh BINUTILS_BOOTSTRAP \ 6895856e14SKurt Lidl BLACKLIST \ 695e84b765SWarner Losh BLUETOOTH \ 705e84b765SWarner Losh BOOT \ 7111981695SEnji Cooper BOOTPARAMD \ 7211981695SEnji Cooper BOOTPD \ 735e84b765SWarner Losh BSD_CPIO \ 74e45b569cSEnji Cooper BSDINSTALL \ 755e84b765SWarner Losh BSNMP \ 765e84b765SWarner Losh BZIP2 \ 775e84b765SWarner Losh CALENDAR \ 785e84b765SWarner Losh CAPSICUM \ 795e84b765SWarner Losh CASPER \ 8018cc3172SEnji Cooper CCD \ 815e84b765SWarner Losh CDDL \ 825e84b765SWarner Losh CPP \ 835e84b765SWarner Losh CROSS_COMPILER \ 845e84b765SWarner Losh CRYPT \ 855e84b765SWarner Losh CTM \ 8636716419SHans Petter Selasky CUSE \ 875e84b765SWarner Losh CXX \ 88f987297fSEd Maste DIALOG \ 895e84b765SWarner Losh DICT \ 905e84b765SWarner Losh DMAGENT \ 915e84b765SWarner Losh DYNAMICROOT \ 925e84b765SWarner Losh ED_CRYPTO \ 9379a86dafSEnji Cooper EE \ 94d49a5dddSWarner Losh EFI \ 9508474898SEd Maste ELFTOOLCHAIN_BOOTSTRAP \ 965e84b765SWarner Losh EXAMPLES \ 975e84b765SWarner Losh FDT \ 98c7b6816fSEnji Cooper FILE \ 9911981695SEnji Cooper FINGER \ 1005e84b765SWarner Losh FLOPPY \ 1015e84b765SWarner Losh FMTREE \ 1025e84b765SWarner Losh FORTH \ 1035e84b765SWarner Losh FP_LIBC \ 1045e84b765SWarner Losh FREEBSD_UPDATE \ 10511981695SEnji Cooper FTP \ 1065e84b765SWarner Losh GAMES \ 1075e84b765SWarner Losh GCOV \ 10873ad3fb5SJohn Baldwin GDB \ 10994ff3d03SEd Maste GNU_DIFF \ 11094ff3d03SEd Maste GNU_GREP \ 1115e84b765SWarner Losh GPIO \ 1124e395054SEnji Cooper HAST \ 1135e84b765SWarner Losh HTML \ 114f8080a99SWarner Losh HYPERV \ 1155e84b765SWarner Losh ICONV \ 1165e84b765SWarner Losh INET \ 1175e84b765SWarner Losh INET6 \ 11811981695SEnji Cooper INETD \ 1195e84b765SWarner Losh IPFILTER \ 1205e84b765SWarner Losh IPFW \ 121b29d6977SEnji Cooper ISCSI \ 1225e84b765SWarner Losh JAIL \ 1235e84b765SWarner Losh KDUMP \ 1245e84b765SWarner Losh KVM \ 1255e84b765SWarner Losh LDNS \ 1265e84b765SWarner Losh LDNS_UTILS \ 1275e84b765SWarner Losh LEGACY_CONSOLE \ 1285e84b765SWarner Losh LIB32 \ 1295e84b765SWarner Losh LIBPTHREAD \ 1305e84b765SWarner Losh LIBTHR \ 1311b49115aSEd Maste LLVM_COV \ 1325e84b765SWarner Losh LOCALES \ 1335e84b765SWarner Losh LOCATE \ 1345e84b765SWarner Losh LPR \ 1355e84b765SWarner Losh LS_COLORS \ 1365e84b765SWarner Losh LZMA_SUPPORT \ 1376e050ee6SWarner Losh LOADER_GELI \ 138*f86dd996SWarner Losh LOADER_OFW \ 139*f86dd996SWarner Losh LOADER_UBOOT \ 1405e84b765SWarner Losh MAIL \ 1415e84b765SWarner Losh MAILWRAPPER \ 1425e84b765SWarner Losh MAKE \ 1435e84b765SWarner Losh NDIS \ 1445e84b765SWarner Losh NETCAT \ 1455e84b765SWarner Losh NETGRAPH \ 1465e84b765SWarner Losh NLS_CATALOGS \ 1475e84b765SWarner Losh NS_CACHING \ 1485e84b765SWarner Losh NTP \ 1495e84b765SWarner Losh OPENSSL \ 1505e84b765SWarner Losh PAM \ 1515e84b765SWarner Losh PC_SYSINSTALL \ 1525e84b765SWarner Losh PF \ 1535e84b765SWarner Losh PKGBOOTSTRAP \ 1545e84b765SWarner Losh PMC \ 1555e84b765SWarner Losh PORTSNAP \ 1565e84b765SWarner Losh PPP \ 1575e84b765SWarner Losh QUOTAS \ 15831a741f4SEnji Cooper RADIUS_SUPPORT \ 15911981695SEnji Cooper RBOOTD \ 1605e84b765SWarner Losh RESCUE \ 1615e84b765SWarner Losh ROUTED \ 1625e84b765SWarner Losh SENDMAIL \ 1635e84b765SWarner Losh SETUID_LOGIN \ 1645e84b765SWarner Losh SHAREDOCS \ 1655e84b765SWarner Losh SOURCELESS \ 1665e84b765SWarner Losh SOURCELESS_HOST \ 1675e84b765SWarner Losh SOURCELESS_UCODE \ 1685e84b765SWarner Losh SVNLITE \ 1695e84b765SWarner Losh SYSCONS \ 170bf16c2e9SBryan Drewery SYSTEM_COMPILER \ 1713f802165SEnji Cooper TALK \ 17211981695SEnji Cooper TCP_WRAPPERS \ 1735e84b765SWarner Losh TCSH \ 1745e84b765SWarner Losh TELNET \ 1755e84b765SWarner Losh TEXTPROC \ 17611981695SEnji Cooper TFTP \ 17711981695SEnji Cooper TIMED \ 1785e84b765SWarner Losh UNBOUND \ 1795e84b765SWarner Losh USB \ 1805e84b765SWarner Losh UTMPX \ 1815e84b765SWarner Losh VI \ 182824a9093SEd Maste VT \ 1835e84b765SWarner Losh WIRELESS \ 1845e84b765SWarner Losh WPA_SUPPLICANT_EAPOL \ 1855e84b765SWarner Losh ZFS \ 1865e84b765SWarner Losh ZONEINFO 1875e84b765SWarner Losh 1885e84b765SWarner Losh__DEFAULT_NO_OPTIONS = \ 1895e84b765SWarner Losh BSD_GREP \ 190bf51ff56SKyle Evans BSD_GREP_FASTMATCH \ 1915e84b765SWarner Losh CLANG_EXTRAS \ 192d912066cSMark Johnston DTRACE_TESTS \ 193e9e768f7SEd Maste GNU_GREP_COMPAT \ 1945e84b765SWarner Losh HESIOD \ 195c42ade60SWarner Losh LIBSOFT \ 196a179cd91SWarner Losh LOADER_FIREWIRE \ 19776541eb0SWojciech Macek LOADER_FORCE_LE \ 1987cafeaa1SWarner Losh LOADER_LUA \ 1995e84b765SWarner Losh NAND \ 2005e84b765SWarner Losh OFED \ 2015e84b765SWarner Losh OPENLDAP \ 202a97b7160SEd Maste REPRODUCIBLE_BUILD \ 203609b7b26SEnji Cooper RPCBIND_WARMSTART_SUPPORT \ 2045e84b765SWarner Losh SHARED_TOOLCHAIN \ 2055e84b765SWarner Losh SORT_THREADS \ 2066120aabdSBryan Drewery SVN \ 207c5cba060SEnji Cooper ZONEINFO_LEAPSECONDS_SUPPORT \ 208c5cba060SEnji Cooper ZONEINFO_OLD_TIMEZONES_SUPPORT \ 2096120aabdSBryan Drewery 2105e84b765SWarner Losh 2115e84b765SWarner Losh# 2125e84b765SWarner Losh# Default behaviour of some options depends on the architecture. Unfortunately 2135e84b765SWarner Losh# this means that we have to test TARGET_ARCH (the buildworld case) as well 2145e84b765SWarner Losh# as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not 2155e84b765SWarner Losh# used at all in bsd.*.mk, but we have to make an exception here if we want 2165e84b765SWarner Losh# to allow defaults for some things like clang to vary by target architecture. 2175e84b765SWarner Losh# Additional, per-target behavior should be rarely added only after much 2185e84b765SWarner Losh# gnashing of teeth and grinding of gears. 2195e84b765SWarner Losh# 2205e84b765SWarner Losh.if defined(TARGET_ARCH) 2215e84b765SWarner Losh__T=${TARGET_ARCH} 2225e84b765SWarner Losh.else 2235e84b765SWarner Losh__T=${MACHINE_ARCH} 2245e84b765SWarner Losh.endif 2255e84b765SWarner Losh.if defined(TARGET) 2265e84b765SWarner Losh__TT=${TARGET} 2275e84b765SWarner Losh.else 2285e84b765SWarner Losh__TT=${MACHINE} 2295e84b765SWarner Losh.endif 2300104753bSDimitry Andric 2310104753bSDimitry Andric.include <bsd.compiler.mk> 2328758abd5SBryan Drewery# If the compiler is not C++11 capable, disable Clang and use GCC instead. 2338758abd5SBryan Drewery# This means that architectures that have GCC 4.2 as default can not 2348758abd5SBryan Drewery# build Clang without using an external compiler. 2358758abd5SBryan Drewery 2368758abd5SBryan Drewery.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ 2378758abd5SBryan Drewery ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") 2388758abd5SBryan Drewery# Clang is enabled, and will be installed as the default /usr/bin/cc. 239dfccd92cSEd Maste__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD 240a793c109SEd Maste__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC 241993d3dedSEd Maste.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mriscv*} == "" && ${__T} != "sparc64" 24260af5546SEd Maste# If an external compiler that supports C++11 is used as ${CC} and Clang 24360af5546SEd Maste# supports the target, then Clang is enabled but GCC is installed as the 24460af5546SEd Maste# default /usr/bin/cc. 24583f4f351SBryan Drewery__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX GPL_DTC 24683f4f351SBryan Drewery__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC LLD 2470104753bSDimitry Andric.else 2488758abd5SBryan Drewery# Everything else disables Clang, and uses GCC instead. 249a793c109SEd Maste__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC 250dfccd92cSEd Maste__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD 2515e84b765SWarner Losh.endif 2521cee64a8SEd Maste# In-tree binutils/gcc are older versions without modern architecture support. 2537804dd52SRuslan Bukin.if ${__T} == "aarch64" || ${__T:Mriscv*} != "" 254054f15acSEnji CooperBROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB 2558daa8167SAndrew Turner.endif 2567804dd52SRuslan Bukin.if ${__T:Mriscv*} != "" 2571fdcc5e5SRuslan BukinBROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" 2581fdcc5e5SRuslan BukinBROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" 2591fdcc5e5SRuslan BukinBROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" 2601fdcc5e5SRuslan Bukin.endif 26106b41817SEd Maste.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ 2627804dd52SRuslan Bukin ${__T:Mriscv*} != "" 26306b41817SEd Maste__DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND 26406b41817SEd Maste.else 26506b41817SEd Maste__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND 26606b41817SEd Maste.endif 2670aa5466eSEd Maste.if ${__T} == "aarch64" 268ffe63c8bSEd Maste__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD 2691383b978SEd Maste.elif ${__T} == "amd64" 27093b7a1c1SEd Maste__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP 27193b7a1c1SEd Maste__DEFAULT_NO_OPTIONS+=LLD_IS_LD 2720aa5466eSEd Maste.else 273ffe63c8bSEd Maste__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD 2740aa5466eSEd Maste.endif 275056dd75bSEd Maste.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" 276dfccd92cSEd Maste__DEFAULT_YES_OPTIONS+=LLDB 277d0ba16f7SEd Maste.else 278dfccd92cSEd Maste__DEFAULT_NO_OPTIONS+=LLDB 279d0ba16f7SEd Maste.endif 280ac99c33fSEd Maste# LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 281ac99c33fSEd Maste.if ${__T} == "arm" || ${__T} == "armeb" 282ac99c33fSEd MasteBROKEN_OPTIONS+=LLDB 283ac99c33fSEd Maste.endif 28499b8bccdSJohn Baldwin# GDB in base is generally less functional than GDB in ports. Ports GDB 28599b8bccdSJohn Baldwin# does not yet contain kernel support for arm, and sparc64 kernel support 28699b8bccdSJohn Baldwin# has not been tested. 28799b8bccdSJohn Baldwin.if ${__T:Marm*} != "" || ${__T} == "sparc64" 28873ad3fb5SJohn Baldwin__DEFAULT_NO_OPTIONS+=GDB_LIBEXEC 28999b8bccdSJohn Baldwin.else 29073ad3fb5SJohn Baldwin__DEFAULT_YES_OPTIONS+=GDB_LIBEXEC 29199b8bccdSJohn Baldwin.endif 2920c095a65SEnji Cooper# Only doing soft float API stuff on armv6 and armv7 2930b972ac9SWarner Losh.if ${__T} != "armv6" && ${__T} != "armv7" 294c42ade60SWarner LoshBROKEN_OPTIONS+=LIBSOFT 295c42ade60SWarner Losh.endif 2963d79fdacSWarner Losh.if ${__T:Mmips*} 2975bec6d55SRuslan BukinBROKEN_OPTIONS+=SSP 2985bec6d55SRuslan Bukin.endif 2999e74797fSWarner Losh# EFI doesn't exist on mips, powerpc, sparc or riscv. 300d49a5dddSWarner Losh.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*} 301*f86dd996SWarner LoshBROKEN_OPTIONS+=EFI 302d49a5dddSWarner Losh.endif 303*f86dd996SWarner Losh# GELI isn't supported on !x86 304*f86dd996SWarner Losh.if ${__T} != "i386" && ${__T} != "amd64" 305*f86dd996SWarner LoshBROKEN_OPTIONS+=LOADER_GELI 306*f86dd996SWarner Losh.endif 307*f86dd996SWarner Losh# OFW is only for powerpc and sparc64, exclude others 308*f86dd996SWarner Losh.if ${__T:Mpowerpc*} == "" && ${__T:Msparc64} == "" 309*f86dd996SWarner LoshBROKEN_OPTIONS+=LOADER_OFW 310*f86dd996SWarner Losh.endif 311*f86dd996SWarner Losh# UBOOT is only for arm, mips and powerpc, exclude others 312*f86dd996SWarner Losh.if ${__T:Marm*} == "" && ${__T:Mmips*} == "" && ${__T:Mpowerpc*} == "" 313*f86dd996SWarner LoshBROKEN_OPTIONS+=LOADER_UBOOT 314*f86dd996SWarner Losh.endif 315*f86dd996SWarner Losh 3162427dc7dSEd Maste.if ${__T:Mmips64*} 3172427dc7dSEd Maste# profiling won't work on MIPS64 because there is only assembly for o32 3182427dc7dSEd MasteBROKEN_OPTIONS+=PROFILE 3192427dc7dSEd Maste.endif 32054912308SNavdeep Parhar.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ 32154912308SNavdeep Parhar ${__T} == "powerpc64" || ${__T} == "sparc64" 32254912308SNavdeep Parhar__DEFAULT_YES_OPTIONS+=CXGBETOOL 32354912308SNavdeep Parhar.else 32454912308SNavdeep Parhar__DEFAULT_NO_OPTIONS+=CXGBETOOL 32554912308SNavdeep Parhar.endif 32654912308SNavdeep Parhar 3275e84b765SWarner Losh.include <bsd.mkopt.mk> 3285e84b765SWarner Losh 3295e84b765SWarner Losh# 3305e84b765SWarner Losh# MK_* options that default to "yes" if the compiler is a C++11 compiler. 3315e84b765SWarner Losh# 3325e84b765SWarner Losh.for var in \ 3335e84b765SWarner Losh LIBCPLUSPLUS 3345e84b765SWarner Losh.if !defined(MK_${var}) 3355e84b765SWarner Losh.if ${COMPILER_FEATURES:Mc++11} 3365e84b765SWarner Losh.if defined(WITHOUT_${var}) 3375e84b765SWarner LoshMK_${var}:= no 3385e84b765SWarner Losh.else 3395e84b765SWarner LoshMK_${var}:= yes 3405e84b765SWarner Losh.endif 3415e84b765SWarner Losh.else 3425e84b765SWarner Losh.if defined(WITH_${var}) 3435e84b765SWarner LoshMK_${var}:= yes 3445e84b765SWarner Losh.else 3455e84b765SWarner LoshMK_${var}:= no 3465e84b765SWarner Losh.endif 3475e84b765SWarner Losh.endif 3485e84b765SWarner Losh.endif 3495e84b765SWarner Losh.endfor 3505e84b765SWarner Losh 3515e84b765SWarner Losh# 3525e84b765SWarner Losh# Force some options off if their dependencies are off. 3535e84b765SWarner Losh# Order is somewhat important. 3545e84b765SWarner Losh# 35593cdeb4aSEd Maste.if !${COMPILER_FEATURES:Mc++11} 35693cdeb4aSEd MasteMK_LLVM_LIBUNWIND:= no 35793cdeb4aSEd Maste.endif 35893cdeb4aSEd Maste 359fa0b3585SEd Maste.if ${MK_BINUTILS} == "no" 360fa0b3585SEd MasteMK_GDB:= no 361fa0b3585SEd Maste.endif 362fa0b3585SEd Maste 36358551dc6SBaptiste Daroussin.if ${MK_CAPSICUM} == "no" 36458551dc6SBaptiste DaroussinMK_CASPER:= no 36558551dc6SBaptiste Daroussin.endif 36658551dc6SBaptiste Daroussin 3675e84b765SWarner Losh.if ${MK_LIBPTHREAD} == "no" 3685e84b765SWarner LoshMK_LIBTHR:= no 3695e84b765SWarner Losh.endif 3705e84b765SWarner Losh 3715e84b765SWarner Losh.if ${MK_LDNS} == "no" 3725e84b765SWarner LoshMK_LDNS_UTILS:= no 3735e84b765SWarner LoshMK_UNBOUND:= no 3745e84b765SWarner Losh.endif 3755e84b765SWarner Losh 3765e84b765SWarner Losh.if ${MK_SOURCELESS} == "no" 3775e84b765SWarner LoshMK_SOURCELESS_HOST:= no 3785e84b765SWarner LoshMK_SOURCELESS_UCODE:= no 3795e84b765SWarner Losh.endif 3805e84b765SWarner Losh 3815e84b765SWarner Losh.if ${MK_CDDL} == "no" 3825e84b765SWarner LoshMK_ZFS:= no 3835e84b765SWarner LoshMK_CTF:= no 3845e84b765SWarner Losh.endif 3855e84b765SWarner Losh 3865e84b765SWarner Losh.if ${MK_CRYPT} == "no" 3875e84b765SWarner LoshMK_OPENSSL:= no 3885e84b765SWarner LoshMK_OPENSSH:= no 3895e84b765SWarner LoshMK_KERBEROS:= no 3905e84b765SWarner Losh.endif 3915e84b765SWarner Losh 3925e84b765SWarner Losh.if ${MK_CXX} == "no" 3935e84b765SWarner LoshMK_CLANG:= no 3949e88096eSWarner LoshMK_GNUCXX:= no 3958a9745b5SEd MasteMK_TESTS:= no 3965e84b765SWarner Losh.endif 3975e84b765SWarner Losh 398f987297fSEd Maste.if ${MK_DIALOG} == "no" 399f987297fSEd MasteMK_BSDINSTALL:= no 400f987297fSEd Maste.endif 401f987297fSEd Maste 4025e84b765SWarner Losh.if ${MK_MAIL} == "no" 4035e84b765SWarner LoshMK_MAILWRAPPER:= no 4045e84b765SWarner LoshMK_SENDMAIL:= no 4055e84b765SWarner LoshMK_DMAGENT:= no 4065e84b765SWarner Losh.endif 4075e84b765SWarner Losh 4085e84b765SWarner Losh.if ${MK_NETGRAPH} == "no" 4095e84b765SWarner LoshMK_ATM:= no 4105e84b765SWarner LoshMK_BLUETOOTH:= no 4115e84b765SWarner Losh.endif 4125e84b765SWarner Losh 413edb58145SEnji Cooper.if ${MK_NLS} == "no" 414edb58145SEnji CooperMK_NLS_CATALOGS:= no 415edb58145SEnji Cooper.endif 416edb58145SEnji Cooper 4175e84b765SWarner Losh.if ${MK_OPENSSL} == "no" 4185e84b765SWarner LoshMK_OPENSSH:= no 4195e84b765SWarner LoshMK_KERBEROS:= no 4205e84b765SWarner Losh.endif 4215e84b765SWarner Losh 4225e84b765SWarner Losh.if ${MK_PF} == "no" 4235e84b765SWarner LoshMK_AUTHPF:= no 4245e84b765SWarner Losh.endif 4255e84b765SWarner Losh 426d912066cSMark Johnston.if ${MK_TESTS} == "no" 427d912066cSMark JohnstonMK_DTRACE_TESTS:= no 428d912066cSMark Johnston.endif 429d912066cSMark Johnston 430c5cba060SEnji Cooper.if ${MK_ZONEINFO} == "no" 431c5cba060SEnji CooperMK_ZONEINFO_LEAPSECONDS_SUPPORT:= no 432c5cba060SEnji CooperMK_ZONEINFO_OLD_TIMEZONES_SUPPORT:= no 433c5cba060SEnji Cooper.endif 434c5cba060SEnji Cooper 4355e84b765SWarner Losh.if ${MK_CROSS_COMPILER} == "no" 4365e84b765SWarner LoshMK_BINUTILS_BOOTSTRAP:= no 4375e84b765SWarner LoshMK_CLANG_BOOTSTRAP:= no 43808474898SEd MasteMK_ELFTOOLCHAIN_BOOTSTRAP:= no 4395e84b765SWarner LoshMK_GCC_BOOTSTRAP:= no 4405e84b765SWarner Losh.endif 4415e84b765SWarner Losh 4425e84b765SWarner Losh.if ${MK_TOOLCHAIN} == "no" 4435e84b765SWarner LoshMK_BINUTILS:= no 4445e84b765SWarner LoshMK_CLANG:= no 4455e84b765SWarner LoshMK_GCC:= no 4465e84b765SWarner LoshMK_GDB:= no 447590461a4SWarner LoshMK_INCLUDES:= no 448e5928414SEd MasteMK_LLD:= no 44911e49977SBryan DreweryMK_LLDB:= no 4505e84b765SWarner Losh.endif 4515e84b765SWarner Losh 4525e84b765SWarner Losh.if ${MK_CLANG} == "no" 4535e84b765SWarner LoshMK_CLANG_EXTRAS:= no 4545e84b765SWarner LoshMK_CLANG_FULL:= no 4551b49115aSEd MasteMK_LLVM_COV:= no 4565e84b765SWarner Losh.endif 4575e84b765SWarner Losh 4585e84b765SWarner Losh# 4594301886dSEnji Cooper# MK_* options whose default value depends on another option. 4604301886dSEnji Cooper# 4614301886dSEnji Cooper.for vv in \ 4624301886dSEnji Cooper GSSAPI/KERBEROS \ 4634301886dSEnji Cooper MAN_UTILS/MAN 4644301886dSEnji Cooper.if defined(WITH_${vv:H}) 4654301886dSEnji CooperMK_${vv:H}:= yes 4664301886dSEnji Cooper.elif defined(WITHOUT_${vv:H}) 4674301886dSEnji CooperMK_${vv:H}:= no 4684301886dSEnji Cooper.else 4694301886dSEnji CooperMK_${vv:H}:= ${MK_${vv:T}} 4704301886dSEnji Cooper.endif 4714301886dSEnji Cooper.endfor 4724301886dSEnji Cooper 4734301886dSEnji Cooper# 4745e84b765SWarner Losh# Set defaults for the MK_*_SUPPORT variables. 4755e84b765SWarner Losh# 4765e84b765SWarner Losh 4775e84b765SWarner Losh# 4785e84b765SWarner Losh# MK_*_SUPPORT options which default to "yes" unless their corresponding 4795e84b765SWarner Losh# MK_* variable is set to "no". 4805e84b765SWarner Losh# 4815e84b765SWarner Losh.for var in \ 48295856e14SKurt Lidl BLACKLIST \ 4835e84b765SWarner Losh BZIP2 \ 4845e84b765SWarner Losh INET \ 4855e84b765SWarner Losh INET6 \ 4865e84b765SWarner Losh KERBEROS \ 4875e84b765SWarner Losh KVM \ 4885e84b765SWarner Losh NETGRAPH \ 4895e84b765SWarner Losh PAM \ 490b55e8e6eSWarner Losh TESTS \ 4915e84b765SWarner Losh WIRELESS 4925e84b765SWarner Losh.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 4935e84b765SWarner LoshMK_${var}_SUPPORT:= no 4945e84b765SWarner Losh.else 4955e84b765SWarner LoshMK_${var}_SUPPORT:= yes 4965e84b765SWarner Losh.endif 4975e84b765SWarner Losh.endfor 4985e84b765SWarner Losh 4995e84b765SWarner Losh.if !${COMPILER_FEATURES:Mc++11} 5005e84b765SWarner LoshMK_LLDB:= no 5015e84b765SWarner Losh.endif 5025e84b765SWarner Losh 503ff2cf368SBaptiste Daroussin# gcc 4.8 and newer supports libc++, so suppress gnuc++ in that case. 504ff2cf368SBaptiste Daroussin# while in theory we could build it with that, we don't want to do 505ff2cf368SBaptiste Daroussin# that since it creates too much confusion for too little gain. 50607394091SBryan Drewery# XXX: This is incomplete and needs X_COMPILER_TYPE/VERSION checks too 50707394091SBryan Drewery# to prevent Makefile.inc1 from bootstrapping unneeded dependencies 50807394091SBryan Drewery# and to support 'make delete-old' when supplying an external toolchain. 509ff2cf368SBaptiste Daroussin.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800 510ff2cf368SBaptiste DaroussinMK_GNUCXX:=no 511ff2cf368SBaptiste DaroussinMK_GCC:=no 5125e84b765SWarner Losh.endif 513ff2cf368SBaptiste Daroussin 514ff2cf368SBaptiste Daroussin.endif # !target(__<src.opts.mk>__) 515