From nobody Mon Feb 9 23:40:40 2026 Delivered-To: importer@patchew.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=1597686789; cv=none; d=zohomail.com; s=zohoarc; b=kbsuLLuxlyBvbGAtRfQ05X//oj4b8tJjCD6bP35WZbumA3rvN2S+R2cZ9qYPzgon4G+8toKG1UxZ2TIaOtrSZhSoowouuJ0MdJ5d9/MDnjNE/yooP+wNpYb9kh1XE9Yq4k7aJOTMHKBStXGDH8xcQUNGefdJ2EauPBmsTH4iO1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597686789; h=Content-Type:Content-Transfer-Encoding:Cc: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=aXdjHqDn7Dx5PCb35bX2WOyvYxDDE/R6Ug79m5dFQdc=; b=SaMAM++ncQP4MxcSHEHM35pluVvQ74zdEylwHclJS8MIXWZpVfkSw80v1AojlNRuUHMrnhTK+5sQT+e4XnzQk2NnwbWbAjMVSIM2K6M1t6iKuDnb4BJc0zcGeZ65GeJ0uM4lRLtyZ1KMQIfJHZBfIcLbMDexRisHTiKQ3Tr8bhY= 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 1597686789769256.315990757809; Mon, 17 Aug 2020 10:53:09 -0700 (PDT) Received: from localhost ([::1]:46872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7gjL-0004OU-4F for importer@patchew.org; Mon, 17 Aug 2020 11:07:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7gHY-0005CO-LM for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:38:40 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:39222) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k7gHU-0006EG-Ha for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:38:39 -0400 Received: by mail-wr1-x429.google.com with SMTP id a5so15259763wrm.6 for ; Mon, 17 Aug 2020 07:38:35 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:a0d1:fc42:c610:f977]) by smtp.gmail.com with ESMTPSA id i22sm34966603wrb.45.2020.08.17.07.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 07:38:33 -0700 (PDT) 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=aXdjHqDn7Dx5PCb35bX2WOyvYxDDE/R6Ug79m5dFQdc=; b=FTSljtP6QQzBCvBVePRrLHxknzFAhwVLzYODcQv97uFXYoaVNXpU/lCril8f9enlL/ Kn2DikM+Q9ugDlZIpaUBDLdDCudDKbZeRERDssHhowhshuw60f34OgpVOxMgCrGwhEHu eWWafHGYFHgpIhMYWipqyeW/tnb2+Yli1n2z5dSs5fMydnrGxuASgRCeWhdJtihlGn7B qngo8AI7+DWWLSwIheKhxqO6lWbFIB4aBliMNXdwmFKCdKODv1RvjkSga6jsKvASYb7R xCAHjRcezGdw7nqzFpSTzc1SxdgqyyehWnvN5z6DIVugW4Suv/ElfzZOzGctdZu/r7bK 3qaA== 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=aXdjHqDn7Dx5PCb35bX2WOyvYxDDE/R6Ug79m5dFQdc=; b=S5vi7JlkQiwVEop5NvcpsPuzwFhZAchuySHEtwGQnFLGK4a9njZ5nyuXaDdNnMXe/I AudYdrhWi7tMk36z+syUDYZ2pVgFLdwXuyFTOjFquKHkwh+KlOQR6RFHVE/mNr30Otjt POlAvivVAjvtpwPR9fU44OQg4vgxwulk0oVyhPzpcbNNwp9pDNOO/XWDRgTYX6UV2sgi g9EZs5q//D1/egcN7bvWotJwCMnIWGOKajD1P3a3wjfytLlSvYlD0lV4bTe7FnXr1NYh n8RlwOTR1YAdmUCw6WFU2MLcczgWW1OrSsP0SvyYcDQQb6RX5jSN1VDODk2Jbndf1Ywf Q+2Q== X-Gm-Message-State: AOAM531nBDWPmapB2fsIzji1dh5n3KUse7gkXtNenERDYt8E2bsi7GQ3 gKB+D2nyw3Og44NToYiTFTKG6tx8XFU= X-Google-Smtp-Source: ABdhPJzEbwTQyUGGizfh3vPeEC1ISgEDQ9JQdH+64zZw/fr1L6Md7MAEjWKHGPQ8rvuUT7eIXwablg== X-Received: by 2002:a5d:440e:: with SMTP id z14mr15504446wrq.422.1597675114348; Mon, 17 Aug 2020 07:38:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 069/150] meson: convert audio directory to Meson Date: Mon, 17 Aug 2020 16:36:02 +0200 Message-Id: <20200817143723.343284-70-pbonzini@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817143723.343284-1-pbonzini@redhat.com> References: <20200817143723.343284-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x429.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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 | 7 +++++-- Makefile.target | 3 ++- audio/Makefile.objs | 35 ----------------------------------- audio/meson.build | 30 ++++++++++++++++++++++++++++++ configure | 16 ++++++++++++++++ meson.build | 27 +++++++++++++++++++++++++++ 6 files changed, 80 insertions(+), 38 deletions(-) delete mode 100644 audio/Makefile.objs create mode 100644 audio/meson.build diff --git a/Makefile.objs b/Makefile.objs index e43526fe5f..ec7627a4c6 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -63,6 +63,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) @@ -73,8 +78,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/ common-obj-m +=3D hw/ =20 diff --git a/Makefile.target b/Makefile.target index c8c4b70162..ff0e1b2d10 100644 --- a/Makefile.target +++ b/Makefile.target @@ -166,9 +166,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 b4a4c11f31..0000000000 --- a/audio/Makefile.objs +++ /dev/null @@ -1,35 +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) - -# jack module -common-obj-$(CONFIG_AUDIO_JACK) +=3D jack.mo -jack.mo-objs =3D jackaudio.o -jack.mo-libs :=3D $(JACK_LIBS) diff --git a/audio/meson.build b/audio/meson.build new file mode 100644 index 0000000000..15c06ba045 --- /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_WIN_INT'], if_true: files('audio_win_i= nt.c')) + +audio_modules =3D {} +foreach m : [ + ['CONFIG_AUDIO_ALSA', 'alsa', alsa, 'alsaaudio.c'], + ['CONFIG_AUDIO_OSS', 'oss', oss, 'ossaudio.c'], + ['CONFIG_AUDIO_PA', 'pa', pulse, 'paaudio.c'], + ['CONFIG_AUDIO_SDL', 'sdl', sdl, 'sdlaudio.c'], + ['CONFIG_AUDIO_JACK', 'jack', jack, 'jackaudio.c'] +] + if config_host.has_key(m[0]) + module_ss =3D ss.source_set() + module_ss.add(when: m[2], if_true: files(m[3])) + audio_modules +=3D {m[1] : module_ss} + endif +endforeach + +modules +=3D {'audio': audio_modules} diff --git a/configure b/configure index 50e74b1e79..f52556fef4 100755 --- a/configure +++ b/configure @@ -3718,6 +3718,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 @@ -3733,7 +3735,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 @@ -3776,6 +3780,7 @@ for drv in $audio_drv_list; do =20 jack | try-jack) if $pkg_config jack --exists; then + libjack=3Dyes jack_libs=3D$($pkg_config jack --libs) if test "$drv" =3D "try-jack"; then audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-jack= /jack/') @@ -6987,11 +6992,22 @@ 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 +if test "$libjack" =3D "yes" ; then + echo "CONFIG_LIBJACK=3Dy" >> $config_host_mak +fi echo "JACK_LIBS=3D$jack_libs" >> $config_host_mak if test "$audio_win_int" =3D "yes" ; then echo "CONFIG_AUDIO_WIN_INT=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index 06d9287005..9dda687575 100644 --- a/meson.build +++ b/meson.build @@ -143,6 +143,20 @@ 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 not_found +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 not_found +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 +jack =3D not_found +if 'CONFIG_LIBJACK' in config_host + jack =3D declare_dependency(link_args: config_host['JACK_LIBS'].split()) +endif spice =3D not_found if 'CONFIG_SPICE' in config_host spice =3D declare_dependency(compile_args: config_host['SPICE_CFLAGS'].s= plit(), @@ -213,6 +227,18 @@ liblzfse =3D not_found if 'CONFIG_LZFSE' in config_host liblzfse =3D declare_dependency(link_args: config_host['LZFSE_LIBS'].spl= it()) endif +oss =3D not_found +if 'CONFIG_AUDIO_OSS' in config_host + oss =3D declare_dependency(link_args: config_host['OSS_LIBS'].split()) +endif +dsound =3D not_found +if 'CONFIG_AUDIO_DSOUND' in config_host + dsound =3D declare_dependency(link_args: config_host['DSOUND_LIBS'].spli= t()) +endif +coreaudio =3D not_found +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') @@ -514,6 +540,7 @@ libqemuutil =3D static_library('qemuutil', qemuutil =3D declare_dependency(link_with: libqemuutil, sources: genh + version_res) =20 +subdir('audio') subdir('io') subdir('chardev') subdir('fsdev') --=20 2.26.2