--- projects/cms/source/ihost/configure.in 2003/10/05 12:52:12 1.28 +++ projects/cms/source/ihost/configure.in 2004/01/05 15:51:55 1.29 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # # configure.in for i-scream ihost -# $Id: configure.in,v 1.28 2003/10/05 12:52:12 tdb Exp $ +# $Id: configure.in,v 1.29 2004/01/05 15:51:55 tdb Exp $ # # Change these to change the package name and version @@ -10,7 +10,7 @@ AC_INIT(ihost, 1.5.7, bugs@i-scream.org) AM_INIT_AUTOMAKE(ihost, 1.5.7) # Revision number (automatically updated) -AC_REVISION($Revision: 1.28 $) +AC_REVISION($Revision: 1.29 $) # Might work with older autoconfs... but tested on 2.57 AC_PREREQ(2.57) @@ -61,7 +61,6 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_FORK AC_CHECK_FUNCS(strlcat) -AC_CHECK_LIB(statgrab, get_general_stats,[:],[AC_MSG_ERROR([need libstatgrab])]) # Figure out details about the host - we need the OS AC_CANONICAL_HOST @@ -76,24 +75,38 @@ case $host_os in solaris2.*) AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])],[-lnsl -lsocket]) AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) - LIBS="$LIBS -lnsl -lsocket -lkstat -Wl,-Bstatic -lstatgrab -lukcprog -Wl,-Bdynamic" + LIBS="$LIBS -lnsl -lsocket -lkstat -ldevinfo -Wl,-Bstatic -lstatgrab -lukcprog -Wl,-Bdynamic" ;; -freebsd4.*) +freebsd*) AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) - AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) + AC_DEFINE(ALLBSD, , [Building on a BSD-derived system]) + AC_DEFINE(FREEBSD, , [Building on FreeBSD]) LIBS="$LIBS -lstatgrab -lkvm -ldevstat -lukcprog -static" # FreeBSD needs ihost to be setgid kmem AM_CONDITIONAL(SETGIDKMEM, true) ;; +netbsdelf*) + AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) + AC_DEFINE(ALLBSD, , [Building on a BSD-derived system]) + AC_DEFINE(NETBSD, , [Building on NetBSD]) + LIBS="$LIBS -lstatgrab -lkvm -lukcprog -static" + AM_CONDITIONAL(SETGIDKMEM, true) + ;; linux-gnu) AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])]) AC_DEFINE(LINUX, , [Building on GNU/Linux]) LIBS="$LIBS -lstatgrab -lukcprog -static" ;; +cygwin) + AC_DEFINE(CYGWIN, , [Building on Cygwin]) + ;; *) AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) ;; esac + +# Check for libstatgrab +AC_CHECK_LIB(statgrab, get_general_stats,[:],[AC_MSG_ERROR([need libstatgrab])]) # Check for the --with-pid-file option 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]])