Description: Fix link failure by linking main binary against libsndfile
 The bundled pactl source (src/pactl/pactl.c) uses sf_close() from
 libsndfile, but the top-level configure.ac never checked for libsndfile,
 so -lsndfile was missing from the main ebook-speaker link command. With
 -Wl,--as-needed the libsndfile DSO was dropped, causing
 "undefined reference to 'sf_close'" at link time. Add an AC_CHECK_LIB for
 sndfile so -lsndfile ends up in LIBS (after the objects, satisfying the
 link order).
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Forwarded: not-needed
Last-Update: 2026-09-01

--- ebook-speaker-6.2.0.orig/configure.ac
+++ ebook-speaker-6.2.0/configure.ac
@@ -11,6 +11,10 @@ AC_CONFIG_HEADERS([config.h])
 AC_PROG_CC
 
 # Checks for libraries.
+# FIXME: Replace `main' with a function in `-lsndfile':
+# libsndfile is used by the bundled pactl (pactl/src/pactl.c uses sf_close),
+# so it must be linked into the main binary.
+AC_CHECK_LIB([sndfile], [main])
 # FIXME: Replace `main' with a function in `-lmagic':
 AC_CHECK_LIB([magic], [main])
 # FIXME: Replace `main' with a function in `-lncursesw':
