Commit 2d95d555 authored by Razvan Becheriu's avatar Razvan Becheriu Committed by Razvan Becheriu
Browse files

fixed build sysrepo

parent 88f3f874
......@@ -932,6 +932,7 @@ if test "$SYSREPO_CONFIG" != "" ; then
SYSREPO_LIBS="${SYSREPO_LIBS} ${SYSREPOCPP_LIBS}"
fi
AC_SUBST(SYSREPO_INCLUDEDIR)
AC_SUBST(SYSREPO_CPPFLAGS)
AC_SUBST(SYSREPO_LIBS)
AC_SUBST(SYSREPO_REPO)
......
......@@ -3,7 +3,7 @@ SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src
AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_INCLUDES)
AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_INCLUDEDIR)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
......
......@@ -8,7 +8,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/netconf/tests\"
AM_CPPFLAGS += -DCFG_EXAMPLES=\"$(abs_top_srcdir)/doc/examples/netconf\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/netconf/tests\"
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_INCLUDEDIR)
CLEANFILES = *.json *.log
......
......@@ -40,23 +40,37 @@ then
fi
if [ "$1" = "--help" ]
then
echo "sysrepo_config 'option' ['library']"
echo "options:"
echo "--help"
echo " print this help message"
echo "--cflags-only-other"
echo " get cpp compilation flags"
echo "--cflags-only-I"
echo " get include path"
echo "--libs"
echo " get lib path"
echo "--modversion"
echo " get version"
echo "--variable=SR_REPOSITORY_LOC"
echo " get repo path"
echo "libraries:"
echo " libsysrepo"
exit 0
echo "sysrepo_config 'option' ['library']"
echo "options:"
echo "--help"
echo " print this help message"
echo "--cflags-only-other"
echo " get cpp compilation flags"
echo "--cflags-only-I"
echo " get include path"
echo "--libs"
echo " get lib path"
echo "--modversion"
echo " get version"
echo "--variable=SR_REPOSITORY_LOC"
echo " get repo path"
echo "libraries:"
echo " libsysrepo"
echo " libSysrepo-cpp"
exit 0
else if [ $# -ne 2 ]
then
echo "run: \`$0 --help\` for more help"
exit 0
else if [ $2 != "libsysrepo" ] && [ $2 != "libSysrepo-cpp" ]
then
echo "library $2 not supported"
echo "run: \`$0 --help\` for more help"
exit 0
else
sysrepo_lib=$2
fi
fi
fi
if [ $# -ne 2 ]; then
......@@ -70,14 +84,16 @@ elif [ "$2" != "libsysrepo" ]; then
else
sysrepo_lib=$2
fi
if [ "$1" = "--cflags-only-other" ]; then
exit 0
if [ $1 == "--cflags-only-I" ]
then
echo "-I${SYSREPO_PATH}/include/"
exit 0
fi
if [ "$1" = "--cflags-only-I" ]; then
echo "-I${SYSREPO_PATH}/inc/"
exit 0
if [ $1 == "--libs" ]
then
# Earlier versions also required -lprotobuf, but it is no longer needed.
echo "-L${SYSREPO_PATH}/lib/ -L${YANG_LIBRARY_PATH} -lsysrepo -lSysrepo-cpp -lyang -pthread -lpcre -lev -lavl -lprotobuf-c"
exit 0
fi
if [ "$1" = "--libs" ]; then
......@@ -85,13 +101,10 @@ if [ "$1" = "--libs" ]; then
echo "-L${SYSREPO_PATH}/build/src -L${SYSREPO_PATH}/build/swig -L$YANG_LIBRARY_PATH -l:${sysrepo_lib}.a -lSysrepo-cpp -lyang -pthread -lpcre -lev -lavl -lprotobuf-c"
exit 0
fi
if [ "$1" = "--modversion" ]; then
MAJOR="1"
MINOR="0"
PATCH="0"
echo "${MAJOR}.${MINOR}.${PATCH}"
exit 0
if [ $1 == "--variable=SR_REPOSITORY_LOC" ]
then
echo "${SYSREPO_PATH}/build/repository"
exit 0
fi
if [ "$1" = "--variable=SR_REPOSITORY_LOC" ]; then
......
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