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