--- projects/libstatgrab/configure.in 2003/02/28 22:59:35 1.4 +++ projects/libstatgrab/configure.in 2003/09/29 09:00:07 1.30 @@ -2,15 +2,15 @@ # Process this file with autoconf to produce a configure script. # # configure.in for libstatgrab -# $Id: configure.in,v 1.4 2003/02/28 22:59:35 tdb Exp $ +# $Id: configure.in,v 1.30 2003/09/29 09:00:07 tdb Exp $ # # Change these to change the package name and version -AC_INIT(libstatgrab, 0.1, dev@i-scream.org.uk) -AM_INIT_AUTOMAKE(libstatgrab, 0.1) +AC_INIT(libstatgrab, 0.6, bugs@i-scream.org) +AM_INIT_AUTOMAKE(libstatgrab, 0.6) # Revision number (automatically updated) -AC_REVISION($Revision: 1.4 $) +AC_REVISION($Revision: 1.30 $) # Might work with older autoconfs... but tested on 2.57 AC_PREREQ(2.57) @@ -32,19 +32,26 @@ AC_C_CONST # Checks for library functions AC_FUNC_MALLOC AC_FUNC_REALLOC +AC_CHECK_FUNCS(atoll) # Set things up for different OS's # We define the name of the OS so the code can act accordingly # We also need to add the right LDFLAGS case $host_os in +solaris2.[[6-7]]) + AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])]) + AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) + AC_DEFINE(SOL7, , [Building on Solaris 2.7]) + LINKFLAGS="-lkstat" + ;; solaris2.*) AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])]) AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) - LDFLAGS="$LDFLAGS -lkstat" + LINKFLAGS="-lkstat" ;; freebsd4.*) AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) - LDFLAGS="$LDFLAGS -lkvm" + LINKFLAGS="-lkvm -ldevstat" ;; linux-gnu) AC_DEFINE(LINUX, , [Building on GNU/Linux]) @@ -54,7 +61,9 @@ linux-gnu) ;; esac +AC_SUBST(LINKFLAGS) + # And finish by changing these files -AC_CONFIG_FILES([Makefile src/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile src/libstatgrab/Makefile src/statgrab/Makefile docs/Makefile examples/Makefile libstatgrab.pc src/statgrab/statgrab-make-mrtg-config src/statgrab/statgrab-make-mrtg-index]) AC_OUTPUT