Permalink
Browse files

adduce right version info for so files

git-svn-id: https://svn.opensource.yandex.net/xscript/trunk@666 b01ef89b-65f2-463d-9415-e8412542ae63
  • Loading branch information...
1 parent b5e2dd9 commit f6c8b4763926ca1d6c7839f31b475735516ef82f lmovsesjan committed Dec 18, 2008
@@ -0,0 +1,34 @@
+AC_DEFUN([AX_SET_VERSION_INFO],[dnl
+AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
+AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
+AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
+AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
+AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
+ test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
+ AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
+ ifelse($1,,$PACKAGE_VERSION,$1) )
+ MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
+ MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
+ MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
+ MICRO="$MINOR"
+ MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
+ MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
+ PATCH="$MICRO"
+ MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
+ PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'`
+ if test "_$MICRO" = "_" ; then MICRO="0" ; fi
+ if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
+ MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
+ LTREL="-release $MAJOR"
+ LTVER="-version-info `expr $MAJOR + $MINOR`:$MICRO:$MINOR"
+AC_MSG_RESULT([/$MAJOR/$MAJOR:$MINOR:$MICRO (-$MAJOR.so.$MAJOR.$MINOR.$MICRO)])
+AC_SUBST(LTREL)
+AC_SUBST(LTVER)
+AS_VAR_POPDEF([LTVER])dnl
+AS_VAR_POPDEF([LTREL])dnl
+AS_VAR_POPDEF([PATCH])dnl
+AS_VAR_POPDEF([MICRO])dnl
+AS_VAR_POPDEF([MINOR])dnl
+AS_VAR_POPDEF([MAJOR])dnl
+])
View
@@ -1,5 +1,6 @@
AC_PREREC(2.5.3)
-AC_INIT([xscript],[5.42.0],[highpower@yandex-team.ru])
+
+AC_INIT([xscript],[5.48],[highpower@yandex-team.ru])
AM_INIT_AUTOMAKE
AC_GNU_SOURCE
@@ -21,6 +22,8 @@ AC_CHECK_FUNCS(memcmp, [], [])
AC_CHECK_FUNCS(memchr, [], [])
AC_CHECK_FUNCS(memmem, [], [])
+AX_SET_VERSION_INFO(AC_PACKAGE_VERSION)
+
PKG_CHECK_MODULES(yandex_platform, [yandex-platform], [], [echo yandex-platform not found])
ac_have_boost="yes"
View
@@ -4,7 +4,7 @@ xscript_file_la_SOURCES = file_block.cpp file_extension.cpp
xscript_file_la_LIBADD = ../library/libxscript.la
-xscript_file_la_LDFLAGS = -lcurl -module -avoid-version -export-dynamic
+xscript_file_la_LDFLAGS = -lcurl -module -export-dynamic @VERSION_INFO@
noinst_HEADERS = file_block.h file_extension.h
View
@@ -4,7 +4,7 @@ xscript_http_la_SOURCES = http_helper.cpp http_block.cpp
xscript_http_la_LIBADD = ../library/libxscript.la
-xscript_http_la_LDFLAGS = -lcurl -module -avoid-version -export-dynamic
+xscript_http_la_LDFLAGS = -lcurl -module -export-dynamic @VERSION_INFO@
noinst_HEADERS = http_helper.h http_block.h
View
@@ -36,7 +36,9 @@ libxscript_la_SOURCES = args.cpp authorizer.cpp block.cpp component.cpp \
default_request_response.cpp \
validator_factory.cpp validator.cpp validator_exception.cpp
-libxscript_la_LDFLAGS = -lpthread @LTLIBICONV@ -lboost_thread -lboost_filesystem
+libxscript_la_LDFLAGS = @VERSION_INFO@
+
+libxscript_la_LIBADD = -lpthread @LTLIBICONV@ -lboost_thread -lboost_filesystem
AM_CXXFLAGS = -W -Wall -fexceptions -frtti -ftemplate-depth-128 -finline -pthread -I@top_srcdir@/include -I@builddir@ @yandex_platform_CFLAGS@
AM_LDFLAGS = -lboost_thread -lboost_filesystem -I@top_srcdir@/include @yandex_platform_LIBS@
View
@@ -6,7 +6,7 @@ xscript_lua_la_SOURCES = exception.cpp lua_block.cpp request_methods.cpp \
xscript_methods.cpp
xscript_lua_la_LIBADD = ../library/libxscript.la
-xscript_lua_la_LDFLAGS = @lua_LIBS@ -module -avoid-version -export-dynamic
+xscript_lua_la_LDFLAGS = @lua_LIBS@ -module -export-dynamic @VERSION_INFO@
noinst_HEADERS = cookie_methods.h exception.h lua_block.h method_map.h \
request_methods.h response_methods.h stack.h state_methods.h \
View
@@ -5,7 +5,7 @@ xscript_mist_la_SOURCES = xml_node.cpp state_node.cpp state_param_node.cpp \
xscript_mist_la_LIBADD = ../library/libxscript.la
-xscript_mist_la_LDFLAGS = -module -avoid-version -export-dynamic
+xscript_mist_la_LDFLAGS = -module -export-dynamic @VERSION_INFO@
noinst_HEADERS = mist_block.h state_node.h state_param_node.h \
state_prefix_node.h xml_node.h
View
@@ -51,7 +51,7 @@ xscript_validators_la_LDFLAGS = -module
AM_CPPFLAGS = -I@top_srcdir@/include -I@builddir@/config -D_REENTRANT @yandex_platform_CFLAGS@
AM_CXXFLAGS = -W -Wall -fexceptions -frtti -ftemplate-depth-128 -finline -pthread
-AM_LDFLAGS = -lboost_thread -lboost_filesystem @yandex_platform_LIBS@
+AM_LDFLAGS = -lboost_thread -lboost_filesystem @yandex_platform_LIBS@ @VERSION_INFO@
EXTRA_DIST = test.conf

0 comments on commit f6c8b47

Please sign in to comment.