Test for HTB version match

(Logical change 1.59)
This commit is contained in:
osdl.net!shemminger 2004-07-30 20:50:38 +00:00
parent ebafc64da8
commit 3876b3c378
2 changed files with 30 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2004-07-30 Stephen Hemminger <shemminger@osdl.org>
* HTB API changed and won't build with mismatched version.
Rather than sticking user with a build error, just don't
build it in on mismatch.
* Change configure script to make sure netem is the correct
version. I changed the structure def. a couple of times before
settling on the final API

27
configure vendored
View File

@ -51,10 +51,35 @@ else
fi
rm -f /tmp/atmtest.c /tmp/atmtest
echo -n " HTB... "
DEF_HTB=`grep '^#define HTB_TC_VER' tc/q_htb.c`
cat >/tmp/htbtest.c <<EOF
#include <stdio.h>
#include <asm/types.h>
#include <linux/pkt_sched.h>
$DEF_HTB
int main(int argc, char **argv) {
if (HTB_TC_VER >>16 != TC_HTB_PROTOVER) {
fprintf(stderr, "different kernel and TC HTB versions\n");
return 1;
}
return 0;
}
EOF
gcc -I$INCLUDE -o /tmp/htbtest /tmp/htbtest.c
if [ $? -eq 0 -a /tmp/htbtest ]
then
echo "TC_CONFIG_HTB:=y" >>Config
echo y
else
echo n
fi
rm -f /tmp/htbtest /tmp/htbtest.c
# See if we know about TCP Vegas
echo "SS"
echo -n " TCP Vegas... "
if grep -q TCPDIAG_VEGASINFO $INCLUDE/linux/tcp_diag.h
if grep -q TCPDIAG_VEGASINFO $INCLUDE/linux/tcp_diag.h >/dev/null 2>&1
then
echo "SS_CONFIG_VEGAS:=y" >>Config
echo y