diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-07-18 11:40:55 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-07-18 11:40:55 +0000 |
commit | 84a0ecf4724cc57f30d8994cfce532c9de7702f0 (patch) | |
tree | 65a95bdc56f482474f452f1b42486e314f5d2e8e | |
parent | 539c1c1524fdeb512c8eec9ea736e7e611da29a8 (diff) |
compatibility improvement: also check for nss_common.h and see if enum nss_status exists
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1166 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | compat/nss_compat.h | 5 | ||||
-rw-r--r-- | configure.ac | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/compat/nss_compat.h b/compat/nss_compat.h index b438b8f..238f77c 100644 --- a/compat/nss_compat.h +++ b/compat/nss_compat.h @@ -22,7 +22,12 @@ #ifndef COMPAT__NSS_H #define COMPAT__NSS_H +#ifdef HAVE_NSS_H #include <nss.h> +#endif /* HAVE_NSS_H */ +#ifdef HAVE_NSS_COMMON_H +#include <nss_common.h> +#endif /* HAVE_NSS_COMMON_H */ #ifdef HAVE_ALIASES_H #include <aliases.h> #endif diff --git a/configure.ac b/configure.ac index 9284a75..fb9a2d6 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,7 @@ AC_SUBST(NSS_LDAP_SONAME) # checks for availability of header files AC_CHECK_HEADERS([ctype.h strings.h pthread.h fcntl.h limits.h]) -AC_CHECK_HEADERS([nss.h grp.h shadow.h aliases.h netdb.h rpc/rpcent.h]) +AC_CHECK_HEADERS([nss.h nss_common.h grp.h shadow.h aliases.h netdb.h rpc/rpcent.h]) AC_CHECK_HEADERS([netinet/ether.h arpa/inet.h netinet/in.h]) AC_CHECK_HEADERS([sys/socket.h sys/un.h sys/ucred.h ucred.h sys/param.h sys/time.h]) AC_CHECK_HEADERS([getopt.h syslog.h]) @@ -310,6 +310,15 @@ then #include <rpc/rpcent.h> #endif]) + # check for a definition of struct rpcent + AC_CHECK_TYPES(enum nss_status,,,[ + #ifdef HAVE_NSS_H + #include <nss.h> + #endif + #ifdef HAVE_NSS_COMMON_H + #include <nss_common.h> + #endif]) + # restore CFLAGS and LIBS CFLAGS="$nss_save_CFLAGS" LIBS="$nss_save_LIBS" |