diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 86 |
1 files changed, 82 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 2bb011f..29f58e2 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,28 @@ AM_PROG_AR AC_PROG_INSTALL AC_PROG_MAKE_SET +# Add an option to enable/disable safe mode in boot flags +AC_ARG_ENABLE([boot-flag-safe-mode-support], + AS_HELP_STRING([--disable-boot-flag-safe-mode-support], [Disable safe mode option in boot flags. [default=enable]]) +) +AS_IF([test "x$enable_boot_flag_safe_mode_support" != "xno"], + AC_MSG_NOTICE([Enabling safe mode option in boot flags]) + [cpp_flags="-DENABLE_BOOT_FLAG_SAFE_MODE_SUPPORT"] + AC_SUBST([CPPFLAGS], [$cpp_flags]), + AC_MSG_WARN([Disabling safe mode option in boot flags]) +) + +# Add an option to enable/disable i2c master write read command white list checking +AC_ARG_ENABLE([i2c-whitelist-check], + AS_HELP_STRING([--disable-i2c-whitelist-check], [Disable I2C master write read command white list check. [default=enable]]) +) +AS_IF([test "x$enable_i2c_whitelist_check" != "xno"], + AC_MSG_NOTICE([Enabling I2C master write read command white list check]) + [cpp_flags="-DENABLE_I2C_WHITELIST_CHECK"] + AC_SUBST([CPPFLAGS], [$cpp_flags]), + AC_MSG_WARN([Disabling I2C master write read command white list check]) +) + # softoff dir specific ones AC_ARG_ENABLE([softoff], AS_HELP_STRING([--enable-softoff], [Builds soft power off]) @@ -103,20 +125,24 @@ if test -z "$WHITELIST_CONF"; then WHITELIST_CONF=${srcdir}/host-ipmid-whitelist.conf fi -AS_IF([test "x$SENSOR_YAML_GEN" == "x"], [SENSOR_YAML_GEN="sensor-example.yaml"]) +AS_IF([test "x$SENSOR_YAML_GEN" == "x"], [SENSOR_YAML_GEN="$srcdir/scripts/sensor-example.yaml"]) SENSORGEN="$PYTHON ${srcdir}/scripts/sensor_gen.py -i $SENSOR_YAML_GEN" +AC_SUBST(SENSOR_YAML_GEN) AC_SUBST(SENSORGEN) -AS_IF([test "x$INVSENSOR_YAML_GEN" == "x"], [INVSENSOR_YAML_GEN="inventory-sensor-example.yaml"]) +AS_IF([test "x$INVSENSOR_YAML_GEN" == "x"], [INVSENSOR_YAML_GEN="$srcdir/scripts/inventory-sensor-example.yaml"]) INVSENSORGEN="$PYTHON ${srcdir}/scripts/inventory-sensor.py -i $INVSENSOR_YAML_GEN" +AC_SUBST(INVSENSOR_YAML_GEN) AC_SUBST(INVSENSORGEN) -AS_IF([test "x$FRU_YAML_GEN" == "x"], [FRU_YAML_GEN="fru-read-example.yaml"]) +AS_IF([test "x$FRU_YAML_GEN" == "x"], [FRU_YAML_GEN="$srcdir/scripts/fru-read-example.yaml"]) FRUGEN="$PYTHON $srcdir/scripts/fru_gen.py -i $FRU_YAML_GEN" +AC_SUBST(FRU_YAML_GEN) AC_SUBST(FRUGEN) -AS_IF([test "x$ENTITY_YAML_GEN" == "x"], [ENTITY_YAML_GEN="entity-example.yaml"]) +AS_IF([test "x$ENTITY_YAML_GEN" == "x"], [ENTITY_YAML_GEN="$srcdir/scripts/entity-example.yaml"]) ENTITYGEN="$PYTHON $srcdir/scripts/entity_gen.py -i $ENTITY_YAML_GEN" +AC_SUBST(ENTITY_YAML_GEN) AC_SUBST(ENTITYGEN) AC_DEFINE(CALLOUT_FWD_ASSOCIATION, "callout", [The name of the callout's forward association.]) @@ -188,6 +214,58 @@ AC_ARG_VAR(HOST_IPMI_LIB_PATH, [The file path to search for libraries.]) AS_IF([test "x$HOST_IPMI_LIB_PATH" == "x"], [HOST_IPMI_LIB_PATH="/usr/lib/ipmid-providers/"]) AC_DEFINE_UNQUOTED([HOST_IPMI_LIB_PATH], ["$HOST_IPMI_LIB_PATH"], [The file path to search for libraries.]) +# When a sensor read fails, hwmon will update the OperationalState interface's Functional property. +# This will mark the sensor as not functional and we will skip reading from that sensor. +AC_ARG_ENABLE([update-functional-on-fail], + AS_HELP_STRING( + [--enable-update-functional-on-fail], + [Check functional property to skip reading from faulty sensors.] + ) +) + +AC_ARG_VAR(UPDATE_FUNCTIONAL_ON_FAIL, [Check functional property to skip reading from faulty sensors.]) +AS_IF( + [test "x$enable_update_functional_on_fail" == "xyes"], + [UPDATE_FUNCTIONAL_ON_FAIL="yes"] + AC_DEFINE_UNQUOTED( + [UPDATE_FUNCTIONAL_ON_FAIL], + ["$UPDATE_FUNCTIONAL_ON_FAIL"], + [Check functional property to skip reading from faulty sensors.] + ) +) + +# When disable-libuserlayer flag is set, libuserlayer won't be included in the build. +AC_ARG_ENABLE([libuserlayer], + AS_HELP_STRING([--disable-libuserlayer], [Set a flag to exclude libuserlayer]) +) +AM_CONDITIONAL(FEATURE_LIBUSERLAYER, [test "x$enable_libuserlayer" != "xno"]) + +# When enable-transport-oem flag is set, the transporthandler_oem.cpp contents +# are compiled and added to the project. The transporthandler_oem.cpp file is +# copied from your own customization layer in the +# phosphor-ipmi-host_%.bbappend file. It is not necessary to create this file +# unless OEM Parameter extensions are required. +AC_ARG_ENABLE([transport_oem], + [ --enable-transport-oem Enable/disable OEM Parameter extensions], + [case "${enableval}" in + yes) transport_oem=true ;; + no) transport_oem=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-transport_oem]) ;; + esac],[transport_oem=false] + ) +AM_CONDITIONAL([FEATURE_TRANSPORT_OEM], [test x$transport_oem = xtrue]) + +# IPMI whitelist mechanism is not needed by everyone; offer a way to disable it +AC_ARG_ENABLE([ipmi-whitelist], + [ --enable-ipmi-whitelist Enable/disable IPMI whitelist filtering], + [case "${enableval}" in + yes) ipmi_whitelist=true ;; + no) ipmi_whitelist=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-ipmi-whitelist]) ;; + esac],[ipmi_whitelist=true] + ) +AM_CONDITIONAL([FEATURE_IPMI_WHITELIST], [test x$ipmi_whitelist = xtrue]) + # Create configured output AC_CONFIG_FILES([ Makefile |