Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 1 | # -*- Autoconf -*- |
| 2 | # Process this file with autoconf to produce a configure script. |
| 3 | |
| 4 | # Requires autoconf tool later than 2.61 |
| 5 | AC_PREREQ([2.61]) |
| 6 | # Initialize the omxvideo package version 1.0.0 |
| 7 | AC_INIT([omxvideo], 1.0.0) |
| 8 | # Does not strictly follow GNU Coding standards |
| 9 | AM_INIT_AUTOMAKE([gnu foreign subdir-objects]) |
| 10 | AM_MAINTAINER_MODE |
| 11 | # defines some macros variable to be included by source |
| 12 | AC_CONFIG_HEADER([config.h]) |
| 13 | AC_CONFIG_MACRO_DIR([m4]) |
| 14 | |
| 15 | # Checks for programs. |
| 16 | AM_PROG_AR |
| 17 | AC_PROG_CC |
| 18 | AC_PROG_CPP |
| 19 | AC_PROG_CXX |
| 20 | AM_PROG_CC_C_O |
| 21 | AC_PROG_LIBTOOL |
| 22 | AC_PROG_AWK |
| 23 | AC_PROG_INSTALL |
| 24 | AC_PROG_LN_S |
| 25 | AC_PROG_MAKE_SET |
| 26 | |
| 27 | PKG_PROG_PKG_CONFIG |
| 28 | |
| 29 | AC_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 Dasari | f7ad0db | 2016-05-26 11:05:29 +0530 | [diff] [blame] | 34 | AC_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 Gorle | 667b16f | 2016-10-28 15:06:21 +0530 | [diff] [blame] | 39 | AC_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 Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 44 | AC_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 | |
| 49 | AC_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 | |
| 54 | AC_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 | |
| 59 | AC_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 | |
| 64 | AC_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 Hu | 5bda27b | 2018-10-11 13:22:12 +0800 | [diff] [blame] | 69 | AC_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 Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 74 | AC_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 | |
| 79 | AC_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 | |
| 84 | AC_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 Gorle | 332383f | 2016-11-18 19:06:56 +0530 | [diff] [blame] | 89 | AC_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 Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 94 | AC_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 Dasari | f7ad0db | 2016-05-26 11:05:29 +0530 | [diff] [blame] | 99 | AC_ARG_ENABLE([build-mm-video], |
Laisheng Hu | 88daa1d | 2018-08-27 16:32:06 +0800 | [diff] [blame] | 100 | AC_HELP_STRING([--enable-build-mm-video], |
| 101 | [Enable conditional compile for build mm video [default=no]]), |
Arun Kumar Dasari | f7ad0db | 2016-05-26 11:05:29 +0530 | [diff] [blame] | 102 | [build_mm_video="${enableval}"]) |
| 103 | |
Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 104 | AC_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 | |
| 108 | AC_ARG_WITH([glib-headers], |
| 109 | [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])], |
| 110 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 111 | |
| 112 | AC_ARG_WITH([utils-headers], |
| 113 | [AS_HELP_STRING([--with-utils-inc=DIR],[location of common headers])], |
| 114 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 115 | |
| 116 | AC_ARG_WITH([cutils-headers], |
| 117 | [AS_HELP_STRING([--with-cutils-inc=DIR],[location of common headers])], |
| 118 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 119 | |
| 120 | AC_ARG_WITH([kernel-headers], |
| 121 | [AS_HELP_STRING([--with-kernel-inc=DIR],[location of common headers])], |
| 122 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 123 | |
| 124 | AC_ARG_WITH([kernel-uapi-headers], |
| 125 | [AS_HELP_STRING([--with-kernel-uapi-inc=DIR],[location of common headers])], |
| 126 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 127 | |
| 128 | AC_ARG_WITH([adreno-headers], |
| 129 | [AS_HELP_STRING([--with-adreno-inc=DIR],[location of common headers])], |
| 130 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 131 | |
| 132 | AC_ARG_WITH([libgpustats-headers], |
| 133 | [AS_HELP_STRING([--with-libgpustats-headers=DIR],[location of common headers])], |
| 134 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 135 | |
| 136 | AC_ARG_WITH([ui-headers], |
| 137 | [AS_HELP_STRING([--with-ui-inc=DIR],[location of common headers])], |
| 138 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 139 | |
| 140 | AC_ARG_WITH([android-headers], |
| 141 | [AS_HELP_STRING([--with-gralloc-inc=DIR],[location of common headers])], |
| 142 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 143 | |
| 144 | AC_ARG_WITH([gralloc-headers], |
| 145 | [AS_HELP_STRING([--with-strcpyincludes-inc=DIR],[location of common headers])], |
| 146 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 147 | |
| 148 | AC_ARG_WITH([binder-headers], |
| 149 | [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])], |
| 150 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 151 | |
| 152 | AC_ARG_WITH([display-headers], |
| 153 | [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])], |
| 154 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 155 | |
Arun Kumar Dasari | f7ad0db | 2016-05-26 11:05:29 +0530 | [diff] [blame] | 156 | AC_ARG_WITH([qdutils-headers], |
| 157 | [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])], |
| 158 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 159 | |
Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 160 | AC_ARG_WITH([glib-lib-dir], |
| 161 | [AS_HELP_STRING([--with-binder-inc=DIR],[location of common headers])], |
| 162 | [CPPFLAGS="$CPPFLAGS -I$withval"]) |
| 163 | |
| 164 | AM_CONDITIONAL(TARGET_MSM8953, [test "x$target_msm8953" = "xyes"]) |
Arun Kumar Dasari | f7ad0db | 2016-05-26 11:05:29 +0530 | [diff] [blame] | 165 | AM_CONDITIONAL(TARGET_MSM8909, [test "x$target_msm8909" = "xyes"]) |
Srinu Gorle | 667b16f | 2016-10-28 15:06:21 +0530 | [diff] [blame] | 166 | AM_CONDITIONAL(TARGET_MSM8996, [test "x$target_msm8996" = "xyes"]) |
Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 167 | AM_CONDITIONAL(TARGET_MSM8610, [test "x$target_msm8610" = "xyes"]) |
| 168 | AM_CONDITIONAL(TARGET_MSM8226, [test "x$target_msm8226" = "xyes"]) |
| 169 | AM_CONDITIONAL(TARGETS_THAT_SUPPORT_UBWC, [test "x$targets_that_support_ubwc" = "xyes"]) |
| 170 | AM_CONDITIONAL(TARGETS_THAT_SUPPORT_PQ, [test "x$targets_that_support_pq" = "xyes"]) |
| 171 | AM_CONDITIONAL(TARGET_USES_ION, [test "x$target_uses_ion" = "xyes"]) |
Laisheng Hu | 5bda27b | 2018-10-11 13:22:12 +0800 | [diff] [blame] | 172 | AM_CONDITIONAL(TARGET_USES_GBM, [test "x$target_uses_gbm" = "xyes"]) |
Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 173 | AM_CONDITIONAL(TARGETS_THAT_USE_FLAG_MSM8226, [test "x$targets_that_use_flag_msm8226" = "xyes"]) |
| 174 | AM_CONDITIONAL(TARGET_USES_MEDIA_EXTENSIONS, [test "x$target_uses_media_extensions" = "xyes"]) |
| 175 | AM_CONDITIONAL(MASTER_SIDE_CP_TARGET_LIST, [test "x$master_side_cp_target_list" = "xyes"]) |
| 176 | AM_CONDITIONAL(USE_GLIB, [test "x$use_glib" = "xyes"]) |
Arun Kumar Dasari | f7ad0db | 2016-05-26 11:05:29 +0530 | [diff] [blame] | 177 | AM_CONDITIONAL(BUILD_MM_VIDEO, [test "x$build_mm_video" = "xyes"]) |
Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 178 | |
| 179 | AC_ARG_WITH([glib], |
| 180 | AC_HELP_STRING([--with-glib], |
| 181 | [enable glib, building HLOS systems which use glib])) |
| 182 | |
| 183 | if (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) |
| 189 | fi |
| 190 | |
| 191 | AC_SUBST([CPPFLAGS]) |
| 192 | AC_SUBST([CFLAGS]) |
| 193 | |
| 194 | AC_CONFIG_FILES([ \ |
| 195 | Makefile \ |
Laisheng Hu | 88daa1d | 2018-08-27 16:32:06 +0800 | [diff] [blame] | 196 | mm-core/Makefile \ |
| 197 | libc2dcolorconvert/Makefile \ |
Laisheng Hu | 88daa1d | 2018-08-27 16:32:06 +0800 | [diff] [blame] | 198 | libplatformconfig/Makefile \ |
Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 199 | mm-video-v4l2/Makefile \ |
| 200 | mm-video-v4l2/vidc/Makefile \ |
| 201 | mm-video-v4l2/vidc/venc/Makefile \ |
Srinu Gorle | 332383f | 2016-11-18 19:06:56 +0530 | [diff] [blame] | 202 | mm-video-v4l2/vidc/vdec/Makefile \ |
Srinu Gorle | 04d5e40 | 2016-09-27 16:07:56 +0530 | [diff] [blame] | 203 | ]) |
| 204 | AC_OUTPUT |