# HG changeset patch # User Matt Johnston # Date 1445440102 -28800 # Node ID f567a4152c14f1ab8187e10ce5c87690862b38e5 # Parent ef67b57fe4384f8dfaa13f9b5000c49c4b580a7a Test for crypt() rather than crypt.h Print a message from configure if getpass() or crypt() were missing diff -r ef67b57fe438 -r f567a4152c14 configure.ac --- a/configure.ac Wed Oct 21 22:48:15 2015 +0800 +++ b/configure.ac Wed Oct 21 23:08:22 2015 +0800 @@ -632,7 +632,7 @@ AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_FUNC_SELECT_ARGTYPES -AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev]) +AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev crypt]) AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) @@ -719,10 +719,21 @@ AC_MSG_NOTICE() if test $BUNDLED_LIBTOM = 1 ; then -AC_MSG_NOTICE(Using bundled libtomcrypt and libtommath) +AC_MSG_NOTICE([Using bundled libtomcrypt and libtommath]) else -AC_MSG_NOTICE(Using system libtomcrypt and libtommath) +AC_MSG_NOTICE([Using system libtomcrypt and libtommath]) +fi + + +if test "x$ac_cv_func_getpass" != xyes; then +AC_MSG_NOTICE() +AC_MSG_NOTICE([getpass() not available, dbclient will only have public-key authentication]) +fi + +if test "x$ac_cv_func_crypt" != xyes; then +AC_MSG_NOTICE() +AC_MSG_NOTICE([crypt() not available, dropbear server will not have password authentication]) fi AC_MSG_NOTICE() -AC_MSG_NOTICE(Now edit options.h to choose features.) +AC_MSG_NOTICE([Now edit options.h to choose features.]) diff -r ef67b57fe438 -r f567a4152c14 options.h --- a/options.h Wed Oct 21 22:48:15 2015 +0800 +++ b/options.h Wed Oct 21 23:08:22 2015 +0800 @@ -206,8 +206,8 @@ * PAM challenge/response. * You can't enable both PASSWORD and PAM. */ -/* This requires crypt.h & crypt. */ -#ifdef HAVE_CRYPT_H +/* This requires crypt() */ +#ifdef HAVE_CRYPT #define ENABLE_SVR_PASSWORD_AUTH #endif /* PAM requires ./configure --enable-pam */