Renamed libservald.so to libservaldaemon.so everywhere to avoid conflicts
with the "servald" module name in Android.mk, and to avoid the overly
generic name "libserval".
Include the JNI entry points in the Android build.
Recent changes such as the Makefile.in overhaul and the introduction of
feature-driven linking broke the Android build. This commit fixes the
breakage:
- detects the presence of gettid() in configure.ac and only defines
gettid() in serval.c if HAVE_GETTID is not defined
- builds libserval.so not libservald.so on Android, to avoid a conflict
on the module name "servald" in Android.mk
- renames cli_cleanup() to command_cleanup(), defines it in
commandline.h instead of cli.h, and supplies it in android.c
- supplies the 'keyring' global in android.c
- removes log_stderr.c from the Android build, since it conflicted with
log.c
Changed the built libraries and updated INSTALL.md accordingly:
- the 'servaldwrap' executable is now built
- libservald.[a,so] now contains the full daemon executable
- libservalclient.[a,so] contains the client library
- libserval.a is no longer built
Building the 'servaldwrap' executable is a step towards ensuring that
the libservald.so library can be linked and executed, without requiring
an Android build to reveal any failure.
Added the SOURCE_PREFIX variable that allows the make to be invoked from
within any current working directory, not just the serval-dna
repository's root directory.
Fixed the serval_version.o target to invoke the version_string.sh
script with the --repository=DIR option, so that the build will work
even if the current working directory is not within the serval-dna
repository.
Re-ordered and added some comments for clarity, and added some missing
.PHONY declarations.