Merge branch 'autoconf-obsolete-macros' into 'master'

m4macros: replace obsolete macros AC_TRY_RUN and AC_TRY_LINK in glib-2.0.m4

See merge request GNOME/glib!1899
This commit is contained in:
Philip Withnall 2021-01-26 13:16:42 +00:00
commit 4dc7603b3e

View File

@ -94,7 +94,7 @@ dnl Now check if the installed GLib is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent)
dnl
rm -f conf.glibtest
AC_TRY_RUN([
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
@ -162,7 +162,7 @@ main (void)
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
]])],[],[no_glib=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@ -184,10 +184,10 @@ main (void)
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
]], [[ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ]])],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLib or finding the wrong"
echo "*** version of GLib. If it is not finding GLib, you'll need to set your"