libphobos: Remove --enable-thread-lib configure option.
authorIain Buclaw <ibuclaw@gdcproject.org>
Wed, 8 Apr 2020 22:16:57 +0000 (00:16 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Wed, 8 Apr 2020 22:16:57 +0000 (00:16 +0200)
This is another old option that doesn't make sense as a configurable.
So the option has been removed, and the check for AC_SEARCH_LIBS moved
into the main configure.ac file.

libphobos/ChangeLog:

* configure: Regenerate.
* configure.ac: Use AC_SEARCH_LIBS for pthread_create.
* m4/druntime/libraries.m4: Remove DRUNTIME_LIBRARIES_THREAD.

libphobos/ChangeLog
libphobos/configure
libphobos/configure.ac
libphobos/m4/druntime/libraries.m4

index 216cd61..d8d37ef 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-09  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * configure: Regenerate.
+       * configure.ac: Use AC_SEARCH_LIBS for pthread_create.
+       * m4/druntime/libraries.m4: Remove DRUNTIME_LIBRARIES_THREAD.
+
 2020-04-08  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        * configure: Regenerate.
index 108518d..f458ad3 100755 (executable)
@@ -835,7 +835,6 @@ enable_libtool_lock
 with_gcc_major_version_only
 enable_werror
 enable_druntime_gc
-enable_thread_lib
 with_libatomic
 with_libbacktrace
 with_target_system_zlib
@@ -1485,9 +1484,6 @@ Optional Features:
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-werror         turns on -Werror [default=no]
   --enable-druntime-gc    enable D runtime garbage collector (default: yes)
-  --enable-thread-lib=<arg>
-                          specify linker option for the system thread library
-                          (default: autodetect)
   --enable-version-specific-runtime-libs
                           Specify that runtime libraries should be installed
                           in a compiler-specific directory
@@ -11646,7 +11642,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11649 "configure"
+#line 11645 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11752,7 +11748,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11755 "configure"
+#line 11751 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14480,17 +14476,7 @@ if test "$ac_res" != no; then :
 
 fi
 
-
-  enable_thread_lib=yes
-  # Check whether --enable-thread-lib was given.
-if test "${enable_thread_lib+set}" = set; then :
-  enableval=$enable_thread_lib;
-fi
-
-
-  if test "x$enable_thread_lib" = "xyes"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
 $as_echo_n "checking for library containing pthread_create... " >&6; }
 if ${ac_cv_search_pthread_create+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -14536,64 +14522,6 @@ if test "$ac_res" != no; then :
 
 fi
 
-
-else
-
-    if test "x$enable_thread_lib" = "xno"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread library" >&5
-$as_echo_n "checking for thread library... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
-$as_echo "disabled" >&6; }
-
-else
-
-      as_ac_Lib=`$as_echo "ac_cv_lib_$enable_thread_lib''_pthread_create" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -l$enable_thread_lib" >&5
-$as_echo_n "checking for pthread_create in -l$enable_thread_lib... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-l$enable_thread_lib  $LIBS"
-cat > conftest.$ac_ext <<_ACEOF
-module mod;
- extern(C) int pthread_create();
-
-extern(C) int main() {
-  pthread_create(); return 0;
-}
-_ACEOF
-if ac_fn_d_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
-else
-  eval "$as_ac_Lib=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-eval ac_res=\$$as_ac_Lib
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_LIB$enable_thread_lib" | $as_tr_cpp` 1
-_ACEOF
-
-  LIBS="-l$enable_thread_lib $LIBS"
-
-else
-
-        as_fn_error $? "Thread library not found" "$LINENO" 5
-
-fi
-
-
-fi
-
-fi
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cosf" >&5
 $as_echo_n "checking for library containing cosf... " >&6; }
 if ${ac_cv_search_cosf+:} false; then :
index 594d200..e6148f0 100644 (file)
@@ -133,7 +133,7 @@ DRUNTIME_LIBRARIES_CLIB
 WITH_LOCAL_DRUNTIME([
   AC_LANG_PUSH([D])
   AC_SEARCH_LIBS([malloc], [c])
-  DRUNTIME_LIBRARIES_THREAD
+  AC_SEARCH_LIBS([pthread_create], [pthread])
   AC_SEARCH_LIBS([cosf], [m])
   AC_SEARCH_LIBS([clock_gettime], [rt])
   DRUNTIME_ENABLE_ATOMIC_BUILTINS
index a7aab4d..9e8e210 100644 (file)
@@ -3,32 +3,6 @@
 #
 
 
-# DRUNTIME_LIBRARIES_THREAD
-# -------------------------
-# Allow specifying the thread library to link with or autodetect
-# Add thread library to LIBS if necessary.
-AC_DEFUN([DRUNTIME_LIBRARIES_THREAD],
-[
-  enable_thread_lib=yes
-  AC_ARG_ENABLE(thread-lib,
-    AC_HELP_STRING([--enable-thread-lib=<arg>],
-                   [specify linker option for the system thread library (default: autodetect)]))
-
-  AS_IF([test "x$enable_thread_lib" = "xyes"], [
-    AC_SEARCH_LIBS([pthread_create], [pthread])
-  ], [
-    AS_IF([test "x$enable_thread_lib" = "xno"], [
-      AC_MSG_CHECKING([for thread library])
-      AC_MSG_RESULT([disabled])
-    ], [
-      AC_CHECK_LIB([$enable_thread_lib], [pthread_create], [], [
-        AC_MSG_ERROR([Thread library not found])
-      ])
-    ])
-  ])
-])
-
-
 # DRUNTIME_LIBRARIES_DLOPEN
 # -----------------------
 # Autodetect and add dl library to LIBS if necessary.