forked from gtortone/FzDAQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
86 lines (68 loc) · 2.02 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
AC_INIT([FzDAQ], [2.0])
AC_CONFIG_SRCDIR([src/main/FzDAQ-mt.cpp])
ac_default_prefix=/opt/FzDAQ
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_LANG(C++)
CXXFLAGS="-O3 -std=c++0x -Wall"
#to enable debug - run with "gdb --args ./FzController --cfg config/local-daq-topology.cfg"
#CXXFLAGS="-O3 -std=c++0x -Wall -g"
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
m4_include([aclocal/ax_boost_base.m4])
m4_include([aclocal/ax_boost_program_options.m4])
m4_include([aclocal/ax_boost_system.m4])
m4_include([aclocal/ax_boost_thread.m4])
m4_include([aclocal/log4cpp.m4])
# mandatory libs
AX_BOOST_BASE([1.62])
CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
AX_BOOST_THREAD
if test x"$ax_cv_boost_thread" != x"yes"; then
AC_MSG_ERROR([unable to find Boost::Thread library])
else
LIBS="$BOOST_THREAD_LIB $LIBS"
fi
AX_BOOST_SYSTEM
if test x"$ax_cv_boost_system" != x"yes"; then
AC_MSG_ERROR([unable to find Boost::System library])
else
LIBS="$BOOST_SYSTEM_LIB $LIBS"
fi
AX_BOOST_PROGRAM_OPTIONS
if test x"$ax_cv_boost_program_options" != x"yes"; then
AC_MSG_ERROR([unable to find Boost::ProgramOptions library])
else
LIBS="$BOOST_PROGRAM_OPTIONS_LIB $LIBS"
fi
AM_PATH_LOG4CPP([], [], [
AC_MSG_ERROR([unable to find log4cpp library])
])
LIBS="$LOG4CPP_LIBS $LIBS"
PKG_CHECK_MODULES([configpp], [libconfig++] ,[], [
AC_MSG_ERROR([unable to find libconfig++ library])
])
LIBS="$configpp_LIBS $LIBS"
PKG_CHECK_MODULES([protobuf], [protobuf] ,[], [
AC_MSG_ERROR([unable to find Google protobuf library])
])
LIBS="$protobuf_LIBS $LIBS"
PKG_CHECK_MODULES([zmq], [libzmq] ,[], [
AC_MSG_ERROR([unable to find ZMQ library])
])
LIBS="$zmq_LIBS $LIBS"
# optional features
AC_ARG_ENABLE([weblog],
AS_HELP_STRING([--enable-weblog], [enable WebLog message interface]))
AS_IF([test "x$enable_weblog" = "xyes"], [
PKG_CHECK_MODULES([weblog], [libcurl] ,[], [
AC_MSG_ERROR([unable to find curl library])
])
AC_DEFINE([WEBLOG_ENABLED])
LIBS="$weblog_LIBS $LIBS"
])
AC_OUTPUT(Makefile)