]>
Commit | Line | Data |
---|---|---|
449bf1f3 SH |
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 | ||
6202b4c1 SH |
16 | echo -n " netem scheduler... " |
17 | if grep -q 'tc_netem_qopt' $PKT_SCHED | |
449bf1f3 | 18 | then |
c830d77b | 19 | echo "TC_CONFIG_NETEM:=y" >>Config |
449bf1f3 SH |
20 | echo y |
21 | else | |
22 | echo n | |
23 | fi | |
24 | ||
25 | echo -n " ATM... " | |
c830d77b SH |
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 ] | |
449bf1f3 | 36 | then |
c830d77b | 37 | echo "TC_CONFIG_ATM:=y" >>Config |
449bf1f3 SH |
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 | |
c830d77b | 48 | echo "SS_CONFIG_VEGAS:=y" >>Config |
449bf1f3 SH |
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 | |
c830d77b | 57 | echo "SS_CONFIG_DRS:=y" >>Config |
449bf1f3 SH |
58 | echo y |
59 | else | |
60 | echo n | |
61 | fi | |
62 | ||
63 |