configure script detects for 8086:4940 device; this is problematic for packaging
Hi,
I'm working on some debian packaging for QAT_Engine and discovered that in the configure script there is PCI H/W detection that uses lspci to detect if a feature should be enabled. This is problematic when building on a system that does not have this hardware and the package is being built for a system that may have this hardware. Is there a workaround to enable without the need of lspci and/or H/W PCI ID checking?
AM_CONDITIONAL([QAT_HW], [test "x$cflags_qat_hw" != "x"])
case "$host_os" in
linux*)
AS_IF([test `lspci -vnd 8086: | grep -c 4940` != "0"], [AC_SUBST([enable_qat20_oot], ["-DQAT20_OOT"])])
esac
@ColinIanKing Thanks for the support on the debian packaging. This particular code was added as workarround to build RPM package from Out of tree driver pacakage which we do on the corresponding platform as we could not detect particular driver version from qatengine build. Planning to fix it via an API check dynamically in the code.
I understand you are building qatengine package against qatlib intree driver. You can ignore that check as it is only needed for building qatengine against out of tree driver package. The Flag for intree driver is enabled in the following lines of code in configure.ac.
AC_CHECK_FILE(${qat_hw_dir_prefix}/include/qat/icp_sal_versions.h, [with_icp_sal_versions_h=yes], [with_icp_sal_versions_h=no]) if test "x$with_icp_sal_versions_h" = "xyes" then if grep "define SAL_INFO2_DRIVER_SW_VERSION_TYPE "in-tree"" ${qat_hw_dir_prefix}/include/qat/icp_sal_versions.h then AC_SUBST([cflags_qat_hw_intree], ["-DQAT_HW_INTREE -DQAT_HW_DISABLE_NONZERO_MEMFREE"]) AC_SUBST([with_qat_hw_dir], ["${qat_hw_dir_prefix}"]) AC_MSG_NOTICE([QAT intree driver using QATlib in ${with_qat_hw_dir}]) fi fi AM_CONDITIONAL([QAT_HW_INTREE], [test "x$cflags_qat_hw_intree" != "x"])
Thanks! That's useful to know.