diff options
-rwxr-xr-x | bootstrap | 51 | ||||
-rw-r--r-- | src/varnish_mib.mib2c | 1 |
2 files changed, 0 insertions, 52 deletions
@@ -22,56 +22,5 @@ EOT | |||
22 | close $fd; | 22 | close $fd; |
23 | } | 23 | } |
24 | 24 | ||
25 | print "$0: generating m4/varnish_mib.m4\n"; | ||
26 | open(my $fd, '<', $mib2c_config); | ||
27 | my $prog; | ||
28 | while (<$fd>) { | ||
29 | if (defined($prog)) { | ||
30 | last if /^\@endperl\@/; | ||
31 | $prog .= $_; | ||
32 | } else { | ||
33 | if (/^\@startperl\@/) { | ||
34 | $prog = "no strict \"vars\";\n"; | ||
35 | } | ||
36 | } | ||
37 | } | ||
38 | |||
39 | my %vars; | ||
40 | eval $prog; | ||
41 | die $@ if $@; | ||
42 | die "$mib2c_config does not declare translation table" | ||
43 | unless exists $vars{'varnish_translate_table'}; | ||
44 | |||
45 | open(my $fd, '>', 'm4/varnish_mib.m4'); | ||
46 | print $fd <<'EOT'; | ||
47 | AC_DEFUN([AC_CHECK_VSC_C_MAIN_MEMBERS], | ||
48 | [save_CFLAGS="$CFLAGS" | ||
49 | CFLAGS="$CFLAGS $VARNISHAPI_CFLAGS" | ||
50 | EOT | ||
51 | ; | ||
52 | |||
53 | foreach my $member (sort | ||
54 | map { $_->[1] } | ||
55 | grep { $_->[0] eq 'MAIN' } | ||
56 | values %{$vars{'varnish_translate_table'}}) { | ||
57 | print $fd <<EOT | ||
58 | AC_CHECK_MEMBERS([struct VSC_C_main.$member],,, | ||
59 | [#include <stddef.h> | ||
60 | #include <stdlib.h> | ||
61 | #include <stdint.h> | ||
62 | #include <limits.h> | ||
63 | #include <vapi/vsc.h> | ||
64 | #include <vapi/vsm.h> | ||
65 | #include <vcli.h>]) | ||
66 | EOT | ||
67 | ; | ||
68 | } | ||
69 | print $fd <<'EOT' | ||
70 | CFLAGS="$save_CFLAGS" | ||
71 | ]) | ||
72 | EOT | ||
73 | ; | ||
74 | close $fd; | ||
75 | |||
76 | print "$0: reconfiguring\n"; | 25 | print "$0: reconfiguring\n"; |
77 | exec('autoreconf -f -i -s'); | 26 | exec('autoreconf -f -i -s'); |
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c index 155df42..6915689 100644 --- a/src/varnish_mib.mib2c +++ b/src/varnish_mib.mib2c | |||
@@ -253,7 +253,6 @@ varnish_get_vsm_data() | |||
253 | */ | 253 | */ |
254 | 254 | ||
255 | @foreach $i scalar@ | 255 | @foreach $i scalar@ |
256 | /* COMMX $i */ | ||
257 | @startperl@ | 256 | @startperl@ |
258 | &{$vars{'varnish_translate'}}($vars{'i'}); | 257 | &{$vars{'varnish_translate'}}($vars{'i'}); |
259 | @endperl@ | 258 | @endperl@ |