configure: Find FTS library with --as-needed

When LDFLAGS contains ``-Wl,--as-needed``, the FTS library will be
ignored if it is specified before the .c source.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Fixes: 62f27ee6f1 ("configure: find cflags and libs for fts on musl")
master
A. Wilcox 2020-04-05 04:52:19 -05:00 committed by Daniel Molkentin
parent 6b8ee4fc37
commit 3aec4fca0b
1 changed files with 1 additions and 1 deletions

2
configure vendored
View File

@ -85,7 +85,7 @@ EOF

found=no
for lib in "-lc" "-lfts"; do
${CC} $CFLAGS -Wl,$lib $LDFLAGS conftest.c >/dev/null 2>&1
${CC} $CFLAGS $LDFLAGS conftest.c -Wl,$lib >/dev/null 2>&1
ret=$?
if test $ret -eq 0; then
FTS_LIBS="$lib"