Hello,

Attached please find a patch for file `gsl.pc'. Currently when using gsl-config one can choose cblas lib for example via

export GSL_CBLAS_LIB=-lfoo; gsl-config --libs

The attached patch would allow something similar for pkg-config users. By calling

pkg-config --define-variable=GSL_CBLAS_LIB=-lfoo --libs gsl

the user tells pkg-config that (s)he wanna use cblas lib 'foo' and pkg-config will output

-L/usr/local/lib -lgsl -lfoo -lm


I've also attached a test, pkgconfig.test, that can be run from the test directory and which might be useful to add as a part of 'make check' (TESTS = pkgconfig.test).


Cheers,
--
Peter Johansson
yat maintainer, http://dev.thep.lu.se/yat/

--- ../gsl-1.14/gsl.pc.in       2010-03-10 05:57:13.000000000 -0500
+++ gsl.pc.in   2011-01-27 21:05:49.000000000 -0500
@@ -2,9 +2,10 @@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
+GSL_CBLAS_LIB=-lgslcblas
 
 Name: GSL
 Description: GNU Scientific Library
 Version: @VERSION@
-Libs: @GSL_LIBS@ -lgslcblas @LIBS@
+Libs: @GSL_LIBS@ ${GSL_CBLAS_LIB} @LIBS@
 Cflags: @GSL_CFLAGS@
#!/bin/sh

set -e
set -x
# skip test if we have no pkg-config
pkg-config --version || exit 77
abs_top_builddir=`cd .. && pwd`
PKG_CONFIG_PATH=${abs_top_builddir}:${PKG_CONFIG_PATH}
pkg-config --define-variable=GSL_CBLAS_LIB=-lfoo --libs gsl | grep 'lfoo' 
exit 0
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to