From e71bc2c4d865dab23a40b417b0fcbe75ca374409 Mon Sep 17 00:00:00 2001 From: marcochapeau Date: Thu, 27 Mar 2008 18:59:33 +0000 Subject: [PATCH] * Fix the SONAME issue. lconfig now builds the correct symlinks to the libraries git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2091 0c269be4-1314-0410-8aa9-9f06e86f4224 --- common/SConscript | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/SConscript b/common/SConscript index 778e3520..d484e84d 100644 --- a/common/SConscript +++ b/common/SConscript @@ -25,9 +25,6 @@ from string import Template Import('env') -# Define the library suffix for POSIX like systems -if env['PLATFORM'] == 'posix': - env.AppendUnique(SHLIBSUFFIX='.' + env['JACK_VERSION']) # Paths where include files can be found env.AppendUnique(CPPPATH=['#/', '#/common', '#/common/jack']) @@ -147,11 +144,17 @@ jack_headers = [ # # Libraries -clientlib = env.SharedLibrary(env['CLIENTLIB'], srcfiles_common_clientlib) -serverlib = env.SharedLibrary(env['SERVERLIB'], srcfiles_common_serverlib) +# Each platform should get it's own environment +libenv = env.Copy() +if env['PLATFORM'] == 'posix': + libenv.Append(SHLIBSUFFIX='.' + env['JACK_VERSION']) + libenv.Append(SHLINKFLAGS='-Wl,-soname,${str(TARGET.file).split(".")[0]}.so.' + str(env['JACK_MAJOR_VERSION'])) + +clientlib = libenv.SharedLibrary(env['CLIENTLIB'], srcfiles_common_clientlib) +serverlib = libenv.SharedLibrary(env['SERVERLIB'], srcfiles_common_serverlib) env.Install( env['LIBDIR'], [clientlib, serverlib]) if not env['FULL_MIMIC']: - wrapperlib = env.SharedLibrary(env['WRAPPERLIB'], srcfiles_common_wrapperlib, LIBS='dl') + wrapperlib = libenv.SharedLibrary(env['WRAPPERLIB'], srcfiles_common_wrapperlib, LIBS='dl') env.Install( env['LIBDIR'], [wrapperlib]) env.Alias('install', env['LIBDIR']) @@ -161,9 +164,6 @@ if env['PLATFORM'] == 'posix': libs = [(env['CLIENTLIB'], clientlib), (env['SERVERLIB'], serverlib)] if not env['FULL_MIMIC']: libs.append((env['WRAPPERLIB'], wrapperlib)) - # When we use the wrapper, we want symlinks named libjack.so[.0] so regular clients can use it as a proxy - # this will delete the 2 links installed by jack-1 - # if jackd if running and not jackdmp, jack-1 libs will be used (hopefully...) for lib_name, lib in libs: env.Command('#/common/lib' + lib_name + '.so.' + str(env['JACK_MAJOR_VERSION']), lib, symlinkcmd) env.Command('#/common/lib' + lib_name + '.so', '#/common/lib' + lib_name + '.so.' + str(env['JACK_MAJOR_VERSION']), symlinkcmd)