fixed: configure script missed a couple headers on some distros (thanks to oldnemesis).
[xbmc:xbmc-antiquated.git] / configure.in
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.59)
5 AC_INIT("xbmc", 2.1, bugs@xbmc.org)
6 AC_CONFIG_HEADER([config.h])
7
8 AC_CANONICAL_HOST
9
10 case $host in
11     i*86*-linux-gnu*)
12        ARCH="i486-linux"
13        ;;
14     x86_64-*-linux-gnu*)
15        ARCH="x86_64-linux"
16        ;;
17     i386-apple-darwin*)
18        ARCH="x86-osx"
19        ;;
20     powerpc-*-linux-gnu*)
21        ARCH="powerpc-linux"
22        AC_SUBST(ARCH_DEFINES, "-D_POWERPC")
23        ;;
24     powerpc64-*-linux-gnu*)
25        ARCH="powerpc64-linux"
26        AC_SUBST(ARCH_DEFINES, "-D_POWERPC64")
27        ;;
28     *)
29        AC_MSG_ERROR(unsupported host ($host))
30 esac
31 AC_SUBST([ARCH])
32
33 AC_ARG_ENABLE([debug],
34             [AS_HELP_STRING([--enable-debug],
35                [enable debugging information (default is yes)])],
36             [use_debug=$enableval],
37             [use_debug=yes])
38
39 AC_ARG_ENABLE([gl],
40             [AS_HELP_STRING([--enable-gl],
41                [enable OpenGL rendering (default is yes)])],
42             [use_gl=$enableval],
43             [use_gl=yes])
44
45 AC_ARG_ENABLE([profiling],
46             [AS_HELP_STRING([--enable-profiling],
47                [enable gprof profiling (default is no)])],
48             [use_profiling=$enableval],
49             [use_profiling=no])
50
51 AC_ARG_ENABLE([joystick],
52             [AS_HELP_STRING([--enable-joystick],
53                [enable SDL joystick support (default is yes)])],
54             [use_joystick=$enableval],
55             [use_joystick=yes])
56
57 AC_ARG_ENABLE([xrandr],
58             [AS_HELP_STRING([--enable-xrandr],
59                [enable XRandR support (default is yes)])],
60             [use_xrandr=$enableval],
61             [use_xrandr=yes])
62
63 AC_ARG_ENABLE([pcre],
64             [AS_HELP_STRING([--enable-pcre],
65                [enable PCRE based regular expression support (default is yes)])],
66             [use_pcre=$enableval],
67             [use_pcre=yes])
68
69 AC_PATH_PROG(CCACHE,ccache,none)
70 AC_ARG_ENABLE([ccache],
71             [AS_HELP_STRING([--enable-ccache],
72                [enable building with ccache feature (default is yes if ccache is installed)])],
73             [use_ccache=$enableval],
74             [use_ccache=yes])
75
76 # Checks for programs.
77 PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values
78 AC_PROG_CXX
79 CXXFLAGS=$PASSED_CXXFLAGS
80 PASSED_CFLAGS=$CFLAGS # Hack to override autoconf default values
81 AC_PROG_CC
82 CFLAGS=$PASSED_CFLAGS
83 AC_PROG_AWK
84 AC_PROG_LN_S
85 AC_PROG_MAKE_SET
86
87 if test "$host_vendor" = "apple" ; then
88    AC_SUBST(CFLAGS, "-L/System/Library/Frameworks/OpenGL.framework/Libraries -L/opt/local/lib -L/opt/local/lib/mysql5/mysql -I/opt/local/include")
89    AC_SUBST(CXXFLAGS, "-L/System/Library/Frameworks/OpenGL.framework/Libraries -L/opt/local/lib -L/opt/local/lib/mysql5/mysql -I/opt/local/include")
90    AC_SUBST(LDFLAGS, "-L/System/Library/Frameworks/OpenGL.framework/Libraries -L/opt/local/lib -L/opt/local/lib/mysql5/mysql")
91    AC_SUBST(INCLUDES, "-I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/mysql5 -I\$(abs_top_srcdir)/xbmc -I\$(abs_top_srcdir)/xbmc/lib -I\$(abs_top_srcdir)/xbmc/osx -I\$(abs_top_srcdir)/xbmc/lib/libffmpeg-OSX/libavutil -I\$(abs_top_srcdir)/xbmc/lib/libffmpeg-OSX -I.")
92 fi
93
94 # Checks for boost headers using g++ instead of gcc
95 oldCC="$CC"
96 CC="$CXX"
97 AC_CHECK_HEADER([boost/shared_ptr.hpp], , AC_MSG_ERROR(== Could not find the boost library. Please see README.linux))
98 CC="$oldCC"
99
100 # Checks for libraries.
101 if test "$use_gl" = "yes"; then
102   AC_CHECK_LIB([GL], [main],, AC_MSG_ERROR(libGL is required. Please see README.linux))
103   AC_CHECK_LIB([GLEW], [main],, AC_MSG_ERROR(libGLEW is required. Please see README.linux))
104   AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR(libGLU is required. Please see README.linux))
105 fi
106
107 if test "$host_vendor" != "apple"; then
108    AC_CHECK_LIB([Xinerama], [main],, AC_MSG_ERROR(libXinerama is required. Please see README.linux))
109 fi
110 AC_CHECK_LIB([mad], [main],, AC_MSG_ERROR(libmad is required. Please see README.linux))
111 AC_CHECK_HEADER([mad.h], , AC_MSG_ERROR(libmad is required. Please see README.linux))
112 AC_CHECK_HEADER([jpegint.h], , AC_MSG_ERROR(jpegint is required. Please see README.linux))
113 if test "$host_vendor" != "apple"; then
114    AC_CHECK_LIB([tre], [main],, AC_MSG_ERROR(libtre is required. Please see README.linux))
115 fi
116 AC_CHECK_LIB([ogg], [main],, AC_MSG_ERROR(libogg is required. Please see README.linux))
117 AC_CHECK_LIB([vorbis], [main],, AC_MSG_ERROR(libvorbis is required. Please see README.linux)) 
118 AC_CHECK_LIB([SDL], [main])
119 if test "$use_gl" = "no"; then
120   AC_MSG_RESULT(== WARNING: OpenGL support is disabled. XBMC will run VERY slow. ==)
121   AC_CHECK_LIB([SDL_gfx], [main])
122 fi
123
124 AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
125 AC_CHECK_LIB([SDL_mixer], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
126 AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux) )
127 AC_CHECK_LIB([freetype], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
128 AC_CHECK_LIB([fontconfig], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
129 AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR(== Could not find a required library (bz2). Please see README.linux))
130 AC_CHECK_LIB([fribidi], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
131 #AC_CHECK_LIB([lzo], [main],, AC_MSG_ERROR(== Could not find liblzo))
132 AC_CHECK_LIB([lzo2], [main],,
133   AC_CHECK_LIB([lzo], [main],, AC_MSG_ERROR(== Could not find either liblzo or liblzo2 - one of these must be present))
134   )
135 AC_CHECK_LIB([sqlite3], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
136 AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
137 AC_CHECK_LIB([asound], [main])      # check for asound library, fedora
138 AC_CHECK_LIB([rt], [clock_gettime])      # check for rt library, required for clock_gettime
139 AC_CHECK_LIB([resolv], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))      # check for resolv library
140 AC_CHECK_LIB([png12], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))      # check for cximage library
141 AC_CHECK_LIB([jasper], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))      # check for cximage library
142 AC_CHECK_LIB([jpeg], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))      # check for cximage library
143 AC_CHECK_LIB([faac], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
144 AC_CHECK_LIB([enca], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
145 AC_CHECK_LIB([pulse], [main], LIBS=" -lpulse $LIBS";LZO_INCLUDES="$LZO_INCLUDES -DHAS_PULSEAUDIO", AC_MSG_RESULT(== Could not find libpulse. PulseAudio support disabled))
146 if test "$host_vendor" != "apple" ; then
147    AC_CHECK_LIB([Xt], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
148    AC_CHECK_LIB([Xmu], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
149    if test "$use_xrandr" = "yes" ; then
150       AC_CHECK_LIB([Xrandr], [main],, use_xrandr="no";AC_MSG_RESULT(== Could not find libXRandR. SDL will be used for resolution support. ==))
151    else
152       AC_MSG_RESULT(== XRandR support disabled. SDL will be used for resolution support. ==)
153    fi
154 fi
155
156 if test "$use_pcre" = "yes"; then
157   AC_CHECK_LIB([pcre], [main],, use_pcre="no";AC_MSG_RESULT(== Could not find libpcre. PCRE support disabled. ==))
158 else
159   AC_MSG_RESULT(== PCRE support disabled. ==)
160 fi
161
162 if test "$host_vendor" != "apple" ; then
163   AC_CHECK_LIB([curl], [main], , AC_MSG_ERROR(== Could not find a required library. Please see README.linux))
164   AC_CHECK_LIB([hal], [main],LZO_INCLUDES="$LZO_INCLUDES -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal"
165                           , AC_MSG_ERROR(== Could not find a required library. Please see README.linux) )
166   AC_CHECK_LIB([dbus-1], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux) )
167   AC_CHECK_LIB([hal-storage], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux) )
168 fi
169
170 if test "$host_cpu" = "powerpc" ; then
171   AC_CHECK_LIB([python2.4], [main],, AC_MSG_ERROR(== Could not find a required library. Please see README.linux) )
172 fi
173
174 AC_CHECK_PROG(HAVE_GAWK,gawk,"yes","no",)
175 if test "$HAVE_GAWK" = "no" ; then
176   AC_MSG_ERROR(== Could not find a required program.  Please see README.linux.)
177 fi
178
179 AC_CHECK_PROG(HAVE_CMAKE,cmake,"yes","no",)
180 if test "$HAVE_CMAKE" = "no" ; then
181   AC_MSG_ERROR(== Could not find a required program.  Please see README.linux.)
182 fi
183
184 AC_CHECK_PROG(HAVE_GPERF,gperf,"yes","no",)
185 if test "$HAVE_GPERF" = "no" ; then
186   AC_MSG_ERROR(== Could not find a required program.  Please see README.linux.)
187 fi
188
189 AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",)
190 if test "$HAVE_UNZIP" = "no" ; then
191   AC_MSG_ERROR(== Could not find a required program.  Please see README.linux.)
192 fi
193
194 if test "$ARCH" != "x86_64-linux"; then
195   AC_CHECK_PROG(HAVE_NASM,nasm,"yes","no",)
196   if test "$HAVE_NASM" = "no" ; then
197     AC_MSG_ERROR(== Could not find a required program.  Please see README.linux.)
198   fi
199 fi
200
201 # Checks for header files.
202 AC_HEADER_DIRENT
203 AC_HEADER_STDC
204 AC_HEADER_SYS_WAIT
205 AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/time.h sys/timeb.h sys/vfs.h termios.h unistd.h utime.h wchar.h wctype.h])
206 AC_CHECK_HEADERS([lzo/lzo1.h])
207
208 # Checks for typedefs, structures, and compiler characteristics.
209 AC_HEADER_STAT
210 AC_HEADER_STDBOOL
211 AC_C_CONST
212 AC_TYPE_UID_T
213 AC_C_INLINE
214 AC_TYPE_INT16_T
215 AC_TYPE_INT32_T
216 AC_TYPE_INT64_T
217 AC_TYPE_INT8_T
218 AC_TYPE_MODE_T
219 AC_TYPE_OFF_T
220 AC_TYPE_PID_T
221 AC_C_RESTRICT
222 AC_TYPE_SIZE_T
223 AC_TYPE_SSIZE_T
224 AC_CHECK_MEMBERS([struct stat.st_rdev])
225 AC_HEADER_TIME
226 AC_STRUCT_TM
227 AC_TYPE_UINT16_T
228 AC_TYPE_UINT32_T
229 AC_TYPE_UINT64_T
230 AC_TYPE_UINT8_T
231
232 # Checks for library functions.
233 AC_FUNC_ALLOCA
234 AC_FUNC_CHOWN
235 AC_FUNC_CLOSEDIR_VOID
236 AC_FUNC_ERROR_AT_LINE
237 AC_FUNC_FSEEKO
238 AC_PROG_GCC_TRADITIONAL
239 AC_FUNC_LSTAT
240 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
241 AC_FUNC_MEMCMP
242 AC_FUNC_MKTIME
243 AC_FUNC_MMAP
244 AC_FUNC_REALLOC
245 AC_FUNC_SELECT_ARGTYPES
246 AC_FUNC_SETVBUF_REVERSED
247 AC_TYPE_SIGNAL
248 AC_FUNC_STAT
249 AC_FUNC_STRCOLL
250 AC_FUNC_STRFTIME
251 AC_FUNC_STRTOD
252 AC_FUNC_UTIME_NULL
253 AC_FUNC_VPRINTF
254 AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime])
255
256 dashes="------------------------"
257 final_message="\n  XBMC Configuration:"
258 final_message="\n$dashes$final_message\n$dashes"
259
260 if test "$use_debug" = "yes"; then
261   final_message="$final_message\n  Debugging:\tYes"
262   if test "$use_profiling" = "yes"; then
263     final_message="$final_message\n  Profiling:\tYes"
264     DEBUG_FLAGS="-g -pg -D_DEBUG -Wall"
265   else
266     final_message="$final_message\n  Profiling:\tNo"
267     DEBUG_FLAGS="-g -D_DEBUG -Wall"
268   fi
269 else
270   final_message="$final_message\n  Debugging:\tNo"
271   if test "$use_profiling" = "yes"; then
272     final_message="$final_message\n  Profiling:\tYes"
273     DEBUG_FLAGS="-pg -O2 -DNDEBUG=1"
274   else
275     final_message="$final_message\n  Profiling:\tNo"
276     DEBUG_FLAGS="-O2 -DNDEBUG=1"
277   fi
278 fi
279
280 if test "$use_gl" = "yes"; then
281   final_message="$final_message\n  OpenGL:\tYes"
282   SDL_DEFINES=""
283 else
284   final_message="$final_message\n  OpenGL:\tNo (Very Slow)"
285   SDL_DEFINES="-DHAS_SDL_2D"
286 fi
287
288 if test "$use_joystick" = "yes"; then
289   final_message="$final_message\n  Joystick:\tYes"
290   SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK"
291 else
292   final_message="$final_message\n  Joystick:\tNo"
293 fi
294
295 if test "$use_xrandr" = "yes"; then
296   final_message="$final_message\n  XRandR:\tYes"
297   SDL_DEFINES="$SDL_DEFINES -DHAS_XRANDR"
298 else
299   final_message="$final_message\n  XRandR:\tNo"
300 fi
301
302 if test "$use_pcre" = "yes"; then
303   final_message="$final_message\n  PCRE Support:\tYes"
304   SDL_DEFINES="$SDL_DEFINES -DHAS_PCRE"
305 else
306   final_message="$final_message\n  PCRE Support:\tNo"
307 fi
308
309 if test -d "/usr/include/lzo"; then
310   LZO_INCLUDES="$LZO_INCLUDES -I/usr/include/lzo"
311 else
312   LZO_INCLUDES="$LZO_INCLUDES"
313 fi
314
315 if test "$use_ccache" = "yes"; then
316   if test "$ac_cv_path_CCACHE" = "none"; then
317      echo "ccache not found. Falling back to default CC"
318      final_message="$final_message\n  ccache:\tNo"
319   else
320     CC="$ac_cv_path_CCACHE $CC"
321     CXX="$ac_cv_path_CCACHE $CXX"
322     AC_MSG_NOTICE(enabling ccache)
323     final_message="$final_message\n  ccache:\tYes"
324   fi
325 else
326   final_message="$final_message\n  ccache:\tNo"
327 fi
328
329 if test -x "/usr/bin/svnversion"; then
330   SDL_DEFINES="$SDL_DEFINES -D'SVN_REV=\"$(svnversion -n .)\"'"
331 else
332   if test -n $SVN_REV -a $SVN_REV != "" ; then 
333     SDL_DEFINES="$SDL_DEFINES -D'SVN_REV=\"$SVN_REV\"'"
334   fi
335 fi
336
337 AC_SUBST(DEBUG_FLAGS)
338 AC_SUBST(SDL_DEFINES)
339 AC_SUBST(LZO_INCLUDES)
340 AC_CONFIG_FILES([Makefile Makefile.include]
341                 [xbmc/lib/libPython/linux/Makefile]
342                 [xbmc/lib/libUPnP/Makefile]
343                 [tools/Linux/xbmc.sh]
344                 [tools/XBMCTex/Makefile]
345                 [xbmc/cores/dvdplayer/Codecs/Makefile]
346                 [xbmc/lib/cximage-6.0/Makefile]
347                 [xbmc/cores/paplayer/MACDll/Makefile]
348                 [xbmc/cores/paplayer/MIDCodec/Makefile]
349                 [xbmc/cores/paplayer/AACCodec/Makefile]
350                 [xbmc/cores/paplayer/AC3Codec/Makefile]
351                 [xbmc/cores/paplayer/ADPCMCodec/Makefile]
352                 [xbmc/cores/paplayer/ModuleCodec/vc6/dumb/Makefile]
353                 [xbmc/cores/paplayer/GYMCodec/Makefile]
354                 [xbmc/cores/paplayer/MP3Codec/Makefile]
355                 [xbmc/cores/paplayer/MPCCodec/xbmc/Makefile]
356                 [xbmc/cores/paplayer/NSFCodec/Makefile]
357                 [xbmc/cores/paplayer/SIDCodec/Makefile]
358                 [xbmc/cores/paplayer/vgmstream/Makefile]
359                 [xbmc/cores/paplayer/SPCCodec/SNES/SNESAPU/Makefile]
360                 [xbmc/cores/paplayer/vorbisfile/Makefile]
361                 [xbmc/cores/paplayer/WavPackCodec/Makefile]
362                 [xbmc/cores/paplayer/YMCodec/StSoundLibrary/Makefile]
363                 [xbmc/lib/libXBMS/Makefile]
364                 [xbmc/lib/libRTV/Makefile]
365                 [xbmc/lib/libexif/Makefile]
366                 [xbmc/lib/libXDAAP/Makefile]
367                 [xbmc/lib/libass/xbmc/Makefile]
368                 [xbmc/lib/libhdhomerun/Makefile]
369                 [xbmc/lib/libGoAhead/Makefile]
370                 [xbmc/lib/libshout/Makefile]
371                 [xbmc/lib/libid3tag/Makefile]
372                 [xbmc/DllPaths_generated.h]
373 )
374
375 AC_DEFUN([XB_CONFIG_MODULE],[
376 AC_CONFIG_COMMANDS_POST([
377 if [[ -d $1 ]]; then
378   pushd $1
379   $2
380   if [[ $? -ne 0 ]]; then 
381     popd
382     AC_MSG_ERROR([[Submodule $1 failed to configure]])
383   else
384     popd
385   fi;
386 else
387   AC_MSG_ERROR([[Submodule $1 doesn't exist]])
388 fi;
389 ])
390 ])
391
392 XB_CONFIG_MODULE([xbmc/lib/libPython/Python], [
393   ./configure \
394     --enable-ipv6 \
395     --enable-unicode=ucs4 \
396     --without-cxx \
397     --enable-shared \
398     --without-pymalloc \
399     --prefix=`pwd`/../linux/python-lib MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=-fPIC &&
400   sed -i -e "s/define HAVE_GETC_UNLOCKED 1/undef HAVE_GETC_UNLOCKED/" pyconfig.h &&
401   cp pyconfig.h Include
402 ])
403 XB_CONFIG_MODULE([xbmc/cores/paplayer/MPCCodec], [./configure])
404 XB_CONFIG_MODULE([xbmc/cores/paplayer/flac-1.2.1], [
405   ./configure -C \
406     --with-pic \
407     --disable-asm-optimizations \
408     --disable-xmms-plugin \
409     --disable-cpplibs \
410     CC="$CC" \
411     CXX="$CXX" && \
412     sed -ie s/__DECLARE__XBMC__ARCH__/$ARCH/ Makefile
413 ])
414 XB_CONFIG_MODULE([xbmc/cores/paplayer/vorbisfile/libvorbis], [./configure --with-pic])
415 XB_CONFIG_MODULE([xbmc/cores/paplayer/vorbisfile/ogg], [./configure --with-pic])
416 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/ffmpeg], [
417     ./configure \
418     --extra-cflags="-D_XBOX" \
419     --disable-static \
420     --disable-altivec \
421     --disable-vhook \
422     --disable-ipv6 \
423     --disable-debug \
424     --disable-muxers \
425     --disable-encoders \
426     --disable-devices \
427     --disable-ffplay \
428     --disable-ffserver \
429     --disable-ffmpeg \
430     --enable-shared \
431     --enable-postproc \
432     --enable-gpl \
433     --enable-swscale \
434     --enable-protocol=http \
435     --enable-pthreads
436 ])
437 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libdts], [
438   ./configure \
439     --disable-oss \
440     --disable-solaris-adio \
441     --disable-al-audio \
442     --disable-win \
443     CFLAGS="-fPIC"
444 ])
445 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libDVDCSS], [
446   ./configure \
447     --enable-static \
448     --disable-shared \
449     --with-pic
450 ])
451 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libdvdnav], [
452   ./configure \
453     --enable-static \
454     --disable-shared \
455     --with-pic \
456     CFLAGS="-D_XBOX -DHAVE_DVDCSS_DVDCSS_H"
457 ])
458 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libfaad2], [
459   ./configure \
460     --with-pic \
461     --with-mp4v2 \
462     CFLAGS="-O3"
463 ])
464 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/liba52], [
465   ./configure \
466   --with-pic \
467   --disable-static \
468   --enable-shared \
469   --disable-oss \
470   --disable-solaris-audio \
471   --disable-win \
472   --disable-al-audio \
473   CFLAGS=-fPIC
474 ])
475 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libmpeg2], [
476   ./configure \
477   --with-pic \
478   --disable-static \
479   --enable-shared \
480   --disable-directx \
481   --disable-sdl \
482   --without-x \
483 ])
484 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libmad], [./configure --with-pic])
485 XB_CONFIG_MODULE([xbmc/lib/cximage-6.0/zlib], [CFLAGS=-fPIC ./configure])
486 XB_CONFIG_MODULE([xbmc/lib/libass], [CFLAGS=-fPIC ./configure])
487 XB_CONFIG_MODULE([xbmc/lib/libid3tag/libid3tag],[CFLAGS=-O3 ./configure --disable-static --disable-debugging --with-pic])
488 XB_CONFIG_MODULE([xbmc/visualizations/XBMCProjectM/libprojectM],[rm -f CMakeCache.txt && CC="" CXX="" cmake -D CMAKE_BUILD_TYPE:STRING=RelWithDebInfo -D USE_FTGL:BOOL=OFF .])
489 XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[./configure --disable-shared --enable-static --with-pic])
490 XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --without-xscreensaver --disable-sound --disable-cyclone --disable-fieldlines --disable-flocks --disable-flux --disable-helios --disable-hyperspace --disable-lattice --disable-skyrocket])
491
492 AC_OUTPUT
493
494 final_message="$final_message\n  prefix:\t$prefix\n$dashes"
495 echo -e "$final_message\n"