2 # Determine if curl-config --protocols/--features matches the
3 # curl --version protocols/features
6 print "Usage: $0 curl-config-script curl-version-output-file features|protocols\n";
12 # Read the output of curl --version
13 my $curl_protocols="";
14 open(CURL, "$ARGV[1]") || die "Can't get curl $what list\n";
17 $curl_protocols = lc($_) if ( /$what:/i );
21 $curl_protocols =~ s/\r//;
22 $curl_protocols =~ /\w+: (.*)$/;
25 # These features are not supported by curl-config
26 @curl = grep(!/^(Debug|TrackMemory|Metalink|Largefile|CharConv)$/i, @curl);
29 # Read the output of curl-config
31 open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config $what list\n";
35 # ignore curl-config --features not in curl's feature list
36 push @curl_config, lc($_);
40 @curl_config = sort @curl_config;
42 my $curlproto = join ' ', @curl;
43 my $curlconfigproto = join ' ', @curl_config;
45 my $different = $curlproto ne $curlconfigproto;
47 print "Mismatch in $what lists:\n";
48 print "curl: $curlproto\n";
49 print "curl-config: $curlconfigproto\n";