summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Klimov <jimklimov@gmail.com>2022-08-08 14:53:25 +0200
committerJoe Orton <jorton@apache.org>2022-10-05 09:40:40 +0100
commit9dda368286436d9076b1783a3b1de59a5cde7234 (patch)
treea726bc4d706b42618658f962e1c71089ce7f5a86
parent886ff5f17c14a6e9535f38b8f2ea93195660cf97 (diff)
downloadneon-git-9dda368286436d9076b1783a3b1de59a5cde7234.tar.gz
macros/neon.m4: detect cross-building (e.g. in Linux) for mingw (Windows) output products
-rw-r--r--macros/neon.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/macros/neon.m4 b/macros/neon.m4
index d2e2c91..5838d7f 100644
--- a/macros/neon.m4
+++ b/macros/neon.m4
@@ -459,6 +459,15 @@ AC_DEFUN([NE_CHECK_OS], [
# Check for Darwin, which needs extra cpp and linker flags.
AC_CACHE_CHECK([for uname], ne_cv_os_uname, [
ne_cv_os_uname=`uname -s 2>/dev/null`
+ dnl # Check with autoconf cross-build request, particularly the
+ dnl # "host" (system type where build program will be executed)
+ dnl # NOTE: Quick-and-dirty approach to handle building libneon
+ dnl # for Windows using Linux environments with mingw packages:
+ dnl # other code in this script checks for "MINGW*" matches.
+ dnl # ./configure --prefix=/usr/i686-w64-mingw32 --host=i686-w64-mingw32
+ case x"$host" in
+ x*mingw*) ne_cv_os_uname="MINGW-$host" ;;
+ esac
])
if test "$ne_cv_os_uname" = "Darwin"; then