From 9e4435791e495281f5a51c8642cdb8067819dbf8 Mon Sep 17 00:00:00 2001 From: Ruben Laguna Date: Fri, 6 Feb 2015 17:51:56 +0100 Subject: [PATCH] Fix the glib-2.0 DEPS There is no product_LIBS is product_LDADD --- Makefile.am | 2 +- configure.ac | 4 ++++ tests/test.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 996bdb6..9bf0656 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ myexecutable_CFLAGS = #--std=c11 # CFLAGS applicable to myexecutable_SOURCES check_PROGRAMS = testsuite # will generate and run testsuite exec testsuite_CFLAGS = $(DEPS_CFLAGS) # DEPS_* are filled by PKG_CHECK_MODULES -testsuite_LIBS = $(DEPS_LIBS) # in configure.ac +testsuite_LDADD = $(DEPS_LIBS) # in configure.ac testsuite_SOURCES = tests/test.c TESTS = testsuite diff --git a/configure.ac b/configure.ac index 40de5bd..91bc186 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,10 @@ AC_PROG_INSTALL # AC_MSG_ERROR([You need to install pthreads library.]) # ]) +# AC_SEARCH_LIBS([g_test_init], [glib-2.0],[],[ +# AC_MSG_ERROR([You need to install glib-2.0 library.]) +# ]) + # Checks for header files. AC_CHECK_HEADER([stdlib.h]) diff --git a/tests/test.c b/tests/test.c index 9e6a421..0cff184 100644 --- a/tests/test.c +++ b/tests/test.c @@ -4,6 +4,7 @@ int main(int argc, char *argv[]) { + g_test_init(&argc, &argv, NULL); printf("Write some tests!!! Failing!\n"); exit(EXIT_FAILURE); return 0;