-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
49 lines (44 loc) · 1.02 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
AC_INIT([pz], [1.0], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign])
LT_INIT
AC_PROG_CC
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
opencl/Makefile
reference/Makefile
test/Makefile
samples/Makefile
])
#
# Linter, optional
#
AC_PATH_PROG([LINTER], [clang-tidy], [true])
AS_IF([test "x$LINTER" = xtrue],
[AC_MSG_WARN([We recommend clang-tidy for developing this package.])])
#
# Formatter, optional
#
AC_PATH_PROG([FORMATTER], [clang-format], [true])
AS_IF([test "x$LINTER" = xtrue],
[AC_MSG_WARN([We recommend clang-format for developing this package.])])
#
# Cflags -Wall -Wextra -std=c11
#
AC_LANG_CASE([C], [
saved_cflags="$CFLAGS"
AX_CHECK_COMPILE_FLAG([-std=gnu99], [
AX_APPEND_FLAG(-std=c11, [])
])
AX_CHECK_COMPILE_FLAG([-Wall], [
AX_APPEND_FLAG(-Wall, [])
])
AX_CHECK_COMPILE_FLAG([-Wextra], [
AX_APPEND_FLAG(-Wextra, [])
])
])
# TODO AC_SEARCH_LIB OpenCL
#AX_COMPILER_FLAGS()
AC_OUTPUT