Annotation of libaitio/configure.in, revision 1.33.2.1

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

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