From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 25 Apr 2024 09:27:26 +0000 (+0100) Subject: Use PKG_CHECK_MODULES to find the ao lib if possible. X-Git-Tag: 4.3.4-dev~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85f8ea12dd16793aaa9695363058982f91c4c31d;p=thirdparty%2Fshairport-sync.git Use PKG_CHECK_MODULES to find the ao lib if possible. --- diff --git a/configure.ac b/configure.ac index 6c71bb8b..7bf534ea 100644 --- a/configure.ac +++ b/configure.ac @@ -288,7 +288,13 @@ AM_CONDITIONAL([USE_SNDIO], [test "x$with_sndio" = "xyes"]) AC_ARG_WITH(ao, [AS_HELP_STRING([--with-ao],[choose AO (Audio Output?) API support. N.B. no synchronisation -- so underflow or overflow is inevitable!])]) if test "x$with_ao" = "xyes" ; then AC_DEFINE([CONFIG_AO], 1, [Include an AO-compatible audio backend.]) - AC_CHECK_LIB([ao], [ao_initialize], , AC_MSG_ERROR(AO support requires the ao library -- libao-dev suggested)) + if test "x${with_pkg_config}" = xyes ; then + PKG_CHECK_MODULES( + [AO], [ao > 1.0.0], + [LIBS="${AO_LIBS} ${LIBS}"], [AC_MSG_ERROR(AO support requires the ao library -- libao-dev suggested)]) + else + AC_CHECK_LIB([ao], [ao_initialize], , AC_MSG_ERROR(AO support requires the ao library -- libao-dev suggested)) + fi fi AM_CONDITIONAL([USE_AO], [test "x$with_ao" = "xyes"])