3 AM_CONFIG_HEADER(config.h)
4 dnl AC_CONFIG_HEADERS([config.h:config.h.in])
5 AM_INIT_AUTOMAKE(libt2n, 0.6)
7 AC_DEFINE(PROTOCOL_VERSION, 1, [protocol version used (integers, increase version if incompatible)])
14 AC_PATH_PROG(DOXYGEN, doxygen)
15 AM_CONDITIONAL(HAVE_DOXYGEN, test -n $DOXYGEN)
17 AM_CONDITIONAL(AUTOCHECK, test "$enable_autocheck" = yes)
20 AX_BOOST_SERIALIZATION
21 AX_BOOST_UNIT_TEST_FRAMEWORK
22 if test "x$BOOST_SERIALIZATION_LIB" = "x"; then
23 echo "Sorry, we need the Serialization-Lib from Boost."
26 if test "x$BOOST_UNIT_TEST_FRAMEWORK_LIB" = "x"; then
27 AC_MSG_ERROR([Sorry, we need the unit test framework from Boost.])
30 PKG_CHECK_MODULES(XMLPP, libxml++-2.6 >= 2.8.1)
31 AC_SUBST(XMLPP_CFLAGS)
34 dnl fake installed libt2n (codegen) for example-codegen
35 dnl LIBT2N_CFLAGS="-I\$(top_srcdir)/src @BOOST_CPPFLAGS@ -I\$(top_srcdir)/codegen"
36 dnl LIBT2N_LIBS="\$(top_builddir)/src/libt2n.la @BOOST_SERIALIZATION_LIB@ @BOOST_LDFLAGS@"
37 dnl LIBT2N_CODEGEN="\$(top_builddir)/codegen/libt2n-codegen"
38 dnl LIBT2N_CLIENT_PCTEMPLATE="\$(top_srcdir)/codegen/clientlib.pc.in"
40 AC_SUBST(LIBT2N_CFLAGS)
42 AC_SUBST(LIBT2N_CODEGEN)
43 AC_SUBST(LIBT2N_CLIENT_PCTEMPLATE)
45 dnl todo: do not create .pc file in configure but in make
46 dnl see also autoconf manual "Installation Directory Variables"
48 AC_OUTPUT(Makefile doc/Doxyfile doc/Makefile src/Makefile libt2n.pc libt2n.spec test/Makefile examples/Makefile codegen/Makefile examples-codegen/Makefile)