diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 26b5cc4..648d018 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,9 @@ AC_PROG_CXX AM_PROG_AR AC_PROG_INSTALL AC_PROG_MAKE_SET +# Python +AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])], +[AC_MSG_ERROR([Could not find python-2.7 installed...python-2.7 is required])]) # Checks for typedefs, structures, and compiler characteristics. AX_CXX_COMPILE_STDCXX_14([noext]) @@ -26,6 +29,16 @@ PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus], , # Checks for library functions. LT_INIT # Required for systemd linking +# Add optional yaml file argument +AC_ARG_VAR(FAN_DETECT_YAML_FILE, +[The fan presence detection definition file to use]) +AS_IF([test "x$FAN_DETECT_YAML_FILE" == "x"], +[FAN_DETECT_YAML_FILE="${srcdir}/example/fan-detect.yaml"]) +AC_DEFINE_UNQUOTED([FAN_DETECT_YAML_FILE], ["$FAN_DETECT_YAML_FILE"], +[The fan presence detection definition file to use]) + # Create configured output +AC_SUBST([GEN_FAN_DETECT_DEFS], +[$PYTHON ${srcdir}/gen-fan-detect-defs.py -y $FAN_DETECT_YAML_FILE]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT |