* set rpath in the makefile
* Remove the $(DESTDIR) part
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
* Extend autotools package name tranformation support to man pages
* Extend autotools to support build dates without breaking reproducable builds
* Add program version and date to man pages
* Remove extranious spaces so man pages cross-link
If a dynamic library is built (--enable-shared --disable-static-exe),
the library object files were unnecessarily statically linked to the
tool, duplicating the libbz3.c code among the tool and the library:
$ ls -l bzip3 .libs/libbzip3.so.0.0.0
-rwxr-xr-x. 1 test test 171096 Oct 26 15:13 bzip3
-rwxr-xr-x. 1 test test 147408 Oct 26 15:13 .libs/libbzip3.so.0.0.0
and the tool was not linked to the library at all:
$ scanelf -n bzip3
TYPE NEEDED FILE
ET_EXEC libc.so.6 bzip3
The cause were an unconditional listing of libbz3.c among bzip3 tool
sources, a typo in a bzip3_LDADD variable name, wrong evaluation of
--disable-static-exe option, and an absence of ENABLE_STATIC
aplication in Makefile.am.
This patch fixes all these issues on the assumption that an absence of
--{enable,disable}-static-exe option means --disable-static-exe. That
assumption is based on a help string of the option. It is a norm that
the help string variant displays the nondefault variant:
$ ls -l .libs/bzip3 .libs/libbzip3.so.0.0.0
-rwxr-xr-x. 1 test test 35856 Oct 26 15:44 .libs/bzip3
-rwxr-xr-x. 1 test test 147408 Oct 26 15:42 .libs/libbzip3.so.0.0.0
$ scanelf -n .libs/bzip3
TYPE NEEDED FILE
ET_EXEC libbzip3.so.0,libc.so.6 .libs/bzip3
A public-facing library should be versioned because it enables
a dynamic linker to recognize when the libary changes ABI and that the
consuming application needs to be rebuilt.
This patch employed libtool versioning. See '(libtool)Updating version info'
info page for more details how to manage the -version-info numbers.
* Error reporting on write errors. Very minor cleanup. Better corrupt file detection.
* Forgot to check one fread
* Exit on read error or unexpected eof