mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-11-21 20:47:19 +01:00
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.
This commit is contained in:
parent
f117db5186
commit
86191351c0
@ -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
|
||||
|
@ -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"
|
||||
|
9
sdl2.m4
9
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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user