Thread
-
[Proposal] Generate pkg-config for server module development
Anders Åstrand <anders@449.se> — 2025-12-17T14:17:49Z
Hello hackers! I've been looking into making it easier for extension authors to use other build systems than make. I don't have everything in place just yet, but I believe this first part where we generate pkg-config files for building server modules can be useful on it's own. I'm not entirely sure about what parameters we should include in the pkg-config file, but what I have in the attached patch is inspired by PGXS and the pkg-config files we already generate for shared libraries. A meson.build file using this could look something like this: project('my_extension', 'c', default_options: { 'b_lundef': false }) pg_dep = dependency('postgresql-server') shared_library( 'my_extension', name_prefix: '', sources: ['src/my_code.c'], dependencies: pg_dep, install: true, install_dir: pg_dep.get_variable('libdir'), ) I choose the Makefile to add this to quite arbitrarily, I'm sure arguments can be made for many of them. Any feedback is highly appreciated! We would also need to add pkg-config for building frontend tools I believe. -- Anders Åstrand Percona