From 86191351c0961653292a570f9676f1adaaa95585 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 22 Dec 2020 17:00:28 +0300 Subject: [PATCH] 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. --- acinclude/alsa.m4 | 11 +++++------ acinclude/esd.m4 | 8 ++++---- sdl2.m4 | 9 +++++---- test/acinclude.m4 | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/acinclude/alsa.m4 b/acinclude/alsa.m4 index e21fd46fb..1a276a23d 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 -], [ +]], [[ /* 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 9627e0be5..2e50ddb68 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 #include #include @@ -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 #include -], [ 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 07190423b..710c2516e 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 #include #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 #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 290929dc8..69ea6aea6 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 #include #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 #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"