7 my $class = ref($proto) || $proto;
11 my $functions = \%{$self->{FUNCTIONS}};
12 my $conditionals = \%{$self->{CONDITIONALS}};
13 my $conditional_headers = \%{$self->{CONDITIONAL_HEADERS}};
16 my $configure_in_file = shift;
17 my $config_h_in_file = shift;
19 open(IN, "< $api_file");
22 s/^\s*?(.*?)\s*$/$1/; # remove whitespace at begin and end of line
23 s/^(.*?)\s*#.*$/$1/; # remove comments
24 /^$/ && next; # skip empty lines
31 open(IN, "< $configure_in_file");
33 while($again || (defined($_ = <IN>))) {
39 $_ = $1 . " " . $line;
44 # remove leading and trailing whitespace
47 if(/^AC_CHECK_HEADERS\(\s*(.*?)\)\s*$/) {
48 my @arguments = split(/,/,$1);
49 foreach my $header (split(/\s+/, $arguments[0])) {
50 $$conditional_headers{$header}++;
52 } elsif(/^AC_FUNC_ALLOCA/) {
53 $$conditional_headers{"alloca.h"}++;
59 open(IN, "< $config_h_in_file");
62 if(/^\#undef (\S+)$/) {
73 my $functions = \%{$self->{FUNCTIONS}};
77 return $$functions{$name};
82 my $conditionals = \%{$self->{CONDITIONALS}};
86 return $$conditionals{$name};
89 sub is_conditional_header {
91 my $conditional_headers = \%{$self->{CONDITIONAL_HEADERS}};
95 return $$conditional_headers{$name};