Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian Schrader
Kea
Commits
8a8e9a85
Commit
8a8e9a85
authored
Mar 18, 2018
by
Razvan Becheriu
Committed by
Tomek Mrugalski
Aug 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add configure parameters for sysrepo
parent
85fec0c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
169 additions
and
4 deletions
+169
-4
configure.ac
configure.ac
+69
-0
src/bin/Makefile.am
src/bin/Makefile.am
+5
-1
src/bin/netconf/Makefile.am
src/bin/netconf/Makefile.am
+3
-3
tools/sysrepo_config
tools/sysrepo_config
+82
-0
tools/sysrepo_config_defines.sh.sample
tools/sysrepo_config_defines.sh.sample
+10
-0
No files found.
configure.ac
View file @
8a8e9a85
...
...
@@ -861,6 +861,58 @@ fi
# ... and at the shell level, so Makefile.am can take action depending on this.
AM_CONDITIONAL(HAVE_CQL, test "$CQL_CONFIG" != "")
sysrepo_config="no"
AC_ARG_WITH([sysrepo],
AC_HELP_STRING([--with-sysrepo=PATH],
[path to the Sysrepo 'sysrepo_config' script]),
[sysrepo_config="$withval"])
if test "${sysrepo_config}" = "yes" ; then
SYSREPO_CONFIG="$PKG_CONFIG"
elif test "${sysrepo_config}" != "no" ; then
SYSREPO_CONFIG="${sysrepo_config}"
fi
if test "SYSREPO_CONFIG" != "" ; then
if test -d "$SYSREPO_CONFIG" -o ! -x "$SYSREPO_CONFIG" ; then
AC_MSG_ERROR([--with-sysrepo should point to a sysrepo_config program])
fi
SYSREPO_INCLUDEDIR=`$SYSREPO_CONFIG --cflags-only-I sysrepo`
SYSREPO_CPPFLAGS="`$SYSREPO_CONFIG --cflags-only-other sysrepo` $SYSREPO_INCLUDEDIR"
SYSREPO_LIBS="`$SYSREPO_CONFIG --libs sysrepo`"
SYSREPO_VERSION=`$SYSREPO_CONFIG --modversion sysrepo`
AC_SUBST(SYSREPO_CPPFLAGS)
AC_SUBST(SYSREPO_LIBS)
# Check that a simple program using CQL functions can compile and link.
CPPFLAGS_SAVED="$CPPFLAGS"
LIBS_SAVED="$LIBS"
CPPFLAGS="$SYSREPO_CPPFLAGS $CPPFLAGS"
LIBS="$SYSREPO_LIBS $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <sysrepo.h>],
[sr_conn_ctx_t *connection = NULL;
sr_session_ctx_t *session = NULL;
sr_connect("configure_test", SR_CONN_DEFAULT, &connection);
sr_disconnect(connection);])],
[AC_MSG_RESULT([checking for Sysrepo headers and library... yes])],
[AC_MSG_RESULT([checking for Sysrepo headers and library... no])
AC_MSG_ERROR([Needs Sysrepo library])]
)
CPPFLAGS=$CPPFLAGS_SAVED
LIBS=$LIBS_SAVED
# Note that CQL is present in the config.h file
AC_DEFINE([HAVE_SYSREPO], [1], [SYSREPO is present])
fi
# ... and at the shell level, so Makefile.am can take action depending on this.
AM_CONDITIONAL(HAVE_SYSREPO, test "$SYSREPO_CONFIG" != "")
# Check for log4cplus
DISTCHECK_LOG4CPLUS_CONFIGURE_FLAG=
log4cplus_path="yes"
...
...
@@ -1703,6 +1755,22 @@ Cassandra CQL:
END
fi
if test "$SYSREPO_CPPFLAGS" != "" ; then
cat >> config.report << END
Sysrepo:
SYSREPO_VERSION: ${SYSREPO_VERSION}
SYSREPO_CPPFLAGS: ${SYSREPO_CPPFLAGS}
SYSREPO_LIBS: ${SYSREPO_LIBS}
END
else
cat >> config.report << END
Sysrepo:
no
END
fi
if test "$enable_gtest" != "no"; then
cat >> config.report << END
...
...
@@ -1715,6 +1783,7 @@ Google Test:
END
else
cat >> config.report << END
Google Test:
no
END
...
...
src/bin/Makefile.am
View file @
8a8e9a85
# The following build order must be maintained.
SUBDIRS
=
dhcp4 dhcp6
netconf
d2 agent perfdhcp admin lfc keactrl
SUBDIRS
=
dhcp4 dhcp6 d2 agent perfdhcp admin lfc keactrl
if
KEA_SHELL
SUBDIRS
+=
shell
endif
if
HAVE_SYSREPO
SUBDIRS
+=
netconf
endif
check-recursive
:
all-recursive
src/bin/netconf/Makefile.am
View file @
8a8e9a85
...
...
@@ -4,7 +4,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)
$(
NETCONF
_INCLUDES)
AM_CPPFLAGS
+=
$(BOOST_INCLUDES)
$(
SYSREPO
_INCLUDES)
AM_CXXFLAGS
=
$(KEA_CXXFLAGS)
...
...
@@ -46,12 +46,12 @@ BUILT_SOURCES = netconf_messages.h netconf_messages.cc
noinst_LTLIBRARIES
=
libnetconf.la
libnetconf_la_SOURCES
=
libnetconf_la_SOURCES
+=
agent.cc agent.h
libnetconf_la_SOURCES
=
agent.cc agent.h
libnetconf_la_SOURCES
+=
translator.cc translator.h
libnetconf_la_SOURCES
+=
netconf_log.cc netconf_log.h
nodist_libnetconf_la_SOURCES
=
netconf_messages.h netconf_messages.cc
EXTRA_DIST
+=
netconf_messages.mes
sbin_PROGRAMS
=
kea-netconf
...
...
tools/sysrepo_config
0 → 100755
View file @
8a8e9a85
#!/bin/bash
sysrepo_lib
=
"sysrepo"
if
[
-z
${
YANG_LIBRARY_PATH
}
]
then
YANG_LIBRARY_PATH
=
/
fi
if
test
`
uname
-s
`
=
"Darwin"
;
then
DIR
=
$(
stat
-f
%N
$0
| xargs
dirname
)
else
DIR
=
$(
readlink
-f
$0
| xargs
dirname
)
fi
if
!
[
-f
${
DIR
}
/sysrepo_config_defines.sh
]
||
!
[
-x
${
DIR
}
/sysrepo_config_defines.sh
]
then
echo
"missing path configuration file for Sysrepo (sysrepo_config_defines.sh)"
exit
0
fi
source
${
DIR
}
/sysrepo_config_defines.sh
if
[
$#
-ne
1
]
&&
[
$#
-ne
2
]
then
echo
"run:
\`
$0
--help
\`
for more help"
exit
0
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
"libraries:"
echo
" sysrepo"
exit
0
else if
[
$#
-ne
2
]
then
echo
"run:
\`
$0
--help
\`
for more help"
exit
0
else if
[
$2
!=
"sysrepo"
]
then
echo
"library
$2
not supported"
echo
"run:
\`
$0
--help
\`
for more help"
exit
0
else
sysrepo_lib
=
$2
fi
fi
fi
if
[
$1
==
"--cflags-only-other"
]
then
exit
0
fi
if
[
$1
==
"--cflags-only-I"
]
then
echo
"-I
${
SYSREPO_PATH
}
/inc/"
exit
0
fi
if
[
$1
==
"--libs"
]
then
echo
"-L
${
SYSREPO_PATH
}
/build/src -L
${
SYSREPO_PATH
}
/build/swig -L
$YANG_LIBRARY_PATH
-lsysrepo -lyang -pthread -lpcre -lev -lprotobuf -lavl -lprotobuf-c"
exit
0
fi
if
[
$1
==
"--modversion"
]
then
MAJOR
=
"1"
MINOR
=
"0"
PATCH
=
"0"
echo
"
${
MAJOR
}
.
${
MINOR
}
.
${
PATCH
}
"
exit
0
fi
echo
"wrong parameter"
echo
"run:
\`
$0
--help
\`
for more help"
tools/sysrepo_config_defines.sh.sample
0 → 100755
View file @
8a8e9a85
#!/bin/bash
# This auxiliary script is considered temporary in nature. It will not be
# necessary once the DataStax cpp-driver project accepts proper cql_config
# script.
# This variable should point to the directory where sysrepo is compiled.
# You can download sysrepo sources from https://github.com/sysrepo/sysrepo.git
SYSREPO_PATH
=
"/please/specify/path/to/sysrepo/in/sysrepo_config_defines.sh"
export
SYSREPO_PATH
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