--- projects/libstatgrab/configure.in 2003/10/07 22:07:37 1.33 +++ projects/libstatgrab/configure.in 2003/10/12 14:46:06 1.37 @@ -2,15 +2,15 @@ # Process this file with autoconf to produce a configure script. # # configure.in for libstatgrab -# $Id: configure.in,v 1.33 2003/10/07 22:07:37 tdb Exp $ +# $Id: configure.in,v 1.37 2003/10/12 14:46:06 tdb Exp $ # # Change these to change the package name and version -AC_INIT(libstatgrab, 0.6, bugs@i-scream.org) -AM_INIT_AUTOMAKE(libstatgrab, 0.6) +AC_INIT(libstatgrab, 0.6.1, bugs@i-scream.org) +AM_INIT_AUTOMAKE(libstatgrab, 0.6.1) # Revision number (automatically updated) -AC_REVISION($Revision: 1.33 $) +AC_REVISION($Revision: 1.37 $) # Might work with older autoconfs... but tested on 2.57 AC_PREREQ(2.57) @@ -34,6 +34,9 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS(atoll) +# Default needing setgid to false +AM_CONDITIONAL(SETGIDBINS, false) + # 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 @@ -50,9 +53,16 @@ solaris2.*) LINKFLAGS="-lkstat" ;; freebsd4.*) - AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) + AC_DEFINE(FREEBSD, , [Building on FreeBSD]) + AM_CONDITIONAL(SETGIDBINS, true) LINKFLAGS="-lkvm -ldevstat" ;; +freebsd5.*) + AC_DEFINE(FREEBSD, , [Building on FreeBSD]) + AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x]) + AM_CONDITIONAL(SETGIDBINS, true) + LINKFLAGS="-lkvm -ldevstat" + ;; linux-gnu) AC_DEFINE(LINUX, , [Building on GNU/Linux]) ;; @@ -123,13 +133,16 @@ AC_ARG_ENABLE(manpages, ] ) -# User specified pkgconfig dir -AC_ARG_WITH([pkgconfig-dir], - [ --with-pkgconfig-dir=PATH pkgconfig lib directory (PREFIX/lib/pkgconfig)], - [ PKGCONFIG_DIR=$withval ], - [ PKGCONFIG_DIR="\$(libdir)/pkgconfig" ] +# Check if the user wants to turn off setgid binaries +# (only really relevant on FreeBSD) +AC_ARG_ENABLE(setgid-binaries, + [ --disable-setgid-binaries disable binaries being setgid], + [ + if test "x$enableval" = "xno" ; then + AM_CONDITIONAL(SETGIDBINS, false) + fi + ] ) -AC_SUBST(PKGCONFIG_DIR) # The LIBS and CPPFLAGS that saidar needs AC_SUBST(SAIDARLIBS)