summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in41
1 files changed, 34 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index f048b000d..02287b802 100644
--- a/configure.in
+++ b/configure.in
@@ -14,6 +14,17 @@ AC_SUBST(PERL)
14AC_PATH_PROG(ENT, ent) 14AC_PATH_PROG(ENT, ent)
15AC_SUBST(ENT) 15AC_SUBST(ENT)
16 16
17# Use LOGIN_PROGRAM from environment if possible
18if test ! -z "$LOGIN_PROGRAM" ; then
19 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
20else
21 # Search for login
22 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
23 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
24 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
25 fi
26fi
27
17if test -z "$LD" ; then 28if test -z "$LD" ; then
18 LD=$CC 29 LD=$CC
19fi 30fi
@@ -225,18 +236,18 @@ if test -z "$no_libnsl" ; then
225fi 236fi
226 237
227# Checks for header files. 238# Checks for header files.
228AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h lastlog.h limits.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h ttyent.h usersec.h util.h utmp.h utmpx.h) 239AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h ttyent.h usersec.h util.h utmp.h utmpx.h)
229 240
230# Checks for library functions. 241dnl Checks for library functions.
231AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage getttyent inet_aton inet_ntoa innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid sigaction sigvec snprintf strerror strlcat strlcpy strsep vsnprintf vhangup _getpty __b64_ntop) 242AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid sigaction sigvec snprintf strerror strlcat strlcpy strsep vsnprintf vhangup _getpty __b64_ntop)
232dnl checks for time functions 243dnl Checks for time functions
233AC_CHECK_FUNCS(gettimeofday time) 244AC_CHECK_FUNCS(gettimeofday time)
234dnl checks for libutil functions 245dnl Checks for libutil functions
235AC_CHECK_FUNCS(login logout updwtmp logwtmp) 246AC_CHECK_FUNCS(login logout updwtmp logwtmp)
236dnl checks for utmp functions 247dnl Checks for utmp functions
237AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent) 248AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent)
238AC_CHECK_FUNCS(utmpname) 249AC_CHECK_FUNCS(utmpname)
239dnl checks for utmpx functions 250dnl Checks for utmpx functions
240AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline ) 251AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline )
241AC_CHECK_FUNCS(setutxent utmpxname) 252AC_CHECK_FUNCS(setutxent utmpxname)
242 253
@@ -736,6 +747,22 @@ if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
736 AC_DEFINE(HAVE___SS_FAMILY_IN_SS) 747 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
737fi 748fi
738 749
750AC_CACHE_CHECK([for pw_class field in struct passwd],
751 ac_cv_have_pw_class_in_struct_passwd, [
752 AC_TRY_COMPILE(
753 [
754#include <sys/types.h>
755#include <pwd.h>
756 ],
757 [ struct passwd p s; p.pw_class = NULL; ],
758 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
759 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
760 )
761])
762if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
763 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
764fi
765
739 766
740AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ 767AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
741 AC_TRY_LINK([], 768 AC_TRY_LINK([],