Extend the OS detection to non Windows platforms

At the moment, only the Windows platform needs some special handling,
but this can easily be extended to detect and handle other platforms as
well.
This commit is contained in:
Jef Driesen 2021-02-21 19:47:42 +01:00
parent bf482f6025
commit 6bb13a564f

View File

@ -72,18 +72,18 @@ AM_CONDITIONAL([HAVE_MANDOC],[test -n "$MANDOC"])
# Enable automake silent build rules. # Enable automake silent build rules.
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# Checks for native Windows. # Checks for operating system.
AC_MSG_CHECKING([for native Win32]) AC_MSG_CHECKING([for operating system])
case "$host" in case "$host" in
*-*-mingw*) *-*-mingw*)
os_win32=yes platform=windows
;; ;;
*) *)
os_win32=no platform=default
;; ;;
esac esac
AC_MSG_RESULT([$os_win32]) AC_MSG_RESULT([$platform])
AM_CONDITIONAL([OS_WIN32], [test "$os_win32" = "yes"]) AM_CONDITIONAL([OS_WIN32], [test "$platform" = "windows"])
DEPENDENCIES="" DEPENDENCIES=""
@ -192,7 +192,7 @@ AX_APPEND_COMPILE_FLAGS([ \
]) ])
# Windows specific compiler options. # Windows specific compiler options.
AS_IF([test "$os_win32" = "yes"], [ AS_IF([test "$platform" = "windows"], [
AX_APPEND_COMPILE_FLAGS([-Wno-pedantic-ms-format]) AX_APPEND_COMPILE_FLAGS([-Wno-pedantic-ms-format])
]) ])