View | Details | Raw Unified | Return to bug 40631
Collapse All | Expand All

(-)mpqc/Makefile (-5 / +10 lines)
Lines 12-28 Link Here
12
12
13
MAINTAINER=	batman@udel.edu
13
MAINTAINER=	batman@udel.edu
14
14
15
LIB_DEPENDS=	blas:${PORTSDIR}/math/blas \
15
LIB_DEPENDS=	lapack:${PORTSDIR}/math/lapack \
16
		lapack:${PORTSDIR}/math/lapack
16
		atlas:${PORTSDIR}/math/atlas
17
BUILD_DEPENDS=	bison:${PORTSDIR}/devel/bison
17
18
18
USE_BISON=	yes
19
USE_BISON=	yes
19
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
20
CONFIGURE_ARGS=	--with-libdirs=-L${LOCALBASE}/lib
21
CONFIGURE_ARGS=	--with-libdirs=-L${PREFIX}/lib --prefix=${PREFIX} --with-blas="-lf77blas -latlas" --with-lapack="-lalapack -lcblas" --with-coptflags="${CFLAGS}" --with-cxxoptflags="${CFLAGS}" --with-f77optflags="${FFLAGS}"
21
USE_PERL5=	yes
22
USE_PERL5=	yes
22
USE_GMAKE=	yes
23
USE_GMAKE=	yes
24
USE_REINPLACE=  yes
23
ALL_TARGET=	# empty
25
ALL_TARGET=	# empty
26
USE_AUTOCONF=	yes
24
27
25
post-patch:
28
pre-configure:
26
	@${PERL} -pi -e "s,-lpthreads,${PTHREAD_LIBS},g" ${WRKSRC}/configure
29
	@${ECHO} "You can override and CFLAGS on the command line."
30
	@${ECHO} "Following is a recommended one."
31
	@${ECHO} "make CFLAGS=\"-malign-double -fexpensive-optimizations -O4 -ffast-math -funroll-loops\""
27
32
28
.include <bsd.port.mk>
33
.include <bsd.port.mk>
(-)mpqc/files/patch-::configure.in (+150 lines)
Line 0 Link Here
1
--- configure.in.orig	Sun Apr 21 11:36:19 2002
2
+++ configure.in	Tue Jul 16 06:44:27 2002
3
@@ -334,6 +334,31 @@
4
 
5
 ac_default_prefix="/usr/local/mpqc/$SC_VERSION"
6
 
