mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +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 <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
|
||||
#define DEFAULT_INSTANCE_PATH "/data/data/org.servalproject/var/serval-node"
|
||||
#else
|
||||
#define DEFAULT_INSTANCE_PATH "/var/serval-node"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
@ -60,6 +60,9 @@ if test -n "$JAVAC"; then
|
||||
popdef([AC_MSG_ERROR])
|
||||
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
|
||||
AC_CHECK_LIB(c,srandomdev)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user