3 dnl Misc lib-related macros for coreutils.
5 # Copyright (C) 1993-2012 Free Software Foundation, Inc.
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # Written by Jim Meyering.
22 AC_DEFUN([cu_LIB_CHECK],
25 # Check for libypsec.a on Dolphin M88K machines.
26 AC_CHECK_LIB([ypsec], [main])
28 # m88k running dgux 5.4 needs this
29 AC_CHECK_LIB([ldgc], [main])
31 # The -lsun library is required for YP support on Irix-4.0.5 systems.
32 # m88k/svr3 DolphinOS systems using YP need -lypsec for id.
33 AC_SEARCH_LIBS([yp_match], [sun ypsec])
35 # SysV needs -lsec, older versions of Linux need -lshadow for
36 # shadow passwords. UnixWare 7 needs -lgen.
37 AC_SEARCH_LIBS([getspnam], [shadow sec gen])
39 AC_CHECK_HEADERS([shadow.h])
41 # Requirements for su.c.
48 AC_CHECK_MEMBERS([struct spwd.sp_pwdp],,,[$shadow_includes])
49 AC_CHECK_FUNCS([getspnam])
51 # SCO-ODT-3.0 is reported to need -lufc for crypt.
52 # NetBSD needs -lcrypt for crypt.
55 AC_SEARCH_LIBS([crypt], [ufc crypt],
56 [test "$ac_cv_search_crypt" = "none required" ||
57 LIB_CRYPT="$ac_cv_search_crypt"])