[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] Use pkg-config to find check
From: |
Jose E. Marchesi |
Subject: |
Re: [bug-recutils] Use pkg-config to find check |
Date: |
Fri, 10 Oct 2014 18:02:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi Michal.
Hello. The following patch, at branch check-pkg-config of
git://git.mtjm.eu/mtjm-recutils.git, makes configure use pkg-config to
find check instead of passing only -lcheck to the compiler.
Thanks for the patch. I have just one comment, see below.
diff --git a/configure.ac b/configure.ac
index b31039f..c5cb6d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,12 +78,9 @@ AC_FUNC_FSEEKO
dnl Search for required libraries
have_check=no
-AC_CHECK_LIB([check],[suite_create],[have_check=yes],)
+PKG_CHECK_MODULES([CHECK], [check],
+ [have_check=yes], [have_check=no])
AM_CONDITIONAL([CHECK], [test "x$have_check" != "xno"])
-if test "x$have_check" = "xyes"; then
- CHECKLIBS=-lcheck
-fi
-AC_SUBST([CHECKLIBS])
If I remember properly some old versions of PKG_CHECK_MODULES will fail
to AC_SUBST CHECK_LIBS and CHECK_CFLAGS. Would you mind to AC_SUBST
these variables explicitly, just in case?
Apart for that, please go ahead and push the change.