From 31811f4b6c5a95de82e47ddf1f37739c3b2cfc58 Mon Sep 17 00:00:00 2001 From: Lyude Date: Wed, 21 Dec 2016 14:00:54 -0500 Subject: igt_core: add igt_constructor This is a simple macro for executing a block of code at the beginning of intel-gpu-tools, before any tests have been ran. Useful for initialization of global resources used in IGT libraries. Signed-off-by: Lyude Reviewed-by: Chris Wilson Changes since v1: - Add the line number into the name of the constructor function so that multiple constructors may be used per-file. --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index fa31a52e..411bfabf 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,7 @@ AC_CHECK_TYPES([sighandler_t],[],[],[AC_INCLUDES_DEFAULT #include ]) AC_CHECK_FUNCS([swapctl]) AC_CHECK_FUNCS([asprintf]) +AX_GCC_FUNC_ATTRIBUTE([constructor]) dnl Check for POSIX timers AC_CHECK_FUNCS(timer_create, [], [ -- cgit v1.2.3