Do not build shared-only libs for --disable-shared 27/13927/4
authorAndrew Deason <adeason@sinenomine.net>
Wed, 23 Oct 2019 20:46:16 +0000 (15:46 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 28 Dec 2019 01:49:51 +0000 (20:49 -0500)
commit10d176afd23bbf684017a7946dffb1d592ea04fa
tree64ff20dcc4f037c9a825a860a61aad80895bc221
parentd0941e81b2f1f499cebb57d8a81d82802913d9be
Do not build shared-only libs for --disable-shared

Commit 0f1e54c4 (Pass -shared when linking some shared libraries)
changed some of our linking rules to pass -shared to libtool when
linking. When building with the --disable-shared configure option,
this causes those linker rules to fail, since shared libraries are
disabled. Before commit 0f1e54c4, we could build with --disable-shared
successfully.

To allow us to build again with --disable-shared, just don't build the
relevant shared-only libraries at all, when shared libraries are
disabled. To accomplish this, introduce a new substitution variable,
SHARED_ONLY, which allows certain lines in Makefiles to become
commented-out when shared libraries are disabled. Update all of the
shared-only libraries to be built conditionally based on this
variable.

Except for libuafs.la, which appears to be not referenced by anything.
Just remove the rules for that instead.

Change-Id: I82084a08d2f9c12ca438bd7b1626e1376159c975
Reviewed-on: https://gerrit.openafs.org/13927
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/cf/options.m4
src/crypto/hcrypto/Makefile.in
src/kopenafs/Makefile.in
src/libafsauthent/Makefile.in
src/libafsrpc/Makefile.in
src/libuafs/Makefile.common.in
src/roken/Makefile.in