Commit 37d7cd77 37d7cd77d34cd4bf8d267b3010d923845fe74308 by Sergey Poznyakoff

mu: compile pop support conditionally.

* mu/Makefile.am [MU_COND_SUPPORT_POP]: Compile pop.c conditionally.
* mu/mu.c (mutool_nosys): New function.
(mutool_action_tab): Compile pop support conditionally.
1 parent e4648a8d
......@@ -16,6 +16,13 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
bin_PROGRAMS = mu
if MU_COND_SUPPORT_POP
POP_C=pop.c
endif
EXTRA_DIST=pop.c
mu_SOURCES = \
acl.c\
info.c\
......@@ -23,7 +30,7 @@ mu_SOURCES = \
mu.c\
filter.c\
flt2047.c\
pop.c\
$(POP_C)\
query.c\
shell.c
......
......@@ -87,9 +87,21 @@ struct mutool_action_tab
mutool_action_t action;
};
static int
mutool_nosys (int argc, char **argv)
{
mu_error (_("%s is not available because required code is not compiled"),
argv[0]);
return 1;
}
struct mutool_action_tab mutool_action_tab[] = {
{ "info", mutool_info },
#ifdef ENABLE_POP
{ "pop", mutool_pop },
#else
{ "pop", mutool_nosys },
#endif
{ "filter", mutool_filter },
{ "2047", mutool_flt2047 },
{ "query", mutool_query },
......