configure.ac 6.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.69])
  4. AC_INIT([loopidity], [0.14.004], [https://github.com/bill-auger/loopidity/issues])
  5. AC_CONFIG_SRCDIR([src/loopidity.cpp])
  6. AM_INIT_AUTOMAKE([subdir-objects foreign -Wall -Werror])
  7. AC_CONFIG_FILES([Makefile])
  8. AM_SILENT_RULES([yes])
  9. AC_LANG([C++])
  10. AC_MSG_NOTICE(["Checking for programs."])
  11. AC_PROG_CXX
  12. AC_PROG_CC
  13. AC_MSG_NOTICE(["Checking for libraries."])
  14. AC_CHECK_LIB([jack], [jack_client_open ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_client_open'" )])
  15. AC_CHECK_LIB([jack], [jack_set_process_callback ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_set_process_callback'" )])
  16. AC_CHECK_LIB([jack], [jack_set_sample_rate_callback], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_set_sample_rate_callback'")])
  17. AC_CHECK_LIB([jack], [jack_set_buffer_size_callback], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_set_buffer_size_callback'")])
  18. AC_CHECK_LIB([jack], [jack_on_shutdown ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_on_shutdown'" )])
  19. AC_CHECK_LIB([jack], [jack_activate ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_activate'" )])
  20. AC_CHECK_LIB([jack], [jack_get_sample_rate ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_get_sample_rate'" )])
  21. AC_CHECK_LIB([jack], [jack_port_get_buffer ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_port_get_buffer'" )])
  22. AC_CHECK_LIB([jack], [jack_get_buffer_size ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_get_buffer_size'" )])
  23. AC_CHECK_LIB([jack], [jack_client_close ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_client_close'" )])
  24. AC_CHECK_LIB([jack], [jack_port_register ], [ ], [AC_MSG_ERROR("jack library does not provide 'jack_port_register'" )])
  25. AC_CHECK_LIB([SDL], [SDL_Init ], [ ], [AC_MSG_ERROR("SDL library does not provide 'SDL_Init'" )])
  26. AC_CHECK_LIB([SDL_gfx], [hlineColor ], [ ], [AC_MSG_ERROR("SDL_gfx library does not provide 'hlineColor'" )])
  27. AC_CHECK_LIB([SDL_gfx], [vlineColor ], [ ], [AC_MSG_ERROR("SDL_gfx library does not provide 'vlineColor'" )])
  28. AC_CHECK_LIB([SDL_gfx], [roundedRectangleColor ], [ ], [AC_MSG_ERROR("SDL_gfx library does not provide 'roundedRectangleColor'" )])
  29. AC_CHECK_LIB([SDL_gfx], [circleColor ], [ ], [AC_MSG_ERROR("SDL_gfx library does not provide 'circleColor'" )])
  30. AC_CHECK_LIB([SDL_gfx], [filledPieColor ], [ ], [AC_MSG_ERROR("SDL_gfx library does not provide 'filledPieColor'" )])
  31. AC_CHECK_LIB([SDL_gfx], [rotozoomSurface ], [ ], [AC_MSG_ERROR("SDL_gfx library does not provide 'rotozoomSurface'" )])
  32. AC_CHECK_LIB([SDL_gfx], [zoomSurface ], [ ], [AC_MSG_ERROR("SDL_gfx library does not provide 'zoomSurface'" )])
  33. AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont ], [ ], [AC_MSG_ERROR("SDL_ttf library does not provide 'TTF_OpenFont'" )])
  34. AC_CHECK_LIB([SDL_ttf], [TTF_Init ], [ ], [AC_MSG_ERROR("SDL_ttf library does not provide 'TTF_Init'" )])
  35. AC_CHECK_LIB([SDL_ttf], [TTF_CloseFont ], [ ], [AC_MSG_ERROR("SDL_ttf library does not provide 'TTF_CloseFont'" )])
  36. AC_CHECK_LIB([SDL_ttf], [TTF_RenderText_Solid ], [ ], [AC_MSG_ERROR("SDL_ttf library does not provide 'TTF_RenderText_Solid'" )])
  37. AC_CHECK_LIB([X11], [XOpenDisplay ], [ ], [AC_MSG_ERROR("x11 library does not provide 'XOpenDisplay'" )])
  38. AC_CHECK_LIB([X11], [XGetWindowAttributes ], [ ], [AC_MSG_ERROR("x11 library does not provide 'XGetWindowAttributes'" )])
  39. AC_MSG_NOTICE(["Checking for header files."])
  40. AC_PATH_X
  41. AC_CHECK_HEADER([jack/jack.h], [ ], [AC_MSG_ERROR("missing jack headers" )])
  42. AC_CHECK_HEADER([SDL/SDL.h], [ ], [AC_MSG_ERROR("missing SDL headers" )])
  43. AC_CHECK_HEADER([SDL/SDL_gfxPrimitives.h], [ ], [AC_MSG_ERROR("missing SDL_gfx headers" )])
  44. AC_CHECK_HEADER([SDL/SDL_rotozoom.h], [ ], [AC_MSG_ERROR("missing SDL_gfx headers" )])
  45. AC_CHECK_HEADER([SDL/SDL_ttf.h], [ ], [AC_MSG_ERROR("missing SDL_ttf headers" )])
  46. AC_CHECK_HEADER([sys/stat.h], [ ], [AC_MSG_ERROR("missing stat header" )])
  47. AC_CHECK_HEADER([unistd.h], [ ], [AC_MSG_ERROR("missing unistd header" )])
  48. AC_CHECK_HEADER([X11/Xlib.h], [ ], [AC_MSG_ERROR("missing x11 headers" )])
  49. AC_CHECK_HEADER([cstdlib], [ ], [AC_MSG_ERROR("missing cstdlib headers" )])
  50. AC_CHECK_HEADER([exception], [ ], [AC_MSG_ERROR("missing exception headers")])
  51. AC_CHECK_HEADER([iostream], [ ], [AC_MSG_ERROR("missing iostream headers" )])
  52. AC_CHECK_HEADER([list], [ ], [AC_MSG_ERROR("missing list headers" )])
  53. AC_CHECK_HEADER([sstream], [ ], [AC_MSG_ERROR("missing sstream headers" )])
  54. AC_CHECK_HEADER([string], [ ], [AC_MSG_ERROR("missing string headers" )])
  55. AC_CHECK_HEADER([vector], [ ], [AC_MSG_ERROR("missing vector headers" )])
  56. AC_MSG_NOTICE(["Checking for pkg-config flags."])
  57. PKG_PROG_PKG_CONFIG([])
  58. PKG_CHECK_MODULES([JACK], [jack ])
  59. PKG_CHECK_MODULES([SDL], [sdl SDL_gfx SDL_ttf])
  60. PKG_CHECK_MODULES([X11], [x11 ])
  61. AC_MSG_NOTICE(["Checking for typedefs, structures, and compiler characteristics."])
  62. AC_TYPE_SIZE_T
  63. AC_MSG_NOTICE(["Checking for library functions."])
  64. AC_CHECK_FUNC([atexit], [ ], [AC_MSG_ERROR("C library does not provide 'atexit'")])
  65. AC_CHECK_FUNC([memset], [ ], [AC_MSG_ERROR("C library does not provide 'memset'")])
  66. AC_MSG_NOTICE(["Generating output files."])
  67. AC_OUTPUT