$NetBSD: patch-configure.ac,v 1.2 2022/03/31 12:16:24 jperkin Exp $ Add support for blocklist(blacklist). Fix linker flags on SunOS. --- configure.ac.orig 2022-03-07 08:48:03.000000000 +0000 +++ configure.ac @@ -721,6 +721,16 @@ AC_CHECK_FUNCS([sched_yield pthread_yiel AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np]) AC_CHECK_HEADERS([pthread_np.h], [], [], [#include ]) +# libblocklist(libblacklist) +AC_MSG_CHECKING(for libblocklist) +AC_CHECK_HEADER([blocklist.h], + [AC_DEFINE([HAVE_BLOCKLIST_H], [1]) + AC_CHECK_LIB(blocklist, blocklist)], + [AC_MSG_CHECKING(for libblacklist) + AC_CHECK_HEADER([blacklist.h], + [AC_DEFINE([HAVE_BLACKLIST_H], [1]) + AC_CHECK_LIB(blacklist, blacklist)])]) + # libuv AC_MSG_CHECKING(for libuv) PKG_CHECK_MODULES([LIBUV], [libuv >= 1.0.0], [], @@ -1388,6 +1398,18 @@ AS_CASE([$with_libxml2], [AC_DEFINE([HAVE_LIBXML2], [1], [Use libxml2 library])])], [AC_MSG_ERROR([Specifying libxml2 installation path is not supported, adjust PKG_CONFIG_PATH instead])]) +# blocklist +AC_ARG_WITH([blocklist], + [AS_HELP_STRING([--with-blocklist], + [enable blocklist support [yes|no|detect] (default is detect)])], + [], [with_blocklist="$with_blocklist"]) + +# blacklist +AC_ARG_WITH([blacklist], + [AS_HELP_STRING([--with-blacklist], + [enable blacklist support [yes|no|detect] (default is detect)])], + [], [with_blacklist="$with_blacklist"]) + # # DEPRECATED # @@ -2523,9 +2545,9 @@ AS_IF([test "$with_dlopen" = "yes"], ]) ], [*-solaris*],[ - SO_CFLAGS="-KPIC" - SO_LDFLAGS="-G -z text" - SO_LD="ld" + SO_CFLAGS="-fPIC" + SO_LDFLAGS="-Xcompiler -shared" + SO_LD="${CC}" ], [ia64-hp-hpux*],[ SO_CFLAGS="+z"