--- libaitsess/configure.in 2008/10/03 17:32:08 1.1.2.2 +++ libaitsess/configure.in 2013/01/17 13:01:27 1.7 @@ -1,8 +1,8 @@ # # $Author: misho $ -# $Id: configure.in,v 1.1.2.2 2008/10/03 17:32:08 misho Exp $ +# $Id: configure.in,v 1.7 2013/01/17 13:01:27 misho Exp $ # -AC_INIT(libaitsess, 2.0, misho@openbsd-bg.org) +AC_INIT(libaitsess, 3.3, misho@elwix.org) AC_CONFIG_SRCDIR([src/aitsess.c]) AC_CONFIG_HEADERS([inc/config.h]) @@ -20,6 +20,8 @@ CFLAGS="-Wall -O2 -fPIC -I/usr/local/include ${CFLAGS} LDFLAGS="-L/usr/local/lib ${LDFLAGS}" # Checks for libraries. +AC_CHECK_LIB(pthread, [pthread_create]) +AC_CHECK_LIB(aitio, [io_arrayInit]) # Checks for header files. @@ -31,6 +33,22 @@ AC_C_INLINE AC_FUNC_MALLOC AC_FUNC_MMAP AC_CHECK_FUNCS([bzero memset munmap]) +AC_CHECK_FUNCS([pthread_create pthread_exit]) +AC_CHECK_FUNCS([shm_open shm_unlink]) + +# It's stupid, but not all platforms have union semun, even those that need it. +AC_MSG_CHECKING(looking for union semun in sys/sem.h) +AC_TRY_COMPILE([ + #include + #include + #include + ],[ + union semun arg; + semctl(0, 0, 0, arg); + ], [ + AC_DEFINE(HAVE_UNION_SEMUN,, [union semun]) + ] msg=yes, msg=no ) +AC_MSG_RESULT([$msg]) DEBUG=no AC_MSG_CHECKING(Debug Build)