test-autotools-shared/configure.ac

44 lines
1.6 KiB
Plaintext

AC_PREREQ([2.69])
AC_INIT([test_automake_shared], [0.9.1], [https://github.com/valicek1])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign subdir-objects]) # Does not require NEWS, COPYING, AUTHORS, ChangeLog or README
AM_SILENT_RULES([yes]) # silent rules, for make -s use just [] as arg
AC_CONFIG_SRCDIR([src/main.c]) # main src dir
AC_CONFIG_HEADERS([config.h]) # use config.h instead of passing -D in the command line
AC_CONFIG_MACRO_DIR([m4])
AC_LANG([C]) # use C
AC_PROG_CC # Checks for programs
AC_PROG_CC_C99 # C99 standard
AC_PROG_INSTALL
AC_PROG_CC_C_O # Need to have per product flags myexecutable_CFLAG
AC_PROG_LIBTOOL # libtool init
PKG_INSTALLDIR
# Checks for header files.
AC_HEADER_ASSERT # ./configure --disable-assert to define NDEBUG
AC_CHECK_HEADER([stdlib.h])
AC_ARG_ENABLE([myerror],
AS_HELP_STRING([--enable-myerror],[enable error]),
[enable_myerror=yes],[enable_myerror=${enableval}])
if test "x${enable_myerror}" == "xyes"; then
AC_DEFINE([MYERROR], 1, [myerroris enabled])
AC_MSG_WARN([
-----------------------------------------------------------------------------------
Results won't be real!
-----------------------------------------------------------------------------------
])
fi
AC_CONFIG_FILES([Makefile libtest.pc])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AX_VALGRIND_CHECK # http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html - make check-valgrind
AX_CODE_COVERAGE # http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html#ax_code_coverage - make check-code-coverage generates coverage report
AC_OUTPUT