mirror of https://github.com/moparisthebest/curl
testcurl.pl: allow non in-tree c-ares enabled autobuild
This commit is contained in:
parent
069b280f63
commit
b3ebfc2b74
|
@ -73,7 +73,7 @@ use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
|
||||||
$timestamp $notes);
|
$timestamp $notes);
|
||||||
|
|
||||||
# version of this script
|
# version of this script
|
||||||
$version='2012-04-13';
|
$version='2012-07-02';
|
||||||
$fixed=0;
|
$fixed=0;
|
||||||
|
|
||||||
# Determine if we're running from git or a canned copy of curl,
|
# Determine if we're running from git or a canned copy of curl,
|
||||||
|
@ -357,14 +357,20 @@ $str1066os = undef;
|
||||||
# off that path from all possible logs and error messages etc.
|
# off that path from all possible logs and error messages etc.
|
||||||
$pwd = getcwd();
|
$pwd = getcwd();
|
||||||
|
|
||||||
|
my $have_embedded_ares = 0;
|
||||||
|
|
||||||
if (-d $CURLDIR) {
|
if (-d $CURLDIR) {
|
||||||
if ($git && -d "$CURLDIR/.git") {
|
if ($git && -d "$CURLDIR/.git") {
|
||||||
logit "$CURLDIR is verified to be a fine git source dir";
|
logit "$CURLDIR is verified to be a fine git source dir";
|
||||||
# remove the generated sources to force them to be re-generated each
|
# remove the generated sources to force them to be re-generated each
|
||||||
# time we run this test
|
# time we run this test
|
||||||
unlink "$CURLDIR/src/hugehelp.c";
|
unlink "$CURLDIR/src/hugehelp.c";
|
||||||
|
# find out if curl source dir has an in-tree c-ares repo
|
||||||
|
$have_embedded_ares = 1 if (-f "$CURLDIR/ares/GIT-INFO");
|
||||||
} elsif (!$git && -f "$CURLDIR/tests/testcurl.pl") {
|
} elsif (!$git && -f "$CURLDIR/tests/testcurl.pl") {
|
||||||
logit "$CURLDIR is verified to be a fine daily source dir"
|
logit "$CURLDIR is verified to be a fine daily source dir"
|
||||||
|
# find out if curl source dir has an in-tree c-ares extracted tarball
|
||||||
|
$have_embedded_ares = 1 if (-f "$CURLDIR/ares/ares_build.h");
|
||||||
} else {
|
} else {
|
||||||
mydie "$CURLDIR is not a daily source dir or checked out from git!"
|
mydie "$CURLDIR is not a daily source dir or checked out from git!"
|
||||||
}
|
}
|
||||||
|
@ -593,7 +599,8 @@ while (<F>) {
|
||||||
}
|
}
|
||||||
close(F);
|
close(F);
|
||||||
|
|
||||||
if (grepfile("^#define USE_ARES", "lib/$confheader")) {
|
if (($have_embedded_ares) &&
|
||||||
|
(grepfile("^#define USE_ARES", "lib/$confheader"))) {
|
||||||
print "\n";
|
print "\n";
|
||||||
logit "setup to build ares";
|
logit "setup to build ares";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue