File:  [ELWIX - Embedded LightWeight unIX -] / libaitsched / configure.in
Revision 1.60: download - view: text, annotated - select for diffs - revision graph
Wed Jul 16 11:07:06 2025 UTC (8 weeks, 4 days ago) by misho
Branches: MAIN
CVS tags: sched8_5, SCHED8_4, HEAD
Version 8.4

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.60 2025/07/16 11:07:06 misho Exp $
    4: #
    5: AC_INIT(libaitsched, 8.4, 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: if test "${ac_cv_env_CFLAGS_set}" != "set"; then
   24: 	CFLAGS="-Wall -O2 -I${includedir}"
   25: else
   26: 	CFLAGS="${ac_cv_env_CFLAGS_value}"
   27: fi
   28: if test "${ac_cv_env_LDFLAGS_set}" = "set"; then
   29: 	LDFLAGS="${ac_cv_env_LDFLAGS_value}"
   30: else
   31: 	LDFLAGS="-L${libdir}"
   32: fi
   33: 
   34: 
   35: # Checks for libraries.
   36: AC_CHECK_LIB([pthread], [pthread_create])
   37: AC_CHECK_LIB([rt], [aio_read])
   38: AC_CHECK_LIB([elwix], [strlcpy])
   39: AC_CHECK_LIB([bsd], [strlcpy])
   40: 
   41: # Checks for header files.
   42: AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/time.h unistd.h])
   43: 
   44: # Checks for typedefs, structures, and compiler characteristics.
   45: AC_C_INLINE
   46: AC_TYPE_SIZE_T
   47: 
   48: # Checks for library functions.
   49: AC_FUNC_MALLOC
   50: AC_CHECK_FUNCS([clock_gettime memset strerror timer_create timer_settime timer_delete strlcat strlcpy])
   51: 
   52: DEBUG=no
   53: AC_MSG_CHECKING(Debug Build)
   54: AC_ARG_ENABLE(debug,
   55: 	[  --enable-debug          Build library with debug information and additional messages],
   56: 	[ DEBUG=$enableval
   57: 		case "$enableval" in
   58: 			yes)
   59: 				AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
   60: 				CFLAGS="-g ${CFLAGS}"
   61: 				;;
   62: 			*)
   63: 				AC_DEFINE(NDEBUG,, [Turn off debug asserts])
   64: 				;;
   65: 		esac ], AC_DEFINE(NDEBUG,, [Turn off debug asserts]))
   66: AC_MSG_RESULT($DEBUG)
   67: 
   68: AIO=no
   69: AC_MSG_CHECKING(AIO Builtin support)
   70: AC_ARG_ENABLE(aio,
   71: 	[  --enable-aio            Build scheduler library with AIO operations ], 
   72: 	[ AIO=$enableval
   73: 		case "$enableval" in
   74: 			yes)
   75: 				AC_DEFINE(AIO_SUPPORT,, [Build scheduler library with AIO operations])
   76: 				;;
   77: 			*)
   78: 				;;
   79: 		esac ],)
   80: AC_MSG_RESULT($AIO)
   81: 
   82: AC_DEFINE(NO_SUPPORT, 0, [select support])
   83: AC_DEFINE(KQ_SUPPORT, 1, [kqueue support])
   84: AC_DEFINE(EP_SUPPORT, 2, [epoll support])
   85: 
   86: AC_DEFINE(SUP_ENABLE, KQ_SUPPORT, [support type])
   87: 
   88: EPSUP=no
   89: AC_MSG_CHECKING(epoll support)
   90: AC_ARG_ENABLE(epoll,
   91: 	[  --enable-epoll          Enable epoll support (only under Linux) ],
   92: 	[ EPSUP=$enableval
   93: 		case "$enableval" in
   94: 			yes)
   95: 				AC_DEFINE(SUP_ENABLE, EP_SUPPORT, [support type])
   96: 				KQSUP=no
   97: 				;;
   98: 			*)
   99: 				KQSUP=yes
  100: 				;;
  101: 	 	esac ], [ KQSUP=yes ])
  102: AC_MSG_RESULT($EPSUP)
  103: 
  104: AC_MSG_CHECKING(kqueue support)
  105: AC_ARG_ENABLE(kqueue,
  106: 	[  --disable-kqueue        Disable kqueue support ],
  107: 	[ KQSUP=$enableval
  108: 		case "$enableval" in
  109: 			no)
  110: 				AC_DEFINE(SUP_ENABLE, NO_SUPPORT, [support type])
  111: 				;;
  112: 			*)
  113: 				;;
  114: 	 	esac ], )
  115: AC_MSG_RESULT($KQSUP)
  116: 
  117: KQ_EVENTS=24
  118: AC_MSG_CHECKING(How many kqueue events can scheduling at one time)
  119: AC_ARG_WITH(kq_events, 
  120: 	[  --with-kq_events        Set how many kqueue events can scheduling at one time ],
  121: 	[ KQ_EVENTS=$withval ], KQ_EVENTS=32)
  122: AC_DEFINE_UNQUOTED(KQ_EVENTS, $KQ_EVENTS, [ How many kqueue events can scheduling at one time ])
  123: AC_MSG_RESULT($KQ_EVENTS)
  124: 
  125: ELWIX=no
  126: AC_MSG_CHECKING(With libelwix Build)
  127: AC_ARG_WITH(elwix,
  128: 	[  --with-elwix          Build library with libelwix memory managemant],
  129: 	[ ELWIX=$withval
  130: 		case "$withval" in
  131: 			yes)
  132: 				AC_DEFINE(__ELWIX,, [Build libraries with libelwix memory managemant])
  133: 				LIBS="${LIBS} -lelwix"
  134: 				;;
  135: 			*)
  136: 				;;
  137: 		esac ],)
  138: AC_MSG_RESULT($ELWIX)
  139: 
  140: DEBIAN_ARCH=$target_cpu
  141: AS_IF([ test "x$target_cpu" = "xarm6l" -o "x$target_cpu" = "xarm7l" ], DEBIAN_ARCH="armhf") 
  142: AS_IF([ test "x$target_cpu" = "xaarch64" ], DEBIAN_ARCH="arm64") 
  143: AS_IF([ test "x$target_cpu" = "xi686" ], DEBIAN_ARCH="i386") 
  144: AS_IF([ test "x$target_cpu" = "xx86_64" ], DEBIAN_ARCH="amd64") 
  145: AC_SUBST(DEBIAN_ARCH)
  146: 
  147: AC_CONFIG_FILES([Makefile
  148:                  inc/Makefile
  149:                  lib/Makefile
  150:                  debian/Makefile
  151:                  debian/control
  152:                  src/Makefile])
  153: AC_OUTPUT()

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