Annotation of libaitio/configure.in, revision 1.56

1.1       misho       1: #
                      2: # $Author: misho $
1.56    ! misho       3: # $Id: configure.in,v 1.55.2.3 2016/08/10 13:59:44 misho Exp $
1.1       misho       4: #
1.56    ! misho       5: AC_INIT(libaitio, 7.3, misho@elwix.org)
1.1       misho       6: AC_CONFIG_SRCDIR([src/aitio.c])
                      7: AC_CONFIG_HEADERS([inc/config.h])
                      8: 
1.35      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
1.56    ! misho      15: AC_PROG_RANLIB
1.1       misho      16: 
                     17: AC_CANONICAL_HOST
                     18: AC_CANONICAL_TARGET
                     19: 
1.56    ! misho      20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
1.1       misho      21: AC_SUBST(MKDEP)
                     22: 
1.52      misho      23: CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
                     24: LDFLAGS="${LDFLAGS}"
1.1       misho      25: 
1.8       misho      26: AC_CHECK_LIB([crypto], [EVP_CipherInit_ex])
1.23      misho      27: AC_CHECK_LIB([pthread], [pthread_mutex_init])
1.13      misho      28: AC_CHECK_LIB([util], [forkpty])
1.20      misho      29: AC_CHECK_LIB([rt], [aio_read])
1.33      misho      30: AC_CHECK_LIB([elwix], [crcFletcher16])
1.43      misho      31: AC_CHECK_LIB([aitsched], [schedRead])
1.8       misho      32: 
1.1       misho      33: # Checks for header files.
                     34: AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h termios.h unistd.h])
                     35: 
                     36: # Checks for typedefs, structures, and compiler characteristics.
                     37: AC_C_INLINE
                     38: 
                     39: # Checks for library functions.
1.33      misho      40: AC_FUNC_MMAP
1.56    ! misho      41: AC_CHECK_FUNCS([bzero memset munmap fpurge])
1.33      misho      42: AC_CHECK_FUNCS([pthread_create pthread_exit])
                     43: AC_CHECK_FUNCS([shm_open shm_unlink])
                     44: 
                     45: # It's stupid, but not all platforms have union semun, even those that need it.
                     46: AC_MSG_CHECKING(looking for union semun in sys/sem.h)
                     47: AC_TRY_COMPILE([
                     48:                #include <sys/types.h>
                     49:                #include <sys/ipc.h>
                     50:                #include <sys/sem.h>
                     51:                ],[
                     52:                union semun arg;
                     53:                semctl(0, 0, 0, arg);
                     54:                ], [ 
                     55:                AC_DEFINE(HAVE_UNION_SEMUN,, [union semun])
                     56:                ] msg=yes, msg=no )
                     57: AC_MSG_RESULT([$msg])
1.1       misho      58: 
                     59: DEBUG=no
                     60: AC_MSG_CHECKING(Debug Build)
                     61: AC_ARG_ENABLE(debug,
                     62:        [  --enable-debug          Build library with debug information and additional messages],
                     63:        [ DEBUG=$enableval
                     64:                case "$enableval" in
                     65:                        yes)
                     66:                                CFLAGS="-g ${CFLAGS}"
                     67:                                ;;
                     68:                        *)
                     69:                                AC_DEFINE(NDEBUG,, [Build w/o assert() support])
                     70:                                ;;
                     71:                esac ],)
                     72: AC_MSG_RESULT($DEBUG)
                     73: 
1.7       misho      74: AIO=no
1.5       misho      75: AC_MSG_CHECKING(AIO Build)
                     76: AC_ARG_ENABLE(aio,
1.22      misho      77:        [  --enable-aio            Build library with AIO operations ], 
1.5       misho      78:        [ AIO=$enableval
                     79:                case "$enableval" in
                     80:                        yes)
                     81:                                AC_DEFINE(AIO_OPS,, [Build library with AIO operations])
                     82:                                ;;
                     83:                        *)
                     84:                                ;;
1.7       misho      85:                esac ],)
1.5       misho      86: AC_MSG_RESULT($AIO)
                     87: 
1.52      misho      88: ZCBUF=no
                     89: AC_MSG_CHECKING(Zero-copy buffer Build)
                     90: AC_ARG_ENABLE(zcpy-buffer,
                     91:        [  --enable-zcpy-buffer    Build library with zero-copy buffer ], 
                     92:        [ ZCBUF=$enableval
                     93:                case "$enableval" in
                     94:                        yes)
                     95:                                AC_DEFINE(ZCBUF_ENABLE,, [Build library with zero-copy buffer])
                     96:                                ;;
                     97:                        *)
                     98:                                ;;
                     99:                esac ],)
                    100: AC_MSG_RESULT($ZCBUF)
                    101: 
1.1       misho     102: AC_CONFIG_FILES([Makefile
                    103:                  inc/Makefile
                    104:                  lib/Makefile
                    105:                  src/Makefile])
                    106: AC_OUTPUT

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