Skip to content

Commit

Permalink
Merge branch 'pam' of https://github.com/kekek2/util-linux
Browse files Browse the repository at this point in the history
* 'pam' of https://github.com/kekek2/util-linux:
  meson: add checking build-findfs.
  meson: Fix checking options build-bits.
  meson: Check options for building lib_pam_misc
  • Loading branch information
karelzak committed Jan 8, 2025
2 parents 27c1568 + 138a375 commit 5b8e841
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
29 changes: 18 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,19 @@ if not lib_crypt.found()
lib_crypt = cc.find_library('crypt', required : get_option('build-sulogin'))
endif

pam_requirement = get_option('build-login').enabled() or \
get_option('build-chfn-chsh').enabled() or \
get_option('build-su').enabled() or \
get_option('build-runuser').enabled()
lib_pam = cc.find_library(
'pam',
disabler : true,
required : get_option('build-login').enabled() or \
get_option('build-chfn-chsh').enabled() or \
get_option('build-su').enabled() or \
get_option('build-runuser').enabled())
required : pam_requirement)
if lib_pam.found()
lib_pam_misc = cc.find_library('pam_misc')
lib_pam_misc = cc.find_library(
'pam_misc',
disabler : true,
required : pam_requirement)
lib_pam = [lib_pam, lib_pam_misc]
else
lib_pam_misc = declare_dependency()
Expand Down Expand Up @@ -1215,11 +1219,12 @@ exe = executable(
include_directories : includes,
link_with : lib_common,
install_dir : usrbin_exec_dir,
install : true)
install : opt,
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
manadocs += ['text-utils/bits.1.adoc']
bashcompletions += ['bits']
exes += exe
manadocs += ['text-utils/bits.1.adoc']
bashcompletions += ['bits']
endif

opt = not get_option('build-col').require(is_glibc).disabled()
Expand Down Expand Up @@ -3084,14 +3089,16 @@ endif

############################################################

opt = not get_option('build-findfs').disabled()
exe = executable(
'findfs',
findfs_sources,
include_directories : includes,
dependencies : [blkid_dep],
install_dir : sbindir,
install : true)
if not is_disabler(exe)
install : opt,
build_by_default : opt)
if opt and not is_disabler(exe)
exes += exe
manadocs += ['misc-utils/findfs.8.adoc']
bashcompletions += ['findfs']
Expand Down
2 changes: 2 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ option('build-pylibmount', type : 'feature',
description : 'build pylibmount')
option('build-hexdump', type : 'feature',
description : 'build hexdump')
option('build-findfs', type : 'feature',
description : 'build findfs')

# static programs

Expand Down

0 comments on commit 5b8e841

Please sign in to comment.