bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] gsl-config --libs incorrectly returns -lm on Haiku.


From: Peter Johansson
Subject: Re: [Bug-gsl] gsl-config --libs incorrectly returns -lm on Haiku.
Date: Tue, 25 May 2010 19:29:38 -0400
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Hi Jerome,

Jerome Kelleher wrote:
Program: any compilations using the options returned by gsl-config will fail.

Please let me know if I can provide any more information. I would be happy to test any patches to fix this; I'm afraid I don't know enough about the GSL autoconf setup to propose a fix.

I think the patch enclosed would fix this problem, but I haven't tested it on any Haiku machine. If you could please try it out and it will be easier for Brian to consider the patch.

Thanks,
Peter

--
Peter Johansson

svndigest maintainer, http://dev.thep.lu.se/svndigest
yat maintainer,       http://dev.thep.lu.se/yat

diff --git a/ChangeLog b/ChangeLog
index 4d90d85..d3ac4b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-25  Peter Johansson  <address@hidden>
+
+       * configure.ac: added variable GSL_LIBM from macro AC_CHECK_LIBM
+       * Makefile.am: added GSL_LIBM in edit substitution
+       * gsl-config.in: using variable $GSL_LIBM rather than hrad-coded -libm
+       * gsl.pc.in: using variable $GSL_LIBM rather than hrad-coded -libm
+
 2010-04-24  Brian Gough  <address@hidden>
 
        * configure.ac: added macro for substituting isfinite by
diff --git a/Makefile.am b/Makefile.am
index 45b7c15..6ddf033 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,7 @@ edit = $(SED) \
        -e 's|@address@hidden|$(libdir)|g' \
        -e 's|@address@hidden|$(includedir)|g' \
        -e 's|@address@hidden|$(GSL_CFLAGS)|g' \
+       -e 's|@address@hidden|$(GSL_LIBM)|g' \
        -e 's|@address@hidden|$(GSL_LIBS)|g' \
        -e 's|@address@hidden|$(LIBS)|g' \
        -e 's|@address@hidden|$(VERSION)|g'
diff --git a/configure.ac b/configure.ac
index ff6915b..041025b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,9 +101,13 @@ AC_C_CHAR_UNSIGNED
 
 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
+AC_CHECK_LIBM
+GSL_LIBM=$LIBM
 
 AC_SUBST(GSL_CFLAGS)
 AC_SUBST(GSL_LIBS)
+AC_SUBST(GSL_LIBM)
 
 if test "$ac_cv_c_inline" != no ; then 
 dnl Check for "extern inline", using a modified version of the test
diff --git a/gsl-config.in b/gsl-config.in
index 29092f6..3662532 100755
--- a/gsl-config.in
+++ b/gsl-config.in
@@ -63,11 +63,11 @@ while test $# -gt 0; do
 
     --libs)
         : ${GSL_CBLAS_LIB=-lgslcblas}
-               echo @GSL_LIBS@ $GSL_CBLAS_LIB -lm
+               echo @GSL_LIBS@ $GSL_CBLAS_LIB @GSL_LIBM@
                ;;
 
     --libs-without-cblas)
-               echo @GSL_LIBS@ -lm
+               echo @GSL_LIBS@ @GSL_LIBM@
                ;;
     *)
        usage
diff --git a/gsl.pc.in b/gsl.pc.in
index 7309232..1ccd439 100644
--- a/gsl.pc.in
+++ b/gsl.pc.in
@@ -6,5 +6,5 @@ address@hidden@
 Name: GSL
 Description: GNU Scientific Library
 Version: @VERSION@
-Libs: @GSL_LIBS@ -lgslcblas @LIBS@
+Libs: @GSL_LIBS@ -lgslcblas @GSL_LIBM@ @LIBS@
 Cflags: @GSL_CFLAGS@

reply via email to

[Prev in Thread] Current Thread [Next in Thread]