Updated: Sudoku no longer crashes
[moon.git] / configure.ac
blobd059272d4b093c187f753a07f2a447f0d1fe9df0
1 AC_INIT([moonlight], [1.99.7.99])
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 changequote(,)dnl
28 dnl LIBTOOL="${LIBTOOL} \$(shell echo \"\$(MFLAGS)\" | awk '/^[^ ]*s/ { print \"--silent\" }')"
29 changequote([,])dnl
31 dnl
32 dnl Dependencies
33 dnl
35 PTHREAD_CHECK
36 MOONLIGHT_CHECK_C_COMPILER
37 MOONLIGHT_CHECK_LARGE_FILE
38 MOONLIGHT_CHECK_ZLIB
39 MOONLIGHT_CHECK_EXPAT
41 MOONLIGHT_CHECK_FFMPEG
42 MOONLIGHT_CHECK_CODECS
43 MOONLIGHT_CHECK_SOUND
45 MOONLIGHT_CHECK_GLIB
46 MOONLIGHT_CHECK_GTK
47 MOONLIGHT_CHECK_XRANDR
48 MOONLIGHT_CHECK_FONTS
49 MOONLIGHT_CHECK_CAIRO
51 MOONLIGHT_CHECK_MONO
52 MOONLIGHT_CHECK_MOZILLA
54 MOONLIGHT_CHECK_TESTING
55 MOONLIGHT_CHECK_EXAMPLES
56 MOONLIGHT_CHECK_BUILD_CONFIGURATION
57 MOONLIGHT_CHECK_FIREFOX_XPI
59 MOONLIGHT_CHECK_UNWIND
61 dnl
62 dnl Export Variables
63 dnl
65 AC_PATH_PROG(GACUTIL, gacutil)
66 AC_PATH_PROG(MONO, mono)
67 AC_PATH_PROG(ZIP, zip, no)
68 if test "x$ZIP" = "xno" ; then
69         AC_MSG_ERROR([No zip tool found])
72 PERF_TOOL_CFLAGS="$MONO_CFLAGS $GTK_CFLAGS $XULRUNNER_CFLAGS"
73 PERF_TOOL_LIBS="$MONO_LIBS $GTK_LIBS $XULRUNNER_LIBS"
74 AC_SUBST(PERF_TOOL_CFLAGS)
75 AC_SUBST(PERF_TOOL_LIBS)
77 MOON_CFLAGS="$CAIRO_CFLAGS $FREETYPE2_CFLAGS $FONTCONFIG_CFLAGS $GTK_CFLAGS $ALSA_CFLAGS $PULSEAUDIO_CFLAGS $FFMPEG_CFLAGS $MONO_CFLAGS"
78 dnl MOON_LIBS is partially defined above for the user-plugin build
79 MOON_LIBS="$MOON_LIBS $MONO_LIBS $FFMPEG_LIBS $CAIRO_LIBS $FREETYPE2_LIBS $FONTCONFIG_LIBS $GTK_LIBS $ZLIB $PTHREAD_LIBS $EXPAT_LIBS $UNWIND_LIBS"
81 dnl For MOON_XPI_LIBS, only link against libs which will be on all systems
82 MOON_XPI_LIBS="$CAIRO_LIBS $FREETYPE2_LIBS $FONTCONFIG_LIBS $GTK_LIBS $ZLIB $PTHREAD_LIBS $EXPAT_LIBS" 
84 # Remove glitz from the link flags (fixes Bug 338506)
85 MOON_LIBS="$(echo $MOON_LIBS | sed -e s/-lglitz//g)"
86 MOON_XPI_LIBS="$(echo $MOON_XPI_LIBS | sed -e s/-lglitz//g)"
88 AC_SUBST(MOON_CFLAGS)
89 AC_SUBST(MOON_LIBS)
90 AC_SUBST(MOON_XPI_LIBS)
92 MOON_EXTRA_CFLAGS="$GTK_CFLAGS $ALSA_CFLAGS $FFMPEG_CFLAGS $PULSEAUDIO_CFLAGS"
93 MOON_EXTRA_LIBS="$GTK_LIBS $FFMPEG_LIBS"
94 AC_SUBST(MOON_EXTRA_CFLAGS)
95 AC_SUBST(MOON_EXTRA_LIBS)
97 MOON_PROG_CFLAGS="$GTK_CFLAGS $ALSA_CFLAGS $FFMPEG_CFLAGS $PULSEAUDIO_CFLAGS $MONO_CFLAGS -I\$(top_srcdir)/src/"
98 MOON_PROG_LIBS="$GTK_LIBS $FFMPEG_LIBS $UNWIND_LIBS \$(top_builddir)/src/libmoon.la"
99 AC_SUBST(MOON_PROG_CFLAGS)
100 AC_SUBST(MOON_PROG_LIBS)
102 PLUGIN_CFLAGS="$GTK_CFLAGS $MONO_CFLAGS -DPLUGIN_DIR=\\\"\$(pkglibdir)\\\""
103 PLUGIN_LIBS="$GTK_LIBS $MONO_LIBS"
104 PLUGIN_XPI_LIBS="$GTK_LIBS"
106 AC_SUBST(PLUGIN_CFLAGS)
107 AC_SUBST(PLUGIN_LIBS)
108 AC_SUBST(PLUGIN_XPI_LIBS)
110 LOADER_LIBS="$GLIB_LIBS"
111 AC_SUBST(LOADER_LIBS)
113 DOCDIR=$(pkg-config --variable=sourcesdir monodoc)
115 # this hack will be dropped once we get this working:
116 # http://www.mono-project.com/Moonlight/SecurityStatus#Assembly_Loading
117 if test "x$MOON_A11Y_INTERNAL_HACK" = "x1"; then
118        AC_DEFINE([MOON_A11Y_INTERNAL_HACK_ENABLED], [1],
119                  [Whether Mono A11y is enabled for now])
121 AM_CONDITIONAL(MOON_A11Y_INTERNAL_HACK,test x$MOON_A11Y_INTERNAL_HACK = x1)
123 if test x$with_ff3 = xyes; then
124    MOZILLA_CFLAGS=$FF3_CFLAGS
125 else
126    MOZILLA_CFLAGS=$FF2_CFLAGS
128 SHOCKER_CFLAGS="$GTK_CFLAGS $MOZILLA_CFLAGS $IMAGEMAGICK_CFLAGS $XTST_CFLAGS"
129 SHOCKER_LIBS="$GTK_LIBS $IMAGEMAGICK_LIBS $XTST_LIBS $UNWIND_LIBS"
130 AC_SUBST(SHOCKER_CFLAGS)
131 AC_SUBST(SHOCKER_LIBS)
133 AC_SUBST(CFLAGS)
134 AC_SUBST(CXXFLAGS)
136 AC_OUTPUT([
137 moon.pc
138 Makefile
139 m4/Makefile
140 src/Makefile
141 src/codec-version.h
142 class/Makefile
143 class/tuning/Makefile
144 class/tuning/SecurityAttributes/Makefile
145 class/System.Windows/Makefile
146 class/System.Windows.Browser/Makefile
147 class/System.Windows.Controls/Makefile
148 class/System.Windows.Controls.Data/Makefile
149 class/Moon.Windows.Desktop/Makefile
150 scripts/Makefile
151 scripts/smcs
152 gtk/Makefile
153 man/Makefile
154 gtk/moonlight-gtk.pc
155 data/Makefile
156 test/Makefile
157 test/2.0/Makefile
158 test/2.0/moon-unit/Makefile
159 test/2.0/Mono.Moonlight.UnitTesting/Makefile
160 test/2.0/Microsoft.Silverlight.Testing/Makefile
161 test/2.0/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight/Makefile
162 test/2.0/Microsoft.SilverlightControls/Makefile
163 test/2.0/Microsoft.SilverlightControls/Controls.Test.Common/Makefile
164 test/2.0/Microsoft.SilverlightControls/Controls.Data.Test/Makefile
165 test/2.0/Microsoft.SilverlightControls/Controls.Extended.Test/Makefile
166 test/2.0/Microsoft.SilverlightControls/site/Makefile
167 test/harness/Makefile
168 test/harness/shocker/Makefile
169 test/parsertest/Makefile
170 test/sizes/Makefile
171 test/templates/Makefile
172 test/templates/managed/Makefile
173 test/cpp/Makefile
174 tools/Makefile
175 tools/generators/Makefile
176 tools/mopen/Makefile
177 tools/mxap/Makefile
178 tools/munxap/Makefile
179 tools/unsign/Makefile
180 tools/xamlg/Makefile
181 tools/xaml2html/Makefile
182 tools/respack/Makefile
183 tools/moonvisi/Makefile
184 tools/sockpol/Makefile
185 examples/Makefile
186 examples/desklet/Makefile
187 examples/desklet/calculator/Makefile
188 examples/desklet/cpumonitor/Makefile
189 examples/desklet/glassyclock/Makefile
190 examples/desklet/glassymonitor/Makefile
191 examples/desklet/glassyslides/Makefile
192 examples/desklet/ruler/Makefile
193 examples/desklet/simpleclock/Makefile
194 plugin/Makefile
195 plugin/firefox/Makefile
196 plugin/firefox/ff2/Makefile
197 plugin/firefox/ff3/Makefile
198 plugin/install/Makefile
199 plugin/install/install.rdf
200 plugin/test/Makefile
201 plugin/samples/Makefile
202 perf/Makefile
205 # general configuration info
206 cat <<EOF
207 Moonlight configuration
208 =======================
210   General configuration:
211         Using cairo: $with_cairo
212         Test Harness: $with_testing $testing_reason
213         Performance Suite: $with_performance $performance_reason
216 dnl debug info
217 cat <<EOF
219   Debug configuration:
220         Sanity checks: $with_sanity_checks
221         Object tracking: $with_object_tracking
222         Logging support with MOONLIGHT_DEBUG: $with_logging
225 # media info
226 cat <<EOF
228   Media Support: $media_warning
229         FFmpeg: $with_ffmpeg $ffmpeg_reason
230         ALSA: $with_alsa $alsa_reason
231         PulseAudio: $with_pulseaudio $pulseaudio_reason
234 # silverlight version info
235 cat <<EOF
237   Silverlight Support:
238         Silverlight 1.0: yes
239         Silverlight 2.0: yes
242 cat <<EOF
243           Browser plugin assemblies: $browser_support $browser_reason
245 if test x$browser_support = xyes; then
246 cat <<EOF
247             Path to mcs tree: $with_mcspath
248             Path to mono-basic tree: $with_mono_basic_path
251 cat <<EOF
252           Desktop application assemblies: $desktop_support $desktop_reason
255 # plugin installer/bridge info
256 cat <<EOF
258   Browser Support:
259         Firefox: $with_mozilla
262 if test x$with_mozilla = xyes; then
263 cat <<EOF
264           Plugin Installer (.xpi): $user_plugin
265           Gecko 1.8 (Firefox 2): $with_ff2 $ff2_reason
266           Gecko 1.9 (Firefox 3): $with_ff3 $ff3_reason
270 # blank line
271 cat <<EOF