From nobody Mon Feb 9 19:07:45 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 ARC-Seal: i=1; a=rsa-sha256; t=1576156696; cv=none; d=zohomail.com; s=zohoarc; b=R8gjF0C5WKjCfZ4dLAsImPdmsRjJAX7s5yb6lQJVoNoCzfr02sM8iNAyQ9xhZlL2uH3GnTd+701Anz33JJqiHs7U+YkMEPtu1MH1gbk2LawpgPnmsvYJBC++4E8tT/AQdO3ISLmkzD7pN6mgZ9z5W207RdcR3PQLVxwkELwQn2I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576156696; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PDS3sRtQt9ex0lZCsWKH5I9q43dgFGB5z0KrGLDuW6I=; b=ZICKrMOzIg8xwrNP/O3hy36wValqVDHpRZpLLeWHZHp+ogCE2vSRuO2QzFJryhWUZ53xOv9fuqShyuui5cTee/nTRUtimquK1rStRJKdl18c1HSjszW2Q2PaEqMReF77SVcG/IH/11z0Uv+x7XiEW0QTrpY97yJRUCo+R8diANo= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576156696019323.02480019930385; Thu, 12 Dec 2019 05:18:16 -0800 (PST) Received: from localhost ([::1]:59150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifOMA-00071n-AS for importer@patchew.org; Thu, 12 Dec 2019 08:18:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35672) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifNyW-0003lZ-Hq for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifNyU-00072E-Lr for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:53:48 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:33620) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifNyU-00070d-DY for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:53:46 -0500 Received: by mail-wr1-x433.google.com with SMTP id b6so2660299wrq.0 for ; Thu, 12 Dec 2019 04:53:46 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id n189sm5193825wme.33.2019.12.12.04.53.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2019 04:53:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PDS3sRtQt9ex0lZCsWKH5I9q43dgFGB5z0KrGLDuW6I=; b=bbCW1a05pHvJnTpaXeRCcdgvaxIF03U+nM4O5mRstdSUqEYHM5cyzx0MsCtOfLLuyq TB3/NGHQUVEtudCc5PZZ4uCMkiRyEFyGF1GzXOi+klCpJ7t4ZUhsbZHsBHeUdGm2zYAY 2QnKJiKC7fF2Aa4cjQKOt3kzn5jFzY9qw1qvYBXehH10q7f+wQltB1Xk0QXyUAv0JQ8G DsPJGS8C0GfjzO4QmmMm/FS63IOoARwB7ogsUEjQhK3Ie8JqS+Wi3VaFaCxZ4CxKGbDI KM/HA2cwsMsjMKrK9Mh+IyRh9/t+rxK+rGRFaxAz/GAmcA/fVWAJv4DJjpwbhEulJeAT TVQA== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PDS3sRtQt9ex0lZCsWKH5I9q43dgFGB5z0KrGLDuW6I=; b=LGaigIznVkaoSFhE7VaVw9VEPrMOh7qeCs7NP0N84O8QpwsDWm3YzqDZ+a8c70td8k R+FDb5lbktCnWUyxdeh3f8P2Cap/ftgXxGV5DX9B3v3TtJY91BNpS9RyImCTUufLd3da YXYJidxozJx96vA6RQQrejjjSpFxIzcZz+I11FgLhz3TYNSFDmxwJAi4VrxNTc+stRFP Li+TeqUCe+AcbyFoCKI6CfDM0vKjVMuIWPQ8zz+9n1qpREcn/f/NntS3J+vnjvyIeq6R 61OfRTgX83lHQBjqmu09TSN8jm+YMc3OtHUCbtGCTVxxWJTv9ngqGeIuAyBcGqUf5Zpf 6B4g== X-Gm-Message-State: APjAAAWzHR2KnrSchnwqOMEy1kKamzF62BlVhujbkMT4IwlEV1yMTl29 ap/AUT4aUzYGZqP3Ozd8kWJtef+F X-Google-Smtp-Source: APXvYqyYAFPF1DGorRZtk3C8ONhVjL/YvxbTOpl79FrHSErzBn+FqUw4XlEKks/KXwYfWNk9f2RXiA== X-Received: by 2002:adf:fe43:: with SMTP id m3mr6369819wrs.213.1576155225014; Thu, 12 Dec 2019 04:53:45 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 047/132] meson: convert audio directory to Meson Date: Thu, 12 Dec 2019 13:51:31 +0100 Message-Id: <1576155176-2464-48-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576155176-2464-1-git-send-email-pbonzini@redhat.com> References: <1576155176-2464-1-git-send-email-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::433 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: , 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 | 6 ++++-- audio/Makefile.objs | 31 ------------------------------- audio/meson.build | 30 ++++++++++++++++++++++++++++++ configure | 12 ++++++++++++ meson.build | 25 ++++++++++++++++++++++++- 6 files changed, 76 insertions(+), 36 deletions(-) delete mode 100644 audio/Makefile.objs create mode 100644 audio/meson.build diff --git a/Makefile.objs b/Makefile.objs index 8d14390..cea6f9a 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 @@ -49,6 +50,11 @@ common-obj-$(CONFIG_LINUX) +=3D fsdev/ =20 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) @@ -59,8 +65,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 702e6f8..65f1312 100644 --- a/Makefile.target +++ b/Makefile.target @@ -165,9 +165,11 @@ 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) @@ -193,7 +195,7 @@ dummy :=3D $(call fix-paths,../,, \ qom-obj-y) dummy :=3D $(call unnest-vars,.., \ common-obj-y \ - common-obj-m) + common-obj-m) all-obj-y +=3D $(common-obj-y) all-obj-y +=3D $(qom-obj-y) all-obj-$(CONFIG_SOFTMMU) +=3D $(authz-obj-y) diff --git a/audio/Makefile.objs b/audio/Makefile.objs deleted file mode 100644 index dca87f6..0000000 --- a/audio/Makefile.objs +++ /dev/null @@ -1,31 +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_PT_INT) +=3D audio_pt_int.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 0000000..e58a936 --- /dev/null +++ b/audio/meson.build @@ -0,0 +1,30 @@ +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_PT_INT'], if_true: files('audio_pt_int= .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 9d33df3..0be0735 100755 --- a/configure +++ b/configure @@ -3396,6 +3396,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 @@ -3411,7 +3413,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) audio_pt_int=3D"yes" if test "$drv" =3D "try-pa"; then audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-pa/p= a/') @@ -6589,8 +6593,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 df16b58..90a15ad 100644 --- a/meson.build +++ b/meson.build @@ -107,6 +107,16 @@ if 'CONFIG_LIBCAP_NG' in config_host libcap_ng =3D declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'= ].split()) endif xkbcommon =3D dependency('xkbcommon', required: false) +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(), @@ -176,6 +186,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') @@ -453,6 +475,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') @@ -481,7 +504,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 1.8.3.1