package/alsamixergui: cleanly fix build against fltk and newer alsa-libs
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 29 Dec 2019 17:02:08 +0000 (18:02 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 31 Dec 2019 14:30:02 +0000 (15:30 +0100)
commit312814a0be9ca4acc95cf4361a94499b2d7d6bd2
tree0873cbd965d6b1ab99b1bfb71b9d292892bbdbed
parentfdb44ea17f146a6903342d19c001622b28c7b2d1
package/alsamixergui: cleanly fix build against fltk and newer alsa-libs

We have an existing patch to configure.in that chains the test to find
fltk (supposedly because a symbol of fltk got renamed sometime in the
past). By doing so, this chaining breaks the build when configure later
checks for the alsa libraries.

This is because chaining calls to AC_CHECK_LIBS() one in the other would
be expanded in such a way that internal functions, like ac_fn_c_try_link,
would get defined after being called, which results in configure failures
(see new bundled patch).

So, we change configure to use AC_SEARCH_LIBS() instead, which allows us
to memorise the result of each test, and we only fail when both tests
failed.

We can now drop the ac_cv overrides we had.

Incidentally, this also fixes detection of newer alsa-libs, where
atopology functions were offloaded to their own separate library:
    https://github.com/alsa-project/alsa-lib/commit/75d393a563efb578c79364a277087c6326267f52

Fixes:
    http://autobuild.buildroot.org/results/564c1561e83e0c064f3859d25e68dec96640e060

(Note: upstream has been basically dead for at least 15 years now, so we
did not even try to submit the patch there...)

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/alsamixergui/0002-configure-fix-detection-of-fltk-libs.patch [new file with mode: 0644]
package/alsamixergui/alsamixergui.mk