mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-03-11 15:03:56 +00:00
Formalise dependency on libsodium
./configure now fails if libsodium is not present. Added libsodium to the list of dependencies in INSTALL.md. Add a Debian apt-get command to doc/Development.md.
This commit is contained in:
parent
05da181541
commit
c3a94a7ac3
@ -46,9 +46,10 @@ Mandatory dependencies:
|
|||||||
* standard C library `libc` and standard headers
|
* standard C library `libc` and standard headers
|
||||||
* standard math library `libm` and headers `<math.h>` `<float.h>`
|
* standard math library `libm` and headers `<math.h>` `<float.h>`
|
||||||
* network services library `libnsl` and headers
|
* network services library `libnsl` and headers
|
||||||
* socket library `libsocket` and headers
|
|
||||||
* dynamic link library `libdl` and header `<dlfcn.h>`
|
* dynamic link library `libdl` and header `<dlfcn.h>`
|
||||||
* Native Posix Threads Library `libpthread` and header `<pthread.h>`
|
* Native Posix Threads Library `libpthread` and header `<pthread.h>`
|
||||||
|
* elliptic curve encryption library `libsodium` and header <sodium.h>, 1.0.2
|
||||||
|
or greater
|
||||||
* on Solaris, the realtime library `librt` (for the `nanosleep()` function)
|
* on Solaris, the realtime library `librt` (for the `nanosleep()` function)
|
||||||
* Autoconf 2.67-2.69 (2.70 may work but has not been tested)
|
* Autoconf 2.67-2.69 (2.70 may work but has not been tested)
|
||||||
* Automake 1.15
|
* Automake 1.15
|
||||||
|
12
configure.in
12
configure.in
@ -79,6 +79,12 @@ fi
|
|||||||
dnl XXX Isn't this pointless? we are always linked against libc
|
dnl XXX Isn't this pointless? we are always linked against libc
|
||||||
AC_CHECK_LIB(c,srandomdev)
|
AC_CHECK_LIB(c,srandomdev)
|
||||||
|
|
||||||
|
AC_CHECK_LIB(m,sqrtf,[LDFLAGS="$LDFLAGS -lm"])
|
||||||
|
AC_CHECK_LIB(nsl,callrpc,[LDFLAGS="$LDFLAGS -lnsl"])
|
||||||
|
AC_CHECK_LIB(dl,dlopen,[LDFLAGS="$LDFLAGS -ldl"])
|
||||||
|
AC_CHECK_LIB(sodium,sodium_init,[LDFLAGS="$LDFLAGS -lsodium"],
|
||||||
|
[AC_MSG_ERROR([Missing libsodium])])
|
||||||
|
|
||||||
dnl Solaris hides nanosleep here
|
dnl Solaris hides nanosleep here
|
||||||
AC_CHECK_LIB(rt,nanosleep)
|
AC_CHECK_LIB(rt,nanosleep)
|
||||||
|
|
||||||
@ -135,12 +141,6 @@ AC_CHECK_HEADERS(
|
|||||||
dnl Lazy way of checking for Linux
|
dnl Lazy way of checking for Linux
|
||||||
AS_IF([test "x$ac_cv_header_linux_if_h" = xyes], [AC_DEFINE([USE_ABSTRACT_NAMESPACE])])
|
AS_IF([test "x$ac_cv_header_linux_if_h" = xyes], [AC_DEFINE([USE_ABSTRACT_NAMESPACE])])
|
||||||
|
|
||||||
AC_CHECK_LIB(m,sqrtf,[LDFLAGS="$LDFLAGS -lm"])
|
|
||||||
AC_CHECK_LIB(nsl,callrpc,[LDFLAGS="$LDFLAGS -lnsl"])
|
|
||||||
AC_CHECK_LIB(socket,socket,[LDFLAGS="$LDFLAGS -lsocket"])
|
|
||||||
AC_CHECK_LIB(dl,dlopen,[LDFLAGS="$LDFLAGS -ldl"])
|
|
||||||
AC_CHECK_LIB(sodium,sodium_init,[LDFLAGS="$LDFLAGS -lsodium"])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([linker -z relro option], libc_cv_z_relro, [dnl
|
AC_CACHE_CHECK([linker -z relro option], libc_cv_z_relro, [dnl
|
||||||
libc_cv_z_relro=no
|
libc_cv_z_relro=no
|
||||||
AS_IF([AC_TRY_COMMAND([${CC-cc} -v --help 2>&1 | grep "z relro" 1>&AS_MESSAGE_LOG_FD])], [
|
AS_IF([AC_TRY_COMMAND([${CC-cc} -v --help 2>&1 | grep "z relro" 1>&AS_MESSAGE_LOG_FD])], [
|
||||||
|
@ -59,6 +59,42 @@ suppress most of these messages from the output of [aclocal][] and
|
|||||||
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
|
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
|
||||||
$
|
$
|
||||||
|
|
||||||
|
Debian/Ubuntu
|
||||||
|
-------------
|
||||||
|
|
||||||
|
To install all mandatory and testing dependencies before building on [Debian][]
|
||||||
|
and [Ubuntu][] systems:
|
||||||
|
|
||||||
|
$ sudo apt-get --yes install libc6-dev libsodium-dev jq curl
|
||||||
|
Reading package lists... Done
|
||||||
|
Building dependency tree
|
||||||
|
Reading state information... Done
|
||||||
|
libc6-dev is already the newest version (2.23-5).
|
||||||
|
The following NEW packages will be installed:
|
||||||
|
curl jq libsodium-dev
|
||||||
|
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
|
||||||
|
Need to get 544 kB of archives.
|
||||||
|
After this operation, 1,683 kB of additional disk space will be used.
|
||||||
|
Get:1 http://ftp.us.debian.org/debian testing/main amd64 curl amd64 7.50.1-1 [218 kB]
|
||||||
|
Get:2 http://ftp.us.debian.org/debian testing/main amd64 jq amd64 1.5+dfsg-1 [156 kB]
|
||||||
|
Get:3 http://ftp.us.debian.org/debian testing/main amd64 libsodium-dev amd64 1.0.11-1 [170 kB]
|
||||||
|
Fetched 544 kB in 1s (304 kB/s)
|
||||||
|
Selecting previously unselected package curl.
|
||||||
|
(Reading database ... 205089 files and directories currently installed.)
|
||||||
|
Preparing to unpack .../0-curl_7.50.1-1_amd64.deb ...
|
||||||
|
Unpacking curl (7.50.1-1) ...
|
||||||
|
Selecting previously unselected package jq.
|
||||||
|
Preparing to unpack .../1-jq_1.5+dfsg-1_amd64.deb ...
|
||||||
|
Unpacking jq (1.5+dfsg-1) ...
|
||||||
|
Selecting previously unselected package libsodium-dev:amd64.
|
||||||
|
Preparing to unpack .../2-libsodium-dev_1.0.11-1_amd64.deb ...
|
||||||
|
Unpacking libsodium-dev:amd64 (1.0.11-1) ...
|
||||||
|
Setting up jq (1.5+dfsg-1) ...
|
||||||
|
Setting up curl (7.50.1-1) ...
|
||||||
|
Setting up libsodium-dev:amd64 (1.0.11-1) ...
|
||||||
|
Processing triggers for man-db (2.7.5-1) ...
|
||||||
|
$
|
||||||
|
|
||||||
Apple OSX
|
Apple OSX
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@ -136,6 +172,8 @@ Available under the [Creative Commons Attribution 4.0 International licence][CC
|
|||||||
[build]: ../INSTALL.md
|
[build]: ../INSTALL.md
|
||||||
[aclocal]: https://www.gnu.org/software/automake/manual/html_node/aclocal-Invocation.html
|
[aclocal]: https://www.gnu.org/software/automake/manual/html_node/aclocal-Invocation.html
|
||||||
[autoreconf]: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf.html#autoreconf-Invocation
|
[autoreconf]: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf.html#autoreconf-Invocation
|
||||||
|
[Debian]: http://www.debian.org/
|
||||||
|
[Ubuntu]: http://www.ubuntu.com/
|
||||||
[OSX grep(1)]: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/grep.1.html
|
[OSX grep(1)]: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/grep.1.html
|
||||||
[OSX sed(1)]: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/sed.1.html
|
[OSX sed(1)]: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/sed.1.html
|
||||||
[OSX awk(1)]: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/awk.1.html
|
[OSX awk(1)]: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/awk.1.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user