1
0

configure.ac 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. AC_INIT([libopenmpt-modplug], [0.8.9.0-openmpt1], [https://bugs.openmpt.org/], [libopenmpt-modplug], [https://lib.openmpt.org/])
  2. AC_PREREQ([2.68])
  3. AC_CONFIG_MACRO_DIR([m4])
  4. AC_CONFIG_HEADERS([config.h])
  5. AC_CONFIG_AUX_DIR([build-aux])
  6. AC_CONFIG_FILES([Makefile libopenmpt_modplug.pc libmodplug.pc])
  7. AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign subdir-objects])
  8. AM_PROG_AR
  9. LT_INIT
  10. AC_SYS_LARGEFILE
  11. PKG_PROG_PKG_CONFIG([0.24])
  12. AC_PROG_CC
  13. AM_PROG_CC_C_O
  14. AC_PROG_CXX
  15. AC_PROG_INSTALL
  16. LIBOPENMPT_REQUIRES_PRIVATE=
  17. LIBOPENMPT_LIBS_PRIVATE=
  18. # We want a modern C compiler
  19. AC_PROG_CC_STDC
  20. #AC_PROG_CC_C99
  21. # We need C++11 support
  22. AX_CXX_COMPILE_STDCXX(17, [noext], [optional])
  23. AS_IF([test "x$HAVE_CXX17" != "x1"],
  24. [
  25. AX_CXX_COMPILE_STDCXX(14, [noext], [optional])
  26. AS_IF([test "x$HAVE_CXX14" != "x1"],
  27. [
  28. AX_CXX_COMPILE_STDCXX(11, [noext], [mandatory])
  29. ],[]
  30. )
  31. ],[]
  32. )
  33. AC_LANG_PUSH([C])
  34. AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CFLAGS="$CFLAGS -fvisibility=hidden -DSYM_VISIBILITY"])
  35. AX_CFLAGS_WARN_ALL
  36. AC_LANG_POP([C])
  37. AC_LANG_PUSH([C++])
  38. AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CXXFLAGS="$CXXFLAGS -fvisibility=hidden -DSYM_VISIBILITY"])
  39. AX_CXXFLAGS_WARN_ALL
  40. AC_LANG_POP([C++])
  41. PKG_CHECK_MODULES([LIBOPENMPT], [libopenmpt])
  42. # libmodplug emulation
  43. AC_ARG_ENABLE([libopenmpt_modplug], AS_HELP_STRING([--disable-libopenmpt_modplug], [Disable the libopenmpt_modplug emulation library of the libmodplug interface.]))
  44. AM_CONDITIONAL([ENABLE_LIBOPENMPT_MODPLUG], [test "x$enable_libopenmpt_modplug" != "xno"])
  45. # libmodplug replacement
  46. AC_ARG_ENABLE([libmodplug], AS_HELP_STRING([--enable-libmodplug], [Enable libmodplug replacement library based on libopenmpt.
  47. WARNING: This will replace your current libmodplug installation.
  48. CAUTION: The emulation of the libmodplug interface is not complete as libmodplug exposes lots of internal implementation details. If any of those is used by an application, the emulation via libopenmpt will fail and/or crash.
  49. ]))
  50. AM_CONDITIONAL([ENABLE_LIBMODPLUG], [test "x$enable_libmodplug" = "xyes"])
  51. AC_OUTPUT