KORG microX utility.
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.

91 lines
2.8 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. dnl Configure template for the kmxtool package
  2. AC_INIT([KORG microX utility], [0.3.0],
  3. [dgouttegattat@incenp.org], [kmxtool])
  4. AC_CONFIG_SRCDIR([configure.ac])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CONFIG_AUX_DIR([config])
  7. AC_CONFIG_HEADERS([config.h])
  8. AC_CONFIG_LIBOBJ_DIR([lib])
  9. AC_USE_SYSTEM_EXTENSIONS
  10. AM_INIT_AUTOMAKE([foreign subdir-objects silent-rules])
  11. dnl Check for development tools
  12. AC_PROG_CC
  13. AC_PROG_RANLIB
  14. AC_PROG_INSTALL
  15. dnl Check for some non-ubiquitous functions
  16. ICP_CHECK_NOTCH_FUNCS
  17. dnl Check for MIDI backends
  18. AM_PATH_ALSA([1.0.0], [alsa_available=yes], [alsa_available=no])
  19. oss_available=yes
  20. dnl Select MIDI backends to enable
  21. AC_ARG_ENABLE([alsa],
  22. [AS_HELP_STRING([--enable-alsa],
  23. [Enable ALSA MIDI backend (default=auto)])],
  24. [], [])
  25. AC_ARG_ENABLE([oss],
  26. [AS_HELP_STRING([--enable-oss],
  27. [Enable OSS MIDI backend (default=yes)])])
  28. dnl Now decide which backends to use
  29. midi_backends=
  30. AS_IF([test "x$alsa_available" = xyes],
  31. [AS_IF([test "x$enable_alsa" != xno],
  32. [use_alsa=yes],
  33. [use_alsa=no
  34. CFLAGS="$alsa_save_CFLAGS"
  35. LDFLAGS="$alsa_save_LDFLAGS"
  36. LIBS="$alsa_save_LIBS"])],
  37. [use_alsa=no
  38. AS_IF([test "x$enable_alsa" = xyes],
  39. [AC_MSG_ERROR([ALSA backend requested but not available.])])])
  40. AS_IF([test "x$oss_available" = xyes],
  41. [AS_IF([test "x$enable_oss" != xno],
  42. [use_oss=yes],
  43. [use_oss=no])],
  44. [use_oss=no
  45. AS_IF([test "x$enable_oss" = xyes],
  46. [AC_MSG_ERROR([OSS backend requested but not available.])])])
  47. dnl Backend(s) selected, now act accordingly
  48. AS_IF([test "x$use_alsa" = xyes],
  49. [AS_IF([test -z "$midi_backends"],
  50. [midi_backends="alsa"], [midi_backends="$midi_backends alsa"])
  51. AC_DEFINE([HAVE_ALSA], [1],
  52. [Whether ALSA MIDI backend is available.])
  53. midi_default_port=hw:1,0,0])
  54. AS_IF([test "x$use_oss" = xyes],
  55. [AS_IF([test -z "$midi_backends"],
  56. [midi_backends="oss"], [midi_backends="$midi_backends oss"])
  57. AC_DEFINE([HAVE_OSS], [1],
  58. [Whether OSS MIDI backend is available.])
  59. midi_default_port=/dev/midi00])
  60. dnl At least one backend must be available and enabled
  61. AS_IF([test -z "$midi_backends"],
  62. [AC_MSG_ERROR([No MIDI backend enabled.])])
  63. AC_DEFINE_UNQUOTED([DEFAULT_MIDI_PORT], ["$midi_default_port"],
  64. [Default MIDI port to use.])
  65. AC_SUBST([DEFAULT_MIDI_PORT], [$midi_default_port])
  66. dnl Output files
  67. AC_CONFIG_FILES([Makefile man/asysex.1 man/kmxtool.1])
  68. AC_OUTPUT
  69. dnl Summary
  70. echo "
  71. ${PACKAGE_NAME} version ${PACKAGE_VERSION}
  72. Configuration complete
  73. Prefix: '${prefix}'
  74. Compiler: '${CC} ${CFLAGS} ${CPPFLAGS}'
  75. MIDI backends: '${midi_backends}'
  76. "