mld2p4:
Make.inc.in Make.inc autogen.sh config config/pac.m4 configure.ac configure install-sh missing Defined a simple configure script.stopcriterion
parent
9795988443
commit
1911b336ce
@ -0,0 +1,35 @@
|
||||
##########################################################
|
||||
# #
|
||||
# Note: directories external to the MLD2P4 subtree #
|
||||
# must be specified here with absolute pathnames #
|
||||
# #
|
||||
##########################################################
|
||||
PSBLASDIR=@PSBLAS_DIR@
|
||||
include $(PSBLASDIR)/Make.inc
|
||||
|
||||
##########################################################
|
||||
# #
|
||||
# Additional defines and libraries for multilevel #
|
||||
# Note that these libraries should be compatible #
|
||||
# (compiled with) the compilers specified in the #
|
||||
# PSBLAS main Make.inc #
|
||||
# #
|
||||
# #
|
||||
##########################################################
|
||||
|
||||
SLULIBS=@SLU_LIBS@
|
||||
SLUFLAGS=@SLU_FLAGS@
|
||||
|
||||
SLUDISTLIBS=@SLUDIST_LIBS@
|
||||
SLUDISTFLAGS=@SLUDIST_FLAGS@
|
||||
|
||||
|
||||
UMFLIBS=@UMF_LIBS@
|
||||
UMFFLAGS=@UMF_FLAGS@
|
||||
|
||||
|
||||
LDLIBS=$(SLULIBS) $(SLUDISTLIBS) $(UMFLIBS) $(PSBLDLIBS)
|
||||
|
||||
#
|
||||
CDEFINES=$(SLUFLAGS) $(UMFFLAGS) $(SLUDISTFLAGS) $(PSBCDEFINES)
|
||||
FDEFINES=$(PSBFDEFINES)
|
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# $Id$
|
||||
|
||||
# This file is still not complete.
|
||||
|
||||
# this should create configure from configure.ac..
|
||||
|
||||
#touch NEWS AUTHORS ChangeLog COPYING INSTALL missing install-sh
|
||||
|
||||
#libtoolize
|
||||
|
||||
aclocal -I config || { echo "no aclocal ?" ; exit 1 ; }
|
||||
|
||||
# we produce a configure script
|
||||
autoconf || { echo "no autoconf ?" ; exit 1 ; }
|
||||
|
||||
# we produce a brand new Makefile
|
||||
#automake -i --add-missing || { echo "no automake ?" ; exit 1 ; }
|
||||
#automake -i || { echo "no automake ?" ; exit 1 ; }
|
||||
|
||||
# The automake required for autogen.sh'in this package is 1.10#.
|
||||
# So users who want to build from the svn repository are required to use this version.
|
||||
#
|
||||
# Users building from the tarball shouldn't bother, of course,
|
||||
# because they get the configure script generated from the tarball maintainer.
|
||||
|
@ -0,0 +1,714 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl 20080206
|
||||
dnl M4 macros for the PSBLAS library and useful for packages using PSBLAS.
|
||||
dnl
|
||||
|
||||
dnl @synopsis PAC_CHECK_LIBS
|
||||
dnl
|
||||
dnl Tries to detect the presence of a specific function among various libraries, using AC_CHECK_LIB
|
||||
dnl repeatedly on the specified libraries.
|
||||
dnl
|
||||
dnl Example use:
|
||||
dnl
|
||||
dnl PAC_CHECK_LIBS([atlas blas],
|
||||
dnl [dgemm],
|
||||
dnl [have_dgemm=yes],
|
||||
dnl [have_dgemm=no])
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
dnl 20080211 modified slighty from original.
|
||||
AC_DEFUN([PAC_CHECK_LIBS],
|
||||
[
|
||||
pac_check_libs_ok=no
|
||||
[for pac_check_libs_f in $2
|
||||
do ]
|
||||
[for pac_check_libs_l in $1
|
||||
do ]
|
||||
if test x"$pac_check_libs_ok" == xno ; then
|
||||
AC_CHECK_LIB([$pac_check_libs_l],[$pac_check_libs_f], [pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l"],[],[$5])
|
||||
fi
|
||||
done
|
||||
done
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
[ if test x"$pac_check_libs_ok" = xyes ; then
|
||||
$3
|
||||
else
|
||||
pac_check_libs_ok=no
|
||||
$4
|
||||
fi
|
||||
]
|
||||
])dnl
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_FUNC_MOVE_ALLOC( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will try to compile and link a program with move_alloc (a Fortran 2003 function).
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN([PAC_FORTRAN_HAVE_MOVE_ALLOC],
|
||||
ac_exeext=''
|
||||
ac_ext='f'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[AC_MSG_CHECKING([for MOVE_ALLOC intrinsic])
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test_move_alloc
|
||||
integer, allocatable :: a(:), b(:)
|
||||
allocate(a(3))
|
||||
call move_alloc(a, b)
|
||||
print *, allocated(a), allocated(b)
|
||||
print *, b
|
||||
end program test_move_alloc
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$1], , :, [rm -rf conftest*
|
||||
$1])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [ rm -rf conftest*
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
|
||||
|
||||
dnl @synopsis PAC_CHECK_HAVE_GFORTRAN( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will check if MPIFC is $FC.
|
||||
dnl The check will proceed by compiling a small Fortran program
|
||||
dnl containing the __GNUC__ macro, which should be defined in the
|
||||
dnl gfortran compiled programs.
|
||||
dnl
|
||||
dnl On pass, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_CHECK_HAVE_GFORTRAN,
|
||||
ac_exeext=''
|
||||
ac_ext='F'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program main
|
||||
#ifdef __GNUC__
|
||||
print *, "GCC!"
|
||||
#else
|
||||
this program will fail
|
||||
#endif
|
||||
end
|
||||
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
ifelse([$1], , :, [rm -rf conftest*
|
||||
$1])
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [ rm -rf conftest*
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
|
||||
|
||||
dnl @synopsis PAC_HAVE_MODERN_GCC( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will check if the GNU fortran version is suitable for PSBLAS.
|
||||
dnl If yes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl
|
||||
dnl Note : Will use MPIFC; if unset, will use '$FC'.
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_HAVE_MODERN_GCC,
|
||||
ac_exeext=''
|
||||
ac_ext='F'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program main
|
||||
#if ( __GNUC__ >= 4 && __GNUC_MINOR__ >= 2 ) || ( __GNUC__ > 4 )
|
||||
print *, "ciao"
|
||||
#else
|
||||
this program will fail
|
||||
#endif
|
||||
end
|
||||
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
ifelse([$1], , :, [rm -rf conftest*
|
||||
$1])
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [ rm -rf conftest*
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_CHECK_HAVE_MPI_MOD( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will determine if the fortran compiler MPIFC needs to include mpi.h or needs
|
||||
dnl to use the mpi module.
|
||||
dnl
|
||||
dnl If yes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl Modified Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_FORTRAN_CHECK_HAVE_MPI_MOD,
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[AC_MSG_CHECKING([MPI Fortran interface])
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test
|
||||
use mpi
|
||||
end program test
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
AC_MSG_RESULT([ use mpi ])
|
||||
ifelse([$1], , :, [rm -rf conftest*
|
||||
$1])
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
AC_MSG_RESULT([ include mpif.h ])
|
||||
ifelse([$2], , , [ rm -rf conftest*
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
|
||||
|
||||
dnl @synopsis PAC_ARG_WITH_FLAGS(lcase_name, UCASE_NAME)
|
||||
dnl
|
||||
dnl Test for --with-lcase_name="compiler/loader flags". if defined, prepend
|
||||
dnl flags to standard UCASE_NAME definition.
|
||||
dnl
|
||||
dnl Use this macro to facilitate additional special flags that should be
|
||||
dnl passed on to the preprocessor/compilers/loader.
|
||||
dnl
|
||||
dnl NOTE : Renamed after TAC_ARG_WITH_FLAGS as in the Trilinos-8.0.4 package.
|
||||
dnl
|
||||
dnl NOTE : This macro works in a way the user should invoke
|
||||
dnl --with-flags=...
|
||||
dnl only once, otherwise the first one will take effect.
|
||||
dnl
|
||||
dnl Example use:
|
||||
dnl
|
||||
dnl PAC_ARG_WITH_FLAGS(cxxflags, CXXFLAGS)
|
||||
dnl
|
||||
dnl tests for --with-cxxflags and pre-pends to CXXFLAGS
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl @notes Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN([PAC_ARG_WITH_FLAGS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether additional [$2] flags should be added (should be invoked only once)])
|
||||
dnl AC_MSG_CHECKING([whether additional [$2] flags should be added])
|
||||
AC_ARG_WITH($1,
|
||||
AC_HELP_STRING([--with-$1],
|
||||
[additional [$2] flags to be added: will prepend to [$2]]),
|
||||
[
|
||||
$2="${withval} ${$2}"
|
||||
AC_MSG_RESULT([$2 = ${$2}])
|
||||
],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
])
|
||||
|
||||
|
||||
dnl @synopsis PAC_ARG_WITH_LIBS
|
||||
dnl
|
||||
dnl Test for --with-libs="name(s)".
|
||||
dnl
|
||||
dnl Prepends the specified name(s) to the list of libraries to link
|
||||
dnl with.
|
||||
dnl
|
||||
dnl note: Renamed after PAC_ARG_WITH_LIBS as in the Trilinos package.
|
||||
dnl
|
||||
dnl Example use:
|
||||
dnl
|
||||
dnl PAC_ARG_WITH_LIBS
|
||||
dnl
|
||||
dnl tests for --with-libs and pre-pends to LIBS
|
||||
dnl
|
||||
dnl @author Jim Willenbring <jmwille@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([PAC_ARG_WITH_LIBS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether additional libraries are needed])
|
||||
AC_ARG_WITH(libs,
|
||||
AC_HELP_STRING([--with-libs],
|
||||
[List additional libraries here. For example, --with-libs=-lsuperlu
|
||||
or --with-libs=/path/libsuperlu.a]),
|
||||
[
|
||||
LIBS="${withval} ${LIBS}"
|
||||
AC_MSG_RESULT([LIBS = ${LIBS}])
|
||||
],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
]
|
||||
)
|
||||
dnl @synopsis PAC_ARG_WITH_PSBLAS
|
||||
dnl
|
||||
dnl Test for --with-psblas="pathname".
|
||||
dnl
|
||||
dnl Defines the path to PSBLAS build dir.
|
||||
dnl
|
||||
dnl note: Renamed after PAC_ARG_WITH_LIBS as in the Trilinos package.
|
||||
dnl
|
||||
dnl Example use:
|
||||
dnl
|
||||
dnl PAC_ARG_WIT_PSBLAS
|
||||
dnl
|
||||
dnl tests for --with-psblas and pre-pends to PSBLAS_PATH
|
||||
dnl
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN([PAC_ARG_WITH_PSBLAS],
|
||||
[
|
||||
AC_ARG_WITH(psblas,
|
||||
AC_HELP_STRING([--with-psblas], [The source directory for PSBLAS, for example,
|
||||
--with-psblas=/opt/packages/psblas-2.2]),
|
||||
[pac_cv_psblas_dir=$withval],
|
||||
[pac_cv_psblas_dir=''])
|
||||
]
|
||||
)
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_HAVE_PSBLAS( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will try to compile and link a program using the PSBLAS library
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_FORTRAN_HAVE_PSBLAS,
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[cat > conftest.$ac_ext <<EOF
|
||||
program test
|
||||
use psb_base_mod
|
||||
end program test
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
ifelse([$1], , :, [rm -rf conftest*
|
||||
$1])
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [ rm -rf conftest*
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_TEST_TR15581( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will try to compile and link a program checking the TR15581 Fortran extension support.
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl Note : This file will be likely to induce the compiler to create a module file
|
||||
dnl (for a module called conftest).
|
||||
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
|
||||
dnl in the present directory, or in another, or with another name. So be warned!
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_FORTRAN_TEST_TR15581,
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[AC_MSG_CHECKING([support for Fortran allocatables TR15581])
|
||||
i=0
|
||||
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
mkdir tmpdir_$i
|
||||
cd tmpdir_$i
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
module conftest
|
||||
type outer
|
||||
integer, allocatable :: v(:)
|
||||
end type outer
|
||||
|
||||
interface foo
|
||||
module procedure foov, food
|
||||
end interface
|
||||
contains
|
||||
|
||||
subroutine foov(a,b)
|
||||
|
||||
implicit none
|
||||
integer, allocatable, intent(inout) :: a(:)
|
||||
integer, allocatable, intent(out) :: b(:)
|
||||
|
||||
|
||||
allocate(b(size(a)))
|
||||
|
||||
end subroutine foov
|
||||
subroutine food(a,b)
|
||||
|
||||
implicit none
|
||||
type(outer), intent(inout) :: a
|
||||
type(outer), intent(out) :: b
|
||||
|
||||
|
||||
allocate(b%v(size(a%v)))
|
||||
|
||||
end subroutine food
|
||||
|
||||
end module conftest
|
||||
|
||||
|
||||
|
||||
program testtr15581
|
||||
use conftest
|
||||
type(outer) :: da, db
|
||||
integer, allocatable :: a(:), b(:)
|
||||
|
||||
allocate(a(10),da%v(10))
|
||||
a = (/ (i,i=1,10) /)
|
||||
da%v = (/ (i,i=1,10) /)
|
||||
call foo(a,b)
|
||||
call foo(da,db)
|
||||
write(*,*) b
|
||||
write(*,*) db%v
|
||||
|
||||
end program testtr15581
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
ifelse([$1], , :, [
|
||||
$1])
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i])
|
||||
|
||||
dnl @synopsis PAC_CHECK_BLACS
|
||||
dnl
|
||||
dnl Will try to find the BLACS
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl Note : This file will be likely to induce the compiler to create a module file
|
||||
dnl (for a module called conftest).
|
||||
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
|
||||
dnl in the present directory, or in another, or with another name. So be warned!
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_CHECK_BLACS,
|
||||
[AC_ARG_WITH(blacs, AC_HELP_STRING([--with-blacs=LIB], [Specify BLACSLIBNAME or -lBLACSLIBNAME or the absolute library filename.]),
|
||||
[psblas_cv_blacs=$withval],
|
||||
[psblas_cv_blacs=''])
|
||||
|
||||
case $psblas_cv_blacs in
|
||||
yes | "") ;;
|
||||
-* | */* | *.a | *.so | *.so.* | *.o)
|
||||
BLACS_LIBS="$psblas_cv_blacs" ;;
|
||||
*) BLACS_LIBS="-l$psblas_cv_blacs" ;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Test user-defined BLACS
|
||||
#
|
||||
if test x"$psblas_cv_blacs" != "x" ; then
|
||||
save_LIBS="$LIBS";
|
||||
AC_LANG([Fortran])
|
||||
LIBS="$BLACS_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for dgesd2d in $BLACS_LIBS])
|
||||
AC_TRY_LINK_FUNC(dgesd2d, [psblas_cv_blacs_ok=yes], [psblas_cv_blacs_ok=no;BLACS_LIBS=""])
|
||||
AC_MSG_RESULT($psblas_cv_blacs_ok)
|
||||
|
||||
if test x"$psblas_cv_blacs_ok" == x"yes"; then
|
||||
AC_MSG_CHECKING([for blacs_pinfo in $BLACS_LIBS])
|
||||
AC_TRY_LINK_FUNC(blacs_pinfo, [psblas_cv_blacs_ok=yes], [psblas_cv_blacs_ok=no;BLACS_LIBS=""])
|
||||
AC_MSG_RESULT($psblas_cv_blacs_ok)
|
||||
fi
|
||||
LIBS="$save_LIBS";
|
||||
fi
|
||||
AC_LANG([C])
|
||||
|
||||
######################################
|
||||
# System BLACS with PESSL default names.
|
||||
######################################
|
||||
if test x"$BLACS_LIBS" == "x" ; then
|
||||
AC_LANG([Fortran])
|
||||
PAC_CHECK_LIBS([blacssmp blacsp2 blacs],
|
||||
[dgesd2d],
|
||||
[psblas_cv_blacs_ok=yes; LIBS="$LIBS $pac_check_libs_LIBS " ]
|
||||
[BLACS_LIBS="$pac_check_libs_LIBS" ]
|
||||
AC_MSG_NOTICE([BLACS libraries detected.]),[]
|
||||
)
|
||||
if test x"$BLACS_LIBS" != "x"; then
|
||||
save_LIBS="$LIBS";
|
||||
LIBS="$BLACS_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for blacs_pinfo in $BLACS_LIBS])
|
||||
AC_LANG([Fortran])
|
||||
AC_TRY_LINK_FUNC(blacs_pinfo, [psblas_cv_blacs_ok=yes], [psblas_cv_blacs_ok=no;BLACS_LIBS=""])
|
||||
AC_MSG_RESULT($psblas_cv_blacs_ok)
|
||||
LIBS="$save_LIBS";
|
||||
fi
|
||||
fi
|
||||
######################################
|
||||
# Maybe we're looking at PESSL BLACS?#
|
||||
######################################
|
||||
if test x"$BLACS_LIBS" != "x" ; then
|
||||
save_LIBS="$LIBS";
|
||||
LIBS="$BLACS_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for PESSL BLACS])
|
||||
AC_LANG([Fortran])
|
||||
AC_TRY_LINK_FUNC(esvemonp, [psblas_cv_pessl_blacs=yes], [psblas_cv_pessl_blacs=no])
|
||||
AC_MSG_RESULT($psblas_cv_pessl_blacs)
|
||||
LIBS="$save_LIBS";
|
||||
fi
|
||||
if test "x$psblas_cv_pessl_blacs" == "xyes"; then
|
||||
FDEFINES="$psblas_cv_define_prepend-DHAVE_ESSL_BLACS $FDEFINES"
|
||||
fi
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Netlib BLACS library with default names
|
||||
##############################################################################
|
||||
|
||||
if test x"$BLACS_LIBS" == "x" ; then
|
||||
save_LIBS="$LIBS";
|
||||
AC_LANG([Fortran])
|
||||
PAC_CHECK_LIBS([ blacs_MPI-LINUX-0 blacs_MPI-SP5-0 blacs_MPI-SP4-0 blacs_MPI-SP3-0 blacs_MPI-SP2-0 blacsCinit_MPI-ALPHA-0 blacsCinit_MPI-IRIX64-0 blacsCinit_MPI-RS6K-0 blacsCinit_MPI-SPP-0 blacsCinit_MPI-SUN4-0 blacsCinit_MPI-SUN4SOL2-0 blacsCinit_MPI-T3D-0 blacsCinit_MPI-T3E-0
|
||||
],
|
||||
[dgesd2d],
|
||||
[psblas_cv_blacs_ok=yes; LIBS="$LIBS $pac_check_libs_LIBS "
|
||||
psblas_have_netlib_blacs=yes; ]
|
||||
[BLACS_LIBS="$pac_check_libs_LIBS" ]
|
||||
AC_MSG_NOTICE([BLACS libraries detected.]),[]
|
||||
)
|
||||
|
||||
if test x"$BLACS_LIBS" != "x" ; then
|
||||
AC_LANG([Fortran])
|
||||
PAC_CHECK_LIBS([ blacsF77init_MPI-LINUX-0 blacsF77init_MPI-SP5-0 blacsF77init_MPI-SP4-0 blacsF77init_MPI-SP3-0 blacsF77init_MPI-SP2-0 blacsF77init_MPI-ALPHA-0 blacsF77init_MPI-IRIX64-0 blacsF77init_MPI-RS6K-0 blacsF77init_MPI-SPP-0 blacsF77init_MPI-SUN4-0 blacsF77init_MPI-SUN4SOL2-0 blacsF77init_MPI-T3D-0 blacsF77init_MPI-T3E-0
|
||||
],
|
||||
[blacs_pinfo],
|
||||
[psblas_cv_blacs_ok=yes; LIBS="$pac_check_libs_LIBS $LIBS" ]
|
||||
[BLACS_LIBS="$pac_check_libs_LIBS $BLACS_LIBS" ]
|
||||
AC_MSG_NOTICE([Netlib BLACS Fortran initialization libraries detected.]),[]
|
||||
)
|
||||
fi
|
||||
|
||||
if test x"$BLACS_LIBS" != "x" ; then
|
||||
|
||||
AC_LANG([C])
|
||||
PAC_CHECK_LIBS([ blacsCinit_MPI-LINUX-0 blacsCinit_MPI-SP5-0 blacsCinit_MPI-SP4-0 blacsCinit_MPI-SP3-0 blacsCinit_MPI-SP2-0 blacsCinit_MPI-ALPHA-0 blacsCinit_MPI-IRIX64-0 blacsCinit_MPI-RS6K-0 blacsCinit_MPI-SPP-0 blacsCinit_MPI-SUN4-0 blacsCinit_MPI-SUN4SOL2-0 blacsCinit_MPI-T3D-0 blacsCinit_MPI-T3E-0
|
||||
],
|
||||
[Cblacs_pinfo],
|
||||
[psblas_cv_blacs_ok=yes; LIBS="$pac_check_libs_LIBS $LIBS" ]
|
||||
[BLACS_LIBS="$BLACS_LIBS $pac_check_libs_LIBS" ]
|
||||
AC_MSG_NOTICE([Netlib BLACS C initialization libraries detected.]),[]
|
||||
)
|
||||
fi
|
||||
LIBS="$save_LIBS";
|
||||
fi
|
||||
|
||||
if test x"$BLACS_LIBS" == "x" ; then
|
||||
AC_MSG_ERROR([
|
||||
No BLACS library detected! $PACKAGE_NAME will be unusable.
|
||||
Please make sure a BLACS implementation is accessible (ex.: --with-blacs="-lblacsname -L/blacs/dir" )
|
||||
])
|
||||
else
|
||||
save_LIBS="$LIBS";
|
||||
LIBS="$BLACS_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for ksendid in $BLACS_LIBS])
|
||||
AC_LANG([Fortran])
|
||||
AC_TRY_LINK_FUNC(ksendid, [psblas_cv_have_sendid=yes],[psblas_cv_have_sendid=no])
|
||||
AC_MSG_RESULT($psblas_cv_have_sendid)
|
||||
LIBS="$save_LIBS"
|
||||
AC_LANG([C])
|
||||
if test "x$psblas_cv_have_sendid" == "xyes"; then
|
||||
FDEFINES="$psblas_cv_define_prepend-DHAVE_KSENDID $FDEFINES"
|
||||
fi
|
||||
fi
|
||||
])dnl
|
||||
|
||||
|
||||
|
||||
dnl @synopsis PAC_CHECK_UMFPACK
|
||||
dnl
|
||||
dnl Will try to find the UMFPACK library and headers.
|
||||
dnl
|
||||
dnl Will use $CC
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl Note : This file will be likely to induce the compiler to create a module file
|
||||
dnl (for a module called conftest).
|
||||
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
|
||||
dnl in the present directory, or in another, or with another name. So be warned!
|
||||
dnl
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_CHECK_UMFPACK,
|
||||
[AC_ARG_WITH(umfpack, AC_HELP_STRING([--with-umfpack=LIBNAME], [Specify the library name for UMFPACK library.
|
||||
Default: "-lumfpack -lamd"]),
|
||||
[mld2p4_cv_umfpack=$withval],
|
||||
[mld2p4_cv_umfpack='-lumfpack -lamd'])
|
||||
AC_ARG_WITH(umfpackdir, AC_HELP_STRING([--with-umfpackdir=DIR], [Specify the directory for UMFPACK library and includes.]),
|
||||
[mld2p4_cv_umfpackdir=$withval],
|
||||
[mld2p4_cv_umfpackdir=''])
|
||||
|
||||
AC_LANG([C])
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
if test "x$mld2p4_cv_umfpackdir" != "x"; then
|
||||
LIBS="-L$mld2p4_cv_umfpackdir $LIBS"
|
||||
UMF_INCLUDES="-I$mld2p4_cv_umfpackdir"
|
||||
CPPFLAGS="$UMF_INCLUDES $CPPFLAGS"
|
||||
UMF_LIBS="-L$mld2p4_cv_umfpackdir"
|
||||
fi
|
||||
AC_MSG_NOTICE([umfp dir $mld2p4_cv_umfpackdir])
|
||||
AC_CHECK_HEADER([umfpack.h],
|
||||
[pac_umf_header_ok=yes],
|
||||
[pac_umf_header_ok=no; UMF_INCLUDES=""])
|
||||
if test "x$pac_umf_header_ok" == "xyes" ; then
|
||||
UMF_LIBS="$mld2p4_cv_umfpack $UMF_LIBS"
|
||||
LIBS="$UMF_LIBS -lm $LIBS";
|
||||
AC_MSG_CHECKING([for umfpack_di_symbolic in $UMF_LIBS])
|
||||
AC_TRY_LINK_FUNC(umfpack_di_symbolic,
|
||||
[mld2p4_cv_have_umfpack=yes;pac_umf_lib_ok=yes; ],
|
||||
[mld2p4_cv_have_umfpack=no;pac_umf_lib_ok=no; UMF_LIBS=""])
|
||||
AC_MSG_RESULT($pac_umf_lib_ok)
|
||||
fi
|
||||
LIBS="$SAVE_LIBS";
|
||||
CPPFLAGS="$SAVE_CPPFLAGS";
|
||||
])dnl
|
||||
|
||||
dnl @synopsis PAC_CHECK_SUPERLU
|
||||
dnl
|
||||
dnl Will try to find the SUPERLU library and headers.
|
||||
dnl
|
||||
dnl Will use $CC
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl Note : This file will be likely to induce the compiler to create a module file
|
||||
dnl (for a module called conftest).
|
||||
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
|
||||
dnl in the present directory, or in another, or with another name. So be warned!
|
||||
dnl
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_CHECK_SUPERLU,
|
||||
[AC_ARG_WITH(superlu, AC_HELP_STRING([--with-superlu=LIBNAME], [Specify the library name for SUPERLU library.
|
||||
Default: "-lslu"]),
|
||||
[mld2p4_cv_superlu=$withval],
|
||||
[mld2p4_cv_superlu='-lslu'])
|
||||
AC_ARG_WITH(superludir, AC_HELP_STRING([--with-superludir=DIR], [Specify the directory for SUPERLU library and includes.]),
|
||||
[mld2p4_cv_superludir=$withval],
|
||||
[mld2p4_cv_superludir=''])
|
||||
AC_LANG([C])
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
if test "x$mld2p4_cv_superludir" != "x"; then
|
||||
SLU_INCLUDES="-I$mld2p4_cv_superludir"
|
||||
SLU_LIBS="-L$mld2p4_cv_superludir"
|
||||
fi
|
||||
LIBS="$SLU_LIBS $LIBS"
|
||||
CPPFLAGS="$SLU_INCLUDES $CPPFLAGS"
|
||||
AC_MSG_NOTICE([slu dir $mld2p4_cv_superludir])
|
||||
AC_CHECK_HEADER([dsp_defs.h],
|
||||
[pac_slu_header_ok=yes],
|
||||
[pac_slu_header_ok=no; SLU_INCLUDES=""])
|
||||
if test "x$pac_slu_header_ok" == "xyes" ; then
|
||||
SLU_LIBS="$mld2p4_cv_superlu $SLU_LIBS"
|
||||
LIBS="$SLU_LIBS -lm $LIBS";
|
||||
AC_MSG_CHECKING([for superlu_malloc in $SLU_LIBS])
|
||||
AC_TRY_LINK_FUNC(superlu_malloc,
|
||||
[mld2p4_cv_have_superlu=yes;pac_slu_lib_ok=yes;],
|
||||
[mld2p4_cv_have_superlu=no;pac_slu_lib_ok=no; SLU_LIBS=""; SLU_INCLUDES=""])
|
||||
AC_MSG_RESULT($pac_slu_lib_ok)
|
||||
fi
|
||||
LIBS="$SAVE_LIBS";
|
||||
CPPFLAGS="$SAVE_CPPFLAGS";
|
||||
])dnl
|
||||
|
||||
dnl @synopsis PAC_CHECK_SUPERLU_Dist
|
||||
dnl
|
||||
dnl Will try to find the SUPERLU_Dist library and headers.
|
||||
dnl
|
||||
dnl Will use $CC
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl Note : This file will be likely to induce the compiler to create a module file
|
||||
dnl (for a module called conftest).
|
||||
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
|
||||
dnl in the present directory, or in another, or with another name. So be warned!
|
||||
dnl
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_CHECK_SUPERLUDIST,
|
||||
[AC_ARG_WITH(superludist, AC_HELP_STRING([--with-superludist=LIBNAME], [Specify the libname for SUPERLUDIST library. Requires you also specify SuperLU. Default: "-lslud"]),
|
||||
[mld2p4_cv_superludist=$withval],
|
||||
[mld2p4_cv_superludist='-lslud'])
|
||||
AC_ARG_WITH(superludistdir, AC_HELP_STRING([--with-superludistdir=DIR], [Specify the directory for SUPERLUDIST library and includes.]),
|
||||
[mld2p4_cv_superludistdir=$withval],
|
||||
[mld2p4_cv_superludistdir=''])
|
||||
|
||||
AC_LANG([C])
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
if test "x$mld2p4_cv_superludistdir" != "x"; then
|
||||
SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir"
|
||||
SLUDIST_LIBS="-L$mld2p4_cv_superludistdir"
|
||||
fi
|
||||
LIBS="$SLUDIST_LIBS $LIBS"
|
||||
CPPFLAGS="$SLUDIST_INCLUDES $CPPFLAGS"
|
||||
AC_MSG_NOTICE([slu dir $mld2p4_cv_superludistdir])
|
||||
AC_CHECK_HEADER([dsp_defs.h],
|
||||
[pac_sludist_header_ok=yes],
|
||||
[pac_sludist_header_ok=no; SLUDIST_INCLUDES=""])
|
||||
if test "x$pac_sludist_header_ok" == "xyes" ; then
|
||||
SLUDIST_LIBS="$mld2p4_cv_superludist $SLUDIST_LIBS"
|
||||
LIBS="$SLUDIST_LIBS -lm $LIBS";
|
||||
AC_MSG_CHECKING([for superlu_malloc_dist in $SLUDIST_LIBS])
|
||||
AC_TRY_LINK_FUNC(superlu_malloc_dist,
|
||||
[mld2p4_cv_have_superludist=yes;pac_sludist_lib_ok=yes;],
|
||||
[mld2p4_cv_have_superludist=no;pac_sludist_lib_ok=no;
|
||||
SLUDIST_LIBS=""; SLUDIST_INCLUDES=""])
|
||||
AC_MSG_RESULT($pac_sludist_lib_ok)
|
||||
fi
|
||||
LIBS="$SAVE_LIBS";
|
||||
CPPFLAGS="$SAVE_CPPFLAGS";
|
||||
])dnl
|
||||
|
@ -0,0 +1,204 @@
|
||||
dnl $Id$
|
||||
|
||||
dnl
|
||||
dnl Michele Martone's proposal for a transition towards the GNU build system for the PSBLAS library
|
||||
dnl
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl usage : aclocal -I config/ && autoconf && ./configure && make
|
||||
|
||||
dnl then : VAR=VAL ./configure
|
||||
|
||||
dnl In some configurations (AIX) the next line is needed:
|
||||
dnl MPIFC=mpxlf95 ./configure
|
||||
|
||||
dnl then : ./configure VAR=VAL
|
||||
dnl then : ./configure --help=short
|
||||
dnl then : ./configure --help
|
||||
|
||||
dnl the PSBLAS modules get this task difficult to accomplish!
|
||||
dnl SEE : --module-path --include-path
|
||||
|
||||
dnl NOTE : There is no cross compilation support.
|
||||
|
||||
dnl NOTE : missing ifort and kl* library handling..
|
||||
dnl NOTE : odd configurations like ifc + gcc still await in the mist of the unknown
|
||||
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
#
|
||||
# This script is used by the PSBLAS to determine the compilers, linkers, and
|
||||
# libraries to build its libraries executable code.
|
||||
# Its behaviour is driven on the compiler it finds or it is dictated to work
|
||||
# with.
|
||||
#
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
|
||||
# NOTE: the literal for version (the second argument to AC_INIT should be a literal!)
|
||||
AC_INIT([MLD2P4],1.0, salvatore.filippone@uniroma2.it)
|
||||
|
||||
# VERSION is the file containing the PSBLAS version code
|
||||
# FIXME
|
||||
mld2p4_cv_version="`cat VERSION`"
|
||||
|
||||
# A sample source file
|
||||
AC_CONFIG_SRCDIR([mlprec/mld_prec_type.f90])
|
||||
# Our custom M4 macros are in the 'config' directory
|
||||
AC_CONFIG_MACRO_DIR([config])
|
||||
AC_MSG_NOTICE([
|
||||
--------------------------------------------------------------------------------
|
||||
Welcome to the $PACKAGE_NAME $mld2p4_cv_version configure Script.
|
||||
|
||||
This creates Make.inc, but if you read carefully the
|
||||
documentation, you can make your own by hand for your needs.
|
||||
|
||||
./configure --with-psblas=/path/to/psblas
|
||||
See ./configure --help=short fore more info.
|
||||
--------------------------------------------------------------------------------
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# FLAGS and LIBS user customization
|
||||
###############################################################################
|
||||
|
||||
dnl NOTE : no spaces before the comma, and no brackets before the second argument!
|
||||
PAC_ARG_WITH_PSBLAS
|
||||
PSBLAS_DIR="$pac_cv_psblas_dir";
|
||||
AC_MSG_CHECKING([for PSBLAS build dir])
|
||||
case $PSBLAS_DIR in
|
||||
/*) ;;
|
||||
*) AC_MSG_ERROR([The PSBLAS build dir must be an absolute pathname
|
||||
which must be specified --with-psblas=/path/to/psblas])
|
||||
esac
|
||||
if test ! -d "$PSBLAS_DIR" ; then
|
||||
AC_MSG_ERROR([Could not find PSBLAS build dir $PSBLAS_DIR!])
|
||||
fi
|
||||
AC_MSG_RESULT([$PSBLAS_DIR])
|
||||
pac_cv_status_file="$PSBLAS_DIR/config.status"
|
||||
if test ! -f "$pac_cv_status_file" ; then
|
||||
AC_MSG_ERROR([Could not find configure output in $PSBLAS_DIR.
|
||||
You must first run the configure script in $PSBLAS_DIR $pac_cv_status_file.])
|
||||
fi
|
||||
dnl. $pac_cv_status_file
|
||||
dnl AC_MSG_NOTICE([Loaded $pac_cv_status_file $FC $MPIFC $BLACS_LIBS])
|
||||
dnl AM_INIT_AUTOMAKE
|
||||
dnl Specify required version of autoconf.
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
###############################################################################
|
||||
# Compilers detection: FC,F77,CC should be set, if found.
|
||||
###############################################################################
|
||||
|
||||
AC_PROG_CC([xlc pgcc icc gcc ])
|
||||
dnl AC_PROG_CXX
|
||||
|
||||
if test "X$CC" == "X" ; then
|
||||
AC_MSG_ERROR([Problem : No C compiler specified nor found!])
|
||||
fi
|
||||
PAC_ARG_WITH_LIBS
|
||||
PAC_ARG_WITH_FLAGS(clibs,CLIBS)
|
||||
PAC_ARG_WITH_FLAGS(flibs,FLIBS)
|
||||
PAC_ARG_WITH_FLAGS(library-path,LIBRARYPATH)
|
||||
PAC_ARG_WITH_FLAGS(include-path,INCLUDEPATH)
|
||||
PAC_ARG_WITH_FLAGS(module-path,MODULE_PATH)
|
||||
|
||||
###############################################################################
|
||||
# BLAS library presence checks
|
||||
###############################################################################
|
||||
|
||||
# Note : The libmkl.a (Intel Math Kernel Library) library could be used, too.
|
||||
# It is sufficient to specify it as -lmkl in the CLIBS or FLIBS or LIBS
|
||||
# and specify its path adjusting -L/path in CFLAGS.
|
||||
|
||||
# Right now it is a matter of user's taste when linking custom applications.
|
||||
# But PSBLAS examples could take advantage of these libraries, too.
|
||||
|
||||
|
||||
###############################################################################
|
||||
# BLACS library presence checks
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# METIS, SuperLU, SuperLU_Dist UMFPack libraries presence checks
|
||||
###############################################################################
|
||||
|
||||
# Note : also SuperLUStat,superlu_gridexit,..
|
||||
# Note : SuperLU_Dist produces superlu.a by default..
|
||||
# Note : THESE WERE NOT TESTED
|
||||
dnl AC_MSG_CHECKING([SuperLU_Dist])
|
||||
dnl AC_CHECK_LIB(superlu,[superlu_malloc_dist],mld2p4_cv_have_superludist=yes,mld2p4_cv_have_superludist=no)
|
||||
dnl AC_MSG_RESULT([$mld2p4_cv_have_superludist])
|
||||
dnl AC_MSG_CHECKING([SuperLU])
|
||||
dnl AC_CHECK_LIB(superlu,[superlu_malloc],mld2p4_cv_have_superlu=yes,mld2p4_cv_have_superlu=no)
|
||||
dnl AC_MSG_RESULT([$mld2p4_cv_have_superlu])
|
||||
|
||||
PAC_CHECK_UMFPACK
|
||||
if test "x$mld2p4_cv_have_umfpack" == "xyes" ; then
|
||||
UMF_FLAGS="-DHave_UMF_ $UMF_INCLUDES"
|
||||
else
|
||||
UMF_FLAGS=""
|
||||
fi
|
||||
|
||||
PAC_CHECK_SUPERLU
|
||||
if test "x$mld2p4_cv_have_superlu" == "xyes" ; then
|
||||
SLU_FLAGS="-DHave_SLU_ $SLU_INCLUDES"
|
||||
else
|
||||
SLU_FLAGS=""
|
||||
fi
|
||||
|
||||
PAC_CHECK_SUPERLUDIST
|
||||
if test "x$mld2p4_cv_have_superludist" == "xyes" ; then
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ $SLUDIST_INCLUDES"
|
||||
else
|
||||
SLUDIST_FLAGS=""
|
||||
fi
|
||||
|
||||
|
||||
# Note : We would like to detect PSBLAS, but this is complicated by the
|
||||
# module symbols mangling rules, which are compiler specific !
|
||||
#
|
||||
# Moreover, the PSBLAS doesn't have an installer, currently.
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Variable substitutions : the Make.inc.in will have these @VARIABLES@
|
||||
# substituted.
|
||||
|
||||
AC_SUBST(PSBLAS_DIR)
|
||||
|
||||
AC_SUBST(SLU_FLAGS)
|
||||
AC_SUBST(SLU_LIBS)
|
||||
AC_SUBST(UMF_FLAGS)
|
||||
AC_SUBST(UMF_LIBS)
|
||||
AC_SUBST(SLUDIST_FLAGS)
|
||||
AC_SUBST(SLUDIST_LIBS)
|
||||
|
||||
|
||||
###############################################################################
|
||||
# the following files will be created by Automake
|
||||
|
||||
AC_CONFIG_FILES([Make.inc])
|
||||
AC_OUTPUT()
|
||||
#AC_OUTPUT(Make.inc Makefile)
|
||||
###############################################################################
|
||||
|
||||
dnl Please note that brackets around variable identifiers are absolutely needed for compatibility..
|
||||
AC_MSG_NOTICE([
|
||||
${PACKAGE_NAME} ${mld2p4_cv_version} has been configured as follows:
|
||||
|
||||
PSBLAS library : ${PSBLAS_DIR}
|
||||
SuperLU detected : ${mld2p4_cv_have_superlu}
|
||||
SuperLU_Dist detected : ${mld2p4_cv_have_superludist}
|
||||
UMFPack detected : ${mld2p4_cv_have_umfpack}
|
||||
|
||||
If you are satisfied, run 'make' to build ${PACKAGE_NAME} and its documentation; otherwise
|
||||
type ./configure --help=short for a complete list of configure options specific to ${PACKAGE_NAME}.
|
||||
dnl To install the program and its documentation, run 'make install' if you are root,
|
||||
dnl or run 'su -c "make install"' if you are not root.
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
|
@ -0,0 +1,251 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue