forked from infinidb/infinidb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
266 lines (248 loc) · 8.09 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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# $Id$
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(infinidb, 4.6.1, [email protected])
### we don't want the deault CXXFLAGS set by AC_INIT, but we do want to allow the user to set them
SAVE_CXXFLAGS=
if test -n "$CXXFLAGS"; then
SAVE_CXXFLAGS="$CXXFLAGS"
fi
CXXFLAGS=
SAVE_CFLAGS=
if test -n "$CFLAGS"; then
SAVE_CFLAGS="$CFLAGS"
fi
CFLAGS=
## AC_CONFIG_SRCDIR([configcpp/configcpp.cpp])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
AC_PREFIX_DEFAULT([/usr/local])
AC_LANG_CPLUSPLUS
# Checks for programs.
AC_PROG_CC
if test -n "$SAVE_CFLAGS"; then
CFLAGS="$SAVE_CFLAGS"
else
CFLAGS=
fi
AC_PROG_CXX
if test -n "$SAVE_CXXFLAGS"; then
CXXFLAGS="$SAVE_CXXFLAGS"
else
CXXFLAGS=
fi
AC_ENABLE_STATIC([no])
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LEX
if test "x$LEX" = "x:"; then
AC_MSG_ERROR([Could not find a usable lex program!])
fi
AC_PROG_YACC
$YACC --version >/dev/null 2>&1
if test $? -ne 0; then
AC_MSG_ERROR([Could not find a usable yacc program!])
fi
AC_PROG_AWK
AC_PROG_CPP
AC_PROG_LN_S
AC_PROG_MAKE_SET
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/mount.h sys/socket.h sys/statfs.h sys/time.h sys/timeb.h syslog.h unistd.h utime.h values.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STAT
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_REPLACE_FNMATCH
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_MKTIME
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRERROR_R
AC_FUNC_STRFTIME
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS([alarm dup2 floor ftime ftruncate gethostbyname getpagesize gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir pow regcomp rmdir select setenv setlocale socket strcasecmp strchr strcspn strdup strerror strrchr strspn strstr strtol strtoul strtoull utime])
AM_PATH_XML2([2.6.26])
if test "x$XML_CPPFLAGS" = "x"; then
AC_MSG_ERROR([Could not find a usable libxml2 development environment!])
fi
AC_CHECK_HEADERS([zlib.h])
if test "x$ac_cv_header_zlib_h" != "xyes"; then
AC_MSG_ERROR([Could not find a usable zlib development environment!])
fi
AC_CHECK_HEADERS([readline/readline.h])
if test "x$ac_cv_header_readline_readline_h" != "xyes"; then
AC_MSG_ERROR([Could not find a usable readline development environment!])
fi
AC_CHECK_HEADERS([ncurses.h])
if test "x$ac_cv_header_ncurses_h" != "xyes"; then
AC_MSG_ERROR([Could not find a usable ncurses development environment!])
fi
CXX_FLAG_CHECK([-Wno-unused-local-typedefs])
CXX_FLAG_CHECK([-Wno-unused-result])
CXX_FLAG_CHECK([-Wno-format])
AC_MSG_CHECKING(whether to enable debugging)
AC_SUBST([idb_cppflags], [' '])
AC_ARG_WITH([debug],
AS_HELP_STRING([--with-debug],[include debugging symbols/no optimization]))
if test "x$with_debug" = "xyes"; then
AC_SUBST([idb_cxxflags],['-ggdb3 -Wall -DSAFE_MUTEX -DINFINIDB_DEBUG'])
AC_SUBST([idb_cflags],['-ggdb3 -Wall -DSAFE_MUTEX -DINFINIDB_DEBUG'])
AC_MSG_RESULT(yes)
else
AC_SUBST([idb_cxxflags],["-g0 -O3 -fno-strict-aliasing -Wall $cxx_extra_flags"])
AC_SUBST([idb_cflags],['-g0 -O3 -fno-strict-aliasing -Wall'])
AC_MSG_RESULT(no)
fi
AC_SUBST([idbinstall], ['${prefix}'])
AC_SUBST([idb_ldflags],['-Wl,--rpath -Wl,${idbinstall}/lib -Wl,--no-as-needed -Wl,--add-needed'])
AC_MSG_CHECKING(for CPU architecture)
uname=`uname -m`
AS_IF(
[test `expr $uname : 'i.86'` -gt 0], [AC_SUBST([march_flags], ['-march=pentium4'])] [AC_MSG_RESULT(pentium4)],
[AC_SUBST([march_flags], [' '])] [AC_MSG_RESULT(x86_64)]
)
AC_SUBST([libdir], ['${idbinstall}/lib'])
AC_SUBST([bindir], ['${idbinstall}/bin'])
AC_SUBST([includedir], ['${idbinstall}/include'])
AC_SUBST([etcdir], ['${idbinstall}/etc'])
AC_SUBST([sysconfdir], ['${idbinstall}/etc'])
AC_SUBST([mandir], ['${idbinstall}/man'])
AC_SUBST([sbindir], ['${idbinstall}/sbin'])
AC_SUBST([sharedir], ['${idbinstall}/share'])
AC_SUBST([postdir], ['${idbinstall}/post'])
AC_SUBST([localdir], ['${idbinstall}/local'])
AC_SUBST([mysqldir], ['${idbinstall}/mysql'])
AC_SUBST([mibdir], ['${idbinstall}/share/snmp/mibs'])
AC_SUBST([netsnmpdir], ['${idbinstall}/include/net-snmp'])
AC_SUBST([netsnmpsysdir], ['${idbinstall}/include/net-snmp/system'])
AC_SUBST([netsnmpmachdir], ['${idbinstall}/include/net-snmp/machine'])
AC_SUBST([netsnmplibrdir], ['${idbinstall}/include/net-snmp/library'])
AC_SUBST([netsnmpagntdir], ['${idbinstall}/include/net-snmp/agent'])
AC_SUBST([toolsdir], ['${idbinstall}/tools'])
AC_SUBST([netsnmp_libs], ['-lnetsnmpmibs -lnetsnmpagent -lnetsnmp -lnetsnmpmibs -lnetsnmphelpers'])
AC_SUBST([idb_common_libs], ['-lmessageqcpp -lloggingcpp -lconfigcpp -lidbboot -lboost_idb -lxml2 -lpthread -lrt'])
AC_SUBST([idb_oam_libs], ['-loamcpp -lsnmpmanager ${netsnmp_libs}'])
AC_SUBST([idb_brm_libs], ['-lbrm -lidbdatafile -lcacheutils -lrwlock ${idb_oam_libs} ${idb_common_libs}'])
AC_SUBST([idb_exec_libs], ['-ljoblist -lexecplan -lwindowfunction -ljoiner -lrowgroup -lfuncexp -ludfsdk -ldataconvert -lcommon -lcompress -lmysqlcl_idb -lquerystats -lquerytele -lthrift -lthreadpool ${idb_brm_libs}'])
AC_SUBST([idb_write_libs], ['-lddlpackageproc -lddlpackage -ldmlpackageproc -ldmlpackage -lwriteengine -lwriteengineclient -lidbdatafile -lcacheutils ${idb_exec_libs}'])
AC_SUBST([idb_common_includes], ['-I${idbinstall}/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include/libxml2'])
AC_SUBST([idb_common_ldflags], ['-L${idbinstall}/lib -L/usr/local/lib'])
AC_CONFIG_FILES([
Makefile
utils/Makefile
utils/boost_idb/Makefile
utils/startup/Makefile
utils/common/Makefile
utils/configcpp/Makefile
utils/loggingcpp/Makefile
utils/messageqcpp/Makefile
utils/threadpool/Makefile
utils/rwlock/Makefile
utils/dataconvert/Makefile
utils/joiner/Makefile
utils/rowgroup/Makefile
utils/cacheutils/Makefile
utils/net-snmp/Makefile
utils/funcexp/Makefile
utils/udfsdk/Makefile
utils/compress/Makefile
utils/ddlcleanup/Makefile
utils/batchloader/Makefile
utils/mysqlcl_idb/Makefile
utils/querystats/Makefile
utils/jemalloc/Makefile
utils/windowfunction/Makefile
utils/idbdatafile/Makefile
utils/idbhdfs/Makefile
utils/idbhdfs/hdfs-12/Makefile
utils/idbhdfs/hdfs-20/Makefile
utils/winport/Makefile
utils/thrift/Makefile
utils/querytele/Makefile
exemgr/Makefile
ddlproc/Makefile
dbcon/Makefile
dbcon/ddlpackage/Makefile
dbcon/ddlpackageproc/Makefile
dbcon/dmlpackage/Makefile
dbcon/dmlpackageproc/Makefile
dbcon/execplan/Makefile
dbcon/joblist/Makefile
dbcon/mysql/Makefile
dmlproc/Makefile
oam/Makefile
oam/etc/Makefile
oam/install_scripts/Makefile
oam/oamcpp/Makefile
oam/post/Makefile
oam/cloud/Makefile
oamapps/Makefile
oamapps/calpontConsole/Makefile
oamapps/calpontDB/Makefile
oamapps/postConfigure/Makefile
oamapps/serverMonitor/Makefile
oamapps/sessionWalker/Makefile
oamapps/traphandler/Makefile
oamapps/sendtrap/Makefile
oamapps/calpontSupport/Makefile
primitives/Makefile
primitives/blockcache/Makefile
primitives/linux-port/Makefile
primitives/primproc/Makefile
decomsvr/Makefile
procmgr/Makefile
procmon/Makefile
snmpd/Makefile
snmpd/etc/Makefile
snmpd/snmpmanager/Makefile
tools/Makefile
tools/editem/Makefile
tools/cplogger/Makefile
tools/clearShm/Makefile
tools/setConfig/Makefile
tools/getConfig/Makefile
tools/dbbuilder/Makefile
tools/dbloadxml/Makefile
tools/configMgt/Makefile
tools/viewtablelock/Makefile
tools/cleartablelock/Makefile
tools/ddlcleanup/Makefile
tools/idbmeminfo/Makefile
versioning/Makefile
versioning/BRM/Makefile
writeengine/Makefile
writeengine/shared/Makefile
writeengine/index/Makefile
writeengine/dictionary/Makefile
writeengine/wrapper/Makefile
writeengine/xml/Makefile
writeengine/bulk/Makefile
writeengine/client/Makefile
writeengine/splitter/Makefile
writeengine/server/Makefile
writeengine/redistribute/Makefile
net-snmp/Makefile
])
AC_OUTPUT