1 m4_define([SUBUNIT_MAJOR_VERSION], [0])
2 m4_define([SUBUNIT_MINOR_VERSION], [0])
3 m4_define([SUBUNIT_MICRO_VERSION], [6])
4 m4_define([SUBUNIT_VERSION],
5 m4_defn([SUBUNIT_MAJOR_VERSION]).m4_defn([SUBUNIT_MINOR_VERSION]).m4_defn([SUBUNIT_MICRO_VERSION]))
7 AC_INIT([subunit], [SUBUNIT_VERSION], [subunit-dev@lists.launchpad.net])
8 AC_CONFIG_SRCDIR([c/lib/child.c])
9 AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
10 AC_CONFIG_MACRO_DIR([m4])
11 [SUBUNIT_MAJOR_VERSION]=SUBUNIT_MAJOR_VERSION
12 [SUBUNIT_MINOR_VERSION]=SUBUNIT_MINOR_VERSION
13 [SUBUNIT_MICRO_VERSION]=SUBUNIT_MICRO_VERSION
14 [SUBUNIT_VERSION]=SUBUNIT_VERSION
15 AC_SUBST([SUBUNIT_MAJOR_VERSION])
16 AC_SUBST([SUBUNIT_MINOR_VERSION])
17 AC_SUBST([SUBUNIT_MICRO_VERSION])
18 AC_SUBST([SUBUNIT_VERSION])
19 AC_USE_SYSTEM_EXTENSIONS
28 AS_IF([test "$GCC" = "yes"],
30 SUBUNIT_CFLAGS="-Wall -Werror -Wextra -Wstrict-prototypes "
31 SUBUNIT_CFLAGS="$SUBUNIT_CFLAGS -Wmissing-prototypes -Wwrite-strings "
32 SUBUNIT_CFLAGS="$SUBUNIT_CFLAGS -Wno-variadic-macros "
33 SUBUNIT_CXXFLAGS="-Wall -Werror -Wextra -Wwrite-strings -Wno-variadic-macros"
36 AM_CFLAGS="$SUBUNIT_CFLAGS -I\$(top_srcdir)/c/include"
37 AM_CXXFLAGS="$SUBUNIT_CXXFLAGS -I\$(top_srcdir)/c/include"
41 # Checks for libraries.
43 # Checks for header files.
44 AC_CHECK_HEADERS([stdlib.h])
46 # Checks for typedefs, structures, and compiler characteristics.
53 AC_CHECK_SIZEOF(int, 4)
54 AC_CHECK_SIZEOF(short, 2)
55 AC_CHECK_SIZEOF(long, 4)
57 # Checks for library functions.
61 # Easier memory management.
63 PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
65 PKG_CHECK_MODULES([CPPUNIT], [cppunit])
68 AC_CONFIG_HEADERS([config.h])
70 AC_CONFIG_FILES([libsubunit.pc