Add test case for #8917

(cherry picked from commit 47796026ca35a2438f7a7dc337add2ec3b14f06c)
Fix #8917.

FamInstEnv.normaliseTcApp should normalise arguments even when
the top-level tycon isn't a type family. This was a regression
from 7.6 -- not sure when it happened, but it was probably my
fault. Fixed now, in any case.

(cherry picked from commit c99941cfeee033fca2df45e9523b65c83be20d31)
change deriveConstants to use nm in a POSIX way (fixes #8781)

The patch provided by Christian Maeder <Christian.Maeder@dfki.de>

Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 045b28033a33a48d31951240a8cb35f2b78345dc)
add --with-ar and --with-ranlib configure parameters

Both --with-ar and --with-ranlib are usable on non-GNU/Linux systems
where GNU tools are usually installed (or possible to install), but
not into standard location nor with standard name. Tested on Solaris 10.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit ac24bf45258af701cdd67423d6107357f27bbedf)