cmtools is a collection of utilities for generating and processing machine readable musical scores based on MusicXML, MIDI and other data files.
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.

configure.ac 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. # The following is a custom macro in ./m4/os_type.m4
  38. # be sure to also set "ACLOCAL_AMFLAGS = -I m4" in ./Makefile.am
  39. # Defines the config.h variable OS_LINUX or OS_OSX
  40. AX_FUNC_OS_TYPE
  41. AX_FUNC_OS_64
  42. # ac_cv_os_type is set by AX_FUNC_OS_TYPE
  43. AM_CONDITIONAL([OS_LINUX],[test x"${ax_cv_os_type}" = xLinux])
  44. AM_CONDITIONAL([OS_OSX],[test x"${ax_cv_os_type}" = xDarwin])
  45. echo "OS='${ax_cv_os_type}'"
  46. AM_CONDITIONAL([OS_64],[test x"${ax_cv_os_64}" == xx86_64])
  47. echo "ptr width='${ax_cv_os_64}'"
  48. # check if a request has been made to build libcm
  49. AC_ARG_ENABLE([build_libcm],
  50. [ --enable-build_libcm libcm is included in the local source tree],
  51. [case "${enableval}" in
  52. yes) build_libcm=true ;;
  53. no) build_libcm=false ;;
  54. *) AC_MSG_ERROR([bad value ${enableval} for --enable-build_libcm]) ;;
  55. esac],[build_libcm=false])
  56. echo "build_libcm=${build_libcm}"
  57. # check if a nested copy of libcm exists in /src/libcm
  58. AC_CHECK_FILE([${srcdir}/src/libcm/src/cmGlobal.h],[local_libcm=true],[local_libcm=false])
  59. echo "local_libcm=${local_libcm}"
  60. # set BUILD_LIBCM if a libcm build request was set and a nested copy of libcm exists
  61. AM_CONDITIONAL([BUILD_LIBCM], [test x$build_libcm = xtrue -a x$local_libcm = xtrue ])
  62. AC_ARG_ENABLE([debug],
  63. [ --enable-debug Turn on debugging],
  64. [case "${enableval}" in
  65. yes) debug=true ;;
  66. no) debug=false ;;
  67. *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
  68. esac],[debug=false])
  69. echo "debug=${debug}"
  70. AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
  71. if test x$debug = xfalse; then
  72. AC_DEFINE([NDEBUG], 1,[Debugging off.])
  73. fi
  74. AC_ARG_ENABLE([vectop],
  75. [ --enable-vectop Turn on use of Lapack and Atlas vector/matrix operations. ],
  76. [case "${enableval}" in
  77. yes) vectop=true ;;
  78. no) vectop=false ;;
  79. *) AC_MSG_ERROR([bad value ${enableval} for --enable-vectop]) ;;
  80. esac],[vectop=true])
  81. echo "vectop=${vectop}"
  82. # if --enable-vectop then #define CM_VECTOP = 1 in config.h otherwise CM_VECTOP is undefined.
  83. if test x"$vectop" = xtrue; then
  84. AC_DEFINE([CM_VECTOP], 1,[Use Lapack and Atlas.])
  85. fi
  86. AC_ARG_ENABLE([memalign],
  87. [ --enable-memalign Turn on memory alignment on dynamic memory allocations. ],
  88. [case "${enableval}" in
  89. yes) memalign=true ;;
  90. no) memalign=false ;;
  91. *) AC_MSG_ERROR([bad value ${enableval} for --enable-memalign]) ;;
  92. esac],[memalign=true])
  93. echo "memalign=${memalign}"
  94. # if --enable-vectop then #define CM_MEMALIGN = 1 in config.h otherwise CM_MEMALIGN is undefined.
  95. if test x"$memalign" = xtrue; then
  96. AC_DEFINE([CM_MEMALIGN], 1,[Turn on dynamic memory alignment.])
  97. fi
  98. AC_ARG_ENABLE([sonicart],
  99. [ --enable-sonicart Enable use of Sonic Arts proprietary code. ],
  100. [case "${enableval}" in
  101. yes) sonicart=true ;;
  102. no) sonicart=false ;;
  103. *) AC_MSG_ERROR([bad value ${enableval} for --enable-sonicart]) ;;
  104. esac],[sonicart=false])
  105. echo "sonicart=${sonicart}"
  106. # if --enable-sonicart then #define CM_SONICART = 1 in config.h otherwise CM_SONICART is undefined.
  107. if test x"$sonicart" = xtrue; then
  108. AC_DEFINE([CM_SONICART], 1,[Include Sonic Arts proprietry code.])
  109. fi
  110. AM_CONDITIONAL([INC_SONICART], [test x$sonicart = xtrue])
  111. AC_CONFIG_FILES([ Makefile ])
  112. # if local nested libcm then do recursive configure into subdirs
  113. if test x$build_libcm = xtrue -a x$local_libcm = xtrue; then
  114. AC_CONFIG_SUBDIRS([src/libcm])
  115. fi
  116. AC_OUTPUT