configure.ac 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. AC_INIT([godotapkfixer)], [1.0])
  2. AM_INIT_AUTOMAKE([-Wall -Werror foreign])
  3. AC_CONFIG_MACRO_DIRS([m4])
  4. AC_PROG_CC
  5. AC_PROG_CXX
  6. AC_CANONICAL_HOST
  7. AM_PROG_AR
  8. LT_INIT
  9. AX_CXX_COMPILE_STDCXX_11(, [mandatory])
  10. os_linux=no
  11. os_windows=no
  12. os_mac=no
  13. # Detect the target system
  14. case "${host_os}" in
  15. linux*)
  16. os_linux=yes
  17. ;;
  18. cygwin*|mingw*)
  19. os_windows=yes
  20. ;;
  21. darwin*)
  22. os_mac=yes
  23. ;;
  24. *)
  25. AC_MSG_ERROR(["OS $host_os is not supported"])
  26. ;;
  27. esac
  28. AC_ARG_ENABLE([static-binary],
  29. AS_HELP_STRING([--enable-static-binary], [enable static build]),
  30. [
  31. EXTRA_LDFLAGS="-all-static"
  32. AX_CHECK_LINK_FLAG([-static-libgcc], [EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -static-libgcc"])
  33. AX_CHECK_LINK_FLAG([-static-libstdc++], [EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -static-libstdc++"])
  34. ])
  35. AC_SUBST(EXTRA_LDFLAGS)
  36. AM_CONDITIONAL([LINUX], [test "$os_linux" = "yes"])
  37. AM_CONDITIONAL([WINDOWS], [test "$os_windows" = "yes"])
  38. AM_CONDITIONAL([OSX], [test "$os_mac" = "yes"])
  39. AC_CONFIG_FILES([
  40. Makefile
  41. ])
  42. AC_OUTPUT