diff --git a/package/alsamixergui/0002-configure-fix-detection-of-fltk-libs.patch b/package/alsamixergui/0002-configure-fix-detection-of-fltk-libs.patch new file mode 100644 index 0000000000..cc72d33bee --- /dev/null +++ b/package/alsamixergui/0002-configure-fix-detection-of-fltk-libs.patch @@ -0,0 +1,53 @@ +From c154195fa161575363280aac9e928b7225f0de9e Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 29 Dec 2019 17:42:13 +0100 +Subject: [PATCH] configure: fix detection of fltk libs + +Chaining calls to AC_CHECK_LIB one in the other, breaks the configure +script, because some internal functions (e.g. ac_fn_c_try_link) would +not be defined before they are needed, leading the build to fail as +thus: + + checking for snd_tplg_new in -latopology... ./configure: line 4630: + ac_fn_c_try_link: command not found + no + configure: error: No linkable libatopology was found. + +Using AC_CHECK_LIB() in sequence (i.e. one after the other) and +memorising the result is not trivial: AC_CHECK_LIB() implements a +ddefault action-if-found that append to LIBS, but not if the user +ptrovides their own action-if-found. + +Instead, AC_SEARH_LIBS() always append to LIBS, *and* run the +user-provided action. + +So, we switch to AC_SEARCH_LIBS() and memorise the result for each +test, to eventually test if ether worked. + +Signed-off-by: Yann E. MORIN +--- + configure.in | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.in b/configure.in +index 9307cc2..55f6864 100644 +--- a/configure.in ++++ b/configure.in +@@ -11,10 +11,10 @@ AC_PROG_INSTALL + AC_PROG_LN_S + + dnl Checks for libraries. +-AC_CHECK_LIB(fltk,numericsort,, +-AC_CHECK_LIB(fltk,fl_numericsort,, +-AC_MSG_ERROR("missing fltk")) +-) ++has_fltk=false ++AC_SEARCH_LIBS(numericsort,fltk,has_fltk=true) ++AC_SEARCH_LIBS(fl_numericsort,fltk,has_fltk=true) ++AS_IF(test "${has_fltk}" = "false", AC_MSG_ERROR("missing fltk")) + AM_PATH_ALSA(0.9.0) + + dnl Checks for header files. +-- +2.20.1 + diff --git a/package/alsamixergui/alsamixergui.mk b/package/alsamixergui/alsamixergui.mk index 24e2497f3b..8bf3f8e073 100644 --- a/package/alsamixergui/alsamixergui.mk +++ b/package/alsamixergui/alsamixergui.mk @@ -11,11 +11,6 @@ ALSAMIXERGUI_LICENSE = GPL-2.0+ ALSAMIXERGUI_LICENSE_FILES = debian/copyright ALSAMIXERGUI_AUTORECONF = YES -ALSAMIXERGUI_CONF_ENV = \ - ac_cv_lib_fltk_numericsort=yes \ - ac_cv_lib_fltk_fl_numericsort=yes \ - ac_cv_lib_asound_snd_ctl_open=yes - ALSAMIXERGUI_DEPENDENCIES = fltk alsa-lib $(eval $(autotools-package))