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 =~ /\w+: (.*)$/;
24 # These features are not supported by curl-config
25 @curl = grep(!/^(Debug|Largefile|CharConv|GSS-Negotiate|SPNEGO)$/i, @curl);
28 # Read the output of curl-config
30 open(CURLCONFIG
, "sh $ARGV[0] --$what|") || die "Can't get curl-config $what list\n";
34 push @curl_config, lc($_);
38 @curl_config = sort @curl_config;
40 my $curlproto = join ' ', @curl;
41 my $curlconfigproto = join ' ', @curl_config;
43 my $different = $curlproto ne $curlconfigproto;
45 print "Mismatch in $what lists:\n";
46 print "curl: $curlproto\n";
47 print "curl-config: $curlconfigproto\n";