Commit 43f2a2f3 authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Tristan Matthews

configure: check if we are compiling for android

Enable relevant portions of code if we are.

Change-Id: I59753a42dce1ba4fad23f6bdf1895146da92fa0e
Refs: #46972
parent 5d4dfda8
......@@ -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 \
......
......@@ -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 \
......
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment