ACK: [PATCH][RESEND-v3] updated automake files for libjson-c (LP: #1268005)

IvanHu ivan.hu at canonical.com
Thu Jan 23 05:27:25 UTC 2014


On 01/17/2014 07:23 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> This is a re-working of the earlier patch from Jeffrey Bastian. I've
> had to modify it so that it does not break builds on earlier releases.
>
> I've removed json lib references from the Makefiles and added an
> configure.ac check to find the appropriate library and this adds it
> to $LIB.  Tested the build in precise, saucy and trusty amd64 chroots.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   configure.ac              | 1 +
>   src/Makefile.am           | 2 +-
>   src/lib/src/Makefile.am   | 2 +-
>   src/utilities/Makefile.am | 2 +-
>   4 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 5a31434..ec29f84 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -9,6 +9,7 @@
>   	  AC_PROG_LIBTOOL
>   	  AC_C_INLINE
>   	  AM_PROG_CC_C_O
> +	  AC_SEARCH_LIBS([json_object_from_file], [json json-c], [], [ AC_MSG_ERROR([no available json library]) ])
>     	  AC_CHECK_FUNCS([localtime_r])
>   	  AC_CHECK_FUNCS([dup2])
>   	  AC_CHECK_FUNCS([getcwd])
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 76841e0..bd6cf01 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -89,7 +89,7 @@ fwts_SOURCES = main.c 				\
>   	uefi/securebootcert/securebootcert.c	\
>   	uefi/uefivarinfo/uefivarinfo.c
>
> -fwts_LDFLAGS = -ljson -lm
> +fwts_LDFLAGS = -lm
>
>   fwts_LDADD = \
>   	-Llib/src -lfwts \
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index 7668b8c..377e8aa 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -7,7 +7,7 @@ AM_CPPFLAGS = \
>   pkglib_LTLIBRARIES = libfwts.la
>
>   libfwts_la_LDFLAGS = 			\
> -	-lm -lpcre -lpthread -ljson 	\
> +	-lm -lpcre -lpthread 		\
>   	-version-info 1:0:0 		\
>   	-L$(top_srcdir)/src/acpica/source/compiler \
>   	-lfwtsiasl
> diff --git a/src/utilities/Makefile.am b/src/utilities/Makefile.am
> index 427c44f..4e2f37f 100644
> --- a/src/utilities/Makefile.am
> +++ b/src/utilities/Makefile.am
> @@ -2,5 +2,5 @@ AM_CPPFLAGS = -Wall -Werror -Wextra
>
>   bin_PROGRAMS = kernelscan
>   kernelscan_SOURCES = kernelscan.c
> -kernelscan_LDFLAGS = -ljson -lpcre
> +kernelscan_LDFLAGS = -lpcre
>
>

Acked-by: Ivan Hu <ivan.hu at canonical.com>




More information about the fwts-devel mailing list