From patchwork Tue Mar 26 14:15:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 10871245 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9ECAF17E6 for ; Tue, 26 Mar 2019 14:16:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 860B728AED for ; Tue, 26 Mar 2019 14:16:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A9B028CE1; Tue, 26 Mar 2019 14:16:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5030528AED for ; Tue, 26 Mar 2019 14:16:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7EC2E872; Tue, 26 Mar 2019 15:15:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7EC2E872 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1553609768; bh=HDX6kDZRoIucijmnHXB7ahUQev5pWb03BvYdlvb3l+4=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=rbqmVDmeZTtiWq6q98KQuJpCi3Z5vaHrDWzi+e1dpbdhR0TW/cc9lgvqOIw8BG0B1 S3qMv3fgjNl3HouuDIqvqOs09bw/JS7xvJI9tBw2WrdCob9KAW5g2o3yf7alRhgpzO 0SBH3v+JY/o9bEc5bu1KSYya9DpWvq184M9kpGh0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D70E9F8963B; Tue, 26 Mar 2019 15:15:17 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F53BF8963B; Tue, 26 Mar 2019 15:15:16 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1F835F896FF for ; Tue, 26 Mar 2019 15:15:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1F835F896FF X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0179DAD9D for ; Tue, 26 Mar 2019 14:15:12 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Tue, 26 Mar 2019 15:15:10 +0100 Message-Id: <20190326141510.10120-1-tiwai@suse.de> X-Mailer: git-send-email 2.16.4 Subject: [alsa-devel] [PATCH RFC alsa-lib] Drop -I$includedir/alsa from alsa.pc X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP We used to put the additional include path $includedir/alsa in pkgconfig just because some applications have included asoundlib.h like #include although the canonical form should be #include However, adding this include path is significantly dangerous due to possible conflicts of file names like version.h. It's already the reason to discourage people using alsa.pc for the packages. In this patch, the additional include path from alsa.pc is dropped finally. At the same time, as a rescue plan for the programs including via , a stub header file is provided in include/sound/asoundlib.h. It just includes alsa/asoundlib.h with a warning to suggest for replacing with alsa/asoundlib.h. Actually this is the same file as we install into sys/asoundlib.h, so the whole changes are very minimal here. Signed-off-by: Takashi Iwai Acked-by: Jaroslav Kysela Acked-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- include/Makefile.am | 1 + utils/alsa.pc.in | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/Makefile.am b/include/Makefile.am index 67f32e36c911..fffc8a62e88b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -96,3 +96,4 @@ AM_CPPFLAGS=-I$(top_srcdir)/include install-data-hook: test -d $(DESTDIR)$(sysincludedir) || mkdir -p $(DESTDIR)$(sysincludedir) $(INSTALL_DATA) $(srcdir)/sys.h $(DESTDIR)$(sysincludedir)/asoundlib.h + $(INSTALL_DATA) $(srcdir)/sys.h $(DESTDIR)/asoundlib.h diff --git a/utils/alsa.pc.in b/utils/alsa.pc.in index 8de9859f42db..444f66d85a34 100644 --- a/utils/alsa.pc.in +++ b/utils/alsa.pc.in @@ -9,6 +9,4 @@ Version: @VERSION@ Requires: Libs: -L${libdir} -lasound Libs.private: @ALSA_DEPLIBS@ -# -I${includedir}/alsa below is just for backward compatibility -# (it was set so mistakely in the older version) -Cflags: -I${includedir} -I${includedir}/alsa +Cflags: -I${includedir}