diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-09-01 17:25:49 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-09-01 18:04:32 +0200 |
commit | 670a1ff8f97962efd6b27436b50fc51b62683c25 (patch) | |
tree | 11139ff0e3aa9eb48bc9af2aa48afaa05ad03b0b /configure.ac | |
parent | 1186cf1d97d62105aa0f63cd3fce49f124e4e4c4 (diff) | |
download | hurd-670a1ff8f97962efd6b27436b50fc51b62683c25.tar.gz hurd-670a1ff8f97962efd6b27436b50fc51b62683c25.tar.bz2 hurd-670a1ff8f97962efd6b27436b50fc51b62683c25.zip |
Fix password checking with as-needed linking
Newer gcc toolchains tend to enable as-needed by default, so runtime
detection of libcrypt will fail. We can just explicitly link against
libcrypt anyway.
* configure.ac: Check for `crypt()' in libcrypt.
* config.make.in: Substitute HAVE_LIBCRYPT.
* libshouldbeinlibc/idvec-verify.c: Include <crypt.h> only when libcrypt
is available. Replace weak reference with explicit call and fallback
macro.
* utils/x.c: Likewise.
* libshouldbeinlibc/Makefile (LDLIBS): Add -lcrypt when libcrypt is
available.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e8bdc46a..d0d03e8d 100644 --- a/configure.ac +++ b/configure.ac @@ -170,6 +170,11 @@ AC_CHECK_FUNCS(file_futimens) AC_DEFINE([UTIME_NOW],[-1]) AC_DEFINE([UTIME_OMIT],[-2]) +AC_CHECK_LIB([crypt], [crypt], + [HAVE_LIBCRYPT=1 + AC_DEFINE([HAVE_LIBCRYPT], [1], [Use libcrypt])]) +AC_SUBST([HAVE_LIBCRYPT]) + # From glibc HEAD, 2007-11-07. AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl |