netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 6/7] build: no need for error message in PKG_CHECK_MODULES
Date: Sun, 31 Oct 2010 00:08:20 +0200	[thread overview]
Message-ID: <1288476502-18721-7-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1288476502-18721-1-git-send-email-jengelh@medozas.de>

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@medozas.de>
---
 configure.ac              |   13 -------------
 src/Makefile.am           |    6 +++---
 src/conntrack/Makefile.am |    3 +--
 src/expect/Makefile.am    |    3 +--
 4 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/configure.ac b/configure.ac
index d5b65af..429f0a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,14 +19,6 @@ case "$host" in
 esac
 
 dnl Dependencies
-AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
-if test "x$HAVE_PKG_CONFIG" = "x"
-then
-	echo "*** Error: No suitable pkg-config found. ***"
-	echo "    Please install the 'pkg-config' package."
-	exit 1
-fi
-
 PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.0])
 
 AC_CHECK_HEADERS(arpa/inet.h)
@@ -69,11 +61,6 @@ if test ! -z "$libdir"; then
 	CFLAGS="$CFLAGS -DLIBNETFILTER_CONNTRACK_DIR=$MODULE_DIR"
 fi
 
-CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS"
-LIBNFCONNTRACK_LIBS="$LIBNFNETLINK_LIBS"
-
-AC_SUBST(LIBNFCONNTRACK_LIBS)
-
 dnl Output the makefile
 AC_OUTPUT(Makefile src/Makefile include/Makefile utils/Makefile qa/Makefile include/libnetfilter_conntrack/Makefile include/internal/Makefile src/conntrack/Makefile src/expect/Makefile libnetfilter_conntrack.pc doxygen.cfg)
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 7816f07..2e9ccd0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,13 +6,13 @@ include $(top_srcdir)/Make_global.am
 
 SUBDIRS=conntrack expect
 
-AM_CFLAGS = -Wall
-LIBS = @LIBNFCONNTRACK_LIBS@
+AM_CFLAGS = -Wall ${LIBNFNETLINK_CFLAGS}
 
 lib_LTLIBRARIES = libnetfilter_conntrack.la 
 
 libnetfilter_conntrack_la_LIBADD = conntrack/libnfconntrack.la \
-				   expect/libnfexpect.la
+				   expect/libnfexpect.la \
+				   ${LIBNFNETLINK_LIBS}
 libnetfilter_conntrack_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink -ldl 	\
 				    -version-info $(LIBVERSION)
 libnetfilter_conntrack_la_SOURCES = main.c
diff --git a/src/conntrack/Makefile.am b/src/conntrack/Makefile.am
index 51d03c0..68c2d72 100644
--- a/src/conntrack/Makefile.am
+++ b/src/conntrack/Makefile.am
@@ -1,7 +1,6 @@
 include $(top_srcdir)/Make_global.am
 
-AM_CFLAGS = -Wall
-LIBS = @LIBNFCONNTRACK_LIBS@
+AM_CFLAGS = -Wall ${LIBNFNETLINK_CFLAGS}
 
 noinst_LTLIBRARIES = libnfconntrack.la 
 
diff --git a/src/expect/Makefile.am b/src/expect/Makefile.am
index 719ed23..b0404ba 100644
--- a/src/expect/Makefile.am
+++ b/src/expect/Makefile.am
@@ -1,7 +1,6 @@
 include $(top_srcdir)/Make_global.am
 
-AM_CFLAGS = -Wall
-LIBS = @LIBNFCONNTRACK_LIBS@
+AM_CFLAGS = -Wall ${LIBNFNETLINK_CFLAGS}
 
 noinst_LTLIBRARIES = libnfexpect.la 
 
-- 
1.7.1


  parent reply	other threads:[~2010-10-30 22:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30 22:08 libnetfilter_conntrack: build system cleanup Jan Engelhardt
2010-10-30 22:08 ` [PATCH 1/7] build: set Libs.private for pkgconfig file Jan Engelhardt
2010-10-30 22:08 ` [PATCH 2/7] build: use sh -e, remove autom4te.cache Jan Engelhardt
2010-10-30 22:08 ` [PATCH 3/7] build: remove statements without effect Jan Engelhardt
2010-10-30 22:08 ` [PATCH 4/7] build: remove unused $(all_includes) Jan Engelhardt
2010-10-30 22:08 ` [PATCH 5/7] build: remove -fPIC flag Jan Engelhardt
2010-10-30 22:08 ` Jan Engelhardt [this message]
2010-10-30 22:08 ` [PATCH 7/7] Update .gitignore Jan Engelhardt
2010-11-01 21:30 ` libnetfilter_conntrack: build system cleanup Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2010-10-30 22:49 conntrack-tools: build system cleanups Jan Engelhardt
2010-10-30 22:49 ` [PATCH 6/7] build: no need for error message in PKG_CHECK_MODULES Jan Engelhardt
2010-09-08 23:32 libnetfilter_conntrack autotools updates Jan Engelhardt
2010-09-08 23:32 ` [PATCH 6/7] build: no need for error message in PKG_CHECK_MODULES Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288476502-18721-7-git-send-email-jengelh@medozas.de \
    --to=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).