blob: 3c1e6adc3555ffd1c1d78d03c60bbdc930fa0c84 [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 Hu30a3d3b2018-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 Hu33fb67b2018-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
Shiju Mathew720a4c92019-02-06 16:43:23 -0500104AC_ARG_ENABLE([target-hypervisor],
105 AC_HELP_STRING([--enable-target-hypervisor],
106 [Enable conditional compile for target hypervisor [default=no]]),
107 [target_hypervisor="${enableval}"],
108 target_hypervisor=no)
109
110AM_CONDITIONAL(TARGET_HYPERVISOR, test "x$target_hypervisor" = "xyes")
111
Srinu Gorle04d5e402016-09-27 16:07:56 +0530112AC_ARG_WITH([sanitized-headers],
113 [AS_HELP_STRING([--with-sanitized-headers=DIR],[location of the sanitized Linux kernel headers])],
114 [CPPFLAGS="$CPPFLAGS -I $withval"])
115
116AC_ARG_WITH([glib-headers],
117 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
118 [CPPFLAGS="$CPPFLAGS -I$withval"])
119
120AC_ARG_WITH([utils-headers],
121 [AS_HELP_STRING([--with-utils-inc=DIR],[location of common headers])],
122 [CPPFLAGS="$CPPFLAGS -I$withval"])
123
124AC_ARG_WITH([cutils-headers],
125 [AS_HELP_STRING([--with-cutils-inc=DIR],[location of common headers])],
126 [CPPFLAGS="$CPPFLAGS -I$withval"])
127
128AC_ARG_WITH([kernel-headers],
129 [AS_HELP_STRING([--with-kernel-inc=DIR],[location of common headers])],
130 [CPPFLAGS="$CPPFLAGS -I$withval"])
131
132AC_ARG_WITH([kernel-uapi-headers],
133 [AS_HELP_STRING([--with-kernel-uapi-inc=DIR],[location of common headers])],
134 [CPPFLAGS="$CPPFLAGS -I$withval"])
135
136AC_ARG_WITH([adreno-headers],
137 [AS_HELP_STRING([--with-adreno-inc=DIR],[location of common headers])],
138 [CPPFLAGS="$CPPFLAGS -I$withval"])
139
140AC_ARG_WITH([libgpustats-headers],
141 [AS_HELP_STRING([--with-libgpustats-headers=DIR],[location of common headers])],
142 [CPPFLAGS="$CPPFLAGS -I$withval"])
143
144AC_ARG_WITH([ui-headers],
145 [AS_HELP_STRING([--with-ui-inc=DIR],[location of common headers])],
146 [CPPFLAGS="$CPPFLAGS -I$withval"])
147
148AC_ARG_WITH([android-headers],
149 [AS_HELP_STRING([--with-gralloc-inc=DIR],[location of common headers])],
150 [CPPFLAGS="$CPPFLAGS -I$withval"])
151
152AC_ARG_WITH([gralloc-headers],
153 [AS_HELP_STRING([--with-strcpyincludes-inc=DIR],[location of common headers])],
154 [CPPFLAGS="$CPPFLAGS -I$withval"])
155
156AC_ARG_WITH([binder-headers],
157 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
158 [CPPFLAGS="$CPPFLAGS -I$withval"])
159
160AC_ARG_WITH([display-headers],
161 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
162 [CPPFLAGS="$CPPFLAGS -I$withval"])
163
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +0530164AC_ARG_WITH([qdutils-headers],
165 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
166 [CPPFLAGS="$CPPFLAGS -I$withval"])
167
Srinu Gorle04d5e402016-09-27 16:07:56 +0530168AC_ARG_WITH([glib-lib-dir],
169 [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
170 [CPPFLAGS="$CPPFLAGS -I$withval"])
171
172AM_CONDITIONAL(TARGET_MSM8953, [test "x$target_msm8953" = "xyes"])
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +0530173AM_CONDITIONAL(TARGET_MSM8909, [test "x$target_msm8909" = "xyes"])
Srinu Gorle667b16f2016-10-28 15:06:21 +0530174AM_CONDITIONAL(TARGET_MSM8996, [test "x$target_msm8996" = "xyes"])
Srinu Gorle04d5e402016-09-27 16:07:56 +0530175AM_CONDITIONAL(TARGET_MSM8610, [test "x$target_msm8610" = "xyes"])
176AM_CONDITIONAL(TARGET_MSM8226, [test "x$target_msm8226" = "xyes"])
177AM_CONDITIONAL(TARGETS_THAT_SUPPORT_UBWC, [test "x$targets_that_support_ubwc" = "xyes"])
178AM_CONDITIONAL(TARGETS_THAT_SUPPORT_PQ, [test "x$targets_that_support_pq" = "xyes"])
179AM_CONDITIONAL(TARGET_USES_ION, [test "x$target_uses_ion" = "xyes"])
Laisheng Hu30a3d3b2018-10-11 13:22:12 +0800180AM_CONDITIONAL(TARGET_USES_GBM, [test "x$target_uses_gbm" = "xyes"])
Srinu Gorle04d5e402016-09-27 16:07:56 +0530181AM_CONDITIONAL(TARGETS_THAT_USE_FLAG_MSM8226, [test "x$targets_that_use_flag_msm8226" = "xyes"])
182AM_CONDITIONAL(TARGET_USES_MEDIA_EXTENSIONS, [test "x$target_uses_media_extensions" = "xyes"])
183AM_CONDITIONAL(MASTER_SIDE_CP_TARGET_LIST, [test "x$master_side_cp_target_list" = "xyes"])
184AM_CONDITIONAL(USE_GLIB, [test "x$use_glib" = "xyes"])
Arun Kumar Dasarif7ad0db2016-05-26 11:05:29 +0530185AM_CONDITIONAL(BUILD_MM_VIDEO, [test "x$build_mm_video" = "xyes"])
Srinu Gorle04d5e402016-09-27 16:07:56 +0530186
187AC_ARG_WITH([glib],
188 AC_HELP_STRING([--with-glib],
189 [enable glib, building HLOS systems which use glib]))
190
191if (test "x${with_glib}" = "xyes"); then
192 GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
193 GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
194
195 AC_SUBST(GLIB_CFLAGS)
196 AC_SUBST(GLIB_LIBS)
197fi
198
199AC_SUBST([CPPFLAGS])
200AC_SUBST([CFLAGS])
201
202AC_CONFIG_FILES([ \
203 Makefile \
Laisheng Hu33fb67b2018-08-27 16:32:06 +0800204 mm-core/Makefile \
205 libc2dcolorconvert/Makefile \
206 libarbitrarybytes/Makefile \
207 libplatformconfig/Makefile \
Srinu Gorle04d5e402016-09-27 16:07:56 +0530208 mm-video-v4l2/Makefile \
209 mm-video-v4l2/vidc/Makefile \
210 mm-video-v4l2/vidc/venc/Makefile \
Srinu Gorle332383f2016-11-18 19:06:56 +0530211 mm-video-v4l2/vidc/vdec/Makefile \
Srinu Gorle04d5e402016-09-27 16:07:56 +0530212 ])
213AC_OUTPUT
Shiju Mathew720a4c92019-02-06 16:43:23 -0500214
215AM_COND_IF( [TARGET_HYPERVISOR], [
216AC_CONFIG_FILES([ \
217 hypv-intercept/Makefile \
218 ])])
219AC_OUTPUT