1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

configure.in: Now exit when crypto library not available and minor fixes

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@72 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Jean-Philippe Garcia Ballester
2006-05-08 08:45:00 +00:00
parent 1c08838ce8
commit 49f537bdbe

View File

@@ -40,8 +40,7 @@ case "$host" in
esac esac
AC_ARG_WITH([versioned-symbol], AC_ARG_WITH([versioned-symbol],
AC_HELP_STRING([--with-versioned-symbol],[Use versioned symbols]), AC_HELP_STRING([--with-versioned-symbol],[Use versioned symbols]),
[echo $withval > plop [if test "$withval" = "yes"; then
if test $withval = "yes"; then
LIBSSH_VERS="$LIBSSH_LDFLAGS -Wl,--version-script,libssh.vers" LIBSSH_VERS="$LIBSSH_LDFLAGS -Wl,--version-script,libssh.vers"
else else
LIBSSH_VERS="" LIBSSH_VERS=""
@@ -52,7 +51,7 @@ AC_SUBST(LIBSSH_VERS)
enable_ssh1=${enable_ssh1:-"no"} enable_ssh1=${enable_ssh1:-"no"}
AC_ARG_ENABLE(ssh1, [ --enable-ssh1 support SSH1]) AC_ARG_ENABLE(ssh1, [ --enable-ssh1 support SSH1])
AC_MSG_CHECKING([for SSH1 support]) AC_MSG_CHECKING([for SSH1 support])
if test $enable_ssh1 = "yes" ; then if test "$enable_ssh1" = "yes" ; then
AC_DEFINE(HAVE_SSH1,1,[Define to 1 if you want to enable SSH1]) AC_DEFINE(HAVE_SSH1,1,[Define to 1 if you want to enable SSH1])
fi fi
AC_MSG_RESULT([$enable_ssh1]) AC_MSG_RESULT([$enable_ssh1])
@@ -66,12 +65,15 @@ AC_PROG_LIBTOOL
AC_C_BIGENDIAN AC_C_BIGENDIAN
# Checks for libraries. # Checks for libraries.
#AC_CHECK_LIB([gcrypt], [gcry_md_open]) with_gcrypt=${with_gcrypt:-"no"}
AC_ARG_WITH([libgcrypt], AC_ARG_WITH([libgcrypt],
AC_HELP_STRING([--with-libgcrypt],[Use libgcrypt instead of libcrypto]), AC_HELP_STRING([--with-libgcrypt],[Use libgcrypt instead of libcrypto]),
[AC_CHECK_LIB([gcrypt], [gcry_md_open])]) [if test "$withval" = "yes"; then
with_gcrypt="yes"
AC_CHECK_LIB([gcrypt], [gcry_md_open])
fi], [ : ])
if test "$ac_cv_lib_gcrypt_gcry_md_open" != yes; then if test "$with_gcrypt" = "no"; then
AC_CHECK_LIB([crypto], [BN_init]) AC_CHECK_LIB([crypto], [BN_init])
fi fi
@@ -87,14 +89,19 @@ sys/time.h termios.h unistd.h openssl/aes.h openssl/blowfish.h \
openssl/des.h zlib.h sys/poll.h stdint.h pty.h gcrypt.h]) openssl/des.h zlib.h sys/poll.h stdint.h pty.h gcrypt.h])
#Warn user when no openssl available #Warn user when no openssl available
#FIXME ! how to make it work with gcrypt ? if test "$with_gcrypt" = "no" && (test "$ac_cv_header_openssl_aes_h" != "yes" ||
#I can't make it work. help would be appreciated test "$ac_cv_header_openssl_blowfish_h" != "yes"); then
#if test x"$ac_cv_header_openssl_aes_h" != x"yes" || echo "Can't find valid openssl files [e.g openssl/aes.h]"
#x"$ac_cv_header_openssl_blowfish_h" != x"yes"; then echo "Please install Openssl-devel"
# echo "Can't find valid openssl files [e.g openssl/aes.h]" exit
# echo "Please install Openssl-devel" fi
# exit
#fi #Warn user when no libgcrypt available
if test "$with_gcrypt" = "yes" && test "$ac_cv_header_gcrypt_h" != "yes"; then
echo "Can't find valid libgcrypt files [e.g gcrypt.h]"
echo "Please install libgcrypt-devel"
exit
fi
#if ! test x"$ac_cv_header_zlib_h" != x"yes"; then #if ! test x"$ac_cv_header_zlib_h" != x"yes"; then
# echo "Can't find zlib.h" # echo "Can't find zlib.h"