From 34bf876678f87614ebe24d78c037601d9e01052e Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen <pere@debian.org> Date: Fri, 7 Mar 2025 15:20:04 +0100 Subject: [PATCH] Updated autotools setup to avoid warnings from autogen.sh. This avoid obsolete notation. Increase autoconf dependency to version 2.71. --- configure.ac | 7 +++---- m4/as-gcc-inline-assembly.m4 | 8 ++++---- m4/ogg.m4 | 26 ++++++++++++-------------- m4/vorbis.m4 | 12 +++++------- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index 2de197f6..ededa9e8 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ AM_MAINTAINER_MODE([enable]) dnl we use doc_DATA in doc/Makefile.am which requires autoconf >= 2.60 dnl to define docdir for us. -AC_PREREQ(2.60) +AC_PREREQ([2.71]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -63,8 +63,7 @@ AC_PROG_CPP CFLAGS="$cflags_save" AM_PROG_CC_C_O -AC_LIBTOOL_WIN32_DLL -LT_INIT +LT_INIT([win32-dll]) dnl Add parameters for aclocal AC_CONFIG_MACRO_DIR([m4]) @@ -327,7 +326,7 @@ AM_CONDITIONAL([CPU_arm], [test x$cpu_arm = xyes]) AM_CONDITIONAL([CPU_c64x], [test x$cpu_c64x = xyes]) # Test whenever ld supports -version-script -AC_PROG_LD +LT_PATH_LD AC_PROG_LD_GNU AC_MSG_CHECKING([how to control symbol export]) diff --git a/m4/as-gcc-inline-assembly.m4 b/m4/as-gcc-inline-assembly.m4 index 4437a9d0..440d58be 100644 --- a/m4/as-gcc-inline-assembly.m4 +++ b/m4/as-gcc-inline-assembly.m4 @@ -15,13 +15,13 @@ AC_DEFUN([AS_GCC_INLINE_ASSEMBLY], [ AC_MSG_CHECKING([if compiler supports gcc-style inline assembly]) - AC_TRY_COMPILE([], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif -__asm__ (""::) ], [flag_ok=yes], [flag_ok=no]) +__asm__ (""::)])],[flag_ok=yes],[flag_ok=no]) if test "X$flag_ok" = Xyes ; then $1 @@ -45,8 +45,8 @@ if AC_TRY_EVAL(ac_compile); then ifelse([$2], , :, [ $2 rm -rf conftest*]) else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD ac_ext=$ac_c_ext ifelse([$3], , , [ rm -rf conftest* $3 diff --git a/m4/ogg.m4 b/m4/ogg.m4 index db91a6d8..94e33b71 100644 --- a/m4/ogg.m4 +++ b/m4/ogg.m4 @@ -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" @@ -21,7 +21,7 @@ AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile elif test "x$ogg_prefix" != "x" ; then OGG_LIBS="-L$ogg_prefix/lib" elif test "x$prefix" != "xNONE" ; then - OGG_LIBS="-L$libdir" + OGG_LIBS="-L$prefix/lib" fi if test "x$ogg_prefix" != "xno" ; then @@ -35,7 +35,7 @@ AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile elif test "x$ogg_prefix" != "x" ; then OGG_CFLAGS="-I$ogg_prefix/include" elif test "x$prefix" != "xNONE"; then - OGG_CFLAGS="" + OGG_CFLAGS="-I$prefix/include" fi AC_MSG_CHECKING(for Ogg) @@ -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,9 +98,8 @@ 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 "*** exact error that occured. This usually means Ogg was incorrectly installed" + 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" LIBS="$ac_save_LIBS" diff --git a/m4/vorbis.m4 b/m4/vorbis.m4 index 69715a7d..8bfb5b27 100644 --- a/m4/vorbis.m4 +++ b/m4/vorbis.m4 @@ -49,7 +49,7 @@ dnl dnl Now check if the installed Vorbis is sufficiently new. dnl rm -f conf.vorbistest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -73,7 +73,7 @@ int main () return 0; } -],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +])],[],[no_vorbis=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -89,11 +89,10 @@ int main () echo "*** Could not run Vorbis test program, checking why..." CFLAGS="$CFLAGS $VORBIS_CFLAGS" LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include <stdio.h> #include <vorbis/codec.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 Vorbis or finding the wrong" echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -101,8 +100,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 occured. This usually means Vorbis was incorrectly installed" echo "*** or that you have moved Vorbis since it was installed." ]) CFLAGS="$ac_save_CFLAGS" -- GitLab