On Monday 2012-08-13 18:33, Stephen Hemminger wrote:
quoted
quoted
quoted
quoted
IPT_LIB_DIR=""
- for dir in /lib /usr/lib /usr/local/lib
+ for dir in /lib /usr/lib /usr/local/lib /lib64 /usr/lib64 /usr/local/lib64
do
for file in $dir/{xtables,iptables}/lib*t_*so ; do
if [ -f $file ]; then
I think this should be done with pkg-config:
pkg-config --variable=xtlibdir xtables
Does every distro have pkg-config or does more logic need to be done here?
Every distro has pkg-config; the question is whether you want to support
library versions that don't include a pkg-config file (xtables.pc), if
they exist.
Let's do pkg-config first, and as a fallback keep the old code and only
look in the same old places.
Every distro that has libxtables.so also has the .pc file.
The obvious reason to have the .pc file is to render such error
prone static path searching redundant.