From 21ba2e35e5f3abb990ef0ca05a45e142e9b6b099 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 30 Oct 2012 09:11:13 -0700 Subject: [PATCH] scripts: Dynamically link to system-wide NTK, if found. --- lib/ntk | 2 +- mixer/configure | 3 +-- scripts/config-funcs | 33 ++++++++++++++++++++++++++------- sequencer/configure | 3 +-- session-manager/configure | 3 +-- timeline/configure | 3 +-- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/lib/ntk b/lib/ntk index e1d51ce..2d774d4 160000 --- a/lib/ntk +++ b/lib/ntk @@ -1 +1 @@ -Subproject commit e1d51cede393ab3993ccf3ec8d7b44ef801dc13b +Subproject commit 2d774d43691316d27abb753bc7eb4859856690aa diff --git a/mixer/configure b/mixer/configure index 8f331e2..b2f6e20 100755 --- a/mixer/configure +++ b/mixer/configure @@ -16,8 +16,7 @@ begin_tests require_command ar ar require_command makedepend makedepend -require_FLTK 1.3.0 images -require_command FLUID lib/ntk/fluid/fluid +require_NTK 1.3.0 images require_package JACK 0.103.0 jack require_package lrdf 0.4.0 lrdf require_package liblo 0.23 liblo diff --git a/scripts/config-funcs b/scripts/config-funcs index 7342630..e75ba70 100644 --- a/scripts/config-funcs +++ b/scripts/config-funcs @@ -270,6 +270,7 @@ require_command () fi append "$1=$name" + eval "${1}='${name}'" } require_package () @@ -358,16 +359,27 @@ hostname_resolvable () ping -c1 `hostname` >/dev/null 2>/dev/null } -require_FLTK () +require_NTK () { local use local appendflags + local is_local - require_command ntk_config lib/ntk/ntk-config + is_local= - echo -n "Checking for ${BOLD}FLTK${SGR0}..." + echo -n "Checking for ${BOLD}NTK${SGR0}..." - FLTK_VERSION=`lib/ntk/ntk-config --version` + if [ -n "`which ntk-config`" ] + then + echo "found system NTK..." + require_command ntk_config ntk-config + else + echo "no system NTK found... checking for bundled version..." + require_command ntk_config lib/ntk/ntk-config + is_local=yes + fi + + FLTK_VERSION=`${ntk_config} --version` if ! test_version $FLTK_VERSION $1 then @@ -377,6 +389,13 @@ require_FLTK () ok $FLTK_VERSION fi + if [ "x$is_local" = "xyes" ] + then + require_command FLUID lib/ntk/fluid/ntk-fluid + else + require_command FLUID ntk-fluid + fi + use= appendflags= @@ -389,7 +408,7 @@ require_FLTK () use="$use --use-$1" done - append "FLTK_LIBS=`lib/ntk/ntk-config $use --libs | sed 's/,\\?--as-needed//g'`" - append "FLTK_LDFLAGS=`lib/ntk/ntk-config $use --ldflags | sed 's/,\\?--as-needed//g'`" - append "FLTK_CFLAGS=`lib/ntk/ntk-config $use --cflags` $appendflags" + append "FLTK_LIBS=`${ntk_config} $use --libs | sed 's/,\\?--as-needed//g'`" + append "FLTK_LDFLAGS=`${ntk_config} $use --ldflags | sed 's/,\\?--as-needed//g'`" + append "FLTK_CFLAGS=`${ntk_config} $use --cflags` $appendflags" } diff --git a/sequencer/configure b/sequencer/configure index 6bdb9dc..7bcd3a8 100755 --- a/sequencer/configure +++ b/sequencer/configure @@ -16,8 +16,7 @@ begin_tests require_package JACK 0.103.0 jack suggest_package XPM 2.0.0 xpm -require_FLTK 1.3.0 images -require_command FLUID lib/ntk/fluid/fluid +require_NTK 1.3.0 images test_version `version_of jack` 0.105.0 || append "JACK_MIDI_PROTO_API=yes" require_package liblo 0.23 liblo diff --git a/session-manager/configure b/session-manager/configure index 3f1587c..88f424e 100755 --- a/session-manager/configure +++ b/session-manager/configure @@ -16,8 +16,7 @@ begin_tests require_command ar ar require_command makedepend makedepend -require_FLTK 1.3.0 images -require_command FLUID lib/ntk/fluid/fluid +require_NTK 1.3.0 images suggest_package JACK 0.103.0 jack require_package liblo 0.23 liblo suggest_package XPM 2.0.0 xpm diff --git a/timeline/configure b/timeline/configure index ad571f2..d0bfb27 100755 --- a/timeline/configure +++ b/timeline/configure @@ -23,8 +23,7 @@ begin_tests require_command ar ar require_command makedepend makedepend -require_FLTK 1.3.0 images -require_command FLUID lib/ntk/fluid/fluid +require_NTK 1.3.0 images require_package JACK 0.103.0 jack require_package sndfile 1.0.17 sndfile require_package liblo 0.23 liblo