PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/configure.ac

http://github.com/mozy/mordor
m4 | 110 lines | 93 code | 10 blank | 7 comment | 0 complexity | 88e293b8f86bd2cb9295bd973caa3112 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.61)
  4. AC_INIT([libmordor],[1.3.0])
  5. AM_INIT_AUTOMAKE([foreign])
  6. LT_INIT
  7. AC_CONFIG_SRCDIR([mordor/fiber.cpp])
  8. AC_CONFIG_HEADERS([autoconfig.h])
  9. AC_CONFIG_MACRO_DIR([m4])
  10. AC_SUBST([LIBMORDOR_SO_VERSION], [1:0:0])
  11. AC_SUBST([LIBMORDOR_API_VERSION], [1])
  12. # Checks for programs.
  13. AC_PROG_CXX
  14. AC_PROG_AWK
  15. AC_PROG_CC
  16. AC_PROG_CPP
  17. AC_PROG_INSTALL
  18. AC_PROG_LN_S
  19. AC_PROG_MAKE_SET
  20. CHECK_RAGEL([mordor/uri.cpp], [6.0])
  21. AC_CHECK_PROG([PROTOC], [protoc], [protoc])
  22. # Checks for libraries.
  23. AC_SEARCH_LIBS([pthread_create], [pthread])
  24. AC_SEARCH_LIBS([clock_gettime], [rt])
  25. AC_SEARCH_LIBS([backtrace], [execinfo])
  26. AC_CHECK_VALGRIND
  27. AM_ICONV
  28. AX_CHECK_OPENSSL
  29. AX_CHECK_ZLIB
  30. AX_CHECK_LZMA
  31. AX_BOOST_BASE([1.40],, [AC_ERROR([Missing boost headers (1.40+)])])
  32. AX_BOOST_PROGRAM_OPTIONS
  33. AX_BOOST_REGEX
  34. AX_BOOST_SYSTEM
  35. AX_BOOST_THREAD
  36. AX_CHECK_CORESERVICES_FRAMEWORK
  37. AX_CHECK_COREFOUNDATION_FRAMEWORK
  38. AX_CHECK_SECURITY_FRAMEWORK
  39. AX_CHECK_SYSTEMCONFIGURATION_FRAMEWORK
  40. AX_LIB_POSTGRESQL
  41. AM_CONDITIONAL([HAVE_BOOST_PROGRAM_OPTIONS], [test "x${BOOST_PROGRAM_OPTIONS_LIB}" != x])
  42. AM_CONDITIONAL([HAVE_POSTGRESQL], [test "x${POSTGRESQL_VERSION}" != x])
  43. AC_ARG_WITH(yaml,
  44. [AS_HELP_STRING([--with-yaml=[[ARG]]],
  45. [Enable YAML parsing support @<:@default=check@:>@])],
  46. [],
  47. [with_yaml=check])
  48. LIBYAML=
  49. AS_IF([test "x$with_yaml" != xno],
  50. [AC_CHECK_LIB([yaml], [yaml_parser_initialize],
  51. [AC_SUBST([LIBYAML], ["-lyaml"])
  52. AC_DEFINE([HAVE_LIBYAML], [1],
  53. [Define if you have libyaml])
  54. AM_CONDITIONAL([HAVE_LIBYAML], true)
  55. ],
  56. [AM_CONDITIONAL([HAVE_LIBYAML], false)
  57. if test "x$with_yaml" != xcheck; then
  58. AC_MSG_FAILURE(
  59. [--with-yaml was given, but test for libyaml failed])
  60. fi
  61. ])],
  62. [AM_CONDITIONAL([HAVE_LIBYAML], false)])
  63. AC_ARG_WITH([protobuf],
  64. AS_HELP_STRING([--with-protobuf],
  65. [Enable Protobuf parsing and serialization support @<:@default=check@:>@])],
  66. [],
  67. [with_protobuf=check])
  68. AS_IF([test "x$with_protobuf" = xyes],
  69. [PKG_CHECK_MODULES([PROTOBUF], [protobuf])],
  70. [test "x$with_protobuf" = xcheck],
  71. [PKG_CHECK_MODULES([PROTOBUF], [protobuf], [], [true])])
  72. AM_CONDITIONAL([HAVE_PROTOBUF], [test "x${PROTOBUF_CFLAGS}" != x])
  73. # Checks for header files.
  74. AC_CHECK_HEADERS([fcntl.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h sys/time.h syslog.h])
  75. # Checks for typedefs, structures, and compiler characteristics.
  76. AC_HEADER_ASSERT
  77. AC_HEADER_STDBOOL
  78. AC_C_INLINE
  79. AC_TYPE_INT32_T
  80. AC_TYPE_INT64_T
  81. AC_TYPE_PID_T
  82. AC_TYPE_SIZE_T
  83. AC_TYPE_UINT16_T
  84. AC_TYPE_UINT32_T
  85. AC_TYPE_UINT64_T
  86. AC_CHECK_TYPES([ptrdiff_t])
  87. # Checks for library functions.
  88. AC_FUNC_ERROR_AT_LINE
  89. AC_HEADER_MAJOR
  90. AC_FUNC_MMAP
  91. AC_FUNC_STRTOD
  92. AC_CHECK_FUNCS([clock_gettime ftruncate memchr memmove memset munmap rmdir socket strchr strstr strtoull])
  93. AC_SUBST([pic_flag])
  94. AC_CONFIG_FILES([Makefile
  95. mordor/libmordor.pc
  96. mordor/libmordorprotobuf.pc
  97. mordor/libmordoryaml.pc
  98. mordor/pq/libmordorpq.pc
  99. mordor/test/libmordortest.pc])
  100. AC_OUTPUT