Simplify passing of linker flags to try_compile calls
In commit
d7bd02b6 (Modify CHECK_C_SOURCE_* checks to fix builds using
Visual Studio 12, 2013-02-01), commit
e3d14342 (Set use of /SAFESEH linker
flag for all LIBARCHIVE_CHECK_C_SOURCE_* checks, 2013-02-01), and commit
58dc42aa (Fix checks for crypto algorithms in Visual Studio builds,
2013-02-01) we introduced and used custom copies of the CMake
CheckCSource(Compiles|Runs) modules in order to pass linker flags to
try_compile calls. CMake has an issue tracker entry about passing
CMAKE_*_LINKER_FLAGS to try_compile calls:
http://www.cmake.org/Bug/view.php?id=14066
Discussion there suggests a much simpler workaround: pass the flags
through the LDFLAGS environment variable. Remove our custom check
macros and use the simpler workaround instead.