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

Tim Rice tim at multitalents.net
Fri Nov 2 05:08:31 EST 2001


On Thu, 1 Nov 2001, Tim Rice wrote:

> On Thu, 1 Nov 2001, Mark D. Roth wrote:
>
> > 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)])
>
> Yes it would be cleaner. Thanks.
> (Maybe it's time to post a list of macros on the wall) :-)
>
> I'll commit these changes this weekend unless I hear it breaks somewhere.
>
Looking deeper I see that my patch broke the openpty test.
Moving the login stuff up a bit fixes this.

------------------< cut >-----------------
--- configure.ac.orig	Sat Oct 27 10:45:37 2001
+++ configure.ac	Thu Nov  1 09:58:22 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,
@@ -426,6 +423,11 @@
 	[], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
 )

+dnl    Checks for libutil functions
+AC_CHECK_HEADERS(libutil.h)
+AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
+AC_CHECK_FUNCS(logout updwtmp logwtmp)
+
 AC_FUNC_STRFTIME

 # Checks for header files.
@@ -617,9 +619,6 @@

 dnl    Checks for time functions
 AC_CHECK_FUNCS(gettimeofday time)
-dnl    Checks for libutil functions
-AC_CHECK_HEADERS(libutil.h)
-AC_CHECK_FUNCS(login logout updwtmp logwtmp)
 dnl    Checks for utmp functions
 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
 AC_CHECK_FUNCS(utmpname)
@@ -632,11 +631,6 @@
 	[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,
 	[AC_DEFINE(HAVE_DAEMON)],
 	[AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
------------------< end cut >-----------------


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





More information about the openssh-unix-dev mailing list