--- ./config/acx_fortran_symbols.m4.orig	2016-12-26 12:20:47.038668999 +0100
+++ ./config/acx_fortran_symbols.m4	2016-12-26 12:25:03.139822693 +0100
@@ -116,7 +116,11 @@
            AC_MSG_NOTICE([Could not find $lapacksym in any known library ... specify LAPACK library via LIBS])
        fi
 
-       LIBS="$LIBS $LAPACKLIB $BLASLIB"
+       if test "x$LIBS" != "x"; then
+           LIBS="$LIBS $LAPACKLIB $BLASLIB"
+       else
+           LIBS="$LAPACKLIB $BLASLIB"
+       fi
 ])
 
 
