--without-default-features 选项将设置 default_feature 为 no
1 2 3 4 5 6 7 8 9 10
default_feature="" # parse CC options second for opt do optarg=$(expr"x$opt" : 'x[^=]*=\(.*\)') case"$opt"in --without-default-features) default_feature="no" ;; esac done
# RDMA needs OpenFabrics libraries iftest"$rdma" != "no" ; then cat > $TMPC <<EOF #include <rdma/rdma_cma.h> int main(void) { return 0; } EOF rdma_libs="-lrdmacm -libverbs -libumad" if compile_prog """$rdma_libs" ; then rdma="yes" else iftest"$rdma" = "yes" ; then error_exit \ " OpenFabrics librdmacm/libibverbs/libibumad not present." \ " Your options:" \ " (1) Fast: Install infiniband packages (devel) from your distro." \ " (2) Cleanest: Install libraries from www.openfabrics.org" \ " (3) Also: Install softiwarp if you don't have RDMA hardware" fi rdma="no" fi fi
meson 构建选项实现的开关
enabled/disabled/auto,如:vnc="enabled"
If the value of a feature option is set to auto, that value is overridden by the global auto_features option (which defaults to auto). This is intended to be used by packagers who want to have full control on which dependencies are required and which are disabled, and not rely on build-deps being installed (at the right version) to get a feature enabled. They could set auto_features=enabled to enable all features and disable explicitly only the few they don’t want, if any.