| 61 |
|
AC_FUNC_REALLOC |
| 62 |
|
AC_FUNC_FORK |
| 63 |
|
AC_CHECK_FUNCS(strlcat) |
| 64 |
+ |
AC_CHECK_LIB(statgrab, get_general_stats,[:],[AC_MSG_ERROR([need libstatgrab])]) |
| 65 |
|
|
| 66 |
|
# Figure out details about the host - we need the OS |
| 67 |
|
AC_CANONICAL_HOST |
| 74 |
|
# We also need to add the right LDFLAGS |
| 75 |
|
case $host_os in |
| 76 |
|
solaris2.*) |
| 77 |
+ |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])],[-lnsl -lsocket]) |
| 78 |
|
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
| 79 |
|
LIBS="$LIBS -lnsl -lsocket -lkstat -Wl,-Bstatic -lstatgrab -lukcprog -Wl,-Bdynamic" |
| 80 |
|
;; |
| 81 |
|
freebsd4.*) |
| 82 |
+ |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) |
| 83 |
|
AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) |
| 84 |
|
LIBS="$LIBS -lkvm -lstatgrab -lukcprog -static" |
| 85 |
|
# FreeBSD needs ihost to be setgid kmem |
| 86 |
|
AM_CONDITIONAL(SETGIDKMEM, true) |
| 87 |
|
;; |
| 88 |
|
linux-gnu) |
| 89 |
+ |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) |
| 90 |
|
AC_DEFINE(LINUX, , [Building on GNU/Linux]) |
| 91 |
|
LIBS="$LIBS -lstatgrab -lukcprog -static" |
| 92 |
|
;; |
| 94 |
|
AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) |
| 95 |
|
;; |
| 96 |
|
esac |
| 93 |
– |
|
| 94 |
– |
# Library checks that need to be done after the OS specific stuff |
| 95 |
– |
AC_CHECK_LIB(statgrab, get_general_stats,[:],[AC_MSG_ERROR([need libstatgrab])]) |
| 96 |
– |
AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) |
| 97 |
|
|
| 98 |
|
# Check for the --with-pid-file option |
| 99 |
|
AC_ARG_WITH([pid-file], [ --with-pid-file=FILE location of PID file (default: /var/tmp/.ihost.pid)], [pidfile=$withval], [pidfile=[/var/tmp/.ihost.pid]]) |