From: Serge Hallyn Date: Sun, 25 Jul 2021 17:18:02 +0000 (+0000) Subject: Respect --enable-static=no in libsubid X-Git-Tag: 4.10~51^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F391%2Fhead;p=thirdparty%2Fshadow.git Respect --enable-static=no in libsubid libsubid's Makefile.am was always setting enable-shared in its LDFLAGS. Do that only if not building static. Closes #387 Signed-off-by: Serge Hallyn --- diff --git a/configure.ac b/configure.ac index 0f237cc1c..994836bda 100644 --- a/configure.ac +++ b/configure.ac @@ -321,6 +321,8 @@ if test "$with_sha_crypt" = "yes"; then AC_DEFINE(USE_SHA_CRYPT, 1, [Define to allow the SHA256 and SHA512 password encryption algorithms]) fi +AM_CONDITIONAL(ENABLE_SHARED, test "x$enable_shared" = "xyes") + AM_CONDITIONAL(USE_BCRYPT, test "x$with_bcrypt" = "xyes") if test "$with_bcrypt" = "yes"; then AC_DEFINE(USE_BCRYPT, 1, [Define to allow the bcrypt password encryption algorithm]) diff --git a/libsubid/Makefile.am b/libsubid/Makefile.am index 99308c1fe..8bba02ab4 100644 --- a/libsubid/Makefile.am +++ b/libsubid/Makefile.am @@ -1,6 +1,8 @@ lib_LTLIBRARIES = libsubid.la +if ENABLE_SHARED libsubid_la_LDFLAGS = -Wl,-soname,libsubid.so.@LIBSUBID_ABI@ \ -shared -version-info @LIBSUBID_ABI_MAJOR@ +endif libsubid_la_SOURCES = api.c pkginclude_HEADERS = subid.h