1390 lines
44 KiB
Plaintext
1390 lines
44 KiB
Plaintext
/*BHEADER**********************************************************************
|
|
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|
* Produced at the Lawrence Livermore National Laboratory.
|
|
* This file is part of HYPRE. See file COPYRIGHT for details.
|
|
*
|
|
* HYPRE is free software; you can redistribute it and/or modify it under the
|
|
* terms of the GNU Lesser General Public License (as published by the Free
|
|
* Software Foundation) version 2.1 dated February 1999.
|
|
*
|
|
* $Revision$
|
|
***********************************************************************EHEADER*/
|
|
|
|
dnl *********************************************************************
|
|
dnl * File Name: configure.in
|
|
dnl *
|
|
dnl * This file is read when autoconf is run and the configure script is
|
|
dnl * generated.
|
|
dnl * Configure.in is structured as follows:
|
|
dnl * initialization information
|
|
dnl * determine the current architecture
|
|
dnl * set user specified compilers and any other user specified options
|
|
dnl *
|
|
dnl * For the given the architecture, an optimal compiler is
|
|
dnl * found (if not specified by the user). If the architecture is
|
|
dnl * unknown or none of the preferred compilers are available then
|
|
dnl * default compilers are found.
|
|
dnl *
|
|
dnl * For each chosen compiler, the appropriate flags are set for
|
|
dnl * optimization, debugging, MPI and pthreading (as required) and the
|
|
dnl * C preprocessor is checked.
|
|
dnl *
|
|
dnl * Finally, library flags are added and AC_SUBST is used to export
|
|
dnl * all necessary macro values.
|
|
dnl *********************************************************************
|
|
|
|
dnl *********************************************************************
|
|
dnl * Initialization Information
|
|
dnl * Set package information so it only has to be modified in one place
|
|
dnl *********************************************************************
|
|
|
|
m4_define([HYPRE_NAME], [hypre])
|
|
m4_define([HYPRE_VERSION], [2.4.0b])
|
|
m4_define([HYPRE_DATE], [2008/08/08])
|
|
m4_define([HYPRE_TIME], [00:00:00])
|
|
m4_define([HYPRE_DATETIME], [HYPRE_DATE])
|
|
m4_define([HYPRE_BUGS], [hypre-support@llnl.gov])
|
|
m4_define([HYPRE_TOP_SRC_DIR], [`pwd`])
|
|
|
|
AC_PREREQ(2.59)
|
|
AC_REVISION($Id$)
|
|
AC_INIT(HYPRE_NAME, HYPRE_VERSION, HYPRE_BUGS, HYPRE_NAME)
|
|
AC_CONFIG_HEADERS([HYPRE_config.h:config/HYPRE_config.h.in])
|
|
AC_COPYRIGHT([ Copyright (c) 2007, Lawrence Livermore National Security, LLC.
|
|
Produced at the Lawrence Livermore National Laboratory.
|
|
Written by the HYPRE team, UCRL-CODE-222953.
|
|
All rights reserved.
|
|
|
|
This file is part of HYPRE (see http://www.llnl.gov/CASC/hypre/).
|
|
Please see the COPYRIGHT_and_LICENSE file for the copyright notice,
|
|
disclaimer, contact information and the GNU Lesser General Public License.
|
|
|
|
This program is free software; you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License (as published by the Free
|
|
Software Foundation) version 2.1 dated February 1999.
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the terms and conditions of the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
along with this program; if not, write to the Free Software Foundation,
|
|
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA])
|
|
|
|
AC_CONFIG_AUX_DIR(config)
|
|
AC_CONFIG_MACRO_DIR([babel-runtime/m4])
|
|
AC_CONFIG_SRCDIR([HYPRE.h])
|
|
|
|
dnl *********************************************************************
|
|
dnl * Change default prefix from /usr/local to ./hypre
|
|
dnl *********************************************************************
|
|
AC_PREFIX_DEFAULT("HYPRE_TOP_SRC_DIR/hypre")
|
|
m4_pattern_allow([HYPRE_[A-Z_]+])
|
|
|
|
dnl *********************************************************************
|
|
dnl * Initialize Variables
|
|
dnl *********************************************************************
|
|
AC_DEFINE([HYPRE_PACKAGE_DATE], ["HYPRE_DATE"], [Date of release])
|
|
AC_DEFINE([HYPRE_PACKAGE_TIME], ["HYPRE_TIME"], [Time of release])
|
|
AC_DEFINE([HYPRE_PACKAGE_DATETIME], ["HYPRE_DATETIME"], [Date and time of release])
|
|
AC_DEFINE([HYPRE_PACKAGE_NAME], ["HYPRE_NAME"], [Package name])
|
|
AC_DEFINE([HYPRE_PACKAGE_VERSION], ["HYPRE_VERSION"], [Version Number])
|
|
AC_DEFINE([HYPRE_PACKAGE_STRING], ["HYPRE_NAME"], [Package name])
|
|
AC_DEFINE([HYPRE_PACKAGE_TARNAME], ["HYPRE_NAME"], [Package name])
|
|
AC_DEFINE([HYPRE_PACKAGE_BUGREPORT], ["HYPRE_BUGS"], [Bug reports])
|
|
|
|
HYPRE_PACKAGE_DATETIME="HYPRE_DATE"
|
|
AC_SUBST([HYPRE_PACKAGE_DATETIME])
|
|
|
|
HYPRE_TOP_SRCDIR="HYPRE_TOP_SRC_DIR"
|
|
AC_SUBST([HYPRE_TOP_SRCDIR])
|
|
|
|
HYPRE_RELEASEVERSION="HYPRE_VERSION"
|
|
HYPRE_RELEASEDATE="HYPRE_DATE"
|
|
HYPRE_RELEASETIME="HYPRE_TIME"
|
|
HYPRE_RELEASEDATETIME="HYPRE_DATETIME"
|
|
AC_SUBST([HYPRE_RELEASEVERSION])
|
|
AC_SUBST([HYPRE_RELEASEDATE])
|
|
AC_SUBST([HYPRE_RELEASETIME])
|
|
AC_SUBST([HYPRE_RELEASEDATETIME])
|
|
|
|
dnl *********************************************************************
|
|
dnl * Clear variables defined by AC_INIT to avoid name conflicts with
|
|
dnl * other packages.
|
|
dnl *********************************************************************
|
|
PACKAGE_DATE=
|
|
PACKAGE_TIME=
|
|
PACKAGE_DATETIME=
|
|
PACKAGE_NAME=
|
|
PACKAGE_VERSION=
|
|
PACKAGE_STRING=
|
|
PACKAGE_TARNAME=
|
|
PACKAGE_BUGREPORT=
|
|
|
|
dnl *********************************************************************
|
|
dnl * Determine BUILD, HOST, and TARGET types
|
|
dnl *********************************************************************
|
|
if test "x$build_alias" = "x"
|
|
then
|
|
AC_CANONICAL_BUILD
|
|
fi
|
|
|
|
if test "x$host_alias" = "x"
|
|
then
|
|
AC_CANONICAL_HOST
|
|
fi
|
|
|
|
if test "x$target_alias" = "x"
|
|
then
|
|
target_alias=$host_alias
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Define optional features
|
|
dnl *********************************************************************
|
|
AC_ARG_ENABLE(debug,
|
|
AS_HELP_STRING([ --enable-debug],
|
|
[ Set compiler flags for debugging.]),
|
|
[case "${enableval}" in
|
|
yes) casc_using_debug=yes ;;
|
|
no | "") casc_using_debug=no ;;
|
|
*) AC_MSG_ERROR([Bad value ${enableval} for --enable-debug]) ;;
|
|
esac],
|
|
[casc_using_debug=no]
|
|
)
|
|
|
|
AC_ARG_ENABLE(shared,
|
|
AS_HELP_STRING([ --enable-shared],
|
|
[ Build shared libraries (default is NO).]),
|
|
[case "${enableval}" in
|
|
yes) casc_using_shared=yes ;;
|
|
no | "") casc_using_shared=no ;;
|
|
*) AC_MSG_ERROR([Bad value ${enableval} for --enable-shared]) ;;
|
|
esac],
|
|
[casc_using_shared=no]
|
|
)
|
|
|
|
AC_ARG_ENABLE(python,
|
|
AS_HELP_STRING([ --enable-python=PYTHON],
|
|
[ Build interface to specified instance of Python (turns on shared libraries, requires Babel; default is NO).]),
|
|
[case "${enableval}" in
|
|
yes) casc_using_python=yes
|
|
casc_python="python"
|
|
;;
|
|
no | "") casc_using_python=no ;;
|
|
*) casc_using_python=yes
|
|
casc_python=${enableval}
|
|
casc_using_shared=yes
|
|
;;
|
|
esac],
|
|
[casc_using_python=no]
|
|
)
|
|
|
|
AC_ARG_ENABLE(java,
|
|
AS_HELP_STRING([ --enable-java],
|
|
[ Build interface to Java (turns on shared libraries, requires Babel; default is NO).]),
|
|
[case "${enableval}" in
|
|
yes) casc_using_java=yes
|
|
;;
|
|
no | "") casc_using_java=no ;;
|
|
*) casc_using_java=yes
|
|
casc_using_shared=yes
|
|
;;
|
|
esac],
|
|
[casc_using_java=no]
|
|
)
|
|
|
|
dnl *********************************************************************
|
|
dnl * Determine if user provided C compiler or flags
|
|
dnl *********************************************************************
|
|
if test "x$CC" = "x"
|
|
then
|
|
casc_user_chose_ccompilers=no
|
|
else
|
|
casc_user_chose_ccompilers=yes
|
|
fi
|
|
|
|
if test "x$CFLAGS" = "x"
|
|
then
|
|
casc_user_chose_cflags=no
|
|
else
|
|
casc_user_chose_cflags=yes
|
|
fi
|
|
|
|
|
|
dnl *********************************************************************
|
|
dnl * Determine if user provided CXX compiler or flags
|
|
dnl *********************************************************************
|
|
if test "x$CXX" = "x"
|
|
then
|
|
casc_user_chose_cxxcompilers=no
|
|
else
|
|
casc_user_chose_cxxcompilers=yes
|
|
fi
|
|
|
|
if test "x$CXXFLAGS" = "x"
|
|
then
|
|
casc_user_chose_cxxflags=no
|
|
else
|
|
casc_user_chose_cxxflags=yes
|
|
fi
|
|
|
|
|
|
dnl *********************************************************************
|
|
dnl * Determine if user provided fortran compiler or flags
|
|
dnl *********************************************************************
|
|
if test "x$F77" = "x"
|
|
then
|
|
casc_user_chose_fcompilers=no
|
|
else
|
|
casc_user_chose_fcompilers=yes
|
|
fi
|
|
|
|
if test "x$FFLAGS" = "x" || test "x$F77FLAGS" = "x"
|
|
then
|
|
casc_user_chose_fflags=no
|
|
else
|
|
casc_user_chose_fflags=yes
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set default AR value if not defined by the user
|
|
dnl *********************************************************************
|
|
if test "x$AR" = "x"
|
|
then
|
|
AR="ar -rcu"
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * If the user has specified a c, c++, or fortran compiler on the
|
|
dnl * command line, that compiler will be used. No checks are done
|
|
dnl * to assure this compiler is present or working. Additionally,
|
|
dnl * if the user indicated any MPI include, library, or directory
|
|
dnl * to use with the chosen compiler those options are identified
|
|
dnl * and the appropriate macros are assigned values.
|
|
dnl *********************************************************************
|
|
casc_user_chose_mpi=no
|
|
casc_user_chose_blas=no
|
|
casc_user_chose_lapack=no
|
|
casc_user_chose_fei=no
|
|
|
|
casc_using_c=yes
|
|
casc_using_cxx=yes
|
|
casc_using_fortran=yes
|
|
|
|
casc_using_fei=yes
|
|
casc_using_superlu=yes
|
|
|
|
casc_using_babel=no
|
|
casc_using_examples=no
|
|
casc_using_openmp=no
|
|
casc_using_insure=no
|
|
casc_using_purify=no
|
|
|
|
casc_testing_alpha=no
|
|
casc_testing_beta=no
|
|
casc_testing_general=no
|
|
|
|
|
|
AC_ARG_WITH(LD,
|
|
AS_HELP_STRING([ --with-LD=ARG],
|
|
[ Set linker to ARG. The environment variable 'LD'
|
|
will be overridden.]),
|
|
[LD=$withval]
|
|
)
|
|
|
|
AC_ARG_WITH(LDFLAGS,
|
|
AS_HELP_STRING([ --with-LDFLAGS=ARG],
|
|
[ User can manually set linker flags. The 'LDFLAGS'
|
|
environment variable will be overridden.]),
|
|
[LDFLAGS=$withval]
|
|
)
|
|
|
|
AC_ARG_WITH(extra-incpath,
|
|
AS_HELP_STRING([ --with-extra-incpath=PATH],
|
|
[ Define extra include path, where PATH is a
|
|
space-separated list (enclosed in quotes) of directories.]),
|
|
[CCFLAGS="${CCFLAGS} -I`echo ${withval}|sed 's/ /\ -I/g'`"]
|
|
)
|
|
|
|
AC_ARG_WITH(extra-ldpath,
|
|
AS_HELP_STRING([ --with-extra-ldpath=PATH],
|
|
[ Define extra ld path, where PATH is a
|
|
space-separated list (enclosed in quotes) of directories.]),
|
|
[LDFLAGS="-L`echo ${withval}|sed 's/ /\ -L/g'` ${LDFLAGS}"]
|
|
)
|
|
|
|
AC_ARG_WITH(insure,
|
|
AS_HELP_STRING([ --with-insure=FLAGS],
|
|
[ FLAGS are options to pass to insure, e.g.
|
|
-log-file=struct_ls.insure -append-logfile=yes
|
|
will send output to the specified file. Nothing
|
|
is done to verify that insure is available]),
|
|
[case "${withval}" in
|
|
yes) casc_using_insure=yes
|
|
casc_using_debug=yes
|
|
casc_insure_flags=""
|
|
;;
|
|
no) ;;
|
|
*) casc_using_insure=yes
|
|
casc_using_debug=yes
|
|
casc_insure_flags="$withval"
|
|
;;
|
|
esac]
|
|
)
|
|
|
|
AC_ARG_WITH(insure-to-file,
|
|
AS_HELP_STRING([ --with-insure-to-file],
|
|
[ Direct insure output to the file named insure.log.
|
|
Nothing is done to verify that insure is
|
|
available]),
|
|
[case "${withval}" in
|
|
yes) casc_using_insure=yes
|
|
casc_using_debug=yes
|
|
casc_insure_flags="-Zoi -log-file=insure.log"
|
|
;;
|
|
no) ;;
|
|
*) casc_using_insure=yes
|
|
casc_using_debug=yes
|
|
casc_insure_flags="$withval"
|
|
;;
|
|
esac]
|
|
)
|
|
|
|
AC_ARG_WITH(purify,
|
|
AS_HELP_STRING([ --with-purify=FLAGS],
|
|
[ FLAGS are options to pass to purify, e.g.
|
|
-log-file=struct_ls.purify -append-logfile=yes will
|
|
send output to the specified file. Defines gcc and
|
|
g++ as the C and C++ compilers if not already set by
|
|
the user. Nothing is done to verify that purify is
|
|
available on the machine]),
|
|
[if test "$casc_user_chose_ccompilers" = "no"
|
|
then
|
|
AC_CHECK_PROGS(CC, gcc, [""])
|
|
if test "x$CC" = "x"
|
|
then
|
|
casc_using_c=no
|
|
fi
|
|
casc_user_chose_ccompilers=yes
|
|
fi
|
|
if test "$casc_user_chose_cxxcompilers" = "no"
|
|
then
|
|
AC_CHECK_PROGS(CXX, g++, [""])
|
|
if test "x$CXX" = "x"
|
|
then
|
|
casc_using_cxx=no
|
|
fi
|
|
casc_user_chose_cxxcompilers=yes
|
|
fi
|
|
if test "$casc_user_chose_fcompilers" = "no"
|
|
then
|
|
AC_CHECK_PROGS(F77, g77, [""])
|
|
if test "x$F77" = "x"
|
|
then
|
|
casc_using_fortran=no
|
|
fi
|
|
casc_user_chose_fcompilers=yes
|
|
fi
|
|
case "${withval}" in
|
|
yes) casc_using_purify=yes
|
|
casc_using_debug=yes
|
|
casc_using_mpi=no
|
|
casc_purify_flags=""
|
|
;;
|
|
no) ;;
|
|
*) casc_using_purify=yes
|
|
casc_using_debug=yes
|
|
casc_using_mpi=no
|
|
casc_purify_flags="$withval"
|
|
;;
|
|
esac]
|
|
)
|
|
|
|
AC_ARG_WITH(purify-to-file,
|
|
AS_HELP_STRING([ --with-purify-to-file],
|
|
[ Direct purify output to the file named purify.log. Defines
|
|
gcc and g++ as the C and C++ compilers, unless already set
|
|
by the user.]),
|
|
[if test "$casc_user_chose_ccompilers" = "no"
|
|
then
|
|
AC_CHECK_PROGS(CC, gcc, [""])
|
|
if test "x$CC" = "x"
|
|
then
|
|
casc_using_c=no
|
|
fi
|
|
casc_user_chose_ccompilers=yes
|
|
fi
|
|
if test "$casc_user_chose_cxxcompilers" = "no"
|
|
then
|
|
AC_CHECK_PROGS(CXX, g++, [""])
|
|
if test "x$CXX" = "x"
|
|
then
|
|
casc_using_cxx=no
|
|
fi
|
|
casc_user_chose_cxxcompilers=yes
|
|
fi
|
|
if test "$casc_user_chose_fcompilers" = "no"
|
|
then
|
|
AC_CHECK_PROGS(F77, g77, [""])
|
|
if test "x$F77" = "x"
|
|
then
|
|
casc_using_fortran=no
|
|
fi
|
|
casc_user_chose_fcompilers=yes
|
|
fi
|
|
case "${withval}" in
|
|
yes) casc_using_purify=yes
|
|
casc_using_debug=yes
|
|
casc_using_mpi=no
|
|
casc_purify_flags="-log-file=purify.log -append-logfile=yes"
|
|
;;
|
|
no) ;;
|
|
*) casc_using_purify=yes
|
|
casc_using_debug=yes
|
|
casc_using_mpi=no
|
|
casc_purify_flags="$withval"
|
|
;;
|
|
esac]
|
|
)
|
|
|
|
AC_ARG_WITH(strict-checking,
|
|
AS_HELP_STRING([ --with-strict-checking],
|
|
[ Compiles without MPI ('--without-MPI') and tries to
|
|
find a compiler option that warns of as many non-ANSI
|
|
features as possible. --display_error_number --lint
|
|
are enabled for lint-type checking. Individual types
|
|
of warnings can be suppressed using --diag_suppress
|
|
and the error numbers provided by --display_error_number]),
|
|
[
|
|
casc_user_chose_ccompilers=yes
|
|
casc_user_chose_cflags=yes
|
|
casc_user_chose_cxxcompilers=yes
|
|
casc_user_chose_cxxflags=yes
|
|
casc_user_chose_fcompilers=yes
|
|
casc_user_chose_fflags=yes
|
|
casc_using_debug=yes
|
|
casc_using_mpi=no
|
|
|
|
AC_CHECK_PROGS(CC, [gcc g++ icc icpc pgcc pgCC xlc xlC kcc KCC], [""])
|
|
if test "x$CC" = "x"
|
|
then
|
|
casc_using_c=no
|
|
CFLAGS=""
|
|
elif test "x$GCC" = "xyes" || test "x$CC" = "xgcc"; then
|
|
FFLAGS="-g -Wall"
|
|
CFLAGS="-g -Wall -pedantic"
|
|
CXXFLAGS="-g -Wall -Wshadow -fno-implicit-templates"
|
|
CXXFLAGS="$CXXFLAGS -Woverloaded-virtual -ansi -pedantic"
|
|
elif test "x$CC" = "xicc"; then
|
|
FFLAGS="-g -Wall"
|
|
CFLAGS="-g -Xc -Wall -x c"
|
|
CXXFLAGS="-g -Xc -Wall -x c++"
|
|
elif test "x$CC" = "xpgcc"; then
|
|
FFLAGS="-g -Wall"
|
|
CFLAGS="-g -Xa -Minform,inform"
|
|
CXXFLAGS="-g -A --display_error_number -Minform,inform"
|
|
elif test "x$CC" = "xxlc"; then
|
|
FFLAGS="-g -Wall"
|
|
CFLAGS="-g -qinfo=dcl:eff:pro:rea:ret:use"
|
|
CXXFLAGS="-g -qinfo=dcl:eff:obs:pro:rea:ret:use"
|
|
elif test "x$CC" = "xKCC" || test "x$CC" = "xkcc"; then
|
|
FFLAGS="-g -Wall"
|
|
CFLAGS="-g --c --strict --lint --display_error_number"
|
|
CFLAGS="$CFLAGS --diag_suppress 45,236,450,826"
|
|
CFLAGS="$CFLAGS,1018,1021,1022,1023,1024,1030,1041"
|
|
CXXFLAGS="-g --strict --lint --display_error_number"
|
|
CXXFLAGS="$CXXFLAGS --diag_suppress 381,450,1023,1024"
|
|
fi
|
|
|
|
AC_CHECK_PROGS(CXX, [g++ gcc icpc icc pgCC pgcc xlC xlc KCC kcc], [""])
|
|
if test "x$CXX" = "x"
|
|
then
|
|
casc_using_cxx=no
|
|
CXXFLAGS=""
|
|
fi
|
|
AC_CHECK_PROGS(F77, [g77 ifort pgf77 xlf], [""])
|
|
if test "x$F77" = "x"
|
|
then
|
|
casc_using_fortran=no
|
|
FFLAGS=""
|
|
fi
|
|
|
|
AC_DEFINE(HYPRE_SEQUENTIAL,1,[No MPI being used.])
|
|
], [])
|
|
|
|
AC_ARG_WITH(MPI-include,
|
|
AS_HELP_STRING([ --with-MPI-include=DIR],
|
|
[ User specifies that mpi.h is in DIR. The options
|
|
--with-MPI-include --with-MPI-libs and
|
|
--with-MPI-lib-dirs must be used together.]),
|
|
[for mpi_dir in $withval; do
|
|
MPIINCLUDE="$MPIINCLUDE -I$mpi_dir"
|
|
done;
|
|
casc_user_chose_mpi=yes],
|
|
[casc_user_chose_mpi=no]
|
|
)
|
|
|
|
AC_ARG_WITH(MPI-libs,
|
|
AS_HELP_STRING([ --with-MPI-libs=LIBS],
|
|
[ LIBS is space-separated list (enclosed in quotes) of library
|
|
names needed for MPI, e.g. "nsl socket mpi". The options
|
|
--with-MPI-include --with-MPI-libs and --with-MPI-lib-dirs
|
|
must be used together.]),
|
|
[for mpi_lib in $withval; do
|
|
MPILIBS="$MPILIBS -l$mpi_lib"
|
|
done;
|
|
casc_user_chose_mpi=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(MPI-lib-dirs,
|
|
AS_HELP_STRING([ --with-MPI-lib-dirs=DIRS],
|
|
[ DIRS is space-separated list (enclosed in quotes) of
|
|
directories containing the libraries specified by
|
|
--with-MPI-libs, e.g "usr/lib /usr/local/mpi/lib".
|
|
The options --with-MPI-include --with-MPI-libs and
|
|
--with-MPI-lib-dirs must be used together.]),
|
|
[for mpi_lib_dir in $withval; do
|
|
MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS"
|
|
done;
|
|
casc_user_chose_mpi=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(MPI-flags,
|
|
AS_HELP_STRING([ --with-MPI-flags=FLAGS],
|
|
[ FLAGS is a space separated list (enclosed in quotes) of
|
|
whatever flags other than -l and -L are needed to link
|
|
with MPI libraries-- Does not de-activate autosearch for
|
|
other MPI information. May be used with the other three
|
|
MPI options or alone in conjunction with the automatic MPI
|
|
search.]),
|
|
[case "${withval}" in
|
|
yes) MPIFLAGS="" ;;
|
|
no) MPIFLAGS="" ;;
|
|
*) MPIFLAGS=$withval ;;
|
|
esac],
|
|
[MPIFLAGS=""]
|
|
)
|
|
|
|
AC_ARG_WITH(blas-libs,
|
|
AS_HELP_STRING([ --with-blas-libs=LIBS],
|
|
[ LIBS is space-separated list (enclosed in quotes) of libraries
|
|
needed for BLAS. The options --with-blas-libs and
|
|
--with-blas-lib-dirs must be used together.]),
|
|
[for blas_lib in $withval; do
|
|
BLASLIBS="$BLASLIBS -l$blas_lib"
|
|
done;
|
|
casc_user_chose_blas=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(blas-lib-dirs,
|
|
AS_HELP_STRING([ --with-blas-lib-dirs=DIRS],
|
|
[ DIRS is space-separated list (enclosed in quotes) of
|
|
directories containing the libraries specified by
|
|
--with-blas-libs, e.g "usr/lib /usr/local/blas/lib".
|
|
The options --with-blas-libs and --with-blas-lib-dirs
|
|
must be used together.]),
|
|
[for blas_lib_dir in $withval; do
|
|
BLASLIBDIRS="-L$blas_lib_dir $BLASLIBDIRS"
|
|
done;
|
|
casc_user_chose_blas=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(lapack-libs,
|
|
AS_HELP_STRING([ --with-lapack-libs=LIBS],
|
|
[ LIBS is space-separated list (enclosed in quotes) of libraries
|
|
needed for LAPACK. The options --with-lapack-libs and
|
|
--with-lapack-lib-dirs must be used together.]),
|
|
[for lapack_lib in $withval; do
|
|
LAPACKLIBS="$LAPACKLIBS -l$lapack_lib"
|
|
done;
|
|
casc_user_chose_lapack=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(lapack-lib-dirs,
|
|
AS_HELP_STRING([ --with-lapack-lib-dirs=DIRS],
|
|
[ DIRS is space-separated list (enclosed in quotes) of
|
|
directories containing the libraries specified by
|
|
--with-lapack-libs, e.g "usr/lib /usr/local/lapack/lib".
|
|
The options --with-lapack-libs and --with-lapack-lib-dirs
|
|
must be used together.]),
|
|
[for lapack_lib_dir in $withval; do
|
|
LAPACKLIBDIRS="-L$lapack_lib_dir $LAPACKLIBDIRS"
|
|
done;
|
|
casc_user_chose_lapack=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(fei-libs,
|
|
AS_HELP_STRING([ --with-fei-libs=LIBS],
|
|
[ LIBS is space-separated list (enclosed in quotes) of FEI
|
|
library names.]),
|
|
[for fei_lib in $withval; do
|
|
FEILIBS="$FEILIBS -l$fei_lib"
|
|
done;
|
|
casc_using_fei=yes;
|
|
casc_user_chose_fei=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(fei-lib-dir,
|
|
AS_HELP_STRING([ --with-fei-lib-dir=DIRS],
|
|
[ DIRS is space-separated list (enclosed in quotes) of
|
|
directories containing the libraries specified by
|
|
--with-fei-libs, e.g "usr/lib /usr/local/fei/lib".]),
|
|
[for fei_lib_dir in $withval; do
|
|
FEILIBDIRS="-L$fei_lib_dir $FEILIBDIRS"
|
|
done;
|
|
casc_using_fei=yes;
|
|
casc_user_chose_fei=yes]
|
|
)
|
|
|
|
AC_ARG_WITH(fei-inc-dir,
|
|
AS_HELP_STRING([ --with-fei-inc-dir=DIRS],
|
|
[ DIRS is space-separated list (enclosed in quotes) of
|
|
directories containing the include files needed by the
|
|
FEI specified by --with-fei-libs,
|
|
e.g "usr/include /usr/fei/include".]),
|
|
[for fei_inc in $withval; do
|
|
FEIINCLUDE="$FEIINCLUDE $fei_inc"
|
|
done;
|
|
casc_using_fei=yes;
|
|
casc_user_chose_fei=yes]
|
|
)
|
|
|
|
dnl *********************************************************************
|
|
dnl * If the user has specified any other command line options this
|
|
dnl * section identifies the options and assigns yes or no values to
|
|
dnl * appropriate macros. These values will be used to determine
|
|
dnl * compilers, flags and libraries needed.
|
|
dnl *********************************************************************
|
|
AC_ARG_WITH(no-global-partition,
|
|
AS_HELP_STRING([ --with-no-global-partition],
|
|
[ Do not use global partitioning.]),
|
|
[if test "$withval" = "yes"
|
|
then
|
|
AC_DEFINE(HYPRE_NO_GLOBAL_PARTITION,1,[No global partitioning being used.])
|
|
fi]
|
|
)
|
|
|
|
AC_ARG_WITH(print-errors,
|
|
AS_HELP_STRING([ --with-print-errors],
|
|
[ Print HYPRE errors.]),
|
|
[if test "$withval" = "yes"
|
|
then
|
|
AC_DEFINE(HYPRE_PRINT_ERRORS,1,[Print HYPRE errors.])
|
|
fi]
|
|
)
|
|
|
|
AC_ARG_WITH(COMM_SIMPLE,
|
|
AS_HELP_STRING([ --with-COMM_SIMPLE],
|
|
[ Do not use MPI derived data types. This option is
|
|
automatically chosen for IBM, may also be selected
|
|
for other platforms as well.]),
|
|
[if test "$withval" = "yes"
|
|
then
|
|
CFLAGS="$CFLAGS -DHYPRE_COMM_SIMPLE"
|
|
fi]
|
|
)
|
|
|
|
AC_ARG_WITH(timing,
|
|
AS_HELP_STRING([ --with-timing],
|
|
[ Use HYPRE timing routines]),
|
|
[if test "$withval" = "yes"
|
|
then
|
|
AC_DEFINE(HYPRE_TIMING,1,[Hypre timing routines being used.])
|
|
fi]
|
|
)
|
|
|
|
AC_ARG_WITH(openmp,
|
|
AS_HELP_STRING([ --with-openmp],
|
|
[ Use OpenMP--this may affect which compiler is chosen.
|
|
Supported on IBM and DECS, test on Linux.]),
|
|
[case "${withval}" in
|
|
yes) casc_using_openmp=yes
|
|
AC_DEFINE([HYPRE_USING_OPENMP],1,[Enable OpenMP support]) ;;
|
|
no) casc_using_openmp=no ;;
|
|
esac],
|
|
[casc_using_openmp=no]
|
|
)
|
|
|
|
AC_ARG_WITH(babel,
|
|
AS_HELP_STRING([ --with-babel], [ Use babel]),
|
|
[case "${withval}" in
|
|
yes) casc_using_babel=yes ;;
|
|
no) casc_using_babel=no ;;
|
|
esac],
|
|
[casc_using_babel=no]
|
|
)
|
|
|
|
AC_ARG_WITH(examples,
|
|
AS_HELP_STRING([ --with-examples], [ Builds example codes.]),
|
|
[case "${withval}" in
|
|
yes) casc_using_mpi=yes
|
|
casc_using_examples=yes
|
|
;;
|
|
no) casc_using_examples=no
|
|
;;
|
|
esac],
|
|
[casc_using_examples=no]
|
|
)
|
|
|
|
AC_ARG_WITH(fei,
|
|
AS_HELP_STRING([ --with-fei], [ Use internal FEI routines.]),
|
|
[case "${withval}" in
|
|
no) casc_using_fei=no
|
|
;;
|
|
*) casc_using_fei=yes
|
|
;;
|
|
esac]
|
|
)
|
|
|
|
AC_ARG_WITH(superlu,
|
|
AS_HELP_STRING([ --with-superlu], [ Use internal SuperLU routines.]),
|
|
[case "${withval}" in
|
|
no) casc_using_superlu=no
|
|
;;
|
|
*) casc_using_superlu=yes
|
|
;;
|
|
esac]
|
|
)
|
|
|
|
AC_ARG_WITH(mli,
|
|
AS_HELP_STRING([ --with-mli], [ Use MLI]),
|
|
[case "${withval}" in
|
|
yes) casc_using_mli=yes ;;
|
|
no) casc_using_mli=no ;;
|
|
esac],
|
|
[casc_using_mli=no]
|
|
)
|
|
|
|
AC_ARG_WITH(MPI,
|
|
AS_HELP_STRING([ --with-MPI],
|
|
[ DEFAULT: Compile with MPI. Selecting --without-MPI
|
|
may affect which compiler is chosen.]),
|
|
[case "$withval" in
|
|
no) casc_using_mpi=no ;;
|
|
*) casc_using_mpi=yes ;;
|
|
esac], [casc_using_mpi=yes])
|
|
|
|
dnl *********************************************************************
|
|
dnl * Select compilers if not already defined by command line options
|
|
dnl *********************************************************************
|
|
if test "$casc_user_chose_ccompilers" = "no"
|
|
then
|
|
if test "$casc_using_openmp" = "yes"
|
|
then
|
|
AC_CHECK_PROGS(CC, [mpxlc xlc mpguidec guidec mpiicc icc pgcc cc], [""])
|
|
elif test "$casc_using_mpi" = "no"
|
|
then
|
|
AC_CHECK_PROGS(CC, [xlc xlC gcc g++ pgcc pgCC icc icpc cc CC kcc KCC], [""])
|
|
else
|
|
AC_CHECK_PROGS(CC, [mpxlc mpcc mpicc mpiicc mpipgcc], [""])
|
|
fi
|
|
|
|
if test "x$CC" = "x"
|
|
then
|
|
casc_using_c=no
|
|
fi
|
|
fi
|
|
|
|
if test "$casc_user_chose_cxxcompilers" = "no"
|
|
then
|
|
if test "$casc_using_openmp" = "yes"
|
|
then
|
|
AC_CHECK_PROGS(CXX, [mpxlC xlC mpguidec++ guidec++ mpiicpc icpc pgCC CC], [""])
|
|
elif test "$casc_using_mpi" = "no"
|
|
then
|
|
AC_CHECK_PROGS(CXX, [xlC xlc g++ gcc pgCC pgcc icpc icc CC cc KCC kcc], [""])
|
|
else
|
|
AC_CHECK_PROGS(CXX, [mpxlC mpCC mpiCC mpicxx mpiicpc mpipgCC], [""])
|
|
fi
|
|
|
|
if test "x$CXX" = "x"
|
|
then
|
|
casc_using_cxx=no
|
|
fi
|
|
fi
|
|
|
|
if test "$casc_user_chose_fcompilers" = "no"
|
|
then
|
|
if test "$casc_using_openmp" = "yes"
|
|
then
|
|
AC_CHECK_PROGS(F77, [mpxlf xlf mpguidef77 guidef77 mpiifort ifort pg77 f77], [""])
|
|
elif test "$casc_using_mpi" = "no"
|
|
then
|
|
AC_CHECK_PROGS(F77, [xlf g77 pgf77 ifort f77], [""])
|
|
else
|
|
AC_CHECK_PROGS(F77, [mpxlf mpf77 mpif77 mpiifort mpipgf77], [""])
|
|
fi
|
|
|
|
if test "x$F77" = "x"
|
|
then
|
|
casc_using_fortran=no
|
|
fi
|
|
fi
|
|
|
|
|
|
dnl *********************************************************************
|
|
dnl * Check for general programs
|
|
dnl *********************************************************************
|
|
AC_PROG_RANLIB
|
|
AC_PROG_INSTALL
|
|
AC_PROG_AWK
|
|
AC_PROG_LN_S
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
dnl *********************************************************************
|
|
dnl * Check for compiler related programs
|
|
dnl *********************************************************************
|
|
if test "$casc_using_c" = "yes"
|
|
then
|
|
AC_PROG_CPP
|
|
AC_PROG_CC
|
|
fi
|
|
|
|
if test "$casc_using_cxx" = "yes"
|
|
then
|
|
AC_PROG_CXX
|
|
AC_PROG_CXXCPP
|
|
fi
|
|
|
|
if test "$casc_using_fortran" = "yes"
|
|
then
|
|
AC_PROG_F77
|
|
LLNL_F77_LIBRARY_LDFLAGS
|
|
AC_F77_WRAPPERS
|
|
AC_CHECK_PROGS(FPP, fpp cpp "$CC -E" "cc -E" "gcc -E")
|
|
test -z "$FPP" && AC_MSG_ERROR([no acceptable fpp found in \$PATH])
|
|
fi
|
|
|
|
|
|
dnl *********************************************************************
|
|
dnl * Check for header files, typedefs, structs, compiler characteristics
|
|
dnl * and library functions
|
|
dnl *********************************************************************
|
|
AC_CHECK_HEADERS([float.h limits.h malloc.h memory.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h])
|
|
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
AC_HEADER_TIME
|
|
AC_C_VOLATILE
|
|
AC_CHECK_TYPES([ptrdiff_t])
|
|
AC_TYPE_SIGNAL
|
|
AC_FUNC_STRTOD
|
|
AC_CHECK_FUNCS([bzero floor gethrtime gettimeofday memset pow sqrt strcspn strdup strspn strtol])
|
|
|
|
dnl *********************************************************************
|
|
dnl * For MPI, set the following:
|
|
dnl *********************************************************************
|
|
if test "$casc_using_mpi" = "no"
|
|
then
|
|
AC_DEFINE(HYPRE_SEQUENTIAL, 1, [Disable MPI, enable serial codes.])
|
|
else
|
|
ACX_CHECK_MPI([LIBS="$LIBS $MPILIBS"])
|
|
AC_CHECK_FUNCS([MPI_Comm_f2c],[AC_DEFINE(HYPRE_HAVE_MPI_COMM_F2C)])
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * For Babel, set the following:
|
|
dnl *********************************************************************
|
|
BABELDIR=""
|
|
if test "$casc_using_babel" = "yes"
|
|
then
|
|
BABELDIR="babel-runtime babel"
|
|
export CC CXX F77 CPP LD
|
|
export CFLAGS CXXFLAGS FFLAGS F90FLAGS CPPFLAGS LDFLAGS
|
|
AC_CONFIG_SUBDIRS(babel-runtime)
|
|
fi
|
|
AC_SUBST(BABELDIR)
|
|
|
|
dnl *********************************************************************
|
|
dnl * For building example codes, set the following:
|
|
dnl *********************************************************************
|
|
EXAMPLEDIR=""
|
|
if test "$casc_using_examples" = "yes"
|
|
then
|
|
EXAMPLEDIR="HYPRE_TOP_SRC_DIR/examples"
|
|
fi
|
|
AC_SUBST(EXAMPLEDIR)
|
|
|
|
dnl *********************************************************************
|
|
dnl * For MLI, set the following:
|
|
dnl *********************************************************************
|
|
if test "$casc_using_mli" = "yes"
|
|
then
|
|
MLI_DIR="HYPRE_TOP_SRC_DIR/mli/matrix"
|
|
MLILIBS="-lHYPRE_mli_mat"
|
|
MLILIBDIRS="-L$MLI_DIR"
|
|
MLIINCLUDE="-I$MLI_DIR"
|
|
MLILIBDIRS="$MLILIBDIRS -L/usr/openwin/lib"
|
|
MLILIBS="$MLILIBS -lX11"
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Find libg2c.a
|
|
dnl *********************************************************************
|
|
HYPRE_FIND_G2C
|
|
|
|
dnl *********************************************************************
|
|
dnl * Define appropriate variables if user set blas to either essl or dxml
|
|
dnl *********************************************************************
|
|
if test "$casc_user_chose_blas" = "yes"
|
|
then
|
|
for blas_lib in $BLASLIBS; do
|
|
if test $blas_lib = "-ldxml"
|
|
then
|
|
AC_DEFINE(HYPRE_USING_DXML, 1, [Using DXML for Blas.])
|
|
fi
|
|
|
|
if test $blas_lib = "-lessl"
|
|
then
|
|
AC_DEFINE(HYPRE_USING_ESSL, 1, [Using ESSL for Blas.])
|
|
fi
|
|
done
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Find BLAS library if not already set by the user
|
|
dnl * If user specified --without-blas or a system one cannot be found,
|
|
dnl * default to internal HYPRE routines
|
|
dnl *********************************************************************
|
|
if test "$casc_user_chose_blas" = "no"
|
|
then
|
|
HYPRE_FIND_BLAS
|
|
if test "$BLASLIBS" = "null"
|
|
then
|
|
AC_MSG_WARN([***************************************])
|
|
AC_MSG_WARN([Cannot find BLAS library])
|
|
AC_MSG_WARN([ configuring --without-blas])
|
|
AC_MSG_WARN([***************************************])
|
|
HYPRE_BLAS_SRC_DIR="HYPRE_TOP_SRC_DIR/blas"
|
|
BLAS_DIR="HYPRE_TOP_SRC_DIR/hypre/lib"
|
|
BLASLIBDIRS="-L$BLAS_DIR"
|
|
BLASLIBS="-lHYPRE_utilities"
|
|
AC_DEFINE(HYPRE_USING_HYPRE_BLAS, 1, [Using internal HYPRE routines.])
|
|
elif test "$BLASLIBS" = "internal"
|
|
then
|
|
HYPRE_BLAS_SRC_DIR="HYPRE_TOP_SRC_DIR/blas"
|
|
BLAS_DIR="HYPRE_TOP_SRC_DIR/hypre/lib"
|
|
BLASLIBDIRS="-L$BLAS_DIR"
|
|
BLASLIBS="-lHYPRE_utilities"
|
|
AC_DEFINE(HYPRE_USING_HYPRE_BLAS, 1, [Using internal HYPRE routines.])
|
|
else
|
|
AC_DEFINE(HAVE_BLAS, 1, [BLAS library is system provided.])
|
|
fi
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Define appropriate variables if user set lapack to essl
|
|
dnl *********************************************************************
|
|
if test "$casc_user_chose_lapack" = "yes"
|
|
then
|
|
for lapack_lib in $LAPACKLIBS; do
|
|
if test $lapack_lib = "-lessl"
|
|
then
|
|
AC_DEFINE(HYPRE_USING_ESSL, 1, [Using ESSL for Lapack.])
|
|
fi
|
|
done
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Find LAPACK library if not already set by the user
|
|
dnl * If user specified --without-lapack or a system one cannot be found,
|
|
dnl * default to internal HYPRE routines
|
|
dnl *********************************************************************
|
|
if test "$casc_user_chose_lapack" = "no"
|
|
then
|
|
HYPRE_FIND_LAPACK
|
|
if test "$LAPACKLIBS" = "null"
|
|
then
|
|
AC_MSG_WARN([***************************************])
|
|
AC_MSG_WARN([Cannot find LAPACK library])
|
|
AC_MSG_WARN([ configuring --without-lapack])
|
|
AC_MSG_WARN([***************************************])
|
|
HYPRE_LAPACK_SRC_DIR="HYPRE_TOP_SRC_DIR/lapack"
|
|
LAPACK_DIR="HYPRE_TOP_SRC_DIR/hypre/lib"
|
|
LAPACKLIBDIRS="-L$LAPACK_DIR"
|
|
LAPACKLIBS="-lHYPRE_utilities"
|
|
AC_DEFINE(HYPRE_USING_HYPRE_LAPACK, 1, [Using internal HYPRE routines.])
|
|
elif test "$LAPACKLIBS" = "internal"
|
|
then
|
|
HYPRE_LAPACK_SRC_DIR="HYPRE_TOP_SRC_DIR/lapack"
|
|
LAPACK_DIR="HYPRE_TOP_SRC_DIR/hypre/lib"
|
|
LAPACKLIBDIRS="-L$LAPACK_DIR"
|
|
LAPACKLIBS="-lHYPRE_utilities"
|
|
AC_DEFINE(HYPRE_USING_HYPRE_LAPACK, 1, [Using internal HYPRE routines.])
|
|
else
|
|
AC_DEFINE(HAVE_LAPACK, 1, [LAPACK library is system provided.])
|
|
fi
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Determine if FEI libraries are needed.
|
|
dnl * if so, determine whether internal routines or user-specified
|
|
dnl * libraries are to be used.
|
|
dnl *********************************************************************
|
|
if test "$casc_using_fei" = "yes"
|
|
then
|
|
HYPRE_FEI_SRC_DIR="HYPRE_TOP_SRC_DIR/FEI_mv"
|
|
HYPRE_FEI_SUBDIRS="fei-hypre femli"
|
|
HYPRE_FEI_HYPRE_FILES="HYPRE_TOP_SRC_DIR/FEI_mv/fei-hypre/*.o"
|
|
HYPRE_FEI_FEMLI_FILES="HYPRE_TOP_SRC_DIR/FEI_mv/femli/lib/*.o"
|
|
if test "$casc_using_superlu" = "yes"
|
|
then
|
|
HYPRE_FEI_SUBDIRS="SuperLU $HYPRE_FEI_SUBDIRS"
|
|
HYPRE_FEI_SUPERLU_FILES="HYPRE_TOP_SRC_DIR/FEI_mv/SuperLU/SRC/*.o"
|
|
else
|
|
HYPRE_FEI_SUPERLU_FILES=
|
|
fi
|
|
if test "$casc_user_chose_fei" = "yes"
|
|
then
|
|
HYPRE_FEI_BASE_DIR="$FEIINCLUDE"
|
|
else
|
|
HYPRE_FEI_BASE_DIR="HYPRE_TOP_SRC_DIR/FEI_mv/fei-base"
|
|
fi
|
|
else
|
|
HYPRE_FEI_SRC_DIR=
|
|
HYPRE_FEI_BASE_DIR=
|
|
HYPRE_FEI_SUPERLU_FILES=
|
|
HYPRE_FEI_HYPRE_FILES=
|
|
HYPRE_FEI_FEMLI_FILES=
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Find libm
|
|
dnl *********************************************************************
|
|
AC_CHECK_LIB(m, cabs, LIBS="$LIBS -lm")
|
|
|
|
dnl *********************************************************************
|
|
dnl * Find libstdc++
|
|
dnl *********************************************************************
|
|
AC_CHECK_LIB(stdc++, __gxx_personality_v0, LIBS="$LIBS -lstdc++")
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set debug/optimization flags
|
|
dnl *********************************************************************
|
|
if test "$casc_using_debug" = "yes"
|
|
then
|
|
ACX_DEBUG_FLAGS
|
|
else
|
|
ACX_OPTIMIZATION_FLAGS
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set installation directories
|
|
dnl *********************************************************************
|
|
HYPRE_INSTALLDIR="${prefix}"
|
|
HYPRE_LIBINSTALL="${libdir}"
|
|
HYPRE_INCINSTALL="${includedir}"
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set large page option that is needed by all AIX platforms.
|
|
dnl *********************************************************************
|
|
hypre_platform=`uname`
|
|
case $hypre_platform in
|
|
AIX* | aix* | Aix*) LDFLAGS="${LDFLAGS} -blpdata"
|
|
CFLAGS="${CFLAGS} -blpdata"
|
|
CXXFLAGS="${CXXFLAGS} -blpdata"
|
|
FFLAGS="${FFLAGS} -blpdata"
|
|
;;
|
|
esac
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set default link commands and suffix values
|
|
dnl *********************************************************************
|
|
LINK_F77="${F77}"
|
|
LINK_CC="${CC}"
|
|
LINK_CXX="${CXX}"
|
|
|
|
HYPRE_LIBSUFFIX=".a"
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set flags if needed to enable shared libraries and Python, Java
|
|
dnl *********************************************************************
|
|
if test "$casc_using_shared" = "yes"
|
|
then
|
|
HYPRE_LIBSUFFIX=".so"
|
|
case $hypre_platform in
|
|
AIX* | aix* | Aix*) SHARED_COMPILE_FLAG="-qmkshrobj"
|
|
SHARED_BUILD_FLAG="-G"
|
|
LINK_F77="${F77} -brtl"
|
|
LINK_CC="${CC} -brtl"
|
|
LINK_CXX="${CXX} -brtl"
|
|
;;
|
|
*) SHARED_COMPILE_FLAG="-fPIC"
|
|
SHARED_BUILD_FLAG="-shared"
|
|
;;
|
|
esac
|
|
FFLAGS="${FFLAGS} ${SHARED_COMPILE_FLAG}"
|
|
CFLAGS="${CFLAGS} ${SHARED_COMPILE_FLAG}"
|
|
CXXFLAGS="${CXXFLAGS} ${SHARED_COMPILE_FLAG}"
|
|
BUILD_F77_SHARED="${F77} ${SHARED_BUILD_FLAG}"
|
|
BUILD_CC_SHARED="${CC} ${SHARED_BUILD_FLAG}"
|
|
BUILD_CXX_SHARED="${CXX} ${SHARED_BUILD_FLAG}"
|
|
fi
|
|
|
|
BUILD_PYTHON=0
|
|
PYTHON=""
|
|
if test "$casc_using_python" = "yes"
|
|
then
|
|
BUILD_PYTHON=1
|
|
PYTHON="${casc_python}"
|
|
fi
|
|
|
|
BUILD_JAVA=0
|
|
if test "$casc_using_java" = "yes"
|
|
then
|
|
BUILD_JAVA=1
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set INSURE options
|
|
dnl * Need to reverse order of -lpmpich and -lmpich in FLIBS when using insure
|
|
dnl *********************************************************************
|
|
if test "$casc_using_insure" = "yes"
|
|
then
|
|
if test "$casc_using_fortran" = "yes"
|
|
then
|
|
HYPRE_REVERSE_FLIBS
|
|
fi
|
|
LINK_F77="insure ${casc_insure_flags}"
|
|
LINK_CC="insure ${casc_insure_flags}"
|
|
LINK_CXX="insure ${casc_insure_flags}"
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set Purify options if needed; path is for LC Linux platforms as of 7/2005.
|
|
dnl *********************************************************************
|
|
if test "$casc_using_purify" = "yes"
|
|
then
|
|
HYPRE_PURIFY_PATH="/usr/global/tools/Rational/releases/purify/i386_linux2.2003a.06.13.FixPack0177"
|
|
CC="${HYPRE_PURIFY_PATH}/purify $CC ${casc_purify_flags}"
|
|
CXX="${HYPRE_PURIFY_PATH}/purify $CXX ${casc_purify_flags}"
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * Define machine architecture
|
|
dnl *********************************************************************
|
|
HYPRE_SET_ARCH
|
|
|
|
|
|
dnl *********************************************************************
|
|
dnl * Check if user set test option.
|
|
dnl *********************************************************************
|
|
|
|
AC_ARG_WITH(test-alpha,
|
|
AS_HELP_STRING([ --with-test-alpha], [ Test alpha version of HYPRE.
|
|
NOTE: ONLY exists on the CASC cluster.]),
|
|
[case "${withval}" in
|
|
yes) casc_testing_alpha=yes ;;
|
|
no) casc_testing_alpha=no ;;
|
|
esac],
|
|
[casc_testing_alpha=no]
|
|
)
|
|
|
|
AC_ARG_WITH(test-beta,
|
|
AS_HELP_STRING([ --with-test-beta], [ Test 'public' beta version of HYPRE]),
|
|
[case "${withval}" in
|
|
yes) casc_testing_beta=yes ;;
|
|
no) casc_testing_beta=no ;;
|
|
esac],
|
|
[casc_testing_beta=no]
|
|
)
|
|
|
|
AC_ARG_WITH(test-general,
|
|
AS_HELP_STRING([ --with-test-general], [ Test 'public' general version of HYPRE]),
|
|
[case "${withval}" in
|
|
yes) casc_testing_general=yes ;;
|
|
no) casc_testing_general=no ;;
|
|
esac],
|
|
[casc_testing_general=no]
|
|
)
|
|
|
|
|
|
dnl *********************************************************************
|
|
dnl * Set link path for test codes.
|
|
dnl *********************************************************************
|
|
|
|
if test "$casc_testing_alpha" = "yes"
|
|
then
|
|
case $HOSTNAME in
|
|
tux*) HYPRE_LINKDIR="/usr/casc/hypre/i686-pc-linux-gnu/alpha"
|
|
;;
|
|
*) HYPRE_LINKDIR=""
|
|
;;
|
|
esac
|
|
if test "${LAPACKLIBS}" = "-lHYPRE_utilities"
|
|
then
|
|
LAPACKLIBS=""
|
|
LAPACKLIBDIRS=""
|
|
fi
|
|
if test "${BLASLIBS}" = "-lHYPRE_utilities"
|
|
then
|
|
BLASLIBS=""
|
|
BLASLIBDIRS=""
|
|
fi
|
|
HYPRE_SET_LINK_SUBDIRS
|
|
elif test "$casc_testing_beta" = "yes"
|
|
then
|
|
case $HOSTNAME in
|
|
tux*) HYPRE_LINKDIR="/usr/casc/hypre/i686-pc-linux-gnu/beta"
|
|
;;
|
|
*) HYPRE_LINKDIR="/usr/apps/hypre/beta"
|
|
;;
|
|
esac
|
|
if test "${LAPACKLIBS}" = "-lHYPRE_utilities"
|
|
then
|
|
LAPACKLIBS=""
|
|
LAPACKLIBDIRS=""
|
|
fi
|
|
if test "${BLASLIBS}" = "-lHYPRE_utilities"
|
|
then
|
|
BLASLIBS=""
|
|
BLASLIBDIRS=""
|
|
fi
|
|
HYPRE_SET_LINK_SUBDIRS
|
|
elif test "$casc_testing_general" = "yes"
|
|
then
|
|
case $HOSTNAME in
|
|
tux*) HYPRE_LINKDIR="/usr/casc/hypre/i686-pc-linux-gnu"
|
|
;;
|
|
*) HYPRE_LINKDIR="/usr/apps/hypre"
|
|
;;
|
|
esac
|
|
if test "${LAPACKLIBS}" = "-lHYPRE_utilities"
|
|
then
|
|
LAPACKLIBS=""
|
|
LAPACKLIBDIRS=""
|
|
fi
|
|
if test "${BLASLIBS}" = "-lHYPRE_utilities"
|
|
then
|
|
BLASLIBS=""
|
|
BLASLIBDIRS=""
|
|
fi
|
|
HYPRE_SET_LINK_SUBDIRS
|
|
else
|
|
HYPRE_LINKDIR="HYPRE_TOP_SRC_DIR/hypre"
|
|
fi
|
|
|
|
dnl *********************************************************************
|
|
dnl * AC_SUBST performs the variable substitutions so they may be used in
|
|
dnl * the Makefile.in files. Some macros call AC_SUBST for some of these
|
|
dnl * variables, but it does no damage to call it again.
|
|
dnl *********************************************************************
|
|
|
|
dnl *********************************************************************
|
|
dnl * compilers and load flags
|
|
dnl *********************************************************************
|
|
AC_SUBST(CC)
|
|
AC_SUBST(CXX)
|
|
AC_SUBST(F77)
|
|
AC_SUBST(CFLAGS)
|
|
AC_SUBST(CXXFLAGS)
|
|
AC_SUBST(F77FLAGS)
|
|
AC_SUBST(LDFLAGS)
|
|
|
|
AC_SUBST(LINK_F77)
|
|
AC_SUBST(LINK_CC)
|
|
AC_SUBST(LINK_CXX)
|
|
|
|
AC_SUBST(BUILD_F77_SHARED)
|
|
AC_SUBST(BUILD_CC_SHARED)
|
|
AC_SUBST(BUILD_CXX_SHARED)
|
|
|
|
AC_SUBST(SHARED_COMPILE_FLAG)
|
|
AC_SUBST(SHARED_BUILD_FLAG)
|
|
|
|
AC_SUBST(BUILD_PYTHON)
|
|
AC_SUBST(PYTHON)
|
|
|
|
AC_SUBST(BUILD_JAVA)
|
|
|
|
dnl *********************************************************************
|
|
dnl * Installation Directories
|
|
dnl *********************************************************************
|
|
AC_SUBST(HYPRE_INSTALLDIR)
|
|
AC_SUBST(HYPRE_LIBINSTALL)
|
|
AC_SUBST(HYPRE_INCINSTALL)
|
|
|
|
dnl *********************************************************************
|
|
dnl * General purpose header files, libraries and directories
|
|
dnl *********************************************************************
|
|
AC_SUBST(INCLUDES)
|
|
AC_SUBST(LIBS)
|
|
AC_SUBST(FLIBS)
|
|
AC_SUBST(LIBDIRS)
|
|
AC_SUBST(LDLIBS)
|
|
AC_SUBST(LDLIBDIRS)
|
|
|
|
AC_SUBST(HYPRE_LINKDIR)
|
|
|
|
dnl *********************************************************************
|
|
dnl * suffix for hypre libraries
|
|
dnl *********************************************************************
|
|
AC_SUBST(HYPRE_LIBSUFFIX)
|
|
|
|
dnl *********************************************************************
|
|
dnl * MPI-related header files and libraries and directories for
|
|
dnl * those libraries
|
|
dnl *********************************************************************
|
|
AC_SUBST(MPIINCLUDE)
|
|
AC_SUBST(MPILIBS)
|
|
AC_SUBST(MPILIBDIRS)
|
|
AC_SUBST(MPIFLAGS)
|
|
|
|
dnl *********************************************************************
|
|
dnl * macro definitions that should be included on compile line
|
|
dnl *********************************************************************
|
|
AC_SUBST(TIMERDEFS)
|
|
|
|
dnl *********************************************************************
|
|
dnl * FEI-related files, libraries and directories
|
|
dnl *********************************************************************
|
|
AC_SUBST(FEILIBS)
|
|
AC_SUBST(FEILIBDIRS)
|
|
AC_SUBST(FEIINCLUDE)
|
|
AC_SUBST(HYPRE_FEI_SRC_DIR)
|
|
AC_SUBST(HYPRE_FEI_BASE_DIR)
|
|
AC_SUBST(HYPRE_FEI_SUBDIRS)
|
|
AC_SUBST(HYPRE_FEI_SUPERLU_FILES)
|
|
AC_SUBST(HYPRE_FEI_HYPRE_FILES)
|
|
AC_SUBST(HYPRE_FEI_FEMLI_FILES)
|
|
|
|
dnl *********************************************************************
|
|
dnl *MLI-related header files, libraries and directories for those
|
|
dnl * libraries
|
|
dnl *********************************************************************
|
|
AC_SUBST(MLI_DIR)
|
|
AC_SUBST(MLILIBS)
|
|
AC_SUBST(MLILIBDIRS)
|
|
AC_SUBST(MLIINCLUDE)
|
|
|
|
dnl *********************************************************************
|
|
dnl * BLAS & LAPACK related information
|
|
dnl *********************************************************************
|
|
AC_SUBST(HYPRE_BLAS_SRC_DIR)
|
|
AC_SUBST(BLASLIBDIRS)
|
|
AC_SUBST(BLASLIBS)
|
|
AC_SUBST(HYPRE_LAPACK_SRC_DIR)
|
|
AC_SUBST(LAPACKLIBDIRS)
|
|
AC_SUBST(LAPACKLIBS)
|
|
|
|
dnl *********************************************************************
|
|
dnl * ar & ranlib substitution
|
|
dnl *********************************************************************
|
|
AC_SUBST(AR)
|
|
AC_SUBST(RANLIB)
|
|
|
|
dnl *********************************************************************
|
|
dnl * Define the files to be configured and made
|
|
dnl *********************************************************************
|
|
|
|
if test -d tools; then
|
|
AC_DEFINE(TOOLSDIR)
|
|
fi
|
|
|
|
AC_CONFIG_FILES([config/Makefile.config])
|
|
|
|
AC_OUTPUT
|