/
configure.ac
68 lines (50 loc) · 1.68 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
dnl Process this file with autoconf to produce a configure script.
AC_INIT([hogl],[1.0])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([silent-rules subdir-objects])
AM_SILENT_RULES([yes])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
LT_INIT
dnl C++11 is manadatory
AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
AC_SEARCH_LIBS(clock_gettime, rt)
AX_PTHREAD()
dnl Save cflags libs required for libhogl itself
dnl All cflags and libs added further down are needed only for tools and tests
HOGL_CXXFLAGS="$PTHREAD_CFLAGS"
HOGL_LIBS="$LIBS $PTHREAD_LIBS"
AC_SUBST(HOGL_LIBS)
AC_SUBST(HOGL_CXXFLAGS)
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[Enable internal HOGL debug]),
AC_DEFINE(HOGL_DEBUG)
)
AC_ARG_ENABLE(openmp,
AS_HELP_STRING([--enable-openmp],[Enable OpenMP unit-test]),
openmp=true
)
AM_CONDITIONAL([OPENMP], [test "$openmp" = "true"])
AC_ARG_WITH([tools],
AS_HELP_STRING([--without-tools], [Do not build tools]))
AM_CONDITIONAL([BUILD_TOOLS], [test "$with_tools" != "no"])
AC_ARG_WITH([tests],
AS_HELP_STRING([--without-tests], [Do not build tests]))
AM_CONDITIONAL([BUILD_TESTS], [test "$with_tests" != "no"])
AS_IF([test "$with_tools" != "no"], [
AC_CHECK_HEADER(bfd.h, [],
[AC_MSG_ERROR([Couldn't find or include bfd.h, please install binutils-dev])])
])
AS_IF([test "$with_tools" != "no"], [ AC_SEARCH_LIBS(dlopen, dl) ])
AS_IF([test "$with_tools" != "no"], [ AC_SEARCH_LIBS(inotify_init, inotify) ])
AS_IF([test "$with_tools" != "no"], [ AC_SEARCH_LIBS(bfd_openr, bfd) ])
AX_CODE_COVERAGE()
dnl AX_BOOST_UNIT_TEST_FRAMEWORK
AS_IF([test "$with_tests" != "no"], [ AX_BOOST_BASE(1.40.0) ])
AC_SUBST(prefix)
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT