The musl C library doesn't provide fts.h[1], so libcgroup doesn't
compile with musl. However, there is a standalone implementation of fts
for musl users[2] which can be used.
Use AC_SEARCH_LIBS to search for fts_open, which will check if it is part
of libc, and if not look in libfts, then set LIBS if needed.
[1] https://wiki.musl-libc.org/faq.html
[2] https://github.com/void-linux/musl-fts
Closes #61.
Signed-off-by: Ross Burton <ross.burton@arm.com>
[TJH: minor formatting changes to match existing configure.ac]
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
AC_FUNC_STAT
AC_CHECK_FUNCS([getmntent hasmntopt memset mkdir rmdir strdup])
+AC_SEARCH_LIBS(
+ [fts_open],
+ [fts],
+ [],
+ [AC_MSG_ERROR([Unable to find the fts_open() function])])
+
if test x$with_pam = xtrue; then
AC_CHECK_LIB(
[pam],