From fc0e54c3cc6ad48d12d2cdad18df4473c559a448 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 26 Mar 2019 14:48:23 +0100 Subject: [PATCH] Drop -I$includedir/alsa from alsa.pc 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. 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 67f32e36..665704a3 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)$(includedir)/asoundlib.h diff --git a/utils/alsa.pc.in b/utils/alsa.pc.in index 8de9859f..444f66d8 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} -- 2.47.1