-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure-libraries.ac
More file actions
120 lines (111 loc) · 4.21 KB
/
configure-libraries.ac
File metadata and controls
120 lines (111 loc) · 4.21 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
UNSAFELIBS=
AC_ARG_WITH(minuit,
AS_HELP_STRING([--with-minuit],[enable Minuit support (default-use if found)]),,with_minuit=check)
if test x$with_minuit != xno; then
FOUNDMINUIT=yes
AC_CHECK_HEADERS(Minuit2/FCNBase.h,AC_DEFINE(MINUITVER,2),FOUNDMINUIT=no)
if test x$FOUNDMINUIT = xno; then
AC_CHECK_HEADERS(Minuit/FCNBase.h,AC_DEFINE(MINUITVER,1)
FOUNDMINUIT=yes,AC_MSG_WARN([Minuit header files (Minuit/FCNBase.h) not found
Is CPPFLAGS is defined to include relevant directory?]))
fi
if test x$FOUNDMINUIT = xyes; then
AC_SEARCH_LIBS([main], [Minuit2 lcg_Minuit Minuit],,FOUNDMINUIT=no
AC_MSG_WARN([Minuit library (libMinuit2, liblcg_Minuit or libMinuit) not found
Is LDFLAGS is defined to include relevant directory?]))
if test x$FOUNDMINUIT = xyes; then
AC_DEFINE(HAVE_LIBMINUIT)
# Current versions don't seem to need g2c
# NEEDG2C="yes"
else
if test x$with_minuit = xyes; then
AC_MSG_FAILURE([--with-minuit was given, but Minuit tests failed])
fi
fi
fi
fi
AC_ARG_WITH(mkl,
AS_HELP_STRING([--with-mkl],[use the Intel MKL library (default-use no)]),,with_mkl=no)
if test x$with_mkl != xno; then
FOUNDMKL=yes
AC_CHECK_HEADERS(mkl_cblas.h,,FOUNDMKL=no
AC_MSG_WARN([mkl_cblas.h header file needed by MKL not found
Is CCPFLAGS defined to include relevant directory?]))
if test x$FOUNDMKL = xyes; then
LIBS="$LIBS -lmkl_intel_lp64 -lmkl_sequential -lmkl_core"
CXXFLAGS="$CXXFLAGS -DLCM_USE_EXTERNAL"
else
if test x$with_mkl = xyes; then
AC_MSG_FAILURE([--with-mkl was given, but MKL tests failed])
fi
fi
fi
AC_ARG_WITH(openblas,
AS_HELP_STRING([--with-openblas],[use the OpenBLAS library (default-use if found)]),,with_openblas=check)
if test x$with_openblas != xno; then
FOUNDOPENBLAS=no
AC_CHECK_HEADERS([cblas64.h cblas.h OpenBLAS/cblas.h],FOUNDOPENBLAS=yes)
if test x$FOUNDOPENBLAS = xno; then
AC_MSG_WARN([cblas64.h/cblas.h header file needed by OpenBLAS not found
Is CCPFLAGS defined to include relevant directory?])
else
FOUNDOPENBLAS=no
AC_SEARCH_LIBS([cblas_dgemm],[openblas openblas64],FOUNDOPENBLAS=yes)
if test x$FOUNDOPENBLAS = xno; then
AC_MSG_WARN([OpenBLAS library (libopenblas64.a/libopenblas.a) not found
Is LDFLAGS is defined to include relevant directory?])
if test x$with_openblas = xyes; then
AC_MSG_FAILURE([--with-openblas was given, but OpenBLAS tests failed])
fi
else
CXXFLAGS="$CXXFLAGS -DLCM_USE_EXTERNAL"
AC_DEFINE(HAVE_LIBOPENBLAS)
fi
fi
fi
AC_ARG_WITH(atlas,
AS_HELP_STRING([--with-atlas],[use the ATLAS BLAS library (default-use no)]),,with_atlas=no)
if test x$FOUNDMKL = xyes; then
if test x$with_atlas = xyes; then
AC_MSG_FAILURE([can't specify both --with-mkl and --with-atlas])
fi
with_atlas = no
fi
if test x$with_atlas != xno; then
FOUNDATLAS=yes
AC_CHECK_HEADERS(cblas.h,,FOUNDATLAS=no
AC_MSG_WARN([cblas.h header files needed by ATLAS not found
Is CPPFLAGS defined to include relevant directory?]))
AC_CHECK_LIB(atlas,main,,FOUNDATLAS=no
AC_MSG_WARN([ATLAS library (libatlas.a) not found
Is LDFLAGS is defined to include relevant directory?]))
if test x$FOUNDATLAS = xyes; then
LIBS="-lcblas $LIBS"
CXXFLAGS="$CXXFLAGS -DLCM_USE_EXTERNAL"
else
if test x$with_atlas = xyes; then
AC_MSG_FAILURE([--with-atlas was given, but ATLAS tests failed])
fi
fi
fi
#AC_ARG_WITH(acml,
# AS_HELP_STRING([--with-acml],[use the ACML BLAS library (default=no)]),,with_acml=no)
#if test x$with_acml = xyes; then
# AC_CHECK_HEADERS(acml.h,,AC_MSG_ERROR([ACML header files (acml.h) not found
#Check CPPFLAGS is defined to include relevant directory]))
# AC_CHECK_LIB(acml,main,,AC_MSG_ERROR([ACML library (libacml.a) not found
#Check LDFLAGS is defined to include relevant directory]))
# NEEDG2C="yes"
# CXXFLAGS="$CXXFLAGS -DLCM_USE_EXTERNAL"
#fi
AC_ARG_WITH(mpi,
AS_HELP_STRING([--with-mpi],[enable use of MPI (default=no)]),,with_MPI=no)
if test x$with_mpi = xyes; then
AC_CHECK_HEADERS(mpi.h,,AC_MSG_ERROR([MPI header file (mpi.h) not found
Check CPPFLAGS (or CXX) is defined to include relevant directory]))
# Compile script is assumed to link in correct library
# AC_CHECK_LIB(mpi,main,,AC_MSG_ERROR([MPI library (libmpi.a) not found
#Check LDFLAGS is defined to include relevant directory]))
AC_DEFINE(HAVE_LIBMPI)
fi
AC_CHECK_LIB(rt,clock_gettime)