3 dnl Misc lib-related macros for coreutils.
5 # Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2004,
6 # 2005, 2006 Free Software Foundation, Inc.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 # Written by Jim Meyering.
24 AC_DEFUN([cu_LIB_CHECK],
27 # Check for libypsec.a on Dolphin M88K machines.
28 AC_CHECK_LIB(ypsec, main)
30 # m88k running dgux 5.4 needs this
31 AC_CHECK_LIB(ldgc, main)
33 # The -lsun library is required for YP support on Irix-4.0.5 systems.
34 # m88k/svr3 DolphinOS systems using YP need -lypsec for id.
35 AC_SEARCH_LIBS(yp_match, [sun ypsec])
37 # SysV needs -lsec, older versions of Linux need -lshadow for
38 # shadow passwords. UnixWare 7 needs -lgen.
39 AC_SEARCH_LIBS(getspnam, [shadow sec gen])
41 AC_CHECK_HEADERS(shadow.h)
43 # Requirements for su.c.
50 AC_CHECK_MEMBERS([struct spwd.sp_pwdp],,,[$shadow_includes])
51 AC_CHECK_FUNCS(getspnam)
53 # SCO-ODT-3.0 is reported to need -lufc for crypt.
54 # NetBSD needs -lcrypt for crypt.
56 AC_SEARCH_LIBS(crypt, [ufc crypt],
57 [test "$ac_cv_search_crypt" = "none required" ||
58 LIB_CRYPT="$ac_cv_search_crypt"])