blob: 572e07da59e20b5873c3a9caf4077c2cbc05e976 [file] [log] [blame]
Yamit Mehtaa0d653a2016-11-25 20:33:25 +05301# -*- 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
8AC_PREREQ([2.69])
9# Initialize the hal-interface package version 1.0.0
10AC_INIT(halinterface,1.0.0)
11# Does not strictly follow GNU Coding standards
12AM_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
16AC_CONFIG_HEADERS([config.h])
17# defines some macros variable to be included by source
18AC_CONFIG_MACRO_DIR([m4])
19
20# Checks for programs.
21AC_PROG_CC
22AM_PROG_CC_C_O
23AC_PROG_CXX
24AC_PROG_LIBTOOL
25AC_PROG_AWK
26AC_PROG_CPP
27AC_PROG_INSTALL
28AC_PROG_LN_S
29AC_PROG_MAKE_SET
30PKG_PROG_PKG_CONFIG
31
32PKG_CHECK_MODULES([AUDIOROUTE], [audio_route])
33AC_SUBST([AUDIOROUTE_CFLAGS])
34
35AC_ARG_WITH(sanitized-headers,
36 AS_HELP_STRING([--with-sanitized-headers=DIR],
37 [Specify the location of the sanitized Linux headers]),
Deepak Agarwal1a304782017-01-25 19:42:04 +053038 [CPPFLAGS="$CPPFLAGS -I $withval"])
Yamit Mehtaa0d653a2016-11-25 20:33:25 +053039
40
41AC_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
45if (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)
55fi
56
57AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
58
Sachin Mohan Gadag3d3e78f2016-11-30 10:30:36 +053059AC_SUBST([TARGET_PLATFORM], ["msm8916"])
60if (test x$TARGET_SUPPORT = xapq8009); then
61 AC_SUBST([TARGET_PLATFORM], ["msm8916"])
62 TARGET_CFLAGS="-DPLATFORM_MSM8909"
63fi
64if (test x$TARGET_SUPPORT = xapq8053); then
65 AC_SUBST([TARGET_PLATFORM], ["msm8916"])
66 TARGET_CFLAGS="-DPLATFORM_MSM8916"
67fi
68if (test x$TARGET_SUPPORT = xapq8096); then
69 AC_SUBST([TARGET_PLATFORM], ["msm8974"])
70 TARGET_CFLAGS="-DPLATFORM_MSM8996"
71fi
72if (test x$TARGET_SUPPORT = xapq8098); then
73 AC_SUBST([TARGET_PLATFORM], ["msm8974"])
74 TARGET_CFLAGS="-DPLATFORM_MSM8998"
75fi
Josh Kirschf6932f72017-12-12 11:31:01 -080076if (test x$TARGET_SUPPORT = xsdxpoorwills); then
77 AC_SUBST([TARGET_PLATFORM], ["msm8974"])
78 TARGET_CFLAGS="-DPLATFORM_SDX24"
79fi
Honghao Liu227c8cc2017-08-30 16:18:27 -040080if (test x$TARGET_SUPPORT = x8x96autogvmquintcu); then
81 AC_SUBST([TARGET_PLATFORM], ["msm8974"])
82 TARGET_CFLAGS="-DPLATFORM_MSM8996"
83fi
Sachin Mohan Gadagbbf5a082018-05-29 21:29:06 +053084if (test x$TARGET_SUPPORT = xqcs605); then
85 AC_SUBST([TARGET_PLATFORM], ["msm8974"])
86 TARGET_CFLAGS=" -DPLATFORM_QCS605"
87fi
Dhananjay Kumar75c9a0c2018-06-07 15:59:00 +053088if (test x$TARGET_SUPPORT = xqcs40x); then
89 AC_SUBST([TARGET_PLATFORM], ["msm8974"])
90 TARGET_CFLAGS=" -DPLATFORM_QCS405"
91fi
Md Mansoor Ahmed10c9b912018-11-15 19:52:03 +053092if (test x$TARGET_SUPPORT = xsdmsteppe); then
93 AC_SUBST([TARGET_PLATFORM], ["msm8974"])
94 TARGET_CFLAGS="-DPLATFORM_MSMSTEPPE"
95fi
Sachin Mohan Gadag3d3e78f2016-11-30 10:30:36 +053096AC_SUBST([TARGET_CFLAGS])
Sachin Mohan Gadaga3da3802016-11-03 16:32:05 +053097
Sidipotu Ashok404f26d2017-10-10 22:27:51 +053098AM_CONDITIONAL([QTI_AUDIO_SERVER_ENABLED],[test x$BOARD_SUPPORTS_QTI_AUDIO_SERVER = xtrue])
Sachin Mohan Gadag3d3e78f2016-11-30 10:30:36 +053099AM_CONDITIONAL([QAHW_SUPPORT], [test x$BOARD_SUPPORTS_QAHW = xtrue])
Yamit Mehtaa0d653a2016-11-25 20:33:25 +0530100AM_CONDITIONAL([HDMI_EDID], [test x$AUDIO_FEATURE_ENABLED_HDMI_EDID = xtrue])
101AM_CONDITIONAL([FM_POWER_OPT], [test x$AUDIO_FEATURE_ENABLED_FM_POWER_OPT = xtrue])
102AM_CONDITIONAL([USBAUDIO], [test x$AUDIO_FEATURE_ENABLED_USBAUDIO = xtrue])
103AM_CONDITIONAL([HFP], [test x$AUDIO_FEATURE_ENABLED_HFP = xtrue])
104AM_CONDITIONAL([SSR], [test x$AUDIO_FEATURE_ENABLED_SSR = xtrue])
105AM_CONDITIONAL([MULTI_VOICE_SESSIONS], [test x$AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS = xtrue])
106AM_CONDITIONAL([COMPRESS_VOIP], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_VOIP = xtrue])
107AM_CONDITIONAL([SPKR_PROTECTION], [test x$AUDIO_FEATURE_ENABLED_SPKR_PROTECTION = xtrue])
108AM_CONDITIONAL([HW_VARIANTS], [test x$MULTIPLE_HW_VARIANTS_ENABLED = xtrue])
109AM_CONDITIONAL([COMPRESS_CAPTURE], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE = xtrue])
110AM_CONDITIONAL([DTS_EAGLE], [test x$AUDIO_FEATURE_ENABLED_DTS_EAGLE = xtrue])
111AM_CONDITIONAL([DOLBY_DDP], [test x$DOLBY_DDP = xtrue])
112AM_CONDITIONAL([DS1_DOLBY_DAP], [test x$DS1_DOLBY_DAP = xtrue])
113AM_CONDITIONAL([DEV_ARBI], [test x$AUDIO_FEATURE_ENABLED_DEV_ARBI = xtrue])
114AM_CONDITIONAL([SOURCE_TRACKING], [test x$AUDIO_FEATURE_ENABLED_SOURCE_TRACKING = xtrue])
115AM_CONDITIONAL([LISTEN], [test x$AUDIO_FEATURE_ENABLED_LISTEN = xtrue])
116AM_CONDITIONAL([SOUND_TRIGGER], [test x$BOARD_SUPPORTS_SOUND_TRIGGER = xtrue])
117AM_CONDITIONAL([PM_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_PM_SUPPORT = xtrue])
Yamit Mehta0d37ca02016-11-24 09:12:40 +0530118AM_CONDITIONAL([FLAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER = xtrue])
119AM_CONDITIONAL([ALAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_ALAC_DECODER = xtrue])
120AM_CONDITIONAL([VORBIS_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_VORBIS_DECODER = xtrue])
121AM_CONDITIONAL([WMA_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_WMA_DECODER = xtrue])
Dhananjay Kumaree4d2002016-10-25 18:02:58 +0530122AM_CONDITIONAL([COMPRESS_INPUT], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_INPUT = xtrue])
123AM_CONDITIONAL([AUDIO_HW_EXTN_API], [test x$BOARD_SUPPORTS_QAHW = xtrue])
Dhanalakshmi Siddaniedaa1822016-12-08 17:37:29 +0530124AM_CONDITIONAL([AFE_PROXY], [test x$AUDIO_FEATURE_ENABLED_PROXY_DEVICE = xtrue])
Weiyin Jianga3719ac2016-11-23 19:29:35 +0800125AM_CONDITIONAL([HW_ACC_EFFECT], [test x$AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS = xtrue])
126AM_CONDITIONAL([AUDIOSPHERE], [test x$AUDIO_FEATURE_ENABLED_AUDIOSPHERE = xtrue])
Satish Babu Patakokila915ecba2017-01-10 17:43:56 +0530127AM_CONDITIONAL([COMPRESS_PASSTHROUGH], [test x$AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH = xtrue])
128AM_CONDITIONAL([KEEP_ALIVE], [test x$AUDIO_FEATURE_ENABLED_KEEP_ALIVE = xtrue])
Weiyin Jiang82e40942017-01-10 16:07:34 +0800129AM_CONDITIONAL([GEF], [test x$AUDIO_FEATURE_ENABLED_GEF_SUPPORT = xtrue])
Dhanalakshmi Siddani18737932016-11-29 17:33:17 +0530130AM_CONDITIONAL([APTX_DECODER], [test x$AUDIO_FEATURE_ENABLED_APTX_DECODER = xtrue])
Ben Rombergerd771a7c2017-02-22 18:05:17 -0800131AM_CONDITIONAL([ADSP_HDLR], [test x$AUDIO_FEATURE_ADSP_HDLR_ENABLED = xtrue])
Naresh Tannirue7156032017-04-18 17:43:05 -0700132AM_CONDITIONAL([AUDIO_IP_HDLR], [test x$AUDIO_FEATURE_IP_HDLR_ENABLED = xtrue])
Naresh Tannirub1834322017-04-13 18:27:03 +0530133AM_CONDITIONAL([SPLIT_A2DP], [test x$AUDIO_FEATURE_ENABLED_SPLIT_A2DP = xtrue])
Deepak Agarwal1a304782017-01-25 19:42:04 +0530134AM_CONDITIONAL([QAF_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_QAF = xtrue])
Siddartha Shaik31b530e2017-05-19 15:26:33 +0530135AM_CONDITIONAL([AUDIO_HW_LOOPBACK], [test x$AUDIO_FEATURE_ENABLED_AUDIO_HW_LOOPBACK = xtrue])
Manish Dewangan798b00a2017-06-09 12:33:05 +0530136AM_CONDITIONAL([AUDIO_PARSER], [test x$AUDIO_FEATURE_ENABLED_PARSER = xtrue])
137AM_CONDITIONAL([DTSHD_PARSER], [test x$AUDIO_FEATURE_ENABLED_DTSHD_PARSER = xtrue])
Nikhil Laturkar40e75582017-07-26 20:19:10 +0530138AM_CONDITIONAL([QAP], [test x$AUDIO_FEATURE_ENABLED_QAP = xtrue])
Garmond Leunge2433c32017-09-28 21:51:22 -0700139AM_CONDITIONAL([AUDIO_HW_FFV], [test x$AUDIO_FEATURE_ENABLED_FFV = xtrue])
Surendar karka82dd9b22018-01-05 14:52:23 +0530140AM_CONDITIONAL([CUSTOM_STEREO], [test x$AUDIO_FEATURE_ENABLED_CUSTOM_STEREO = xtrue])
Surendar Karka59c51072017-12-13 11:25:57 +0530141AM_CONDITIONAL([RUN_KEEP_ALIVE_IN_ARM_FFV], [test x$AUDIO_FEATURE_ENABLED_KEEP_ALIVE_ARM_FFV = xtrue])
Dhananjay Kumar6085bd12018-07-11 22:49:01 +0530142AM_CONDITIONAL([INSTANCE_ID], [test x$AUDIO_FEATURE_ENABLED_INSTANCE_ID = xtrue])
Manish Dewanganfb964e92018-10-31 17:55:35 +0530143AM_CONDITIONAL([LL_AS_PRIMARY_OUTPUT], [test x$AUDIO_USE_LL_AS_PRIMARY_OUTPUT = xtrue])
Yamit Mehtaa0d653a2016-11-25 20:33:25 +0530144
145AC_CONFIG_FILES([ \
146 Makefile \
147 hal/Makefile \
Weiyin Jianga3719ac2016-11-23 19:29:35 +0800148 post_proc/Makefile \
Yamit Mehtaa3cc5d62016-11-24 09:09:06 +0530149 qahw_api/Makefile \
Varun Balarajd0ec32e2017-03-27 12:47:39 +0530150 qahw_api/test/Makefile \
151 hdmi_in_test/Makefile
Yamit Mehtaa0d653a2016-11-25 20:33:25 +0530152 ])
153
154AC_OUTPUT