emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android af7f0b6f9b3 2/2: Update Android port


From: Po Lu
Subject: feature/android af7f0b6f9b3 2/2: Update Android port
Date: Wed, 15 Mar 2023 04:17:50 -0400 (EDT)

branch: feature/android
commit af7f0b6f9b3bab0d672953dfe9df9dc667287434
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Update Android port
    
    * cross/Makefile.in (lib/gnulib.mk): Edit out
    build-aux stuff.
    * m4/ndk-build.m4: Also look for cross ranlib.
---
 cross/Makefile.in |  7 +++++++
 m4/ndk-build.m4   | 14 +++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/cross/Makefile.in b/cross/Makefile.in
index bceb761d769..5976272b253 100644
--- a/cross/Makefile.in
+++ b/cross/Makefile.in
@@ -96,9 +96,16 @@ lib-src/config.h: $(top_builddir)/src/config.h.android
        $(AM_V_GEN) cp -f -p $(top_builddir)/src/config.h.android       \
          lib-src/config.h
 
+# Figure out where build-aux is.
+# Then, replace the build-aux directory with its actual location,
+# in case MKDIR_P points there.
+
+relative_buildaux_dir := $(subst /,\/,$(top_srcdir)/build-aux)
+
 lib/gnulib.mk: $(top_builddir)/lib/gnulib.mk.android
        $(AM_V_GEN) \
          sed -e 's/^srcdir =.*$$/srcdir = $(subst /,\/,$(LIB_SRCDIR))/g' \
+             -e 's/$(relative_buildaux_dir)/$(subst 
/,\/,../$(top_builddir))\/build-aux/g' \
            < $(top_builddir)/lib/gnulib.mk.android > $@
 
 lib/Makefile: $(top_builddir)/lib/Makefile.android
diff --git a/m4/ndk-build.m4 b/m4/ndk-build.m4
index d5f16248dcd..077781ec38c 100644
--- a/m4/ndk-build.m4
+++ b/m4/ndk-build.m4
@@ -228,10 +228,12 @@ ndk_subst_cc_onto_cxx () {
   done
 }
 
-# Look for a suitable ar in the same directory as the C compiler.
+# Look for a suitable ar and ranlib in the same directory as the C
+# compiler.
 ndk_cc_firstword=`AS_ECHO(["$CC"]) | cut -d' ' -f1`
 ndk_where_cc=`which $ndk_cc_firstword`
 ndk_ar_search_path=$PATH
+ndk_ranlib_search_path=$RANLIB
 
 # First, try to find $host_alias-ar in PATH.
 AC_PATH_PROGS([AR], [$host_alias-ar], [], [$ndk_ar_search_path])
@@ -242,6 +244,16 @@ AS_IF([test -z "$AR"],[
   ndk_ar_search_path="`AS_DIRNAME([$ndk_where_cc])`:$ndk_ar_search_path"
   AC_PATH_PROGS([AR], [$host_alias-ar llvm-ar], [], [$ndk_ar_search_path])])
 
+# First, try to find $host_alias-ranlib in PATH.
+AC_PATH_PROGS([RANLIB], [$host_alias-ranlib], [], [$ndk_ranlib_search_path])
+
+AS_IF([test -z "$RANLIB"],[
+  # Next, try finding either that or llvm-ranlib in the directory
+  # holding CC.
+  
ndk_ranlib_search_path="`AS_DIRNAME([$ndk_where_cc])`:$ndk_ranlib_search_path"
+  AC_PATH_PROGS([RANLIB], [$host_alias-ranlib llvm-ranlib], [],
+    [$ndk_ranlib_search_path])])
+
 NDK_BUILD_NASM=
 
 # Next, try to find nasm on x86.  This doesn't ship with the NDK.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]