Added check for swig
[public/netxms.git] / configure.ac
1 # $Id: configure.ac,v 1.123 2005-12-28 14:38:34 victor Exp $
2 #
3 # Process this file with autoconf to produce a configure script.
4 #
5
6 AC_INIT([NetXMS], [0.2.8], [NetXMS Team <bugs@netxms.org>])
7 AC_CONFIG_AUX_DIR([config])
8 AM_CONFIG_HEADER([config.h])
9 AM_INIT_AUTOMAKE
10
11
12 # --------------------------------------------------------------------------
13 # checks for programs.
14
15 AC_PROG_CC
16 AC_PROG_CPP
17 AC_PROG_CXX
18 AC_PROG_INSTALL
19 AC_PROG_LEX
20 AC_PROG_YACC
21 AC_PROG_LN_S
22 AC_PROG_SWIG
23
24 # --------------------------------------------------------------------------
25 # disable C++ exceptions
26 CFLAGS="$CFLAGS -fno-exceptions"
27 CPPFLAGS="$CPPFLAGS -fno-exceptions"
28 LDFLAGS="$LDFLAGS"
29 SUBAGENT_LIBS=""
30
31 # --------------------------------------------------------------------------
32 # set LDFLAGS depending on OS
33
34 case `uname -s` in
35 AIX)
36 LDFLAGS="-no-undefined $LDFLAGS"
37 ;;
38 *)
39 ;;
40 esac
41
42 # --------------------------------------------------------------------------
43 # misc
44
45 AC_ARG_VAR(PERL,local path to the perl interpreter)
46 perl_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/perl/bin:/opt/perl/usr/bin:/opt/perl/usr/local/bin"
47 AC_PATH_PROG(PERL,perl,/usr/bin/env perl,$perl_possible_path)
48
49 if test -d /usr/local/include; then
50 CFLAGS="$CFLAGS -I/usr/local/include"
51 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
52 fi
53
54 if test -d /usr/kerberos/include; then
55 CFLAGS="$CFLAGS -I/usr/kerberos/include"
56 CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
57 fi
58
59 if test -d /usr/local/lib; then
60 LDFLAGS="$LDFLAGS -L/usr/local/lib"
61 fi
62
63 # --------------------------------------------------------------------------
64 # check for system pthread.h
65
66 AC_CHECK_HEADERS([/usr/include/pthread.h])
67
68 # --------------------------------------------------------------------------
69 # command line options
70
71 AC_ARG_WITH(sqlite,
72 [AS_HELP_STRING(--with-sqlite,build SQLite database driver)],
73 [ if test "x$withval" != "xno" ; then
74 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
75 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
76 LDFLAGS="$LDFLAGS -L${withval}/lib"
77 CPPFLAGS="$CPPFLAGS -I${withval}/include"
78 fi
79 DYNAMIC_COMPONENTS="yes"
80 with_sqlite="yes"
81 AC_DEFINE(WITH_SQLITE,,[with sqlite])
82 DB_DRIVERS="$DB_DRIVERS sqlite"
83 AC_CHECK_LIB(sqlite3, sqlite3_open, ,
84 [AC_MSG_ERROR(libsqlite3 is required for SQLite support)])
85 fi ])
86
87 AC_ARG_WITH(odbc,
88 [AS_HELP_STRING(--with-odbc,build ODBC database driver)],
89 [ if test "x$withval" != "xno" ; then
90 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
91 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
92 LDFLAGS="$LDFLAGS -L${withval}/lib"
93 CPPFLAGS="$CPPFLAGS -I${withval}/include"
94 fi
95 DYNAMIC_COMPONENTS="yes"
96 with_odbc="yes"
97 AC_DEFINE(WITH_ODBC,,[with odbc])
98 DB_DRIVERS="$DB_DRIVERS odbc"
99 AC_CHECK_LIB(odbc, SQLAllocHandle, ,
100 [AC_MSG_ERROR(libodbc is required for ODBC support)])
101 fi ])
102
103 AC_ARG_WITH(mysql,
104 [AS_HELP_STRING(--with-mysql,build MySQL database driver)],
105 [ if test "x$withval" != "xno" ; then
106 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
107 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
108 LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib"
109 CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include"
110 else
111 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}"
112 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"
113 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"
114 fi
115 DYNAMIC_COMPONENTS="yes"
116 AC_CHECK_LIB(m, floor)
117 AC_CHECK_LIB(z, gzclose)
118 with_mysql="yes"
119 AC_DEFINE(WITH_MYSQL,,[with mysql])
120 DB_DRIVERS="$DB_DRIVERS mysql"
121 AC_CHECK_LIB(mysqlclient, mysql_init, ,
122 [AC_MSG_ERROR(libmysqlclient is requred for MySQL support)])
123 AC_MSG_CHECKING(whether mysql clients can run)
124 AC_RUN_IFELSE([AC_LANG_SOURCE([[
125 #include <stdio.h>
126 #include <mysql.h>
127 int main(void)
128 {
129 MYSQL *a = mysql_init(NULL);
130 return 0;
131 }
132 ]])],[],[
133 AC_MSG_RESULT(no)
134 AC_MSG_ERROR(Your MySQL client libraries aren't properly installed)
135 ],[])
136 AC_MSG_RESULT(yes)
137 AC_CHECK_FUNCS(mysql_real_escape_string)
138 fi ])
139
140 AC_ARG_WITH(pgsql,
141 [AS_HELP_STRING(--with-pgsql,build PostgreSQL database driver)],
142 [ if test "x$withval" != "xno" ; then
143 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
144 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
145 LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/pgsql -L${withval}/lib/postgresql -L${withval}/pgsql/lib -L${withval}/postgresql/lib"
146 CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/pgsql -I${withval}/include/postgresql -I${withval}/pgsql/include -I${withval}/postgresql/include"
147 else
148 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}"
149 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"
150 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"
151 fi
152 DYNAMIC_COMPONENTS="yes"
153 AC_CHECK_LIB(m, floor)
154 AC_CHECK_LIB(z, gzclose)
155 with_pgsql="yes"
156 DB_DRIVERS="$DB_DRIVERS pgsql"
157 AC_DEFINE(WITH_PGSQL,,[with pgsql])
158 AC_CHECK_LIB(pq, PQconnectdb, ,
159 [AC_MSG_ERROR(libpq is required for PostgreSQL support)])
160 AC_MSG_CHECKING(whether postgresql clients can run)
161 AC_RUN_IFELSE([AC_LANG_SOURCE([[
162 #include <stdio.h>
163 #include <libpq-fe.h>
164 int main(void)
165 {
166 PGconn *a = PQconnectdb("");
167 return 0;
168 }
169 ]])],[],[
170 AC_MSG_RESULT(no)
171 AC_MSG_ERROR(Your PostgreSQL client libraries aren't properly installed)
172 ],[])
173 AC_MSG_RESULT(yes)
174 fi ])
175
176 AC_ARG_WITH(server,
177 [AS_HELP_STRING(--with-server,build server)],
178 [
179 MODULES="$MODULES libnxsnmp server nxmibc"
180 TOP_LEVEL_MODULES="$TOP_LEVEL_MODULES sql images"
181 CONTRIB_MODULES="$CONTRIB_MODULES mibs"
182 BUILD_SERVER="yes"
183 DYNAMIC_COMPONENTS="yes"
184 ])
185
186
187 AC_ARG_WITH(client,
188 [AS_HELP_STRING(--with-client,build client library and tools)],
189 [
190 MODULES="$MODULES libnxcl nxevent nxreport console"
191 BUILD_CLIENT="yes"
192 DYNAMIC_COMPONENTS="yes"
193 ])
194
195
196 SUBAGENT_DIRS=""
197 AC_ARG_WITH(agent,
198 [AS_HELP_STRING(--with-agent,build agent)],
199 [
200 BUILD_AGENT=yes
201 MODULES="$MODULES agent"
202 case `uname -s` in
203 Linux)
204 SUBAGENT_DIRS="linux"
205 ;;
206 FreeBSD)
207 SUBAGENT_DIRS="freebsd"
208 ;;
209 SunOS)
210 SUBAGENT_DIRS="sunos"
211 ;;
212 AIX)
213 SUBAGENT_DIRS="aix"
214 ;;
215 *)
216 # unknown
217 ;;
218 esac
219 DYNAMIC_COMPONENTS="yes"
220 ])
221
222 AC_ARG_WITH(static-agent,
223 [AS_HELP_STRING(--with-static-agent,build statically linked agent)],
224 [
225 BUILD_STATIC_AGENT="yes"
226 MODULES="$MODULES agent"
227 CFLAGS="$CFLAGS -D_STATIC_AGENT"
228 CPPFLAGS="$CPPFLAGS -D_STATIC_AGENT"
229 # STATIC_SUBAGENT_LIST="ping portcheck"
230 case `uname -s` in
231 Linux)
232 SUBAGENT_DIRS="linux"
233 SUBAGENT_LIBS="../subagents/linux/libnsm_linux.la"
234 STATIC_SUBAGENT_LIST="linux $STATIC_SUBAGENT_LIST"
235 ;;
236 FreeBSD)
237 SUBAGENT_DIRS="freebsd"
238 SUBAGENT_LIBS="../subagents/freebsd/libnsm_freebsd.la"
239 STATIC_SUBAGENT_LIST="freebsd $STATIC_SUBAGENT_LIST"
240 ;;
241 SunOS)
242 SUBAGENT_DIRS="sunos"
243 SUBAGENT_LIBS="../subagents/sunos/libnsm_sunos.la"
244 STATIC_SUBAGENT_LIST="sunos $STATIC_SUBAGENT_LIST"
245 ;;
246 AIX)
247 SUBAGENT_DIRS="aix"
248 SUBAGENT_LIBS="../subagents/aix/libnsm_aix.la"
249 STATIC_SUBAGENT_LIST="aix $STATIC_SUBAGENT_LIST"
250 ;;
251 *)
252 # unknown
253 ;;
254 esac
255 ])
256
257 AC_ARG_WITH(dist,
258 [AS_HELP_STRING(--with-dist,for maintainers only)],
259 DB_DRIVERS="mysql pgsql odbc mssql sqlite"
260 MODULES="libnxsnmp server agent libnxcl nxevent nxreport nxmibc console www"
261 SUBAGENT_DIRS="linux freebsd sunos aix"
262 NXCONFIG="nxconfig"
263 TOP_LEVEL_MODULES="sql images"
264 CONTRIB_MODULES="mibs"
265 )
266
267 AC_ARG_WITH(nxsm,
268 [AS_HELP_STRING(--with-nxsm,build session manager for web interface)],
269 [
270 MODULES="$MODULES www"
271 BUILD_CLIENT="yes"
272 DYNAMIC_COMPONENTS="yes"
273 ])
274
275 AC_ARG_WITH(openssl,
276 [AS_HELP_STRING(--with-openssl,specify OpenSSL location)],
277 [
278 if test "x$withval" != "xno" ; then
279 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
280 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
281 LDFLAGS="$LDFLAGS -L${withval}/lib"
282 CPPFLAGS="$CPPFLAGS -I${withval}/include"
283 else
284 LD_RUN_PATH="/usr/local/lib:/opt/openssl/lib:${LD_RUN_PATH:+:}${LD_RUN_PATH}"
285 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/opt/openssl/lib"
286 CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/opt/openssl/include"
287 fi
288 AC_CHECK_LIB(crypto, RSA_new,
289 [
290 AC_DEFINE(WITH_OPENSSL,,[with openssl])
291 AC_CHECK_LIB(crypto, EVP_aes_256_cbc,
292 [], [AC_DEFINE(NETXMS_NO_AES,,[desc])])
293 AC_CHECK_LIB(crypto, EVP_bf_cbc,
294 [], [AC_DEFINE(NETXMS_NO_BF,,[desc])])
295 AC_CHECK_LIB(crypto, EVP_idea_cbc,
296 [], [AC_DEFINE(NETXMS_NO_IDEA,,[desc])])
297 AC_CHECK_LIB(crypto, EVP_des_ede3_cbc,
298 [], [AC_DEFINE(NETXMS_NO_DES,,[desc])])
299 ],
300 [AC_MSG_ERROR(libcrypto is required for encryption support)])
301 fi
302 ],
303 [
304 AC_CHECK_LIB(crypto, RSA_new,
305 [
306 AC_DEFINE(WITH_OPENSSL,,[with openssl])
307 AC_CHECK_LIB(crypto, EVP_aes_256_cbc,
308 [], [AC_DEFINE(NETXMS_NO_AES,,[desc])])
309 AC_CHECK_LIB(crypto, EVP_bf_cbc,
310 [], [AC_DEFINE(NETXMS_NO_BF,,[desc])])
311 AC_CHECK_LIB(crypto, EVP_idea_cbc,
312 [], [AC_DEFINE(NETXMS_NO_IDEA,,[desc])])
313 AC_CHECK_LIB(crypto, EVP_des_ede3_cbc,
314 [], [AC_DEFINE(NETXMS_NO_DES,,[desc])])
315 ],
316 [AC_MSG_RESULT(libcrypto is required for encryption support)])
317 ])
318
319 AC_SUBST(DB_DRIVERS)
320 AC_SUBST(MODULES)
321 AC_SUBST(SUBAGENT_DIRS)
322 AC_SUBST(NXCONFIG)
323 AC_SUBST(TOP_LEVEL_MODULES)
324 AC_SUBST(CONTRIB_MODULES)
325 AC_SUBST(STATIC_SUBAGENT_LIST)
326 AC_SUBST(SUBAGENT_LIBS)
327 AC_SUBST(BUILD_SERVER)
328
329 # --------------------------------------------------------------------------
330 # If --with-static-agent selected, other components cannot be selected
331 # Select shared or static libraries depending on agent build type
332 if test "x$BUILD_STATIC_AGENT" = "xyes" ; then
333 if test "x$DYNAMIC_COMPONENTS" = "xyes" ; then
334 AC_MSG_ERROR(Static agent and other components are mutally exclusive.)
335 fi
336 ${enable_shared=no}
337 else
338 ${enable_static=no}
339 fi
340
341 AC_LIBTOOL_DLOPEN
342 AC_PROG_LIBTOOL
343
344 # --------------------------------------------------------------------------
345 # checks for libs.
346
347 #AC_CHECK_LIB([socket], [socket])
348 #AC_CHECK_LIB([nsl], [gethostbyname])
349
350 AC_CHECK_LIB(socket, if_nameindex)
351 AC_CHECK_LIB(dl, dlopen)
352 AC_CHECK_LIB(kstat, kstat_open)
353
354 if test "x$BUILD_SERVER" = "xyes" ; then
355 AC_CHECK_LIB(termcap, tgetstr, [], [AC_CHECK_LIB(ncurses, tgetstr, [], AC_CHECK_LIB(curses, tgetstr))])
356 AC_CHECK_LIB(readline, readline)
357 fi
358
359 # --------------------------------------------------------------------------
360 # checks for headers.
361
362 AC_HEADER_STDC
363 AC_HEADER_STAT
364 AC_HEADER_TIME
365 AC_CHECK_HEADERS([sys/int_types.h])
366 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h sys/socket.h])
367 AC_CHECK_HEADERS([fcntl.h dirent.h sys/ioctl.h sys/sockio.h poll.h])
368 AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h])
369 AC_CHECK_HEADERS([readline/readline.h])
370 AC_CHECK_HEADERS([byteswap.h])
371 AC_CHECK_HEADERS([sys/mman.h])
372 AC_CHECK_HEADERS([sys/utsname.h])
373
374 # --------------------------------------------------------------------------
375 # types
376 AC_CHECK_SIZEOF(short)
377 AC_CHECK_SIZEOF(int)
378 AC_CHECK_SIZEOF(long)
379 AC_CHECK_SIZEOF(long long)
380
381 AC_TYPE_PID_T
382 AC_TYPE_SIGNAL
383 AC_TYPE_SIZE_T
384 AC_STRUCT_TIMEZONE
385
386 AC_CHECK_TYPES([int64_t, uint64_t, u_int64_t])
387 AC_CHECK_TYPES([off_t])
388
389 # --------------------------------------------------------------------------
390 # C/CPP caps
391
392 AC_PROG_GCC_TRADITIONAL
393 AC_C_CONST
394 AC_C_BIGENDIAN
395
396 # --------------------------------------------------------------------------
397 # macros
398
399 AC_CHECK_DECLS([__bswap_64],,,[
400 #if HAVE_BYTESWAP_H
401 #include <byteswap.h>
402 #endif
403 ])
404 AC_CHECK_DECLS([SIOCGIFADDR, SIOCGIFNETMASK, SIOCGIFHWADDR],,,[
405 #if HAVE_SYS_IOCTL_H
406 #include <sys/ioctl.h>
407 #endif
408 #if HAVE_SYS_SOCKIO_H
409 #include <sys/sockio.h>
410 #endif
411 ])
412
413 # --------------------------------------------------------------------------
414 # library functions
415
416 AC_FUNC_ERROR_AT_LINE
417 #AC_FUNC_MALLOC
418 #AC_FUNC_REALLOC
419 AC_FUNC_MEMCMP
420 AC_FUNC_SELECT_ARGTYPES
421 AC_FUNC_STRFTIME
422 AC_FUNC_STRTOD
423 AC_FUNC_VPRINTF
424
425 AC_CHECK_FUNCS([gettimeofday memmove memset strchr strcspn strdup strerror])
426 AC_CHECK_FUNCS([strrchr strtol strtoul strtoll strtoull])
427 AC_CHECK_FUNCS([if_nametoindex daemon mmap strerror_r scandir uname poll])
428
429 # sockets/resolver (probably for solaris)
430 AC_CHECK_FUNC(connect, , [AC_CHECK_LIB(socket, connect)])
431 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(resolv, gethostbyname)])
432 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname)])
433
434 if test "x$ac_cv_lib_nsl_gethostbyname" != "xyes" && test "x$ac_cv_func_gethostbyname" != "xyes" ; then
435 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(socket, gethostbyname)])
436 fi
437
438 if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname" ; then
439 AC_MSG_CHECKING([if we can include libnsl + libsocket])
440 LIBS="-lnsl -lsocket $LIBS"
441 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[(void) gethostbyname]])],[my_ac_link_result=yes],[my_ac_link_result=no ])
442 if test "$my_ac_link_result" = "no" ; then
443 AC_MSG_RESULT([failure])
444 AC_MSG_ERROR([unable to use gethostbyname()])
445 else
446 AC_MSG_RESULT([success])
447 fi
448 fi
449
450 #ALK: CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread",
451 # posix threads
452 AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***]))
453
454 PTHREAD_LIBS=error
455 AC_MSG_CHECKING(for old style FreeBSD -pthread flag)
456 AC_EGREP_CPP(yes,
457 [#if defined(__FreeBSD_cc_version) || defined(__OpenBSD__)
458 yes
459 #endif
460 ], AC_MSG_RESULT(yes)
461 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread",
462 AC_MSG_RESULT(no))
463 if test "x$PTHREAD_LIBS" = xerror; then
464 AC_CHECK_LIB(pthread, pthread_attr_init,
465 PTHREAD_LIBS="-lpthread")
466 fi
467 if test "x$PTHREAD_LIBS" = xerror; then
468 AC_CHECK_LIB(pthreads, pthread_attr_init,
469 PTHREAD_LIBS="-lpthreads")
470 fi
471 if test "x$PTHREAD_LIBS" = xerror; then
472 AC_CHECK_FUNC(pthread_attr_init,
473 PTHREAD_LIBS="")
474 fi
475 if test "x$PTHREAD_LIBS" = xerror; then
476 AC_MSG_ERROR(*** Unable to locate working posix thread library ***)
477 fi
478 AC_SUBST(PTHREAD_LIBS)
479
480 # Extensions to posix threads
481 AC_CHECK_FUNCS([pthread_cond_reltimedwait_np])
482
483 # misc
484 CPPFLAGS="$CPPFLAGS -DDATADIR=\\\"\${pkgdatadir}\\\" -DLIBDIR=\\\"\${libdir}\\\""
485
486 # --------------------------------------------------------------------------
487
488 # shared libs versions
489 #
490 # versioning scheme: current:revision:age
491 #
492 # current
493 # The number of the current interface exported by the library. A current
494 # value of `0', means that you are calling the interface exported by this
495 # library interface 0.
496 #
497 # revision
498 # The implementation number of the most recent interface exported by this
499 # library. In this case, a revision value of `0' means that this is the
500 # first implementation of the interface.
501 # If the next release of this library exports the same interface, but has a
502 # different implementation (perhaps some bugs have been fixed), the revision
503 # number will be higher, but current number will be the same. In that case,
504 # when given a choice, the library with the highest revision will always
505 # be used by the runtime loader.
506 #
507 # age
508 # The number of previous additional interfaces supported by this library.
509 # If age were `2', then this library can be linked into executables which
510 # were built with a release of this library that exported the current
511 # interface number, current, or any of the previous two interfaces.
512 # By definition age must be less than or equal to current. At the outset,
513 # only the first ever interface is implemented, so age can only be `0'.
514 #
515 #
516 #
517
518 LIBNETXMS_LIBRARY_VERSION=0:2:0
519 LIBNXCSCP_LIBRARY_VERSION=0:2:0
520 LIBNXSNMP_LIBRARY_VERSION=0:2:0
521 LIBNXSRV_LIBRARY_VERSION=0:2:0
522 LIBNXCORE_LIBRARY_VERSION=0:2:0
523 DBDRV_LIBRARY_VERSION=0:2:0
524 SMSDRV_LIBRARY_VERSION=0:2:0
525 AC_SUBST(LIBNETXMS_LIBRARY_VERSION)
526 AC_SUBST(LIBNXCSCP_LIBRARY_VERSION)
527 AC_SUBST(LIBNXSNMP_LIBRARY_VERSION)
528 AC_SUBST(LIBNXSRV_LIBRARY_VERSION)
529 AC_SUBST(LIBNXCORE_LIBRARY_VERSION)
530 AC_SUBST(DBDRV_LIBRARY_VERSION)
531 AC_SUBST(SMSDRV_LIBRARY_VERSION)
532
533 # --------------------------------------------------------------------------
534
535 AC_CONFIG_FILES([
536 README
537 Makefile
538 contrib/Makefile
539 contrib/dct/Makefile
540 contrib/startup/Makefile
541 contrib/startup/redhat/Makefile
542 contrib/mibs/Makefile
543 doc/Makefile
544 images/Makefile
545 include/Makefile
546 m4/Makefile
547 netware/Makefile
548 sql/Makefile
549 src/Makefile
550 src/libnetxms/Makefile
551 src/libnxcscp/Makefile
552 src/libnxsnmp/Makefile
553 src/libnxcl/Makefile
554 src/install/Makefile
555 src/install/windows/Makefile
556 src/console/Makefile
557 src/console/nxuilib/Makefile
558 src/console/nxuilib/res/Makefile
559 src/console/nxuilib/sounds/Makefile
560 src/console/win32/Makefile
561 src/console/win32/icons/Makefile
562 src/console/win32/res/Makefile
563 src/console/win32starter/Makefile
564 src/console/nxav/Makefile
565 src/console/nxav/res/Makefile
566 src/console/cmdline/Makefile
567 src/console/PocketPC/Makefile
568 src/console/PocketPC/res/Makefile
569 src/nxevent/Makefile
570 src/nxreport/Makefile
571 src/nxmibc/Makefile
572 src/server/Makefile
573 src/server/core/Makefile
574 src/server/netxmsd/Makefile
575 src/server/dbdrv/Makefile
576 src/server/dbdrv/odbc/Makefile
577 src/server/dbdrv/mssql/Makefile
578 src/server/dbdrv/mysql/Makefile
579 src/server/dbdrv/pgsql/Makefile
580 src/server/dbdrv/sqlite/Makefile
581 src/server/smsdrv/Makefile
582 src/server/smsdrv/generic/Makefile
583 src/server/tools/Makefile
584 src/server/tools/nxget/Makefile
585 src/server/tools/nxaction/Makefile
586 src/server/tools/nxadm/Makefile
587 src/server/tools/nxconfig/Makefile
588 src/server/tools/nxconfig/res/Makefile
589 src/server/tools/nxdbmgr/Makefile
590 src/server/tools/nxsnmpget/Makefile
591 src/server/tools/nxsnmpwalk/Makefile
592 src/server/tools/nxsnmpset/Makefile
593 src/server/tools/nxupload/Makefile
594 src/server/libnxsrv/Makefile
595 src/agent/Makefile
596 src/agent/core/Makefile
597 src/agent/install/Makefile
598 src/agent/subagents/Makefile
599 src/agent/subagents/linux/Makefile
600 src/agent/subagents/sunos/Makefile
601 src/agent/subagents/aix/Makefile
602 src/agent/subagents/skeleton/Makefile
603 src/agent/subagents/freebsd/Makefile
604 src/agent/subagents/netware/Makefile
605 src/agent/subagents/winnt/Makefile
606 src/agent/subagents/win9x/Makefile
607 src/agent/subagents/winperf/Makefile
608 src/agent/subagents/portCheck/Makefile
609 src/agent/subagents/ping/Makefile
610 src/www/Makefile
611 src/www/iis/Makefile
612 src/www/nxsm/Makefile
613 src/www/nxsmcl/Makefile
614 tools/Makefile
615 ])
616
617 AC_OUTPUT
618
619 #echo "Updating libtool-1"
620 #sed 's/-lc_r/-lc_rXXX/' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool
621
622 echo "Updating libtool-2"
623 sed 's,$SED -e "/${host}-//g",$SED -e "s/${host}-//g",g' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool
624
625 #if test ! "x$BUILD_SERVER" = "xyes" ; then
626 # echo "Updating libtool-3"
627 # $PERL tools/patch_libtool.pl <libtool >libtool.new
628 # mv libtool.new libtool
629 # chmod 755 libtool
630 #fi
631
632
633
634 ###########################
635 #
636 echo
637 echo
638 echo
639 echo '---------------------------------------------------------------------'
640 echo ' Configure results'
641 echo '---------------------------------------------------------------------'
642 echo
643 echo "Prefix : ${prefix}"
644 if test "x${BUILD_SERVER}" = "xyes"; then
645 echo "Build Server : YES"
646 else
647 echo "Build Server : NO"
648 fi
649 if test "x${ac_cv_lib_crypto_RSA_new}" = "xyes"; then
650 echo "Encryption enabled : YES"
651 else
652 echo "Encryption enabled : NO"
653 fi
654 if test "x${DB_DRIVERS}" != "x"; then
655 echo "Build DB-Drivers : ${DB_DRIVERS}"
656 else
657 echo "Build DB-Drivers : NO"
658 fi
659 if test "x${BUILD_CLIENT}" = "xyes"; then
660 echo "Build Clients : YES"
661 else
662 echo "Build Clients : NO"
663 fi
664 if test "x${BUILD_AGENT}" = "xyes"; then
665 echo "Build Agent : YES"
666 echo "Subagents list : ${SUBAGENT_DIRS}"
667 else
668 echo "Build Agent : NO"
669 fi
670 if test "x${BUILD_STATIC_AGENT}" = "xyes"; then
671 echo "Build Static Agent : YES"
672 echo "Subagents list : ${STATIC_SUBAGENT_LIST}"
673 else
674 echo "Build Static Agent : NO"
675 fi