[PATCH xserver 2/5] autoconf: fix warning, replace AC_TRY_LINK with AC_LINK_IFELSE

Gaetan Nadon memsize at videotron.ca
Fri Jan 17 06:39:02 PST 2014


The code produced in the configure script is identical.

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Tested-by: Trevor Woerner <trevor.woerner at linaro.org>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index c15877d..1859b8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,20 +265,20 @@ AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes])
 
 AC_CACHE_CHECK([for SYSV IPC],
 		ac_cv_sysv_ipc,
-		[AC_TRY_LINK([
+               [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #include <sys/ipc.h>
 #include <sys/shm.h>
 #include <sys/stat.h>
-],[
+]],[[
 { 
     int id;
     id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR);
     if (id < 0) return -1;
     return shmctl(id, IPC_RMID, 0);
-}],
-	[ac_cv_sysv_ipc=yes],
-	[ac_cv_sysv_ipc=no])])
+}]])],
+       [ac_cv_sysv_ipc=yes],
+       [ac_cv_sysv_ipc=no])])
 if test "x$ac_cv_sysv_ipc" = xyes; then
 	AC_DEFINE(HAVE_SYSV_IPC, 1, [Define to 1 if SYSV IPC is available])
 fi
-- 
1.7.9.5



More information about the xorg-devel mailing list