Skip to content

Commit

Permalink
Added configure check for separate fts library to stout.
Browse files Browse the repository at this point in the history
On some systems (e.g., those that use musl instead of glibc),
the fts(3) family of functions are not provided by libc.
Instead, a separate fts library must be installed. If this is
the case, "libfts" should be added to the list of libraries that
stout is linked against.

Review: https://reviews.apache.org/r/48245/
  • Loading branch information
neilconway authored and tillt committed Jun 5, 2016
1 parent 1278304 commit 9915fa2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 3rdparty/stout/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,22 @@ AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],
AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],
[CXXFLAGS="$debug_flags $optimize_flags"])

# Check if we need to do anything special to support using the fts_*
# functions. On some systems (e.g., those that use musl instead of
# glibc), FTS support requires linking against an additional library.
AC_CHECK_HEADERS([fts.h], [], [AC_MSG_ERROR([cannot find fts.h
-------------------------------------------------------------------
Failed to find fts.h. If this header file is not provided by libc
on this system (e.g., musl), a separate FTS package must be installed.
-------------------------------------------------------------------
])])

AC_SEARCH_LIBS(fts_close, fts, [], [AC_MSG_ERROR([cannot find libfts
-------------------------------------------------------------------
Failed to find fts_close. If this function is not provided by libc
on this system (e.g., musl), a separate FTS package must be installed.
-------------------------------------------------------------------
])])

###############################################################################
# Miscellaneous checks related to (un)bundled software.
Expand Down

0 comments on commit 9915fa2

Please sign in to comment.