forked from devinamatthews/aquarius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
75 lines (61 loc) · 2.36 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
AC_INIT(aquarius, 1.0, [email protected], aquarius, http://www.github.com/devinamatthews/aquarius)
AM_INIT_AUTOMAKE([foreign silent-rules subdir-objects])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([disable])
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER(config.h)
AH_TOP([
#ifndef _CONFIG_H_
#define _CONFIG_H_
])
AH_BOTTOM([
#ifndef DEBUG
#define NDEBUG
#endif
#endif
])
AX_PROG_F77_MPI([true], [], [AC_MSG_FAILURE([No MPI F77 compiler found.])])
AX_PROG_CC_MPI([true], [], [AC_MSG_FAILURE([No MPI C compiler found.])])
AX_PROG_CXX_MPI([true], [], [AC_MSG_FAILURE([No MPI C++ compiler found.])])
AX_CXX_COMPILE_STDCXX_11([noext])
AC_LANG([C++])
AC_C_RESTRICT
AC_OPENMP
CPPFLAGS="$CPPFLAGS $OPENMP_CXXFLAGS"
LDFLAGS="$LDFLAGS $OPENMP_CXXFLAGS"
AX_BLAS([], [AC_MSG_FAILURE([Could not find BLAS library.])])
AX_LAPACK([], [AC_MSG_FAILURE([Could not find LAPACK library.])])
topdir="\"`(cd $srcdir && pwd)`\""
AC_DEFINE_UNQUOTED([TOPDIR], [$topdir], [The top source directory.])
AC_DEFINE([LOWER_NO_UNDERSCORE], [1], [FORTRAN name-mangling scheme.])
AC_DEFINE([LOWER_UNDERSCORE], [2], [FORTRAN name-mangling scheme.])
AC_DEFINE([UPPER_NO_UNDERSCORE], [3], [FORTRAN name-mangling scheme.])
AC_DEFINE([UPPER_UNDERSCORE], [4], [FORTRAN name-mangling scheme.])
AC_F77_FUNC(sgemm)
AS_IF([test $sgemm = sgemm], [AC_DEFINE([F77_NAME], [LOWER_NO_UNDERSCORE], [Type of FORTRAN name-mangling.])])
AS_IF([test $sgemm = sgemm_], [AC_DEFINE([F77_NAME], [LOWER_UNDERSCORE], [Type of FORTRAN name-mangling.])])
AS_IF([test $sgemm = SGEMM], [AC_DEFINE([F77_NAME], [UPPER_NO_UNDERSCORE], [Type of FORTRAN name-mangling.])])
AS_IF([test $sgemm = SGEMM_], [AC_DEFINE([F77_NAME], [UPPER_UNDERSCORE], [Type of FORTRAN name-mangling.])])
#
# Configure CTF
#
AQ_WITH_PACKAGE([CTF], [https://github.com/solomonik/ctf],
[ctf.hpp], [],
[CTF_linked], [-lctf])
AM_CONDITIONAL([CTF_IS_LOCAL], [test x"$ctf_INCLUDES" = x" -Isrc/external/ctf/include"])
#
# Check for Elemental
#
AQ_WITH_PACKAGE([Elemental], [],
[El.hpp], [],
[ElInitialize], [-lEl -lpmrrr -lmetis -lkiss_fft])
#
# Check for libint2
#
AQ_WITH_PACKAGE([libint2], [],
[libint2.h], [],
[libint2_static_init], [-lint2])
mkdir -p bin
AC_CONFIG_SUBDIRS([external/lawrap external/marray external/mpiwrap external/stl_ext])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT