Rakefiles: improve (fix) Mercurial config reading on Windows
This commit improves reading of mercurial config on Windows by reading
all files and directories as documented in `hg help config` and also
read TortoiseHg's specific `<install-dir>/defaultrc`. This fixes CI
when using recent(ish) TortoiseHg.
#
# Common definition for i686 arch
#
CPU_INTERN_H = cpu_x86_64.h
DEFS += -D__x86_64__
CCCONFOPT = -m64 -fPIC
# We need to use at most GCC 8.x, for yet unknown reason with GCC 9.x and
# newer Smalltalk/X crashes.
#
# Note, that we have to use the trick with `ifeq $(origin CC),...` rather than
# `ifdef` since CC is one of the GNU make implicit variables. series
#
# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
ifeq ($(origin CC),default)
ifneq ($(shell which gcc-8),)
CC = gcc-8
else ifneq ($(shell which gcc-7),)
CC = gcc-7
else ifneq ($(shell which gcc-6),)
CC = gcc-6
else ifneq ($(shell which gcc-5),)
CC = gcc-5
else ifneq ($(shell which gcc-4),)
CC = gcc-4
endif
endif