girparser: Fix parameter index calculation
[vala-lang.git] / configure.ac
blobbdd9878dd3e5d6a795277189609bd5ad23764588
1 AC_INIT([vala], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [j@bitron.ch], [vala])
2 AC_CONFIG_SRCDIR([Makefile.am])
3 AC_CONFIG_AUX_DIR([build-aux])
4 AC_CONFIG_HEADERS(config.h)
5 AC_CONFIG_MACRO_DIR([m4])
6 AM_INIT_AUTOMAKE([dist-bzip2])
7 AM_MAINTAINER_MODE
9 # Checks for programs.
10 AC_PROG_CC
11 AM_PROG_CC_C_O
12 AC_DISABLE_STATIC
13 AC_PROG_LIBTOOL
15 AC_PROG_LEX
16 if test "$LEX" = :; then
17         AC_MSG_ERROR([flex not found but required])
20 AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :)
21 if test "$YACC" = :; then
22         AC_MSG_ERROR([bison not found but required])
25 AC_PATH_PROG(VALAC, valac, valac)
26 AC_SUBST(VALAC)
28 AC_SUBST(VALAFLAGS)
29 AC_SUBST(CFLAGS)
30 AC_SUBST(CPPFLAGS)
31 AC_SUBST(LDFLAGS)
33 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [Enable coverage analysis]), enable_coverage=$enableval, enable_coverage=no)
34 AM_CONDITIONAL(ENABLE_COVERAGE, test x$enable_coverage = xyes)
36 if test "$enable_coverage" = "yes"; then
37         COVERAGE_VALAFLAGS="-g"
38         COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
39         COVERAGE_LIBS="-lgcov"
40 else
41         COVERAGE_VALAFLAGS=
42         COVERAGE_CFLAGS=
43         COVERAGE_LIBS=
45 AC_SUBST(COVERAGE_VALAFLAGS)
46 AC_SUBST(COVERAGE_CFLAGS)
47 AC_SUBST(COVERAGE_LIBS)
49 AC_ARG_ENABLE(vapigen, AS_HELP_STRING([--enable-vapigen], [Enable VAPI generator]), enable_vapigen=$enableval, enable_vapigen=no)
50 AM_CONDITIONAL(ENABLE_VAPIGEN, test x$enable_vapigen = xyes)
52 if test "$enable_vapigen" = "yes"; then
53   vapigen_decl='vapigen=${bindir}/vapigen'
54   gen_introspect_decl='gen_introspect=${libdir}/vala/gen-introspect'
55   vala_gen_introspect_decl='vala_gen_introspect=${bindir}/vala-gen-introspect'
56 else
57   vapigen_decl=''
58   gen_introspect_decl=''
59   vala_gen_introspect_decl=''
61 AC_SUBST(vapigen_decl)
62 AC_SUBST(gen_introspect_decl)
63 AC_SUBST(vala_gen_introspect_decl)
65 GLIB_REQUIRED=2.14.0
67 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
69 AC_SUBST(GLIB_CFLAGS)
70 AC_SUBST(GLIB_LIBS)
72 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
74 AC_SUBST(GMODULE_CFLAGS)
75 AC_SUBST(GMODULE_LIBS)
77 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
79 AC_SUBST(GTHREAD_CFLAGS)
80 AC_SUBST(GTHREAD_LIBS)
82 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
83 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
85 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
87 AC_CONFIG_FILES([Makefile
88            vala-1.0.pc
89            gee/Makefile
90            ccode/Makefile
91            vala/Makefile
92            codegen/Makefile
93            compiler/Makefile
94            vapi/Makefile
95            tests/Makefile
96            doc/Makefile
97            doc/vala/Makefile
98            gobject-introspection/Makefile
99            vapigen/Makefile
100            vapigen/vala-gen-introspect/Makefile
101            vapigen/vala-gen-introspect/vala-gen-introspect])
103 AC_OUTPUT