1 # SPDX-License-Identifier: MIT
3 # Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
7 AC_INIT([librseq],[0.1.0-pre],[mathieu dot desnoyers at efficios dot com], [], [https://github.com/compudj/librseq/])
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])
13 AC_CONFIG_HEADERS([include/config.h])
14 AC_CONFIG_AUX_DIR([config])
15 AC_CONFIG_MACRO_DIR([m4])
20 AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip nostdinc])
21 AM_MAINTAINER_MODE([enable])
23 # Enable silent rules if available (Introduced in AM 1.11)
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
26 # Checks for C compiler
27 AC_USE_SYSTEM_EXTENSIONS
32 # Checks for programs.
38 # Checks for typedefs, structures, and compiler characteristics.
48 AS_IF([test "x$ax_cv___attribute__" = "xyes"],
50 [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])])
52 AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
54 AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
56 # Checks for library functions.
64 # AC_FUNC_MALLOC causes problems when cross-compiling.
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'.])
79 AM_CPPFLAGS="-include config.h"
82 AM_CFLAGS="-Wall -Wextra $AM_CFLAGS"
99 # Mini-report on what will be built.
107 AS_ECHO("${PPRINT_COLOR_BLDBLU}librseq $PACKAGE_VERSION${PPRINT_COLOR_RST}")
110 PPRINT_SUBTITLE([Features])
112 PPRINT_PROP_STRING([Target architecture], $host_cpu)
114 report_bindir="`eval eval echo $bindir`"
115 report_libdir="`eval eval echo $libdir`"
117 # Print the bindir and libdir this `make install' will install into.
119 PPRINT_SUBTITLE([Install directories])
120 PPRINT_PROP_STRING([Binaries], [$report_bindir])
121 PPRINT_PROP_STRING([Libraries], [$report_libdir])