summaryrefslogtreecommitdiff
path: root/m4/_xine.m4
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-03-29 18:23:36 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-03-29 18:23:36 +0000
commit170641f69a86cdd740df4c1ec74194ef84dab6a0 (patch)
tree06fe02512fdee953cce1c56d73257a4c714c64ac /m4/_xine.m4
parent6afd42f5c2fc8272cd1308584c6f794f91a07c40 (diff)
downloadxine-lib-170641f69a86cdd740df4c1ec74194ef84dab6a0.tar.gz
xine-lib-170641f69a86cdd740df4c1ec74194ef84dab6a0.tar.bz2
Replace obsolete macros (processing done by autoupdate).
Some tests were rearranged (AC_TRY_LINK moved out of AC_TRY_RUN cross-compilation case, with arrangements to maintain the semantics) to avoid autoupdate errors. Factored out common (duplicate) code in aa.m4. Tested with autoconf 2.61; needs testing with 2.60. CVS patchset: 8767 CVS date: 2007/03/29 18:23:36
Diffstat (limited to 'm4/_xine.m4')
-rw-r--r--m4/_xine.m434
1 files changed, 13 insertions, 21 deletions
diff --git a/m4/_xine.m4 b/m4/_xine.m4
index 9acb0f37d..930703bbb 100644
--- a/m4/_xine.m4
+++ b/m4/_xine.m4
@@ -9,7 +9,7 @@ AC_DEFUN([AC_C_ALWAYS_INLINE],
AC_MSG_CHECKING([for always_inline])
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
- AC_TRY_COMPILE([],[inline __attribute__ ((__always_inline__)) void f (void);],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[inline __attribute__ ((__always_inline__)) void f (void);]])],
[ac_cv_always_inline=yes],[ac_cv_always_inline=no])
CFLAGS="$SAVE_CFLAGS"
AC_MSG_RESULT([$ac_cv_always_inline])
@@ -148,7 +148,7 @@ AC_DEFUN([AC_TRY_CFLAGS],
[AC_MSG_CHECKING([if $CC supports $1 flags])
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$1"
- AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
CFLAGS="$SAVE_CFLAGS"
AC_MSG_RESULT([$ac_cv_try_cflags_ok])
if test x"$ac_cv_try_cflags_ok" = x"yes"; then
@@ -163,7 +163,7 @@ AC_DEFUN([AC_TRY_LDFLAGS],
[AC_MSG_CHECKING([if $CC supports $1 flags])
SAVE_LDFLAGS="$LDFLAGS"
LDFLAGS="$1"
- AC_TRY_LINK([],[],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no])
LDFLAGS="$SAVE_LDFLAGS"
AC_MSG_RESULT([$ac_cv_try_ldflags_ok])
if test x"$ac_cv_try_ldflags_ok" = x"yes"; then
@@ -362,7 +362,7 @@ dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
dnl abort if the given type does not have the supposed size
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
[AC_MSG_CHECKING(that size of $1 is $2)
- AC_TRY_COMPILE([],[switch (0) case 0: case (sizeof ($1) == $2):;],[],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) case 0: case (sizeof ($1) == $2):;]])],[],
[AC_MSG_ERROR([can not build a default inttypes.h])])
AC_MSG_RESULT([yes])])
@@ -545,26 +545,18 @@ AC_DEFUN([AC_CHECK_SOCKLEN_T], [
AC_LANG_PUSH(C++)
AC_CACHE_VAL(ac_cv_socklen_t, [
- AC_TRY_COMPILE(
-#include <sys/types.h>
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <sys/socket.h>
- ,
-socklen_t a=0;
+ ]], [[socklen_t a=0;
getsockname(0,(struct sockaddr*)0, &a);
- ,
- ac_cv_socklen_t=socklen_t,
- [
- AC_TRY_COMPILE(
-#include <sys/types.h>
-#include <sys/socket.h>
- ,
+ ]])],[ac_cv_socklen_t=socklen_t],[ac_cv_socklen_t=''])
+ if test "x$ac_cv_socklen_t" = x; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <sys/socket.h>]], [[
int a=0;
-getsockname(0,(struct sockaddr*)0, &a);
- ,
- ac_cv_socklen_t=int,
- ac_cv_socklen_t=size_t
- )]
- )
+getsockname(0,(struct sockaddr*)0, &a);]])],
+ [ac_cv_socklen_t=int],[ac_cv_socklen_t=size_t])
+ fi
])
AC_LANG_POP([C++])