Support constructor chain up to GObject using Object (...)
[vala-lang.git] / configure.ac
blob712f15e45f6fb697587013bf2e768f99879c9957
1 AC_INIT([vala], [0.7.8], [j@bitron.ch], [vala])
2 AC_CONFIG_SRCDIR([Makefile.am])
3 AC_CONFIG_HEADERS(config.h)
4 AC_CONFIG_MACRO_DIR([m4])
5 AM_INIT_AUTOMAKE([dist-bzip2])
6 AM_MAINTAINER_MODE
8 # Checks for programs.
9 AC_PROG_CC
10 AM_PROG_CC_C_O
11 AC_DISABLE_STATIC
12 AC_PROG_LIBTOOL
14 AC_PROG_LEX
15 if test "$LEX" = :; then
16         AC_MSG_ERROR([flex not found but required])
19 AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :)
20 if test "$YACC" = :; then
21         AC_MSG_ERROR([bison not found but required])
24 AC_PATH_PROG(VALAC, valac, valac)
25 AC_SUBST(VALAC)
27 AC_SUBST(VALAFLAGS)
28 AC_SUBST(CFLAGS)
29 AC_SUBST(CPPFLAGS)
30 AC_SUBST(LDFLAGS)
32 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [Enable coverage analysis]), enable_coverage=$enableval, enable_coverage=no)
33 AM_CONDITIONAL(ENABLE_COVERAGE, test x$enable_coverage = xyes)
35 if test "$enable_coverage" = "yes"; then
36         COVERAGE_VALAFLAGS="-g"
37         COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
38         COVERAGE_LIBS="-lgcov"
39 else
40         COVERAGE_VALAFLAGS=
41         COVERAGE_CFLAGS=
42         COVERAGE_LIBS=
44 AC_SUBST(COVERAGE_VALAFLAGS)
45 AC_SUBST(COVERAGE_CFLAGS)
46 AC_SUBST(COVERAGE_LIBS)
48 AC_ARG_ENABLE(vapigen, AS_HELP_STRING([--enable-vapigen], [Enable VAPI generator]), enable_vapigen=$enableval, enable_vapigen=no)
49 AM_CONDITIONAL(ENABLE_VAPIGEN, test x$enable_vapigen = xyes)
51 if test "$enable_vapigen" = "yes"; then
52   vapigen_decl='vapigen=${bindir}/vapigen'
53   gen_introspect_decl='gen_introspect=${libdir}/vala/gen-introspect'
54   vala_gen_introspect_decl='vala_gen_introspect=${bindir}/vala-gen-introspect'
55 else
56   vapigen_decl=''
57   gen_introspect_decl=''
58   vala_gen_introspect_decl=''
60 AC_SUBST(vapigen_decl)
61 AC_SUBST(gen_introspect_decl)
62 AC_SUBST(vala_gen_introspect_decl)
64 GLIB_REQUIRED=2.12.0
66 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
68 AC_SUBST(GLIB_CFLAGS)
69 AC_SUBST(GLIB_LIBS)
71 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
73 AC_SUBST(GMODULE_CFLAGS)
74 AC_SUBST(GMODULE_LIBS)
76 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
78 AC_SUBST(GTHREAD_CFLAGS)
79 AC_SUBST(GTHREAD_LIBS)
81 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
82 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
84 AC_CONFIG_FILES([Makefile
85            vala-1.0.pc
86            gee/Makefile
87            ccode/Makefile
88            vala/Makefile
89            codegen/Makefile
90            compiler/Makefile
91            vapi/Makefile
92            tests/Makefile
93            doc/Makefile
94            doc/vala/Makefile
95            gobject-introspection/Makefile
96            vapigen/Makefile
97            vapigen/vala-gen-introspect/Makefile
98            vapigen/vala-gen-introspect/vala-gen-introspect])
100 AC_OUTPUT