'include' dir must exists
[lttng-trace.git] / configure.ac
1 # SPDX-License-Identifier: MIT
2 #
3 # Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
4 #
5
6 AC_PREREQ(2.69)
7 AC_INIT([lttng-trace],[0.1.0-pre],[mathieu dot desnoyers at efficios dot com], [], [https://github.com/compudj/lttng-trace/])
8
9 AC_CONFIG_HEADERS([include/config.h])
10 AC_CONFIG_AUX_DIR([config])
11 AC_CONFIG_MACRO_DIR([m4])
12
13 AC_CANONICAL_TARGET
14 AC_CANONICAL_HOST
15
16 AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip nostdinc -Wall -Wno-portability -Werror])
17 AM_MAINTAINER_MODE([enable])
18
19 # Enable silent rules by default
20 AM_SILENT_RULES([yes])
21
22 # Checks for C compiler
23 AC_USE_SYSTEM_EXTENSIONS
24 AC_PROG_CC
25 # AC_PROG_CC_STDC was merged in AC_PROG_CC in autoconf 2.70
26 m4_version_prereq([2.70], [], [AC_PROG_CC_STDC])
27 AC_PROG_CXX
28
29 # Checks for programs.
30 AC_PROG_AWK
31 AC_PROG_MAKE_SET
32
33 LT_INIT
34
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_C_INLINE
37 AC_TYPE_INT32_T
38 AC_TYPE_INT64_T
39 AC_TYPE_OFF_T
40 AC_TYPE_SIZE_T
41 AC_TYPE_UINT32_T
42 AC_TYPE_UINT64_T
43
44 AX_C___ATTRIBUTE__
45 AS_IF([test "x$ax_cv___attribute__" = "xyes"],
46 [:],
47 [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])])
48
49 AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
50
51 AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
52
53 # Checks for library functions.
54 AC_FUNC_MMAP
55 AC_FUNC_FORK
56 AC_CHECK_FUNCS([ \
57 memset \
58 strerror \
59 ])
60
61 # AC_FUNC_MALLOC causes problems when cross-compiling.
62 #AC_FUNC_MALLOC
63
64 # Check for headers
65 AC_HEADER_STDBOOL
66 AC_CHECK_HEADERS([ \
67 limits.h \
68 stddef.h \
69 ])
70
71 AM_CPPFLAGS="-include config.h"
72 AC_SUBST(AM_CPPFLAGS)
73
74 AM_CFLAGS="-Wall -Wextra $AM_CFLAGS"
75 AC_SUBST(AM_CFLAGS)
76
77 AC_CONFIG_FILES([
78 Makefile
79 src/Makefile
80 ])
81
82 AC_OUTPUT
83
84 #
85 # Mini-report on what will be built.
86 #
87
88 PPRINT_INIT
89 PPRINT_SET_INDENT(1)
90 PPRINT_SET_TS(38)
91
92 AS_ECHO
93 AS_ECHO("${PPRINT_COLOR_BLDBLU}lttng-trace $PACKAGE_VERSION${PPRINT_COLOR_RST}")
94 AS_ECHO
95
96 PPRINT_SUBTITLE([Features])
97
98 PPRINT_PROP_STRING([Target architecture], $host_cpu)
99
100 report_bindir="`eval eval echo $bindir`"
101 report_libdir="`eval eval echo $libdir`"
102
103 # Print the bindir and libdir this `make install' will install into.
104 AS_ECHO
105 PPRINT_SUBTITLE([Install directories])
106 PPRINT_PROP_STRING([Binaries], [$report_bindir])
107 PPRINT_PROP_STRING([Libraries], [$report_libdir])
This page took 0.030861 seconds and 4 git commands to generate.