From 2f4fa09b1ce6dc2e50f4f47e3b50582cc855ba4a Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Thu, 31 May 2012 22:08:16 +1000 Subject: [PATCH] config: use newer AC_COMPILE_IFELSE() Signed-off-by: Angus Salkeld --- configure.ac | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index b97ed8f..16f15a7 100644 --- a/configure.ac +++ b/configure.ac @@ -153,22 +153,21 @@ AC_CHECK_MEMBER([struct sockaddr_un.sun_len], [], [#include ]) - 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); -], [have_union_semun="1" union_semun=yes ] -msg=yes, [ -have_union_semun="0" -msg=no ] ) -AC_MSG_RESULT([$msg]) -AM_CONDITIONAL(HAVE_SEMUN, - [test "x$have_union_semun" = xyes]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include + #include + #include ]], +[[union semun arg; semctl(0, 0, 0, arg);]])], + [ + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED([HAVE_SEMUN], 1, [Define to 1 if you have union semun.]) + ], + [ + AC_MSG_RESULT([no]) + ] + ) + # Checks for library functions. AC_FUNC_CHOWN