From 6f24c31168b2700504dd81bcd5aff278e3353fef Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Fri, 18 Apr 2014 19:12:41 +0200 Subject: add option to build without versioned libraries --- flow-native/configure | 25 +++++++++++++++++++++++++ flow-native/configure.ac | 7 +++++++ flow-native/src/Makefile.am | 5 +++++ flow-native/src/Makefile.in | 3 ++- 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/flow-native/configure b/flow-native/configure index 8037483..e691764 100755 --- a/flow-native/configure +++ b/flow-native/configure @@ -615,6 +615,8 @@ ac_includes_default="\ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +ENABLE_VERSIONED_LIB_FALSE +ENABLE_VERSIONED_LIB_TRUE _ACJNI_JAVAC LIBOBJS OTOOL64 @@ -736,6 +738,7 @@ enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock +enable_versioned_lib ' ac_precious_vars='build_alias host_alias @@ -1373,6 +1376,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --disable-versioned-lib Disable producing versioned library files. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -11728,6 +11732,23 @@ do CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" done +# Check whether --enable-versioned-lib was given. +if test "${enable_versioned_lib+set}" = set; then : + enableval=$enable_versioned_lib; : +else + enable_versioned_lib=yes +fi + + + if test "$enable_versioned_lib" = "yes"; then + ENABLE_VERSIONED_LIB_TRUE= + ENABLE_VERSIONED_LIB_FALSE='#' +else + ENABLE_VERSIONED_LIB_TRUE='#' + ENABLE_VERSIONED_LIB_FALSE= +fi + + ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files src/Makefile" @@ -11857,6 +11878,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_VERSIONED_LIB_TRUE}" && test -z "${ENABLE_VERSIONED_LIB_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_VERSIONED_LIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 diff --git a/flow-native/configure.ac b/flow-native/configure.ac index 039dbb4..6bb58da 100644 --- a/flow-native/configure.ac +++ b/flow-native/configure.ac @@ -36,6 +36,13 @@ do CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" done +AC_ARG_ENABLE([versioned-lib], + [AS_HELP_STRING([--disable-versioned-lib], [Disable producing versioned library files.])], + [:], + [enable_versioned_lib=yes]) + +AM_CONDITIONAL([ENABLE_VERSIONED_LIB], [test "$enable_versioned_lib" = "yes"]) + AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([src/Makefile]) AC_OUTPUT diff --git a/flow-native/src/Makefile.am b/flow-native/src/Makefile.am index 4bd42b3..d48136b 100644 --- a/flow-native/src/Makefile.am +++ b/flow-native/src/Makefile.am @@ -1,4 +1,9 @@ lib_LTLIBRARIES = libflow3.la libflow3_la_SOURCES = flow_jni.c platform/posix/flow.c flow.h com_github_jodersky_flow_internal_NativeSerial.h + +if ENABLE_VERSIONED_LIB libflow3_la_LDFLAGS = -version-info 0:0:0 +else +libflow3_la_LDFLAGS = -avoid-version +endif \ No newline at end of file diff --git a/flow-native/src/Makefile.in b/flow-native/src/Makefile.in index 2dfa1f4..6e4b4c1 100644 --- a/flow-native/src/Makefile.in +++ b/flow-native/src/Makefile.in @@ -216,7 +216,8 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libflow3.la libflow3_la_SOURCES = flow_jni.c platform/posix/flow.c flow.h com_github_jodersky_flow_internal_NativeSerial.h -libflow3_la_LDFLAGS = -version-info 0:0:0 +@ENABLE_VERSIONED_LIB_FALSE@libflow3_la_LDFLAGS = -avoid-version +@ENABLE_VERSIONED_LIB_TRUE@libflow3_la_LDFLAGS = -version-info 0:0:0 all: all-am .SUFFIXES: -- cgit v1.2.3