File:  [ELWIX - Embedded LightWeight unIX -] / libaitio / configure.in
Revision 1.56: download - view: text, annotated - select for diffs - revision graph
Thu Aug 18 09:06:31 2016 UTC (7 years, 9 months ago) by misho
Branches: MAIN
CVS tags: io7_4, IO7_3, HEAD
version 7.3

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.56 2016/08/18 09:06:31 misho Exp $
    4: #
    5: AC_INIT(libaitio, 7.3, misho@elwix.org)
    6: AC_CONFIG_SRCDIR([src/aitio.c])
    7: AC_CONFIG_HEADERS([inc/config.h])
    8: 
    9: ac_cv_func_malloc_0_nonnull="yes"
   10: ac_cv_func_realloc_0_nonnull="yes"
   11: 
   12: # Checks for programs.
   13: AC_PROG_CC
   14: AC_PROG_INSTALL
   15: AC_PROG_RANLIB
   16: 
   17: AC_CANONICAL_HOST
   18: AC_CANONICAL_TARGET
   19: 
   20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
   21: AC_SUBST(MKDEP)
   22: 
   23: CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
   24: LDFLAGS="${LDFLAGS}"
   25: 
   26: AC_CHECK_LIB([crypto], [EVP_CipherInit_ex])
   27: AC_CHECK_LIB([pthread], [pthread_mutex_init])
   28: AC_CHECK_LIB([util], [forkpty])
   29: AC_CHECK_LIB([rt], [aio_read])
   30: AC_CHECK_LIB([elwix], [crcFletcher16])
   31: AC_CHECK_LIB([aitsched], [schedRead])
   32: 
   33: # Checks for header files.
   34: AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h termios.h unistd.h])
   35: 
   36: # Checks for typedefs, structures, and compiler characteristics.
   37: AC_C_INLINE
   38: 
   39: # Checks for library functions.
   40: AC_FUNC_MMAP
   41: AC_CHECK_FUNCS([bzero memset munmap fpurge])
   42: AC_CHECK_FUNCS([pthread_create pthread_exit])
   43: AC_CHECK_FUNCS([shm_open shm_unlink])
   44: 
   45: # It's stupid, but not all platforms have union semun, even those that need it.
   46: AC_MSG_CHECKING(looking for union semun in sys/sem.h)
   47: AC_TRY_COMPILE([
   48: 		#include <sys/types.h>
   49: 		#include <sys/ipc.h>
   50: 		#include <sys/sem.h>
   51: 		],[
   52: 		union semun arg;
   53: 		semctl(0, 0, 0, arg);
   54: 		], [ 
   55: 		AC_DEFINE(HAVE_UNION_SEMUN,, [union semun])
   56: 		] msg=yes, msg=no )
   57: AC_MSG_RESULT([$msg])
   58: 
   59: DEBUG=no
   60: AC_MSG_CHECKING(Debug Build)
   61: AC_ARG_ENABLE(debug,
   62: 	[  --enable-debug          Build library with debug information and additional messages],
   63: 	[ DEBUG=$enableval
   64: 		case "$enableval" in
   65: 			yes)
   66: 				CFLAGS="-g ${CFLAGS}"
   67: 				;;
   68: 			*)
   69: 				AC_DEFINE(NDEBUG,, [Build w/o assert() support])
   70: 				;;
   71: 		esac ],)
   72: AC_MSG_RESULT($DEBUG)
   73: 
   74: AIO=no
   75: AC_MSG_CHECKING(AIO Build)
   76: AC_ARG_ENABLE(aio,
   77: 	[  --enable-aio            Build library with AIO operations ], 
   78: 	[ AIO=$enableval
   79: 		case "$enableval" in
   80: 			yes)
   81: 				AC_DEFINE(AIO_OPS,, [Build library with AIO operations])
   82: 				;;
   83: 			*)
   84: 				;;
   85: 		esac ],)
   86: AC_MSG_RESULT($AIO)
   87: 
   88: ZCBUF=no
   89: AC_MSG_CHECKING(Zero-copy buffer Build)
   90: AC_ARG_ENABLE(zcpy-buffer,
   91: 	[  --enable-zcpy-buffer    Build library with zero-copy buffer ], 
   92: 	[ ZCBUF=$enableval
   93: 		case "$enableval" in
   94: 			yes)
   95: 				AC_DEFINE(ZCBUF_ENABLE,, [Build library with zero-copy buffer])
   96: 				;;
   97: 			*)
   98: 				;;
   99: 		esac ],)
  100: AC_MSG_RESULT($ZCBUF)
  101: 
  102: AC_CONFIG_FILES([Makefile
  103:                  inc/Makefile
  104:                  lib/Makefile
  105:                  src/Makefile])
  106: AC_OUTPUT

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>