/
configure.ac
83 lines (71 loc) · 1.82 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([waste], [0.1.1])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([lib/cpp/src/RabbitMqAmqpImpl.h])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_AWK
AC_PROG_MKDIR_P
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
# Checks for necessary libraries
AX_BOOST_BASE([1.40.0])
AX_THRIFT([])
AX_RABBITMQ_C([])
# Checks for erlang
AC_MSG_CHECKING(for erlang)
found_erlang=no
check_erlang() {
if test "$found_erlang" = "yes"
then
return
fi
AC_ERLANG_PATH_ERL
AC_ERLANG_PATH_ERLC
if test -n "$ERLC" ; then
AC_ERLANG_SUBST_LIB_DIR
# Install into the detected Erlang directory instead of $libdir/erlang/lib
ERLANG_INSTALL_LIB_DIR="$ERLANG_LIB_DIR"
AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
fi
if test -n "$ERL" -a -n "$ERLC" ; then
found_erlang="yes"
AC_MSG_RESULT($ERL)
fi
}
check_erlang
if test "$found_erlang" = "no"
then
AC_MSG_ERROR(could not find erlang)
fi
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h syslog.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([strerror])
AC_CONFIG_FILES([Makefile
deps/Makefile
lib/Makefile
lib/cpp/Makefile
lib/erl/Makefile
test/Makefile
test/cpp/Makefile
test/erl/Makefile])
AC_OUTPUT