diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index 12b64af..3e49ac7 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -65,7 +65,7 @@ use Cwd;
 
 use vars qw($version $fixed $infixed $CURLDIR $git $pwd $build $buildlog
             $buildlogname $configurebuild $targetos $confsuffix $binext
-            $libext);
+            $libext $confheaderfile);
 
 use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
             $extvercmd $nogitpull $nobuildconf $crosscompile
@@ -133,6 +133,7 @@ while ($ARGV[0]) {
 # Do the platform-specific stuff here
 $configurebuild = 1;
 $confsuffix = '';
+$confheaderfile = "lib/curl_config.h";
 $binext = '';
 $libext = '.la'; # .la since both libcurl and libcares are made with libtool
 if ($^O eq 'MSWin32' || $targetos) {
@@ -172,6 +173,7 @@ if (($^O eq 'MSWin32' || $^O eq 'msys') &&
 
   $configurebuild = 0;
   $confsuffix = '-win32';
+  $confheaderfile = "lib/config$confsuffix.h";
 }
 
 $ENV{LC_ALL}="C" if (($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
@@ -567,14 +569,14 @@ else {
   mydie "no curlbuild.h created/found";
 }
 
-logit_spaced "display lib/curl_config$confsuffix.h";
-open(F, "lib/curl_config$confsuffix.h") or die "lib/curl_config$confsuffix.h: $!";
+logit_spaced "display $confheaderfile";
+open(F, "$confheaderfile") or die "$confheaderfile: $!";
 while (<F>) {
   print if /^ *#/;
 }
 close(F);
 
-if (grepfile("^#define USE_ARES", "lib/curl_config$confsuffix.h")) {
+if (grepfile("^#define USE_ARES", "$confheaderfile")) {
   print "\n";
   logit "setup to build ares";
 
