manual: Generate section and sub-section numbers
[vala-gnome.git] / configure.ac
blob030957e463613b474f40bee3f87584c4c47f6c9a
1 AC_PREREQ([2.65])
2 AC_INIT([vala], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
3         [https://bugzilla.gnome.org/browse.cgi?product=vala],
4         [vala],
5         [https://wiki.gnome.org/Projects/Vala])
6 AC_CONFIG_SRCDIR([Makefile.am])
7 AC_CONFIG_AUX_DIR([build-aux])
8 AC_CONFIG_HEADERS(config.h)
9 AC_CONFIG_MACRO_DIR([m4])
10 AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip])
11 AM_MAINTAINER_MODE([enable])
13 PACKAGE_SUFFIX=-0.36
15 dnl http://people.gnome.org/~walters/docs/build-api.txt
16 dnl We don't support separate builddir when building from git
17 echo \#buildapi-variable-no-builddir >/dev/null
19 AC_SUBST(PACKAGE_SUFFIX)
20 AC_DEFINE_UNQUOTED(PACKAGE_SUFFIX, "$PACKAGE_SUFFIX", [Define to the suffix of this package])
22 program_transform_name="s,\$\$,${PACKAGE_SUFFIX},"
24 AC_SUBST(pkgdatadir, [${datadir}/vala${PACKAGE_SUFFIX}])
26 # Checks for programs.
27 AC_PROG_CC
28 AM_PROG_CC_C_O
29 AC_PROG_LN_S
30 AC_PROG_INSTALL
31 AC_PROG_MKDIR_P
33 LT_PREREQ([2.2.6])
34 LT_INIT([disable-static])
35 PKG_PROG_PKG_CONFIG([0.21])
37 AC_PROG_LEX
38 if test "$LEX" = :; then
39         AC_MSG_ERROR([flex not found but required])
42 AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :)
43 if test "$YACC" = :; then
44         AC_MSG_ERROR([bison not found but required])
47 AC_PATH_PROG(VALAC, valac, valac)
48 AC_SUBST(VALAC)
50 VALAC_BOOTSTRAP_REQUIRED=0.25.1
52 AS_IF([test "$VALAC" != valac], [FOUND_VALAC_VERION=`$VALAC --version | sed 's/Vala  *//'`
53         AS_VERSION_COMPARE(["$VALAC_BOOTSTRAP_REQUIRED"], ["$FOUND_VALAC_VERION"],
54                 [enable_boostrap=yes], [enable_boostrap=yes], [enable_boostrap=no])])
56 VALAFLAGS="$VALAFLAGS --disable-version-header"
57 if test x$enable_boostrap = xyes; then
58         VALAFLAGS="$VALAFLAGS --hide-internal"
61 AC_SUBST(VALAFLAGS)
62 AC_SUBST(CFLAGS)
63 AC_SUBST(CPPFLAGS)
64 AC_SUBST(LDFLAGS)
66 AC_ARG_ENABLE(unversioned, AS_HELP_STRING([--disable-unversioned], [Disable unversioned binaries]), enable_unversioned=$enableval, enable_unversioned=yes)
67 AM_CONDITIONAL(ENABLE_UNVERSIONED, test x$enable_unversioned = xyes)
69 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [Enable coverage analysis]), enable_coverage=$enableval, enable_coverage=no)
70 AM_CONDITIONAL(ENABLE_COVERAGE, test x$enable_coverage = xyes)
72 if test "$enable_coverage" = "yes"; then
73         COVERAGE_VALAFLAGS="-g"
74         COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
75         COVERAGE_LIBS="-lgcov"
76 else
77         COVERAGE_VALAFLAGS=
78         COVERAGE_CFLAGS=
79         COVERAGE_LIBS=
81 AC_SUBST(COVERAGE_VALAFLAGS)
82 AC_SUBST(COVERAGE_CFLAGS)
83 AC_SUBST(COVERAGE_LIBS)
85 GLIB_REQUIRED=2.32.0
87 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
89 AC_SUBST(GLIB_CFLAGS)
90 AC_SUBST(GLIB_LIBS)
92 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
94 AC_SUBST(GMODULE_CFLAGS)
95 AC_SUBST(GMODULE_LIBS)
97 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
98 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
100 AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
101 AM_CONDITIONAL([HAVE_HELP2MAN], [test x$HELP2MAN = xhelp2man])
103 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
105 AC_CONFIG_FILES([Makefile
106            libvala.pc
107            gee/Makefile
108            ccode/Makefile
109            vala/Makefile
110            codegen/Makefile
111            compiler/Makefile
112            vapi/Makefile
113            tests/Makefile
114            doc/Makefile
115            doc/manual/Makefile
116            doc/manual/version.xml
117            gobject-introspection/Makefile
118            vapigen/vapigen.pc
119            vapigen/Makefile
120            vapigen/vala-gen-introspect/Makefile
121            vapigen/vala-gen-introspect/vala-gen-introspect])
123 AC_OUTPUT