From c8fb1ceac882bbabf0a04ee54594c5715759c6b6 Mon Sep 17 00:00:00 2001
From: Alessandro Ranellucci <aar@cpan.org>
Date: Tue, 12 Nov 2013 13:35:36 +0100
Subject: [PATCH] Add path to expat on Windows to benefit from faster AMF
 parsing

---
 Build.PL | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Build.PL b/Build.PL
index ffa225076..b5010258c 100644
--- a/Build.PL
+++ b/Build.PL
@@ -100,7 +100,11 @@ EOF
     my %modules = (%prereqs, %recommends);
     foreach my $module (sort keys %modules) {
         my $version = $modules{$module};
-        my $res = system $cpanm, "$module~$version";
+        my @cmd = ($cpanm, "$module~$version");
+        if ($module eq 'XML::SAX::ExpatXS' && $^O eq 'MSWin32') {
+            push @cmd, '--configure-args="EXPATLIBPATH=C:\dev\CitrusPerl\mingw64\lib EXPATINCPATH=C:\dev\CitrusPerl\mingw64\include"';
+        }
+        my $res = system @cmd;
         if ($res != 0) {
             if (exists $prereqs{$module}) {
                 push @missing_prereqs, $module;