comparison configure.ac @ 1196:a29559086628 coverity

merge
author Matt Johnston <matt@ucc.asn.au>
date Wed, 02 Dec 2015 22:37:51 +0800
parents da1ed4fcdc4a
children 94d4038bb34c
comparison
equal deleted inserted replaced
1173:d734fe76b72f 1196:a29559086628
80 [ 80 [
81 no_loginfunc_check=1 81 no_loginfunc_check=1
82 AC_MSG_NOTICE([Using uClibc - login() and logout() probably don't work, so we won't use them.]) 82 AC_MSG_NOTICE([Using uClibc - login() and logout() probably don't work, so we won't use them.])
83 ],,,) 83 ],,,)
84 84
85 # Checks for libraries. 85 dnl We test for crypt() specially. On Linux (and others?) it resides in libcrypt
86 AC_CHECK_LIB(crypt, crypt, CRYPTLIB="-lcrypt") 86 dnl but we don't want link all binaries to -lcrypt, just dropbear server.
87 dnl OS X doesn't need -lcrypt
88 AC_CHECK_FUNC(crypt, found_crypt_func=here)
89 AC_CHECK_LIB(crypt, crypt,
90 [
91 CRYPTLIB="-lcrypt"
92 found_crypt_func=here
93 ])
87 AC_SUBST(CRYPTLIB) 94 AC_SUBST(CRYPTLIB)
95 if test "t$found_crypt_func" = there; then
96 AC_DEFINE(HAVE_CRYPT, 1, [crypt() function])
97 fi
88 98
89 # Check if zlib is needed 99 # Check if zlib is needed
90 AC_ARG_WITH(zlib, 100 AC_ARG_WITH(zlib,
91 [ --with-zlib=PATH Use zlib in PATH], 101 [ --with-zlib=PATH Use zlib in PATH],
92 [ 102 [
630 640
631 # Checks for library functions. 641 # Checks for library functions.
632 AC_PROG_GCC_TRADITIONAL 642 AC_PROG_GCC_TRADITIONAL
633 AC_FUNC_MEMCMP 643 AC_FUNC_MEMCMP
634 AC_FUNC_SELECT_ARGTYPES 644 AC_FUNC_SELECT_ARGTYPES
635 AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev crypt]) 645 AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev])
636 646
637 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) 647 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
638 648
639 # Solaris needs ptmx 649 # Solaris needs ptmx
640 if test -z "$no_ptmx_check" ; then 650 if test -z "$no_ptmx_check" ; then
728 if test "x$ac_cv_func_getpass" != xyes; then 738 if test "x$ac_cv_func_getpass" != xyes; then
729 AC_MSG_NOTICE() 739 AC_MSG_NOTICE()
730 AC_MSG_NOTICE([getpass() not available, dbclient will only have public-key authentication]) 740 AC_MSG_NOTICE([getpass() not available, dbclient will only have public-key authentication])
731 fi 741 fi
732 742
733 if test "x$ac_cv_func_crypt" != xyes; then 743 if test "t$found_crypt_func" != there; then
734 AC_MSG_NOTICE() 744 AC_MSG_NOTICE()
735 AC_MSG_NOTICE([crypt() not available, dropbear server will not have password authentication]) 745 AC_MSG_NOTICE([crypt() not available, dropbear server will not have password authentication])
736 fi 746 fi
737 747
738 AC_MSG_NOTICE() 748 AC_MSG_NOTICE()