configure: fix for FIPS out-of-tree builds

Check for fips files relative to source directory.
This commit is contained in:
Elms 2021-02-23 14:17:35 -08:00
parent 0dfdf92ff7
commit 47872224d8

View File

@ -188,15 +188,15 @@ AS_CASE([$ENABLED_FIPS],
])
case "$FIPS_VERSION" in
none) if test -s wolfcrypt/src/fips.c || test -s ctaocrypt/src/fips.c; then
none) if test -s $srcdir/wolfcrypt/src/fips.c || test -s $srcdir/ctaocrypt/src/fips.c; then
AC_MSG_ERROR([FIPS source tree is incompatible with non-FIPS build (requires --enable-fips)])
fi
;;
v1) if ! test -s ctaocrypt/src/fips.c; then
v1) if ! test -s $srcdir/ctaocrypt/src/fips.c; then
AC_MSG_ERROR([non-FIPS-v1 source tree is incompatible with --enable-fips=$enableval])
fi
;;
*) if ! test -s wolfcrypt/src/fips.c; then
*) if ! test -s $srcdir/wolfcrypt/src/fips.c; then
AC_MSG_ERROR([non-FIPS source tree is incompatible with --enable-fips=$enableval])
fi
;;