2 dnl Non-failing checks for functions, headers, libraries, etc go here
5 dnl ====================================================================
7 dnl ====================================================================
9 AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = "xyes")
11 CAIRO_CHECK_NATIVE_ATOMIC_PRIMITIVES
12 CAIRO_CHECK_ATOMIC_OP_NEEDS_MEMORY_BARRIER
14 AC_MSG_CHECKING([for native Win32])
23 AC_MSG_RESULT([$cairo_os_win32])
24 AM_CONDITIONAL(OS_WIN32, test "$cairo_os_win32" = "yes")
26 AC_MSG_CHECKING([for Sun Solaris (non-POSIX ctime_r)])
29 CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
30 solaris_posix_pthread=yes
33 solaris_posix_pthread=no
36 AC_MSG_RESULT([$solaris_posix_pthread])
38 dnl ====================================================================
40 dnl ====================================================================
45 AC_CHECK_LIB(rt, sched_yield, [RT_LIBS=-lrt], [RT_LIBS=])
46 CAIROPERF_LIBS=$RT_LIBS
47 AC_SUBST(CAIROPERF_LIBS)
49 dnl ====================================================================
50 dnl Header/function checks
51 dnl ====================================================================
53 dnl Checks for precise integer types
54 AC_CHECK_HEADERS([stdint.h inttypes.h sys/int_types.h])
55 AC_CHECK_TYPES([uint64_t, uint128_t])
57 dnl Check for socket support for any2ppm daemon
58 AC_CHECK_HEADERS([fcntl.h unistd.h signal.h sys/stat.h sys/socket.h sys/poll.h sys/un.h])
60 dnl check for CPU affinity support
61 AC_CHECK_HEADERS([sched.h],
62 [AC_CHECK_FUNCS([sched_getaffinity])])
64 dnl check for GNU-extensions to fenv
65 AC_CHECK_HEADER(fenv.h,
66 [AC_CHECK_FUNCS(feenableexcept fedisableexcept)])
68 dnl check for misc headers and functions
69 AC_CHECK_HEADERS([libgen.h byteswap.h signal.h setjmp.h])
70 AC_CHECK_FUNCS([vasnprintf link ctime_r drand48 flockfile])
72 dnl check for win32 headers (this detects mingw as well)
73 AC_CHECK_HEADERS([windows.h], have_windows=yes, have_windows=no)