summaryrefslogtreecommitdiff
blob: 02a2aa6d887758d99f9f40320ebc8209a2e7b487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
--- ccp4-5.99.5.orig/configure	2006-01-17 00:35:36.000000000 -0800
+++ ccp4-5.99.5/configure	2006-01-17 10:44:39.000000000 -0800
@@ -2410,12 +2410,12 @@
       end
 EOF
           #firslty test without -lblas
-          test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack"
+          test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lpthread"
           echo $test_compile
           if { (eval $test_compile >& /dev/null ) 2>&1; } && test -s testlink ; then
             # Compilation was okay
-            echo "... only -llapack needed"
-            XLAPACK_LIB="-llapack"
+            echo "... only -llapack -lpthread needed"
+            XLAPACK_LIB="-llapack -lpthread"
             # Set the next two variables so that configure
             # doesn't try to build netlib libraries
             LAPACKLIB="lapack"
@@ -2424,12 +2424,12 @@
             tryblas=
           else
 	    echo "more than just -llapack needed...."
-            test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lblas"
+            test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lblas -lpthread"
             echo $test_compile
             if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
               # Compilation was okay
-              echo "...-llapack and -lblas were needed"
-              XLAPACK_LIB="-llapack -lblas"
+              echo "...-llapack, -lpthread and -lblas were needed"
+              XLAPACK_LIB="-llapack -lpthread -lblas"
               # Set the next two variables so that configure
               # doesn't try to build netlib libraries
               LAPACKLIB="lapack blas"
@@ -2720,8 +2720,8 @@
       STOP
       END
 EOF
-                test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
-                test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
+                test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib -lpthread"
+                test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS -lpthread"
                 echo $test_compile
                 if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
                   have_lapack=yes
@@ -2738,7 +2738,7 @@
                   LAPACKDIR="$testdir"
                   echo "Link ok - using lib$LAPACKLIB from $LAPACKDIR"
 		  #
-		  XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB"
+		  XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB -lpthread"
                   #
                   # Test to see if we need BLAS too
                   # Do this by trying to compile a test program
@@ -2750,8 +2750,8 @@
                   if test -f testlsame ; then
                     rm -f testsame testlsame.o
                   fi
-                  test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB"
-                  test_ccompile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB $XLDFLAGS"
+                  test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB -lpthread"
+                  test_ccompile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB $XLDFLAGS -lpthread"
                   echo $test_compile
                   if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then
                     have_blas=yes
@@ -2830,8 +2830,8 @@
       STOP
       END
 EOF
-                  test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
-                  test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
+                  test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib -lpthread"
+                  test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS -lpthread"
                   echo $test_compile
                   if { ( eval $test_compile) 2>&1;} && test -s testlink ; then
                     have_blas=yes
@@ -3033,7 +3033,7 @@
         if test -f testlsame ; then
           rm -f testsame testlsame.o
         fi
-        test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$BLASDIR -l$BLASLIB"
+        test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$BLASDIR -l$BLASLIB -lpthread"
         echo $test_compile
         if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then
           echo "Found LSAME in lib$BLASLIB"
@@ -3046,7 +3046,7 @@
         if test -f testxerbla ; then
           rm -f testxerbla testxerbla.o
         fi
-        test_compile="$FC $FOPTIM $XFFLAGS -o testxerbla xerblatst.f -L$BLASDIR -l$BLASLIB"
+        test_compile="$FC $FOPTIM $XFFLAGS -o testxerbla xerblatst.f -L$BLASDIR -l$BLASLIB -lpthread"
         echo $test_compile
         if { ( eval $test_compile) 2>&1;} && test -s testxerbla ; then
           # Found lsame
@@ -3080,7 +3080,7 @@
     cd ../..
     #
     lapackdir=lib/lapack
-    XLAPACK_LIB="-L$srcdir/lib/lapack -llapack -L$BLASDIR -l$BLASLIB"
+    XLAPACK_LIB="-L$srcdir/lib/lapack -llapack -L$BLASDIR -l$BLASLIB -lpthread"
 # netlib lapack is in fortran, so we may need the fortran libraries when
 # we are linking using the C or C++ compilers
     case $system in