Commit 68566697 6856669720c066769f82b90fee521fd05794dec0 by Sergey Poznyakoff

Bugfixes

* libmu_auth/ldap.c: Fix compilation without ldap
* mh/mh_getopt.c: Fix version output to match what MH-E expects
1 parent d153077c
......@@ -920,10 +920,11 @@ mu_auth_ldap_user_by_uid (struct mu_auth_data **return_data,
#else
# define mu_ldap_module_init NULL
# define module_init NULL
# define mu_ldap_authenticate mu_auth_nosupport
# define mu_auth_ldap_user_by_name mu_auth_nosupport
# define mu_auth_ldap_user_by_uid mu_auth_nosupport
# define mu_ldap_param NULL
#endif
......
......@@ -141,6 +141,29 @@ static struct mu_option folder_option[] = {
MU_OPTION_END
};
void
mh_version_hook (struct mu_parseopt *po, mu_stream_t stream)
{
#ifdef GIT_DESCRIBE
mu_stream_printf (stream, "%s (%s %s) [%s]\n",
mu_program_name, PACKAGE_NAME, PACKAGE_VERSION,
GIT_DESCRIBE);
#else
mu_stream_printf (stream, "%s (%s %s)\n", mu_program_name,
PACKAGE_NAME, PACKAGE_VERSION);
#endif
/* TRANSLATORS: Translate "(C)" to the copyright symbol
(C-in-a-circle), if this symbol is available in the user's
locale. Otherwise, do not translate "(C)"; leave it as-is. */
mu_stream_printf (stream, mu_version_copyright, _("(C)"));
mu_stream_printf (stream, _("\
\n\
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n\
\n\
"));
}
static void
fn_version (struct mu_parseopt *po, struct mu_option *opt, char const *unused)
{
......@@ -213,7 +236,7 @@ mh_getopt (int *pargc, char ***pargv, struct mu_option *options,
//po.po_extra_info = gnu_general_help_url;
//flags |= MU_PARSEOPT_EXTRA_INFO;
po.po_version_hook = mu_version_hook;
po.po_version_hook = mh_version_hook;
flags |= MU_PARSEOPT_VERSION_HOOK;
mu_set_program_name (argv[0]);
......