SDK. They must correspond to Android version 13 (API level 33) or
later.
- - the path to the C compiler in the Android NDK, for the machine you
- are building Emacs to run on.
+ - the path to the C compiler in the Android NDK, for the kind of CPU
+ you are building Emacs to run on.
- the path to the directory in the Android SDK containing binaries
such as `aapt', `apksigner', and `d8'. These are used to build
the application package.
+Where the type of CPU can either be `armeabi', `armv7*', `i686',
+`x86_64', `mips', or `mips64'.
+
After the configuration process completes, you may run:
make all
OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
-OPTION_DEFAULT_ON([modules],[don't compile with dynamic modules support])
+OPTION_DEFAULT_IFAVAILABLE([modules],[don't compile with dynamic modules support])
OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support])
OPTION_DEFAULT_OFF([cygwin32-native-compilation],[use native compilation on 32-bit Cygwin])
OPTION_DEFAULT_ON([xinput2],[don't use version 2 of the X Input Extension for input])
;;
*arm*v7a*) android_abi=armeabi-v7a
;;
+ *mips64*) android_abi=mips64
+ ;;
*mips*) android_abi=mips
;;
*arm*) android_abi=armeabi
fi
if test "${with_modules}" != "no"; then
- case $opsys in
- gnu|gnu-linux)
- LIBMODULES="-ldl"
- HAVE_MODULES=yes
- ;;
- cygwin|mingw32|darwin)
- HAVE_MODULES=yes
- ;;
- *)
- # BSD systems have dlopen in libc.
- AC_CHECK_FUNC([dlopen], [HAVE_MODULES=yes])
- ;;
- esac
-
- if test "${HAVE_MODULES}" = no; then
- AC_MSG_ERROR([Dynamic modules are not supported on your system])
+ # __attribute__ ((cleanup)) is required for dynamic modules to
+ # work.
+ AC_CACHE_CHECK([for working __attribute__((cleanup))],
+ [emacs_cv_attribute_cleanup],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+
+ extern int exit ();
+
+ cleanup_func_1 (k)
+ int *k;
+ {
+ exit (*k - 100);
+ }
+
+ cleanup_func ()
+ {
+ int k __attribute__((cleanup (cleanup_func_1))) = 100;
+ }
+
+ ]], [[cleanup_func (); return 1;]])],
+ [emacs_cv_attribute_cleanup=yes],
+ [emacs_cv_attribute_cleanup=no],
+ [emacs_cv_attribute_cleanup="guessing yes"])])
+
+ if test "$emacs_cv_attribute_cleanup" = "no"; then
+ if test "${with_modules}" = "ifavailable"; then
+ AC_MSG_WARN([your compiler does not support cleanup attributes,
+and as a result dynamic modules have been disabled])
+ else
+ AC_MSG_ERROR([your compiler is missing the cleanup attribute
+required for dynamic modules to work])
+ fi
else
- SAVE_LIBS=$LIBS
- LIBS="$LIBS $LIBMODULES"
- AC_CHECK_FUNCS([dladdr dlfunc])
- LIBS=$SAVE_LIBS
+ case $opsys in
+ gnu|gnu-linux)
+ LIBMODULES="-ldl"
+ HAVE_MODULES=yes
+ ;;
+ cygwin|mingw32|darwin)
+ HAVE_MODULES=yes
+ ;;
+ *)
+ # BSD systems have dlopen in libc.
+ AC_CHECK_FUNC([dlopen], [HAVE_MODULES=yes])
+ ;;
+ esac
+
+ if test "${HAVE_MODULES}" = no; then
+ AC_MSG_ERROR([Dynamic modules are not supported on your system])
+ else
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $LIBMODULES"
+ AC_CHECK_FUNCS([dladdr dlfunc])
+ LIBS=$SAVE_LIBS
+ fi
fi
fi
of `internal_condition_case' etc., and to avoid worrying about
passing information to the handler functions. */
-#if !HAS_ATTRIBUTE (cleanup)
- #error "__attribute__ ((cleanup)) not supported by this compiler; try GCC"
-#endif
-
/* Place this macro at the beginning of a function returning a number
or a pointer to handle non-local exits. The function must have an
ENV parameter. The function will return the specified value if a
/* It is very important that pushing the handler doesn't itself raise
a signal. Install the cleanup only after the handler has been
pushed. Use __attribute__ ((cleanup)) to avoid
- non-local-exit-prone manual cleanup.
+ non-local-exit-prone manual cleanup. This is an extension provided
+ by GCC and similar compilers; configure prevents module.c from
+ being compiled when it is not present.
The do-while forces uses of the macro to be followed by a semicolon.
This macro cannot enclose its entire body inside a do-while, as the