summaryrefslogtreecommitdiff
path: root/m4/dvdnav.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/dvdnav.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/dvdnav.m4')
-rw-r--r--m4/dvdnav.m420
1 files changed, 11 insertions, 9 deletions
diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4
index 3371bdd2a..0f24080f7 100644
--- a/m4/dvdnav.m4
+++ b/m4/dvdnav.m4
@@ -40,6 +40,8 @@ AC_ARG_ENABLE(dvdnavtest,
AS_HELP_STRING([--disable-dvdnavtest], [do not try to compile and run a test DVDNAV program]),
enable_dvdnavtest=$enableval, enable_dvdnavtest=yes)
+ AC_LANG_PUSH([C])
+
if test x$dvdnav_config_exec_prefix != x ; then
dvdnav_config_args="$dvdnav_config_args --exec-prefix=$dvdnav_config_exec_prefix"
if test x${DVDNAV_CONFIG+set} != xset ; then
@@ -80,10 +82,8 @@ dnl
dnl Now check if the installed DVDNAV is sufficiently new. (Also sanity
dnl checks the results of dvdnav-config to some extent
dnl
- AC_LANG_SAVE()
- AC_LANG_C()
rm -f conf.dvdnavtest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <dvdnav.h>
#include <stdio.h>
#include <stdlib.h>
@@ -126,11 +126,13 @@ main ()
}
return 1;
}
-],, no_dvdnav=yes,
- AC_TRY_LINK([
+]])],[],[no_dvdnav=yes],[no_dvdnav=cc])
+ if test "x$no_dvdnav" = xcc; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <dvdnav.h>
#include <stdio.h>
-], [ return 0; ],, no_dvdnav=yes))
+]], [[ return 0; ]])],[no_dvdnav=''],[no_dvdnav=yes])
+ fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@@ -152,10 +154,10 @@ main ()
echo "*** Could not run DVDNAV test program, checking why..."
CFLAGS="$CFLAGS $DVDNAV_CFLAGS"
LIBS="$LIBS $DVDNAV_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <dvdnav.h>
#include <stdio.h>
-], [ return 0; ],
+]], [[ return 0; ]])],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding DVDNAV or finding the wrong"
echo "*** version of DVDNAV. If it is not finding DVDNAV, you'll need to set your"
@@ -180,6 +182,6 @@ main ()
fi
AC_SUBST(DVDNAV_CFLAGS)
AC_SUBST(DVDNAV_LIBS)
- AC_LANG_RESTORE()
+ AC_LANG_POP([C])
rm -f conf.dvdnavtest
])