Initial CMake conversion of examples-codegen/example2-client
[libt2n] / configure.in
1 AC_INIT(configure.in)
2
3 AM_CONFIG_HEADER(config.h)
4 dnl AC_CONFIG_HEADERS([config.h:config.h.in])
5 AM_INIT_AUTOMAKE(libt2n, 0.6)
6
7 AC_DEFINE(PROTOCOL_VERSION, 1, [protocol version used (integers, increase version if incompatible)])
8
9 AC_LANG_CPLUSPLUS
10 AC_PROG_CXX
11 AM_PROG_LIBTOOL
12
13 dnl check for doxygen
14 AC_PATH_PROG(DOXYGEN, doxygen)
15 AM_CONDITIONAL(HAVE_DOXYGEN, test -n $DOXYGEN)
16
17 AM_CONDITIONAL(AUTOCHECK, test "$enable_autocheck" = yes)
18
19 AX_BOOST_BASE([1.33])
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."
24            exit 1
25 fi
26 if test "x$BOOST_UNIT_TEST_FRAMEWORK_LIB" = "x"; then
27     AC_MSG_ERROR([Sorry, we need the unit test framework from Boost.])
28 fi
29
30 PKG_CHECK_MODULES(XMLPP, libxml++-2.6 >= 2.8.1)
31 AC_SUBST(XMLPP_CFLAGS)
32 AC_SUBST(XMLPP_LIBS)
33
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"
39
40 AC_SUBST(LIBT2N_CFLAGS)
41 AC_SUBST(LIBT2N_LIBS)
42 AC_SUBST(LIBT2N_CODEGEN)
43 AC_SUBST(LIBT2N_CLIENT_PCTEMPLATE)
44
45 dnl todo: do not create .pc file in configure but in make
46 dnl see also autoconf manual "Installation Directory Variables"
47
48 AC_OUTPUT(Makefile doc/Doxyfile doc/Makefile src/Makefile libt2n.pc libt2n.spec test/Makefile examples/Makefile codegen/Makefile examples-codegen/Makefile)