[0] https://git.tukaani.org/?p=xz.git;a=blob;f=CMakeLists.txt;h=...
There's AC_LINK_IFELSE if you want to test linking too.
Reply on news.ycombinator.com