summaryrefslogtreecommitdiff
blob: f83c93f1edc5ca596d972335aec3db81c052eceb (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
diff --git a/configure.ac b/configure.ac
index 633803d..89a9fb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,8 @@ dnl 2. checks for programs
 AC_LANG_C
 AC_PROG_CC
 AC_PROG_CPP
-AC_DISABLE_SHARED
+AC_PROG_F77
+AC_F77_LIBRARY_LDFLAGS
 AM_PROG_LIBTOOL
 
 dnl 3. checks for libraries
@@ -348,7 +349,7 @@ else
     AC_CHECK_LIB(blas,dscal_,
         [blas_use="yes";blas_lib="${blas_lib_path}-lblas"],
         [blas_use="";blas_lib=""],
-        [${blas_lib_path}-lblas -lvf2c])
+        [${blas_lib_path}-lblas])
     if test -z "${blas_use}"; then
         AC_MSG_RESULT([** BLAS library missing ...will BUILD **])
         blas="blas";
@@ -410,7 +411,7 @@ else
     AC_CHECK_LIB(lapack,dsysv_,
         [lapack_use="yes";lapack_lib="${lapack_lib_path}-llapack"],
         [lapack_use="";lapack_lib=""],
-        [${lapack_lib_path}-llapack ${blas_lib} -lvf2c])
+        [${lapack_lib_path}-llapack ${blas_lib}])
     if test -z "${lapack_use}"; then
         AC_MSG_RESULT([** LAPACK library missing ...will BUILD **])
         lapack="lapack";
@@ -472,7 +473,7 @@ else
     AC_CHECK_LIB(superlu,Destroy_SuperMatrix_Store,
         [superlu_use="yes";superlu_lib="${superlu_lib_path}-lsuperlu"],
         [superlu_use="";superlu_lib=""],
-        [${superlu_lib_path}-lsuperlu ${lapack_lib} ${blas_lib} -lvf2c])
+        [${superlu_lib_path}-lsuperlu ${lapack_lib} ${blas_lib}])
     if test -z "${superlu_use}"; then
         AC_MSG_RESULT([** SUPERLU library missing ...will BUILD **])
         superlu="superlu";
@@ -534,7 +535,7 @@ else
     AC_CHECK_LIB(arpack,dsgets_,
         [arpack_use="yes";arpack_lib="${arpack_lib_path}-larpack"],
         [arpack_use="";arpack_lib=""],
-        [${arpack_lib_path}-larpack ${blas_lib} -lvf2c])
+        [${arpack_lib_path}-larpack ${blas_lib}])
     if test -z "${arpack_use}"; then
         AC_MSG_RESULT([** ARPACK library missing ...will BUILD **])
         arpack="arpack";
@@ -658,7 +659,7 @@ else
     AC_CHECK_LIB(pmg,buildg_,
         [pmg_use="yes";pmg_lib="${pmg_lib_path}-lpmg"],
         [pmg_use="";pmg_lib=""],
-        [${pmg_lib_path}-lpmg ${blas_lib} -lvf2c])
+        [${pmg_lib_path}-lpmg ${blas_lib}])
     if test -z "${pmg_use}"; then
         AC_MSG_RESULT([** PMG library missing ...will BUILD **])
         pmg="pmg";
