about summary refs log tree commit diff
path: root/buildtools
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-05-13 21:35:34 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-05-13 21:35:34 +0000
commit78caf4b0e71e66918748427c1e1d9f9dade9e970 (patch)
tree8307c4443f3adb9a880fd9734147c01ee5931191 /buildtools
parent268fe97b9555aeee769e6bed36b10ccd3c8a10e8 (diff)
downloadnetpbm-mirror-78caf4b0e71e66918748427c1e1d9f9dade9e970.tar.gz
netpbm-mirror-78caf4b0e71e66918748427c1e1d9f9dade9e970.tar.xz
netpbm-mirror-78caf4b0e71e66918748427c1e1d9f9dade9e970.zip
Deal with MinGW failure to handl _XOPEN_SOURCE == null
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2973 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'buildtools')
-rwxr-xr-xbuildtools/configure.pl39
1 files changed, 39 insertions, 0 deletions
diff --git a/buildtools/configure.pl b/buildtools/configure.pl
index 93045b77..4e6ff21a 100755
--- a/buildtools/configure.pl
+++ b/buildtools/configure.pl
@@ -442,6 +442,18 @@ sub askAboutDjgpp() {
 
 
 
+sub askAboutMingw() {
+
+    print("Are you building for the MinGW environment?\n");
+    print("\n");
+    
+    my $retval = promptYesNo("n");
+
+    return $retval;
+}
+
+
+
 sub computePlatformDefault($) {
 
     my ($defaultP) = @_;
@@ -556,6 +568,29 @@ sub getPlatform() {
 
 
 
+sub warnMingwXopenSource($) {
+    my ($subplatform) = @_;
+
+    if ($subplatform ne 'cygwin' && $subplatform ne 'djgpp') {
+        my $mingw = askAboutMingw();
+
+        if ($mingw) {
+            print << 'EOF';
+
+MinGW does not implement enough of the standard on which Netpbm relies to
+build out-of-the-box, but there is a trivial way to add the needed capability
+to MinGW.  See file doc/INSTALL for details.
+
+Press ENTER to continue.
+
+EOF
+            <STDIN>;
+        }
+    }
+}
+
+
+
 sub getGccChoiceFromUser($) {
     my ($platform) = @_;
 
@@ -2084,6 +2119,10 @@ if ($platform eq "NONE") {
     exit;
 }
 
+if ($platform eq 'WINDOWS') {
+    warnMingwXopenSource($subplatform);
+}
+
 getCompiler($platform, $subplatform, \my $compiler);
 
 getLinker($platform, $compiler, \my $baseLinker, \my $linkViaCompiler);