2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([OpenCL ICD Loader], [1.4], [ocl-icd-devel@lists.forge.imag.fr], [ocl-icd])
6 AC_CONFIG_SRCDIR([ocl_icd_loader.c])
7 AC_CONFIG_AUX_DIR([build-aux])
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_MACRO_DIR([m4])
10 AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.9 tar-pax check-news color-tests parallel-tests])
11 AMX_SILENT_RULES([AM_DEFAULT_VERBOSITY=0])
12 LT_INIT([disable-static])
15 AC_SUBST([OPENCL_VERSION])
17 # Checks for programs.
22 # Checks for libraries.
23 AC_CHECK_LIB([dl], [dlopen])
25 # Checks for header files.
26 AC_CHECK_HEADERS([stdlib.h string.h])
28 # Checks for typedefs, structures, and compiler characteristics.
33 NO_DEPRECATED_DECLARATIONS_FLAGS=
34 AX_CHECK_COMPILER_FLAGS([-Wno-deprecated-declarations],
35 [NO_DEPRECATED_DECLARATIONS_FLAGS="-Wno-deprecated-declarations"])
36 AC_SUBST([NO_DEPRECATED_DECLARATIONS_FLAGS])
38 # Checks for library functions.
41 AC_CHECK_FUNCS([strstr])
44 AC_ARG_ENABLE([debug],
45 [AS_HELP_STRING([--disable-debug],
46 [remove debug and additionnal checks (default is included)])],
47 [use_debug=$enableval],
49 if test "x$use_debug" != xno ; then
50 AC_DEFINE([DEBUG_OCL_ICD], [1],
51 [Add DEBUG additionnal code])
54 # --enable-update-database
55 AC_ARG_ENABLE([update-database],
56 [AS_HELP_STRING([--enable-update-database],
57 [update the YAML database from the currently installed ICD Loader and OpenCL headers (root access required)])],
58 [update_database=$enableval],
60 AM_CONDITIONAL([UPDATE_DATABASE], [test x"$update_database" != xno])
62 # always use versionned symbols (check required for MacOSX)
63 AM_CONDITIONAL([USE_MAP], [true])