Commit eee2dde2 eee2dde23b558aecd59b690ff9007341869577cb by Sergey Poznyakoff

Fixes in configure.ac

* am/enable.m4 (MU_ENABLE_SUPPORT): Change semantics of the
last argument.
(MU_ENABLE_BUILD): 4th argument gives additional conditions for
AM_CONDITIONAL.
* configure.ac: Enable building c++ interface when possible.
Fix checks for guimb and mh utilities.
* libmu_cpp/Makefile.am: Remove unnecessary substitution
variables.
1 parent 2d3f4779
dnl This file is part of GNU mailutils.
dnl Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
dnl Copyright (C) 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
......@@ -17,7 +17,7 @@ dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl
dnl MU_ENABLE_SUPPORT(feature, [action-if-true], [action-if-false],
dnl [action-default])
dnl [default-value])
AC_DEFUN([MU_ENABLE_SUPPORT], [
pushdef([mu_upcase],translit($1,[a-z+-],[A-ZX_]))
......@@ -32,7 +32,7 @@ AC_DEFUN([MU_ENABLE_SUPPORT], [
no) mu_cache_var=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
esac],
[ifelse([$4],,mu_cache_var=yes,[$4])])
[mu_cache_var=ifelse([$4],,yes,[$4])])
if test x"[$]mu_cache_var" = x"yes"; then
ifelse([$2],,:,[$2])
......@@ -46,6 +46,8 @@ AC_DEFUN([MU_ENABLE_SUPPORT], [
popdef([mu_cache_var])
])
dnl MU_ENABLE_BUILD(feature, [action-if-true], [action-if-false],
dnl [additional-cond], [default-value])
AC_DEFUN([MU_ENABLE_BUILD], [
pushdef([mu_upcase],translit($1,[a-z+-],[A-ZX_]))
pushdef([mu_cache_var],[mu_cv_enable_build_]translit($1,[+-],[x_]))
......@@ -60,18 +62,18 @@ AC_DEFUN([MU_ENABLE_BUILD], [
no) mu_cache_var=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
esac],
[ifelse([$4],,mu_cache_var=yes,[$4])])
[mu_cache_var=ifelse([$5],,yes,[$5])])
if test x"[$]mu_cache_var" = x"yes"; then
ifelse([$2],,:,[$2])
ifelse([$3],,,else
[$3])
fi
if test x"[$]mu_cache_var" = x"yes"; then
if test x"[$]mu_cache_var" = x"yes" ifelse($4,,,[&& $4]); then
AC_DEFINE([MU_BUILD_]mu_upcase,1,[Define this if you build $1])
fi
AM_CONDITIONAL(mu_cond,
[test x"[$]mu_cache_var" = x"yes"])
[test x"[$]mu_cache_var" = x"yes" ifelse($4,,,[&& $4])])
popdef([mu_upcase])
popdef([mu_cache_var])
......
......@@ -1142,10 +1142,7 @@ AM_CONDITIONAL([MU_COND_PYTHON], [test "$status_python" = yes])
AC_SUBST(MU_CXX_LTLIBRARIES_BUILD)
AC_SUBST(MU_CXX_EXAMPLES_BUILD)
MU_ENABLE_SUPPORT(c++,
[MU_CXX_LTLIBRARIES_BUILD='$(MU_CXX_LTLIBRARIES_LIST)'
MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'],
:,
[mu_cv_enable_cxx=$mu_build_experimental])
[MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'])
# Default mailbox record
# Note: 1. Support for mbox type is always enabled.
......@@ -1189,18 +1186,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)
fi
MU_ENABLE_BUILD(guimb,,,[test "$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,,,[test "$mu_cv_enable_mh" = yes])
AC_SUBST(MH_BIN_DIR)
......
......@@ -19,9 +19,7 @@
INCLUDES = @MU_LIB_COMMON_INCLUDES@
MU_CXX_LTLIBRARIES_LIST = libmu_cpp.la
lib_LTLIBRARIES = @MU_CXX_LTLIBRARIES_BUILD@
EXTRA_LTLIBRARIES = $(MU_CXX_LTLIBRARIES_LIST)
lib_LTLIBRARIES = libmu_cpp.la
libmu_cpp_la_SOURCES = \
address.cc\
......