diff options
| author | tgoodwin <tgoodwin> | 1998-07-27 09:29:02 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:10 +0100 |
| commit | 270cc5707a6ca6715fc6e3b1b094a46b4c4db91f (patch) | |
| tree | ca4071d783c187431a50b16e7b84491d4bb7564e /acinclude.m4 | |
| parent | cb2f9b483a09d9b2f122272a1a30857bdb4ec19e (diff) | |
Initial revision
Diffstat (limited to 'acinclude.m4')
| -rw-r--r-- | acinclude.m4 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..c8913a0 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,18 @@ +dnl The AC_FUNC_SETPGRP macro doesn't +dnl #include <unistd.h>, so it fails on OSF-1, where setpgrp +dnl will happily accept arguments, but the protoype doesn't +dnl have them. + +AC_DEFUN(RC_FUNC_SETPGRP, [ + AC_CACHE_CHECK(for setpgrp that takes no arguments, ac_cv_func_setpgrp_void, AC_TRY_RUN([ +#include <unistd.h> +/* If setpgrp() takes no arguments, this may fail to compile, but +if it compiles the call should succeed. */ +int main(void) { + return setpgrp(1,1) != -1; +} + ], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes, ac_cv_func_setpgrp_void=yes)) + case "$ac_cv_func_setpgrp_void" in + yes) AC_DEFINE(SETPGRP_VOID) ;; + esac +]) |