diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2021-12-30 18:33:02 +0100 |
---|---|---|
committer | Martijn van Beurden <mvanb1@gmail.com> | 2022-04-15 09:36:15 +0200 |
commit | d94a43d5c3a6203f6adbbc937424a4d9549eaf05 (patch) | |
tree | cc6b9ddee6a5fbe937497dbb5fba454f8fbabbda /m4 | |
parent | 144075a114d308545aee573d0dbaf93144fe7c52 (diff) | |
download | flac-d94a43d5c3a6203f6adbbc937424a4d9549eaf05.tar.gz |
Update configure.ac and m4 files with autoupdate 2.60
Starting with autoconf 2.70, obsolescence warnings are output by
default. To keep the script as compatible as possible, I build
autoconf 2.60 and ran the autoupdate that came with it on
configure.ac and all m4 files.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/add_cflags.m4 | 11 | ||||
-rw-r--r-- | m4/add_cxxflags.m4 | 11 | ||||
-rw-r--r-- | m4/bswap.m4 | 12 | ||||
-rw-r--r-- | m4/clang.m4 | 11 | ||||
-rw-r--r-- | m4/endian.m4 | 42 | ||||
-rw-r--r-- | m4/lib-prefix.m4 | 2 | ||||
-rw-r--r-- | m4/ogg.m4 | 20 | ||||
-rw-r--r-- | m4/really_gcc.m4 | 11 | ||||
-rw-r--r-- | m4/stack_protect.m4 | 22 |
9 files changed, 55 insertions, 87 deletions
diff --git a/m4/add_cflags.m4 b/m4/add_cflags.m4 index 08f4a409..d9b633c7 100644 --- a/m4/add_cflags.m4 +++ b/m4/add_cflags.m4 @@ -6,13 +6,10 @@ AC_DEFUN([XIPH_ADD_CFLAGS], [AC_MSG_CHECKING([if $CC accepts $1]) ac_add_cflags__old_cflags="$CFLAGS" CFLAGS="$1" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> - ], - [puts("Hello, World!"); return 0;], - AC_MSG_RESULT([yes]) - CFLAGS="$ac_add_cflags__old_cflags $1", - AC_MSG_RESULT([no]) + ]], [[puts("Hello, World!"); return 0;]])],[AC_MSG_RESULT(yes) + CFLAGS="$ac_add_cflags__old_cflags $1"],[AC_MSG_RESULT(no) CFLAGS="$ac_add_cflags__old_cflags" - ) + ]) ])# XIPH_ADD_CFLAGS diff --git a/m4/add_cxxflags.m4 b/m4/add_cxxflags.m4 index 8197dc2d..b76e710f 100644 --- a/m4/add_cxxflags.m4 +++ b/m4/add_cxxflags.m4 @@ -7,13 +7,10 @@ AC_DEFUN([XIPH_ADD_CXXFLAGS], AC_LANG_ASSERT([C++]) ac_add_cxxflags__old_cxxflags="$CXXFLAGS" CXXFLAGS="$1" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <cstdio> - ], - [puts("Hello, World!"); return 0;], - AC_MSG_RESULT([yes]) - CXXFLAGS="$ac_add_cxxflags__old_cxxflags $1", - AC_MSG_RESULT([no]) + ]], [[puts("Hello, World!"); return 0;]])],[AC_MSG_RESULT(yes) + CXXFLAGS="$ac_add_cxxflags__old_cxxflags $1"],[AC_MSG_RESULT(no) CXXFLAGS="$ac_add_cxxflags__old_cxxflags" - ) + ]) ])# XIPH_ADD_CXXFLAGS diff --git a/m4/bswap.m4 b/m4/bswap.m4 index f504dcb7..9984f9e0 100644 --- a/m4/bswap.m4 +++ b/m4/bswap.m4 @@ -43,11 +43,9 @@ AC_DEFUN([XIPH_C_BSWAP32], ac_cv_c_bswap32=no HAVE_BSWAP32=0 - [AC_TRY_LINK([], - return __builtin_bswap32 (0) ;, - ac_cv_c_bswap32=yes + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return __builtin_bswap32 (0) ;]])],[ac_cv_c_bswap32=yes HAVE_BSWAP32=1 - )] + ],[])] AC_DEFINE_UNQUOTED(HAVE_BSWAP32, ${HAVE_BSWAP32}, [Compiler has the __builtin_bswap32 intrinsic]) @@ -70,11 +68,9 @@ AC_DEFUN([XIPH_C_BSWAP16], ac_cv_c_bswap16=no HAVE_BSWAP16=0 - [AC_TRY_LINK([], - return __builtin_bswap16 (0) ;, - ac_cv_c_bswap16=yes + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return __builtin_bswap16 (0) ;]])],[ac_cv_c_bswap16=yes HAVE_BSWAP16=1 - )] + ],[])] AC_DEFINE_UNQUOTED(HAVE_BSWAP16, ${HAVE_BSWAP16}, [Compiler has the __builtin_bswap16 intrinsic]) diff --git a/m4/clang.m4 b/m4/clang.m4 index 036f0e68..11326a43 100644 --- a/m4/clang.m4 +++ b/m4/clang.m4 @@ -16,16 +16,13 @@ AC_DEFUN([XIPH_C_COMPILER_IS_CLANG], [AC_CACHE_CHECK(whether we are using the CLANG C compiler, xiph_cv_c_compiler_clang, [ AC_LANG_ASSERT(C) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> - ], - [ + ]], [[ #ifndef __clang__ This is not clang! #endif - ], - xiph_cv_c_compiler_clang=yes, - xiph_cv_c_compiler_clang=no - ]) + ]])],[xiph_cv_c_compiler_clang=yes],[xiph_cv_c_compiler_clang=no + ])] )] ) diff --git a/m4/endian.m4 b/m4/endian.m4 index 330a17fc..8329787f 100644 --- a/m4/endian.m4 +++ b/m4/endian.m4 @@ -36,7 +36,7 @@ dnl @author Erik de Castro Lopo <erikd@mega-nerd.com> dnl dnl Majority written from scratch to replace the standard autoconf macro dnl AC_C_BIGENDIAN. Only part remaining from the original is the invocation -dnl of the AC_TRY_RUN macro. +dnl of the AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[]) macro. dnl dnl Find endian-ness in the following way: dnl 1) Look in <endian.h>. @@ -55,37 +55,33 @@ if test x$ac_cv_header_endian_h = xyes ; then # First try <endian.h> which should set BYTE_ORDER. - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <endian.h> #if BYTE_ORDER != LITTLE_ENDIAN not big endian #endif - ], return 0 ;, - ac_cv_c_byte_order=little - )] + ]], [[return 0 ;]])],[ac_cv_c_byte_order=little + ],[])] - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <endian.h> #if BYTE_ORDER != BIG_ENDIAN not big endian #endif - ], return 0 ;, - ac_cv_c_byte_order=big - )] + ]], [[return 0 ;]])],[ac_cv_c_byte_order=big + ],[])] fi if test $ac_cv_c_byte_order = unknown ; then - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> #include <sys/param.h> #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif - ], return 0 ;, - - [AC_TRY_LINK([ + ]], [[return 0 ;]])],[_au_m4_changequote([,])AC_TRY_LINK([ #include <sys/types.h> #include <sys/param.h> #if BYTE_ORDER != LITTLE_ENDIAN @@ -93,9 +89,9 @@ if test $ac_cv_c_byte_order = unknown ; then #endif ], return 0 ;, ac_cv_c_byte_order=little - )] + ) - [AC_TRY_LINK([ + _au_m4_changequote([,])AC_TRY_LINK([ #include <sys/types.h> #include <sys/param.h> #if BYTE_ORDER != LITTLE_ENDIAN @@ -103,9 +99,9 @@ if test $ac_cv_c_byte_order = unknown ; then #endif ], return 0 ;, ac_cv_c_byte_order=little - )] + ) - )] + ],[])] fi @@ -126,8 +122,7 @@ if test $ac_cv_c_byte_order = unknown ; then esac ] else - AC_TRY_RUN( - [[ + AC_RUN_IFELSE([AC_LANG_SOURCE([[[ int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union @@ -137,11 +132,9 @@ if test $ac_cv_c_byte_order = unknown ; then u.l = 1 ; return (u.c [sizeof (long) - 1] == 1); } - ]], , ac_cv_c_byte_order=big, - ) + ]]])],[],[ac_cv_c_byte_order=big],[]) - AC_TRY_RUN( - [[int main (void) + AC_RUN_IFELSE([AC_LANG_SOURCE([[[int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union { long l ; @@ -149,8 +142,7 @@ if test $ac_cv_c_byte_order = unknown ; then } u ; u.l = 1 ; return (u.c [0] == 1); - }]], , ac_cv_c_byte_order=little, - ) + }]]])],[],[ac_cv_c_byte_order=little],[]) fi fi diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 007aa053..51687d36 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -9,7 +9,7 @@ dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. -ifdef([AC_HELP_STRING], +ifdef([AS_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) @@ -9,10 +9,10 @@ AC_DEFUN([XIPH_PATH_OGG], [dnl dnl Get the cflags and libraries dnl -AC_ARG_WITH(ogg,AC_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="") -AC_ARG_WITH(ogg-libraries,AC_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="") -AC_ARG_WITH(ogg-includes,AC_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="") -AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes) +AC_ARG_WITH(ogg,AS_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="") +AC_ARG_WITH(ogg-libraries,AS_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="") +AC_ARG_WITH(ogg-includes,AS_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="") +AC_ARG_ENABLE(oggtest,AS_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes) if test "x$ogg_libraries" != "x" ; then OGG_LIBS="-L$ogg_libraries" @@ -56,7 +56,7 @@ dnl dnl Now check if the installed Ogg is sufficiently new. dnl rm -f conf.oggtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -68,7 +68,7 @@ int main () return 0; } -],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_ogg=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -87,11 +87,10 @@ int main () echo "*** Could not run Ogg test program, checking why..." CFLAGS="$CFLAGS $OGG_CFLAGS" LIBS="$LIBS $OGG_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <ogg/ogg.h> -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding Ogg or finding the wrong" echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -99,8 +98,7 @@ int main () echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occurred. This usually means Ogg was incorrectly installed" echo "*** or that you have moved Ogg since it was installed." ]) CFLAGS="$ac_save_CFLAGS" diff --git a/m4/really_gcc.m4 b/m4/really_gcc.m4 index cba53ab3..8bc94d5e 100644 --- a/m4/really_gcc.m4 +++ b/m4/really_gcc.m4 @@ -17,16 +17,13 @@ dnl AC_DEFUN([XIPH_GCC_REALLY_IS_GCC], [ AC_LANG_ASSERT(C) if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> - ], - [ + ]], [[ #ifdef __clang__ This is clang! #endif - ], - ac_cv_c_compiler_gnu=yes, - ac_cv_c_compiler_gnu=no - ) + ]])],[ac_cv_c_compiler_gnu=yes],[ac_cv_c_compiler_gnu=no + ]) fi ]) diff --git a/m4/stack_protect.m4 b/m4/stack_protect.m4 index d39f4190..38181a18 100644 --- a/m4/stack_protect.m4 +++ b/m4/stack_protect.m4 @@ -43,15 +43,12 @@ AC_DEFUN([XIPH_GCC_STACK_PROTECTOR], xiph_stack_check_old_cflags="$CFLAGS" SSP_FLAGS="-fstack-protector-strong" CFLAGS=$SSP_FLAGS - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> - ], - [puts("Hello, World!"); return 0;], - AC_MSG_RESULT([yes]) - CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS", - AC_MSG_RESULT([no]) + ]], [[puts("Hello, World!"); return 0;]])],[AC_MSG_RESULT(yes) + CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS"],[AC_MSG_RESULT(no) CFLAGS="$xiph_stack_check_old_cflags" - ) + ]) ])# XIPH_GCC_STACK_PROTECTOR AC_DEFUN([XIPH_GXX_STACK_PROTECTOR], @@ -60,14 +57,11 @@ AC_DEFUN([XIPH_GXX_STACK_PROTECTOR], xiph_stack_check_old_cflags="$CFLAGS" SSP_FLAGS="-fstack-protector-strong" CFLAGS=$SSP_FLAGS - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <cstdio> - ], - [puts("Hello, World!"); return 0;], - AC_MSG_RESULT([yes]) - CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS", - AC_MSG_RESULT([no]) + ]], [[puts("Hello, World!"); return 0;]])],[AC_MSG_RESULT(yes) + CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS"],[AC_MSG_RESULT(no) CFLAGS="$xiph_stack_check_old_cflags" - ) + ]) AC_LANG_POP([C++]) ])# XIPH_GXX_STACK_PROTECTOR |