1#                                               -*- 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
34AC_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
39AC_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
44AC_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
69AC_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
74AC_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
89AC_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
94AC_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
99AC_ARG_ENABLE([build-mm-video],
100        AC_HELP_STRING([--enable-build-mm-video],
101                [Enable conditional compile for build mm video [default=no]]),
102        [build_mm_video="${enableval}"])
103
104AC_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
156AC_ARG_WITH([qdutils-headers],
157        [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
158        [CPPFLAGS="$CPPFLAGS -I$withval"])
159
160AC_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"])
165AM_CONDITIONAL(TARGET_MSM8909, [test "x$target_msm8909" = "xyes"])
166AM_CONDITIONAL(TARGET_MSM8996, [test "x$target_msm8996" = "xyes"])
167AM_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"])
172AM_CONDITIONAL(TARGET_USES_GBM, [test "x$target_uses_gbm" = "xyes"])
173AM_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"])
177AM_CONDITIONAL(BUILD_MM_VIDEO, [test "x$build_mm_video" = "xyes"])
178
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 \
196        mm-core/Makefile \
197        libc2dcolorconvert/Makefile \
198        libplatformconfig/Makefile \
199        mm-video-v4l2/Makefile \
200        mm-video-v4l2/vidc/Makefile \
201        mm-video-v4l2/vidc/venc/Makefile \
202        mm-video-v4l2/vidc/vdec/Makefile \
203        ])
204AC_OUTPUT
205