--- libaitsess/configure.in 2008/10/03 17:32:08 1.1.2.2 +++ libaitsess/configure.in 2011/04/30 21:24:21 1.1.2.3 @@ -1,6 +1,6 @@ # # $Author: misho $ -# $Id: configure.in,v 1.1.2.2 2008/10/03 17:32:08 misho Exp $ +# $Id: configure.in,v 1.1.2.3 2011/04/30 21:24:21 misho Exp $ # AC_INIT(libaitsess, 2.0, misho@openbsd-bg.org) AC_CONFIG_SRCDIR([src/aitsess.c]) @@ -31,6 +31,20 @@ AC_C_INLINE AC_FUNC_MALLOC AC_FUNC_MMAP AC_CHECK_FUNCS([bzero memset munmap]) + +# 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, $have_union_semun, [union semun]) + ] msg=yes, msg=no ) +AC_MSG_RESULT([$msg]) DEBUG=no AC_MSG_CHECKING(Debug Build)