Commit | Line | Data |
---|---|---|
8e76f8aa | 1 | # $Id$ |
d16cf8a5 | 2 | # |
ef0c727b VK |
3 | # NetXMS - Network Management System |
4 | # Configure script | |
d16cf8a5 AK |
5 | # |
6 | ||
467c489f | 7 | AC_INIT([NetXMS], [1.1.0], [NetXMS Team <bugs@netxms.org>]) |
ba1d810c AK |
8 | AC_CONFIG_AUX_DIR(config) |
9 | AM_CONFIG_HEADER(config.h) | |
d16cf8a5 AK |
10 | AM_INIT_AUTOMAKE |
11 | ||
aa24418a | 12 | AC_CONFIG_MACRO_DIR([m4]) |
5387ff75 | 13 | |
ef0c727b VK |
14 | #-------------------------------------------------------------------- |
15 | # Functions | |
16 | #-------------------------------------------------------------------- | |
5387ff75 | 17 | |
ef0c727b VK |
18 | check_substr() |
19 | { | |
1010cff7 | 20 | for w in $1; do |
ef0c727b VK |
21 | if test "x$w" = "x$2"; then |
22 | return 0; | |
23 | fi | |
24 | done | |
25 | return 1 | |
26 | } | |
16dff090 | 27 | |
d3c8926d | 28 | |
ef0c727b VK |
29 | #-------------------------------------------------------------------- |
30 | # Initialize variables | |
31 | #-------------------------------------------------------------------- | |
d3c8926d | 32 | |
ef0c727b VK |
33 | PLATFORM=`uname -s` |
34 | COMPONENTS="" | |
35 | DISABLE_ICONV="no" | |
36 | DISABLE_ENCRYPTION="no" | |
37 | ENABLE_UNSTABLE="no" | |
f974a50a | 38 | ENABLE_DEBUG="no" |
ef0c727b VK |
39 | STATIC_BUILD="no" |
40 | DBDRIVER_SELECTED="no" | |
41 | USE_PTH="no" | |
42 | BUILD_SERVER="no" | |
43 | BUILD_AGENT="no" | |
44 | BUILD_CLIENT="no" | |
45 | BUILD_NXHTTPD="no" | |
46 | BUILD_STATIC_AGENT="no" | |
47 | NEED_ZLIB="no" | |
d99ee887 | 48 | NEED_WXWIDGETS="no" |
f65df2b1 | 49 | MODULES="libnetxms tools install" |
ef0c727b VK |
50 | STATIC_SUBAGENT_LIST="" |
51 | SUBAGENT_DIRS="" | |
52 | SUBAGENT_LIBS="" | |
53 | UNSTABLE_SUBAGENT_DIRS="" | |
54 | SERVER_TOOLS="" | |
55 | TOP_LEVEL_MODULES="" | |
56 | CONTRIB_MODULES="" | |
c2612d83 | 57 | CLIENT_COMPONENTS="" |
8b86c5dc | 58 | BUILD_UNICODE="no" |
273da39a | 59 | WX_UNICODE="no" |
7d8c91ef | 60 | ORACLE_LIBS="" |
6fce76d8 VK |
61 | PGSQL_LIBS="" |
62 | MYSQL_LIBS="" | |
63 | ODBC_LIBS="" | |
467c489f | 64 | FORCE_INTERNAL_EXPAT="no" |
cc297a70 | 65 | FORCE_32BIT_BUILD="no" |
d3c8926d | 66 | |
16dff090 | 67 | |
fecf6a2b VK |
68 | #-------------------------------------------------------------------- |
69 | # Common compilation flags | |
70 | #-------------------------------------------------------------------- | |
71 | ||
72 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" | |
73 | ||
74 | ||
ef0c727b VK |
75 | #-------------------------------------------------------------------- |
76 | # Parse command line parameters | |
77 | #-------------------------------------------------------------------- | |
7c9c94a7 | 78 | |
ef0c727b VK |
79 | AC_ARG_WITH(server, |
80 | [AS_HELP_STRING(--with-server,build server)], | |
81 | [ | |
8817f620 | 82 | COMPONENTS="$COMPONENTS sqlite snmp server agent" |
c5c0f362 VK |
83 | ]) |
84 | ||
85 | AC_ARG_WITH(snmp, | |
86 | [AS_HELP_STRING(--with-snmp,build SNMP library and tools)], | |
87 | [ | |
88 | COMPONENTS="$COMPONENTS snmp" | |
ef0c727b | 89 | ]) |
7c9c94a7 | 90 | |
ef0c727b VK |
91 | AC_ARG_WITH(client, |
92 | [AS_HELP_STRING(--with-client,build client library and tools)], | |
93 | [ | |
94 | COMPONENTS="$COMPONENTS client" | |
95 | ]) | |
d16cf8a5 | 96 | |
ef0c727b VK |
97 | AC_ARG_WITH(agent, |
98 | [AS_HELP_STRING(--with-agent,build agent)], | |
99 | [ | |
8817f620 | 100 | COMPONENTS="$COMPONENTS sqlite agent" |
ef0c727b | 101 | ]) |
d16cf8a5 | 102 | |
ef0c727b VK |
103 | AC_ARG_WITH(static-agent, |
104 | [AS_HELP_STRING(--with-static-agent,build statically linked agent)], | |
105 | [ | |
8817f620 | 106 | COMPONENTS="$COMPONENTS sqlite static-agent" |
ef0c727b | 107 | ]) |
d16cf8a5 | 108 | |
ef0c727b VK |
109 | AC_ARG_WITH(ipso-agent, |
110 | [AS_HELP_STRING(--with-ipso-agent,build statically linked IPSO agent)], | |
111 | [ | |
8817f620 | 112 | COMPONENTS="$COMPONENTS sqlite ipso-agent" |
ef0c727b | 113 | ]) |
521d90e7 | 114 | |
e02b69b9 VK |
115 | AC_ARG_WITH(webui, |
116 | [AS_HELP_STRING(--with-webui,build web interface)], | |
ef0c727b | 117 | [ |
e02b69b9 | 118 | COMPONENTS="$COMPONENTS webui" |
ef0c727b | 119 | ]) |
d16cf8a5 | 120 | |
ef0c727b VK |
121 | AC_ARG_WITH(mdebug, |
122 | [AS_HELP_STRING(--with-mdebug,use debug version of memory allocation functions)], | |
123 | [ | |
124 | CPPFLAGS="$CPPFLAGS -DNETXMS_MEMORY_DEBUG" | |
125 | ]) | |
d16cf8a5 | 126 | |
467c489f VK |
127 | AC_ARG_WITH(internal-libexpat, |
128 | [AS_HELP_STRING(--with-internal-libexpat,force use of bundled libexpat)], | |
129 | [ | |
130 | FORCE_INTERNAL_EXPAT="yes" | |
131 | ]) | |
132 | ||
9486b324 VK |
133 | AC_ARG_WITH(sqlite, |
134 | [AS_HELP_STRING(--with-sqlite,build SQLite database driver)], | |
135 | [ if test "x$withval" != "xno" ; then | |
8817f620 | 136 | COMPONENTS="$COMPONENTS sqlite_drv" |
ef0c727b | 137 | DBDRIVER_SELECTED="yes" |
9486b324 VK |
138 | fi ]) |
139 | ||
c4b88c3d VK |
140 | AC_ARG_WITH(odbc, |
141 | [AS_HELP_STRING(--with-odbc,build ODBC database driver)], | |
142 | [ if test "x$withval" != "xno" ; then | |
143 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
144 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
145 | LDFLAGS="$LDFLAGS -L${withval}/lib" | |
146 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
ef0c727b VK |
147 | fi |
148 | COMPONENTS="$COMPONENTS odbc" | |
149 | DBDRIVER_SELECTED="yes" | |
c4b88c3d VK |
150 | fi ]) |
151 | ||
41b4790d VK |
152 | AC_ARG_WITH(oracle, |
153 | [AS_HELP_STRING(--with-oracle,build Oracle database driver)], | |
154 | [ if test "x$withval" != "xno" ; then | |
155 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
7d8c91ef VK |
156 | if test -x "$withval/lib" ; then |
157 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
158 | LDFLAGS="$LDFLAGS -L${withval}/lib" | |
159 | else | |
160 | LD_RUN_PATH="${withval}${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
161 | LDFLAGS="$LDFLAGS -L${withval}" | |
162 | fi | |
163 | if test -x "$withval/include" ; then | |
164 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
165 | fi | |
166 | if test -x "$withval/sdk/include" ; then | |
167 | CPPFLAGS="$CPPFLAGS -I${withval}/sdk/include" | |
168 | fi | |
41b4790d VK |
169 | fi |
170 | COMPONENTS="$COMPONENTS oracle" | |
171 | DBDRIVER_SELECTED="yes" | |
172 | fi ]) | |
173 | ||
d16cf8a5 | 174 | AC_ARG_WITH(mysql, |
c4b88c3d | 175 | [AS_HELP_STRING(--with-mysql,build MySQL database driver)], |
d16cf8a5 AK |
176 | [ if test "x$withval" != "xno" ; then |
177 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
178 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
179 | LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib" | |
6693a1d0 | 180 | CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include" |
d16cf8a5 | 181 | else |
007ae516 VK |
182 | LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:/usr/lib64/mysql:/usr/lib/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}" |
183 | LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -L/usr/lib64/mysql -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" | |
6693a1d0 | 184 | CPPFLAGS="$CPPFLAGS -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql" |
d16cf8a5 | 185 | fi |
ef0c727b VK |
186 | COMPONENTS="$COMPONENTS mysql" |
187 | DBDRIVER_SELECTED="yes" | |
6693a1d0 | 188 | fi ]) |
d16cf8a5 AK |
189 | |
190 | AC_ARG_WITH(pgsql, | |
c4b88c3d | 191 | [AS_HELP_STRING(--with-pgsql,build PostgreSQL database driver)], |
d16cf8a5 | 192 | [ if test "x$withval" != "xno" ; then |
6693a1d0 AK |
193 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then |
194 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
195 | LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/pgsql -L${withval}/lib/postgresql -L${withval}/pgsql/lib -L${withval}/postgresql/lib" | |
196 | CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/pgsql -I${withval}/include/postgresql -I${withval}/pgsql/include -I${withval}/postgresql/include" | |
197 | else | |
007ae516 VK |
198 | LD_RUN_PATH="/usr/local/pgsql/lib:/usr/local/pgsql/lib/pgsql:/usr/lib64/pgsql:/usr/lib/pgsql:/usr/pgsql/lib:/usr/pgsql/lib/pgsql:/usr/local/lib/pgsql:/usr/local/postgresql/lib:/usr/local/postgresql/lib/postgresql:/usr/lib/postgresql:/usr/postgresql/lib:/usr/postgresql/lib/postgresql:/usr/local/lib/postgresql:${LD_RUN_PATH:+:}${LD_RUN_PATH}" |
199 | LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib -L/usr/lib64/pgsql -L/usr/lib/pgsql -L/usr/pgsql/lib -L/usr/local/lib/pgsql -L/usr/local/pgsql/lib/pgsql -L/usr/pgsql/lib/pgsql -L/usr/local/postgresql/lib -L/usr/lib/postgresql -L/usr/postgresql/lib -L/usr/local/lib/postgresql -L/usr/local/postgresql/lib/postgresql -L/usr/postgresql/lib/postgresql" | |
6693a1d0 AK |
200 | CPPFLAGS="$CPPFLAGS -I/usr/local/pgsql/include -I/usr/include/pgsql -I/usr/pgsql/include -I/usr/local/include/pgsql -I/usr/local/pgsql/include/pgsql -I/usr/pgsql/include/pgsql -I/usr/local/postgresql/include -I/usr/include/postgresql -I/usr/postgresql/include -I/usr/local/include/postgresql -I/usr/local/postgresql/include/postgresql -I/usr/postgresql/include/postgresql" |
201 | fi | |
ef0c727b VK |
202 | COMPONENTS="$COMPONENTS pgsql" |
203 | DBDRIVER_SELECTED="yes" | |
6693a1d0 | 204 | fi ]) |
d16cf8a5 | 205 | |
84277a0f AK |
206 | AC_ARG_WITH(db2, |
207 | [AS_HELP_STRING(--with-db2,build DB2 database driver)], | |
208 | [ if test "x$withval" != "xno" ; then | |
209 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
210 | if test `uname -m` = 'i386' || test `uname -m` = 'i686'; then | |
211 | DB2_LIB_DIR=lib32 | |
212 | else | |
213 | DB2_LIB_DIR=lib64 | |
214 | fi | |
215 | if test -x "$withval/${DB2_LIB_DIR}" ; then | |
216 | LD_RUN_PATH="${withval}/${DB2_LIB_DIR}${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
217 | LDFLAGS="$LDFLAGS -L${withval}/${DB2_LIB_DIR}" | |
218 | else | |
219 | LD_RUN_PATH="${withval}${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
220 | LDFLAGS="$LDFLAGS -L${withval}" | |
221 | fi | |
222 | if test -x "$withval/include" ; then | |
223 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
224 | fi | |
225 | ||
226 | unset DB2_LIB_DIR | |
227 | fi | |
228 | COMPONENTS="$COMPONENTS db2" | |
229 | DBDRIVER_SELECTED="yes" | |
230 | fi ]) | |
231 | ||
ef0c727b | 232 | AC_ARG_WITH(openssl, |
1010cff7 VK |
233 | [AS_HELP_STRING(--with-openssl,specify OpenSSL location)], |
234 | [ | |
235 | if test "x$withval" != "xno" ; then | |
236 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
237 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
238 | LDFLAGS="$LDFLAGS -L${withval}/lib" | |
239 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
240 | else | |
241 | LD_RUN_PATH="/usr/local/lib:/opt/openssl/lib:/usr/local/ssl/lib:${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
242 | LDFLAGS="$LDFLAGS -L/usr/local/lib -L/opt/openssl/lib" | |
4d37b0c5 | 243 | CPPFLAGS="$CPPFLAGS -I/opt/openssl/include" |
ef0c727b | 244 | fi |
1010cff7 VK |
245 | fi |
246 | REQUIRE_ENCRYPTION="yes" | |
247 | ]) | |
ef0c727b | 248 | |
c3cfc039 VK |
249 | AC_ARG_WITH(gd, |
250 | [AS_HELP_STRING(--with-gd,specify GD location)], | |
251 | [ | |
252 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
253 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
254 | LDFLAGS="$LDFLAGS -L${withval}/lib" | |
255 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
256 | fi | |
257 | ]) | |
258 | ||
ef0c727b VK |
259 | AC_ARG_ENABLE(iconv, |
260 | [AS_HELP_STRING(--disable-iconv,do not use iconv() for text conversions)], | |
3a7ce527 | 261 | [ |
ef0c727b | 262 | DISABLE_ICONV="yes" |
3a7ce527 | 263 | ]) |
3a7ce527 | 264 | |
ef0c727b VK |
265 | AC_ARG_ENABLE(encryption, |
266 | [AS_HELP_STRING(--disable-encryption,disable encryption support)], | |
e0760102 | 267 | [ |
ef0c727b | 268 | DISABLE_ENCRYPTION="yes" |
e0760102 VK |
269 | ]) |
270 | ||
ef0c727b VK |
271 | AC_ARG_ENABLE(unstable, |
272 | [AS_HELP_STRING(--enable-unstable,build experimental/unstable components)], | |
d8ca9c03 | 273 | [ |
ef0c727b | 274 | ENABLE_UNSTABLE="yes" |
d8ca9c03 VK |
275 | ]) |
276 | ||
f974a50a VK |
277 | AC_ARG_ENABLE(debug, |
278 | [AS_HELP_STRING(--enable-debug,enable additional debugging functionality)], | |
279 | [ | |
280 | ENABLE_DEBUG="yes" | |
281 | ]) | |
282 | ||
cc297a70 VK |
283 | AC_ARG_ENABLE(64bit, |
284 | [AS_HELP_STRING(--disable-64bit,disable 64bit build (force 32bit build event on 64bit machine))], | |
285 | [ | |
286 | FORCE_32BIT_BUILD="yes" | |
287 | ]) | |
288 | ||
ef0c727b VK |
289 | AC_ARG_WITH(dist, |
290 | [AS_HELP_STRING(--with-dist,for maintainers only)], | |
84277a0f | 291 | DB_DRIVERS=" mysql pgsql odbc mssql sqlite oracle db2" |
f65df2b1 | 292 | MODULES="libexpat libnetxms install sqlite snmp libnxsl libnxlp db server agent libnxmap libnxcl client nxscript tools webui" |
ad0f1ada | 293 | SUBAGENT_DIRS="linux freebsd openbsd netbsd sunos aix ipso hpux" |
ef0c727b VK |
294 | NXCONFIG="nxconfig" |
295 | TOP_LEVEL_MODULES="sql images" | |
296 | CONTRIB_MODULES="mibs backgrounds" | |
aa24418a | 297 | CLIENT_COMPONENTS="nxalarm nxevent nxpush nxsms" |
24f89c3a | 298 | UNSTABLE_SUBAGENT_DIRS="odbcquery" |
ef0c727b VK |
299 | SERVER_TOOLS="nxconfig" |
300 | ) | |
301 | ||
d8ca9c03 | 302 | |
ef0c727b VK |
303 | #-------------------------------------------------------------------- |
304 | # Validate command line parameters and set various checking options | |
305 | #-------------------------------------------------------------------- | |
306 | ||
8817f620 VK |
307 | check_substr "$COMPONENTS" "sqlite" |
308 | if test $? = 0; then | |
309 | MODULES="$MODULES sqlite" | |
310 | fi | |
311 | ||
ef0c727b | 312 | check_substr "$COMPONENTS" "static-agent" |
1010cff7 | 313 | if test $? = 0; then |
ef0c727b VK |
314 | if test "x$COMPONENTS" != "x static-agent"; then |
315 | AC_MSG_ERROR(Static agent and other components are mutally exclusive.) | |
316 | fi | |
317 | STATIC_BUILD="yes" | |
318 | BUILD_STATIC_AGENT="yes" | |
aa8d6795 | 319 | MODULES="$MODULES libnxlp agent" |
3a6979cf | 320 | DISABLE_ICONV="yes" |
ef0c727b | 321 | CPPFLAGS="$CPPFLAGS -D_STATIC_AGENT" |
e8636669 | 322 | |
ef0c727b | 323 | case "$PLATFORM" in |
e8636669 VK |
324 | Linux) |
325 | SUBAGENT_DIRS="linux" | |
d0b5a098 VK |
326 | SUBAGENT_LIBS="../subagents/linux/libnsm_linux.la" |
327 | STATIC_SUBAGENT_LIST="linux $STATIC_SUBAGENT_LIST" | |
e8636669 VK |
328 | ;; |
329 | FreeBSD) | |
330 | SUBAGENT_DIRS="freebsd" | |
d0b5a098 VK |
331 | SUBAGENT_LIBS="../subagents/freebsd/libnsm_freebsd.la" |
332 | STATIC_SUBAGENT_LIST="freebsd $STATIC_SUBAGENT_LIST" | |
e8636669 | 333 | ;; |
992ba479 AK |
334 | OpenBSD) |
335 | SUBAGENT_DIRS="openbsd" | |
336 | SUBAGENT_LIBS="../subagents/openbsd/libnsm_openbsd.la" | |
337 | STATIC_SUBAGENT_LIST="openbsd $STATIC_SUBAGENT_LIST" | |
338 | ;; | |
ad0f1ada VK |
339 | NetBSD) |
340 | SUBAGENT_DIRS="netbsd" | |
341 | SUBAGENT_LIBS="../subagents/netbsd/libnsm_netbsd.la" | |
342 | STATIC_SUBAGENT_LIST="netbsd $STATIC_SUBAGENT_LIST" | |
343 | ;; | |
e8636669 VK |
344 | SunOS) |
345 | SUBAGENT_DIRS="sunos" | |
d0b5a098 VK |
346 | SUBAGENT_LIBS="../subagents/sunos/libnsm_sunos.la" |
347 | STATIC_SUBAGENT_LIST="sunos $STATIC_SUBAGENT_LIST" | |
348 | ;; | |
349 | AIX) | |
350 | SUBAGENT_DIRS="aix" | |
351 | SUBAGENT_LIBS="../subagents/aix/libnsm_aix.la" | |
352 | STATIC_SUBAGENT_LIST="aix $STATIC_SUBAGENT_LIST" | |
e8636669 | 353 | ;; |
c29360a9 VK |
354 | HP-UX) |
355 | SUBAGENT_DIRS="hpux" | |
356 | SUBAGENT_LIBS="../subagents/hpux/libnsm_hpux.la" | |
357 | STATIC_SUBAGENT_LIST="hpux $STATIC_SUBAGENT_LIST" | |
358 | ;; | |
e8636669 VK |
359 | *) |
360 | # unknown | |
361 | ;; | |
362 | esac | |
ef0c727b | 363 | fi |
2b23dc1e | 364 | |
ef0c727b | 365 | check_substr "$COMPONENTS" "ipso-agent" |
1010cff7 | 366 | if test $? = 0; then |
fd5a401b | 367 | if test "x$COMPONENTS" != "x ipso-agent"; then |
ef0c727b VK |
368 | AC_MSG_ERROR(IPSO agent and other components are mutally exclusive.) |
369 | fi | |
370 | STATIC_BUILD="yes" | |
371 | BUILD_STATIC_AGENT="yes" | |
3a6979cf | 372 | DISABLE_ICONV="yes" |
ef0c727b | 373 | USE_PTH="yes" |
aa8d6795 | 374 | MODULES="$MODULES libnxlp agent" |
aa24418a | 375 | CPPFLAGS="$CPPFLAGS -D_STATIC_AGENT -D_IPSO -D_USE_GNU_PTH -DSQLITE_THREADSAFE=0 -I/usr/local/include" |
ef0c727b VK |
376 | LDFLAGS="$LDFLAGS -all-static" |
377 | STATIC_SUBAGENT_LIST="ipso ping portcheck ups" | |
378 | SUBAGENT_DIRS="ipso" | |
379 | SUBAGENT_LIBS="../subagents/ipso/libnsm_ipso.la ../subagents/ping/libnsm_ping.la ../subagents/portCheck/libnsm_portCheck.la ../subagents/ups/libnsm_ups.la" | |
380 | fi | |
c688d2a7 | 381 | |
c5c0f362 VK |
382 | check_substr "$COMPONENTS" "snmp" |
383 | if test $? = 0; then | |
384 | NEED_ZLIB="yes" | |
385 | MODULES="$MODULES snmp" | |
386 | fi | |
387 | ||
ef0c727b | 388 | check_substr "$COMPONENTS" "server" |
1010cff7 | 389 | if test $? = 0; then |
ef0c727b VK |
390 | if test "x$DBDRIVER_SELECTED" != "xyes"; then |
391 | AC_MSG_ERROR(You must select at least one database driver when building server.) | |
392 | fi | |
393 | BUILD_SERVER="yes" | |
d1834406 | 394 | MODULES="$MODULES libnxmap libnxsl libnxlp db server nxscript" |
ef0c727b VK |
395 | TOP_LEVEL_MODULES="$TOP_LEVEL_MODULES sql images" |
396 | CONTRIB_MODULES="$CONTRIB_MODULES mibs backgrounds" | |
397 | fi | |
dff54fed | 398 | |
e44986e5 VK |
399 | check_substr "$COMPONENTS" "client" |
400 | if test $? = 0; then | |
401 | BUILD_CLIENT="yes" | |
402 | NEED_ZLIB="yes" | |
aa24418a | 403 | MODULES="$MODULES libnxmap libnxcl client" |
36ad9f45 | 404 | CLIENT_COMPONENTS="$CLIENT_COMPONENTS nxalarm nxevent nxpush nxsms" |
e44986e5 VK |
405 | fi |
406 | ||
ef0c727b | 407 | check_substr "$COMPONENTS" "agent" |
1010cff7 | 408 | if test $? = 0; then |
ef0c727b | 409 | BUILD_AGENT="yes" |
28ba6824 | 410 | MODULES="$MODULES libnxlp db agent" |
ef0c727b | 411 | if test "x$ENABLE_UNSTABLE" = "xyes"; then |
24f89c3a | 412 | UNSTABLE_SUBAGENT_DIRS="odbcquery" |
987b646a | 413 | fi |
1010cff7 VK |
414 | |
415 | case "$PLATFORM" in | |
416 | Linux) | |
417 | SUBAGENT_DIRS="linux" | |
418 | ;; | |
419 | FreeBSD) | |
420 | SUBAGENT_DIRS="freebsd" | |
421 | ;; | |
422 | OpenBSD) | |
423 | SUBAGENT_DIRS="openbsd" | |
424 | ;; | |
ad0f1ada VK |
425 | NetBSD) |
426 | SUBAGENT_DIRS="netbsd" | |
427 | ;; | |
1010cff7 VK |
428 | SunOS) |
429 | SUBAGENT_DIRS="sunos" | |
430 | ;; | |
431 | AIX) | |
432 | SUBAGENT_DIRS="aix" | |
433 | ;; | |
434 | HP-UX) | |
435 | SUBAGENT_DIRS="hpux" | |
436 | ;; | |
437 | *) | |
438 | # unknown | |
439 | ;; | |
440 | esac | |
ef0c727b | 441 | fi |
b97191d2 | 442 | |
e02b69b9 | 443 | check_substr "$COMPONENTS" "webui" |
1010cff7 | 444 | if test $? = 0; then |
ef0c727b | 445 | BUILD_NXHTTPD="yes" |
e02b69b9 | 446 | MODULES="$MODULES libnxmap libnxcl webui" |
ef0c727b | 447 | fi |
b67a9e12 | 448 | |
ef0c727b | 449 | check_substr "$COMPONENTS" "mysql" |
1010cff7 | 450 | if test $? = 0; then |
ef0c727b | 451 | DB_DRIVERS="$DB_DRIVERS mysql" |
b67a9e12 | 452 | fi |
6619a6b0 | 453 | |
ef0c727b | 454 | check_substr "$COMPONENTS" "pgsql" |
1010cff7 | 455 | if test $? = 0; then |
ef0c727b VK |
456 | DB_DRIVERS="$DB_DRIVERS pgsql" |
457 | fi | |
e8636669 | 458 | |
8817f620 | 459 | check_substr "$COMPONENTS" "sqlite_drv" |
1010cff7 | 460 | if test $? = 0; then |
ef0c727b | 461 | DB_DRIVERS="$DB_DRIVERS sqlite" |
e8636669 VK |
462 | fi |
463 | ||
ef0c727b | 464 | check_substr "$COMPONENTS" "odbc" |
1010cff7 | 465 | if test $? = 0; then |
ef0c727b VK |
466 | DB_DRIVERS="$DB_DRIVERS odbc" |
467 | fi | |
468 | ||
41b4790d VK |
469 | check_substr "$COMPONENTS" "oracle" |
470 | if test $? = 0; then | |
471 | DB_DRIVERS="$DB_DRIVERS oracle" | |
472 | fi | |
473 | ||
84277a0f AK |
474 | check_substr "$COMPONENTS" "db2" |
475 | if test $? = 0; then | |
476 | DB_DRIVERS="$DB_DRIVERS db2" | |
477 | fi | |
478 | ||
ef0c727b VK |
479 | |
480 | #-------------------------------------------------------------------- | |
481 | # Check for programs | |
482 | #-------------------------------------------------------------------- | |
483 | ||
484 | if test "x$PLATFORM" = "xHP-UX"; then | |
e7d9c4ae | 485 | AC_CHECK_PROG([CCC], [aCC], [aCC]) |
ef0c727b VK |
486 | fi |
487 | AC_PROG_CC(aCC gcc cc cl) | |
488 | AC_PROG_CPP | |
489 | AC_PROG_CXX | |
c3cfc039 | 490 | if test "x$CXX" = "xg++"; then |
753206b5 AK |
491 | AC_CHECK_PROG([GPLUSPLUS], [g++], [yes], [no]) |
492 | if test "x$GPLUSPLUS" = "xno"; then | |
c3cfc039 VK |
493 | AC_MSG_ERROR([*** FATAL: Cannot find any usable C++ compiler]) |
494 | fi | |
495 | fi | |
ef0c727b VK |
496 | AC_PROG_INSTALL |
497 | AC_PROG_LEX | |
76154a95 | 498 | AC_CHECK_PROGS(YACC,bison byacc,yacc) |
ef0c727b VK |
499 | AC_PROG_LN_S |
500 | ||
501 | AC_ARG_VAR(PERL,local path to the perl interpreter) | |
502 | perl_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/perl/bin:/opt/perl/usr/bin:/opt/perl/usr/local/bin" | |
503 | AC_PATH_PROG(PERL,perl,/usr/bin/env perl,$perl_possible_path) | |
504 | ||
505 | ||
506 | #-------------------------------------------------------------------- | |
507 | # Initialize libtool | |
508 | #-------------------------------------------------------------------- | |
509 | ||
510 | if test "x$STATIC_BUILD" = "xyes"; then | |
511 | enable_shared=no | |
512 | enable_static=yes | |
513 | else | |
514 | enable_shared=yes | |
515 | enable_static=no | |
516 | fi | |
e8636669 VK |
517 | AC_LIBTOOL_DLOPEN |
518 | AC_PROG_LIBTOOL | |
3a7ce527 | 519 | |
d16cf8a5 | 520 | |
ef0c727b VK |
521 | #-------------------------------------------------------------------- |
522 | # C/C++ capabilities | |
523 | #-------------------------------------------------------------------- | |
524 | ||
525 | AC_C_CONST | |
526 | AC_PROG_GCC_TRADITIONAL | |
1d9cc60e | 527 | AC_C_BIGENDIAN |
ef0c727b VK |
528 | |
529 | ||
530 | #-------------------------------------------------------------------- | |
531 | # Platform-dependent settings | |
532 | #-------------------------------------------------------------------- | |
533 | ||
534 | case "$PLATFORM" in | |
535 | AIX) | |
9fedef8b | 536 | LDFLAGS="-no-undefined -Wl,-brtl $LDFLAGS" |
ef0c727b VK |
537 | ;; |
538 | HP-UX) | |
5a5957b2 | 539 | CPPFLAGS="$CPPFLAGS -D_HPUX -D_HPUX_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1 -D_REENTRANT" |
ef0c727b VK |
540 | if test "x$CXX" = "xaCC"; then |
541 | CXXFLAGS="-mt $CXXFLAGS +W749 +W829" | |
542 | LDFLAGS="$LDFLAGS -mt" | |
543 | fi | |
544 | ;; | |
75c30ed4 | 545 | SunOS) |
27ed5b1d | 546 | CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" |
75c30ed4 VK |
547 | LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib |
548 | export LD_LIBRARY_PATH | |
549 | ;; | |
56b2f755 VK |
550 | Linux) |
551 | CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" | |
552 | ;; | |
ef0c727b VK |
553 | *) |
554 | ;; | |
555 | esac | |
556 | ||
557 | ||
558 | #-------------------------------------------------------------------- | |
c90d3610 | 559 | # C++ compiler tuning: |
cc297a70 | 560 | # * Disable C++ exceptions and RTTI |
779ce551 | 561 | # * Turn on 64bit mode on HP-UX/Itanium |
cc297a70 | 562 | # * Turn on 64bit mode on AIX |
ef0c727b VK |
563 | #-------------------------------------------------------------------- |
564 | ||
565 | if test "x$CC" = "xgcc" ; then | |
566 | ||
567 | AC_LANG_PUSH([C++]) | |
568 | ||
569 | AC_MSG_CHECKING(whether C++ compiler accepts -fno-rtti) | |
570 | OLD_CXXFLGAS="$CXXFLAGS" | |
571 | CXXFLAGS="$CXXFLAGS -fno-rtti" | |
572 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], | |
573 | [ AC_MSG_RESULT(yes) ], | |
574 | [ | |
575 | CXXFLAGS="$OLD_CXXFLAGS" | |
576 | AC_MSG_RESULT(no) | |
577 | ]) | |
578 | ||
579 | AC_MSG_CHECKING(whether C++ compiler accepts -fno-exceptions) | |
580 | OLD_CXXFLGAS="$CXXFLAGS" | |
581 | CXXFLAGS="$CXXFLAGS -fno-exceptions" | |
582 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], | |
583 | [ AC_MSG_RESULT(yes) ], | |
584 | [ | |
585 | CXXFLAGS="$OLD_CXXFLAGS" | |
586 | AC_MSG_RESULT(no) | |
587 | ]) | |
588 | ||
589 | AC_LANG_POP([C++]) | |
590 | ||
779ce551 | 591 | if test "x$PLATFORM" = "xHP-UX"; then |
cc297a70 VK |
592 | if test "x$FORCE_32BIT_BUILD" = "xyes"; then |
593 | AC_MSG_CHECKING(whether C compiler accepts -milp32) | |
594 | OLD_CPPFLAGS="$CPPFLAGS" | |
595 | CPPFLAGS="$CPPFLAGS -milp32" | |
596 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], | |
597 | [ | |
598 | LDFLAGS="-milp32 $LDFLAGS" | |
599 | AC_MSG_RESULT(yes) | |
600 | ], | |
601 | [ | |
602 | CPPFLAGS="$OLD_CPPFLAGS" | |
603 | AC_MSG_RESULT(no) | |
604 | ]) | |
605 | else | |
606 | AC_MSG_CHECKING(whether C compiler accepts -mlp64) | |
607 | OLD_CPPFLAGS="$CPPFLAGS" | |
608 | CPPFLAGS="$CPPFLAGS -mlp64" | |
609 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], | |
610 | [ | |
611 | LDFLAGS="-mlp64 -L/usr/lib/hpux64 -L/usr/local/lib/hpux64 $LDFLAGS" | |
612 | AC_MSG_RESULT(yes) | |
613 | ], | |
614 | [ | |
615 | CPPFLAGS="$OLD_CPPFLAGS" | |
616 | AC_MSG_RESULT(no) | |
617 | ]) | |
618 | fi | |
619 | fi | |
620 | ||
621 | if test "x$PLATFORM" = "xAIX"; then | |
622 | if test "x$FORCE_32BIT_BUILD" = "xyes"; then | |
623 | AC_MSG_CHECKING(whether C compiler accepts -maix32) | |
624 | OLD_CPPFLAGS="$CPPFLAGS" | |
625 | CPPFLAGS="$CPPFLAGS -maix32" | |
fecf6a2b | 626 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], |
cc297a70 VK |
627 | [ |
628 | LDFLAGS="-maix32 $LDFLAGS" | |
1c45282c VK |
629 | OBJECT_MODE=32 |
630 | AC_SUBST(OBJECT_MODE) | |
cc297a70 VK |
631 | AC_MSG_RESULT(yes) |
632 | ], | |
633 | [ | |
634 | CPPFLAGS="$OLD_CPPFLAGS" | |
635 | AC_MSG_RESULT(no) | |
636 | ]) | |
637 | else | |
638 | AC_MSG_CHECKING(whether C compiler accepts -maix64) | |
639 | OLD_CPPFLAGS="$CPPFLAGS" | |
640 | CPPFLAGS="$CPPFLAGS -maix64" | |
fecf6a2b | 641 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], |
cc297a70 VK |
642 | [ |
643 | LDFLAGS="-maix64 $LDFLAGS" | |
1c45282c VK |
644 | OBJECT_MODE=64 |
645 | AC_SUBST(OBJECT_MODE) | |
cc297a70 VK |
646 | AC_MSG_RESULT(yes) |
647 | ], | |
648 | [ | |
649 | CPPFLAGS="$OLD_CPPFLAGS" | |
650 | AC_MSG_RESULT(no) | |
651 | ]) | |
652 | fi | |
779ce551 VK |
653 | fi |
654 | ||
ce5592b2 VK |
655 | if test "x$ENABLE_DEBUG" = "xyes"; then |
656 | CPPFLAGS="$CPPFLAGS -ggdb3" | |
657 | fi | |
ef0c727b VK |
658 | fi |
659 | ||
660 | ||
661 | #-------------------------------------------------------------------- | |
662 | # Additional include and library directories | |
663 | #-------------------------------------------------------------------- | |
664 | ||
665 | if test -d /usr/local/include; then | |
4d37b0c5 VK |
666 | if test "x$CC" = "xgcc"; then |
667 | AC_MSG_CHECKING(whether -I/usr/local/include needed) | |
668 | OLD_CPPFLAGS="$CPPFLAGS" | |
669 | CPPFLAGS="$CPPFLAGS -Werror -I/usr/local/include" | |
670 | AC_TRY_COMPILE([],[], | |
671 | [ | |
672 | CPPFLAGS="$OLD_CPPFLAGS -I/usr/local/include" | |
673 | AC_MSG_RESULT(yes) | |
674 | ], | |
675 | [ | |
676 | CPPFLAGS="$OLD_CPPFLAGS" | |
677 | AC_MSG_RESULT(no) | |
678 | ] | |
679 | ) | |
680 | else | |
681 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | |
682 | fi | |
ef0c727b VK |
683 | fi |
684 | ||
685 | if test -d /usr/kerberos/include; then | |
686 | CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" | |
687 | fi | |
688 | ||
689 | if test -d /usr/local/lib; then | |
690 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | |
691 | fi | |
692 | ||
693 | ||
694 | #-------------------------------------------------------------------- | |
695 | # Check for threads library - either POSIX or GNU | |
696 | #-------------------------------------------------------------------- | |
697 | ||
698 | if test "x$USE_PTH" = "xyes"; then | |
699 | AC_CHECK_HEADER(pth.h,,AC_MSG_ERROR([*** GNU Pth thread support not installed - please install first ***])) | |
700 | else | |
701 | AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***])) | |
702 | ||
703 | if test "x$CXX" = "xaCC"; then | |
704 | PTHREAD_LIBS="" | |
705 | else | |
706 | PTHREAD_LIBS="error" | |
707 | AC_MSG_CHECKING(for old style FreeBSD -pthread flag) | |
708 | AC_EGREP_CPP(yes, | |
709 | [#if defined(__FreeBSD_cc_version) || defined(__OpenBSD__) | |
710 | yes | |
711 | #endif | |
712 | ], AC_MSG_RESULT(yes) | |
fecf6a2b | 713 | PTHREAD_LIBS="-pthread", |
ef0c727b VK |
714 | AC_MSG_RESULT(no)) |
715 | if test "x$PTHREAD_LIBS" = "xerror"; then | |
716 | AC_CHECK_LIB(pthread, pthread_attr_init, | |
717 | PTHREAD_LIBS="-lpthread") | |
718 | fi | |
f725c1b7 | 719 | # On HP-UX (at least 11.00) pthread library contains |
b041c587 | 720 | # __pthread_attr_init_system instead of pthread_attr_init |
f725c1b7 | 721 | if test "x$PTHREAD_LIBS" = "xerror"; then |
b041c587 | 722 | AC_CHECK_LIB(pthread, __pthread_attr_init_system, |
f725c1b7 VK |
723 | PTHREAD_LIBS="-lpthread") |
724 | fi | |
ef0c727b VK |
725 | if test "x$PTHREAD_LIBS" = "xerror"; then |
726 | AC_CHECK_LIB(pthreads, pthread_attr_init, | |
727 | PTHREAD_LIBS="-lpthreads") | |
728 | fi | |
729 | if test "x$PTHREAD_LIBS" = "xerror"; then | |
730 | AC_CHECK_FUNC(pthread_attr_init, | |
731 | PTHREAD_LIBS="") | |
732 | fi | |
733 | fi | |
734 | ||
735 | if test "x$PTHREAD_LIBS" = "xerror"; then | |
736 | AC_MSG_ERROR(*** Unable to locate working posix thread library ***) | |
737 | fi | |
8d131dda | 738 | LIBS="$LIBS $PTHREAD_LIBS" |
ef0c727b VK |
739 | |
740 | # Extensions to posix threads | |
741 | AC_CHECK_HEADERS([pthread_np.h],,,[ | |
9c29f76e | 742 | #include <pthread.h> |
ef0c727b VK |
743 | ]) |
744 | AC_CHECK_FUNCS([pthread_cond_reltimedwait_np]) | |
745 | ||
746 | # Check for recursive mutexes | |
39086394 VK |
747 | AC_CHECK_FUNCS([pthread_mutexattr_settype __pthread_mutexattr_settype pthread_mutexattr_setkind_np]) |
748 | AC_CHECK_DECLS([pthread_mutexattr_settype, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_RECURSIVE_NP, MUTEX_TYPE_COUNTING_FAST],,,[ | |
9c29f76e VK |
749 | #include <pthread.h> |
750 | #if HAVE_PTHREAD_NP_H | |
751 | #include <pthread_np.h> | |
752 | #endif | |
ef0c727b VK |
753 | ]) |
754 | ||
755 | # Check for read/write locks | |
756 | # On Linux, rwlock functions declared always, but pthread_rwlock_t may need | |
757 | # additional defines | |
758 | AC_CHECK_FUNCS([pthread_rwlock_init pthread_rwlock_timedrdlock pthread_rwlock_timedwrlock]) | |
759 | if test "$ac_cv_func_pthread_rwlock_init" = "yes"; then | |
760 | AC_CACHE_CHECK([for pthread_rwlock_t], ac_cv_struct_pthread_rw, | |
9c29f76e VK |
761 | [AC_TRY_COMPILE([ |
762 | #include <sys/types.h> | |
763 | #include <pthread.h> | |
764 | ], | |
ef0c727b VK |
765 | [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;], |
766 | ac_cv_struct_pthread_rw=yes, [ | |
9c29f76e VK |
767 | AC_TRY_COMPILE([ |
768 | #define _XOPEN_SOURCE 500 | |
769 | #include <sys/types.h> | |
770 | #include <pthread.h> | |
771 | ], | |
ef0c727b VK |
772 | [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;], |
773 | ac_cv_struct_pthread_rw=yes, ac_cv_struct_pthread_rw=no) | |
774 | if test "$ac_cv_struct_pthread_rw" = "yes"; then | |
775 | CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" | |
776 | fi | |
777 | ])]) | |
778 | if test "$ac_cv_struct_pthread_rw" = "yes"; then | |
779 | AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1, Define to 1 if you have working pthread read/write locks) | |
780 | fi | |
781 | fi | |
782 | ||
783 | fi | |
784 | ||
785 | ||
786 | #-------------------------------------------------------------------- | |
787 | # Checks for OpenSSL | |
788 | #-------------------------------------------------------------------- | |
789 | ||
790 | if test "x$DISABLE_ENCRYPTION" != "xyes" ; then | |
791 | AC_CHECK_LIB(crypto, RSA_new, | |
792 | [ | |
793 | AC_DEFINE(WITH_OPENSSL,,[with openssl]) | |
794 | AC_CHECK_LIB(crypto, EVP_aes_256_cbc, | |
795 | [], [AC_DEFINE(NETXMS_NO_AES,,[desc])]) | |
796 | AC_CHECK_LIB(crypto, EVP_bf_cbc, | |
797 | [], [AC_DEFINE(NETXMS_NO_BF,,[desc])]) | |
798 | AC_CHECK_LIB(crypto, EVP_idea_cbc, | |
799 | [], [AC_DEFINE(NETXMS_NO_IDEA,,[desc])]) | |
800 | AC_CHECK_LIB(crypto, EVP_des_ede3_cbc, | |
801 | [], [AC_DEFINE(NETXMS_NO_DES,,[desc])]) | |
802 | ], | |
803 | [ | |
804 | if test "x$REQUIRE_ENCRYPTION" = "xyes"; then | |
805 | AC_MSG_ERROR(libcrypto is required for encryption support) | |
806 | else | |
807 | AC_MSG_RESULT(libcrypto is required for encryption support) | |
808 | fi | |
809 | ]) | |
810 | fi | |
811 | ||
812 | ||
0322eed7 VK |
813 | #-------------------------------------------------------------------- |
814 | # Checks for header files | |
815 | #-------------------------------------------------------------------- | |
816 | ||
817 | AC_CHECK_HEADERS([sys/types.h sys/stat.h unistd.h stdarg.h fcntl.h alloca.h]) | |
818 | AC_CHECK_HEADERS([sys/int_types.h time.h sys/time.h sys/utsname.h]) | |
819 | AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h net/nh.h sys/socket.h]) | |
820 | AC_CHECK_HEADERS([fcntl.h dirent.h sys/ioctl.h sys/sockio.h poll.h termios.h]) | |
821 | AC_CHECK_HEADERS([inttypes.h memory.h stdint.h stdlib.h strings.h string.h]) | |
822 | AC_CHECK_HEADERS([readline/readline.h byteswap.h sys/select.h dlfcn.h]) | |
823 | AC_CHECK_HEADERS([sys/sysctl.h sys/param.h sys/user.h vm/vm_param.h syslog.h getopt.h]) | |
f09c2d05 | 824 | AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h],,, |
0322eed7 VK |
825 | [[#ifdef HAVE_SYS_TYPES_H |
826 | # include <sys/types.h> | |
827 | #endif | |
828 | #ifdef HAVE_SYS_TIME_H | |
829 | # include <sys/time.h> | |
830 | #endif | |
831 | #ifdef HAVE_SYS_SOCKET_H | |
832 | # include <sys/socket.h> | |
833 | #endif | |
834 | ]]) | |
835 | ||
836 | ||
ef0c727b VK |
837 | #-------------------------------------------------------------------- |
838 | # Checks for other libs. | |
839 | #-------------------------------------------------------------------- | |
d16cf8a5 | 840 | |
779ce551 | 841 | AC_CHECK_LIB(xnet, accept) |
521d90e7 | 842 | AC_CHECK_LIB(socket, if_nameindex) |
87bb64a7 | 843 | AC_CHECK_LIB(dl, dlopen) |
1b3c0ef0 | 844 | AC_CHECK_LIB(kstat, kstat_open) |
b821526a | 845 | AC_CHECK_LIB(gnugetopt, getopt_long) |
d16cf8a5 | 846 | |
e0760102 VK |
847 | if test "x$BUILD_SERVER" = "xyes" ; then |
848 | AC_CHECK_LIB(termcap, tgetstr, [], [AC_CHECK_LIB(ncurses, tgetstr, [], AC_CHECK_LIB(curses, tgetstr))]) | |
0322eed7 VK |
849 | AC_CHECK_LIB(readline, readline, [], [AC_CHECK_LIB(edit, readline)]) |
850 | AC_CHECK_FUNCS([readline]) | |
851 | ||
852 | # Check if passing rl_insert to rl_bind_key needs cast | |
853 | if test "$ac_cv_func_readline" = "yes"; then | |
854 | AC_LANG_PUSH([C++]) | |
855 | ||
856 | AC_MSG_CHECKING(for rl_insert cast) | |
857 | ||
858 | AC_TRY_COMPILE( | |
859 | [ | |
860 | #include <stdio.h> | |
861 | #include <readline/readline.h> | |
862 | ],[ rl_bind_key('\t', (Function *)rl_insert); ], | |
863 | [ | |
864 | AC_MSG_RESULT((Function *)) | |
865 | AC_DEFINE(RL_INSERT_CAST,(Function *),Required cast for rl_insert) | |
866 | ],[ | |
867 | AC_TRY_COMPILE( | |
868 | [ | |
869 | #include <stdio.h> | |
870 | #include <readline/readline.h> | |
871 | ],[ rl_bind_key('\t', (rl_command_func_t *)rl_insert); ], | |
872 | [ | |
873 | AC_MSG_RESULT((rl_command_func_t *)) | |
874 | AC_DEFINE(RL_INSERT_CAST,(rl_command_func_t *),Required cast for rl_insert) | |
875 | ],[ | |
876 | AC_MSG_RESULT(not needed) | |
877 | AC_DEFINE(RL_INSERT_CAST,,Required cast for rl_insert) | |
878 | ] | |
879 | ) | |
880 | ] | |
881 | ) | |
882 | ||
883 | AC_LANG_POP([C++]) | |
884 | fi | |
e0760102 VK |
885 | fi |
886 | ||
ef0c727b VK |
887 | if test "x$NEED_ZLIB" = "xyes"; then |
888 | AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR([*** ZLib development package not installed - please install first ***])) | |
889 | AC_CHECK_LIB(z, deflate) | |
890 | fi | |
891 | ||
467c489f VK |
892 | if test "x$FORCE_INTERNAL_EXPAT" = "xyes"; then |
893 | HAVE_LIBEXPAT=no | |
894 | else | |
895 | HAVE_LIBEXPAT=yes | |
896 | AC_CHECK_HEADER(expat.h,,HAVE_LIBEXPAT=no) | |
897 | AC_CHECK_LIB(expat, XML_Parse, [], [ HAVE_LIBEXPAT=no ]) | |
898 | fi | |
80ce37ac VK |
899 | if test "x$HAVE_LIBEXPAT" = "xno"; then |
900 | MODULES="libexpat $MODULES" | |
901 | CPPFLAGS="$CPPFLAGS " | |
1bb6b449 | 902 | fi |
ef0c727b | 903 | |
da9e62bc AK |
904 | AC_CHECK_HEADER(tre/tre.h,,AC_MSG_ERROR([*** libtre-dev not installed - please install first ***])) |
905 | AC_CHECK_LIB(tre, tre_compile, [], [ | |
906 | AC_MSG_ERROR(libtre is required) | |
907 | ]) | |
ef0c727b VK |
908 | |
909 | #-------------------------------------------------------------------- | |
910 | # Checks for data types | |
911 | #-------------------------------------------------------------------- | |
912 | ||
d16cf8a5 AK |
913 | AC_CHECK_SIZEOF(short) |
914 | AC_CHECK_SIZEOF(int) | |
915 | AC_CHECK_SIZEOF(long) | |
916 | AC_CHECK_SIZEOF(long long) | |
917 | ||
918 | AC_TYPE_PID_T | |
919 | AC_TYPE_SIGNAL | |
920 | AC_TYPE_SIZE_T | |
921 | AC_STRUCT_TIMEZONE | |
922 | ||
51128b42 VK |
923 | AC_CHECK_TYPES([long long, unsigned long long, int64_t, uint64_t, u_int64_t]) |
924 | AC_CHECK_TYPES([mode_t, off_t, socklen_t],,,[ | |
4c779d83 VK |
925 | #if HAVE_SYS_TYPES_H |
926 | #include <sys/types.h> | |
927 | #endif | |
928 | #if HAVE_SYS_SOCKET_H | |
929 | #include <sys/socket.h> | |
930 | #endif | |
931 | ]) | |
e0293f7f VK |
932 | AC_CHECK_TYPES([struct stat64],,,[ |
933 | #if HAVE_SYS_STAT_H | |
934 | #include <sys/stat.h> | |
935 | #endif | |
936 | ]) | |
521d90e7 | 937 | |
e25cadc9 | 938 | |
ef0c727b VK |
939 | #-------------------------------------------------------------------- |
940 | # Checks for functions | |
941 | #-------------------------------------------------------------------- | |
d16cf8a5 AK |
942 | |
943 | AC_FUNC_ERROR_AT_LINE | |
d16cf8a5 | 944 | AC_FUNC_MEMCMP |
d16cf8a5 AK |
945 | AC_FUNC_SELECT_ARGTYPES |
946 | AC_FUNC_STRFTIME | |
947 | AC_FUNC_STRTOD | |
948 | AC_FUNC_VPRINTF | |
949 | ||
80ce37ac | 950 | AC_CHECK_FUNCS([gettimeofday memmove memset bcopy strchr strcspn strdup strerror]) |
b50f1100 | 951 | AC_CHECK_FUNCS([strrchr strtol strtoul strtoll strtoull]) |
467e30e1 | 952 | AC_CHECK_FUNCS([if_nametoindex daemon mmap strerror_r scandir uname poll]) |
aa24418a VK |
953 | AC_CHECK_FUNCS([usleep nanosleep getopt_long gmtime_r localtime_r lstat64]) |
954 | ||
955 | AC_CHECK_DECLS([nanosleep]) | |
be6467e9 | 956 | |
b0823d06 VK |
957 | # Check if strerror_r is POSIX-compliant |
958 | if test "$ac_cv_func_strerror_r" = "yes"; then | |
959 | AC_MSG_CHECKING(if strerror_r is POSIX compliant) | |
960 | AC_LANG_PUSH([C++]) | |
961 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
7f9423af VK |
962 | #if HAVE_STRING_H |
963 | #include <string.h> | |
964 | #endif | |
965 | #if HAVE_ERRNO_H | |
966 | #include <errno.h> | |
967 | #endif | |
b0823d06 | 968 | ]],[[ |
7f9423af VK |
969 | int e; |
970 | char buffer[256]; | |
971 | e = strerror_r(1, buffer, 256); | |
972 | return e; | |
b0823d06 VK |
973 | ]]) |
974 | ],[ | |
975 | AC_MSG_RESULT(yes) | |
976 | AC_DEFINE(HAVE_POSIX_STRERROR_R,1,Define to 1 if strerror_r function is POSIX compliant) | |
977 | ],[ | |
978 | AC_MSG_RESULT(no) | |
979 | AC_DEFINE(HAVE_POSIX_STRERROR_R,0,Define to 1 if strerror_r function is POSIX compliant) | |
980 | ]) | |
981 | AC_LANG_POP([C++]) | |
982 | fi | |
983 | ||
be6467e9 VK |
984 | # Check if timezone is a function |
985 | AC_MSG_CHECKING(for timezone function) | |
986 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
987 | #if HAVE_TIME_H | |
988 | #include <time.h> | |
989 | #endif | |
990 | #if HAVE_SYS_TIME_H | |
991 | #include <sys/time.h> | |
992 | #endif | |
993 | ]],[[ | |
be6467e9 | 994 | timezone(0, 0); |
be6467e9 VK |
995 | ]]) |
996 | ],[ | |
997 | AC_MSG_RESULT(yes) | |
998 | AC_DEFINE(HAVE_TIMEZONE,1,Define to 1 if timezone function is available) | |
999 | ],[ | |
1000 | AC_MSG_RESULT(no) | |
445cba33 VK |
1001 | AC_CHECK_DECLS([timezone],,,[ |
1002 | #if HAVE_TIME_H | |
1003 | #include <time.h> | |
1004 | #endif | |
1005 | #if HAVE_SYS_TIME_H | |
1006 | #include <sys/time.h> | |
1007 | #endif | |
1008 | ]) | |
be6467e9 VK |
1009 | ]) |
1010 | ||
1011 | # Check if struct tm has tm_gmtoff member | |
1012 | AC_MSG_CHECKING(for struct tm.tm_gmtoff) | |
1013 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
1014 | #if HAVE_TIME_H | |
1015 | #include <time.h> | |
1016 | #endif | |
1017 | #if HAVE_SYS_TIME_H | |
1018 | #include <sys/time.h> | |
1019 | #endif | |
1020 | ]],[[ | |
be6467e9 VK |
1021 | struct tm t; |
1022 | return t.tm_gmtoff; | |
be6467e9 VK |
1023 | ]]) |
1024 | ],[ | |
1025 | AC_MSG_RESULT(yes) | |
1026 | AC_DEFINE(HAVE_TM_GMTOFF,1,Define to 1 if struct tm has tm_gmtoff member) | |
1027 | ],[ | |
1028 | AC_MSG_RESULT(no) | |
1029 | ]) | |
d16cf8a5 | 1030 | |
99e50bb7 VK |
1031 | AC_CHECK_DECLS([getopt_long],,,[ |
1032 | #if HAVE_GETOPT_H | |
1033 | #include <getopt.h> | |
1034 | #endif | |
1035 | ]) | |
73d7fbdb | 1036 | |
f91feddc | 1037 | AC_CHECK_FUNCS([sysctlbyname sysctlnametomib]) |
70fed300 AK |
1038 | AC_CHECK_FUNCS([tcgetattr tcsetattr cfsetospeed cfsetispeed]) |
1039 | ||
d16cf8a5 AK |
1040 | # sockets/resolver (probably for solaris) |
1041 | AC_CHECK_FUNC(connect, , [AC_CHECK_LIB(socket, connect)]) | |
1042 | AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(resolv, gethostbyname)]) | |
1043 | AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname)]) | |
1044 | ||
1045 | if test "x$ac_cv_lib_nsl_gethostbyname" != "xyes" && test "x$ac_cv_func_gethostbyname" != "xyes" ; then | |
1046 | AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(socket, gethostbyname)]) | |
1047 | fi | |
1048 | ||
1049 | if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname" ; then | |
1050 | AC_MSG_CHECKING([if we can include libnsl + libsocket]) | |
1051 | LIBS="-lnsl -lsocket $LIBS" | |
1052 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[(void) gethostbyname]])],[my_ac_link_result=yes],[my_ac_link_result=no ]) | |
1053 | if test "$my_ac_link_result" = "no" ; then | |
1054 | AC_MSG_RESULT([failure]) | |
1055 | AC_MSG_ERROR([unable to use gethostbyname()]) | |
1056 | else | |
1057 | AC_MSG_RESULT([success]) | |
1058 | fi | |
1059 | fi | |
1060 | ||
c6491611 VK |
1061 | # asprintf, scprintf, etc. |
1062 | AC_CHECK_FUNCS([asprintf aswprintf vasprintf vaswprintf]) | |
1063 | AC_CHECK_FUNCS([scprintf scwprintf vscprintf vscwprintf]) | |
1064 | ||
1065 | AC_MSG_CHECKING(whether snprintf returns required buffer size) | |
1066 | AC_RUN_IFELSE( | |
1067 | [AC_LANG_PROGRAM([ | |
1068 | #include <stdio.h> | |
1069 | #include <string.h> | |
1070 | ], [ | |
1071 | return !(snprintf(NULL, 0, "test: %d", 1000) >= 10); | |
1072 | ]) | |
1073 | ], | |
1074 | [ AC_MSG_RESULT(yes) | |
1075 | AC_DEFINE(SNPRINTF_RETURNS_REQUIRED_SIZE, 1, Define to 1 if snprintf returns required buffer size in case of truncation) | |
1076 | ], | |
1077 | [ AC_MSG_RESULT(no) ], | |
1078 | [ AC_MSG_RESULT(no) ] | |
1079 | ) | |
1080 | ||
1081 | ||
dff54fed | 1082 | |
ef0c727b VK |
1083 | #-------------------------------------------------------------------- |
1084 | # Checks for macros and definitions | |
1085 | #-------------------------------------------------------------------- | |
dff54fed | 1086 | |
ef0c727b VK |
1087 | AC_CHECK_DECLS([__bswap_32, __bswap_64, htonll, ntohll],,,[ |
1088 | #ifdef HAVE_SYS_TYPES_H | |
99e50bb7 | 1089 | #include <sys/types.h> |
ef0c727b VK |
1090 | #endif |
1091 | #if HAVE_BYTESWAP_H | |
1092 | #include <byteswap.h> | |
1093 | #endif | |
1094 | #if HAVE_NETINET_IN_H | |
1095 | #include <netinet/in.h> | |
1096 | #endif | |
1097 | #if HAVE_NET_NH_H | |
1098 | #include <net/nh.h> | |
1099 | #endif | |
1100 | ]) | |
aa24418a VK |
1101 | AC_CHECK_DECLS([RTLD_NOW, RTLD_GLOBAL],,,[ |
1102 | #ifdef HAVE_UNISTD_H | |
1103 | #include <unistd.h> | |
1104 | #endif | |
1105 | #ifdef HAVE_DLFCN_H | |
1106 | #include <dlfcn.h> | |
1107 | #endif | |
1108 | ]) | |
ce7565e7 VK |
1109 | AC_CHECK_DECLS([va_copy, __va_copy],,,[ |
1110 | #ifdef HAVE_UNISTD_H | |
1111 | #include <unistd.h> | |
1112 | #endif | |
1113 | #ifdef HAVE_STDARG_H | |
1114 | #include <stdarg.h> | |
1115 | #endif | |
1116 | #ifdef HAVE_STDLIB_H | |
1117 | #include <stdlib.h> | |
1118 | #endif | |
1119 | ]) | |
dff54fed | 1120 | |
dff54fed | 1121 | |
ef0c727b VK |
1122 | #-------------------------------------------------------------------- |
1123 | # AIX specific checks | |
1124 | #-------------------------------------------------------------------- | |
d16cf8a5 | 1125 | |
ef0c727b VK |
1126 | if test "x$PLATFORM" = "xAIX"; then |
1127 | AC_CHECK_HEADERS([procinfo.h],,,[[ ]]) | |
1128 | AC_CHECK_DECLS([getkerninfo]) | |
1129 | AC_CHECK_FUNCS([getprocs64],,,[ | |
1130 | #if HAVE_PROCINFO_H | |
1131 | #include <procinfo.h> | |
6cd41ceb | 1132 | #endif |
ef0c727b | 1133 | ]) |
7e56bf2e VK |
1134 | fi |
1135 | ||
cd4c8ca3 | 1136 | |
ba8db57b VK |
1137 | #-------------------------------------------------------------------- |
1138 | # HP-UX specific checks | |
1139 | #-------------------------------------------------------------------- | |
1140 | ||
1141 | if test "x$PLATFORM" = "xHP-UX"; then | |
f09c2d05 VK |
1142 | AC_CHECK_HEADERS([sys/mib.h],,,[[ ]]) |
1143 | AC_CHECK_DECLS([SIOCGIFNAME, SIOCGIFINDEX],,,[ | |
1144 | #if HAVE_NET_IF_H | |
1145 | #include <net/if.h> | |
1146 | #endif | |
1147 | ]) | |
1148 | AC_CHECK_DECLS([ID_ifXEntry, open_mib_64],,,[ | |
1149 | #if HAVE_SYS_MIB_H | |
1150 | #include <sys/mib.h> | |
1151 | #endif | |
1152 | ]) | |
ba8db57b VK |
1153 | fi |
1154 | ||
1155 | ||
aa24418a VK |
1156 | #-------------------------------------------------------------------- |
1157 | # *BSD specific checks | |
1158 | #-------------------------------------------------------------------- | |
1159 | ||
1160 | AC_CHECK_LIB(kvm, kvm_open) | |
1161 | AC_CHECK_FUNCS([kvm_getswapinfo]) | |
1162 | AC_CHECK_TYPES([struct kinfo_proc2],,,[ | |
1163 | #if HAVE_SYS_SYSCTL_H | |
1164 | #include <sys/sysctl.h> | |
1165 | #endif | |
1166 | ]) | |
1167 | ||
1168 | ||
28ba6824 VK |
1169 | |
1170 | #-------------------------------------------------------------------- | |
1171 | # FreeBSD specific checks | |
1172 | #-------------------------------------------------------------------- | |
1173 | ||
1174 | if test "x$PLATFORM" = "xFreeBSD"; then | |
61f58c11 VK |
1175 | AC_CHECK_DECLS([RTF_WASCLONED],[],[],[ |
1176 | #if HAVE_SYS_TYPES_H | |
1177 | #include <sys/types.h> | |
1178 | #endif | |
1179 | #if HAVE_SYS_SOCKET_H | |
1180 | #include <sys/socket.h> | |
1181 | #endif | |
1182 | #include <net/route.h> | |
1183 | ]) | |
28ba6824 VK |
1184 | fi |
1185 | ||
1186 | ||
8b86c5dc VK |
1187 | #-------------------------------------------------------------------- |
1188 | # Check for wxWidgets | |
1189 | #-------------------------------------------------------------------- | |
1190 | ||
1191 | if test "x$NEED_WXWIDGETS" = "xyes"; then | |
1192 | AC_PATH_PROGS([WXCONF], [wx-config wxgtk2-2.8-config], [no], [$PATH:/usr/local/bin]) | |
1193 | if test "x$WXCONF" = "xno"; then | |
1194 | AC_MSG_ERROR([*** wxWidgets not installed - unable to build GUI components ***]) | |
1195 | else | |
1196 | AC_PATH_PROGS([WXRC], [wxrc wxrc-gtk2-2.8], [no], [$PATH:/usr/local/bin]) | |
1197 | if test "x$WXRC" = "xno"; then | |
1198 | AC_MSG_ERROR([*** wxWidgets resource compiler not found - unable to build GUI components ***]) | |
1199 | else | |
1200 | NEED_UNICODE=`$WXCONF --selected-config | grep unicode | wc -l` | |
1201 | if test $NEED_UNICODE -eq 1; then | |
1202 | BUILD_UNICODE="yes" | |
273da39a | 1203 | WX_UNICODE="yes" |
8b86c5dc VK |
1204 | fi |
1205 | CXXFLAGS="$CXXFLAGS `$WXCONF --cxxflags --debug=$ENABLE_DEBUG`" | |
1206 | LDFLAGS="$LDFLAGS `$WXCONF --libs --debug=$ENABLE_DEBUG`" | |
1207 | fi | |
1208 | fi | |
bfc410a1 VK |
1209 | $WXCONF --cxxflags | grep error >/dev/null |
1210 | if test $? = 0; then | |
1211 | echo "wx-config output:" | |
1212 | echo "*** BEGIN ***" | |
1213 | $WXCONF --cxxflags | |
1214 | echo "*** END ***" | |
1215 | AC_MSG_ERROR([*** wxWidgets is not configured properly - see wx-config output above ***]) | |
1216 | fi | |
8b86c5dc VK |
1217 | fi |
1218 | ||
1219 | ||
ef0c727b VK |
1220 | #-------------------------------------------------------------------- |
1221 | # Check for UNICODE stuff | |
1222 | #-------------------------------------------------------------------- | |
3e39fcde | 1223 | |
8b86c5dc | 1224 | AC_CHECK_HEADERS([wchar.h wctype.h iconv.h]) |
aa24418a | 1225 | AC_CHECK_TYPES([wchar_t, wint_t],,,[ |
6b93c954 VK |
1226 | #if HAVE_WCHAR_H |
1227 | #include <wchar.h> | |
1228 | #endif | |
1229 | ]) | |
3e39fcde | 1230 | AC_CHECK_SIZEOF(wchar_t) |
aa24418a VK |
1231 | AC_CHECK_FUNCS([wcslen wcsdup wcsncpy wcstoll wcstoull towupper wcserror wcserror_r]) |
1232 | AC_CHECK_FUNCS([wfopen wopen wstat wgetenv wrename wunlink]) | |
ba8db57b | 1233 | AC_CHECK_FUNCS([wfopen wopen wstat wgetenv wrename wunlink]) |
dff54fed | 1234 | |
3265ba38 | 1235 | if test "x$DISABLE_ICONV" != "xyes"; then |
75c30ed4 | 1236 | AC_CHECK_LIB(iconv, libiconv_open, |
dff54fed | 1237 | [ ac_found_iconv=yes |
8d131dda | 1238 | LIBS="$LIBS -liconv" |
75c30ed4 VK |
1239 | AC_CHECK_FUNCS(libiconv, ac_found_iconv=yes, ac_found_iconv=no) |
1240 | ], | |
1241 | [ | |
1242 | AC_CHECK_LIB(iconv, iconv, | |
1243 | [ ac_found_iconv=yes | |
8d131dda | 1244 | LIBS="$LIBS -liconv" |
75c30ed4 VK |
1245 | ]) |
1246 | AC_CHECK_FUNCS(iconv, ac_found_iconv=yes, ac_found_iconv=no) | |
1247 | ]) | |
dff54fed VK |
1248 | else |
1249 | ac_found_iconv=no | |
ef0c727b | 1250 | CPPFLAGS="$CPPFLAGS -D__DISABLE_ICONV" |
dff54fed | 1251 | fi |
93571e7f VK |
1252 | |
1253 | AC_MSG_CHECKING(whether iconv supports UCS-2-INTERNAL) | |
1254 | AC_RUN_IFELSE( | |
1255 | [AC_LANG_PROGRAM([ | |
1256 | #if HAVE_ICONV_H | |
1257 | #include <iconv.h> | |
1258 | #endif | |
1259 | ], [ | |
1260 | return iconv_open("UTF-8","UCS-2-INTERNAL")==(iconv_t)(-1); | |
1261 | ]) | |
1262 | ], | |
1263 | [ AC_MSG_RESULT(yes) | |
1264 | AC_DEFINE(HAVE_ICONV_UCS_2_INTERNAL, 1, Define to 1 if iconv supports UCS-2-INTERNAL) | |
1265 | valid_ucs2_code="UCS-2-INTERNAL" | |
1266 | ], | |
1267 | [ AC_MSG_RESULT(no) ], | |
1268 | [ AC_MSG_RESULT(no) ] | |
1269 | ) | |
1270 | ||
1271 | AC_MSG_CHECKING(whether iconv supports UCS-2) | |
1272 | AC_RUN_IFELSE( | |
1273 | [AC_LANG_PROGRAM([ | |
1274 | #if HAVE_ICONV_H | |
1275 | #include <iconv.h> | |
1276 | #endif | |
1277 | ], [ | |
1278 | return iconv_open("UTF-8","UCS-2")==(iconv_t)(-1); | |
1279 | ]) | |
1280 | ], | |
1281 | [ AC_MSG_RESULT(yes) | |
1282 | AC_DEFINE(HAVE_ICONV_UCS_2, 1, Define to 1 if iconv supports UCS-2) | |
1283 | valid_ucs2_code="UCS-2" | |
1284 | ], | |
1285 | [ AC_MSG_RESULT(no) ], | |
8b86c5dc | 1286 | [ AC_MSG_RESULT(no) ] |
93571e7f VK |
1287 | ) |
1288 | ||
1289 | AC_MSG_CHECKING(whether iconv supports UCS2) | |
1290 | AC_RUN_IFELSE( | |
1291 | [AC_LANG_PROGRAM([ | |
1292 | #if HAVE_ICONV_H | |
1293 | #include <iconv.h> | |
1294 | #endif | |
1295 | ], [ | |
1296 | return iconv_open("UTF-8","UCS2")==(iconv_t)(-1); | |
1297 | ]) | |
1298 | ], | |
1299 | [ AC_MSG_RESULT(yes) | |
1300 | AC_DEFINE(HAVE_ICONV_UCS2, 1, Define to 1 if iconv supports UCS2) | |
1301 | valid_ucs2_code="UCS2" | |
1302 | ], | |
1303 | [ AC_MSG_RESULT(no) ], | |
1304 | [ AC_MSG_RESULT(no) ] | |
1305 | ) | |
1306 | ||
44bccbbc VK |
1307 | AC_MSG_CHECKING(whether iconv supports UCS-2BE) |
1308 | AC_RUN_IFELSE( | |
1309 | [AC_LANG_PROGRAM([ | |
1310 | #if HAVE_ICONV_H | |
1311 | #include <iconv.h> | |
1312 | #endif | |
1313 | ], [ | |
1314 | return iconv_open("UTF-8","UCS-2BE")==(iconv_t)(-1); | |
1315 | ]) | |
1316 | ], | |
1317 | [ AC_MSG_RESULT(yes) | |
1318 | AC_DEFINE(HAVE_ICONV_UCS_2BE, 1, Define to 1 if iconv supports UCS-2BE) | |
1319 | valid_ucs2_code="UCS-2BE" | |
1320 | ], | |
1321 | [ AC_MSG_RESULT(no) ], | |
1322 | [ AC_MSG_RESULT(no) ] | |
1323 | ) | |
1324 | ||
6e17f325 VK |
1325 | AC_MSG_CHECKING(whether iconv supports UCS-2LE) |
1326 | AC_RUN_IFELSE( | |
1327 | [AC_LANG_PROGRAM([ | |
1328 | #if HAVE_ICONV_H | |
1329 | #include <iconv.h> | |
1330 | #endif | |
1331 | ], [ | |
1332 | return iconv_open("UTF-8","UCS-2LE")==(iconv_t)(-1); | |
1333 | ]) | |
1334 | ], | |
1335 | [ AC_MSG_RESULT(yes) | |
1336 | AC_DEFINE(HAVE_ICONV_UCS_2LE, 1, Define to 1 if iconv supports UCS-2LE) | |
1337 | valid_ucs2_code="UCS-2LE" | |
1338 | ], | |
1339 | [ AC_MSG_RESULT(no) ], | |
1340 | [ AC_MSG_RESULT(no) ] | |
1341 | ) | |
1342 | ||
8b86c5dc VK |
1343 | AC_MSG_CHECKING(whether iconv supports UCS-4-INTERNAL) |
1344 | AC_RUN_IFELSE( | |
1345 | [AC_LANG_PROGRAM([ | |
1346 | #if HAVE_ICONV_H | |
1347 | #include <iconv.h> | |
1348 | #endif | |
1349 | ], [ | |
1350 | return iconv_open("UTF-8","UCS-4-INTERNAL")==(iconv_t)(-1); | |
1351 | ]) | |
1352 | ], | |
1353 | [ AC_MSG_RESULT(yes) | |
1354 | AC_DEFINE(HAVE_ICONV_UCS_4_INTERNAL, 1, Define to 1 if iconv supports UCS-4-INTERNAL) | |
1355 | valid_ucs4_code="UCS-4-INTERNAL" | |
1356 | ], | |
1357 | [ AC_MSG_RESULT(no) ], | |
1358 | [ AC_MSG_RESULT(no) ] | |
1359 | ) | |
1360 | ||
1361 | AC_MSG_CHECKING(whether iconv supports UCS-4) | |
1362 | AC_RUN_IFELSE( | |
1363 | [AC_LANG_PROGRAM([ | |
1364 | #if HAVE_ICONV_H | |
1365 | #include <iconv.h> | |
1366 | #endif | |
1367 | ], [ | |
1368 | return iconv_open("UTF-8","UCS-4")==(iconv_t)(-1); | |
1369 | ]) | |
1370 | ], | |
1371 | [ AC_MSG_RESULT(yes) | |
1372 | AC_DEFINE(HAVE_ICONV_UCS_4, 1, Define to 1 if iconv supports UCS-4) | |
1373 | valid_ucs4_code="UCS-4" | |
1374 | ], | |
1375 | [ AC_MSG_RESULT(no) ], | |
1376 | [ AC_MSG_RESULT(no) ] | |
1377 | ) | |
1378 | ||
1379 | AC_MSG_CHECKING(whether iconv supports UCS4) | |
1380 | AC_RUN_IFELSE( | |
1381 | [AC_LANG_PROGRAM([ | |
1382 | #if HAVE_ICONV_H | |
1383 | #include <iconv.h> | |
1384 | #endif | |
1385 | ], [ | |
1386 | return iconv_open("UTF-8","UCS4")==(iconv_t)(-1); | |
1387 | ]) | |
1388 | ], | |
1389 | [ AC_MSG_RESULT(yes) | |
1390 | AC_DEFINE(HAVE_ICONV_UCS4, 1, Define to 1 if iconv supports UCS4) | |
1391 | valid_ucs4_code="UCS4" | |
1392 | ], | |
1393 | [ AC_MSG_RESULT(no) ], | |
1394 | [ AC_MSG_RESULT(no) ] | |
1395 | ) | |
1396 | ||
1397 | AC_MSG_CHECKING(whether iconv supports UCS-4BE) | |
1398 | AC_RUN_IFELSE( | |
1399 | [AC_LANG_PROGRAM([ | |
1400 | #if HAVE_ICONV_H | |
1401 | #include <iconv.h> | |
1402 | #endif | |
1403 | ], [ | |
1404 | return iconv_open("UTF-8","UCS-4BE")==(iconv_t)(-1); | |
1405 | ]) | |
1406 | ], | |
1407 | [ AC_MSG_RESULT(yes) | |
1408 | AC_DEFINE(HAVE_ICONV_UCS_4BE, 1, Define to 1 if iconv supports UCS-4BE) | |
1409 | valid_ucs4_code="UCS-4BE" | |
1410 | ], | |
1411 | [ AC_MSG_RESULT(no) ], | |
1412 | [ AC_MSG_RESULT(no) ] | |
1413 | ) | |
1414 | ||
6e17f325 VK |
1415 | AC_MSG_CHECKING(whether iconv supports UCS-4LE) |
1416 | AC_RUN_IFELSE( | |
1417 | [AC_LANG_PROGRAM([ | |
1418 | #if HAVE_ICONV_H | |
1419 | #include <iconv.h> | |
1420 | #endif | |
1421 | ], [ | |
1422 | return iconv_open("UTF-8","UCS-4LE")==(iconv_t)(-1); | |
1423 | ]) | |
1424 | ], | |
1425 | [ AC_MSG_RESULT(yes) | |
1426 | AC_DEFINE(HAVE_ICONV_UCS_4LE, 1, Define to 1 if iconv supports UCS-4LE) | |
1427 | valid_ucs4_code="UCS-4LE" | |
1428 | ], | |
1429 | [ AC_MSG_RESULT(no) ], | |
1430 | [ AC_MSG_RESULT(no) ] | |
1431 | ) | |
1432 | ||
5e40a69e VK |
1433 | AC_MSG_CHECKING(whether iconv supports ISO8859-1) |
1434 | AC_RUN_IFELSE( | |
1435 | [AC_LANG_PROGRAM([ | |
1436 | #if HAVE_ICONV_H | |
1437 | #include <iconv.h> | |
1438 | #endif | |
1439 | ], [ | |
1440 | return iconv_open("UTF-8","ISO8859-1")==(iconv_t)(-1); | |
1441 | ]) | |
1442 | ], | |
1443 | [ AC_MSG_RESULT(yes) | |
1444 | AC_DEFINE(HAVE_ICONV_ISO8859_1, 1, Define to 1 if iconv supports ISO8859-1) | |
1445 | ], | |
1446 | [ AC_MSG_RESULT(no) ], | |
1447 | [ AC_MSG_RESULT(no) ] | |
1448 | ) | |
1449 | ||
1450 | AC_MSG_CHECKING(whether iconv supports ISO-8859-1) | |
1451 | AC_RUN_IFELSE( | |
1452 | [AC_LANG_PROGRAM([ | |
1453 | #if HAVE_ICONV_H | |
1454 | #include <iconv.h> | |
1455 | #endif | |
1456 | ], [ | |
1457 | return iconv_open("UTF-8","ISO-8859-1")==(iconv_t)(-1); | |
1458 | ]) | |
1459 | ], | |
1460 | [ AC_MSG_RESULT(yes) | |
1461 | AC_DEFINE(HAVE_ICONV_ISO_8859_1, 1, Define to 1 if iconv supports ISO-8859-1) | |
1462 | ], | |
1463 | [ AC_MSG_RESULT(no) ], | |
1464 | [ AC_MSG_RESULT(no) ] | |
1465 | ) | |
1466 | ||
1467 | AC_MSG_CHECKING(whether iconv supports ASCII) | |
1468 | AC_RUN_IFELSE( | |
1469 | [AC_LANG_PROGRAM([ | |
1470 | #if HAVE_ICONV_H | |
1471 | #include <iconv.h> | |
1472 | #endif | |
1473 | ], [ | |
1474 | return iconv_open("UTF-8","ASCII")==(iconv_t)(-1); | |
1475 | ]) | |
1476 | ], | |
1477 | [ AC_MSG_RESULT(yes) | |
1478 | AC_DEFINE(HAVE_ICONV_ASCII, 1, Define to 1 if iconv supports ASCII) | |
1479 | ], | |
1480 | [ AC_MSG_RESULT(no) ], | |
1481 | [ AC_MSG_RESULT(no) ] | |
1482 | ) | |
1483 | ||
93571e7f VK |
1484 | AC_MSG_CHECKING(whether iconv supports //IGNORE) |
1485 | AC_RUN_IFELSE( | |
1486 | [AC_LANG_PROGRAM([ | |
1487 | #if HAVE_ICONV_H | |
1488 | #include <iconv.h> | |
1489 | #endif | |
1490 | ], [ | |
1491 | return iconv_open("UTF-8//IGNORE","$valid_ucs2_code")==(iconv_t)(-1); | |
1492 | ]) | |
1493 | ], | |
1494 | [ AC_MSG_RESULT(yes) | |
1495 | AC_DEFINE(HAVE_ICONV_IGNORE, 1, Define to 1 if iconv supports //IGNORE option) | |
1496 | ], | |
1497 | [ AC_MSG_RESULT(no) ], | |
1498 | [ AC_MSG_RESULT(no) ] | |
1499 | ) | |
3e39fcde | 1500 | |
19619a35 AK |
1501 | # taken from ZSH's configure |
1502 | # Check if iconv uses const in prototype declaration | |
24b1570c | 1503 | if test "x$ac_found_iconv" = "xyes"; then |
19619a35 | 1504 | AC_CACHE_CHECK(for iconv declaration, ac_cv_iconv_const, |
7f9423af VK |
1505 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1506 | #include <stdlib.h> | |
1507 | #include <iconv.h> | |
1508 | ]], | |
1509 | [[ | |
1510 | #ifdef __cplusplus | |
1511 | "C" | |
1512 | #endif | |
1513 | #if defined(__STDC__) || defined(__cplusplus) | |
1514 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
1515 | #else | |
1516 | size_t iconv(); | |
1517 | #endif | |
1518 | ]])], | |
19619a35 AK |
1519 | [ac_cv_iconv_const=], |
1520 | [ac_cv_iconv_const=const])]) | |
1521 | AC_DEFINE_UNQUOTED([ICONV_CONST], $ac_cv_iconv_const, | |
1522 | [Define as const if the declaration of iconv() needs const.]) | |
1523 | fi | |
1524 | ||
93571e7f | 1525 | if test $ac_cv_sizeof_wchar_t -eq 2; then |
8b86c5dc VK |
1526 | AC_DEFINE(UNICODE_UCS2, 1, Define to 1 if you have 2-byte wchar_t) |
1527 | fi | |
1528 | ||
1529 | if test $ac_cv_sizeof_wchar_t -eq 4; then | |
1530 | AC_DEFINE(UNICODE_UCS4, 1, Define to 1 if you have 4-byte wchar_t) | |
1531 | fi | |
1532 | ||
c29360a9 | 1533 | |
ca0f4ea3 VK |
1534 | #-------------------------------------------------------------------- |
1535 | # MySQL | |
1536 | #-------------------------------------------------------------------- | |
1537 | ||
1538 | check_substr "$COMPONENTS" "mysql" | |
1539 | if test $? = 0; then | |
6fce76d8 | 1540 | AC_CHECK_LIB(mysqlclient, mysql_init, [MYSQL_LIBS="-lmysqlclient"], |
ca0f4ea3 | 1541 | [AC_MSG_ERROR(libmysqlclient is requred for MySQL support)]) |
aa7794f0 | 1542 | |
8d131dda VK |
1543 | OLD_LIBS="$LIBS" |
1544 | LIBS="$LIBS $MYSQL_LIBS" | |
aa7794f0 | 1545 | |
9c29f76e VK |
1546 | AC_MSG_CHECKING(whether mysql clients can run) |
1547 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | |
1548 | #include <stdio.h> | |
1549 | #include <mysql.h> | |
1550 | int main(void) | |
1551 | { | |
1552 | MYSQL *a = mysql_init(NULL); | |
1553 | return 0; | |
1554 | } | |
1555 | ]])],[],[ | |
1556 | AC_MSG_RESULT(no) | |
1557 | AC_MSG_ERROR(Your MySQL client libraries aren't properly installed) | |
1558 | ],[]) | |
ca0f4ea3 | 1559 | AC_MSG_RESULT(yes) |
6fce76d8 | 1560 | |
ca0f4ea3 | 1561 | AC_CHECK_FUNCS(mysql_real_escape_string) |
8d131dda | 1562 | LIBS="$OLD_LIBS" |
ca0f4ea3 VK |
1563 | fi |
1564 | ||
1565 | ||
58ed4897 VK |
1566 | #-------------------------------------------------------------------- |
1567 | # PostgreSQL | |
1568 | #-------------------------------------------------------------------- | |
1569 | ||
203458b7 | 1570 | check_substr "$COMPONENTS" "pgsql" |
58ed4897 VK |
1571 | if test $? = 0; then |
1572 | AC_CHECK_LIB(m, floor) | |
6fce76d8 | 1573 | AC_CHECK_LIB(pq, PQconnectdb, [PGSQL_LIBS="-lpq"], |
58ed4897 | 1574 | [AC_MSG_ERROR(libpq is required for PostgreSQL support)]) |
6fce76d8 VK |
1575 | |
1576 | AC_MSG_CHECKING(whether postgresql clients can run) | |
8d131dda VK |
1577 | OLD_LIBS="$LIBS" |
1578 | LIBS="$LIBS $PGSQL_LIBS" | |
6fce76d8 VK |
1579 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1580 | #include <stdio.h> | |
1581 | #include <libpq-fe.h> | |
1582 | int main(void) | |
1583 | { | |
1584 | PGconn *a = PQconnectdb(""); | |
1585 | return 0; | |
1586 | } | |
1587 | ]])],[AC_MSG_RESULT(yes)],[ | |
58ed4897 VK |
1588 | AC_MSG_RESULT(no) |
1589 | AC_MSG_ERROR(Your PostgreSQL client libraries aren't properly installed) | |
1590 | ],[]) | |
8d131dda | 1591 | LIBS="$OLD_LIBS" |
7070538d | 1592 | AC_CHECK_LIB(pq, PQfformat, [ AC_DEFINE(HAVE_PQFFORMAT, 1, PQfformat not exist in 7.3) ]) |
58ed4897 VK |
1593 | fi |
1594 | ||
1595 | ||
9c29f76e VK |
1596 | #-------------------------------------------------------------------- |
1597 | # ODBC | |
1598 | #-------------------------------------------------------------------- | |
1599 | ||
1600 | check_substr "$COMPONENTS" "odbc" | |
1601 | if test $? = 0; then | |
6fce76d8 | 1602 | AC_CHECK_LIB(odbc, SQLAllocHandle, [ODBC_LIBS="-lodbc"], |
9c29f76e VK |
1603 | [AC_MSG_ERROR(libodbc is required for ODBC support)]) |
1604 | fi | |
1605 | ||
1606 | ||
41b4790d VK |
1607 | #-------------------------------------------------------------------- |
1608 | # Oracle | |
1609 | #-------------------------------------------------------------------- | |
1610 | ||
1611 | check_substr "$COMPONENTS" "oracle" | |
1612 | if test $? = 0; then | |
1613 | AC_CHECK_HEADER(oci.h,,AC_MSG_ERROR([*** Cannot find oci.h - check your Oracle client installation ***])) | |
7d8c91ef VK |
1614 | AC_CHECK_LIB(nnz11, nzstrcpy, [NNZ_LIB=-lnnz11], |
1615 | [ | |
1616 | AC_CHECK_LIB(nnz10, nzstrcpy, [NNZ_LIB=-lnnz10], [], [-lclntsh]) | |
1617 | ], [-lclntsh]) | |
1618 | AC_CHECK_LIB(clntsh, OCIHandleAlloc, [ORACLE_LIBS="-lclntsh $NNZ_LIB"], | |
1619 | [AC_MSG_ERROR(libclntsh is required for Oracle support)], [$NNZ_LIB]) | |
41b4790d VK |
1620 | fi |
1621 | ||
84277a0f AK |
1622 | #-------------------------------------------------------------------- |
1623 | # DB2 | |
1624 | #-------------------------------------------------------------------- | |
1625 | ||
1626 | check_substr "$COMPONENTS" "db2" | |
1627 | if test $? = 0; then | |
1628 | AC_CHECK_HEADER(sql.h,,AC_MSG_ERROR([*** Cannot find sql.h - check your DB2 client installation ***])) | |
1629 | AC_CHECK_LIB(db2, SQLAllocHandle, [DB2_LIBS="-ldb2"], | |
1630 | [AC_MSG_ERROR(libdb2 is required for DB2 support)]) | |
1631 | fi | |
41b4790d | 1632 | |
c3cfc039 VK |
1633 | #-------------------------------------------------------------------- |
1634 | # nxhttpd | |
1635 | #-------------------------------------------------------------------- | |
1636 | ||
e02b69b9 | 1637 | check_substr "$COMPONENTS" "webui" |
c3cfc039 VK |
1638 | if test $? = 0; then |
1639 | AC_CHECK_HEADER(gd.h,,AC_MSG_ERROR([*** GD support not installed - please install first ***])) | |
1640 | AC_CHECK_LIB(gd, gdImageCreate, [], [ | |
1641 | AC_MSG_ERROR(libgd is required for web interface) | |
1642 | ]) | |
1643 | ||
1644 | fi | |
1645 | ||
1646 | ||
ca0f4ea3 VK |
1647 | #-------------------------------------------------------------------- |
1648 | # Other settings | |
1649 | #-------------------------------------------------------------------- | |
1650 | ||
fecf6a2b | 1651 | CPPFLAGS="$CPPFLAGS -DPREFIX=\\\"\${prefix}\\\" -DPREFIXW=L\\\"\${prefix}\\\" -DDATADIR=\\\"\${pkgdatadir}\\\" -DBINDIR=\\\"\${bindir}\\\" -DLIBDIR=\\\"\${libdir}\\\"" |
ca0f4ea3 | 1652 | |
8b86c5dc | 1653 | AM_CONDITIONAL([BUILD_UNICODE_LIBS], [test "x$BUILD_UNICODE" = "xyes"]) |
551ec9ca | 1654 | AM_CONDITIONAL([USE_INTERNAL_EXPAT], [test "x$HAVE_LIBEXPAT" = "xno"]) |
8b86c5dc | 1655 | |
ca0f4ea3 | 1656 | |
ef0c727b VK |
1657 | #-------------------------------------------------------------------- |
1658 | # Substitute variables | |
1659 | #-------------------------------------------------------------------- | |
82fa7c5d | 1660 | |
ef0c727b VK |
1661 | AC_SUBST(DB_DRIVERS) |
1662 | AC_SUBST(MODULES) | |
1663 | AC_SUBST(SUBAGENT_DIRS) | |
1664 | AC_SUBST(SERVER_TOOLS) | |
1665 | AC_SUBST(TOP_LEVEL_MODULES) | |
1666 | AC_SUBST(CONTRIB_MODULES) | |
c2612d83 | 1667 | AC_SUBST(CLIENT_COMPONENTS) |
ef0c727b VK |
1668 | AC_SUBST(STATIC_SUBAGENT_LIST) |
1669 | AC_SUBST(SUBAGENT_LIBS) | |
1670 | AC_SUBST(BUILD_SERVER) | |
1671 | AC_SUBST(UNSTABLE_SUBAGENT_DIRS) | |
db91456f | 1672 | AC_SUBST(WXRC) |
6fce76d8 VK |
1673 | AC_SUBST(MYSQL_LIBS) |
1674 | AC_SUBST(PGSQL_LIBS) | |
7d8c91ef | 1675 | AC_SUBST(ORACLE_LIBS) |
6fce76d8 | 1676 | AC_SUBST(ODBC_LIBS) |
84277a0f | 1677 | AC_SUBST(DB2_LIBS) |
d16cf8a5 | 1678 | |
ef0c727b VK |
1679 | #-------------------------------------------------------------------- |
1680 | # Shared libs versions | |
d16cf8a5 AK |
1681 | # |
1682 | # versioning scheme: current:revision:age | |
1683 | # | |
1684 | # current | |
1685 | # The number of the current interface exported by the library. A current | |
1686 | # value of `0', means that you are calling the interface exported by this | |
1687 | # library interface 0. | |
1688 | # | |
1689 | # revision | |
1690 | # The implementation number of the most recent interface exported by this | |
1691 | # library. In this case, a revision value of `0' means that this is the | |
1692 | # first implementation of the interface. | |
1693 | # If the next release of this library exports the same interface, but has a | |
1694 | # different implementation (perhaps some bugs have been fixed), the revision | |
1695 | # number will be higher, but current number will be the same. In that case, | |
1696 | # when given a choice, the library with the highest revision will always | |
1697 | # be used by the runtime loader. | |
1698 | # | |
1699 | # age | |
1700 | # The number of previous additional interfaces supported by this library. | |
1701 | # If age were `2', then this library can be linked into executables which | |
1702 | # were built with a release of this library that exported the current | |
1703 | # interface number, current, or any of the previous two interfaces. | |
1704 | # By definition age must be less than or equal to current. At the outset, | |
1705 | # only the first ever interface is implemented, so age can only be `0'. | |
ef0c727b | 1706 | #-------------------------------------------------------------------- |
d16cf8a5 | 1707 | |
8c5adf3a | 1708 | NETXMS_LIBRARY_VERSION=0:2:0 |
c7d14846 | 1709 | AC_SUBST(NETXMS_LIBRARY_VERSION) |
d16cf8a5 | 1710 | |
ef0c727b VK |
1711 | |
1712 | #-------------------------------------------------------------------- | |
1713 | # Generate output files | |
1714 | #-------------------------------------------------------------------- | |
d16cf8a5 AK |
1715 | |
1716 | AC_CONFIG_FILES([ | |
ef0c727b | 1717 | README |
0c3c0c39 AK |
1718 | Makefile |
1719 | contrib/Makefile | |
0c3c0c39 | 1720 | contrib/startup/Makefile |
fa66d60c | 1721 | contrib/startup/debian/Makefile |
daaefaaf | 1722 | contrib/startup/gentoo/Makefile |
0c3c0c39 | 1723 | contrib/startup/redhat/Makefile |
5de3893d | 1724 | contrib/startup/suse/Makefile |
9993edf4 | 1725 | contrib/startup/ubuntu/Makefile |
82fa7c5d | 1726 | contrib/mibs/Makefile |
3f2f9f2b | 1727 | contrib/backgrounds/Makefile |
0c3c0c39 | 1728 | doc/Makefile |
a48203d2 VK |
1729 | doc/internal/Makefile |
1730 | doc/manuals/Makefile | |
1731 | doc/misc/Makefile | |
0c3c0c39 AK |
1732 | images/Makefile |
1733 | include/Makefile | |
1734 | m4/Makefile | |
1735 | netware/Makefile | |
0c3c0c39 | 1736 | src/Makefile |
9191f6ad VK |
1737 | src/agent/Makefile |
1738 | src/agent/core/Makefile | |
1739 | src/agent/install/Makefile | |
1740 | src/agent/subagents/Makefile | |
1741 | src/agent/subagents/linux/Makefile | |
1742 | src/agent/subagents/sunos/Makefile | |
1743 | src/agent/subagents/aix/Makefile | |
1744 | src/agent/subagents/hpux/Makefile | |
1745 | src/agent/subagents/skeleton/Makefile | |
1746 | src/agent/subagents/freebsd/Makefile | |
1747 | src/agent/subagents/openbsd/Makefile | |
1748 | src/agent/subagents/netbsd/Makefile | |
1749 | src/agent/subagents/ipso/Makefile | |
1750 | src/agent/subagents/netware/Makefile | |
1751 | src/agent/subagents/winnt/Makefile | |
1752 | src/agent/subagents/win9x/Makefile | |
1753 | src/agent/subagents/winperf/Makefile | |
1754 | src/agent/subagents/wmi/Makefile | |
1755 | src/agent/subagents/portCheck/Makefile | |
1756 | src/agent/subagents/ping/Makefile | |
1757 | src/agent/subagents/sms/Makefile | |
1758 | src/agent/subagents/ups/Makefile | |
1759 | src/agent/subagents/ecs/Makefile | |
1760 | src/agent/subagents/odbcquery/Makefile | |
1761 | src/agent/subagents/logwatch/Makefile | |
c2612d83 | 1762 | src/client/Makefile |
551592f4 | 1763 | src/client/install/Makefile |
c94fa5c2 | 1764 | src/client/nxalarm/Makefile |
e84701c5 VK |
1765 | src/client/nxevent/Makefile |
1766 | src/client/nxpush/Makefile | |
59ffa5b7 | 1767 | src/client/nxsms/Makefile |
23c8c53e AK |
1768 | src/client/windows/nxuilib/Makefile |
1769 | src/client/windows/nxuilib/res/Makefile | |
1770 | src/client/windows/nxuilib/sounds/Makefile | |
d9db1c72 | 1771 | src/client/nxlexer/Makefile |
23c8c53e AK |
1772 | src/client/windows/nxcon/Makefile |
1773 | src/client/windows/nxcon/icons/Makefile | |
1774 | src/client/windows/nxcon/res/Makefile | |
23c8c53e AK |
1775 | src/client/windows/nxav/Makefile |
1776 | src/client/windows/nxav/res/Makefile | |
1777 | src/client/windows/nxnotify/Makefile | |
1778 | src/client/windows/nxnotify/res/Makefile | |
d1834406 VK |
1779 | src/db/Makefile |
1780 | src/db/dbdrv/Makefile | |
1781 | src/db/dbdrv/odbc/Makefile | |
1782 | src/db/dbdrv/mssql/Makefile | |
1783 | src/db/dbdrv/mysql/Makefile | |
1784 | src/db/dbdrv/pgsql/Makefile | |
1785 | src/db/dbdrv/sqlite/Makefile | |
1786 | src/db/dbdrv/oracle/Makefile | |
84277a0f | 1787 | src/db/dbdrv/db2/Makefile |
d1834406 | 1788 | src/db/libnxdb/Makefile |
9191f6ad VK |
1789 | src/install/Makefile |
1790 | src/install/windows/Makefile | |
1791 | src/libexpat/Makefile | |
1792 | src/libexpat/libexpat/Makefile | |
1793 | src/libnetxms/Makefile | |
1794 | src/libnxcl/Makefile | |
1795 | src/libnxlp/Makefile | |
1796 | src/libnxmap/Makefile | |
1797 | src/libnxsl/Makefile | |
1798 | src/nxscript/Makefile | |
0c3c0c39 AK |
1799 | src/server/Makefile |
1800 | src/server/core/Makefile | |
d770a97c VK |
1801 | src/server/include/Makefile |
1802 | src/server/libnxsrv/Makefile | |
1803 | src/server/netxmsd/Makefile | |
d8f2e39b VK |
1804 | src/server/smsdrv/Makefile |
1805 | src/server/smsdrv/generic/Makefile | |
91369aca | 1806 | src/server/smsdrv/nxagent/Makefile |
0c3c0c39 | 1807 | src/server/tools/Makefile |
0c3c0c39 AK |
1808 | src/server/tools/nxaction/Makefile |
1809 | src/server/tools/nxadm/Makefile | |
9191f6ad | 1810 | src/server/tools/nxap/Makefile |
5b0c7d0d VK |
1811 | src/server/tools/nxconfig/Makefile |
1812 | src/server/tools/nxconfig/res/Makefile | |
f90d7fc5 | 1813 | src/server/tools/nxdbmgr/Makefile |
4e2debcc | 1814 | src/server/tools/nxencpasswd/Makefile |
9191f6ad | 1815 | src/server/tools/nxget/Makefile |
d24fdaf4 | 1816 | src/server/tools/nxupload/Makefile |
c5c0f362 VK |
1817 | src/snmp/Makefile |
1818 | src/snmp/libnxsnmp/Makefile | |
1819 | src/snmp/nxmibc/Makefile | |
1820 | src/snmp/nxsnmpget/Makefile | |
1821 | src/snmp/nxsnmpset/Makefile | |
1822 | src/snmp/nxsnmpwalk/Makefile | |
9191f6ad | 1823 | src/sqlite/Makefile |
f65df2b1 VK |
1824 | src/tools/Makefile |
1825 | src/tools/nxcptest/Makefile | |
1826 | src/tools/nxdevcfg/Makefile | |
e02b69b9 | 1827 | src/webui/Makefile |
420d9ecf AK |
1828 | src/webui/nxhttpd/Makefile |
1829 | src/webui/nxhttpd/static/Makefile | |
1830 | src/webui/nxhttpd/static/images/Makefile | |
1831 | src/webui/nxhttpd/static/images/buttons/Makefile | |
1832 | src/webui/nxhttpd/static/images/buttons/normal/Makefile | |
1833 | src/webui/nxhttpd/static/images/buttons/pressed/Makefile | |
1834 | src/webui/nxhttpd/static/images/ctrlpanel/Makefile | |
1835 | src/webui/nxhttpd/static/images/objects/Makefile | |
1836 | src/webui/nxhttpd/static/images/status/Makefile | |
9191f6ad | 1837 | sql/Makefile |
0c3c0c39 | 1838 | tools/Makefile |
d16cf8a5 AK |
1839 | ]) |
1840 | ||
12249937 VK |
1841 | AC_OUTPUT |
1842 | ||
ef0c727b | 1843 | echo "Updating libtool" |
5cecf50e AK |
1844 | sed 's,$SED -e "/${host}-//g",$SED -e "s/${host}-//g",g' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool |
1845 | ||
779ce551 VK |
1846 | # On HP-UX, libtool passes +b instead of -Wl,+b even if gcc/g++ used as linker |
1847 | if test "x$CC" = "xgcc" && test "x$PLATFORM" = "xHP-UX"; then | |
1848 | sed "s,hardcode_libdir_flag_spec_ld=,#hardcode_libdir_flag_spec_ld=,g" < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool | |
1849 | fi | |
1850 | ||
ef0c727b VK |
1851 | #-------------------------------------------------------------------- |
1852 | # Print summary | |
1853 | #-------------------------------------------------------------------- | |
a7442678 | 1854 | |
a7442678 AK |
1855 | echo |
1856 | echo | |
1857 | echo | |
1858 | echo '---------------------------------------------------------------------' | |
1859 | echo ' Configure results' | |
1860 | echo '---------------------------------------------------------------------' | |
1861 | echo | |
8b86c5dc | 1862 | echo "Prefix : ${prefix}" |
a7442678 | 1863 | if test "x${BUILD_SERVER}" = "xyes"; then |
8b86c5dc | 1864 | echo "Build Server : YES" |
a7442678 | 1865 | else |
8b86c5dc | 1866 | echo "Build Server : NO" |
a7442678 AK |
1867 | fi |
1868 | if test "x${ac_cv_lib_crypto_RSA_new}" = "xyes"; then | |
8b86c5dc | 1869 | echo "Encryption enabled : YES" |
a7442678 | 1870 | else |
8b86c5dc | 1871 | echo "Encryption enabled : NO" |
a7442678 AK |
1872 | fi |
1873 | if test "x${DB_DRIVERS}" != "x"; then | |
8b86c5dc | 1874 | echo "Build DB-Drivers :${DB_DRIVERS}" |
a7442678 | 1875 | else |
8b86c5dc | 1876 | echo "Build DB-Drivers : NO" |
a7442678 AK |
1877 | fi |
1878 | if test "x${BUILD_CLIENT}" = "xyes"; then | |
8b86c5dc | 1879 | echo "Build Clients : YES" |
a7442678 | 1880 | else |
8b86c5dc | 1881 | echo "Build Clients : NO" |
a7442678 | 1882 | fi |
ef0c727b | 1883 | if test "x${BUILD_NXHTTPD}" = "xyes"; then |
8b86c5dc | 1884 | echo "Build Web Interface : YES" |
2654e540 | 1885 | else |
8b86c5dc | 1886 | echo "Build Web Interface : NO" |
2654e540 | 1887 | fi |
a7442678 | 1888 | if test "x${BUILD_AGENT}" = "xyes"; then |
8b86c5dc VK |
1889 | echo "Build Agent : YES" |
1890 | echo "Subagents list : ${SUBAGENT_DIRS}" | |
a7442678 | 1891 | else |
8b86c5dc | 1892 | echo "Build Agent : NO" |
a7442678 | 1893 | fi |
e8636669 | 1894 | if test "x${BUILD_STATIC_AGENT}" = "xyes"; then |
8b86c5dc VK |
1895 | echo "Build Static Agent : YES" |
1896 | echo "Subagents list : ${STATIC_SUBAGENT_LIST}" | |
e8636669 | 1897 | else |
8b86c5dc | 1898 | echo "Build Static Agent : NO" |
e8636669 | 1899 | fi |
8b86c5dc VK |
1900 | if test "x${BUILD_UNICODE}" = "xyes"; then |
1901 | echo "Build UNICODE libraries : YES" | |
1902 | else | |
1903 | echo "Build UNICODE libraries : NO" | |
1904 | fi | |
551ec9ca VK |
1905 | if test "x${HAVE_LIBEXPAT}" = "xno"; then |
1906 | echo "Use internal libexpat : YES" | |
1bb6b449 | 1907 | else |
551ec9ca | 1908 | echo "Use internal libexpat : NO" |
1bb6b449 | 1909 | fi |
cc297a70 VK |
1910 | if test "x${FORCE_32BIT_BUILD}" = "xyes"; then |
1911 | echo "Force 32bit build : YES" | |
1912 | else | |
1913 | echo "Force 32bit build : NO" | |
1914 | fi | |
7d8c91ef VK |
1915 | |
1916 | echo "CPPFLAGS : ${CPPFLAGS}" | |
1917 | echo "CXXFLAGS : ${CXXFLAGS}" | |
1918 | echo "CFLAGS : ${CFLAGS}" | |
1919 | echo "LDFLAGS : ${LDFLAGS}" | |
8d131dda | 1920 | echo "LIBS : ${LIBS}" |
7d8c91ef | 1921 | |
6fce76d8 VK |
1922 | if test "x${MYSQL_LIBS}" != "x"; then |
1923 | echo "MySQL libs : ${MYSQL_LIBS}" | |
1924 | fi | |
1925 | if test "x${PGSQL_LIBS}" != "x"; then | |
1926 | echo "PostgreSQL libs : ${PGSQL_LIBS}" | |
1927 | fi | |
7d8c91ef VK |
1928 | if test "x${ORACLE_LIBS}" != "x"; then |
1929 | echo "Oracle libs : ${ORACLE_LIBS}" | |
1930 | fi | |
6fce76d8 VK |
1931 | if test "x${ODBC_LIBS}" != "x"; then |
1932 | echo "ODBC libs : ${ODBC_LIBS}" | |
1933 | fi | |
84277a0f AK |
1934 | if test "x${DB2_LIBS}" != "x"; then |
1935 | echo "DB2 libs : ${DB2_LIBS}" | |
1936 | fi |