----- Original Message -----
> This could involve configure.c, but conceivably it could all be
> done within the Makefile itself. For example, by entering something
> like "make compress=lzo2", and then adding this to the Makefile:
>
> ifneq ($(compress),)
> ifeq ($(compress), lzo2)
> LZOFLAG=-DLZO
> LZOLIB=-llzo2
> endif
> endif
>
> And then the diskdump.c compile line could use ${LZOFLAG}, and the
> gdb_merge stanza could include ${LZOLIB}.
>
Thanks for accepting the request and for detailed instructions.
I'll reflect these configuration logic in the next patch.
Actually, thinking more about it, I prefer the second solution:
On the other hand, the capability of dynamically adding an optional
library could be a useful feature in general -- not only for LZO
compression support, but for other things in the future.
I'm thinking that we could allow the user create an "extralibs" file
in the top-level directory, and then build_configure() in configure.c
could read it and dynamically create the LDFLAGS= line in the Makefile.
Currently LDFLAGS can only be modified manually, but the -static example
hasn't worked for a long time, and should be removed.
Then the only issue would be the extra -DLZO to be passed to diskdump.c.
Since any additional library would pretty much always require a conditional
function call or other library-specific reference, a general purpose
"extracflags" file could also be created and read by build_configure(),
and its contents appended to the Makefile's TARGET_CFLAGS line.
With "extralibs" and "extracfiles", we would have a general-purpose
solution for adding optional libraries for use by both the top-level
crash sources as well as by extension modules that are built within
the extensions sub-directory. It would also negate the need to always
have to enter special "make ..." command every time -- instead just
create the "extralibs" and "extracflags" files, and it gets done
automatically.
Dave