add 3.0 methods to this interface
[moon.git] / configure.ac
blob034e6a6ae54f1b66ddbb2e3d4ec8c9e14afc8aa7
1 AC_INIT([moonlight], [2.9])
3 AC_DEFINE([PREVIEW_VERSION], ["9"], "")
5 AC_CONFIG_SRCDIR(README)
6 AC_CANONICAL_SYSTEM
8 AM_CONFIG_HEADER(config.h)
9 AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign])
10 AM_MAINTAINER_MODE
12 AC_SUBST([ACLOCAL_AMFLAGS], ["-I m4 \${ACLOCAL_FLAGS}"])
14 AC_PROG_CXX
15 AC_HEADER_STDC
16 AC_DISABLE_STATIC
17 AC_PROG_LIBTOOL
18 DOLT
19 PKG_PROG_PKG_CONFIG
21 AC_DEFINE(__STDC_CONSTANT_MACROS, [], [To make avformat work with C++])
22 AC_DEFINE(__STDC_LIMIT_MACROS, [], [To get limits of specified-width integer types])
24 AC_SEARCH_LIBS(clock_gettime,rt)
25 AC_CHECK_HEADERS(sys/time.h)
27 dnl ********************************************************
28 dnl *** libiberty.h (included by demangle.h) will define ***
29 dnl *** basename() unless HAVE_DECL_BASENAME is defined  ***
30 dnl *** to 1, so check if libc defines it.               ***
31 dnl ***                                                  ***
32 dnl *** Note: g++ defines _GNU_SOURCE                    ***
33 dnl ********************************************************
34 CFLAGS_save="$CFLAGS"
35 CFLAGS="$CFLAGS -D_GNU_SOURCE"
36 AC_CHECK_DECLS([basename])
37 CFLAGS="$CFLAGS_save"
39 changequote(,)dnl
40 dnl LIBTOOL="${LIBTOOL} \$(shell echo \"\$(MFLAGS)\" | awk '/^[^ ]*s/ { print \"--silent\" }')"
41 changequote([,])dnl
43 dnl
44 dnl Dependencies
45 dnl
47 PTHREAD_CHECK
48 MOONLIGHT_CHECK_C_COMPILER
49 MOONLIGHT_CHECK_LARGE_FILE
50 MOONLIGHT_CHECK_ZLIB
51 MOONLIGHT_CHECK_EXPAT
53 MOONLIGHT_CHECK_FFMPEG
54 MOONLIGHT_CHECK_CODECS
55 MOONLIGHT_CHECK_SOUND
57 MOONLIGHT_CHECK_GLIB
58 MOONLIGHT_CHECK_GTK
59 MOONLIGHT_CHECK_XRANDR
60 MOONLIGHT_CHECK_FONTS
61 MOONLIGHT_CHECK_CAIRO
63 MOONLIGHT_CHECK_MONO
64 MOONLIGHT_CHECK_MOZILLA
66 MOONLIGHT_CHECK_TESTING
67 MOONLIGHT_CHECK_EXAMPLES
68 MOONLIGHT_CHECK_BUILD_CONFIGURATION
69 MOONLIGHT_CHECK_FIREFOX_XPI
71 MOONLIGHT_CHECK_UNWIND
73 dnl
74 dnl Export Variables
75 dnl
77 AC_PATH_PROG(GACUTIL, gacutil)
78 AC_PATH_PROG(MONO, mono)
79 AC_PATH_PROG(ZIP, zip, no)
80 if test "x$ZIP" = "xno" ; then
81         AC_MSG_ERROR([No zip tool found])
84 PERF_TOOL_CFLAGS="$MONO_CFLAGS $GTK_CFLAGS $XULRUNNER_CFLAGS"
85 PERF_TOOL_LIBS="$MONO_LIBS $GTK_LIBS $XULRUNNER_LIBS"
86 AC_SUBST(PERF_TOOL_CFLAGS)
87 AC_SUBST(PERF_TOOL_LIBS)
89 MOON_CFLAGS="$CAIRO_CFLAGS $FREETYPE2_CFLAGS $FONTCONFIG_CFLAGS $GTK_CFLAGS $ALSA_CFLAGS $PULSEAUDIO_CFLAGS $FFMPEG_CFLAGS $MONO_CFLAGS"
90 dnl MOON_LIBS is partially defined above for the user-plugin build
91 MOON_LIBS="$MOON_LIBS $MONO_LIBS $FFMPEG_LIBS $CAIRO_LIBS $FREETYPE2_LIBS $FONTCONFIG_LIBS $GTK_LIBS $ZLIB $PTHREAD_LIBS $EXPAT_LIBS $UNWIND_LIBS"
93 dnl For MOON_XPI_LIBS, only link against libs which will be on all systems
94 MOON_XPI_LIBS="$CAIRO_LIBS $FREETYPE2_LIBS $FONTCONFIG_LIBS $GTK_LIBS $ZLIB $PTHREAD_LIBS $EXPAT_LIBS" 
96 # Remove glitz from the link flags (fixes Bug 338506)
97 MOON_LIBS="$(echo $MOON_LIBS | sed -e s/-lglitz//g)"
98 MOON_XPI_LIBS="$(echo $MOON_XPI_LIBS | sed -e s/-lglitz//g)"
100 AC_SUBST(MOON_CFLAGS)
101 AC_SUBST(MOON_LIBS)
102 AC_SUBST(MOON_XPI_LIBS)
104 MOON_EXTRA_CFLAGS="$GTK_CFLAGS $ALSA_CFLAGS $FFMPEG_CFLAGS $PULSEAUDIO_CFLAGS"
105 MOON_EXTRA_LIBS="$GTK_LIBS $FFMPEG_LIBS"
106 AC_SUBST(MOON_EXTRA_CFLAGS)
107 AC_SUBST(MOON_EXTRA_LIBS)
109 MOON_PROG_CFLAGS="$GTK_CFLAGS $ALSA_CFLAGS $FFMPEG_CFLAGS $PULSEAUDIO_CFLAGS $MONO_CFLAGS -I\$(top_srcdir)/src/"
110 MOON_PROG_LIBS="$GTK_LIBS $FFMPEG_LIBS $UNWIND_LIBS \$(top_builddir)/src/libmoon.la"
111 AC_SUBST(MOON_PROG_CFLAGS)
112 AC_SUBST(MOON_PROG_LIBS)
114 PLUGIN_CFLAGS="$GTK_CFLAGS $MONO_CFLAGS -DPLUGIN_DIR=\\\"\$(pkglibdir)\\\""
115 PLUGIN_LIBS="$GTK_LIBS $MONO_LIBS"
116 PLUGIN_XPI_LIBS="$GTK_LIBS"
118 AC_SUBST(PLUGIN_CFLAGS)
119 AC_SUBST(PLUGIN_LIBS)
120 AC_SUBST(PLUGIN_XPI_LIBS)
122 LOADER_LIBS="$GLIB_LIBS"
123 AC_SUBST(LOADER_LIBS)
125 DOCDIR=$(pkg-config --variable=sourcesdir monodoc)
127 if test x$with_ff3 = xyes; then
128    MOZILLA_CFLAGS=$FF3_CFLAGS
129 else
130    MOZILLA_CFLAGS=$FF2_CFLAGS
132 SHOCKER_CFLAGS="$GTK_CFLAGS $MOZILLA_CFLAGS $IMAGEMAGICK_CFLAGS $XTST_CFLAGS"
133 SHOCKER_LIBS="$GTK_LIBS $IMAGEMAGICK_LIBS $XTST_LIBS $UNWIND_LIBS"
134 AC_SUBST(SHOCKER_CFLAGS)
135 AC_SUBST(SHOCKER_LIBS)
137 AC_SUBST(CFLAGS)
138 AC_SUBST(CXXFLAGS)
140 AC_OUTPUT([
141 moon.pc
142 Makefile
143 m4/Makefile
144 src/Makefile
145 src/codec-version.h
146 class/Makefile
147 class/tuning/Makefile
148 class/tuning/SecurityAttributes/Makefile
149 class/System.Windows/Makefile
150 class/System.Windows.Browser/Makefile
151 class/System.Windows.Controls/Makefile
152 class/System.Windows.Controls.Data/Makefile
153 class/Moon.Windows.Desktop/Makefile
154 scripts/Makefile
155 scripts/smcs
156 gtk/Makefile
157 man/Makefile
158 gtk/moonlight-gtk.pc
159 data/Makefile
160 test/Makefile
161 test/2.0/Makefile
162 test/2.0/FakeA11yBridge/Makefile
163 test/2.0/moon-unit/Makefile
164 test/2.0/Mono.Moonlight.UnitTesting/Makefile
165 test/2.0/Microsoft.Silverlight.Testing/Makefile
166 test/2.0/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight/Makefile
167 test/2.0/Microsoft.SilverlightControls/Makefile
168 test/2.0/Microsoft.SilverlightControls/Controls.Test.Common/Makefile
169 test/2.0/Microsoft.SilverlightControls/Controls.Data.Test/Makefile
170 test/2.0/Microsoft.SilverlightControls/Controls.Extended.Test/Makefile
171 test/2.0/Microsoft.SilverlightControls/site/Makefile
172 test/harness/Makefile
173 test/harness/shocker/Makefile
174 test/parsertest/Makefile
175 test/sizes/Makefile
176 test/templates/Makefile
177 test/templates/managed/Makefile
178 test/cpp/Makefile
179 tools/Makefile
180 tools/generators/Makefile
181 tools/mopen/Makefile
182 tools/mxap/Makefile
183 tools/munxap/Makefile
184 tools/unsign/Makefile
185 tools/xamlg/Makefile
186 tools/xaml2html/Makefile
187 tools/respack/Makefile
188 tools/moonvisi/Makefile
189 tools/sockpol/Makefile
190 examples/Makefile
191 examples/desklet/Makefile
192 examples/desklet/calculator/Makefile
193 examples/desklet/cpumonitor/Makefile
194 examples/desklet/glassyclock/Makefile
195 examples/desklet/glassymonitor/Makefile
196 examples/desklet/glassyslides/Makefile
197 examples/desklet/ruler/Makefile
198 examples/desklet/simpleclock/Makefile
199 plugin/Makefile
200 plugin/firefox/Makefile
201 plugin/firefox/ff2/Makefile
202 plugin/firefox/ff3/Makefile
203 plugin/install/Makefile
204 plugin/install/install.rdf
205 plugin/test/Makefile
206 plugin/samples/Makefile
207 perf/Makefile
210 # general configuration info
211 cat <<EOF
212 Moonlight configuration
213 =======================
215   General configuration:
216         Using cairo: $with_cairo
217         Test Harness: $with_testing $testing_reason
218         Performance Suite: $with_performance $performance_reason
221 dnl debug info
222 cat <<EOF
224   Debug configuration: $with_debug
225         Sanity checks: $with_sanity_checks
226         Object tracking: $with_object_tracking
227         Logging support with MOONLIGHT_DEBUG: $with_logging
230 # media info
231 cat <<EOF
233   Media Support: $media_warning
234         FFmpeg: $with_ffmpeg $ffmpeg_reason
235         ALSA: $with_alsa $alsa_reason
236         PulseAudio: $with_pulseaudio $pulseaudio_reason
239 # silverlight version info
240 cat <<EOF
242   Silverlight Support:
243         Silverlight 1.0: yes
244         Silverlight 2.0: yes
247 cat <<EOF
248           Browser plugin assemblies: $browser_support $browser_reason
250 if test x$browser_support = xyes; then
251 cat <<EOF
252             Path to mcs tree: $with_mcspath
253             Path to mono-basic tree: $with_mono_basic_path
256 cat <<EOF
257           Desktop application assemblies: $desktop_support $desktop_reason
260 # plugin installer/bridge info
261 cat <<EOF
263   Browser Support:
264         Firefox: $with_mozilla
267 if test x$with_mozilla = xyes; then
268 cat <<EOF
269           Plugin Installer (.xpi): $user_plugin
270           Gecko 1.8 (Firefox 2): $with_ff2 $ff2_reason
271           Gecko 1.9 (Firefox 3): $with_ff3 $ff3_reason
275 # blank line
276 cat <<EOF