| 6 |
|
# |
| 7 |
|
|
| 8 |
|
# Change these to change the package name and version |
| 9 |
< |
AC_INIT(ihost, 1.6, dev@i-scream.org.uk) |
| 10 |
< |
AM_INIT_AUTOMAKE(ihost, 1.6) |
| 9 |
> |
AC_INIT(ihost, 1.5.3, dev@i-scream.org.uk) |
| 10 |
> |
AM_INIT_AUTOMAKE(ihost, 1.5.3) |
| 11 |
|
|
| 12 |
|
# Revision number (automatically updated) |
| 13 |
|
AC_REVISION($Revision$) |
| 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}" |
| 47 |
|
AC_FUNC_MALLOC |
| 48 |
|
AC_FUNC_REALLOC |
| 49 |
|
AC_FUNC_FORK |
| 50 |
< |
AC_CHECK_LIB(statgrab, get_general_stats,[LIBS="-Wl,-Bstatic -lstatgrab -Wl,-Bdynamic $LIBS"],[AC_MSG_ERROR([need libstatgrab])]) |
| 50 |
> |
AC_CHECK_FUNCS(strlcat) |
| 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]) |