Rule in policy editor can be enabled/disabled by double click on leftmost column...
[public/netxms.git] / configure.ac
CommitLineData
56cd40b6 1# $Id: configure.ac,v 1.84 2005-05-26 09:15:51 victor Exp $
d16cf8a5
AK
2#
3# Process this file with autoconf to produce a configure script.
4#
5
56cd40b6 6AC_INIT([NetXMS], [0.2.0], [NetXMS Team <bugs@netxms.org>])
d16cf8a5
AK
7AC_CONFIG_AUX_DIR([config])
8AM_CONFIG_HEADER([config.h])
9AM_INIT_AUTOMAKE
10
5387ff75
VK
11
12# --------------------------------------------------------------------------
13# checks for programs.
14
15AC_PROG_CC
16AC_PROG_CPP
17AC_PROG_CXX
18AC_PROG_INSTALL
19
12249937 20AC_DISABLE_STATIC
5387ff75
VK
21AC_LIBTOOL_DLOPEN
22AC_PROG_LIBTOOL
23
24
e0760102
VK
25# --------------------------------------------------------------------------
26# disable C++ exceptions
063e34ad 27CFLAGS="$CFLAGS -fno-exceptions"
e0760102 28CPPFLAGS="$CPPFLAGS -fno-exceptions"
d360d4a4 29LDFLAGS="-nodefaultlibs $LDFLAGS"
ee40037f 30
d360d4a4 31AC_CHECK_LIB(c_r, pthread_create, LDFLAGS="$LDFLAGS -lc_r", LDFLAGS="$LDFLAGS -lc")
e0760102 32
5387ff75 33
d16cf8a5
AK
34# --------------------------------------------------------------------------
35# misc
36
37AC_ARG_VAR(PERL,local path to the perl interpreter)
38perl_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/perl/bin:/opt/perl/usr/bin:/opt/perl/usr/local/bin"
39AC_PATH_PROG(PERL,perl,/usr/bin/env perl,$perl_possible_path)
40
41if test -d /usr/local/include; then
42 CFLAGS="$CFLAGS -I/usr/local/include"
2cb1fb26 43 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
d16cf8a5
AK
44fi
45
46if test -d /usr/kerberos/include; then
47 CFLAGS="$CFLAGS -I/usr/kerberos/include"
2cb1fb26 48 CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
d16cf8a5 49fi
521d90e7 50
d16cf8a5
AK
51if test -d /usr/local/lib; then
52 LDFLAGS="$LDFLAGS -L/usr/local/lib"
53fi
54
ae82f88f
VK
55# --------------------------------------------------------------------------
56# check for system pthread.h
57
58AC_CHECK_HEADERS([/usr/include/pthread.h])
59
d16cf8a5
AK
60# --------------------------------------------------------------------------
61# command line options
62
c4b88c3d
VK
63AC_ARG_WITH(odbc,
64[AS_HELP_STRING(--with-odbc,build ODBC database driver)],
65[ if test "x$withval" != "xno" ; then
66 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
67 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
68 LDFLAGS="$LDFLAGS -L${withval}/lib"
69 CPPFLAGS="$CPPFLAGS -I${withval}/include"
70 fi
71 with_odbc="yes"
72 AC_DEFINE(WITH_ODBC,,[with odbc])
73 DB_DRIVERS="$DB_DRIVERS odbc"
74 AC_CHECK_LIB(odbc, SQLAllocHandle, ,
75 [AC_MSG_ERROR(libodbc is needed for ODBC support)])
76fi ])
77
d16cf8a5 78AC_ARG_WITH(mysql,
c4b88c3d 79[AS_HELP_STRING(--with-mysql,build MySQL database driver)],
d16cf8a5
AK
80[ if test "x$withval" != "xno" ; then
81 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
82 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
83 LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib"
6693a1d0 84 CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include"
d16cf8a5
AK
85 else
86 LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:/usr/lib/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}"
87 LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -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 88 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
AK
89 fi
90 AC_CHECK_LIB(m, floor)
91 AC_CHECK_LIB(z, gzclose)
92 with_mysql="yes"
93 AC_DEFINE(WITH_MYSQL,,[with mysql])
6693a1d0 94 DB_DRIVERS="$DB_DRIVERS mysql"
d16cf8a5
AK
95 AC_CHECK_LIB(mysqlclient, mysql_init, ,
96 [AC_MSG_ERROR(libmysqlclient is needed for MySQL support)])
97 AC_MSG_CHECKING(whether mysql clients can run)
98 AC_RUN_IFELSE([AC_LANG_SOURCE([[
99 #include <stdio.h>
100 #include <mysql.h>
101 int main(void)
102 {
103 MYSQL *a = mysql_init(NULL);
104 return 0;
105 }
106 ]])],[],[
107 AC_MSG_RESULT(no)
108 AC_MSG_ERROR(Your MySQL client libraries aren't properly installed)
109 ],[])
110 AC_MSG_RESULT(yes)
111 AC_CHECK_FUNCS(mysql_real_escape_string)
6693a1d0 112fi ])
d16cf8a5
AK
113
114AC_ARG_WITH(pgsql,
c4b88c3d 115[AS_HELP_STRING(--with-pgsql,build PostgreSQL database driver)],
d16cf8a5 116[ if test "x$withval" != "xno" ; then
6693a1d0
AK
117 if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
118 LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
119 LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/pgsql -L${withval}/lib/postgresql -L${withval}/pgsql/lib -L${withval}/postgresql/lib"
120 CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/pgsql -I${withval}/include/postgresql -I${withval}/pgsql/include -I${withval}/postgresql/include"
121 else
122 LD_RUN_PATH="/usr/local/pgsql/lib:/usr/local/pgsql/lib/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}"
123 LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib -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"
124 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"
125 fi
126 AC_CHECK_LIB(m, floor)
127 AC_CHECK_LIB(z, gzclose)
128 with_pgsql="yes"
129 DB_DRIVERS="$DB_DRIVERS pgsql"
130 AC_DEFINE(WITH_PGSQL,,[with pgsql])
131 AC_CHECK_LIB(pq, PQconnectdb, ,
132 [AC_MSG_ERROR(libpq is needed for PostgreSQL support)])
133 AC_MSG_CHECKING(whether postgresql clients can run)
134 AC_RUN_IFELSE([AC_LANG_SOURCE([[
135 #include <stdio.h>
136 #include <libpq-fe.h>
137 int main(void)
138 {
139 PGconn *a = PQconnectdb("");
140 return 0;
141 }
142 ]])],[],[
143 AC_MSG_RESULT(no)
144 AC_MSG_ERROR(Your PostgreSQL client libraries aren't properly installed)
145 ],[])
146 AC_MSG_RESULT(yes)
147fi ])
d16cf8a5 148
3a7ce527
AK
149AC_ARG_WITH(server,
150[AS_HELP_STRING(--with-server,build server)],
151[
152 MODULES="$MODULES server"
08ffa53e 153 BUILD_SERVER="yes"
3a7ce527 154])
3a7ce527
AK
155
156
e0760102
VK
157AC_ARG_WITH(client,
158[AS_HELP_STRING(--with-client,build client library and tools)],
159[
1e8eed7a 160 MODULES="$MODULES libnxcl nxevent nxreport console"
e0760102
VK
161 BUILD_CLIENT="yes"
162])
163
164
3a7ce527
AK
165SUBAGENT_DIRS=""
166AC_ARG_WITH(agent,
167[AS_HELP_STRING(--with-agent,build agent)],
168[
0c3c0c39 169 MODULES="$MODULES agent"
3a7ce527
AK
170 case `uname -s` in
171 Linux)
172 SUBAGENT_DIRS="linux"
173 ;;
174 FreeBSD)
175 SUBAGENT_DIRS="freebsd"
176 ;;
177 SunOS)
178 SUBAGENT_DIRS="sunos"
179 ;;
180 *)
181 # unknown
182 ;;
183 esac
184])
0c3c0c39
AK
185
186AC_ARG_WITH(dist,
187[AS_HELP_STRING(--with-dist,for maintainers only)],
188 DB_DRIVERS="mysql pgsql odbc mssql"
8d9ad0f4 189 MODULES="server agent libnxcl nxevent nxreport console www"
0c3c0c39 190 SUBAGENT_DIRS="linux freebsd sunos"
5b0c7d0d 191 NXCONFIG="nxconfig"
0c3c0c39
AK
192)
193
b97191d2
AK
194AC_ARG_WITH(nxsm,
195[AS_HELP_STRING(--with-nxsm,build session manager for web interface)],
196[
197 MODULES="$MODULES www"
198 BUILD_CLIENT="yes"
199])
200
0c3c0c39
AK
201AC_SUBST(DB_DRIVERS)
202AC_SUBST(MODULES)
3a7ce527 203AC_SUBST(SUBAGENT_DIRS)
5b0c7d0d 204AC_SUBST(NXCONFIG)
3a7ce527 205
d16cf8a5
AK
206# --------------------------------------------------------------------------
207# checks for libs.
208
209#AC_CHECK_LIB([socket], [socket])
210#AC_CHECK_LIB([nsl], [gethostbyname])
211
4c16049c
VK
212AC_CHECK_LIB([gcc], [__muldi3])
213
521d90e7 214AC_CHECK_LIB(socket, if_nameindex)
87bb64a7 215AC_CHECK_LIB(dl, dlopen)
1b3c0ef0 216AC_CHECK_LIB(kstat, kstat_open)
d16cf8a5 217
e0760102
VK
218if test "x$BUILD_SERVER" = "xyes" ; then
219 AC_CHECK_LIB(termcap, tgetstr, [], [AC_CHECK_LIB(ncurses, tgetstr, [], AC_CHECK_LIB(curses, tgetstr))])
220 AC_CHECK_LIB(readline, readline)
221fi
222
d16cf8a5
AK
223# --------------------------------------------------------------------------
224# checks for headers.
225
226AC_HEADER_STDC
227AC_HEADER_STAT
228AC_HEADER_TIME
521d90e7 229AC_CHECK_HEADERS([sys/int_types.h])
d16cf8a5 230AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h sys/socket.h])
467e30e1 231AC_CHECK_HEADERS([fcntl.h dirent.h sys/ioctl.h sys/sockio.h poll.h])
85303064 232AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h])
14ab1131 233AC_CHECK_HEADERS([readline/readline.h])
f52be742 234AC_CHECK_HEADERS([byteswap.h])
eca0b061 235AC_CHECK_HEADERS([sys/mman.h])
31a11006 236AC_CHECK_HEADERS([sys/utsname.h])
d16cf8a5 237
d16cf8a5
AK
238# --------------------------------------------------------------------------
239# types
240AC_CHECK_SIZEOF(short)
241AC_CHECK_SIZEOF(int)
242AC_CHECK_SIZEOF(long)
243AC_CHECK_SIZEOF(long long)
244
245AC_TYPE_PID_T
246AC_TYPE_SIGNAL
247AC_TYPE_SIZE_T
248AC_STRUCT_TIMEZONE
249
521d90e7 250AC_CHECK_TYPES([int64_t, uint64_t, u_int64_t])
eca0b061 251AC_CHECK_TYPES([off_t])
521d90e7 252
d16cf8a5
AK
253# --------------------------------------------------------------------------
254# C/CPP caps
255
256AC_PROG_GCC_TRADITIONAL
257AC_C_CONST
258AC_C_BIGENDIAN
259
f52be742
VK
260# --------------------------------------------------------------------------
261# macros
262
263AC_CHECK_DECLS([__bswap_64],,,[
264#if HAVE_BYTESWAP_H
265#include <byteswap.h>
266#endif
267])
85303064
VK
268AC_CHECK_DECLS([SIOCGIFADDR, SIOCGIFNETMASK, SIOCGIFHWADDR],,,[
269#if HAVE_SYS_IOCTL_H
270#include <sys/ioctl.h>
271#endif
272#if HAVE_SYS_SOCKIO_H
273#include <sys/sockio.h>
274#endif
275])
f52be742 276
d16cf8a5
AK
277# --------------------------------------------------------------------------
278# library functions
279
280AC_FUNC_ERROR_AT_LINE
281AC_FUNC_MALLOC
282AC_FUNC_MEMCMP
283AC_FUNC_REALLOC
284AC_FUNC_SELECT_ARGTYPES
285AC_FUNC_STRFTIME
286AC_FUNC_STRTOD
287AC_FUNC_VPRINTF
288
b50f1100
VK
289AC_CHECK_FUNCS([gettimeofday memmove memset strchr strcspn strdup strerror])
290AC_CHECK_FUNCS([strrchr strtol strtoul strtoll strtoull])
467e30e1 291AC_CHECK_FUNCS([if_nametoindex daemon mmap strerror_r scandir uname poll])
d16cf8a5 292
d16cf8a5
AK
293# sockets/resolver (probably for solaris)
294AC_CHECK_FUNC(connect, , [AC_CHECK_LIB(socket, connect)])
295AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(resolv, gethostbyname)])
296AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname)])
297
298if test "x$ac_cv_lib_nsl_gethostbyname" != "xyes" && test "x$ac_cv_func_gethostbyname" != "xyes" ; then
299 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(socket, gethostbyname)])
300fi
301
302if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname" ; then
303 AC_MSG_CHECKING([if we can include libnsl + libsocket])
304 LIBS="-lnsl -lsocket $LIBS"
305 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[(void) gethostbyname]])],[my_ac_link_result=yes],[my_ac_link_result=no ])
306 if test "$my_ac_link_result" = "no" ; then
307 AC_MSG_RESULT([failure])
308 AC_MSG_ERROR([unable to use gethostbyname()])
309 else
310 AC_MSG_RESULT([success])
311 fi
312fi
313
3d9b275c 314#ALK: CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread",
d16cf8a5
AK
315# posix threads
316AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***]))
317
318PTHREAD_LIBS=error
319AC_MSG_CHECKING(for old style FreeBSD -pthread flag)
320AC_EGREP_CPP(yes,
321 [#if (defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001) || defined(__OpenBSD__)
322 yes
323 #endif
324 ], AC_MSG_RESULT(yes)
6693a1d0 325 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" PTHREAD_LIBS="-pthread",
d16cf8a5
AK
326 AC_MSG_RESULT(no))
327if test "x$PTHREAD_LIBS" = xerror; then
328 AC_CHECK_LIB(pthread, pthread_attr_init,
6693a1d0 329 PTHREAD_LIBS="-lpthread")
d16cf8a5
AK
330fi
331if test "x$PTHREAD_LIBS" = xerror; then
332 AC_CHECK_LIB(pthreads, pthread_attr_init,
6693a1d0 333 PTHREAD_LIBS="-lpthreads")
d16cf8a5
AK
334fi
335if test "x$PTHREAD_LIBS" = xerror; then
336 AC_CHECK_LIB(c_r, pthread_attr_init,
6693a1d0 337 PTHREAD_LIBS="-lc_r")
d16cf8a5
AK
338fi
339if test "x$PTHREAD_LIBS" = xerror; then
6693a1d0
AK
340 AC_CHECK_FUNC(pthread_attr_init,
341 PTHREAD_LIBS="")
d16cf8a5
AK
342fi
343if test "x$PTHREAD_LIBS" = xerror; then
344 AC_MSG_ERROR(*** Unable to locate working posix thread library ***)
345fi
346AC_SUBST(PTHREAD_LIBS)
347
696fc54f
VK
348# Extensions to posix threads
349AC_CHECK_FUNCS([pthread_cond_reltimedwait_np])
350
82fa7c5d
AK
351# misc
352CPPFLAGS="$CPPFLAGS -DDATADIR=\\\"\${pkgdatadir}\\\""
353
d16cf8a5
AK
354# --------------------------------------------------------------------------
355
356# shared libs versions
357#
358# versioning scheme: current:revision:age
359#
360# current
361# The number of the current interface exported by the library. A current
362# value of `0', means that you are calling the interface exported by this
363# library interface 0.
364#
365# revision
366# The implementation number of the most recent interface exported by this
367# library. In this case, a revision value of `0' means that this is the
368# first implementation of the interface.
369# If the next release of this library exports the same interface, but has a
370# different implementation (perhaps some bugs have been fixed), the revision
371# number will be higher, but current number will be the same. In that case,
372# when given a choice, the library with the highest revision will always
373# be used by the runtime loader.
374#
375# age
376# The number of previous additional interfaces supported by this library.
377# If age were `2', then this library can be linked into executables which
378# were built with a release of this library that exported the current
379# interface number, current, or any of the previous two interfaces.
380# By definition age must be less than or equal to current. At the outset,
381# only the first ever interface is implemented, so age can only be `0'.
382#
383#
384#
385
386LIBNETXMS_LIBRARY_VERSION=0:1:0
e896a639 387LIBNXCSCP_LIBRARY_VERSION=0:1:0
d853cd74 388LIBNXSNMP_LIBRARY_VERSION=0:1:0
aa3b26fd 389LIBNXSRV_LIBRARY_VERSION=0:1:0
17a48052 390LIBNXCORE_LIBRARY_VERSION=0:1:0
b900a78b 391DBDRV_LIBRARY_VERSION=0:1:0
d16cf8a5 392AC_SUBST(LIBNETXMS_LIBRARY_VERSION)
3e7f0791 393AC_SUBST(LIBNXCSCP_LIBRARY_VERSION)
d853cd74 394AC_SUBST(LIBNXSNMP_LIBRARY_VERSION)
aa3b26fd 395AC_SUBST(LIBNXSRV_LIBRARY_VERSION)
17a48052 396AC_SUBST(LIBNXCORE_LIBRARY_VERSION)
b900a78b 397AC_SUBST(DBDRV_LIBRARY_VERSION)
d16cf8a5
AK
398
399# --------------------------------------------------------------------------
400
401AC_CONFIG_FILES([
d16cf8a5 402 README
0c3c0c39
AK
403 Makefile
404 contrib/Makefile
405 contrib/config/Makefile
406 contrib/dct/Makefile
407 contrib/startup/Makefile
408 contrib/startup/redhat/Makefile
82fa7c5d 409 contrib/mibs/Makefile
0c3c0c39
AK
410 doc/Makefile
411 images/Makefile
412 include/Makefile
413 m4/Makefile
414 netware/Makefile
415 sql/Makefile
0c3c0c39
AK
416 src/Makefile
417 src/libnetxms/Makefile
418 src/libnxcscp/Makefile
d853cd74 419 src/libnxsnmp/Makefile
0c3c0c39 420 src/libnxcl/Makefile
1b1edd49
VK
421 src/install/Makefile
422 src/install/windows/Makefile
0c3c0c39
AK
423 src/console/Makefile
424 src/console/win32/Makefile
425 src/console/win32/icons/Makefile
426 src/console/win32/res/Makefile
427 src/console/win32starter/Makefile
672441ac
VK
428 src/console/nxav/Makefile
429 src/console/cmdline/Makefile
0c3c0c39 430 src/nxevent/Makefile
1e8eed7a 431 src/nxreport/Makefile
0c3c0c39
AK
432 src/server/Makefile
433 src/server/core/Makefile
a551fe4d 434 src/server/netxmsd/Makefile
0c3c0c39
AK
435 src/server/dbdrv/Makefile
436 src/server/dbdrv/odbc/Makefile
437 src/server/dbdrv/mssql/Makefile
438 src/server/dbdrv/mysql/Makefile
439 src/server/dbdrv/pgsql/Makefile
440 src/server/tools/Makefile
441 src/server/tools/nxget/Makefile
442 src/server/tools/nxaction/Makefile
443 src/server/tools/nxadm/Makefile
5b0c7d0d
VK
444 src/server/tools/nxconfig/Makefile
445 src/server/tools/nxconfig/res/Makefile
f90d7fc5 446 src/server/tools/nxdbmgr/Makefile
d853cd74 447 src/server/tools/nxsnmpget/Makefile
734c670f 448 src/server/tools/nxsnmpwalk/Makefile
d24fdaf4 449 src/server/tools/nxupload/Makefile
0c3c0c39
AK
450 src/server/libnxsrv/Makefile
451 src/agent/Makefile
452 src/agent/core/Makefile
5795bf90 453 src/agent/install/Makefile
0c3c0c39
AK
454 src/agent/subagents/Makefile
455 src/agent/subagents/linux/Makefile
456 src/agent/subagents/sunos/Makefile
457 src/agent/subagents/skeleton/Makefile
458 src/agent/subagents/freebsd/Makefile
459 src/agent/subagents/netware/Makefile
460 src/agent/subagents/winperf/Makefile
93f15c2a 461 src/agent/subagents/portCheck/Makefile
b97191d2
AK
462 src/www/Makefile
463 src/www/iis/Makefile
464 src/www/nxsm/Makefile
0c3c0c39 465 tools/Makefile
d16cf8a5
AK
466])
467
12249937
VK
468AC_OUTPUT
469
f86b0279
AK
470echo "Updating libtool-1"
471sed 's/-lc_r/-lc_rXXX/' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool
5cecf50e
AK
472
473echo "Updating libtool-2"
474sed 's,$SED -e "/${host}-//g",$SED -e "s/${host}-//g",g' < ./libtool > libtool.new && mv libtool.new libtool && chmod +x ./libtool
475
12249937 476if test ! "x$BUILD_SERVER" = "xyes" ; then
5cecf50e 477 echo "Updating libtool-3"
12249937
VK
478 $PERL tools/patch_libtool.pl <libtool >libtool.new
479 mv libtool.new libtool
480 chmod 755 libtool
481fi