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])
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)
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"
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'
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)
67 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
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
98 gobject-introspection/Makefile
100 vapigen/vala-gen-introspect/Makefile
101 vapigen/vala-gen-introspect/vala-gen-introspect])