]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Use PKG_CHECK_MODULES to find the ao lib if possible.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 25 Apr 2024 09:27:26 +0000 (10:27 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 25 Apr 2024 09:27:26 +0000 (10:27 +0100)
configure.ac

index 6c71bb8b058e18b0a62e3440a5e74deef960daf2..7bf534ea0e4bd76172d43c5b42fd8c6c9b950f51 100644 (file)
@@ -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"])