installed])],
[],
[with_mailutils=$with_features
- if test "$with_mailutils" = yes; then
- (movemail --version) >/dev/null 2>&1 || with_mailutils=no
- fi])
-if test "$with_mailutils" = no; then
- with_mailutils=
-fi
+ AS_IF(["$with_mailutils" = yes],
+ [AS_IF([test "x$XCONFIGURE" != "xandroid"],
+ [(movemail --version) >/dev/null 2>&1 || with_mailutils=no],
+ [dnl don't check for movemail if cross-compiling.
+ with_mailutils=yes])])])
+AS_IF([test "$with_mailutils" = no],
+ [with_mailutils=])
+
+AS_IF([test x"$with_mailutils" = xyes],
+ [AC_DEFINE([HAVE_MAILUTILS], [1],
+ [Define to 1 if Emacs was configured with mailutils])])
+
AC_SUBST([with_mailutils])
AC_ARG_WITH([pop],
[AS_HELP_STRING([--with-pop],
[Support POP mail retrieval if Emacs movemail is used (not recommended,
as Emacs movemail POP is insecure). This is the default only on
- native MS-Windows.])],
+ native MS-Windows and Android.])],
[],
- [case $host in
- *-mingw*) with_pop=yes;;
- *) with_pop=no-by-default;;
- esac])
+ dnl Enable movemail POP support on Android as GNU Mailutils is
+ dnl normally unavailable on that platform.
+ [AS_CASE([$host],
+ [*-mingw*|*android*], [with_pop=yes],
+ [with_pop=no-by-default])])
if test "$with_pop" = yes; then
AC_DEFINE([MAIL_USE_POP])
fi
# Android.
android_makefiles="lib/Makefile lib/gnulib.mk lib-src/Makefile src/Makefile"
+# This is whether or not to package mailutils into the executable.
+emacs_use_mailutils=
+
AC_ARG_VAR([JAVAC], [Java compiler path. Used for Android.])
AC_ARG_VAR([JARSIGNER], [Java package signer path. Used for Android.])
AC_ARG_VAR([APKSIGNER], [Android package signer path. Used for Android.])
passthrough="$passthrough --with-tree-sitter=$with_tree_sitter"
passthrough="$passthrough --with-imagemagick=$with_imagemagick"
passthrough="$passthrough --with-lcms2=$with_lcms2"
+ passthrough="$passthrough --with-mailutils=$with_mailutils"
+ passthrough="$passthrough --with-pop=$with_pop"
+
+ AS_IF([test "x$with_mailutils" = "xyes"], [emacs_use_mailutils=yes])
+ AC_SUBST([emacs_use_mailutils])
AS_IF([XCONFIGURE=android ANDROID_CC="$ANDROID_CC" \
ANDROID_SDK="$android_sdk" android_abi=$android_abi \
with_tree_sitter=no
with_imagemagick=no
with_lcms2=no
+ with_mailutils=no
+ with_pop=no
fi
with_rsvg=no
builddir = @builddir@
version = @version@
+# Don't install movemail if mailutils are to be used.
+emacs_use_mailutils = @emacs_use_mailutils@
+
# This is the host lib-src and lib, not the cross compiler's lib-src.
libsrc = ../lib-src
EXEEXT = @EXEEXT@
all: $(APK_NAME)
# Binaries to cross-compile.
-CROSS_SRC_BINS = $(top_builddir)/cross/src/android-emacs
-CROSS_LIBSRC_BINS = $(top_builddir)/cross/lib-src/ctags \
- $(top_builddir)/cross/lib-src/hexl \
- $(top_builddir)/cross/lib-src/movemail \
- $(top_builddir)/cross/lib-src/ebrowse \
- $(top_builddir)/cross/lib-src/emacsclient \
- $(top_builddir)/cross/lib-src/etags
+CROSS_SRC_BINS := $(top_builddir)/cross/src/android-emacs
+CROSS_LIBSRC_BINS := $(top_builddir)/cross/lib-src/ctags \
+ $(top_builddir)/cross/lib-src/hexl \
+ $(top_builddir)/cross/lib-src/ebrowse \
+ $(top_builddir)/cross/lib-src/emacsclient \
+ $(top_builddir)/cross/lib-src/etags
+CROSS_LIBSRC_BINS_MOVEMAIL := $(top_builddir)/cross/lib-src/movemail
CROSS_BINS = $(CROSS_SRC_BINS) $(CROSS_LIBSRC_BINS)
+ifneq ($(emacs_use_mailutils),yes)
+CROSS_LIBSRC_BINS := $(CROSS_LIBSRC_BINS) $(CROSS_LIBSRC_BINS_MOVEMAIL)
+endif
+
# Libraries to cross-compile.
CROSS_LIBS = $(top_builddir)/cross/src/libemacs.so
Use this instead of calling `movemail' directly, as `movemail'
may have been renamed to comply with executable naming restrictions on
the system. */);
-#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
+ /* Don't change the name of `movemail' if Emacs is being built to
+ use movemail from another source. */
+#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY \
+ || defined HAVE_MAILUTILS
Vmovemail_program_name = build_pure_c_string ("movemail");
#else
Vmovemail_program_name = build_pure_c_string ("libmovemail.so");