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.

89 lines
1.8KB

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