]> Savannah Git Hosting - gnulib.git/commitdiff
threadlib: Avoid multi-dimensional pattern matching.
authorBruno Haible <bruno@clisp.org>
Mon, 28 Apr 2025 10:55:11 +0000 (12:55 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 28 Apr 2025 10:55:11 +0000 (12:55 +0200)
* m4/threadlib.m4: Change multi-dimensional AS_CASE back to several
one-dimensional tests.

ChangeLog
m4/threadlib.m4

index 567b29109af147438be91b168bea535d8ac4a23f..04a7c7e0235c8376cffa606e60689116c4996118 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-04-28  Bruno Haible  <bruno@clisp.org>
 
+       threadlib: Avoid multi-dimensional pattern matching.
+       * m4/threadlib.m4: Change multi-dimensional AS_CASE back to several
+       one-dimensional tests.
+
        threadlib: Correct indentation.
        * m4/threadlib.m4: Put cases on a fresh line. Correct indentation.
 
index 37def278f66619be9599531e862b2842b175272d..a0df29e2f07a13e6b226accca31efa4442ae563d 100644 (file)
@@ -1,5 +1,5 @@
 # threadlib.m4
-# serial 44
+# serial 45
 dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -529,7 +529,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
         AS_IF([test $gl_pthread_api = yes], [
           AS_IF([test "$gl_use_threads" = isoc+posix &&
                  test "$gl_have_isoc_threads" = yes], [
-            gl_threads_api=isoc+posix
+            gl_threads_api="isoc+posix"
             AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1],
               [Define if the combination of the ISO C and POSIX multithreading APIs can be used.])
             LIBTHREAD= LTLIBTHREAD=
@@ -564,16 +564,16 @@ AC_DEFUN([gl_THREADLIB_BODY],
           ])
         ])
        ])
-    AS_CASE([$gl_threads_api@$gl_use_threads@$gl_have_isoc_threads],
-      [none@isoc@yes],
-       [
+    AS_IF([test $gl_threads_api = none], [
+      AS_IF([test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes], [
         gl_STDTHREADLIB_BODY
         LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
         LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
         gl_threads_api=isoc
         AC_DEFINE([USE_ISOC_THREADS], [1],
           [Define if the ISO C multithreading library can be used.])
-       ])
+      ])
+    ])
     AS_IF([test $gl_threads_api = none], [
       # The "win32" is for backward compatibility.
       AS_CASE([$gl_use_threads],