diff options
author | Sachin Mohan Gadag <sgadag@codeaurora.org> | 2017-12-05 15:46:28 +0530 |
---|---|---|
committer | Sachin Mohan Gadag <sgadag@codeaurora.org> | 2017-12-05 15:46:28 +0530 |
commit | 12f5884b215cbf58b95c9bdb73cf514b39675222 (patch) | |
tree | 5d767db6c7e9c76c02c72053b3bee47229df8073 /qahw | |
parent | ec372a68aef1cc9198df4959cdd97a336e4b02f5 (diff) | |
download | android_hardware_qcom_audio-12f5884b215cbf58b95c9bdb73cf514b39675222.tar.gz android_hardware_qcom_audio-12f5884b215cbf58b95c9bdb73cf514b39675222.tar.bz2 android_hardware_qcom_audio-12f5884b215cbf58b95c9bdb73cf514b39675222.zip |
qahw: Use glib2.0 library for standard api
Use glib package for standard api such as
g_strlcpy.
Change-Id: Ib7db03814a051ffa67389c7bf00ced7062fb0ed4
Diffstat (limited to 'qahw')
-rw-r--r-- | qahw/Makefile.am | 5 | ||||
-rw-r--r-- | qahw/configure.ac | 16 |
2 files changed, 19 insertions, 2 deletions
diff --git a/qahw/Makefile.am b/qahw/Makefile.am index b6ebd8b5..2f33c9f7 100644 --- a/qahw/Makefile.am +++ b/qahw/Makefile.am @@ -15,6 +15,7 @@ libqahwwrapper_la_SOURCES = src/qahw.c \ libqahwwrapper_la_CFLAGS = $(AM_CFLAGS) libqahwwrapper_la_CFLAGS += -include stddef.h +libqahwwrapper_la_CFLAGS += -Dstrlcpy=g_strlcpy $(GLIB_CFLAGS) -include glib.h libqahwwrapper_la_CFLAGS += -D__unused=__attribute__\(\(__unused__\)\) -libqahwwrapper_la_CFLAGS += -Werror -libqahwwrapper_la_LDFLAGS = -shared -avoid-version -llog -lcutils -lhardware +libqahwwrapper_la_CFLAGS += -Werror -Wall +libqahwwrapper_la_LDFLAGS = -shared -avoid-version -llog -lcutils -lhardware $(GLIB_LIBS) diff --git a/qahw/configure.ac b/qahw/configure.ac index c87447ea..04fde197 100644 --- a/qahw/configure.ac +++ b/qahw/configure.ac @@ -29,6 +29,22 @@ AC_PROG_LN_S AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG +AC_ARG_WITH([glib], + AC_HELP_STRING([--with-glib], + [enable glib, Build against glib. Use this when building for HLOS systems which use glib])) + +if (test "x${with_glib}" = "xyes"); then + PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, + AC_MSG_ERROR(GThread >= 2.16 is required)) + PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, + AC_MSG_ERROR(GLib >= 2.16 is required)) + GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" + GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" + + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) +fi + AC_CONFIG_FILES([ \ Makefile ]) |