--- projects/libstatgrab/configure.in 2003/10/08 17:49:21 1.34 +++ projects/libstatgrab/configure.in 2003/10/09 10:37:41 1.35 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # # configure.in for libstatgrab -# $Id: configure.in,v 1.34 2003/10/08 17:49:21 tdb Exp $ +# $Id: configure.in,v 1.35 2003/10/09 10:37:41 tdb Exp $ # # Change these to change the package name and version @@ -10,7 +10,7 @@ AC_INIT(libstatgrab, 0.6, bugs@i-scream.org) AM_INIT_AUTOMAKE(libstatgrab, 0.6) # Revision number (automatically updated) -AC_REVISION($Revision: 1.34 $) +AC_REVISION($Revision: 1.35 $) # 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 @@ -51,11 +54,13 @@ solaris2.*) ;; freebsd4.*) 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) @@ -126,6 +131,17 @@ AC_ARG_ENABLE(manpages, AM_CONDITIONAL(MANPAGES, false) fi ] +) + +# 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 + ] ) # User specified pkgconfig dir