0001-Add-support-for-MSYS2.patch
text/plain
Patch
Format: format-patch
Series: patch 0001
Subject: Add support for MSYS2
| File | + | − |
|---|---|---|
| configure | 5 | 7 |
| configure.in | 5 | 7 |
From 676e1392705e017cc5ae17e0f35952f8a1405eab Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Sun, 18 Aug 2019 00:17:16 +0200
Subject: [PATCH 1/3] Add support for MSYS2
It's basically a variant of Cygwin, so use that template.
---
configure | 12 +++++-------
configure.in | 12 +++++-------
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/configure b/configure
index 3d9bd0bdf8..7f86a7e5ff 100755
--- a/configure
+++ b/configure
@@ -2946,7 +2946,7 @@ else
case $host_os in
aix*) template=aix ;;
- cygwin*) template=cygwin ;;
+ cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
freebsd*) template=freebsd ;;
@@ -15843,24 +15843,22 @@ fi
-case $host_os in
+if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
# Cygwin and (apparently, based on test results) Mingw both
# have a broken strtof(), so substitute the same replacement
# code we use with VS2013. That's not a perfect fix, since
# (unlike with VS2013) it doesn't avoid double-rounding, but
# we have no better options. To get that, though, we have to
# force the file to be compiled despite HAVE_STRTOF.
- mingw*|cygwin*)
- case " $LIBOBJS " in
+ case " $LIBOBJS " in
*" strtof.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strtof.$ac_objext"
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
$as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
- ;;
-esac
+fi
case $host_os in
diff --git a/configure.in b/configure.in
index 34aea0b4ac..797a9db01d 100644
--- a/configure.in
+++ b/configure.in
@@ -59,7 +59,7 @@ PGAC_ARG_REQ(with, template, [NAME], [override operating system template],
case $host_os in
aix*) template=aix ;;
- cygwin*) template=cygwin ;;
+ cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
freebsd*) template=freebsd ;;
@@ -1743,18 +1743,16 @@ AC_REPLACE_FUNCS(m4_normalize([
strtof
]))
-case $host_os in
+if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
# Cygwin and (apparently, based on test results) Mingw both
# have a broken strtof(), so substitute the same replacement
# code we use with VS2013. That's not a perfect fix, since
# (unlike with VS2013) it doesn't avoid double-rounding, but
# we have no better options. To get that, though, we have to
# force the file to be compiled despite HAVE_STRTOF.
- mingw*|cygwin*)
- AC_LIBOBJ([strtof])
- AC_MSG_NOTICE([On $host_os we will use our strtof wrapper.])
- ;;
-esac
+ AC_LIBOBJ([strtof])
+ AC_MSG_NOTICE([On $host_os we will use our strtof wrapper.])
+fi
case $host_os in
--
2.24.0