Rohit kumar | 790ca9b | 2019-06-26 14:58:04 +0530 | [diff] [blame] | 1 | # -*- 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 |
| 8 | AC_PREREQ(2.61) |
| 9 | # Initialize the sndparsr package version 1.0.0 |
| 10 | AC_INIT([sndparser],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 | # Verifies the --srcdir is correct by checking for the path |
| 16 | AC_CONFIG_SRCDIR([src/snd-card-parser.c]) |
| 17 | # defines some macros variable to be included by source |
| 18 | AC_CONFIG_MACRO_DIR([m4]) |
| 19 | |
AmitKumar H | e5a0294 | 2021-11-11 07:44:04 +0530 | [diff] [blame] | 20 | #basemachine |
| 21 | AC_MSG_CHECKING([which base machine to use]) |
| 22 | AC_ARG_WITH([basemachine], |
| 23 | [AS_HELP_STRING([--with-basemachine], |
| 24 | [Specify the base machine])], |
| 25 | [machine_selected="$withval"], |
| 26 | [machine_selected=none]) |
| 27 | |
| 28 | AC_MSG_RESULT([$machine_selected]) |
| 29 | AC_SUBST([MACHINE_ENABLED],[$machine_selected]) |
| 30 | |
Rohit kumar | 790ca9b | 2019-06-26 14:58:04 +0530 | [diff] [blame] | 31 | # Checks for programs. |
| 32 | AC_PROG_CC |
| 33 | AM_PROG_CC_C_O |
| 34 | AC_PROG_CXX |
| 35 | AC_PROG_LIBTOOL |
| 36 | AC_PROG_AWK |
| 37 | AC_PROG_CPP |
| 38 | AC_PROG_INSTALL |
| 39 | AC_PROG_LN_S |
| 40 | AC_PROG_MAKE_SET |
| 41 | PKG_PROG_PKG_CONFIG |
Ashish Jain | ed5cbdc | 2019-07-18 16:02:53 +0530 | [diff] [blame] | 42 | AC_ARG_WITH([glib], |
| 43 | AC_HELP_STRING([--with-glib], |
| 44 | [enable glib, Build against glib. Use this when building for HLOS systems which use glib])) |
| 45 | |
| 46 | if (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) |
| 56 | fi |
| 57 | |
| 58 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") |
Rohit kumar | 790ca9b | 2019-06-26 14:58:04 +0530 | [diff] [blame] | 59 | |
Trinath Thammishetty | 84b80d9 | 2019-08-08 12:35:04 +0530 | [diff] [blame] | 60 | AC_ARG_WITH([openwrt], |
| 61 | AS_HELP_STRING([use openwrt (default is no)]), |
| 62 | [with_openwrt=$withval], |
| 63 | [with_openwrt=no]) |
| 64 | AM_CONDITIONAL([BUILDSYSTEM_OPENWRT], [test "x${with_openwrt}" = "xyes"]) |
| 65 | |
Rohit kumar | 790ca9b | 2019-06-26 14:58:04 +0530 | [diff] [blame] | 66 | AC_CONFIG_FILES([ \ |
| 67 | Makefile \ |
| 68 | sndparser.pc |
| 69 | ]) |
| 70 | |
| 71 | AC_OUTPUT |