mirror of https://github.com/aria2/aria2
Add libssh2 to android build config
parent
381533e32d
commit
ce36021447
|
@ -42,9 +42,10 @@ aria2c executable was generated using android-ndk-r10b.
|
|||
|
||||
The following libraries were statically linked.
|
||||
|
||||
* openssl 1.0.2
|
||||
* expat 2.1.0
|
||||
* c-ares 1.10.0
|
||||
* openssl 1.0.2a
|
||||
* expat 2.1.0
|
||||
* c-ares 1.10.0
|
||||
* libssh2 1.5.0
|
||||
|
||||
Since Android does not have ``/etc/resolv.conf``, c-ares (asynchronous
|
||||
DNS resolver) is disabled by default. But name resolution is sometimes
|
||||
|
|
|
@ -50,13 +50,16 @@ PATH=$TOOLCHAIN/bin:$PATH
|
|||
--with-libexpat --with-libexpat-prefix=$PREFIX \
|
||||
--with-libcares --with-libcares-prefix=$PREFIX \
|
||||
--with-libz --with-libz-prefix=$PREFIX \
|
||||
--with-libssh2 \
|
||||
CXXFLAGS="-Os -g" \
|
||||
CFLAGS="-Os -g" \
|
||||
CPPFLAGS="-fPIE" \
|
||||
LDFLAGS="-fPIE -pie -L$PREFIX/lib" \
|
||||
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
||||
ZLIB_LIBS="-lz" \
|
||||
ZLIB_CFLAGS="-I$TOOLCHAIN/sysroot/usr/include"
|
||||
ZLIB_CFLAGS="-I$TOOLCHAIN/sysroot/usr/include" \
|
||||
LIBSSH2_LIBS="-lssh2" \
|
||||
LIBSSH2_CFLAGS="-I$TOOLCHAIN/sysroot/usr/include"
|
||||
|
||||
# ZLIB_LIBS and ZLIB_CFLAGS are needed because aria2 configure script
|
||||
# checks zlib availability using pkg-config, but android toochain does
|
||||
|
|
28
configure.ac
28
configure.ac
|
@ -291,20 +291,6 @@ if test "x$with_sqlite3" = "xyes"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_libssh2" = "xyes"; then
|
||||
PKG_CHECK_MODULES([LIBSSH2], [libssh2], [have_libssh2=yes], [have_libssh2=no])
|
||||
if test "x$have_libssh2" = "xyes"; then
|
||||
AC_DEFINE([HAVE_LIBSSH2], [1], [Define to 1 if you have libssh2.])
|
||||
LIBS="$LIBSSH2_LIBS $LIBS"
|
||||
CPPFLAGS="$LIBSSH2_CFLAGS $CPPFLAGS"
|
||||
else
|
||||
AC_MSG_WARN([$LIBSSH2_PKG_ERRORS])
|
||||
if test "x$with_libssh2_requested" = "yes"; then
|
||||
ARIA2_DEP_NOT_MET([libssh2])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$host" in
|
||||
*darwin*)
|
||||
have_osx="yes"
|
||||
|
@ -477,6 +463,20 @@ if test "x$have_openssl" != "xyes"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_libssh2" = "xyes"; then
|
||||
PKG_CHECK_MODULES([LIBSSH2], [libssh2], [have_libssh2=yes], [have_libssh2=no])
|
||||
if test "x$have_libssh2" = "xyes"; then
|
||||
AC_DEFINE([HAVE_LIBSSH2], [1], [Define to 1 if you have libssh2.])
|
||||
LIBS="$LIBSSH2_LIBS $LIBS"
|
||||
CPPFLAGS="$LIBSSH2_CFLAGS $CPPFLAGS"
|
||||
else
|
||||
AC_MSG_WARN([$LIBSSH2_PKG_ERRORS])
|
||||
if test "x$with_libssh2_requested" = "xyes"; then
|
||||
ARIA2_DEP_NOT_MET([libssh2])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_libcares" = "xyes"; then
|
||||
PKG_CHECK_MODULES([LIBCARES], [libcares >= 1.7.0], [have_libcares=yes],
|
||||
[have_libcares=no])
|
||||
|
|
Loading…
Reference in New Issue