From: Ross Burton Date: Fri, 10 Sep 2021 17:42:20 +0000 (-0600) Subject: configure.ac: check for the library containing fts_open X-Git-Tag: v2.0.1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a99bf49f1cab7936e0c829bf86026f90006cda34;p=thirdparty%2Flibcgroup.git configure.ac: check for the library containing fts_open 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 [TJH: minor formatting changes to match existing configure.ac] Signed-off-by: Tom Hromatka (cherry picked from commit 27ba904355575153308bdc0fa48344ef1be55ca1) --- diff --git a/configure.ac b/configure.ac index cbe5cef9..ebfd90a4 100644 --- a/configure.ac +++ b/configure.ac @@ -174,6 +174,12 @@ AC_FUNC_REALLOC 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],