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

Tim Rice tim at multitalents.net
Wed Oct 31 15:10:31 EST 2001


On Tue, 30 Oct 2001, Tim Rice wrote:

> 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 >------------
[snip]
> ------------< end cut >------------
>

Opps, although it compiles fine with the previous patch,
this one is more correct.  (finds login, logout, & logwtmp like it should)
------------< 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 20:02: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,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)
@@ -630,11 +633,6 @@
 AC_CHECK_FUNC(getuserattr,
 	[AC_DEFINE(HAVE_GETUSERATTR)],
 	[AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
-)
-
-AC_CHECK_FUNC(login,
-	[AC_DEFINE(HAVE_LOGIN)],
-	[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