summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2020-06-22 22:37:48 +0200
committerfalkTX <falktx@gmail.com>2020-06-22 22:37:48 +0200
commitcd4259d0e8d505480545251bb58e752dbb7deea3 (patch)
tree8ea0fe2a3833b49463240f2af86ce6ae383c0319
parentb9e215df96517c5033f14a5238fd7edec543a5c8 (diff)
parentea311b36d7501bfe4c41fd65e7d89d863e39266d (diff)
downloadjack2-cd4259d0e8d505480545251bb58e752dbb7deea3.tar.gz
Merge branch 'develop' of github.com:jackaudio/jack2 into develop
-rw-r--r--common/jack/systemdeps.h16
-rw-r--r--common/wscript56
-rw-r--r--example-clients/property.c63
-rw-r--r--jack.pc.in2
-rw-r--r--wscript2
5 files changed, 77 insertions, 62 deletions
diff --git a/common/jack/systemdeps.h b/common/jack/systemdeps.h
index 2244c6e7..1a111927 100644
--- a/common/jack/systemdeps.h
+++ b/common/jack/systemdeps.h
@@ -70,14 +70,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define __inline__ inline
#if (!defined(int8_t) && !defined(_STDINT_H))
#define __int8_t_defined
- typedef char int8_t;
- typedef unsigned char uint8_t;
- typedef short int16_t;
- typedef unsigned short uint16_t;
- typedef long int32_t;
- typedef unsigned long uint32_t;
- typedef LONGLONG int64_t;
- typedef ULONGLONG uint64_t;
+ typedef INT8 int8_t;
+ typedef UINT8 uint8_t;
+ typedef INT16 int16_t;
+ typedef UINT16 uint16_t;
+ typedef INT32 int32_t;
+ typedef UINT32 uint32_t;
+ typedef INT64 int64_t;
+ typedef UINT64 uint64_t;
#endif
#elif __MINGW32__ /* MINGW */
#include <stdint.h>
diff --git a/common/wscript b/common/wscript
index 11707063..cb794e28 100644
--- a/common/wscript
+++ b/common/wscript
@@ -131,11 +131,16 @@ def build(bld):
'../windows/JackWinTime.c',
]
includes = ['../windows' ] + includes
+ libsuffix = "64" if (bld.env['DEST_CPU'] == "x86_64" and not bld.variant) else ""
+ skipshared = bool('HAVE_TRE_REGEX_H' in bld.env)
uselib.append('REGEX')
uselib.append('WS2_32')
uselib.append('PSAPI')
uselib.append('WINMM')
+ else:
+ libsuffix = ""
+
clientlib = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib'])
if bld.env['IS_MACOSX']:
clientlib.framework = ['CoreAudio', 'Accelerate']
@@ -143,14 +148,14 @@ def build(bld):
clientlib.use = uselib
if bld.env['IS_WINDOWS']:
clientlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
- clientlib.install_path = '${BINDIR}'
- else:
- clientlib.install_path = '${LIBDIR}'
+ clientlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
+ clientlib.env['implib_PATTERN'] = 'lib%s.dll.a'
+ clientlib.install_path = '${LIBDIR}'
if bld.env['AUTOSTART_METHOD'] == 'dbus':
clientlib.use.append('DBUS-1')
clientlib.includes = includes
clientlib.name = 'clientlib'
- clientlib.target = 'jack'
+ clientlib.target = 'jack'+libsuffix
clientlib.source = [] + common_libsources
clientlib.source += [
'JackLibClient.cpp',
@@ -184,7 +189,8 @@ def build(bld):
'../windows/JackMMCSS.cpp',
]
- clientlib.vnum = bld.env['JACK_API_VERSION']
+ if not bld.env['IS_WINDOWS']:
+ clientlib.vnum = bld.env['JACK_API_VERSION']
if bld.env['IS_LINUX']:
clientlib.env.append_value('CPPFLAGS', '-fvisibility=hidden')
@@ -197,6 +203,9 @@ def build(bld):
clientlib.env.append_value('LINKFLAGS', '-lnsl -lsocket')
if bld.env['IS_WINDOWS']:
+ # remove switch to shared binaries if possible, as we most likely want static builds on Windows
+ if skipshared:
+ clientlib.env['SHLIB_MARKER'] = ''
# statically link libjack to libstdc++, some client apps like ardour come
# with a different version of libstdc++.dll that takes precedence and results
# in missing symbols during runtime
@@ -212,14 +221,17 @@ def build(bld):
serverlib.framework = ['CoreAudio', 'CoreFoundation', 'Accelerate']
serverlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
serverlib.includes = includes
- serverlib.name = 'serverlib'
- serverlib.target = 'jackserver'
+ serverlib.name = 'serverlib'
+ serverlib.target = 'jackserver'+libsuffix
serverlib.use = uselib
if bld.env['IS_WINDOWS']:
- serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
- serverlib.install_path = '${BINDIR}'
- else:
- serverlib.install_path = '${LIBDIR}'
+ serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
+ serverlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
+ serverlib.env['implib_PATTERN'] = 'lib%s.dll.a'
+ if skipshared:
+ serverlib.env['SHLIB_MARKER'] = ''
+ serverlib.env.append_value('LINKFLAGS', ['-static-libstdc++', '--disable-auto-import'])
+ serverlib.install_path = '${LIBDIR}'
serverlib.source = [] + common_libsources
serverlib.source += [
'JackAudioDriver.cpp',
@@ -292,7 +304,8 @@ def build(bld):
'../windows/JackNetWinSocket.cpp',
]
- serverlib.vnum = bld.env['JACK_API_VERSION']
+ if not bld.env['IS_WINDOWS']:
+ serverlib.vnum = bld.env['JACK_API_VERSION']
if bld.env['IS_LINUX']:
serverlib.env.append_value('CPPFLAGS', '-fvisibility=hidden')
@@ -310,18 +323,19 @@ def build(bld):
netlib.framework = ['CoreAudio']
netlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
netlib.includes = includes
- netlib.name = 'netlib'
- netlib.target = 'jacknet'
+ netlib.name = 'netlib'
+ netlib.target = 'jacknet'+libsuffix
netlib.use = ['SAMPLERATE', 'CELT', 'OPUS', 'PTHREAD']
if bld.env['IS_WINDOWS']:
netlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
- netlib.install_path = '${BINDIR}'
+ netlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
+ netlib.env['implib_PATTERN'] = 'lib%s.dll.a'
+ if skipshared:
+ netlib.env['SHLIB_MARKER'] = ''
netlib.use += ['WS2_32', 'WINMM']
- elif bld.env['IS_MACOSX']:
- netlib.install_path = '${LIBDIR}'
- else:
+ elif not bld.env['IS_MACOSX']:
netlib.use += ['RT']
- netlib.install_path = '${LIBDIR}'
+ netlib.install_path = '${LIBDIR}'
netlib.source = [
'JackNetAPI.cpp',
'JackNetInterface.cpp',
@@ -349,7 +363,8 @@ def build(bld):
if bld.env['IS_WINDOWS']:
netlib.source += ['../windows/JackNetWinSocket.cpp','../windows/JackWinThread.cpp', '../windows/JackMMCSS.cpp', '../windows/JackWinTime.c']
- netlib.vnum = bld.env['JACK_API_VERSION']
+ if not bld.env['IS_WINDOWS']:
+ netlib.vnum = bld.env['JACK_API_VERSION']
create_jack_process_obj(bld, 'netmanager', 'JackNetManager.cpp', serverlib)
@@ -415,5 +430,6 @@ def build(bld):
target = 'jack.pc',
install_path = '${PKGCONFDIR}',
INCLUDEDIR = os.path.normpath(bld.env['PREFIX'] + '/include'),
+ CLIENTLIB = clientlib.target,
SERVERLIB = serverlib.target,
)
diff --git a/example-clients/property.c b/example-clients/property.c
index dddd2edb..4d5e2a22 100644
--- a/example-clients/property.c
+++ b/example-clients/property.c
@@ -17,20 +17,20 @@ static char* subject = NULL;
static void
show_usage (void)
{
- fprintf (stderr, "\nUsage: jack_property [options] UUID [ key [ value [ type ] ] ]\n");
- fprintf (stderr, "Set/Display JACK properties (metadata).\n\n");
- fprintf (stderr, "Set options:\n");
- fprintf (stderr, " -s, --set Set property \"key\" to \"value\" for \"UUID\" with optional MIME type \"type\"\n");
- fprintf (stderr, " -d, --delete Remove/delete property \"key\" for \"UUID\"\n");
- fprintf (stderr, " -d, --delete UUID Remove/delete all properties for \"UUID\"\n");
- fprintf (stderr, " -D, --delete-all Remove/delete all properties\n");
+ fprintf (stderr, "\nUsage: jack_property [options] UUID [ key [ value [ type ] ] ]\n");
+ fprintf (stderr, "Set/Display JACK properties (metadata).\n\n");
+ fprintf (stderr, "Set options:\n");
+ fprintf (stderr, " -s, --set Set property \"key\" to \"value\" for \"UUID\" with optional MIME type \"type\"\n");
+ fprintf (stderr, " -d, --delete Remove/delete property \"key\" for \"UUID\"\n");
+ fprintf (stderr, " -d, --delete UUID Remove/delete all properties for \"UUID\"\n");
+ fprintf (stderr, " -D, --delete-all Remove/delete all properties\n");
fprintf (stderr, " --client Interpret UUID as a client name, not a UUID\n");
fprintf (stderr, " --port \tInterpret UUID as a port name, not a UUID\n");
- fprintf (stderr, "\nDisplay options:\n");
- fprintf (stderr, " -l Show all properties\n");
- fprintf (stderr, " -l, --list UUID \tShow value for all properties of UUID\n");
- fprintf (stderr, " -l, --list UUID key Show value for key of UUID\n");
- fprintf (stderr, "\nFor more information see https://jackaudio.org/\n");
+ fprintf (stderr, "\nDisplay options:\n");
+ fprintf (stderr, " -l Show all properties\n");
+ fprintf (stderr, " -l, --list UUID \tShow value for all properties of UUID\n");
+ fprintf (stderr, " -l, --list UUID key Show value for key of UUID\n");
+ fprintf (stderr, "\nFor more information see https://jackaudio.org/\n");
}
static int
@@ -82,7 +82,7 @@ get_subject (jack_client_t* client, char* argv[], int* optind)
int main (int argc, char* argv[])
{
jack_client_t* client = NULL;
- jack_options_t options = JackNoStartServer;
+ jack_options_t options = JackNoStartServer;
char* key = NULL;
char* value = NULL;
char* type = NULL;
@@ -90,32 +90,32 @@ int main (int argc, char* argv[])
int delete = 0;
int delete_all = 0;
int c;
- int option_index;
- extern int optind;
- struct option long_options[] = {
- { "set", 0, 0, 's' },
- { "delete", 0, 0, 'd' },
- { "delete-all", 0, 0, 'D' },
- { "list", 0, 0, 'l' },
- { "client", 0, 0, 'c' },
- { "port", 0, 0, 'p' },
- { 0, 0, 0, 0 }
- };
+ int option_index;
+ extern int optind;
+ struct option long_options[] = {
+ { "set", 0, 0, 's' },
+ { "delete", 0, 0, 'd' },
+ { "delete-all", 0, 0, 'D' },
+ { "list", 0, 0, 'l' },
+ { "client", 0, 0, 'c' },
+ { "port", 0, 0, 'p' },
+ { 0, 0, 0, 0 }
+ };
if (argc < 2) {
show_usage ();
exit (1);
}
- while ((c = getopt_long (argc, argv, "sdDlaApc", long_options, &option_index)) >= 0) {
- switch (c) {
- case 's':
+ while ((c = getopt_long (argc, argv, "sdDlaApc", long_options, &option_index)) >= 0) {
+ switch (c) {
+ case 's':
if (argc < 5) {
show_usage ();
exit (1);
}
- set = 1;
- break;
+ set = 1;
+ break;
case 'd':
if (argc < 3) {
show_usage ();
@@ -258,7 +258,7 @@ int main (int argc, char* argv[])
/* list all properties for a given UUID */
jack_description_t description;
- size_t cnt, n;
+ int cnt, n;
if (get_subject (client, argv, &optind)) {
return -1;
@@ -289,9 +289,8 @@ int main (int argc, char* argv[])
/* list all properties */
jack_description_t* description;
- int cnt;
+ int cnt, n;
size_t p;
- int n;
char buf[JACK_UUID_STRING_SIZE];
if ((cnt = jack_get_all_properties (&description)) < 0) {
diff --git a/jack.pc.in b/jack.pc.in
index fbda3a40..a3cc4a29 100644
--- a/jack.pc.in
+++ b/jack.pc.in
@@ -7,5 +7,5 @@ server_libs=-L@LIBDIR@ -l@SERVERLIB@
Name: jack
Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server
Version: @JACK_VERSION@
-Libs: -L@LIBDIR@ -ljack
+Libs: -L@LIBDIR@ -l@CLIENTLIB@
Cflags: -I@INCLUDEDIR@
diff --git a/wscript b/wscript
index 46a62394..14e561a3 100644
--- a/wscript
+++ b/wscript
@@ -379,7 +379,7 @@ def configure(conf):
# we define this in the environment to maintain compatibility with
# existing install paths that use ADDON_DIR rather than have to
# have special cases for windows each time.
- conf.env['ADDON_DIR'] = conf.env['BINDIR'] + '/jack'
+ conf.env['ADDON_DIR'] = conf.env['LIBDIR'] + '/jack'
if Options.options.platform == 'msys':
conf.define('ADDON_DIR', 'jack')
conf.define('__STDC_FORMAT_MACROS', 1) # for PRIu64