| 1 |
dnl Add new --with option. |
| 2 |
dnl |
| 3 |
dnl Arg 1: option-name |
| 4 |
dnl Arg 2: variable_name |
| 5 |
dnl Arg 3: output variable name |
| 6 |
dnl Arg 4: value-type |
| 7 |
dnl Arg 5: help string |
| 8 |
dnl Arg 6: default value |
| 9 |
dnl |
| 10 |
AC_DEFUN([CONFIGURABLE_VALUE], [ |
| 11 |
AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1=$4], [$5 [$6]])]) |
| 12 |
|
| 13 |
$3="$6" |
| 14 |
if test x"$with_$2" != x; then |
| 15 |
$3=$with_$2 |
| 16 |
fi |
| 17 |
|
| 18 |
AC_SUBST($3) |
| 19 |
]) |
| 20 |
|
| 21 |
CONFIGURABLE_VALUE(config-dir, config_dir, AUTHSELECT_CONFIG_DIR, DIR, |
| 22 |
[Path to the directory where authselect stores its configuration], |
| 23 |
$sysconfdir/authselect) |
| 24 |
|
| 25 |
CONFIGURABLE_VALUE(state-dir, state_dir, AUTHSELECT_STATE_DIR, DIR, |
| 26 |
[Directory where authselect state should be stored], |
| 27 |
$localstatedir/lib/authselect) |
| 28 |
|
| 29 |
CONFIGURABLE_VALUE(profile-dir, profile_dir, AUTHSELECT_PROFILE_DIR, DIR, |
| 30 |
[Path to the directory where authselect default and vendor profiles are stored], |
| 31 |
$datarootdir/authselect) |
| 32 |
|
| 33 |
CONFIGURABLE_VALUE(custom-dir, custom_dir, AUTHSELECT_CUSTOM_DIR, DIR, |
| 34 |
[Path to the directory where are stored profiles created by administrator], |
| 35 |
$sysconfdir/authselect/custom) |
| 36 |
|
| 37 |
CONFIGURABLE_VALUE(pam-dir, pam_dir, AUTHSELECT_PAM_DIR, DIR, |
| 38 |
[Path to the pam.d directory where generated pam stacks will be stored], |
| 39 |
$sysconfdir/pam.d) |
| 40 |
|
| 41 |
CONFIGURABLE_VALUE(nsswitch-conf, nsswitch_conf, AUTHSELECT_NSSWITCH_CONF, PATH, |
| 42 |
[Path to the nsswitch.conf file], |
| 43 |
$sysconfdir/nsswitch.conf) |
| 44 |
|
| 45 |
CONFIGURABLE_VALUE(dconf-dir, dconf_dir, AUTHSELECT_DCONF_DIR, DIR, |
| 46 |
[Path to the dconf database directory to store gdm options], |
| 47 |
$sysconfdir/dconf/db/distro.d) |
| 48 |
|
| 49 |
CONFIGURABLE_VALUE(dconf-file, dconf_file, AUTHSELECT_DCONF_FILE, NAME, |
| 50 |
[Name of authselect dconf file to be stored in dconf-db], |
| 51 |
20-authselect) |
| 52 |
|
| 53 |
CONFIGURABLE_VALUE(dconf, dconf, AUTHSELECT_DCONF_BIN, PATH, |
| 54 |
[Path to the dconf utility], |
| 55 |
$bindir/dconf) |
| 56 |
|
| 57 |
CONFIGURABLE_VALUE(backup-dir, backup_dir, AUTHSELECT_BACKUP_DIR, DIR, |
| 58 |
[Directory where configuration backups should be stored], |
| 59 |
$localstatedir/lib/authselect/backups) |
| 60 |
|
| 61 |
CONFIGURABLE_VALUE(default-config-path, default_config_path, AUTHSELECT_DEFAULT_CONFIG_PATH, PATH, |
| 62 |
[Path to the default authselect configuration file], |
| 63 |
$datarootdir/authselect/authselect.conf) |
| 64 |
|
| 65 |
CONFIGURABLE_VALUE(pythonbin, pythonbin, PYTHON_BIN, PATH, |
| 66 |
[Path to the python interpreter], |
| 67 |
$bindir/python3) |
| 68 |
|
| 69 |
CONFIGURABLE_VALUE(completion-dir, completion_dir, BASH_COMPLETION_DIR, DIR, |
| 70 |
[Path to the directory where bash completion script should be stored], |
| 71 |
$BASH_COMPLETION_DIR) |
| 72 |
|
| 73 |
CONFIGURABLE_VALUE(systemd-service-dir, systemd_service_dir, SYSTEMD_SERVICE_DIR, DIR, |
| 74 |
[Path to the directory where systemd service files will be installed], |
| 75 |
\${prefix}/lib/systemd/system) |
| 76 |
|
| 77 |
AC_ARG_ENABLE( |
| 78 |
[debug-template-regex], |
| 79 |
AS_HELP_STRING( |
| 80 |
[--enable-debug-template-regex], |
| 81 |
[Regular expression matches will be print during template generation] |
| 82 |
) |
| 83 |
) |
| 84 |
|
| 85 |
AS_IF([test "x$enable_debug_template_regex" = "xyes"], |
| 86 |
AC_DEFINE_UNQUOTED( |
| 87 |
DEBUG_TEMPLATE_REGEX, 1, |
| 88 |
[Debug template regular expressions] |
| 89 |
) |
| 90 |
) |