diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-10-08 16:23:55 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-10-08 16:23:55 +0300 |
commit | 37d7cd77d34cd4bf8d267b3010d923845fe74308 (patch) | |
tree | cb9b18f6bb5caccb7c967114abe9e45c233fb0d3 | |
parent | e4648a8d1dcdfc40547e160d77d753e46e1c57ca (diff) | |
download | mailutils-37d7cd77d34cd4bf8d267b3010d923845fe74308.tar.gz mailutils-37d7cd77d34cd4bf8d267b3010d923845fe74308.tar.bz2 |
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.
-rw-r--r-- | mu/Makefile.am | 9 | ||||
-rw-r--r-- | mu/mu.c | 12 |
2 files changed, 20 insertions, 1 deletions
diff --git a/mu/Makefile.am b/mu/Makefile.am index c9b5e3942..d2a2f3dd4 100644 --- a/mu/Makefile.am +++ b/mu/Makefile.am @@ -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 }, |