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