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