OpenSSH-3.0p1-pre-CVS: configure.ac checks for login in -lutil and -lbsd?

Mark D. Roth roth+openssh at feep.net
Fri Nov 2 02:45:32 EST 2001


On Tue Oct 30 20:10 2001 -0800, Tim Rice wrote:
> @@ -619,7 +616,13 @@
>  AC_CHECK_FUNCS(gettimeofday time)
>  dnl    Checks for libutil functions
>  AC_CHECK_HEADERS(libutil.h)
> -AC_CHECK_FUNCS(login logout updwtmp logwtmp)
> +AC_CHECK_FUNC(login,
> +	[AC_DEFINE(HAVE_LOGIN)],
> +	[AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LOGIN) LIBS="$LIBS -lutil",
> +	[AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
> +	)]
> +)
> +AC_CHECK_FUNCS(logout updwtmp logwtmp)
>  dnl    Checks for utmp functions
>  AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
>  AC_CHECK_FUNCS(utmpname)

Just a minor stylistic comment: Wouldn't it be a bit cleaner to just
use this?

  AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])

Of course, if I'm missing something, feel free to flog me with a large
trout... ;)

-- 
Mark D. Roth <roth at feep.net>
http://www.feep.net/~roth/



More information about the openssh-unix-dev mailing list