From 75a280a59701f4adb6ab7d32921585aeefced726 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Fri, 7 Feb 2020 10:39:00 +0000 Subject: [PATCH] configure.ac: remove broken handling for cygwin as $host_os. I don't think these two mentions of cygwin ever did anything useful. In fact they stop libserialport being buildable under cygwin. The first one caused builds on cygwin to try to build windows.c, which uses the Win32 API, not the POSIX layer provided by cygwin. The second asserts that enumeration and port metadata are supported on cygwin, but that isn't the case. Without these matches for cygwin as $host_os, libserialport builds and works just fine on old-school cygwin with the original mingw32. The only reason that MSYS2 worked better is that it uses "msys" as the $host_os identifier, not cygwin. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fa40460..4d643e2 100644 --- a/configure.ac +++ b/configure.ac @@ -88,7 +88,7 @@ AC_DEFINE_UNQUOTED([SP_LIB_VERSION_AGE], [$SP_LIB_VERSION_AGE], [.]) AC_DEFINE_UNQUOTED([SP_LIB_VERSION_STRING], ["$SP_LIB_VERSION"], [.]) AM_CONDITIONAL([LINUX], [test -z "${host_os##linux*}" || test -z "${host_os##uclinux*}"]) -AM_CONDITIONAL([WIN32], [test -z "${host_os##mingw*}" || test -z "${host_os##cygwin*}"]) +AM_CONDITIONAL([WIN32], [test -z "${host_os##mingw*}"]) AM_CONDITIONAL([MACOSX], [test -z "${host_os##darwin*}"]) AM_CONDITIONAL([FREEBSD], [test -z "${host_os##freebsd*}"]) @@ -101,7 +101,7 @@ AC_SUBST([SP_PKGLIBS]) AM_COND_IF([MACOSX], [AC_CHECK_HEADER([IOKit/IOKitLib.h], [], [AC_MSG_ERROR([IOKit/IOKitLib.h not found])])]) -AS_CASE([$host_os], [linux*|darwin*|mingw*|cygwin*|freebsd*],, [ +AS_CASE([$host_os], [linux*|darwin*|mingw*|freebsd*],, [ AC_DEFINE([NO_ENUMERATION], [1], [Enumeration is unsupported.]) AC_DEFINE([NO_PORT_METADATA], [1], [Port metadata is unavailable.]) ])