(no commit message)
[libt2n] / configure.in
index b7d9353..1d07fab 100644 (file)
@@ -1,8 +1,11 @@
 AC_INIT(configure.in)
 
 AM_CONFIG_HEADER(config.h)
+dnl AC_CONFIG_HEADERS([config.h:config.h.in])
 AM_INIT_AUTOMAKE(libt2n, 0.1)
 
+AC_DEFINE(PROTOCOL_VERSION, 1, [protocol version used (integers, increase version if incompatible)])
+
 AC_LANG_CPLUSPLUS
 AC_PROG_CXX
 AM_PROG_LIBTOOL
@@ -14,4 +17,28 @@ AM_CONDITIONAL(HAVE_DOXYGEN, test -n $DOXYGEN);
 AM_CONDITIONAL(AUTOCHECK, test "$enable_autocheck" = yes)
 AM_PATH_CPPUNIT(1.8.0)
 
-AC_OUTPUT(Makefile doc/Doxyfile doc/Makefile src/Makefile libt2n.pc libt2n.spec test/Makefile)
+AX_BOOST([1.33])
+if test "x$BOOST_SERIALIZATION_LIB" = "x"; then
+           echo "Sorry, we need the Serialization-Lib from Boost."
+           exit 1
+fi
+
+PKG_CHECK_MODULES(XMLPP, libxml++-2.6 >= 2.8.1)
+AC_SUBST(XMLPP_CFLAGS)
+AC_SUBST(XMLPP_LIBS)
+
+dnl fake installed libt2n (codegen) for example-codegen
+dnl todo: remove codegen include path (codegen-stubhead.hxx will be removed)
+LIBT2N_CPPFLAGS="-I\$(top_srcdir)/src @BOOST_CPPFLAGS@ @CPPUNIT_CFLAGS@ -I\$(top_srcdir)/codegen"
+LIBT2N_LIBS="\$(top_builddir)/src/libt2n.la @BOOST_SERIALIZATION_LIB@ @BOOST_LDFLAGS@"
+LIBT2N_CODEGEN="\$(top_builddir)/codegen/libt2n-codegen"
+LIBT2N_CLIENT_PCTEMPLATE="\$(top_srcdir)/codegen/clientlib.pc.in"
+LIBT2N_CODEGEN_MAKESNIPPET="include \$(top_srcdir)/codegen/codegen.make"
+
+AC_SUBST(LIBT2N_CPPFLAGS)
+AC_SUBST(LIBT2N_LIBS)
+AC_SUBST(LIBT2N_CODEGEN)
+AC_SUBST(LIBT2N_CLIENT_PCTEMPLATE)
+AC_SUBST(LIBT2N_CODEGEN_MAKESNIPPET)
+         
+AC_OUTPUT(Makefile doc/Doxyfile doc/Makefile src/Makefile libt2n.pc libt2n.spec test/Makefile examples/Makefile codegen/Makefile example-codegen/Makefile)