mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-21 14:07:53 +00:00
enable overriding default instance path at configure time.
This commit is contained in:
parent
a433f06530
commit
6179240874
8
conf.h
8
conf.h
@ -23,11 +23,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
DEFAULT_INSTANCE_PATH can be set via the configure option
|
||||||
|
--enable-instance-path=<path>
|
||||||
|
*/
|
||||||
|
#ifdef INSTANCE_PATH
|
||||||
|
#define DEFAULT_INSTANCE_PATH INSTANCE_PATH
|
||||||
|
#else
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#define DEFAULT_INSTANCE_PATH "/data/data/org.servalproject/var/serval-node"
|
#define DEFAULT_INSTANCE_PATH "/data/data/org.servalproject/var/serval-node"
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_INSTANCE_PATH "/var/serval-node"
|
#define DEFAULT_INSTANCE_PATH "/var/serval-node"
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Handy statement for forming a path to an instance file in a char buffer whose declaration
|
/* Handy statement for forming a path to an instance file in a char buffer whose declaration
|
||||||
* is in scope (so that sizeof(buf) will work). Evaluates to true if the pathname fitted into
|
* is in scope (so that sizeof(buf) will work). Evaluates to true if the pathname fitted into
|
||||||
|
@ -60,6 +60,9 @@ if test -n "$JAVAC"; then
|
|||||||
popdef([AC_MSG_ERROR])
|
popdef([AC_MSG_ERROR])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(instance-path,"Set default instance path for servald",
|
||||||
|
CPPFLAGS="$CPPFLAGS -DINSTANCE_PATH=\\\"$enableval\\\"")
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user