unix/configure.ac | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index f62f5d4..d9a3750 100644 --- a/configure.ac +++ b/configure.ac @@ -335,10 +335,15 @@ fi AC_DEFINE([USE_OFFICIAL_BOOST], [], [Use the official Boost libraries.]) # Intel Math Kernel library -pov_save_ldflags="$LDFLAGS" -test x"$with_libmkl" != x"" && LDFLAGS="-L$with_libmkl $LDFLAGS" -AC_CHECK_LIB([mkl], [sin]) -test x"ac_cv_lib_mkl_sin" = x"no" && LDFLAGS="$pov_save_ldflags" +AS_IF([test x"$with_libmkl" != x"no"], [ + pov_save_ldflags="$LDFLAGS" + AS_IF([test x"$with_libmkl" != x"yes"], [ + LDFLAGS="-L$with_libmkl $LDFLAGS" + ]) + AC_CHECK_LIB([mkl], [sin], [], [ + AC_MSG_ERROR([Cannot find working mkl library]) + ]) +]) # libm AC_CHECK_LIB([m], [sin])