1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

When generated, display libcurl.pc and libcares.pc

This commit is contained in:
Yang Tse 2009-04-30 17:06:58 +00:00
parent 6e8c73fd38
commit 96ea49870c

View File

@ -201,6 +201,13 @@ sub logit($) {
}
}
sub logit_spaced($) {
my $text=$_[0];
if ($text) {
print "\ntestcurl: $text\n\n";
}
}
sub mydie($){
my $text=$_[0];
logit "$text";
@ -516,8 +523,19 @@ if ($configurebuild) {
}
}
if(-f "./libcurl.pc") {
logit_spaced "display libcurl.pc";
if(open(F, "<./libcurl.pc")) {
while(<F>) {
my $ll = $_;
print $ll if(($ll !~ /^ *#/) && ($ll !~ /^ *$/));
}
close(F);
}
}
if(-f "./include/curl/curlbuild.h") {
logit "display include/curl/curlbuild.h";
logit_spaced "display include/curl/curlbuild.h";
if(open(F, "<./include/curl/curlbuild.h")) {
while(<F>) {
my $ll = $_;
@ -530,7 +548,7 @@ else {
mydie "no curlbuild.h created/found";
}
logit "display lib/config$confsuffix.h";
logit_spaced "display lib/config$confsuffix.h";
open(F, "lib/config$confsuffix.h") or die "lib/config$confsuffix.h: $!";
while (<F>) {
print if /^ *#/;
@ -538,10 +556,22 @@ while (<F>) {
close(F);
if (grepfile("define USE_ARES", "lib/config$confsuffix.h")) {
print "\n";
logit "setup to build ares";
if(-f "./ares/libcares.pc") {
logit_spaced "display ares/libcares.pc";
if(open(F, "<./ares/libcares.pc")) {
while(<F>) {
my $ll = $_;
print $ll if(($ll !~ /^ *#/) && ($ll !~ /^ *$/));
}
close(F);
}
}
if(-f "./ares/ares_build.h") {
logit "display ares/ares_build.h";
logit_spaced "display ares/ares_build.h";
if(open(F, "<./ares/ares_build.h")) {
while(<F>) {
my $ll = $_;
@ -554,7 +584,7 @@ if (grepfile("define USE_ARES", "lib/config$confsuffix.h")) {
mydie "no ares_build.h created/found";
}
logit "display ares/config$confsuffix.h";
logit_spaced "display ares/config$confsuffix.h";
if(open(F, "ares/config$confsuffix.h")) {
while (<F>) {
print if /^ *#/;
@ -562,6 +592,7 @@ if (grepfile("define USE_ARES", "lib/config$confsuffix.h")) {
close(F);
}
print "\n";
logit "build ares";
chdir "ares";