4 [moonshot-community@jiscmail.ac.uk],
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])
12 AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects tar-pax no-dist-gzip dist-xz])
13 AM_SILENT_RULES([yes])
14 AM_MAINTAINER_MODE([enable])
19 # Checks for programs.
20 PKG_PROG_PKG_CONFIG([0.23])
33 SERVER_IPC_MODULE="msrpc-glib2-1.0"
34 CLIENT_IPC_MODULE="msrpc-mingw-1.0"
42 # We require dbus-glib for the client library even if we are using GDBus
43 # in the server. The reason we can't always use dbus-glib in the server is
44 # because Vala drops support for it, but as it ships with DBus there is very
45 # little danger of it being dropped by distros any time soon.
46 CLIENT_IPC_MODULE="dbus-glib-1"
47 PKG_CHECK_MODULES([GDBUS],
49 [SERVER_IPC_MODULE="gio-2.0"],
50 [SERVER_IPC_MODULE="dbus-glib-1"]
59 # We require dbus-glib for the client library even if we are using GDBus
60 # in the server. The reason we can't always use dbus-glib in the server is
61 # because Vala drops support for it, but as it ships with DBus there is very
62 # little danger of it being dropped by distros any time soon.
63 CLIENT_IPC_MODULE="dbus-glib-1"
64 PKG_CHECK_MODULES([GDBUS],
66 [SERVER_IPC_MODULE="gio-2.0"],
67 [SERVER_IPC_MODULE="dbus-glib-1"]
73 AM_CONDITIONAL([OS_LINUX], [test "$linux" = "yes"])
74 AM_CONDITIONAL([OS_WIN32], [test "$win32" = "yes"])
75 AM_CONDITIONAL([OS_MACOS], [test "$macos" = "yes"])
77 AM_CONDITIONAL([IPC_MSRPC], [test "$SERVER_IPC_MODULE" = "msrpc-glib2-1.0"])
78 AM_CONDITIONAL([IPC_DBUS], [test "$SERVER_IPC_MODULE" != "msrpc-glib2-1.0"])
79 AM_CONDITIONAL([IPC_DBUS_GLIB], [test "$SERVER_IPC_MODULE" = "dbus-glib-1"])
80 AM_CONDITIONAL([IPC_GDBUS], [test "$SERVER_IPC_MODULE" = "gio-2.0"])
82 if test "$SERVER_IPC_MODULE" = "dbus-glib-1"; then
83 AC_MSG_CHECKING([$VALAC is no greater than 0.12.1])
84 vala_version=`$VALAC --version | sed 's/Vala *//'`
85 AS_VERSION_COMPARE([0.12.1], ["$vala_version"],
86 [vala_supports_dbus_glib="no"],
87 [vala_supports_dbus_glib="no"],
88 [vala_supports_dbus_glib="yes"])
90 AC_MSG_RESULT([$vala_supports_dbus_glib])
91 if test "$vala_supports_dbus_glib" = "no"; then
93 *** Vala 0.12.1 or earlier is required for dbus-glib support. Newer versions
94 *** require that you have GLib 2.26 or newer (for GDBus support).])
98 if test "$SERVER_IPC_MODULE" = "msrpc-glib2-1.0"; then
100 AC_PATH_MSRPC_MINGW([0.1.0], :,
102 *** msrpc-mingw 0.1.0 or better is required.]))
104 AC_PATH_PROG([MIDL], [midl], no,
105 [/c/Program\ Files/Microsoft\ SDKs/Windows/v7.0/Bin$PATH_SEPARATOR$PATH])
106 if test "$MIDL" = "no"; then
108 *** Could not find the Microsoft interface compiler MIDL.EXE.
109 *** This program is available as part of the MS Windows SDK, in
110 *** the Win32 Development Tools package. If it is not in the PATH
111 *** or its default location you may set the 'MIDL' environment
112 *** variable to point to its location and rerun configure.])
116 if test "$win32" = "yes"; then
117 # Other Windows-specific tools
119 # LIB.EXE from MSVC to build an MSVC-compatible import library.
120 AC_PATH_PROG([MSVC_LIB], [lib], no,
121 [/c/Program\ Files/Microsoft\ Visual\ Studio\ 9.0/VC/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 9.0/VC/bin$PATH_SEPARATOR$PATH])
123 if test "$MSVC_LIB" = "no"; then
125 *** Could not find the Microsoft 'LIB.EXE' program. This is required
126 *** to build the Visual C import library for libmoonshot. Use the
127 *** MSVC_LIB environment variable to pass its location if this is
128 *** outside the PATH.])
132 # ImageMagick for the 'make icons' target. Note that
133 # c:/windows/system32/convert.exe is nothing to do with ImageMagick.
134 AC_PATH_PROG([IMAGEMAGICK_CONVERT], [convert], no,
135 [/c/Program\ Files/ImageMagick$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/ImageMagick$PATH_SEPARATOR$PATH])
137 if test "$IMAGEMAGICK_CONVERT" = "no" || test "$IMAGEMAGICK_CONVERT" = "/c/windows/system32/convert"; then
139 *** Could not find ImageMagick convert.exe. This is required for the
140 *** 'make icons' target. Use the IMAGEMAGICK_CONVERT environment
141 *** variable to pass its location if this is outside the PATH.])
145 # Windows Installer XML tools
146 AC_PATH_PROG([WIX_CANDLE], [candle], no,
147 [/c/Program\ Files/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR$PATH])
148 AC_PATH_PROG([WIX_LIGHT], [light], no,
149 [/c/Program\ Files/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR$PATH])
151 if test "$WIX_CANDLE" = "no" || test "$WIX_LIGHT" = "no"; then
153 *** Could not find the Windows Installer XML tools. These are required
154 *** for the 'make installer' target. Use the WIX_CANDLE and WIX_LIGHT
155 *** environment variables to pass their locations if they are outside
160 if test "$linux" = "yes"; then
161 AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no])
162 if test "$UPDATE_MIME_DATABASE" = "no"; then
164 *** Could not find the Freedesktop.org mime database update tool.
165 *** Web provisioning files could not be automatically installed.])
167 AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no])
168 if test "$UPDATE_DESKTOP_DATABASE" = "no"; then
170 *** Could not find the Freedesktop.org desktop entry database update
171 *** tool. Web provisioning files could not be automatically installed.])
175 MOONSHOT_APP="$bindir/moonshot"
176 MOONSHOT_WEBP="$bindir/moonshot-webp"
180 AC_SUBST(IMAGEMAGICK_CONVERT)
183 AC_SUBST(UPDATE_MIME_DATABASE)
184 AC_SUBST(UPDATE_DESKTOP_DATABASE)
185 AC_SUBST(MOONSHOT_APP)
186 AC_SUBST(MOONSHOT_WEBP)
189 PKG_CHECK_MODULES(moonshot,[
198 PKG_CHECK_MODULES(libmoonshot,[
203 AM_GNU_GETTEXT([external])
204 AM_GNU_GETTEXT_VERSION([0.17])
206 AC_SUBST([GETTEXT_PACKAGE],[PACKAGE_TARNAME])
207 AC_DEFINE([GETTEXT_PACKAGE],[PACKAGE_TARNAME],[Define to the gettext package name.])
213 moonshot-webp.desktop