diff options
author | Karel Zak | 2018-11-22 12:53:00 +0100 |
---|---|---|
committer | Karel Zak | 2018-12-03 11:23:33 +0100 |
commit | 8229ed2f5c9f663cd363c8fac1454ad886776d5a (patch) | |
tree | 9dd6f25d686b2158cb19a7646cc587b361d506d6 /configure.ac | |
parent | build-sys: do not require dirfd() (diff) | |
download | kernel-qcow2-util-linux-8229ed2f5c9f663cd363c8fac1454ad886776d5a.tar.gz kernel-qcow2-util-linux-8229ed2f5c9f663cd363c8fac1454ad886776d5a.tar.xz kernel-qcow2-util-linux-8229ed2f5c9f663cd363c8fac1454ad886776d5a.zip |
build-sys: do not require crypt()
The function is necessary only for newgrp and sulogin.
Addresses: https://github.com/karelzak/util-linux/issues/584
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e6ba49553..4c8de521f 100644 --- a/configure.ac +++ b/configure.ac @@ -787,6 +787,7 @@ AC_CHECK_DECLS([CPU_ALLOC], [], [], [[ # on Solaris, you can't mix and match standards, since we use c99 # aparently at this stage, XOPEN_SOURCE will conflict. As workaround, # check for crypt.h and use that without XOPEN_SOURCE. +have_crypt=no AC_CHECK_HEADERS([crypt.h]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_CRYPT_H @@ -811,8 +812,9 @@ char *c = crypt("abc","pw"); ]])],[ AC_DEFINE([HAVE_LIBCRYPT], [1], [Do we need -lcrypt?]) have_libcrypt=yes + have_crypt=yes ],[ - AC_MSG_ERROR([crypt() is not available]) + AC_MSG_WARN([crypt() is not available]) ]) ]) AM_CONDITIONAL([HAVE_LIBCRYPT], [test "x$have_libcrypt" = xyes]) @@ -1890,6 +1892,7 @@ AC_ARG_ENABLE([newgrp], [], [UL_DEFAULT_ENABLE([newgrp], [no])] ) UL_BUILD_INIT([newgrp]) +UL_REQUIRES_HAVE([newgrp], [crypt], [crypt function]) AM_CONDITIONAL([BUILD_NEWGRP], [test "x$build_newgrp" = xyes]) @@ -1986,6 +1989,7 @@ AC_ARG_ENABLE([sulogin], [], [UL_DEFAULT_ENABLE([sulogin], [check])] ) UL_BUILD_INIT([sulogin]) +UL_REQUIRES_HAVE([sulogin], [crypt], [crypt function]) UL_REQUIRES_HAVE([sulogin], [shadow_h], [shadow.h header]) AM_CONDITIONAL([BUILD_SULOGIN], [test "x$build_sulogin" = xyes]) |