"messages.h" not found problem fixed
[public/netxms.git] / configure.ac
CommitLineData
27f31788 1# $Id: configure.ac,v 1.251 2007-06-27 18:44:08 victor Exp $
d16cf8a5 2#
ef0c727b
VK
3# NetXMS - Network Management System
4# Configure script
d16cf8a5
AK
5#
6
27f31788 7AC_INIT([NetXMS], [0.2.18], [NetXMS Team <bugs@netxms.org>])
ba1d810c
AK
8AC_CONFIG_AUX_DIR(config)
9AM_CONFIG_HEADER(config.h)
d16cf8a5
AK
10AM_INIT_AUTOMAKE
11
5387ff75 12
ef0c727b
VK
13#--------------------------------------------------------------------
14# Functions
15#--------------------------------------------------------------------
5387ff75 16
ef0c727b
VK
17check_substr()
18{
1010cff7 19 for w in $1; do
ef0c727b
VK
20 if test "x$w" = "x$2"; then
21 return 0;
22 fi
23 done
24 return 1
25}
16dff090 26
d3c8926d 27
ef0c727b
VK
28#--------------------------------------------------------------------
29# Initialize variables
30#--------------------------------------------------------------------
d3c8926d 31
ef0c727b
VK
32PLATFORM=`uname -s`
33COMPONENTS=""
34DISABLE_ICONV="no"
35DISABLE_ENCRYPTION="no"
36ENABLE_UNSTABLE="no"
37STATIC_BUILD="no"
38DBDRIVER_SELECTED="no"
39USE_PTH="no"
40BUILD_SERVER="no"
41BUILD_AGENT="no"
42BUILD_CLIENT="no"
43BUILD_NXHTTPD="no"
44BUILD_STATIC_AGENT="no"
45NEED_ZLIB="no"
46MODULES=""
ef0c727b
VK
47STATIC_SUBAGENT_LIST=""
48SUBAGENT_DIRS=""
49SUBAGENT_LIBS=""
50UNSTABLE_SUBAGENT_DIRS=""
51SERVER_TOOLS=""
52TOP_LEVEL_MODULES=""
53CONTRIB_MODULES=""
d3c8926d 54
16dff090 55
ef0c727b
VK
56#--------------------------------------------------------------------
57# Parse command line parameters
58#--------------------------------------------------------------------
7c9c94a7 59
ef0c727b
VK
60AC_ARG_WITH(server,
61[AS_HELP_STRING(--with-server,build server)],
62[
63 COMPONENTS="$COMPONENTS server agent"
64])
7c9c94a7 65
ef0c727b
VK
66AC_ARG_WITH(client,
67[AS_HELP_STRING(--with-client,build client library and tools)],
68[
69 COMPONENTS="$COMPONENTS client"
70])
d16cf8a5 71
ef0c727b
VK
72AC_ARG_WITH(agent,
73[AS_HELP_STRING(--with-agent,build agent)],
74[
75 COMPONENTS="$COMPONENTS agent"
76])
d16cf8a5 77
ef0c727b
VK
78AC_ARG_WITH(static-agent,
79[AS_HELP_STRING(--with-static-agent,build statically linked agent)],
80[
81 COMPONENTS="$COMPONENTS static-agent"
82])
d16cf8a5 83
ef0c727b
VK
84AC_ARG_WITH(ipso-agent,
85[AS_HELP_STRING(--with-ipso-agent,build statically linked IPSO agent)],
86[
87 COMPONENTS="$COMPONENTS ipso-agent"
88])
521d90e7 89
ef0c727b
VK
90AC_ARG_WITH(nxhttpd,
91[AS_HELP_STRING(--with-nxhttpd,build web interface)],
92[
93 COMPONENTS="$COMPONENTS nxhttpd"
9adfeefb
AK
94
95 AC_CHECK_HEADER(gd.h,,AC_MSG_ERROR([*** GD support not installed - please install first ***]))
96 AC_CHECK_LIB(gd, gdImageCreate, [], [
97 AC_MSG_ERROR(libgd is required for web interface)
98 ])
ef0c727b 99])
d16cf8a5 100
ef0c727b
VK
101AC_ARG_WITH(mdebug,
102[AS_HELP_STRING(--with-mdebug,use debug version of memory allocation functions)],
103[
104 CPPFLAGS="$CPPFLAGS -DNETXMS_MEMORY_DEBUG"
105])
d16cf8a5 106
9486b324
VK
107AC_ARG_WITH(sqlite,
108[AS_HELP_STRING(--with-sqlite,build SQLite database driver)],
109[ if test "x$withval" != "xno" ; then
110 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
111 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
112 LDFLAGS="$LDFLAGS -L${withval}/lib"
113 CPPFLAGS="$CPPFLAGS -I${withval}/include"
ef0c727b
VK
114 fi
115 COMPONENTS="$COMPONENTS sqlite"
116 DBDRIVER_SELECTED="yes"
9486b324
VK
117fi ])
118
c4b88c3d
VK
119AC_ARG_WITH(odbc,
120[AS_HELP_STRING(--with-odbc,build ODBC database driver)],
121[ if test "x$withval" != "xno" ; then
122 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
123 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
124 LDFLAGS="$LDFLAGS -L${withval}/lib"
125 CPPFLAGS="$CPPFLAGS -I${withval}/include"
ef0c727b
VK
126 fi
127 COMPONENTS="$COMPONENTS odbc"
128 DBDRIVER_SELECTED="yes"
c4b88c3d
VK
129fi ])
130
d16cf8a5 131AC_ARG_WITH(mysql,
c4b88c3d 132[AS_HELP_STRING(--with-mysql,build MySQL database driver)],
d16cf8a5
AK
133[ if test "x$withval" != "xno" ; then
134 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
135 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
136 LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib"
6693a1d0 137 CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include"
d16cf8a5 138 else
007ae516
VK
139 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}"
140 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 141 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 142 fi
ef0c727b
VK
143 COMPONENTS="$COMPONENTS mysql"
144 DBDRIVER_SELECTED="yes"
6693a1d0 145fi ])
d16cf8a5
AK
146
147AC_ARG_WITH(pgsql,
c4b88c3d 148[AS_HELP_STRING(--with-pgsql,build PostgreSQL database driver)],
d16cf8a5 149[ if test "x$withval" != "xno" ; then
6693a1d0
AK
150 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
151 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
152 LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/pgsql -L${withval}/lib/postgresql -L${withval}/pgsql/lib -L${withval}/postgresql/lib"
153 CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/pgsql -I${withval}/include/postgresql -I${withval}/pgsql/include -I${withval}/postgresql/include"
154 else
007ae516
VK
155 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}"
156 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
157 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"
158 fi
ef0c727b
VK
159 COMPONENTS="$COMPONENTS pgsql"
160 DBDRIVER_SELECTED="yes"
6693a1d0 161fi ])
d16cf8a5 162
ef0c727b 163AC_ARG_WITH(openssl,
1010cff7
VK
164[AS_HELP_STRING(--with-openssl,specify OpenSSL location)],
165[
166 if test "x$withval" != "xno" ; then
167 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
168 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
169 LDFLAGS="$LDFLAGS -L${withval}/lib"
170 CPPFLAGS="$CPPFLAGS -I${withval}/include"
171 else
172 LD_RUN_PATH="/usr/local/lib:/opt/openssl/lib:/usr/local/ssl/lib:${LD_RUN_PATH:+:}${LD_RUN_PATH}"
173 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/opt/openssl/lib"
174 CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/opt/openssl/include"
ef0c727b 175 fi
1010cff7
VK
176 fi
177 REQUIRE_ENCRYPTION="yes"
178])
ef0c727b
VK
179
180AC_ARG_ENABLE(iconv,
181[AS_HELP_STRING(--disable-iconv,do not use iconv() for text conversions)],
3a7ce527 182[
ef0c727b 183 DISABLE_ICONV="yes"
3a7ce527 184])
3a7ce527 185
ef0c727b
VK
186AC_ARG_ENABLE(encryption,
187[AS_HELP_STRING(--disable-encryption,disable encryption support)],
e0760102 188[
ef0c727b 189 DISABLE_ENCRYPTION="yes"
e0760102
VK
190])
191
ef0c727b
VK
192AC_ARG_ENABLE(unstable,
193[AS_HELP_STRING(--enable-unstable,build experimental/unstable components)],
d8ca9c03 194[
ef0c727b 195 ENABLE_UNSTABLE="yes"
d8ca9c03
VK
196])
197
ef0c727b
VK
198AC_ARG_WITH(dist,
199[AS_HELP_STRING(--with-dist,for maintainers only)],
68e4e62d 200 DB_DRIVERS=" mysql pgsql odbc mssql sqlite oracle"
ef0c727b
VK
201 MODULES="libnxsnmp libnxsl server agent libnxmap libnxcl nxevent nxpush nxreport nxmibc console nxhttpd nxscript"
202 SUBAGENT_DIRS="linux freebsd openbsd sunos aix ipso hpux"
203 NXCONFIG="nxconfig"
204 TOP_LEVEL_MODULES="sql images"
205 CONTRIB_MODULES="mibs backgrounds"
539ab0c3 206 UNSTABLE_SUBAGENT_DIRS="logscan odbcquery"
ef0c727b
VK
207 SERVER_TOOLS="nxconfig"
208)
209
d8ca9c03 210
ef0c727b
VK
211#--------------------------------------------------------------------
212# Validate command line parameters and set various checking options
213#--------------------------------------------------------------------
214
215check_substr "$COMPONENTS" "static-agent"
1010cff7 216if test $? = 0; then
ef0c727b
VK
217 if test "x$COMPONENTS" != "x static-agent"; then
218 AC_MSG_ERROR(Static agent and other components are mutally exclusive.)
219 fi
220 STATIC_BUILD="yes"
221 BUILD_STATIC_AGENT="yes"
0c3c0c39 222 MODULES="$MODULES agent"
3a6979cf 223 DISABLE_ICONV="yes"
ef0c727b 224 CPPFLAGS="$CPPFLAGS -D_STATIC_AGENT"
e8636669 225
ef0c727b 226 case "$PLATFORM" in
e8636669
VK
227 Linux)
228 SUBAGENT_DIRS="linux"
d0b5a098
VK
229 SUBAGENT_LIBS="../subagents/linux/libnsm_linux.la"
230 STATIC_SUBAGENT_LIST="linux $STATIC_SUBAGENT_LIST"
e8636669
VK
231 ;;
232 FreeBSD)
233 SUBAGENT_DIRS="freebsd"
d0b5a098
VK
234 SUBAGENT_LIBS="../subagents/freebsd/libnsm_freebsd.la"
235 STATIC_SUBAGENT_LIST="freebsd $STATIC_SUBAGENT_LIST"
e8636669 236 ;;
992ba479
AK
237 OpenBSD)
238 SUBAGENT_DIRS="openbsd"
239 SUBAGENT_LIBS="../subagents/openbsd/libnsm_openbsd.la"
240 STATIC_SUBAGENT_LIST="openbsd $STATIC_SUBAGENT_LIST"
241 ;;
e8636669
VK
242 SunOS)
243 SUBAGENT_DIRS="sunos"
d0b5a098
VK
244 SUBAGENT_LIBS="../subagents/sunos/libnsm_sunos.la"
245 STATIC_SUBAGENT_LIST="sunos $STATIC_SUBAGENT_LIST"
246 ;;
247 AIX)
248 SUBAGENT_DIRS="aix"
249 SUBAGENT_LIBS="../subagents/aix/libnsm_aix.la"
250 STATIC_SUBAGENT_LIST="aix $STATIC_SUBAGENT_LIST"
e8636669 251 ;;
c29360a9
VK
252 HP-UX)
253 SUBAGENT_DIRS="hpux"
254 SUBAGENT_LIBS="../subagents/hpux/libnsm_hpux.la"
255 STATIC_SUBAGENT_LIST="hpux $STATIC_SUBAGENT_LIST"
256 ;;
e8636669
VK
257 *)
258 # unknown
259 ;;
260 esac
ef0c727b 261fi
2b23dc1e 262
ef0c727b 263check_substr "$COMPONENTS" "ipso-agent"
1010cff7 264if test $? = 0; then
ef0c727b
VK
265 if test "x$COMPONENTS" != "x static-agent"; then
266 AC_MSG_ERROR(IPSO agent and other components are mutally exclusive.)
267 fi
268 STATIC_BUILD="yes"
269 BUILD_STATIC_AGENT="yes"
3a6979cf 270 DISABLE_ICONV="yes"
ef0c727b
VK
271 USE_PTH="yes"
272 MODULES="$MODULES agent"
273 CPPFLAGS="$CPPFLAGS -D_STATIC_AGENT -D_IPSO -D_USE_GNU_PTH -I/usr/local/include"
274 LDFLAGS="$LDFLAGS -all-static"
275 STATIC_SUBAGENT_LIST="ipso ping portcheck ups"
276 SUBAGENT_DIRS="ipso"
277 SUBAGENT_LIBS="../subagents/ipso/libnsm_ipso.la ../subagents/ping/libnsm_ping.la ../subagents/portCheck/libnsm_portCheck.la ../subagents/ups/libnsm_ups.la"
278fi
c688d2a7 279
ef0c727b 280check_substr "$COMPONENTS" "server"
1010cff7 281if test $? = 0; then
ef0c727b
VK
282 if test "x$DBDRIVER_SELECTED" != "xyes"; then
283 AC_MSG_ERROR(You must select at least one database driver when building server.)
284 fi
285 BUILD_SERVER="yes"
286 NEED_ZLIB="yes"
287 MODULES="$MODULES libnxmap libnxsnmp libnxsl server nxmibc nxscript"
288 TOP_LEVEL_MODULES="$TOP_LEVEL_MODULES sql images"
289 CONTRIB_MODULES="$CONTRIB_MODULES mibs backgrounds"
290fi
dff54fed 291
ef0c727b 292check_substr "$COMPONENTS" "client"
1010cff7 293if test $? = 0; then
ef0c727b
VK
294 BUILD_CLIENT="yes"
295 NEED_ZLIB="yes"
296 MODULES="$MODULES libnxmap libnxcl nxevent nxpush nxreport console"
297fi
0c3c0c39 298
ef0c727b 299check_substr "$COMPONENTS" "agent"
1010cff7 300if test $? = 0; then
ef0c727b
VK
301 BUILD_AGENT="yes"
302 MODULES="$MODULES agent"
303 if test "x$ENABLE_UNSTABLE" = "xyes"; then
539ab0c3 304 UNSTABLE_SUBAGENT_DIRS="logscan odbcquery"
987b646a 305 fi
1010cff7
VK
306
307 case "$PLATFORM" in
308 Linux)
309 SUBAGENT_DIRS="linux"
310 ;;
311 FreeBSD)
312 SUBAGENT_DIRS="freebsd"
313 ;;
314 OpenBSD)
315 SUBAGENT_DIRS="openbsd"
316 ;;
317 SunOS)
318 SUBAGENT_DIRS="sunos"
319 ;;
320 AIX)
321 SUBAGENT_DIRS="aix"
322 ;;
323 HP-UX)
324 SUBAGENT_DIRS="hpux"
325 ;;
326 *)
327 # unknown
328 ;;
329 esac
ef0c727b 330fi
b97191d2 331
ef0c727b 332check_substr "$COMPONENTS" "nxhttpd"
1010cff7 333if test $? = 0; then
ef0c727b
VK
334 BUILD_NXHTTPD="yes"
335 MODULES="$MODULES libnxmap libnxcl nxhttpd"
336fi
b67a9e12 337
ef0c727b 338check_substr "$COMPONENTS" "mysql"
1010cff7 339if test $? = 0; then
ef0c727b 340 DB_DRIVERS="$DB_DRIVERS mysql"
b67a9e12 341fi
6619a6b0 342
ef0c727b 343check_substr "$COMPONENTS" "pgsql"
1010cff7 344if test $? = 0; then
ef0c727b
VK
345 DB_DRIVERS="$DB_DRIVERS pgsql"
346fi
e8636669 347
ef0c727b 348check_substr "$COMPONENTS" "sqlite"
1010cff7 349if test $? = 0; then
ef0c727b 350 DB_DRIVERS="$DB_DRIVERS sqlite"
e8636669
VK
351fi
352
ef0c727b 353check_substr "$COMPONENTS" "odbc"
1010cff7 354if test $? = 0; then
ef0c727b
VK
355 DB_DRIVERS="$DB_DRIVERS odbc"
356fi
357
358
359#--------------------------------------------------------------------
360# Check for programs
361#--------------------------------------------------------------------
362
363if test "x$PLATFORM" = "xHP-UX"; then
e7d9c4ae 364 AC_CHECK_PROG([CCC], [aCC], [aCC])
ef0c727b
VK
365fi
366AC_PROG_CC(aCC gcc cc cl)
367AC_PROG_CPP
368AC_PROG_CXX
369AC_PROG_INSTALL
370AC_PROG_LEX
371AC_PROG_YACC
372AC_PROG_LN_S
373
374AC_ARG_VAR(PERL,local path to the perl interpreter)
375perl_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/perl/bin:/opt/perl/usr/bin:/opt/perl/usr/local/bin"
376AC_PATH_PROG(PERL,perl,/usr/bin/env perl,$perl_possible_path)
377
378
379#--------------------------------------------------------------------
380# Initialize libtool
381#--------------------------------------------------------------------
382
383if test "x$STATIC_BUILD" = "xyes"; then
384 enable_shared=no
385 enable_static=yes
386else
387 enable_shared=yes
388 enable_static=no
389fi
e8636669
VK
390AC_LIBTOOL_DLOPEN
391AC_PROG_LIBTOOL
3a7ce527 392
d16cf8a5 393
ef0c727b
VK
394#--------------------------------------------------------------------
395# C/C++ capabilities
396#--------------------------------------------------------------------
397
398AC_C_CONST
399AC_PROG_GCC_TRADITIONAL
1d9cc60e 400AC_C_BIGENDIAN
ef0c727b
VK
401
402
403#--------------------------------------------------------------------
404# Platform-dependent settings
405#--------------------------------------------------------------------
406
407case "$PLATFORM" in
408 AIX)
409 LDFLAGS="-no-undefined $LDFLAGS"
410 ;;
411 HP-UX)
412 CPPFLAGS="$CPPFLAGS -D_HPUX -D_HPUX_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1"
413 if test "x$CXX" = "xaCC"; then
414 CXXFLAGS="-mt $CXXFLAGS +W749 +W829"
415 LDFLAGS="$LDFLAGS -mt"
416 fi
417 ;;
418 *)
419 ;;
420esac
421
422
423#--------------------------------------------------------------------
c90d3610
VK
424# C++ compiler tuning:
425# * Disable C++ exceptions
426# * Disable compiling string constants as "const char *"
427# * Disable some GCC warnings
ef0c727b
VK
428#--------------------------------------------------------------------
429
430if test "x$CC" = "xgcc" ; then
431
432 AC_LANG_PUSH([C++])
433
434 AC_MSG_CHECKING(whether C++ compiler accepts -fno-rtti)
435 OLD_CXXFLGAS="$CXXFLAGS"
436 CXXFLAGS="$CXXFLAGS -fno-rtti"
437 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
438 [ AC_MSG_RESULT(yes) ],
439 [
440 CXXFLAGS="$OLD_CXXFLAGS"
441 AC_MSG_RESULT(no)
442 ])
443
444 AC_MSG_CHECKING(whether C++ compiler accepts -fno-exceptions)
445 OLD_CXXFLGAS="$CXXFLAGS"
446 CXXFLAGS="$CXXFLAGS -fno-exceptions"
447 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
448 [ AC_MSG_RESULT(yes) ],
449 [
450 CXXFLAGS="$OLD_CXXFLAGS"
451 AC_MSG_RESULT(no)
452 ])
453
c90d3610
VK
454 AC_MSG_CHECKING(whether C++ compiler accepts -fno-const-strings)
455 OLD_CXXFLGAS="$CXXFLAGS"
456 CXXFLAGS="$CXXFLAGS -fno-const-strings"
457 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
458 [ AC_MSG_RESULT(yes) ],
459 [
460 CXXFLAGS="$OLD_CXXFLAGS"
461 AC_MSG_RESULT(no)
462 ])
463
464 AC_MSG_CHECKING(whether C++ compiler accepts -Wno-deprecated)
465 OLD_CXXFLGAS="$CXXFLAGS"
466 CXXFLAGS="$CXXFLAGS -Wno-deprecated"
467 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
468 [ AC_MSG_RESULT(yes) ],
469 [
470 CXXFLAGS="$OLD_CXXFLAGS"
471 AC_MSG_RESULT(no)
472 ])
473
ef0c727b
VK
474 AC_LANG_POP([C++])
475
476fi
477
478
479#--------------------------------------------------------------------
480# Additional include and library directories
481#--------------------------------------------------------------------
482
483if test -d /usr/local/include; then
484 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
485fi
486
487if test -d /usr/kerberos/include; then
488 CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
489fi
490
491if test -d /usr/local/lib; then
492 LDFLAGS="$LDFLAGS -L/usr/local/lib"
493fi
494
495
496#--------------------------------------------------------------------
497# Check for threads library - either POSIX or GNU
498#--------------------------------------------------------------------
499
500if test "x$USE_PTH" = "xyes"; then
501 AC_CHECK_HEADER(pth.h,,AC_MSG_ERROR([*** GNU Pth thread support not installed - please install first ***]))
502else
503 AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***]))
504
505 if test "x$CXX" = "xaCC"; then
506 PTHREAD_LIBS=""
507 else
508 PTHREAD_LIBS="error"
509 AC_MSG_CHECKING(for old style FreeBSD -pthread flag)
510 AC_EGREP_CPP(yes,
511 [#if defined(__FreeBSD_cc_version) || defined(__OpenBSD__)
512 yes
513 #endif
514 ], AC_MSG_RESULT(yes)
515 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread",
516 AC_MSG_RESULT(no))
517 if test "x$PTHREAD_LIBS" = "xerror"; then
518 AC_CHECK_LIB(pthread, pthread_attr_init,
519 PTHREAD_LIBS="-lpthread")
520 fi
521 if test "x$PTHREAD_LIBS" = "xerror"; then
522 AC_CHECK_LIB(pthreads, pthread_attr_init,
523 PTHREAD_LIBS="-lpthreads")
524 fi
525 if test "x$PTHREAD_LIBS" = "xerror"; then
526 AC_CHECK_FUNC(pthread_attr_init,
527 PTHREAD_LIBS="")
528 fi
529 fi
530
531 if test "x$PTHREAD_LIBS" = "xerror"; then
532 AC_MSG_ERROR(*** Unable to locate working posix thread library ***)
533 fi
534 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
535
536 # Extensions to posix threads
537 AC_CHECK_HEADERS([pthread_np.h],,,[
9c29f76e 538#include <pthread.h>
ef0c727b
VK
539 ])
540 AC_CHECK_FUNCS([pthread_cond_reltimedwait_np])
541
542 # Check for recursive mutexes
543 AC_CHECK_FUNCS([pthread_mutexattr_settype pthread_mutexattr_setkind_np])
544 AC_CHECK_DECLS([PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_RECURSIVE_NP, MUTEX_TYPE_COUNTING_FAST],,,[
9c29f76e
VK
545#include <pthread.h>
546#if HAVE_PTHREAD_NP_H
547#include <pthread_np.h>
548#endif
ef0c727b
VK
549 ])
550
551 # Check for read/write locks
552 # On Linux, rwlock functions declared always, but pthread_rwlock_t may need
553 # additional defines
554 AC_CHECK_FUNCS([pthread_rwlock_init pthread_rwlock_timedrdlock pthread_rwlock_timedwrlock])
555 if test "$ac_cv_func_pthread_rwlock_init" = "yes"; then
556 AC_CACHE_CHECK([for pthread_rwlock_t], ac_cv_struct_pthread_rw,
9c29f76e
VK
557 [AC_TRY_COMPILE([
558#include <sys/types.h>
559#include <pthread.h>
560 ],
ef0c727b
VK
561 [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;],
562 ac_cv_struct_pthread_rw=yes, [
9c29f76e
VK
563 AC_TRY_COMPILE([
564#define _XOPEN_SOURCE 500
565#include <sys/types.h>
566#include <pthread.h>
567 ],
ef0c727b
VK
568 [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;],
569 ac_cv_struct_pthread_rw=yes, ac_cv_struct_pthread_rw=no)
570 if test "$ac_cv_struct_pthread_rw" = "yes"; then
571 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
572 fi
573 ])])
574 if test "$ac_cv_struct_pthread_rw" = "yes"; then
575 AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1, Define to 1 if you have working pthread read/write locks)
576 fi
577 fi
578
579fi
580
581
582#--------------------------------------------------------------------
583# Checks for OpenSSL
584#--------------------------------------------------------------------
585
586if test "x$DISABLE_ENCRYPTION" != "xyes" ; then
587 AC_CHECK_LIB(crypto, RSA_new,
588 [
589 AC_DEFINE(WITH_OPENSSL,,[with openssl])
590 AC_CHECK_LIB(crypto, EVP_aes_256_cbc,
591 [], [AC_DEFINE(NETXMS_NO_AES,,[desc])])
592 AC_CHECK_LIB(crypto, EVP_bf_cbc,
593 [], [AC_DEFINE(NETXMS_NO_BF,,[desc])])
594 AC_CHECK_LIB(crypto, EVP_idea_cbc,
595 [], [AC_DEFINE(NETXMS_NO_IDEA,,[desc])])
596 AC_CHECK_LIB(crypto, EVP_des_ede3_cbc,
597 [], [AC_DEFINE(NETXMS_NO_DES,,[desc])])
598 ],
599 [
600 if test "x$REQUIRE_ENCRYPTION" = "xyes"; then
601 AC_MSG_ERROR(libcrypto is required for encryption support)
602 else
603 AC_MSG_RESULT(libcrypto is required for encryption support)
604 fi
605 ])
606fi
607
608
609#--------------------------------------------------------------------
610# Checks for other libs.
611#--------------------------------------------------------------------
d16cf8a5 612
521d90e7 613AC_CHECK_LIB(socket, if_nameindex)
87bb64a7 614AC_CHECK_LIB(dl, dlopen)
1b3c0ef0 615AC_CHECK_LIB(kstat, kstat_open)
d16cf8a5 616
e0760102
VK
617if test "x$BUILD_SERVER" = "xyes" ; then
618 AC_CHECK_LIB(termcap, tgetstr, [], [AC_CHECK_LIB(ncurses, tgetstr, [], AC_CHECK_LIB(curses, tgetstr))])
619 AC_CHECK_LIB(readline, readline)
620fi
621
ef0c727b
VK
622if test "x$NEED_ZLIB" = "xyes"; then
623 AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR([*** ZLib development package not installed - please install first ***]))
624 AC_CHECK_LIB(z, deflate)
625fi
626
627
628#--------------------------------------------------------------------
629# Checks for header files
630#--------------------------------------------------------------------
d16cf8a5 631
ef0c727b
VK
632AC_CHECK_HEADERS([sys/types.h sys/stat.h unistd.h stdarg.h fcntl.h])
633AC_CHECK_HEADERS([sys/int_types.h sys/time.h sys/utsname.h])
ca6ad6bb 634AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h net/nh.h sys/socket.h])
70fed300 635AC_CHECK_HEADERS([fcntl.h dirent.h sys/ioctl.h sys/sockio.h poll.h termios.h])
ef0c727b
VK
636AC_CHECK_HEADERS([readline/readline.h byteswap.h sys/select.h])
637AC_CHECK_HEADERS([sys/sysctl.h vm/vm_param.h])
ade50e8b
AK
638AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h],,,
639[[#ifdef HAVE_SYS_TYPES_H
640# include <sys/types.h>
641#endif
642#ifdef HAVE_SYS_TIME_H
643# include <sys/time.h>
644#endif
645#ifdef HAVE_SYS_SOCKET_H
646# include <sys/socket.h>
647#endif
648]])
d16cf8a5 649
ef0c727b
VK
650
651#--------------------------------------------------------------------
652# Checks for data types
653#--------------------------------------------------------------------
654
d16cf8a5
AK
655AC_CHECK_SIZEOF(short)
656AC_CHECK_SIZEOF(int)
657AC_CHECK_SIZEOF(long)
658AC_CHECK_SIZEOF(long long)
659
660AC_TYPE_PID_T
661AC_TYPE_SIGNAL
662AC_TYPE_SIZE_T
663AC_STRUCT_TIMEZONE
664
521d90e7 665AC_CHECK_TYPES([int64_t, uint64_t, u_int64_t])
4c779d83
VK
666AC_CHECK_TYPES([off_t, socklen_t],,,[
667#if HAVE_SYS_TYPES_H
668#include <sys/types.h>
669#endif
670#if HAVE_SYS_SOCKET_H
671#include <sys/socket.h>
672#endif
673])
521d90e7 674
e25cadc9 675
ef0c727b
VK
676#--------------------------------------------------------------------
677# Checks for functions
678#--------------------------------------------------------------------
d16cf8a5
AK
679
680AC_FUNC_ERROR_AT_LINE
d16cf8a5 681AC_FUNC_MEMCMP
d16cf8a5
AK
682AC_FUNC_SELECT_ARGTYPES
683AC_FUNC_STRFTIME
684AC_FUNC_STRTOD
685AC_FUNC_VPRINTF
686
b50f1100
VK
687AC_CHECK_FUNCS([gettimeofday memmove memset strchr strcspn strdup strerror])
688AC_CHECK_FUNCS([strrchr strtol strtoul strtoll strtoull])
467e30e1 689AC_CHECK_FUNCS([if_nametoindex daemon mmap strerror_r scandir uname poll])
8aa1f557 690AC_CHECK_FUNCS([nanosleep getopt_long gmtime_r])
d16cf8a5 691
73d7fbdb
VK
692AC_CHECK_DECLS([getopt_long])
693
f91feddc 694AC_CHECK_FUNCS([sysctlbyname sysctlnametomib])
70fed300
AK
695AC_CHECK_FUNCS([tcgetattr tcsetattr cfsetospeed cfsetispeed])
696
d16cf8a5
AK
697# sockets/resolver (probably for solaris)
698AC_CHECK_FUNC(connect, , [AC_CHECK_LIB(socket, connect)])
699AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(resolv, gethostbyname)])
700AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname)])
701
702if test "x$ac_cv_lib_nsl_gethostbyname" != "xyes" && test "x$ac_cv_func_gethostbyname" != "xyes" ; then
703 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(socket, gethostbyname)])
704fi
705
706if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname" ; then
707 AC_MSG_CHECKING([if we can include libnsl + libsocket])
708 LIBS="-lnsl -lsocket $LIBS"
709 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[(void) gethostbyname]])],[my_ac_link_result=yes],[my_ac_link_result=no ])
710 if test "$my_ac_link_result" = "no" ; then
711 AC_MSG_RESULT([failure])
712 AC_MSG_ERROR([unable to use gethostbyname()])
713 else
714 AC_MSG_RESULT([success])
715 fi
716fi
717
dff54fed 718
ef0c727b
VK
719#--------------------------------------------------------------------
720# Checks for macros and definitions
721#--------------------------------------------------------------------
dff54fed 722
ef0c727b
VK
723AC_CHECK_DECLS([__bswap_32, __bswap_64, htonll, ntohll],,,[
724#ifdef HAVE_SYS_TYPES_H
725# include <sys/types.h>
726#endif
727#if HAVE_BYTESWAP_H
728#include <byteswap.h>
729#endif
730#if HAVE_NETINET_IN_H
731#include <netinet/in.h>
732#endif
733#if HAVE_NET_NH_H
734#include <net/nh.h>
735#endif
736])
dff54fed 737
dff54fed 738
ef0c727b
VK
739#--------------------------------------------------------------------
740# AIX specific checks
741#--------------------------------------------------------------------
d16cf8a5 742
ef0c727b
VK
743if test "x$PLATFORM" = "xAIX"; then
744 AC_CHECK_HEADERS([procinfo.h],,,[[ ]])
745 AC_CHECK_DECLS([getkerninfo])
746 AC_CHECK_FUNCS([getprocs64],,,[
747#if HAVE_PROCINFO_H
748#include <procinfo.h>
6cd41ceb 749#endif
ef0c727b 750 ])
7e56bf2e
VK
751fi
752
cd4c8ca3 753
ef0c727b
VK
754#--------------------------------------------------------------------
755# Check for UNICODE stuff
756#--------------------------------------------------------------------
3e39fcde 757
93571e7f 758AC_CHECK_HEADERS([wchar.h iconv.h])
3e39fcde 759AC_CHECK_SIZEOF(wchar_t)
dff54fed 760
3265ba38 761if test "x$DISABLE_ICONV" != "xyes"; then
dff54fed
VK
762 AC_CHECK_LIB(iconv, iconv,
763 [ ac_found_iconv=yes
764 LDFLAGS="$LDFLAGS -liconv"
765 ])
766 AC_CHECK_FUNCS(iconv, ac_found_iconv=yes, ac_found_iconv=no)
767else
768 ac_found_iconv=no
ef0c727b 769 CPPFLAGS="$CPPFLAGS -D__DISABLE_ICONV"
dff54fed 770fi
93571e7f
VK
771
772AC_MSG_CHECKING(whether iconv supports UCS-2-INTERNAL)
773AC_RUN_IFELSE(
774 [AC_LANG_PROGRAM([
775#if HAVE_ICONV_H
776#include <iconv.h>
777#endif
778 ], [
779 return iconv_open("UTF-8","UCS-2-INTERNAL")==(iconv_t)(-1);
780 ])
781 ],
782 [ AC_MSG_RESULT(yes)
783 AC_DEFINE(HAVE_ICONV_UCS_2_INTERNAL, 1, Define to 1 if iconv supports UCS-2-INTERNAL)
784 valid_ucs2_code="UCS-2-INTERNAL"
785 ],
786 [ AC_MSG_RESULT(no) ],
787 [ AC_MSG_RESULT(no) ]
788)
789
790AC_MSG_CHECKING(whether iconv supports UCS-2)
791AC_RUN_IFELSE(
792 [AC_LANG_PROGRAM([
793#if HAVE_ICONV_H
794#include <iconv.h>
795#endif
796 ], [
797 return iconv_open("UTF-8","UCS-2")==(iconv_t)(-1);
798 ])
799 ],
800 [ AC_MSG_RESULT(yes)
801 AC_DEFINE(HAVE_ICONV_UCS_2, 1, Define to 1 if iconv supports UCS-2)
802 valid_ucs2_code="UCS-2"
803 ],
804 [ AC_MSG_RESULT(no) ],
805 [ AC_MSG_RESULT(yes)
806 AC_DEFINE(HAVE_ICONV_UCS_2, 1, Define to 1 if iconv supports UCS-2)
807 ]
808)
809
810AC_MSG_CHECKING(whether iconv supports UCS2)
811AC_RUN_IFELSE(
812 [AC_LANG_PROGRAM([
813#if HAVE_ICONV_H
814#include <iconv.h>
815#endif
816 ], [
817 return iconv_open("UTF-8","UCS2")==(iconv_t)(-1);
818 ])
819 ],
820 [ AC_MSG_RESULT(yes)
821 AC_DEFINE(HAVE_ICONV_UCS2, 1, Define to 1 if iconv supports UCS2)
822 valid_ucs2_code="UCS2"
823 ],
824 [ AC_MSG_RESULT(no) ],
825 [ AC_MSG_RESULT(no) ]
826)
827
44bccbbc
VK
828AC_MSG_CHECKING(whether iconv supports UCS-2BE)
829AC_RUN_IFELSE(
830 [AC_LANG_PROGRAM([
831#if HAVE_ICONV_H
832#include <iconv.h>
833#endif
834 ], [
835 return iconv_open("UTF-8","UCS-2BE")==(iconv_t)(-1);
836 ])
837 ],
838 [ AC_MSG_RESULT(yes)
839 AC_DEFINE(HAVE_ICONV_UCS_2BE, 1, Define to 1 if iconv supports UCS-2BE)
840 valid_ucs2_code="UCS-2BE"
841 ],
842 [ AC_MSG_RESULT(no) ],
843 [ AC_MSG_RESULT(no) ]
844)
845
5e40a69e
VK
846AC_MSG_CHECKING(whether iconv supports ISO8859-1)
847AC_RUN_IFELSE(
848 [AC_LANG_PROGRAM([
849#if HAVE_ICONV_H
850#include <iconv.h>
851#endif
852 ], [
853 return iconv_open("UTF-8","ISO8859-1")==(iconv_t)(-1);
854 ])
855 ],
856 [ AC_MSG_RESULT(yes)
857 AC_DEFINE(HAVE_ICONV_ISO8859_1, 1, Define to 1 if iconv supports ISO8859-1)
858 ],
859 [ AC_MSG_RESULT(no) ],
860 [ AC_MSG_RESULT(no) ]
861)
862
863AC_MSG_CHECKING(whether iconv supports ISO-8859-1)
864AC_RUN_IFELSE(
865 [AC_LANG_PROGRAM([
866#if HAVE_ICONV_H
867#include <iconv.h>
868#endif
869 ], [
870 return iconv_open("UTF-8","ISO-8859-1")==(iconv_t)(-1);
871 ])
872 ],
873 [ AC_MSG_RESULT(yes)
874 AC_DEFINE(HAVE_ICONV_ISO_8859_1, 1, Define to 1 if iconv supports ISO-8859-1)
875 ],
876 [ AC_MSG_RESULT(no) ],
877 [ AC_MSG_RESULT(no) ]
878)
879
880AC_MSG_CHECKING(whether iconv supports ASCII)
881AC_RUN_IFELSE(
882 [AC_LANG_PROGRAM([
883#if HAVE_ICONV_H
884#include <iconv.h>
885#endif
886 ], [
887 return iconv_open("UTF-8","ASCII")==(iconv_t)(-1);
888 ])
889 ],
890 [ AC_MSG_RESULT(yes)
891 AC_DEFINE(HAVE_ICONV_ASCII, 1, Define to 1 if iconv supports ASCII)
892 ],
893 [ AC_MSG_RESULT(no) ],
894 [ AC_MSG_RESULT(no) ]
895)
896
93571e7f
VK
897AC_MSG_CHECKING(whether iconv supports //IGNORE)
898AC_RUN_IFELSE(
899 [AC_LANG_PROGRAM([
900#if HAVE_ICONV_H
901#include <iconv.h>
902#endif
903 ], [
904 return iconv_open("UTF-8//IGNORE","$valid_ucs2_code")==(iconv_t)(-1);
905 ])
906 ],
907 [ AC_MSG_RESULT(yes)
908 AC_DEFINE(HAVE_ICONV_IGNORE, 1, Define to 1 if iconv supports //IGNORE option)
909 ],
910 [ AC_MSG_RESULT(no) ],
911 [ AC_MSG_RESULT(no) ]
912)
3e39fcde 913
19619a35
AK
914# taken from ZSH's configure
915# Check if iconv uses const in prototype declaration
24b1570c 916if test "x$ac_found_iconv" = "xyes"; then
19619a35
AK
917 AC_CACHE_CHECK(for iconv declaration, ac_cv_iconv_const,
918 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
919 #include <iconv.h>]],
920 [[#ifdef __cplusplus
921 "C"
922 #endif
923 #if defined(__STDC__) || defined(__cplusplus)
924 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
925 #else
926 size_t iconv();
927 #endif]])],
928 [ac_cv_iconv_const=],
929 [ac_cv_iconv_const=const])])
930 AC_DEFINE_UNQUOTED([ICONV_CONST], $ac_cv_iconv_const,
931 [Define as const if the declaration of iconv() needs const.])
932fi
933
93571e7f 934if test $ac_cv_sizeof_wchar_t -eq 2; then
3e39fcde
VK
935 AC_DEFINE(HAVE_USEABLE_WCHAR_T, 1, Define to 1 if you have useable wchar_t)
936fi
937
c29360a9 938
ef0c727b 939#--------------------------------------------------------------------
ca0f4ea3
VK
940# MySQL
941#--------------------------------------------------------------------
942
943check_substr "$COMPONENTS" "mysql"
944if test $? = 0; then
9c29f76e 945 AC_CHECK_LIB(mysqlclient, mysql_init, [],
ca0f4ea3 946 [AC_MSG_ERROR(libmysqlclient is requred for MySQL support)])
9c29f76e
VK
947 AC_MSG_CHECKING(whether mysql clients can run)
948 AC_RUN_IFELSE([AC_LANG_SOURCE([[
949#include <stdio.h>
950#include <mysql.h>
951int main(void)
952{
953 MYSQL *a = mysql_init(NULL);
954 return 0;
955}
956 ]])],[],[
957 AC_MSG_RESULT(no)
958 AC_MSG_ERROR(Your MySQL client libraries aren't properly installed)
959 ],[])
ca0f4ea3
VK
960 AC_MSG_RESULT(yes)
961 AC_CHECK_FUNCS(mysql_real_escape_string)
962fi
963
964
965#--------------------------------------------------------------------
58ed4897
VK
966# PostgreSQL
967#--------------------------------------------------------------------
968
203458b7 969check_substr "$COMPONENTS" "pgsql"
58ed4897
VK
970if test $? = 0; then
971 AC_CHECK_LIB(m, floor)
972 AC_CHECK_LIB(pq, PQconnectdb, ,
973 [AC_MSG_ERROR(libpq is required for PostgreSQL support)])
974 AC_MSG_CHECKING(whether postgresql clients can run)
975 AC_RUN_IFELSE([AC_LANG_SOURCE([[
976 #include <stdio.h>
977 #include <libpq-fe.h>
978 int main(void)
979 {
980 PGconn *a = PQconnectdb("");
981 return 0;
982 }
983 ]])],[],[
984 AC_MSG_RESULT(no)
985 AC_MSG_ERROR(Your PostgreSQL client libraries aren't properly installed)
986 ],[])
987 AC_MSG_RESULT(yes)
988fi
989
990
991#--------------------------------------------------------------------
9c29f76e
VK
992# ODBC
993#--------------------------------------------------------------------
994
995check_substr "$COMPONENTS" "odbc"
996if test $? = 0; then
997 AC_CHECK_LIB(odbc, SQLAllocHandle, [],
998 [AC_MSG_ERROR(libodbc is required for ODBC support)])
999fi
1000
1001
1002#--------------------------------------------------------------------
1003# SQLite
1004#--------------------------------------------------------------------
1005
1006check_substr "$COMPONENTS" "sqlite"
1007if test $? = 0; then
1008 AC_CHECK_LIB(sqlite3, sqlite3_open, [],
1009 [AC_MSG_ERROR(libsqlite3 is required for SQLite support)])
1010fi
1011
1012
1013#--------------------------------------------------------------------
ca0f4ea3
VK
1014# Other settings
1015#--------------------------------------------------------------------
1016
1017CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DDATADIR=\\\"\${pkgdatadir}\\\" -DLIBDIR=\\\"\${libdir}\\\""
1018
1019
1020#--------------------------------------------------------------------
ef0c727b
VK
1021# Substitute variables
1022#--------------------------------------------------------------------
82fa7c5d 1023
ef0c727b
VK
1024AC_SUBST(DB_DRIVERS)
1025AC_SUBST(MODULES)
1026AC_SUBST(SUBAGENT_DIRS)
1027AC_SUBST(SERVER_TOOLS)
1028AC_SUBST(TOP_LEVEL_MODULES)
1029AC_SUBST(CONTRIB_MODULES)
1030AC_SUBST(STATIC_SUBAGENT_LIST)
1031AC_SUBST(SUBAGENT_LIBS)
1032AC_SUBST(BUILD_SERVER)
1033AC_SUBST(UNSTABLE_SUBAGENT_DIRS)
d16cf8a5 1034
ef0c727b
VK
1035#--------------------------------------------------------------------
1036# Shared libs versions
d16cf8a5
AK
1037#
1038# versioning scheme: current:revision:age
1039#
1040# current
1041# The number of the current interface exported by the library. A current
1042# value of `0', means that you are calling the interface exported by this
1043# library interface 0.
1044#
1045# revision
1046# The implementation number of the most recent interface exported by this
1047# library. In this case, a revision value of `0' means that this is the
1048# first implementation of the interface.
1049# If the next release of this library exports the same interface, but has a
1050# different implementation (perhaps some bugs have been fixed), the revision
1051# number will be higher, but current number will be the same. In that case,
1052# when given a choice, the library with the highest revision will always
1053# be used by the runtime loader.
1054#
1055# age
1056# The number of previous additional interfaces supported by this library.
1057# If age were `2', then this library can be linked into executables which
1058# were built with a release of this library that exported the current
1059# interface number, current, or any of the previous two interfaces.
1060# By definition age must be less than or equal to current. At the outset,
1061# only the first ever interface is implemented, so age can only be `0'.
ef0c727b 1062#--------------------------------------------------------------------
d16cf8a5 1063
c7d14846
VK
1064NETXMS_LIBRARY_VERSION=0:2:0
1065AC_SUBST(NETXMS_LIBRARY_VERSION)
d16cf8a5 1066
ef0c727b
VK
1067
1068#--------------------------------------------------------------------
1069# Generate output files
1070#--------------------------------------------------------------------
d16cf8a5
AK
1071
1072AC_CONFIG_FILES([
ef0c727b 1073 README
0c3c0c39
AK
1074 Makefile
1075 contrib/Makefile
0c3c0c39
AK
1076 contrib/dct/Makefile
1077 contrib/startup/Makefile
daaefaaf 1078 contrib/startup/gentoo/Makefile
0c3c0c39 1079 contrib/startup/redhat/Makefile
5de3893d 1080 contrib/startup/suse/Makefile
82fa7c5d 1081 contrib/mibs/Makefile
3f2f9f2b 1082 contrib/backgrounds/Makefile
0c3c0c39 1083 doc/Makefile
a48203d2
VK
1084 doc/internal/Makefile
1085 doc/manuals/Makefile
1086 doc/misc/Makefile
0c3c0c39
AK
1087 images/Makefile
1088 include/Makefile
1089 m4/Makefile
1090 netware/Makefile
1091 sql/Makefile
0c3c0c39
AK
1092 src/Makefile
1093 src/libnetxms/Makefile
d853cd74 1094 src/libnxsnmp/Makefile
0c3c0c39 1095 src/libnxcl/Makefile
c002b04a 1096 src/libnxsl/Makefile
1d410d50 1097 src/libnxmap/Makefile
1b1edd49
VK
1098 src/install/Makefile
1099 src/install/windows/Makefile
0c3c0c39 1100 src/console/Makefile
8c7d057b
VK
1101 src/console/nxuilib/Makefile
1102 src/console/nxuilib/res/Makefile
f7d8c3b2 1103 src/console/nxuilib/sounds/Makefile
e4d08190 1104 src/console/nxlexer/Makefile
0c3c0c39
AK
1105 src/console/win32/Makefile
1106 src/console/win32/icons/Makefile
1107 src/console/win32/res/Makefile
1108 src/console/win32starter/Makefile
672441ac 1109 src/console/nxav/Makefile
2b463d08 1110 src/console/nxav/res/Makefile
52996299
VK
1111 src/console/nxnotify/Makefile
1112 src/console/nxnotify/res/Makefile
672441ac 1113 src/console/cmdline/Makefile
2b463d08
VK
1114 src/console/PocketPC/Makefile
1115 src/console/PocketPC/res/Makefile
0c3c0c39 1116 src/nxevent/Makefile
09c70d92 1117 src/nxpush/Makefile
1e8eed7a 1118 src/nxreport/Makefile
148f47cf 1119 src/nxmibc/Makefile
f519aa3e 1120 src/nxscript/Makefile
0c3c0c39
AK
1121 src/server/Makefile
1122 src/server/core/Makefile
a551fe4d 1123 src/server/netxmsd/Makefile
0c3c0c39
AK
1124 src/server/dbdrv/Makefile
1125 src/server/dbdrv/odbc/Makefile
1126 src/server/dbdrv/mssql/Makefile
1127 src/server/dbdrv/mysql/Makefile
1128 src/server/dbdrv/pgsql/Makefile
9486b324 1129 src/server/dbdrv/sqlite/Makefile
5de3893d 1130 src/server/dbdrv/oracle/Makefile
d8f2e39b
VK
1131 src/server/smsdrv/Makefile
1132 src/server/smsdrv/generic/Makefile
0c3c0c39
AK
1133 src/server/tools/Makefile
1134 src/server/tools/nxget/Makefile
1135 src/server/tools/nxaction/Makefile
1136 src/server/tools/nxadm/Makefile
5b0c7d0d
VK
1137 src/server/tools/nxconfig/Makefile
1138 src/server/tools/nxconfig/res/Makefile
f90d7fc5 1139 src/server/tools/nxdbmgr/Makefile
d853cd74 1140 src/server/tools/nxsnmpget/Makefile
734c670f 1141 src/server/tools/nxsnmpwalk/Makefile
665b4ccf 1142 src/server/tools/nxsnmpset/Makefile
d24fdaf4 1143 src/server/tools/nxupload/Makefile
0c3c0c39
AK
1144 src/server/libnxsrv/Makefile
1145 src/agent/Makefile
1146 src/agent/core/Makefile
5795bf90 1147 src/agent/install/Makefile
0c3c0c39
AK
1148 src/agent/subagents/Makefile
1149 src/agent/subagents/linux/Makefile
1150 src/agent/subagents/sunos/Makefile
d0b5a098 1151 src/agent/subagents/aix/Makefile
9bdf494f 1152 src/agent/subagents/hpux/Makefile
0c3c0c39
AK
1153 src/agent/subagents/skeleton/Makefile
1154 src/agent/subagents/freebsd/Makefile
992ba479 1155 src/agent/subagents/openbsd/Makefile
2b23dc1e 1156 src/agent/subagents/ipso/Makefile
0c3c0c39 1157 src/agent/subagents/netware/Makefile
1bc607cc
VK
1158 src/agent/subagents/winnt/Makefile
1159 src/agent/subagents/win9x/Makefile
0c3c0c39 1160 src/agent/subagents/winperf/Makefile
93f15c2a 1161 src/agent/subagents/portCheck/Makefile
b36a6eb9 1162 src/agent/subagents/logscan/Makefile
abc48356 1163 src/agent/subagents/ping/Makefile
2f06a66e 1164 src/agent/subagents/ups/Makefile
539ab0c3
AK
1165 src/agent/subagents/ecs/Makefile
1166 src/agent/subagents/odbcquery/Makefile
5de3893d 1167 src/nxhttpd/Makefile
066afcd4
VK
1168 src/nxhttpd/static/Makefile
1169 src/nxhttpd/static/images/Makefile
4351a82a
VK
1170 src/nxhttpd/static/images/buttons/Makefile
1171 src/nxhttpd/static/images/buttons/normal/Makefile
1172 src/nxhttpd/static/images/buttons/pressed/Makefile
6db3b20b 1173 src/nxhttpd/static/images/ctrlpanel/Makefile
18928f80 1174 src/nxhttpd/static/images/objects/Makefile
fb7ce4b9 1175 src/nxhttpd/static/images/status/Makefile
0c3c0c39 1176 tools/Makefile
d16cf8a5
AK
1177])
1178
12249937
VK
1179AC_OUTPUT
1180
ef0c727b 1181echo "Updating libtool"
5cecf50e
AK
1182sed 's,$SED -e "/${host}-//g",$SED -e "s/${host}-//g",g' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool
1183
a7442678 1184
ef0c727b
VK
1185#--------------------------------------------------------------------
1186# Print summary
1187#--------------------------------------------------------------------
a7442678 1188
a7442678
AK
1189echo
1190echo
1191echo
1192echo '---------------------------------------------------------------------'
1193echo ' Configure results'
1194echo '---------------------------------------------------------------------'
1195echo
1196 echo "Prefix : ${prefix}"
1197if test "x${BUILD_SERVER}" = "xyes"; then
1198 echo "Build Server : YES"
1199else
1200 echo "Build Server : NO"
1201fi
1202if test "x${ac_cv_lib_crypto_RSA_new}" = "xyes"; then
1203 echo "Encryption enabled : YES"
1204else
1205 echo "Encryption enabled : NO"
1206fi
1207if test "x${DB_DRIVERS}" != "x"; then
1010cff7 1208 echo "Build DB-Drivers :${DB_DRIVERS}"
a7442678
AK
1209else
1210 echo "Build DB-Drivers : NO"
1211fi
1212if test "x${BUILD_CLIENT}" = "xyes"; then
1213 echo "Build Clients : YES"
1214else
1215 echo "Build Clients : NO"
1216fi
ef0c727b 1217if test "x${BUILD_NXHTTPD}" = "xyes"; then
2654e540
AK
1218 echo "Build Web Interface : YES"
1219else
c2503081 1220 echo "Build Web Interface : NO"
2654e540 1221fi
a7442678
AK
1222if test "x${BUILD_AGENT}" = "xyes"; then
1223 echo "Build Agent : YES"
1224 echo "Subagents list : ${SUBAGENT_DIRS}"
1225else
1226 echo "Build Agent : NO"
1227fi
e8636669
VK
1228if test "x${BUILD_STATIC_AGENT}" = "xyes"; then
1229 echo "Build Static Agent : YES"
1230 echo "Subagents list : ${STATIC_SUBAGENT_LIST}"
1231else
1232 echo "Build Static Agent : NO"
1233fi