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
60ad713a
Commit
60ad713a
authored
May 23, 2018
by
Francis Dupont
Browse files
Options
Browse Files
Download
Plain Diff
[master] Merged trac5488 / PR71 (pkg-config for --with-cql)
parents
505ce96e
0784ba1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
18 deletions
+65
-18
configure.ac
configure.ac
+21
-7
doc/guide/install.xml
doc/guide/install.xml
+13
-0
tools/cql_config
tools/cql_config
+31
-11
No files found.
configure.ac
View file @
60ad713a
...
...
@@ -783,27 +783,41 @@ fi
# ... and at the shell level, so Makefile.am can take action depending on this.
AM_CONDITIONAL(HAVE_PGSQL, test "$PG_CONFIG" != "")
# allow building kea programs with static link to cassandra cpp-driver.
AC_ARG_ENABLE([cql-static-link],
AS_HELP_STRING([--enable-cql-static-link],
[build programs with cassandra cpp driver static link [[default=no]]]),
[enable_cql_static_link=yes], [enable_cql_static_link=no])
AM_CONDITIONAL(USE_CQL_STATIC_LIB, test "$enable_cql_static_lib" = yes)
#AC_DEFINE USE_CQL_STATIC_LIB? (unused)
cql_lib="cassandra"
if test "${enable_cql_static_lib}" = "yes" ; then
cql_lib="${cql_lib}_static"
fi
cql_config="no"
AC_ARG_WITH([cql],
AC_HELP_STRING([--with-cql=PATH],
[path to the Cassandra CQL 'cql_config' script]),
[path to
pkg-config or
the Cassandra CQL 'cql_config' script]),
[cql_config="$withval"])
if test "${cql_config}" = "yes" ; then
CQL_CONFIG="/usr/bin/cql_config"
AC_PATH_PROG([PKG_CONFIG], [pkg-config])
CQL_CONFIG="$PKG_CONFIG"
elif test "${cql_config}" != "no" ; then
CQL_CONFIG="${cql_config}"
fi
if test "$CQL_CONFIG" != "" ; then
if test -d "$CQL_CONFIG" -o ! -x "$CQL_CONFIG" ; then
AC_MSG_ERROR([--with-cql should point to a cql_config program])
AC_MSG_ERROR([--with-cql should point to a
pkg-config or
cql_config program])
fi
CQL_INCLUDEDIR=`$CQL_CONFIG --
includedir
`
CQL_CPPFLAGS="`$CQL_CONFIG --c
ppflags` -I
$CQL_INCLUDEDIR"
CQL_LIBS="
-L`$CQL_CONFIG --libdir` -lcassandra -luv"
CQL_VERSION=`$CQL_CONFIG --
version
`
CQL_INCLUDEDIR=`$CQL_CONFIG --
cflags-only-I $cql_lib
`
CQL_CPPFLAGS="`$CQL_CONFIG --c
flags-only-other $cql_lib`
$CQL_INCLUDEDIR"
CQL_LIBS="
`$CQL_CONFIG --libs $cql_lib`"
CQL_VERSION=`$CQL_CONFIG --
modversion $cql_lib
`
AC_SUBST(CQL_CPPFLAGS)
AC_SUBST(CQL_LIBS)
...
...
doc/guide/install.xml
View file @
60ad713a
...
...
@@ -588,6 +588,19 @@ Debian and Ubuntu:
Install Cassandra according to the instructions for your system. The
Cassandra project website contains useful pointers:
<uri
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xlink:href=
"http://cassandra.apache.org"
>
http://cassandra.apache.org
</uri>
.
</para>
<para>
If you have a cpp-driver package available as binary or as source
simply install or build and install the package. Then build
and install Kea as described in
<xref
linkend=
"installation"
/>
:
To enable the Cassandra (CQL) database code, at the "configure"
step (see
<xref
linkend=
"configure"
/>
), do:
<screen><userinput>
./configure [other-options] --with-cql=
<replaceable>
path-to-pkg-config
</replaceable></userinput></screen>
Note if
<command>
pkg-config
</command>
is at its standard location
(and thus in the shell path) you do not need to supply its path.
If it does not work (e.g. no pkg-config, package not available in
pkg-config with the cassandra name), you can still use
the
<command>
cql_config
</command>
script in tools/ as describe below.
</para>
<para>
Download and compile cpp-driver from DataStax. For details regarding
dependencies for building cpp-driver, see the project homepage
...
...
tools/cql_config
View file @
60ad713a
#!/bin/bash
cql_lib
=
"cassandra"
if
test
`
uname
-s
`
=
"Darwin"
;
then
DIR
=
$(
stat
-f
%N
$0
| xargs
dirname
)
else
...
...
@@ -13,40 +15,58 @@ then
fi
source
${
DIR
}
/cql_config_defines.sh
if
[
$#
-ne
1
]
if
[
$#
-ne
1
]
&&
[
$#
-ne
2
]
then
echo
"run:
\`
$0
--help
\`
for more help"
exit
0
fi
if
[
$1
==
"--help"
]
then
echo
"cql_config 'option' ['library']"
echo
"options:"
echo
"--help"
echo
" print this help message"
echo
"--c
ppflags
"
echo
"--c
flags-only-other
"
echo
" get cpp compilation flags"
echo
"--
includedir
"
echo
"--
cflags-only-I
"
echo
" get include path"
echo
"--lib
dir
"
echo
"--lib
s
"
echo
" get lib path"
echo
"--version"
echo
"--
mod
version"
echo
" get version"
echo
"libraries:"
echo
" cassandra"
echo
" cassandra_static"
exit
0
else if
[
$#
-ne
2
]
then
echo
"run:
\`
$0
--help
\`
for more help"
exit
0
else if
[
$2
!=
"cassandra"
]
&&
[
$2
!=
"cassandra_static"
]
then
echo
"library
$2
not supported"
echo
"run:
\`
$0
--help
\`
for more help"
exit
0
else
cql_lib
=
$2
fi
fi
fi
if
[
$1
==
"--c
ppflags
"
]
if
[
$1
==
"--c
flags-only-other
"
]
then
exit
0
fi
if
[
$1
==
"--
includedir
"
]
if
[
$1
==
"--
cflags-only-I
"
]
then
echo
"
${
CPP_DRIVER_PATH
}
/include/"
echo
"
-I
${
CPP_DRIVER_PATH
}
/include/"
exit
0
fi
if
[
$1
==
"--lib
dir
"
]
if
[
$1
==
"--lib
s
"
]
then
echo
"
${
CPP_DRIVER_PATH
}
/build/
"
echo
"
-L
${
CPP_DRIVER_PATH
}
/build/ -l
${
cql_lib
}
-luv
"
exit
0
fi
if
[
$1
==
"--version"
]
if
[
$1
==
"--
mod
version"
]
then
MAJOR
=
`
grep
VERSION_MAJOR
${
CPP_DRIVER_PATH
}
/include/cassandra.h |
cut
-d
" "
-f
3
`
MINOR
=
`
grep
VERSION_MINOR
${
CPP_DRIVER_PATH
}
/include/cassandra.h |
cut
-d
" "
-f
3
`
...
...
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