cmtools is a collection of utilities for generating and processing machine readable musical scores based on MusicXML, MIDI and other data files.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

configure.ac 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #
  2. # Use "autoreconf --force --install" to update depedent files after changing
  3. # this configure.ac or any of the Makefile.am files.
  4. #
  5. AC_INIT([cmtools],[1.0],[kl@currawongproject.org])
  6. AC_CONFIG_AUX_DIR([build-aux]) # put aux files in build-aux
  7. AM_INIT_AUTOMAKE([1.9 -Wall foreign subdir-objects]) # subdir-objects needed for non-recursive make
  8. AC_CONFIG_SRCDIR([src/cmtools/cmtools.c])
  9. AC_CONFIG_HEADERS([config.h])
  10. AC_CONFIG_MACRO_DIR([m4])
  11. AM_PROG_AR
  12. LT_INIT
  13. # Check for programs
  14. AC_PROG_CC
  15. AC_PROG_CXX
  16. # AC_PROG_RANLIB # required for static librarires
  17. AM_PROG_CC_C_O
  18. # Checks for libraries.
  19. # AC_CHECK_LIB([cairo],[cairo_debug_reset_static_data],[AC_MSG_RESULT([The 'cairo' library was found.])],[AC_MSG_ERROR([The 'cairo' library was not found.])])
  20. #TODO: add more library checks
  21. # Checks for header files.
  22. AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h mach/mach.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h])
  23. # Checks for typedefs, structures, and compiler characteristics.
  24. AC_HEADER_STDBOOL
  25. AC_C_INLINE
  26. AC_TYPE_OFF_T
  27. AC_TYPE_SSIZE_T
  28. AC_TYPE_UINT64_T
  29. # Checks for library functions.
  30. AC_FUNC_ERROR_AT_LINE
  31. AC_FUNC_FORK
  32. AC_FUNC_FSEEKO
  33. AC_FUNC_MALLOC
  34. AC_FUNC_REALLOC
  35. AC_FUNC_STRTOD
  36. AC_CHECK_FUNCS([clock_gettime floor memmove memset mkdir pow rint select socket sqrt strcasecmp strchr strcspn strerror strspn strstr strtol])
  37. # check for he prerequisite libraries
  38. AC_CHECK_LIB([fftw3],[fftw_malloc],[AC_MSG_RESULT([The 'FFTW' library was found.])],[AC_MSG_ERROR([The 'FFTW' library was not found.])])
  39. AC_CHECK_LIB([asound],[snd_asoundlib_version],[AC_MSG_RESULT([The 'ALSA' library was found.])],[AC_MSG_ERROR([The 'ALSA' library was not found.])])
  40. # The following is a custom macro in ./m4/os_type.m4
  41. # be sure to also set "ACLOCAL_AMFLAGS = -I m4" in ./Makefile.am
  42. # Defines the config.h variable OS_LINUX or OS_OSX
  43. AX_FUNC_OS_TYPE
  44. AX_FUNC_OS_64
  45. # ac_cv_os_type is set by AX_FUNC_OS_TYPE
  46. AM_CONDITIONAL([OS_LINUX],[test x"${ax_cv_os_type}" = xLinux])
  47. AM_CONDITIONAL([OS_OSX],[test x"${ax_cv_os_type}" = xDarwin])
  48. echo "OS='${ax_cv_os_type}'"
  49. AM_CONDITIONAL([OS_64],[test x"${ax_cv_os_64}" == xx86_64])
  50. echo "ptr width='${ax_cv_os_64}'"
  51. # check if a request has been made to build libcm
  52. AC_ARG_ENABLE([build_libcm],
  53. [ --enable-build_libcm libcm is included in the local source tree],
  54. [case "${enableval}" in
  55. yes) build_libcm=true ;;
  56. no) build_libcm=false ;;
  57. *) AC_MSG_ERROR([bad value ${enableval} for --enable-build_libcm]) ;;
  58. esac],[build_libcm=false])
  59. # check if a nested copy of libcm exists in /src/libcm
  60. AC_CHECK_FILE([${srcdir}/src/libcm/src/cmGlobal.h],[local_libcm=true],[local_libcm=false])
  61. echo "local_libcm=${local_libcm}"
  62. echo "build_libcm=${build_libcm}"
  63. # set BUILD_LIBCM if a libcm build request was set and a nested copy of libcm exists
  64. AM_CONDITIONAL([BUILD_LIBCM], [test x$build_libcm = xtrue -a x$local_libcm = xtrue ])
  65. # enable debug
  66. AC_ARG_ENABLE([debug],
  67. [ --enable-debug Turn on debugging],
  68. [case "${enableval}" in
  69. yes) debug=true ;;
  70. no) debug=false ;;
  71. *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
  72. esac],[debug=false])
  73. echo "debug=${debug}"
  74. AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
  75. if test x$debug = xfalse; then
  76. AC_DEFINE([NDEBUG], 1,[Debugging off.])
  77. fi
  78. # enable the use of Atlas library
  79. AC_ARG_ENABLE([vectop],
  80. [ --enable-vectop Turn on use of Lapack and Atlas vector/matrix operations. ],
  81. [case "${enableval}" in
  82. yes) vectop=true ;;
  83. no) vectop=false ;;
  84. *) AC_MSG_ERROR([bad value ${enableval} for --enable-vectop]) ;;
  85. esac],[vectop=true])
  86. echo "vectop=${vectop}"
  87. # if --enable-vectop then #define CM_VECTOP = 1 in config.h otherwise CM_VECTOP is undefined.
  88. if test x"$vectop" = xtrue; then
  89. AC_DEFINE([CM_VECTOP], 1,[Use Lapack and Atlas.])
  90. fi
  91. # enable memory alignment
  92. AC_ARG_ENABLE([memalign],
  93. [ --enable-memalign Turn on memory alignment on dynamic memory allocations. ],
  94. [case "${enableval}" in
  95. yes) memalign=true ;;
  96. no) memalign=false ;;
  97. *) AC_MSG_ERROR([bad value ${enableval} for --enable-memalign]) ;;
  98. esac],[memalign=true])
  99. echo "memalign=${memalign}"
  100. # if --enable-vectop then #define CM_MEMALIGN = 1 in config.h otherwise CM_MEMALIGN is undefined.
  101. if test x"$memalign" = xtrue; then
  102. AC_DEFINE([CM_MEMALIGN], 1,[Turn on dynamic memory alignment.])
  103. fi
  104. # enable sonic arts code inclusion
  105. AC_ARG_ENABLE([sonicart],
  106. [ --enable-sonicart Enable use of Sonic Arts proprietary code. ],
  107. [case "${enableval}" in
  108. yes) sonicart=true ;;
  109. no) sonicart=false ;;
  110. *) AC_MSG_ERROR([bad value ${enableval} for --enable-sonicart]) ;;
  111. esac],[sonicart=false])
  112. echo "sonicart=${sonicart}"
  113. # if --enable-sonicart then #define CM_SONICART = 1 in config.h otherwise CM_SONICART is undefined.
  114. if test x"$sonicart" = xtrue; then
  115. AC_DEFINE([CM_SONICART], 1,[Include Sonic Arts proprietry code.])
  116. fi
  117. AM_CONDITIONAL([INC_SONICART], [test x$sonicart = xtrue])
  118. AC_CONFIG_FILES([ Makefile ])
  119. # if local nested libcm then do recursive configure into subdirs
  120. if test x$build_libcm = xtrue -a x$local_libcm = xtrue; then
  121. AC_CONFIG_SUBDIRS([src/libcm])
  122. fi
  123. AC_OUTPUT