-
Notifications
You must be signed in to change notification settings - Fork 52
/
configure.ac
54 lines (40 loc) · 1.28 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
AC_INIT([gubbins], m4_esyscmd([tr -d '\n' < VERSION]), [[email protected]], [$(PACKAGE_NAME)$(AC_PACKAGE_VERSION)], [https://github.com/nickjcroucher/gubbins])
AM_INIT_AUTOMAKE([foreign tar-pax subdir-objects])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])
# Add our own macro dir, so we can check for PTHREAD
AC_CONFIG_MACRO_DIR([m4])
# Add to macro search path dir for code cov
AX_ADD_AM_MACRO_STATIC([])
AC_CANONICAL_HOST
case $host_os in
*darwin*)
HOST_OS=osx
;;
*linux*)
HOST_OS=linux
;;
*)
HOST_OS=unknown
;;
esac
AM_CONDITIONAL([HOST_LINUX],[test x$HOST_OS = xlinux])
LT_INIT
AC_PROG_CC
AC_PROG_CXX
# Checks for pthread
AX_PTHREAD
LDFLAGS="$LDFLAGS -pthread"
# Checks for code coverage
AX_CODE_COVERAGE
# Ensure zlib is available
PKG_CHECK_MODULES([zlib], [zlib])
AC_CHECK_HEADERS([zlib.h math.h])
# Check for Python
AM_PATH_PYTHON([3.8],
[],
[AC_MSG_WARN([Python not found. Python is required to build presage python binding. Python can be obtained from http://www.python.org])])
# Define a new recursive target. In our case it produces a .deb installable.
#AM_EXTRA_RECURSIVE_TARGETS([release])
AC_CONFIG_FILES([Makefile src/Makefile release/Makefile python/Makefile])
AC_OUTPUT