From 37e870866404d8065d732d785e3086699d6834fc Mon Sep 17 00:00:00 2001 From: Dan Sagunov Date: Mon, 15 Oct 2012 18:25:40 +0400 Subject: Added androidbuild checking in configure --- configure.ac | 20 ++++++++++++++++++-- 1 file 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]) -- cgit v1.2.3-70-g09d2