(Improve configure error message)
[moonshot-ui.git] / configure.ac
1 AC_PREREQ([2.66])
2 AC_INIT([Moonshot],
3         [0.0.1],
4         [BUG-REPORT-ADDRESS],
5         [moonshot])
6
7 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_SRCDIR([configure.ac])
9 AC_CONFIG_MACRO_DIR([m4])
10 AC_CONFIG_AUX_DIR([build-aux])
11
12 AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects tar-pax no-dist-gzip dist-xz])
13 AM_SILENT_RULES([yes])
14
15 # Checks for programs.
16 AC_PROG_CC
17 AM_PROG_CC_C_O
18 AM_PROG_VALAC([0.9])
19
20 # Platform-specific checks
21 AC_CANONICAL_HOST
22
23 case "$host" in
24   *-*-mingw*)
25     AC_PATH_MSRPC_MINGW([0.1.0], :,
26       AC_MSG_ERROR([
27 *** msrpc-mingw 0.1.0 or better is required.]))
28
29     AC_PATH_PROG([MIDL], [midl], no)
30     if test "$MIDL" = "no"; then
31        AC_MSG_ERROR([
32 *** Could not find the Microsoft interface compiler MIDL.EXE.
33 *** This program is available as part of the MS Windows SDK, in
34 *** the Win32 Development Tools package. If it is not in the PATH
35 *** you may set the 'MIDL' environment variable to point to its
36 *** location and rerun configure.])
37     fi
38
39     IPC="msrpc-glib2-1.0"
40     ;;
41   *)
42     IPC="dbus-glib"
43     ;;
44 esac
45
46 AC_SUBST(MIDL)
47
48 AM_CONDITIONAL([IPC_MSRPC], [test "$IPC" = "msrpc-glib2-1.0"])
49 AM_CONDITIONAL([IPC_DBUS], [test "$IPC" = "dbus-glib"])
50
51 # Dependencies
52 PKG_CHECK_MODULES(moonshot,[
53         atk >= 1.20
54         glib-2.0 >= 2.24
55         gobject-2.0 >= 2.24
56         gtk+-2.0 >= 2.20
57         $IPC
58 ])
59
60 # i18n stuff
61 AM_GNU_GETTEXT([external])
62 AM_GNU_GETTEXT_VERSION([0.17])
63
64 AC_SUBST([GETTEXT_PACKAGE],[PACKAGE_TARNAME])
65 AC_DEFINE([GETTEXT_PACKAGE],[PACKAGE_TARNAME],[Define to the gettext package name.])
66
67 AC_CONFIG_FILES([
68         Makefile
69         po/Makefile.in
70 ])
71
72 AC_OUTPUT