-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
56 lines (42 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
53
54
55
56
AC_INIT(src/MainWindow.cpp)
AC_ARG_WITH(harvest, [ --with-harvest=<path/to/harvest> Protocol Buffer install dir (default: /usr/local/])
AC_ARG_WITH(capnp, [ --with-capnp=<path/to/capnp> Cap'n Proto install dir (default: /usr/local/)])
AC_ARG_WITH(protobuf, [ --with-protobuf=<path/to/protobuf> Protocol Buffers install dir (default: /usr/local/)])
if test "$with_harvest" == ""
then
with_harvest=/usr/local/
fi
if test "$with_protobuf" == ""
then
with_protobuf=/usr/local/
fi
if test "$with_capnp" == ""
then
with_capnp=/usr/local/
fi
AC_LANG(C++)
CPPFLAGS="-std=c++11 -I$with_harvest/include -I$with_protobuf/include -I$with_capnp/include"
AC_CHECK_HEADER(google/protobuf/stubs/common.h, [result=1], [result=0])
if test $result == 0
then
AC_MSG_ERROR([Protocol Buffers not found.])
fi
AC_CHECK_HEADER(capnp/serialize.h, [result2=1], [result2=0])
if test $result2 == 0
then
AC_MSG_ERROR([Cap'n Proto headers not found.])
fi
AC_CHECK_HEADER(harvest/HarvestIO.h, [result=1], [result=0])
if test $result == 0
then
AC_MSG_ERROR([Harvest not found.])
fi
AC_CHECK_HEADER(zlib.h, [result=1], [result=0])
if test $result == 0
then
AC_MSG_ERROR([Zlib not found.])
fi
AC_SUBST(capnp, $with_capnp)
AC_SUBST(protobuf, $with_protobuf)
AC_SUBST(harvest, $with_harvest)
AC_OUTPUT(gingr.pro)