[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 5/9] configure: Link test before auto-enabling Pu
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-block] [PATCH v2 5/9] configure: Link test before auto-enabling PulseAudio library |
Date: |
Fri, 14 Jun 2019 12:07:14 +0200 |
Similarly to commit a73e82ef912, test the library links correctly
before considering it as usable.
This fixes using ./configure --static on Ubuntu 18.04:
$ make subdir-aarch64-softmmu
[...]
LINK aarch64-softmmu/qemu-system-aarch64
/usr/bin/ld: cannot find -lpulse
/usr/bin/ld: cannot find -lpulsecommon-11.1
collect2: error: ld returned 1 exit status
Makefile:204: recipe for target 'qemu-system-aarch64' failed
make[1]: *** [qemu-system-aarch64] Error 1
$ fgrep pulse config-host.mak
PULSE_LIBS=-L/usr/lib/aarch64-linux-gnu/pulseaudio -lpulse -lpulsecommon-11.1
$ lsb_release -cri
Distributor ID: Ubuntu
Release: 18.04
Codename: bionic
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
configure | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 0dd6e8bed3..449dbd69ce 100755
--- a/configure
+++ b/configure
@@ -3408,10 +3408,21 @@ for drv in $audio_drv_list; do
pa | try-pa)
if $pkg_config libpulse --exists; then
- pulse_libs=$($pkg_config libpulse --libs)
- audio_pt_int="yes"
- if test "$drv" = "try-pa"; then
- audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
+ pulse_cflags=$($pkg_config --cflags libpulse)
+ pulse_libs=$($pkg_config --libs libpulse)
+ # Packaging for the static libraries is not always correct.
+ # At least ubuntu 18.04 ships only shared libraries.
+ write_c_skeleton
+ if ! compile_prog "$pulse_cflags" "$pulse_libs" ; then
+ unset pulse_cflags pulse_libs
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa//')
+ fi
+ else
+ audio_pt_int="yes"
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e
's/try-pa/pa/')
+ fi
fi
else
if test "$drv" = "try-pa"; then
--
2.20.1
- [Qemu-block] [PATCH v2 0/9] configure: Fix softmmu --static linking, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 1/9] configure: Only generate GLUSTERFS variables if glusterfs is usable, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 2/9] configure: Link test before auto-enabling GlusterFS libraries, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 3/9] configure: Link test before auto-enabling libusb library, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 4/9] configure: Link test before auto-enabling libusbredir library, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 5/9] configure: Link test before auto-enabling PulseAudio library,
Philippe Mathieu-Daudé <=
- [Qemu-block] [PATCH v2 6/9] configure: Link test before auto-enabling OpenGL libraries, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 7/9] configure: Link test before auto-enabling GTK libraries, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 8/9] tests/docker: Kludge for missing libunistring.so symlink on Ubuntu 18.04, Philippe Mathieu-Daudé, 2019/06/14
- [Qemu-block] [PATCH v2 9/9] .travis.yml: Test softmmu static linking, Philippe Mathieu-Daudé, 2019/06/14