From 00960b40b9f562091a80f464c87233ae26df1667 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 23 Jul 2023 23:14:12 +0200 Subject: [PATCH] Replace obsolete AC_TRY_XXX macros with AC_XXX_IFELSE No real changes, just avoid warnings from autoconf 2.71 when regenerating configure. Note that double brackets must be used around any code using brackets to preserve them during the expansion. --- acinclude.m4 | 28 +- .../ac_raf_func_which_getservbyname_r.m4 | 12 +- build/aclocal/atomic_builtins.m4 | 4 +- build/aclocal/ax_cflags_gcc_option.m4 | 28 +- build/aclocal/bakefile-lang.m4 | 8 +- build/aclocal/bakefile.m4 | 4 +- build/aclocal/sdl.m4 | 8 +- build/aclocal/visibility.m4 | 12 +- configure | 41 +-- configure.in | 254 +++++++++--------- 10 files changed, 199 insertions(+), 200 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 97b4b26d1b..507dae23ce 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -258,18 +258,18 @@ AC_DEFUN([WX_C_BIGENDIAN], [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian, [ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. -AC_TRY_COMPILE([#include +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [ #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros -#endif], [# It does; now see whether it defined to BIG_ENDIAN or not. -AC_TRY_COMPILE([#include +#endif])], [# It does; now see whether it defined to BIG_ENDIAN or not. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [ #if BYTE_ORDER != BIG_ENDIAN not big endian -#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) +#endif])], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) if test $ac_cv_c_bigendian = unknown; then -AC_TRY_RUN([main () { +AC_RUN_IFELSE([AC_LANG_SOURCE([[main () { /* Are we little or big endian? From Harbison&Steele. */ union { @@ -278,7 +278,7 @@ AC_TRY_RUN([main () { } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); -}], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=unknown]) +}]])], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=unknown]) fi]) if test $ac_cv_c_bigendian = unknown; then AC_MSG_WARN([Assuming little-endian target machine - this may be overridden by adding the line "ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}" to config.cache file]) @@ -567,20 +567,20 @@ AC_DEFUN([AM_ICONV], AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no - AC_TRY_LINK([#include + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], + iconv_close(cd);])], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" - AC_TRY_LINK([#include + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], + iconv_close(cd);])], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" @@ -589,7 +589,7 @@ AC_DEFUN([AM_ICONV], if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) AC_CACHE_CHECK([if iconv needs const], wx_cv_func_iconv_const, - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include #include extern @@ -602,7 +602,7 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si size_t iconv(); #endif ], - [], + [])], wx_cv_func_iconv_const="no", wx_cv_func_iconv_const="yes" ) @@ -645,9 +645,9 @@ define(WX_SYS_LARGEFILE_MACRO_VALUE, [ AC_CACHE_CHECK([for $1 value needed for large files], [$3], [ - AC_TRY_COMPILE([#define $1 $2 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#define $1 $2 #include ], - WX_SYS_LARGEFILE_TEST, + WX_SYS_LARGEFILE_TEST)], [$3=$2], [$3=no]) ] diff --git a/build/aclocal/ac_raf_func_which_getservbyname_r.m4 b/build/aclocal/ac_raf_func_which_getservbyname_r.m4 index ed90549812..81daa8e951 100644 --- a/build/aclocal/ac_raf_func_which_getservbyname_r.m4 +++ b/build/aclocal/ac_raf_func_which_getservbyname_r.m4 @@ -26,7 +26,7 @@ AC_CACHE_CHECK(how many arguments getservbyname_r() takes, dnl we need to use C++ to detect missing prototypes AC_LANG_PUSH(C++) - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ [ char *name; char *proto; @@ -34,10 +34,10 @@ AC_CACHE_CHECK(how many arguments getservbyname_r() takes, char buffer[2048]; int buflen = 2048; (void) getservbyname_r(name, proto, se, buffer, buflen, &res) - ], + ]])], ac_cv_func_which_getservbyname_r=six, [ - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ [ char *name; char *proto; @@ -45,17 +45,17 @@ AC_CACHE_CHECK(how many arguments getservbyname_r() takes, char buffer[2048]; int buflen = 2048; (void) getservbyname_r(name, proto, se, buffer, buflen) - ], + ]])], ac_cv_func_which_getservbyname_r=five, [ - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ char *name; char *proto; struct servent *se; struct servent_data data; (void) getservbyname_r(name, proto, se, &data); - ], + ])], ac_cv_func_which_getservbyname_r=four, ac_cv_func_which_getservbyname_r=no ) diff --git a/build/aclocal/atomic_builtins.m4 b/build/aclocal/atomic_builtins.m4 index 6ebc2279af..8dce460c27 100644 --- a/build/aclocal/atomic_builtins.m4 +++ b/build/aclocal/atomic_builtins.m4 @@ -8,13 +8,13 @@ AC_DEFUN([WX_ATOMIC_BUILTINS], if test -n "$GCC"; then AC_MSG_CHECKING([for __sync_xxx_and_fetch builtins]) AC_CACHE_VAL(wx_cv_cc_gcc_atomic_builtins, [ - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [], [ unsigned int value=0; volatile unsigned int r1 = __sync_add_and_fetch(&value, 2); volatile unsigned int r2 = __sync_sub_and_fetch(&value, 1); - ], + ])], wx_cv_cc_gcc_atomic_builtins=yes, wx_cv_cc_gcc_atomic_builtins=no) ]) diff --git a/build/aclocal/ax_cflags_gcc_option.m4 b/build/aclocal/ax_cflags_gcc_option.m4 index b595a842a2..2b9c6b5008 100644 --- a/build/aclocal/ax_cflags_gcc_option.m4 +++ b/build/aclocal/ax_cflags_gcc_option.m4 @@ -81,19 +81,18 @@ AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)], VAR,[VAR="no, unknown" - AC_LANG_SAVE - AC_LANG_C + AC_LANG_PUSH(C) ac_save_[]FLAGS="$[]FLAGS" for ac_arg dnl in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC # do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - AC_TRY_COMPILE([],[return 0;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])], [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) done FLAGS="$ac_save_[]FLAGS" - AC_LANG_RESTORE + AC_LANG_POP() ]) case ".$VAR" in .ok|.ok,*) m4_ifvaln($3,$3) ;; @@ -117,19 +116,18 @@ AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$2])dnl AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)], VAR,[VAR="no, unknown" - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) ac_save_[]FLAGS="$[]FLAGS" for ac_arg dnl in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC # do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - AC_TRY_COMPILE([],[return 0;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])], [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) done FLAGS="$ac_save_[]FLAGS" - AC_LANG_RESTORE + AC_LANG_POP() ]) case ".$VAR" in .ok|.ok,*) m4_ifvaln($3,$3) ;; @@ -152,19 +150,18 @@ AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$1])dnl AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)], VAR,[VAR="no, unknown" - AC_LANG_SAVE - AC_LANG_C + AC_LANG_PUSH(C) ac_save_[]FLAGS="$[]FLAGS" for ac_arg dnl in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC # do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - AC_TRY_COMPILE([],[return 0;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])], [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) done FLAGS="$ac_save_[]FLAGS" - AC_LANG_RESTORE + AC_LANG_POP() ]) case ".$VAR" in .ok|.ok,*) m4_ifvaln($3,$3) ;; @@ -188,19 +185,18 @@ AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$1])dnl AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)], VAR,[VAR="no, unknown" - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_PUSH(C++) ac_save_[]FLAGS="$[]FLAGS" for ac_arg dnl in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC # do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - AC_TRY_COMPILE([],[return 0;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])], [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) done FLAGS="$ac_save_[]FLAGS" - AC_LANG_RESTORE + AC_LANG_POP() ]) case ".$VAR" in .ok|.ok,*) m4_ifvaln($3,$3) ;; diff --git a/build/aclocal/bakefile-lang.m4 b/build/aclocal/bakefile-lang.m4 index ad55fa8e2c..438cd63357 100644 --- a/build/aclocal/bakefile-lang.m4 +++ b/build/aclocal/bakefile-lang.m4 @@ -37,13 +37,13 @@ AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER], AC_CACHE_CHECK( [whether we are using the $1 $2 compiler], [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3], - [AC_TRY_COMPILE( + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ #ifndef $3 choke me #endif - ], + ])], [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=yes], [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=no] ) @@ -67,13 +67,13 @@ AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER_LATER_THAN], AC_CACHE_CHECK( [whether we are using $1 $2 compiler v$5 or later], [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4], - [AC_TRY_COMPILE( + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ #ifndef $3 || $3 < $4 choke me #endif - ], + ])], [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=yes], [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=no] ) diff --git a/build/aclocal/bakefile.m4 b/build/aclocal/bakefile.m4 index 240f037a0c..c542c28d7f 100644 --- a/build/aclocal/bakefile.m4 +++ b/build/aclocal/bakefile.m4 @@ -600,7 +600,7 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS], if test "x$GCC" = "xyes"; then dnl test if we have gcc-3.4: AC_MSG_CHECKING([if the compiler supports precompiled headers]) - AC_TRY_COMPILE([], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ #if !defined(__GNUC__) || !defined(__GNUC_MINOR__) There is no PCH support @@ -614,7 +614,7 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS], ( defined(__INTEL_COMPILER) ) There is no PCH support #endif - ], + ])], [ AC_MSG_RESULT([yes]) GCC_PCH=1 diff --git a/build/aclocal/sdl.m4 b/build/aclocal/sdl.m4 index 962d44475e..22bfaf4602 100644 --- a/build/aclocal/sdl.m4 +++ b/build/aclocal/sdl.m4 @@ -63,7 +63,7 @@ dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl-config to some extent dnl rm -f conf.sdltest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -120,7 +120,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" @@ -144,7 +144,7 @@ int main (int argc, char *argv[]) CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM[[ #include #include "SDL.h" @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main -], [ return 0; ], +]], [ return 0; ])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" diff --git a/build/aclocal/visibility.m4 b/build/aclocal/visibility.m4 index 3d7c972aec..5848b18edc 100644 --- a/build/aclocal/visibility.m4 +++ b/build/aclocal/visibility.m4 @@ -36,7 +36,7 @@ AC_DEFUN([WX_VISIBILITY], wx_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY" AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ /* we need gcc >= 4.0, older versions with visibility support didn't have class visibility: */ @@ -75,7 +75,7 @@ AC_DEFUN([WX_VISIBILITY], Foo() {} }; ], - [], + [])], wx_cv_cc_visibility=yes, wx_cv_cc_visibility=no) AC_LANG_POP() @@ -93,14 +93,14 @@ AC_DEFUN([WX_VISIBILITY], CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY" LDFLAGS="$LDFLAGS -shared -fPIC" AC_LANG_PUSH(C++) - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [ #include ], [ std::string s("hello"); return s.length(); - ], + ])], wx_cv_cc_broken_libstdcxx_visibility=no, wx_cv_cc_broken_libstdcxx_visibility=yes) AC_LANG_POP() @@ -112,7 +112,7 @@ AC_DEFUN([WX_VISIBILITY], AC_MSG_CHECKING([whether we can work around it]) AC_CACHE_VAL(wx_cv_cc_visibility_workaround, [ AC_LANG_PUSH(C++) - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [ #pragma GCC visibility push(default) #include @@ -121,7 +121,7 @@ AC_DEFUN([WX_VISIBILITY], [ std::string s("hello"); return s.length(); - ], + ])], wx_cv_cc_visibility_workaround=no, wx_cv_cc_visibility_workaround=yes) AC_LANG_POP() diff --git a/configure b/configure index 3b2ca135a3..5710e8590e 100755 --- a/configure +++ b/configure @@ -23004,6 +23004,7 @@ else $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "$error_message See \`config.log' for more details" "$LINENO" 5; } + fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -23103,7 +23104,6 @@ $as_echo_n "checking if CoreFoundation/CFBase.h is usable... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - int main () { @@ -32414,6 +32414,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + [ #include int main (void) @@ -32424,7 +32425,7 @@ else exit (0); exit (1); } - + ] _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : wx_cv_func_snprintf_pos_params=no @@ -32850,6 +32851,7 @@ int main () { + void *trace[1]; char **messages; backtrace(trace, 1); @@ -35043,6 +35045,7 @@ int main () { + char *name; char *proto; struct servent *se, *res; @@ -35065,6 +35068,7 @@ int main () { + char *name; char *proto; struct servent *se; @@ -36245,6 +36249,13 @@ $as_echo "no" >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + + ; + return 0; +}[ #include #include "SDL.h" @@ -36252,14 +36263,7 @@ int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main - -int -main () -{ - return 0; - ; - return 0; -} +], return 0; ) _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" @@ -36509,6 +36513,13 @@ $as_echo "no" >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + + ; + return 0; +}[ #include #include "SDL.h" @@ -36516,14 +36527,7 @@ int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main - -int -main () -{ - return 0; - ; - return 0; -} +], return 0; ) _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" @@ -40606,7 +40610,6 @@ if ${ac_cv_cxxflags_gcc_option__Woverloaded_virtual+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_cxxflags_gcc_option__Woverloaded_virtual="no, unknown" - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/configure.in b/configure.in index 166ef21fa8..d20245605f 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,4 @@ dnl Process this file with autoconf to produce a configure script. - AC_PREREQ(2.58) dnl --------------------------------------------------------------------------- @@ -1325,12 +1324,13 @@ version or omitting it entirely." AC_LANG_PUSH(C) AC_MSG_CHECKING([if C compiler ($CC) works with SDK/version options]) - AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([$error_message])]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([$error_message])] + ) AC_LANG_POP() AC_LANG_PUSH(C++) AC_MSG_CHECKING([if C++ compiler ($CXX) works with SDK/version options]) - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [ #include ], @@ -1345,7 +1345,7 @@ version or omitting it entirely." #elif !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) #error unrecognized platform #endif - ], + ])], [AC_MSG_RESULT([yes])], [AC_MSG_FAILURE([$error_message])] ) @@ -1411,14 +1411,14 @@ dnl This case is for OS X vs. everything else case "${host}" in *-*-darwin* ) AC_MSG_CHECKING([if CoreFoundation/CFBase.h is usable]) - AC_TRY_COMPILE([#include -],[], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([#include ],[])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_CHECKING([if __CF_USE_FRAMEWORK_INCLUDES__ is required]) - AC_TRY_COMPILE([#define __CF_USE_FRAMEWORK_INCLUDES__ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#define __CF_USE_FRAMEWORK_INCLUDES__ #include - ],[], + ],[])], [AC_MSG_RESULT([yes]) dnl We must use -D so source files that don't include wx/setup.h dnl but do include CFBase will work. @@ -1443,13 +1443,13 @@ case "${host}" in dnl headers and libraries, so it's Windows-like in this case AC_CACHE_CHECK([if -mno-cygwin is in effect], wx_cv_nocygwin, [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ #ifdef __MINGW32__ choke me #endif - ], + ])], wx_cv_nocygwin=no, wx_cv_nocygwin=yes ) @@ -1693,13 +1693,13 @@ if test -n "$LARGEFILE_CPPFLAGS"; then wx_cv_STDC_EXT_required, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ #ifndef __STDC_EXT__ choke me #endif - ], + ])], wx_cv_STDC_EXT_required=no, wx_cv_STDC_EXT_required=yes ) @@ -1758,12 +1758,12 @@ if test "x$SGICC" = "xyes"; then AC_CACHE_CHECK([if cc version is 7.4.4 or greater], wx_cv_prog_sgicc744, [ - AC_TRY_COMPILE([], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ #if _SGI_COMPILER_VERSION >= 744 chock me: mipsPro is 7.4.4 or later #endif - ], + ])], wx_cv_prog_sgicc744=no, wx_cv_prog_sgicc744=yes ) @@ -1779,12 +1779,12 @@ if test "x$SGICXX" = "xyes"; then wx_cv_prog_sgicxx744, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE([], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ #if _SGI_COMPILER_VERSION >= 744 chock me: mipsPro is 7.4.4 or later #endif - ], + ])], wx_cv_prog_sgicxx744=no, wx_cv_prog_sgicxx744=yes ) @@ -2200,9 +2200,9 @@ if test "$wxUSE_ZLIB" != "no" ; then dnl has anything more ancient (1.1.3 was released in July 1998) dnl anyhow AC_CACHE_CHECK([for zlib.h >= 1.1.4], ac_cv_header_zlib_h, - [AC_TRY_RUN( + [AC_RUN_IFELSE( dnl zlib.h defines ZLIB_VERSION="x.y.z" - [ + [AC_LANG_SOURCE([[ #include #include #include @@ -2218,7 +2218,7 @@ if test "$wxUSE_ZLIB" != "no" ; then ZLIB_VERSION[4] >= '4')) ? "yes" : "no"); return 0; } - ], + ]])], ac_cv_header_zlib_h=`cat conftestval`, ac_cv_header_zlib_h=no, dnl cross-compiling: don't have an answer, try later @@ -2286,9 +2286,9 @@ if test "$wxUSE_LIBPNG" != "no" ; then dnl libpng version 0.9 is known to not work, if an even newer dnl version is required, just bump it up in the test below AC_CACHE_CHECK([for png.h > 0.90], ac_cv_header_png_h, - [AC_TRY_RUN( + [AC_RUN_IFELSE( dnl png.h defines PNG_LIBPNG_VER=number - [ + [AC_LANG_SOURCE([[ #include #include #include @@ -2301,7 +2301,7 @@ if test "$wxUSE_LIBPNG" != "no" ; then PNG_LIBPNG_VER > 90 ? "yes" : "no"); return 0; } - ], + ]])], ac_cv_header_png_h=`cat conftestval`, ac_cv_header_png_h=no, dnl cross-compiling: test (later) if we have any png.h @@ -2364,14 +2364,14 @@ if test "$wxUSE_LIBJPEG" != "no" ; then dnl a compiler warning which configure considers as an error... AC_MSG_CHECKING(for jpeglib.h) AC_CACHE_VAL(ac_cv_header_jpeglib_h, - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #undef HAVE_STDLIB_H #include #include ], [ - ], + ])], ac_cv_header_jpeglib_h=yes, ac_cv_header_jpeglib_h=no ) @@ -2590,7 +2590,7 @@ if test "$wxUSE_EXPAT" != "no"; then wx_cv_expat_is_not_broken, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE([#include ],[], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ],[])], wx_cv_expat_is_not_broken=yes, wx_cv_expat_is_not_broken=no ) @@ -2872,14 +2872,14 @@ installed, where VER is 2, 3 or 4. dnl gtk/gtk.h from them. AC_CACHE_CHECK([if GTK+ is version >= 2.20], wx_cv_gtk220, [ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include ], [ #if !GTK_CHECK_VERSION(2,20,0) Not GTK+ 2.20 #endif - ], + ])], wx_cv_gtk220=yes, wx_cv_gtk220=no ) @@ -2890,14 +2890,14 @@ installed, where VER is 2, 3 or 4. wx_cv_gtk218=yes else AC_CACHE_CHECK([if GTK+ is version >= 2.18], wx_cv_gtk218, [ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include ], [ #if !GTK_CHECK_VERSION(2,18,0) Not GTK+ 2.18 #endif - ], + ])], wx_cv_gtk218=yes, wx_cv_gtk218=no ) @@ -2909,14 +2909,14 @@ installed, where VER is 2, 3 or 4. wx_cv_gtk210=yes else AC_CACHE_CHECK([if GTK+ is version >= 2.10], wx_cv_gtk210, [ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include ], [ #if !GTK_CHECK_VERSION(2,10,0) Not GTK+ 2.10 #endif - ], + ])], wx_cv_gtk210=yes, wx_cv_gtk210=no ) @@ -2939,14 +2939,14 @@ installed, where VER is 2, 3 or 4. AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [ save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include ], [ #ifndef GDK_WINDOWING_WAYLAND Not GDK Windowing Wayland #endif - ], + ])], wx_cv_gdk_wayland=yes, wx_cv_gdk_wayland=no ) @@ -3051,14 +3051,14 @@ installed, where VER is 2, 3 or 4. save_CFLAGS=$CFLAGS CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include ], [ int version; version = XpmLibraryVersion(); - ], + ])], wx_cv_x11_xpm_h=yes, wx_cv_x11_xpm_h=no ) @@ -3090,7 +3090,7 @@ installed, where VER is 2, 3 or 4. CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" AC_MSG_CHECKING([for X11/extensions/shape.h]) - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include #include ], @@ -3098,7 +3098,7 @@ installed, where VER is 2, 3 or 4. int dummy1, dummy2; XShapeQueryExtension((Display*)NULL, (int*)NULL, (int*)NULL); - ], + ])], [ AC_DEFINE(HAVE_XSHAPE) AC_MSG_RESULT([found]) @@ -3449,8 +3449,8 @@ if test "$wxUSE_SHARED" = "yes"; then saveLdflags="$LDFLAGS" LDFLAGS="$saveLdflags -Wl,-rpath,/" AC_MSG_CHECKING([if the linker accepts -rpath]) - AC_TRY_LINK( - [],[], + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [],[])], [ AC_MSG_RESULT([yes]) SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib" @@ -3459,8 +3459,8 @@ if test "$wxUSE_SHARED" = "yes"; then AC_MSG_RESULT([no]) AC_MSG_CHECKING([if the linker accepts -R]) LDFLAGS="$saveLdflags -Wl,-R,/" - AC_TRY_LINK( - [],[], + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [],[])], [ AC_MSG_RESULT([yes]) SAMPLES_RPATH_FLAG="-Wl,-R,\$(wx_top_builddir)/lib" @@ -3569,20 +3569,20 @@ AC_LANG_PUSH(C++) dnl tests below use overloaded functions and so need C++ AC_CACHE_CHECK([if size_t is unsigned int], wx_cv_size_t_is_uint, [ - dnl an obvious check like AC_TRY_COMPILE[struct Foo { ... };] doesn't work + dnl an obvious check like AC_COMPILE_IFELSE[struct Foo { ... };] doesn't work dnl with egcs (at least) up to 1.1.1 as it allows you to compile duplicate dnl methods in a local class (i.e. class inside a function) declaration dnl without any objections!! dnl dnl hence the hack below: we must have Foo at global scope! - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ return 0; } struct Foo { void foo(size_t); void foo(unsigned int); }; int bar() { - ], + ])], wx_cv_size_t_is_uint=no, wx_cv_size_t_is_uint=yes ) @@ -3594,14 +3594,14 @@ if test "$wx_cv_size_t_is_uint" = "yes"; then else AC_CACHE_CHECK([if size_t is unsigned long], wx_cv_size_t_is_ulong, - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ return 0; } struct Foo { void foo(size_t); void foo(unsigned long); }; int bar() { - ], + ])], wx_cv_size_t_is_ulong=no, wx_cv_size_t_is_ulong=yes ) @@ -3614,7 +3614,7 @@ fi AC_CACHE_CHECK([if wchar_t is separate type], wx_cv_wchar_t_is_separate_type, - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ return 0; } @@ -3624,7 +3624,7 @@ AC_CACHE_CHECK([if wchar_t is separate type], void foo(unsigned long); }; int bar() { - ], + ])], wx_cv_wchar_t_is_separate_type=yes, wx_cv_wchar_t_is_separate_type=no ) @@ -3645,12 +3645,12 @@ dnl --------------------------------------------------------------------------- dnl does passwd struct has the pw_gecos field? AC_CACHE_CHECK([for pw_gecos in struct passwd], wx_cv_struct_pw_gecos, [ - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ char *p; struct passwd *pw; p = pw->pw_gecos; - ], + ])], [ wx_cv_struct_pw_gecos=yes ], @@ -3727,7 +3727,7 @@ if test "$wx_cv_func_vsnprintf" = "yes"; then dnl may have one taking a "char *" format instead of "const char *" AC_CACHE_CHECK([if vsnprintf declaration is broken], wx_cv_func_broken_vsnprintf_decl, [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -3737,7 +3737,7 @@ if test "$wx_cv_func_vsnprintf" = "yes"; then va_list ap; const char *fmt = "%s"; vsnprintf(buf, 10u, fmt, ap); - ], + ])], wx_cv_func_broken_vsnprintf_decl=no, wx_cv_func_broken_vsnprintf_decl=yes ) @@ -3758,7 +3758,7 @@ if test "$wx_cv_func_snprintf" = "yes"; then dnl family and they all fallback to the same implementation AC_CACHE_CHECK([if snprintf supports positional arguments], wx_cv_func_snprintf_pos_params, [ - AC_TRY_RUN( + AC_RUN_IFELSE([AC_LANG_SOURCE([[ [ #include @@ -3770,7 +3770,7 @@ if test "$wx_cv_func_snprintf" = "yes"; then exit (0); exit (1); } - ], + ]]])], wx_cv_func_snprintf_pos_params=no, wx_cv_func_snprintf_pos_params=yes, dnl be pessimistic when cross-compiling @@ -3795,7 +3795,7 @@ if test "$wx_cv_func_vsscanf" = "yes"; then dnl happens at least under HP-UX 11.31, see #15638). AC_CACHE_CHECK([if vsscanf() declaration is broken], wx_cv_func_broken_vsscanf_decl, [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -3804,7 +3804,7 @@ if test "$wx_cv_func_vsscanf" = "yes"; then const char *buf; va_list args; vsscanf(buf, "%s", args); - ], + ])], wx_cv_func_broken_vsscanf_decl=no, wx_cv_func_broken_vsscanf_decl=yes ) @@ -3837,8 +3837,8 @@ dnl MinGW has a vswprintf with a different prototype, and dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS dnl finds it even if it is not declared in some versions... AC_MSG_CHECKING([for _vsnwprintf]) -AC_TRY_COMPILE([#include ], - [&_vsnwprintf;], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], + [&_vsnwprintf;])], [AC_MSG_RESULT([yes]) AC_DEFINE(HAVE__VSNWPRINTF)], [AC_MSG_RESULT([no])]); @@ -3873,13 +3873,13 @@ if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then AC_CACHE_CHECK([for backtrace()], wx_cv_func_backtrace, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ [ void *trace[1]; char **messages; backtrace(trace, 1); messages = backtrace_symbols(trace, 1); - ], + ]])], wx_cv_func_backtrace=yes, wx_cv_func_backtrace=no ) @@ -3898,11 +3898,11 @@ if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then AC_CACHE_CHECK([for __cxa_demangle() in ], wx_cv_func_cxa_demangle, [ AC_LANG_PUSH(C++) - AC_TRY_LINK([#include ], + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [ int rc; __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc); - ], + ])], wx_cv_func_cxa_demangle=yes, wx_cv_func_cxa_demangle=no ) @@ -3932,14 +3932,14 @@ dnl get the library function to use for wxGetDiskSpace(): prefer POSIX dnl statvfs() if it exists, but fall back to Linux/BSD-specific statfs() if dnl necessary. AC_CACHE_CHECK(for statvfs, wx_cv_func_statvfs, - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include ], [ statvfs("/", NULL); - ], + ])], wx_cv_func_statvfs=yes, wx_cv_func_statvfs=no ) @@ -3955,7 +3955,7 @@ if test "$wx_cv_func_statvfs" = "yes"; then dnl pointers is just a warning and not an error in C AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t, AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include ], @@ -3966,10 +3966,10 @@ if test "$wx_cv_func_statvfs" = "yes"; then l = fs.f_bsize; l += fs.f_blocks; l += fs.f_bavail; - ], + ])], wx_cv_type_statvfs_t=statvfs_t, [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include ], @@ -3980,7 +3980,7 @@ if test "$wx_cv_func_statvfs" = "yes"; then l = fs.f_bsize; l += fs.f_blocks; l += fs.f_bavail; - ], + ])], wx_cv_type_statvfs_t="struct statvfs", wx_cv_type_statvfs_t="unknown" ) @@ -3999,7 +3999,7 @@ fi if test "$wx_cv_type_statvfs_t" = "unknown"; then AC_CACHE_CHECK(for statfs, wx_cv_func_statfs, - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #if defined(__BSD__) #include @@ -4015,7 +4015,7 @@ if test "$wx_cv_type_statvfs_t" = "unknown"; then l = fs.f_bsize; l += fs.f_blocks; l += fs.f_bavail; - ], + ])], wx_cv_func_statfs=yes, wx_cv_func_statfs=no ) @@ -4025,7 +4025,7 @@ if test "$wx_cv_type_statvfs_t" = "unknown"; then dnl check whether we have its dcelaration too: some systems (AIX 4) lack it AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl, AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #if defined(__BSD__) #include @@ -4037,7 +4037,7 @@ if test "$wx_cv_type_statvfs_t" = "unknown"; then [ struct statfs fs; statfs("", &fs); - ], + ])], wx_cv_func_statfs_decl=yes, wx_cv_func_statfs_decl=no ) @@ -4287,7 +4287,7 @@ if test "$TOOLKIT" != "MSW"; then case "${host}" in *-*-qnx*) - dnl -lpthread works, i.e. AC_TRY_LINK() would pass, but results + dnl -lpthread works, i.e. AC_LINK_IFELSE() would pass, but results dnl in warnings and is not needed under QNX so try without it dnl first THREAD_OPTS="none pthread" @@ -4326,8 +4326,8 @@ if test "$TOOLKIT" != "MSW"; then LIBS="$THREADS_LINK $LIBS" CFLAGS="$THREADS_CFLAGS $CFLAGS" - AC_TRY_LINK([#include ], - [pthread_create(0,0,0,0);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [pthread_create(0,0,0,0);])], THREADS_OK=yes) LIBS="$save_LIBS" @@ -4414,14 +4414,14 @@ if test "$TOOLKIT" != "MSW"; then dnl function and not give a warning even if it's unavailable, so use dnl the C++ one for this test AC_LANG_PUSH(C++) - AC_TRY_COMPILE([#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include void ThreadCleanupFunc(void *p); ], [ void *p; pthread_cleanup_push(ThreadCleanupFunc, p); pthread_cleanup_pop(0); - ], [ + ])], [ wx_cv_func_pthread_cleanup=yes ], [ wx_cv_func_pthread_cleanup=no @@ -4496,11 +4496,11 @@ if test "$TOOLKIT" != "MSW"; then AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t, [ - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - ], + ])], wx_cv_type_pthread_mutexattr_t=yes, wx_cv_type_pthread_mutexattr_t=no ) @@ -4513,11 +4513,11 @@ if test "$TOOLKIT" != "MSW"; then dnl present in some systems' headers AC_CACHE_CHECK([for pthread_mutexattr_settype declaration], wx_cv_func_pthread_mutexattr_settype_decl, [ - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - ], + ])], wx_cv_func_pthread_mutexattr_settype_decl=yes, wx_cv_func_pthread_mutexattr_settype_decl=no ) @@ -4530,10 +4530,10 @@ if test "$TOOLKIT" != "MSW"; then AC_CACHE_CHECK([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER], wx_cv_type_pthread_rec_mutex_init, [ - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - ], [ + ])], [ wx_cv_type_pthread_rec_mutex_init=yes ], [ wx_cv_type_pthread_rec_mutex_init=no @@ -4553,10 +4553,10 @@ if test "$TOOLKIT" != "MSW"; then wx_cv_type_abi_forced_unwind, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE([#include ], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ void foo(abi::__forced_unwind&); - ], + ])], wx_cv_type_abi_forced_unwind=yes, wx_cv_type_abi_forced_unwind=no ) @@ -5068,24 +5068,24 @@ if test "$USE_UNIX" = 1 ; then dnl redefines ioctl as oss_ioctrl inside it and so we also need to test dnl whether we need -lossaudio at link-time AC_CACHE_CHECK([for SNDCTL_DSP_SPEED in sys/soundcard.h], ac_cv_header_sys_soundcard, [ - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ], [ ioctl(0, SNDCTL_DSP_SPEED, 0); - ], + ])], ac_cv_header_sys_soundcard=yes, [ saveLibs="$LIBS" LIBS="$saveLibs -lossaudio" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ], [ ioctl(0, SNDCTL_DSP_SPEED, 0); - ], + ])], ac_cv_header_sys_soundcard=yes, [ LIBS="$saveLibs" @@ -5396,7 +5396,7 @@ if test "$wxUSE_XLOCALE" = "yes" ; then AC_CACHE_CHECK([for locale_t], wx_cv_type_locale_t, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #ifdef HAVE_XLOCALE_H #include @@ -5409,7 +5409,7 @@ if test "$wxUSE_XLOCALE" = "yes" ; then strtod_l(NULL, NULL, t); strtol_l(NULL, NULL, 0, t); strtoul_l(NULL, NULL, 0, t); - ], + ])], wx_cv_type_locale_t=yes, wx_cv_type_locale_t=no ) @@ -5511,7 +5511,7 @@ if test "$ac_cv_func_gettimeofday" = "yes"; then wx_cv_func_gettimeofday_has_2_args, [ dnl on some _really_ old systems it takes only 1 argument - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5519,9 +5519,9 @@ if test "$ac_cv_func_gettimeofday" = "yes"; then [ struct timeval tv; gettimeofday(&tv, NULL); - ], + ])], wx_cv_func_gettimeofday_has_2_args=yes, - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5529,7 +5529,7 @@ if test "$ac_cv_func_gettimeofday" = "yes"; then [ struct timeval tv; gettimeofday(&tv); - ], + ])], wx_cv_func_gettimeofday_has_2_args=no, [ AC_MSG_WARN([failed to determine number of gettimeofday() arguments]) @@ -5551,38 +5551,38 @@ if test "$wxUSE_DATETIME" = "yes"; then wx_cv_var_timezone, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include ], [ int tz; tz = timezone; - ], + ])], [ wx_cv_var_timezone=timezone ], [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include ], [ int tz; tz = _timezone; - ], + ])], [ wx_cv_var_timezone=_timezone ], [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include ], [ int tz; tz = __timezone; - ], + ])], [ wx_cv_var_timezone=__timezone ], @@ -5612,14 +5612,14 @@ if test "$wxUSE_DATETIME" = "yes"; then AC_CACHE_CHECK(for tm_gmtoff in struct tm, wx_cv_struct_tm_has_gmtoff, [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include ], [ struct tm tm; tm.tm_gmtoff++; - ], + ])], [ wx_cv_struct_tm_has_gmtoff=yes ], @@ -5635,14 +5635,14 @@ if test "$wxUSE_DATETIME" = "yes"; then AC_CACHE_CHECK([for _NL_TIME_FIRST_WEEKDAY in langinfo.h], wx_cv_have_nl_time_first_weekday, [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #define _GNU_SOURCE #include ], [ _NL_TIME_FIRST_WEEKDAY; - ], + ])], [ wx_cv_have_nl_time_first_weekday=yes ], @@ -5706,7 +5706,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then wx_cv_type_getsockname3, [ AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5714,7 +5714,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then [ socklen_t len; getsockname(0, 0, &len); - ], + ])], wx_cv_type_getsockname3=socklen_t, [ dnl the compiler will compile the version with size_t @@ -5728,7 +5728,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then CFLAGS="-Werror $CFLAGS" fi - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5736,9 +5736,9 @@ if test "$wxUSE_SOCKETS" = "yes" ; then [ size_t len; getsockname(0, 0, &len); - ], + ])], wx_cv_type_getsockname3=size_t, - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5746,7 +5746,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then [ int len; getsockname(0, 0, &len); - ], + ])], wx_cv_type_getsockname3=int, wx_cv_type_getsockname3=unknown ) @@ -5774,7 +5774,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then dnl converting between incompatible pointer types in C. dnl So this test needs to be done in C++ mode. AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5782,10 +5782,10 @@ if test "$wxUSE_SOCKETS" = "yes" ; then [ socklen_t len; getsockopt(0, 0, 0, 0, &len); - ], + ])], wx_cv_type_getsockopt5=socklen_t, [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5793,9 +5793,9 @@ if test "$wxUSE_SOCKETS" = "yes" ; then [ size_t len; getsockopt(0, 0, 0, 0, &len); - ], + ])], wx_cv_type_getsockopt5=size_t, - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5803,7 +5803,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then [ int len; getsockopt(0, 0, 0, 0, &len); - ], + ])], wx_cv_type_getsockopt5=int, wx_cv_type_getsockopt5=unknown ) @@ -5828,7 +5828,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then [whether we have sockaddr_in6], [wx_cv_type_sockaddr_in6], [ - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [ #include #include @@ -5836,7 +5836,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then ], [ struct sockaddr_in6 sa6; - ], + ])], wx_cv_type_sockaddr_in6=yes, wx_cv_type_sockaddr_in6=no ) @@ -7034,7 +7034,7 @@ if test "$USE_WIN32" = 1 ; then dnl we need just the header, not the library, as we load the dnl DLL dynamically anyhow during run-time AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include #include ], [ @@ -7044,7 +7044,7 @@ if test "$USE_WIN32" = 1 ; then #if API_VERSION_NUMBER < 9 #error API_VERSION_NUMBER at least 9 required. #endif - ], + ])], wx_cv_lib_debughlp=yes, wx_cv_lib_debughlp=no ) @@ -7116,12 +7116,12 @@ if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then dnl we need just the header, not the library, as we load the dnl GDI+ DLL dynamically anyhow during run-time AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include #include ], [ using namespace Gdiplus; - ], + ])], wx_cv_lib_gdiplus=yes, wx_cv_lib_gdiplus=no ) @@ -7136,14 +7136,14 @@ if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then [ dnl same as above, we need to test only for the headers AC_LANG_PUSH(C++) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include #include #include ], [ ID2D1Factory* factory = NULL; - ], + ])], wx_cv_lib_direct2d=yes, wx_cv_lib_direct2d=no ) @@ -7244,7 +7244,7 @@ if test "$wxUSE_MEDIACTRL" = "yes" -o "$wxUSE_MEDIACTRL" = "auto"; then old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-x objective-c++ $CPPFLAGS" AC_MSG_CHECKING([if AVKit is available]) - AC_TRY_COMPILE( + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include "AvailabilityMacros.h"], [ #if defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 @@ -7252,7 +7252,7 @@ if test "$wxUSE_MEDIACTRL" = "yes" -o "$wxUSE_MEDIACTRL" = "auto"; then #else choke me #endif - ], + ])], [GST_LIBS="$GST_LIBS -weak_framework AVKit"; AC_MSG_RESULT(yes)], AC_MSG_RESULT(no) )