diff --git a/Makefile b/Makefile index 2caa0a6..62488a2 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ else CXXFLAGS := -pipe -O3 -fno-rtti -fno-exceptions -DNDEBUG endif -CXXFLAGS += $(LASH_CFLAGS) -DINSTALL_PREFIX=\"$(prefix)\" -DVERSION=\"$(VERSION)\" +CXXFLAGS += $(LASH_CFLAGS) $(FLTK_CFLAGS) -DINSTALL_PREFIX=\"$(prefix)\" -DVERSION=\"$(VERSION)\" include scripts/colors diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index f160b9e..0b86c62 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -23,7 +23,7 @@ #include "Audio_Sequence.H" #include "Control_Sequence.H" #include - +#include "Scalebar.H" #include "Annotation_Sequence.H" // #include diff --git a/configure b/configure index 881776f..85dd4f6 100755 --- a/configure +++ b/configure @@ -5,11 +5,6 @@ . scripts/colors -if [ $# -gt 0 ] -then - echo This is not an autoconf script. Run it without any options and you will be prompted. - exit 255 -fi fatal () { @@ -26,14 +21,17 @@ ask () ok () { - echo "$BOLD${GREEN}ok$SGR0." + echo "$BOLD${GREEN}ok${SGR0}." } failed () { - echo "$BOLD${RED}failed!$SGR0" + echo "$BOLD${RED}failed!${SGR0}" + rm -f make.conf } +[ $# -gt 0 ] && fatal "This is not an autoconf script. Run it without any options and you will be prompted." + echo "-- Configuration:" # get the old values @@ -65,7 +63,7 @@ FLTK_VERSION_MAJOR=`echo $FLTK_VERSION | cut -d'.' -f1` FLTK_VERSION_MINOR=`echo $FLTK_VERSION | cut -d'.' -f2` FLTK_VERSION_PATCH=`echo $FLTK_VERSION | cut -d'.' -f3` -if ! ( [ $FLTK_VERSION_MAJOR -ge 1 ] && [ $FLTK_VERSION_MINOR -ge 1 ] && [ $FLTK_VERSION_PATCH -ge 8 ] ) +if ! ( [ $FLTK_VERSION_MAJOR -ge 1 ] && [ $FLTK_VERSION_MINOR -ge 1 ] && [ $FLTK_VERSION_PATCH -ge 7 ] ) then failed fatal "The installed FLTK version ($FLTK_VERSION) is too old." @@ -74,16 +72,36 @@ else fi echo "FLTK_LIBS=`fltk-config --use-images --ldflags`" >> make.conf +echo "FLTK_CFLAGS=`fltk-config --cflags`" >> make.conf + +check_command () +{ + echo -n "Checking for ${BOLD}$1${SGR0}..." + + if ! [ -x "`which $2`" ] + then + failed + fatal "Command $1 not found." + else + ok + fi +} + +check_command FLUID fluid # check () { echo -n "Checking for $BOLD$1$SGR0..." - if ! pkg-config --atleast-version $2 $3 + if ! pkg-config --exists $3 + then + failed + fatal "Required package $1 doesn't appear to be installed." + elif ! pkg-config --atleast-version $2 $3 then failed - fatal "$1 not installed or too old." + fatal "The installed version of $1 (`pkg-config --mod-version $3`) is too old." fi ok