diff options
author | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2002-07-16 06:44:55 +0000 |
---|---|---|
committer | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2002-07-16 06:44:55 +0000 |
commit | 5be21f25be9b67c709c2ba9ef94cbbf7c19f530e (patch) | |
tree | e97b98006d9c140432015dff518ee037345cfcd7 /science | |
parent | a8b169aebc03a5d32143d554ef1aff9a02e48adf (diff) | |
download | ports-5be21f25be9b67c709c2ba9ef94cbbf7c19f530e.tar.gz ports-5be21f25be9b67c709c2ba9ef94cbbf7c19f530e.zip |
Notes
Diffstat (limited to 'science')
-rw-r--r-- | science/mpqc/Makefile | 21 | ||||
-rw-r--r-- | science/mpqc/files/patch-::configure.in | 150 | ||||
-rw-r--r-- | science/mpqc/files/patch-misc::scint.h | 11 |
3 files changed, 175 insertions, 7 deletions
diff --git a/science/mpqc/Makefile b/science/mpqc/Makefile index 0280e5c08764..b1124e3d2ccd 100644 --- a/science/mpqc/Makefile +++ b/science/mpqc/Makefile @@ -10,19 +10,26 @@ PORTVERSION= 2.1.1 CATEGORIES= science MASTER_SITES= http://aros.ca.sandia.gov/~cljanss/mpqc/distrib/ -MAINTAINER= batman@udel.edu +MAINTAINER= chat95@mbox.kyoto-inet.or.jp -LIB_DEPENDS= blas:${PORTSDIR}/math/blas \ - lapack:${PORTSDIR}/math/lapack +LIB_DEPENDS= lapack:${PORTSDIR}/math/lapack \ + atlas:${PORTSDIR}/math/atlas USE_BISON= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-libdirs=-L${LOCALBASE}/lib +USE_AUTOCONF= yes +CONFIGURE_ARGS= --with-libdirs=-L${PREFIX}/lib \ + --with-blas="-lf77blas -latlas" \ + --with-lapack="-lalapack -lcblas" \ + --with-coptflags="${CFLAGS}" \ + --with-cxxoptflags="${CFLAGS}" \ + --with-f77optflags="${FFLAGS}" USE_PERL5= yes USE_GMAKE= yes ALL_TARGET= # empty -post-patch: - @${PERL} -pi -e "s,-lpthreads,${PTHREAD_LIBS},g" ${WRKSRC}/configure +pre-configure: + @${ECHO} "You can override and CFLAGS on the command line." + @${ECHO} "Following is a recommended one." + @${ECHO} "make CFLAGS=\"-malign-double -fexpensive-optimizations -O4 -ffast-math -funroll-loops\"" .include <bsd.port.mk> diff --git a/science/mpqc/files/patch-::configure.in b/science/mpqc/files/patch-::configure.in new file mode 100644 index 000000000000..7a24d466f8b5 --- /dev/null +++ b/science/mpqc/files/patch-::configure.in @@ -0,0 +1,150 @@ +--- configure.in.orig Sun Apr 21 11:36:19 2002 ++++ configure.in Tue Jul 16 06:44:27 2002 +@@ -334,6 +334,31 @@ + + ac_default_prefix="/usr/local/mpqc/$SC_VERSION" + ++AC_ARG_WITH(blas, ++[ --with-blas Gives BLAS name you use(e.g., -lblas).], ++BLASNAME=$withval ++) ++ ++AC_ARG_WITH(lapack, ++[ --with-lapack Gives LAPACK name you use(e.g., -llapack).], ++LAPACKNAME=$withval ++) ++ ++AC_ARG_WITH(cxxoptflags, ++[ --with-cxxoptflags Gives the C++ compiler optimization flags to use.], ++CXXOPTFLAGS=$withval ++) ++ ++AC_ARG_WITH(ccoptflags, ++[ --with-ccoptflags Gives the C compiler optimization flags to use.], ++CCOPTFLAGS=$withval ++) ++ ++AC_ARG_WITH(f77optflags, ++[ --with-f77optflags Gives the FORTRAN 77 optimization compiler flags to use.], ++F77OPTFLAGS=$withval ++) ++ + AC_ARG_WITH(cc, + [ --with-cc Gives the name of the C compiler to use.], + CC=$withval +@@ -636,6 +661,23 @@ + ;; + esac + ++if test "$CCOPTFLAGS" = NONE; then ++else ++ echo "overrides the cc optimization flag with $CCOPTFLAGS" ++ COPTIONS_OPT="$CCOPTFLAGS" ++fi ++if test "$CXXOPTFLAGS" = NONE; then ++else ++ echo "overrides the c++ optimization flag with $CXXOPTFLAGS" ++ CXXOPTIONS_OPT="$CXXOPTFLAGS" ++fi ++ ++if test "$F77OPTFLAGS" = NONE; then ++else ++ echo "overrides the Fortrna 77 optimization flag with $F77OPTFLAGS" ++ F77OPTIONS_OPT="$F77OPTFLAGS" ++fi ++ + dnl -- special architecture options -- + + AC_MSG_CHECKING([for special architecture options]) +@@ -839,10 +881,12 @@ + elif test $DEBUG = opt; then + CFLAGS="$COPTIONS_DBG $COPTIONS_OPT $COPTIONS_MISC" + CXXFLAGS="$CXXOPTIONS_DBG $COPTIONS_OPT $CXXOPTIONS_MISC" ++ FFLAGS="$F77OPTIONS_OPT" + LDFLAGS="$LDFLAGS -g" + else + CFLAGS="$COPTIONS_OPT $COPTIONS_MISC" + CXXFLAGS="$CXXOPTIONS_OPT $CXXOPTIONS_MISC" ++ FFLAGS="$F77OPTIONS_OPT" + fi + + AC_SUBST(EXTRAINCLUDE) +@@ -979,6 +1023,19 @@ + AC_LANG_RESTORE + fi + ++dnl see if posix threads are in -pthreads ++if test $HAVE_PTHREAD = no; then ++AC_LANG_SAVE ++AC_LANG_CPLUSPLUS ++LIBSSAV="$LIBS" ++LIBS="$LIBS -pthread" ++AC_TRY_LINK([#include <pthread.h>],[pthread_join(0,0);],[ ++HAVE_PTHREAD=yes],[ ++HAVE_PTHREAD=no ++LIBS="$LIBSSAV"]) ++AC_LANG_RESTORE ++fi ++ + AC_MSG_RESULT($HAVE_PTHREAD) + fi + if test X$HAVE_PTHREAD = Xyes; then +@@ -1280,18 +1337,26 @@ + LIBS="$LIBSSAV $FLIBS" + + LIBBLAS="" ++ + F77_DGEMM=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DAXPY` +-AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[ +- AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"], +- AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"]) +- )] +-) +-if test X$HAVE_BLAS != Xyes; then +- LIBSSAV2="$LIBS" +- LIBS="-latlas $LIBS" +- AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"], +- LIBS="$LIBSSAV2") ++ ++if test "$BLASNAME" = NONE; then ++ AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[ ++ AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"], ++ AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"]) ++ )] ++ ) ++ if test X$HAVE_BLAS != Xyes; then ++ LIBSSAV2="$LIBS" ++ LIBS="-latlas $LIBS" ++ AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"], ++ LIBS="$LIBSSAV2") ++ fi ++else ++ HAVE_BLAS="yes" ++ LIBBLAS="$BLASNAME" + fi ++ + AC_SUBST(HAVE_BLAS) + if test X$HAVE_BLAS != Xyes; then + echo "WARNING: Could not link to the BLAS library. It can be obtained at" +@@ -1304,10 +1369,17 @@ + + LIBLAPACK="" + F77_DGESVD=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DGESVD` +-AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[ +- AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"] +- )] +-) ++ ++if test "$LAPACKNAME" = NONE; then ++ AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[ ++ AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"] ++ )] ++ ) ++else ++ HAVE_LAPACK="yes" ++ LIBLAPACK="$LAPACKNAME" ++fi ++ + AC_SUBST(HAVE_LAPACK) + if test X$HAVE_LAPACK != Xyes; then + echo "Could not link to the LAPACK library. It can be obtained at" diff --git a/science/mpqc/files/patch-misc::scint.h b/science/mpqc/files/patch-misc::scint.h new file mode 100644 index 000000000000..87e80e523713 --- /dev/null +++ b/science/mpqc/files/patch-misc::scint.h @@ -0,0 +1,11 @@ +--- src/lib/util/misc/scint.h.org Sat May 4 13:26:17 2002 ++++ src/lib/util/misc/scint.h Sat May 4 13:26:30 2002 +@@ -117,7 +117,7 @@ + + # ifdef ULLONG_MAX + //# if ULLONG_MAX == 18446744073709551615 // 2**64 - 1 +-# if ULONGLONG_MAX == (0xffffffffffffffffuLL) // uLL reqd for xlC ++# if ULLONG_MAX == (0xffffffffffffffffuLL) // uLL reqd for xlC + typedef long long sc_intmax_t; + typedef unsigned long long sc_uintmax_t; + typedef long long sc_int64_t; |