summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2015-03-26 05:08:40 +0000
committerNanang Izzuddin <nanang@teluu.com>2015-03-26 05:08:40 +0000
commitedf6b789769d8cabc745ab793282cae79d000937 (patch)
treeb41ac96bd5ad85c6c010e69ad8dacbe6ee6c562d
parentd874c87049bd75d89132b4e5b2a56886c3b431fb (diff)
Re #1822: Updated build script to auto define PJMEDIA_VIDEO_DEV_HAS_ANDROID.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5027 74dad513-b988-da41-8d7b-12977e46ad98
-rwxr-xr-xaconfigure1
-rw-r--r--aconfigure.ac1
-rw-r--r--pjmedia/build/Makefile3
-rw-r--r--pjmedia/build/os-auto.mak.in8
-rw-r--r--pjmedia/include/pjmedia-videodev/config.h2
5 files changed, 12 insertions, 3 deletions
diff --git a/aconfigure b/aconfigure
index 0c01a785..c8c2e559 100755
--- a/aconfigure
+++ b/aconfigure
@@ -6197,6 +6197,7 @@ $as_echo "Checking if OpenGL ES 2 is available... yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGL ES 2 is available... no" >&5
$as_echo "Checking if OpenGL ES 2 is available... no" >&6; }
fi
+ ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1"
;;
arm-apple-darwin*)
ac_pjmedia_video=iphone_os
diff --git a/aconfigure.ac b/aconfigure.ac
index fd23234d..146ac49a 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -722,6 +722,7 @@ else
else
AC_MSG_RESULT([Checking if OpenGL ES 2 is available... no])
fi
+ ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1"
;;
arm-apple-darwin*)
ac_pjmedia_video=iphone_os
diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile
index d7b83552..54395c38 100644
--- a/pjmedia/build/Makefile
+++ b/pjmedia/build/Makefile
@@ -106,8 +106,7 @@ export PJMEDIA_AUDIODEV_LDFLAGS += $(PJLIB_LDLIB) \
#
export PJMEDIA_VIDEODEV_SRCDIR = ../src/pjmedia-videodev
export PJMEDIA_VIDEODEV_OBJS += errno.o videodev.o avi_dev.o ffmpeg_dev.o \
- colorbar_dev.o v4l2_dev.o opengl_dev.o \
- android_opengl.o android_dev.o
+ colorbar_dev.o v4l2_dev.o opengl_dev.o
export PJMEDIA_VIDEODEV_CFLAGS += $(_CFLAGS)
export PJMEDIA_VIDEODEV_CXXFLAGS += $(_CXXFLAGS)
export PJMEDIA_VIDEODEV_LDFLAGS += $(PJLIB_LDLIB) \
diff --git a/pjmedia/build/os-auto.mak.in b/pjmedia/build/os-auto.mak.in
index 16efbca6..c4f7d5ae 100644
--- a/pjmedia/build/os-auto.mak.in
+++ b/pjmedia/build/os-auto.mak.in
@@ -4,6 +4,7 @@
# Valid values are:
# - mac_os
# - iphone_os
+# - android_os
AC_PJMEDIA_VIDEO = @ac_pjmedia_video@
# SDL flags
@@ -232,6 +233,13 @@ export PJMEDIA_VIDEODEV_OBJS += ios_dev.o ios_opengl_dev.o
endif
#
+# Android video device
+#
+ifeq ($(AC_PJMEDIA_VIDEO),andriod_os)
+export PJMEDIA_VIDEODEV_OBJS += android_dev.o android_opengl.o
+endif
+
+#
# Determine whether we should compile the obj-c version of a particular source code
#
ifneq (,$(filter $(AC_PJMEDIA_VIDEO),mac_os iphone_os))
diff --git a/pjmedia/include/pjmedia-videodev/config.h b/pjmedia/include/pjmedia-videodev/config.h
index 8b6ddccd..1e097cd7 100644
--- a/pjmedia/include/pjmedia-videodev/config.h
+++ b/pjmedia/include/pjmedia-videodev/config.h
@@ -196,7 +196,7 @@ PJ_BEGIN_DECL
/**
* This setting controls whether Android support should be included.
*
- * Default: 0
+ * Default: 0 (or detected by configure)
*/
#ifndef PJMEDIA_VIDEO_DEV_HAS_ANDROID
# define PJMEDIA_VIDEO_DEV_HAS_ANDROID 0