28 |
|
[ --with-libstatgrab-prefix=PATH libstatgrab is in PATH], |
29 |
|
[ |
30 |
|
if test -d "$withval/lib"; then |
31 |
< |
LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
31 |
> |
LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
32 |
|
fi |
33 |
|
if test -d "$withval/include"; then |
34 |
|
CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
48 |
|
AC_FUNC_REALLOC |
49 |
|
AC_FUNC_FORK |
50 |
|
AC_CHECK_FUNCS(strlcat) |
51 |
< |
AC_CHECK_LIB(statgrab, get_general_stats,[LIBS="-Wl,-Bstatic -lstatgrab -Wl,-Bdynamic $LIBS"],[AC_MSG_ERROR([need libstatgrab])]) |
51 |
> |
AC_CHECK_LIB(statgrab, get_general_stats,[:],[AC_MSG_ERROR([need libstatgrab])]) |
52 |
|
|
53 |
|
# Figure out details about the host - we need the OS |
54 |
|
AC_CANONICAL_HOST |
62 |
|
case $host_os in |
63 |
|
solaris2.*) |
64 |
|
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
65 |
< |
LIBS="$LIBS -lnsl -lsocket -lkstat" |
65 |
> |
LIBS="$LIBS -lnsl -lsocket -lkstat -Wl,-Bstatic -lstatgrab -Wl,-Bdynamic" |
66 |
|
;; |
67 |
|
freebsd4.*) |
68 |
|
AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) |
69 |
< |
LIBS="$LIBS -lkvm" |
69 |
> |
LIBS="$LIBS -lkvm -lstatgrab -static" |
70 |
|
# FreeBSD needs ihost to be setgid kmem |
71 |
|
AM_CONDITIONAL(SETGIDKMEM, true) |
72 |
|
;; |
73 |
|
linux-gnu) |
74 |
|
AC_DEFINE(LINUX, , [Building on GNU/Linux]) |
75 |
+ |
LIBS="$LIBS -lstatgrab -static" |
76 |
|
;; |
77 |
|
*) |
78 |
|
AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) |