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