summaryrefslogtreecommitdiff
path: root/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
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')
-rw-r--r--m4/_xine.m434
-rw-r--r--m4/aa.m4217
-rw-r--r--m4/arts.m415
-rw-r--r--m4/directx.m45
-rw-r--r--m4/dl.m45
-rw-r--r--m4/dvdnav.m420
-rw-r--r--m4/ioctl_request.m44
-rw-r--r--m4/libFLAC.m418
-rw-r--r--m4/opengl.m45
-rw-r--r--m4/optimizations.m42
-rw-r--r--m4/xine.m414
11 files changed, 140 insertions, 199 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++])
diff --git a/m4/aa.m4 b/m4/aa.m4
index c79738053..bab0d9d28 100644
--- a/m4/aa.m4
+++ b/m4/aa.m4
@@ -35,6 +35,77 @@ dnl * use aalib-config instead of aainfo now.
dnl 17/06/2001
dnl * First shot
dnl
+
+dnl Internal bits, used by AM_PATH_AALIB.
+dnl Requires AALIB_CFLAGS and AALIB_FLAGS to be defined
+AC_DEFUN([_AALIB_CHECK_VERSION], [
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$AALIB_CFLAGS $CFLAGS"
+ LIBS="$AALIB_LIBS $LIBS"
+
+dnl Now check if the installed AALIB is sufficiently new. (Also sanity
+dnl checks the results of aalib-config to some extent.)
+
+ rm -f conf.aalibtest
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <aalib.h>
+
+int main () {
+ int major, minor;
+ char *tmp_version;
+
+ system ("touch conf.aalibtest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = (char *) strdup("$min_aalib_version");
+ if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
+ printf("%s, bad version string\n", "$min_aalib_version");
+ exit(1);
+ }
+
+ if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) &&
+#ifdef AA_LIB_MINNOR
+ (AA_LIB_MINNOR >= minor)
+#else
+ (AA_LIB_MINOR >= minor)
+#endif
+ )) {
+ return 0;
+ }
+ else {
+#ifdef AA_LIB_MINNOR
+ printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR);
+#else
+ printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR);
+#endif
+ printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor);
+ printf("*** AALIB is always available from:\n");
+ printf("*** http://www.ta.jcu.cz://aa\n");
+ printf("***\n");
+ }
+ return 1;
+}
+]])],[],[no_aalib=yes],[no_aalib=cc])
+ if test "x$no_aalib" = xcc; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <aalib.h>
+]], [[ return ((AA_LIB_VERSION) ||
+#ifdef AA_LIB_MINNOR
+ (AA_LIB_MINNOR)
+#else
+ (AA_LIB_MINOR)
+#endif
+ ); ]])],[no_aalib=''],[no_aalib=yes])
+ fi
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+])
+
+
AC_DEFUN([AM_PATH_AALIB],
[dnl
dnl
@@ -48,6 +119,8 @@ AC_ARG_ENABLE(aalibtest,
AS_HELP_STRING([--disable-aalibtest], [do not try to compile and run a test AALIB program]),
enable_aalibtest=$enableval, enable_aalibtest=yes)
+ AC_LANG_PUSH([C])
+
if test x$aalib_config_exec_prefix != x ; then
aalib_config_args="$aalib_config_args --exec-prefix=$aalib_config_exec_prefix"
if test x${AALIB_CONFIG+set} != xset ; then
@@ -124,78 +197,14 @@ dnl gpmdep="yes"
dnl fi
done
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$AALIB_CFLAGS $CFLAGS"
- LIBS="$AALIB_LIBS $LIBS"
-
-dnl
-dnl Now check if the installed AALIB is sufficiently new. (Also sanity
-dnl checks the results of xine-config to some extent
-dnl
- AC_LANG_SAVE()
- AC_LANG_C()
- rm -f conf.aalibtest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <aalib.h>
-
-int main () {
- int major, minor;
- char *tmp_version;
-
- system ("touch conf.aalibtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_aalib_version");
- if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
- printf("%s, bad version string\n", "$min_aalib_version");
- exit(1);
- }
-
- if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) &&
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR >= minor)
-#else
- (AA_LIB_MINOR >= minor)
-#endif
- )) {
- return 0;
- }
- else {
-#ifdef AA_LIB_MINNOR
- printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR);
-#else
- printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR);
-#endif
- printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor);
- printf("*** AALIB is always available from:\n");
- printf("*** http://www.ta.jcu.cz://aa\n");
- printf("***\n");
- }
- return 1;
-}
-],, no_aalib=yes,
- AC_TRY_LINK([
-#include <stdio.h>
-#include <aalib.h>
-], [ return ((AA_LIB_VERSION) ||
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR)
-#else
- (AA_LIB_MINOR)
-#endif
- ); ],, no_aalib=yes))
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
+ _AALIB_CHECK_VERSION
fi
else dnl AALIB_CONFIG
AC_MSG_CHECKING([for AALIB version >= $min_aalib_version])
no_aalib=""
- AALIB_CFLAGS=`$AALIB_CONFIG $aalib_config_args --cflags`
- AALIB_LIBS=`$AALIB_CONFIG $aalib_config_args --libs`
+ AALIB_CFLAGS="`$AALIB_CONFIG $aalib_config_args --cflags`"
+ AALIB_LIBS="`$AALIB_CONFIG $aalib_config_args --libs`"
aalib_config_major_version=`$AALIB_CONFIG $aalib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
aalib_config_minor_version=`$AALIB_CONFIG $aalib_config_args --version | \
@@ -203,71 +212,7 @@ int main () {
aalib_config_sub_version=`$AALIB_CONFIG $aalib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $AALIB_CFLAGS"
- LIBS="$AALIB_LIBS $LIBS"
-
-dnl
-dnl Now check if the installed AALIB is sufficiently new. (Also sanity
-dnl checks the results of aalib-config to some extent
-dnl
- AC_LANG_SAVE()
- AC_LANG_C()
- rm -f conf.aalibtest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <aalib.h>
-
-int main () {
- int major, minor;
- char *tmp_version;
-
- system ("touch conf.aalibtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_aalib_version");
- if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
- printf("%s, bad version string\n", "$min_aalib_version");
- exit(1);
- }
-
- if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) &&
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR >= minor)
-#else
- (AA_LIB_MINOR >= minor)
-#endif
- )) {
- return 0;
- }
- else {
-#ifdef AA_LIB_MINNOR
- printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR);
-#else
-printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR);
-#endif
- printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor);
- printf("*** AALIB is always available from:\n");
- printf("*** http://www.ta.jcu.cz://aa\n");
- printf("***\n");
- }
- return 1;
-}
-],, no_aalib=yes,
- AC_TRY_LINK([
-#include <stdio.h>
-#include <aalib.h>
-], [ return ((AA_LIB_VERSION) ||
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR)
-#else
- (AA_LIB_MINOR)
-#endif
- ); ],, no_aalib=yes))
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
+ _AALIB_CHECK_VERSION
fi dnl AALIB_CONFIG
fi dnl enable_aalibtest
@@ -288,17 +233,17 @@ printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_
echo "*** Could not run AALIB test program, checking why..."
CFLAGS="$CFLAGS $AALIB_CFLAGS"
LIBS="$LIBS $AALIB_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <aalib.h>
-], [
+]], [[
return ((AA_LIB_VERSION) ||
#ifdef AA_LIB_MINNOR
(AA_LIB_MINNOR)
#else
(AA_LIB_MINOR)
#endif
- ); ],
+ ); ]])],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding AALIB or finding the wrong"
echo "*** version of AALIB. If it is not finding AALIB, you'll need to set your"
@@ -322,6 +267,6 @@ printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_
fi
AC_SUBST(AALIB_CFLAGS)
AC_SUBST(AALIB_LIBS)
- AC_LANG_RESTORE()
+ AC_LANG_POP([C])
rm -f conf.aalibtest
])
diff --git a/m4/arts.m4 b/m4/arts.m4
index c0058a2a1..079c21ba8 100644
--- a/m4/arts.m4
+++ b/m4/arts.m4
@@ -54,7 +54,7 @@ dnl Now check if the installed ARTS is sufficiently new. (Also sanity
dnl checks the results of artsc-config to some extent)
dnl
rm -f conf.artstest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -108,11 +108,14 @@ int main ()
}
}
-],, no_arts=yes,
- AC_TRY_LINK([
+]])],[],[no_arts=yes],[no_arts=cc])
+
+ if test "x$no_arts" = "xcc"; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <artsc.h>
-], [ return 0; ],, no_arts=yes))
+]], [[ return 0; ]])],[no_arts=''],[no_arts=yes])
+ fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@@ -134,10 +137,10 @@ int main ()
echo "*** Could not run ARTS test program, checking why..."
CFLAGS="$CFLAGS $ARTS_CFLAGS"
LIBS="$LIBS $ARTS_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <artsc.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 ARTS or finding the wrong"
echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your"
diff --git a/m4/directx.m4 b/m4/directx.m4
index 272bef991..6d023528e 100644
--- a/m4/directx.m4
+++ b/m4/directx.m4
@@ -23,8 +23,7 @@ fi
AC_MSG_CHECKING(for DirectX)
DIRECTX_VIDEO_LIBS="$DIRECTX_LIBS -lgdi32 -lddraw"
DIRECTX_AUDIO_LIBS="$DIRECTX_LIBS -ldsound"
-AC_LANG_SAVE()
-AC_LANG_C()
+AC_LANG_PUSH([C])
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $DIRECTX_CPPFLAGS"
@@ -48,7 +47,7 @@ int main() {
AC_DEFINE(HAVE_DIRECTX,1,[Define this if you have DirectX])],,)
CPPFLAGS=$ac_save_CPPFLAGS
LIBS=$ac_save_LIBS
-AC_LANG_RESTORE()
+AC_LANG_POP([C])
if test x$have_directx = xyes ; then
AC_MSG_RESULT(yes)
diff --git a/m4/dl.m4 b/m4/dl.m4
index ff3fc71d5..30ea00b1c 100644
--- a/m4/dl.m4
+++ b/m4/dl.m4
@@ -17,8 +17,7 @@ AC_DEFUN([AM_DL], [
if test x$have_dl != "xyes"; then
AC_MSG_CHECKING(for dlopen under win32)
- AC_LANG_SAVE()
- AC_LANG_C()
+ AC_LANG_PUSH([C])
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LIBS="$LIBS"
@@ -42,7 +41,7 @@ int main() {
CPPFLAGS=$ac_save_CPPFLAGS
LIBS=$ac_save_LIBS
- AC_LANG_RESTORE()
+ AC_LANG_POP([C])
fi
if test x$have_dl != "xyes"; then
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
])
diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4
index e5ea6d346..c6d12258e 100644
--- a/m4/ioctl_request.m4
+++ b/m4/ioctl_request.m4
@@ -38,10 +38,10 @@ AC_DEFUN([AC_IOCTL_REQUEST], [
ac_cv_ioctl_request,
[for ac_ioctl_request_type in "unsigned long" "int"
do
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/ioctl.h>
int ioctl(int fd, $ac_ioctl_request_type request, ...);
- ], [], [ac_cv_ioctl_request=$ac_ioctl_request_type])
+ ]], [[]])],[ac_cv_ioctl_request=$ac_ioctl_request_type],[])
done])
if test "x$ac_cv_ioctl_request" = "x"; then
diff --git a/m4/libFLAC.m4 b/m4/libFLAC.m4
index 6e0d456b4..9ecf8dd51 100644
--- a/m4/libFLAC.m4
+++ b/m4/libFLAC.m4
@@ -46,7 +46,7 @@ dnl
dnl Now check if the installed libFLAC is sufficiently new.
dnl
rm -f conf.libFLACtest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -58,11 +58,13 @@ int main ()
return 0;
}
-],, no_libFLAC=yes,
- AC_TRY_LINK([
+]])],[],[no_libFLAC=yes],[no_libFLAC=cc])
+ if test "x$no_libFLAC" = xcc; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <FLAC/format.h>
-], [ return 0; ],, no_libFLAC=yes))
+]], [[ return 0; ]])],[no_libFLAC=''],[no_libFLAC=yes])
+ fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@@ -78,11 +80,11 @@ int main ()
echo "*** Could not run libFLAC test program, checking why..."
CFLAGS="$CFLAGS $LIBFLAC_CFLAGS"
LIBS="$LIBS $LIBFLAC_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <FLAC/format.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
+]], [[ return 0; ]])],
+ [ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding libFLAC or finding the wrong"
echo "*** version of libFLAC. If it is not finding libFLAC, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
@@ -91,7 +93,7 @@ int main ()
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means libFLAC was incorrectly installed"
echo "*** or that you have moved libFLAC since it was installed. In the latter case, you"
echo "*** may want to edit the libFLAC-config script: $LIBFLAC_CONFIG" ])
diff --git a/m4/opengl.m4 b/m4/opengl.m4
index 5e79c1e8a..2c12949d9 100644
--- a/m4/opengl.m4
+++ b/m4/opengl.m4
@@ -32,9 +32,8 @@ AC_DEFUN([AM_PATH_OPENGL], [
[AC_MSG_CHECKING([if GLU is sane])
ac_save_LIBS="$LIBS"
LIBS="$X_LIBS $XPRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS"
- AC_TRY_LINK([#include <GL/gl.h>
-#include <GL/glu.h>],
- [ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <GL/gl.h>
+#include <GL/glu.h>]], [[ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ]])],
[ ac_have_glu="yes"
GLU_LIBS="-lGLU"
AC_DEFINE(HAVE_GLU,1,[Define this if you have GLU support available])
diff --git a/m4/optimizations.m4 b/m4/optimizations.m4
index 48ded848b..a1f2f2f00 100644
--- a/m4/optimizations.m4
+++ b/m4/optimizations.m4
@@ -53,7 +53,7 @@ AC_DEFUN([AC_OPTIMIZATIONS], [
AC_MSG_CHECKING(for sane -Wpointer-arith)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="-O2 -Wpointer-arith -Werror $CFLAGS"
- AC_TRY_COMPILE([#include <string.h>],[int a; memset(&a, 0, sizeof(int));],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int));]])],
[AC_MSG_RESULT(yes); CFLAGS="-Wpointer-arith $SAVE_CFLAGS"],
[AC_MSG_RESULT(no); CFLAGS="$SAVE_CFLAGS"]);
diff --git a/m4/xine.m4 b/m4/xine.m4
index 8588a213d..cb64bad1a 100644
--- a/m4/xine.m4
+++ b/m4/xine.m4
@@ -40,6 +40,8 @@ AC_ARG_ENABLE(xinetest,
AS_HELP_STRING([--disable-xinetest], [do not try to compile and run a test XINE program]),
enable_xinetest=$enableval, enable_xinetest=yes)
+ AC_LANG_PUSH([C])
+
if test x$xine_config_exec_prefix != x ; then
xine_config_args="$xine_config_args --exec-prefix=$xine_config_exec_prefix"
if test x${XINE_CONFIG+set} != xset ; then
@@ -85,10 +87,8 @@ dnl
dnl Now check if the installed XINE is sufficiently new. (Also sanity
dnl checks the results of xine-config to some extent
dnl
- AC_LANG_SAVE()
- AC_LANG_C()
rm -f conf.xinetest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <xine.h>
#include <stdio.h>
#include <stdlib.h>
@@ -153,7 +153,7 @@ main ()
}
return 1;
}
-],, no_xine=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+]])],[],[no_xine=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@@ -175,10 +175,10 @@ main ()
echo "*** Could not run XINE test program, checking why..."
CFLAGS="$CFLAGS $XINE_CFLAGS"
LIBS="$LIBS $XINE_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <xine.h>
#include <stdio.h>
-], [ return ((XINE_MAJOR_VERSION) || (XINE_MINOR_VERSION) || (XINE_SUB_VERSION)); ],
+]], [[ return ((XINE_MAJOR_VERSION) || (XINE_MINOR_VERSION) || (XINE_SUB_VERSION)); ]])],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding XINE or finding the wrong"
echo "*** version of XINE. If it is not finding XINE, you'll need to set your"
@@ -204,7 +204,7 @@ main ()
AC_SUBST(XINE_CFLAGS)
AC_SUBST(XINE_LIBS)
AC_SUBST(XINE_ACFLAGS)
- AC_LANG_RESTORE()
+ AC_LANG_POP([C])
rm -f conf.xinetest
dnl Make sure HAVE_STRSEP, HAVE_SETENV and HAVE_STRPBRK are defined as