Commit Graph

21 Commits

Author SHA1 Message Date
Andrew Bettison
3ffa4b10af Add Swift keyring client API with tests
Add a swift-client-api subdirectory containing a Swift source package
and a Makefile.in that compiles it into the "ServalClient" Swift module
using the Swift package manager.  The Swift API contains the following
classes:

- ServalKeyring provides the operations: add, remove, set, list
- AbstractId and its specialisation SubscriberId, already in near-final
  form, are data types for SID and the like
- ServalRestfulClient (internal) uses an HTTP client to access the
  Serval DNA RESTful interface

Improve the REST /keyring/set operation to only alter the DID or Name if
the corresponding query parameter is supplied.  Modify the internal
keyring_set_did() function to only assign the DID or Name if the
corresponding parameter is not a null pointer.

The configure script ensures that the Swift build target version is
10.10 or later when compiling for Mac OS-X, so that the package manager
will succeed.

Add autoconf macros for the Swift package manager.
2018-03-06 15:29:17 +10:30
Andrew Bettison
f2eb2bf9ab Add Swift 3/4 'servaldswift' executable
If the Swift 3 or Swift 4 compiler is present or passed to the configure
script in the SWIFTC variable, then the Makefile will compile a Swift
'servaldswift' executable to ensure that the module map links correctly
into a stand-alone Swift program.

Use the gold linker if supported, to avoid relocation errors on symbols
produced by Swift when linking dynamic libraries.
2018-03-06 15:29:17 +10:30
Andrew Bettison
9b8a7c7384 Remove unnecessary autoconf macro invocation 2018-03-06 15:16:55 +10:30
Andrew Bettison
2443811dad Fix ./configure Java version detection
Use detected POSIX-compliant $SED instead of system sed (which is BSD
sed on Mac OS-X).
2017-10-09 09:19:39 +10:30
Andrew Bettison
f4ef1e59c7 Require Java version 1.6 or later 2017-09-27 14:49:13 +09:30
Andrew Bettison
093bdfdcd3 Add FALLTHROUGH macro to silence -Wimplicit-fallthrough in GCC7 2017-09-11 12:43:38 +09:30
Andrew Bettison
4b2060554e Rename configure.in to configure.ac 2016-10-13 16:05:58 +10:30
Andrew Bettison
e34141a2a5 Upgrade to SQLite 3.14.2
Ignores a variety of warnings when compiling sqlite3.c.

Uses the new sqlite3_trace_v2() function for logging SQL statements, now
that sqlite3_trace() and sqlite3_profile() are deprecated.

Fixes a rhizomeops test failure caused because SQLite 3.12 increased the
default block size from 1024 to 4096, causing the fixed overhead of an
empty Rhizome db to exceed 32KB.  This caused the test to fail because
the first "file add" failed.  Now the test fixture adapts to the fixed
overhead.

Deletes the SQLite 3.10.2 source amalgamation.
2016-09-21 22:47:35 +09:30
gardners
dbf49d8a81 fix detection of var_attributes_section_seg on OSX 2016-01-21 12:12:52 +01:00
Jeremy Lakeman
2f7fa26791 Expand m4 section attribute detection to include linking the resulting object
clang on linux was being detected as if it was using darwin's macho format.
2016-01-19 11:23:04 +10:30
Andrew Bettison
ae18d765a7 Fix OSX build errors 2016-01-18 21:16:01 +10:30
Andrew Bettison
e51189a1c8 Remove aclocal.m4 from version control
Henceforward, aclocal.m4 will be generated by the 'autoreconf' command.

The 'autoreconf -f -i' command may now emit a warning "Unsupported
attribute section, the test may fail" on some systems, but it will still
generate the proper aclocal.m4 and ./configure files.  To suppress this
warning, simply invoke autoreconf with '-I m4' argument:

    autoreconf -f -i -I m4

The INSTALL.md has been updated accordingly, and a new 'Notes for
Developers' technical document added, explaining the use of aclocal and
autoreconf, and documenting that these warning messages are of no
concern.
2016-01-11 18:02:26 +10:30
Andrew Bettison
f6c2706796 Fix recently added M4 macro files
These macros copied in from the Autoconf Macro Archive were missing
support for the following attributes:
 - AX_GCC_VAR_ATTRIBUTE() for __attribute__(section("..."))
 - AX_GCC_FUNC_ATTRIBUTE() for __attribute__(returns_nonnull)

This commit fixes them.  (The versions in aclocal.m4 were already fixed,
but aclocal.m4 is about to be removed from version control.)
2016-01-11 18:02:26 +10:30
gardners
0fd63b330c add missing m4 macro file 2015-12-26 17:50:25 +10:30
gardners
eece21907b include ax_gcc_func_attribute M4 script for autoconf 2015-12-26 17:29:01 +10:30
Andrew Bettison
3f4ee701ec Artefacts created by libtoolize -c -i
Replaces symbolic links created from previous libtoolize -i (without -c) which
of course do not work across all platforms.
2012-09-12 15:21:50 +09:30
Daniel O'Connor
98b614d9b4 Merge branch 'master' of github.com:servalproject/serval-dna 2012-04-23 20:41:52 +09:30
Daniel O'Connor
9a06c1c4bd Add configure fu to allow pa_phone.c to not be compiled. 2012-04-23 20:17:11 +09:30
Andrew Bettison
1494172da6 Trival test of dna JNI command line entry point 2012-04-23 18:25:26 +09:30
Andrew Bettison
551f22092f Make javac and jni.h optional in ./configure 2012-04-23 12:05:00 +09:30
Andrew Bettison
36c7e492e8 Native build now supports JNI code on GNU/Linux
- ./configure detects if javac and JDK are present
- Makefile default target builds libservald.so
- probably doesn't work on Mac OS X (yet)
2012-04-20 16:57:36 +09:30