7
+AC_ARG_WITH(blas,
8
+[  --with-blas             Gives BLAS name you use(e.g., -lblas).],
9
+BLASNAME=$withval
10
+)
11
+
12
+AC_ARG_WITH(lapack,
13
+[  --with-lapack           Gives LAPACK name you use(e.g., -llapack).],
14
+LAPACKNAME=$withval
15
+)
16
+
17
+AC_ARG_WITH(cxxoptflags,
18
+[  --with-cxxoptflags      Gives the C++ compiler optimization flags to use.],
19
+CXXOPTFLAGS=$withval
20
+)
21
+
22
+AC_ARG_WITH(ccoptflags,
23
+[  --with-ccoptflags       Gives the C compiler optimization flags to use.],
24
+CCOPTFLAGS=$withval
25
+)
26
+
27
+AC_ARG_WITH(f77optflags,
28
+[  --with-f77optflags      Gives the FORTRAN 77 optimization compiler flags to use.],
29
+F77OPTFLAGS=$withval
30
+)
31
+
32
 AC_ARG_WITH(cc,
33
 [  --with-cc               Gives the name of the C compiler to use.],
34
 CC=$withval
35
@@ -636,6 +661,23 @@
36
   ;;
37
 esac
38
 
39
+if test "$CCOPTFLAGS" = NONE; then
40
+else
41
+   echo "overrides the cc optimization flag with $CCOPTFLAGS"
42
+   COPTIONS_OPT="$CCOPTFLAGS"
43
+fi
44
+if test "$CXXOPTFLAGS" = NONE; then
45
+else
46
+   echo "overrides the c++ optimization flag with $CXXOPTFLAGS"
47
+   CXXOPTIONS_OPT="$CXXOPTFLAGS"
48
+fi
49
+
50
+if test "$F77OPTFLAGS" = NONE; then
51
+else
52
+   echo "overrides the Fortrna 77 optimization flag with $F77OPTFLAGS"
53
+   F77OPTIONS_OPT="$F77OPTFLAGS"
54
+fi
55
+
56
 dnl -- special architecture options --
57
 
58
 AC_MSG_CHECKING([for special architecture options])
59
@@ -839,10 +881,12 @@
60
 elif test $DEBUG = opt; then
61
   CFLAGS="$COPTIONS_DBG $COPTIONS_OPT $COPTIONS_MISC"
62
   CXXFLAGS="$CXXOPTIONS_DBG $COPTIONS_OPT $CXXOPTIONS_MISC"
63
+  FFLAGS="$F77OPTIONS_OPT"
64
   LDFLAGS="$LDFLAGS -g"
65
 else
66
   CFLAGS="$COPTIONS_OPT $COPTIONS_MISC"
67
   CXXFLAGS="$CXXOPTIONS_OPT $CXXOPTIONS_MISC"
68
+  FFLAGS="$F77OPTIONS_OPT"
69
 fi
70
 
71
 AC_SUBST(EXTRAINCLUDE)
72
@@ -979,6 +1023,19 @@
73
 AC_LANG_RESTORE
74
 fi
75
 
76
+dnl see if posix threads are in -pthreads
77
+if test $HAVE_PTHREAD = no; then
78
+AC_LANG_SAVE
79
+AC_LANG_CPLUSPLUS
80
+LIBSSAV="$LIBS"
81
+LIBS="$LIBS -pthread"
82
+AC_TRY_LINK([#include <pthread.h>],[pthread_join(0,0);],[
83
+HAVE_PTHREAD=yes],[
84
+HAVE_PTHREAD=no
85
+LIBS="$LIBSSAV"])
86
+AC_LANG_RESTORE
87
+fi
88
+
89
 AC_MSG_RESULT($HAVE_PTHREAD)
90
 fi
91
 if test X$HAVE_PTHREAD = Xyes; then
92
@@ -1280,18 +1337,26 @@
93
 LIBS="$LIBSSAV $FLIBS"
94
 
95
 LIBBLAS=""
96
+
97
 F77_DGEMM=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DAXPY`
98
-AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[
99
-  AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"],
100
-    AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"])
101
-  )]
102
-)
103
-if test X$HAVE_BLAS != Xyes; then
104
-  LIBSSAV2="$LIBS"
105
-  LIBS="-latlas $LIBS"
106
-  AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"],
107
-               LIBS="$LIBSSAV2")
108
+
109
+if test "$BLASNAME" = NONE; then
110
+  AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[
111
+    AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"],
112
+      AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"])
113
+    )]
114
+  )
115
+  if test X$HAVE_BLAS != Xyes; then
116
+    LIBSSAV2="$LIBS"
117
+    LIBS="-latlas $LIBS"
118
+    AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"],
119
+                 LIBS="$LIBSSAV2")
120
+  fi
121
+else
122
+  HAVE_BLAS="yes"
123
+  LIBBLAS="$BLASNAME"
124
 fi
125
+
126
 AC_SUBST(HAVE_BLAS)
127
 if test X$HAVE_BLAS != Xyes; then
128
   echo "WARNING: Could not link to the BLAS library.  It can be obtained at"
129
@@ -1304,10 +1369,17 @@
130
 
131
 LIBLAPACK=""
132
 F77_DGESVD=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DGESVD`
133
-AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[
134
-  AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"]
135
-  )]
136
-)
137
+
138
+if test "$LAPACKNAME" = NONE; then
139
+  AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[
140
+    AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"]
141
+    )]
142
+  )
143
+else
144
+  HAVE_LAPACK="yes"
145
+  LIBLAPACK="$LAPACKNAME"
146
+fi
147
+
148
 AC_SUBST(HAVE_LAPACK)
149
 if test X$HAVE_LAPACK != Xyes; then
150
   echo "Could not link to the LAPACK library.  It can be obtained at"
(-)mpqc/files/patch-misc::scint.h (+11 lines)
Line 0 Link Here
1
--- src/lib/util/misc/scint.h.org	Sat May  4 13:26:17 2002
2
+++ src/lib/util/misc/scint.h	Sat May  4 13:26:30 2002
3
@@ -117,7 +117,7 @@
4
 
5
 # ifdef ULLONG_MAX
6
 //#    if ULLONG_MAX == 18446744073709551615 // 2**64 - 1
7
-#    if ULONGLONG_MAX == (0xffffffffffffffffuLL) // uLL reqd for xlC
8
+#    if ULLONG_MAX == (0xffffffffffffffffuLL) // uLL reqd for xlC
9
      typedef long long            sc_intmax_t;
10
      typedef unsigned long long   sc_uintmax_t;
11
      typedef long long            sc_int64_t;

Return to bug 40631