Skip to content

Commit

Permalink
Use PKG_CHECK_MODULES to find the ao lib if possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebrady committed Apr 25, 2024
1 parent 76a6f1d commit 85f8ea1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down

0 comments on commit 85f8ea1

Please sign in to comment.