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

Tim Rice tim at multitalents.net
Wed Oct 31 14:29:53 EST 2001


On Tue, 30 Oct 2001, Jim Knoble wrote:

> OpenSSH-3.0p1-pre, from CVS as of about 2001-10-30 23:45 UTC.
>
> Any particular reason why configure is checking for login() in -lutil,
> finds it, then checks for it again in -lbsd?
>
[snip]
> Shouldn't finding login() in -lutil define both HAVE_LIBUTIL_LOGIN and
> HAVE_LOGIN?  Or am i missing something?
>
Hmm, HAVE_LIBUTIL_LOGIN isn't used anywhere in the source.

Try this patch.

------------< cut >------------
--- acconfig.h.old	Sun Oct 21 17:53:59 2001
+++ acconfig.h	Tue Oct 30 17:57:48 2001
@@ -178,9 +178,6 @@
 /* Define if you want to specify the path to your wtmpx file */
 #undef CONF_WTMPX_FILE

-/* Define is libutil has login() function */
-#undef HAVE_LIBUTIL_LOGIN
-
 /* Define if you want external askpass support */
 #undef USE_EXTERNAL_ASKPASS

--- configure.ac.old	Sat Oct 27 10:45:37 2001
+++ configure.ac	Tue Oct 30 18:03:07 2001
@@ -370,9 +370,6 @@

 AC_CHECK_FUNC(getspnam, ,
 	AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
-AC_CHECK_FUNC(login, ,
-	AC_CHECK_LIB(util, login,
-		AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil"))

 dnl zlib is required
 AC_ARG_WITH(zlib,
@@ -619,7 +616,7 @@
 AC_CHECK_FUNCS(gettimeofday time)
 dnl    Checks for libutil functions
 AC_CHECK_HEADERS(libutil.h)
-AC_CHECK_FUNCS(login logout updwtmp logwtmp)
+AC_CHECK_FUNCS(logout updwtmp logwtmp)
 dnl    Checks for utmp functions
 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
 AC_CHECK_FUNCS(utmpname)
@@ -634,7 +631,9 @@

 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_FUNC(daemon,
------------< end cut >------------

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net






More information about the openssh-unix-dev mailing list