Skip to content

Commit

Permalink
Backport 9e6e0a8f341389215f0db6b2260f2b16351f02be
Browse files Browse the repository at this point in the history
  • Loading branch information
duke committed Aug 5, 2024
1 parent 37726c5 commit ef345d4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions make/autoconf/lib-alsa.m4
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
fi
fi
if test "x$ALSA_FOUND" = xno; then
# If we have sysroot set, and no explicit library location is set,
# look at known locations in sysroot.
if test "x$SYSROOT" != "x" && test "x${with_alsa_lib}" == x; then
if test -f "$SYSROOT/usr/lib64/libasound.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
ALSA_LIBS="-L$SYSROOT/usr/lib64 -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
ALSA_FOUND=yes
fi
fi
fi
if test "x$ALSA_FOUND" = xno; then
AC_CHECK_HEADERS([alsa/asoundlib.h],
[
Expand Down

0 comments on commit ef345d4

Please sign in to comment.