endif
want_libidn = get_option('libidn')
-if want_libidn != 'false'
+want_libidn2 = get_option('libidn2')
+if want_libidn == 'true' and want_libidn2 == 'true'
+ error('libidn and libidn2 cannot be requested simultaneously')
+endif
+
+if want_libidn2 != 'false' and want_libidn != 'true'
+ libidn = dependency('libidn2',
+ required : want_libidn2 == 'true')
+ # libidn is used for both libidn and libidn2 objects
+ if libidn.found()
+ conf.set('HAVE_LIBIDN2', true)
+ m4_defines += ['-DHAVE_LIBIDN2']
+ endif
+else
+ libidn = []
+endif
+if not conf.get('HAVE_LIBIDN2', false) and want_libidn != 'false'
libidn = dependency('libidn',
required : want_libidn == 'true')
if libidn.found()
conf.set('HAVE_LIBIDN', true)
m4_defines += ['-DHAVE_LIBIDN']
endif
-else
- libidn = []
endif
want_libiptc = get_option('libiptc')
link_with : [libbasic],
dependencies : [libdl])
-foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
- ['systemd', '', []],
- ['mymachines', 'ENABLE_MACHINED', []],
- ['resolve', 'ENABLE_RESOLVED', [libdl]]]
+foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME'],
+ ['systemd', '' ],
+ ['mymachines', 'ENABLE_MACHINED'],
+ ['resolve', 'ENABLE_RESOLVED']]
condition = tuple[1] == '' or conf.get(tuple[1], false)
if condition
module = tuple[0]
- extra_deps = tuple[2]
sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
version_script_arg = join_paths(meson.current_source_dir(), sym)
link_with : [libsystemd_internal,
libbasic],
dependencies : [threads,
- librt] + extra_deps,
+ librt],
link_depends : sym,
install : true,
install_dir : rootlibdir)
exe = executable('systemd-udevd',
systemd_udevd_sources,
include_directories : includes,
+ c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
link_with : [libudev_core,
libsystemd_network,
libudev_internal],
['microhttpd'],
['gnutls'],
['libcurl'],
+ ['libidn2'],
['libidn'],
['libiptc'],
['elfutils'],