Skip to content
Snippets Groups Projects
Commit 08cb43f8 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Now checks for pw_gecos.

Rev: src/modules/system/configure.in:1.23
parent 9d825568
Branches
Tags
No related merge requests found
# $Id: configure.in,v 1.22 1998/05/17 19:28:45 grubba Exp $ # $Id: configure.in,v 1.23 1998/05/22 12:43:13 grubba Exp $
AC_INIT(system.c) AC_INIT(system.c)
AC_CONFIG_HEADER(system_machine.h) AC_CONFIG_HEADER(system_machine.h)
...@@ -74,7 +74,7 @@ fi ...@@ -74,7 +74,7 @@ fi
AC_MSG_CHECKING(for h_addr_list) AC_MSG_CHECKING(for h_addr_list)
AC_CACHE_VAL(pike_cv_struct_has_h_addr_list, AC_CACHE_VAL(pike_cv_struct_has_h_addr_list,
[ [
AC_TRY_LINK([ AC_TRY_COMPILE([
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
...@@ -93,6 +93,39 @@ else ...@@ -93,6 +93,39 @@ else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi fi
AC_MSG_CHECKING(whether struct passwd has the pw_gecos field)
AC_CACHE_VAL(pike_cv_struct_has_pw_gecos,
[
AC_TRY_COMPILE([
#ifdef HAVE_PASSWD_H
# include <passwd.h>
# include <group.h>
#endif /* HAVE_PASSWD_H */
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif /* HAVE_PWD_H */
#ifdef HAVE_GRP_H
# include <grp.h>
#endif /* HAVE_GRP_H */
#ifdef HAVE_SHADOW_H
# include <shadow.h>
#endif /* HAVE_SHADOW_H */
], [
struct passwd ent;
ent->pw_gecos = "FOO";
], pike_cv_struct_has_pw_gecos=yes, pike_cv_struct_has_pw_gecos=no)
])
if test "$pike_cv_struct_has_pw_gecos" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PW_GECOS)
else
AC_MSG_RESULT(no)
fi
AC_OUTPUT(Makefile,echo FOO >stamp-h ) AC_OUTPUT(Makefile,echo FOO >stamp-h )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment