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