2015-01-26 21:17:24 +01:00
|
|
|
AC_PREREQ([2.69])
|
2020-06-14 22:23:20 +02:00
|
|
|
AC_INIT([test_automake_shared], [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-14 22:23:20 +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-14 22:23:20 +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
|
2015-06-24 22:18:18 +02:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2015-01-26 21:17:24 +01:00
|
|
|
|
2020-06-14 22:23:20 +02:00
|
|
|
AC_LANG([C]) # use C
|
2015-01-28 22:22:23 +01:00
|
|
|
|
2020-06-14 22:23:20 +02:00
|
|
|
AC_PROG_CC # Checks for programs
|
|
|
|
AC_PROG_CC_C99 # C99 standard
|
2015-02-02 13:24:20 +01:00
|
|
|
|
2015-01-26 21:17:24 +01:00
|
|
|
AC_PROG_INSTALL
|
2020-06-14 22:23:20 +02:00
|
|
|
AC_PROG_CC_C_O # Need to have per product flags myexecutable_CFLAG
|
|
|
|
AC_PROG_LIBTOOL # libtool init
|
2020-06-14 23:54:05 +02:00
|
|
|
PKG_INSTALLDIR
|
2015-02-06 17:51:56 +01:00
|
|
|
|
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-14 22:23:20 +02:00
|
|
|
AC_ARG_ENABLE([myerror],
|
|
|
|
AS_HELP_STRING([--enable-myerror],[enable error]),
|
|
|
|
[enable_myerror=yes],[enable_myerror=${enableval}])
|
2015-01-26 21:17:24 +01:00
|
|
|
|
2020-06-14 22:23:20 +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-14 22:23:20 +02:00
|
|
|
Results won't be real!
|
2015-03-08 10:52:22 +01:00
|
|
|
-----------------------------------------------------------------------------------
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
2020-06-14 23:54:05 +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
|