|
@@ -98,11 +98,7 @@ case "$host" in
|
|
|
AC_MSG_CHECKING(for GCC -mno-cygwin option)
|
|
|
CFLAGS="$save_CFLAGS -mno-cygwin"
|
|
|
|
|
|
- AC_TRY_COMPILE([
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_no_cygwin=yes
|
|
|
- ])
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [have_no_cygwin=yes],[])
|
|
|
AC_MSG_RESULT($have_no_cygwin)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -215,14 +211,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
|
|
@@ -240,12 +233,11 @@ case "$host" in
|
|
|
*)
|
|
|
save_LDFLAGS="$LDFLAGS"
|
|
|
LDFLAGS="$LDFLAGS -Wl,--no-undefined"
|
|
|
- AC_TRY_LINK([
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
+ ]],[])], [
|
|
|
have_no_undefined=yes
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -Wl,--no-undefined"
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
LDFLAGS="$save_LDFLAGS"
|
|
|
;;
|
|
|
esac
|
|
@@ -257,12 +249,11 @@ case "$host" in
|
|
|
*)
|
|
|
save_LDFLAGS="$LDFLAGS"
|
|
|
LDFLAGS="$LDFLAGS -Wl,--dynamicbase"
|
|
|
- AC_TRY_LINK([
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
+ ]],[])], [
|
|
|
have_dynamicbase=yes
|
|
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--dynamicbase"
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
LDFLAGS="$save_LDFLAGS"
|
|
|
;;
|
|
|
esac
|
|
@@ -274,12 +265,11 @@ case "$host" in
|
|
|
*)
|
|
|
save_LDFLAGS="$LDFLAGS"
|
|
|
LDFLAGS="$LDFLAGS -Wl,--nxcompat"
|
|
|
- AC_TRY_LINK([
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
+ ]],[])], [
|
|
|
have_nxcompat=yes
|
|
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--nxcompat"
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
LDFLAGS="$save_LDFLAGS"
|
|
|
;;
|
|
|
esac
|
|
@@ -291,12 +281,11 @@ case "$host" in
|
|
|
*)
|
|
|
save_LDFLAGS="$LDFLAGS"
|
|
|
LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"
|
|
|
- AC_TRY_LINK([
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
+ ]],[])], [
|
|
|
have_high_entropy_va=yes
|
|
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--high-entropy-va"
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
LDFLAGS="$save_LDFLAGS"
|
|
|
;;
|
|
|
esac
|
|
@@ -337,13 +326,12 @@ if test x$enable_libc = xyes; then
|
|
|
AC_DEFINE(HAVE_STRTOD, 1, [ ])
|
|
|
fi
|
|
|
AC_CHECK_FUNC(mprotect,
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/types.h>
|
|
|
#include <sys/mman.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ ]],[])], [
|
|
|
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
|
|
- ]),
|
|
|
+ ],[]),
|
|
|
)
|
|
|
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit)
|
|
|
|
|
@@ -369,8 +357,7 @@ AC_ARG_ENABLE(gcc-atomics,
|
|
|
if test x$enable_gcc_atomics = xyes; then
|
|
|
have_gcc_atomics=no
|
|
|
AC_MSG_CHECKING(for GCC builtin atomic operations)
|
|
|
- AC_TRY_LINK([
|
|
|
- ],[
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[[
|
|
|
int a;
|
|
|
void *x, *y, *z;
|
|
|
__sync_lock_test_and_set(&a, 4);
|
|
@@ -378,23 +365,19 @@ if test x$enable_gcc_atomics = xyes; then
|
|
|
__sync_fetch_and_add(&a, 1);
|
|
|
__sync_bool_compare_and_swap(&a, 5, 10);
|
|
|
__sync_bool_compare_and_swap(&x, y, z);
|
|
|
- ],[
|
|
|
- have_gcc_atomics=yes
|
|
|
- ])
|
|
|
+ ]])],
|
|
|
+ [have_gcc_atomics=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_atomics)
|
|
|
|
|
|
if test x$have_gcc_atomics = xyes; then
|
|
|
AC_DEFINE(HAVE_GCC_ATOMICS, 1, [ ])
|
|
|
else
|
|
|
# See if we have the minimum operation needed for GCC atomics
|
|
|
- AC_TRY_LINK([
|
|
|
- ],[
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[[
|
|
|
int a;
|
|
|
__sync_lock_test_and_set(&a, 1);
|
|
|
__sync_lock_release(&a);
|
|
|
- ],[
|
|
|
- have_gcc_sync_lock_test_and_set=yes
|
|
|
- ])
|
|
|
+ ]])], [have_gcc_sync_lock_test_and_set=yes],[])
|
|
|
if test x$have_gcc_sync_lock_test_and_set = xyes; then
|
|
|
AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET, 1, [ ])
|
|
|
fi
|
|
@@ -590,7 +573,7 @@ if test x$enable_assembly = xyes; then
|
|
|
mmx_CFLAGS="-mmmx"
|
|
|
CFLAGS="$save_CFLAGS $mmx_CFLAGS"
|
|
|
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#ifdef __MINGW32__
|
|
|
#include <_mingw.h>
|
|
|
#ifdef __MINGW64_VERSION_MAJOR
|
|
@@ -604,10 +587,7 @@ if test x$enable_assembly = xyes; then
|
|
|
#ifndef __MMX__
|
|
|
#error Assembler CPP flag not enabled
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_mmx=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_mmx=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_mmx)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -627,17 +607,16 @@ if test x$enable_assembly = xyes; then
|
|
|
amd3dnow_CFLAGS="-m3dnow"
|
|
|
CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
|
|
|
|
|
|
- AC_TRY_LINK([
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <mm3dnow.h>
|
|
|
#ifndef __3dNOW__
|
|
|
#error Assembler CPP flag not enabled
|
|
|
#endif
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
void *p = 0;
|
|
|
_m_prefetch(p);
|
|
|
- ],[
|
|
|
- have_gcc_3dnow=yes
|
|
|
- ])
|
|
|
+ ]])],
|
|
|
+ [have_gcc_3dnow=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_3dnow)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -657,7 +636,7 @@ if test x$enable_assembly = xyes; then
|
|
|
sse_CFLAGS="-msse"
|
|
|
CFLAGS="$save_CFLAGS $sse_CFLAGS"
|
|
|
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#ifdef __MINGW32__
|
|
|
#include <_mingw.h>
|
|
|
#ifdef __MINGW64_VERSION_MAJOR
|
|
@@ -671,10 +650,7 @@ if test x$enable_assembly = xyes; then
|
|
|
#ifndef __SSE__
|
|
|
#error Assembler CPP flag not enabled
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_sse=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_sse=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_sse)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -694,7 +670,7 @@ if test x$enable_assembly = xyes; then
|
|
|
sse2_CFLAGS="-msse2"
|
|
|
CFLAGS="$save_CFLAGS $sse2_CFLAGS"
|
|
|
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#ifdef __MINGW32__
|
|
|
#include <_mingw.h>
|
|
|
#ifdef __MINGW64_VERSION_MAJOR
|
|
@@ -708,10 +684,7 @@ if test x$enable_assembly = xyes; then
|
|
|
#ifndef __SSE2__
|
|
|
#error Assembler CPP flag not enabled
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_sse2=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_sse2=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_sse2)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -731,7 +704,7 @@ if test x$enable_assembly = xyes; then
|
|
|
sse3_CFLAGS="-msse3"
|
|
|
CFLAGS="$save_CFLAGS $sse3_CFLAGS"
|
|
|
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#ifdef __MINGW32__
|
|
|
#include <_mingw.h>
|
|
|
#ifdef __MINGW64_VERSION_MAJOR
|
|
@@ -745,10 +718,7 @@ if test x$enable_assembly = xyes; then
|
|
|
#ifndef __SSE2__
|
|
|
#error Assembler CPP flag not enabled
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_sse3=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_sse3=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_sse3)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -776,28 +746,24 @@ if test x$enable_assembly = xyes; then
|
|
|
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
|
|
|
|
|
|
AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <altivec.h>
|
|
|
vector unsigned int vzero() {
|
|
|
return vec_splat_u32(0);
|
|
|
}
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ ]],[])], [
|
|
|
have_gcc_altivec=yes
|
|
|
have_altivec_h_hdr=yes
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
|
|
|
if test x$have_gcc_altivec = xno; then
|
|
|
AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
vector unsigned int vzero() {
|
|
|
return vec_splat_u32(0);
|
|
|
}
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_altivec=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_altivec=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
fi
|
|
|
|
|
@@ -805,29 +771,25 @@ if test x$enable_assembly = xyes; then
|
|
|
AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
|
|
|
altivec_CFLAGS="-faltivec"
|
|
|
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <altivec.h>
|
|
|
vector unsigned int vzero() {
|
|
|
return vec_splat_u32(0);
|
|
|
}
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ ]],[])], [
|
|
|
have_gcc_altivec=yes
|
|
|
have_altivec_h_hdr=yes
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
fi
|
|
|
|
|
|
if test x$have_gcc_altivec = xno; then
|
|
|
AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
vector unsigned int vzero() {
|
|
|
return vec_splat_u32(0);
|
|
|
}
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_altivec=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_altivec=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
fi
|
|
|
CFLAGS="$save_CFLAGS"
|
|
@@ -865,23 +827,21 @@ CheckOSS()
|
|
|
AC_MSG_CHECKING(for OSS audio support)
|
|
|
have_oss=no
|
|
|
if test x$have_oss != xyes; then
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/soundcard.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
int arg = SNDCTL_DSP_SETFRAGMENT;
|
|
|
- ],[
|
|
|
- have_oss=yes
|
|
|
- ])
|
|
|
+ ]])], [have_oss=yes],[])
|
|
|
fi
|
|
|
if test x$have_oss != xyes; then
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <soundcard.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
int arg = SNDCTL_DSP_SETFRAGMENT;
|
|
|
- ],[
|
|
|
+ ]])], [
|
|
|
have_oss=yes
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H, 1, [ ])
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
fi
|
|
|
AC_MSG_RESULT($have_oss)
|
|
|
if test x$have_oss = xyes; then
|
|
@@ -1113,13 +1073,11 @@ CheckARTSC()
|
|
|
audio_arts=no
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
CFLAGS="$CFLAGS $ARTS_CFLAGS"
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <artsc.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
arts_stream_t stream;
|
|
|
- ],[
|
|
|
- audio_arts=yes
|
|
|
- ])
|
|
|
+ ]])], [audio_arts=yes],[])
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
AC_MSG_RESULT($audio_arts)
|
|
|
if test x$audio_arts = xyes; then
|
|
@@ -1434,14 +1392,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"
|
|
|
|
|
@@ -1459,12 +1414,9 @@ CheckNoStrictAliasing()
|
|
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
CFLAGS="$save_CFLAGS -fno-strict-aliasing"
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
int x = 0;
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_no_strict_aliasing=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_no_strict_aliasing=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_no_strict_aliasing)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -1482,12 +1434,9 @@ CheckStackBoundary()
|
|
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2"
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
int x = 0;
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_preferred_stack_boundary=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_preferred_stack_boundary=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_preferred_stack_boundary)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -1506,12 +1455,9 @@ CheckDeclarationAfterStatement()
|
|
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
CFLAGS="$save_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
int x = 0;
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_declaration_after_statement=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_declaration_after_statement=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_declaration_after_statement)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -1528,12 +1474,9 @@ CheckWarnAll()
|
|
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
CFLAGS="$save_CFLAGS -Wall"
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
int x = 0;
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_gcc_Wall=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_gcc_Wall=yes],[])
|
|
|
AC_MSG_RESULT($have_gcc_Wall)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
|
@@ -1646,12 +1589,11 @@ CheckWayland()
|
|
|
dnl Check for Native Client stuff
|
|
|
CheckNativeClient()
|
|
|
{
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#if !defined(__native_client__)
|
|
|
#error "NO NACL"
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ ]],[])], [
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_NACL, 1, [ ])
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_NACL, 1, [ ])
|
|
|
AC_DEFINE(HAVE_POW, 1, [ ])
|
|
@@ -1666,7 +1608,7 @@ CheckNativeClient()
|
|
|
SUMMARY_audio="${SUMMARY_audio} nacl"
|
|
|
SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
|
|
|
SUMMARY_video="${SUMMARY_video} nacl opengles2"
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
}
|
|
|
|
|
|
CheckRPI()
|
|
@@ -1695,14 +1637,11 @@ CheckRPI()
|
|
|
|
|
|
AC_MSG_CHECKING(for Raspberry Pi)
|
|
|
have_video_rpi=no
|
|
|
- AC_TRY_LINK([
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <bcm_host.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
bcm_host_init();
|
|
|
- ],[
|
|
|
- have_video_rpi=yes
|
|
|
- ],[
|
|
|
- ])
|
|
|
+ ]])], [have_video_rpi=yes],[])
|
|
|
AC_MSG_RESULT($have_video_rpi)
|
|
|
|
|
|
# Restore the compiler flags and libraries
|
|
@@ -1832,35 +1771,34 @@ CheckX11()
|
|
|
|
|
|
AC_MSG_CHECKING(for const parameter to XextAddDisplay)
|
|
|
have_const_param_XextAddDisplay=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <X11/Xlib.h>
|
|
|
#include <X11/Xproto.h>
|
|
|
#include <X11/extensions/Xext.h>
|
|
|
#include <X11/extensions/extutil.h>
|
|
|
extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ ]],[])], [
|
|
|
have_const_param_XextAddDisplay=yes
|
|
|
AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], 1, [ ])
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
AC_MSG_RESULT($have_const_param_XextAddDisplay)
|
|
|
|
|
|
dnl AC_CHECK_LIB(X11, XGetEventData, AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS, 1, [Have XGenericEvent]))
|
|
|
AC_MSG_CHECKING([for XGenericEvent])
|
|
|
have_XGenericEvent=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <X11/Xlib.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
Display *display;
|
|
|
XEvent event;
|
|
|
XGenericEventCookie *cookie = &event.xcookie;
|
|
|
XNextEvent(display, &event);
|
|
|
XGetEventData(display, cookie);
|
|
|
XFreeEventData(display, cookie);
|
|
|
- ],[
|
|
|
+ ]])], [
|
|
|
have_XGenericEvent=yes
|
|
|
AC_DEFINE([SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS], 1, [ ])
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
AC_MSG_RESULT($have_XGenericEvent)
|
|
|
|
|
|
AC_CHECK_LIB(X11, XkbKeycodeToKeysym, AC_DEFINE(SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM, 1, [Have XkbKeycodeToKeysym]))
|
|
@@ -1964,18 +1902,18 @@ XFreeEventData(display, cookie);
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2, 1, [ ])
|
|
|
AC_MSG_CHECKING(for xinput2 multitouch)
|
|
|
have_xinput2_multitouch=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <X11/Xlib.h>
|
|
|
#include <X11/Xproto.h>
|
|
|
#include <X11/extensions/XInput2.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
int event_type = XI_TouchBegin;
|
|
|
XITouchClassInfo *t;
|
|
|
- ],[
|
|
|
+ ]])], [
|
|
|
have_xinput2_multitouch=yes
|
|
|
AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [ ])
|
|
|
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
AC_MSG_RESULT($have_xinput2_multitouch)
|
|
|
fi
|
|
|
AC_ARG_ENABLE(video-x11-xrandr,
|
|
@@ -1985,14 +1923,12 @@ XITouchClassInfo *t;
|
|
|
dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that as a test.
|
|
|
definitely_enable_video_x11_xrandr=no
|
|
|
have_xrandr_h_hdr=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <X11/Xlib.h>
|
|
|
#include <X11/extensions/Xrandr.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
XRRScreenResources *res = NULL;
|
|
|
- ],[
|
|
|
- have_xrandr_h_hdr=yes
|
|
|
- ])
|
|
|
+ ]])], [have_xrandr_h_hdr=yes],[])
|
|
|
if test x$have_xrandr_h_hdr = xyes; then
|
|
|
if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
|
|
|
echo "-- dynamic libXrandr -> $xrandr_lib"
|
|
@@ -2096,26 +2032,20 @@ CheckVivanteVideo()
|
|
|
if test x$enable_video = xyes -a x$enable_video_vivante = xyes; then
|
|
|
AC_MSG_CHECKING(for Vivante VDK API)
|
|
|
have_vivante_vdk=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#define LINUX
|
|
|
#define EGL_API_FB
|
|
|
#include <gc_vdk.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_vivante_vdk=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_vivante_vdk=yes],[])
|
|
|
AC_MSG_RESULT($have_vivante_vdk)
|
|
|
|
|
|
AC_MSG_CHECKING(for Vivante FB API)
|
|
|
have_vivante_egl=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#define LINUX
|
|
|
#define EGL_API_FB
|
|
|
#include <EGL/eglvivante.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_vivante_egl=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_vivante_egl=yes],[])
|
|
|
AC_MSG_RESULT($have_vivante_egl)
|
|
|
|
|
|
if test x$have_vivante_vdk = xyes -o x$have_vivante_egl = xyes; then
|
|
@@ -2155,12 +2085,9 @@ CheckCOCOA()
|
|
|
CFLAGS="$CFLAGS -x objective-c"
|
|
|
AC_MSG_CHECKING(for Cocoa framework)
|
|
|
have_cocoa=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_cocoa=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_cocoa=yes],[])
|
|
|
AC_MSG_RESULT($have_cocoa)
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
if test x$have_cocoa = xyes; then
|
|
@@ -2186,7 +2113,7 @@ CheckMETAL()
|
|
|
CFLAGS="$CFLAGS -x objective-c"
|
|
|
AC_MSG_CHECKING(for Metal framework)
|
|
|
have_metal=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
#import <Metal/Metal.h>
|
|
|
#import <QuartzCore/CAMetalLayer.h>
|
|
@@ -2194,10 +2121,7 @@ CheckMETAL()
|
|
|
#if TARGET_CPU_X86
|
|
|
#error Metal doesn't work on this configuration
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_metal=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_metal=yes],[])
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
AC_MSG_RESULT($have_metal)
|
|
|
if test x$have_metal = xyes; then
|
|
@@ -2367,13 +2291,10 @@ CheckOpenGLX11()
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
|
|
AC_MSG_CHECKING(for OpenGL (GLX) support)
|
|
|
video_opengl=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <GL/gl.h>
|
|
|
#include <GL/glx.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengl=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengl=yes],[])
|
|
|
AC_MSG_RESULT($video_opengl)
|
|
|
if test x$video_opengl = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
|
|
@@ -2390,19 +2311,16 @@ CheckOpenGLKMSDRM()
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes -a x$enable_video_kmsdrm = xyes; then
|
|
|
AC_MSG_CHECKING(for OpenGL (GLVND) support)
|
|
|
video_opengl=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <GL/gl.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengl=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengl=yes],[])
|
|
|
AC_MSG_RESULT($video_opengl)
|
|
|
if test x$video_opengl = xyes; then
|
|
|
- AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
|
|
|
- AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
|
|
|
+ AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
|
|
|
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
|
|
|
SUMMARY_video="${SUMMARY_video} opengl(glvnd)"
|
|
|
- fi
|
|
|
- fi
|
|
|
+ fi
|
|
|
+ fi
|
|
|
}
|
|
|
|
|
|
dnl Check to see if OpenGL ES support is desired
|
|
@@ -2422,17 +2340,14 @@ CheckOpenGLESX11()
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
|
|
|
AC_MSG_CHECKING(for EGL support)
|
|
|
video_opengl_egl=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#define LINUX
|
|
|
#define EGL_API_FB
|
|
|
#define MESA_EGL_NO_X11_HEADERS
|
|
|
#define EGL_NO_X11
|
|
|
#include <EGL/egl.h>
|
|
|
#include <EGL/eglext.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengl_egl=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengl_egl=yes],[])
|
|
|
AC_MSG_RESULT($video_opengl_egl)
|
|
|
if test x$video_opengl_egl = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
|
@@ -2441,13 +2356,10 @@ CheckOpenGLESX11()
|
|
|
if test x$enable_video_opengles1 = xyes; then
|
|
|
AC_MSG_CHECKING(for OpenGL ES v1 headers)
|
|
|
video_opengles_v1=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <GLES/gl.h>
|
|
|
#include <GLES/glext.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengles_v1=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengles_v1=yes],[])
|
|
|
AC_MSG_RESULT($video_opengles_v1)
|
|
|
if test x$video_opengles_v1 = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
|
|
@@ -2459,13 +2371,10 @@ CheckOpenGLESX11()
|
|
|
if test x$enable_video_opengles2 = xyes; then
|
|
|
AC_MSG_CHECKING(for OpenGL ES v2 headers)
|
|
|
video_opengles_v2=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <GLES2/gl2.h>
|
|
|
#include <GLES2/gl2ext.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengles_v2=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengles_v2=yes],[])
|
|
|
AC_MSG_RESULT($video_opengles_v2)
|
|
|
if test x$video_opengles_v2 = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
|
|
@@ -2481,20 +2390,17 @@ CheckEGLKMSDRM()
|
|
|
{
|
|
|
AC_MSG_CHECKING(for EGL support)
|
|
|
video_opengl_egl=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#define LINUX
|
|
|
#define EGL_API_FB
|
|
|
#define MESA_EGL_NO_X11_HEADERS
|
|
|
#define EGL_NO_X11
|
|
|
#include <EGL/egl.h>
|
|
|
#include <EGL/eglext.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengl_egl=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengl_egl=yes],[])
|
|
|
AC_MSG_RESULT($video_opengl_egl)
|
|
|
if test x$video_opengl_egl = xyes; then
|
|
|
- AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
|
|
+ AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
|
|
fi
|
|
|
}
|
|
|
|
|
@@ -2516,12 +2422,9 @@ CheckWINDOWSGLES()
|
|
|
|
|
|
AC_MSG_CHECKING(for EGL support)
|
|
|
video_opengl_egl=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <EGL/egl.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengl_egl=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengl_egl=yes],[])
|
|
|
AC_MSG_RESULT($video_opengl_egl)
|
|
|
if test x$video_opengl_egl = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
|
|
@@ -2531,13 +2434,10 @@ CheckWINDOWSGLES()
|
|
|
|
|
|
AC_MSG_CHECKING(for OpenGL ES v2 headers)
|
|
|
video_opengles_v2=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <GLES2/gl2.h>
|
|
|
#include <GLES2/gl2ext.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengles_v2=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengles_v2=yes],[])
|
|
|
AC_MSG_RESULT($video_opengles_v2)
|
|
|
if test x$video_opengles_v2 = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
|
|
@@ -2589,12 +2489,9 @@ CheckEmscriptenGLES()
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
|
|
|
AC_MSG_CHECKING(for EGL support)
|
|
|
video_opengl_egl=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <EGL/egl.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengl_egl=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengl_egl=yes],[])
|
|
|
AC_MSG_RESULT($video_opengl_egl)
|
|
|
if test x$video_opengl_egl = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
|
@@ -2602,13 +2499,10 @@ CheckEmscriptenGLES()
|
|
|
|
|
|
AC_MSG_CHECKING(for OpenGL ES v2 headers)
|
|
|
video_opengles_v2=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <GLES2/gl2.h>
|
|
|
#include <GLES2/gl2ext.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- video_opengles_v2=yes
|
|
|
- ])
|
|
|
+ ]],[])], [video_opengles_v2=yes],[])
|
|
|
AC_MSG_RESULT($video_opengles_v2)
|
|
|
if test x$video_opengles_v2 = xyes; then
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
|
|
@@ -2629,21 +2523,17 @@ CheckVulkan()
|
|
|
if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
|
|
|
case "$host" in
|
|
|
*-*-android*)
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#if defined(__ARM_ARCH) && __ARM_ARCH < 7
|
|
|
#error Vulkan doesn't work on this configuration
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- enable_video_vulkan=no
|
|
|
- ])
|
|
|
+ ]],[])], [],[enable_video_vulkan=no])
|
|
|
;;
|
|
|
*-*-darwin*)
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
dnl Work around that we don't have Objective-C support in autoconf
|
|
|
CFLAGS="$CFLAGS -x objective-c"
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <Cocoa/Cocoa.h>
|
|
|
#include <Metal/Metal.h>
|
|
|
#include <QuartzCore/CAMetalLayer.h>
|
|
@@ -2651,11 +2541,7 @@ CheckVulkan()
|
|
|
#if TARGET_CPU_X86
|
|
|
#error Vulkan doesn't work on this configuration
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- enable_video_vulkan=no
|
|
|
- ])
|
|
|
+ ]],[])], [],[enable_video_vulkan=no])
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
;;
|
|
|
*)
|
|
@@ -2679,15 +2565,13 @@ CheckInputEvents()
|
|
|
dnl Check for Linux 2.4 unified input event interface support
|
|
|
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
|
|
|
use_input_events=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <linux/input.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
#ifndef EVIOCGNAME
|
|
|
#error EVIOCGNAME() ioctl not available
|
|
|
#endif
|
|
|
- ],[
|
|
|
- use_input_events=yes
|
|
|
- ])
|
|
|
+ ]])], [use_input_events=yes],[])
|
|
|
AC_MSG_RESULT($use_input_events)
|
|
|
if test x$use_input_events = xyes; then
|
|
|
AC_DEFINE(SDL_INPUT_LINUXEV, 1, [ ])
|
|
@@ -2701,16 +2585,14 @@ CheckInputKD()
|
|
|
|
|
|
AC_MSG_CHECKING(for Linux kd.h)
|
|
|
use_input_kd=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <linux/kd.h>
|
|
|
#include <linux/keyboard.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
struct kbentry kbe;
|
|
|
kbe.kb_table = KG_CTRL;
|
|
|
ioctl(0, KDGKBENT, &kbe);
|
|
|
- ],[
|
|
|
- use_input_kd=yes
|
|
|
- ])
|
|
|
+ ]])], [use_input_kd=yes],[])
|
|
|
AC_MSG_RESULT($use_input_kd)
|
|
|
if test x$use_input_kd = xyes; then
|
|
|
AC_DEFINE(SDL_INPUT_LINUXKD, 1, [ ])
|
|
@@ -2723,15 +2605,13 @@ CheckInputKBIO()
|
|
|
{
|
|
|
AC_MSG_CHECKING(for FreeBSD kbio.h)
|
|
|
use_input_kbio=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/kbio.h>
|
|
|
#include <sys/ioctl.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
accentmap_t accTable;
|
|
|
ioctl(0, KDENABIO, 1);
|
|
|
- ],[
|
|
|
- use_input_kbio=yes
|
|
|
- ])
|
|
|
+ ]])], [use_input_kbio=yes],[])
|
|
|
AC_MSG_RESULT($use_input_kbio)
|
|
|
if test x$use_input_kbio = xyes; then
|
|
|
AC_DEFINE(SDL_INPUT_FBSDKBIO, 1, [ ])
|
|
@@ -2744,23 +2624,21 @@ CheckInputWSCONS()
|
|
|
{
|
|
|
AC_MSG_CHECKING(for OpenBSD wscons)
|
|
|
use_input_wscons=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/time.h>
|
|
|
#include <dev/wscons/wsconsio.h>
|
|
|
#include <dev/wscons/wsksymdef.h>
|
|
|
#include <dev/wscons/wsksymvar.h>
|
|
|
#include <sys/ioctl.h>
|
|
|
- ],[
|
|
|
- struct wskbd_map_data data;
|
|
|
- ioctl(0, WSKBDIO_GETMAP, &data);
|
|
|
- ],[
|
|
|
- use_input_wscons=yes
|
|
|
- ])
|
|
|
- AC_MSG_RESULT($use_input_wscons)
|
|
|
- if test x$use_input_wscons = xyes; then
|
|
|
+ ]], [[
|
|
|
+ struct wskbd_map_data data;
|
|
|
+ ioctl(0, WSKBDIO_GETMAP, &data);
|
|
|
+ ]])], [use_input_wscons=yes],[])
|
|
|
+ AC_MSG_RESULT($use_input_wscons)
|
|
|
+ if test x$use_input_wscons = xyes; then
|
|
|
AC_DEFINE(SDL_INPUT_WSCONS, 1, [ ])
|
|
|
- SUMMARY_input="${SUMMARY_input} wscons"
|
|
|
- fi
|
|
|
+ SUMMARY_input="${SUMMARY_input} wscons"
|
|
|
+ fi
|
|
|
}
|
|
|
|
|
|
dnl See if the platform offers libudev for device enumeration and hotplugging.
|
|
@@ -2911,20 +2789,18 @@ CheckJoystickMFI()
|
|
|
LDFLAGS="$LDFLAGS -Wl,-weak_framework,CoreHaptics -Wl,-weak_framework,GameController"
|
|
|
AC_MSG_CHECKING(for GameController framework)
|
|
|
enable_joystick_mfi=no
|
|
|
- AC_TRY_LINK([
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <AvailabilityMacros.h>
|
|
|
#include <TargetConditionals.h>
|
|
|
#import <GameController/GameController.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
|
|
|
#error GameController framework doesn't work on this configuration
|
|
|
#endif
|
|
|
#if TARGET_CPU_X86
|
|
|
#error GameController framework doesn't work on this configuration
|
|
|
#endif
|
|
|
- ],[
|
|
|
- enable_joystick_mfi=yes
|
|
|
- ])
|
|
|
+ ]])], [enable_joystick_mfi=yes],[])
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
LDFLAGS="$save_LDFLAGS"
|
|
|
|
|
@@ -3056,14 +2932,12 @@ CheckPTHREAD()
|
|
|
# Check to see if we have pthread support on this system
|
|
|
AC_MSG_CHECKING(for pthreads)
|
|
|
use_pthreads=no
|
|
|
- AC_TRY_LINK([
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <pthread.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
pthread_attr_t type;
|
|
|
pthread_attr_init(&type);
|
|
|
- ],[
|
|
|
- use_pthreads=yes
|
|
|
- ])
|
|
|
+ ]])], [use_pthreads=yes],[])
|
|
|
AC_MSG_RESULT($use_pthreads)
|
|
|
# Restore the compiler flags and libraries
|
|
|
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
|
|
@@ -3084,28 +2958,28 @@ CheckPTHREAD()
|
|
|
AC_MSG_CHECKING(for recursive mutexes)
|
|
|
has_recursive_mutexes=no
|
|
|
if test x$has_recursive_mutexes = xno; then
|
|
|
- AC_TRY_LINK([
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#define _GNU_SOURCE 1
|
|
|
#include <pthread.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
pthread_mutexattr_t attr;
|
|
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
|
|
- ],[
|
|
|
+ ]])], [
|
|
|
has_recursive_mutexes=yes
|
|
|
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX, 1, [ ])
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
fi
|
|
|
if test x$has_recursive_mutexes = xno; then
|
|
|
- AC_TRY_LINK([
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#define _GNU_SOURCE 1
|
|
|
#include <pthread.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
pthread_mutexattr_t attr;
|
|
|
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
|
|
- ],[
|
|
|
+ ]])],[
|
|
|
has_recursive_mutexes=yes
|
|
|
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP, 1, [ ])
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
fi
|
|
|
AC_MSG_RESULT($has_recursive_mutexes)
|
|
|
|
|
@@ -3113,27 +2987,24 @@ CheckPTHREAD()
|
|
|
if test x$enable_pthread_sem = xyes; then
|
|
|
AC_MSG_CHECKING(for pthread semaphores)
|
|
|
have_pthread_sem=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <pthread.h>
|
|
|
#include <semaphore.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_pthread_sem=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_pthread_sem=yes],[])
|
|
|
AC_MSG_RESULT($have_pthread_sem)
|
|
|
fi
|
|
|
if test x$have_pthread_sem = xyes; then
|
|
|
AC_MSG_CHECKING(for sem_timedwait)
|
|
|
have_sem_timedwait=no
|
|
|
- AC_TRY_LINK([
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <pthread.h>
|
|
|
#include <semaphore.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
sem_timedwait(NULL, NULL);
|
|
|
- ],[
|
|
|
+ ]])], [
|
|
|
have_sem_timedwait=yes
|
|
|
AC_DEFINE([HAVE_SEM_TIMEDWAIT], 1, [ ])
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
AC_MSG_RESULT($have_sem_timedwait)
|
|
|
fi
|
|
|
|
|
@@ -3196,12 +3067,9 @@ CheckWINDOWS()
|
|
|
{
|
|
|
AC_MSG_CHECKING(Windows compiler)
|
|
|
have_win32_gcc=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <windows.h>
|
|
|
- ],[
|
|
|
- ],[
|
|
|
- have_win32_gcc=yes
|
|
|
- ])
|
|
|
+ ]],[])], [have_win32_gcc=yes],[])
|
|
|
AC_MSG_RESULT($have_win32_gcc)
|
|
|
if test x$have_win32_gcc != xyes; then
|
|
|
AC_MSG_ERROR([
|
|
@@ -3211,17 +3079,16 @@ CheckWINDOWS()
|
|
|
|
|
|
AC_MSG_CHECKING(Windows CE)
|
|
|
have_wince=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#if !defined(_WIN32_WCE) && !defined(__MINGW32CE__)
|
|
|
#error This is not Windows CE
|
|
|
#endif
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ ]],[])], [
|
|
|
have_wince=yes
|
|
|
AC_MSG_ERROR([
|
|
|
*** Sorry, Windows CE is no longer supported.
|
|
|
])
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
AC_MSG_RESULT($have_wince)
|
|
|
|
|
|
# This fixes Windows stack alignment with newer GCC
|
|
@@ -3272,18 +3139,18 @@ CheckDIRECTX()
|
|
|
have_xinput_stateex=no
|
|
|
AC_CHECK_HEADER(xinput.h, have_xinput=yes)
|
|
|
AC_MSG_CHECKING(for struct XINPUT_GAMEPAD_EX)
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <windows.h>
|
|
|
#include <xinput.h>
|
|
|
XINPUT_GAMEPAD_EX x1;
|
|
|
- ],[],[have_xinput_gamepadex=yes])
|
|
|
+ ]],[])], [have_xinput_gamepadex=yes],[])
|
|
|
AC_MSG_RESULT($have_xinput_gamepadex)
|
|
|
AC_MSG_CHECKING(for struct XINPUT_STATE_EX)
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <windows.h>
|
|
|
#include <xinput.h>
|
|
|
XINPUT_STATE_EX s1;
|
|
|
- ],[],[have_xinput_stateex=yes])
|
|
|
+ ]],[])], [have_xinput_stateex=yes],[])
|
|
|
AC_MSG_RESULT($have_xinput_stateex)
|
|
|
|
|
|
if test x$have_xinput = xyes; then
|
|
@@ -3320,14 +3187,12 @@ CheckDLOPEN()
|
|
|
if test x$enable_sdl_dlopen = xyes; then
|
|
|
AC_MSG_CHECKING(for dlopen)
|
|
|
have_dlopen=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <dlfcn.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
void *handle = dlopen("", RTLD_NOW);
|
|
|
const char *loaderror = (char *) dlerror();
|
|
|
- ],[
|
|
|
- have_dlopen=yes
|
|
|
- ])
|
|
|
+ ]])], [have_dlopen=yes],[])
|
|
|
AC_MSG_RESULT($have_dlopen)
|
|
|
|
|
|
if test x$have_dlopen = xyes; then
|
|
@@ -3363,7 +3228,7 @@ CheckUSBHID()
|
|
|
|
|
|
AC_MSG_CHECKING(for usbhid)
|
|
|
have_usbhid=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/types.h>
|
|
|
#if defined(HAVE_USB_H)
|
|
|
#include <usb.h>
|
|
@@ -3382,19 +3247,17 @@ CheckUSBHID()
|
|
|
#elif defined(HAVE_LIBUSBHID_H)
|
|
|
#include <libusbhid.h>
|
|
|
#endif
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
struct report_desc *repdesc;
|
|
|
struct usb_ctl_report *repbuf;
|
|
|
hid_kind_t hidkind;
|
|
|
- ],[
|
|
|
- have_usbhid=yes
|
|
|
- ])
|
|
|
+ ]])], [have_usbhid=yes],[])
|
|
|
AC_MSG_RESULT($have_usbhid)
|
|
|
|
|
|
if test x$have_usbhid = xyes; then
|
|
|
AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
|
|
|
have_usbhid_ucr_data=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/types.h>
|
|
|
#if defined(HAVE_USB_H)
|
|
|
#include <usb.h>
|
|
@@ -3413,12 +3276,10 @@ CheckUSBHID()
|
|
|
#elif defined(HAVE_LIBUSBHID_H)
|
|
|
#include <libusbhid.h>
|
|
|
#endif
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
struct usb_ctl_report buf;
|
|
|
if (buf.ucr_data) { }
|
|
|
- ],[
|
|
|
- have_usbhid_ucr_data=yes
|
|
|
- ])
|
|
|
+ ]])], [have_usbhid_ucr_data=yes],[])
|
|
|
if test x$have_usbhid_ucr_data = xyes; then
|
|
|
USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
|
|
|
fi
|
|
@@ -3426,7 +3287,7 @@ CheckUSBHID()
|
|
|
|
|
|
AC_MSG_CHECKING(for new usbhid API)
|
|
|
have_usbhid_new=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <sys/types.h>
|
|
|
#if defined(HAVE_USB_H)
|
|
|
#include <usb.h>
|
|
@@ -3445,12 +3306,10 @@ CheckUSBHID()
|
|
|
#elif defined(HAVE_LIBUSBHID_H)
|
|
|
#include <libusbhid.h>
|
|
|
#endif
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
report_desc_t d;
|
|
|
hid_start_parse(d, 1, 1);
|
|
|
- ],[
|
|
|
- have_usbhid_new=yes
|
|
|
- ])
|
|
|
+ ]])], [have_usbhid_new=yes],[])
|
|
|
if test x$have_usbhid_new = xyes; then
|
|
|
USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
|
|
|
fi
|
|
@@ -3458,13 +3317,11 @@ CheckUSBHID()
|
|
|
|
|
|
AC_MSG_CHECKING(for struct joystick in machine/joystick.h)
|
|
|
have_machine_joystick=no
|
|
|
- AC_TRY_COMPILE([
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
#include <machine/joystick.h>
|
|
|
- ],[
|
|
|
+ ]], [[
|
|
|
struct joystick t;
|
|
|
- ],[
|
|
|
- have_machine_joystick=yes
|
|
|
- ])
|
|
|
+ ]])], [have_machine_joystick=yes],[])
|
|
|
if test x$have_machine_joystick = xyes; then
|
|
|
AC_DEFINE(SDL_HAVE_MACHINE_JOYSTICK_H, 1, [ ])
|
|
|
fi
|
|
@@ -4536,12 +4393,11 @@ if test "x$enable_rpath" = "xyes" -a "x$enable_shared" = "xyes"; then
|
|
|
have_enable_new_dtags=no
|
|
|
save_LDFLAGS="$LDFLAGS"
|
|
|
LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
|
|
|
- AC_TRY_LINK([
|
|
|
- ],[
|
|
|
- ],[
|
|
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
+ ]],[])], [
|
|
|
have_enable_new_dtags=yes
|
|
|
SDL_RLD_FLAGS="$SDL_RLD_FLAGS -Wl,--enable-new-dtags"
|
|
|
- ])
|
|
|
+ ],[])
|
|
|
LDFLAGS="$save_LDFLAGS"
|
|
|
AC_MSG_RESULT($have_enable_new_dtags)
|
|
|
fi
|