#!/bin/bash

./configure --prefix=/usr --host=arm-linux --disable-ipv6 --enable-static --disable-shared

## Fix to get rid of the message:
## modprobe: module 'ip_tables' not found

#sed -i -e'/execv(argv/i\
#		freopen("/dev/null", "rw", stdout);\
#		freopen("/dev/null", "rw", stderr);' xtables.c

sed -i -e's/^\([ \t]*static bool loaded =\).*$/\1 true;/' xtables.c

cat >ECO_INSTALL <<EOF
#!/bin/sh

export DESTDIR=\$(pwd)/../../rootfs
EOF
chmod 755 ECO_INSTALL

