forked from highpower/uatraits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
159 lines (133 loc) · 4.07 KB
/
configure.in
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
AC_INIT([uatraits], [1.1.6], [highpower@yandex-team.ru])
AM_INIT_AUTOMAKE(1.9)
AC_GNU_SOURCE
AC_CONFIG_HEADERS(config/config.h)
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG([C++])
AC_PROG_LIBTOOL
AM_MAINTAINER_MODE
CPPFLAGS="$CPPFLAGS -pthread"
AX_PREFIX_CONFIG_H(config/acsetup.hpp)
for i in -W -Wall -Wextra -Wlint -fexceptions -frtti -ftemplate-depth-128; do
AX_CHECK_COMPILER_FLAGS([$i], [CXXFLAGS="$CXXFLAGS $i"], [])
done
AM_PATH_XML2([2.6.29], [], [AC_MSG_FAILURE([libxml2 is not found])])
PKG_CHECK_MODULES([crypto], [libcrypto], [], [AC_MSG_ERROR([libcrypto not found])])
LIBS="$LIBS $crypto_LIBS"
CPPFLAGS="$CPPFLAGS $crypto_CFLAGS"
ax_have_boost="yes"
ax_have_boost_python="yes"
ax_have_boost_thread="yes"
ax_have_boost_unit_test="yes"
AX_BOOST_PREFIX([], [ax_have_boost="no"])
AX_CHECK_PCRE([], [AC_MSG_FAILURE([pcre installation is not found])])
if test "f$ax_have_boost" = "fyes"; then
AM_PATH_PYTHON
AX_PYTHON_DEVEL
AX_BOOST_PYTHON([], [ax_have_boost_python="no"])
AX_BOOST_THREAD([], [ax_have_boost_thread="no"])
AX_BOOST_UNIT_TEST([], [ax_have_boost_unit_test="no"])
fi
ac_python_binding="smart"
AC_ARG_ENABLE(python,
AS_HELP_STRING(--enable-python, enable python binging compilation),
[
if test "f$enableval" = "fno"; then
ac_python_binding="no"
elif test "f$enableval" = "fyes" && test "f$ax_have_boost_python" != "fyes" ; then
AC_MSG_FAILURE([boost python isn't installed for python binding])
fi
])
if test "f$ac_python_binding" != "fno"; then
if test "f$ax_have_boost_python" = "fyes"; then
AC_MSG_NOTICE([python binding enabled])
ac_python_binding="yes"
else
AC_MSG_NOTICE([boost python isn't installed for python binding])
fi
fi
AM_CONDITIONAL(HAVE_PYTHON, [test "f$ac_python_binding" = "fyes"])
ac_perl_binding="yes"
AC_ARG_ENABLE(perl,
AS_HELP_STRING(--enable-perl, enable perl binging compilation),
[
if test "f$enableval" != "fyes"; then
ac_perl_binding="no"
fi
])
if test "f$ac_perl_binding" = "fyes"; then
AC_MSG_NOTICE([perl binding enabled])
else
AC_MSG_NOTICE([perl binding disabled])
fi
AM_CONDITIONAL(HAVE_PERL, [test "f$ac_perl_binding" = "fyes"])
ac_tests="smart"
AC_ARG_ENABLE(tests,
AS_HELP_STRING(--enable-tests, enable compiling tests),
[
if test "f$enableval" = "fno"; then
ac_tests="no"
elif test "f$enableval" = "fyes" && test "f$ax_have_boost_unit_test" != "fyes"; then
AC_MSG_FAILURE([boost unit test framework isn't installed for compiling tests])
fi
])
if test "f$ac_tests" != "fno"; then
if test "f$ax_have_boost_unit_test" = "fyes" -a "f$ax_have_boost_thread" = "fyes"; then
AC_MSG_NOTICE([compiling tests enabled])
ac_tests="yes"
else
AC_MSG_NOTICE([boost unit test framework isn't installed for compiling tests])
fi
fi
AM_CONDITIONAL(HAVE_BOOST_UNIT_TEST, [test "f$ac_tests" = "fyes"])
ac_java_binding="smart"
AC_ARG_ENABLE(java,
AS_HELP_STRING(--enable-java, enable java binging compilation),
[
if test "f$enableval" = "fyes"; then
ac_java_binding="yes"
else
ac_java_binding="no"
fi
])
if test "f$ac_java_binding" = "fyes"; then
AC_MSG_NOTICE([java binding enabled])
else
AC_MSG_NOTICE([java binding disabled])
fi
AM_CONDITIONAL(HAVE_JAVA, [test "f$ac_java_binding" = "fyes"])
ac_nodejs_binding="smart"
AC_ARG_ENABLE(nodejs,
AS_HELP_STRING(--enable-nodejs, enable nodejs binging compilation),
[
if test "f$enableval" = "fyes"; then
ac_nodejs_binding="yes"
else
ac_nodejs_binding="no"
fi
])
if test "f$ac_nodejs_binding" = "fyes"; then
AC_MSG_NOTICE([nodejs binding enabled])
else
AC_MSG_NOTICE([nodejs binding disabled])
fi
AM_CONDITIONAL(HAVE_NODEJS, [test "f$ac_nodejs_binding" = "fyes"])
AC_CONFIG_FILES([Makefile include/Makefile include/uatraits/Makefile
library/Makefile utils/Makefile data/Makefile])
if $HAVE_PERL; then
m4_default([AC_CONFIG_FILES([perl/Makefile.PL])])
fi
if $HAVE_PYTHON; then
m4_default([AC_CONFIG_FILES([python/Makefile])])
fi
if $HAVE_BOOST_UNIT_TEST; then
m4_default([AC_CONFIG_FILES([tests/Makefile])])
fi
if $HAVE_JAVA; then
m4_default([AC_CONFIG_FILES([java/Makefile])])
fi
if $HAVE_NODEJS; then
m4_default([AC_CONFIG_FILES([nodejs/Makefile])])
fi
AC_OUTPUT