blob: ca569e502b523ef1379aac1598af9f5785bc7d1c [file] [log] [blame]
Srinu Gorle04d5e402016-09-27 16:07:56 +05301# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4# Requires autoconf tool later than 2.61
5AC_PREREQ([2.61])
6# Initialize the omxvideo package version 1.0.0
7AC_INIT([omxvideo], 1.0.0)
8# Does not strictly follow GNU Coding standards
9AM_INIT_AUTOMAKE([gnu foreign subdir-objects])
10AM_MAINTAINER_MODE
11# defines some macros variable to be included by source
12AC_CONFIG_HEADER([config.h])
13AC_CONFIG_MACRO_DIR([m4])
14
15# Checks for programs.
16AM_PROG_AR
17AC_PROG_CC
18AC_PROG_CPP
19AC_PROG_CXX
20AM_PROG_CC_C_O
21AC_PROG_LIBTOOL
22AC_PROG_AWK
23AC_PROG_INSTALL
24AC_PROG_LN_S
25AC_PROG_MAKE_SET
26
27PKG_PROG_PKG_CONFIG
28
29AC_ARG_ENABLE([target-msm8953],
30 AC_HELP_STRING([--enable-target-msm8953],
31 [Enable conditional compile for target msm8953 [default=no]]),
32 [target_msm8953="${enableval}"])
33
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +053034AC_ARG_ENABLE([target-msm8909],
35 AC_HELP_STRING([--enable-target-msm8909],
36 [Enable conditional compile for target msm8909 [default=no]]),
37 [target_msm8909="${enableval}"])
38
Srinu Gorle667b16f2016-10-28 15:06:21 +053039AC_ARG_ENABLE([target-msm8996],
40 AC_HELP_STRING([--enable-target-msm8996],
41 [Enable conditional compile for target msm8996 [default=no]]),
42 [target_msm8996="${enableval}"])
43
Srinu Gorle04d5e402016-09-27 16:07:56 +053044AC_ARG_ENABLE([target-msm8610],
45 AC_HELP_STRING([--enable-target-msm8610],
46 [Enable conditional compile for target msm8610 [default=no]]),
47 [target_msm8610="${enableval}"])
48
49AC_ARG_ENABLE([target-msm8226],
50 AC_HELP_STRING([--enable-target-msm8226],
51 [Enable conditional compile for target msm8610 [default=no]]),
52 [target_msm8226="${enableval}"])
53
54AC_ARG_ENABLE([is-ubwc-supported],
55 AC_HELP_STRING([--enable-ubwc-supported],
56 [Enable conditional compile for target msm8953 [default=no]]),
57 [targets_that_support_ubwc="${enableval}"])
58
59AC_ARG_ENABLE([targets-that-support-pq],
60 AC_HELP_STRING([--enable-targets-that-support-pq],
61 [Enable conditional compile for target msm8953 [default=no]]),
62 [targets_that_support_pq="${enableval}"])
63
64AC_ARG_ENABLE([target-uses-ion],
65 AC_HELP_STRING([--enable-target-uses-ion],
66 [Enable conditional compile for target target-uses-ion [default=no]]),
67 [target_uses_ion="${enableval}"])
68
Laisheng Hu5bda27b2018-10-11 13:22:12 +080069AC_ARG_ENABLE([target-uses-gbm],
70 AC_HELP_STRING([--enable-target-uses-gbm],
71 [Enable conditional compile for target target-uses-gbm [default=no]]),
72 [target_uses_gbm="${enableval}"])
73
Srinu Gorle04d5e402016-09-27 16:07:56 +053074AC_ARG_ENABLE([targets-that-use-flag-msm8226],
75 AC_HELP_STRING([--enable-targets-that-use-flag-msm8226],
76 [Enable conditional compile for target targets_that_use_flag_msm8226 [default=no]]),
77 [targets_that_use_flag_msm8226="${enableval}"])
78
79AC_ARG_ENABLE([target-uses-media-extensions],
80 AC_HELP_STRING([--enable-target-uses-media-extensions],
81 [Enable conditional compile for target target_uses_media_extensions [default=no]]),
82 [target_uses_media_extensions="${enableval}"])
83
84AC_ARG_ENABLE([master-side-cp-target-list],
85 AC_HELP_STRING([--enable-master-side-cp-target-list],
86 [Enable conditional compile for target master_side_cp_target_list [default=no]]),
87 [master_side_cp_target_list="${enableval}"])
88
Srinu Gorle332383f2016-11-18 19:06:56 +053089AC_ARG_ENABLE([targets-that-use-hevc-adsp-heap],
90 AC_HELP_STRING([-targets-that-use-hevc-adsp-heap],
91 [Enable conditional compile for target target-uses-ion [default=no]]),
92 [targets_that_use_hevc_adsp_heap="${enableval}"])
93
Srinu Gorle04d5e402016-09-27 16:07:56 +053094AC_ARG_ENABLE([use-glib],
95 AC_HELP_STRING([--enable-use-glib],
96 [Enable conditional compile for use glib [default=no]]),
97 [use_glib="${enableval}"])
98
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +053099AC_ARG_ENABLE([build-mm-video],
Laisheng Hu88daa1d2018-08-27 16:32:06 +0800100 AC_HELP_STRING([--enable-build-mm-video],
101 [Enable conditional compile for build mm video [default=no]]),
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +0530102 [build_mm_video="${enableval}"])
103
Srinu Gorle04d5e402016-09-27 16:07:56 +0530104AC_ARG_WITH([sanitized-headers],
105 [AS_HELP_STRING([--with-sanitized-headers=DIR],[location of the sanitized Linux kernel headers])],
106 [CPPFLAGS="$CPPFLAGS -I $withval"])
107
108AC_ARG_WITH([glib-headers],
109 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
110 [CPPFLAGS="$CPPFLAGS -I$withval"])
111
112AC_ARG_WITH([utils-headers],
113 [AS_HELP_STRING([--with-utils-inc=DIR],[location of common headers])],
114 [CPPFLAGS="$CPPFLAGS -I$withval"])
115
116AC_ARG_WITH([cutils-headers],
117 [AS_HELP_STRING([--with-cutils-inc=DIR],[location of common headers])],
118 [CPPFLAGS="$CPPFLAGS -I$withval"])
119
120AC_ARG_WITH([kernel-headers],
121 [AS_HELP_STRING([--with-kernel-inc=DIR],[location of common headers])],
122 [CPPFLAGS="$CPPFLAGS -I$withval"])
123
124AC_ARG_WITH([kernel-uapi-headers],
125 [AS_HELP_STRING([--with-kernel-uapi-inc=DIR],[location of common headers])],
126 [CPPFLAGS="$CPPFLAGS -I$withval"])
127
128AC_ARG_WITH([adreno-headers],
129 [AS_HELP_STRING([--with-adreno-inc=DIR],[location of common headers])],
130 [CPPFLAGS="$CPPFLAGS -I$withval"])
131
132AC_ARG_WITH([libgpustats-headers],
133 [AS_HELP_STRING([--with-libgpustats-headers=DIR],[location of common headers])],
134 [CPPFLAGS="$CPPFLAGS -I$withval"])
135
136AC_ARG_WITH([ui-headers],
137 [AS_HELP_STRING([--with-ui-inc=DIR],[location of common headers])],
138 [CPPFLAGS="$CPPFLAGS -I$withval"])
139
140AC_ARG_WITH([android-headers],
141 [AS_HELP_STRING([--with-gralloc-inc=DIR],[location of common headers])],
142 [CPPFLAGS="$CPPFLAGS -I$withval"])
143
144AC_ARG_WITH([gralloc-headers],
145 [AS_HELP_STRING([--with-strcpyincludes-inc=DIR],[location of common headers])],
146 [CPPFLAGS="$CPPFLAGS -I$withval"])
147
148AC_ARG_WITH([binder-headers],
149 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
150 [CPPFLAGS="$CPPFLAGS -I$withval"])
151
152AC_ARG_WITH([display-headers],
153 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
154 [CPPFLAGS="$CPPFLAGS -I$withval"])
155
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +0530156AC_ARG_WITH([qdutils-headers],
157 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
158 [CPPFLAGS="$CPPFLAGS -I$withval"])
159
Srinu Gorle04d5e402016-09-27 16:07:56 +0530160AC_ARG_WITH([glib-lib-dir],
161 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
162 [CPPFLAGS="$CPPFLAGS -I$withval"])
163
164AM_CONDITIONAL(TARGET_MSM8953, [test "x$target_msm8953" = "xyes"])
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +0530165AM_CONDITIONAL(TARGET_MSM8909, [test "x$target_msm8909" = "xyes"])
Srinu Gorle667b16f2016-10-28 15:06:21 +0530166AM_CONDITIONAL(TARGET_MSM8996, [test "x$target_msm8996" = "xyes"])
Srinu Gorle04d5e402016-09-27 16:07:56 +0530167AM_CONDITIONAL(TARGET_MSM8610, [test "x$target_msm8610" = "xyes"])
168AM_CONDITIONAL(TARGET_MSM8226, [test "x$target_msm8226" = "xyes"])
169AM_CONDITIONAL(TARGETS_THAT_SUPPORT_UBWC, [test "x$targets_that_support_ubwc" = "xyes"])
170AM_CONDITIONAL(TARGETS_THAT_SUPPORT_PQ, [test "x$targets_that_support_pq" = "xyes"])
171AM_CONDITIONAL(TARGET_USES_ION, [test "x$target_uses_ion" = "xyes"])
Laisheng Hu5bda27b2018-10-11 13:22:12 +0800172AM_CONDITIONAL(TARGET_USES_GBM, [test "x$target_uses_gbm" = "xyes"])
Srinu Gorle04d5e402016-09-27 16:07:56 +0530173AM_CONDITIONAL(TARGETS_THAT_USE_FLAG_MSM8226, [test "x$targets_that_use_flag_msm8226" = "xyes"])
174AM_CONDITIONAL(TARGET_USES_MEDIA_EXTENSIONS, [test "x$target_uses_media_extensions" = "xyes"])
175AM_CONDITIONAL(MASTER_SIDE_CP_TARGET_LIST, [test "x$master_side_cp_target_list" = "xyes"])
176AM_CONDITIONAL(USE_GLIB, [test "x$use_glib" = "xyes"])
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +0530177AM_CONDITIONAL(BUILD_MM_VIDEO, [test "x$build_mm_video" = "xyes"])
Srinu Gorle04d5e402016-09-27 16:07:56 +0530178
179AC_ARG_WITH([glib],
180 AC_HELP_STRING([--with-glib],
181 [enable glib, building HLOS systems which use glib]))
182
183if (test "x${with_glib}" = "xyes"); then
184 GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
185 GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
186
187 AC_SUBST(GLIB_CFLAGS)
188 AC_SUBST(GLIB_LIBS)
189fi
190
191AC_SUBST([CPPFLAGS])
192AC_SUBST([CFLAGS])
193
194AC_CONFIG_FILES([ \
195 Makefile \
Laisheng Hu88daa1d2018-08-27 16:32:06 +0800196 mm-core/Makefile \
197 libc2dcolorconvert/Makefile \
Laisheng Hu88daa1d2018-08-27 16:32:06 +0800198 libplatformconfig/Makefile \
Srinu Gorle04d5e402016-09-27 16:07:56 +0530199 mm-video-v4l2/Makefile \
200 mm-video-v4l2/vidc/Makefile \
201 mm-video-v4l2/vidc/venc/Makefile \
Srinu Gorle332383f2016-11-18 19:06:56 +0530202 mm-video-v4l2/vidc/vdec/Makefile \
Srinu Gorle04d5e402016-09-27 16:07:56 +0530203 ])
204AC_OUTPUT