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 PKG_PROG_PKG_CONFIG([0.23])
27 SERVER_IPC_MODULE="msrpc-glib2-1.0"
28 CLIENT_IPC_MODULE="msrpc-mingw-1.0"
32 SERVER_IPC_MODULE="dbus-glib-1"
33 CLIENT_IPC_MODULE="dbus-glib-1"
37 AM_CONDITIONAL([OS_LINUX], [test "$win32" != "yes"])
38 AM_CONDITIONAL([OS_WIN32], [test "$win32" = "yes"])
39 AM_CONDITIONAL([IPC_MSRPC], [test "$SERVER_IPC_MODULE" = "msrpc-glib2-1.0"])
40 AM_CONDITIONAL([IPC_DBUS], [test "$SERVER_IPC_MODULE" = "dbus-glib-1"])
42 # Checks for programs.
47 if test "$SERVER_IPC_MODULE" = "msrpc-glib2-1.0"; then
49 AC_PATH_MSRPC_MINGW([0.1.0], :,
51 *** msrpc-mingw 0.1.0 or better is required.]))
53 AC_PATH_PROG([MIDL], [midl], no,
54 [/c/Program\ Files/Microsoft\ SDKs/Windows/v7.0/Bin$PATH_SEPARATOR$PATH])
55 if test "$MIDL" = "no"; then
57 *** Could not find the Microsoft interface compiler MIDL.EXE.
58 *** This program is available as part of the MS Windows SDK, in
59 *** the Win32 Development Tools package. If it is not in the PATH
60 *** or its default location you may set the 'MIDL' environment
61 *** variable to point to its location and rerun configure.])
65 if test "$win32" = "yes"; then
66 # Other Windows-specific tools
68 # LIB.EXE from MSVC to build an MSVC-compatible import library.
69 AC_PATH_PROG([MSVC_LIB], [lib], no,
70 [/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])
72 if test "$MSVC_LIB" = "no"; then
74 *** Could not find the Microsoft 'LIB.EXE' program. This is required
75 *** to build the Visual C import library for libmoonshot. Use the
76 *** MSVC_LIB environment variable to pass its location if this is
77 *** outside the PATH.])
81 # ImageMagick for the 'make icons' target. Note that
82 # c:/windows/system32/convert.exe is nothing to do with ImageMagick.
83 AC_PATH_PROG([IMAGEMAGICK_CONVERT], [convert], no,
84 [/c/Program\ Files/ImageMagick$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/ImageMagick$PATH_SEPARATOR$PATH])
86 if test "$IMAGEMAGICK_CONVERT" = "no" || test "$IMAGEMAGICK_CONVERT" = "/c/windows/system32/convert"; then
88 *** Could not find ImageMagick convert.exe. This is required for the
89 *** 'make icons' target. Use the IMAGEMAGICK_CONVERT environment
90 *** variable to pass its location if this is outside the PATH.])
94 # Windows Installer XML tools
95 AC_PATH_PROG([WIX_CANDLE], [candle], no,
96 [/c/Program\ Files/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR$PATH])
97 AC_PATH_PROG([WIX_LIGHT], [light], no,
98 [/c/Program\ Files/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR$PATH])
100 if test "$WIX_CANDLE" = "no" || test "$WIX_LIGHT" = "no"; then
102 *** Could not find the Windows Installer XML tools. These are required
103 *** for the 'make installer' target. Use the WIX_CANDLE and WIX_LIGHT
104 *** environment variables to pass their locations if they are outside
109 if test "$win32" != "yes"; then
110 AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no])
111 if test "$UPDATE_MIME_DATABASE" = "no"; then
113 *** Could not find the Freedesktop.org mime database update tool.
114 *** Web provisioning files could not be automatically installed.])
116 AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no])
117 if test "$UPDATE_DESKTOP_DATABASE" = "no"; then
119 *** Could not find the Freedesktop.org desktop entry database update
120 *** tool. Web provisioning files could not be automatically installed.])
124 MOONSHOT_APP="$bindir/moonshot"
125 MOONSHOT_WEBP="$bindir/moonshot-webp"
129 AC_SUBST(IMAGEMAGICK_CONVERT)
132 AC_SUBST(UPDATE_MIME_DATABASE)
133 AC_SUBST(UPDATE_DESKTOP_DATABASE)
134 AC_SUBST(MOONSHOT_APP)
135 AC_SUBST(MOONSHOT_WEBP)
138 PKG_CHECK_MODULES(moonshot,[
146 PKG_CHECK_MODULES(libmoonshot,[
151 AM_GNU_GETTEXT([external])
152 AM_GNU_GETTEXT_VERSION([0.17])
154 AC_SUBST([GETTEXT_PACKAGE],[PACKAGE_TARNAME])
155 AC_DEFINE([GETTEXT_PACKAGE],[PACKAGE_TARNAME],[Define to the gettext package name.])
161 moonshot-webp.desktop