Commit | Line | Data |
---|---|---|
17d715ba | 1 | # $Id: configure.ac,v 1.203 2006-10-11 21:12:49 victor Exp $ |
d16cf8a5 AK |
2 | # |
3 | # Process this file with autoconf to produce a configure script. | |
4 | # | |
5 | ||
dbb51c0d | 6 | AC_INIT([NetXMS], [0.2.14-rc5], [NetXMS Team <bugs@netxms.org>]) |
ba1d810c AK |
7 | AC_CONFIG_AUX_DIR(config) |
8 | AM_CONFIG_HEADER(config.h) | |
d16cf8a5 AK |
9 | AM_INIT_AUTOMAKE |
10 | ||
c29360a9 | 11 | ALL_STATIC_FLAG="" |
5387ff75 VK |
12 | |
13 | # -------------------------------------------------------------------------- | |
14 | # checks for programs. | |
15 | ||
16 | AC_PROG_CC | |
17 | AC_PROG_CPP | |
18 | AC_PROG_CXX | |
19 | AC_PROG_INSTALL | |
b32538f9 VK |
20 | AC_PROG_LEX |
21 | AC_PROG_YACC | |
882e43d4 | 22 | AC_PROG_LN_S |
5387ff75 | 23 | |
e0760102 | 24 | # -------------------------------------------------------------------------- |
d3c8926d | 25 | # Misc. settings |
16dff090 | 26 | #CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1 -D_THREAD_SAFE" |
463b332e | 27 | CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1 -D_THREAD_SAFE" |
e8636669 | 28 | SUBAGENT_LIBS="" |
5387ff75 | 29 | |
d3c8926d VK |
30 | # -------------------------------------------------------------------------- |
31 | # disable C++ exceptions | |
32 | ||
16dff090 VK |
33 | if test "x$CC" = "xgcc" ; then |
34 | ||
d3c8926d VK |
35 | AC_LANG_PUSH([C++]) |
36 | ||
44adbac8 | 37 | AC_MSG_CHECKING(whether C++ compiler accepts -fno-rtti) |
6cd235ca AK |
38 | OLD_CXXFLGAS="$CXXFLAGS" |
39 | CXXFLAGS="$CXXFLAGS -fno-rtti" | |
d3c8926d VK |
40 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], |
41 | [ AC_MSG_RESULT(yes) ], | |
42 | [ | |
6cd235ca | 43 | CXXFLAGS="$OLD_CXXFLAGS" |
d3c8926d VK |
44 | AC_MSG_RESULT(no) |
45 | ]) | |
46 | ||
44adbac8 | 47 | AC_MSG_CHECKING(whether C++ compiler accepts -fno-exceptions) |
6cd235ca AK |
48 | OLD_CXXFLGAS="$CXXFLAGS" |
49 | CXXFLAGS="$CXXFLAGS -fno-exceptions" | |
d3c8926d VK |
50 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], |
51 | [ AC_MSG_RESULT(yes) ], | |
52 | [ | |
6cd235ca | 53 | CXXFLAGS="$OLD_CXXFLAGS" |
d3c8926d VK |
54 | AC_MSG_RESULT(no) |
55 | ]) | |
56 | ||
57 | AC_LANG_POP([C++]) | |
58 | ||
16dff090 VK |
59 | fi |
60 | ||
7c9c94a7 | 61 | # -------------------------------------------------------------------------- |
16dff090 | 62 | # set CPPFLAGS and LDFLAGS depending on OS |
7c9c94a7 VK |
63 | |
64 | case `uname -s` in | |
65 | AIX) | |
66 | LDFLAGS="-no-undefined $LDFLAGS" | |
67 | ;; | |
16dff090 | 68 | HP-UX) |
17d715ba | 69 | CPPFLAGS="$CPPFLAGS -D_HPUX -D_HPUX_SOURCE" |
dbb51c0d | 70 | if test "x$CXX" = "xaCC"; then |
44bccbbc | 71 | CXXFLAGS="$CXXFLAGS +W749 +W829" |
dbb51c0d | 72 | fi |
16dff090 | 73 | ;; |
7c9c94a7 VK |
74 | *) |
75 | ;; | |
76 | esac | |
77 | ||
d16cf8a5 AK |
78 | # -------------------------------------------------------------------------- |
79 | # misc | |
80 | ||
81 | AC_ARG_VAR(PERL,local path to the perl interpreter) | |
82 | perl_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/perl/bin:/opt/perl/usr/bin:/opt/perl/usr/local/bin" | |
83 | AC_PATH_PROG(PERL,perl,/usr/bin/env perl,$perl_possible_path) | |
84 | ||
85 | if test -d /usr/local/include; then | |
86 | CFLAGS="$CFLAGS -I/usr/local/include" | |
2cb1fb26 | 87 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
d16cf8a5 AK |
88 | fi |
89 | ||
90 | if test -d /usr/kerberos/include; then | |
91 | CFLAGS="$CFLAGS -I/usr/kerberos/include" | |
2cb1fb26 | 92 | CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" |
d16cf8a5 | 93 | fi |
521d90e7 | 94 | |
d16cf8a5 AK |
95 | if test -d /usr/local/lib; then |
96 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | |
97 | fi | |
98 | ||
4acb9f75 VK |
99 | # -------------------------------------------------------------------------- |
100 | # check for zlib | |
101 | ||
102 | AC_CHECK_LIB(z, deflate) | |
103 | ||
d16cf8a5 AK |
104 | # -------------------------------------------------------------------------- |
105 | # command line options | |
106 | ||
9486b324 VK |
107 | AC_ARG_WITH(sqlite, |
108 | [AS_HELP_STRING(--with-sqlite,build SQLite database driver)], | |
109 | [ if test "x$withval" != "xno" ; then | |
110 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
111 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
112 | LDFLAGS="$LDFLAGS -L${withval}/lib" | |
113 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
114 | fi | |
115 | DYNAMIC_COMPONENTS="yes" | |
116 | with_sqlite="yes" | |
117 | AC_DEFINE(WITH_SQLITE,,[with sqlite]) | |
118 | DB_DRIVERS="$DB_DRIVERS sqlite" | |
119 | AC_CHECK_LIB(sqlite3, sqlite3_open, , | |
120 | [AC_MSG_ERROR(libsqlite3 is required for SQLite support)]) | |
121 | fi ]) | |
122 | ||
c4b88c3d VK |
123 | AC_ARG_WITH(odbc, |
124 | [AS_HELP_STRING(--with-odbc,build ODBC database driver)], | |
125 | [ if test "x$withval" != "xno" ; then | |
126 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
127 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
128 | LDFLAGS="$LDFLAGS -L${withval}/lib" | |
129 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
130 | fi | |
e8636669 | 131 | DYNAMIC_COMPONENTS="yes" |
c4b88c3d VK |
132 | with_odbc="yes" |
133 | AC_DEFINE(WITH_ODBC,,[with odbc]) | |
134 | DB_DRIVERS="$DB_DRIVERS odbc" | |
135 | AC_CHECK_LIB(odbc, SQLAllocHandle, , | |
b11f69d6 | 136 | [AC_MSG_ERROR(libodbc is required for ODBC support)]) |
c4b88c3d VK |
137 | fi ]) |
138 | ||
d16cf8a5 | 139 | AC_ARG_WITH(mysql, |
c4b88c3d | 140 | [AS_HELP_STRING(--with-mysql,build MySQL database driver)], |
d16cf8a5 AK |
141 | [ if test "x$withval" != "xno" ; then |
142 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
143 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
144 | LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib" | |
6693a1d0 | 145 | CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include" |
d16cf8a5 | 146 | else |
007ae516 VK |
147 | 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}" |
148 | 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 | 149 | 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 | 150 | fi |
e8636669 | 151 | DYNAMIC_COMPONENTS="yes" |
d16cf8a5 | 152 | AC_CHECK_LIB(m, floor) |
d16cf8a5 AK |
153 | with_mysql="yes" |
154 | AC_DEFINE(WITH_MYSQL,,[with mysql]) | |
6693a1d0 | 155 | DB_DRIVERS="$DB_DRIVERS mysql" |
d16cf8a5 | 156 | AC_CHECK_LIB(mysqlclient, mysql_init, , |
b11f69d6 | 157 | [AC_MSG_ERROR(libmysqlclient is requred for MySQL support)]) |
d16cf8a5 AK |
158 | AC_MSG_CHECKING(whether mysql clients can run) |
159 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | |
160 | #include <stdio.h> | |
161 | #include <mysql.h> | |
162 | int main(void) | |
163 | { | |
164 | MYSQL *a = mysql_init(NULL); | |
165 | return 0; | |
166 | } | |
167 | ]])],[],[ | |
168 | AC_MSG_RESULT(no) | |
169 | AC_MSG_ERROR(Your MySQL client libraries aren't properly installed) | |
170 | ],[]) | |
171 | AC_MSG_RESULT(yes) | |
172 | AC_CHECK_FUNCS(mysql_real_escape_string) | |
6693a1d0 | 173 | fi ]) |
d16cf8a5 AK |
174 | |
175 | AC_ARG_WITH(pgsql, | |
c4b88c3d | 176 | [AS_HELP_STRING(--with-pgsql,build PostgreSQL database driver)], |
d16cf8a5 | 177 | [ if test "x$withval" != "xno" ; then |
6693a1d0 AK |
178 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then |
179 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
180 | LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/pgsql -L${withval}/lib/postgresql -L${withval}/pgsql/lib -L${withval}/postgresql/lib" | |
181 | CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/pgsql -I${withval}/include/postgresql -I${withval}/pgsql/include -I${withval}/postgresql/include" | |
182 | else | |
007ae516 VK |
183 | 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}" |
184 | 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 |
185 | 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" |
186 | fi | |
e8636669 | 187 | DYNAMIC_COMPONENTS="yes" |
6693a1d0 | 188 | AC_CHECK_LIB(m, floor) |
6693a1d0 AK |
189 | with_pgsql="yes" |
190 | DB_DRIVERS="$DB_DRIVERS pgsql" | |
191 | AC_DEFINE(WITH_PGSQL,,[with pgsql]) | |
192 | AC_CHECK_LIB(pq, PQconnectdb, , | |
b11f69d6 | 193 | [AC_MSG_ERROR(libpq is required for PostgreSQL support)]) |
6693a1d0 AK |
194 | AC_MSG_CHECKING(whether postgresql clients can run) |
195 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | |
196 | #include <stdio.h> | |
197 | #include <libpq-fe.h> | |
198 | int main(void) | |
199 | { | |
200 | PGconn *a = PQconnectdb(""); | |
201 | return 0; | |
202 | } | |
203 | ]])],[],[ | |
204 | AC_MSG_RESULT(no) | |
205 | AC_MSG_ERROR(Your PostgreSQL client libraries aren't properly installed) | |
206 | ],[]) | |
207 | AC_MSG_RESULT(yes) | |
208 | fi ]) | |
d16cf8a5 | 209 | |
3a7ce527 AK |
210 | AC_ARG_WITH(server, |
211 | [AS_HELP_STRING(--with-server,build server)], | |
212 | [ | |
1d410d50 | 213 | MODULES="$MODULES libnxmap libnxsnmp libnxsl server nxmibc nxscript" |
abc48356 | 214 | TOP_LEVEL_MODULES="$TOP_LEVEL_MODULES sql images" |
3f2f9f2b | 215 | CONTRIB_MODULES="$CONTRIB_MODULES mibs backgrounds" |
08ffa53e | 216 | BUILD_SERVER="yes" |
e8636669 | 217 | DYNAMIC_COMPONENTS="yes" |
3a7ce527 | 218 | ]) |
3a7ce527 AK |
219 | |
220 | ||
e0760102 VK |
221 | AC_ARG_WITH(client, |
222 | [AS_HELP_STRING(--with-client,build client library and tools)], | |
223 | [ | |
1d410d50 | 224 | MODULES="$MODULES libnxmap libnxcl nxevent nxreport console" |
e0760102 | 225 | BUILD_CLIENT="yes" |
e8636669 | 226 | DYNAMIC_COMPONENTS="yes" |
e0760102 VK |
227 | ]) |
228 | ||
229 | ||
d8ca9c03 VK |
230 | AC_ARG_WITH(mdebug, |
231 | [AS_HELP_STRING(--with-mdebug,use debug version of memory allocation functions)], | |
232 | [ | |
233 | CFLAGS="$CFLAGS -DNETXMS_MEMORY_DEBUG" | |
234 | CPPFLAGS="$CPPFLAGS -DNETXMS_MEMORY_DEBUG" | |
235 | ]) | |
236 | ||
237 | ||
3a7ce527 AK |
238 | SUBAGENT_DIRS="" |
239 | AC_ARG_WITH(agent, | |
240 | [AS_HELP_STRING(--with-agent,build agent)], | |
241 | [ | |
a7442678 | 242 | BUILD_AGENT=yes |
0c3c0c39 | 243 | MODULES="$MODULES agent" |
3a7ce527 AK |
244 | case `uname -s` in |
245 | Linux) | |
246 | SUBAGENT_DIRS="linux" | |
247 | ;; | |
248 | FreeBSD) | |
249 | SUBAGENT_DIRS="freebsd" | |
250 | ;; | |
992ba479 AK |
251 | OpenBSD) |
252 | SUBAGENT_DIRS="openbsd" | |
253 | ;; | |
3a7ce527 AK |
254 | SunOS) |
255 | SUBAGENT_DIRS="sunos" | |
256 | ;; | |
d0b5a098 VK |
257 | AIX) |
258 | SUBAGENT_DIRS="aix" | |
259 | ;; | |
9bdf494f AK |
260 | HP-UX) |
261 | SUBAGENT_DIRS="hpux" | |
262 | ;; | |
3a7ce527 AK |
263 | *) |
264 | # unknown | |
265 | ;; | |
266 | esac | |
e8636669 VK |
267 | DYNAMIC_COMPONENTS="yes" |
268 | ]) | |
269 | ||
270 | AC_ARG_WITH(static-agent, | |
271 | [AS_HELP_STRING(--with-static-agent,build statically linked agent)], | |
272 | [ | |
2b23dc1e VK |
273 | BUILD_STATIC_AGENT="yes" |
274 | MODULES="$MODULES agent" | |
e8636669 VK |
275 | CFLAGS="$CFLAGS -D_STATIC_AGENT" |
276 | CPPFLAGS="$CPPFLAGS -D_STATIC_AGENT" | |
c29360a9 VK |
277 | LDFLAGS="$LDFLAGS" |
278 | ALL_STATIC_FLAG="-all-static" | |
279 | #STATIC_SUBAGENT_LIST="ping portcheck" | |
e8636669 VK |
280 | case `uname -s` in |
281 | Linux) | |
282 | SUBAGENT_DIRS="linux" | |
d0b5a098 VK |
283 | SUBAGENT_LIBS="../subagents/linux/libnsm_linux.la" |
284 | STATIC_SUBAGENT_LIST="linux $STATIC_SUBAGENT_LIST" | |
e8636669 VK |
285 | ;; |
286 | FreeBSD) | |
287 | SUBAGENT_DIRS="freebsd" | |
d0b5a098 VK |
288 | SUBAGENT_LIBS="../subagents/freebsd/libnsm_freebsd.la" |
289 | STATIC_SUBAGENT_LIST="freebsd $STATIC_SUBAGENT_LIST" | |
e8636669 | 290 | ;; |
992ba479 AK |
291 | OpenBSD) |
292 | SUBAGENT_DIRS="openbsd" | |
293 | SUBAGENT_LIBS="../subagents/openbsd/libnsm_openbsd.la" | |
294 | STATIC_SUBAGENT_LIST="openbsd $STATIC_SUBAGENT_LIST" | |
295 | ;; | |
e8636669 VK |
296 | SunOS) |
297 | SUBAGENT_DIRS="sunos" | |
d0b5a098 VK |
298 | SUBAGENT_LIBS="../subagents/sunos/libnsm_sunos.la" |
299 | STATIC_SUBAGENT_LIST="sunos $STATIC_SUBAGENT_LIST" | |
300 | ;; | |
301 | AIX) | |
302 | SUBAGENT_DIRS="aix" | |
303 | SUBAGENT_LIBS="../subagents/aix/libnsm_aix.la" | |
304 | STATIC_SUBAGENT_LIST="aix $STATIC_SUBAGENT_LIST" | |
e8636669 | 305 | ;; |
c29360a9 VK |
306 | HP-UX) |
307 | SUBAGENT_DIRS="hpux" | |
308 | SUBAGENT_LIBS="../subagents/hpux/libnsm_hpux.la" | |
309 | STATIC_SUBAGENT_LIST="hpux $STATIC_SUBAGENT_LIST" | |
310 | ;; | |
e8636669 VK |
311 | *) |
312 | # unknown | |
313 | ;; | |
314 | esac | |
3a7ce527 | 315 | ]) |
0c3c0c39 | 316 | |
2b23dc1e VK |
317 | AC_ARG_WITH(ipso-agent, |
318 | [AS_HELP_STRING(--with-ipso-agent,build statically linked IPSO agent)], | |
319 | [ | |
320 | BUILD_STATIC_AGENT="yes" | |
321 | MODULES="$MODULES agent" | |
322 | CFLAGS="$CFLAGS -D_STATIC_AGENT -D_IPSO" | |
323 | CPPFLAGS="$CPPFLAGS -D_STATIC_AGENT -D_IPSO" | |
324 | LDFLAGS="$LDFLAGS -all-static" | |
325 | STATIC_SUBAGENT_LIST="ipso ping portcheck ups" | |
2a1e4b34 | 326 | SUBAGENT_DIRS="ipso" |
2b23dc1e VK |
327 | SUBAGENT_LIBS="../subagents/ipso/libnsm_ipso.la ../subagents/ping/libnsm_ping.la ../subagents/portCheck/libnsm_portCheck.la ../subagents/ups/libnsm_ups.la" |
328 | ]) | |
329 | ||
c688d2a7 | 330 | UNSTABLE_SUBAGENT_DIRS="" |
59ec7d94 | 331 | AC_ARG_ENABLE(unstable, |
0c78251f | 332 | [AS_HELP_STRING(--enable-unstable,build experimental/unstable components)], |
c688d2a7 AK |
333 | [ |
334 | UNSTABLE_SUBAGENT_DIRS="logscan" | |
335 | ]) | |
336 | ||
0c3c0c39 AK |
337 | AC_ARG_WITH(dist, |
338 | [AS_HELP_STRING(--with-dist,for maintainers only)], | |
c2eaebc6 | 339 | DB_DRIVERS="mysql pgsql odbc mssql sqlite" |
1d410d50 | 340 | MODULES="libnxsnmp libnxsl server agent libnxmap libnxcl nxevent nxreport nxmibc console nxhttpd nxscript" |
24b1570c | 341 | SUBAGENT_DIRS="linux freebsd openbsd sunos aix ipso hpux" |
5b0c7d0d | 342 | NXCONFIG="nxconfig" |
abc48356 | 343 | TOP_LEVEL_MODULES="sql images" |
3f2f9f2b | 344 | CONTRIB_MODULES="mibs backgrounds" |
a22ba463 | 345 | UNSTABLE_SUBAGENT_DIRS="logscan" |
0c3c0c39 AK |
346 | ) |
347 | ||
2654e540 | 348 | AC_ARG_WITH(nxhttpd, |
9b648a2f | 349 | [AS_HELP_STRING(--with-nxhttpd,build web interface)], |
b97191d2 | 350 | [ |
987b646a | 351 | if test "x$withval" != "xno" ; then |
1d410d50 | 352 | MODULES="$MODULES libnxmap libnxcl nxhttpd" |
987b646a AK |
353 | BUILD_WEB_CLIENT="yes" |
354 | DYNAMIC_COMPONENTS="yes" | |
355 | fi | |
b97191d2 AK |
356 | ]) |
357 | ||
a7442678 AK |
358 | AC_ARG_WITH(openssl, |
359 | [AS_HELP_STRING(--with-openssl,specify OpenSSL location)], | |
360 | [ | |
a7442678 AK |
361 | if test "x$withval" != "xno" ; then |
362 | if test "x$withval" != "x" && test "x$withval" != "xyes" ; then | |
363 | LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}" | |
364 | LDFLAGS="$LDFLAGS -L${withval}/lib" | |
365 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | |
366 | else | |
2b23dc1e | 367 | LD_RUN_PATH="/usr/local/lib:/opt/openssl/lib:/usr/local/ssl/lib:${LD_RUN_PATH:+:}${LD_RUN_PATH}" |
a7442678 AK |
368 | LDFLAGS="$LDFLAGS -L/usr/local/lib -L/opt/openssl/lib" |
369 | CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/opt/openssl/include" | |
370 | fi | |
ad6eb83b AK |
371 | AC_CHECK_LIB(crypto, RSA_new, |
372 | [ | |
373 | AC_DEFINE(WITH_OPENSSL,,[with openssl]) | |
374 | AC_CHECK_LIB(crypto, EVP_aes_256_cbc, | |
375 | [], [AC_DEFINE(NETXMS_NO_AES,,[desc])]) | |
376 | AC_CHECK_LIB(crypto, EVP_bf_cbc, | |
377 | [], [AC_DEFINE(NETXMS_NO_BF,,[desc])]) | |
378 | AC_CHECK_LIB(crypto, EVP_idea_cbc, | |
379 | [], [AC_DEFINE(NETXMS_NO_IDEA,,[desc])]) | |
380 | AC_CHECK_LIB(crypto, EVP_des_ede3_cbc, | |
381 | [], [AC_DEFINE(NETXMS_NO_DES,,[desc])]) | |
382 | ], | |
a7442678 AK |
383 | [AC_MSG_ERROR(libcrypto is required for encryption support)]) |
384 | fi | |
a7442678 | 385 | ], |
ad6eb83b AK |
386 | [ |
387 | AC_CHECK_LIB(crypto, RSA_new, | |
388 | [ | |
389 | AC_DEFINE(WITH_OPENSSL,,[with openssl]) | |
390 | AC_CHECK_LIB(crypto, EVP_aes_256_cbc, | |
391 | [], [AC_DEFINE(NETXMS_NO_AES,,[desc])]) | |
392 | AC_CHECK_LIB(crypto, EVP_bf_cbc, | |
393 | [], [AC_DEFINE(NETXMS_NO_BF,,[desc])]) | |
394 | AC_CHECK_LIB(crypto, EVP_idea_cbc, | |
395 | [], [AC_DEFINE(NETXMS_NO_IDEA,,[desc])]) | |
396 | AC_CHECK_LIB(crypto, EVP_des_ede3_cbc, | |
397 | [], [AC_DEFINE(NETXMS_NO_DES,,[desc])]) | |
398 | ], | |
399 | [AC_MSG_RESULT(libcrypto is required for encryption support)]) | |
400 | ]) | |
6619a6b0 | 401 | |
0c3c0c39 AK |
402 | AC_SUBST(DB_DRIVERS) |
403 | AC_SUBST(MODULES) | |
3a7ce527 | 404 | AC_SUBST(SUBAGENT_DIRS) |
5b0c7d0d | 405 | AC_SUBST(NXCONFIG) |
abc48356 VK |
406 | AC_SUBST(TOP_LEVEL_MODULES) |
407 | AC_SUBST(CONTRIB_MODULES) | |
e8636669 VK |
408 | AC_SUBST(STATIC_SUBAGENT_LIST) |
409 | AC_SUBST(SUBAGENT_LIBS) | |
c2eaebc6 | 410 | AC_SUBST(BUILD_SERVER) |
c688d2a7 | 411 | AC_SUBST(UNSTABLE_SUBAGENT_DIRS) |
e8636669 VK |
412 | |
413 | # -------------------------------------------------------------------------- | |
414 | # If --with-static-agent selected, other components cannot be selected | |
415 | # Select shared or static libraries depending on agent build type | |
416 | if test "x$BUILD_STATIC_AGENT" = "xyes" ; then | |
417 | if test "x$DYNAMIC_COMPONENTS" = "xyes" ; then | |
418 | AC_MSG_ERROR(Static agent and other components are mutally exclusive.) | |
419 | fi | |
172b3b8e | 420 | enable_shared=no |
e8636669 | 421 | else |
172b3b8e | 422 | enable_static=no |
e8636669 VK |
423 | fi |
424 | ||
425 | AC_LIBTOOL_DLOPEN | |
426 | AC_PROG_LIBTOOL | |
3a7ce527 | 427 | |
d16cf8a5 AK |
428 | # -------------------------------------------------------------------------- |
429 | # checks for libs. | |
430 | ||
431 | #AC_CHECK_LIB([socket], [socket]) | |
432 | #AC_CHECK_LIB([nsl], [gethostbyname]) | |
433 | ||
521d90e7 | 434 | AC_CHECK_LIB(socket, if_nameindex) |
87bb64a7 | 435 | AC_CHECK_LIB(dl, dlopen) |
1b3c0ef0 | 436 | AC_CHECK_LIB(kstat, kstat_open) |
d16cf8a5 | 437 | |
e0760102 VK |
438 | if test "x$BUILD_SERVER" = "xyes" ; then |
439 | AC_CHECK_LIB(termcap, tgetstr, [], [AC_CHECK_LIB(ncurses, tgetstr, [], AC_CHECK_LIB(curses, tgetstr))]) | |
440 | AC_CHECK_LIB(readline, readline) | |
441 | fi | |
442 | ||
d16cf8a5 AK |
443 | # -------------------------------------------------------------------------- |
444 | # checks for headers. | |
445 | ||
446 | AC_HEADER_STDC | |
447 | AC_HEADER_STAT | |
448 | AC_HEADER_TIME | |
6b42b6f1 | 449 | AC_CHECK_HEADERS([stdarg.h]) |
ade50e8b | 450 | AC_CHECK_HEADERS([sys/int_types.h sys/time.h]) |
ca6ad6bb | 451 | AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h net/nh.h sys/socket.h]) |
70fed300 | 452 | AC_CHECK_HEADERS([fcntl.h dirent.h sys/ioctl.h sys/sockio.h poll.h termios.h]) |
ade50e8b AK |
453 | AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h],,, |
454 | [[#ifdef HAVE_SYS_TYPES_H | |
455 | # include <sys/types.h> | |
456 | #endif | |
457 | #ifdef HAVE_SYS_TIME_H | |
458 | # include <sys/time.h> | |
459 | #endif | |
460 | #ifdef HAVE_SYS_SOCKET_H | |
461 | # include <sys/socket.h> | |
462 | #endif | |
463 | ]]) | |
14ab1131 | 464 | AC_CHECK_HEADERS([readline/readline.h]) |
f52be742 | 465 | AC_CHECK_HEADERS([byteswap.h]) |
eca0b061 | 466 | AC_CHECK_HEADERS([sys/mman.h]) |
31a11006 | 467 | AC_CHECK_HEADERS([sys/utsname.h]) |
d16cf8a5 | 468 | |
d16cf8a5 AK |
469 | # -------------------------------------------------------------------------- |
470 | # types | |
471 | AC_CHECK_SIZEOF(short) | |
472 | AC_CHECK_SIZEOF(int) | |
473 | AC_CHECK_SIZEOF(long) | |
474 | AC_CHECK_SIZEOF(long long) | |
475 | ||
476 | AC_TYPE_PID_T | |
477 | AC_TYPE_SIGNAL | |
478 | AC_TYPE_SIZE_T | |
479 | AC_STRUCT_TIMEZONE | |
480 | ||
521d90e7 | 481 | AC_CHECK_TYPES([int64_t, uint64_t, u_int64_t]) |
4c779d83 VK |
482 | AC_CHECK_TYPES([off_t, socklen_t],,,[ |
483 | #if HAVE_SYS_TYPES_H | |
484 | #include <sys/types.h> | |
485 | #endif | |
486 | #if HAVE_SYS_SOCKET_H | |
487 | #include <sys/socket.h> | |
488 | #endif | |
489 | ]) | |
521d90e7 | 490 | |
d16cf8a5 AK |
491 | # -------------------------------------------------------------------------- |
492 | # C/CPP caps | |
493 | ||
494 | AC_PROG_GCC_TRADITIONAL | |
495 | AC_C_CONST | |
496 | AC_C_BIGENDIAN | |
497 | ||
f52be742 VK |
498 | # -------------------------------------------------------------------------- |
499 | # macros | |
500 | ||
ca6ad6bb VK |
501 | AC_CHECK_DECLS([__bswap_32, __bswap_64, htonll, ntohll],,,[ |
502 | #ifdef HAVE_SYS_TYPES_H | |
503 | # include <sys/types.h> | |
504 | #endif | |
f52be742 VK |
505 | #if HAVE_BYTESWAP_H |
506 | #include <byteswap.h> | |
507 | #endif | |
ca6ad6bb VK |
508 | #if HAVE_NETINET_IN_H |
509 | #include <netinet/in.h> | |
510 | #endif | |
511 | #if HAVE_NET_NH_H | |
512 | #include <net/nh.h> | |
513 | #endif | |
f52be742 | 514 | ]) |
85303064 VK |
515 | AC_CHECK_DECLS([SIOCGIFADDR, SIOCGIFNETMASK, SIOCGIFHWADDR],,,[ |
516 | #if HAVE_SYS_IOCTL_H | |
517 | #include <sys/ioctl.h> | |
518 | #endif | |
519 | #if HAVE_SYS_SOCKIO_H | |
520 | #include <sys/sockio.h> | |
521 | #endif | |
522 | ]) | |
f52be742 | 523 | |
e25cadc9 VK |
524 | # -------------------------------------------------------------------------- |
525 | # AIX specific | |
526 | ||
ca6ad6bb | 527 | AC_CHECK_HEADERS([procinfo.h],,,[[ ]]) |
e25cadc9 | 528 | AC_CHECK_DECLS([getkerninfo]) |
ca6ad6bb VK |
529 | AC_CHECK_FUNCS([getprocs64],,,[ |
530 | #if HAVE_PROCINFO_H | |
531 | #include <procinfo.h> | |
532 | #endif | |
533 | ]) | |
e25cadc9 | 534 | |
d16cf8a5 AK |
535 | # -------------------------------------------------------------------------- |
536 | # library functions | |
537 | ||
538 | AC_FUNC_ERROR_AT_LINE | |
abc48356 VK |
539 | #AC_FUNC_MALLOC |
540 | #AC_FUNC_REALLOC | |
d16cf8a5 | 541 | AC_FUNC_MEMCMP |
d16cf8a5 AK |
542 | AC_FUNC_SELECT_ARGTYPES |
543 | AC_FUNC_STRFTIME | |
544 | AC_FUNC_STRTOD | |
545 | AC_FUNC_VPRINTF | |
546 | ||
b50f1100 VK |
547 | AC_CHECK_FUNCS([gettimeofday memmove memset strchr strcspn strdup strerror]) |
548 | AC_CHECK_FUNCS([strrchr strtol strtoul strtoll strtoull]) | |
467e30e1 | 549 | AC_CHECK_FUNCS([if_nametoindex daemon mmap strerror_r scandir uname poll]) |
d16cf8a5 | 550 | |
2a1e4b34 | 551 | AC_CHECK_HEADERS([sys/sysctl.h vm/vm_param.h]) |
f91feddc | 552 | AC_CHECK_FUNCS([sysctlbyname sysctlnametomib]) |
2a1e4b34 | 553 | |
70fed300 AK |
554 | AC_CHECK_FUNCS([tcgetattr tcsetattr cfsetospeed cfsetispeed]) |
555 | ||
d16cf8a5 AK |
556 | # sockets/resolver (probably for solaris) |
557 | AC_CHECK_FUNC(connect, , [AC_CHECK_LIB(socket, connect)]) | |
558 | AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(resolv, gethostbyname)]) | |
559 | AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname)]) | |
560 | ||
561 | if test "x$ac_cv_lib_nsl_gethostbyname" != "xyes" && test "x$ac_cv_func_gethostbyname" != "xyes" ; then | |
562 | AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(socket, gethostbyname)]) | |
563 | fi | |
564 | ||
565 | if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname" ; then | |
566 | AC_MSG_CHECKING([if we can include libnsl + libsocket]) | |
567 | LIBS="-lnsl -lsocket $LIBS" | |
568 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[(void) gethostbyname]])],[my_ac_link_result=yes],[my_ac_link_result=no ]) | |
569 | if test "$my_ac_link_result" = "no" ; then | |
570 | AC_MSG_RESULT([failure]) | |
571 | AC_MSG_ERROR([unable to use gethostbyname()]) | |
572 | else | |
573 | AC_MSG_RESULT([success]) | |
574 | fi | |
575 | fi | |
576 | ||
3d9b275c | 577 | #ALK: CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread", |
d16cf8a5 AK |
578 | # posix threads |
579 | AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***])) | |
580 | ||
581 | PTHREAD_LIBS=error | |
582 | AC_MSG_CHECKING(for old style FreeBSD -pthread flag) | |
583 | AC_EGREP_CPP(yes, | |
a910e139 | 584 | [#if defined(__FreeBSD_cc_version) || defined(__OpenBSD__) |
d16cf8a5 AK |
585 | yes |
586 | #endif | |
587 | ], AC_MSG_RESULT(yes) | |
6693a1d0 | 588 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread", |
d16cf8a5 AK |
589 | AC_MSG_RESULT(no)) |
590 | if test "x$PTHREAD_LIBS" = xerror; then | |
591 | AC_CHECK_LIB(pthread, pthread_attr_init, | |
6693a1d0 | 592 | PTHREAD_LIBS="-lpthread") |
d16cf8a5 AK |
593 | fi |
594 | if test "x$PTHREAD_LIBS" = xerror; then | |
595 | AC_CHECK_LIB(pthreads, pthread_attr_init, | |
6693a1d0 | 596 | PTHREAD_LIBS="-lpthreads") |
d16cf8a5 | 597 | fi |
d16cf8a5 | 598 | if test "x$PTHREAD_LIBS" = xerror; then |
6693a1d0 AK |
599 | AC_CHECK_FUNC(pthread_attr_init, |
600 | PTHREAD_LIBS="") | |
d16cf8a5 | 601 | fi |
b9e22217 AK |
602 | # HP-UX |
603 | if test "x$PTHREAD_LIBS" = xerror; then | |
8be1f708 AK |
604 | AC_CHECK_LIB(pthread, __pthread_attr_init_system, |
605 | PTHREAD_LIBS="-lpthread") | |
b9e22217 | 606 | fi |
d16cf8a5 AK |
607 | if test "x$PTHREAD_LIBS" = xerror; then |
608 | AC_MSG_ERROR(*** Unable to locate working posix thread library ***) | |
609 | fi | |
a0537937 | 610 | LDFLAGS="$LDFLAGS $PTHREAD_LIBS" |
d16cf8a5 AK |
611 | AC_SUBST(PTHREAD_LIBS) |
612 | ||
696fc54f | 613 | # Extensions to posix threads |
6cd41ceb VK |
614 | AC_CHECK_HEADERS([pthread_np.h],,,[ |
615 | #include <pthread.h> | |
616 | ]) | |
696fc54f VK |
617 | AC_CHECK_FUNCS([pthread_cond_reltimedwait_np]) |
618 | ||
a0537937 VK |
619 | # Check for recursive mutexes |
620 | AC_CHECK_FUNCS([pthread_mutexattr_settype pthread_mutexattr_setkind_np]) | |
6cd41ceb | 621 | AC_CHECK_DECLS([PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_RECURSIVE_NP, MUTEX_TYPE_COUNTING_FAST],,,[ |
a0537937 | 622 | #include <pthread.h> |
6cd41ceb VK |
623 | #if HAVE_PTHREAD_NP_H |
624 | #include <pthread_np.h> | |
625 | #endif | |
a0537937 VK |
626 | ]) |
627 | ||
7e56bf2e VK |
628 | # Check for read/write locks |
629 | # On Linux, rwlock functions declared always, but pthread_rwlock_t may need | |
630 | # additional defines | |
631 | AC_CHECK_FUNCS([pthread_rwlock_init pthread_rwlock_timedrdlock pthread_rwlock_timedwrlock]) | |
632 | if test "$ac_cv_func_pthread_rwlock_init" = "yes"; then | |
633 | AC_CACHE_CHECK([for pthread_rwlock_t], ac_cv_struct_pthread_rw, | |
634 | [AC_TRY_COMPILE([#include <sys/types.h> | |
635 | #include <pthread.h>], | |
636 | [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;], | |
637 | ac_cv_struct_pthread_rw=yes, [ | |
638 | AC_TRY_COMPILE([#define _XOPEN_SOURCE 500 | |
639 | #include <sys/types.h> | |
640 | #include <pthread.h>], | |
641 | [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;], | |
642 | ac_cv_struct_pthread_rw=yes, ac_cv_struct_pthread_rw=no) | |
643 | if test "$ac_cv_struct_pthread_rw" = "yes"; then | |
644 | CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" | |
645 | fi | |
646 | ])]) | |
647 | if test "$ac_cv_struct_pthread_rw" = "yes"; then | |
df7156b3 | 648 | AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1, Define to 1 if you have working pthread read/write locks) |
7e56bf2e VK |
649 | fi |
650 | fi | |
651 | ||
3e39fcde VK |
652 | # -------------------------------------------------------------------------- |
653 | # check for UNICODE stuff | |
654 | ||
93571e7f | 655 | AC_CHECK_HEADERS([wchar.h iconv.h]) |
3e39fcde | 656 | AC_CHECK_SIZEOF(wchar_t) |
44bccbbc VK |
657 | AC_CHECK_LIB(iconv, iconv, |
658 | [ ac_found_iconv=yes | |
659 | LDFLAGS="$LDFLAGS -liconv" | |
660 | ]) | |
24b1570c | 661 | AC_CHECK_FUNCS(iconv, ac_found_iconv=yes, ac_found_iconv=no) |
93571e7f VK |
662 | |
663 | AC_MSG_CHECKING(whether iconv supports UCS-2-INTERNAL) | |
664 | AC_RUN_IFELSE( | |
665 | [AC_LANG_PROGRAM([ | |
666 | #if HAVE_ICONV_H | |
667 | #include <iconv.h> | |
668 | #endif | |
669 | ], [ | |
670 | return iconv_open("UTF-8","UCS-2-INTERNAL")==(iconv_t)(-1); | |
671 | ]) | |
672 | ], | |
673 | [ AC_MSG_RESULT(yes) | |
674 | AC_DEFINE(HAVE_ICONV_UCS_2_INTERNAL, 1, Define to 1 if iconv supports UCS-2-INTERNAL) | |
675 | valid_ucs2_code="UCS-2-INTERNAL" | |
676 | ], | |
677 | [ AC_MSG_RESULT(no) ], | |
678 | [ AC_MSG_RESULT(no) ] | |
679 | ) | |
680 | ||
681 | AC_MSG_CHECKING(whether iconv supports UCS-2) | |
682 | AC_RUN_IFELSE( | |
683 | [AC_LANG_PROGRAM([ | |
684 | #if HAVE_ICONV_H | |
685 | #include <iconv.h> | |
686 | #endif | |
687 | ], [ | |
688 | return iconv_open("UTF-8","UCS-2")==(iconv_t)(-1); | |
689 | ]) | |
690 | ], | |
691 | [ AC_MSG_RESULT(yes) | |
692 | AC_DEFINE(HAVE_ICONV_UCS_2, 1, Define to 1 if iconv supports UCS-2) | |
693 | valid_ucs2_code="UCS-2" | |
694 | ], | |
695 | [ AC_MSG_RESULT(no) ], | |
696 | [ AC_MSG_RESULT(yes) | |
697 | AC_DEFINE(HAVE_ICONV_UCS_2, 1, Define to 1 if iconv supports UCS-2) | |
698 | ] | |
699 | ) | |
700 | ||
701 | AC_MSG_CHECKING(whether iconv supports UCS2) | |
702 | AC_RUN_IFELSE( | |
703 | [AC_LANG_PROGRAM([ | |
704 | #if HAVE_ICONV_H | |
705 | #include <iconv.h> | |
706 | #endif | |
707 | ], [ | |
708 | return iconv_open("UTF-8","UCS2")==(iconv_t)(-1); | |
709 | ]) | |
710 | ], | |
711 | [ AC_MSG_RESULT(yes) | |
712 | AC_DEFINE(HAVE_ICONV_UCS2, 1, Define to 1 if iconv supports UCS2) | |
713 | valid_ucs2_code="UCS2" | |
714 | ], | |
715 | [ AC_MSG_RESULT(no) ], | |
716 | [ AC_MSG_RESULT(no) ] | |
717 | ) | |
718 | ||
44bccbbc VK |
719 | AC_MSG_CHECKING(whether iconv supports UCS-2BE) |
720 | AC_RUN_IFELSE( | |
721 | [AC_LANG_PROGRAM([ | |
722 | #if HAVE_ICONV_H | |
723 | #include <iconv.h> | |
724 | #endif | |
725 | ], [ | |
726 | return iconv_open("UTF-8","UCS-2BE")==(iconv_t)(-1); | |
727 | ]) | |
728 | ], | |
729 | [ AC_MSG_RESULT(yes) | |
730 | AC_DEFINE(HAVE_ICONV_UCS_2BE, 1, Define to 1 if iconv supports UCS-2BE) | |
731 | valid_ucs2_code="UCS-2BE" | |
732 | ], | |
733 | [ AC_MSG_RESULT(no) ], | |
734 | [ AC_MSG_RESULT(no) ] | |
735 | ) | |
736 | ||
93571e7f VK |
737 | AC_MSG_CHECKING(whether iconv supports //IGNORE) |
738 | AC_RUN_IFELSE( | |
739 | [AC_LANG_PROGRAM([ | |
740 | #if HAVE_ICONV_H | |
741 | #include <iconv.h> | |
742 | #endif | |
743 | ], [ | |
744 | return iconv_open("UTF-8//IGNORE","$valid_ucs2_code")==(iconv_t)(-1); | |
745 | ]) | |
746 | ], | |
747 | [ AC_MSG_RESULT(yes) | |
748 | AC_DEFINE(HAVE_ICONV_IGNORE, 1, Define to 1 if iconv supports //IGNORE option) | |
749 | ], | |
750 | [ AC_MSG_RESULT(no) ], | |
751 | [ AC_MSG_RESULT(no) ] | |
752 | ) | |
3e39fcde | 753 | |
19619a35 AK |
754 | # taken from ZSH's configure |
755 | # Check if iconv uses const in prototype declaration | |
24b1570c | 756 | if test "x$ac_found_iconv" = "xyes"; then |
19619a35 AK |
757 | AC_CACHE_CHECK(for iconv declaration, ac_cv_iconv_const, |
758 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h> | |
759 | #include <iconv.h>]], | |
760 | [[#ifdef __cplusplus | |
761 | "C" | |
762 | #endif | |
763 | #if defined(__STDC__) || defined(__cplusplus) | |
764 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
765 | #else | |
766 | size_t iconv(); | |
767 | #endif]])], | |
768 | [ac_cv_iconv_const=], | |
769 | [ac_cv_iconv_const=const])]) | |
770 | AC_DEFINE_UNQUOTED([ICONV_CONST], $ac_cv_iconv_const, | |
771 | [Define as const if the declaration of iconv() needs const.]) | |
772 | fi | |
773 | ||
774 | ||
93571e7f | 775 | if test $ac_cv_sizeof_wchar_t -eq 2; then |
3e39fcde VK |
776 | AC_DEFINE(HAVE_USEABLE_WCHAR_T, 1, Define to 1 if you have useable wchar_t) |
777 | fi | |
778 | ||
c29360a9 VK |
779 | # -------------------------------------------------------------------------- |
780 | # variables | |
781 | ||
782 | AC_SUBST(ALL_STATIC_FLAG) | |
783 | ||
82fa7c5d | 784 | # misc |
f8a000b8 | 785 | CPPFLAGS="$CPPFLAGS -DDATADIR=\\\"\${pkgdatadir}\\\" -DLIBDIR=\\\"\${libdir}\\\"" |
82fa7c5d | 786 | |
d16cf8a5 AK |
787 | # -------------------------------------------------------------------------- |
788 | ||
789 | # shared libs versions | |
790 | # | |
791 | # versioning scheme: current:revision:age | |
792 | # | |
793 | # current | |
794 | # The number of the current interface exported by the library. A current | |
795 | # value of `0', means that you are calling the interface exported by this | |
796 | # library interface 0. | |
797 | # | |
798 | # revision | |
799 | # The implementation number of the most recent interface exported by this | |
800 | # library. In this case, a revision value of `0' means that this is the | |
801 | # first implementation of the interface. | |
802 | # If the next release of this library exports the same interface, but has a | |
803 | # different implementation (perhaps some bugs have been fixed), the revision | |
804 | # number will be higher, but current number will be the same. In that case, | |
805 | # when given a choice, the library with the highest revision will always | |
806 | # be used by the runtime loader. | |
807 | # | |
808 | # age | |
809 | # The number of previous additional interfaces supported by this library. | |
810 | # If age were `2', then this library can be linked into executables which | |
811 | # were built with a release of this library that exported the current | |
812 | # interface number, current, or any of the previous two interfaces. | |
813 | # By definition age must be less than or equal to current. At the outset, | |
814 | # only the first ever interface is implemented, so age can only be `0'. | |
815 | # | |
816 | # | |
817 | # | |
818 | ||
d8f2e39b VK |
819 | LIBNETXMS_LIBRARY_VERSION=0:2:0 |
820 | LIBNXCSCP_LIBRARY_VERSION=0:2:0 | |
1d410d50 VK |
821 | LIBNXMAP_LIBRARY_VERSION=0:2:0 |
822 | LIBNXCL_LIBRARY_VERSION=0:2:0 | |
d8f2e39b VK |
823 | LIBNXSNMP_LIBRARY_VERSION=0:2:0 |
824 | LIBNXSRV_LIBRARY_VERSION=0:2:0 | |
825 | LIBNXCORE_LIBRARY_VERSION=0:2:0 | |
826 | DBDRV_LIBRARY_VERSION=0:2:0 | |
827 | SMSDRV_LIBRARY_VERSION=0:2:0 | |
c002b04a | 828 | LIBNXSL_LIBRARY_VERSION=0:2:0 |
d16cf8a5 | 829 | AC_SUBST(LIBNETXMS_LIBRARY_VERSION) |
3e7f0791 | 830 | AC_SUBST(LIBNXCSCP_LIBRARY_VERSION) |
1d410d50 VK |
831 | AC_SUBST(LIBNXMAP_LIBRARY_VERSION) |
832 | AC_SUBST(LIBNXCL_LIBRARY_VERSION) | |
d853cd74 | 833 | AC_SUBST(LIBNXSNMP_LIBRARY_VERSION) |
aa3b26fd | 834 | AC_SUBST(LIBNXSRV_LIBRARY_VERSION) |
17a48052 | 835 | AC_SUBST(LIBNXCORE_LIBRARY_VERSION) |
b900a78b | 836 | AC_SUBST(DBDRV_LIBRARY_VERSION) |
d8f2e39b | 837 | AC_SUBST(SMSDRV_LIBRARY_VERSION) |
c002b04a | 838 | AC_SUBST(LIBNXSL_LIBRARY_VERSION) |
d16cf8a5 AK |
839 | |
840 | # -------------------------------------------------------------------------- | |
841 | ||
842 | AC_CONFIG_FILES([ | |
d16cf8a5 | 843 | README |
0c3c0c39 AK |
844 | Makefile |
845 | contrib/Makefile | |
0c3c0c39 AK |
846 | contrib/dct/Makefile |
847 | contrib/startup/Makefile | |
daaefaaf | 848 | contrib/startup/gentoo/Makefile |
0c3c0c39 | 849 | contrib/startup/redhat/Makefile |
82fa7c5d | 850 | contrib/mibs/Makefile |
3f2f9f2b | 851 | contrib/backgrounds/Makefile |
0c3c0c39 | 852 | doc/Makefile |
a48203d2 VK |
853 | doc/internal/Makefile |
854 | doc/manuals/Makefile | |
855 | doc/misc/Makefile | |
0c3c0c39 AK |
856 | images/Makefile |
857 | include/Makefile | |
858 | m4/Makefile | |
859 | netware/Makefile | |
860 | sql/Makefile | |
0c3c0c39 AK |
861 | src/Makefile |
862 | src/libnetxms/Makefile | |
863 | src/libnxcscp/Makefile | |
d853cd74 | 864 | src/libnxsnmp/Makefile |
0c3c0c39 | 865 | src/libnxcl/Makefile |
c002b04a | 866 | src/libnxsl/Makefile |
1d410d50 | 867 | src/libnxmap/Makefile |
1b1edd49 VK |
868 | src/install/Makefile |
869 | src/install/windows/Makefile | |
0c3c0c39 | 870 | src/console/Makefile |
8c7d057b VK |
871 | src/console/nxuilib/Makefile |
872 | src/console/nxuilib/res/Makefile | |
f7d8c3b2 | 873 | src/console/nxuilib/sounds/Makefile |
e4d08190 | 874 | src/console/nxlexer/Makefile |
0c3c0c39 AK |
875 | src/console/win32/Makefile |
876 | src/console/win32/icons/Makefile | |
877 | src/console/win32/res/Makefile | |
878 | src/console/win32starter/Makefile | |
672441ac | 879 | src/console/nxav/Makefile |
2b463d08 | 880 | src/console/nxav/res/Makefile |
52996299 VK |
881 | src/console/nxnotify/Makefile |
882 | src/console/nxnotify/res/Makefile | |
672441ac | 883 | src/console/cmdline/Makefile |
2b463d08 VK |
884 | src/console/PocketPC/Makefile |
885 | src/console/PocketPC/res/Makefile | |
0c3c0c39 | 886 | src/nxevent/Makefile |
1e8eed7a | 887 | src/nxreport/Makefile |
148f47cf | 888 | src/nxmibc/Makefile |
f519aa3e | 889 | src/nxscript/Makefile |
0c3c0c39 AK |
890 | src/server/Makefile |
891 | src/server/core/Makefile | |
a551fe4d | 892 | src/server/netxmsd/Makefile |
0c3c0c39 AK |
893 | src/server/dbdrv/Makefile |
894 | src/server/dbdrv/odbc/Makefile | |
895 | src/server/dbdrv/mssql/Makefile | |
896 | src/server/dbdrv/mysql/Makefile | |
897 | src/server/dbdrv/pgsql/Makefile | |
9486b324 | 898 | src/server/dbdrv/sqlite/Makefile |
d8f2e39b VK |
899 | src/server/smsdrv/Makefile |
900 | src/server/smsdrv/generic/Makefile | |
0c3c0c39 AK |
901 | src/server/tools/Makefile |
902 | src/server/tools/nxget/Makefile | |
903 | src/server/tools/nxaction/Makefile | |
904 | src/server/tools/nxadm/Makefile | |
5b0c7d0d VK |
905 | src/server/tools/nxconfig/Makefile |
906 | src/server/tools/nxconfig/res/Makefile | |
f90d7fc5 | 907 | src/server/tools/nxdbmgr/Makefile |
d853cd74 | 908 | src/server/tools/nxsnmpget/Makefile |
734c670f | 909 | src/server/tools/nxsnmpwalk/Makefile |
665b4ccf | 910 | src/server/tools/nxsnmpset/Makefile |
d24fdaf4 | 911 | src/server/tools/nxupload/Makefile |
0c3c0c39 AK |
912 | src/server/libnxsrv/Makefile |
913 | src/agent/Makefile | |
914 | src/agent/core/Makefile | |
5795bf90 | 915 | src/agent/install/Makefile |
0c3c0c39 AK |
916 | src/agent/subagents/Makefile |
917 | src/agent/subagents/linux/Makefile | |
918 | src/agent/subagents/sunos/Makefile | |
d0b5a098 | 919 | src/agent/subagents/aix/Makefile |
9bdf494f | 920 | src/agent/subagents/hpux/Makefile |
0c3c0c39 AK |
921 | src/agent/subagents/skeleton/Makefile |
922 | src/agent/subagents/freebsd/Makefile | |
992ba479 | 923 | src/agent/subagents/openbsd/Makefile |
2b23dc1e | 924 | src/agent/subagents/ipso/Makefile |
0c3c0c39 | 925 | src/agent/subagents/netware/Makefile |
1bc607cc VK |
926 | src/agent/subagents/winnt/Makefile |
927 | src/agent/subagents/win9x/Makefile | |
0c3c0c39 | 928 | src/agent/subagents/winperf/Makefile |
93f15c2a | 929 | src/agent/subagents/portCheck/Makefile |
b36a6eb9 | 930 | src/agent/subagents/logscan/Makefile |
abc48356 | 931 | src/agent/subagents/ping/Makefile |
2f06a66e | 932 | src/agent/subagents/ups/Makefile |
9b648a2f AK |
933 | src/nxhttpd/Makefile |
934 | src/nxhttpd/static/Makefile | |
2654e540 | 935 | src/nxhttpd/static/images/Makefile |
0c3c0c39 | 936 | tools/Makefile |
d16cf8a5 AK |
937 | ]) |
938 | ||
12249937 VK |
939 | AC_OUTPUT |
940 | ||
6f926182 AK |
941 | #echo "Updating libtool-1" |
942 | #sed 's/-lc_r/-lc_rXXX/' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool | |
5cecf50e AK |
943 | |
944 | echo "Updating libtool-2" | |
945 | sed 's,$SED -e "/${host}-//g",$SED -e "s/${host}-//g",g' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool | |
946 | ||
6f926182 AK |
947 | #if test ! "x$BUILD_SERVER" = "xyes" ; then |
948 | # echo "Updating libtool-3" | |
949 | # $PERL tools/patch_libtool.pl <libtool >libtool.new | |
950 | # mv libtool.new libtool | |
951 | # chmod 755 libtool | |
952 | #fi | |
a7442678 AK |
953 | |
954 | ||
955 | ||
956 | ########################### | |
957 | # | |
958 | echo | |
959 | echo | |
960 | echo | |
961 | echo '---------------------------------------------------------------------' | |
962 | echo ' Configure results' | |
963 | echo '---------------------------------------------------------------------' | |
964 | echo | |
965 | echo "Prefix : ${prefix}" | |
966 | if test "x${BUILD_SERVER}" = "xyes"; then | |
967 | echo "Build Server : YES" | |
968 | else | |
969 | echo "Build Server : NO" | |
970 | fi | |
971 | if test "x${ac_cv_lib_crypto_RSA_new}" = "xyes"; then | |
972 | echo "Encryption enabled : YES" | |
973 | else | |
974 | echo "Encryption enabled : NO" | |
975 | fi | |
976 | if test "x${DB_DRIVERS}" != "x"; then | |
977 | echo "Build DB-Drivers : ${DB_DRIVERS}" | |
978 | else | |
979 | echo "Build DB-Drivers : NO" | |
980 | fi | |
981 | if test "x${BUILD_CLIENT}" = "xyes"; then | |
982 | echo "Build Clients : YES" | |
983 | else | |
984 | echo "Build Clients : NO" | |
985 | fi | |
2654e540 AK |
986 | if test "x${BUILD_WEB_CLIENT}" = "xyes"; then |
987 | echo "Build Web Interface : YES" | |
988 | else | |
c2503081 | 989 | echo "Build Web Interface : NO" |
2654e540 | 990 | fi |
a7442678 AK |
991 | if test "x${BUILD_AGENT}" = "xyes"; then |
992 | echo "Build Agent : YES" | |
993 | echo "Subagents list : ${SUBAGENT_DIRS}" | |
994 | else | |
995 | echo "Build Agent : NO" | |
996 | fi | |
e8636669 VK |
997 | if test "x${BUILD_STATIC_AGENT}" = "xyes"; then |
998 | echo "Build Static Agent : YES" | |
999 | echo "Subagents list : ${STATIC_SUBAGENT_LIST}" | |
1000 | else | |
1001 | echo "Build Static Agent : NO" | |
1002 | fi |