cherry-pick from Dan: add linker option for non-executable stack

add linker option for non-executable stack 
as well as tests in the configure script for whether the option (and some
others) are accepted by the compiler.

The makefile bin/Makefile.in applies several other compiler flags
that ought to be tested similarly.