OSDN Git Service

Memo update for version 0.5.6.2
[molby/Molby.git] / clapack-3.1.1.1-mingw.patch
1 diff --exclude=.* -Naur CLAPACK-3.1.1.1/F2CLIBS/libf2c/Makefile CLAPACK-3.1.1.1-mingw/F2CLIBS/libf2c/Makefile
2 --- CLAPACK-3.1.1.1/F2CLIBS/libf2c/Makefile     Thu Sep  4 04:29:25 2008
3 +++ CLAPACK-3.1.1.1-mingw/F2CLIBS/libf2c/Makefile       Fri Nov  7 01:58:05 2008
4 @@ -181,8 +181,8 @@
5  xwsne.o:       fmt.h
6  
7  arith.h: arithchk.c
8 -       $(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
9 -        $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
10 +       $(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm -o a.out ||\
11 +        $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm -o a.out
12         ./a.out >arith.h
13         rm -f a.out arithchk.o
14  
15 diff --exclude=.* -Naur CLAPACK-3.1.1.1/F2CLIBS/libf2c/dtime_.c CLAPACK-3.1.1.1-mingw/F2CLIBS/libf2c/dtime_.c
16 --- CLAPACK-3.1.1.1/F2CLIBS/libf2c/dtime_.c     Thu Sep  4 04:29:25 2008
17 +++ CLAPACK-3.1.1.1-mingw/F2CLIBS/libf2c/dtime_.c       Fri Nov  7 23:01:21 2008
18 @@ -1,6 +1,6 @@
19  #include "time.h"
20  
21 -#ifdef MSDOS
22 +#if defined(MSDOS) || defined(MINGW)
23  #undef USE_CLOCK
24  #define USE_CLOCK
25  #endif
26 @@ -14,9 +14,10 @@
27  #define _INCLUDE_XOPEN_SOURCE  /* for HP-UX */
28  #include "sys/types.h"
29  #include "sys/times.h"
30 +#endif
31 +
32  #ifdef __cplusplus
33  extern "C" {
34 -#endif
35  #endif
36  
37  #undef Hz
38 diff --exclude=.* -Naur CLAPACK-3.1.1.1/F2CLIBS/libf2c/etime_.c CLAPACK-3.1.1.1-mingw/F2CLIBS/libf2c/etime_.c
39 --- CLAPACK-3.1.1.1/F2CLIBS/libf2c/etime_.c     Thu Sep  4 04:29:25 2008
40 +++ CLAPACK-3.1.1.1-mingw/F2CLIBS/libf2c/etime_.c       Fri Nov  7 02:07:20 2008
41 @@ -1,6 +1,6 @@
42  #include "time.h"
43  
44 -#ifdef MSDOS
45 +#if defined(MSDOS) || defined(MINGW)
46  #undef USE_CLOCK
47  #define USE_CLOCK
48  #endif
49 diff --exclude=.* -Naur CLAPACK-3.1.1.1/INCLUDE/clapack.h CLAPACK-3.1.1.1-mingw/INCLUDE/clapack.h
50 --- CLAPACK-3.1.1.1/INCLUDE/clapack.h   Thu Sep  4 04:29:25 2008
51 +++ CLAPACK-3.1.1.1-mingw/INCLUDE/clapack.h     Fri Nov  7 23:41:46 2008
52 @@ -1,6 +1,10 @@
53  #ifndef __CLAPACK_H
54  #define __CLAPACK_H
55
56 +
57 +#ifdef __cplusplus
58 +extern "C" {
59 +#endif
60 +
61  /* Subroutine */ int cbdsqr_(char *uplo, integer *n, integer *ncvt, integer *
62         nru, integer *ncc, real *d__, real *e, complex *vt, integer *ldvt, 
63         complex *u, integer *ldu, complex *c__, integer *ldc, real *rwork, 
64 @@ -1569,7 +1573,7 @@
65         doublereal *wi, doublereal *z__, integer *ldz, doublereal *work, 
66         integer *lwork, integer *info);
67  
68 -/* Subroutine */ int dlabad_(doublereal *small, doublereal *large);
69 +/* Subroutine */ int dlabad_(doublereal *small__, doublereal *large__);
70  
71  /* Subroutine */ int dlabrd_(integer *m, integer *n, integer *nb, doublereal *
72         a, integer *lda, doublereal *d__, doublereal *e, doublereal *tauq, 
73 @@ -3027,7 +3031,7 @@
74          integer *ihi, real *h__, integer *ldh, real *wr, real *wi, real *z__,   
75         integer *ldz, real *work, integer *lwork, integer *info);
76  
77 -/* Subroutine */ int slabad_(real *small, real *large);
78 +/* Subroutine */ int slabad_(real *small__, real *large__);
79  
80  /* Subroutine */ int slabrd_(integer *m, integer *n, integer *nb, real *a, 
81         integer *lda, real *d__, real *e, real *tauq, real *taup, real *x, 
82 @@ -5429,6 +5433,10 @@
83  /* Subroutine */ int zupmtr_(char *side, char *uplo, char *trans, integer *m, 
84         integer *n, doublecomplex *ap, doublecomplex *tau, doublecomplex *c__,
85          integer *ldc, doublecomplex *work, integer *info);
86 +
87 +#ifdef __cplusplus
88 +}
89 +#endif
90  
91  #endif /* __CLAPACK_H */
92  
93 diff --exclude=.* -Naur CLAPACK-3.1.1.1/INCLUDE/f2c.h CLAPACK-3.1.1.1-mingw/INCLUDE/f2c.h
94 --- CLAPACK-3.1.1.1/INCLUDE/f2c.h       Thu Sep  4 04:29:25 2008
95 +++ CLAPACK-3.1.1.1-mingw/INCLUDE/f2c.h Fri Nov  7 23:33:56 2008
96 @@ -7,6 +7,10 @@
97  #ifndef F2C_INCLUDE
98  #define F2C_INCLUDE
99  
100 +#ifdef __cplusplus
101 +extern "C" {
102 +#endif
103 +
104  typedef long int integer;
105  typedef unsigned long int uinteger;
106  typedef char *address;
107 @@ -220,4 +224,9 @@
108  #undef unix
109  #undef vax
110  #endif
111 +
112 +#ifdef __cplusplus
113 +}
114 +#endif
115 +
116  #endif
117 diff --exclude=.* -Naur CLAPACK-3.1.1.1/INSTALL/dsecnd.c CLAPACK-3.1.1.1-mingw/INSTALL/dsecnd.c
118 --- CLAPACK-3.1.1.1/INSTALL/dsecnd.c    Thu Sep  4 04:29:25 2008
119 +++ CLAPACK-3.1.1.1-mingw/INSTALL/dsecnd.c      Sun Nov  9 15:22:19 2008
120 @@ -1,7 +1,15 @@
121  #include "blaswrap.h"
122  #include "f2c.h"
123 +
124 +#if defined(MSDOS) || defined(MINGW)
125 +#undef USE_CLOCK
126 +#define USE_CLOCK
127 +#endif
128 +
129 +#ifndef USE_CLOCK
130  #include <sys/times.h>
131  #include <sys/types.h>
132 +#endif
133  #include <time.h>
134  
135  #ifndef CLK_TCK
136 @@ -10,10 +18,17 @@
137  
138  doublereal dsecnd_()
139  {
140 +#ifdef USE_CLOCK
141 +    
142 +  double t = clock();
143 +  return (doublereal)t / CLK_TCK;
144 +    
145 +#else
146    struct tms rusage;
147  
148    times(&rusage);
149    return (doublereal)(rusage.tms_utime) / CLK_TCK;
150 -
151 +#endif
152 +    
153  } /* dsecnd_ */
154  
155 diff --exclude=.* -Naur CLAPACK-3.1.1.1/INSTALL/second.c CLAPACK-3.1.1.1-mingw/INSTALL/second.c
156 --- CLAPACK-3.1.1.1/INSTALL/second.c    Thu Sep  4 04:29:25 2008
157 +++ CLAPACK-3.1.1.1-mingw/INSTALL/second.c      Sun Nov  9 15:22:01 2008
158 @@ -1,6 +1,14 @@
159  #include "f2c.h"
160 +
161 +#if defined(MSDOS) || defined(MINGW)
162 +#undef USE_CLOCK
163 +#define USE_CLOCK
164 +#endif
165 +
166 +#ifndef USE_CLOCK
167  #include <sys/times.h>
168  #include <sys/types.h>
169 +#endif
170  #include <time.h>
171  
172  #ifndef CLK_TCK
173 @@ -9,10 +17,17 @@
174  
175  doublereal second_()
176  {
177 +#ifdef USE_CLOCK
178 +    
179 +  double t = clock();
180 +  return (doublereal)t / CLK_TCK;
181 +    
182 +#else
183    struct tms rusage;
184  
185    times(&rusage);
186    return (doublereal)(rusage.tms_utime) / CLK_TCK;
187 +#endif
188  
189  } /* second_ */
190  
191 diff --exclude=.* -Naur CLAPACK-3.1.1.1/make.inc CLAPACK-3.1.1.1-mingw/make.inc
192 --- CLAPACK-3.1.1.1/make.inc    Thu Jan  1 09:00:00 1970
193 +++ CLAPACK-3.1.1.1-mingw/make.inc      Sun Nov  9 14:31:50 2008
194 @@ -0,0 +1,61 @@
195 +####################################################################
196 +#  CLAPACK make include file.                                      #
197 +#  CLAPACK, Version 3.1.1.1                                        #
198 +#  October 2008                                                    #
199 +####################################################################
200 +#
201 +#  The machine (platform) identifier to append to the library names
202 +#
203 +PLAT = MinGW
204 +#  
205 +#  Modify the CC and CFLAGS definitions to refer to the
206 +#  compiler and desired compiler options for your machine.  NOOPT
207 +#  refers to the compiler options desired when NO OPTIMIZATION is
208 +#  selected.  Define LOADER and LOADOPTS to refer to the loader and
209 +#  desired load options for your machine.
210 +#
211 +#######################################################
212 +# This is used to compile C libary
213 +CC        = gcc
214 +# if no wrapping of the blas library is needed, uncomment next line
215 +#CC        = gcc -DNO_BLAS_WRAP
216 +CFLAGS    = -DMINGW -O2
217 +LOADER    = gcc
218 +LOADOPTS  = -Wl,--stack=33554432
219 +NOOPT     = -O0 
220 +DRVCFLAGS = $(CFLAGS)
221 +F2CCFLAGS = $(CFLAGS)
222 +#######################################################################
223 +#
224 +#  The archiver and the flag(s) to use when building archive (library)
225 +#  If you system has no ranlib, set RANLIB = echo.
226 +#
227 +ARCH     = ar
228 +ARCHFLAGS= cr
229 +RANLIB   = ranlib
230 +#
231 +#  The location of the libraries to which you will link.  (The 
232 +#  machine-specific, optimized BLAS library should be used whenever
233 +#  possible.)
234 +#
235 +
236 +# Using reference BLAS
237 +BLASLIB      = ../../blas$(PLAT).a
238 +# Using Vectib
239 +#BLASLIB = -framework vecLib
240 +# Using Fortran BLAS interface of ATLAS without wrapper (CLAPACK has to be compiled with -DNO_BLAS_WRAP)
241 +#BLASLIB = -lf77blas -latlas
242 +# Using Fortran BLAS interface of ATLAS with wrapper
243 +#BLASLIB = ../../libfblaswr.a -lf77blas -latlas
244 +# Using CBLAS interface of ATLAS with wrapper
245 +#BLASLIB = ../../libcblaswr.a -lcblas -latlas
246 +# Using Goto without wrapper (CLAPACK has to be compiled with -DNO_BLAS_WRAP)
247 +#BLASLIB = -lgoto -lpthread
248 +# Using Goto with wrapper
249 +#BLASLIB = ../../libfblaswr.a -lgoto -lpthread 
250 +LAPACKLIB    = lapack$(PLAT).a
251 +F2CLIB       = ../../F2CLIBS/libf2c.a
252 +TMGLIB       = tmglib$(PLAT).a
253 +EIGSRCLIB    = eigsrc$(PLAT).a
254 +LINSRCLIB    = linsrc$(PLAT).a
255 +