]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
build: Move Windows OS detection to the OS features section
authorGuillem Jover <guillem@hadrons.org>
Fri, 7 Apr 2023 21:43:55 +0000 (23:43 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 17 Apr 2023 02:12:42 +0000 (04:12 +0200)
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.

configure.ac

index 068bd92af09c0c34a3c7ef744488d89bb7a89c24..44717c2be7936c05dc4c450a03d2ccda8fcdd1cd 100644 (file)
@@ -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([\