build: Move Windows OS detection to the OS features section This was placed here to make use of the same AS_CASE, but it does not really fit with the section. Move it to the more appropriate place, and detangle the AS_CASE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/configure.ac b/configure.ac
index 068bd92..44717c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,14 @@ int symbol(void) { return 0; }
AM_CONDITIONAL([HAVE_LINKER_VERSION_SCRIPT],
[test "x$libbsd_cv_version_script" = "xyes"])
+is_windows=no
+AS_CASE([$host_os],
+ [mingw*], [
+ is_windows=yes
+ ],
+)
+AM_CONDITIONAL([OS_WINDOWS], [test "x$is_windows" = "xyes"])
+
# Checks for programs.
AC_CHECK_TOOL([OBJDUMP], [objdump])
AC_PROG_CC
@@ -143,7 +151,6 @@ LIBS="$saved_LIBS"
AM_CONDITIONAL([NEED_TRANSPARENT_LIBMD],
[test "x$need_transparent_libmd" = "xyes"])
-is_windows=no
AS_CASE([$host_os],
[*-gnu*], [
# In old glibc versions (< 2.17) clock_gettime() is in librt.
@@ -155,11 +162,7 @@ AS_CASE([$host_os],
])
LIBS="$saved_LIBS"
],
- [mingw*], [
- is_windows=yes
- ],
)
-AM_CONDITIONAL([OS_WINDOWS], [test "x$is_windows" = "xyes"])
# Checks for header files.
AC_CHECK_HEADERS([\