[909] in Kerberos_V5_Development
Shared library restructuring and static executable support
daemon@ATHENA.MIT.EDU (hartmans@MIT.EDU)
Tue Jun 20 19:45:53 1995
From: hartmans@MIT.EDU
Date: Tue, 20 Jun 1995 19:45:24 -0400
To: krbdev@MIT.EDU
In the interest of making life interesting and supporting AIX,
proven and I decided to restructure some of how shared librariesare
built and to add an option for building static executables instead of
dynamic.
Background: how mangled is AIX? Under AIX, there isn't much
of a difference between a shared and static library, other than the
shared library has a list of symbols it exports and has no unresolved
symbols. (It's a single object module) IBM doesn't ship any static
libraries, although they do provide an option to link a shared library
static. For this reason, there is no special naming convension for
shared libraries; their names conflict with static libraries.
Athena solves this problem by creating /usr/athena/lib/shared
on the rsaix packs. This solution is a possible approach we can take.
However, it gets very messy, and I'm not sure to implement it. For
example, we would need both $(TOPLIBD)/share, and
$(TOPLIBD)/krb5/share just to build the libkrb5 shared lib. In
addition, we would have to significantly rewrite the logic for
creating links in $(LIBTOPD), because it wouldn't be possible for
Makefile.in to know how many directories away from $(LTOPLIBD) it was.
Instead, for AIX, if shared libraries are enabled, *only*
shared libraries are built. This requires rewriting the rule for
library creation in Makefiles that produce shared libraries, and
forcing it to be added by autoconf. This allows static library
creation to be conditionalized.
In addition, we believe it is important to offer an option to
build static Kerberos binaries, *even* if shared libraries are built.
On all platforms, specifically requesting static binaries will link
against static Kerberos libraries *and* static system libraries.
Disabling static binaries will not guarantee shared binaries. It is
an error to request static binaries on a platform where we don't
support shared libraries as we may not know how to request linking
against the system provided static libraries. Naturally, on platforms
like Ultrix, the user will get static binaries even though they cannot
enable the feature. (Probably for platforms we know are static-only,
we should add code to make --enable-static-binaries a noop instead of
error).
In addition, libcom_err.a is becoming shared so that
libkrb5.a, libkrb4.a, et al don't have undefined external references.
Feel free to give me any hints/concerns you may have. I'll be
touching aclocal.m4's shared lib code fairly extensively, configure.in
in the top and library directories, many Makefile.in's, and possibly a
few other files.
--Sam