File:  [ELWIX - Embedded LightWeight unIX -] / libaitsched / configure.in
Revision 1.34.2.6: download - view: text, annotated - select for diffs - revision graph
Mon May 19 23:27:30 2014 UTC (10 years, 1 month ago) by misho
Branches: sched5_2
Diff to: branchpoint 1.34: preferred, unified
add for 2 new func checks

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.34.2.6 2014/05/19 23:27:30 misho Exp $
    4: #
    5: AC_INIT(libaitsched, 5.2, misho@elwix.org)
    6: AC_CONFIG_SRCDIR([src/aitsched.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: 
   27: # Checks for libraries.
   28: AC_CHECK_LIB([pthread], [pthread_create])
   29: AC_CHECK_LIB([rt], [aio_read])
   30: 
   31: # Checks for header files.
   32: AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/time.h unistd.h])
   33: 
   34: # Checks for typedefs, structures, and compiler characteristics.
   35: AC_C_INLINE
   36: AC_TYPE_SIZE_T
   37: 
   38: # Checks for library functions.
   39: AC_FUNC_MALLOC
   40: AC_CHECK_FUNCS([clock_gettime memset strerror timer_create timer_settime timer_delete strlcat strlcpy])
   41: 
   42: DEBUG=no
   43: AC_MSG_CHECKING(Debug Build)
   44: AC_ARG_ENABLE(debug,
   45: 	[  --enable-debug          Build library with debug information and additional messages],
   46: 	[ DEBUG=$enableval
   47: 		case "$enableval" in
   48: 			yes)
   49: 				AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
   50: 				CFLAGS="-g ${CFLAGS}"
   51: 				;;
   52: 			*)
   53: 				AC_DEFINE(NDEBUG,, [Turn off debug asserts])
   54: 				;;
   55: 		esac ], AC_DEFINE(NDEBUG,, [Turn off debug asserts]))
   56: AC_MSG_RESULT($DEBUG)
   57: 
   58: AIO=no
   59: AC_MSG_CHECKING(AIO Builtin support)
   60: AC_ARG_ENABLE(aio,
   61: 	[  --enable-aio            Build scheduler library with AIO operations ], 
   62: 	[ AIO=$enableval
   63: 		case "$enableval" in
   64: 			yes)
   65: 				AC_DEFINE(AIO_SUPPORT,, [Build scheduler library with AIO operations])
   66: 				;;
   67: 			*)
   68: 				;;
   69: 		esac ],)
   70: AC_MSG_RESULT($AIO)
   71: 
   72: AC_DEFINE(NO_SUPPORT, 0, [select support])
   73: AC_DEFINE(KQ_SUPPORT, 1, [kqueue support])
   74: AC_DEFINE(EP_SUPPORT, 2, [epoll support])
   75: 
   76: AC_DEFINE(SUP_ENABLE, KQ_SUPPORT, [support type])
   77: 
   78: EPSUP=no
   79: AC_MSG_CHECKING(epoll support)
   80: AC_ARG_ENABLE(epoll,
   81: 	[  --enable-epoll          Enable epoll support (only under Linux) ],
   82: 	[ EPSUP=$enableval
   83: 		case "$enableval" in
   84: 			yes)
   85: 				AC_DEFINE(SUP_ENABLE, EP_SUPPORT, [support type])
   86: 				KQSUP=no
   87: 				;;
   88: 			*)
   89: 				KQSUP=yes
   90: 				;;
   91: 	 	esac ], [ KQSUP=yes ])
   92: AC_MSG_RESULT($EPSUP)
   93: 
   94: AC_MSG_CHECKING(kqueue support)
   95: AC_ARG_ENABLE(kqueue,
   96: 	[  --disable-kqueue        Disable kqueue support ],
   97: 	[ KQSUP=$enableval
   98: 		case "$enableval" in
   99: 			no)
  100: 				AC_DEFINE(SUP_ENABLE, NO_SUPPORT, [support type])
  101: 				;;
  102: 			*)
  103: 				;;
  104: 	 	esac ], )
  105: AC_MSG_RESULT($KQSUP)
  106: 
  107: KQ_EVENTS=24
  108: AC_MSG_CHECKING(How many kqueue events can scheduling at one time)
  109: AC_ARG_WITH(kq_events, 
  110: 	[  --with-kq_events        Set how many kqueue events can scheduling at one time ],
  111: 	[ KQ_EVENTS=$withval ], KQ_EVENTS=32)
  112: AC_DEFINE_UNQUOTED(KQ_EVENTS, $KQ_EVENTS, [ How many kqueue events can scheduling at one time ])
  113: AC_MSG_RESULT($KQ_EVENTS)
  114: 
  115: AC_CONFIG_FILES([Makefile
  116:                  inc/Makefile
  117:                  lib/Makefile
  118:                  src/Makefile])
  119: AC_OUTPUT()

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