]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: logindefs.c: handle libeconf dependency
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 30 Nov 2022 04:30:31 +0000 (05:30 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 30 Nov 2022 04:30:31 +0000 (05:30 +0100)
lib/meson.build
login-utils/meson.build
meson.build
term-utils/meson.build

index 313210d372b8fd224b9b0f4749858bf90ac28aec..6d08dfe4ab6ef2a48b51d9f3f4f1a54544fb79b5 100644 (file)
@@ -52,7 +52,11 @@ pty_session_c = files('pty-session.c')
 ismounted_c = files('ismounted.c')
 exec_shell_c = files('exec_shell.c')
 fileeq_c = files('fileeq.c')
-logindefs_c = files('logindefs.c')
+logindefs_c = static_library('logindefs',
+  sources : ['logindefs.c'],
+  include_directories : dir_include,
+  dependencies : lib_econf,
+)
 
 if LINUX
   lib_common_sources += '''
index d56321713480b1876be9e9b233f2f357fabe2eaf..647f568cd331383d9f92d05c89ec9be76002483f 100644 (file)
@@ -40,8 +40,7 @@ endif
 
 chfn_sources = files(
   'chfn.c',
-) + \
-  logindefs_c
+)
 
 test_islocal_sources = files(
   'islocal.c',
@@ -58,8 +57,7 @@ last_sources = files(
 
 login_sources = files(
   'login.c',
-) + \
-  logindefs_c
+)
 
 sulogin_sources = files(
   'sulogin.c',
index 91a01392b6bb6a6cf7edd8b9f7339c72baad241a..50405e2b4c5af33d353bd99294999e67f646abf5 100644 (file)
@@ -847,7 +847,7 @@ exe = executable(
   chfn_sources,
   chfn_chsh_sources,
   include_directories : includes,
-  link_with : lib_common,
+  link_with : [lib_common, logindefs_c],
   dependencies : chfn_chsh_deps,
   install_dir : usrbin_exec_dir,
   install : opt,
@@ -943,7 +943,7 @@ exe = executable(
   pty_session_c,
   monotonic_c,
   include_directories : includes,
-  link_with : lib_common,
+  link_with : [lib_common, logindefs_c],
   dependencies : [lib_pam,
                   lib_pam_misc,
                   lib_util,
@@ -977,7 +977,8 @@ exe = executable(
   'lib/logindefs.c',
   include_directories : includes,
   link_with : [lib_common,
-               lib_smartcols],
+               lib_smartcols,
+               logindefs_c],
   dependencies : [lib_selinux,
                   lib_systemd],
   install_dir : usrbin_exec_dir,
@@ -1018,7 +1019,7 @@ exe = executable(
   pty_session_c,
   monotonic_c,
   include_directories : includes,
-  link_with : lib_common,
+  link_with : [lib_common, logindefs_c],
   dependencies : [lib_pam,
                   lib_pam_misc,
                   lib_util,
@@ -2274,7 +2275,7 @@ exe = executable(
   'agetty',
   agetty_sources,
   include_directories : includes,
-  link_with : [lib_common],
+  link_with : [lib_common, logindefs_c],
   dependencies : BSD ? lib_util : [],
   install_dir : sbindir,
   install : opt,
@@ -2355,7 +2356,7 @@ exe = executable(
   'login',
   login_sources,
   include_directories : includes,
-  link_with : [lib_common],
+  link_with : [lib_common, logindefs_c],
   dependencies : [lib_pam,
                   lib_audit,
                   lib_selinux],
@@ -2982,7 +2983,7 @@ exe = executable(
   'lib/logindefs.c',
   c_args : ['-DTEST_PROGRAM'],
   include_directories : dir_include,
-  link_with : lib_common)
+  link_with : [lib_common, logindefs_c])
 exes += exe
 
 
index 2bf23225d4d805d299480b28b401c73b41cd59e7..f93ee943254a8d456ce41ee088064b300f3e2a72 100644 (file)
@@ -20,8 +20,7 @@ scriptreplay_sources = files(
 
 agetty_sources = files(
   'agetty.c',
-) + \
-  logindefs_c
+)
 
 setterm_sources = files(
   'setterm.c',