with_ndk_path="$android_ndk_path"
with_ndk_cxx_shared="$android_ndk_cxx_shared"
with_ndk_cxx="$android_ndk_cxx"
- ndk_INIT([$android_abi], [$ANDROID_SDK], [cross/ndk-build],\
+ ndk_INIT([$android_abi], [$ANDROID_SDK], [cross/ndk-build],
[$ANDROID_CFLAGS])
fi
# This is whether or not to package mailutils into the executable.
emacs_use_mailutils=
+AC_ARG_VAR([SDK_BUILD_TOOLS], [Name of directory holding Android SDK build-tools.])
+AC_ARG_VAR([ANDROID_CFLAGS], [Flags given to the Android C cross-compiler.])
AC_ARG_VAR([JAVAC], [Java compiler path. Used for Android.])
AC_ARG_VAR([JARSIGNER], [Java package signer path. Used for Android.])
AC_ARG_VAR([APKSIGNER], [Android package signer path. Used for Android.])
ANDROID_OBJ=
ANDROID_LIBS=
-ANDROID_CFLAGS=
+# ANDROID_CFLAGS is a precious variable used to pass information to
+# the cross-compiler.
+ANDROID_BUILD_CFLAGS=
REALLY_ANDROID=
CM_OBJ="cm.o"
# Emacs will be built as a shared library, and a wrapper around it
# will also be built for the benefit of applications. This
# requires Emacs be built as a position independent executable.
- ANDROID_CFLAGS="-fPIC -fvisibility=hidden"
+ ANDROID_BUILD_CFLAGS="-fPIC -fvisibility=hidden"
# Graphics code in sfntfont-android.c benefits heavily from
# vectorization.
- ANDROID_CFLAGS="$ANDROID_CFLAGS -ftree-vectorize"
+ ANDROID_BUILD_CFLAGS="$ANDROID_BUILD_CFLAGS -ftree-vectorize"
# Link with libraries required for Android support.
# API 9 and later require `-landroid' for the asset manager.
AC_SUBST([ANDROID_OBJ])
AC_SUBST([ANDROID_LIBS])
AC_SUBST([ANDROID_LDFLAGS])
-AC_SUBST([ANDROID_CFLAGS])
+AC_SUBST([ANDROID_BUILD_CFLAGS])
AC_SUBST([ANDROID_SHARED_USER_ID])
if test "${with_pgtk}" = "yes"; then
# This is required to make sure symbol visibility is correct and
# functions like readlinkat do not end up replacing their OS
# counterparts.
-ANDROID_CFLAGS = @ANDROID_CFLAGS@
+ANDROID_BUILD_CFLAGS = @ANDROID_BUILD_CFLAGS@
# Variables substituted by 'configure', and not autogenerated in gnulib.mk,
# or needed before gnulib.mk is included.
$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) $(DEPFLAGS) \
$(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
-I. -I../src -I$(srcdir) -I$(top_srcdir)/src \
- $(if $(patsubst e-%,,$(notdir $<)),,-Demacs) $(ANDROID_CFLAGS)
+ $(if $(patsubst e-%,,$(notdir $<)),,-Demacs) $(ANDROID_BUILD_CFLAGS)
ifeq ($(HAVE_NATIVE_COMP),yes)
ALL_CFLAGS += -DGL_COMPILE_CRYPTO_STREAM
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ANDROID = @ANDROID@
ANDROID_ABI = @ANDROID_ABI@
-ANDROID_CFLAGS = @ANDROID_CFLAGS@
+ANDROID_BUILD_CFLAGS = @ANDROID_BUILD_CFLAGS@
ANDROID_DEBUGGABLE = @ANDROID_DEBUGGABLE@
ANDROID_JAR = @ANDROID_JAR@
ANDROID_LDFLAGS = @ANDROID_LDFLAGS@
/^ANDROID_OBJ *=/s/@ANDROID_OBJ@//
/^ANDROID_LIBS *=/s/@ANDROID_LIBS@//
/^ANDROID_LDFLAGS *=/s/@ANDROID_LDFLAGS@//
-/^ANDROID_CFLAGS *=/s/@ANDROID_CFLAGS@//
+/^ANDROID_BUILD_CFLAGS *=/s/@ANDROID_CFLAGS@//
/^LIBGMP_CFLAGS *=/s/@LIBGMP_CFLAGS@//
/^SQLITE3_CFLAGS *=/s/@SQLITE3_CFLAGS@//
/^LIBSELINUX_CFLAGS *=/s/@LIBSELINUX_CFLAGS@//
/^HYBRID_MALLOC *=/s/@HYBRID_MALLOC@//
/^WARN_CFLAGS *=/s/@WARN_CFLAGS@//
/^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@//
-/^ANDROID_CFLAGS *=/s/@ANDROID_CFLAGS@//
+/^ANDROID_BUILD_CFLAGS *=/s/@ANDROID_BUILD_CFLAGS@//
/^DEFS *=/s/@[^@\n]*@//
/^DEPDIR *=/s/@[^@\n]*@/deps/
/^ECHO_N *=/s/@[^@\n]*@/-n/
ANDROID_OBJ = @ANDROID_OBJ@
ANDROID_LIBS = @ANDROID_LIBS@
ANDROID_LDFLAGS = @ANDROID_LDFLAGS@
-ANDROID_CFLAGS = @ANDROID_CFLAGS@
+ANDROID_BUILD_CFLAGS = @ANDROID_BUILD_CFLAGS@
LIBGMP_CFLAGS = @LIBGMP_CFLAGS@
$(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) $(XSYNC_CFLAGS) $(TREE_SITTER_CFLAGS) \
$(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \
$(WERROR_CFLAGS) $(HAIKU_CFLAGS) $(XCOMPOSITE_CFLAGS) $(XSHAPE_CFLAGS) \
- $(ANDROID_CFLAGS) $(GIF_CFLAGS) $(JPEG_CFLAGS) $(SQLITE3_CFLAGS) \
+ $(ANDROID_BUILD_CFLAGS) $(GIF_CFLAGS) $(JPEG_CFLAGS) $(SQLITE3_CFLAGS) \
$(LIBGMP_CFLAGS) $(TIFF_CFLAGS) $(LIBSELINUX_CFLAGS)
ALL_CFLAGS = $(EMACS_CFLAGS) $(WARN_CFLAGS) $(CFLAGS)
ALL_OBJC_CFLAGS = $(EMACS_CFLAGS) \