1: # -*- Autoconf -*- 2: # Process this file with autoconf to produce a configure script. 3: 4: AC_PREREQ(2.57) 5: AC_INIT(libssh, 0.11 , aris@0xbadc0de.be) 6: AC_CONFIG_SRCDIR([sample.c]) 7: AC_CONFIG_HEADER([config.h]) 8: 9: # Check for the OS. 10: AC_CANONICAL_HOST 11: case "$host" in 12: *-apple*) 13: DYLIB_EXTENSION="dylib" 14: LIBSSH_LDFLAGS="-dynamiclib -prebind -seg1addr 0x3a000000 -install_name \"${libdir}/libssh.dylib\" -headerpad_max_install_names -current_version 0.1" 15: ;; 16: *-mingw32msvc*) 17: DYLIB_EXTENSION="dll" 18: LIBSSH_LDFLAGS="-shared" 19: LIBS="$LIBS -lwsock32 -lgdi32" 20: ;; 21: *) 22: DYLIB_EXTENSION="so" 23: LIBSSH_LDFLAGS="-shared" 24: ;; 25: esac 26: AC_SUBST(DYLIB_EXTENSION) 27: AC_SUBST(LIBSSH_LDFLAGS) 28: 29: # Checks for programs. 30: AC_PROG_CC 31: AC_PROG_INSTALL 32: AC_PROG_LN_S 33: AC_PROG_MAKE_SET 34: AC_PROG_RANLIB 35: AC_C_BIGENDIAN 36: 37: # Checks for libraries. 38: AC_CHECK_LIB([crypto], [BN_init]) 39: AC_CHECK_LIB([z], [deflateInit_]) 40: AC_SEARCH_LIBS(inet_ntoa, socket resolv nsl ws2_32 wsock32,, [ AC_MSG_WARN([Couldn't find inet_ntoa]) ]) 41: AC_SEARCH_LIBS(gethostbyname, socket resolv nsl ws2_32 wsock32,, [ AC_MSG_WARN([Couldn't find gethostbyname]) ]) 42: AC_SEARCH_LIBS(gethostbyaddr, socket resolv nsl ws2_32 wsock32,, [ AC_MSG_WARN([Couldn't find gethostbyaddr]) ]) 43: 44: # Checks for header files. 45: AC_HEADER_STDC 46: AC_CHECK_HEADERS([fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h \ 47: sys/time.h termios.h unistd.h openssl/aes.h openssl/blowfish.h zlib.h \ 48: sys/poll.h sys/select.h netdb.h windows.h pty.h pwd.h signal.h inttypes.h \ 49: stdint.h sys/types.h]) 50: 51: # Checks for typedefs, structures, and compiler characteristics. 52: AC_C_CONST 53: AC_HEADER_TIME 54: 55: # Checks for library functions. 56: AC_FUNC_MALLOC 57: AC_FUNC_MEMCMP 58: AC_FUNC_SELECT_ARGTYPES 59: AC_TYPE_SIGNAL 60: AC_FUNC_VPRINTF 61: AC_CHECK_FUNCS([endpwent getpass memmove memset gethostbyname gethostbyaddr \ 62: select socket strchr strdup strerror strstr poll getpwent getuid \ 63: signal tcgetattr tcsetattr]) 64: 65: AC_CONFIG_FILES([Makefile 66: libssh/Makefile]) 67: AC_OUTPUT |