Gaetan Nadon wrote: > This section gathers all the system libraries needed for > xdm features. They may be in standard C library on some > platforms and in discrete libraries on others. > > Any xorg library is excluded from this section. > XTRANS macros will be invoked at a later time and contribute > additional libraries. > > Although a function is used to search for the library, this > should not be confused with function checking (AC_CHECK_FUNC). > > Sample configuration output on GNU/Linux: > checking for library containing getifaddrs... none required > checking for library containing getspnam... none required > checking for library containing setproctitle... no > checking for library containing setusercontext... no > checking for library containing arc4random... -lbsd > checking for library containing crypt... -lcrypt > > In the Makefile, libs are pre-pended: > LIBS = -lcrypt -lbsd > > Signed-off-by: Gaetan Nadon <[email protected]> > --- > configure.ac | 29 +++++++++++++++++++++++++++-- > 1 files changed, 27 insertions(+), 2 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 72a08fd..7e35a20 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -53,6 +53,33 @@ XORG_WITH_LINT > AC_PATH_PROG(MKTEMP_COMMAND, mktemp) > AM_CONDITIONAL(HAVE_MKTEMP_COMMAND, test x$MKTEMP_COMMAND != x) > > +#------------------------------------------------------------------------------ > +# Check for system libraries > +# > +# AC_SEARCH_LIBS: tests using $LIBS and tests again with each listed library. > +# pre-pends the found library to $LIBS. > +# > +#------------------------------------------------------------------------------ > +# Function getifaddrs() comes from the C library or the -lnsl name service > library > +AC_SEARCH_LIBS([getifaddrs], [nsl]) > + > +# Function getspnam() comes from the C library, System V -lsec, UnixWare 7 > -lgen > +# or Old Linux versions -lshadow > +AC_SEARCH_LIBS([getspnam], [sec gen shadow]) > + > +# Function setproctitle() is in BSD -lutil or GNU systems -lbsd but N/A on > Solaris > +AC_SEARCH_LIBS([setproctitle], [util bsd]) > + > +# Function setusercontext() is in BSD -lutil but N/A on Solaris or GNU > systems > +AC_SEARCH_LIBS([setusercontext], [util]) > + > +# Function arc4random() is in BSD standard C or GNU systems -lbsd > +AC_SEARCH_LIBS([arc4random], [bsd]) > + > +# Function crypt() comes from the C library or the -lcrypt data encryption > library > +AC_SEARCH_LIBS(crypt, crypt) > +#------------------------------------------------------------------------------ > + > m4_ifdef([AM_SILENT_RULES],[HAVE_AM_SILENT_RULES=yes]) > AM_CONDITIONAL(HAVE_AM_SILENT_RULES, test x$HAVE_AM_SILENT_RULES != x) > > @@ -400,8 +427,6 @@ fi > > AM_CONDITIONAL(HAS_XDM_AUTH, test x$xdmauth = xyes -a x$xdmauth_enable != > xno) > > -AC_SEARCH_LIBS(crypt, crypt) > - > AC_SUBST(XDM_CFLAGS) > AC_SUBST(XDM_LIBS) >
Reviewed-by: Alan Coopersmith <[email protected]> -- -Alan Coopersmith- [email protected] Oracle Solaris Platform Engineering: X Window System _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
