libcvd-members
[Top][All Lists]
Advanced

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

Re: [libcvd-members] Lapack configure.in issue


From: Simon Taylor
Subject: Re: [libcvd-members] Lapack configure.in issue
Date: Tue, 17 Jun 2008 14:29:22 +0100
User-agent: Thunderbird 2.0.0.9 (X11/20071031)

A better fix, though still a bit hacky, is to check for a different lapack function in each AC_CHECK_LIB line. This stops previous cached results from being reused.

Diff to configure.in attached. The functions I chose were picked fairly arbitrarily from a list of LAPACK functions I found on the net, and checked were in my LAPACK.so using nm, so feel free to change them for other ones/come up with some other solution.

Simon

Simon Taylor wrote:
When updating CVD, configure didn't correctly work out that on my box -lgfortran is required for lapack.

I "fixed" it for me by moving the CHECK_FOR_LIBRARY with APPEND(LIBS, -lgfortran) to the top of the lapack checks in configure.in. I think what's going wrong is that all of the lapack checks have the identical AC_CHECK_LIB(lapack, dgesvd_, [], [a=1]) line, the result of which seems to get cached after the first time it's encountered.

I don't speak autoconf/bash very well, so thought I'd leave it for someone more qualified to look at...

Simon


_______________________________________________
libcvd-members mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/libcvd-members

Index: configure.in
===================================================================
RCS file: /sources/libcvd/libcvd/configure.in,v
retrieving revision 1.126
diff -u -8 -p -r1.126 configure.in
--- configure.in        13 Jun 2008 16:58:44 -0000      1.126
+++ configure.in        17 Jun 2008 13:23:29 -0000
@@ -599,38 +599,38 @@ CHECK_FOR_LIBRARY(lapack, [
 CHECK_FOR_LIBRARY(lapack, [
        AC_MSG_CHECKING(if Accelerate framework is needed for LAPACK)
        AC_MSG_RESULT()
        APPEND(LIBS, -framework Accelerate)
        AC_CHECK_FUNC(dgesvd_, [], [a=1])
 ])
 
 CHECK_FOR_LIBRARY(lapack, [
-       AC_CHECK_LIB(lapack, dgesvd_, [], [a=1])
+       AC_CHECK_LIB(lapack, dgesv_, [], [a=1])
 ])
 
 CHECK_FOR_LIBRARY(lapack, [
        AC_MSG_CHECKING(if f2c is needed for LAPACK)
        AC_MSG_RESULT()
        APPEND(LIBS, -lf2c)
-       AC_CHECK_LIB(lapack, dgesvd_, [], [a=1])
+       AC_CHECK_LIB(lapack, dgesdd_, [], [a=1])
 ])
 
 CHECK_FOR_LIBRARY(lapack, [
        AC_MSG_CHECKING(if f2c is needed for LAPACK)
        AC_MSG_RESULT()
        APPEND(LIBS, -lg2c)
-       AC_CHECK_LIB(lapack, dgesvd_, [], [a=1])
+       AC_CHECK_LIB(lapack, dgeev_, [], [a=1])
 ])
 
 CHECK_FOR_LIBRARY(lapack, [
        AC_MSG_CHECKING(if f2c is needed for LAPACK)
        AC_MSG_RESULT()
        APPEND(LIBS, -lgfortran)
-       AC_CHECK_LIB(lapack, dgesvd_, [], [a=1])
+       AC_CHECK_LIB(lapack, dgees_, [], [a=1])
 ])
 
 CHECK_FOR_LIBRARY(pthread, [
        APPEND(CXXFLAGS, -pthread)
        APPEND(LIBS, -pthread)
        AC_MSG_CHECKING(for working pthreads)
        AC_COMPILE_IFELSE([#include <pthread.h>
                                                void*foo(void*){}

reply via email to

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