PKG_CHECK_MODULES already produces its own (and more verbose) messsage when a module cannot be found. Mucking around with CFLAGS and LIBS is also not needed since pkgconfig takes care of providing variables, so let's use them in Makefile.am. Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx> --- configure.ac | 10 +--------- src/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 7c3468b..c4cc36e 100644 --- a/configure.ac +++ b/configure.ac @@ -19,15 +19,7 @@ case "$host" in esac dnl Dependencies -LIBNFNETLINK_REQUIRED=0.0.41 - -PKG_CHECK_MODULES(LIBNFNETLINK, libnfnetlink >= $LIBNFNETLINK_REQUIRED,, - AC_MSG_ERROR(Cannot find libnfnetlink >= $LIBNFNETLINK_REQUIRED)) - -CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS" -LIBNFQUEUE_LIBS="$LIBNFNETLINK_LIBS" - -AC_SUBST(LIBNFQUEUE_LIBS) +PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 0.0.41]) dnl Output the makefiles AC_OUTPUT(Makefile include/Makefile include/libnetfilter_queue/Makefile src/Makefile utils/Makefile libnetfilter_queue.pc doxygen.cfg) diff --git a/src/Makefile.am b/src/Makefile.am index c408961..aa1f5ba 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,11 +21,11 @@ LIBVERSION=2:0:1 AM_CPPFLAGS = -I$(top_srcdir)/include -I${KERNELDIR} -AM_CFLAGS = -fPIC -Wall -LIBS = @LIBNFQUEUE_LIBS@ +AM_CFLAGS = -fPIC -Wall ${LIBNFNETLINK_CFLAGS} lib_LTLIBRARIES = libnetfilter_queue.la libnetfilter_queue_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink \ -version-info $(LIBVERSION) libnetfilter_queue_la_SOURCES = libnetfilter_queue.c +libnetfilter_queue_la_LIBADD = ${LIBNFNETLINK_LIBS} -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html