test-autotools-static/configure.ac

46 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

2015-01-26 21:17:24 +01:00
AC_PREREQ([2.69])
2020-06-15 00:11:36 +02:00
AC_INIT([test_automake_static], [0.9.1], [https://github.com/valicek1])
2015-02-07 21:02:22 +01:00
AC_CONFIG_AUX_DIR([build-aux])
2015-01-28 23:05:38 +01:00
AM_INIT_AUTOMAKE([foreign subdir-objects]) # Does not require NEWS, COPYING, AUTHORS, ChangeLog or README
2015-01-28 22:40:18 +01:00
2020-06-15 00:11:36 +02:00
AM_SILENT_RULES([yes]) # silent rules, for make -s use just [] as arg
2015-01-28 22:40:18 +01:00
2020-06-15 00:11:36 +02:00
AC_CONFIG_SRCDIR([src/main.c]) # main src dir
2015-06-23 19:17:24 +02:00
AC_CONFIG_HEADERS([config.h]) # use config.h instead of passing -D in the command line
AC_CONFIG_MACRO_DIR([m4])
2015-01-26 21:17:24 +01:00
2020-06-15 00:11:36 +02:00
AC_LANG([C]) # use C
2015-01-28 22:22:23 +01:00
2020-06-15 00:11:36 +02:00
AC_PROG_CC # Checks for programs
AC_PROG_CC_C99 # C99 standard
2015-01-26 21:17:24 +01:00
AC_PROG_INSTALL
2020-06-15 00:11:36 +02:00
AC_PROG_CC_C_O # Need to have per product flags myexecutable_CFLAG
LT_INIT([disable-shared])
AC_SUBST(LIBTOOL_DEPS)
AC_LTDL_DLLIB
PKG_INSTALLDIR
2015-01-26 21:17:24 +01:00
# Checks for header files.
2015-03-08 11:03:40 +01:00
AC_HEADER_ASSERT # ./configure --disable-assert to define NDEBUG
2015-01-28 22:22:23 +01:00
AC_CHECK_HEADER([stdlib.h])
2020-06-15 00:11:36 +02:00
AC_ARG_ENABLE([myerror],
AS_HELP_STRING([--enable-myerror],[enable error]),
[enable_myerror=yes],[enable_myerror=${enableval}])
2015-03-08 10:52:22 +01:00
2020-06-15 00:11:36 +02:00
if test "x${enable_myerror}" == "xyes"; then
AC_DEFINE([MYERROR], 1, [myerroris enabled])
2015-03-08 10:52:22 +01:00
AC_MSG_WARN([
-----------------------------------------------------------------------------------
2020-06-15 00:11:36 +02:00
Results won't be real!
2015-03-08 10:52:22 +01:00
-----------------------------------------------------------------------------------
])
fi
2020-06-15 00:11:36 +02:00
AC_CONFIG_FILES([Makefile libtest.pc])
2015-02-07 21:02:22 +01:00
AC_REQUIRE_AUX_FILE([tap-driver.sh])
2015-06-24 22:49:26 +02:00
AX_VALGRIND_CHECK # http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html - make check-valgrind
2015-06-24 22:51:01 +02:00
AX_CODE_COVERAGE # http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html#ax_code_coverage - make check-code-coverage generates coverage report
2015-01-26 21:17:24 +01:00
AC_OUTPUT