"Fossies" - the Fresh Open Source Software Archive

Member "sssd-2.4.2/src/conf_macros.m4" (19 Feb 2021, 33879 Bytes) of package /linux/misc/sssd-2.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "conf_macros.m4": 2.4.1_vs_2.4.2.

    1 AC_DEFUN([WITH_DB_PATH],
    2   [ AC_ARG_WITH([db-path],
    3                 [AC_HELP_STRING([--with-db-path=PATH],
    4                                 [Path to the SSSD databases [/var/lib/sss/db]]
    5                                )
    6                 ]
    7                )
    8     config_dbpath="\"SSS_STATEDIR\"/db"
    9     dbpath="${localstatedir}/lib/sss/db"
   10     if test x"$with_db_path" != x; then
   11         config_dbpath=$with_db_path
   12         dbpath=$with_db_path
   13     fi
   14     AC_SUBST(dbpath)
   15     AC_DEFINE_UNQUOTED(DB_PATH, "$config_dbpath", [Path to the SSSD databases])
   16   ])
   17 
   18 AC_DEFUN([WITH_PLUGIN_PATH],
   19   [ AC_ARG_WITH([plugin-path],
   20                 [AC_HELP_STRING([--with-plugin-path=PATH],
   21                                 [Path to the SSSD data provider plugins [/usr/lib/sssd]]
   22                                )
   23                 ]
   24                )
   25     pluginpath="${libdir}/sssd"
   26     config_pluginpath="\"LIBDIR\"/sssd"
   27     if test x"$with_plugin_path" != x; then
   28         pluginpath=$with_plugin_path
   29         config_pluginpath=$with_plugin_path
   30     fi
   31     AC_SUBST(pluginpath)
   32     AC_DEFINE_UNQUOTED(DATA_PROVIDER_PLUGINS_PATH, "$config_pluginpath", [Path to the SSSD data provider plugins])
   33   ])
   34 
   35 AC_DEFUN([WITH_PID_PATH],
   36   [ AC_ARG_WITH([pid-path],
   37                 [AC_HELP_STRING([--with-pid-path=PATH],
   38                                 [Where to store pid files for the SSSD [/var/run]]
   39                                )
   40                 ]
   41                )
   42     config_pidpath="\"VARDIR\"/run"
   43     pidpath="${localstatedir}/run"
   44     if test x"$with_pid_path" != x; then
   45         config_pidpath=$with_pid_path
   46         pidpath=$with_pid_path
   47     fi
   48     AC_SUBST(pidpath)
   49     AC_DEFINE_UNQUOTED(PID_PATH, "$config_pidpath", [Where to store pid files for the SSSD])
   50   ])
   51 
   52 AC_DEFUN([WITH_LOG_PATH],
   53   [ AC_ARG_WITH([log-path],
   54                 [AC_HELP_STRING([--with-log-path=PATH],
   55                                 [Where to store log files for the SSSD [/var/log/sssd]]
   56                                )
   57                 ]
   58                )
   59     config_logpath="\"VARDIR\"/log/sssd"
   60     logpath="${localstatedir}/log/sssd"
   61     if test x"$with_log_path" != x; then
   62         config_logpath=$with_log_path
   63         logpath=$with_log_path
   64     fi
   65     AC_SUBST(logpath)
   66     AC_DEFINE_UNQUOTED(LOG_PATH, "$config_logpath", [Where to store log files for the SSSD])
   67   ])
   68 
   69 AC_DEFUN([WITH_PUBCONF_PATH],
   70   [ AC_ARG_WITH([pubconf-path],
   71                 [AC_HELP_STRING([--with-pubconf-path=PATH],
   72                                 [Where to store pubconf files for the SSSD [/var/lib/sss/pubconf]]
   73                                )
   74                 ]
   75                )
   76     config_pubconfpath="\"SSS_STATEDIR\"/pubconf"
   77     pubconfpath="${localstatedir}/lib/sss/pubconf"
   78     if test x"$with_pubconf_path" != x; then
   79         config_pubconfpath=$with_pubconf_path
   80         pubconfpath=$with_pubconf_path
   81     fi
   82     AC_SUBST(pubconfpath)
   83     AC_DEFINE_UNQUOTED(PUBCONF_PATH, "$config_pubconfpath", [Where to store pubconf files for the SSSD])
   84   ])
   85 
   86 AC_DEFUN([WITH_PIPE_PATH],
   87   [ AC_ARG_WITH([pipe-path],
   88                 [AC_HELP_STRING([--with-pipe-path=PATH],
   89                                 [Where to store pipe files for the SSSD interconnects [/var/lib/sss/pipes]]
   90                                )
   91                 ]
   92                )
   93     config_pipepath="\"SSS_STATEDIR\"/pipes"
   94     pipepath="${localstatedir}/lib/sss/pipes"
   95     if test x"$with_pipe_path" != x; then
   96         config_pipepath=$with_pipe_path
   97         pipepath=$with_pipe_path
   98     fi
   99     AC_SUBST(pipepath)
  100     AC_DEFINE_UNQUOTED(PIPE_PATH, "$config_pipepath", [Where to store pipe files for the SSSD interconnects])
  101   ])
  102 
  103 AC_DEFUN([WITH_MCACHE_PATH],
  104   [ AC_ARG_WITH([mcache-path],
  105                 [AC_HELP_STRING([--with-mcache-path=PATH],
  106                                 [Where to store mmap cache files for the SSSD interconnects [/var/lib/sss/mc]]
  107                                )
  108                 ]
  109                )
  110     config_mcpath="\"SSS_STATEDIR\"/mc"
  111     mcpath="${localstatedir}/lib/sss/mc"
  112     if test x"$with_mcache_path" != x; then
  113         config_mcpath=$with_mcache_path
  114         mcpath=$with_mcache_path
  115     fi
  116     AC_SUBST(mcpath)
  117     AC_DEFINE_UNQUOTED(MCACHE_PATH, "$config_mcpath", [Where to store mmap cache files for the SSSD interconnects])
  118   ])
  119 
  120 AC_DEFUN([WITH_INITSCRIPT],
  121   [ AC_ARG_WITH([initscript],
  122                 [AC_HELP_STRING([--with-initscript=INITSCRIPT_TYPE],
  123                                 [Type of your init script (sysv|systemd). [sysv]]
  124                                )
  125                 ]
  126                )
  127   default_initscript=sysv
  128   if test x"$with_initscript" = x; then
  129     with_initscript=$default_initscript
  130   fi
  131 
  132   if test x"$with_initscript" = xsysv || \
  133      test x"$with_initscript" = xsystemd; then
  134         initscript=$with_initscript
  135   else
  136       AC_MSG_ERROR([Illegal value -$with_initscript- for option --with-initscript])
  137   fi
  138 
  139   AM_CONDITIONAL([HAVE_SYSV], [test x"$initscript" = xsysv])
  140   AM_CONDITIONAL([HAVE_SYSTEMD_UNIT], [test x"$initscript" = xsystemd])
  141   AC_MSG_NOTICE([Will use init script type: $initscript])
  142   ])
  143 
  144 AC_DEFUN([WITH_SYSLOG],
  145   [ AC_ARG_WITH([syslog],
  146                 [AC_HELP_STRING([--with-syslog=SYSLOG_TYPE],
  147                                 [Type of your system logger (syslog|journald). [syslog]]
  148                                )
  149                 ],
  150                 [],
  151                 [with_syslog="syslog"]
  152                )
  153 
  154   if test x"$with_syslog" = xsyslog || \
  155      test x"$with_syslog" = xjournald; then
  156         syslog=$with_syslog
  157   else
  158       AC_MSG_ERROR([Unknown syslog type, supported types are syslog and journald])
  159   fi
  160 
  161   AM_CONDITIONAL([WITH_JOURNALD], [test x"$syslog" = xjournald])
  162   ])
  163 
  164 AC_DEFUN([WITH_ENVIRONMENT_FILE],
  165   [ AC_ARG_WITH([environment_file],
  166                 [AC_HELP_STRING([--with-environment-file=PATH], [Path to environment file [/etc/sysconfig/sssd]])
  167                 ]
  168                )
  169 
  170     ENVIRONMENT_FILE_PATH="${sysconfdir}/sysconfig/sssd"
  171     if test x"$with_environment_file" != x; then
  172         ENVIRONMENT_FILE_PATH=$with_environment_file
  173     fi
  174     AC_SUBST(environment_file, [$ENVIRONMENT_FILE_PATH])
  175   ])
  176 
  177 AC_DEFUN([WITH_INIT_DIR],
  178   [ AC_ARG_WITH([init-dir],
  179                 [AC_HELP_STRING([--with-init-dir=DIR],
  180                                 [Where to store init script for sssd [/etc/rc.d/init.d]]
  181                                )
  182                 ]
  183                )
  184     initdir="${sysconfdir}/rc.d/init.d"
  185     if test x$osname = xgentoo; then
  186         initdir="${sysconfdir}/init.d"
  187     fi
  188     if test x"$with_init_dir" != x; then
  189         initdir=$with_init_dir
  190     fi
  191     AC_SUBST(initdir)
  192   ])
  193 
  194 dnl A macro to configure the directory to install the systemd unit files to
  195 AC_DEFUN([WITH_SYSTEMD_UNIT_DIR],
  196   [ AC_ARG_WITH([systemdunitdir],
  197                 [ AC_HELP_STRING([--with-systemdunitdir=DIR],
  198                                  [Directory for systemd service files [Auto]]
  199                                 ),
  200                 ],
  201                )
  202   if test x"$with_systemdunitdir" != x; then
  203     systemdunitdir=$with_systemdunitdir
  204   else
  205     systemdunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
  206     if test x"$systemdunitdir" = x; then
  207       AC_MSG_ERROR([Could not detect systemd unit directory])
  208     fi
  209   fi
  210   AC_SUBST(systemdunitdir)
  211   ])
  212 
  213 dnl A macro to configure the directory to install the systemd unit file
  214 dnl overrides to
  215 AC_DEFUN([WITH_SYSTEMD_CONF_DIR],
  216   [ AC_ARG_WITH([systemdconfdir],
  217                 [ AC_HELP_STRING([--with-systemdconfdir=DIR],
  218                                  [Directory for systemd service file overrides [Auto]]
  219                                 ),
  220                 ],
  221                )
  222   if test x"$with_systemdconfdir" != x; then
  223     systemdconfdir=$with_systemdconfdir
  224   else
  225     systemdconfdir=$($PKG_CONFIG --variable=systemdsystemconfdir systemd)
  226     if test x"$systemdconfdir" = x; then
  227       AC_MSG_ERROR([Could not detect systemd config directory])
  228     fi
  229   fi
  230   AC_SUBST(systemdconfdir, [$systemdconfdir/sssd.service.d])
  231   ])
  232 
  233 AC_DEFUN([WITH_MANPAGES],
  234   [ AC_ARG_WITH([manpages],
  235                 [AC_HELP_STRING([--with-manpages],
  236                                 [Whether to regenerate man pages from DocBook sources [yes]]
  237                                )
  238                 ],
  239                 [],
  240                 with_manpages=yes
  241                )
  242     if test x"$with_manpages" = xyes; then
  243         HAVE_MANPAGES=1
  244         AC_SUBST(HAVE_MANPAGES)
  245     fi
  246   ])
  247 AM_CONDITIONAL([BUILD_MANPAGES], [test x$with_manpages = xyes])
  248 
  249 AC_DEFUN([WITH_XML_CATALOG],
  250   [ AC_ARG_WITH([xml-catalog-path],
  251                 [AC_HELP_STRING([--with-xml-catalog-path=PATH],
  252                                 [Where to look for XML catalog [/etc/xml/catalog]]
  253                                )
  254                 ]
  255                )
  256     SGML_CATALOG_FILES="/etc/xml/catalog"
  257     if test x"$with_xml_catalog_path" != x; then
  258         SGML_CATALOG_FILES="$with_xml_catalog_path"
  259     fi
  260     AC_SUBST([SGML_CATALOG_FILES])
  261   ])
  262 
  263 AC_DEFUN([WITH_KRB5_PLUGIN_PATH],
  264   [ AC_ARG_WITH([krb5-plugin-path],
  265                 [AC_HELP_STRING([--with-krb5-plugin-path=PATH],
  266                                 [Path to Kerberos plugin store [/usr/lib/krb5/plugins/libkrb5]]
  267                                )
  268                 ]
  269                )
  270     krb5pluginpath="${libdir}/krb5/plugins/libkrb5"
  271     if test x"$with_krb5_plugin_path" != x; then
  272         krb5pluginpath=$with_krb5_plugin_path
  273     fi
  274     AC_SUBST(krb5pluginpath)
  275   ])
  276 
  277 AC_DEFUN([WITH_CIFS_PLUGIN_PATH],
  278   [ AC_ARG_WITH([cifs-plugin-path],
  279                 [AC_HELP_STRING([--with-cifs-plugin-path=PATH],
  280                                 [Path to cifs-utils plugin store [/usr/lib/cifs-utils]]
  281                                )
  282                 ]
  283                )
  284     cifspluginpath="${libdir}/cifs-utils"
  285     if test x"$with_cifs_plugin_path" != x; then
  286         cifspluginpath=$with_cifs_plugin_path
  287     fi
  288     AC_SUBST(cifspluginpath)
  289   ])
  290 
  291 AC_DEFUN([WITH_WINBIND_PLUGIN_PATH],
  292   [ AC_ARG_WITH([winbind-plugin-path],
  293                 [AC_HELP_STRING([--with-winbind-plugin-path=PATH],
  294                                 [Path to winbind idmap plugin store [/usr/lib/samba/idmap]]
  295                                )
  296                 ]
  297                )
  298     winbindpluginpath="${libdir}/samba/idmap"
  299     if test x"$with_winbind_plugin_path" != x; then
  300         winbindpluginpath=$with_winbind_plugin_path
  301     fi
  302     AC_SUBST(winbindpluginpath)
  303   ])
  304 
  305 AC_DEFUN([WITH_KRB5_RCACHE_DIR],
  306   [ AC_ARG_WITH([krb5-rcache-dir],
  307                 [AC_HELP_STRING([--with-krb5-rcache-dir=PATH],
  308                                 [Path to store Kerberos replay caches [__LIBKRB5_DEFAULTS__]]
  309                                )
  310                 ]
  311                )
  312     krb5rcachedir="__LIBKRB5_DEFAULTS__"
  313     if test x"$with_krb5_rcache_dir" != x; then
  314         krb5rcachedir=$with_krb5_rcache_dir
  315     fi
  316     AC_SUBST(krb5rcachedir)
  317     AC_DEFINE_UNQUOTED(KRB5_RCACHE_DIR, "$krb5rcachedir", [Directory used for storing Kerberos replay caches])
  318   ])
  319 
  320 AC_DEFUN([WITH_DEFAULT_CCACHE_DIR],
  321   [ AC_ARG_WITH([default-ccache-dir],
  322                 [AC_HELP_STRING([--with-default-ccache-dir=CCACHEDIR],
  323                                 [The default value of krb5_ccachedir [/tmp]]
  324                                )
  325                 ]
  326                )
  327     config_def_ccache_dir="/tmp"
  328     if test x"$with_default_ccache_dir" != x; then
  329         config_def_ccache_dir=$with_default_ccache_dir
  330     fi
  331     AC_SUBST(config_def_ccache_dir)
  332     AC_DEFINE_UNQUOTED(DEFAULT_CCACHE_DIR, "$config_def_ccache_dir", [The default value of krb5_ccachedir])
  333   ])
  334 
  335 AC_DEFUN([WITH_DEFAULT_CCNAME_TEMPLATE],
  336   [ AC_ARG_WITH([default-ccname-template],
  337                 [AC_HELP_STRING([--with-default-ccname-template=CCACHE],
  338                                 [The default fallback value of krb5_ccname_template [FILE:%d/krb5cc_%U_XXXXXX]]
  339                                )
  340                 ]
  341                )
  342     config_def_ccname_template="FILE:%d/krb5cc_%U_XXXXXX"
  343     if test x"$with_default_ccname_template" != x; then
  344         config_def_ccname_template=$with_default_ccname_template
  345     fi
  346     AC_SUBST(config_def_ccname_template)
  347     AC_DEFINE_UNQUOTED(DEFAULT_CCNAME_TEMPLATE, "$config_def_ccname_template", [The default value of krb5_ccname_template])
  348   ])
  349 
  350 AC_DEFUN([WITH_KRB5AUTHDATA_PLUGIN_PATH],
  351   [ AC_ARG_WITH([krb5authdata-plugin-path],
  352                 [AC_HELP_STRING([--with-krb5authdata-plugin-path=PATH],
  353                                 [Path to Kerberos authdata plugin store [/usr/lib/krb5/plugins/authdata]]
  354                                )
  355                 ]
  356                )
  357     krb5authdatapluginpath="${libdir}/krb5/plugins/authdata"
  358     if test x"$with_krb5authdata_plugin_path" != x; then
  359         krb5authdatapluginpath=$with_krb5authdata_plugin_path
  360     fi
  361     AC_SUBST(krb5authdatapluginpath)
  362   ])
  363 
  364 AC_DEFUN([WITH_KRB5_CONF],
  365   [ AC_ARG_WITH([krb5_conf],
  366                 [AC_HELP_STRING([--with-krb5-conf=PATH], [Path to krb5.conf file [/etc/krb5.conf]])
  367                 ]
  368                )
  369 
  370     KRB5_CONF_PATH="\"SYSCONFDIR\"/krb5.conf"
  371     if test x"$with_krb5_conf" != x; then
  372         KRB5_CONF_PATH=$with_krb5_conf
  373     fi
  374     AC_DEFINE_UNQUOTED([KRB5_CONF_PATH], ["$KRB5_CONF_PATH"], [KRB5 configuration file])
  375   ])
  376 
  377 AC_DEFUN([WITH_PYTHON2_BINDINGS],
  378   [ AC_ARG_WITH([python2-bindings],
  379                 [AC_HELP_STRING([--with-python2-bindings],
  380                                 [Whether to build python2 bindings [no]])
  381                 ],
  382                 [],
  383                 [with_python2_bindings=no]
  384                )
  385     if test x"$with_python2_bindings" = xyes; then
  386         AC_SUBST([HAVE_PYTHON2_BINDINGS], [yes])
  387         AC_DEFINE_UNQUOTED([HAVE_PYTHON2_BINDINGS], [1],
  388                            [Build with python2 bindings])
  389     fi
  390     AM_CONDITIONAL([BUILD_PYTHON2_BINDINGS],
  391                    [test x"$with_python2_bindings" = xyes])
  392   ])
  393 
  394 AC_DEFUN([WITH_PYTHON3_BINDINGS],
  395   [ AC_ARG_WITH([python3-bindings],
  396                 [AC_HELP_STRING([--with-python3-bindings],
  397                                 [Whether to build python3 bindings [yes]])
  398                 ],
  399                 [],
  400                 [with_python3_bindings=yes]
  401                )
  402     if test x"$with_python3_bindings" = xyes; then
  403         AC_SUBST([HAVE_PYTHON3_BINDINGS], [yes])
  404         AC_DEFINE_UNQUOTED([HAVE_PYTHON3_BINDINGS], [1],
  405                            [Build with python3 bindings])
  406     fi
  407     AM_CONDITIONAL([BUILD_PYTHON3_BINDINGS],
  408                    [test x"$with_python3_bindings" = xyes])
  409   ])
  410 
  411 AC_DEFUN([WITH_SELINUX],
  412   [ AC_ARG_WITH([selinux],
  413                 [AC_HELP_STRING([--with-selinux],
  414                                 [Whether to build with SELinux support [yes]]
  415                                )
  416                 ],
  417                 [],
  418                 with_selinux=yes
  419                )
  420     if test x"$with_selinux" = xyes; then
  421         HAVE_SELINUX=1
  422         AC_SUBST(HAVE_SELINUX)
  423         AC_DEFINE_UNQUOTED(HAVE_SELINUX, 1, [Build with SELinux support])
  424     fi
  425     AM_CONDITIONAL([BUILD_SELINUX], [test x"$with_selinux" = xyes])
  426   ])
  427 
  428 AC_DEFUN([WITH_TEST_DIR],
  429   [ AC_ARG_WITH([test-dir],
  430                 [AC_HELP_STRING([--with-test-dir=PATH],
  431                                 [Directory used for make check temporary files [$builddir]]
  432                                )
  433                 ],
  434                 [TEST_DIR=$withval],
  435                 [TEST_DIR="."]
  436                )
  437     AC_SUBST(TEST_DIR)
  438     AC_DEFINE_UNQUOTED(TEST_DIR, "$TEST_DIR", [Directory used for 'make check' temporary files])
  439   ])
  440 
  441 AC_DEFUN([WITH_IPA_GETKEYTAB],
  442   [ AC_ARG_WITH([ipa_getkeytab],
  443                 [AC_HELP_STRING([--with-ipa-getkeytab=PATH],
  444                                 [Path to ipa_getkeytab binary to retrieve keytabs from FreeIPA server [/usr/sbin/ipa-getkeytab]]
  445                                )
  446                 ]
  447                )
  448     IPA_GETKEYTAB_PATH="/usr/sbin/ipa-getkeytab"
  449     if test x"$with_ipa_getkeytab" != x; then
  450         IPA_GETKEYTAB_PATH=$with_ipa_getkeytab
  451     fi
  452     AC_DEFINE_UNQUOTED(IPA_GETKEYTAB_PATH, "$IPA_GETKEYTAB_PATH", [The path to the ipa-getkeytab utility])
  453   ])
  454 
  455 AC_DEFUN([WITH_NSCD],
  456   [ AC_ARG_WITH([nscd],
  457                 [AC_HELP_STRING([--with-nscd=PATH],
  458                                 [Path to nscd binary to attempt to flush nscd cache after local domain operations [/usr/sbin/nscd]]
  459                                )
  460                 ]
  461                )
  462     NSCD_PATH="/usr/sbin/nscd"
  463     if test x"$with_nscd" != x; then
  464         NSCD_PATH=$with_nscd
  465         AC_SUBST(NSCD_PATH)
  466     fi
  467     AC_DEFINE_UNQUOTED(HAVE_NSCD, $NSCD_PATH, [flush nscd cache after local domain operations])
  468   ])
  469 
  470 AC_DEFUN([WITH_NSCD_CONF],
  471   [ AC_ARG_WITH([nscd_conf],
  472                 [AC_HELP_STRING([--with-nscd-conf=PATH], [Path to nscd.conf file [/etc/nscd.conf]])
  473                 ]
  474                )
  475 
  476     NSCD_CONF_PATH="/etc/nscd.conf"
  477     if test x"$with_nscd_conf" != x; then
  478         NSCD_CONF_PATH=$with_nscd_conf
  479     fi
  480     AC_DEFINE_UNQUOTED([NSCD_CONF_PATH], ["$NSCD_CONF_PATH"], [NSCD configuration file])
  481   ])
  482 
  483 
  484 AC_DEFUN([WITH_SEMANAGE],
  485   [ AC_ARG_WITH([semanage],
  486                 [AC_HELP_STRING([--with-semanage],
  487                                 [Whether to build with SELinux user management support [yes]]
  488                                )
  489                 ],
  490                 [],
  491                 with_semanage=yes
  492                )
  493     if test x"$with_semanage" = xyes; then
  494         HAVE_SEMANAGE=1
  495         AC_SUBST(HAVE_SEMANAGE)
  496         AC_DEFINE_UNQUOTED(HAVE_SEMANAGE, 1, [Build with SELinux support])
  497     fi
  498     AM_CONDITIONAL([BUILD_SEMANAGE], [test x"$with_semanage" = xyes])
  499   ])
  500 
  501 AC_DEFUN([WITH_GPO_CACHE_PATH],
  502   [ AC_ARG_WITH([gpo-cache-path],
  503                 [AC_HELP_STRING([--with-gpo-cache-path=PATH],
  504                                 [Where to store GPO policy files [/var/lib/sss/gpo_cache]]
  505                                )
  506                 ]
  507                )
  508     config_gpocachepath="\"SSS_STATEDIR\"/gpo_cache"
  509     gpocachepath="${localstatedir}/lib/sss/gpo_cache"
  510     if test x"$with_gpo_cache_path" != x; then
  511         config_gpocachepath=$with_gpo_cache_path
  512         gpocachepath=$with_gpo_cache_path
  513     fi
  514     AC_SUBST(gpocachepath)
  515     AC_DEFINE_UNQUOTED(GPO_CACHE_PATH, "$config_gpocachepath", [Where to store GPO policy files])
  516   ])
  517 
  518 AC_DEFUN([WITH_LIBNL],
  519   [ AC_ARG_WITH([libnl],
  520                 [AC_HELP_STRING([--with-libnl],
  521                                 [Whether to build with libnetlink support (libnl3, libnl1, no) [auto]]
  522                                )
  523                 ],
  524                 [],
  525                 with_libnl=yes
  526                )
  527 
  528     if test x"$with_libnl" = xyes; then
  529 
  530         AM_CHECK_LIBNL3
  531 
  532         if test x"$HAVE_LIBNL" != x1; then
  533             AM_CHECK_LIBNL1
  534         fi
  535 
  536         if test x"$HAVE_LIBNL" != x1; then
  537             AC_MSG_WARN([Building without netlink])
  538         fi
  539 
  540     elif test x"$with_libnl" = xlibnl3; then
  541 
  542         AM_CHECK_LIBNL3
  543 
  544         if test x"$HAVE_LIBNL" != x1; then
  545             AC_MSG_ERROR([Libnl3 required, but not available])
  546         fi
  547 
  548     elif test x"$with_libnl" = xlibnl1; then
  549 
  550         AM_CHECK_LIBNL1
  551 
  552         if test x"$HAVE_LIBNL" != x1; then
  553             AC_MSG_ERROR([Libnl required, but not available])
  554         fi
  555     fi
  556   ])
  557 
  558 AC_DEFUN([WITH_NOLOGIN_SHELL],
  559   [ AC_ARG_WITH([nologin-shell],
  560                 [AC_HELP_STRING([--with-nologin-shell=PATH],
  561                                 [The shell used to deny access to users [/sbin/nologin]]
  562                                )
  563                 ]
  564                )
  565     nologin_shell="/sbin/nologin"
  566     if test x"$with_nologin_shell" != x; then
  567         nologin_shell=$with_nologin_shell
  568     fi
  569     AC_DEFINE_UNQUOTED(NOLOGIN_SHELL, "$nologin_shell", [The shell used to deny access to users])
  570   ])
  571 
  572 AC_DEFUN([WITH_SESSION_RECORDING_SHELL],
  573   [ AC_ARG_WITH([session-recording-shell],
  574                 [AC_HELP_STRING([--with-session-recording-shell=PATH],
  575                                 [The shell used to record user sessions [/usr/bin/tlog-rec-session]]
  576                                )
  577                 ]
  578                )
  579     session_recording_shell="/usr/bin/tlog-rec-session"
  580     if test x"$with_session_recording_shell" != x; then
  581         session_recording_shell=$with_session_recording_shell
  582     fi
  583     AC_SUBST(session_recording_shell)
  584     AC_DEFINE_UNQUOTED(SESSION_RECORDING_SHELL, "$session_recording_shell",
  585                        [The shell used to record user sessions])
  586   ])
  587 
  588 AC_ARG_ENABLE([all-experimental-features],
  589               [AS_HELP_STRING([--enable-all-experimental-features],
  590                               [build all experimental features])],
  591               [build_all_experimental_features=$enableval],
  592               [build_all_experimental_features=no])
  593 
  594 
  595 AC_DEFUN([WITH_UNICODE_LIB],
  596   [ AC_ARG_WITH([unicode-lib],
  597                 [AC_HELP_STRING([--with-unicode-lib=<library>],
  598                                 [Which library to use for Unicode processing (libunistring, glib2) [glib2]]
  599                                )
  600                 ]
  601                )
  602     unicode_lib="glib2"
  603     if test x"$with_unicode_lib" != x; then
  604         unicode_lib=$with_unicode_lib
  605     fi
  606 
  607     if test x"$unicode_lib" != x"libunistring" -a x"$unicode_lib" != x"glib2"; then
  608 		AC_MSG_ERROR([Unsupported Unicode library])
  609     fi
  610 
  611     AM_CONDITIONAL([WITH_LIBUNISTRING], test x"$unicode_lib" = x"libunistring")
  612     AM_CONDITIONAL([WITH_GLIB], test x"$unicode_lib" = x"glib2")
  613   ])
  614 
  615 AC_DEFUN([WITH_APP_LIBS],
  616   [ AC_ARG_WITH([app-libs],
  617                 [AC_HELP_STRING([--with-app-libs=<path>],
  618                                 [Path to the 3rd party application plugins [/usr/lib/sssd/modules]]
  619                                )
  620                 ]
  621                )
  622     appmodpath="${libdir}/sssd/modules"
  623     config_appmodpath="\"LIBDIR\"/sssd/modules"
  624     if test x"$with_app_libs" != x; then
  625         appmodpath=$with_app_libs
  626         config_appmodpath=$with_app_libs
  627     fi
  628     AC_SUBST(appmodpath)
  629     AC_DEFINE_UNQUOTED(APP_MODULES_PATH, "$config_appmodpath", [Path to the 3rd party modules])
  630   ])
  631 
  632 AC_DEFUN([WITH_SUDO],
  633   [ AC_ARG_WITH([sudo],
  634                 [AC_HELP_STRING([--with-sudo],
  635                                 [Whether to build with sudo support [yes]]
  636                                )
  637                 ],
  638                 [with_sudo=$withval],
  639                 with_sudo=yes
  640                )
  641 
  642     if test x"$with_sudo" = xyes; then
  643         AC_DEFINE(BUILD_SUDO, 1, [whether to build with SUDO support])
  644     fi
  645     AM_CONDITIONAL([BUILD_SUDO], [test x"$with_sudo" = xyes])
  646   ])
  647 
  648 AC_DEFUN([WITH_SUDO_LIB_PATH],
  649   [ AC_ARG_WITH([sudo-lib-path],
  650                 [AC_HELP_STRING([--with-sudo-lib-path=<path>],
  651                                 [Path to the sudo library [/usr/lib/]]
  652                                )
  653                 ]
  654                )
  655     sudolibpath="${libdir}"
  656     if test x"$with_sudo_lib_path" != x; then
  657         sudolibpath=$with_sudo_lib_path
  658     fi
  659     AC_SUBST(sudolibpath)
  660   ])
  661 
  662 AC_DEFUN([WITH_AUTOFS],
  663   [ AC_ARG_WITH([autofs],
  664                 [AC_HELP_STRING([--with-autofs],
  665                                 [Whether to build with autofs support [yes]]
  666                                )
  667                 ],
  668                 [with_autofs=$withval],
  669                 with_autofs=yes
  670                )
  671 
  672     if test x"$with_autofs" = xyes; then
  673         AC_DEFINE(BUILD_AUTOFS, 1, [whether to build with AUTOFS support])
  674     fi
  675     AM_CONDITIONAL([BUILD_AUTOFS], [test x"$with_autofs" = xyes])
  676   ])
  677 
  678 AC_DEFUN([WITH_SSH],
  679   [ AC_ARG_WITH([ssh],
  680                 [AC_HELP_STRING([--with-ssh],
  681                                 [Whether to build with SSH support [yes]]
  682                                )
  683                 ],
  684                 [with_ssh=$withval],
  685                 with_ssh=yes
  686                )
  687 
  688     if test x"$with_ssh" = xyes; then
  689         AC_DEFINE(BUILD_SSH, 1, [whether to build with SSH support])
  690     fi
  691     AM_CONDITIONAL([BUILD_SSH], [test x"$with_ssh" = xyes])
  692   ])
  693 
  694 AC_DEFUN([WITH_IFP],
  695   [ AC_ARG_WITH([infopipe],
  696                 [AC_HELP_STRING([--with-infopipe],
  697                                 [Whether to build with InfoPipe support [yes]]
  698                                )
  699                 ],
  700                 [with_infopipe=$withval],
  701                 with_infopipe=yes
  702                )
  703 
  704     if test x"$with_infopipe" = xyes; then
  705         AC_DEFINE(BUILD_IFP, 1, [whether to build with InfoPipe support])
  706     fi
  707     AM_CONDITIONAL([BUILD_IFP], [test x"$with_infopipe" = xyes])
  708   ])
  709 
  710 AC_DEFUN([WITH_LIBWBCLIENT],
  711   [ AC_ARG_WITH([libwbclient],
  712                 [AC_HELP_STRING([--with-libwbclient],
  713                                 [Whether to build SSSD implementation of libwbclient [no].
  714                                  Please note SSSD's libwbclient is deprecated and will be
  715                                  removed in one of the next versions of SSSD.]
  716                                )
  717                 ],
  718                 [with_libwbclient=$withval],
  719                 with_libwbclient=no
  720                )
  721 
  722     if test x"$with_libwbclient" = xyes; then
  723         AC_DEFINE(BUILD_LIBWBCLIENT, 1, [whether to build SSSD implementation of libwbclient])
  724 
  725         libwbclient_version="0.14"
  726         AC_SUBST(libwbclient_version)
  727 
  728         libwbclient_version_info="14:0:14"
  729         AC_SUBST(libwbclient_version_info)
  730     fi
  731     AM_CONDITIONAL([BUILD_LIBWBCLIENT], [test x"$with_libwbclient" = xyes])
  732   ])
  733 
  734 AC_DEFUN([WITH_SAMBA],
  735   [ AC_ARG_WITH([samba],
  736                 [AC_HELP_STRING([--with-samba],
  737                                 [Whether to build with samba4 libraries [yes]]
  738                                )
  739                 ],
  740                 [with_samba=$withval],
  741                 [with_samba=yes]
  742                )
  743 
  744     if test x"$with_samba" = xyes; then
  745         AC_DEFINE(BUILD_SAMBA, 1, [whether to build with samba support])
  746     fi
  747     AM_CONDITIONAL([BUILD_SAMBA], [test x"$with_samba" = xyes])
  748   ])
  749 
  750 AC_ARG_ENABLE([sss-default-nss-plugin],
  751               [AS_HELP_STRING([--enable-sss-default-nss-plugin],
  752                               [This option change standard behaviour of sss nss
  753                                plugin. If this option is enabled the sss nss
  754                                plugin will behave as it was not in
  755                                nsswitch.conf when sssd is not running.
  756                                [default=no]])],
  757               [enable_sss_default_nss_plugin=$enableval],
  758               [enable_sss_default_nss_plugin=no])
  759 AS_IF([test x$enable_sss_default_nss_plugin = xyes],
  760       AC_DEFINE_UNQUOTED([NONSTANDARD_SSS_NSS_BEHAVIOUR], [1],
  761           [whether to build sssd nss plugin with nonstandard glibc behaviour]))
  762 
  763 AC_DEFUN([WITH_NFS],
  764   [ AC_ARG_WITH([nfsv4-idmapd-plugin],
  765                 [AC_HELP_STRING([--with-nfsv4-idmapd-plugin],
  766                                 [Whether to build with NFSv4 IDMAP support [yes]]
  767                                )
  768                 ],
  769                 [with_nfsv4_idmap=$withval],
  770                 [with_nfsv4_idmap=yes]
  771                )
  772 
  773     if test x"$with_nfsv4_idmap" = xyes; then
  774         AC_DEFINE(BUILD_NFS_IDMAP, 1, [whether to build with NFSv4 IDMAP support])
  775     fi
  776     AM_CONDITIONAL([BUILD_NFS_IDMAP], [test x"$with_nfsv4_idmap" = xyes])
  777   ])
  778 
  779 AC_DEFUN([WITH_NFS_LIB_PATH],
  780   [ AC_ARG_WITH([nfs-lib-path],
  781                 [AC_HELP_STRING([--with-nfs-lib-path=<path>],
  782                                 [Path to the NFS library [${libdir}]]
  783                                )
  784                 ]
  785                )
  786     nfslibpath="${libdir}"
  787     if test x"$with_nfs_lib_path" != x; then
  788         nfslibpath=$with_nfs_lib_path
  789     fi
  790     AC_SUBST(nfslibpath)
  791   ])
  792 
  793 AC_DEFUN([WITH_SSSD_USER],
  794   [ AC_ARG_WITH([sssd-user],
  795                 [AS_HELP_STRING([--with-sssd-user=<user>],
  796                                 [User for running SSSD (root)]
  797                                )
  798                 ]
  799                )
  800 
  801     SSSD_USER=root
  802 
  803     if test x"$with_sssd_user" != x; then
  804         SSSD_USER=$with_sssd_user
  805     fi
  806 
  807     AC_SUBST(SSSD_USER)
  808     AC_DEFINE_UNQUOTED(SSSD_USER, "$SSSD_USER", ["The default user to run SSSD as"])
  809     AM_CONDITIONAL([SSSD_USER], [test x"$with_sssd_user" != x])
  810     AM_CONDITIONAL([SSSD_NON_ROOT_USER], [test x"$SSSD_USER" != xroot])
  811   ])
  812 
  813   AC_DEFUN([WITH_AD_GPO_DEFAULT],
  814     [ AC_ARG_WITH([ad-gpo-default],
  815                   [AS_HELP_STRING([--with-ad-gpo-default=[enforcing|permissive]],
  816                                   [Default enforcing level for AD GPO access-control (enforcing)]
  817                                  )
  818                   ]
  819                  )
  820       GPO_DEFAULT=enforcing
  821 
  822       if test x"$with_ad_gpo_default" != x; then
  823           if test ! "$with_ad_gpo_default" = "enforcing" -a ! "$with_ad_gpo_default" = "permissive"; then
  824               AC_MSG_ERROR("GPO Default must be either "enforcing" or "permissive")
  825           else
  826               GPO_DEFAULT=$with_ad_gpo_default
  827           fi
  828       fi
  829 
  830       AC_SUBST(GPO_DEFAULT)
  831       AC_DEFINE_UNQUOTED(AD_GPO_ACCESS_MODE_DEFAULT, "$GPO_DEFAULT", ["The default enforcing level for AD GPO access-control"])
  832       AM_CONDITIONAL([GPO_DEFAULT_ENFORCING], [test x"$GPO_DEFAULT" = xenforcing])
  833   ])
  834 
  835 AC_DEFUN([ENABLE_POLKIT_RULES_PATH],
  836   [
  837     polkitdir="/usr/share/polkit-1/rules.d"
  838     AC_ARG_ENABLE([polkit-rules-path],
  839                   [AC_HELP_STRING([--enable-polkit-rules-path=PATH],
  840                                   [Path to store polkit rules at. Use --disable to not install the rules at all. [/usr/share/polkit-1/rules.d]]
  841                                  )
  842                   ],
  843                   [ polkitdir=$enableval ],
  844                  )
  845 
  846     if test x"$polkitdir" != xno; then
  847         HAVE_POLKIT_RULES_D=1
  848         AC_SUBST(polkitdir)
  849     fi
  850 
  851     AM_CONDITIONAL([HAVE_POLKIT_RULES_D], [test x$HAVE_POLKIT_RULES_D != x])
  852   ])
  853 
  854 dnl Backwards compat for older autoconf
  855 AC_DEFUN([SSSD_RUNSTATEDIR],
  856   [
  857     if test x"$runstatedir" = x; then
  858         AC_SUBST([runstatedir],
  859                  ["${localstatedir}/run"])
  860     fi
  861   ])
  862 
  863 AC_DEFUN([WITH_SECRETS],
  864   [ AC_ARG_WITH([secrets],
  865                 [AC_HELP_STRING([--with-secrets],
  866                                 [Whether to build with secrets support [no]]
  867                                )
  868                 ],
  869                 [with_secrets=$withval],
  870                 with_secrets=no
  871                )
  872 
  873     if test x"$with_secrets" = xyes; then
  874         AC_DEFINE(BUILD_SECRETS, 1, [whether to build with SECRETS support])
  875     fi
  876     AM_CONDITIONAL([BUILD_SECRETS], [test x"$with_secrets" = xyes])
  877   ])
  878 
  879 AC_DEFUN([WITH_KCM],
  880   [ AC_ARG_WITH([kcm],
  881                 [AC_HELP_STRING([--with-kcm],
  882                                 [Whether to build with KCM server support [yes]]
  883                                )
  884                 ],
  885                 [with_kcm=$withval],
  886                 with_kcm=yes
  887                )
  888 
  889     if test x"$with_kcm" = xyes; then
  890         AC_DEFINE(BUILD_KCM, 1, [whether to build with KCM server support])
  891     fi
  892     AM_CONDITIONAL([BUILD_KCM], [test x"$with_kcm" = xyes])
  893   ])
  894 
  895 AC_DEFUN([WITH_SECRETS_DB_PATH],
  896   [ AC_ARG_WITH([secrets-db-path],
  897                 [AC_HELP_STRING([--with-secrets-db-path=PATH],
  898                                 [Path to the SSSD databases [/var/lib/sss/secrets]]
  899                                )
  900                 ]
  901                )
  902     config_secdbpath="\"SSS_STATEDIR\"/secrets"
  903     secdbpath="${localstatedir}/lib/sss/secrets"
  904     if test x"$with_secrets_db_path" != x; then
  905         config_secdbpath=$with_secrets_db_path
  906         secdbpath=$with_secrets_db_path
  907     fi
  908     AC_SUBST(secdbpath)
  909     AC_DEFINE_UNQUOTED(SECRETS_DB_PATH, "$config_secdbpath", [Path to the SSSD Secrets databases])
  910   ])
  911 
  912 AC_ARG_ENABLE([files-domain],
  913               [AS_HELP_STRING([--enable-files-domain],
  914                               [If this feature is enabled, then SSSD always enables
  915                                a domain with id_provider=files even if the domain
  916                                is not specified in the config file
  917                               [default=no]])],
  918               [enable_files_domain=$enableval],
  919               [enable_files_domain=no])
  920 AS_IF([test x$enable_files_domain = xyes],
  921       AC_DEFINE_UNQUOTED([ADD_FILES_DOMAIN], [1],
  922           [whether to build unconditionally enable files domain]))
  923 AM_CONDITIONAL([ADD_FILES_DOMAIN], [test x$enable_files_domain = xyes])
  924 
  925 AC_ARG_ENABLE([local-provider],
  926               [AS_HELP_STRING([--enable-local-provider],
  927                               [If this feature is enabled, then local-provider
  928                                will be built by default.
  929                               [default=no]])],
  930               [enable_local_provider=$enableval],
  931               [enable_local_provider=no])
  932 AS_IF([test x$enable_local_provider = xyes],
  933       AC_DEFINE_UNQUOTED([BUILD_LOCAL_PROVIDER], [1],
  934           [whether to build unconditionally enable local provider]))
  935 AM_CONDITIONAL([BUILD_LOCAL_PROVIDER], [test x$enable_local_provider = xyes])
  936 
  937 AC_ARG_ENABLE([gss-spnego-for-zero-maxssf],
  938               [AS_HELP_STRING([--enable-gss-spnego-for-zero-maxssf],
  939                               [If this feature is enabled, GSS-SPNEGO will be
  940                                used even if maxssf is set to 0. Only recent
  941                                version of cyrus-sasl handle this correctly.
  942                                Please only enable this if the installed
  943                                cyrus-sasl can handle it.  [default=no]])],
  944               [enable_gss_spnego_for_zero_maxssf=$enableval],
  945               [enable_gss_spnego_for_zero_maxssf=no])
  946 AS_IF([test x$enable_gss_spnego_for_zero_maxssf = xyes],
  947       AC_DEFINE_UNQUOTED([ALLOW_GSS_SPNEGO_FOR_ZERO_MAXSSF], [1],
  948                          [whether to use GSS-SPNEGO if maxssf is 0 (zero)]))