forked from tchen0123/odin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
63 lines (49 loc) · 1.88 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
AC_INIT([odin],
[m4_esyscmd([./version.sh])],
[https://github.com/valhalla/odin/issues],
[valhalla_odin-[m4_esyscmd([./version.sh])]],
[https://github.com/valhalla/odin])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([subdir-objects parallel-tests])
LT_INIT
AC_SUBST([LIBTOOL_DEPS])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([valhalla/config.h])
AC_CONFIG_MACRO_DIR([m4])
# set pkgconfigdir, allow override
AC_ARG_WITH([pkgconfigdir],
AS_HELP_STRING([--with-pkgconfigdir=PATH], [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
[pkgconfigdir="$withval"],
[pkgconfigdir='${libdir}/pkgconfig'])
AC_SUBST([pkgconfigdir])
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_LANG_CPLUSPLUS
# require c++11
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
# require other valhalla dependencies
PKG_CHECK_MODULES([VALHALLA_DEPS], [libvalhalla_midgard = 1.0.0 libvalhalla_baldr = 1.0.0])
# check for protocol buffers compiler and libraries
REQUIRE_PROTOC
# check for boost and make sure we have the program options library
AX_BOOST_BASE([1.54], , [AC_MSG_ERROR([cannot find Boost libraries, which are are required for building odin. Please install libboost-dev.])])
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_SYSTEM
AX_BOOST_THREAD
AX_BOOST_FILESYSTEM
AX_BOOST_REGEX
# check pkg-config dependencies
PKG_CHECK_MODULES([DEPS], [protobuf >= 2.4.0 libprime_server >= 0.3.4])
# optionally enable coverage information
CHECK_COVERAGE
AC_CONFIG_FILES([Makefile libvalhalla_odin.pc])
# Debian resets this to no, but this break both Spot and the libtool
# test suite itself. Instead of requiring developer to install a
# non-patched version of Libtool on any Debian they use, we just
# cancel the effect of Debian's patch here.
# see: http://git.lrde.epita.fr/?p=spot.git;a=commitdiff;h=0e74b76521341f670f6b76f8ef24a6dcf6e3813b
link_all_deplibs=yes
link_all_deplibs_CXX=yes
AC_OUTPUT