File:  [ELWIX - Embedded LightWeight unIX -] / libaitio / configure.in
Revision 1.33.2.1: download - view: text, annotated - select for diffs - revision graph
Wed Mar 13 14:56:47 2013 UTC (11 years, 7 months ago) by misho
Branches: io5_1
Diff to: branchpoint 1.33: preferred, unified
new ver 5.1

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

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