scripts: Dynamically link to system-wide NTK, if found.

This commit is contained in:
Jonathan Moore Liles 2012-10-30 09:11:13 -07:00
parent 3c01a8a72a
commit 21ba2e35e5
6 changed files with 31 additions and 16 deletions

@ -1 +1 @@
Subproject commit e1d51cede393ab3993ccf3ec8d7b44ef801dc13b Subproject commit 2d774d43691316d27abb753bc7eb4859856690aa

3
mixer/configure vendored
View File

@ -16,8 +16,7 @@ begin_tests
require_command ar ar require_command ar ar
require_command makedepend makedepend require_command makedepend makedepend
require_FLTK 1.3.0 images require_NTK 1.3.0 images
require_command FLUID lib/ntk/fluid/fluid
require_package JACK 0.103.0 jack require_package JACK 0.103.0 jack
require_package lrdf 0.4.0 lrdf require_package lrdf 0.4.0 lrdf
require_package liblo 0.23 liblo require_package liblo 0.23 liblo

View File

@ -270,6 +270,7 @@ require_command ()
fi fi
append "$1=$name" append "$1=$name"
eval "${1}='${name}'"
} }
require_package () require_package ()
@ -358,16 +359,27 @@ hostname_resolvable ()
ping -c1 `hostname` >/dev/null 2>/dev/null ping -c1 `hostname` >/dev/null 2>/dev/null
} }
require_FLTK () require_NTK ()
{ {
local use local use
local appendflags local appendflags
local is_local
is_local=
echo -n "Checking for ${BOLD}NTK${SGR0}..."
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 require_command ntk_config lib/ntk/ntk-config
is_local=yes
fi
echo -n "Checking for ${BOLD}FLTK${SGR0}..." FLTK_VERSION=`${ntk_config} --version`
FLTK_VERSION=`lib/ntk/ntk-config --version`
if ! test_version $FLTK_VERSION $1 if ! test_version $FLTK_VERSION $1
then then
@ -377,6 +389,13 @@ require_FLTK ()
ok $FLTK_VERSION ok $FLTK_VERSION
fi fi
if [ "x$is_local" = "xyes" ]
then
require_command FLUID lib/ntk/fluid/ntk-fluid
else
require_command FLUID ntk-fluid
fi
use= use=
appendflags= appendflags=
@ -389,7 +408,7 @@ require_FLTK ()
use="$use --use-$1" use="$use --use-$1"
done done
append "FLTK_LIBS=`lib/ntk/ntk-config $use --libs | sed 's/,\\?--as-needed//g'`" append "FLTK_LIBS=`${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_LDFLAGS=`${ntk_config} $use --ldflags | sed 's/,\\?--as-needed//g'`"
append "FLTK_CFLAGS=`lib/ntk/ntk-config $use --cflags` $appendflags" append "FLTK_CFLAGS=`${ntk_config} $use --cflags` $appendflags"
} }

3
sequencer/configure vendored
View File

@ -16,8 +16,7 @@ begin_tests
require_package JACK 0.103.0 jack require_package JACK 0.103.0 jack
suggest_package XPM 2.0.0 xpm suggest_package XPM 2.0.0 xpm
require_FLTK 1.3.0 images require_NTK 1.3.0 images
require_command FLUID lib/ntk/fluid/fluid
test_version `version_of jack` 0.105.0 || append "JACK_MIDI_PROTO_API=yes" test_version `version_of jack` 0.105.0 || append "JACK_MIDI_PROTO_API=yes"
require_package liblo 0.23 liblo require_package liblo 0.23 liblo

View File

@ -16,8 +16,7 @@ begin_tests
require_command ar ar require_command ar ar
require_command makedepend makedepend require_command makedepend makedepend
require_FLTK 1.3.0 images require_NTK 1.3.0 images
require_command FLUID lib/ntk/fluid/fluid
suggest_package JACK 0.103.0 jack suggest_package JACK 0.103.0 jack
require_package liblo 0.23 liblo require_package liblo 0.23 liblo
suggest_package XPM 2.0.0 xpm suggest_package XPM 2.0.0 xpm

3
timeline/configure vendored
View File

@ -23,8 +23,7 @@ begin_tests
require_command ar ar require_command ar ar
require_command makedepend makedepend require_command makedepend makedepend
require_FLTK 1.3.0 images require_NTK 1.3.0 images
require_command FLUID lib/ntk/fluid/fluid
require_package JACK 0.103.0 jack require_package JACK 0.103.0 jack
require_package sndfile 1.0.17 sndfile require_package sndfile 1.0.17 sndfile
require_package liblo 0.23 liblo require_package liblo 0.23 liblo