Skip to contentSkip to conversation

nfnl_osf: use the right nfnetlink lib

PATCH Superseded Nicolas Dichtel 2 participants 5 messages Mar 29, 2013 – Apr 3, 2013 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfnl_osf: use the right nfnetlink lib

If the user specify libnfnetlink_LIBS during the configure, we must use it.

---
 utils/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/Makefile.am +1 -1
index f1bbfc5..8a85396 100644
@@ -7,4 +7,4 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \
 sbin_PROGRAMS = nfnl_osf
 pkgdata_DATA = pf.os
 
-nfnl_osf_LDADD = -lnfnetlink
+nfnl_osf_LDADD = ${libnfnetlink_LIBS} -lnfnetlink
Signature · 1 line
1.8.0.1
#1 lore raw
Quoted 15 lines · Nicolas Dichtel

If the user specify libnfnetlink_LIBS during the configure, we must use it.

---
utils/Makefile.am | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
utils/Makefile.am +0 -0
index f1bbfc5..8a85396 100644
@@ -7,4 +7,4 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \

sbin_PROGRAMS = nfnl_osf
pkgdata_DATA = pf.os

utils/Makefile.am AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \ · line 10

Quoted 2 lines
utils/Makefile.am +1 -1
-nfnl_osf_LDADD = -lnfnetlink
+nfnl_osf_LDADD = ${libnfnetlink_LIBS} -lnfnetlink

You really should remove -lnfnetlink :)

#2 lore raw
Quoted 17 lines · Jan Engelhardt
Quoted 15 lines · Nicolas Dichtel

If the user specify libnfnetlink_LIBS during the configure, we must use it.

---
utils/Makefile.am | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
utils/Makefile.am +0 -0
index f1bbfc5..8a85396 100644
@@ -7,4 +7,4 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \

sbin_PROGRAMS = nfnl_osf
pkgdata_DATA = pf.os

Quoted 5 lines

utils/Makefile.am AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \ · line 10

Quoted 2 lines
utils/Makefile.am +1 -1
-nfnl_osf_LDADD = -lnfnetlink
+nfnl_osf_LDADD = ${libnfnetlink_LIBS} -lnfnetlink

You really should remove -lnfnetlink :)

Not sure to understand your comment. ${libnfnetlink_LIBS} contains only something like '-L/path/to/my/lib'. --
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 11 lines · Nicolas Dichtel
Quoted 9 lines

utils/Makefile.am AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \ · line 10

Quoted 6 lines
(quoted diff) +0 -0
@@ -7,4 +7,4 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \

sbin_PROGRAMS = nfnl_osf
pkgdata_DATA = pf.os

utils/Makefile.am +1 -1
-nfnl_osf_LDADD = -lnfnetlink
+nfnl_osf_LDADD = ${libnfnetlink_LIBS} -lnfnetlink

You really should remove -lnfnetlink :)

Not sure to understand your comment. ${libnfnetlink_LIBS} contains only something like '-L/path/to/my/lib'.

	pkg-config libnfnetlink --libs

should definitely return at least an -l argument. If not, the .pc file is buggy.
This is what the Libs line should look like:

# libnfnetlink pkg-config file

prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include/libnfnetlink-1.0.1

Name: libnfnetlink
Description: Low-level netfilter netlink communication library
URL: http://netfilter.org/projects/libnfnetlink/
Version: 1.0.1
Requires:
Conflicts:
Libs: -L${libdir} -lnfnetlink
Cflags: -I${includedir}

#4 lore raw

PATCH v2 1/1 nfnl_osf: use the right nfnetlink lib

If the user specify libnfnetlink_LIBS during the configure, we must use it.

---

v2: remove duplicate -lnfnetlink

 utils/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/Makefile.am +1 -1
index f1bbfc5..66f5c5c 100644
@@ -7,4 +7,4 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include \
 sbin_PROGRAMS = nfnl_osf
 pkgdata_DATA = pf.os
 
-nfnl_osf_LDADD = -lnfnetlink
+nfnl_osf_LDADD = ${libnfnetlink_LIBS}
Signature · 1 line
1.8.0.1