Commit 311e9a6d authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed autotools build

parent b208b0ad
......@@ -17,6 +17,24 @@ CXXFLAGS="$CXXFLAGS -std=c++11 -Wall -Werror"
# Checks for libraries.
dnl ##################################################
dnl # Check for BcToolbox
dnl ##################################################
dnl check bctoolbox
PKG_CHECK_MODULES(BCTOOLBOX, [bctoolbox],[libbctoolbox_found=yes],foo=bar)
if test "$libbctoolbox_found" != "yes" ; then
dnl Check the lib presence in case the PKG-CONFIG version is not found
AC_LANG_CPLUSPLUS
AC_CHECK_LIB(bctoolbox, main, [BCTOOLBOX_LIBS+=" -lbctoolbox"; libbctoolbox_found=yes], [foo=bar])
AC_LANG_C
fi
if test "$libbctoolbox_found" != "yes" ; then
AC_MSG_ERROR([libbctoolbox not found. Install it and try again])
fi
AC_SUBST(BCTOOLBOX_LIBS)
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
......
......@@ -8,3 +8,5 @@ libbelr_la_SOURCES=belr.cc belr.hh \
AM_CPPFLAGS=-I$(top_srcdir)/include
libbelr_la_LIBADD=$(BCTOOLBOX_LIBS)
......@@ -326,7 +326,7 @@ shared_ptr<Grammar> ABNFGrammarBuilder::createFromAbnf(const string &abnf, const
shared_ptr<ABNFBuilder> builder = mParser.parseInput("rulelist",abnf,&parsed);
if (parsed<(size_t)abnf.size()){
bctbx_error("[belr] Only %i bytes parsed over a total of %i.", parsed, abnf.size());
bctbx_error("[belr] Only %llu bytes parsed over a total of %llu.", (unsigned long long)parsed, (unsigned long long) abnf.size());
return NULL;
}
shared_ptr<Grammar> retGram;
......
......@@ -3,10 +3,10 @@ noinst_PROGRAMS=belr-demo
belr_parse_SOURCES=belr-parse.cc
belr_parse_LDADD=$(top_builddir)/src/libbelr.la
belr_parse_LDADD=$(top_builddir)/src/libbelr.la $(BCTOOLBOX_LIBS)
belr_demo_SOURCES=belr-demo.cc
belr_demo_LDADD=$(top_builddir)/src/libbelr.la
belr_demo_LDADD=$(top_builddir)/src/libbelr.la $(BCTOOLBOX_LIBS)
AM_CPPFLAGS=-I$(top_srcdir)/include
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment