[cairo-commit] 2 commits - build/aclocal.cairo.m4 build/configure.ac.system configure.ac
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jan 21 16:39:17 UTC 2021
build/aclocal.cairo.m4 | 14 +++----
build/configure.ac.system | 86 +++++++++++++++++++++++++---------------------
configure.ac | 15 +++-----
3 files changed, 61 insertions(+), 54 deletions(-)
New commits:
commit 76aed3a5e32fac8b47d42eb040569277dfcc496d
Merge: d909a7392 f0873222e
Author: Uli Schlachter <psychon at znc.in>
Date: Thu Jan 21 16:39:15 2021 +0000
Merge branch 'fix-autoconf' into 'master'
Fix autoconf warnings for version 2.70
See merge request cairo/cairo!113
commit f0873222ef39441e59d00fb62285b9014f344f30
Author: Heiko Lewin <heiko.lewin at worldiety.de>
Date: Mon Jan 18 17:55:04 2021 +0100
Fix autoconf warnings for version 2.70
diff --git a/build/aclocal.cairo.m4 b/build/aclocal.cairo.m4
index 64c1a2e2f..9fa8f5ca3 100644
--- a/build/aclocal.cairo.m4
+++ b/build/aclocal.cairo.m4
@@ -100,7 +100,7 @@ AC_DEFUN([CAIRO_CC_TRY_LINK_WITH_ENV_SILENT],[dnl
_save_libs="$LIBS"
$1
AC_LINK_IFELSE(
- [AC_LANG_SOURCE([$_compile_program])],
+ [AC_LANG_SOURCE([[$_compile_program]])],
[cairo_cc_stderr=`test -f conftest.err && cat conftest.err`
cairo_cc_flag=yes],
[cairo_cc_stderr=`test -f conftest.err && cat conftest.err`
@@ -161,18 +161,18 @@ AC_DEFUN([CAIRO_CHECK_NATIVE_ATOMIC_PRIMITIVES],
[
cairo_cv_atomic_primitives="none"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }
int atomic_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap (&i, j, k); }
-], [],
- cairo_cv_atomic_primitives="gcc-legacy"
+]], [[]])],
+ [ cairo_cv_atomic_primitives="gcc-legacy" ], []
)
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
int atomic_add(int i) { return __atomic_fetch_add(&i, 1, __ATOMIC_SEQ_CST); }
int atomic_cmpxchg(int i, int j, int k) { return __atomic_compare_exchange_n(&i, &j, k, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
-], [],
- cairo_cv_atomic_primitives="cxx11"
+]], [[]])],
+ [ cairo_cv_atomic_primitives="cxx11" ], []
)
if test "x$cairo_cv_atomic_primitives" = "xnone"; then
diff --git a/build/configure.ac.system b/build/configure.ac.system
index 383f28d46..076dc8fa4 100644
--- a/build/configure.ac.system
+++ b/build/configure.ac.system
@@ -1,6 +1,6 @@
-dnl
+
dnl Non-failing checks for functions, headers, libraries, etc go here
-dnl
+
dnl ====================================================================
dnl Feature checks
@@ -50,7 +50,7 @@ dnl ====================================================================
dnl Library checks
dnl ====================================================================
-AC_CHECK_LIBM
+LT_LIB_M
LIBS="$LIBS $LIBM"
AC_CHECK_LIB(rt, sched_yield)
@@ -74,9 +74,7 @@ dnl ====================================================================
dnl check if we have a __builtin_return_address for the cairo-trace
dnl utility.
AC_MSG_CHECKING([for __builtin_return_address(0)])
-AC_TRY_COMPILE([],[__builtin_return_address(0);],
- [have_builtin_return_address=yes],
- [have_builtin_return_address=no])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[__builtin_return_address(0);]])],[have_builtin_return_address=yes],[have_builtin_return_address=no])
AC_MSG_RESULT($have_builtin_return_address)
if test "x$have_builtin_return_address" = "xyes"; then
AC_DEFINE(HAVE_BUILTIN_RETURN_ADDRESS, 1,
@@ -111,52 +109,62 @@ AC_CHECK_HEADERS([libgen.h byteswap.h signal.h setjmp.h fenv.h sys/wait.h])
AC_CHECK_FUNCS([ctime_r localtime_r gmtime_r drand48 flockfile funlockfile getline link strndup])
dnl Check if the runtime platform is a native Win32 host.
-AC_COMPILE_IFELSE([[
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([], [[
#ifdef _WIN32
choke me
-#endif]], [have_windows=no], [have_windows=yes])
+#endif
+]])], [have_windows=no], [have_windows=yes])
dnl Possible headers for mkdir
AC_CHECK_HEADERS([sys/stat.h io.h])
AC_CHECK_FUNC(mkdir,
- [AC_MSG_CHECKING([mkdir variant])
- mkdir_variant="unknown"
- save_CFLAGS="$CFLAGS"
- CFLAGS=$WARN_CFLAGS
- AC_TRY_COMPILE([
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_IO_H
-#include <io.h>
-#endif
- ],
- [mkdir ("hello.world", 0777)],
- mkdir_variant="mkdir(path, mode)",
- [AC_TRY_COMPILE([
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_IO_H
-#include <io.h>
-#endif
- ],
- [mkdir ("hello.world")],
- mkdir_variant="mkdir(path)")])
- AC_MSG_RESULT([$mkdir_variant])
- CFLAGS="$save_CFLAGS"
- if test "x$mkdir_variant" = "xmkdir(path, mode)"; then
+ [AC_MSG_CHECKING([mkdir variant])
+ mkdir_variant="unknown"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS=$WARN_CFLAGS
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM([[
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
+ #ifdef HAVE_IO_H
+ #include <io.h>
+ #endif
+ ]],
+ [[mkdir ("hello.world", 0777)]])
+ ],
+ [mkdir_variant="mkdir(path, mode)"],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
+ #ifdef HAVE_IO_H
+ #include <io.h>
+ #endif
+ ]],
+ [[mkdir ("hello.world")]])
+ ],
+ mkdir_variant="mkdir(path)")
+ ])
+
+ AC_MSG_RESULT($mkdir_variant)
+ CFLAGS="$save_CFLAGS"
+ if test "x$mkdir_variant" = "xmkdir(path, mode)"; then
AC_DEFINE(HAVE_MKDIR, 2,
[Define to non-zero if your system has mkdir, and to 2 if your version of mkdir requires a mode parameter])
- else
+ else
AC_DEFINE(HAVE_MKDIR, 1,
[Define to non-zero if your system has mkdir, and to 2 if your version of mkdir requires a mode parameter])
- fi])
+ fi
+ ])
dnl ===========================================================================
-dnl
+
dnl Test for the tools required for building one big test binary
-dnl
+
AC_CHECK_FUNCS(fork waitpid raise)
diff --git a/configure.ac b/configure.ac
index a0a06d109..7e05579f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.63])
CAIRO_PARSE_VERSION
AC_INIT([cairo],
[cairo_version_major.cairo_version_minor.cairo_version_micro],
- [https://bugs.freedesktop.org/enter_bug.cgi?product=cairo],
+ [https://gitlab.freedesktop.org/cairo/cairo/-/issues],
[cairo],
[https://cairographics.org/])
AC_CONFIG_AUX_DIR(build)
@@ -98,7 +98,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
if test "$ac_cv_header_sys_ipc_h" = "yes" -a "$ac_cv_header_sys_shm_h" = "yes"; then
AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -117,12 +117,11 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
shmdt (shmaddr);
return 0;
}
- ],
- AC_DEFINE(IPC_RMID_DEFERRED_RELEASE, 1,
- [Define to 1 if shared memory segments are released deferred.])
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(assuming no))
+ ]])],
+ [
+ AC_DEFINE(IPC_RMID_DEFERRED_RELEASE, 1, Define to 1 if shared memory segments are released deferred.)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)],[AC_MSG_RESULT(assuming no)])
fi
AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [],
More information about the cairo-commit
mailing list