-
Notifications
You must be signed in to change notification settings - Fork 12
/
configure.ac
72 lines (59 loc) · 1.32 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
AC_PREREQ([2.68])
AC_INIT([bmDCA],
[0.8.13],
[https://github.com/ranganathanlab/bmDCA/issues],
[bmDCA])
AC_CANONICAL_HOST
build_linux=no
build_macos=no
build_windows=no
# Detect the target system
case "${host_os}" in
linux*)
build_linux=yes
;;
darwin*)
build_macos=yes
;;
cygwin*|mingw*|msys*)
build_windows=yes
;;
*)
AC_MSG_ERROR(["'$host_os' is not supported"])
;;
esac
# Pass the conditionals to automake
AM_CONDITIONAL([LINUX], [test x$build_linux = xyes])
AM_CONDITIONAL([MACOS], [test x$build_macos = xyes])
AM_CONDITIONAL([WINDOWS], [test x$build_windows = xyes])
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE([enable])
AC_PREFIX_DEFAULT(/usr/local)
AM_SILENT_RULES([yes])
AC_LANG([C++])
AC_PROG_CXX
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/ax_cxx_compile_stdcxx.m4])
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
PKG_PROG_PKG_CONFIG
# Check for required libraries and headers.
PKG_CHECK_MODULES(
[ARMADILLO],
[armadillo],
[],
[AC_CHECK_HEADERS(
[armadillo],
[],
[AC_MSG_ERROR("missing armadillo")],
[])
])
AC_OPENMP
AC_CHECK_HEADERS(
[stdio.h assert.h],
[],
[AC_MSG_ERROR("missing headers")],
[])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UINT16_T
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT