1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

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.
This commit is contained in:
Martin Ling 2020-02-07 10:39:00 +00:00
parent 7b0686ed58
commit 75a280a597

View File

@ -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.])
])