aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-04-30 17:06:58 +0000
committerYang Tse <yangsita@gmail.com>2009-04-30 17:06:58 +0000
commit96ea49870c7fb1c3c967166814a1903bee92fef3 (patch)
tree043963046afc3e34a3290c36e06ae189bd644863 /tests
parent6e8c73fd38940cc2998b8c1b406122249397011e (diff)
When generated, display libcurl.pc and libcares.pc
Diffstat (limited to 'tests')
-rwxr-xr-xtests/testcurl.pl39
1 files changed, 35 insertions, 4 deletions
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index b4246ec4c..ef60567d5 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -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";