Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.6KB

  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2008 Jonathan Moore Liles
  4. #
  5. . scripts/colors
  6. fatal ()
  7. {
  8. echo "$BOLD$RED$*$SGR0"
  9. exit 255
  10. }
  11. ask ()
  12. {
  13. echo -n "$1 [$BOLD$GREEN$3$SGR0] "
  14. read R
  15. echo "$2 := ${R:-$3}" >> make.conf
  16. }
  17. ok ()
  18. {
  19. echo "$BOLD${GREEN}ok$SGR0."
  20. }
  21. failed ()
  22. {
  23. echo "$BOLD${RED}failed!$SGR0"
  24. }
  25. echo "# This is a generated file. Any changes may be lost!" > make.conf
  26. ask "Install prefix?" prefix /usr/local
  27. ask "Use LASH?" USE_LASH yes
  28. ask "Build for debugging?" MAINTAINER_MODE no
  29. # tests
  30. echo -n "Checking for ${BOLD}FLTK${SGR0}..."
  31. FLTK_VERSION=`fltk-config --version`
  32. FLTK_VERSION_MAJOR=`echo $FLTK_VERSION | cut -d'.' -f1`
  33. FLTK_VERSION_MINOR=`echo $FLTK_VERSION | cut -d'.' -f2`
  34. FLTK_VERSION_PATCH=`echo $FLTK_VERSION | cut -d'.' -f3`
  35. if ! ( [ $FLTK_VERSION_MAJOR -ge 1 ] && [ $FLTK_VERSION_MINOR -ge 1 ] && [ $FLTK_VERSION_PATCH -ge 8 ] )
  36. then
  37. failed
  38. fatal "The installed FLTK version ($FLTK_VERSION) is too old."
  39. else
  40. ok
  41. fi
  42. echo "FLTK_LIBS := `fltk-config --use-images --ldflags`" >> make.conf
  43. #
  44. check ()
  45. {
  46. echo -n "Checking for $BOLD$1$SGR0..."
  47. if ! pkg-config --atleast-version $2 $3
  48. then
  49. failed
  50. fatal "$1 not installed or too old."
  51. fi
  52. ok
  53. return 0
  54. }
  55. check JACK 0.103.0 jack && echo "JACK_LIBS := `pkg-config --libs jack`" >> make.conf
  56. check libSNDFILE 1.0.17 sndfile && echo "SNDFILE_LIBS := `pkg-config --libs sndfile`" >> make.conf
  57. grep -q 'USE_LASH := yes' make.conf &&
  58. check LASH 0.5.4 lash-1.0 &&
  59. ( echo "LASH_LIBS := `pkg-config --libs lash-1.0`" >> make.conf
  60. echo "LASH_CFLAGS := -DUSE_LASH `pkg-config --cflags lash-1.0`" >> make.conf )
  61. echo "-- Configuration complete."