--- configure.in.orig 2021-11-23 00:40:07.316133000 +0100 +++ configure.in 2021-11-23 11:19:52.252036000 +0100 @@ -1080,6 +1080,15 @@ ]) AS_CASE(["$target_os"], +[bsdsunix*], [ + AC_CACHE_CHECK([whether pthread should be enabled by default], + rb_cv_enable_pthread_default, + [AC_TRY_CPP([ + ], + rb_cv_enable_pthread_default=yes, + rb_cv_enable_pthread_default=no)]) + enable_pthread=$rb_cv_enable_pthread_default + ], [freebsd*], [ AC_CACHE_CHECK([whether pthread should be enabled by default], rb_cv_enable_pthread_default, @@ -1323,7 +1332,7 @@ AC_DEFINE(BROKEN_SETREUID, 1) AC_DEFINE(BROKEN_SETREGID, 1) ac_cv_sizeof_rlim_t=8], -[freebsd*], [ LIBS="-lm $LIBS" +[bsdsunix*|freebsd*], [ LIBS="-lm $LIBS" ac_cv_func_getpeername=no ac_cv_func_getsockname=no ac_cv_func_shutdown=no @@ -2300,7 +2309,7 @@ rb_cv_broken_glibc_ia64_erfc=no)]) AS_CASE([$rb_cv_broken_glibc_ia64_erfc],[yes],[ac_cv_func_erf=no]) -AS_CASE(["$target_os"],[freebsd*],[ +AS_CASE(["$target_os"],[bsdsunix*|freebsd*],[ AC_DEFINE(BROKEN_CLOSE) AC_REPLACE_FUNCS(close) ]) @@ -3419,7 +3428,7 @@ XLDFLAGS="$XLDFLAGS -Wl,-E" LIBPATHFLAG=" -L%1\$-s" rb_cv_dlopen=yes], - [freebsd*|dragonfly*], [ + [bsdsunix*|freebsd*|dragonfly*], [ : ${LDSHARED='$(CC) -shared'} if test "$rb_cv_binary_elf" = yes; then LDFLAGS="$LDFLAGS -rdynamic" @@ -3529,7 +3538,7 @@ fi AS_CASE(["$target_os"], -[freebsd*], [ +[bsdsunix*|freebsd*], [ AC_CHECK_LIB([procstat], [procstat_open_sysctl]) if test "x$ac_cv_lib_procstat_procstat_open_sysctl" = xyes; then AC_CHECK_FUNCS(procstat_getvmmap) @@ -3542,7 +3551,7 @@ AC_CHECK_LIB([execinfo], [backtrace]) AC_CHECK_HEADERS([libunwind.h]) fi], -[*-freebsd*|x86_64-netbsd*], [ +[*-bsdsunix*|*-freebsd*|x86_64-netbsd*], [ AC_CHECK_HEADERS([execinfo.h]) if test "x$ac_cv_header_execinfo_h" = xyes; then AC_CHECK_LIB([execinfo], [backtrace]) @@ -3870,7 +3879,7 @@ libdir_basename="${libdir_basename}"${multiarch+'/${arch}'} AS_CASE(["$target_os"], - [freebsd*|dragonfly*], [], + [bsdsunix*|freebsd*|dragonfly*], [], [ if test "$GCC" = yes; then RUBY_TRY_LDFLAGS([${linker_flag}--no-undefined], [no_undefined=yes], [no_undefined=no]) @@ -3893,7 +3902,7 @@ LIBRUBY_RELATIVE=yes fi ], - [freebsd*|dragonfly*], [ + [bsdsunix*|freebsd*|dragonfly*], [ SOLIBS='$(LIBS)' LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)' RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,${LIBRUBY_SO}']) @@ -4061,7 +4070,7 @@ DTRACE_REBUILD=yes LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)' ]) - AS_CASE("${target_os}", [freebsd*], [dnl + AS_CASE("${target_os}", [bsdsunix*|freebsd*], [dnl # FreeBSD's dtrace requires libelf LIBS="-lelf $LIBS" ])