blob: 5314aead0d67b7f8e0d70470e7010e88be35d549 [file] [log] [blame]
Rohit kumar790ca9b2019-06-26 14:58:04 +05301# -*- Autoconf -*-
2# configure.ac -- Autoconf script for libacdbloader
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.61)
9# Initialize the sndparsr package version 1.0.0
10AC_INIT([sndparser],1.0.0)
11# Does not strictly follow GNU Coding standards
12AM_INIT_AUTOMAKE([foreign])
13# Disables auto rebuilding of configure, Makefile.ins
14AM_MAINTAINER_MODE
15# Verifies the --srcdir is correct by checking for the path
16AC_CONFIG_SRCDIR([src/snd-card-parser.c])
17# defines some macros variable to be included by source
18AC_CONFIG_MACRO_DIR([m4])
19
AmitKumar He5a02942021-11-11 07:44:04 +053020#basemachine
21AC_MSG_CHECKING([which base machine to use])
22AC_ARG_WITH([basemachine],
23 [AS_HELP_STRING([--with-basemachine],
24 [Specify the base machine])],
25 [machine_selected="$withval"],
26 [machine_selected=none])
27
28AC_MSG_RESULT([$machine_selected])
29AC_SUBST([MACHINE_ENABLED],[$machine_selected])
30
Rohit kumar790ca9b2019-06-26 14:58:04 +053031# Checks for programs.
32AC_PROG_CC
33AM_PROG_CC_C_O
34AC_PROG_CXX
35AC_PROG_LIBTOOL
36AC_PROG_AWK
37AC_PROG_CPP
38AC_PROG_INSTALL
39AC_PROG_LN_S
40AC_PROG_MAKE_SET
41PKG_PROG_PKG_CONFIG
Ashish Jained5cbdc2019-07-18 16:02:53 +053042AC_ARG_WITH([glib],
43AC_HELP_STRING([--with-glib],
44 [enable glib, Build against glib. Use this when building for HLOS systems which use glib]))
45
46if (test "x${with_glib}" = "xyes"); then
47 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
48 AC_MSG_ERROR(GThread >= 2.16 is required))
49 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
50 AC_MSG_ERROR(GLib >= 2.16 is required))
51 GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
52 GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
53
54 AC_SUBST(GLIB_CFLAGS)
55 AC_SUBST(GLIB_LIBS)
56fi
57
58AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
Rohit kumar790ca9b2019-06-26 14:58:04 +053059
Trinath Thammishetty84b80d92019-08-08 12:35:04 +053060AC_ARG_WITH([openwrt],
61 AS_HELP_STRING([use openwrt (default is no)]),
62 [with_openwrt=$withval],
63 [with_openwrt=no])
64AM_CONDITIONAL([BUILDSYSTEM_OPENWRT], [test "x${with_openwrt}" = "xyes"])
65
Rohit kumar790ca9b2019-06-26 14:58:04 +053066AC_CONFIG_FILES([ \
67 Makefile \
68 sndparser.pc
69 ])
70
71AC_OUTPUT