From 96ea49870c7fb1c3c967166814a1903bee92fef3 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 30 Apr 2009 17:06:58 +0000 Subject: When generated, display libcurl.pc and libcares.pc --- tests/testcurl.pl | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to 'tests') 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() { + 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() { 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 () { print if /^ *#/; @@ -538,10 +556,22 @@ while () { 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() { + 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() { 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 () { print if /^ *#/; @@ -562,6 +592,7 @@ if (grepfile("define USE_ARES", "lib/config$confsuffix.h")) { close(F); } + print "\n"; logit "build ares"; chdir "ares"; -- cgit v1.2.3