]>
git.proxmox.com Git - mirror_iproute2.git/blob - configure
2 # This is not an autconf generated configure
4 INCLUDE
=${1:-"/usr/include"}
6 echo "# Generated config based on" $INCLUDE >Config
9 PKT_SCHED
=$INCLUDE/linux
/pkt_sched.h
10 if [ ! -r $PKT_SCHED ];
12 echo " can't find file" $PKT_SCHED
16 echo -n " netem scheduler... "
17 cat >/tmp
/netemtest.c
<<EOF
18 #include <asm/types.h>
19 #include <linux/pkt_sched.h>
20 int main(int argc, char **argv) {
21 static struct tc_netem_qopt qopt;
22 exit(qopt.latency | qopt.limit | qopt.loss | qopt.gap | qopt.duplicate | qopt.jitter);
25 gcc
-I$INCLUDE -c /tmp
/netemtest.c
>/dev
/null
2>&1
28 echo "TC_CONFIG_NETEM:=y" >>Config
33 rm -f /tmp
/netemtest.c
/tmp
/netemtest.o
36 cat >/tmp
/atmtest.c
<<EOF
38 int main(int argc, char **argv) {
40 (void) text2qos("aal5,ubr:sdu=9180,rx:none",&qos,0);
44 gcc
-I$INCLUDE -o /tmp
/atmtest
/tmp
/atmtest.c
-latm >/dev
/null
2>&1
47 echo "TC_CONFIG_ATM:=y" >>Config
52 rm -f /tmp
/atmtest.c
/tmp
/atmtest
55 DEF_HTB
=`grep '^#define HTB_TC_VER' tc/q_htb.c`
56 cat >/tmp
/htbtest.c
<<EOF
58 #include <asm/types.h>
59 #include <linux/pkt_sched.h>
61 int main(int argc, char **argv) {
62 if (HTB_TC_VER >>16 != TC_HTB_PROTOVER) {
63 fprintf(stderr, "different kernel and TC HTB versions\n");
69 gcc
-I$INCLUDE -o /tmp
/htbtest
/tmp
/htbtest.c
70 if [ $?
-eq 0 -a /tmp
/htbtest
]
72 echo "TC_CONFIG_HTB:=y" >>Config
77 rm -f /tmp
/htbtest
/tmp
/htbtest.c
79 # See if we know about TCP Vegas
81 echo -n " TCP Vegas... "
82 if grep -q TCPDIAG_VEGASINFO
$INCLUDE/linux
/tcp_diag.h
>/dev
/null
2>&1
84 echo "SS_CONFIG_VEGAS:=y" >>Config
90 echo -n " TCP DRS... "
91 if grep -q tcpi_rcv_space
$INCLUDE/linux
/tcp.h
93 echo "SS_CONFIG_DRS:=y" >>Config