]> git.proxmox.com Git - mirror_iproute2.git/blob - configure
Don't just look for header files, try a link.
[mirror_iproute2.git] / configure
1 #! /bin/bash
2 # This is not an autconf generated configure
3 #
4 INCLUDE=${1:-"/usr/include"}
5
6 echo "# Generated config based on" $INCLUDE >Config
7
8 echo "TC"
9 PKT_SCHED=$INCLUDE/linux/pkt_sched.h
10 if [ ! -r $PKT_SCHED ];
11 then
12 echo " can't find file" $PKT_SCHED
13 exit 1
14 fi
15
16 echo -n " netem scheduler... "
17 if grep -q 'tc_netem_qopt' $PKT_SCHED
18 then
19 echo "TC_CONFIG_NETEM:=y" >>Config
20 echo y
21 else
22 echo n
23 fi
24
25 echo -n " ATM... "
26 cat >/tmp/atmtest.c <<EOF
27 #include <atm.h>
28 int main(int argc, char **argv) {
29 struct atm_qos qos;
30 (void) text2qos("aal5,ubr:sdu=9180,rx:none",&qos,0);
31 return 0;
32 }
33 EOF
34 gcc -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
35 if [ $? -eq 0 ]
36 then
37 echo "TC_CONFIG_ATM:=y" >>Config
38 echo y
39 else
40 echo n
41 fi
42
43 # See if we know about TCP Vegas
44 echo "SS"
45 echo -n " TCP Vegas... "
46 if grep -q TCPDIAG_VEGASINFO $INCLUDE/linux/tcp_diag.h
47 then
48 echo "SS_CONFIG_VEGAS:=y" >>Config
49 echo y
50 else
51 echo n
52 fi
53
54 echo -n " TCP DRS... "
55 if grep -q tcpi_rcv_space $INCLUDE/linux/tcp.h
56 then
57 echo "SS_CONFIG_DRS:=y" >>Config
58 echo y
59 else
60 echo n
61 fi
62
63