build-sys: Stop using symdef headers for modules

This removes the symdef header generation m4 magic in favour of a
simpler macro method, allowing us to skip one unnecessary build step
while moving to meson, and removing an 11 year old todo!
This commit is contained in:
Arun Raghavan 2017-12-05 10:54:41 +05:30
parent bcd755bbe6
commit d9624e0382
90 changed files with 124 additions and 411 deletions

View file

@ -92,4 +92,33 @@ void pa_module_hook_connect(pa_module *m, pa_hook *hook, pa_hook_priority_t prio
bool pa__load_once(void) { return b; } \
struct __stupid_useless_struct_to_allow_trailing_semicolon
/* Check if we're defining a module (usually defined via compiler flags) */
#ifdef PA_MODULE_NAME
/* Jump through some double-indirection hoops to get PA_MODULE_NAME substituted before the concatenation */
#define _MACRO_CONCAT1(a, b) a ## b
#define _MACRO_CONCAT(a, b) _MACRO_CONCAT1(a, b)
#define pa__init _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__init)
#define pa__done _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__done)
#define pa__get_author _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__get_author)
#define pa__get_description _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__get_description)
#define pa__get_usage _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__get_usage)
#define pa__get_version _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__get_version)
#define pa__get_deprecated _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__get_deprecated)
#define pa__load_once _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__load_once)
#define pa__get_n_used _MACRO_CONCAT(PA_MODULE_NAME, _LTX_pa__get_n_used)
int pa__init(pa_module*m);
void pa__done(pa_module*m);
int pa__get_n_used(pa_module*m);
const char* pa__get_author(void);
const char* pa__get_description(void);
const char* pa__get_usage(void);
const char* pa__get_version(void);
const char* pa__get_deprecated(void);
bool pa__load_once(void);
#endif /* PA_MODULE_NAME */
#endif