# # $Author: misho $ # $Id: configure.in,v 1.6 2015/05/19 23:25:29 misho Exp $ # AC_INIT(ansh, 2.0, misho@elwix.org) AC_CONFIG_SRCDIR([src/anshd.c]) AC_CONFIG_HEADERS([inc/config.h]) ac_cv_func_malloc_0_nonnull="yes" ac_cv_func_realloc_0_nonnull="yes" # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_CANONICAL_HOST AC_CANONICAL_TARGET AC_CHECK_TOOL(MKDEP, mkdep, no) AC_SUBST(MKDEP) CFLAGS="-Wall -O2 -fPIC ${CFLAGS}" LDFLAGS="${LDFLAGS}" # Checks for libraries. AC_CHECK_LIB([crypto], [AES_ctr128_encrypt]) AC_CHECK_LIB([util], [openpty]) AC_CHECK_LIB([elwix], [crcAdler]) AC_CHECK_LIB([aitio], [ioForkPTY]) #AC_CHECK_LIB([aitsched], [schedRead]) # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h syslog.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_INT8_T AC_TYPE_PID_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT8_T # Checks for library functions. AC_FUNC_FORK AC_FUNC_MALLOC AC_CHECK_FUNCS([dup2 endpwent gethostbyname memset select socket strerror strtol]) STATIC="no" AC_MSG_CHECKING(Static build for ansh) AC_ARG_ENABLE(static, [ --enable-static Static build for ansh software ], [ STATIC=$enableval case "$enableval" in yes) LDFLAGS="-static ${LDFLAGS}" ;; *) ;; esac ],) AC_MSG_RESULT($STATIC) AC_CONFIG_FILES([Makefile bin/Makefile inc/Makefile src/Makefile]) AC_OUTPUT