Bläddra i källkod

Use Android NDK r12b

It looks like timgm is now not declared in header file with our
configuration.  Use just our version.
Tatsuhiro Tsujikawa 9 år sedan
förälder
incheckning
8734893d66
3 ändrade filer med 26 tillägg och 23 borttagningar
  1. 1 1
      README.android
  2. 13 19
      README.rst
  3. 12 3
      configure.ac

+ 1 - 1
README.android

@@ -38,7 +38,7 @@ See `the online manual
 Notes
 -----
 
-aria2c executable was generated using android-ndk-r10d.
+aria2c executable was generated using android-ndk-r12b.
 
 The following libraries were statically linked.
 

+ 13 - 19
README.rst

@@ -1,7 +1,5 @@
 aria2 - The ultra fast download utility
 =======================================
-:Author:    Tatsuhiro Tsujikawa
-:Email:     tatsuhiro.t_at_gmail_dot_com
 
 Disclaimer
 ----------
@@ -241,7 +239,7 @@ necessary to build the program::
 
     $ autoreconf -i
 
-Also you need `Sphinx <http://sphinx.pocoo.org/>`_ to build man page.
+Also you need `Sphinx <http://sphinx-doc.org/>`_ to build man page.
 
 If you are building aria2 for Mac OS X, take a look at
 the make-release-os.mk GNU Make makefile.
@@ -361,7 +359,7 @@ Cross-compiling Android binary
 In this section, we describe how to build Android binary using Android
 NDK cross-compiler on Debian Linux.
 
-At the time of this writing, android-ndk-r9 should compile aria2
+At the time of this writing, android-ndk-r12b should compile aria2
 without errors.
 
 ``android-config`` script is a configure script wrapper for Android
@@ -385,20 +383,17 @@ by ourselves.
 environment variable which must fulfill the following conditions:
 
 * Android NDK toolchain is installed under
-  ``$ANDROID_HOME/toolchain``.  Refer to "4/ Invoking the compiler
-  (the easy way):" section in Android NDK
-  ``docs/STANDALONE-TOOLCHAIN.html`` to install custom toolchain.
+  ``$ANDROID_HOME/toolchain``.  Refer to `Standalone Toolchain
+  <https://developer.android.com/ndk/guides/standalone_toolchain.html>`_
+  for more details, but it is a bit out of date.
 
-  For example, to install toolchain under ``$ANDROID_HOME/toolchain``,
-  do this::
+  To install toolchain under ``$ANDROID_HOME/toolchain``, do this:
 
-      $NDK/build/tools/make-standalone-toolchain.sh \
-        --install-dir=$ANDROID_HOME/toolchain \
-        --toolchain=arm-linux-androideabi-4.9 \
-        --platform=android-16
+  .. code-block:: text
 
-  You may need to add ``--system=linux-x86_64`` to the above
-  command-line for x86_64 Linux host.
+     $NDK/build/tools/make_standalone_toolchain.py \
+        --arch arm --api 16 --stl=gnustl \
+         --install-dir $ANDROID_HOME/toolchain
 
 * The dependent libraries must be installed under
   ``$ANDROID_HOME/usr/local``.
@@ -412,14 +407,13 @@ After ``android-config``, run ``android-make`` to compile sources.
 Building documentation
 ----------------------
 
-`Sphinx <http://sphinx.pocoo.org/>`_ is used to build the
+`Sphinx <http://sphinx-doc.org/>`_ is used to build the
 documentation. aria2 man pages will be build when you run ``make`` if
 they are not up-to-date.  You can also build HTML version of aria2 man
 page by ``make html``. The HTML version manual is also available at
 `online <https://aria2.github.io/manual/en/html/>`_ (`Russian
-translation <https://aria2.github.io/manual/ru/html/>`_,
-`Portuguese translation
-<https://aria2.github.io/manual/pt/html/>`_).
+translation <https://aria2.github.io/manual/ru/html/>`_, `Portuguese
+translation <https://aria2.github.io/manual/pt/html/>`_).
 
 BitTorrent
 -----------

+ 12 - 3
configure.ac

@@ -1003,9 +1003,6 @@ AC_CHECK_FUNCS([gettimeofday],
 AC_CHECK_FUNCS([strptime],
         [AM_CONDITIONAL([HAVE_STRPTIME], true)],
         [AM_CONDITIONAL([HAVE_STRPTIME], false)])
-AC_CHECK_FUNCS([timegm],
-        [AM_CONDITIONAL([HAVE_TIMEGM], true)],
-        [AM_CONDITIONAL([HAVE_TIMEGM], false)])
 AC_CHECK_FUNCS([daemon], [have_daemon=yes])
 AM_CONDITIONAL([HAVE_DAEMON], [test "x$have_daemon" = "xyes"])
 
@@ -1025,6 +1022,18 @@ case "$host" in
     ;;
 esac
 
+case "$host" in
+  *android*)
+    # timegm is not declared with Android NDK r12b
+    AM_CONDITIONAL([HAVE_TIMEGM], false)
+    ;;
+  *)
+    AC_CHECK_FUNCS([timegm],
+        [AM_CONDITIONAL([HAVE_TIMEGM], true)],
+        [AM_CONDITIONAL([HAVE_TIMEGM], false)])
+    ;;
+esac
+
 AC_CHECK_FUNCS([port_associate], [have_port_associate=yes])
 AM_CONDITIONAL([HAVE_PORT_ASSOCIATE], [test "x$have_port_associate" = "xyes"])