mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
I adapted the sample.c file. the select_loop function is bloated and fails to demonstrate how libssh is simple to handle... it looks to run at first try. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@39 7dcaeef0-15fb-0310-b436-a5af3365683c
90 lines
2.5 KiB
Plaintext
90 lines
2.5 KiB
Plaintext
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ(2.57)
|
|
AC_INIT(libssh, 0.2-dev , aris@0xbadc0de.be)
|
|
AC_CONFIG_SRCDIR([sample.c])
|
|
AC_CONFIG_HEADER([config.h])
|
|
|
|
# Check for the OS.
|
|
AC_CANONICAL_HOST
|
|
case "$host" in
|
|
*-apple*)
|
|
DYLIB_EXTENSION="dylib"
|
|
LIBSSH_LDFLAGS="-dynamiclib -prebind -seg1addr 0x3a000000 -install_name \"${libdir}/libssh.dylib\" -headerpad_max_install_names -current_version 0.1"
|
|
;;
|
|
*)
|
|
DYLIB_EXTENSION="so"
|
|
LIBSSH_LDFLAGS="-shared"
|
|
;;
|
|
esac
|
|
AC_SUBST(DYLIB_EXTENSION)
|
|
AC_SUBST(LIBSSH_LDFLAGS)
|
|
|
|
enable_ssh1=${enable_ssh1:-"no"}
|
|
AC_ARG_ENABLE(ssh1, [ --enable-ssh1 support SSH1])
|
|
AC_MSG_CHECKING([for SSH1 support])
|
|
if test $enable_ssh1 = "yes" ; then
|
|
AC_DEFINE(HAVE_SSH1,1,[Define to 1 if you want to enable SSH1])
|
|
fi
|
|
AC_MSG_RESULT([$enable_ssh1])
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_INSTALL
|
|
AC_PROG_LN_S
|
|
AC_PROG_MAKE_SET
|
|
AC_PROG_RANLIB
|
|
AC_C_BIGENDIAN
|
|
|
|
# Checks for libraries.
|
|
# AC_CHECK_LIB([gcrypt], [gcry_md_open])
|
|
# if test "$ac_cv_lib_gcrypt_gcry_md_open" != yes; then
|
|
# AC_CHECK_LIB([crypto], [BN_init])
|
|
# fi
|
|
AC_CHECK_LIB([crypto],[BN_init])
|
|
AC_CHECK_LIB([z], [deflateInit_])
|
|
AC_SEARCH_LIBS([hstrerror],[nsl resolv])
|
|
AC_SEARCH_LIBS([gethostbyname],[nsl resolv])
|
|
|
|
# Checks for header files.
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS([fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h \
|
|
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 pam/pam_appl.h \
|
|
security/pam_appl.h gcrypt.h])
|
|
|
|
#Warn user when no openssl available
|
|
#FIXME ! how to make it work with gcrypt ?
|
|
#I can't make it work. help would be appreciated
|
|
#if test x"$ac_cv_header_openssl_aes_h" != x"yes" ||
|
|
#x"$ac_cv_header_openssl_blowfish_h" != x"yes"; then
|
|
# echo "Can't find valid openssl files [e.g openssl/aes.h]"
|
|
# echo "Please install Openssl-devel"
|
|
# exit
|
|
#fi
|
|
|
|
#if ! test x"$ac_cv_header_zlib_h" != x"yes"; then
|
|
# echo "Can't find zlib.h"
|
|
# echo "Compression support won't be compiled in"
|
|
#fi
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
AC_HEADER_TIME
|
|
|
|
# Checks for library functions.
|
|
AC_FUNC_MALLOC
|
|
AC_FUNC_MEMCMP
|
|
AC_FUNC_REALLOC
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
AC_TYPE_SIGNAL
|
|
AC_FUNC_VPRINTF
|
|
AC_CHECK_FUNCS([endpwent gethostbyaddr gethostbyname getpass memmove memset \
|
|
cfmakeraw select socket strchr strdup strerror strstr poll])
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
libssh/Makefile
|
|
sftp_server/Makefile])
|
|
AC_OUTPUT
|