aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-03-17 19:26:16 +0800
committerPo Lu2023-03-17 19:26:16 +0800
commite7025ed689dcc1640328f7a0e2039c3c4e2d45ee (patch)
tree7960703f174fd47fa9c1092013adf5c5fedaf2b5
parent2d666daaa3babeda669c39a8cfe36c4d30222512 (diff)
downloademacs-e7025ed689dcc1640328f7a0e2039c3c4e2d45ee.tar.gz
emacs-e7025ed689dcc1640328f7a0e2039c3c4e2d45ee.zip
Update Android port
* configure.ac: * m4/ndk-build.m4 (ndk_INIT): (ndk_LATE): Avoid AC_REQUIRE magic.
-rw-r--r--configure.ac5
-rw-r--r--m4/ndk-build.m49
2 files changed, 9 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 1dfd880eaa9..44dbf60f938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,7 +165,7 @@ fi
165AC_CANONICAL_HOST 165AC_CANONICAL_HOST
166AC_CANONICAL_BUILD 166AC_CANONICAL_BUILD
167 167
168if test "$XCONFIGURE" = "android"; then 168AS_IF([test "$XCONFIGURE" = "android"],[
169 # Initialize the Android NDK build system. Make sure to use the 169 # Initialize the Android NDK build system. Make sure to use the
170 # passed through NDK path. 170 # passed through NDK path.
171 # Make sure to pass through the CFLAGS, as older versions of the 171 # Make sure to pass through the CFLAGS, as older versions of the
@@ -174,8 +174,7 @@ if test "$XCONFIGURE" = "android"; then
174 with_ndk_cxx_shared="$android_ndk_cxx_shared" 174 with_ndk_cxx_shared="$android_ndk_cxx_shared"
175 with_ndk_cxx="$android_ndk_cxx" 175 with_ndk_cxx="$android_ndk_cxx"
176 ndk_INIT([$android_abi], [$ANDROID_SDK], [cross/ndk-build], 176 ndk_INIT([$android_abi], [$ANDROID_SDK], [cross/ndk-build],
177 [$ANDROID_CFLAGS]) 177 [$ANDROID_CFLAGS])])
178fi
179 178
180case $host in 179case $host in
181 *-mingw*) 180 *-mingw*)
diff --git a/m4/ndk-build.m4 b/m4/ndk-build.m4
index 077781ec38c..9af681a08c8 100644
--- a/m4/ndk-build.m4
+++ b/m4/ndk-build.m4
@@ -38,7 +38,7 @@ AC_ARG_WITH([ndk_cxx],
38# DIR should be a directory containing the Makefile.in actually 38# DIR should be a directory containing the Makefile.in actually
39# implementing the Android NDK build system. 39# implementing the Android NDK build system.
40 40
41AC_DEFUN_ONCE([ndk_INIT], 41AC_DEFUN([ndk_INIT],
42[ 42[
43# Look for Android.mk files. 43# Look for Android.mk files.
44ndk_module_files= 44ndk_module_files=
@@ -347,13 +347,18 @@ AS_IF([test -n "$with_ndk_cxx"], [CXX=$with_ndk_cxx],
347# required C and C++ headers. 347# required C and C++ headers.
348 348
349AC_DEFUN([ndk_LATE], 349AC_DEFUN([ndk_LATE],
350[ 350[dnl
351dnl This calls AC_REQUIRE([AC_PROG_CXX]), leading to configure looking
352dnl for a C++ compiler. However, the language is not restored
353dnl afterwards if not `$ndk_INITIALIZED'.
351AS_IF([test "$ndk_INITIALIZED" = "yes"],[ 354AS_IF([test "$ndk_INITIALIZED" = "yes"],[
352 AS_IF([test -n "$CXX"], [AC_LANG_PUSH([C++]) 355 AS_IF([test -n "$CXX"], [AC_LANG_PUSH([C++])
353 AC_CHECK_HEADER([string], [ndk_working_cxx=yes], 356 AC_CHECK_HEADER([string], [ndk_working_cxx=yes],
354 [AC_MSG_WARN([Your C++ compiler is not properly set up, and\ 357 [AC_MSG_WARN([Your C++ compiler is not properly set up, and\
355 the standard library headers could not be found.])]) 358 the standard library headers could not be found.])])
356 AC_LANG_POP([C++])])]) 359 AC_LANG_POP([C++])])])
360dnl Thus, manually switch back to C here.
361AC_LANG([C])
357]) 362])
358 363
359# ndk_SEARCH_MODULE(MODULE, NAME, ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]) 364# ndk_SEARCH_MODULE(MODULE, NAME, ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])