summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sagunov <danilka.pro@gmail.com>2012-10-15 18:25:40 +0400
committerAndrei Karas <akaras@inbox.ru>2012-10-15 17:45:56 +0300
commit185a53c504a0d53e54a7425ea829b5c951661ea8 (patch)
tree149fdaa1a38ceede4835fd67e0f30f086327b8fd
parent2b2bcb008b549c35cb18720f86b2d4c3eaf0903a (diff)
downloadplus-185a53c504a0d53e54a7425ea829b5c951661ea8.tar.gz
plus-185a53c504a0d53e54a7425ea829b5c951661ea8.tar.bz2
plus-185a53c504a0d53e54a7425ea829b5c951661ea8.tar.xz
plus-185a53c504a0d53e54a7425ea829b5c951661ea8.zip
Added androidbuild checking in configure
-rwxr-xr-xconfigure.ac20
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 46d88b797..56d28c307 100755
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,18 @@ AM_INIT_AUTOMAKE([1.9])
AC_CONFIG_HEADERS([config.h:config.h.in])
AC_LANG_CPLUSPLUS
+# Checks for android.
+# Enable mac build
+AC_ARG_ENABLE(androidbuild,
+[ --enable-androidbuild Turn on android building],
+[case "${enableval}" in
+ yes) androidbuild_enabled=true
+ ;;
+ no) androidbuild_enabled=false
+ ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-androidbuild) ;;
+esac],[androidbuild_enabled=false])
+
# Checks for programs.
AC_PROG_CXX
AM_PROG_CC_C_O
@@ -14,8 +26,12 @@ AC_HEADER_TIME
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
+
+if test "x$androidbuild_enabled" == "xfalse"; then
+ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+fi
+
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit floor getcwd gethostbyname memset mkdir select socket])