[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android e7025ed689d: Update Android port
From: |
Po Lu |
Subject: |
feature/android e7025ed689d: Update Android port |
Date: |
Fri, 17 Mar 2023 07:27:04 -0400 (EDT) |
branch: feature/android
commit e7025ed689dcc1640328f7a0e2039c3c4e2d45ee
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Update Android port
* configure.ac:
* m4/ndk-build.m4 (ndk_INIT):
(ndk_LATE): Avoid AC_REQUIRE magic.
---
configure.ac | 5 ++---
m4/ndk-build.m4 | 9 +++++++--
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
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
-if test "$XCONFIGURE" = "android"; then
+AS_IF([test "$XCONFIGURE" = "android"],[
# Initialize the Android NDK build system. Make sure to use the
# passed through NDK path.
# Make sure to pass through the CFLAGS, as older versions of the
@@ -174,8 +174,7 @@ if test "$XCONFIGURE" = "android"; then
with_ndk_cxx_shared="$android_ndk_cxx_shared"
with_ndk_cxx="$android_ndk_cxx"
ndk_INIT([$android_abi], [$ANDROID_SDK], [cross/ndk-build],
- [$ANDROID_CFLAGS])
-fi
+ [$ANDROID_CFLAGS])])
case $host in
*-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],
# DIR should be a directory containing the Makefile.in actually
# implementing the Android NDK build system.
-AC_DEFUN_ONCE([ndk_INIT],
+AC_DEFUN([ndk_INIT],
[
# Look for Android.mk files.
ndk_module_files=
@@ -347,13 +347,18 @@ AS_IF([test -n "$with_ndk_cxx"], [CXX=$with_ndk_cxx],
# required C and C++ headers.
AC_DEFUN([ndk_LATE],
-[
+[dnl
+dnl This calls AC_REQUIRE([AC_PROG_CXX]), leading to configure looking
+dnl for a C++ compiler. However, the language is not restored
+dnl afterwards if not `$ndk_INITIALIZED'.
AS_IF([test "$ndk_INITIALIZED" = "yes"],[
AS_IF([test -n "$CXX"], [AC_LANG_PUSH([C++])
AC_CHECK_HEADER([string], [ndk_working_cxx=yes],
[AC_MSG_WARN([Your C++ compiler is not properly set up, and\
the standard library headers could not be found.])])
AC_LANG_POP([C++])])])
+dnl Thus, manually switch back to C here.
+AC_LANG([C])
])
# ndk_SEARCH_MODULE(MODULE, NAME, ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/android e7025ed689d: Update Android port,
Po Lu <=