Merge pull request #119 from sonOfRa/sonames

Add ./configure option to disable toggle soname versions
This commit is contained in:
Frank Denis 2014-02-20 09:03:47 -08:00
commit 7524a9199e
2 changed files with 12 additions and 3 deletions

View File

@ -151,7 +151,16 @@ AX_CHECK_COMPILE_FLAG([-fwrapv], [CFLAGS="$CFLAGS -fwrapv"])
AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"])
AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overflow"])
LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"
AC_ARG_ENABLE(soname-versions,
[AC_HELP_STRING([--enable-soname-versions], [enable soname versions (must be disabled for android) (default: enabled)])],
[
AS_IF([test "x$enableval" = "xno"], [
LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -avoid-version"
], [
LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"
])
]
)
AS_CASE([$host_os],
[cygwin* | mingw* | pw32* | cegcc*], [

View File

@ -21,7 +21,6 @@ export MAKE_TOOLCHAIN="${ANDROID_NDK_HOME}/build/tools/make-standalone-toolchain
export PREFIX="$(pwd)/libsodium-android-${TARGET_ARCH}"
export TOOLCHAIN_DIR="$(pwd)/android-toolchain-${TARGET_ARCH}"
export PATH="${PATH}:${TOOLCHAIN_DIR}/bin"
export LIBTOOL_EXTRA_FLAGS="-avoid-version"
# Clean up before build
rm -rf "${TOOLCHAIN_DIR}" "${PREFIX}"
@ -32,7 +31,8 @@ $MAKE_TOOLCHAIN --platform="${NDK_PLATFORM:-android-14}" \
./configure --host="${HOST_COMPILER}" \
--with-sysroot="${TOOLCHAIN_DIR}/sysroot" \
--prefix="${PREFIX}" && \
--prefix="${PREFIX}" \
--disable-soname-versions && \
make clean && \
make -j3 install && \