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