]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
threadlib: Omit unsupported configure option.
authorBruno Haible <bruno@clisp.org>
Mon, 15 Sep 2025 16:09:03 +0000 (18:09 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 15 Sep 2025 16:09:33 +0000 (18:09 +0200)
Reported by Michael Osipov <michael.osipov@innomotics.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-09/msg00009.html>.

* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): If libtool is in use, don't
display the --disable-threads option.

ChangeLog
m4/threadlib.m4

index 3957120bbfda479f93145a51524c0e2bc9b65a0a..616aa748e7a4ee675851bf6960185e1da6a58ea2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-09-15  Bruno Haible  <bruno@clisp.org>
+
+       threadlib: Omit unsupported configure option.
+       Reported by Michael Osipov <michael.osipov@innomotics.com> in
+       <https://lists.gnu.org/archive/html/bug-gettext/2025-09/msg00009.html>.
+       * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): If libtool is in use, don't
+       display the --disable-threads option.
+
 2025-09-15  Bruno Haible  <bruno@clisp.org>
 
        pagealign_alloc tests: Fix link error.
index c12729a9489886fc61a26cdfac1a3e8fca855285..d38238c837d3e371e011393822396d9c7661c178 100644 (file)
@@ -1,5 +1,5 @@
 # threadlib.m4
-# serial 47
+# serial 48
 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,
@@ -434,9 +434,14 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
   dnl gl_use_winpthreads_default defaults to "no", because in mingw 10, like
   dnl in mingw 5, the use of libwinpthread still makes test-pthread-tss crash.
   m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no])
+  dnl Don't display the --disable-threads option
+  dnl   - if the package builds one or more libraries, because libraries must
+  dnl     always be multithread-safe (as far as possible),
+  dnl   - if the package defines gl_THREADLIB_DEFAULT_NO, because the option
+  dnl     would then be a no-op.
   AC_ARG_ENABLE([threads],
-AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AS_HELP_STRING([[--disable-threads]], [build without multithread safety])]),
+AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([LT_INIT], [], [m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([[--disable-threads]], [build without multithread safety])])]),
     [gl_use_threads=$enableval],
     [if test -n "$gl_use_threads_default"; then
        gl_use_threads="$gl_use_threads_default"