From a7621c92ae08aa7b7316244a4ac82ac05bd564bb Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 7 Sep 2001 19:52:54 +0000 Subject: Update SCM_CREDS for Net/Free/BSD-OS. Add configure checks. --- config/c-library.m4 | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/c-library.m4 b/config/c-library.m4 index 401a1748aa..6558f29f62 100644 --- a/config/c-library.m4 +++ b/config/c-library.m4 @@ -1,5 +1,5 @@ # Macros that test various C library quirks -# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.8 2001/01/22 23:28:50 tgl Exp $ +# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.9 2001/09/07 19:52:53 momjian Exp $ # PGAC_VAR_INT_TIMEZONE @@ -99,6 +99,54 @@ HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS +# PGAC_STRUCT_CMSGCRED +# -------------------- +# Check if `struct cmsgcred' exists. Define HAVE_STRUCT_CMSGCRED if so. +AC_DEFUN([PGAC_STRUCT_CMSGCRED], +[AC_CACHE_CHECK(for struct cmsgcred, pgac_cv_struct_cmsgcred, +[AC_TRY_COMPILE([#include +#include +#include ], + [struct cmsgcred sockcred;], + [pgac_cv_struct_cmsgcred=yes], + [pgac_cv_struct_cmsgcred=no])]) +if test x"$pgac_cv_struct_cmsgcred" = xyes ; then + AC_DEFINE(HAVE_STRUCT_CMSGCRED, 1, [Set to 1 if you have `struct cmsgcred']) +fi])# PGAC_STRUCT_CMSGCRED + + +# PGAC_STRUCT_FCRED +# ----------------- +# Check if `struct fcred' exists. Define HAVE_STRUCT_FCRED if so. +AC_DEFUN([PGAC_STRUCT_FCRED], +[AC_CACHE_CHECK(for struct fcred, pgac_cv_struct_fcred, +[AC_TRY_COMPILE([#include +#include +#include ], + [struct fcred sockcred;], + [pgac_cv_struct_fcred=yes], + [pgac_cv_struct_fcred=no])]) +if test x"$pgac_cv_struct_fcred" = xyes ; then + AC_DEFINE(HAVE_STRUCT_FCRED, 1, [Set to 1 if you have `struct fcred']) +fi])# PGAC_STRUCT_FCRED + + +# PGAC_STRUCT_SOCKCRED +# -------------------- +# Check if `struct sockcred' exists. Define HAVE_STRUCT_SOCKCRED if so. +AC_DEFUN([PGAC_STRUCT_SOCKCRED], +[AC_CACHE_CHECK(for struct sockcred, pgac_cv_struct_sockcred, +[AC_TRY_COMPILE([#include +#include +#include ], + [struct sockcred sockcred;], + [pgac_cv_struct_sockcred=yes], + [pgac_cv_struct_sockcred=no])]) +if test x"$pgac_cv_struct_sockcred" = xyes ; then + AC_DEFINE(HAVE_STRUCT_SOCKCRED, 1, [Set to 1 if you have `struct sockcred']) +fi])# PGAC_STRUCT_SOCKCRED + + # PGAC_HEADER_STRING # ------------------ # Tests whether and can both be included -- cgit v1.2.1