From 8d76eb12d5223d0fc3ea65d8d97f1feda2fcc340 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 14 Jan 2022 16:08:02 +0100 Subject: Adding upstream version 0.1.1. Signed-off-by: Daniel Baumann --- configure.ac | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..8756aaa --- /dev/null +++ b/configure.ac @@ -0,0 +1,65 @@ +AC_PREREQ(2.61) +AC_INIT([tinyframe], [0.1.1], [todo@dns-oarc.net], [tinyframe], [https://github.com/DNS-OARC/tinyframe/issues]) +AC_SUBST([TINYFRAME_VERSION_MAJOR], [0000]) +AC_SUBST([TINYFRAME_VERSION_MINOR], [0001]) +AC_SUBST([TINYFRAME_VERSION_PATCH], [0001]) +AC_SUBST([TINYFRAME_LIBRARY_VERSION], [0:1:0]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) +AC_CONFIG_SRCDIR([src/tinyframe.c]) +AC_CONFIG_HEADER([src/config.h]) +AC_CONFIG_MACRO_DIR([m4]) + +# Checks for programs. +AC_PROG_CC +AM_PROG_CC_C_O +AC_CANONICAL_HOST +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) +LT_INIT + +# Check --enable-warn-all +AC_ARG_ENABLE([warn-all], [AS_HELP_STRING([--enable-warn-all], [Enable all compiler warnings])], [AX_CFLAGS_WARN_ALL()]) + +# Check --with-extra-cflags +AC_ARG_WITH([extra-cflags], [AS_HELP_STRING([--with-extra-cflags=CFLAGS], [Add extra CFLAGS])], [ + AC_MSG_NOTICE([appending extra CFLAGS... $withval]) + AS_VAR_APPEND(CFLAGS, [" $withval"]) +]) + +# Check --with-extra-ldflags +AC_ARG_WITH([extra-ldflags], [AS_HELP_STRING([--with-extra-ldflags=LDFLAGS], [Add extra LDFLAGS])], [ + AC_MSG_NOTICE([appending extra LDFLAGS... $withval]) + AS_VAR_APPEND(LDFLAGS, [" $withval"]) +]) + +# Check --enable-trace +AH_TEMPLATE([TINYFRAME_TRACE], [Defined if trace of Frame Streams is enabled]) +AC_ARG_ENABLE([trace], [AS_HELP_STRING([--enable-trace], [Enable trace output of Frame Streams])], [AC_DEFINE([TINYFRAME_TRACE])]) + +# Check --enable-gcov +AC_ARG_ENABLE([gcov], [AS_HELP_STRING([--enable-gcov], [Enable coverage testing])], [ + coverage_cflags="--coverage -g -O0 -fno-inline -fno-inline-small-functions -fno-default-inline" + AC_MSG_NOTICE([enabling coverage testing... $coverage_cflags]) + AS_VAR_APPEND(CFLAGS, [" $coverage_cflags"]) +]) +AM_CONDITIONAL([ENABLE_GCOV], [test "x$enable_gcov" != "xno"]) +AM_EXTRA_RECURSIVE_TARGETS([gcov]) + +# pkg-config +PKG_INSTALLDIR + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([endian.h sys/endian.h machine/endian.h]) + +# Checks for library functions. + +# Output Makefiles +AC_CONFIG_FILES([ + Makefile + libtinyframe.pc + src/Makefile + src/test/Makefile + src/tinyframe/version.h +]) +AC_OUTPUT -- cgit v1.2.3