Add ./configure option to disable toggle versions

I consider this way cleaner than setting some environment
variable in the build script. Per default, sonames are generated.
If ./configure is run with "--disable-soname-versions", no soname
versions will be generated. This is mainly useful for android, but
it might find some use for other environments without soname versioning
This commit is contained in:
Simon Levermann 2014-02-20 17:54:05 +01:00
parent 464e590969
commit d889492173

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-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"])
AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overflow"]) AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overflow"])
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" LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"
])
]
)
AS_CASE([$host_os], AS_CASE([$host_os],
[cygwin* | mingw* | pw32* | cegcc*], [ [cygwin* | mingw* | pw32* | cegcc*], [