diff --git a/configure.hs b/configure.hs
--- a/configure.hs
+++ b/configure.hs
@@ -46,12 +46,18 @@
 check libs fmks = (ExitSuccess ==) `fmap` system (testprog libs fmks)
 
 -- simple test for GSL
-testGSL = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){gsl_sf_gamma(5);}\""
+gsl = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){gsl_sf_gamma(5);}\""
            ++" > /tmp/dummy.c; gcc /tmp/dummy.c -o /tmp/dummy -lgsl -lgslcblas"
            ++ " > /dev/null 2> /dev/null"
 
-checkGSL = (ExitSuccess ==) `fmap` system (testGSL)
+-- test for gsl >= 1.12
+gsl112 = "echo \"#include <gsl/gsl_sf_exp.h>\nint main(){gsl_sf_exprel_n_CF_e(1,1,0);}\""
+           ++" > /tmp/dummy.c; gcc /tmp/dummy.c -o /tmp/dummy -lgsl -lgslcblas"
+           ++ " > /dev/null 2> /dev/null"
 
+
+checkCommand c = (ExitSuccess ==) `fmap` system c
+
 -- test different configurations until the first one works
 try _ _ [] = return Nothing
 try b f (opt:rest) = do
@@ -88,7 +94,7 @@
     case r of
         Nothing -> do
             putStrLn " FAIL"
-            g <- checkGSL
+            g  <- checkCommand gsl
             if g
                 then putStrLn " *** Sorry, I can't link LAPACK."
                 else putStrLn " *** Sorry, I can't link GSL."
@@ -98,4 +104,9 @@
             writeFile "hmatrix.buildinfo" ("buildable: False\n")
         Just ops -> do
             putStrLn " OK"
-            writeFile "hmatrix.buildinfo" ("extra-libraries: " ++ ops++"\n")
+            g <- checkCommand gsl112
+            writeFile "hmatrix.buildinfo" $ "extra-libraries: " ++
+                ops ++ "\n" ++
+                if g
+                    then ""
+                    else "cc-options: -DGSL110\n"
diff --git a/hmatrix.cabal b/hmatrix.cabal
--- a/hmatrix.cabal
+++ b/hmatrix.cabal
@@ -1,5 +1,5 @@
 Name:               hmatrix
-Version:            0.5.2.0
+Version:            0.5.2.1
 License:            GPL
 License-file:       LICENSE
 Author:             Alberto Ruiz
diff --git a/lib/Numeric/GSL/Special/Exp.hs b/lib/Numeric/GSL/Special/Exp.hs
--- a/lib/Numeric/GSL/Special/Exp.hs
+++ b/lib/Numeric/GSL/Special/Exp.hs
@@ -29,7 +29,7 @@
 , exprel_2
 , exprel_n_e
 , exprel_n
-, exprel_n_CF_e
+-- , exprel_n_CF_e
 , exp_err_e
 , exp_err_e10_e
 , exp_mult_err_e
diff --git a/lib/Numeric/GSL/Special/autoall.sh b/lib/Numeric/GSL/Special/autoall.sh
--- a/lib/Numeric/GSL/Special/autoall.sh
+++ b/lib/Numeric/GSL/Special/autoall.sh
@@ -21,6 +21,7 @@
 ./auto.hs erf
 ./auto.hs exp
 rep ', exp\n' ', Numeric.GSL.Special.Exp.exp\n' Exp.hs
+rep ', exprel_n_CF_e' '-- , exprel_n_CF_e' Exp.hs
 ./auto.hs expint
 ./auto.hs fermi_dirac
 ./auto.hs gamma
diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c
--- a/lib/Numeric/GSL/gsl-aux.c
+++ b/lib/Numeric/GSL/gsl-aux.c
@@ -390,7 +390,11 @@
     // Minimizer nmsimplex, without derivatives
     switch(method) {
         case 0 : {T = gsl_multimin_fminimizer_nmsimplex; break; }
+#ifdef GSL110
+        case 1 : {T = gsl_multimin_fminimizer_nmsimplex; break; }
+#else
         case 1 : {T = gsl_multimin_fminimizer_nmsimplex2; break; }
+#endif
         default: ERROR(BAD_CODE);
     }
     s = gsl_multimin_fminimizer_alloc (T, my_func.n);
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -109,9 +109,10 @@
 
 ---------------------------------------------------------------------
 
-minimizationTest = TestList [ utest "minimization conjugatefr" (minim1 f df [5,7] ~~ [1,2])
-                            , utest "minimization nmsimplex2"       (minim2 f [5,7] == 24)
-                            ]
+minimizationTest = TestList
+    [ utest "minimization conjugatefr" (minim1 f df [5,7] ~~ [1,2])
+    , utest "minimization nmsimplex2"  (minim2 f [5,7] `elem` [24,25])
+    ]
     where f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
           df [x,y] = [20*(x-1), 40*(y-2)]
           minim1 g dg ini = fst $ minimizeD ConjugateFR 1E-3 30 1E-2 1E-4 g dg ini
