Skip to content

Commit

Permalink
Adding Meson Option switching pam to bsd_auth.h ! (#16)
Browse files Browse the repository at this point in the history
* should adding bsd_auth.h instead pam

* Adding Meson options to build bsd_auth.c instead of pam

* remove git diff; enhance pam..

* remove changement dialog

* fixes #if issues

* remove comments

* Fix indent, remove useless & empty lines

* Fix indentation and unnecessary changes in meson.build

* Cosmetic changes to src/meson.build

* Revert single change to indentation in src/meson.build

---------

Co-authored-by: Bilal Emohmadian <[email protected]>
Co-authored-by: Campbell Jones <[email protected]>
  • Loading branch information
3 people authored Feb 15, 2023
1 parent e54d7e7 commit dcf496d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 7 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ if with_xf86gamma_ext
endif

c = meson.get_compiler('c')
dep_pam = c.find_library('pam', required: true)

with_bsd_auth = get_option('with-bsd_auth')

if with_bsd_auth == false
# BSDs don't have linux PAM
dep_pam = c.find_library('pam', required: true)
endif

# Inspired by https://github.com/GNOME/recipes/blob/master/meson.build
package_version = meson.project_version()
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
option('with-systemd', type: 'boolean', value: true, description: 'Enable systemd integration')
option('with-bsd_auth', type: 'boolean', value: false, description: 'Use BSD Auth instead of PAM')
option('without-kbd-layout-indicator', type: 'boolean', value: false, description: 'Disable keyboard layout indicator')
option('with-console-kit', type: 'boolean', value: true, description: 'Enable ConsoleKit support')
option('with-xf86gamma-ext', type: 'boolean', value: true, description: 'Enable support for XFree86 gamma fading')
Expand Down
13 changes: 11 additions & 2 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ screensaver_command_sources = [

screensaver_dialog_sources = [
'gnome-screensaver-dialog.c',
'gs-auth-pam.c',
'gs-lock-plug.c',
'gs-debug.c',
'setuid.c',
'subprocs.c',
]

if with_bsd_auth == false
screensaver_dialog_sources += 'gs-auth-pam.c'
else
screensaver_dialog_sources += 'gs-auth-bsdauth.c'
endif

screensaver_sources = [
'gnome-screensaver.c',
'gs-monitor.c',
Expand All @@ -34,7 +39,11 @@ screensaver_sources = [

screensaver_command_deps = [dep_glib, dep_gio]

screensaver_dialog_deps = [dep_pam, dep_gthread, dep_gtk3, dep_gnomedesktop]
screensaver_dialog_deps = [dep_gthread, dep_gtk3, dep_gnomedesktop]

if with_bsd_auth == false
screensaver_dialog_deps += dep_pam
endif

screensaver_deps = [dep_x11, dep_gtk3, dep_dbus, dep_gnomedesktop, dep_gsettings]

Expand Down

0 comments on commit dcf496d

Please sign in to comment.