-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
59 lines (47 loc) · 1.5 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([qmckl_bench], [0.0.1], [])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([include/config.h])
AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests silent-rules 1.11])
AM_PROG_AR
AM_MAINTAINER_MODE()
# Checks for programs.
AC_LANG(C)
AC_PROG_F77
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AC_ARG_WITH(qmckl, [AS_HELP_STRING([--with-qmckl],[Specify installation directory of QMCKL])],
with_qmckl=$withval, with_qmckl=yes)
# Checks for libraries.
## BLAS
#AX_BLAS([], [AC_MSG_ERROR([BLAS was not found.])])
## LAPACK
#AX_LAPACK([], [AC_MSG_ERROR([LAPACK was not found.])])
# Checks for library functions.
AC_CHECK_LIB([m], [sqrt])
AC_CHECK_LIB([trexio], [trexio_open], [],
[ AC_MSG_ERROR([TREXIO not found]) ])
AS_IF([test "$with_qmckl" = "yes"],
[
AC_CHECK_LIB([qmckl], [qmckl_context_create], [],
[ AC_MSG_ERROR([QMCKL not found]) ]
)
], [
QMCKL_LIBS="${with_qmckl}/lib/libqmckl.a"
QMCKL_CFLAGS="-I${with_qmckl}/include"
QMCKL_LDFLAGS=""
])
LIBS="${QMCKL_LIBS} ${LIBS}"
LDFLAGS="${QMCKL_LDFLAGS} ${LDFLAGS}"
CFLAGS="${QMCKL_CFLAGS} ${CFLAGS} "
AC_DEFINE_UNQUOTED(DATA_DIR, ["`cd ${srcdir}/data && echo $(pwd -P)`"], [Path to the data files])
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h qmckl.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT