acinclude & sdl2.m4 updates: - acinclude/alsa.m4, esd.m4: Ran through autoupdate to replace several AC_TRY_[COMPILE|LINK|RUN] with corresponding AC_???_IFELSE , so that autoconf-2.70 doesn't warn. - sdl2.m4: Ditto. - test/acinclude.m4 (sdl2): Ditto.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
diff --git a/acinclude/alsa.m4 b/acinclude/alsa.m4
index e21fd46..1a276a2 100644
--- a/acinclude/alsa.m4
+++ b/acinclude/alsa.m4
@@ -72,11 +72,10 @@ no_alsa=""
alsa_min_micro_version=`echo $min_alsa_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-AC_LANG_SAVE
-AC_LANG_C
-AC_TRY_COMPILE([
+AC_LANG_PUSH([C])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <alsa/asoundlib.h>
-], [
+]], [[
/* ensure backward compatibility */
#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
@@ -108,13 +107,13 @@ AC_TRY_COMPILE([
# endif
# endif
exit(0);
-],
+]])],
[AC_MSG_RESULT(found.)],
[AC_MSG_RESULT(not present.)
ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
alsa_found=no]
)
-AC_LANG_RESTORE
+AC_LANG_POP([C])
dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
if test "x$enable_alsatest" = "xyes"; then
diff --git a/acinclude/esd.m4 b/acinclude/esd.m4
index 9627e0b..2e50ddb 100644
--- a/acinclude/esd.m4
+++ b/acinclude/esd.m4
@@ -58,7 +58,7 @@ dnl Now check if the installed ESD is sufficiently new. (Also sanity
dnl checks the results of esd-config to some extent
dnl
rm -f conf.esdtest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
#include <esd.h>
@@ -92,7 +92,7 @@ int main (void)
return 1;
}
}
-], [], [no_esd=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+]])], [], [no_esd=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_POP([C])
@@ -116,10 +116,10 @@ int main (void)
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
AC_LANG_PUSH([C])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <esd.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 ESD or finding the wrong"
echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
diff --git a/sdl2.m4 b/sdl2.m4
index 0719042..710c251 100644
--- a/sdl2.m4
+++ b/sdl2.m4
@@ -8,6 +8,7 @@
# Changelog:
# * also look for SDL2.framework under Mac OS X
# * removed HP/UX 9 support.
+# * updated for newer autoconf.
# serial 2
@@ -110,7 +111,7 @@ dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl2-config to some extent
dnl
rm -f conf.sdltest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"
@@ -145,7 +146,7 @@ int main (int argc, char *argv[])
}
}
-],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+]])], [], [no_sdl=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
@@ -176,7 +177,7 @@ int main (int argc, char *argv[])
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include "SDL.h"
@@ -184,7 +185,7 @@ int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
-], [ 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 SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
diff --git a/test/acinclude.m4 b/test/acinclude.m4
index 290929d..69ea6ae 100644
--- a/test/acinclude.m4
+++ b/test/acinclude.m4
@@ -80,7 +80,7 @@ dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl2-config to some extent
dnl
rm -f conf.sdltest
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"
@@ -115,7 +115,7 @@ int main (int argc, char *argv[])
}
}
-],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+]])], [], [no_sdl=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
@@ -143,7 +143,7 @@ int main (int argc, char *argv[])
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include "SDL.h"
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
-], [ 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 SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"