File:  [ELWIX - Embedded LightWeight unIX -] / libaitsched / configure.in
Revision 1.58: download - view: text, annotated - select for diffs - revision graph
Wed Mar 20 12:52:49 2024 UTC (8 weeks, 2 days ago) by misho
Branches: MAIN
CVS tags: sched8_3, SCHED8_2, HEAD
Version 8.2

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

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