From 0717a9d1766a05d926db3592db952f98dd1dd077 Mon Sep 17 00:00:00 2001
From: Rene Brun <Rene.Brun@cern.ch>
Date: Sat, 6 Oct 2007 11:34:30 +0000
Subject: [PATCH] From Lorenzo: patch to configure to fix some linking problem
 with GSL, (add cblas library and use GSL version number)

git-svn-id: http://root.cern.ch/svn/root/trunk@20249 27541ba8-7e3a-0410-8455-c3a389f83636
---
 config/Makefile.in | 1 +
 configure          | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/config/Makefile.in b/config/Makefile.in
index 862a0e34025..8e87f865d98 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -234,6 +234,7 @@ BUILDMATHMORE  := @buildmathmore@
 GSLFLAGS       := $(filter-out -I/usr/include, @gslflags@)
 GSLLIBDIR      := @gsllibdir@
 GSLLIBS        := @gsllibs@
+GSLVERSION     := @gslversion@
 
 BUILDCINT7     := @buildcint7@
 
diff --git a/configure b/configure
index 3eb731d5722..a912b4b2e94 100755
--- a/configure
+++ b/configure
@@ -3699,6 +3699,7 @@ if test ! "x$enable_mathmore" = "xno"; then
 	    gslinc=$found_hdr
 	    gslincdir=$found_dir
 	    gslflags=-I$gslincdir
+	    gslversion=$gsl_version
 	fi
     fi
 
@@ -3714,8 +3715,8 @@ if test ! "x$enable_mathmore" = "xno"; then
 	    gsllibdir=$found_dir
 	    # in case of shared libs (gsllibdir is not empty) need gslcblas
 	    # assume libgslcblas is in same dir as libgsl
-	    if test ! "x$gsllibdir" = "x"; then
-		check_library "libgslcblas gslcblas" "$enable_shared" "$gsllibdir0" \
+	    #if test ! "x$gsllibdir" = "x"; then
+		check_library "libgslcblas gslcblasML gslcblas cblas" "$enable_shared" "$gsllibdir0" \
 		    $GSL $GSL/lib $GSL/.libs /usr/local/lib /usr/lib /opt/gsl/lib \
 		    $finkdir/lib
 		if test ! "x$found_lib" = "x"; then
@@ -3725,7 +3726,7 @@ if test ! "x$enable_mathmore" = "xno"; then
 		    #cblas not found
 		    gsllibs=""
 		fi
-	    fi
+	    #fi
 	fi
     fi
     #
@@ -3767,6 +3768,7 @@ if test ! "x$enable_mathmore" = "xno"; then
 	        gslflags=`gsl-config --cflags`
 	        gsllibs=`gsl-config --libs`
 		gsllibdir=""
+                gslversion=$gsl_version
             fi
         else
 	    enable_mathmore="no"
@@ -4314,6 +4316,7 @@ sed -e "s|@aclocaldir@|$aclocaldir|"            \
     -e "s|@gslflags@|$gslflags|"                \
     -e "s|@gsllibdir@|$gsllibdir|"              \
     -e "s|@gsllibs@|$gsllibs|"                  \
+    -e "s|@gslversion@|$gslversion|"            \
     -e "s|@builtinzlib@|$enable_builtin_zlib|"  \
     -e "s|@zlibincdir@|$zlibincdir|"            \
     -e "s|@zliblib@|$zliblib|"                  \
-- 
GitLab