From nobody Mon Feb 9 23:01:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580237234315168.8521265829727; Tue, 28 Jan 2020 10:47:14 -0800 (PST) Received: from localhost ([::1]:35444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwVtJ-0005ep-24 for importer@patchew.org; Tue, 28 Jan 2020 13:47:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60709) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwV5h-0000X4-TZ for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:55:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwV5g-00035L-8m for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:55:57 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:41172) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iwV5f-000336-OZ for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:55:55 -0500 Received: by mail-wr1-x42f.google.com with SMTP id c9so17105148wrw.8 for ; Tue, 28 Jan 2020 09:55:55 -0800 (PST) Received: from localhost.localdomain (93-36-56-206.ip58.fastwebnet.it. [93.36.56.206]) by smtp.gmail.com with ESMTPSA id o4sm27046968wrx.25.2020.01.28.09.55.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2020 09:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eoheQ8HlhGuMbB55vzhA1L21TCFP+rW1Af+5caLX/8s=; b=FzZFIxF9wj4nBUsAtUK1/qi8D7pcn2GmKKd6pdlhJPcPs/SMkqNwOTkP0BXBIQdd3u TfnrskRVpDpoQbXgaSjiXVHAqb+nBNGK7vk/QWFhQAswQf5nvmFajBARDf6sU4tZd+JC qCDCVr76uTHvoBztlZs/dayTZ9x4dxeE9pbudiaV2ctERet8Hfh68uZs+2rI5klSpMt5 RKuDc3Zgu33yZ1CZ57TYPMdTT/kXDG16ooiuc4O5GVfhyxPkHEE9N7fECRmyerwEqBDt Eg5DLIy5QbLPWgU0kp1mZ0rZSt6BCFZabEbVPhNO2+9HXEYAzQYF66xkNpG5G6u/jhxW PXGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=eoheQ8HlhGuMbB55vzhA1L21TCFP+rW1Af+5caLX/8s=; b=tChguMcMOxu07Ov7xE2lisyh0l5wjy/96Ji4g02CVxlI0baBhOpwrlRDwnrF/sJVUh 6RzzHXm/FMlkxTIPbCF55uwHTuZuanefShRuOt2Mub3JITXwHdLB8jFlih/6K+mvuq/a c9byzyWiFBOO0/xNt7Q0C/EY1/zerbHcbT3uPFmMPeZd01AmrGisbGnugYgk0ll0hvGN 4sA48Ql2rmvT/gZWvcxTvYidK1Va8ZS7t55mXBKG4LDjtuepqfyer631J2JTu9O+japJ igNT4xz3xo9eqIhCdnvaSB+9T262v7q3lbvN2UYDgJFbDBqJUXFSwYws72xdbVmM3sZI 4+7Q== X-Gm-Message-State: APjAAAVb2NX16lk6X8OQa4W2gouTki4900vcMCFoxpK49YCW1hlS8CIV bCOLw22G08qmCMOyEWZ6mZNRLbri X-Google-Smtp-Source: APXvYqx6yvyGdduJUQZ7/bfH4bUhGuMUVHF1NCbbq6fQkh6VQStIRZliY9Qj0VRm8un3ZebfTI8YJQ== X-Received: by 2002:adf:edd0:: with SMTP id v16mr29344908wro.310.1580234154273; Tue, 28 Jan 2020 09:55:54 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 053/142] meson: convert audio directory to Meson Date: Tue, 28 Jan 2020 18:52:13 +0100 Message-Id: <20200128175342.9066-54-pbonzini@redhat.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200128175342.9066-1-pbonzini@redhat.com> References: <20200128175342.9066-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 8 ++++++-- Makefile.target | 3 ++- audio/Makefile.objs | 30 ------------------------------ audio/meson.build | 29 +++++++++++++++++++++++++++++ configure | 12 ++++++++++++ meson.build | 25 ++++++++++++++++++++++++- 6 files changed, 73 insertions(+), 34 deletions(-) delete mode 100644 audio/Makefile.objs create mode 100644 audio/meson.build diff --git a/Makefile.objs b/Makefile.objs index 32822e3c7e..68bb44f875 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -36,6 +36,7 @@ qom-obj-y =3D qom/libqom.fa =20 ifeq ($(CONFIG_SOFTMMU),y) common-obj-y =3D blockdev.o blockdev-nbd.o block/ + common-obj-y +=3D bootdevice.o iothread.o common-obj-y +=3D dump/ common-obj-y +=3D job-qmp.o @@ -50,6 +51,11 @@ common-obj-$(CONFIG_LINUX) +=3D fsdev/ common-obj-y +=3D accel/ common-obj-y +=3D migration/ =20 +common-obj-$(CONFIG_AUDIO_ALSA) +=3D audio-alsa$(DSOSUF) +common-obj-$(CONFIG_AUDIO_OSS) +=3D audio-oss$(DSOSUF) +common-obj-$(CONFIG_AUDIO_PA) +=3D audio-pa$(DSOSUF) +common-obj-$(CONFIG_AUDIO_SDL) +=3D audio-sdl$(DSOSUF) + common-obj-$(if $(CONFIG_CURL),m) +=3D block-curl$(DSOSUF) common-obj-$(if $(CONFIG_GLUSTERFS),m) +=3D block-gluster$(DSOSUF) common-obj-$(if $(CONFIG_LIBISCSI),m) +=3D block-iscsi$(DSOSUF) @@ -60,8 +66,6 @@ common-obj-$(if $(CONFIG_RBD),m) +=3D block-rbd$(DSOSUF) common-obj-$(if $(CONFIG_LZFSE),m) +=3D block-dmg-lzfse$(DSOSUF) common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) +=3D block-dmg-bz2= $(DSOSUF) =20 -common-obj-y +=3D audio/ -common-obj-m +=3D audio/ common-obj-y +=3D hw/ =20 common-obj-y +=3D replay/ diff --git a/Makefile.target b/Makefile.target index d98e956e42..15157c7684 100644 --- a/Makefile.target +++ b/Makefile.target @@ -167,9 +167,10 @@ LIBS :=3D $(libs_softmmu) $(LIBS) # Temporary until emulators are linked by Meson LIBS :=3D $(LIBS) @../block.syms @../qemu.syms ifneq ($(CONFIG_MODULES),y) -LIBS :=3D $(LIBS) +LIBS :=3D $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS) endif LIBS :=3D $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) +LIBS :=3D $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) =20 # Hardware support ifeq ($(TARGET_NAME), sparc64) diff --git a/audio/Makefile.objs b/audio/Makefile.objs deleted file mode 100644 index d7490a379f..0000000000 --- a/audio/Makefile.objs +++ /dev/null @@ -1,30 +0,0 @@ -common-obj-y =3D audio.o audio_legacy.o noaudio.o wavaudio.o mixeng.o -common-obj-$(CONFIG_SPICE) +=3D spiceaudio.o -common-obj-$(CONFIG_AUDIO_COREAUDIO) +=3D coreaudio.o -common-obj-$(CONFIG_AUDIO_DSOUND) +=3D dsoundaudio.o -common-obj-$(CONFIG_AUDIO_WIN_INT) +=3D audio_win_int.o -common-obj-y +=3D wavcapture.o - -coreaudio.o-libs :=3D $(COREAUDIO_LIBS) -dsoundaudio.o-libs :=3D $(DSOUND_LIBS) - -# alsa module -common-obj-$(CONFIG_AUDIO_ALSA) +=3D alsa.mo -alsa.mo-objs =3D alsaaudio.o -alsa.mo-libs :=3D $(ALSA_LIBS) - -# oss module -common-obj-$(CONFIG_AUDIO_OSS) +=3D oss.mo -oss.mo-objs =3D ossaudio.o -oss.mo-libs :=3D $(OSS_LIBS) - -# pulseaudio module -common-obj-$(CONFIG_AUDIO_PA) +=3D pa.mo -pa.mo-objs =3D paaudio.o -pa.mo-libs :=3D $(PULSE_LIBS) - -# sdl module -common-obj-$(CONFIG_AUDIO_SDL) +=3D sdl.mo -sdl.mo-objs =3D sdlaudio.o -sdl.mo-cflags :=3D $(SDL_CFLAGS) -sdl.mo-libs :=3D $(SDL_LIBS) diff --git a/audio/meson.build b/audio/meson.build new file mode 100644 index 0000000000..5146dbd87c --- /dev/null +++ b/audio/meson.build @@ -0,0 +1,29 @@ +softmmu_ss.add(files( + 'audio.c', + 'audio_legacy.c', + 'mixeng.c', + 'noaudio.c', + 'wavaudio.c', + 'wavcapture.c', +)) + +softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spiceaudio.c= ')) +softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files= ('coreaudio.c')) +softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], if_true: files('dsou= ndaudio.c')) +softmmu_ss.add(when: ['CONFIG_AUDIO_WIN_INT'], if_true: files('audio_win_i= nt.c')) + +audio_modules =3D [] +if 'CONFIG_AUDIO_ALSA' in config_host + audio_modules +=3D [['alsa', files('alsaaudio.c'), alsa]] +endif +if 'CONFIG_AUDIO_OSS' in config_host + audio_modules +=3D [['oss', files('ossaudio.c'), oss]] +endif +if 'CONFIG_AUDIO_PA' in config_host + audio_modules +=3D [['pa', files('paaudio.c'), pulse]] +endif +if 'CONFIG_AUDIO_SDL' in config_host + audio_modules +=3D [['sdl', files('sdlaudio.c'), sdl]] +endif + +modules +=3D {'audio': audio_modules} diff --git a/configure b/configure index 1dd48e4f8b..434c24f0f0 100755 --- a/configure +++ b/configure @@ -3505,6 +3505,8 @@ for drv in $audio_drv_list; do alsa | try-alsa) if $pkg_config alsa --exists; then alsa_libs=3D$($pkg_config alsa --libs) + alsa_cflags=3D$($pkg_config alsa --cflags) + alsa=3Dyes if test "$drv" =3D "try-alsa"; then audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-alsa= /alsa/') fi @@ -3520,7 +3522,9 @@ for drv in $audio_drv_list; do =20 pa | try-pa) if $pkg_config libpulse --exists; then + libpulse=3Dyes pulse_libs=3D$($pkg_config libpulse --libs) + pulse_cflags=3D$($pkg_config libpulse --cflags) if test "$drv" =3D "try-pa"; then audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-pa/p= a/') fi @@ -6760,8 +6764,16 @@ for drv in $audio_drv_list; do echo "$def=3Dy" >> $config_host_mak ;; esac done +if test "$alsa" =3D "yes" ; then + echo "CONFIG_ALSA=3Dy" >> $config_host_mak +fi echo "ALSA_LIBS=3D$alsa_libs" >> $config_host_mak +echo "ALSA_CFLAGS=3D$alsa_cflags" >> $config_host_mak +if test "$libpulse" =3D "yes" ; then + echo "CONFIG_LIBPULSE=3Dy" >> $config_host_mak +fi echo "PULSE_LIBS=3D$pulse_libs" >> $config_host_mak +echo "PULSE_CFLAGS=3D$pulse_cflags" >> $config_host_mak echo "COREAUDIO_LIBS=3D$coreaudio_libs" >> $config_host_mak echo "DSOUND_LIBS=3D$dsound_libs" >> $config_host_mak echo "OSS_LIBS=3D$oss_libs" >> $config_host_mak diff --git a/meson.build b/meson.build index 4c42df980f..d66d49152b 100644 --- a/meson.build +++ b/meson.build @@ -111,6 +111,16 @@ if 'CONFIG_XKBCOMMON' in config_host xkbcommon =3D declare_dependency(compile_args: config_host['XKBCOMMON_CF= LAGS'].split(), link_args: config_host['XKBCOMMON_LIBS'].= split()) endif +pulse =3D declare_dependency() +if 'CONFIG_LIBPULSE' in config_host + pulse =3D declare_dependency(compile_args: config_host['PULSE_CFLAGS'].s= plit(), + link_args: config_host['PULSE_LIBS'].split()) +endif +alsa =3D declare_dependency() +if 'CONFIG_ALSA' in config_host + alsa =3D declare_dependency(compile_args: config_host['ALSA_CFLAGS'].spl= it(), + link_args: config_host['ALSA_LIBS'].split()) +endif spice =3D declare_dependency() if 'CONFIG_SPICE' in config_host spice =3D declare_dependency(compile_args: config_host['SPICE_CFLAGS'].s= plit(), @@ -180,6 +190,18 @@ liblzfse =3D declare_dependency() if 'CONFIG_LZFSE' in config_host liblzfse =3D declare_dependency(link_args: config_host['LZFSE_LIBS'].spl= it()) endif +oss =3D declare_dependency() +if 'CONFIG_AUDIO_OSS' in config_host + oss =3D declare_dependency(link_args: config_host['OSS_LIBS'].split()) +endif +dsound =3D declare_dependency() +if 'CONFIG_AUDIO_DSOUND' in config_host + dsound =3D declare_dependency(link_args: config_host['DSOUND_LIBS'].spli= t()) +endif +coreaudio =3D declare_dependency() +if 'CONFIG_AUDIO_COREAUDIO' in config_host + coreaudio =3D declare_dependency(link_args: config_host['COREAUDIO_LIBS'= ].split()) +endif =20 create_config =3D find_program('scripts/create_config') minikconf =3D find_program('scripts/minikconf.py') @@ -469,6 +491,7 @@ libqemuutil =3D static_library('qemuutil', qemuutil =3D declare_dependency(link_with: libqemuutil, sources: version_res) =20 +subdir('audio') subdir('io') subdir('chardev') subdir('fsdev') @@ -498,7 +521,7 @@ foreach d, list : modules else softmmu_mods +=3D sl endif - mods +=3D {'dir': d, 'name': m[0], 'lib': sl, 'deps': m[2]} + mods +=3D {'dir': d, 'name': m[0], 'lib': [sl, libmodulecommon], 'de= ps': m[2]} else if d =3D=3D 'block' block_ss.add(when: m[2], if_true: m[1]) --=20 2.21.0