-
Notifications
You must be signed in to change notification settings - Fork 78
/
configure.ac
65 lines (53 loc) · 1.94 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([remy], [0.1], [[email protected]])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/remy.cc])
AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Checks for programs.
AC_PROG_CXX
AC_PROG_RANLIB
AC_PATH_PROG([PROTOC], [protoc], [])
AS_IF([test x"$PROTOC" = x],
[AC_MSG_ERROR([cannot find protoc, the Protocol Buffers compiler])])
# Checks for libraries.
PKG_CHECK_MODULES([protobuf], [protobuf])
# Add picky CXXFLAGS
CPPFLAGS="-std=c++11 -pthread"
PICKY_CXXFLAGS="-pedantic -Wall -Wextra -Werror"
AC_SUBST([PICKY_CXXFLAGS])
AC_ARG_ENABLE([graph],
[AS_HELP_STRING([--enable-graph],
[Enable live graph (ratatouille) @<:@no@:>@])],
[build_graph="yes"],
[build_graph="no"])
AM_CONDITIONAL([BUILD_GRAPH], [test x"$build_graph" != xno])
# Checks for libraries.
AM_COND_IF( [BUILD_GRAPH],
[
PKG_CHECK_MODULES([GL], [gl])
PKG_CHECK_MODULES([GLFW], [glfw3])
PKG_CHECK_MODULES([GLEW], [glew])
PKG_CHECK_MODULES([GLU], [glu])
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo])
PKG_CHECK_MODULES([GTKMM], [gtkmm-3.0])
] )
# Checks for header files.
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS([boost/accumulators/accumulators.hpp \
boost/accumulators/statistics/median.hpp \
boost/accumulators/statistics/stats.hpp boost/functional/hash.hpp \
boost/random/exponential_distribution.hpp boost/random/mersenne_twister.hpp \
boost/random/poisson_distribution.hpp \
boost/random/uniform_int_distribution.hpp \
boost/random/uniform_real_distribution.hpp], [], [AC_MSG_ERROR([Missing boost headers (need to install libboost-all-dev?)])])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_UINT64_T
AC_LANG_POP(C++)
# Checks for library functions.
AC_CONFIG_FILES([Makefile protobufs/Makefile graph/Makefile src/Makefile])
AC_OUTPUT