configure.ac 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #*****************************************************************************
  2. # Copyright (c), Recep Aslantas. *
  3. # *
  4. # MIT License (MIT), http://opensource.org/licenses/MIT *
  5. # Full license can be found in the LICENSE file *
  6. # *
  7. #*****************************************************************************
  8. AC_PREREQ([2.69])
  9. AC_INIT([cglm], [0.8.5], [[email protected]])
  10. AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects serial-tests])
  11. # Don't use the default cflags (-O2 -g), we set ours manually in Makefile.am.
  12. : ${CFLAGS=""}
  13. AC_CONFIG_MACRO_DIR([m4])
  14. AC_CONFIG_SRCDIR([src/])
  15. AC_CONFIG_HEADERS([config.h])
  16. # Dependencies for pkg-config.
  17. PKG_PROG_PKG_CONFIG
  18. # Ancient versions of pkg-config (such as the one used in Travis CI)
  19. # don't have this macro, so we need to do it manually.
  20. m4_ifdef([PKG_INSTALLDIR], [
  21. PKG_INSTALLDIR
  22. ], [
  23. AC_ARG_WITH([pkgconfigdir],
  24. [AS_HELP_STRING([--with-pkgconfigdir],
  25. [pkg-config installation directory ['${libdir}/pkgconfig']])],,
  26. [with_pkgconfigdir=]'${libdir}/pkgconfig')
  27. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  28. ])
  29. # Checks for programs.
  30. AC_PROG_CC
  31. AM_PROG_CC_C_O
  32. AC_PROG_INSTALL
  33. AM_PROG_AR
  34. AC_ENABLE_SHARED
  35. AC_ENABLE_STATIC
  36. LT_INIT
  37. # Checks for libraries.
  38. AC_CHECK_LIB([m], [floor])
  39. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  40. AC_SYS_LARGEFILE
  41. # Checks for header files.
  42. AC_CHECK_HEADERS([limits.h \
  43. stddef.h \
  44. stdint.h \
  45. stdlib.h \
  46. string.h ])
  47. # Checks for typedefs, structures, and compiler characteristics.
  48. AC_CHECK_HEADER_STDBOOL
  49. AC_C_INLINE
  50. AC_TYPE_INT32_T
  51. AC_TYPE_INT64_T
  52. AC_TYPE_SIZE_T
  53. AC_TYPE_UINT16_T
  54. AC_TYPE_UINT32_T
  55. AC_TYPE_UINT64_T
  56. AC_TYPE_UINT8_T
  57. # Checks for library functions.
  58. AC_FUNC_ERROR_AT_LINE
  59. AC_CONFIG_FILES([Makefile cglm.pc])
  60. AC_OUTPUT