option('install-plugin-metainfo', type: 'boolean', value: false,
description: 'Installs metainfo files for enabled plugins, useful when distros create split packages'
)
+option('with-perl-legacy-api', type: 'boolean', value: false,
+ description: 'Enables the legacy IRC perl module for compatibility with old scripts'
+)
command: [generate_perl_header, '@OUTPUT@', '@INPUT@']
)
-irc_perl_module = custom_target('irc-perl-header',
- input: 'lib/IRC.pm',
- output: 'irc.pm.h',
- command: [generate_perl_header, '@OUTPUT@', '@INPUT@']
-)
+perl_cflags = []
+irc_perl_module = []
+
+if get_option('with-perl-legacy-api')
+ irc_perl_module = custom_target('irc-perl-header',
+ input: 'lib/IRC.pm',
+ output: 'irc.pm.h',
+ command: [generate_perl_header, '@OUTPUT@', '@INPUT@']
+ )
+ perl_cflags += '-DOLD_PERL'
+endif
perl = find_program('perl')
if ret.returncode() != 0
error('perl: Failed to get cflags')
endif
-perl_cflags = []
foreach flag : ret.stdout().strip().split(' ')
if flag.startswith('-I') or flag.startswith('-D')
perl_cflags += flag