SDL_mixer: replaced deprecated stuff in configure.ac and regenerated configure

From 643870ae735fab91c58e293800139257ffa383b1 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 12 Dec 2021 17:23:02 +0300
Subject: [PATCH] replaced deprecated stuff in configure.ac and regenerated
 configure

---
 configure    | 18 ++++--------------
 configure.ac | 36 ++++++++++++++----------------------
 2 files changed, 18 insertions(+), 36 deletions(-)

diff --git a/configure b/configure
index 3898618f..7b02573f 100755
--- a/configure
+++ b/configure
@@ -11129,6 +11129,7 @@ case "$host" in
         # We build SDL on cygwin without the UNIX emulation layer
         BASE_CFLAGS="-I/usr/include/mingw"
         BASE_LDFLAGS=""
+        have_no_cygwin=no
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -mno-cygwin option" >&5
 $as_echo_n "checking for GCC -mno-cygwin option... " >&6; }
         save_CFLAGS="$CFLAGS"
@@ -11146,8 +11147,6 @@ main ()
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
   have_no_cygwin=yes
-else
-  have_no_cygwin=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_cygwin" >&5
@@ -11293,15 +11292,12 @@ int
 main ()
 {
 
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-
-    have_gcc_mmd_mt=yes
-
+  have_gcc_mmd_mt=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_mmd_mt" >&5
@@ -11359,15 +11355,12 @@ int
 main ()
 {
 
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-
-    have_gcc_fvisibility=yes
-
+  have_gcc_fvisibility=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_fvisibility" >&5
@@ -13045,15 +13038,12 @@ int
 main ()
 {
 
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-
-    have_libmad=yes
-
+  have_libmad=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_libmad" >&5
diff --git a/configure.ac b/configure.ac
index 32e1f8aa..3cf2dc95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,10 +58,11 @@ case "$host" in
         # We build SDL on cygwin without the UNIX emulation layer
         BASE_CFLAGS="-I/usr/include/mingw"
         BASE_LDFLAGS=""
+        have_no_cygwin=no
         AC_MSG_CHECKING(for GCC -mno-cygwin option)
         save_CFLAGS="$CFLAGS"
         CFLAGS="$save_CFLAGS -mno-cygwin"
-        AC_TRY_COMPILE([],[],[have_no_cygwin=yes],[have_no_cygwin=no])
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [have_no_cygwin=yes],[])
         AC_MSG_RESULT($have_no_cygwin)
         CFLAGS="$save_CFLAGS"
         if test x$have_no_cygwin = xyes; then
@@ -111,14 +112,11 @@ AC_ARG_ENABLE(dependency-tracking,
 if test x$enable_dependency_tracking = xyes; then
     have_gcc_mmd_mt=no
     AC_MSG_CHECKING(for GCC -MMD -MT option)
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
     #if !defined(__GNUC__) || __GNUC__ < 3
     #error Dependency tracking requires GCC 3.0 or newer
     #endif
-    ],[
-    ],[
-    have_gcc_mmd_mt=yes
-    ])
+    ]],[])], [have_gcc_mmd_mt=yes],[])
     AC_MSG_RESULT($have_gcc_mmd_mt)
 
     if test x$have_gcc_mmd_mt = xyes; then
@@ -164,14 +162,11 @@ CheckVisibilityHidden()
     visibility_CFLAGS="-fvisibility=hidden"
     save_CFLAGS="$CFLAGS"
     CFLAGS="$save_CFLAGS $visibility_CFLAGS -Werror"
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
     #if !defined(__GNUC__) || __GNUC__ < 4
     #error SDL only uses visibility attributes in GCC 4 or newer
     #endif
-    ],[
-    ],[
-    have_gcc_fvisibility=yes
-    ])
+    ]],[])], [have_gcc_fvisibility=yes],[])
     AC_MSG_RESULT($have_gcc_fvisibility)
     CFLAGS="$save_CFLAGS"
 
@@ -297,7 +292,7 @@ AC_ARG_ENABLE([music-mod-xmp],
 [AS_HELP_STRING([--enable-music-mod-xmp], [enable MOD music via libxmp [default=no]])],
               [], [enable_music_mod_xmp=no])
 AC_ARG_ENABLE([music-mod-xmp-lite],
-[AC_HELP_STRING([--enable-music-mod-xmp-lite], [use libxmp-lite instead of libxmp [default=no]])],
+[AS_HELP_STRING([--enable-music-mod-xmp-lite], [use libxmp-lite instead of libxmp [default=no]])],
               [], [enable_music_mod_xmp_lite=no])
 AC_ARG_ENABLE([music-mod-xmp-shared],
 [AS_HELP_STRING([--enable-music-mod-xmp-shared], [dynamically load xmp library [default=yes]])],
@@ -363,7 +358,7 @@ if test x$enable_music_mod = xyes -a x$enable_music_mod_mikmod = xyes; then
         LIBS="$LIBS `$LIBMIKMOD_CONFIG --libs`"
         have_libmikmod=yes
         AC_MSG_CHECKING([for libmikmod - version >= $libmikmod_ver])
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include "mikmod.h"
 #include "stdio.h"
 
@@ -377,7 +372,7 @@ int main(int argc, char **argv)
   printf("no\n*** libmikmod is older than %d.%d.%d, not using.\n",maj,min,rev);
   return 1;
 }
-], [], [have_libmikmod=no], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+]])],[],[have_libmikmod=no],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
     fi
 
     if test x$have_libmikmod = xyes; then
@@ -597,15 +592,15 @@ if test x$enable_music_flac = xyes; then
         LIBS_SAVED="$LIBS"
         LIBS="-lFLAC"
         AC_MSG_CHECKING([for libflac so-name version >= $libflac_ver])
-        AC_TRY_COMPILE([
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include "FLAC/export.h"
 #include "stdio.h"
-],[
+]], [[
 #if defined(FLAC_API_VERSION_CURRENT) && (FLAC_API_VERSION_CURRENT >= $libflac_ver)
 #else
 #error "old-flac"
 #endif
-], have_flac_ver=yes, have_flac_ver=no)
+]])], [have_flac_ver=yes],[have_flac_ver=no])
         LIBS="$LIBS_SAVED"
         AC_MSG_RESULT($have_flac_ver)
     fi
@@ -655,12 +650,9 @@ AC_ARG_ENABLE(music-mp3-mad-gpl-dithering,
 if test x$enable_music_mp3 = xyes -a x$enable_music_mp3_mad_gpl = xyes; then
     AC_MSG_CHECKING(for libmad headers)
     have_libmad=no
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
      #include "mad.h"
-    ],[
-    ],[
-    have_libmad=yes
-    ])
+    ]],[])], [have_libmad=yes],[])
     AC_MSG_RESULT($have_libmad)
     if test x$have_libmad = xyes; then
         EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_MP3_MAD"