Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 1 | # -*- Autoconf -*- |
| 2 | # configure.ac -- Autoconf script for halinterface |
| 3 | # |
| 4 | |
| 5 | # Process this file with autoconf to produce a configure script. |
| 6 | |
| 7 | # Requires autoconf tool later than 2.61 |
| 8 | AC_PREREQ([2.69]) |
| 9 | # Initialize the hal-interface package version 1.0.0 |
| 10 | AC_INIT(halinterface,1.0.0) |
| 11 | # Does not strictly follow GNU Coding standards |
| 12 | AM_INIT_AUTOMAKE([foreign]) |
| 13 | # Disables auto rebuilding of configure, Makefile.ins |
| 14 | #AM_MAINTAINER_MODE |
| 15 | # defines some macros variable to be included by source |
| 16 | AC_CONFIG_HEADERS([config.h]) |
| 17 | # defines some macros variable to be included by source |
| 18 | AC_CONFIG_MACRO_DIR([m4]) |
| 19 | |
| 20 | # Checks for programs. |
| 21 | AC_PROG_CC |
| 22 | AM_PROG_CC_C_O |
| 23 | AC_PROG_CXX |
| 24 | AC_PROG_LIBTOOL |
| 25 | AC_PROG_AWK |
| 26 | AC_PROG_CPP |
| 27 | AC_PROG_INSTALL |
| 28 | AC_PROG_LN_S |
| 29 | AC_PROG_MAKE_SET |
| 30 | PKG_PROG_PKG_CONFIG |
| 31 | |
| 32 | PKG_CHECK_MODULES([AUDIOROUTE], [audio_route]) |
| 33 | AC_SUBST([AUDIOROUTE_CFLAGS]) |
| 34 | |
| 35 | AC_ARG_WITH(sanitized-headers, |
| 36 | AS_HELP_STRING([--with-sanitized-headers=DIR], |
| 37 | [Specify the location of the sanitized Linux headers]), |
Deepak Agarwal | 1a30478 | 2017-01-25 19:42:04 +0530 | [diff] [blame] | 38 | [CPPFLAGS="$CPPFLAGS -I $withval"]) |
Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 39 | |
| 40 | |
| 41 | AC_ARG_WITH([glib], |
| 42 | AC_HELP_STRING([--with-glib], |
| 43 | [enable glib, Build against glib. Use this when building for HLOS systems which use glib])) |
| 44 | |
| 45 | if (test "x${with_glib}" = "xyes"); then |
| 46 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, |
| 47 | AC_MSG_ERROR(GThread >= 2.16 is required)) |
| 48 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, |
| 49 | AC_MSG_ERROR(GLib >= 2.16 is required)) |
| 50 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" |
| 51 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" |
| 52 | |
| 53 | AC_SUBST(GLIB_CFLAGS) |
| 54 | AC_SUBST(GLIB_LIBS) |
| 55 | fi |
| 56 | |
| 57 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") |
| 58 | |
Sachin Mohan Gadag | 3d3e78f | 2016-11-30 10:30:36 +0530 | [diff] [blame] | 59 | AC_SUBST([TARGET_PLATFORM], ["msm8916"]) |
| 60 | if (test x$TARGET_SUPPORT = xapq8009); then |
| 61 | AC_SUBST([TARGET_PLATFORM], ["msm8916"]) |
| 62 | TARGET_CFLAGS="-DPLATFORM_MSM8909" |
| 63 | fi |
| 64 | if (test x$TARGET_SUPPORT = xapq8053); then |
| 65 | AC_SUBST([TARGET_PLATFORM], ["msm8916"]) |
| 66 | TARGET_CFLAGS="-DPLATFORM_MSM8916" |
| 67 | fi |
| 68 | if (test x$TARGET_SUPPORT = xapq8096); then |
| 69 | AC_SUBST([TARGET_PLATFORM], ["msm8974"]) |
| 70 | TARGET_CFLAGS="-DPLATFORM_MSM8996" |
| 71 | fi |
| 72 | if (test x$TARGET_SUPPORT = xapq8098); then |
| 73 | AC_SUBST([TARGET_PLATFORM], ["msm8974"]) |
| 74 | TARGET_CFLAGS="-DPLATFORM_MSM8998" |
| 75 | fi |
Josh Kirsch | f6932f7 | 2017-12-12 11:31:01 -0800 | [diff] [blame] | 76 | if (test x$TARGET_SUPPORT = xsdxpoorwills); then |
| 77 | AC_SUBST([TARGET_PLATFORM], ["msm8974"]) |
| 78 | TARGET_CFLAGS="-DPLATFORM_SDX24" |
| 79 | fi |
Honghao Liu | 227c8cc | 2017-08-30 16:18:27 -0400 | [diff] [blame] | 80 | if (test x$TARGET_SUPPORT = x8x96autogvmquintcu); then |
| 81 | AC_SUBST([TARGET_PLATFORM], ["msm8974"]) |
| 82 | TARGET_CFLAGS="-DPLATFORM_MSM8996" |
| 83 | fi |
Sachin Mohan Gadag | bbf5a08 | 2018-05-29 21:29:06 +0530 | [diff] [blame] | 84 | if (test x$TARGET_SUPPORT = xqcs605); then |
| 85 | AC_SUBST([TARGET_PLATFORM], ["msm8974"]) |
| 86 | TARGET_CFLAGS=" -DPLATFORM_QCS605" |
| 87 | fi |
Dhananjay Kumar | 75c9a0c | 2018-06-07 15:59:00 +0530 | [diff] [blame] | 88 | if (test x$TARGET_SUPPORT = xqcs40x); then |
| 89 | AC_SUBST([TARGET_PLATFORM], ["msm8974"]) |
| 90 | TARGET_CFLAGS=" -DPLATFORM_QCS405" |
| 91 | fi |
Md Mansoor Ahmed | 10c9b91 | 2018-11-15 19:52:03 +0530 | [diff] [blame] | 92 | if (test x$TARGET_SUPPORT = xsdmsteppe); then |
| 93 | AC_SUBST([TARGET_PLATFORM], ["msm8974"]) |
| 94 | TARGET_CFLAGS="-DPLATFORM_MSMSTEPPE" |
| 95 | fi |
Sachin Mohan Gadag | 3d3e78f | 2016-11-30 10:30:36 +0530 | [diff] [blame] | 96 | AC_SUBST([TARGET_CFLAGS]) |
Sachin Mohan Gadag | a3da380 | 2016-11-03 16:32:05 +0530 | [diff] [blame] | 97 | |
Sidipotu Ashok | 404f26d | 2017-10-10 22:27:51 +0530 | [diff] [blame] | 98 | AM_CONDITIONAL([QTI_AUDIO_SERVER_ENABLED],[test x$BOARD_SUPPORTS_QTI_AUDIO_SERVER = xtrue]) |
Sachin Mohan Gadag | 3d3e78f | 2016-11-30 10:30:36 +0530 | [diff] [blame] | 99 | AM_CONDITIONAL([QAHW_SUPPORT], [test x$BOARD_SUPPORTS_QAHW = xtrue]) |
Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 100 | AM_CONDITIONAL([HDMI_EDID], [test x$AUDIO_FEATURE_ENABLED_HDMI_EDID = xtrue]) |
| 101 | AM_CONDITIONAL([FM_POWER_OPT], [test x$AUDIO_FEATURE_ENABLED_FM_POWER_OPT = xtrue]) |
| 102 | AM_CONDITIONAL([USBAUDIO], [test x$AUDIO_FEATURE_ENABLED_USBAUDIO = xtrue]) |
| 103 | AM_CONDITIONAL([HFP], [test x$AUDIO_FEATURE_ENABLED_HFP = xtrue]) |
| 104 | AM_CONDITIONAL([SSR], [test x$AUDIO_FEATURE_ENABLED_SSR = xtrue]) |
| 105 | AM_CONDITIONAL([MULTI_VOICE_SESSIONS], [test x$AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS = xtrue]) |
| 106 | AM_CONDITIONAL([COMPRESS_VOIP], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_VOIP = xtrue]) |
| 107 | AM_CONDITIONAL([SPKR_PROTECTION], [test x$AUDIO_FEATURE_ENABLED_SPKR_PROTECTION = xtrue]) |
| 108 | AM_CONDITIONAL([HW_VARIANTS], [test x$MULTIPLE_HW_VARIANTS_ENABLED = xtrue]) |
| 109 | AM_CONDITIONAL([COMPRESS_CAPTURE], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE = xtrue]) |
| 110 | AM_CONDITIONAL([DTS_EAGLE], [test x$AUDIO_FEATURE_ENABLED_DTS_EAGLE = xtrue]) |
| 111 | AM_CONDITIONAL([DOLBY_DDP], [test x$DOLBY_DDP = xtrue]) |
| 112 | AM_CONDITIONAL([DS1_DOLBY_DAP], [test x$DS1_DOLBY_DAP = xtrue]) |
| 113 | AM_CONDITIONAL([DEV_ARBI], [test x$AUDIO_FEATURE_ENABLED_DEV_ARBI = xtrue]) |
| 114 | AM_CONDITIONAL([SOURCE_TRACKING], [test x$AUDIO_FEATURE_ENABLED_SOURCE_TRACKING = xtrue]) |
| 115 | AM_CONDITIONAL([LISTEN], [test x$AUDIO_FEATURE_ENABLED_LISTEN = xtrue]) |
| 116 | AM_CONDITIONAL([SOUND_TRIGGER], [test x$BOARD_SUPPORTS_SOUND_TRIGGER = xtrue]) |
| 117 | AM_CONDITIONAL([PM_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_PM_SUPPORT = xtrue]) |
Yamit Mehta | 0d37ca0 | 2016-11-24 09:12:40 +0530 | [diff] [blame] | 118 | AM_CONDITIONAL([FLAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER = xtrue]) |
| 119 | AM_CONDITIONAL([ALAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_ALAC_DECODER = xtrue]) |
| 120 | AM_CONDITIONAL([VORBIS_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_VORBIS_DECODER = xtrue]) |
| 121 | AM_CONDITIONAL([WMA_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_WMA_DECODER = xtrue]) |
Dhananjay Kumar | ee4d200 | 2016-10-25 18:02:58 +0530 | [diff] [blame] | 122 | AM_CONDITIONAL([COMPRESS_INPUT], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_INPUT = xtrue]) |
| 123 | AM_CONDITIONAL([AUDIO_HW_EXTN_API], [test x$BOARD_SUPPORTS_QAHW = xtrue]) |
Dhanalakshmi Siddani | edaa182 | 2016-12-08 17:37:29 +0530 | [diff] [blame] | 124 | AM_CONDITIONAL([AFE_PROXY], [test x$AUDIO_FEATURE_ENABLED_PROXY_DEVICE = xtrue]) |
Weiyin Jiang | a3719ac | 2016-11-23 19:29:35 +0800 | [diff] [blame] | 125 | AM_CONDITIONAL([HW_ACC_EFFECT], [test x$AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS = xtrue]) |
| 126 | AM_CONDITIONAL([AUDIOSPHERE], [test x$AUDIO_FEATURE_ENABLED_AUDIOSPHERE = xtrue]) |
Satish Babu Patakokila | 915ecba | 2017-01-10 17:43:56 +0530 | [diff] [blame] | 127 | AM_CONDITIONAL([COMPRESS_PASSTHROUGH], [test x$AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH = xtrue]) |
| 128 | AM_CONDITIONAL([KEEP_ALIVE], [test x$AUDIO_FEATURE_ENABLED_KEEP_ALIVE = xtrue]) |
Weiyin Jiang | 82e4094 | 2017-01-10 16:07:34 +0800 | [diff] [blame] | 129 | AM_CONDITIONAL([GEF], [test x$AUDIO_FEATURE_ENABLED_GEF_SUPPORT = xtrue]) |
Dhanalakshmi Siddani | 1873793 | 2016-11-29 17:33:17 +0530 | [diff] [blame] | 130 | AM_CONDITIONAL([APTX_DECODER], [test x$AUDIO_FEATURE_ENABLED_APTX_DECODER = xtrue]) |
Ben Romberger | d771a7c | 2017-02-22 18:05:17 -0800 | [diff] [blame] | 131 | AM_CONDITIONAL([ADSP_HDLR], [test x$AUDIO_FEATURE_ADSP_HDLR_ENABLED = xtrue]) |
Naresh Tanniru | e715603 | 2017-04-18 17:43:05 -0700 | [diff] [blame] | 132 | AM_CONDITIONAL([AUDIO_IP_HDLR], [test x$AUDIO_FEATURE_IP_HDLR_ENABLED = xtrue]) |
Naresh Tanniru | b183432 | 2017-04-13 18:27:03 +0530 | [diff] [blame] | 133 | AM_CONDITIONAL([SPLIT_A2DP], [test x$AUDIO_FEATURE_ENABLED_SPLIT_A2DP = xtrue]) |
Deepak Agarwal | 1a30478 | 2017-01-25 19:42:04 +0530 | [diff] [blame] | 134 | AM_CONDITIONAL([QAF_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_QAF = xtrue]) |
Siddartha Shaik | 31b530e | 2017-05-19 15:26:33 +0530 | [diff] [blame] | 135 | AM_CONDITIONAL([AUDIO_HW_LOOPBACK], [test x$AUDIO_FEATURE_ENABLED_AUDIO_HW_LOOPBACK = xtrue]) |
Manish Dewangan | 798b00a | 2017-06-09 12:33:05 +0530 | [diff] [blame] | 136 | AM_CONDITIONAL([AUDIO_PARSER], [test x$AUDIO_FEATURE_ENABLED_PARSER = xtrue]) |
| 137 | AM_CONDITIONAL([DTSHD_PARSER], [test x$AUDIO_FEATURE_ENABLED_DTSHD_PARSER = xtrue]) |
Nikhil Laturkar | 40e7558 | 2017-07-26 20:19:10 +0530 | [diff] [blame] | 138 | AM_CONDITIONAL([QAP], [test x$AUDIO_FEATURE_ENABLED_QAP = xtrue]) |
Garmond Leung | e2433c3 | 2017-09-28 21:51:22 -0700 | [diff] [blame] | 139 | AM_CONDITIONAL([AUDIO_HW_FFV], [test x$AUDIO_FEATURE_ENABLED_FFV = xtrue]) |
Surendar karka | 82dd9b2 | 2018-01-05 14:52:23 +0530 | [diff] [blame] | 140 | AM_CONDITIONAL([CUSTOM_STEREO], [test x$AUDIO_FEATURE_ENABLED_CUSTOM_STEREO = xtrue]) |
Surendar Karka | 59c5107 | 2017-12-13 11:25:57 +0530 | [diff] [blame] | 141 | AM_CONDITIONAL([RUN_KEEP_ALIVE_IN_ARM_FFV], [test x$AUDIO_FEATURE_ENABLED_KEEP_ALIVE_ARM_FFV = xtrue]) |
Dhananjay Kumar | 6085bd1 | 2018-07-11 22:49:01 +0530 | [diff] [blame] | 142 | AM_CONDITIONAL([INSTANCE_ID], [test x$AUDIO_FEATURE_ENABLED_INSTANCE_ID = xtrue]) |
Manish Dewangan | fb964e9 | 2018-10-31 17:55:35 +0530 | [diff] [blame] | 143 | AM_CONDITIONAL([LL_AS_PRIMARY_OUTPUT], [test x$AUDIO_USE_LL_AS_PRIMARY_OUTPUT = xtrue]) |
Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 144 | |
| 145 | AC_CONFIG_FILES([ \ |
| 146 | Makefile \ |
| 147 | hal/Makefile \ |
Weiyin Jiang | a3719ac | 2016-11-23 19:29:35 +0800 | [diff] [blame] | 148 | post_proc/Makefile \ |
Yamit Mehta | a3cc5d6 | 2016-11-24 09:09:06 +0530 | [diff] [blame] | 149 | qahw_api/Makefile \ |
Varun Balaraj | d0ec32e | 2017-03-27 12:47:39 +0530 | [diff] [blame] | 150 | qahw_api/test/Makefile \ |
| 151 | hdmi_in_test/Makefile |
Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 152 | ]) |
| 153 | |
| 154 | AC_OUTPUT |