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