Annotation of libaitio/configure.in, revision 1.39

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

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