diff --git a/daemon/configure.ac b/daemon/configure.ac index b8c234242e802bd8c68bf349f52eafc09b39eb84..271fbca2ad8db72d3e41ccdcaf9e1cb26e229a4f 100644 --- a/daemon/configure.ac +++ b/daemon/configure.ac @@ -74,6 +74,19 @@ AC_COMPILE_IFELSE( AC_MSG_RESULT([$CLANG]) +dnl Check if we are compiling for android +AC_MSG_CHECKING([if compiling for android]) +AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([], [[ +#ifndef __ANDROID__ + not android +#endif +]])], +[ANDROID=yes], [ANDROID=no]) + +AC_MSG_RESULT([$ANDROID]) +AM_CONDITIONAL([USE_ANDROID], test "x$ANDROID" = "xyes") + dnl dnl Check for the contrib directory dnl @@ -475,6 +488,7 @@ AS_IF([test "x$enable_debug" = "xyes"], dnl What Makefiles to generate +#TODO: split this list across where the relevant check is performed AC_CONFIG_FILES([Makefile \ src/Makefile \ src/sip/Makefile \ @@ -489,6 +503,7 @@ AC_CONFIG_FILES([Makefile \ src/audio/codecs/Makefile \ src/config/Makefile \ src/client/Makefile \ + src/client/android/Makefile \ src/hooks/Makefile \ src/history/Makefile \ src/video/Makefile \ diff --git a/daemon/src/client/Makefile.am b/daemon/src/client/Makefile.am index 45b07835138a07e22937c1c76f325ec44f454127..3c7c389495252dcf2bdede33630b4fca9a9bb896 100644 --- a/daemon/src/client/Makefile.am +++ b/daemon/src/client/Makefile.am @@ -18,6 +18,11 @@ VIDEO_STUB = videomanager_stub.cpp noinst_HEADERS += videomanager.h endif +if USE_ANDROID +SUBDIRS=android + +libclient_la_LIBADD = android/libclient_android.la +else if USE_DBUS SUBDIRS=dbus @@ -29,6 +34,7 @@ STUB_SRC = client.cpp \ $(PRESENCE_STUB) \ $(VIDEO_STUB) endif +endif # USE_ANDROID libclient_la_SOURCES = callmanager.cpp \ configurationmanager.cpp \ diff --git a/daemon/src/client/android/Makefile.am b/daemon/src/client/android/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..7f6f5e4496de4a4cb0232265675e905d0c00e14d --- /dev/null +++ b/daemon/src/client/android/Makefile.am @@ -0,0 +1,12 @@ +include $(top_srcdir)/globals.mak + +noinst_LTLIBRARIES = libclient_android.la + +libclient_android_la_SOURCES = callmanager_jni.cpp \ + configurationmanager_jni.cpp + +if SFL_PRESENCE +libclient_android_la_SOURCES += presencemanager_jni.cpp +endif + +noinst_HEADERS = jni_callbacks.h