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: *) 17: DYLIB_EXTENSION="so" 18: LIBSSH_LDFLAGS="-shared" 19: ;; 20: esac 21: AC_SUBST(DYLIB_EXTENSION) 22: AC_SUBST(LIBSSH_LDFLAGS) 23: 24: # Checks for programs. 25: AC_PROG_CC 26: AC_PROG_INSTALL 27: AC_PROG_LN_S 28: AC_PROG_MAKE_SET 29: AC_PROG_RANLIB 30: AC_C_BIGENDIAN 31: 32: # Checks for libraries. 33: AC_CHECK_LIB([crypto], [BN_init]) 34: AC_CHECK_LIB([z], [deflateInit_]) 35: AC_CHECK_LIB([resolv],[gethostbyname]) 36: AC_CHECK_LIB([nsl],[gethostbyname]) 37: 38: # Checks for header files. 39: AC_HEADER_STDC 40: AC_CHECK_HEADERS([fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h \ 41: sys/time.h termios.h unistd.h openssl/aes.h openssl/blowfish.h zlib.h \ 42: sys/poll.h ]) 43: 44: # Checks for typedefs, structures, and compiler characteristics. 45: AC_C_CONST 46: AC_HEADER_TIME 47: 48: # Checks for library functions. 49: AC_FUNC_MALLOC 50: AC_FUNC_MEMCMP 51: AC_FUNC_REALLOC 52: AC_FUNC_SELECT_ARGTYPES 53: AC_TYPE_SIGNAL 54: AC_FUNC_VPRINTF 55: AC_CHECK_FUNCS([endpwent gethostbyaddr gethostbyname getpass memmove memset \ 56: select socket strchr strdup strerror strstr poll]) 57: 58: AC_CONFIG_FILES([Makefile 59: libssh/Makefile]) 60: AC_OUTPUT |