Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
f9c44b24
Commit
f9c44b24
authored
Mar 18, 2018
by
Andrei Pavel
🐧
Committed by
Tomek Mrugalski
Aug 21, 2018
Browse files
use pkg-config for sysrepo
parent
5419a51f
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
f9c44b24
...
...
@@ -829,7 +829,7 @@ if test "$CQL_CONFIG" != "" ; then
fi
CQL_INCLUDEDIR=`$CQL_CONFIG --cflags-only-I $cql_lib`
CQL_CPPFLAGS="`$CQL_CONFIG --cflags-only-other $cql_lib`
$CQL_INCLUDEDIR
"
CQL_CPPFLAGS="
$CQL_INCLUDEDIR
`$CQL_CONFIG --cflags-only-other $cql_lib`"
CQL_LIBS="`$CQL_CONFIG --libs $cql_lib`"
CQL_VERSION=`$CQL_CONFIG --modversion $cql_lib`
...
...
@@ -878,15 +878,15 @@ if test "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`
SYSREPO_INCLUDEDIR=`$SYSREPO_CONFIG --cflags-only-I
lib
sysrepo`
SYSREPO_CPPFLAGS="
$SYSREPO_INCLUDEDIR
`$SYSREPO_CONFIG --cflags-only-other
lib
sysrepo`"
SYSREPO_LIBS="`$SYSREPO_CONFIG --libs
lib
sysrepo`"
SYSREPO_VERSION=`$SYSREPO_CONFIG --modversion
lib
sysrepo`
AC_SUBST(SYSREPO_CPPFLAGS)
AC_SUBST(SYSREPO_LIBS)
# Check that a simple program using
CQL
functions can compile and link.
# Check that a simple program using
Sysrepo
functions can compile and link.
CPPFLAGS_SAVED="$CPPFLAGS"
LIBS_SAVED="$LIBS"
...
...
@@ -894,7 +894,9 @@ if test "SYSREPO_CONFIG" != "" ; then
LIBS="$SYSREPO_LIBS $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <sysrepo.h>],
[AC_LANG_PROGRAM([extern "C" {
#include <sysrepo.h>
}],
[sr_conn_ctx_t *connection = NULL;
sr_session_ctx_t *session = NULL;
sr_connect("configure_test", SR_CONN_DEFAULT, &connection);
...
...
@@ -906,7 +908,7 @@ if test "SYSREPO_CONFIG" != "" ; then
CPPFLAGS=$CPPFLAGS_SAVED
LIBS=$LIBS_SAVED
# Note that
CQL
is present in the config.h file
# Note that
Sysrepo
is present in the config.h file
AC_DEFINE([HAVE_SYSREPO], [1], [SYSREPO is present])
fi
...
...
tools/sysrepo_config
View file @
f9c44b24
#!/bin/bash
sysrepo_lib
=
"sysrepo"
sysrepo_lib
=
"
lib
sysrepo"
if
[
-z
${
YANG_LIBRARY_PATH
}
]
then
...
...
@@ -40,13 +40,13 @@ then
echo
"--modversion"
echo
" get version"
echo
"libraries:"
echo
" sysrepo"
echo
"
lib
sysrepo"
exit
0
else if
[
$#
-ne
2
]
then
echo
"run:
\`
$0
--help
\`
for more help"
exit
0
else if
[
$2
!=
"sysrepo"
]
else if
[
$2
!=
"
lib
sysrepo"
]
then
echo
"library
$2
not supported"
echo
"run:
\`
$0
--help
\`
for more help"
...
...
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