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]), |
| 38 | [CPPFLAGS="$CPPFLAGS -idirafter $withval"]) |
| 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 |
| 76 | AC_SUBST([TARGET_CFLAGS]) |
Sachin Mohan Gadag | a3da380 | 2016-11-03 16:32:05 +0530 | [diff] [blame] | 77 | |
Sachin Mohan Gadag | 3d3e78f | 2016-11-30 10:30:36 +0530 | [diff] [blame] | 78 | AM_CONDITIONAL([QAHW_SUPPORT], [test x$BOARD_SUPPORTS_QAHW = xtrue]) |
Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 79 | AM_CONDITIONAL([HDMI_EDID], [test x$AUDIO_FEATURE_ENABLED_HDMI_EDID = xtrue]) |
| 80 | AM_CONDITIONAL([FM_POWER_OPT], [test x$AUDIO_FEATURE_ENABLED_FM_POWER_OPT = xtrue]) |
| 81 | AM_CONDITIONAL([USBAUDIO], [test x$AUDIO_FEATURE_ENABLED_USBAUDIO = xtrue]) |
| 82 | AM_CONDITIONAL([HFP], [test x$AUDIO_FEATURE_ENABLED_HFP = xtrue]) |
| 83 | AM_CONDITIONAL([SSR], [test x$AUDIO_FEATURE_ENABLED_SSR = xtrue]) |
| 84 | AM_CONDITIONAL([MULTI_VOICE_SESSIONS], [test x$AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS = xtrue]) |
| 85 | AM_CONDITIONAL([COMPRESS_VOIP], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_VOIP = xtrue]) |
| 86 | AM_CONDITIONAL([SPKR_PROTECTION], [test x$AUDIO_FEATURE_ENABLED_SPKR_PROTECTION = xtrue]) |
| 87 | AM_CONDITIONAL([HW_VARIANTS], [test x$MULTIPLE_HW_VARIANTS_ENABLED = xtrue]) |
| 88 | AM_CONDITIONAL([COMPRESS_CAPTURE], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE = xtrue]) |
| 89 | AM_CONDITIONAL([DTS_EAGLE], [test x$AUDIO_FEATURE_ENABLED_DTS_EAGLE = xtrue]) |
| 90 | AM_CONDITIONAL([DOLBY_DDP], [test x$DOLBY_DDP = xtrue]) |
| 91 | AM_CONDITIONAL([DS1_DOLBY_DAP], [test x$DS1_DOLBY_DAP = xtrue]) |
| 92 | AM_CONDITIONAL([DEV_ARBI], [test x$AUDIO_FEATURE_ENABLED_DEV_ARBI = xtrue]) |
| 93 | AM_CONDITIONAL([SOURCE_TRACKING], [test x$AUDIO_FEATURE_ENABLED_SOURCE_TRACKING = xtrue]) |
| 94 | AM_CONDITIONAL([LISTEN], [test x$AUDIO_FEATURE_ENABLED_LISTEN = xtrue]) |
| 95 | AM_CONDITIONAL([SOUND_TRIGGER], [test x$BOARD_SUPPORTS_SOUND_TRIGGER = xtrue]) |
| 96 | AM_CONDITIONAL([PM_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_PM_SUPPORT = xtrue]) |
Yamit Mehta | 0d37ca0 | 2016-11-24 09:12:40 +0530 | [diff] [blame] | 97 | AM_CONDITIONAL([FLAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER = xtrue]) |
| 98 | AM_CONDITIONAL([ALAC_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_ALAC_DECODER = xtrue]) |
| 99 | AM_CONDITIONAL([VORBIS_SUPPORT], [test x$AUDIO_FEATURE_ENABLED_EXTN_VORBIS_DECODER = xtrue]) |
| 100 | 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] | 101 | AM_CONDITIONAL([COMPRESS_INPUT], [test x$AUDIO_FEATURE_ENABLED_COMPRESS_INPUT = xtrue]) |
| 102 | AM_CONDITIONAL([AUDIO_HW_EXTN_API], [test x$BOARD_SUPPORTS_QAHW = xtrue]) |
Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 103 | |
| 104 | AC_CONFIG_FILES([ \ |
| 105 | Makefile \ |
| 106 | hal/Makefile \ |
Yamit Mehta | a3cc5d6 | 2016-11-24 09:09:06 +0530 | [diff] [blame] | 107 | qahw_api/Makefile \ |
| 108 | qahw_api/test/Makefile |
Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 109 | ]) |
| 110 | |
| 111 | AC_OUTPUT |