configure.ac 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.69])
  4. AC_INIT(eacsmb, 1.0, no@spam.com)
  5. AM_INIT_AUTOMAKE([-Werror foreign subdir-objects])
  6. AC_CONFIG_SRCDIR([config.h.in])
  7. AC_CONFIG_HEADERS([config.h])
  8. # Checks for programs.
  9. AC_PROG_CC
  10. AC_MSG_NOTICE([Scanning for mods...])
  11. ./scanMods.sh
  12. AC_MSG_NOTICE([...mod scan complete])
  13. # Checks for required libraries.
  14. AC_CHECK_LIB([GL], [glFlush])
  15. AC_CHECK_LIB([GLEW], [glewInit])
  16. AC_CHECK_LIB([GLU], [gluCheckExtension])
  17. AC_CHECK_LIB([X11], [XOpenDisplay])
  18. AC_CHECK_LIB([freetype], [FT_Init_FreeType])
  19. AC_CHECK_LIB([fontconfig], [FcInitLoadConfigAndFonts])
  20. AC_CHECK_LIB([m], [sin])
  21. # Checks for header files.
  22. AC_PATH_X
  23. AC_CHECK_HEADERS([ \
  24. X11/X.h \
  25. X11/Xlib.h \
  26. X11/keysym.h \
  27. alloca.h \
  28. ctype.h \
  29. dirent.h \
  30. errno.h \
  31. fontconfig/fontconfig.h \
  32. ft2build.h \
  33. libgen.h \
  34. limits.h \
  35. malloc.h \
  36. math.h \
  37. png.h \
  38. pthread.h \
  39. setjmp.h \
  40. stdatomic.h \
  41. stddef.h \
  42. stdint.h \
  43. stdio.h \
  44. stdlib.h \
  45. string.h \
  46. strings.h \
  47. sys/sysinfo.h \
  48. time.h \
  49. unistd.h \
  50. ])
  51. # alsa/asoundlib.h \
  52. # vorbis/codec.h \
  53. # vorbis/vorbisfile.h \
  54. # jpeglib.h \
  55. #AC_CHECK_FUNCS( memset \
  56. # snprintf \
  57. # sqrt strcasecmp strcasestr strchr strstr strtol strtoul)
  58. #
  59. # Check for optional dependencies
  60. #
  61. AC_MSG_CHECKING([for ALSA support])
  62. AC_ARG_ENABLE(
  63. alsa,
  64. [ --enable-alsa ALSA support ([default=yes])],
  65. if test x$enableval = "xyes"; then
  66. AC_MSG_RESULT([yes])
  67. AC_CHECK_LIB([asound], [snd_pcm_open],
  68. AC_DEFINE(HAVE_ALSA, 1, "ALSA support")
  69. LIBS="$LIBS -lasound")
  70. else
  71. AC_MSG_RESULT([no])
  72. fi,
  73. AC_MSG_RESULT([yes])
  74. AC_CHECK_LIB([asound], [snd_pcm_open],
  75. AC_DEFINE(HAVE_ALSA, 1, "ALSA support")
  76. LIBS="$LIBS -lasound")
  77. )
  78. AC_MSG_CHECKING([for OGG/Vorbis support])
  79. AC_ARG_ENABLE(
  80. vorbis,
  81. [ --enable-vorbis OGG/Vorbis support ([default=yes])],
  82. if test x$enableval = "xyes"; then
  83. AC_MSG_RESULT([yes])
  84. AC_CHECK_LIB([vorbisfile], [ov_fopen],
  85. AC_DEFINE(HAVE_VORBIS, 1, "libVorbis support")
  86. LIBS="$LIBS -lvorbis")
  87. else
  88. AC_MSG_RESULT([no])
  89. fi,
  90. AC_MSG_RESULT([yes])
  91. AC_CHECK_LIB([vorbisfile], [ov_fopen],
  92. AC_DEFINE(HAVE_VORBIS, 1, "libVorbis support")
  93. LIBS="$LIBS -lvorbisfile")
  94. )
  95. AC_MSG_CHECKING([for libJPEG support])
  96. AC_ARG_ENABLE(
  97. jpeg,
  98. [ --enable-jpeg libJPEG ([default=yes])],
  99. if test x$enableval = "xyes"; then
  100. AC_MSG_RESULT([yes])
  101. AC_CHECK_LIB([jpeg], [jpeg_set_defaults],
  102. AC_DEFINE(HAVE_JPEG, 1, "libJPEG support")
  103. LIBS="$LIBS -ljpeg")
  104. else
  105. AC_MSG_RESULT([no])
  106. fi,
  107. AC_MSG_RESULT([yes])
  108. AC_CHECK_LIB([jpeg], [jpeg_set_defaults],
  109. AC_DEFINE(HAVE_JPEG, 1, "libJPEG support")
  110. LIBS="$LIBS -ljpeg")
  111. )
  112. AC_CONFIG_FILES([Makefile
  113. src/Makefile])
  114. AC_OUTPUT