1 AC_PREREQ(2.61) 2 3 AC_INIT([camera-hal],1.0.0) 4 5 AM_INIT_AUTOMAKE([-Werror -Wall gnu foreign]) 6 7 AM_MAINTAINER_MODE 8 9 AC_CONFIG_HEADER([configure.h]) 10 AC_CONFIG_MACRO_DIR([m4]) 11 12 # Checks for programs. 13 AM_PROG_AS 14 AC_PROG_CC 15 AC_PROG_CXX 16 AM_PROG_CC_C_O 17 AC_PROG_LIBTOOL 18 AC_PROG_AWK 19 AC_PROG_CPP 20 AC_PROG_INSTALL 21 AC_PROG_LN_S 22 AC_PROG_MAKE_SET 23 24 # Checks for typedefs, structures, and compiler characteristics. 25 AC_TYPE_SIZE_T 26 AC_TYPE_SSIZE_T 27 AC_TYPE_UINT16_T 28 AC_TYPE_UINT32_T 29 AC_TYPE_UINT64_T 30 AC_TYPE_UINT8_T 31 32 AC_CHECK_TOOL(OBJCOPY, objcopy, false) 33 34 COMPILE_CAMERA=yes 35 AMSS_VERSION= 36 VFE_VERS= 37 MSM_VERSION= 38 DEBUG_CPPFLAGS= 39 DEBUG_CFLAGS= 40 DEBUG_LDFLAGS= 41 42 AC_ARG_ENABLE([target], 43 [AS_HELP_STRING([--enable-target=TARGET],[target to build for])], 44 [], 45 [enable_target=none] 46 ) 47 48 if test "x$enable_target" = "xmsm7627a"; then 49 MSM_VERSION=7x27A 50 BUILD_UNIFIED_CODE=false 51 BUILD_JPEG=false 52 elif test "x$enable_target" = "xmsm8960"; then 53 MSM_VERSION=8960 54 BUILD_UNIFIED_CODE=false 55 BUILD_JPEG=true 56 else 57 MSM_VERSION= 58 BUILD_UNIFIED_CODE=false 59 BUILD_JPEG=false 60 fi 61 62 AC_ARG_ENABLE([debug], 63 [AS_HELP_STRING([--enable-debug],[Build with debug flags and options])], 64 [DEBUG=$enableval], 65 [DEBUG=no] 66 ) 67 if test "x$DEBUG" = "xyes"; then 68 DEBUG_CPPFLAGS="${DEBUG_CPPFLAGS} -DLOG_DEBUG -DLOG_TAG=\"CameraService\"" 69 DEBUG_CFLAGS="${DEBUG_CFLAGS} -DLOG_DEBUG -DLOG_TAG=\"CameraService\" -g -O0" 70 fi 71 72 AC_SUBST([MSM_VERSION]) 73 AM_CONDITIONAL([MSM7X27A], [test "x$MSM_VERSION" = "x7x27A"]) 74 AM_CONDITIONAL([MSM8960], [test "x$MSM_VERSION" = "x8960"]) 75 AM_CONDITIONAL([BUILD_UNIFIED_CODE], [test "x$BUILD_UNIFIED_CODE" = "xtrue"]) 76 AM_CONDITIONAL([BUILD_JPEG], [test "x$BUILD_JPEG" = "xtrue"]) 77 78 AC_OUTPUT([ \ 79 Makefile 80 ]) 81 82