All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] conntrack-tools compilation problem
@ 2007-08-05 15:30 KOVACS Krisztian
  2007-08-05 15:36 ` Jan Engelhardt
  2007-08-06  8:34 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: KOVACS Krisztian @ 2007-08-05 15:30 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Development Mailing List

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

Hi Pablo,

I've just tried to build conntrack-tools and all the required netfilter
libraries from scratch. The libs were built and installed without
problems, but then conntrack-tools failed to compile with a missing
include problem.

Looks like conntrack-tools' autoconf/automake templates do not properly
use pkg-config information. configure.in detects the presence of
libnfnetlink and libnetfilter_conntrack using pkg-config, but then fails
to add the necessary flags to the compile and linker flags. For me, this
is a problem because all those libraries live under /opt/netfilter, and
thus compilation fails because of missing headers.

The attached patch fixes this problem for me, although I'm quite sure that
it does not break compilation for someone else. (Should not, but I'm not
much of an autoconf expert...)

--
KOVACS Krisztian

[-- Attachment #2: conntrack-tools-autoconf-dependencies.patch --]
[-- Type: text/x-diff, Size: 1696 bytes --]

Index: conntrack-tools/configure.in
===================================================================
--- conntrack-tools/configure.in	(revision 6998)
+++ conntrack-tools/configure.in	(working copy)
@@ -104,4 +104,8 @@
 dnl                  extensions/Makefile
 dnl                  src/Makefile])
 
+CFLAGS="$CFLAGS $LIBNETFILTER_CONNTRACK_CFLAGS"
+
+AC_SUBST(LIBNETFILTER_CONNTRACK_LIBS)
+
 AC_OUTPUT(Makefile src/Makefile include/Makefile extensions/Makefile)
Index: conntrack-tools/src/Makefile.am
===================================================================
--- conntrack-tools/src/Makefile.am	(revision 6998)
+++ conntrack-tools/src/Makefile.am	(working copy)
@@ -8,6 +8,7 @@
 
 conntrack_SOURCES = conntrack.c
 conntrack_LDADD = ../extensions/libct_proto_tcp.la ../extensions/libct_proto_udp.la ../extensions/libct_proto_icmp.la
+conntrack_LDFLAGS = $(all_libraries) @LIBNETFILTER_CONNTRACK_LIBS@
 
 conntrackd_SOURCES = alarm.c main.c run.c hash.c buffer.c \
 		    local.c log.c mcast.c netlink.c \
@@ -22,6 +23,6 @@
 		    build.c parse.c \
 		    read_config_yy.y read_config_lex.l
 
-conntrackd_LDFLAGS = $(all_libraries) -lnfnetlink -lnetfilter_conntrack
+conntrackd_LDFLAGS = $(all_libraries) @LIBNETFILTER_CONNTRACK_LIBS@
 
 EXTRA_DIST = read_config_yy.h
Index: conntrack-tools/Makefile.am
===================================================================
--- conntrack-tools/Makefile.am	(revision 6998)
+++ conntrack-tools/Makefile.am	(working copy)
@@ -9,7 +9,7 @@
 
 SUBDIRS   = extensions src
 DIST_SUBDIRS = include src extensions
-LINKOPTS  = -lnfnetlink -lnetfilter_conntrack -lpthread
+LIBS = @LIBNETFILTER_CONNTRACK_LIBS@
 AM_CFLAGS = -g
 
 $(OBJECTS): libtool

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-06  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-05 15:30 [PATCH] conntrack-tools compilation problem KOVACS Krisztian
2007-08-05 15:36 ` Jan Engelhardt
2007-08-05 16:03   ` KOVACS Krisztian
2007-08-06  8:34 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.