Changes needed to use Studio libsunperf on Solaris (if available).
These changes will be sent upstream.
--- gsl-1.16/configure.ac.orig 2014-05-16 05:57:01.088210548 -0700
+++ gsl-1.16/configure.ac 2015-04-10 11:57:45.589459045 -0700
@@ -101,6 +101,20 @@
AC_C_INLINE
AC_C_CHAR_UNSIGNED
+dnl Check for existing BLAS
+dnl look for BLAS in some typical places
+AM_CONDITIONAL(SOLARIS_SUNPERF, false)
+case "$host" in
+*-*-solaris*)
+ AC_CHECK_LIB(sunperf,dcopy,BLAS=-lsunperf)
+ if test "$BLAS"; then
+ dnl Solaris BLAS library has performance benefits
+ AM_CONDITIONAL(SOLARIS_SUNPERF, true)
+ CFLAGS="-xlibmopt -xbuiltin=%default -xlibmil"
+ fi
+ ;;
+esac
+
GSL_CFLAGS="-I$includedir"
GSL_LIBS="-L$libdir -lgsl"
dnl macro from libtool - can be replaced with LT_LIB_M when we require libtool 2
--- gsl-1.16/Makefile.am.orig 2014-05-16 06:23:30.414886190 -0700
+++ gsl-1.16/Makefile.am 2014-05-16 06:59:46.408524913 -0700
@@ -2,7 +2,14 @@
# AUTOMAKE_OPTIONS = readme-alpha
-SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline doc
+SOLARIS_SUNPERF = @SOLARIS_SUNPERF@
+if SOLARIS_SUNPERF
+ CBLAS_DIRS=
+else
+ CBLAS_DIRS=cblas
+endif
+
+SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils $(CBLAS_DIRS) blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline doc
SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la permutation/libgslpermutation.la combination/libgslcombination.la multiset/libgslmultiset.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la
@@ -35,10 +42,16 @@
bin_PROGRAMS = gsl-randist gsl-histogram
gsl_randist_SOURCES = gsl-randist.c
-gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
gsl_histogram_SOURCES = gsl-histogram.c
+
+if SOLARIS_SUNPERF
+gsl_randist_LDADD = libgsl.la
+gsl_histogram_LDADD = libgsl.la
+else
+gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la
+endif
check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test
TESTS = test_gsl_histogram.sh pkgconfig.test