[PATCH] remove dynamic libiptc.so from iptables-static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was building iptables-static from 1.4.3.2 and I noticed that ldd reported libiptc.so was a dependency; I was using gcc 4.0.1 for ppc cross compile -- but I don't think the toolchain is the cause. I was able to get iptables-static to depend only on libm and libc with the following patch (made against the 1.4.3.2 dist, but applies clean to svn trunk). I hope you will consider it for inclusion in the next release.

Thanks,
Ben Gardiner

diff --git a/Makefile.am b/Makefile.am
index fd99098..80ee250 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,12 @@ lib_LTLIBRARIES =

# libiptc
lib_LTLIBRARIES           += libiptc/libiptc.la
-libiptc_libiptc_la_SOURCES = libiptc/libip4tc.c libiptc/libip6tc.c
+if ENABLE_IPV4
+libiptc_libiptc_la_SOURCES = libiptc/libip4tc.c
+endif
+if ENABLE_IPV6
+libiptc_libiptc_la_SOURCES = libiptc/libip6tc.c
+endif
libiptc_libiptc_la_LDFLAGS = -version-info 0:0:0

lib_LTLIBRARIES      += libxtables.la
@@ -44,10 +49,10 @@ iptables_save_SOURCES     = iptables-save.c iptables.c
iptables_save_LDFLAGS     = ${iptables_LDFLAGS}
iptables_save_LDADD       = ${iptables_LDADD}

-# iptables-multi, semi-static
-iptables_static_SOURCES   = ${iptables_multi_SOURCES} xtables.c
+# iptables-static
+iptables_static_SOURCES = ${iptables_multi_SOURCES} xtables.c ${libiptc_libiptc_la_SOURCES}
iptables_static_CFLAGS    = ${iptables_multi_CFLAGS} -DNO_SHARED_LIBS=1
-iptables_static_LDADD     = libiptc/libiptc.la extensions/libext4.a -lm
+iptables_static_LDADD     = extensions/libext4.a -lm

iptables_xml_SOURCES      = iptables-xml.c
begin:vcard
fn:Ben Gardiner
n:Gardiner;Ben
org:Nanometrics Seismological Instruments;Software R&D
adr:;;250 Herzberg Rd.;Kanata;ON;K2K 2A1;Canada
email;internet:bengardiner@xxxxxxxxxxxxxx
title:M.Sc. Eng.
tel;work:613 592 6776 x239
tel;fax:613 592 5929
x-mozilla-html:FALSE
url:www.nanometrics.ca
version:2.1
end:vcard


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux