diff options
author | Po Lu <luangruo@yahoo.com> | 2023-08-13 12:44:25 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-08-13 12:44:25 +0800 |
commit | 0e44ab5f061c81874dd8298a0f3318f14ef95a24 (patch) | |
tree | 4246a5cf8f2cf6823b528939ab43c2d0ed9920e6 /configure.ac | |
parent | 748521ba34965fbb5fa8d75eeb9822f4b8711379 (diff) | |
download | emacs-0e44ab5f061c81874dd8298a0f3318f14ef95a24.tar.gz |
Temporary fixes for the Android build
* configure.ac:
* src/conf_post.h [__ANDROID__]: Define substitutes for functions
used by Gnulib that are occasionally absent.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0234a82b92f..46836073aa0 100644 --- a/configure.ac +++ b/configure.ac @@ -2710,6 +2710,25 @@ for Android, but all API calls need to be stubbed out]) # Check for some functions not always present in the NDK. AC_CHECK_DECLS([android_get_device_api_level]) + AC_CHECK_DECLS([endutent, sysinfo], [], [], + [[ +#include <sys/sysinfo.h> +#include <utmp.h> +]]) + + # Establish if BOOT_TIME is defined in utmp.h. + AC_CACHE_CHECK([if utmp.h defines BOOT_TIME], + [emacs_cv_utmp_h_defines_boot_time], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <utmp.h> +#ifndef BOOT_TIME +BOOT_TIME not defined +#endif /* BOOT_TIME */ +]], [[]])], [emacs_cv_utmp_h_defines_boot_time=yes], + [emacs_cv_utmp_h_defines_boot_time=no])]) + AS_IF([test x"$emacs_cv_utmp_h_defines_boot_time" = xyes], + [AC_DEFINE([UTMP_H_DEFINES_BOOT_TIME], [1], + [Define to 1 if building for Android and utmp.h declares BOOT_TIME])]) # Say this build is really for Android. REALLY_ANDROID=yes])]) |