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