Add u32 extension to match on ether source/destination
[jleu-iproute2.git] / configure
blobdf40370a5cfd15f33f39412f267b51de3229d502
1 #! /bin/bash
2 # This is not an autconf generated configure
4 INCLUDE=${1:-"$PWD/include"}
6 echo "# Generated config based on" $INCLUDE >Config
8 echo "TC schedulers"
10 echo -n " ATM "
11 cat >/tmp/atmtest.c <<EOF
12 #include <atm.h>
13 int main(int argc, char **argv) {
14 struct atm_qos qos;
15 (void) text2qos("aal5,ubr:sdu=9180,rx:none",&qos,0);
16 return 0;
18 EOF
19 gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
20 if [ $? -eq 0 ]
21 then
22 echo "TC_CONFIG_ATM:=y" >>Config
23 echo yes
24 else
25 echo no
27 rm -f /tmp/atmtest.c /tmp/atmtest
29 echo -n " IPT "
31 #check if we need dont our internal header ..
32 cat >/tmp/ipttest.c <<EOF
33 #include <xtables.h>
34 char *lib_dir;
35 unsigned int global_option_offset = 0;
36 const char *program_version = XTABLES_VERSION;
37 const char *program_name = "tc-ipt";
38 struct afinfo afinfo = {
39 .libprefix = "libxt_",
42 void exit_error(enum exittype status, const char *msg, ...)
46 int main(int argc, char **argv) {
48 return 0;
51 EOF
52 gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
54 if [ $? -eq 0 ]
55 then
56 echo "TC_CONFIG_XT:=y" >>Config
57 echo "using xtables seems no need for internal.h"
58 else
59 echo "failed test 2"
62 #check if we need our own internal.h
63 cat >/tmp/ipttest.c <<EOF
64 #include <xtables.h>
65 #include "xt-internal.h"
66 char *lib_dir;
67 unsigned int global_option_offset = 0;
68 const char *program_version = XTABLES_VERSION;
69 const char *program_name = "tc-ipt";
70 struct afinfo afinfo = {
71 .libprefix = "libxt_",
74 void exit_error(enum exittype status, const char *msg, ...)
78 int main(int argc, char **argv) {
80 return 0;
83 EOF
84 gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
86 if [ $? -eq 0 ]
87 then
88 echo "using xtables instead of iptables (need for internal.h)"
89 echo "TC_CONFIG_XT_H:=y" >>Config
91 else
92 echo "failed test 3 using iptables"
94 rm -f /tmp/ipttest.c /tmp/ipttest