- Export the CC and PKG_CONFIG variables before calling configure scripts,
especially for cross compilation and modified environments, otherwise
configure might detect libraries that are not usable by the compiler
later on
- Replace the hardcoded pkg-config calls in configure with a variable
that may be overridden by Makefile
Override all tools with prefixed versions if the CROSS variable has
been set. This is the recommended way to enable cross compilation using
mxe without touching lots of environment variables first.
Move all make variables and rules duplicated between gkrellm and
gkrellmd makefiles into a common file that can be included. This
avoids duplication and hopefully avoids the two makefiles getting out
of sync too much. This is also a preparation to ease overriding
toolchain binaries (compiler, linker, pkgconfig) as part of windows
cross compiling.
This change also puts the "ar" tool into a variable that can be
overridden if needed.
Please note that this change uses the GNU Make specific include
statement but AFAICS the makefiles already depend on GNU extensions in
other areas (":=" and "ifdef" are non-standard make syntax).