blob: 04fde1973f9d6aa3e7074925036949fbc7f08c6a [file] [log] [blame]
Sidipotu Ashok404f26d2017-10-10 22:27:51 +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 audiohalwrapper-interface package version 1.0.0
10AC_INIT(audiohalwrapperinterface,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
Sachin Mohan Gadag12f58842017-12-05 15:46:28 +053032AC_ARG_WITH([glib],
33 AC_HELP_STRING([--with-glib],
34 [enable glib, Build against glib. Use this when building for HLOS systems which use glib]))
35
36if (test "x${with_glib}" = "xyes"); then
37 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
38 AC_MSG_ERROR(GThread >= 2.16 is required))
39 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
40 AC_MSG_ERROR(GLib >= 2.16 is required))
41 GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
42 GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
43
44 AC_SUBST(GLIB_CFLAGS)
45 AC_SUBST(GLIB_LIBS)
46fi
47
Sidipotu Ashok404f26d2017-10-10 22:27:51 +053048AC_CONFIG_FILES([ \
49 Makefile
50 ])
51
52AC_OUTPUT