?RCS: $Id: i_grp.U,v 3.0 1993/08/18 12:08:20 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: GRPASSWD detection added by Andy Dougherty  July 14, 1998.
?RCS:
?RCS: $Log: i_grp.U,v $
?RCS: Revision 3.0  1993/08/18  12:08:20  ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:i_grp d_grpasswd: \
	contains rm cppstdin cppflags cppminus Inhdr Findhdr Setvar
?MAKE:	-pick add $@ %<
?S:i_grp:
?S:	This variable conditionally defines the I_GRP symbol, and indicates
?S:	whether a C program should include <grp.h>.
?S:.
?S:d_grpasswd:
?S:	This variable conditionally defines GRPASSWD, which indicates
?S:	that struct group in <grp.h> contains gr_passwd.
?S:.
?C:I_GRP:
?C:	This symbol, if defined, indicates to the C program that it should
?C:	include <grp.h>.
?C:.
?C:GRPASSWD:
?C:	This symbol, if defined, indicates to the C program that struct group
?C:	in <grp.h> contains gr_passwd.
?C:.
?H:#$i_grp I_GRP		/**/
?H:#$d_grpasswd GRPASSWD	/**/
?H:.
?LINT:set i_grp d_grpasswd
?T: xxx
: see if this is an grp system
set grp.h i_grp
eval $inhdr

case "$i_grp" in
$define)
	xxx=`./findhdr grp.h`
	$cppstdin $cppflags $cppminus < $xxx >$$.h

	if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then
		val="$define"
	else
		val="$undef"
	fi
	set d_grpasswd
	eval $setvar

	$rm -f $$.h
	;;
*)
	val="$undef";
	set d_grpasswd; eval $setvar
	;;
esac

