| 6 |
|
# |
| 7 |
|
|
| 8 |
|
# Change these to change the package name and version |
| 9 |
< |
AC_INIT(ihost, 1.5.3, dev@i-scream.org.uk) |
| 10 |
< |
AM_INIT_AUTOMAKE(ihost, 1.5.3) |
| 9 |
> |
AC_INIT(ihost, 1.5.6, bugs@i-scream.org) |
| 10 |
> |
AM_INIT_AUTOMAKE(ihost, 1.5.6) |
| 11 |
|
|
| 12 |
|
# Revision number (automatically updated) |
| 13 |
|
AC_REVISION($Revision$) |
| 21 |
|
# Checks for programs |
| 22 |
|
AC_PROG_CC |
| 23 |
|
AC_PROG_INSTALL |
| 24 |
– |
AC_PROG_RANLIB |
| 24 |
|
|
| 25 |
|
# User specified libstatgrab prefix |
| 26 |
|
AC_ARG_WITH([libstatgrab-prefix], |
| 35 |
|
] |
| 36 |
|
) |
| 37 |
|
|
| 38 |
+ |
# User specified libukcprog prefix |
| 39 |
+ |
AC_ARG_WITH([libukcprog-prefix], |
| 40 |
+ |
[ --with-libukcprog-prefix=PATH libukcprog is in PATH], |
| 41 |
+ |
[ |
| 42 |
+ |
if test -d "$withval/lib"; then |
| 43 |
+ |
LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
| 44 |
+ |
fi |
| 45 |
+ |
if test -d "$withval/include"; then |
| 46 |
+ |
CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
| 47 |
+ |
fi |
| 48 |
+ |
] |
| 49 |
+ |
) |
| 50 |
+ |
|
| 51 |
|
# Checks for header files |
| 52 |
|
AC_HEADER_STDC |
| 53 |
|
AC_CHECK_HEADERS(statgrab.h,,[AC_MSG_ERROR([need statgrab.h])]) |
| 54 |
+ |
AC_CHECK_HEADERS(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])]) |
| 55 |
|
|
| 56 |
|
# Checks for typedefs, structures, and compiler characteristics |
| 57 |
|
AC_C_CONST |
| 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 -Wl,-Bdynamic" |
| 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 -static" |
| 84 |
> |
LIBS="$LIBS -lstatgrab -lkvm -ldevstat -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 -static" |
| 91 |
> |
LIBS="$LIBS -lstatgrab -lukcprog -static" |
| 92 |
|
;; |
| 93 |
|
*) |
| 94 |
|
AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) |
| 108 |
|
AC_DEFINE_UNQUOTED([LOG_FILE], ["$logfile"], [Location of log file]) |
| 109 |
|
|
| 110 |
|
# And finish by changing these files |
| 111 |
< |
AC_CONFIG_FILES([Makefile libukcprog/Makefile]) |
| 111 |
> |
AC_CONFIG_FILES([Makefile]) |
| 112 |
|
|
| 113 |
|
AC_OUTPUT |