forked from eventql/eventql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
95 lines (83 loc) · 3.18 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
## Process this file with autoconf to produce configure.
## In general, the safest way to proceed is to run ./autogen.sh
AC_PREREQ(2.59)
AC_INIT([EventQL],[0.5.0],[[email protected]],[eventql])
AM_INIT_AUTOMAKE([foreign subdir-objects serial-tests])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_SRCDIR([configure.ac])
AM_SILENT_RULES([yes])
# --enable-mysql_tools
AC_MSG_CHECKING([Feature: MySQL Tools])
AC_ARG_ENABLE([mysql-tools], AS_HELP_STRING([--enable-mysql-tools], [Enable mysql tools]))
AM_CONDITIONAL([ENABLE_MYSQL_TOOLS], [test "x$enable_mysql_tools" = "xyes"])
AC_SUBST(ENABLE_MYSQL_TOOLS)
if test "x$enable_mysql_tools" = "xyes"; then
AC_MSG_RESULT(["enabled"])
else
AC_MSG_RESULT(["disabled"])
fi
# --enable-embedded-server
AC_MSG_CHECKING([Feature: Build Embedded Server: libevql_server.a])
AC_ARG_ENABLE([embedded-server], AS_HELP_STRING([--enable-embedded-server], [Enable embedded server]))
AM_CONDITIONAL([ENABLE_EMBEDDED_SERVER], [test "x$enable_embedded_server" = "xyes"])
AC_SUBST(ENABLE_EMBEDDED_SERVER)
if test "x$enable_embedded_server" = "xyes"; then
AC_MSG_RESULT(["enabled"])
else
AC_MSG_RESULT(["disabled"])
fi
# Check for build env
AC_PROG_CC
AC_PROG_CC_FOR_BUILD
AC_PROG_CXX
AC_PROG_CXX_FOR_BUILD
AM_PROG_AS
LT_INIT
# Check for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h syslog.h])
AM_CONDITIONAL([HAVE_SYSLOG_H], [test $HAVE_SYSLOG_H = 1])
# Check for library functions
AC_FUNC_MEMCMP
AC_FUNC_STRTOD
AC_CHECK_FUNCS([ftruncate memset mkdir strchr strerror strtol gethostbyname_r])
AM_CONDITIONAL([HAVE_GETHOSTBYNAME_R], [test $HAVE_GETHOSTBYNAME_R = 1])
# Check for zlib
HAVE_ZLIB=0
AS_IF([test "$with_zlib" != no], [
AC_MSG_CHECKING([zlib version])
# First check the zlib header version
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <zlib.h>
#if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1204)
# error zlib version too old
#endif
]], [])], [
AC_MSG_RESULT([ok (1.2.0.4 or later)])
# Also need to add -lz to the linker flags and make sure this succeeds.
AC_SEARCH_LIBS([zlibVersion], [z], [
AC_DEFINE([HAVE_ZLIB], [1], [Enable classes using zlib compression.])
HAVE_ZLIB=1
], [
AS_IF([test "$with_zlib" != check], [
AC_MSG_FAILURE([--with-zlib was given, but no working zlib library was found])
])
])
], [
AS_IF([test "$with_zlib" = check], [
AC_MSG_RESULT([headers missing or too old (requires 1.2.0.4)])
], [
AC_MSG_FAILURE([--with-zlib was given, but zlib headers were not present or were too old (requires 1.2.0.4)])
])
])
])
AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
# Check for pthread
ACX_PTHREAD
AM_CONDITIONAL([HAVE_PTHREAD], [test "x$acx_pthread_ok" = "xyes"])
# Pipe through mozjs cxx flags
AC_SUBST(MOZJS_CXXFLAGS)
AC_SUBST(EVQL_BUILDID)
AC_CONFIG_FILES([Makefile src/Makefile test/Makefile deps/Makefile deps/3rdparty/protobuf/Makefile deps/3rdparty/linenoise/Makefile deps/3rdparty/libsimdcomp/Makefile deps/3rdparty/liblmdb/Makefile deps/3rdparty/spidermonkey/Makefile deps/3rdparty/zookeeper/Makefile deps/3rdparty/inih/Makefile build/osxpkg/distribution.xml build/osxpkg/package_info.xml])
AC_OUTPUT