[PATCH 1/2] src/Makefile.am: depend on glib and gio

Colin Ian King colin.king at canonical.com
Thu Jul 17 08:50:44 UTC 2014


On 15/07/14 15:46, Alberto Milone wrote:
> configure.ac
> src/Makefile.am
> ---
>  configure.ac    | 2 ++
>  src/Makefile.am | 4 +++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index fc1ea03..5035e67 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -61,6 +61,8 @@
>  	  AC_CHECK_HEADERS([sys/ioctl.h])
>  	  AC_CHECK_HEADERS([sys/time.h])
>  	  AC_CHECK_HEADERS([json/json.h])
> +	  AC_CHECK_HEADERS([glib.h])
> +	  AC_CHECK_HEADERS([gio/gio.h])
>  	  #AC_CHECK_LIB(pcre, pcre_compile)
>  	  AC_FUNC_MALLOC
>  	  AC_FUNC_FORK
> diff --git a/src/Makefile.am b/src/Makefile.am
> index ace23d6..0f19782 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -11,6 +11,8 @@ AM_CPPFLAGS = \
>  	-I$(top_srcdir)/src/acpica/source/include \
>  	-I$(top_srcdir)/src/acpica/source/compiler \
>  	-I$(top_srcdir)/efi_runtime \
> +	-pthread -I/usr/include/glib-2.0 \
> +	-I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
>  	-Wall -Werror -Wextra
>  
>  bin_PROGRAMS = fwts
> @@ -95,6 +97,6 @@ fwts_LDFLAGS = -lm
>  
>  fwts_LDADD = \
>  	-L$(top_builddir)/src/acpica -lfwtsacpica \
> -	-Llib/src -lfwts
> +	-Llib/src -lfwts -lgio-2.0 -lgobject-2.0 -lglib-2.0
>  
>  man_MANS = ../doc/fwts.1 ../doc/fwts-collect.1 ../doc/fwts-frontend-text.1
> 

We also need libglib2.0-dev in the debian/control, else we get:

gcc -DHAVE_CONFIG_H -I. -I..  -I../src/lib/include
-I../src/acpica/source/include -I../src/acpica/source/compiler
-I../efi_runtime -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall -Werror -Wextra
-DACPI_DEBUG_OUTPUT   -g -O2 -MT acpi/s3/fwts-s3.o -MD -MP -MF
acpi/s3/.deps/fwts-s3.Tpo -c -o acpi/s3/fwts-s3.o `test -f
'acpi/s3/s3.c' || echo './'`acpi/s3/s3.c
acpi/s3/s3.c:31:18: fatal error: glib.h: No such file or directory
 #include <glib.h>
                  ^
compilation terminated.




More information about the fwts-devel mailing list