Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belr
Commits
311e9a6d
Commit
311e9a6d
authored
Jun 14, 2016
by
Sylvain Berfini
🐮
Browse files
Fixed autotools build
parent
b208b0ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
configure.ac
configure.ac
+18
-0
src/Makefile.am
src/Makefile.am
+2
-0
src/grammarbuilder.cc
src/grammarbuilder.cc
+1
-1
tools/Makefile.am
tools/Makefile.am
+2
-2
No files found.
configure.ac
View file @
311e9a6d
...
...
@@ -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.
...
...
src/Makefile.am
View file @
311e9a6d
...
...
@@ -8,3 +8,5 @@ libbelr_la_SOURCES=belr.cc belr.hh \
AM_CPPFLAGS
=
-I
$(top_srcdir)
/include
libbelr_la_LIBADD
=
$(BCTOOLBOX_LIBS)
src/grammarbuilder.cc
View file @
311e9a6d
...
...
@@ -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
;
...
...
tools/Makefile.am
View file @
311e9a6d
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment