More build cleanup.
This commit is contained in:
parent
38f191eb41
commit
6edd388722
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
. scripts/config-funcs
|
. scripts/config-funcs
|
||||||
|
|
||||||
[ $# -gt 0 ] && fatal "This is not an autoconf script. Run it without any options and you will be prompted."
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
begin_options
|
begin_options
|
||||||
|
@ -17,7 +15,7 @@ ask "Build for debugging?" USE_DEBUG no
|
||||||
|
|
||||||
begin_tests
|
begin_tests
|
||||||
|
|
||||||
require_FLTK 1 1 7
|
require_FLTK 1.1.7 images
|
||||||
require_command FLUID fluid
|
require_command FLUID fluid
|
||||||
require_package JACK 0.103.0 jack
|
require_package JACK 0.103.0 jack
|
||||||
require_package libsndfile 1.0.17 sndfile
|
require_package libsndfile 1.0.17 sndfile
|
||||||
|
|
|
@ -7,12 +7,15 @@
|
||||||
|
|
||||||
# support functions for 'configure' scripts.
|
# support functions for 'configure' scripts.
|
||||||
|
|
||||||
|
|
||||||
fatal ()
|
fatal ()
|
||||||
{
|
{
|
||||||
echo "$BOLD$RED$*$SGR0" > /dev/stderr
|
echo "$BOLD$RED$*$SGR0" > /dev/stderr
|
||||||
exit 255
|
exit 255
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ $# -gt 0 ] && fatal "This is not an autoconf script. Run it without any options and you will be prompted."
|
||||||
|
|
||||||
ask ()
|
ask ()
|
||||||
{
|
{
|
||||||
local A D
|
local A D
|
||||||
|
@ -148,17 +151,28 @@ require_package ()
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_test_version ()
|
||||||
|
{
|
||||||
|
[ $1 $4 $5 ] && [ $2 $4 $6 ] && [ $3 $4 $7 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
test_version ()
|
||||||
|
{
|
||||||
|
local IFS
|
||||||
|
IFS='.'
|
||||||
|
|
||||||
|
_test_version $1 $2 $3
|
||||||
|
}
|
||||||
|
|
||||||
require_FLTK ()
|
require_FLTK ()
|
||||||
{
|
{
|
||||||
|
local use
|
||||||
|
|
||||||
echo -n "Checking for ${BOLD}FLTK${SGR0}..."
|
echo -n "Checking for ${BOLD}FLTK${SGR0}..."
|
||||||
|
|
||||||
FLTK_VERSION=`fltk-config --version`
|
FLTK_VERSION=`fltk-config --version`
|
||||||
|
|
||||||
FLTK_VERSION_MAJOR=`echo $FLTK_VERSION | cut -d'.' -f1`
|
if ! test_version $FLTK_VERSION -ge $1
|
||||||
FLTK_VERSION_MINOR=`echo $FLTK_VERSION | cut -d'.' -f2`
|
|
||||||
FLTK_VERSION_MICRO=`echo $FLTK_VERSION | cut -d'.' -f3`
|
|
||||||
|
|
||||||
if ! ( [ $FLTK_VERSION_MAJOR -ge $1 ] && [ $FLTK_VERSION_MINOR -ge $2 ] && [ $FLTK_VERSION_MICRO -ge $3 ] )
|
|
||||||
then
|
then
|
||||||
failed
|
failed
|
||||||
fatal "The installed FLTK version ($FLTK_VERSION) is too old."
|
fatal "The installed FLTK version ($FLTK_VERSION) is too old."
|
||||||
|
@ -166,6 +180,14 @@ require_FLTK ()
|
||||||
ok
|
ok
|
||||||
fi
|
fi
|
||||||
|
|
||||||
append "FLTK_LIBS=`fltk-config --use-images --ldflags`"
|
use=
|
||||||
append "FLTK_CFLAGS=`fltk-config --cflags`"
|
|
||||||
|
while [ $# -gt 1 ]
|
||||||
|
do
|
||||||
|
shift 1
|
||||||
|
use="$use --use-$1"
|
||||||
|
done
|
||||||
|
|
||||||
|
append "FLTK_LIBS=`fltk-config $use --ldflags`"
|
||||||
|
append "FLTK_CFLAGS=`fltk-config $use --cflags`"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue