summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--am/enable.m461
-rw-r--r--configure.ac12
-rw-r--r--libmailutils/stream/mapfile_stream.c1
3 files changed, 40 insertions, 34 deletions
diff --git a/am/enable.m4 b/am/enable.m4
index 80ea96e21..4e9a5abda 100644
--- a/am/enable.m4
+++ b/am/enable.m4
@@ -16,29 +16,33 @@ dnl You should have received a copy of the GNU General Public License
dnl along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
dnl MU_ENABLE_SUPPORT(feature, [action-if-true], [action-if-false],
-dnl [default-value])
+dnl [additional-cond], [default-value])
AC_DEFUN([MU_ENABLE_SUPPORT], [
pushdef([mu_upcase],translit($1,[a-z+-],[A-ZX_]))
pushdef([mu_cache_var],[mu_cv_enable_]translit($1,[+-],[x_]))
pushdef([mu_cond],[MU_COND_SUPPORT_]mu_upcase)
- AC_ARG_ENABLE($1,
- AC_HELP_STRING([--disable-]$1,
- [disable ]$1[ support]),
- [
- case "${enableval}" in
+ ifelse([$4],,,[if test $4; then])
+ AC_ARG_ENABLE($1,
+ AC_HELP_STRING([--disable-]$1,
+ [disable ]$1[ support]),
+ [
+ case "${enableval}" in
yes) mu_cache_var=yes;;
no) mu_cache_var=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
- esac],
- [mu_cache_var=ifelse([$4],,yes,[$4])])
+ esac],
+ [mu_cache_var=ifelse([$5],,yes,[$5])])
- if test "[$]mu_cache_var" = "yes"; then
- ifelse([$2],,:,[$2])
- ifelse([$3],,,else
- [$3])
- fi
+ if test "[$]mu_cache_var" = "yes"; then
+ ifelse([$2],,:,[$2])
+ ifelse([$3],,,else
+ [$3])
+ fi
+ ifelse([$4],,,[else
+ mu_cache_var=no
+ fi])
if test "[$]mu_cache_var" = "yes"; then
AC_DEFINE([ENABLE_]mu_upcase,1,[Define this if you enable $1 support])
fi
@@ -55,25 +59,30 @@ AC_DEFUN([MU_ENABLE_BUILD], [
pushdef([mu_cache_var],[mu_cv_enable_build_]translit($1,[+-],[x_]))
pushdef([mu_cond],[MU_COND_]mu_upcase)
- AC_ARG_ENABLE(build-$1,
- AC_HELP_STRING([--disable-build-]$1,
- [do not build ]$1),
- [
- case "${enableval}" in
+ ifelse([$4],,,[if test $4; then])
+ AC_ARG_ENABLE(build-$1,
+ AC_HELP_STRING([--disable-build-]$1,
+ [do not build ]$1),
+ [
+ case "${enableval}" in
yes) mu_cache_var=yes;;
no) mu_cache_var=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
- esac],
+ esac],
[mu_cache_var=ifelse([$5],,yes,[$5])])
- if test "[$]mu_cache_var" = "yes"; then
- ifelse([$2],,:,[$2])
- ifelse([$3],,,else
- [$3])
- fi
- if test "[$]mu_cache_var" = "yes"; then
+ if test "[$]mu_cache_var" = "yes"; then
+ ifelse([$2],,:,[$2])
+ ifelse([$3],,,else
+ [$3])
+ fi
+ if test "[$]mu_cache_var" = "yes"; then
AC_DEFINE([MU_BUILD_]mu_upcase,1,[Define this if you build $1])
- fi
+ fi
+ ifelse([$4],,,[else
+ mu_cache_var=no
+ fi])
+
AM_CONDITIONAL(mu_cond,
[test "[$]mu_cache_var" = "yes"])
diff --git a/configure.ac b/configure.ac
index 7924fc4d7..d9b1cf2df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -810,7 +810,7 @@ MU_ENABLE_SUPPORT([pop],
[MU_LIB_POP='${top_builddir}/libproto/pop/libmu_pop.la'])
MU_ENABLE_SUPPORT([nntp],
[MU_LIB_NNTP='${top_builddir}/libproto/nntp/libmu_nntp.la'],[],
- [$mu_build_experimental])
+ ["$mu_build_experimental" = "yes"])
MU_ENABLE_SUPPORT([mh],
[MU_LIB_MH='${top_builddir}/libproto/mh/libmu_mh.la'])
MU_ENABLE_SUPPORT([maildir],
@@ -1141,7 +1141,7 @@ MU_ENABLE_SUPPORT(cxx,
[MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'
MU_LIB_CPP='${top_builddir}/libmu_cpp/libmu_cpp.la'],
[],
- [$mu_build_experimental])
+ ["$mu_build_experimental" = "yes"])
# Default mailbox record
# Note: 1. Support for mbox type is always enabled.
@@ -1185,18 +1185,14 @@ MU_ENABLE_BUILD(comsat)
MU_ENABLE_BUILD(maidag)
MU_ENABLE_BUILD(mail)
MU_ENABLE_BUILD(sieve)
-if test "$useguile" = "yes"; then
- MU_ENABLE_BUILD(guimb,,,[$useguile])
-fi
+MU_ENABLE_BUILD(guimb,,,["$useguile" = "yes"])
MU_ENABLE_BUILD(messages)
MU_ENABLE_BUILD(readmsg)
MU_ENABLE_BUILD(dotlock)
MU_ENABLE_BUILD(movemail)
MU_ENABLE_BUILD(mimeview)
-if test "$mu_cv_enable_mh" = yes; then
- MU_ENABLE_BUILD(mh)
-fi
+MU_ENABLE_BUILD(mh,,,["$mu_cv_enable_mh" = yes])
AC_SUBST(MH_BIN_DIR)
diff --git a/libmailutils/stream/mapfile_stream.c b/libmailutils/stream/mapfile_stream.c
index 9803af663..d28064c44 100644
--- a/libmailutils/stream/mapfile_stream.c
+++ b/libmailutils/stream/mapfile_stream.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
+#include <sys/stat.h>
#include <mailutils/types.h>
#include <mailutils/alloc.h>

Return to:

Send suggestions and report system problems to the System administrator.