Propagate uncaught errors in try statements
[vala-lang.git] / configure.ac
blobd275072f5c0b9bacda8125ac4a676ad215e54a97
1 AC_INIT([vala], [0.7.4], [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(CFLAGS)
28 AC_SUBST(CPPFLAGS)
29 AC_SUBST(LDFLAGS)
31 AC_ARG_ENABLE(vapigen, AS_HELP_STRING([--enable-vapigen], [Enable VAPI generator]), enable_vapigen=$enableval, enable_vapigen=no)
32 AM_CONDITIONAL(ENABLE_VAPIGEN, test x$enable_vapigen = xyes)
34 if test "$enable_vapigen" = "yes"; then
35   vapigen_decl='vapigen=${bindir}/vapigen'
36   gen_introspect_decl='gen_introspect=${libdir}/vala/gen-introspect'
37   vala_gen_introspect_decl='vala_gen_introspect=${bindir}/vala-gen-introspect'
38 else
39   vapigen_decl=''
40   gen_introspect_decl=''
41   vala_gen_introspect_decl=''
43 AC_SUBST(vapigen_decl)
44 AC_SUBST(gen_introspect_decl)
45 AC_SUBST(vala_gen_introspect_decl)
47 GLIB_REQUIRED=2.12.0
49 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
51 AC_SUBST(GLIB_CFLAGS)
52 AC_SUBST(GLIB_LIBS)
54 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
56 AC_SUBST(GMODULE_CFLAGS)
57 AC_SUBST(GMODULE_LIBS)
59 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
61 AC_SUBST(GTHREAD_CFLAGS)
62 AC_SUBST(GTHREAD_LIBS)
64 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
65 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
67 AC_CONFIG_FILES([Makefile
68            vala-1.0.pc
69            gee/Makefile
70            ccode/Makefile
71            vala/Makefile
72            codegen/Makefile
73            compiler/Makefile
74            vapi/Makefile
75            tests/Makefile
76            doc/Makefile
77            doc/vala/Makefile
78            gobject-introspection/Makefile
79            vapigen/Makefile
80            vapigen/vala-gen-introspect/Makefile
81            vapigen/vala-gen-introspect/vala-gen-introspect])
83 AC_OUTPUT