Bug 1382930 - Remove configure references to gonk; r?glandium
Some gaia-related code was also found and removed as part of the
cleanup.
MozReview-Commit-ID: DEjVSljzzu1
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -196,21 +196,17 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -
else
DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections"
fi
fi
# bionic in Android < 4.1 doesn't support PIE
# On OSX, the linker defaults to building PIE programs when targeting OSX 10.7.
# On other Unix systems, some file managers (Nautilus) can't start PIE programs
-if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 16; then
- MOZ_PIE=1
-else
- MOZ_PIE=
-fi
+MOZ_PIE=
MOZ_ARG_ENABLE_BOOL(pie,
[ --enable-pie Enable Position Independent Executables],
MOZ_PIE=1,
MOZ_PIE= )
if test "$GNU_CC$CLANG_CC" -a -n "$MOZ_PIE"; then
AC_MSG_CHECKING([for PIE support])
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -822,18 +822,8 @@ def js_option(*args, **kwargs):
opt = option(*args, **kwargs)
@depends(opt.option, build_project)
def js_option(value, build_project):
if build_project != 'js':
return value.format(opt.option)
add_old_configure_arg(js_option)
-
-
-# Bug 1278542: This function is a workaround to resolve
-# |android_ndk_include|'s dependency on 'gonkdir.' The
-# actual implementation is located in b2g/moz.configure.
-# Remove this function as soon as 'android_ndk_include'
-# depends on 'target.'
-@depends('--help')
-def gonkdir(_):
- return None
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -60,19 +60,19 @@ def have_yasm(value):
set_config('HAVE_YASM', have_yasm)
# Until the YASM variable is not necessary in old-configure.
add_old_configure_assignment('YASM', have_yasm)
# Android NDK
# ==============================================================
-@depends('--disable-compile-environment', build_project, gonkdir, '--help')
-def compiling_android(compile_env, build_project, gonkdir, _):
- return compile_env and (gonkdir or build_project in ('mobile/android', 'js'))
+@depends('--disable-compile-environment', build_project, '--help')
+def compiling_android(compile_env, build_project, _):
+ return compile_env and build_project in ('mobile/android', 'js')
include('android-ndk.configure', when=compiling_android)
# MacOS deployment target version
# ==============================================================
# This needs to happen before any compilation test is done.
option('--enable-macos-target', env='MACOSX_DEPLOYMENT_TARGET', nargs=1,
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -67,20 +67,16 @@ MOZ_DEFAULT_COMPILER
if test -z "$JS_STANDALONE"; then
autoconfmk=autoconf-js.mk
fi
AC_SUBST(autoconfmk)
MOZ_ANDROID_NDK
-if test -n "$gonkdir" ; then
- LDFLAGS="-L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ -llog $LDFLAGS"
-fi
-
case "$target" in
*-apple-darwin*)
MOZ_IOS_SDK
;;
esac
dnl ========================================================
dnl Checks for compilers.
--- a/old-configure.in
+++ b/old-configure.in
@@ -79,75 +79,24 @@ MOZ_USE_PTHREADS=
_PTHREAD_LDFLAGS=""
MOZ_DEFAULT_COMPILER
if test "$COMPILE_ENVIRONMENT"; then
MOZ_ANDROID_NDK
fi # COMPILE_ENVIRONMENT
-if test -n "$gonkdir"; then
- dnl export for js/src/configure. We can't pass the option down normally,
- dnl because it's a `--enable-project=b2g`-only option.
- export gonkdir
- kernel_name=`uname -s | tr "[[:upper:]]" "[[:lower:]]"`
- android_source="$gonkdir"
- ANDROID_SOURCE="$android_source"
-
- case "$android_version" in
- 15)
- CPPFLAGS="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/ -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/external/dbus -I$gonkdir/dalvik/libnativehelper/include/nativehelper $CPPFLAGS"
- MOZ_SECUREELEMENT=1
- ;;
- 17|18)
- CPPFLAGS="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include $CPPFLAGS"
- MOZ_SECUREELEMENT=1
- ;;
- 19)
- CPPFLAGS="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include $CPPFLAGS"
- MOZ_AUDIO_OFFLOAD=1
- MOZ_SECUREELEMENT=1
- AC_SUBST(MOZ_AUDIO_OFFLOAD)
- AC_DEFINE(MOZ_AUDIO_OFFLOAD)
- ;;
- 21|22)
- CPPFLAGS="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include $CPPFLAGS"
- MOZ_AUDIO_OFFLOAD=1
- AC_SUBST(MOZ_AUDIO_OFFLOAD)
- AC_DEFINE(MOZ_AUDIO_OFFLOAD)
- ;;
- *)
- AC_MSG_ERROR([Unsupported platform version: $android_version])
- ;;
- esac
-
- CPPFLAGS="-I$gonkdir/system -I$gonkdir/system/core/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/external/valgrind/fxos-include $CPPFLAGS"
- LDFLAGS="-L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib $LDFLAGS"
-
+case "$target" in
+*-android*|*-linuxandroid*)
AC_DEFINE(ANDROID)
- AC_DEFINE_UNQUOTED(ANDROID_VERSION, $android_version)
- AC_DEFINE(HAVE_SYS_UIO_H)
- AC_DEFINE(HAVE_PTHREADS)
-
- dnl ANDROID_VERSION is only required for the AC_SUBST below
- ANDROID_VERSION=$android_version
- AC_SUBST(ANDROID_VERSION)
-
- direct_nspr_config=1
-
-else
- case "$target" in
- *-android*|*-linuxandroid*)
- AC_DEFINE(ANDROID)
- ;;
- *-linux*)
- AC_PATH_PROG(OBJCOPY,objcopy)
- ;;
- esac
-fi
+ ;;
+*-linux*)
+ AC_PATH_PROG(OBJCOPY,objcopy)
+ ;;
+esac
case "$target" in
*-apple-darwin*)
MOZ_IOS_SDK
;;
esac
AC_SUBST(ANDROID_SOURCE)
@@ -508,17 +457,17 @@ MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DI
MOZ_FS_LAYOUT=unix
dnl Configure platform-specific CPU architecture compiler options.
dnl ==============================================================
if test "$COMPILE_ENVIRONMENT"; then
MOZ_ARCH_OPTS
else
- if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
+ if test "$OS_TARGET" = Android; then
dnl Default Android builds to ARMv7.
MOZ_ARCH=armv7-a
fi
fi # COMPILE_ENVIRONMENT
dnl ========================================================
dnl Android libstdc++, placed here so it can use MOZ_ARCH
dnl computed above.
@@ -852,23 +801,19 @@ case "$target" in
LDFLAGS=$_SAVE_LDFLAGS
fi
MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin"
;;
*-android*|*-linuxandroid*)
AC_DEFINE(NO_PW_GECOS)
- if test -n "$gonkdir"; then
- _PLATFORM_HAVE_RIL=1
- MOZ_SYNTH_PICO=1
- else
- if test "$COMPILE_ENVIRONMENT"; then
- MOZ_LINKER=1
- fi
+
+ if test "$COMPILE_ENVIRONMENT"; then
+ MOZ_LINKER=1
fi
MOZ_GFX_OPTIMIZE_MOBILE=1
if test -z "$CLANG_CC"; then
MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions -Os"
else
# From https://github.com/android-ndk/ndk/issues/133#issuecomment-308549264
# -Oz is smaller than -Os on clang.
@@ -2292,23 +2237,21 @@ AC_SUBST(MOZ_B2G)
AC_SUBST(MOZ_MULET)
AC_SUBST(MOZ_B2G_VERSION)
dnl ========================================================
dnl Ensure Android SDK and build-tools versions depending on
dnl mobile target.
dnl ========================================================
-if test -z "$gonkdir" ; then
- case "$MOZ_BUILD_APP" in
- mobile/android)
- MOZ_ANDROID_SDK(23, 23, 23.0.3 23.0.1, 25.3.2 25.3.1)
- ;;
- esac
-fi
+case "$MOZ_BUILD_APP" in
+mobile/android)
+ MOZ_ANDROID_SDK(23, 23, 23.0.3 23.0.1, 25.3.2 25.3.1)
+ ;;
+esac
dnl ========================================================
dnl =
dnl = Toolkit Options
dnl =
dnl ========================================================
MOZ_ARG_HEADER(Toolkit Options)
@@ -2735,29 +2678,16 @@ if test -n "$MOZ_APPLEMEDIA"; then
# We load VideoToolbox and CoreMedia dynamically, so they don't appear here.
LDFLAGS="$LDFLAGS -framework AudioToolbox"
dnl Verify CoreMedia is available.
AC_CHECK_HEADER([CoreMedia/CoreMedia.h], [],
[AC_MSG_ERROR([MacOS X 10.7 SDK or later is required])])
fi
fi # COMPILE_ENVIRONMENT
-dnl ========================================================
-dnl = Built-in fragmented MP4 support.
-dnl ========================================================
-
-if test x"$MOZ_WIDGET_TOOLKIT" = x"gonk" -a -n "$MOZ_FMP4" -a -n "$android_version"; then
- # we now know for sure that $android_version is not an empty string!
- if test "$android_version" -ge "18"; then
- MOZ_GONK_MEDIACODEC=1
- AC_SUBST(MOZ_GONK_MEDIACODEC)
- fi
-fi
-
-
dnl system libvpx Support
dnl ========================================================
MOZ_ARG_WITH_BOOL(system-libvpx,
[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
MOZ_SYSTEM_LIBVPX=1)
MOZ_LIBVPX_CFLAGS=
MOZ_LIBVPX_LIBS=
@@ -2944,23 +2874,19 @@ esac
MOZ_ARG_DISABLE_BOOL(pulseaudio,
[ --disable-pulseaudio Disable PulseAudio support],
MOZ_PULSEAUDIO=,
MOZ_PULSEAUDIO=1)
if test -n "$MOZ_PULSEAUDIO"; then
AC_DEFINE(MOZ_PULSEAUDIO)
- if test -z "$gonkdir"; then
- PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, ,
- [echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
- AC_MSG_ERROR([pulseaudio audio backend requires libpulse development package])])
- else
- MOZ_PULSEAUDIO_CFLAGS="-I$gonkdir/external/pulseaudio/pulseaudio/src"
- fi
+ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, ,
+ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
+ AC_MSG_ERROR([pulseaudio audio backend requires libpulse development package])])
fi
AC_SUBST(MOZ_PULSEAUDIO)
dnl ========================================================
dnl NegotiateAuth
dnl ========================================================
@@ -3544,19 +3470,16 @@ fi
MOZ_ARG_DISABLE_BOOL(sandbox,
[ --disable-sandbox Disable sandboxing support],
MOZ_SANDBOX=,
MOZ_SANDBOX=1)
dnl ========================================================
dnl = Content process sandboxing
dnl ========================================================
-if test -n "$gonkdir"; then
- MOZ_CONTENT_SANDBOX=$MOZ_SANDBOX
-fi
case "$OS_TARGET" in
WINNT)
MOZ_CONTENT_SANDBOX=$MOZ_SANDBOX
;;
Darwin)
MOZ_CONTENT_SANDBOX=$MOZ_SANDBOX
;;
@@ -4184,39 +4107,16 @@ dnl bug 988880: disable startup cache on
if test -n "$MOZ_B2G"; then
MOZ_DISABLE_STARTUPCACHE=1
fi
if test -n "$MOZ_DISABLE_STARTUPCACHE"; then
AC_DEFINE(MOZ_DISABLE_STARTUPCACHE)
fi
AC_SUBST(MOZ_DISABLE_STARTUPCACHE)
-dnl =========================================
-dnl = Enable packaging Gaia with B2G desktop
-dnl =========================================
-if test x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
- if test -n "$GAIADIR" -a ! -d "$GAIADIR" ; then
- AC_MSG_ERROR([GAIADIR '$GAIADIR' isn't a valid directory])
- fi
-
- AC_SUBST(GAIADIR)
- if test -n "$GAIADIR" ; then
- AC_DEFINE(PACKAGE_GAIA)
- fi
-
- if test -n "$FXOS_SIMULATOR" -a -z "$GAIADIR" ; then
- AC_MSG_ERROR([FXOS_SIMULATOR=1 requires GAIADIR to be defined])
- fi
-
- if test -n "$FXOS_SIMULATOR" ; then
- AC_DEFINE(FXOS_SIMULATOR)
- AC_SUBST(FXOS_SIMULATOR)
- fi
-fi
-
dnl ========================================================
dnl = Enable Pico Speech Synthesis (Gonk usually)
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(synth-pico,
[ --enable-synth-pico Set compile flags necessary for compiling Pico Web Speech API ],
MOZ_SYNTH_PICO=1,
MOZ_SYNTH_PICO= )
if test -n "$MOZ_SYNTH_PICO"; then
@@ -4663,17 +4563,17 @@ else
PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION)
MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS"
MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_LIBS"
MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS"
fi
fi
case "$MOZ_WIDGET_TOOLKIT" in
-android|gonk)
+android)
TK_CFLAGS="$MOZ_CAIRO_CFLAGS $MOZ_PIXMAN_CFLAGS"
TK_LIBS="$MOZ_CAIRO_LIBS $MOZ_PIXMAN_LIBS"
;;
esac
AC_SUBST(MOZ_TREE_CAIRO)
AC_SUBST_LIST(MOZ_CAIRO_CFLAGS)
AC_SUBST_LIST(MOZ_CAIRO_LIBS)
@@ -4699,21 +4599,16 @@ dnl ====================================
dnl necko configuration options
dnl ========================================================
dnl
dnl option to disable necko's wifi scanner
dnl
case "$OS_TARGET" in
- Android)
- if test -n "$gonkdir"; then
- NECKO_WIFI=1
- fi
- ;;
Darwin)
if test -z "$MOZ_IOS"; then
NECKO_WIFI=1
fi
;;
DragonFly|FreeBSD|WINNT)
NECKO_WIFI=1
;;