Skip to content

build: namespace the installed header, drop a dead pkg-config file - #92

Open
aekoroglu wants to merge 2 commits into
AudioReach:masterfrom
aekoroglu:aek-dev-2
Open

aekoroglu wants to merge 2 commits into
AudioReach:masterfrom
aekoroglu:aek-dev-2

Conversation

@aekoroglu

Copy link
Copy Markdown

Two small cleanups.

1. kvh2xml.h/usr/include/audioreach/

It currently lands in the root of /usr/include. Consumers need no change:
graphmgr and pal find it via PKG_CHECK_MODULES([KVH2XML], [kvh2xml]) and use
@KVH2XML_CFLAGS@, so updating Cflags in kvh2xml.pc.in is enough. Also
fixes the Name field, which reads k2h2xml.

2. Remove the per-board config.pc

Nothing consumes it, and it describes an interface that doesn't exist — no
libconfig, and Cflags points at ${includedir}/acdbdata, which nothing
installs. All 13 boards also install it to the same path, so a full build
leaves exactly one file. kvh2xml.pc is unaffected.

kvh2xml.h is installed into the root of /usr/include, a namespace shared
with every other package on the system. Give it a subdirectory:

  /usr/include/kvh2xml.h -> /usr/include/audioreach/kvh2xml.h

Consumers need no source change. audioreach-graphmgr and audioreach-pal
locate the header through PKG_CHECK_MODULES([KVH2XML], [kvh2xml]) and
add @KVH2XML_CFLAGS@ to their compiler flags, so updating Cflags in
kvh2xml.pc.in is sufficient for their plain #include "kvh2xml.h" to keep
resolving.

Note that /usr/include is in the default search path, so a consumer that
neglected to use @KVH2XML_CFLAGS@ compiles today and will fail after
this change. That is the intended outcome: such a consumer was relying
on the header sitting in a global namespace.

All three vendor variants are updated together, since each installs a
same-named header to the same location.

Also fix the Name field, which reads "k2h2xml" in all three files.
pkg-config resolves modules by filename rather than by Name, so this is
cosmetic.

Signed-off-by: Ali Erdinc Koroglu <ali.koroglu@oss.qualcomm.com>
Every board generates and installs a pkg-config file named config.pc,
declaring Name: config, into $(libdir)/pkgconfig. Nothing consumes it.
audioreach-graphmgr checks for spf, kvh2xml, glib-2.0, gthread-2.0 and
dbus-1; audioreach-pal checks for agm, spf, kvh2xml, capiv2-api-headers,
audioroute, glib-2.0 and gthread-2.0. No project in the stack asks for
"config".

The contents describe an interface this package does not have. There is
no libconfig for Libs: -L${libdir} to find, and Cflags points at
${includedir}/acdbdata, a directory nothing installs.

The file also cannot work as written: all boards install to the same
$(libdir)/pkgconfig/config.pc, so building several leaves whichever was
installed last. Since the generated contents are identical for every
board and carry no board identity, the surviving copy would be
indistinguishable anyway.

Remove config.pc.in, the AC_CONFIG_FILES entries, and the install rules.
kvh2xml.pc is unaffected and remains the pkg-config interface for this
package.

Signed-off-by: Ali Erdinc Koroglu <ali.koroglu@oss.qualcomm.com>
@aekoroglu
aekoroglu requested review from a team September 3, 2026 12:59
@slyon

slyon commented Sep 7, 2026

Copy link
Copy Markdown

We must be careful, as this is breaking API for consumers expecting to find kvh2xml.h in the top-directory. They now need to #include <audioreach/kvh2xml.h> instead.

But maybe this becomes irrelevant, as this header is proposed to be dropped (and shipped via mm-audio-headers instead): #95

@slyon

slyon commented Sep 7, 2026

Copy link
Copy Markdown

In the meantime, it should possibly be moved to acdbdata/kvh2xml.h (as per https://github.com/AudioReach/mm-audio-headers/blob/main/Makefile.am), so it can be a drop-in replacement for mm-audio-headers eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants