#
# $Author: misho $
# $Id: configure.in,v 1.3 2012/01/23 10:34:12 misho Exp $
#
AC_INIT(ansh, 1.1, misho@elwix.org)
AC_CONFIG_SRCDIR([src/anshd.c])
AC_CONFIG_HEADERS([inc/config.h])
# 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 -I/usr/local/include ${CFLAGS}"
LDFLAGS="-L/usr/local/lib ${LDFLAGS}"
# Checks for libraries.
AC_CHECK_LIB([crypto], [AES_ctr128_encrypt])
AC_CHECK_LIB([util], [openpty])
AC_CHECK_LIB([aitcrc], [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
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>