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([targets-that-use-flag-msm8226],
70        AC_HELP_STRING([--enable-targets-that-use-flag-msm8226],
71                [Enable conditional compile for target targets_that_use_flag_msm8226 [default=no]]),
72        [targets_that_use_flag_msm8226="${enableval}"])
73
74AC_ARG_ENABLE([target-uses-media-extensions],
75        AC_HELP_STRING([--enable-target-uses-media-extensions],
76                [Enable conditional compile for target target_uses_media_extensions [default=no]]),
77        [target_uses_media_extensions="${enableval}"])
78
79AC_ARG_ENABLE([master-side-cp-target-list],
80        AC_HELP_STRING([--enable-master-side-cp-target-list],
81                [Enable conditional compile for target master_side_cp_target_list [default=no]]),
82        [master_side_cp_target_list="${enableval}"])
83
84AC_ARG_ENABLE([targets-that-use-hevc-adsp-heap],
85        AC_HELP_STRING([-targets-that-use-hevc-adsp-heap],
86                [Enable conditional compile for target target-uses-ion [default=no]]),
87        [targets_that_use_hevc_adsp_heap="${enableval}"])
88
89AC_ARG_ENABLE([use-glib],
90        AC_HELP_STRING([--enable-use-glib],
91                [Enable conditional compile for use glib [default=no]]),
92        [use_glib="${enableval}"])
93
94AC_ARG_ENABLE([build-mm-video],
95        AC_HELP_STRING([--enable-use-glib],
96                [Enable conditional compile for use glib [default=no]]),
97        [build_mm_video="${enableval}"])
98
99AC_ARG_WITH([sanitized-headers],
100        [AS_HELP_STRING([--with-sanitized-headers=DIR],[location of the sanitized Linux kernel headers])],
101        [CPPFLAGS="$CPPFLAGS -I $withval"])
102
103AC_ARG_WITH([glib-headers],
104        [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
105        [CPPFLAGS="$CPPFLAGS -I$withval"])
106
107AC_ARG_WITH([utils-headers],
108        [AS_HELP_STRING([--with-utils-inc=DIR],[location of common headers])],
109        [CPPFLAGS="$CPPFLAGS -I$withval"])
110
111AC_ARG_WITH([cutils-headers],
112        [AS_HELP_STRING([--with-cutils-inc=DIR],[location of common headers])],
113        [CPPFLAGS="$CPPFLAGS -I$withval"])
114
115AC_ARG_WITH([kernel-headers],
116        [AS_HELP_STRING([--with-kernel-inc=DIR],[location of common headers])],
117        [CPPFLAGS="$CPPFLAGS -I$withval"])
118
119AC_ARG_WITH([kernel-uapi-headers],
120        [AS_HELP_STRING([--with-kernel-uapi-inc=DIR],[location of common headers])],
121        [CPPFLAGS="$CPPFLAGS -I$withval"])
122
123AC_ARG_WITH([adreno-headers],
124        [AS_HELP_STRING([--with-adreno-inc=DIR],[location of common headers])],
125        [CPPFLAGS="$CPPFLAGS -I$withval"])
126
127AC_ARG_WITH([libgpustats-headers],
128        [AS_HELP_STRING([--with-libgpustats-headers=DIR],[location of common headers])],
129        [CPPFLAGS="$CPPFLAGS -I$withval"])
130
131AC_ARG_WITH([ui-headers],
132        [AS_HELP_STRING([--with-ui-inc=DIR],[location of common headers])],
133        [CPPFLAGS="$CPPFLAGS -I$withval"])
134
135AC_ARG_WITH([android-headers],
136        [AS_HELP_STRING([--with-gralloc-inc=DIR],[location of common headers])],
137        [CPPFLAGS="$CPPFLAGS -I$withval"])
138
139AC_ARG_WITH([gralloc-headers],
140        [AS_HELP_STRING([--with-strcpyincludes-inc=DIR],[location of common headers])],
141        [CPPFLAGS="$CPPFLAGS -I$withval"])
142
143AC_ARG_WITH([binder-headers],
144        [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
145        [CPPFLAGS="$CPPFLAGS -I$withval"])
146
147AC_ARG_WITH([display-headers],
148        [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
149        [CPPFLAGS="$CPPFLAGS -I$withval"])
150
151AC_ARG_WITH([qdutils-headers],
152        [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
153        [CPPFLAGS="$CPPFLAGS -I$withval"])
154
155AC_ARG_WITH([glib-lib-dir],
156        [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])],
157        [CPPFLAGS="$CPPFLAGS -I$withval"])
158
159AM_CONDITIONAL(TARGET_MSM8953, [test "x$target_msm8953" = "xyes"])
160AM_CONDITIONAL(TARGET_MSM8909, [test "x$target_msm8909" = "xyes"])
161AM_CONDITIONAL(TARGET_MSM8996, [test "x$target_msm8996" = "xyes"])
162AM_CONDITIONAL(TARGET_MSM8610, [test "x$target_msm8610" = "xyes"])
163AM_CONDITIONAL(TARGET_MSM8226, [test "x$target_msm8226" = "xyes"])
164AM_CONDITIONAL(TARGETS_THAT_SUPPORT_UBWC, [test "x$targets_that_support_ubwc" = "xyes"])
165AM_CONDITIONAL(TARGETS_THAT_SUPPORT_PQ, [test "x$targets_that_support_pq" = "xyes"])
166AM_CONDITIONAL(TARGET_USES_ION, [test "x$target_uses_ion" = "xyes"])
167AM_CONDITIONAL(TARGETS_THAT_USE_FLAG_MSM8226, [test "x$targets_that_use_flag_msm8226" = "xyes"])
168AM_CONDITIONAL(TARGET_USES_MEDIA_EXTENSIONS, [test "x$target_uses_media_extensions" = "xyes"])
169AM_CONDITIONAL(MASTER_SIDE_CP_TARGET_LIST, [test "x$master_side_cp_target_list" = "xyes"])
170AM_CONDITIONAL(USE_GLIB, [test "x$use_glib" = "xyes"])
171AM_CONDITIONAL(BUILD_MM_VIDEO, [test "x$build_mm_video" = "xyes"])
172
173AC_ARG_WITH([glib],
174      AC_HELP_STRING([--with-glib],
175         [enable glib, building HLOS systems which use glib]))
176
177if (test "x${with_glib}" = "xyes"); then
178        GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
179        GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
180
181        AC_SUBST(GLIB_CFLAGS)
182        AC_SUBST(GLIB_LIBS)
183fi
184
185AC_SUBST([CPPFLAGS])
186AC_SUBST([CFLAGS])
187
188AC_CONFIG_FILES([ \
189        Makefile \
190        mm-core/Makefile
191        mm-video-v4l2/Makefile \
192        mm-video-v4l2/vidc/Makefile \
193        mm-video-v4l2/vidc/venc/Makefile \
194        mm-video-v4l2/vidc/vdec/Makefile \
195        ])
196AC_OUTPUT
197