diff --git a/configure.ac b/configure.ac
index c4e9f9d971154ea3889cc3fbb696dc20e5d02fc3..3b5d4893f8bad38cb4a98d64ce53c45caa49d09f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -411,7 +411,7 @@ AC_CHECK_LIB(m,sqrt,,AC_MSG_ERROR(something is wrong with the math library!))
 have_gsl="no"
 AC_CHECK_LIB([gslcblas], [cblas_dgemm])
 AC_CHECK_LIB([gsl], [gsl_integration_qag])
-if test "x$ac_cv_lib_gslcblas_cblas_dgemm" != "x"; then
+if test "x$ac_cv_lib_gslcblas_cblas_dgemm" = "xyes"; then
    have_gsl="yes"
 fi