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