Add feature for tizen allocator
[platform/adaptation/ap_samsung/libomxil-e9110-v4l2.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.65])
5 AC_INIT([libomxil-e9110], [0.1])
6 AM_INIT_AUTOMAKE([tar-ustar])
7 #AC_CONFIG_HEADERS([config.h])
8
9 # Set to 'm4' the directory where the extra autoconf macros are stored
10 AC_CONFIG_MACRO_DIR([m4])
11
12 AC_CONFIG_FILES([
13     omxil-e9110-v4l2.pc
14     srp.pc
15     Makefile
16     exynos/Makefile
17     exynos/libvideocodec/Makefile
18     openmax/Makefile
19     openmax/osal/Makefile
20     openmax/core/Makefile
21     openmax/component/Makefile
22     openmax/component/common/Makefile
23     openmax/component/video/Makefile
24     openmax/component/video/dec/Makefile
25     openmax/component/video/dec/h264/Makefile
26     openmax/component/video/dec/hevc/Makefile
27     openmax/component/video/dec/mpeg4/Makefile
28     openmax/component/video/dec/mpeg2/Makefile
29     openmax/component/video/dec/vc1/Makefile
30     openmax/component/video/dec/vp8/Makefile
31     openmax/component/video/enc/Makefile
32     openmax/component/video/enc/h264/Makefile
33     openmax/component/video/enc/hevc/Makefile
34     openmax/component/video/enc/mpeg4/Makefile
35     openmax/component/video/enc/vp8/Makefile
36 ])
37
38 # Checks for programs.
39 AC_PROG_CC
40 AC_PROG_CPP
41 AC_PROG_CXX
42 AM_PROG_CC_C_O
43 AC_PROG_LIBTOOL
44 AC_PROG_AWK
45 AC_PROG_INSTALL
46 AC_PROG_LN_S
47 AC_PROG_MAKE_SET
48 AC_PROG_CXX
49 AM_PROG_AS
50
51 # Check for libtool
52 AM_PROG_LIBTOOL
53
54 # Checks for libraries.
55
56 # Check for pthread
57 AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_ERROR([pthread is required])])
58
59 # Check for libdl
60 AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([libdl is required])])
61
62 # Checks for header files.
63 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h sys/time.h unistd.h])
64
65 # Checks for typedefs, structures, and compiler characteristics.
66 AC_C_INLINE
67 AC_TYPE_SIZE_T
68 AC_TYPE_SSIZE_T
69
70 # Checks for library functions.
71 AC_FUNC_MALLOC
72 AC_FUNC_MMAP
73 AC_FUNC_REALLOC
74 AC_CHECK_FUNCS([gettimeofday memmove memset munmap])
75
76 AC_DEFINE([SLP_PLATFORM])
77 AC_DEFINE([USE_IMMEDIATE_DISPLAY])
78
79
80 PKG_CHECK_MODULES(EXYNOSCOMMON,exynos-common)
81 AC_SUBST(EXYNOSCOMMON_CFLAGS)
82 AC_SUBST(EXYNOSCOMMON_LIBS)
83
84 dnl Tizen allocator(since 5.0)
85 AC_ARG_ENABLE([tizen-allocator], AC_HELP_STRING([--enable-tizen-allocator], [Enable tizen allocator specific code]),
86         [
87          case "${enableval}" in
88           yes) TIZEN_ALLOCATOR=yes ;;
89           no)  TIZEN_ALLOCATOR=no ;;
90           *)   AC_MSG_ERROR(bad value ${enableval} for --enable-tizen-allocator) ;;
91          esac
92         ],
93         [TIZEN_ALLOCATOR=no])
94 if test "x$TIZEN_ALLOCATOR" = "xyes"; then
95         PKG_CHECK_MODULES(TBM, libtbm)
96         AC_SUBST(TBM_CFLAGS)
97         AC_SUBST(TBM_LIBS)
98 fi
99 AM_CONDITIONAL([TIZEN_ALLOCATOR], [test "x$TIZEN_ALLOCATOR" = "xyes"])
100
101
102 dnl use dlog ------------------------------------------------------------------
103 AC_ARG_ENABLE(dlog, AC_HELP_STRING([--enable-dlog], [using dlog]),
104         [
105           case "${enableval}" in
106            yes) USE_DLOG=yes ;;
107            no)  USE_DLOG=no ;;
108            *)   AC_MSG_ERROR(bad value ${enableval} for --enable-dlog) ;;
109           esac
110         ],[USE_DLOG=no])
111
112 if test "x$USE_DLOG" = "xyes"; then
113         PKG_CHECK_MODULES(DLOG, dlog)
114         AC_SUBST(DLOG_CFLAGS)
115         AC_SUBST(DLOG_LIBS)
116 fi
117 AM_CONDITIONAL(USE_DLOG, test "x$USE_DLOG" = "xyes")
118 dnl end -----------------------------------------------------------------------
119
120 AC_ARG_ENABLE([exynos9110], AC_HELP_STRING([--enable-exynos9110], [Enable exynos9110 specific code]),
121         [
122          case "${enableval}" in
123           yes) EXYNOS_9110=yes ;;
124           no)  EXYNOS_9110=no ;;
125           *)   AC_MSG_ERROR(bad value ${enableval} for --enable-exynos9110) ;;
126          esac
127         ],
128         [EXYNOS_9110=no])
129 AM_CONDITIONAL([EXYNOS_9110], [test "x$EXYNOS_9110" = "xyes"])
130
131 AC_ARG_ENABLE(s3dsupport, AC_HELP_STRING([--enable-s3dsupport], [use s3d support]),
132         [
133           case "${enableval}" in
134            yes) BOARD_USE_S3D_SUPPORT=yes ;;
135            no)  BOARD_USE_S3D_SUPPORT=no ;;
136            *)   AC_MSG_ERROR(bad value ${enableval} for --enable-s3dsupport) ;;
137           esac
138         ],
139         [BOARD_USE_S3D_SUPPORT=no])
140 AM_CONDITIONAL([BOARD_USE_S3D_SUPPORT], [test "x$BOARD_USE_S3D_SUPPORT" = "xyes"])
141
142 AC_OUTPUT