]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - meson.build
sd-radv: Receive Router Solicitations
[thirdparty/systemd.git] / meson.build
index 1d842274f77c5078f697d94fa5fab4a3548e253b..bd05757b87314793da8641c42ccc00c879f7b39c 100644 (file)
@@ -791,15 +791,29 @@ else
 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')
@@ -1136,15 +1150,14 @@ test_dlopen = executable(
         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)
@@ -1160,7 +1173,7 @@ foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
                         link_with : [libsystemd_internal,
                                      libbasic],
                         dependencies : [threads,
-                                        librt] + extra_deps,
+                                        librt],
                         link_depends : sym,
                         install : true,
                         install_dir : rootlibdir)
@@ -2056,6 +2069,7 @@ public_programs += [exe]
 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],
@@ -2429,6 +2443,7 @@ foreach tuple : [
         ['microhttpd'],
         ['gnutls'],
         ['libcurl'],
+        ['libidn2'],
         ['libidn'],
         ['libiptc'],
         ['elfutils'],