From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Tue, 1 Aug 2023 20:45:12 +0200 Subject: [PATCH] libtool: Enable shared library support for SerenityOS For some odd reason, libtool handles the configuration for shared libraries entirely statically and in its configure script. If no shared library support is "present", building shared libraries is disabled entirely. Fix that by just adding the appropriate configuration options for `serenity`. This allows us to finally create dynamic libraries automatically using libtool, without having to manually link the static library into a shared library. This patch here is a bit more elaborate for other ports, as libintl's configure includes the code for detecting dynamic linker characteristics twice, and it also queries the C++ compiler for shared library support. Co-Authored-By: Daniel Bertalan --- gettext-runtime/configure | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gettext-runtime/configure b/gettext-runtime/configure index 56cc8e17be7ed390b4a692dde31434dceff45a94..268c7c572abde069814834be25d08175e51f195e 100755 --- a/gettext-runtime/configure +++ b/gettext-runtime/configure @@ -10219,6 +10219,10 @@ tpf*) os2*) lt_cv_deplibs_check_method=pass_all ;; + +serenity*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -13707,6 +13711,10 @@ lt_prog_compiler_static= lt_prog_compiler_static='-Bstatic' ;; + serenity*) + lt_prog_compiler_can_build_shared=yes + ;; + *) lt_prog_compiler_can_build_shared=no ;; @@ -15239,6 +15247,10 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } hardcode_shlibpath_var=no ;; + serenity*) + ld_shlibs=yes + ;; + *) ld_shlibs=no ;; @@ -16311,6 +16323,17 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; +serenity*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}${versuffix} ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}${major}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; + *) dynamic_linker=no ;; @@ -18601,6 +18624,10 @@ fi ld_shlibs_CXX=no ;; + serenity*) + ld_shlibs_CXX=yes + ;; + *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -20300,6 +20327,17 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; +serenity*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}${versuffix} ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}${major}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; + *) dynamic_linker=no ;;