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