Release 0.0.13.
[third_party/subunit] / configure.ac
1 m4_define([SUBUNIT_MAJOR_VERSION], [0])
2 m4_define([SUBUNIT_MINOR_VERSION], [0])
3 m4_define([SUBUNIT_MICRO_VERSION], [13])
4 m4_define([SUBUNIT_VERSION],
5 m4_defn([SUBUNIT_MAJOR_VERSION]).m4_defn([SUBUNIT_MINOR_VERSION]).m4_defn([SUBUNIT_MICRO_VERSION]))
6 AC_PREREQ([2.59])
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
20 AC_PROG_CC
21 AC_PROG_CXX
22 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
23 AM_PROG_CC_C_O
24 AC_PROG_INSTALL
25 AC_PROG_LN_S
26 AC_PROG_LIBTOOL
27 AM_PATH_PYTHON
28
29 AS_IF([test "$GCC" = "yes"],
30       [
31   SUBUNIT_CFLAGS="-Wall -Werror -Wextra -Wstrict-prototypes "
32   SUBUNIT_CFLAGS="$SUBUNIT_CFLAGS -Wmissing-prototypes -Wwrite-strings "
33   SUBUNIT_CFLAGS="$SUBUNIT_CFLAGS -Wno-variadic-macros "
34   SUBUNIT_CXXFLAGS="-Wall -Werror -Wextra -Wwrite-strings -Wno-variadic-macros"
35       ])
36
37 AM_CFLAGS="$SUBUNIT_CFLAGS -I\$(top_srcdir)/c/include"
38 AM_CXXFLAGS="$SUBUNIT_CXXFLAGS -I\$(top_srcdir)/c/include"
39 AC_SUBST(AM_CFLAGS)
40 AC_SUBST(AM_CXXFLAGS)
41
42 # Checks for libraries.
43
44 # Checks for header files.
45 AC_CHECK_HEADERS([stdlib.h])
46
47 # Checks for typedefs, structures, and compiler characteristics.
48 AC_C_CONST
49 AC_TYPE_PID_T
50 AC_TYPE_SIZE_T
51 AC_HEADER_TIME
52 AC_STRUCT_TM
53
54 AC_CHECK_SIZEOF(int, 4)
55 AC_CHECK_SIZEOF(short, 2)
56 AC_CHECK_SIZEOF(long, 4)
57
58 # Checks for library functions.
59 AC_FUNC_MALLOC
60 AC_FUNC_REALLOC
61
62 # Easier memory management.
63 # C unit testing.
64 PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
65 # C++ unit testing.
66 PKG_CHECK_MODULES([CPPUNIT], [cppunit])
67
68 # Output files
69 AC_CONFIG_HEADERS([config.h])
70
71 AC_CONFIG_FILES([libsubunit.pc
72                  libcppunit_subunit.pc
73                  Makefile
74                  perl/Makefile.PL
75                  ])
76 AC_OUTPUT