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 445e84b765SWarner Losh# These options are used by src the builds 455e84b765SWarner Losh 465e84b765SWarner Losh__DEFAULT_YES_OPTIONS = \ 475e84b765SWarner Losh ACCT \ 485e84b765SWarner Losh ACPI \ 495e84b765SWarner Losh AMD \ 505e84b765SWarner Losh APM \ 515e84b765SWarner Losh AT \ 525e84b765SWarner Losh ATM \ 535e84b765SWarner Losh AUDIT \ 545e84b765SWarner Losh AUTHPF \ 55b3590423SEnji Cooper AUTOFS \ 5602629e46SEnji Cooper BHYVE \ 575e84b765SWarner Losh BINUTILS \ 585e84b765SWarner Losh BINUTILS_BOOTSTRAP \ 5995856e14SKurt Lidl BLACKLIST \ 605e84b765SWarner Losh BLUETOOTH \ 615e84b765SWarner Losh BOOT \ 6211981695SEnji Cooper BOOTPARAMD \ 6311981695SEnji Cooper BOOTPD \ 645e84b765SWarner Losh BSD_CPIO \ 65e45b569cSEnji Cooper BSDINSTALL \ 665e84b765SWarner Losh BSNMP \ 675e84b765SWarner Losh BZIP2 \ 685e84b765SWarner Losh CALENDAR \ 695e84b765SWarner Losh CAPSICUM \ 705e84b765SWarner Losh CASPER \ 7118cc3172SEnji Cooper CCD \ 725e84b765SWarner Losh CDDL \ 735e84b765SWarner Losh CPP \ 745e84b765SWarner Losh CROSS_COMPILER \ 755e84b765SWarner Losh CRYPT \ 765e84b765SWarner Losh CTM \ 7736716419SHans Petter Selasky CUSE \ 785e84b765SWarner Losh CXX \ 79f987297fSEd Maste DIALOG \ 805e84b765SWarner Losh DICT \ 815e84b765SWarner Losh DMAGENT \ 825e84b765SWarner Losh DYNAMICROOT \ 835e84b765SWarner Losh ED_CRYPTO \ 8479a86dafSEnji Cooper EE \ 85d49a5dddSWarner Losh EFI \ 8608474898SEd Maste ELFTOOLCHAIN_BOOTSTRAP \ 875e84b765SWarner Losh EXAMPLES \ 885e84b765SWarner Losh FDT \ 89c7b6816fSEnji Cooper FILE \ 9011981695SEnji Cooper FINGER \ 915e84b765SWarner Losh FLOPPY \ 925e84b765SWarner Losh FMTREE \ 935e84b765SWarner Losh FORTH \ 945e84b765SWarner Losh FP_LIBC \ 955e84b765SWarner Losh FREEBSD_UPDATE \ 9611981695SEnji Cooper FTP \ 975e84b765SWarner Losh GAMES \ 985e84b765SWarner Losh GCOV \ 995e84b765SWarner Losh GDB \ 1005e84b765SWarner Losh GNU \ 10194ff3d03SEd Maste GNU_DIFF \ 10294ff3d03SEd Maste GNU_GREP \ 1035e84b765SWarner Losh GNU_GREP_COMPAT \ 1045e84b765SWarner Losh GPIO \ 1055e84b765SWarner Losh GPL_DTC \ 1065e84b765SWarner Losh GROFF \ 1074e395054SEnji Cooper HAST \ 1085e84b765SWarner Losh HTML \ 109f8080a99SWarner Losh HYPERV \ 1105e84b765SWarner Losh ICONV \ 1115e84b765SWarner Losh INET \ 1125e84b765SWarner Losh INET6 \ 11311981695SEnji Cooper INETD \ 1145e84b765SWarner Losh IPFILTER \ 1155e84b765SWarner Losh IPFW \ 116b29d6977SEnji Cooper ISCSI \ 1175e84b765SWarner Losh JAIL \ 1185e84b765SWarner Losh KDUMP \ 1195e84b765SWarner Losh KVM \ 1205e84b765SWarner Losh LDNS \ 1215e84b765SWarner Losh LDNS_UTILS \ 1225e84b765SWarner Losh LEGACY_CONSOLE \ 1235e84b765SWarner Losh LIB32 \ 1245e84b765SWarner Losh LIBPTHREAD \ 1255e84b765SWarner Losh LIBTHR \ 1265e84b765SWarner Losh LOCALES \ 1275e84b765SWarner Losh LOCATE \ 1285e84b765SWarner Losh LPR \ 1295e84b765SWarner Losh LS_COLORS \ 1305e84b765SWarner Losh LZMA_SUPPORT \ 1315e84b765SWarner Losh MAIL \ 1325e84b765SWarner Losh MAILWRAPPER \ 1335e84b765SWarner Losh MAKE \ 1348faa40d1SBaptiste Daroussin MANDOCDB \ 1355e84b765SWarner Losh NDIS \ 1365e84b765SWarner Losh NETCAT \ 1375e84b765SWarner Losh NETGRAPH \ 1385e84b765SWarner Losh NLS_CATALOGS \ 1395e84b765SWarner Losh NS_CACHING \ 1405e84b765SWarner Losh NTP \ 1415e84b765SWarner Losh OPENSSL \ 1425e84b765SWarner Losh PAM \ 1435e84b765SWarner Losh PC_SYSINSTALL \ 1445e84b765SWarner Losh PF \ 1455e84b765SWarner Losh PKGBOOTSTRAP \ 1465e84b765SWarner Losh PMC \ 1475e84b765SWarner Losh PORTSNAP \ 1485e84b765SWarner Losh PPP \ 1495e84b765SWarner Losh QUOTAS \ 15031a741f4SEnji Cooper RADIUS_SUPPORT \ 1515e84b765SWarner Losh RCMDS \ 15211981695SEnji Cooper RBOOTD \ 1535e84b765SWarner Losh RESCUE \ 1545e84b765SWarner Losh ROUTED \ 1555e84b765SWarner Losh SENDMAIL \ 1565e84b765SWarner Losh SETUID_LOGIN \ 1575e84b765SWarner Losh SHAREDOCS \ 1585e84b765SWarner Losh SOURCELESS \ 1595e84b765SWarner Losh SOURCELESS_HOST \ 1605e84b765SWarner Losh SOURCELESS_UCODE \ 1615e84b765SWarner Losh SVNLITE \ 1625e84b765SWarner Losh SYSCONS \ 163bf16c2e9SBryan Drewery SYSTEM_COMPILER \ 1643f802165SEnji Cooper TALK \ 16511981695SEnji Cooper TCP_WRAPPERS \ 1665e84b765SWarner Losh TCSH \ 1675e84b765SWarner Losh TELNET \ 168b85bd43aSJulio Merino TESTS \ 1695e84b765SWarner Losh TEXTPROC \ 17011981695SEnji Cooper TFTP \ 17111981695SEnji Cooper TIMED \ 1725e84b765SWarner Losh UNBOUND \ 1735e84b765SWarner Losh USB \ 1745e84b765SWarner Losh UTMPX \ 1755e84b765SWarner Losh VI \ 176824a9093SEd Maste VT \ 1775e84b765SWarner Losh WIRELESS \ 1785e84b765SWarner Losh WPA_SUPPLICANT_EAPOL \ 1795e84b765SWarner Losh ZFS \ 1805e84b765SWarner Losh ZONEINFO 1815e84b765SWarner Losh 1825e84b765SWarner Losh__DEFAULT_NO_OPTIONS = \ 1835e84b765SWarner Losh BSD_GREP \ 1845e84b765SWarner Losh CLANG_EXTRAS \ 185d912066cSMark Johnston DTRACE_TESTS \ 1865e84b765SWarner Losh EISA \ 1875e84b765SWarner Losh HESIOD \ 188c42ade60SWarner Losh LIBSOFT \ 1895e84b765SWarner Losh NAND \ 1905e84b765SWarner Losh OFED \ 1915e84b765SWarner Losh OPENLDAP \ 192a97b7160SEd Maste REPRODUCIBLE_BUILD \ 1935e84b765SWarner Losh SHARED_TOOLCHAIN \ 1945e84b765SWarner Losh SORT_THREADS \ 1956120aabdSBryan Drewery SVN \ 1966120aabdSBryan Drewery 1975e84b765SWarner Losh 1985e84b765SWarner Losh# 1995e84b765SWarner Losh# Default behaviour of some options depends on the architecture. Unfortunately 2005e84b765SWarner Losh# this means that we have to test TARGET_ARCH (the buildworld case) as well 2015e84b765SWarner Losh# as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not 2025e84b765SWarner Losh# used at all in bsd.*.mk, but we have to make an exception here if we want 2035e84b765SWarner Losh# to allow defaults for some things like clang to vary by target architecture. 2045e84b765SWarner Losh# Additional, per-target behavior should be rarely added only after much 2055e84b765SWarner Losh# gnashing of teeth and grinding of gears. 2065e84b765SWarner Losh# 2075e84b765SWarner Losh.if defined(TARGET_ARCH) 2085e84b765SWarner Losh__T=${TARGET_ARCH} 2095e84b765SWarner Losh.else 2105e84b765SWarner Losh__T=${MACHINE_ARCH} 2115e84b765SWarner Losh.endif 2125e84b765SWarner Losh.if defined(TARGET) 2135e84b765SWarner Losh__TT=${TARGET} 2145e84b765SWarner Losh.else 2155e84b765SWarner Losh__TT=${MACHINE} 2165e84b765SWarner Losh.endif 2170104753bSDimitry Andric 2180104753bSDimitry Andric.include <bsd.compiler.mk> 2198758abd5SBryan Drewery# If the compiler is not C++11 capable, disable Clang and use GCC instead. 2208758abd5SBryan Drewery# This means that architectures that have GCC 4.2 as default can not 2218758abd5SBryan Drewery# build Clang without using an external compiler. 2228758abd5SBryan Drewery 2238758abd5SBryan Drewery.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ 2248758abd5SBryan Drewery ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") 2258758abd5SBryan Drewery# Clang is enabled, and will be installed as the default /usr/bin/cc. 226*dfccd92cSEd Maste__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD 2270104753bSDimitry Andric__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX 22860af5546SEd Maste.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "riscv64" && ${__T} != "sparc64" 22960af5546SEd Maste# If an external compiler that supports C++11 is used as ${CC} and Clang 23060af5546SEd Maste# supports the target, then Clang is enabled but GCC is installed as the 23160af5546SEd Maste# default /usr/bin/cc. 2320104753bSDimitry Andric__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX 233*dfccd92cSEd Maste__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC LLD 2340104753bSDimitry Andric.else 2358758abd5SBryan Drewery# Everything else disables Clang, and uses GCC instead. 2360104753bSDimitry Andric__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX 237*dfccd92cSEd Maste__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD 2385e84b765SWarner Losh.endif 2391cee64a8SEd Maste# In-tree binutils/gcc are older versions without modern architecture support. 2407804dd52SRuslan Bukin.if ${__T} == "aarch64" || ${__T:Mriscv*} != "" 241054f15acSEnji CooperBROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB 2428daa8167SAndrew Turner.endif 2437804dd52SRuslan Bukin.if ${__T:Mriscv*} != "" 2441fdcc5e5SRuslan BukinBROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" 2451fdcc5e5SRuslan BukinBROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" 2461fdcc5e5SRuslan BukinBROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" 2471fdcc5e5SRuslan Bukin.endif 24806b41817SEd Maste.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ 2497804dd52SRuslan Bukin ${__T:Mriscv*} != "" 25006b41817SEd Maste__DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND 25106b41817SEd Maste.else 25206b41817SEd Maste__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND 25306b41817SEd Maste.endif 2540aa5466eSEd Maste.if ${__T} == "aarch64" 2550aa5466eSEd Maste__DEFAULT_YES_OPTIONS+=LLD_AS_LD 2560aa5466eSEd Maste.else 2570aa5466eSEd Maste__DEFAULT_NO_OPTIONS+=LLD_AS_LD 2580aa5466eSEd Maste.endif 259d0ba16f7SEd Maste.if ${__T} == "aarch64" || ${__T} == "amd64" 260*dfccd92cSEd Maste__DEFAULT_YES_OPTIONS+=LLDB 261d0ba16f7SEd Maste.else 262*dfccd92cSEd Maste__DEFAULT_NO_OPTIONS+=LLDB 263d0ba16f7SEd Maste.endif 264ac99c33fSEd Maste# LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 265ac99c33fSEd Maste.if ${__T} == "arm" || ${__T} == "armeb" 266ac99c33fSEd MasteBROKEN_OPTIONS+=LLDB 267ac99c33fSEd Maste.endif 268c42ade60SWarner Losh# Only doing soft float API stuff on armv6 269c42ade60SWarner Losh.if ${__T} != "armv6" 270c42ade60SWarner LoshBROKEN_OPTIONS+=LIBSOFT 271c42ade60SWarner Losh.endif 2723d79fdacSWarner Losh.if ${__T:Mmips*} 2735bec6d55SRuslan BukinBROKEN_OPTIONS+=SSP 2745bec6d55SRuslan Bukin.endif 275d49a5dddSWarner Losh.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*} 276d49a5dddSWarner LoshBROKEN_OPTIONS+=EFI 277d49a5dddSWarner Losh.endif 2785e84b765SWarner Losh 2795e84b765SWarner Losh.include <bsd.mkopt.mk> 2805e84b765SWarner Losh 2815e84b765SWarner Losh# 2825e84b765SWarner Losh# MK_* options that default to "yes" if the compiler is a C++11 compiler. 2835e84b765SWarner Losh# 2845e84b765SWarner Losh.for var in \ 2855e84b765SWarner Losh LIBCPLUSPLUS 2865e84b765SWarner Losh.if !defined(MK_${var}) 2875e84b765SWarner Losh.if ${COMPILER_FEATURES:Mc++11} 2885e84b765SWarner Losh.if defined(WITHOUT_${var}) 2895e84b765SWarner LoshMK_${var}:= no 2905e84b765SWarner Losh.else 2915e84b765SWarner LoshMK_${var}:= yes 2925e84b765SWarner Losh.endif 2935e84b765SWarner Losh.else 2945e84b765SWarner Losh.if defined(WITH_${var}) 2955e84b765SWarner LoshMK_${var}:= yes 2965e84b765SWarner Losh.else 2975e84b765SWarner LoshMK_${var}:= no 2985e84b765SWarner Losh.endif 2995e84b765SWarner Losh.endif 3005e84b765SWarner Losh.endif 3015e84b765SWarner Losh.endfor 3025e84b765SWarner Losh 3035e84b765SWarner Losh# 3045e84b765SWarner Losh# Force some options off if their dependencies are off. 3055e84b765SWarner Losh# Order is somewhat important. 3065e84b765SWarner Losh# 30793cdeb4aSEd Maste.if !${COMPILER_FEATURES:Mc++11} 30893cdeb4aSEd MasteMK_LLVM_LIBUNWIND:= no 30993cdeb4aSEd Maste.endif 31093cdeb4aSEd Maste 311fa0b3585SEd Maste.if ${MK_BINUTILS} == "no" 312fa0b3585SEd MasteMK_GDB:= no 313fa0b3585SEd Maste.endif 314fa0b3585SEd Maste 31558551dc6SBaptiste Daroussin.if ${MK_CAPSICUM} == "no" 31658551dc6SBaptiste DaroussinMK_CASPER:= no 31758551dc6SBaptiste Daroussin.endif 31858551dc6SBaptiste Daroussin 3195e84b765SWarner Losh.if ${MK_LIBPTHREAD} == "no" 3205e84b765SWarner LoshMK_LIBTHR:= no 3215e84b765SWarner Losh.endif 3225e84b765SWarner Losh 3235e84b765SWarner Losh.if ${MK_LDNS} == "no" 3245e84b765SWarner LoshMK_LDNS_UTILS:= no 3255e84b765SWarner LoshMK_UNBOUND:= no 3265e84b765SWarner Losh.endif 3275e84b765SWarner Losh 3285e84b765SWarner Losh.if ${MK_SOURCELESS} == "no" 3295e84b765SWarner LoshMK_SOURCELESS_HOST:= no 3305e84b765SWarner LoshMK_SOURCELESS_UCODE:= no 3315e84b765SWarner Losh.endif 3325e84b765SWarner Losh 3335e84b765SWarner Losh.if ${MK_CDDL} == "no" 3345e84b765SWarner LoshMK_ZFS:= no 3355e84b765SWarner LoshMK_CTF:= no 3365e84b765SWarner Losh.endif 3375e84b765SWarner Losh 3385e84b765SWarner Losh.if ${MK_CRYPT} == "no" 3395e84b765SWarner LoshMK_OPENSSL:= no 3405e84b765SWarner LoshMK_OPENSSH:= no 3415e84b765SWarner LoshMK_KERBEROS:= no 3425e84b765SWarner Losh.endif 3435e84b765SWarner Losh 3445e84b765SWarner Losh.if ${MK_CXX} == "no" 3455e84b765SWarner LoshMK_CLANG:= no 3465e84b765SWarner LoshMK_GROFF:= no 3479e88096eSWarner LoshMK_GNUCXX:= no 3488a9745b5SEd MasteMK_TESTS:= no 3495e84b765SWarner Losh.endif 3505e84b765SWarner Losh 351f987297fSEd Maste.if ${MK_DIALOG} == "no" 352f987297fSEd MasteMK_BSDINSTALL:= no 353f987297fSEd Maste.endif 354f987297fSEd Maste 3555e84b765SWarner Losh.if ${MK_MAIL} == "no" 3565e84b765SWarner LoshMK_MAILWRAPPER:= no 3575e84b765SWarner LoshMK_SENDMAIL:= no 3585e84b765SWarner LoshMK_DMAGENT:= no 3595e84b765SWarner Losh.endif 3605e84b765SWarner Losh 3615e84b765SWarner Losh.if ${MK_NETGRAPH} == "no" 3625e84b765SWarner LoshMK_ATM:= no 3635e84b765SWarner LoshMK_BLUETOOTH:= no 3645e84b765SWarner Losh.endif 3655e84b765SWarner Losh 3665e84b765SWarner Losh.if ${MK_OPENSSL} == "no" 3675e84b765SWarner LoshMK_OPENSSH:= no 3685e84b765SWarner LoshMK_KERBEROS:= no 3695e84b765SWarner Losh.endif 3705e84b765SWarner Losh 3715e84b765SWarner Losh.if ${MK_PF} == "no" 3725e84b765SWarner LoshMK_AUTHPF:= no 3735e84b765SWarner Losh.endif 3745e84b765SWarner Losh 375d912066cSMark Johnston.if ${MK_TESTS} == "no" 376d912066cSMark JohnstonMK_DTRACE_TESTS:= no 377d912066cSMark Johnston.endif 378d912066cSMark Johnston 3795e84b765SWarner Losh.if ${MK_TEXTPROC} == "no" 3805e84b765SWarner LoshMK_GROFF:= no 3815e84b765SWarner Losh.endif 3825e84b765SWarner Losh 3835e84b765SWarner Losh.if ${MK_CROSS_COMPILER} == "no" 3845e84b765SWarner LoshMK_BINUTILS_BOOTSTRAP:= no 3855e84b765SWarner LoshMK_CLANG_BOOTSTRAP:= no 38608474898SEd MasteMK_ELFTOOLCHAIN_BOOTSTRAP:= no 3875e84b765SWarner LoshMK_GCC_BOOTSTRAP:= no 3885e84b765SWarner Losh.endif 3895e84b765SWarner Losh 3905e84b765SWarner Losh.if ${MK_TOOLCHAIN} == "no" 3915e84b765SWarner LoshMK_BINUTILS:= no 3925e84b765SWarner LoshMK_CLANG:= no 3935e84b765SWarner LoshMK_GCC:= no 3945e84b765SWarner LoshMK_GDB:= no 395590461a4SWarner LoshMK_INCLUDES:= no 39611e49977SBryan DreweryMK_LLDB:= no 3975e84b765SWarner Losh.endif 3985e84b765SWarner Losh 3995e84b765SWarner Losh.if ${MK_CLANG} == "no" 4005e84b765SWarner LoshMK_CLANG_EXTRAS:= no 4015e84b765SWarner LoshMK_CLANG_FULL:= no 4025e84b765SWarner Losh.endif 4035e84b765SWarner Losh 4045e84b765SWarner Losh# 4054301886dSEnji Cooper# MK_* options whose default value depends on another option. 4064301886dSEnji Cooper# 4074301886dSEnji Cooper.for vv in \ 4084301886dSEnji Cooper GSSAPI/KERBEROS \ 4094301886dSEnji Cooper MAN_UTILS/MAN 4104301886dSEnji Cooper.if defined(WITH_${vv:H}) 4114301886dSEnji CooperMK_${vv:H}:= yes 4124301886dSEnji Cooper.elif defined(WITHOUT_${vv:H}) 4134301886dSEnji CooperMK_${vv:H}:= no 4144301886dSEnji Cooper.else 4154301886dSEnji CooperMK_${vv:H}:= ${MK_${vv:T}} 4164301886dSEnji Cooper.endif 4174301886dSEnji Cooper.endfor 4184301886dSEnji Cooper 4194301886dSEnji Cooper# 4205e84b765SWarner Losh# Set defaults for the MK_*_SUPPORT variables. 4215e84b765SWarner Losh# 4225e84b765SWarner Losh 4235e84b765SWarner Losh# 4245e84b765SWarner Losh# MK_*_SUPPORT options which default to "yes" unless their corresponding 4255e84b765SWarner Losh# MK_* variable is set to "no". 4265e84b765SWarner Losh# 4275e84b765SWarner Losh.for var in \ 42895856e14SKurt Lidl BLACKLIST \ 4295e84b765SWarner Losh BZIP2 \ 4305e84b765SWarner Losh GNU \ 4315e84b765SWarner Losh INET \ 4325e84b765SWarner Losh INET6 \ 4335e84b765SWarner Losh KERBEROS \ 4345e84b765SWarner Losh KVM \ 4355e84b765SWarner Losh NETGRAPH \ 4365e84b765SWarner Losh PAM \ 437b55e8e6eSWarner Losh TESTS \ 4385e84b765SWarner Losh WIRELESS 4395e84b765SWarner Losh.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 4405e84b765SWarner LoshMK_${var}_SUPPORT:= no 4415e84b765SWarner Losh.else 4425e84b765SWarner LoshMK_${var}_SUPPORT:= yes 4435e84b765SWarner Losh.endif 4445e84b765SWarner Losh.endfor 4455e84b765SWarner Losh 4465e84b765SWarner Losh.if !${COMPILER_FEATURES:Mc++11} 4475e84b765SWarner LoshMK_LLDB:= no 4485e84b765SWarner Losh.endif 4495e84b765SWarner Losh 450ff2cf368SBaptiste Daroussin# gcc 4.8 and newer supports libc++, so suppress gnuc++ in that case. 451ff2cf368SBaptiste Daroussin# while in theory we could build it with that, we don't want to do 452ff2cf368SBaptiste Daroussin# that since it creates too much confusion for too little gain. 45307394091SBryan Drewery# XXX: This is incomplete and needs X_COMPILER_TYPE/VERSION checks too 45407394091SBryan Drewery# to prevent Makefile.inc1 from bootstrapping unneeded dependencies 45507394091SBryan Drewery# and to support 'make delete-old' when supplying an external toolchain. 456ff2cf368SBaptiste Daroussin.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800 457ff2cf368SBaptiste DaroussinMK_GNUCXX:=no 458ff2cf368SBaptiste DaroussinMK_GCC:=no 4595e84b765SWarner Losh.endif 460ff2cf368SBaptiste Daroussin 461ff2cf368SBaptiste Daroussin.endif # !target(__<src.opts.mk>__) 462