@@ -846,10 +847,6 @@ AC_OUTPUT([
     src/base/Makefile
 
     src/vf2c/Makefile
-    src/blas/Makefile
-    src/lapack/Makefile
-    src/superlu/Makefile
-    src/arpack/Makefile
     src/cgcode/Makefile
     src/pmg/Makefile
 
diff --git a/src/aaa_lib/Makefile.am b/src/aaa_lib/Makefile.am
index e338300..903dd2f 100644
--- a/src/aaa_lib/Makefile.am
+++ b/src/aaa_lib/Makefile.am
@@ -92,11 +92,11 @@ libdir = ${prefix}/lib/${fetk_cpu_vendor_os}
 lib_LTLIBRARIES = libpunc.la ${LIBVF2C} ${LIBBLAS} ${LIBLAPACK} ${LIBSUPERLU} ${LIBARPACK} ${LIBCGCODE} ${LIBPMG}
 
 libpunc_la_SOURCES =
-libpunc_la_LIBADD  = ${BASE_LIBS}
+libpunc_la_LIBADD  = ${BASE_LIBS} -lm
 libpunc_la_LDFLAGS = -version-info ${FETK_VERSION}
 
 libvf2c_la_SOURCES =
-libvf2c_la_LIBADD  = ${VF2C_LIBS}
+libvf2c_la_LIBADD  = ${VF2C_LIBS} -lgfortran -lf2c -lm
 libvf2c_la_LDFLAGS = -version-info ${FETK_VERSION}
 
 libblas_la_SOURCES =
@@ -108,7 +108,7 @@ liblapack_la_LIBADD  = ${LAPACK_LIBS}
 liblapack_la_LDFLAGS = -version-info ${FETK_VERSION}
 
 libsuperlu_la_SOURCES =
-libsuperlu_la_LIBADD  = ${SUPERLU_LIBS}
+libsuperlu_la_LIBADD  = ${SUPERLU_LIBS} 
 libsuperlu_la_LDFLAGS = -version-info ${FETK_VERSION}
 
 libarpack_la_SOURCES =
@@ -116,10 +116,9 @@ libarpack_la_LIBADD  = ${ARPACK_LIBS}
 libarpack_la_LDFLAGS = -version-info ${FETK_VERSION}
 
 libcgcode_la_SOURCES =
-libcgcode_la_LIBADD  = ${CGCODE_LIBS}
+libcgcode_la_LIBADD  = ${CGCODE_LIBS} ${VF2C_LIBS} -lblas -lgfortran -lm
 libcgcode_la_LDFLAGS = -version-info ${FETK_VERSION}
 
 libpmg_la_SOURCES =
-libpmg_la_LIBADD  = ${PMG_LIBS}
+libpmg_la_LIBADD  = ${VF2C_LIBS} ${PMG_LIBS} ${BASE_LIBS} -lgfortran -lf2c -lmaloc -lm 
 libpmg_la_LDFLAGS = -version-info ${FETK_VERSION}
-
diff --git a/src/pmg/Makefile.am b/src/pmg/Makefile.am
index 6f3108d..154aeba 100644
--- a/src/pmg/Makefile.am
+++ b/src/pmg/Makefile.am
@@ -38,11 +38,12 @@ always_built_SUBDIRS =
 SUBDIRS = $(always_built_SUBDIRS) .
 THISLIB = pmg
 
-noinst_LTLIBRARIES = libpmg.la
+lib_LTLIBRARIES = libpmg.la
 
-SRC = buildAd.c buildBd.c buildGd.c buildPd.c cgd.c cgmgd.c cgmgdrvd.c gsd.c matvecd.c mblasd.c mgcsd.c mgdrvd.c mgfasd.c mgsubd.c mikpckd.c mlinpckd.c ncgd.c ncgdrvd.c newdrvd.c newtond.c ngsd.c ngsdrvd.c ninterpd.c nrchd.c nrchdrvd.c nsmoothd.c nsord.c nsordrvd.c nwjd.c nwjdrvd.c powerd.c rchd.c smoothd.c sord.c wjd.c
+SRC = buildAd.c buildBd.c buildGd.c buildPd.c cgd.c cgmgd.c cgmgdrvd.c gsd.c matvecd.c mblasd.c mgcsd.c mgdrvd.c mgfasd.c mgsubd.c mikpckd.c mlinpckd.c ncgd.c ncgdrvd.c newdrvd.c newtond.c ngsd.c ngsdrvd.c ninterpd.c nrchd.c nrchdrvd.c nsmoothd.c nsord.c nsordrvd.c nwjd.c nwjdrvd.c powerd.c rchd.c smoothd.c sord.c wjd.c secd.c pded.f
 
 libpmg_la_SOURCES = ${SRC}
+libpmg_la_LIBADD = -lf2c ../vf2c/libvf2c.la
 INCLUDES  = @maloc_inc@
 AM_CFLAGS = @profile@ @pedantic_ansi@
 
diff --git a/src/vf2c/main.c b/src/vf2c/main.c
index 4539749..6577570 100644
--- a/src/vf2c/main.c
+++ b/src/vf2c/main.c
@@ -134,7 +134,9 @@ f_init();
 #ifndef NO_ONEXIT
 ONEXIT(f_exit);
 #endif
-MAIN__();
+int  MAIN__( )
+	{  return(0);
+}
 #ifdef NO_ONEXIT
 f_exit();
 #endif