From c306a23ddc4b4dab8f3fe7d528ca07844755bd18 Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Tue, 22 Dec 2015 20:42:30 +0100 Subject: [PATCH] libusbgx: Add dependency to libconfig This library is used to import and export gadget/function/config to and from file. Signed-off-by: Krzysztof Opasiak [Port from libusbg and update description] Signed-off-by: Krzysztof Opasiak --- configure.ac | 1 + libusbgx.pc.in | 2 +- src/Makefile.am | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 0b12faa..3091056 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_PROG_CC AM_PROG_AR AC_CONFIG_MACRO_DIR([m4]) AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions]) +PKG_CHECK_MODULES(LIBCONFIG, libconfig) LT_INIT AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile libusbgx.pc]) DX_INIT_DOXYGEN([$PACKAGE_NAME],[doxygen.cfg]) diff --git a/libusbgx.pc.in b/libusbgx.pc.in index 62cf50b..8ea8fb5 100644 --- a/libusbgx.pc.in +++ b/libusbgx.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: libusbgx Description: USB gadget-configfs library -Requires: +Requires: libconfig Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lusbg Cflags: -I${includedir} diff --git a/src/Makefile.am b/src/Makefile.am index 25fb64f..7658e39 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,6 @@ lib_LTLIBRARIES = libusbgx.la libusbgx_la_SOURCES = usbg.c -libusbgx_la_LDFLAGS = -version-info 0:0:0 +libusbgx_la_LDFLAGS = $(LIBCONFIG_LIBS) +libusbgx_la_LDFLAGS += -version-info 0:0:0 +libusbgx_la_CFLAGS = $(LIBCONFIG_CFLAGS) AM_CPPFLAGS=-I../include/ -- 2.7.4