From 78caf4b0e71e66918748427c1e1d9f9dade9e970 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 13 May 2017 21:35:34 +0000 Subject: 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 --- buildtools/configure.pl | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'buildtools') 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 + ; + } + } +} + + + 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); -- cgit 1.4.1