]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Respect --enable-static=no in libsubid 391/head
authorSerge Hallyn <shallyn@cisco.com>
Sun, 25 Jul 2021 17:18:02 +0000 (17:18 +0000)
committerSerge Hallyn <serge@hallyn.com>
Sun, 25 Jul 2021 17:21:55 +0000 (12:21 -0500)
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 <shallyn@cisco.com>
configure.ac
libsubid/Makefile.am

index 0f237cc1cdfe8cb42c2ae81ec1b6cee9721b30ca..994836bda38e3c18e5f0b4afccae6a4c6d990737 100644 (file)
@@ -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])
index 99308c1fe21bfca539b33674767f83b945fbcdaa..8bba02ab4878a02e2ba086ffabf021dc47b38bc0 100644 (file)
@@ -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