From 197cfcaf71b4a5ab36eaf2a6d8f4f68c9dd1b306 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 14 Apr 2021 21:10:40 +0300 Subject: [PATCH] ran configure.ac through autoupdate-2.69 generated configure script is practically the same except for whitespace changes. --- configure | 255 +++++------------------ configure.ac | 518 +++++++++++++++++----------------------------- test/configure | 26 +-- test/configure.ac | 29 +-- 4 files changed, 255 insertions(+), 573 deletions(-) diff --git a/configure b/configure index 24707554a..c764f5cb1 100755 --- a/configure +++ b/configure @@ -16032,20 +16032,16 @@ $as_echo_n "checking for GCC -mno-cygwin option... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_no_cygwin=yes - + have_no_cygwin=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_cygwin" >&5 @@ -16336,15 +16332,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 @@ -16373,7 +16366,6 @@ int main () { - ; return 0; } @@ -16407,7 +16399,6 @@ int main () { - ; return 0; } @@ -16441,7 +16432,6 @@ int main () { - ; return 0; } @@ -16475,7 +16465,6 @@ int main () { - ; return 0; } @@ -17067,7 +17056,6 @@ int main () { - ; return 0; } @@ -17238,7 +17226,6 @@ $as_echo_n "checking for GCC builtin atomic operations... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -17256,9 +17243,7 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - - have_gcc_atomics=yes - + have_gcc_atomics=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -17274,7 +17259,6 @@ $as_echo "#define HAVE_GCC_ATOMICS 1" >>confdefs.h cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main () { @@ -17288,9 +17272,7 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - - have_gcc_sync_lock_test_and_set=yes - + have_gcc_sync_lock_test_and_set=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -17615,15 +17597,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_mmx=yes - + have_gcc_mmx=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_mmx" >&5 @@ -17671,9 +17650,7 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - - have_gcc_3dnow=yes - + have_gcc_3dnow=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -17723,15 +17700,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_sse=yes - + have_gcc_sse=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_sse" >&5 @@ -17780,15 +17754,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_sse2=yes - + have_gcc_sse2=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_sse2" >&5 @@ -17837,15 +17808,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_sse3=yes - + have_gcc_sse3=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_sse3" >&5 @@ -17900,7 +17868,6 @@ int main () { - ; return 0; } @@ -17929,15 +17896,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_altivec=yes - + have_gcc_altivec=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_altivec" >&5 @@ -17961,7 +17925,6 @@ int main () { - ; return 0; } @@ -17991,15 +17954,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_altivec=yes - + have_gcc_altivec=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_altivec" >&5 @@ -18064,9 +18024,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_oss=yes - + have_oss=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -19114,9 +19072,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - audio_arts=yes - + audio_arts=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" @@ -19718,15 +19674,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 @@ -19755,15 +19708,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_no_strict_aliasing=yes - + have_gcc_no_strict_aliasing=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_no_strict_aliasing" >&5 @@ -19792,15 +19742,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_preferred_stack_boundary=yes - + have_gcc_preferred_stack_boundary=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_preferred_stack_boundary" >&5 @@ -19829,15 +19776,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_declaration_after_statement=yes - + have_gcc_declaration_after_statement=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_declaration_after_statement" >&5 @@ -19866,15 +19810,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_gcc_Wall=yes - + have_gcc_Wall=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_Wall" >&5 @@ -20035,7 +19976,6 @@ int main () { - ; return 0; } @@ -20190,9 +20130,7 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - - have_video_rpi=yes - + have_video_rpi=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -21076,7 +21014,6 @@ int main () { - ; return 0; } @@ -21502,9 +21439,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_xrandr_h_hdr=yes - + have_xrandr_h_hdr=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$have_xrandr_h_hdr = xyes; then @@ -21789,15 +21724,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_vivante_vdk=yes - + have_vivante_vdk=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_vivante_vdk" >&5 @@ -21817,15 +21749,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_vivante_egl=yes - + have_vivante_egl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_vivante_egl" >&5 @@ -21885,15 +21814,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_cocoa=yes - + have_cocoa=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_cocoa" >&5 @@ -21947,15 +21873,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_metal=yes - + have_metal=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" @@ -22409,15 +22332,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengl=yes - + video_opengl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl" >&5 @@ -22452,15 +22372,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengl=yes - + video_opengl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl" >&5 @@ -22519,15 +22436,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengl_egl=yes - + video_opengl_egl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl_egl" >&5 @@ -22552,15 +22466,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengles_v1=yes - + video_opengles_v1=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengles_v1" >&5 @@ -22590,15 +22501,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengles_v2=yes - + video_opengles_v2=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengles_v2" >&5 @@ -22635,15 +22543,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengl_egl=yes - + video_opengl_egl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl_egl" >&5 @@ -22687,15 +22592,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengl_egl=yes - + video_opengl_egl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl_egl" >&5 @@ -22723,15 +22625,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengles_v2=yes - + video_opengles_v2=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengles_v2" >&5 @@ -22817,15 +22716,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengl_egl=yes - + video_opengl_egl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl_egl" >&5 @@ -22849,15 +22745,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - video_opengles_v2=yes - + video_opengles_v2=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengles_v2" >&5 @@ -22898,18 +22791,14 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - else - - enable_video_vulkan=no - + enable_video_vulkan=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; @@ -22931,18 +22820,14 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - else - - enable_video_vulkan=no - + enable_video_vulkan=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" @@ -22988,9 +22873,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - use_input_events=yes - + use_input_events=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_input_events" >&5 @@ -23028,9 +22911,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - use_input_kd=yes - + use_input_kd=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_input_kd" >&5 @@ -23066,9 +22947,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - use_input_kbio=yes - + use_input_kbio=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_input_kbio" >&5 @@ -23099,27 +22978,25 @@ int main () { - struct wskbd_map_data data; - ioctl(0, WSKBDIO_GETMAP, &data); + struct wskbd_map_data data; + ioctl(0, WSKBDIO_GETMAP, &data); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - use_input_wscons=yes - + use_input_wscons=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_input_wscons" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_input_wscons" >&5 $as_echo "$use_input_wscons" >&6; } - if test x$use_input_wscons = xyes; then + if test x$use_input_wscons = xyes; then $as_echo "#define SDL_INPUT_WSCONS 1" >>confdefs.h - SUMMARY_input="${SUMMARY_input} wscons" - fi + SUMMARY_input="${SUMMARY_input} wscons" + fi } CheckLibUDev() @@ -23519,9 +23396,7 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - - enable_joystick_mfi=yes - + enable_joystick_mfi=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -23675,9 +23550,7 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - - use_pthreads=yes - + use_pthreads=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -23780,15 +23653,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_pthread_sem=yes - + have_pthread_sem=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_sem" >&5 @@ -23962,15 +23832,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_win32_gcc=yes - + have_win32_gcc=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_win32_gcc" >&5 @@ -23995,7 +23862,6 @@ int main () { - ; return 0; } @@ -24237,9 +24103,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_dlopen=yes - + have_dlopen=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dlopen" >&5 @@ -24532,9 +24396,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_usbhid=yes - + have_usbhid=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_usbhid" >&5 @@ -24578,9 +24440,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_usbhid_ucr_data=yes - + have_usbhid_ucr_data=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$have_usbhid_ucr_data = xyes; then @@ -24626,9 +24486,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_usbhid_new=yes - + have_usbhid_new=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$have_usbhid_new = xyes; then @@ -24656,9 +24514,7 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - - have_machine_joystick=yes - + have_machine_joystick=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$have_machine_joystick = xyes; then @@ -26136,7 +25992,6 @@ int main () { - ; return 0; } diff --git a/configure.ac b/configure.ac index 5e583e09f..43409b16b 100644 --- a/configure.ac +++ b/configure.ac @@ -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 #include - ],[ - ],[ + ]],[])], [ 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 #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 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 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 - ],[ + ]], [[ 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 - ],[ + ]], [[ 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 - ],[ + ]], [[ 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_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 #include #include #include 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 - ],[ + ]], [[ 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 #include #include - ],[ + ]], [[ 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 #include - ],[ + ]], [[ 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 - ],[ - ],[ - 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 - ],[ - ],[ - 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 - ],[ - ],[ - 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 #import #import @@ -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 #include - ],[ - ],[ - 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 - ],[ - ],[ - 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 #include - ],[ - ],[ - 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 #include - ],[ - ],[ - 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 #include - ],[ - ],[ - 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 #include - ],[ - ],[ - 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 - ],[ - ],[ - 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 #include - ],[ - ],[ - 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 - ],[ - ],[ - 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 #include - ],[ - ],[ - 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 #include #include @@ -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 - ],[ + ]], [[ #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 #include - ],[ + ]], [[ 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 #include - ],[ + ]], [[ 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 #include #include #include #include - ],[ - 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 #include #import - ],[ + ]], [[ #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_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_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_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 #include - ],[ - ],[ - 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 #include - ],[ + ]], [[ 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 - ],[ - ],[ - 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 #include 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 #include 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 - ],[ + ]], [[ 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 #if defined(HAVE_USB_H) #include @@ -3382,19 +3247,17 @@ CheckUSBHID() #elif defined(HAVE_LIBUSBHID_H) #include #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 #if defined(HAVE_USB_H) #include @@ -3413,12 +3276,10 @@ CheckUSBHID() #elif defined(HAVE_LIBUSBHID_H) #include #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 #if defined(HAVE_USB_H) #include @@ -3445,12 +3306,10 @@ CheckUSBHID() #elif defined(HAVE_LIBUSBHID_H) #include #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 - ],[ + ]], [[ 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 diff --git a/test/configure b/test/configure index 5d99f96a8..59e027cd9 100755 --- a/test/configure +++ b/test/configure @@ -2996,8 +2996,7 @@ fi ISUNIX="true" EXE="" MATHLIB="-lm" - have_glvnd=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBegin in -lOpenGL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBegin in -lOpenGL" >&5 $as_echo_n "checking for glBegin in -lOpenGL... " >&6; } if ${ac_cv_lib_OpenGL_glBegin+:} false; then : $as_echo_n "(cached) " >&6 @@ -3034,13 +3033,9 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenGL_glBegin" >&5 $as_echo "$ac_cv_lib_OpenGL_glBegin" >&6; } if test "x$ac_cv_lib_OpenGL_glBegin" = xyes; then : - - SYS_GL_LIBS="-lOpenGL" - + SYS_GL_LIBS="-lOpenGL" else - - SYS_GL_LIBS="-lGL" - + SYS_GL_LIBS="-lGL" fi ;; @@ -3886,15 +3881,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - -have_opengl=yes - + have_opengl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengl" >&5 @@ -3915,15 +3907,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - -have_opengles=yes - + have_opengles=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles" >&5 @@ -3944,15 +3933,12 @@ int main () { - ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - -have_opengles2=yes - + have_opengles2=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles2" >&5 diff --git a/test/configure.ac b/test/configure.ac index 7aad98fe4..e2067e3ad 100644 --- a/test/configure.ac +++ b/test/configure.ac @@ -81,14 +81,8 @@ case "$host" in EXE="" MATHLIB="-lm" dnl Use the new libOpenGL if present. - have_glvnd=no AC_CHECK_LIB(OpenGL, glBegin, - [ - dnl have_glvnd=yes - SYS_GL_LIBS="-lOpenGL" - ],[ - SYS_GL_LIBS="-lGL" - ]) + [SYS_GL_LIBS="-lOpenGL"],[SYS_GL_LIBS="-lGL"]) ;; esac AC_SUBST(EXE) @@ -130,43 +124,34 @@ fi dnl Check for OpenGL AC_MSG_CHECKING(for OpenGL support) have_opengl=no -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "SDL_opengl.h" #ifndef SDL_VIDEO_OPENGL #error SDL_VIDEO_OPENGL #endif -],[ -],[ -have_opengl=yes -]) +]],[])], [have_opengl=yes],[]) AC_MSG_RESULT($have_opengl) dnl Check for OpenGL ES AC_MSG_CHECKING(for OpenGL ES support) have_opengles=no -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "SDL_opengles.h" #ifndef SDL_VIDEO_OPENGL_ES #error SDL_VIDEO_OPENGL_ES #endif -],[ -],[ -have_opengles=yes -]) +]],[])] ,[have_opengles=yes],[]) AC_MSG_RESULT($have_opengles) dnl Check for OpenGL ES2 AC_MSG_CHECKING(for OpenGL ES2 support) have_opengles2=no -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "SDL_opengles2.h" #ifndef SDL_VIDEO_OPENGL_ES2 #error SDL_VIDEO_OPENGL_ES2 #endif -],[ -],[ -have_opengles2=yes -]) +]],[])], [have_opengles2=yes],[]) AC_MSG_RESULT($have_opengles2) GLLIB=""