From f2c8b7a524735de7324d26409dfa0437badad222 Mon Sep 17 00:00:00 2001
From: Gareth Reakes <gareth@apache.org>
Date: Fri, 21 Feb 2003 09:18:56 +0000
Subject: [PATCH] patch to packageBinaries.pl so that it pays attention when
 you set the compiler to gcc under cygwin - by Neil Graham

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174783 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/packageBinaries.pl | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/packageBinaries.pl b/scripts/packageBinaries.pl
index dfb5812f6..025ba81c7 100644
--- a/scripts/packageBinaries.pl
+++ b/scripts/packageBinaries.pl
@@ -412,9 +412,10 @@ if ($platform eq "win64bit" )
 #     End of Itanium Builds.
 
 #
-#   WINDOWS builds happen here ...
+#   WINDOWS builds happen here, as long as they
+#     aren't using gcc...
 #
-if ($platform =~ m/Windows/  || $platform =~ m/CYGWIN/) {
+if ($platform =~ m/Windows/  || ($platform =~ m/CYGWIN/ && !($opt_c =~ m/gcc/))) {
 
     if ($opt_b eq "64")
     {
@@ -819,7 +820,7 @@ if ($platform =~ m/Windows/  || $platform =~ m/CYGWIN/) {
 #
 if ( ($platform =~ m/AIX/i)   || ($platform =~ m/HP-UX/i) || ($platform =~ m/BeOS/i) ||
      ($platform =~ m/SunOS/i) || ($platform =~ m/Linux/i) || ($platform =~ m/ptx/i) ||
-	 ($platform =~ m/Darwin/i) ) {
+	 ($platform =~ m/Darwin/i)  || ($platform =~ m/CYGWIN/ && ($opt_c =~ m/gcc/))) {
 
     # Echo the current PATH to see what compiler it picks up
     psystem ("echo PATH=$ENV{'PATH'}");
@@ -954,6 +955,10 @@ if ( ($platform =~ m/AIX/i)   || ($platform =~ m/HP-UX/i) || ($platform =~ m/BeO
         }
         $XMLINSTALL = $ENV{'XMLINSTALL'};
     }
+    if(($platform =~ m/CYGWIN/) && ($opt_c =~ m/gcc/)) {
+        $MAKE = "make";
+        $platform = "CYGWIN";
+    }
 
     # Set defaults for platform-independent options.
     if ($opt_m eq "")	{$opt_m = "inmem"; }   # In memory  message loader.
-- 
GitLab