diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-11-17 14:45:42 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-11-17 14:45:42 +0100 |
commit | 3b32a7ece09a4652a5fd6186aa059fd0e2163f5a (patch) | |
tree | 3ebe5c2aa49d2a06e40bbd2e777480a27c1d4713 /configure.ac | |
parent | dc229fb098be918e0e60c47d8f5a0de5956a559f (diff) | |
download | hurd-3b32a7ece09a4652a5fd6186aa059fd0e2163f5a.tar.gz hurd-3b32a7ece09a4652a5fd6186aa059fd0e2163f5a.tar.bz2 hurd-3b32a7ece09a4652a5fd6186aa059fd0e2163f5a.zip |
Make libcrypt really optional
* configure.ac (--without-libcrypt): Add option. Only test for libcrypt
if it is not set.
* utils/Makefile (login-LDLIBS, addauth-LDLIBS, setauth-LDLIBS): Only
add -lcrypt when libcrypt is available.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index af04d051..897a9146 100644 --- a/configure.ac +++ b/configure.ac @@ -170,11 +170,15 @@ 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]) +AC_ARG_WITH([libcrypt], + [AS_HELP_STRING([--without-libcrypt], [disable libcrypt])], , [with_libcrypt=yes]) +AS_IF([test "x$with_libcrypt" != xno], [ + 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 |