blob: 805d00c8d6387e7e625ede9f267f19cb58a9373d [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
76AC_SUBST([TARGET_CFLAGS])
Sachin Mohan Gadaga3da3802016-11-03 16:32:05 +053077
Sidipotu Ashok404f26d2017-10-10 22:27:51 +053078AM_CONDITIONAL([QTI_AUDIO_SERVER_ENABLED],[test x$BOARD_SUPPORTS_QTI_AUDIO_SERVER = xtrue])
Sachin Mohan Gadag3d3e78f2016-11-30 10:30:36 +053079AM_CONDITIONAL([QAHW_SUPPORT], [test x$BOARD_SUPPORTS_QAHW = xtrue])
Yamit Mehtaa0d653a2016-11-25 20:33:25 +053080AM_CONDITIONAL([HDMI_EDID], [test x$AUDIO_FEATURE_ENABLED_HDMI_EDID = xtrue])
81AM_CONDITIONAL([FM_POWER_OPT], [test x$AUDIO_FEATURE_ENABLED_FM_POWER_OPT = xtrue])
82AM_CONDITIONAL([USBAUDIO], [test x$AUDIO_FEATURE_ENABLED_USBAUDIO = xtrue])
83AM_CONDITIONAL([HFP], [test x$AUDIO_FEATURE_ENABLED_HFP = xtrue])
84AM_CONDITIONAL([SSR], [test x$AUDIO_FEATURE_ENABLED_SSR = xtrue])
85AM_CONDITIONAL([MULTI_VOICE_SESSIONS], [test x$AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS = xtrue])
86AM_CONDITIONAL([COMPRESS_VOIP], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_VOIP = xtrue])
87AM_CONDITIONAL([SPKR_PROTECTION], [test x$AUDIO_FEATURE_ENABLED_SPKR_PROTECTION = xtrue])
88AM_CONDITIONAL([HW_VARIANTS], [test x$MULTIPLE_HW_VARIANTS_ENABLED = xtrue])
89AM_CONDITIONAL([COMPRESS_CAPTURE], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE = xtrue])
90AM_CONDITIONAL([DTS_EAGLE], [test x$AUDIO_FEATURE_ENABLED_DTS_EAGLE = xtrue])
91AM_CONDITIONAL([DOLBY_DDP], [test x$DOLBY_DDP = xtrue])
92AM_CONDITIONAL([DS1_DOLBY_DAP], [test x$DS1_DOLBY_DAP = xtrue])
93AM_CONDITIONAL([DEV_ARBI], [test x$AUDIO_FEATURE_ENABLED_DEV_ARBI = xtrue])
94AM_CONDITIONAL([SOURCE_TRACKING], [test x$AUDIO_FEATURE_ENABLED_SOURCE_TRACKING = xtrue])
95AM_CONDITIONAL([LISTEN], [test x$AUDIO_FEATURE_ENABLED_LISTEN = xtrue])
96AM_CONDITIONAL([SOUND_TRIGGER], [test x$BOARD_SUPPORTS_SOUND_TRIGGER = xtrue])
97AM_CONDITIONAL([PM_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_PM_SUPPORT = xtrue])
Yamit Mehta0d37ca02016-11-24 09:12:40 +053098AM_CONDITIONAL([FLAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER = xtrue])
99AM_CONDITIONAL([ALAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_ALAC_DECODER = xtrue])
100AM_CONDITIONAL([VORBIS_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_VORBIS_DECODER = xtrue])
101AM_CONDITIONAL([WMA_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_WMA_DECODER = xtrue])
Dhananjay Kumaree4d2002016-10-25 18:02:58 +0530102AM_CONDITIONAL([COMPRESS_INPUT], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_INPUT = xtrue])
103AM_CONDITIONAL([AUDIO_HW_EXTN_API], [test x$BOARD_SUPPORTS_QAHW = xtrue])
Dhanalakshmi Siddaniedaa1822016-12-08 17:37:29 +0530104AM_CONDITIONAL([AFE_PROXY], [test x$AUDIO_FEATURE_ENABLED_PROXY_DEVICE = xtrue])
Weiyin Jianga3719ac2016-11-23 19:29:35 +0800105AM_CONDITIONAL([HW_ACC_EFFECT], [test x$AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS = xtrue])
106AM_CONDITIONAL([AUDIOSPHERE], [test x$AUDIO_FEATURE_ENABLED_AUDIOSPHERE = xtrue])
Satish Babu Patakokila915ecba2017-01-10 17:43:56 +0530107AM_CONDITIONAL([COMPRESS_PASSTHROUGH], [test x$AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH = xtrue])
108AM_CONDITIONAL([KEEP_ALIVE], [test x$AUDIO_FEATURE_ENABLED_KEEP_ALIVE = xtrue])
Weiyin Jiang82e40942017-01-10 16:07:34 +0800109AM_CONDITIONAL([GEF], [test x$AUDIO_FEATURE_ENABLED_GEF_SUPPORT = xtrue])
Dhanalakshmi Siddani18737932016-11-29 17:33:17 +0530110AM_CONDITIONAL([APTX_DECODER], [test x$AUDIO_FEATURE_ENABLED_APTX_DECODER = xtrue])
Ben Rombergerd771a7c2017-02-22 18:05:17 -0800111AM_CONDITIONAL([ADSP_HDLR], [test x$AUDIO_FEATURE_ADSP_HDLR_ENABLED = xtrue])
Naresh Tannirue7156032017-04-18 17:43:05 -0700112AM_CONDITIONAL([AUDIO_IP_HDLR], [test x$AUDIO_FEATURE_IP_HDLR_ENABLED = xtrue])
Naresh Tannirub1834322017-04-13 18:27:03 +0530113AM_CONDITIONAL([SPLIT_A2DP], [test x$AUDIO_FEATURE_ENABLED_SPLIT_A2DP = xtrue])
Deepak Agarwal1a304782017-01-25 19:42:04 +0530114AM_CONDITIONAL([QAF_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_QAF = xtrue])
Siddartha Shaik31b530e2017-05-19 15:26:33 +0530115AM_CONDITIONAL([AUDIO_HW_LOOPBACK], [test x$AUDIO_FEATURE_ENABLED_AUDIO_HW_LOOPBACK = xtrue])
Manish Dewangan798b00a2017-06-09 12:33:05 +0530116AM_CONDITIONAL([AUDIO_PARSER], [test x$AUDIO_FEATURE_ENABLED_PARSER = xtrue])
117AM_CONDITIONAL([DTSHD_PARSER], [test x$AUDIO_FEATURE_ENABLED_DTSHD_PARSER = xtrue])
Nikhil Laturkar40e75582017-07-26 20:19:10 +0530118AM_CONDITIONAL([QAP], [test x$AUDIO_FEATURE_ENABLED_QAP = xtrue])
Garmond Leunge2433c32017-09-28 21:51:22 -0700119AM_CONDITIONAL([AUDIO_HW_FFV], [test x$AUDIO_FEATURE_ENABLED_FFV = xtrue])
Yamit Mehtaa0d653a2016-11-25 20:33:25 +0530120
121AC_CONFIG_FILES([ \
122 Makefile \
123 hal/Makefile \
Weiyin Jianga3719ac2016-11-23 19:29:35 +0800124 post_proc/Makefile \
Yamit Mehtaa3cc5d62016-11-24 09:09:06 +0530125 qahw_api/Makefile \
Varun Balarajd0ec32e2017-03-27 12:47:39 +0530126 qahw_api/test/Makefile \
127 hdmi_in_test/Makefile
Yamit Mehtaa0d653a2016-11-25 20:33:25 +0530128 ])
129
130AC_OUTPUT