1 ?RCS: $Id: d_getpgrp.U,v 3.0.1.1 1997/02/28 15:34:28 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: d_getpgrp.U,v $
12 ?RCS: Revision 3.0.1.1 1997/02/28 15:34:28 ram
13 ?RCS: patch61: new USE_BSD_GETPGRP to detect the getpgrp() flavour
15 ?RCS: Revision 3.0 1993/08/18 12:06:15 ram
16 ?RCS: Baseline for dist 3.0 netwide release.
18 ?MAKE:d_getpgrp d_bsdgetpgrp: Guess Inlibc Setvar cat rm \
19 +cc +ccflags +ldflags +libs i_unistd
20 ?MAKE: -pick add $@ %<
22 ?S: This variable conditionally defines HAS_GETPGRP if getpgrp() is
23 ?S: available to get the current process group.
26 ?S: This variable conditionally defines USE_BSD_GETPGRP if
27 ?S: getpgrp needs one arguments whereas USG one needs none.
29 ?C:HAS_GETPGRP (GETPGRP):
30 ?C: This symbol, if defined, indicates that the getpgrp routine is
31 ?C: available to get the current process group.
34 ?C: This symbol, if defined, indicates that getpgrp needs one
35 ?C: arguments whereas USG one needs none.
37 ?H:#$d_getpgrp HAS_GETPGRP /**/
38 ?H:#$d_bsdgetpgrp USE_BSD_GETPGRP /**/
41 ?LINT:set d_getpgrp d_bsdgetpgrp
42 : see if getpgrp exists
46 @if USE_BSD_GETPGRP || d_bsdgetpgrp
50 echo "Checking to see which flavor of getpgrp is in use..."
53 #include <sys/types.h>
60 printf("(I see you are running Configure as super-user...)\n");
73 if $cc -DTRY_BSD_PGRP $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then
74 echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
76 elif $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then
77 echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
80 echo "I can't seem to compile and run the test program."
82 xxx="a USG one, i.e. you use getpgrp()."
84 # SVR4 systems can appear rather BSD-ish.
87 xxx="a BSD one, i.e. you use getpgrp(pid)."
91 xxx="probably a USG one, i.e. you use getpgrp()."
96 echo "Assuming your getpgrp is $xxx" >&4